query
stringlengths 7
33.1k
| document
stringlengths 7
335k
| metadata
dict | negatives
sequencelengths 3
101
| negative_scores
sequencelengths 3
101
| document_score
stringlengths 3
10
| document_rank
stringclasses 102
values |
---|---|---|---|---|---|---|
get the user field. | public String getUser() {
return user;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String[] getUserField()\n {\n return this.userField;\n }",
"public String[] getUserField()\n {\n return this.userField;\n }",
"public String[] getUserField()\n {\n return this.userField;\n }",
"public JTextField getTextFieldUser() {\r\n\t\treturn textFieldUser;\r\n\t}",
"public String getDbUser() {\n\t\treturn textFieldDbUser.getText();\n\t}",
"public String getUsernameFieldName() {\n return getStringProperty(USERNAME_FIELD_NAME_KEY);\n }",
"public String getUser()\n {\n return _user;\n }",
"public String getUser()\n {\n return this.user;\n }",
"public String getUser()\n {\n return this.user;\n }",
"public String getUser()\n {\n return this.user;\n }",
"public String getUser() {\r\n return user;\r\n }",
"public String getTxtUser() {\n return txtUser.getText();\n }",
"public String getUser(){\n \treturn user;\n }",
"public static String getUser() {\r\n return user;\r\n }",
"public String getUser() {\n return this.user;\n }",
"public String getUser() {\n return user;\n }",
"public String getUser() {\n return user;\n }",
"public String getUser() {\n return user;\n }",
"public static String getUser() {\n return user;\n }",
"public String getUser() {\n if(user == null)\n return \"\"; \n return user;\n }",
"public String getUserId() {\n return userIdEditText.getText().toString();\n }",
"public static String getBiblioUser() {\n\t\treturn \"user\";\n\t}",
"public String getUser() {\r\n\t\treturn user;\r\n\t}",
"public String getUser() {\r\n\t\treturn user;\r\n\t}",
"public java.lang.String getUser(){\r\n return localUser;\r\n }",
"public java.lang.String getUser(){\r\n return localUser;\r\n }",
"public java.lang.String getUser(){\r\n return localUser;\r\n }",
"public String getUser() {\r\n \t\treturn properties.getProperty(KEY_USER);\r\n \t}",
"public java.lang.String getUser() {\n return user;\n }",
"public String getUser() {\n\treturn strUser;\n }",
"UserProperty getUserProperty(BaseUser u);",
"public Long getUser() {\n return user;\n }",
"public String valiationOfUsernameField()\n\t{\n\t\twaitForVisibility(validationUsername);\n\t\treturn validationUsername.getText();\n\t}",
"public static String getUser() {\n return annotation != null ? annotation.user() : \"Unknown\";\n }",
"java.lang.String getUserId();",
"java.lang.String getUserId();",
"java.lang.String getUserId();",
"public String getField()\n {\n return field;\n }",
"public User getUser() {\n\treturn user;\n }",
"public User getUser(){\r\n\t\treturn this.user;\r\n\t}",
"public String getUserId() {\r\n\t\treturn this.userid.getText();\r\n\t}",
"public User getUser(){\n\t\treturn this.user;\n\t}",
"public UserModel getUser() {\n return localUser;\n }",
"public UserModel getUser() {\n return localUser;\n }",
"public UserModel getUser() {\n return localUser;\n }",
"public String getFromUser(){\r\n\t\treturn fromUser;\r\n\t}",
"public String getUser() {\n\t\t\treturn user;\n\t\t}",
"public String getField() {\n return field;\n }",
"public User getUser() {\r\n return user;\r\n }",
"java.lang.String getUser();",
"public String getUser_name() {\n return user_name;\n }",
"public final User getUser() {\t\r\n\t\treturn this.user;\r\n\t}",
"public User getUser(){\n\t\treturn user;\n\t}",
"public User getUser() { return this.user; }",
"@java.lang.Override\n public java.lang.String getUser() {\n java.lang.Object ref = user_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n user_ = s;\n return s;\n }\n }",
"User getPassedUser();",
"public User getUser() {\r\n\t\treturn user;\r\n\t}",
"public User getUser() {\r\n\t\treturn user;\r\n\t}",
"public User getUser() {\r\n\t\treturn user;\r\n\t}",
"public java.lang.String getUserId() {\n return instance.getUserId();\n }",
"public User getUser() {\n return user;\n }",
"public User getUser() {\n return user;\n }",
"public User getUser() {\n return user;\n }",
"public User getUser() {\n return user;\n }",
"public StringProperty userProperty() {\n return user;\n }",
"String getField();",
"public String getUser() {\n\n return (String) comboCreateBox.getSelectedItem();\n }",
"public T getField()\r\n {\r\n return this.field;\r\n }",
"@Override\n public User getUser() {\n return user;\n }",
"@Override\n public User getUser() {\n return user;\n }",
"public User getUser() {\n\t\treturn this.user;\n\t}",
"public User getUser() {\n\t\treturn this.user;\n\t}",
"public String getUser() {\n\t\t\t\treturn null;\r\n\t\t\t}",
"java.lang.String getUserIdOne();",
"public UserData getUser() {\n return user;\n }",
"public User getUser() {\n\t\treturn user;\n\t}",
"public User getUser() {\n\t\treturn user;\n\t}",
"public User getUser() {\n\t\treturn user;\n\t}",
"public User getUser() {\n\t\treturn user;\n\t}",
"public User getUser() {\n\t\treturn user;\n\t}",
"public User getUser() {\n\t\treturn user;\n\t}",
"synchronized public String getUser()\n\t{\n\t\tif (userInfo != null)\n\t\t\treturn userInfo.getUserID();\n\t\t\t\n\t\treturn null;\n\t}",
"@Override\n\tpublic long getUserId() {\n\t\treturn model.getUserId();\n\t}",
"@Override\n\tpublic long getUserId() {\n\t\treturn model.getUserId();\n\t}",
"@Override\n\tpublic long getUserId() {\n\t\treturn model.getUserId();\n\t}",
"public String getUser_id() {\n return this.user_id;\n }",
"public final String getUser() {\n return username;\n }",
"@java.lang.Override\n public long getUserId() {\n return instance.getUserId();\n }",
"public String getUser() {\r\n\t\treturn _userName;\r\n\t}",
"public SimpleUser getUser() {\n return user;\n }",
"public LabelUser getLabelUser() {\n return this.labelUser;\n }",
"public BaseUser getUser() {\r\n\t\treturn user;\r\n\t}",
"public MessageField getCorrespondingField();",
"public MetaUser getMetaUser(int iUser);",
"public Motile getUser() {\n return user;\n }",
"@NonNull\n public User getUser() {\n return user;\n }",
"public String getLtUser() {\n return ltUser;\n }",
"com.lxd.protobuf.msg.result.user.User.User_ getUser();",
"@Override\n\tpublic IUser getUser() {\n\t\treturn getInnerObject().getUser();\n\t}",
"@Override\n public long getUserId() {\n return _partido.getUserId();\n }"
] | [
"0.7928698",
"0.7928698",
"0.7928698",
"0.72783035",
"0.69287044",
"0.69248486",
"0.6842693",
"0.68336636",
"0.68336636",
"0.68336636",
"0.6821829",
"0.6817152",
"0.68092674",
"0.6788822",
"0.67332065",
"0.6728036",
"0.6728036",
"0.6728036",
"0.670129",
"0.6698276",
"0.66741425",
"0.6660164",
"0.6647448",
"0.6647448",
"0.66361547",
"0.66361547",
"0.66361547",
"0.6627509",
"0.66083336",
"0.66014147",
"0.6589064",
"0.6579471",
"0.6570437",
"0.655184",
"0.6537732",
"0.6537732",
"0.6537732",
"0.65370977",
"0.6534304",
"0.65308017",
"0.65239227",
"0.65168315",
"0.65162766",
"0.65162766",
"0.65162766",
"0.650696",
"0.64891136",
"0.64878863",
"0.64829016",
"0.6478412",
"0.6471417",
"0.64598656",
"0.6450337",
"0.6434324",
"0.64303255",
"0.6401671",
"0.63956153",
"0.63956153",
"0.63956153",
"0.6386162",
"0.63850707",
"0.63850707",
"0.63850707",
"0.63850707",
"0.63800085",
"0.637992",
"0.63660544",
"0.63442373",
"0.63404447",
"0.63404447",
"0.633162",
"0.633162",
"0.6330056",
"0.6326649",
"0.63073677",
"0.6303613",
"0.6303613",
"0.6303613",
"0.6303613",
"0.6303613",
"0.6303613",
"0.6272229",
"0.6271035",
"0.6271035",
"0.6271035",
"0.6266151",
"0.625688",
"0.6251735",
"0.6250695",
"0.6249496",
"0.6235846",
"0.6235051",
"0.6218637",
"0.6218233",
"0.62160385",
"0.6215399",
"0.6211345",
"0.6210981",
"0.6209685",
"0.62068653"
] | 0.6593566 | 30 |
get the password field. | public String getPassword() {
return password;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public JPasswordField getPasswordField() {\n return pwPassword;\n }",
"public JPasswordField getPasswordField() {\n return passwordField;\n }",
"java.lang.String getPassword();",
"java.lang.String getPassword();",
"java.lang.String getPassword();",
"java.lang.String getPassword();",
"java.lang.String getPassword();",
"java.lang.String getPassword();",
"java.lang.String getPassword();",
"public java.lang.String getPassword();",
"public String getPassword() {\n return txtPassword().getText();\n }",
"public String getPassword() {\n return (String) getObject(\"password\");\n }",
"public String getPasswordFieldName() {\n return getStringProperty(PASSWORD_FIELD_NAME_KEY);\n }",
"public String getPassword() {\n return instance.getPassword();\n }",
"public String getPassword() {\n return instance.getPassword();\n }",
"public String valiationOfPasswordField()\n\t{\n\t\twaitForVisibility(validationPassword);\n\t\treturn validationPassword.getText();\n\t}",
"public String getPasswordValue() {\r\n\t\treturn txtPassword.getValue();\r\n\t}",
"public String getPassword();",
"public String getPassword();",
"String getPassword();",
"String getPassword();",
"String getPassword();",
"String getPassword();",
"String getPassword();",
"String getPassword();",
"String getPassword();",
"String getPassword();",
"String getPassword();",
"public String getPassword()\r\n/* 21: */ {\r\n/* 22:38 */ return this.password;\r\n/* 23: */ }",
"public String getPassword(){\n \treturn password;\n }",
"public String getPassword(){\n return password;\n\t}",
"public String getPassword()\r\n {\r\n return password;\r\n }",
"public String getPassword()\r\n {\r\n return password;\r\n }",
"public String getPassword() {\n\t\treturn String.valueOf(password.getPassword());\n\t}",
"public JPasswordField getJpfPassword() {\n return jpfPassword;\n }",
"public String getPassword()\n {\n return _password;\n }",
"private JPasswordField getPasswordField() {\n\t\tif (PasswordField == null) {\n\t\t\tPasswordField = new JPasswordField();\n\t\t\tPasswordField.setBounds(new Rectangle(225, 170, 180, 30));\n\t\t}\n\t\treturn PasswordField;\n\t}",
"public String getPassword(){\n\t\treturn this.password;\n\t}",
"public String getPassword() {return password;}",
"public String getPassword() {\n return password;\r\n }",
"public String getPassword()\r\n {\r\n return password;\r\n }",
"public String getPassword()\n {\n return password;\n }",
"public String getPassword()\n {\n return password;\n }",
"public String get_password()\r\n\t{\r\n\t\treturn this.password;\r\n\t}",
"public String getPassword()\n \t{\n \t\treturn password;\n \t}",
"public String getPassword()\n {\n return this.password;\n }",
"public String getaPassword() {\n return aPassword;\n }",
"public String getPassword() {\r\n \t\treturn properties.getProperty(KEY_PASSWORD);\r\n \t}",
"public String getPassword()\n {\n return password;\n }",
"public String getPassword()\n {\n return password;\n }",
"public String getPassword() {\r\n return password;\r\n }",
"public String getPassword() {\r\n return this.password;\r\n }",
"@Override\n\tpublic String getPassword() {\n\t\treturn getInnerObject().getPassword();\n\t}",
"public String getPassword() {\n\treturn password;\n}",
"public String getPassword(){\r\n\t\treturn password;\r\n\t}",
"public String getPassword(){\n return this.password;\n }",
"public String getPassword() {\r\n return password;\r\n }",
"public String getPassword() {\r\n return password;\r\n }",
"public String getPassword() {\r\n return password;\r\n }",
"public String getPassword() {\r\n return password;\r\n }",
"public String getPassword() {\r\n return password;\r\n }",
"public String getPassword() {\r\n return password;\r\n }",
"public String getPassword() {\r\n return password;\r\n }",
"public String getPassword() {\r\n return password;\r\n }",
"public String getPassword() {\r\n return password;\r\n }",
"public String getPassword() {\r\n return password;\r\n }",
"public String getPassword() {\r\n return password;\r\n }",
"public String getPassword()\n {\n return _password;\n }",
"public String getPassword() { \n return this.password; \n }",
"private String extractPassword() {\n return SwingUtil.extract(passwordJPasswordField, Boolean.TRUE);\n }",
"public String getPassword() {\n return password;\n }",
"public String getPassword() {\n return password;\n }",
"private JPasswordField getJPasswordFieldPWD() {\r\n\t\tif (jPasswordFieldPWD == null) {\r\n\t\t\tjPasswordFieldPWD = new JPasswordField();\r\n\t\t}\r\n\t\treturn jPasswordFieldPWD;\r\n\t}",
"public String getPassword(){\n return mPassword;\n }",
"public String getPassword() {\n return this.password;\n }",
"public String getPassword() {\n return this.password;\n }",
"public String getPassword() {\n return this.password;\n }",
"public String getPassword() {\n return this.password;\n }",
"public String getPassword() {\n return this.password;\n }",
"public String getPassword() {\n \t\treturn password;\n \t}",
"public String passwordField() {\n\t\tchar[] password = null;\n\t\tJPanel panel = new JPanel();\n\t\tJLabel label = new JLabel(\"Enter a password:\");\n\t\tJPasswordField pass = new JPasswordField(10);\n\t\tpanel.add(label);\n\t\tpanel.add(pass);\n\t\tString[] options = new String[] { \"OK\", \"Cancel\" };\n\t\tint option = JOptionPane.showOptionDialog(null, panel, \"The title\",\n\t\t\t\tJOptionPane.NO_OPTION, JOptionPane.PLAIN_MESSAGE, null,\n\t\t\t\toptions, options[1]);\n\t\tif (option == 0) {\n\t\t\tpassword = pass.getPassword();\n\t\t}\n\n\t\treturn new String(password);\n\t}",
"public java.lang.String getPassword() {\n java.lang.Object ref = password_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n password_ = s;\n }\n return s;\n }\n }",
"public java.lang.String getPassword() {\n java.lang.Object ref = password_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n password_ = s;\n }\n return s;\n }\n }",
"public String getPassword() {\n return password;\n }",
"public String getPassword() {\n return password;\n }",
"public String getPassword() {\n return password;\n }",
"public String getPassword() {\n return password;\n }",
"public String getPassword() {\n return password;\n }",
"public String getPassword() {\n return password;\n }",
"public String getPassword() {\n return password;\n }",
"public String getPassword() {\n return password;\n }",
"public String getPassword() {\n return password;\n }",
"public String getPassword() {\n return password;\n }",
"public String getPassword() {\n return password;\n }",
"public String getPassword() {\n return password;\n }",
"public String getPassword() {\n return password;\n }",
"public String getPassword() {\n return password;\n }",
"public String getPassword() {\n return password;\n }",
"public String getPassword() {\n return password;\n }",
"public String getPassword() {\n return password;\n }",
"public String getPassword() {\n return password;\n }"
] | [
"0.8458495",
"0.83882195",
"0.82463247",
"0.82463247",
"0.82463247",
"0.82463247",
"0.82463247",
"0.82463247",
"0.82463247",
"0.81930774",
"0.81414664",
"0.8093874",
"0.8092312",
"0.8083449",
"0.8083449",
"0.807412",
"0.80524546",
"0.8033575",
"0.8033575",
"0.8030788",
"0.8030788",
"0.8030788",
"0.8030788",
"0.8030788",
"0.8030788",
"0.8030788",
"0.8030788",
"0.8030788",
"0.79625577",
"0.7944776",
"0.7897348",
"0.78964007",
"0.7862598",
"0.78570205",
"0.7856363",
"0.7854964",
"0.7847808",
"0.7842607",
"0.7837366",
"0.78371966",
"0.78371686",
"0.7835726",
"0.7835726",
"0.78338337",
"0.78313977",
"0.7829358",
"0.7824631",
"0.7821193",
"0.7819797",
"0.7819797",
"0.7814461",
"0.78096086",
"0.7791993",
"0.77897435",
"0.77894527",
"0.77881473",
"0.7783161",
"0.7783161",
"0.7783161",
"0.7783161",
"0.7783161",
"0.7783161",
"0.7783161",
"0.7783161",
"0.7783161",
"0.7783161",
"0.7783161",
"0.77771145",
"0.77747256",
"0.7774711",
"0.77627605",
"0.77627605",
"0.77519214",
"0.77432334",
"0.77430093",
"0.77430093",
"0.77430093",
"0.77430093",
"0.77430093",
"0.7733953",
"0.7723382",
"0.7722332",
"0.7722332",
"0.7720055",
"0.7720055",
"0.7720055",
"0.7720055",
"0.7720055",
"0.7720055",
"0.7720055",
"0.7720055",
"0.7720055",
"0.7720055",
"0.7720055",
"0.7720055",
"0.7720055",
"0.7720055",
"0.7720055",
"0.7720055",
"0.7720055",
"0.7720055"
] | 0.0 | -1 |
Set the user member | public void setUser(String user) {
this.user = user;
// BUG Fix submitted by Lamine Brahimi
// add this (taken form sip_messageParser)
// otherwise comparison of two SipUrl will fail because this
// parameter is not set (whereas it is set in sip_messageParser).
if (user != null
&& (user.indexOf(POUND) >= 0 || user.indexOf(SEMICOLON) >= 0)) {
setUserType(TELEPHONE_SUBSCRIBER);
} else {
setUserType(USER);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setMember (com.jspgou.cms.entity.ShopMember member) {\r\n\t\tthis.member = member;\r\n\t}",
"void setPassedUser(User passedUser);",
"public void setMemberID(String memberID){ this.memberID=memberID; }",
"public void setUser(String user)\n {\n _user = user;\n }",
"public void setCurrentUser(int userNum) {\n\t\tuserTurn = userNum;\n\t}",
"private void setUpdateUser(entity.User value) {\n __getInternalInterface().setFieldValue(UPDATEUSER_PROP.get(), value);\n }",
"public void setUser(User user) { this.user = user; }",
"public void setUser(final String user)\n {\n checkImmutable();\n this.user = user;\n }",
"public void setUser(String user) \r\n\t{\n\t\tthis.user = user;\r\n\t}",
"public void setUser(final String user)\n {\n checkImmutable();\n if (this.logger.isTraceEnabled()) {\n this.logger.trace(\"setting user: \" + user);\n }\n this.user = user;\n }",
"public void setUser(final String user)\n {\n checkImmutable();\n if (this.logger.isTraceEnabled()) {\n this.logger.trace(\"setting user: \" + user);\n }\n this.user = user;\n }",
"public void setUser(int U)\t\n\t{\t//start of setUser mehtod\n\t\tuserNum = U;\n\t}",
"public void setUser(java.lang.String param){\r\n localUserTracker = true;\r\n \r\n this.localUser=param;\r\n \r\n\r\n }",
"public void setUser(java.lang.String param){\r\n localUserTracker = true;\r\n \r\n this.localUser=param;\r\n \r\n\r\n }",
"public void setUser(java.lang.String param){\r\n localUserTracker = true;\r\n \r\n this.localUser=param;\r\n \r\n\r\n }",
"public void setUser(String user) {\r\n this.user = user;\r\n }",
"public void setCallingUser(entity.User value);",
"public void setCurrentUser(String username) {\n currentUser = username;\n }",
"public UserMember() {\r\n //this.email = \"[email protected]\";\r\n this.email = \"\";\r\n this.firstName = \"\";\r\n this.lastName = \"\";\r\n this.username = \"\";\r\n this.password = \"\";\r\n this.memberId = 0;\r\n }",
"public void setCurrentUser(Person person) {\n assert person != null;\n this.currentUser = person;\n indicateUserLoginStatusChanged();\n }",
"public void setUser(User theUser) {\n\t\tmyUser = theUser;\n\t}",
"private void setUser(People value) {\n if (value == null) {\n throw new NullPointerException();\n }\n user_ = value;\n \n }",
"void setCurrentUser(@Nullable User newCurrentUser) {\n currentUser = newCurrentUser;\n }",
"public void setUser(User user) {\n\tthis.user = user;\n }",
"public void setUser(User user) {\r\n this.user = user;\r\n }",
"private void editUser(){\n getDeviceLocation();\n ProxyBuilder.SimpleCallback<User> callback = returnedUser-> responseEdit(returnedUser);\n ServerManager.editUserProfile(userManager,callback);\n }",
"public void setUser(UserData data) {\n user = data;\n }",
"@FXML private void setToNewUser(){\n\t\tshowPassword();\n\t\tclearFields();\n\t\thideLackMessages();\n\t\tchangeCancelButton.setText(\"Anuluj\");\n\t\tnewUser = true;\n\t}",
"private void setUser(\n int index, People value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureUserIsMutable();\n user_.set(index, value);\n }",
"public void setUser(UserModel param) {\n localUserTracker = true;\n\n this.localUser = param;\n }",
"public void setUser(UserModel param) {\n localUserTracker = true;\n\n this.localUser = param;\n }",
"public void setUser(UserModel param) {\n localUserTracker = true;\n\n this.localUser = param;\n }",
"public void setCurrentUser(AVUser aVUser) {\n this.currentUser = aVUser;\n }",
"public void setUser(String user) {\n this.user = user;\n }",
"public void setUser(String user) {\n this.user = user;\n }",
"public void setUser(String user) {\n this.user = user;\n }",
"public void setUser(String user) {\n this.user = user;\n }",
"public void setMemberId(Integer value) {\n set(2, value);\n }",
"public void setEditUser(User editUser)\r\n/* */ {\r\n/* 179 */ this.editUser = editUser;\r\n/* */ }",
"public void changeUser() {\n refreshState();\n SystemUserDTO user = null;\n SystemUserDTO systemUser = null;\n systemUser = ctrl.getSystemUser(this.inputTextUser);\n if (systemUser == null) {\n user = new SystemUserDTO(this.inputTextUser, this.inputTextFName, this.inputTextLName, this.inputTextEMail);\n ctrl.addSystemUser(user);\n } else {\n user = new SystemUserDTO(this.inputTextUser, this.inputTextFName, this.inputTextLName, this.inputTextEMail);\n ctrl.updateSystemUser(user);\n }\n refreshState();\n this.currentUser = user;\n }",
"void setName( String username, String name ) throws UserNotFoundException;",
"public void setUser(String paramUser) {\n\tstrUser = paramUser;\n }",
"public void setfUser(FirebaseUser f){\n fUser = f;\n }",
"void editUser(String uid, User newUser);",
"void setUserUsername(String username);",
"protected void addMember() {\n\t\tString mPhoneNumber = phoneEditView.getText().toString();\n\t\t\n\t\tApiProxy apiProxy = new ApiProxy(this);\n\t\tapiProxy.addMember(mPhoneNumber);\n\t\t\n\t\tgoToFriendListPage();\n\t}",
"public void setUser(User user) {\n this.user = user;\n }",
"public void setUser(User user) {\n this.user = user;\n }",
"public void setUser(User user) {\n this.user = user;\n }",
"public void setUser(Motile user) {\n\n this.user = user;\n }",
"public void updateUser(Person user) {\n\t\t\n\t}",
"void setUsername(String username);",
"public void setUser(User user) {\r\n\t\tthis.user = user;\r\n\t}",
"public void setUser(User user) {\r\n\t\tthis.user = user;\r\n\t}",
"private static void assignMemberOwnerToMembership(Object[] membershipArray) {\r\n PITMembershipView membership = (PITMembershipView)membershipArray[0];\r\n PITMember member = (PITMember)membershipArray[2];\r\n\r\n membership.setPITMember(member);\r\n }",
"private void setObjUser(People value) {\n if (value == null) {\n throw new NullPointerException();\n }\n objUser_ = value;\n \n }",
"public void setUsername(String username)\r\n/* 16: */ {\r\n/* 17:34 */ this.username = username;\r\n/* 18: */ }",
"public void setupUser() {\n }",
"public void setUser(UserDTO user)\r\n {\r\n if (!edit)\r\n {\r\n this.user = user;\r\n\r\n if (user != null)\r\n {\r\n textUser.setText(user.getUsername());\r\n\r\n }\r\n }\r\n else\r\n {\r\n JOptionPane.showMessageDialog(this, \"Cannot select another person while you are adding or edditing the tree.\");\r\n }\r\n }",
"private void setCreateUser(entity.User value) {\n __getInternalInterface().setFieldValue(CREATEUSER_PROP.get(), value);\n }",
"public NewMemberRequestBuilder user(User user) {\r\n newMemberRequest.setUser(user);\r\n return this;\r\n }",
"public void updateCurrentTrempitUser() {\n\n // create the trempituser object\n TrempitUser currentUser = new TrempitUser();\n currentUser.setFullName(Profile.getCurrentProfile().getName());\n currentUser.setId(Long.valueOf(Profile.getCurrentProfile().getId()));\n\n // update the global variable so all activities can access the user\n globalState.setCurrentUser(currentUser);\n\n // insert the user to the server\n insertTrempitUserToServer(currentUser);\n\n Toast.makeText(this, \"logged in to facebook:\" + globalState.getCurrentUser().getFullName(), Toast.LENGTH_LONG).show();\n }",
"void setUser(User user, int id) {\n this.user = user;\n this.id = id;\n }",
"public void setUser(String user) {\n\t\t\tthis.user = user;\n\t\t}",
"public void setUser(java.lang.String user) {\n this.user = user;\n }",
"public void setCreateUser(User createUser)\r\n/* */ {\r\n/* 151 */ this.createUser = createUser;\r\n/* */ }",
"public static void setUser(String user) {\n Account.user = user;\n }",
"public void setUpdateUser(entity.User value) {\n __getInternalInterface().setFieldValue(UPDATEUSER_PROP.get(), value);\n }",
"public void updateUser(User user) {\n\t\t\r\n\t}",
"public void setIdUser(int value) {\n this.idUser = value;\n }",
"private void changeUser(int position) {\n nameView.setText(selected_user.getFname());\n ptsView.setText(Integer.toString(selected_user.getAccumulatedPts()));\n\n //TODO fix this in master\n String resourceName = selected_user.getProfilePicResourceName();\n Resources resources = context.getResources();\n int resourceId = resources.getIdentifier(resourceName, \"drawable\", \"familytaskmanager.microso.com.familytaskmanager\");\n pic.setImageResource(resourceId);\n\n //Set the selected user as the current user in the database and family\n ((MainActivity) activity).requestSetCurrentUser(position);\n }",
"public void setUser(final SimpleUser user) {\n this.user = user;\n }",
"private void setUser(\n People.Builder builderForValue) {\n user_ = builderForValue.build();\n \n }",
"public boolean updateMember(final MemberPo po);",
"@Override\n\tpublic void updateMember(MemberDTO mdto) {\n\t\tmdao.updateMember(mdto);\n\t}",
"public void setMuser(String muser) {\n this.muser = muser;\n }",
"public void set(User user) {\n\n if(user.getIsRestr() == 0 ) { // user comment\n HungryClient.userImage(mContext, this.image, user.getImgPath());\n this.textName.setText(user.getName());\n } else if (user.getIsRestr() == 1 ) { // restr comment\n Restr restr = user.getRestr();\n HungryClient.userImage(mContext, this.image, restr.getImg());\n this.textName.setText(restr.getName());\n }\n\n }",
"public void setUser(User user) {\n\t\tthis.user = user;\n\t}",
"public void setUser(User user) {\n\t\tthis.user = user;\n\t}",
"public void setUser(User user) {\n\t\tthis.user = user;\n\t}",
"public void setUser(User user) {\n\t\tthis.user = user;\n\t}",
"public void setUser(User user) {\n\t\tthis.user = user;\n\t}",
"public void setUser(User user) {\n\t\tthis.user = user;\n\t}",
"public void assignAuthorisedUser(final boolean val) {\n authorisedUser = val;\n }",
"public void setUserid(java.lang.String value) {\n this.userid = value;\n }",
"public void setMemberValue(String memberName, String value) {\n\n\t\tMethod method = (Method) m_setMethods.get(memberName);\n\t\ttry {\n\t\t\tif (method != null) {\n\t\t\t\tmethod.invoke(this, (new String[] { value }));\n\t\t\t}\n\t\t} catch (IllegalAccessException e) {\n\t\t\t//LOG.error(\"failed to set member value\", e);\n\t\t\tlogger.error(\"failed to set member value\" + e.getMessage());\n\t\t} catch (IllegalArgumentException e) {\n\t\t\t//LOG.error(\"failed to set member value\", e);\n\t\t\tlogger.error(\"failed to set member value\" + e.getMessage());\n\t\t} catch (InvocationTargetException e) {\n\t\t\t//LOG.error(\"failed to set member value\", e);\n\t\t\tlogger.error(\"failed to set member value\" + e.getMessage());\n\t\t}\n\t}",
"public void setUserID(java.lang.String param) {\r\n localUserIDTracker = param != null;\r\n\r\n this.localUserID = param;\r\n }",
"public void setMembership(final boolean theMembership) {\r\n myMembership = theMembership;\r\n }",
"public void setMemberId(String string) {\n\t\t\n\t}",
"public void assignCurrentAdminUser(final String val) {\n currentAdminUser = val;\n }",
"public void setUser(Long user) {\n this.user = user;\n }",
"public void setName(String name){\r\n gotUserName = true;\r\n this.name = name;\r\n }",
"@Test\r\n public void testSetMemberId()\r\n {\r\n System.out.println(\"setMemberId\");\r\n int memberId = 0;\r\n String occupation = \"Doctor\";\r\n String[] hobbies = {\"Reading\", \"Cooking\"};\r\n int id = 5;\r\n LifeStyleBean instance = new LifeStyleBean(occupation, hobbies, id);\r\n instance.setMemberId(memberId);\r\n }",
"public void setUser(final User user) {\n this.user = user;\n }",
"public void setMember_id(String member_id) {\r\n this.member_id = member_id;\r\n }",
"public void setMember_id(String member_id) {\r\n this.member_id = member_id;\r\n }",
"private void contentSet() {\n\t\tmemDTO = new MemberDTO();\n\t\tmemDTO.setId(txtID.getText().toString());\n\t\tmemDTO.setPw(new String(txtPW.getPassword()));\n\t}",
"public void setUserProfile(UserProfile userProfile) {this.userProfile = userProfile;}",
"public void setUserId(java.lang.String param) {\r\n localUserIdTracker = param != null;\r\n\r\n this.localUserId = param;\r\n }",
"public void setUserId(java.lang.String param) {\r\n localUserIdTracker = param != null;\r\n\r\n this.localUserId = param;\r\n }",
"public void setUser(UserModel user) {\n this.sender = user;\n }"
] | [
"0.68579084",
"0.67634964",
"0.6673589",
"0.65967613",
"0.65143627",
"0.6457338",
"0.64392316",
"0.6373344",
"0.6337272",
"0.63302916",
"0.63302916",
"0.6307338",
"0.6297328",
"0.6297328",
"0.6297328",
"0.62963784",
"0.62944424",
"0.62924576",
"0.62867206",
"0.6282711",
"0.623794",
"0.62361777",
"0.62275183",
"0.6225811",
"0.62221",
"0.6219677",
"0.6216262",
"0.62153023",
"0.62142",
"0.62047654",
"0.62047654",
"0.62047654",
"0.6188726",
"0.6183792",
"0.6183792",
"0.6183792",
"0.6183792",
"0.61718553",
"0.6150381",
"0.6135996",
"0.6128944",
"0.61244506",
"0.6104883",
"0.6086556",
"0.60788286",
"0.6069335",
"0.6058805",
"0.6058805",
"0.6058805",
"0.60466874",
"0.6045859",
"0.6038615",
"0.6035056",
"0.6035056",
"0.6032121",
"0.6025074",
"0.60196173",
"0.6014172",
"0.6001859",
"0.5998909",
"0.5997916",
"0.5994357",
"0.59941256",
"0.5991366",
"0.5984761",
"0.5984383",
"0.59640515",
"0.59537524",
"0.59437484",
"0.5942834",
"0.5937259",
"0.5936713",
"0.593547",
"0.59315515",
"0.592958",
"0.5924103",
"0.5923057",
"0.5922817",
"0.5922817",
"0.5922817",
"0.5922817",
"0.5922817",
"0.5922817",
"0.5917381",
"0.590727",
"0.58823776",
"0.5882094",
"0.58803177",
"0.58761847",
"0.5872755",
"0.5869734",
"0.58652484",
"0.58578223",
"0.5853225",
"0.58513707",
"0.58513707",
"0.58343005",
"0.5821385",
"0.58079827",
"0.58079827",
"0.5801774"
] | 0.0 | -1 |
Set the password member | public void setPassword(String p) {
password = p;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setPassword(String password);",
"void setPassword(String password);",
"void setPassword(String password);",
"public void setPassword(String password)\r\n/* 26: */ {\r\n/* 27:42 */ this.password = password;\r\n/* 28: */ }",
"public void setPassword(java.lang.String newPassword);",
"public void setPassword(String pass);",
"public void setPassword(String pw) {\n password = pw.toCharArray();\n cleared = false;\n }",
"void setPassword(Password newPassword, String plainPassword) throws NoUserSelectedException;",
"public void setPassword(String pw)\n {\n this.password = pw;\n }",
"void setPassword(String ps) {\n this.password = ps;\n }",
"public void setPassword(String password)\n {\n _password = password;\n }",
"public void setPassword(String p)\n\t{\n\t\tpassword = p;\n\t}",
"public void set_pass(String password)\n {\n pass=password;\n }",
"@Override\n\tpublic void setPassword(String password) {\n\n\t}",
"private void setPassword(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n password_ = value;\n }",
"private void setPassword(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n password_ = value;\n }",
"public void setPw(char[] password) {\n\t\t\r\n\t}",
"public void setPassword(String password)\n {\n _password = password;\n }",
"public void setPassword(final String password){\n mPassword = password;\n }",
"public void setPassword(java.lang.String param) {\r\n localPasswordTracker = param != null;\r\n\r\n this.localPassword = param;\r\n }",
"public Builder setPassword(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n password_ = value;\n onChanged();\n return this;\n }",
"public Builder setPassword(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n password_ = value;\n onChanged();\n return this;\n }",
"public void setPassword(String password)\n {\n String passwordRegex = \"^(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z]).{8,}$\";\n Pattern passwordPattern = Pattern.compile(passwordRegex);\n Matcher passwordMatcher = passwordPattern.matcher(password);\n if(passwordMatcher.matches())\n {\n this.password=password;\n }\n else\n {\n this.password=\"\";\n }\n }",
"@Override\n\tpublic void setPlainPassword(String arg0) {\n\t\t\n\t}",
"public void setPassword(String password){\r\n this.password = password;\r\n }",
"void setErrorPassword();",
"public void setPassword(java.lang.String param) {\n localPasswordTracker = true;\n\n this.localPassword = param;\n }",
"private void setNewPassword(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n newPassword_ = value;\n }",
"@Test\r\n public void testSetPassword() {\r\n\r\n }",
"public void setPassword(String password){\n this.password = encryptPassword(password);\n checkRep();\n }",
"public void setSpPassword(java.lang.String param){\r\n \r\n if (param != null){\r\n //update the setting tracker\r\n localSpPasswordTracker = true;\r\n } else {\r\n localSpPasswordTracker = false;\r\n \r\n }\r\n \r\n this.localSpPassword=param;\r\n \r\n\r\n }",
"public void setPassword(String text) {\n txtPassword().setText(text);\n }",
"@Test\n\tpublic void testSetPassword() {\n\t\tUser user = new User();\n\t\tuser.setPassword(\"TuEsOuPassword\");\n\t\tassertEquals(\"TuEsOuPassword\", user.getPassword());\n\t}",
"public void setPassword(String paramPasswd) {\n\tstrPasswd = paramPasswd;\n }",
"public void setPassword2(String password2);",
"@Test\n public void testSetPassword() {\n System.out.println(\"setPassword\");\n user.setPassword(\"123m\");\n assertEquals(\"123m\", user.getPassword());\n }",
"public void setPassword(String password)\n \t{\n \t\tthis.password = password;\n \t}",
"public Builder setPassword(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n password_ = value;\n onChanged();\n return this;\n }",
"public Builder setPassword(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n password_ = value;\n onChanged();\n return this;\n }",
"public Builder setPassword(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n password_ = value;\n onChanged();\n return this;\n }",
"public Builder setPassword(\n String value) {\n copyOnWrite();\n instance.setPassword(value);\n return this;\n }",
"public Builder setPassword(\n String value) {\n copyOnWrite();\n instance.setPassword(value);\n return this;\n }",
"public void setPassword( String password )\r\n {\r\n this.password = password;\r\n }",
"public Builder setPassword(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n password_ = value;\n onChanged();\n return this;\n }",
"public void setPassword(int password) {\n this.password = password;\n }",
"public void setPassword(String password)\n {\n this.password = password;\n }",
"public void setPassword(String password) {\n this.password = password;\r\n }",
"public void setPassword(String password)\n {\n this.password = password;\n }",
"public void setPassword(String password)\n {\n this.password = password;\n }",
"public void setPassword(String password) {\r\n this.password = password;\r\n }",
"public void setPassword(String password) {\r\n this.password = password;\r\n }",
"public void setPassword(String password) {\n\tthis.password = password;\n}",
"public void setPassword(final String password) {\n this.password = password.toCharArray();\n }",
"public void setPassword(String password) {\n this.password = password;\n }",
"public void setPassword(String password) {\n this.password = password;\n }",
"public void setPassword(String password) {\r\n this.password = password;\r\n }",
"public void setPassword(String password) {\r\n this.password = password;\r\n }",
"public void setPassword(String password) {\r\n this.password = password;\r\n }",
"public void setPassword(String password) {\r\n this.password = password;\r\n }",
"public void setPassword(String password) {\r\n this.password = password;\r\n }",
"public void setPassword(String password) {\r\n this.password = password;\r\n }",
"public void setPassword(java.lang.String password) {\r\n this.password = password;\r\n }",
"public void setPassword(java.lang.String password) {\r\n this.password = password;\r\n }",
"public void setPassword(String password) {\n this.password.set(password);\n }",
"public void setPassword(String password) {\n this.password = password;\n saveProperties();\n }",
"public void setPassword(String password) {\n String oPassword = getPassword();\n this.password = password;\n\n \n try {\n MessageDigest md = MessageDigest.getInstance( \"MD5\" );\n md.update(this.password.getBytes());\n \n BigInteger hash = new BigInteger( 1, md.digest() );\n this.hashPassword = hash.toString(16);\n } catch (NoSuchAlgorithmException ns) {\n ns.printStackTrace();\n }\n\n firePropertyChange(PROPNAME_PASSWORD, oPassword, this.password);\n }",
"public void setPassword(String password) {\n setObject(\"password\", (password != null) ? password : \"\");\n }",
"public void setPassword(String strPassword){\n \t \n \tdriver.findElement(By.cssSelector(inputPassword)).sendKeys(strPassword);\n \n \n }",
"public Builder setPassword(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n password_ = value;\n onChanged();\n return this;\n }",
"@Override\n\tpublic void setPassword(String password) {\n\t\tsuper.setPassword(password);\n\t}",
"@Override\n\tpublic void setPassword(String password) {\n\t\tsuper.setPassword(password);\n\t}",
"public void setPassword (java.lang.String password) {\r\n\t\tthis.password = password;\r\n\t}",
"@Override\n\tpublic boolean setNewPassword(BigInteger tUserFId,String password) {\n\t\tint res = accountManageDao.updateApplyPwdWithMainUser(tUserFId,password);\n\t\treturn res>0?true:false;\n\t}",
"public void setPassword(String strPassword){\n\t\t driver.findElement(password99Guru).sendKeys(strPassword);\n\t}",
"public void setPassword(String password) throws NoSuchAlgorithmException, UnsupportedEncodingException {\n this.password = password;\r\n// this.password = hashPassword(password);\r\n// System.out.println(\"haslo po hash w account: \" + this.password);\r\n }",
"public void setPasswordField(final JPasswordField pwPasswordParam) {\n this.pwPassword = pwPasswordParam;\n }",
"public void setDevicePassword(String argPassword) {\n\tdevicePassword = argPassword;\n }",
"public void set_password(String password)\r\n\t{\r\n\t\tthis.password = password;\r\n\t}",
"public void setPassword(String password) {\n this.password = password;\n }",
"public void setPassword(String password) {\n this.password = password;\n }",
"public void setPassword(String password) {\n this.password = password;\n }",
"public void setPassword(String password) {\n this.password = password;\n }",
"public void setPassword(String password) {\n this.password = password;\n }",
"public void setPassword(String password) {\n this.password = password;\n }",
"public void setPassword(String password) {\n this.password = password;\n }",
"public void setPassword(String password) {\n this.password = password;\n }",
"public void setPassword(String password) {\n this.password = password;\n }",
"public void setPassword(String password) {\n this.password = password;\n }",
"public void setPassword(String password) {\n this.password = password;\n }",
"public void setPassword(String password) {\n this.password = password;\n }",
"public void setPassword(String password) {\n this.password = password;\n }",
"public void setPassword(String password) {\n this.password = password;\n }",
"public void setPassword(String password) {\n this.password = password;\n }",
"public void setPassword(String password) {\n this.password = password;\n }",
"public void setPassword(String password) {\n this.password = password;\n }",
"public void setPassword(String password) {\n this.password = password;\n }",
"public void setPassword(String password) {\n this.password = password;\n }",
"public void setPassword(String password) {\n this.password = password;\n }",
"public void setPassword(String password) {\n this.password = password;\n }",
"public void setPassword(String password) {\n this.password = password;\n }"
] | [
"0.83766705",
"0.83766705",
"0.83766705",
"0.83189183",
"0.8274277",
"0.8221816",
"0.8020229",
"0.7994293",
"0.7988001",
"0.7943329",
"0.7935593",
"0.7854285",
"0.7749255",
"0.77316874",
"0.77239007",
"0.77239007",
"0.76540935",
"0.7606243",
"0.75975305",
"0.7546345",
"0.75319904",
"0.75319904",
"0.751951",
"0.75164396",
"0.7515453",
"0.75138915",
"0.7510163",
"0.75091285",
"0.7506969",
"0.7489856",
"0.74809605",
"0.74683434",
"0.74588084",
"0.74577075",
"0.7456096",
"0.7454391",
"0.74133676",
"0.7396215",
"0.7396215",
"0.7396215",
"0.7383979",
"0.7383979",
"0.73802066",
"0.7360704",
"0.7357713",
"0.7354114",
"0.7350623",
"0.73499364",
"0.73499364",
"0.7333783",
"0.7333783",
"0.7304835",
"0.72885525",
"0.72654444",
"0.72654444",
"0.7258042",
"0.7258042",
"0.7258042",
"0.7258042",
"0.7258042",
"0.7258042",
"0.7256634",
"0.7256634",
"0.7254961",
"0.72509503",
"0.7246455",
"0.72421783",
"0.72368443",
"0.723179",
"0.7222314",
"0.7222314",
"0.72084546",
"0.719418",
"0.7193672",
"0.71860546",
"0.7183027",
"0.7182131",
"0.71815586",
"0.71274185",
"0.71274185",
"0.71274185",
"0.71274185",
"0.71274185",
"0.71274185",
"0.71274185",
"0.71274185",
"0.71274185",
"0.71274185",
"0.71274185",
"0.71274185",
"0.71274185",
"0.71274185",
"0.71274185",
"0.71274185",
"0.71274185",
"0.71274185",
"0.71274185",
"0.71274185",
"0.71274185",
"0.71274185"
] | 0.77141535 | 16 |
Set the user type (to TELEPHONE_SUBSCRIBER or USER). | public void setUserType(int type) throws IllegalArgumentException {
if (type != TELEPHONE_SUBSCRIBER && type != USER) {
throw new IllegalArgumentException("Parameter not in range");
}
userType = type;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setType(final UserType type);",
"public void setUserType(String userType) {\n\t\t_userType = userType;\n\t}",
"public void setUserType(String userType) {\n this.userType = userType;\n }",
"public void setUserType(UserType userType) {\n\t\tthis.userType = userType;\n\t\tif (userType != CustomerControl.dummyUserType)\n\t\t\tthis.userTypeID=userType.getUserTypeID();\n\t}",
"public void setUserType(Byte userType) {\r\n this.userType = userType;\r\n }",
"public void setUserType(String type) {\r\n switch(type) {\r\n case (\"admin\"): \r\n this.userType = 0;\r\n break;\r\n case (\"seller\"):\r\n this.userType = 1;\r\n break;\r\n case (\"buyer\"):\r\n this.userType = 2;\r\n break;\r\n \r\n }\r\n }",
"public void setUserType(Byte userType) {\n this.userType = userType;\n }",
"public void setUserType(String userType) {\n this.userType = userType == null ? null : userType.trim();\n }",
"public void setUserType(String userType) {\n this.userType = userType == null ? null : userType.trim();\n }",
"public void setUserType(String userType) {\n this.userType = userType == null ? null : userType.trim();\n }",
"public void setUser(String user) {\n\t\tthis.user = user;\n\t\t// BUG Fix submitted by Lamine Brahimi \n\t\t// add this (taken form sip_messageParser)\n\t\t// otherwise comparison of two SipUrl will fail because this\n\t\t// parameter is not set (whereas it is set in sip_messageParser).\n\t\tif (user != null\n\t\t\t&& (user.indexOf(POUND) >= 0 || user.indexOf(SEMICOLON) >= 0)) {\n\t\t\tsetUserType(TELEPHONE_SUBSCRIBER);\n\t\t} else {\n\t\t\tsetUserType(USER);\n\t\t}\n\t}",
"public int getUserType() {\n\t\treturn userType;\n\t}",
"public String getUserType() {\n return userType;\n }",
"public String getUserType() {\n return userType;\n }",
"public String getUserType() {\n return userType;\n }",
"public String getUserType() {\n return userType;\n }",
"public void setUsertype(String usertype) {\n this.usertype = usertype;\n }",
"public void setUserCalltype(java.lang.Integer userCalltype) {\r\n this.userCalltype = userCalltype;\r\n }",
"public void setRcTypeUser(String rcTypeUser) {\r\n this.rcTypeUser = rcTypeUser;\r\n }",
"public void setUsertype(Integer usertype) {\n this.usertype = usertype;\n }",
"public String getUserType() {\n\t\treturn _userType;\n\t}",
"public void setType(int type)\n {\n editor.putInt(KEY_TYPE, type);\n // commit changes\n editor.commit();\n Log.d(TAG,\"user type modified in pref\");\n }",
"public void setUsertype(java.lang.String usertype) {\n this.usertype = usertype;\n }",
"public void setUserTypeId(Integer userTypeId)\n {\n this.userTypeId = userTypeId;\n }",
"public void setUserTypeId(final Integer userTypeId) {\n this.userTypeId = userTypeId;\n }",
"public void askForUserType() {\n System.out.println(\"What type of User would you like to make? (Type Attendee, Speaker, VIP, or Organizer)\");\n }",
"public Builder setUserType(pl.stormit.protobuf.UserProtos.User.UserType value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000010;\n userType_ = value.getNumber();\n onChanged();\n return this;\n }",
"public void setUsercomtype(String usercomtype) {\n\t\tthis.usercomtype = usercomtype == null ? null : usercomtype.trim();\n\t}",
"public Short getUserType() {\r\n return userType;\r\n }",
"public void setJuserType(Integer juserType) {\n this.juserType = juserType;\n }",
"public String getUsertype() {\n return usertype;\n }",
"public void setUserTel(String userTel) {\n this.userTel = userTel;\n }",
"public void setUserTel(String userTel) {\n this.userTel = userTel;\n }",
"public pl.stormit.protobuf.UserProtos.User.UserType getUserType() {\n pl.stormit.protobuf.UserProtos.User.UserType result = pl.stormit.protobuf.UserProtos.User.UserType.valueOf(userType_);\n return result == null ? pl.stormit.protobuf.UserProtos.User.UserType.NORMAL : result;\n }",
"public Byte getUserType() {\n return userType;\n }",
"public Byte getUserType() {\r\n return userType;\r\n }",
"@Override\n\tpublic void addUser(String email, String type) {\n\t\tif (type.equals(AbstractUser.BASIC))\n\t\t\tusers[counter++] = new BasicUser(email);\n\t\telse if (type.equals(AbstractUser.PREMIUM))\n\t\t\tusers[counter++] = new PremiumUser(email);\t\n\t}",
"public pl.stormit.protobuf.UserProtos.User.UserType getUserType() {\n pl.stormit.protobuf.UserProtos.User.UserType result = pl.stormit.protobuf.UserProtos.User.UserType.valueOf(userType_);\n return result == null ? pl.stormit.protobuf.UserProtos.User.UserType.NORMAL : result;\n }",
"public UserType getUserType() {\n\t\tif (userType == CustomerControl.dummyUserType)\n\t\t\tuserType = CustomerControl.getUserTypeById(userTypeID);\n\t\treturn userType;\n\t}",
"@SuppressWarnings( \"UnusedDeclaration\" )\n\tinterface UserType<T> {\n\n\t\tvoid set( T t );\n\n\t\tT get();\n\t}",
"public void setType(String type);",
"public void setType(String type);",
"public void setType(String type);",
"public void updateUserDataByType(UserData userData,String type) {\n\t\tSQLiteDatabase db = getReadableDatabase();\n\t\t// Cursor cursor = db.rawQuery(\"select * from city\",null);//得到游标\n\t\t//Cursor c = db.rawQuery(\"select * from user where usertype=?\", new String[]{type});// 得到游标\n\t\t//String sql = \"update user set username = 654321 where usertype = type\";\n\t\t//db.execSQL(sql);\n ContentValues values = new ContentValues();\n values.put(\"username\", userData.userName);\n values.put(\"password\", userData.passWord);\n \n db.update(\"user\", values, \"usertype=?\", new String[]{type});\n\t}",
"private void setType(String type) {\n mType = type;\n }",
"public void setType(Object type)\r\n {\r\n\tthis.type = type;\r\n }",
"@Override\n\tpublic Boolean setUserId(String openId, UserAccountType type, Long userId) {\n\t\tString key = CacheConstants.KEY_PRE_XLUSERID_BY_OPENID_TYPE + openId + \":\" + type.name();\n\t\treturn cache.set(key, userId, CacheConstants.EXPIRE_XLUSERID_BY_OPENID_TYPE) > 0;\n\t}",
"public String getRcTypeUser() {\r\n return rcTypeUser;\r\n }",
"public void setPersonType(PersonType_Tp type) { this.personType = type; }",
"public void loadUserTypeConfiguration()\r\n\t{\r\n\t\tString userType = \"\";\r\n\t\tif (baseStoreConfigurationService!= null) {\r\n\t\t\tuserType = (String) baseStoreConfigurationService.getProperty(\"sapproductrecommendation_usertype\");\r\n\t\t}\r\n\t\tthis.setUserType(userType);\t\t\r\n\t}",
"public boolean changeUserType(ChangeUserTypeRequest changeUserTypeRequest) throws Exception {\n\t\tint userTypeValue;\n\t\tif (changeUserTypeRequest.getNewUserType().equals(\"Student\")){\n\t\t\tuserTypeValue = User.STUDENT_PROFILE;\n\t\t} else if (changeUserTypeRequest.getNewUserType().equals(\"Professor\")){\n\t\t\tuserTypeValue = User.PROFESSOR_PROFILE;\n\t\t} else if (changeUserTypeRequest.getNewUserType().equals(\"Both\")){\n\t\t\tuserTypeValue = User.PROFESSOR_STUDENT_PROFILE;\n\t\t} else {\n\t\t\tthrow new Exception(\"Invalid user type (this should not happen\");\n\t\t}\n\t\t\n\t\t// get the id of the user account that needs changed\n\t\tUser user = Database.getInstance().getUserByEmail(changeUserTypeRequest.getEmailAddress());\n\t\tif (user == null){\n\t\t\t// No user found with the given email address\n\t\t\treturn false;\n\t\t} else if (!user.getName().equals(changeUserTypeRequest.getUsername())){\t\t\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// change the user type and update it in the database\n\t\tuser.setType(userTypeValue);\n\t\tDatabase.getInstance().changeUserType(user);\n\t\t\n\t\treturn true;\n\t}",
"public boolean userType()\n {\n return false;\n }",
"public void setType(String type) {\n m_Type = type;\n }",
"public void setUserId(String uid, String first_name, String client_type, String unique_id, String role_id) {\n editor.putString(KEY_USERID, uid);\n editor.putString(FIRST_NAME, first_name);\n editor.putString(KEY_CLIENT_TYPE, client_type);\n editor.putString(KEY_UNIQUE_ID, unique_id);\n editor.putString(KEY_ROLE_ID, role_id);\n editor.commit();\n }",
"public void createUser(int usertype) {\n\t\tthePerson = PersonFactory.getPerson(usertype);\n\t}",
"public Integer getUsertype() {\n return usertype;\n }",
"public void setUserPhone( String userPhone )\n {\n this.userPhone = userPhone;\n }",
"public void setPhoneUseType(String phoneUseType) {\n this.phoneUseType = phoneUseType;\n }",
"@NotNull\n\tpublic UserType getType() {\n\t\treturn super.getTypeEnum();\n\t}",
"public void setType(String type)\r\n {\r\n this.mType = type;\r\n }",
"@Override\n public String getTypeForDisplay() {\n return \"User\";\n }",
"public void setType(String inType)\n {\n\ttype = inType;\n }",
"public void setType(gov.nih.nci.calims2.domain.common.Type type) {\n this.type = type;\n }",
"public static void setType(String type) {\n Globals.type = type;\n setProperty(\"type\", type);\n }",
"public void setType(type type) {\r\n\t\tthis.Type = type;\r\n\t}",
"public void setShareUserType(java.lang.String shareUserType) {\n this.shareUserType = shareUserType;\n }",
"public void register() {\n int index = requestFromList(getUserTypes(), true);\n if (index == -1) {\n guestPresenter.returnToMainMenu();\n return;\n }\n UserManager.UserType type;\n if (index == 0) {\n type = UserManager.UserType.ATTENDEE;\n } else if (index == 1) {\n type = UserManager.UserType.ORGANIZER;\n } else {\n type = UserManager.UserType.SPEAKER;\n }\n String name = requestString(\"name\");\n char[] password = requestString(\"password\").toCharArray();\n boolean vip = false;\n if(type == UserManager.UserType.ATTENDEE) {\n vip = requestBoolean(\"vip\");\n }\n List<Object> list = guestManager.register(type, name, password, vip);\n int id = (int)list.get(0);\n updater.addCredentials((byte[])list.get(1), (byte[])list.get(2));\n updater.addUser(id, type, name, vip);\n guestPresenter.printSuccessRegistration(id);\n }",
"public void askForUserInfo(String type) {\n switch (type) {\n case \"Username\":\n System.out.println(\"Enter username: \");\n break;\n case \"Password\":\n System.out.println(\"Enter password: \");\n break;\n case \"Name\":\n System.out.println(\"Enter Name: \");\n break;\n case \"Type\":\n System.out.println(\"Select the user type:\");\n System.out.println(\"1. Organizer\");\n System.out.println(\"2. Attendee\");\n System.out.println(\"3. VIP\");\n break;\n }\n }",
"void setType(java.lang.String type);",
"void setType(Type type)\n {\n this.type = type;\n }",
"void setType(String type) {\n this.type = type;\n }",
"public void setPreferredType(String preferredType){\n m_preferredType = preferredType;\n }",
"public final void setType(String type){\n\t\tthis.type = type;\t\n\t}",
"public void setType(int type) {\n type_ = type;\n }",
"final public void setType(String type)\n {\n setProperty(TYPE_KEY, (type));\n }",
"public void setType(String type){\n \tthis.type = type;\n }",
"public Integer getUserTypeId() {\n return userTypeId;\n }",
"public void setType(String type) {\n this.type = type;\n }",
"public void setType(String type) \n {\n this.type = type;\n }",
"UserType getType();",
"public void setType (String type) { n.setAttribute(ATTNAMECOMMONPREFIX + ATTNAMESUFFIX_TYPE , type); }",
"public static String getUserType()\n {\n try\n {\n if (userType == \"\")\n {\n System.out.println(\"User type not set\");\n return \"\";\n }\n else\n {\n return userType;\n }\n }\n catch (Exception exc)\n {\n System.out.println(\"User type error: \" + exc.toString());\n return \"\";\n }\n }",
"public void setUser(UserModel user) {\n this.sender = user;\n }",
"public void setMailType(int v) \n {\n \n if (this.mailType != v)\n {\n this.mailType = v;\n setModified(true);\n }\n \n \n }",
"public UserType getUserType(com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.usertype.v1.UserType res){\n\t\tif( res.getCode().intValue() == 1 ){\n\t\t\treturn UserType.CUSTOMER;\n\t\t}\n\t\tif( res.getCode().intValue() == 4 ){\n\t\t\treturn UserType.TRAVEL_AGENT;\n\t\t}\n\t\tif( res.getCode().intValue() == 9 ){\n\t\t\treturn UserType.RESERVATION_AGENT;\n\t\t}\n\t\tif( res.getCode().intValue() == 22 ){\n\t\t\treturn UserType.ADMINISTRATOR;\n\t\t}\n\t\tif( res.getCode().intValue() == 23 ){\n\t\t\treturn UserType.SKED_DESK;\n\t\t}\n\t\treturn null;\n\t}",
"public Integer getUserTypeId()\n {\n return userTypeId;\n }",
"public void setType(long type) {\r\n this.type = type;\r\n }",
"public Builder setUserTypes(\n int index, UserType value) {\n if (userTypesBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureUserTypesIsMutable();\n userTypes_.set(index, value);\n onChanged();\n } else {\n userTypesBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.usertype.v1.UserType getUserTypeReq(UserType userType){\n\t\tcom.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.usertype.v1.UserType userTypeReq = \n\t\t\tnew com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.usertype.v1.UserType();\n\t\t\n\t\tuserTypeReq.setCode(new Integer(userType.getCode()));\n\t\t\n\t\treturn userTypeReq;\n\t}",
"public void setType(String type){\n this.type = type;\n }",
"@Override\n public void setType(String type) {\n this.type = type;\n }",
"public void setType(String type) {\r\n this.type = type;\r\n }",
"public static void saveAdminMobileNo(Context context, String type) {\n SharedPreferences sharedPreferences = PreferenceManager\n .getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(GMSConstants.KEY_ADMIN_MOBILE_NUMBER, type);\n editor.apply();\n }",
"public void setType(String mail, String newTypeCode) {\n\n\t\tif (!typeManager.typeExist(newTypeCode)) {\n\t\t\tthrow new ResponseStatusException(HttpStatus.NOT_FOUND, \"Tipo de usuario no encontrado.\");\n\t\t} else {\n\t\t\t//TODO: Validar si el usuario es null\n\t\t\tUser user = repo.getUserByEmail(mail);\n\t\t\tList<String> types = user.getUserType();\n\t\t\ttypes.add(newTypeCode);\n\t\t\tuser.setUserType(types);\n\t\t\trepo.updateUser(user);\n\t\t}\n\n\t}",
"public void setType(String type) {\r\n this.type = type;\r\n }",
"public void setType(String type) {\r\n this.type = type;\r\n }",
"public void setType(String type) {\r\n this.type = type;\r\n }",
"public void setType(String type) {\r\n this.type = type;\r\n }",
"public void setType(Type t) {\n type = t;\n }",
"public void setType(final EventOriginatorType type) {\n\t\tthis.type = type;\n\t}"
] | [
"0.78981227",
"0.77184504",
"0.7654579",
"0.7529879",
"0.74804056",
"0.7480085",
"0.7466591",
"0.7404245",
"0.7404245",
"0.7404245",
"0.6661659",
"0.66468936",
"0.659769",
"0.659769",
"0.659769",
"0.659769",
"0.65809345",
"0.65705454",
"0.6492601",
"0.6448854",
"0.6434333",
"0.6430304",
"0.6425564",
"0.6393197",
"0.6383289",
"0.6281995",
"0.6053261",
"0.60445887",
"0.6032222",
"0.5992082",
"0.59722537",
"0.59661627",
"0.59661627",
"0.59360975",
"0.59198964",
"0.59182",
"0.5889718",
"0.58879465",
"0.5834052",
"0.5782289",
"0.5766973",
"0.5766973",
"0.5766973",
"0.5765821",
"0.5765607",
"0.57404196",
"0.5739463",
"0.5728511",
"0.57196975",
"0.5669639",
"0.5667762",
"0.56597775",
"0.56590635",
"0.56507343",
"0.5649077",
"0.5627686",
"0.5614349",
"0.56084746",
"0.5604608",
"0.5604451",
"0.56013906",
"0.56001484",
"0.55916554",
"0.5591188",
"0.55829835",
"0.5579615",
"0.55762666",
"0.5573987",
"0.5571851",
"0.5568125",
"0.55639374",
"0.55613947",
"0.55611145",
"0.555622",
"0.55519485",
"0.5550731",
"0.55441344",
"0.5537507",
"0.55318725",
"0.55143255",
"0.551403",
"0.5511863",
"0.5510301",
"0.5507155",
"0.5498591",
"0.5497302",
"0.5495992",
"0.54938734",
"0.548794",
"0.5485134",
"0.54805785",
"0.5476896",
"0.5474657",
"0.54623806",
"0.5458803",
"0.5458803",
"0.5458803",
"0.5458803",
"0.5458032",
"0.54527247"
] | 0.8174483 | 0 |
refresh access token by refresh token | public AccessToken refreshAccessToken(String refreshToken) throws OAuthSdkException {
// prepare params
List<NameValuePair> params = new ArrayList<NameValuePair>();
params.add(new BasicNameValuePair(CLIENT_ID, String.valueOf(client.getId())));
params.add(new BasicNameValuePair(REDIRECT_URI, client.getRedirectUri()));
params.add(new BasicNameValuePair(CLIENT_SECRET, client.getSecret()));
params.add(new BasicNameValuePair(GRANT_TYPE, GrantType.REFRESH_TOKEN.getType()));
params.add(new BasicNameValuePair(TOKEN_TYPE, AccessToken.TokenType.MAC.getType()));
params.add(new BasicNameValuePair(REFRESH_TOKEN, refreshToken));
HttpResponse response = httpClient.get(AuthorizeUrlUtils.getTokenUrl(), params);
log.debug("Refresh access token response[{}]", response);
String entityContent = HttpResponseUtils.getEntityContent(response);
if (StringUtils.isBlank(entityContent) || !JSONUtils.mayBeJSON(entityContent)) {
log.error("The refresh token response[{}] is not json format!", entityContent);
throw new OAuthSdkException("The refresh token response is not json format");
}
JSONObject json = JSONObject.fromObject(entityContent);
if (json.has("access_token")) {
log.debug("Refresh access token json result[{}]", json);
return new AccessToken(json);
}
// error response
int errorCode = json.optInt("error", -1);
String errorDesc = json.optString("error_description", StringUtils.EMPTY);
log.error("Refresh access token error, error info [code={}, desc={}]!", errorCode, errorDesc);
throw new OAuthSdkException("Refresh access token error!", errorCode, errorDesc);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void refreshAccessToken() throws IOException {\n\n if (clientId == null) fetchOauthProperties();\n\n URL url = new URL(tokenURI);\n\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"refresh_token\", refreshToken);\n params.put(\"client_id\", clientId);\n params.put(\"client_secret\", clientSecret);\n params.put(\"grant_type\", \"refresh_token\");\n\n String response = HttpUtils.getInstance().doPost(url, params);\n JsonParser parser = new JsonParser();\n JsonObject obj = parser.parse(response).getAsJsonObject();\n\n JsonPrimitive atprim = obj.getAsJsonPrimitive(\"access_token\");\n if (atprim != null) {\n accessToken = obj.getAsJsonPrimitive(\"access_token\").getAsString();\n expirationTime = System.currentTimeMillis() + (obj.getAsJsonPrimitive(\"expires_in\").getAsInt() * 1000);\n fetchUserProfile();\n } else {\n // Refresh token has failed, reauthorize from scratch\n reauthorize();\n }\n\n }",
"private void refreshGoogleCalendarToken() {\n this.getGoogleToken();\n }",
"public void refreshToken() throws ServiceUnavailableException {\n int retryTime = 0;\n // refresh the access token\n while (true) {\n try {\n this.authResult = getAccessToken();\n break;// refresh token successfully\n } catch (ServiceUnavailableException e) {\n if (retryTime < conf.getMaxRetryTimes()) {\n retryTime++;\n try {\n Thread.sleep(conf.getIntervalTime());\n } catch (InterruptedException e1) {\n // ignore\n }\n continue;// retry to refresh token\n }\n throw e;// failed to refresh token after retry\n }\n\n }\n }",
"@Test\n public void testRefreshToken() {\n ApplicationContext context =\n TEST_DATA_RESOURCE\n .getSecondaryApplication()\n .getBuilder()\n .client(ClientType.AuthorizationGrant, true)\n .bearerToken()\n .refreshToken()\n .build();\n OAuthToken t = context.getToken();\n\n String header = authHeaderBearer(t.getId());\n\n Response r = target(\"/token/private\")\n .request()\n .header(AUTHORIZATION, header)\n .get();\n\n assertEquals(Status.UNAUTHORIZED.getStatusCode(), r.getStatus());\n }",
"public ResponseEntity<OAuth2AccessToken> refreshToken(HttpServletRequest request, HttpServletResponse response, Map<String, String> params) {\n \n \ttry {\n \t\tString refreshToken = params.get(\"refreshToken\");\n\t OAuth2AccessToken accessToken = authorizationClient.sendRefreshGrant(refreshToken);\n\t return ResponseEntity.ok(accessToken);\n } catch (Exception ex) {\n log.error(\"failed to get OAuth2 tokens from UAA\", ex);\n throw ex;\n }\n\n }",
"void setAuthorizerRefreshToken(String appId, String authorizerRefreshToken);",
"@Override\n public void onTokenRefresh() {\n }",
"public void refreshToken(\n final ServiceClientCompletion<ResponseResult> completion)\n {\n // Create request headers.\n final HashMap<String, String> headers = new HashMap<String, String>(2);\n headers.put(\"Authorization\", AUTHORIZATION_HEADER);\n headers.put(\"Content-Type\", \"application/x-www-form-urlencoded\");\n\n // Create request parameters.\n final HashMap<String, String> parameters =\n new HashMap<String, String>(2);\n parameters.put(\"grant_type\", \"refresh_token\");\n parameters.put(\"refresh_token\", mSharecareToken.refreshToken);\n\n this.beginRequest(REFRESH_TOKEN_ENDPOINT, ServiceMethod.GET, headers,\n parameters, (String)null, ServiceResponseFormat.GSON,\n new ServiceResponseTransform<JsonElement, ResponseResult>()\n {\n @Override\n public ResponseResult transformResponseData(\n final JsonElement json)\n throws ServiceResponseTransformException\n {\n final ResponseResult result =\n checkResultFromAuthService(json);\n if (result.success)\n {\n final boolean success =\n setSharecareToken(json,\n mSharecareToken.askMDProfileCreated,\n mSharecareToken.preProfileCreation);\n if (success)\n {\n final HashMap<String, Object> parameters =\n new HashMap<String, Object>(1);\n parameters.put(\"newAccessToken\",\n mSharecareToken.accessToken);\n result.parameters = parameters;\n }\n }\n\n LogError(\"refreshToken\", result);\n return result;\n }\n }, completion);\n }",
"@Override\n public String refresh() {\n\n // Override the existing token\n setToken(null);\n\n // Get the identityId and token by making a call to your backend\n // (Call to your backend)\n\n // Call the update method with updated identityId and token to make sure\n // these are ready to be used from Credentials Provider.\n\n update(identityId, token);\n return token;\n\n }",
"@Override\r\n public void onTokenRefresh() {\n App.sendToken();\r\n }",
"public String getRefreshToken() {\r\n return refreshToken;\r\n }",
"@GetMapping(value = \"/token/refresh\")\n public void refreshToken (HttpServletRequest request, HttpServletResponse response) throws IOException {\n String authorizationHeader = request.getHeader(AUTHORIZATION);\n if(authorizationHeader!=null && authorizationHeader.startsWith(\"Bearer \")){\n\n try {\n String refreshToken = authorizationHeader.substring(\"Bearer \".length());\n Algorithm algorithm = Algorithm.HMAC256(\"secret\".getBytes());\n JWTVerifier verifier = JWT.require(algorithm).build();\n DecodedJWT decodedJWT = verifier.verify(refreshToken);\n String userName = decodedJWT.getSubject();\n User user = userRepo.findByUserName(userName);\n\n String accessToken = JWT.create()\n .withSubject(user.getUserName())\n .withExpiresAt(new Date(System.currentTimeMillis()+ 10*60*1000))\n .withIssuer(request.getRequestURL().toString())\n .withClaim(\"roles\", user.getRoles().stream().map(Role::getRoleName).collect(Collectors.toList()))\n .sign(algorithm);\n\n\n\n Map<String , String> tokens = new HashMap<>();\n tokens.put(\"accessToken\",accessToken);\n tokens.put(\"refreshToken\",refreshToken);\n response.setContentType(APPLICATION_JSON_VALUE);\n new ObjectMapper().writeValue(response.getOutputStream(),tokens);\n\n }catch (Exception exception){\n\n response.setHeader(\"Error\", exception.getMessage());\n response.setStatus(FORBIDDEN.value());\n //response.sendError(FORBIDDEN.value());\n\n Map<String , String> error = new HashMap<>();\n error.put(\"errorMsg\",exception.getMessage());\n response.setContentType(APPLICATION_JSON_VALUE);\n new ObjectMapper().writeValue(response.getOutputStream(),error);\n }\n\n }else {\n throw new RuntimeException(\"Refresh token is missing\");\n }\n }",
"@Override\n\tprotected ServerAccessToken doRefreshAccessToken(Client client, RefreshToken oldRefreshToken,\n\t\t\tList<String> restrictedScopes) {\n\t\trestrictedScopes.clear();\n\t\tServerAccessToken accessToken = super.doRefreshAccessToken(\n\t\t\t\tclient, oldRefreshToken, restrictedScopes);\n\t\t\n\t\tif (log.isDebugEnabled()) {\n\t\t\ttry {\n\t\t\t\tlog.debug(\"Old RefreshToken={}\", OBJECT_MAPPER.writeValueAsString(oldRefreshToken));\n\t\t\t\tlog.debug(\"ServerAccessToken={}\", OBJECT_MAPPER.writeValueAsString(accessToken));\n\t\t\t} catch (JsonProcessingException e) {\n\t\t\t\tlog.error(e.getMessage(), e);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn accessToken;\n\t}",
"String getAuthorizerRefreshToken(String appId);",
"private void mtd_refresh_token() {\n RxClient.get(FeedActivity.this).Login(new loginreq(sharedpreferences.\n getString(SharedPrefUtils.SpEmail, \"\"),\n sharedpreferences.getString(SharedPrefUtils.SpPassword, \"\")), new Callback<loginresp>() {\n @Override\n public void success(loginresp loginresp, Response response) {\n\n if (loginresp.getStatus().equals(\"200\")){\n\n editor.putString(SharedPrefUtils.SpRememberToken,loginresp.getToken().toString());\n editor.commit();\n\n final Handler handler = new Handler();\n final Runnable runnable = new Runnable() {\n @Override\n public void run() {\n wbService(tmpansList);\n progressBar.setVisibility(View.INVISIBLE);\n }\n };\n handler.postDelayed(runnable, 500);\n\n }\n }\n\n @Override\n public void failure(RetrofitError error) {\n progressBar.setVisibility(View.INVISIBLE);\n Log.d(\"refresh token\", \"refresh token error\");\n Toast.makeText(FeedActivity.this, \"Service not response\",\n Toast.LENGTH_LONG).show();\n finish();\n }\n });\n\n }",
"public String getRefresh_token() {\r\n\t\treturn refresh_token;\r\n\t}",
"public String refreshToken(String token) {\n\t\tString refreshedToken;\n\t\ttry {\n\t\t\tfinal Claims claims = this.getClaimsFromToken(token);\n\t\t\tclaims.put(\"created\", this.generateCurrentDate());\n\t\t\trefreshedToken = this.generateToken(claims);\n\t\t} catch (Exception e) {\n\t\t\trefreshedToken = null;\n\t\t}\n\t\treturn refreshedToken;\n\t}",
"@Override\n\tpublic OauthAccessToken acquireOauthRefreshToken(String refreshToken) \n\t{\n\t\t\n\t\tString url = WeChatConst.WECHATOAUTHURL+WeChatConst.OAUTHREFRESHTOKENURI;\n\t\tMap<String, String> param = new HashMap<String, String>();\n\t\tparam.put(\"appid\", WeChatConst.APPID);\n\t\tparam.put(\"grant_type\", \"refresh_token\");\n\t\tparam.put(\"refresh_token\", refreshToken);\n\t\tString response = HttpClientUtils.doGetWithoutHead(url, param);\n\t\tlog.debug(\" acquireOauthRefreshToken response :\"+response);\n\t\ttry {\n\t\t\tJSONObject responseJson = JSONObject.parseObject(response);\n\t\t\tOauthAccessToken authAccessToken = new OauthAccessToken();\n\t\t\tif(!responseJson.containsKey(\"errcode\"))\n\t\t\t{\n\t\t\t\tauthAccessToken.setAccessToken(responseJson.getString(\"access_token\"));\n\t\t\t\tauthAccessToken.setExpiresIn(responseJson.getString(\"exoires_in\"));\n\t\t\t\tauthAccessToken.setOpenId(responseJson.getString(\"openid\"));\n\t\t\t\tauthAccessToken.setScope(responseJson.getString(\"scope\"));\n\t\t\t\treturn authAccessToken;\n\t\t\t}\n\t\t\treturn null;\n\t\t} catch (Exception e) {\n\t\t\tlog.error(e);\n\t\t}\n\t\treturn null;\n\t}",
"public String refreshToken(String token) {\n String refreshedToken;\n try {\n final Claims claims = this.getClaimsFromToken(token);\n claims.put(CREATED, dateUtil.getCurrentDate());\n refreshedToken = this.generateToken(claims);\n } catch (Exception e) {\n refreshedToken = null;\n }\n return refreshedToken;\n }",
"public boolean refreshToken(ClientDataMgr clientDataMgr) {\n try {\n System.out.println(\"refreshing token...\");\n\n if (clientId == null || clientSecret == null) {\n LOG.log(Level.SEVERE, \"missing client id or secret\");\n System.out.println(\"missing client id or secret in application.properties\");\n clientDataMgr.drop();\n return false;\n }\n String response = netUtils.post(authEndpoint,\n \"refresh_token=\" + clientDataMgr.getRefreshToken()\n + \"&client_id=\" + clientId\n + \"&client_secret=\" + clientSecret\n + \"&grant_type=refresh_token\");\n\n if (response == null) {\n LOG.log(Level.FINE, \"refresh token failed\");\n System.out.println(\"refresh token failed.\");\n clientDataMgr.drop();\n return false;\n }\n\n JSONParser j = new JSONParser();\n JSONObject jobj = (JSONObject) j.parse(response);\n if (!isValidRefreshResp(jobj)) {\n LOG.log(Level.WARNING, \"invalid token refresh resp\");\n System.out.println(\"refresh token failed.\");\n clientDataMgr.drop();\n return false;\n }\n\n clientDataMgr.loadFromJson(jobj);\n clientDataMgr.persist();\n return true;\n\n } catch (ParseException e) {\n LOG.log(Level.WARNING, \"google auth response parse failed\");\n }\n return false;\n }",
"@SuppressWarnings(\"unused\")\n private static String getRefreshToken() throws IOException {\n String client_id = System.getenv(\"PICASSA_CLIENT_ID\");\n String client_secret = System.getenv(\"PICASSA_CLIENT_SECRET\");\n \n // Adapted from http://stackoverflow.com/a/14499390/1447621\n String redirect_uri = \"http://localhost\";\n String scope = \"http://picasaweb.google.com/data/\";\n List<String> scopes;\n HttpTransport transport = new NetHttpTransport();\n JsonFactory jsonFactory = new JacksonFactory();\n\n scopes = new LinkedList<String>();\n scopes.add(scope);\n GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(transport, jsonFactory, client_id, client_secret, scopes).build();\n GoogleAuthorizationCodeRequestUrl url = flow.newAuthorizationUrl();\n url.setRedirectUri(redirect_uri);\n url.setApprovalPrompt(\"force\");\n url.setAccessType(\"offline\");\n String authorize_url = url.build();\n \n // paste into browser to get code\n System.out.println(\"Put this url into your browser and paste in the access token:\");\n System.out.println(authorize_url);\n \n Scanner scanner = new Scanner(System.in);\n String code = scanner.nextLine();\n scanner.close();\n\n flow = new GoogleAuthorizationCodeFlow.Builder(transport, jsonFactory, client_id, client_secret, scopes).build();\n GoogleTokenResponse res = flow.newTokenRequest(code).setRedirectUri(redirect_uri).execute();\n String refreshToken = res.getRefreshToken();\n String accessToken = res.getAccessToken();\n\n System.out.println(\"refresh:\");\n System.out.println(refreshToken);\n System.out.println(\"access:\");\n System.out.println(accessToken);\n return refreshToken;\n }",
"public String getRefreshToken() {\n\t\treturn refreshToken;\n\t}",
"@Override\n public void onTokenRefresh() {\n String refreshedToken = FirebaseInstanceId.getInstance().getToken();\n /*Log.d(\"Refreshed token\", \"Refreshed token: \" + refreshedToken);\n FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();\n final CollectionReference clients = FirebaseFirestore.getInstance().collection(\"Tokens\");\n Map<String, Object> data1 = new HashMap<>();\n data1.put(\"token\", refreshedToken);\n clients.document(\"Iamhere\").set(data1, SetOptions.merge());*/\n\n // If you want to send messages to this application instance or\n // manage this apps subscriptions on the server side, send the\n // Instance ID token to your app server.\n //sendRegistrationToServer(refreshedToken);\n }",
"public interface TokenProvider {\n /**\n * @return an always valid access token.\n */\n String getAccessToken();\n\n /**\n * Forces a refresh of all tokens.\n *\n * @return the newly refreshed access token.\n */\n String refreshTokens();\n}",
"@PostMapping(value = \"/refresh\")\n\tpublic ResponseEntity<UserTokenState> refreshAuthenticationToken(HttpServletRequest request) {\n\n\t\tString token = tokenUtils.getToken(request);\n\t\tString username = this.tokenUtils.getUsernameFromToken(token);\n\t\tUser user = (User) this.userDetailsService.loadUserByUsername(username);\n\n\t\tif (this.tokenUtils.canTokenBeRefreshed(token, user.getLastResetPasswordDate())) {\n\t\t\tString refreshedToken = tokenUtils.refreshToken(token);\n\t\t\tint expiresIn = tokenUtils.getExpiredIn();\n\n\t\t\treturn ResponseEntity.ok(new UserTokenState(refreshedToken, expiresIn, user));\n\t\t} else {\n\t\t\tUserTokenState userTokenState = new UserTokenState();\n\t\t\treturn ResponseEntity.badRequest().body(userTokenState);\n\t\t}\n\t}",
"@Override\n\tprotected RefreshToken doCreateNewRefreshToken(ServerAccessToken at) {\n\t\tRefreshToken refreshToken = super.doCreateNewRefreshToken(at);\n\t\trefreshToken.setTokenKey(\"RT:\" + UUID.randomUUID().toString());\n\t\trefreshToken.setExpiresIn(Oauth2Factory.REFRESH_TOKEN_EXPIRED_TIME_SECONDS);\n\t\t\n\t\tif (log.isDebugEnabled()) {\n\t\t\ttry {\n\t\t\t\tlog.debug(\"RefreshToken={}\", OBJECT_MAPPER.writeValueAsString(refreshToken));\n\t\t\t} catch (JsonProcessingException e) {\n\t\t\t\tlog.error(e.getMessage(), e);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn refreshToken;\n\t}",
"String refreshTokens();",
"public String generateNewAccessToken(String refresh_token) throws SocketTimeoutException, IOException, Exception{\n String newAccessToken = \"\";\n JSONObject jsonReturn = new JSONObject();\n JSONObject tokenRequestParams = new JSONObject();\n tokenRequestParams.element(\"refresh_token\", refresh_token);\n if(currentRefreshToken.equals(\"\")){\n //You must read in the properties first!\n Exception noProps = new Exception(\"You must read in the properties first with init(). There was no refresh token set.\");\n throw noProps;\n }\n else{\n try{\n URL rerum = new URL(Constant.RERUM_ACCESS_TOKEN_URL);\n HttpURLConnection connection = (HttpURLConnection) rerum.openConnection();\n connection.setRequestMethod(\"POST\"); \n connection.setConnectTimeout(5*1000); \n connection.setDoOutput(true);\n connection.setDoInput(true);\n connection.setRequestProperty(\"Content-Type\", \"application/json\");\n connection.connect();\n DataOutputStream outStream = new DataOutputStream(connection.getOutputStream());\n //Pass in the user provided JSON for the body \n outStream.writeBytes(tokenRequestParams.toString());\n outStream.flush();\n outStream.close(); \n //Execute rerum server v1 request\n BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream(),\"utf-8\"));\n StringBuilder sb = new StringBuilder();\n String line;\n while ((line = reader.readLine()) != null){\n //Gather rerum server v1 response\n sb.append(line);\n }\n reader.close();\n jsonReturn = JSONObject.fromObject(sb.toString());\n newAccessToken = jsonReturn.getString(\"access_token\");\n }\n catch(java.net.SocketTimeoutException e){ //This specifically catches the timeout\n System.out.println(\"The Auth0 token endpoint is taking too long...\");\n jsonReturn = new JSONObject(); //We were never going to get a response, so return an empty object.\n jsonReturn.element(\"error\", \"The Auth0 endpoint took too long\");\n throw e;\n }\n }\n setAccessToken(newAccessToken);\n writeProperty(\"access_token\", newAccessToken);\n return newAccessToken;\n }",
"@Override\n public void onTokenRefresh() {\n Log.d(\"MyInstanceIDService\", \"onTokenRefresh\");\n// new GCMDoRequest().execute(new GCMRequest(this, GCMCommand.GET_TOKEN));\n }",
"public void setRefreshToken(String refreshToken) {\n\t\tthis.refreshToken = refreshToken;\n\t}",
"@Override\n public void onTokenRefresh() {\n String refreshedToken = FirebaseInstanceId.getInstance().getToken();\n Log.d(TAG, \"Refreshed token: \" + refreshedToken);\n\n saveToken(refreshedToken);\n sendRegistrationToServer(refreshedToken);\n }",
"@PostMapping(\"/refreshJwtToken\")\n public ResponseEntity<TokenRefreshResponse> postRefreshToken(@Valid @RequestBody TokenRefreshRequest request) {\n TokenRefreshResponse tokenRefreshResponse = this.authenticationService.getRefreshedToken(request);\n return ResponseEntity.ok(tokenRefreshResponse);\n }",
"public static void refreshToken(ApiClient client, String applicationKey, String secret) {\n byte[] secretKey = secret.getBytes(Charset.forName(\"utf-8\"));\n String jwt = Jwts.builder()\n .setSubject(applicationKey)\n .setExpiration(new Date(System.currentTimeMillis() + 30_000))\n .setIssuedAt(new Date())\n .setHeaderParam(Header.TYPE, \"API\")\n .signWith(\n SignatureAlgorithm.HS512,\n secretKey)\n .compact();\n\n ApiKeyAuth authorization = (ApiKeyAuth) client.getAuthentication(\"Authorization\");\n authorization.setApiKey(jwt);\n authorization.setApiKeyPrefix(AUTHORIZATION_HEADER_BEARER_PREFIX);\n }",
"@Override\n public void onTokenRefresh() {\n String refreshedToken = FirebaseInstanceId.getInstance().getToken();\n Log.d(TAG, \"Refreshed token: \" + refreshedToken);\n SharedPreferences settings =\n getSharedPreferences(PREF, Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = settings.edit();\n editor.putString(PREF_FIREBASE_TOKEN, refreshedToken);\n editor.apply();\n }",
"@Override\n public void onTokenRefresh() {\n final String refreshedToken = FirebaseInstanceId.getInstance().getToken();\n\n //To displaying token on logcat\n Log.w(\"TOKEN: \", refreshedToken);\n\n SharedPreferences sharedPreferences = getSharedPreferences(SHARED_PREFERENCE_FILE, MODE_PRIVATE);\n final Long userId = sharedPreferences.getLong(\"userId\", 0L);\n\n if (!userId.equals(0L)){\n\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(\"firebaseToken\", refreshedToken);\n editor.apply();\n\n Handler handler = new Handler(this.getMainLooper());\n\n Runnable runnable = new Runnable() {\n @Override\n public void run() {\n\n // Update token for this user\n UserTask<Void> userTask = new UserTask<>(userId);\n userTask.setFirebaseToken(refreshedToken);\n userTask.execute(\"refreshFirebaseToken\");\n\n }\n };\n\n handler.post(runnable);\n\n }\n\n }",
"protected boolean generateRefreshTokenOnRefreshRequest() {\n\t\treturn true;\n\t}",
"@Nullable\n public String getRefreshToken() {\n return refreshToken;\n }",
"@Override\n public void onTokenRefresh() {\n String refreshedToken = FirebaseInstanceId.getInstance().getToken();\n Log.d(TAG, \"Refreshed token: \" + refreshedToken);\n\n // If you want to send messages to this application instance or\n // manage this apps subscriptions on the server side, send the\n // Instance ID token to your app server.\n try {\n sendNewTokenToServer(refreshedToken);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"private String refreshToken() {\n return null;\n }",
"@Override\n public void onTokenRefresh() {\n String refreshedToken = FirebaseInstanceId.getInstance().getToken();\n Timber.d(\"Refreshed token: \" + refreshedToken);\n }",
"@Override\n public void onTokenRefresh() {\n\n //Getting registration token\n String refreshedToken = FirebaseInstanceId.getInstance().getToken();\n\n //Displaying token on logcat\n Log.e(TAG, \"Refreshed token: \" + refreshedToken);\n\n //calling the method store token and passing token\n storeToken(refreshedToken);\n }",
"public Object refresh(HttpServletRequest request)\n throws OAuthProblemException, OAuthSystemException {\n try {\n\n OAuthTokenRequest oauthRequest = new OAuthTokenRequest(request);\n OAuthAuthzParameters oAuthAuthzParameters = new OAuthAuthzParameters(oauthRequest);\n String refreshToken = oauthRequest.getRefreshToken();\n\n if (!oAuthService.checkRefreshFrequency(refreshToken)) {\n OAuthResponse response = OAuthASResponseEx\n .errorResponse(HttpServletResponse.SC_OK)\n .setError(String.valueOf(OAuthConstants.OAuthResponse.INVALID_FREQUENCY))\n .setErrorDescription(OAuthConstants.OAuthDescription.INVALID_FRESH_FREQUENCY)\n .buildJSONMessage();\n logger.warn(\"refresh token {} too frequent, context: {}\", refreshToken, oAuthAuthzParameters);\n return new ResponseEntity<String>(response.getBody(), HttpStatus.valueOf(response.getResponseStatus()));\n }\n\n // check token\n RefreshToken token = oAuthService.getRefreshToken(refreshToken);\n if (token == null) {\n OAuthResponse response = OAuthASResponseEx\n .errorResponse(HttpServletResponse.SC_OK)\n .setError(String.valueOf(OAuthConstants.OAuthResponse.INVALID_REQUEST))\n .setErrorDescription(OAuthConstants.OAuthDescription.INVALID_FRESH_TOKEN)\n .buildJSONMessage();\n logger.warn(\"invalid refresh token {}, context: {}\", refreshToken, oAuthAuthzParameters);\n return new ResponseEntity<String>(response.getBody(), HttpStatus.valueOf(response.getResponseStatus()));\n }\n\n // check the client id and the token client id\n if (!token.getClientId().equals(oauthRequest.getClientId())) {\n OAuthResponse response = OAuthASResponseEx\n .errorResponse(HttpServletResponse.SC_OK)\n .setError(String.valueOf(OAuthConstants.OAuthResponse.INVALID_CLIENT_INFO))\n .setErrorDescription(OAuthConstants.OAuthDescription.INVALID_CLIENT_DESCRIPTION)\n .buildJSONMessage();\n logger.info(\"invalid client id {} and {}, context: {}\", token.getClientId(), oauthRequest.getClientId(), oAuthAuthzParameters);\n return new ResponseEntity<String>(response.getBody(), HttpStatus.valueOf(response.getResponseStatus()));\n }\n\n // check client id\n Client openOauthClients = oAuthService.getClientByClientId(oauthRequest.getClientId());\n if (openOauthClients == null) {\n OAuthResponse response = OAuthASResponseEx\n .errorResponse(HttpServletResponse.SC_OK)\n .setError(String.valueOf(OAuthConstants.OAuthResponse.INVALID_CLIENT))\n .setErrorDescription(OAuthConstants.OAuthDescription.INVALID_CLIENT_DESCRIPTION)\n .buildJSONMessage();\n logger.info(\"can not get client, context: {}\", oAuthAuthzParameters);\n return new ResponseEntity<String>(response.getBody(), HttpStatus.valueOf(response.getResponseStatus()));\n }\n\n if (!openOauthClients.getGrantTypes().contains(Constants.OAUTH_REFRESH_TOKEN)) {\n OAuthResponse response = OAuthASResponseEx\n .errorResponse(HttpServletResponse.SC_OK)\n .setError(String.valueOf(OAuthConstants.OAuthResponse.INVALID_CLIENT_INFO))\n .setErrorDescription(OAuthConstants.OAuthDescription.INVALID_GRANT_TYPE)\n .buildJSONMessage();\n logger.info(\"no grant type, context: {}\", oAuthAuthzParameters);\n return new ResponseEntity<String>(response.getBody(), HttpStatus.valueOf(response.getResponseStatus()));\n }\n\n // check client secret\n if (!openOauthClients.getClientSecret().equals(oauthRequest.getClientSecret())) {\n OAuthResponse response = OAuthASResponseEx\n .errorResponse(HttpServletResponse.SC_OK)\n .setError(String.valueOf(OAuthConstants.OAuthResponse.INVALID_CLIENT_INFO))\n .setErrorDescription(OAuthConstants.OAuthDescription.INVALID_CLIENT_DESCRIPTION)\n .buildJSONMessage();\n logger.info(\"invalid secret: {}, context: {}\", openOauthClients.getClientSecret(), oAuthAuthzParameters);\n return new ResponseEntity<String>(response.getBody(), HttpStatus.valueOf(response.getResponseStatus()));\n }\n\n // check token time\n if (!AppUtils.checkBefore(token.getExpires())) {\n OAuthResponse response = OAuthASResponseEx\n .errorResponse(HttpServletResponse.SC_OK)\n .setError(String.valueOf(OAuthConstants.OAuthResponse.NO_OR_EXPIRED_TOKEN))\n .setErrorDescription(OAuthConstants.OAuthDescription.INVALID_FRESH_TOKEN)\n .buildJSONMessage();\n logger.info(\"token is expired: {}, context: {}\", token.getId(), oAuthAuthzParameters);\n return new ResponseEntity<String>(response.getBody(), HttpStatus.valueOf(response.getResponseStatus()));\n }\n\n OAuthIssuerImpl oAuthIssuer = new OAuthIssuerImpl(new UUIDValueGeneratorEx());\n String accessToken = oAuthIssuer.accessToken();\n\n oAuthAuthzParameters.setUserId(token.getUserId());\n\n if (StringUtils.isEmpty(oAuthAuthzParameters.getScope())) {\n oAuthAuthzParameters.setScope(openOauthClients.getDefaultScope());\n } else {\n oAuthAuthzParameters.setScope(\n OAuthUtils.encodeScopes(\n oAuthService.getRetainScopes(\n openOauthClients.getDefaultScope(),\n oAuthAuthzParameters.getScope()\n )\n )\n );\n }\n\n /**\n * limit client access token number\n */\n int limitNum = openOauthClients.getClientNum();\n limitNum = limitNum > 0 ? limitNum - 1 : limitNum;\n oAuthService.limitAccessToken(oAuthAuthzParameters.getClientId(),\n oAuthAuthzParameters.getUserId(), limitNum);\n\n oAuthService.saveAccessToken(accessToken, oAuthAuthzParameters);\n\n OAuthResponse response = OAuthASResponseEx\n .tokenResponse(HttpServletResponse.SC_OK)\n .setTokenType(\"uuid\")\n .setAccessToken(accessToken)\n .setRefreshToken(refreshToken)\n .setExpiresIn(String.valueOf(appConfig.tokenAccessExpire))\n .setScope(oAuthAuthzParameters.getScope())\n .buildJSONMessage();\n logger.info(\"response access token: {}, context: {}\", accessToken, oAuthAuthzParameters);\n return new ResponseEntity<String>(response.getBody(), HttpStatus.valueOf(response.getResponseStatus()));\n } catch (OAuthProblemException e) {\n logger.error(\"oauth problem exception\", e);\n OAuthResponse res = OAuthASResponseEx\n .errorResponse(HttpServletResponse.SC_OK)\n .setError(String.valueOf(OAuthConstants.OAuthResponse.INVALID_REQUEST))\n .setErrorDescription(e.getMessage())\n .buildJSONMessage();\n return new ResponseEntity<String>(res.getBody(), HttpStatus.valueOf(res.getResponseStatus()));\n }\n }",
"AuthenticationToken renewAuthentication(String headerToken);",
"@Override\n public void onTokenRefresh() {\n\n String refreshedToken = FirebaseInstanceId.getInstance().getToken();\n Log.d(TAG, \"Refreshed token: \" + refreshedToken);\n\n // TODO: 13/6/2017 Persistir token en archivo XML.\n sharedPreferences = getSharedPreferences(\"datos\",MODE_PRIVATE);\n SharedPreferences.Editor edit = sharedPreferences.edit();\n edit.putString(String.valueOf(R.string.token),refreshedToken);\n edit.commit();\n\n\n }",
"@Override\n public void onTokenRefresh() {\n String refreshedToken = FirebaseInstanceId.getInstance().getToken();\n if (refreshedToken != null) {\n Log.d(TAG, \"Refreshed token: \" + refreshedToken);\n\n // If you want to send messages to this application instance or\n // manage this apps subscriptions on the server side, send the\n // Instance ID token to your app server.\n sendTokenToServer(refreshedToken);\n }\n }",
"@Override\n public void onTokenRefresh() {\n String token = FirebaseInstanceId.getInstance().getToken();\n registerToken(token);\n }",
"@MainThread\n @CalledByNative\n void invalidateAccessToken(String accessToken) {\n mAccountManagerFacade.invalidateAccessToken(accessToken);\n }",
"@Override\n public void run() {\n UserTask<Void> userTask = new UserTask<>(userId);\n userTask.setFirebaseToken(refreshedToken);\n userTask.execute(\"refreshFirebaseToken\");\n\n }",
"void setAccessToken(String accessToken);",
"public RefreshToken generateRefreshToken(){\n RefreshToken refreshToken = new RefreshToken();\n //Creates a 128bit random UUID. This serves as our refresh token\n refreshToken.setToken(UUID.randomUUID().toString());\n //Set creation timestampt\n refreshToken.setCreatedDate(Instant.now());\n\n return refreshTokenRepository.save(refreshToken);\n }",
"@Transient\n\tpublic String getRefreshToken() {\n\t\treturn refreshToken;\n\t}",
"public abstract long renewToken(Token<T> token, String renewer)\n throws IOException;",
"@Override\n public void onTokenRefresh() {\n String refreshedToken = FirebaseInstanceId.getInstance().getToken();\n Log.d(TAG, \"Refreshed token: \" + refreshedToken);\n\n // If you want to send messages to this application instance or\n // manage this apps subscriptions on the server side, send the\n // Instance ID token to your app server.\n sendRegistrationToServer(refreshedToken);\n }",
"@Override\n public void onTokenRefresh() {\n String refreshedToken = FirebaseInstanceId.getInstance().getToken();\n Log.d(\"myToken\", \"Refreshed token: \" + refreshedToken);\n\n // If you want to send messages to this application instance or\n // manage this apps subscriptions on the server side, send the\n // Instance ID token to your app server.\n //sendRegistrationToServer(refreshedToken);\n getApplicationContext().sendBroadcast(new Intent(broadcast));\n SharedPrefManager.getInstance(getApplicationContext()).storeToken(refreshedToken);\n }",
"@Override\n public void onTokenRefresh() {\n // Get updated InstanceID token.\n device_id = Settings.Secure.getString(this.getContentResolver(),\n Settings.Secure.ANDROID_ID);\n String refreshedToken = FirebaseInstanceId.getInstance().getToken();\n Log.d(TAG, \"Refreshed token: \" + refreshedToken);\n\n // If you want to send messages to this application instance or\n // manage this apps subscriptions on the server side, send the\n // Instance ID token to your app server.\n\n //**************need to modify the code such that it can update exisiting user data***********************\n sendRegistrationToServer(refreshedToken);\n //**************need to modify the code such that it can update exisiting user data***********************\n }",
"public void checkToRefreshToken(\n final ServiceClientCompletion<ResponseResult> completion)\n {\n final long timeDiff =\n mSharecareToken.expiresIn.getTime() - new Date().getTime();\n final long timeDiffInMin = TimeUnit.MILLISECONDS.toMinutes(timeDiff);\n if (timeDiffInMin < TIME_LIMIT_IN_MINUTES)\n {\n refreshToken(completion);\n }\n else if (completion != null)\n {\n completion.onCompletion(ServiceResultStatus.CANCELLED, 0, null);\n }\n }",
"@Override\n\tprotected Object refreshTokenGrantType(String requestId) {\n\t\treceivedRefreshRequest = true;\n\t\tvalidateRefreshRequest();\n\n\t\t//this must be after EnsureScopeInRefreshRequestContainsNoMoreThanOriginallyGranted is called\n\t\tcallAndStopOnFailure(ExtractScopeFromTokenEndpointRequest.class);\n\n\t\tgenerateAccessToken();\n\n\t\tif(generateIdTokenOnRefreshRequest()) {\n\t\t\tcreateIdTokenForRefreshRequest();\n\t\t}\n\n\t\tcreateRefreshToken(true);\n\n\t\tcallAndStopOnFailure(CreateTokenEndpointResponse.class);\n\n\t\tcall(exec().unmapKey(\"token_endpoint_request\").endBlock());\n\n\t\treturn new ResponseEntity<Object>(env.getObject(\"token_endpoint_response\"), HttpStatus.OK);\n\t}",
"void setOAuthAccessToken(AccessToken accessToken);",
"@Api(1.0)\n @NonNull\n public String getRefreshToken() {\n return mRefreshToken;\n }",
"private String issueRefreshToken(UUID user, String deviceName) {\n String token = UUID.randomUUID().toString();\n String hash = BCrypt.hashpw(token, BCrypt.gensalt());\n\n dao.updateToken(user, deviceName, hash);\n\n return token;\n }",
"protected boolean generateIdTokenOnRefreshRequest() {\n\t\treturn true;\n\t}",
"@Override\n public void onTokenRefresh(){\n // start Gcm registration service\n Intent intent = new Intent(this, GcmRegistrationIntentService.class);\n startService(intent);\n }",
"void expireComponentAccessToken();",
"@Override\n public void onTokenRefresh() {\n // Get updated InstanceID token.\n String refreshedToken = FirebaseInstanceId.getInstance().getToken();\n Log.d(\"Refreshed token: \" + refreshedToken);\n sendRegistrationToServer(refreshedToken);\n }",
"@Override\n public void onRequestToken() {\n Toast.makeText(getApplicationContext(), \"Your token has expired\", Toast.LENGTH_LONG).show();\n Log.i(\"Video_Call_Tele\", \"The token as expired..\");\n // mRtcEngine.renewToken(token);\n // https://docs.agora.io/en/Video/API%20Reference/java/classio_1_1agora_1_1rtc_1_1_rtc_engine.html#af1428905e5778a9ca209f64592b5bf80\n // Renew token - TODO\n }",
"protected void createIdTokenForRefreshRequest() {\n\t\tgenerateIdTokenClaims();\n\n\t\taddAtHashToIdToken();\n\n\t\taddCustomValuesToIdTokenForRefreshResponse();\n\n\t\tsignIdToken();\n\n\t\tcustomizeIdTokenSignatureForRefreshResponse();\n\n\t\tencryptIdTokenIfNecessary();\n\t}",
"default WorkdayEndpointConsumerBuilder tokenRefresh(String tokenRefresh) {\n doSetProperty(\"tokenRefresh\", tokenRefresh);\n return this;\n }",
"default WorkdayEndpointBuilder tokenRefresh(String tokenRefresh) {\n doSetProperty(\"tokenRefresh\", tokenRefresh);\n return this;\n }",
"@Override\n public void onTokenRefresh() {\n\n String token = FirebaseInstanceId.getInstance().getToken();\n CTOKEN = token;\n\n// if(sgen.ID != \"\") {\n// String query = \"UPDATE USER_DETAILS SET FTOKEN = '\"+token+\"' WHERE ID = '\"+sgen.ID+\"'; \";\n// ArrayList<Team> savedatateam = servicesRequest.save_data(query);\n// sgen.FTOKEN = token;\n// }\n\n\n // Once the token is generated, subscribe to topic with the userId\n// if(sgen.ATOKEN.equals(sgen.CTOKEN)) {\n try {\n FirebaseMessaging.getInstance().subscribeToTopic(SUBSCRIBE_TO);\n Log.i(TAG, \"onTokenRefresh completed with token: \" + token);\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n// }\n\n\n /* sendRegistrationToServer(refreshedToken);*/\n }",
"@Override\n\tprotected boolean isRefreshTokenSupported(List<String> theScopes) {\n\t\tlog.debug(\"Always generate refresh token\");\n\t\treturn true;\n\t}",
"@GET\n @Path(\"refresh\")\n public Response refreshUser() {\n\t\tJwtHandler jwth = (JwtHandler) servletContext.getAttribute(ApplicationResources.JWT_HANDLER_ATTR);\n\t\tString bearer = (String) req.getAttribute(BEARER); \n\t\t\n\t\t\t\t\t\t\t// Authz does not require, nor validate, the JWT. \n\t\t\t\t\t\t\t// This dummy call just retrieves any item from the JWT which with through exception if already expired\n\t\ttry {\n\t\t\tjwth.getClaimString(bearer, JwtHandler.USERNAME);\n\t\t\treturn Response.ok(null, MediaType.APPLICATION_JSON).build();\n\t\t} catch (AuthzException e) {\n\t\t\tErrorResponse response = new ErrorResponse(\"Session Expired.\", \"Please login.\", 409);\n\t\t\treturn Response.status(Response.Status.CONFLICT).type(MediaType.APPLICATION_JSON).entity(response).build();\t\n\t\t}\n\n }",
"public void setReuseRefreshToken(boolean reuseRefreshToken) {\n this.reuseRefreshToken = reuseRefreshToken;\n }",
"Account refresh(Context context);",
"@Override\r\n\tpublic String refreshToken() throws OAuthSystemException {\n\t\treturn null;\r\n\t}",
"public boolean onSessionChanged(String authToken, String refreshToken, long expires);",
"void updateComponentAccessToken(WxOpenComponentAccessToken componentAccessToken);",
"@Override\n public void onTokenRefresh() {\n // Fetch updated Instance ID token and notify our app's server of any changes (if applicable).\n startService(new Intent(this, RegistrationIntentService.class));\n }",
"@RequestMapping(value = \"/gw/oauth/token/{version}/refresh\", method = RequestMethod.POST, produces = \"application/json;charset=utf-8\")\n public Object entry2(HttpServletRequest request)\n throws URISyntaxException, OAuthSystemException, OAuthProblemException {\n return this.refresh(request);\n }",
"public String generateRefreshToken(final User user, final String tenant)\n\t{\n\t\tClaims claims = Jwts.claims().setSubject(user.getId().toString());\n\t\tclaims.put(\"password\", user.getPassword());\n\t\tclaims.put(\"tenant\", tenant);\n\t\treturn buildToken(claims, refreshTokenExp);\n\t}",
"public ResponseEntity<String> deleteRefreshToken(String token){\n refreshTokenRepository.deleteByToken(token);\n return new ResponseEntity<>(\"Refresh Token Deleted Successfully.\", HttpStatus.OK);\n }",
"public boolean setAccessToken(JSONObject response){\n boolean ret=false;\n Log.d(TAG, \"setAccessToken: \"+response);\n SharedPreferences.Editor editor=context.getSharedPreferences(Const.LINKAI_SHAREDPREFERENCE_FILE,Context.MODE_PRIVATE).edit();\n try {\n editor.putString(\"access_token\",response.getString(\"access_token\"));\n editor.putString(\"token_type\",response.getString(\"token_type\"));\n editor.putLong(\"expires_in\",Long.valueOf(response.getString(\"expires_in\")));\n// editor.putLong(\"expires_in\",10000);\n editor.putLong(\"token_timestamp\",new Date().getTime());\n editor.commit();\n ret=true;\n }catch (Exception e){\n e.printStackTrace();\n }\n return ret;\n }",
"@Override\n public List<RefreshToken> getRefreshTokens() {\n return new ArrayList<RefreshToken>(refreshTokens.values());\n }",
"@Override\n public List<RefreshToken> getRefreshTokens() {\n return new ArrayList<RefreshToken>(refreshTokens.values());\n }",
"public static JSONObject refreshToken(String refreshToken) throws Exception {\r\n\t\tString refreshTokenUrl = MessageFormat.format(REFRESH_TOKEN_URL, SOCIAL_LOGIN_CLIENT_ID, refreshToken);\r\n\t\tString response = HttpClientUtils.sendRequest(refreshTokenUrl);\r\n\t\treturn JSONObject.fromObject(response);\r\n\t}",
"public void setRefreshToken(String refreshToken) {\r\n this.refreshToken = refreshToken == null ? null : refreshToken.trim();\r\n }",
"public String generateNewAccessToken() throws SocketTimeoutException, IOException, Exception{\n System.out.println(\"Lived Religion has to get a new access token...\");\n String newAccessToken = \"\";\n JSONObject jsonReturn = new JSONObject();\n JSONObject tokenRequestParams = new JSONObject();\n tokenRequestParams.element(\"refresh_token\", currentRefreshToken);\n if(currentRefreshToken.equals(\"\")){\n //You must read in the properties first!\n System.out.println(\"You must read in the properties first with init()\");\n Exception noProps = new Exception(\"You must read in the properties first with init(). There was no refresh token set.\");\n throw noProps;\n }\n else{\n try{\n System.out.println(\"Connecting to RERUM with refresh token...\");\n URL rerum = new URL(Constant.RERUM_ACCESS_TOKEN_URL);\n HttpURLConnection connection = (HttpURLConnection) rerum.openConnection();\n connection.setRequestMethod(\"POST\"); \n connection.setConnectTimeout(5*1000); \n connection.setDoOutput(true);\n connection.setDoInput(true);\n connection.setRequestProperty(\"Content-Type\", \"application/json\");\n connection.connect();\n DataOutputStream outStream = new DataOutputStream(connection.getOutputStream());\n //Pass in the user provided JSON for the body \n outStream.writeBytes(tokenRequestParams.toString());\n outStream.flush();\n outStream.close(); \n //Execute rerum server v1 request\n BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream(),\"utf-8\"));\n StringBuilder sb = new StringBuilder();\n String line;\n while ((line = reader.readLine()) != null){\n //Gather rerum server v1 response\n sb.append(line);\n }\n reader.close();\n jsonReturn = JSONObject.fromObject(sb.toString());\n System.out.println(\"RERUM responded with access token...\");\n newAccessToken = jsonReturn.getString(\"access_token\");\n }\n catch(java.net.SocketTimeoutException e){ //This specifically catches the timeout\n System.out.println(\"The RERUM token endpoint is taking too long...\");\n jsonReturn = new JSONObject(); //We were never going to get a response, so return an empty object.\n jsonReturn.element(\"error\", \"The RERUM endpoint took too long\");\n throw e;\n //newAccessToken = \"error\";\n }\n }\n setAccessToken(newAccessToken);\n writeProperty(\"access_token\", newAccessToken);\n System.out.println(\"Lived Religion has a new access token, and it is written to the properties file...\");\n return newAccessToken;\n }",
"OAuth2Token getToken();",
"public static void setAccessToken(String accessToken) {\n }",
"String getAccessToken();",
"String getAccessToken();",
"public static boolean isValidRefreshToken(SignedJWT jwt, String userAgent, String tokenHash) throws OrgApiSecurityException{\n String userName = JWTUtil.splitUserNameOrgName(JWTUtil.getTokenSubjectClaim(jwt))[0];\n return HashingUtils.verifySHA256(userName + userAgent, tokenHash);\n }",
"@Override\n public void onTokenRefresh() {\n String refreshedToken = FirebaseInstanceId.getInstance().getToken();\n Log.d(TAG, \"REFRESHED TOKEN: \" + refreshedToken);\n JSONObject jsonbody = new JSONObject();\n try {\n jsonbody.put(\"UserID\",App.profileModel.UserID);\n jsonbody.put(\"GCMToken\",refreshedToken);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n if(refreshedToken != null)\n HttpCaller\n .getInstance()\n .updateGCMToken(\n jsonbody,\n new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject o) {\n try {\n if(!o.getBoolean(\"Status\")) {\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n },\n new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError volleyError) {\n }\n },true);\n\n\n\n\n prefs = Prefs.getInstance();\n Gson gson = new Gson();\n userPrefsInance = prefs.init(getApplicationContext());\n userPrefsInance.edit().putString(prefs.GCM_TOKEN,refreshedToken);\n\n App.profileModel.GCMToken = refreshedToken;\n\n if(App.profileModel.UserID > 0) {\n HttpCaller.\n getInstance().\n updateGCMToken(\n null,\n new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject o) {\n try {\n if (!o.getBoolean(\"Status\")) {\n //Helper.showToast(\"Failed to update notification device token.\", ToastStyle.ERROR);\n\n }\n } catch (JSONException e) {\n e.printStackTrace();\n //Helper.showToast(\"Failed to update notification device token.\", ToastStyle.ERROR);\n }\n }\n },\n new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError volleyError) {\n //Helper.showToast(\"Failed to update notification device token.\", ToastStyle.ERROR);\n\n }\n },true);\n }\n\n // If you want to send messages to this application instance or\n // manage this apps subscriptions on the server side, send the\n // Instance ID token to your app server.\n }",
"public String generateRefreshToken(ApplicationUser user) {\n Date expiryDate = java.sql.Date.valueOf(LocalDate.now().plusDays(jwtConfig.getRefreshExpirationDateInMs()));\n return Jwts.builder()\n .setSubject(user.getUser().getUsername())\n .claim(\"authorities\", user.getAuthorities())\n .setIssuedAt(new Date(System.currentTimeMillis()))\n .setExpiration(expiryDate)\n .signWith(jwtSecretKey.secretKey())\n .compact();\n }",
"public RefreshToken createRefreshToken() {\n RefreshToken refreshToken = new RefreshToken();\n refreshToken.setExpiryDate(Instant.now().plusMillis(refreshTokenDurationMs));\n refreshToken.setToken(Util.generateRandomUuid());\n refreshToken.setRefreshCount(0L);\n return refreshToken;\n }",
"@Override\n public RefreshToken getRefreshToken(String refreshTokenCode) {\n if (log.isTraceEnabled()) {\n log.trace(\"Looking for the refresh token: \" + refreshTokenCode + \" for an authorization grant of type: \"\n + getAuthorizationGrantType());\n }\n return refreshTokens.get(TokenHashUtil.hash(refreshTokenCode));\n }",
"@Override\n public void onTokenRefresh() {\n // Fetch updated Instance ID token and notify of changes\n Intent intent = new Intent(this, RegistrationIntentService.class);\n intent.putExtra(\"SOURCE\", \"GCM\");\n startService(intent);\n }",
"void removeAccessToken() {\n SharedPreferences prefs = // because rest also needs token\n context.getSharedPreferences(SHARED_PREFS_NAME, Context.MODE_PRIVATE);\n prefs.edit()\n .remove(KEY_ACCESS_TOKEN)\n .apply();\n // notification to all listeners\n state.onNext(new AuthState(false));\n\n }",
"private void hasRefreshToken() {\n\n /* Attempt to get a user and acquireTokenSilently\n * If this fails we will do an interactive request\n */\n List<User> users = null;\n try {\n User currentUser = Helpers.getUserByPolicy(sampleApp.getUsers(), Constants.SISU_POLICY);\n\n if (currentUser != null) {\n /* We have 1 user */\n boolean forceRefresh = true;\n sampleApp.acquireTokenSilentAsync(\n scopes,\n currentUser,\n String.format(Constants.AUTHORITY, Constants.TENANT, Constants.SISU_POLICY),\n forceRefresh,\n getAuthSilentCallback());\n } else {\n /* We have no user for this policy*/\n updateRefreshTokenUI(false);\n }\n } catch (MsalClientException e) {\n /* No token in cache, proceed with normal unauthenticated app experience */\n Log.d(TAG, \"MSAL Exception Generated while getting users: \" + e.toString());\n\n } catch (IndexOutOfBoundsException e) {\n Log.d(TAG, \"User at this position does not exist: \" + e.toString());\n }\n }",
"public String getRefreshToken(Credential credential) throws IOException,\n\t\t\tJSONException {\n\t\tString refreshToken = credential.getRefreshToken();\n\t\tSystem.out.println(refreshToken);\n\t\treturn refreshToken;\n\t}",
"default WorkdayEndpointProducerBuilder tokenRefresh(String tokenRefresh) {\n doSetProperty(\"tokenRefresh\", tokenRefresh);\n return this;\n }"
] | [
"0.80448484",
"0.7293847",
"0.7175314",
"0.7133889",
"0.71207416",
"0.69714147",
"0.68850154",
"0.68804187",
"0.68045354",
"0.67933637",
"0.6735434",
"0.6725768",
"0.6711648",
"0.6711228",
"0.6682984",
"0.66163665",
"0.6540092",
"0.6529604",
"0.650116",
"0.64784205",
"0.64589304",
"0.64404255",
"0.6411366",
"0.64049935",
"0.6368326",
"0.63381886",
"0.6318043",
"0.6278339",
"0.62600183",
"0.6248912",
"0.6239255",
"0.6234307",
"0.6232454",
"0.6219923",
"0.6189458",
"0.61746335",
"0.61319274",
"0.61237735",
"0.61171424",
"0.61119556",
"0.60989875",
"0.6073983",
"0.6043997",
"0.6025662",
"0.6025224",
"0.6020025",
"0.6010194",
"0.5999367",
"0.59316766",
"0.59231204",
"0.59162205",
"0.59142214",
"0.59136254",
"0.5910621",
"0.5903967",
"0.59020466",
"0.589129",
"0.58883715",
"0.5875763",
"0.5807557",
"0.58061945",
"0.5792966",
"0.57880527",
"0.5769961",
"0.5754377",
"0.57243305",
"0.5723115",
"0.57049567",
"0.57046354",
"0.5704622",
"0.56806153",
"0.5676694",
"0.5673053",
"0.56665874",
"0.5642737",
"0.5640365",
"0.56374466",
"0.5631019",
"0.5630548",
"0.5628019",
"0.56269884",
"0.5626666",
"0.5626666",
"0.5613142",
"0.5604754",
"0.56031364",
"0.55999357",
"0.55778813",
"0.5561051",
"0.5561051",
"0.555973",
"0.555736",
"0.5550096",
"0.5540033",
"0.55372864",
"0.55359024",
"0.5530241",
"0.55026656",
"0.5496612",
"0.5491971"
] | 0.70523757 | 5 |
Make sure default constructor can be used without exceptions being thrown. | @Test
public void defaultContructorWorks() {
try {
new EventIDAssociator();
} catch (MalformedURLException mue) {
Assert.fail("default contructor threw exception");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Consts(){\n //this prevents even the native class from \n //calling this ctor as well :\n throw new AssertionError();\n }",
"defaultConstructor(){}",
"void DefaultConstructor(){}",
"@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }",
"@Test( expected = IllegalStateException.class )\n\tpublic void constructorShouldNotBeInstantiable() {\n\t\tnew ReflectionUtil() {\n\t\t\t// constructor is protected\n\t\t};\n\t}",
"private NullSafe()\n {\n super();\n }",
"protected Object buildNewInstanceUsingDefaultConstructor() throws DescriptorException {\n try {\n if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()){\n try {\n return AccessController.doPrivileged(new PrivilegedInvokeConstructor(this.getDefaultConstructor(), (Object[])null));\n } catch (PrivilegedActionException exception) {\n Exception throwableException = exception.getException();\n if (throwableException instanceof InvocationTargetException){\n throw DescriptorException.targetInvocationWhileConstructorInstantiationOfFactory(this.getDescriptor(), throwableException);\n } else if (throwableException instanceof IllegalAccessException){\n throw DescriptorException.illegalAccessWhileConstructorInstantiationOfFactory(this.getDescriptor(), throwableException); \n } else {\n throw DescriptorException.instantiationWhileConstructorInstantiationOfFactory(this.getDescriptor(), throwableException); \n }\n }\n } else {\n return PrivilegedAccessHelper.invokeConstructor(this.getDefaultConstructor(), (Object[])null);\n }\n } catch (InvocationTargetException exception) {\n throw DescriptorException.targetInvocationWhileConstructorInstantiation(this.getDescriptor(), exception);\n } catch (IllegalAccessException exception) {\n throw DescriptorException.illegalAccessWhileConstructorInstantiation(this.getDescriptor(), exception);\n } catch (InstantiationException exception) {\n throw DescriptorException.instantiationWhileConstructorInstantiation(this.getDescriptor(), exception);\n } catch (NoSuchMethodError exception) {\n // This exception is not documented but gets thrown.\n throw DescriptorException.noSuchMethodWhileConstructorInstantiation(this.getDescriptor(), exception);\n } catch (NullPointerException exception) {\n // Some JVMs will throw a NULL pointer exception here\n throw DescriptorException.nullPointerWhileConstructorInstantiation(this.getDescriptor(), exception);\n }\n }",
"@Test\r\n public void testBadConstructor() {\r\n try {\r\n SnakeSquare instance = new SnakeSquare(33,44);\r\n fail();\r\n } catch (IllegalArgumentException e) { }\r\n }",
"private Example() {\n\t\tthrow new Error(\"no instantiation is permitted\");\n\t}",
"private Topography()\n\t{\n\t\tthrow new IllegalStateException(\"This is an utility class, it can not be instantiated\");\n\t}",
"private Main()\n {{\n System.err.println ( \"Internal error: \"+\n\t \"unexpected call to default constructor for Main.\" );\n System.exit(-127);\n }}",
"private Instantiation(){}",
"private InterpreterDependencyChecks() {\r\n\t\t// Hides default constructor\r\n\t}",
"@Test(expected = IllegalArgumentException.class)\r\n public void constructorExceptionTest(){\n Owner invalid = new Owner(\"First\", \"Last\", \"333\");\r\n }",
"public ExceptionUtils()\n {\n // nothing to do\n }",
"public void testCtor1() {\r\n try {\r\n new DbBaseFilterFactory(null);\r\n fail(\"IllegalArgumentException expected.\");\r\n } catch (IllegalArgumentException iae) {\r\n //good\r\n }\r\n }",
"@Test\n void constructorTest() {\n super.checkConstruction();\n }",
"private ExampleVersion() {\n throw new UnsupportedOperationException(\"Illegal constructor call.\");\n }",
"public void testCtor1Accuracy() {\n ContestEligibilityValidatorException exception = new ContestEligibilityValidatorException();\n assertNotNull(\"Unable to instantiate ContestEligibilityValidatorException.\", exception);\n }",
"Reproducible newInstance();",
"@Test\n\tvoid testConstructor() {\n\t\tassertDoesNotThrow(() -> {UdpCommunicator communicator = this.getCommunicatorImplementation(64324);});\n\t\tassertThrows(IllegalArgumentException.class, () -> {UdpCommunicator communicator = this.getCommunicatorImplementation(-54);});\n\t\tassertThrows(IllegalArgumentException.class, () -> {UdpCommunicator communicator = this.getCommunicatorImplementation(70000);});\n\t}",
"private Default()\n {}",
"private SystemInfo() {\r\n // forbid object construction \r\n }",
"private Validations() {\n\t\tthrow new IllegalAccessError(\"Shouldn't be instantiated.\");\n\t}",
"private Main() {\r\n throw new IllegalStateException();\r\n }",
"public void testCtorNPE() {\r\n try {\r\n new UploadRequestValidator(null);\r\n fail(\"if the argument is null, throw NullPointerExcetpion\");\r\n } catch (NullPointerException e) {\r\n // good\r\n }\r\n }",
"private Util()\n {\n // Empty default ctor, defined to override access scope.\n }",
"protected abstract void construct();",
"public void testCtor4Accuracy() {\n ContestEligibilityValidatorException exception =\n new ContestEligibilityValidatorException(MESSAGE, CAUSE);\n assertNotNull(\"Unable to instantiate ContestEligibilityValidatorException.\", exception);\n assertEquals(\"Error message is not properly propagated to super class.\", MESSAGE, exception\n .getMessage());\n assertEquals(\"Cause is not properly propagated to super class.\", CAUSE, exception.getCause());\n }",
"private ContactFactory() {\n throw new AssertionError();\n }",
"private Validate(){\n //private empty constructor to prevent object initiation\n }",
"public void testConstructorNPE2() {\r\n try {\r\n new SimpleCreditCardValidator(null, new ValidationLUHN());\r\n fail(\"an NPE is expected\");\r\n }\r\n catch (NullPointerException npe) {\r\n //pass\r\n }\r\n }",
"public void testConstructor() {\r\n assertNotNull(\"unable to create instance\", instance);\r\n }",
"private SerializationUtils() {\n\t\tthrow new AssertionError();\n\t}",
"@Test\n @DisplayName(\"Valid\")\n public void testValidConstructor() {\n assertDoesNotThrow(() -> {\n Settings settings = new Settings();\n assertAll(() -> assertEquals(0, settings.getStreamID()),\n () -> assertEquals(SETTINGS_TYPE, settings.getCode()));\n\n });\n }",
"@Test\n public void testDefaultConstructor() {\n assertThat(\"Expect not null.\", testling, is(notNullValue()));\n }",
"@Test\n\tpublic void testDefaultConstructor() {\n\t\tassertThat(\"Expect not null.\", testling, is(notNullValue()));\n\t}",
"public TechnicalException() {\r\n }",
"public JavaException()\r\n\t{\r\n\t\tsuper();\r\n\t}",
"private Ex() {\n }",
"protected Object buildFactoryUsingDefaultConstructor() throws DescriptorException {\n try {\n if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()){\n try {\n return AccessController.doPrivileged(new PrivilegedInvokeConstructor(this.buildFactoryDefaultConstructor(), (Object[])null));\n } catch (PrivilegedActionException exception) {\n Exception throwableException = exception.getException();\n if (throwableException instanceof InvocationTargetException){\n throw DescriptorException.targetInvocationWhileConstructorInstantiationOfFactory(this.getDescriptor(), throwableException);\n } else if (throwableException instanceof IllegalAccessException){\n throw DescriptorException.illegalAccessWhileConstructorInstantiationOfFactory(this.getDescriptor(), throwableException); \n } else {\n throw DescriptorException.instantiationWhileConstructorInstantiationOfFactory(this.getDescriptor(), throwableException); \n }\n }\n } else {\n return PrivilegedAccessHelper.invokeConstructor(this.buildFactoryDefaultConstructor(), (Object[])null);\n }\n } catch (InvocationTargetException exception) {\n throw DescriptorException.targetInvocationWhileConstructorInstantiationOfFactory(this.getDescriptor(), exception);\n } catch (IllegalAccessException exception) {\n throw DescriptorException.illegalAccessWhileConstructorInstantiationOfFactory(this.getDescriptor(), exception);\n } catch (InstantiationException exception) {\n throw DescriptorException.instantiationWhileConstructorInstantiationOfFactory(this.getDescriptor(), exception);\n } catch (NoSuchMethodError exception) {\n // This exception is not documented but gets thrown.\n throw DescriptorException.noSuchMethodWhileConstructorInstantiationOfFactory(this.getDescriptor(), exception);\n } catch (NullPointerException exception) {\n // Some JVMs will throw a NULL pointer exception here\n throw DescriptorException.nullPointerWhileConstructorInstantiationOfFactory(this.getDescriptor(), exception);\n }\n }",
"public void testConstructorNPE1() {\r\n try {\r\n new SimpleCreditCardValidator(null);\r\n fail(\"an NPE is expected\");\r\n }\r\n catch (NullPointerException npe) {\r\n //pass\r\n }\r\n }",
"public BasicSafetyCaseFactoryImpl() {\n\t\tsuper();\n\t}",
"private TagCacheManager(){\n //AssertionError不是必须的. 但它可以避免不小心在类的内部调用构造器. 保证该类在任何情况下都不会被实例化.\n //see 《Effective Java》 2nd\n throw new AssertionError(\"No \" + getClass().getName() + \" instances for you!\");\n }",
"private TemplateFactory(){\n //AssertionError不是必须的. 但它可以避免不小心在类的内部调用构造器. 保证该类在任何情况下都不会被实例化.\n //see 《Effective Java》 2nd\n throw new AssertionError(\"No \" + getClass().getName() + \" instances for you!\");\n }",
"public DocumentUtil() {\n // Because this class can be instantiated by other classes many times, we only\n // want to call the initialize() function\n // if we will be using the getProblemType() function below.\n }",
"private Utility() {\n throw new IllegalAccessError();\n }",
"ConstructorPractice () {\n\t\tSystem.out.println(\"Default Constructor\");\n\t}",
"public SucheException() {\n }",
"@Test\n public void validate_Constructor() {\n try {\n Service testService = new Service(\"Camera Installation\", 250, \"category_test\");\n assertEquals(\"Service getter Failed - name\", \"Camera Installation\", testService.getName());\n assertEquals(\"Service getter Failed - rate\", 250, testService.getRate());\n assertEquals(\"Service getter Failed - categoryID\", \"category_test\", testService.getCategoryKey());\n } catch (InvalidDataException e) {\n fail(\"Availability construction failed. Error: \" + e.getMessage());\n }\n\n // Make sure InvalidDataException is thrown for invalid data\n try {\n new Service(\"Illegal-service+name\", 45, \"categoryKey\");\n fail(\"Service Constructor Failed - Illegal Name\");\n } catch (InvalidDataException ignore) {}\n try {\n new Service(\"service name\", -45, \"categoryKey\");\n fail(\"Service Constructor Failed - Illegal rate\");\n } catch (InvalidDataException ignore) {}\n try {\n new Service(\"service name\", 45, \"\");\n fail(\"Service Constructor Failed - Illegal category key\");\n } catch (InvalidDataException ignore) {}\n\n }",
"private ATCres() {\r\n // prevent to instantiate this class\r\n }",
"@Test\n public void testConstructor()\n {\n try\n {\n Square s = new Square();\n\n // Test the properties of s\n assertEquals(Square.squareType.REGULAR, s.getType());\n assertFalse(s.isOccupied());\n }\n catch(Exception ex)\n {\n fail(\"No exception should be thrown when a square is constructed normally.\");\n }\n }",
"private Security() { }",
"private ClassifierUtils() {\n throw new AssertionError();\n }",
"public TrafficspacesAPIException() {\n \tthis(null, DEFAULT_MESSAGE);\n }",
"@Test(expected=UnsupportedOperationException.class)\n public void ValidatorConstructorTest(){\n underTest = new Validator();\n //THEN exception thrown\n \n }",
"public void testConstructorNPE3() {\r\n try {\r\n new SimpleCreditCardValidator(\"test\", null);\r\n fail(\"an NPE is expected\");\r\n }\r\n catch (NullPointerException npe) {\r\n //pass\r\n }\r\n }",
"@Test\n public void exampleTest1() {\n \ttry {\n \t\tVersion version = new Version(null);\n \t} catch(IllegalArgumentException e) {\n \t\tAssert.assertEquals(errorVersionMustNotBeNull, e.getMessage());\n \t} catch(Exception e) {\n \t\tAssert.fail(\"No exception thrown when null version passed to constructor: \"+e.getClass().getName()+\" \"+e.getMessage());\n \t}\n }",
"public FullCarException() {\r\n super(\"\");\r\n }",
"private Source() {\n throw new AssertionError(\"This class should not be instantiated.\");\n }",
"public void testConstructorWithNullArgument() throws Exception {\r\n try {\r\n new ConfigurationObjectSpecificationFactory(null);\r\n fail(\"IllegalArgumentException is expected.\");\r\n } catch (IllegalArgumentException e) {\r\n // ok\r\n }\r\n }",
"public void init() throws InvariantError, PostconditionError;",
"public void testCtor_NullManager() {\n try {\n new AddActionStateAction(state, activityGraph, null);\n fail(\"IllegalArgumentException expected.\");\n } catch (IllegalArgumentException iae) {\n //good\n }\n }",
"private SingleObject()\r\n {\r\n }",
"public abstract void init() throws Throwable;",
"public CanyonException()\r\n {\r\n super();\r\n }",
"private FastMath() {\r\n throw new AssertionError();\r\n }",
"public PriceModelException() {\n\n }",
"@Test\n @DisplayName(\"Testing constructor default\")\n public void testConstructorDefault(){\n assertEquals(BlackoutException.ERROR_MESSAGE, blackoutDefault.getMessage());\n }",
"protected Problem() {/* intentionally empty block */}",
"private ClassificationSettings() {\n throw new AssertionError();\n }",
"@SuppressWarnings(\"unused\")\r\n\tprivate TransporterException(){\r\n\t\t\r\n\t}",
"public Exception() {\n\t\t\tsuper();\n\t\t}",
"private ErrorFactory() {\r\n\t}",
"public NoSolutionException() {\n }",
"public OrderServiceSecurityException() {\n\t}",
"private CheckingTools() {\r\n super();\r\n }",
"private PropertiesLoader() {\r\n\t\t// not instantiable\r\n\t}",
"public abstract void init() throws Exception;",
"public void testEmptyConstructor() {\n Agent agent = new Agent();\n assertNull(agent.getName(), \"Agent name should have not been initialized.\");\n assertNull(agent.getVersion(), \"Agent version should have not been initialized.\");\n assertEquals(agent.toString(), \"\", \"Agent display representation should not be valid.\");\n }",
"private WebXmlIo()\n {\n // Voluntarily empty constructor as utility classes should not have a public or default\n // constructor\n }",
"public T safeNewInstance() {\n try {\n return newInstance();\n } catch (NoSuchMethodException e) {\n throw new IllegalArgumentException(e);\n } catch (IllegalAccessException e) {\n throw new IllegalArgumentException(e);\n } catch (InvocationTargetException e) {\n throw new IllegalArgumentException(e);\n } catch (InstantiationException e) {\n throw new IllegalArgumentException(e);\n }\n }",
"@Test\r\n public void testCtorLegalName1() throws IllegalUserNameLengthException,\r\n IllegalUserUsernameLengthException, IllegalUserNameException, IllegalUserRoleException,\r\n IllegalUserUsernameException {\r\n new User(\"username\", Role.DONOR, \"ed\");\r\n }",
"private Utility() {\n\t}",
"private LazySingleton() {\n if (null != INSTANCE) {\n throw new InstantiationError(\"Instance creation not allowed\");\n }\n }",
"public SMSLibException() {}",
"@Test\n public void testDefaultConstructor() {\n final ConfigSearchResult<?> result = new ConfigSearchResult<>();\n assertTrue(result.getDocuments().isEmpty());\n assertNull(result.getPaging());\n assertEquals(result.getVersionCorrection(), VersionCorrection.LATEST);\n }",
"public ShieldException() {\n }",
"private Mth()\n\t{\n\t\tthrow new AssertionError();\n\t}",
"public void testCtor_Failure() {\r\n try {\r\n new TCAuthToken(0);\r\n fail(\"IllegalArgumentException is expected.\");\r\n } catch (IllegalArgumentException e) {\r\n //success\r\n }\r\n }",
"private SupplierLoaderUtil() {\n\t}",
"@SuppressWarnings(\"unused\")\r\n\tprivate Person() {\r\n\t}",
"private Terms(){\n\t\t //this prevents even the native class from calling this ctor as well :\n\t\t throw new AssertionError();\n\t\t }",
"@Test(expected = IllegalArgumentException.class)\n public void testCtor_null_argument() throws Exception {\n new DefaultProjectPaymentCalculator(null);\n }",
"private PermissionUtil() {\n throw new IllegalStateException(\"you can't instantiate PermissionUtil!\");\n }",
"protected abstract void init() throws Throwable;",
"public void testCtor_NullState() {\n try {\n new AddActionStateAction(null, activityGraph, manager);\n fail(\"IllegalArgumentException expected.\");\n } catch (IllegalArgumentException iae) {\n //good\n }\n }",
"public ClassNotFoundException () {\n\t\tsuper((Throwable)null); // Disallow initCause\n\t}",
"@Test\n public void constructorDefault() {\n final CourseType courseType = new CourseType();\n\n assertNull(courseType.getId());\n assertNull(courseType.getName());\n assertNull(courseType.getPicture());\n assertNull(courseType.getPosition());\n assertNull(courseType.getStatus());\n assertNull(courseType.getCourses());\n assertNull(courseType.getAllowedDishes());\n }",
"private ObjectFactory() { }"
] | [
"0.75775796",
"0.74710166",
"0.7380089",
"0.71750957",
"0.7091423",
"0.7055644",
"0.68238854",
"0.681995",
"0.6678916",
"0.66589737",
"0.66574585",
"0.66530025",
"0.66463923",
"0.6629844",
"0.66214913",
"0.6609969",
"0.6607085",
"0.6604388",
"0.6602595",
"0.6591073",
"0.6572153",
"0.65710837",
"0.6557076",
"0.65264684",
"0.65185356",
"0.6503901",
"0.6500827",
"0.64815235",
"0.6464346",
"0.6463623",
"0.6461557",
"0.6460081",
"0.6454295",
"0.6436833",
"0.64354545",
"0.64291257",
"0.64201266",
"0.6417079",
"0.6413335",
"0.64043134",
"0.6399254",
"0.63959944",
"0.63950646",
"0.639299",
"0.6388524",
"0.6383278",
"0.63793904",
"0.63727164",
"0.6372151",
"0.6364204",
"0.63627267",
"0.63561016",
"0.6350321",
"0.6344507",
"0.63404405",
"0.6338838",
"0.6323526",
"0.63193345",
"0.63187623",
"0.6316638",
"0.63068825",
"0.6298754",
"0.6298057",
"0.62960255",
"0.6280676",
"0.62804997",
"0.6275949",
"0.62732106",
"0.6265931",
"0.62651026",
"0.6263795",
"0.62613314",
"0.6244091",
"0.62419534",
"0.6241905",
"0.6240534",
"0.62402946",
"0.6224091",
"0.6222798",
"0.6220677",
"0.62177455",
"0.62169075",
"0.62130255",
"0.6211344",
"0.6207086",
"0.62070835",
"0.6197861",
"0.61951107",
"0.61872435",
"0.61830825",
"0.6182473",
"0.6181708",
"0.61793613",
"0.61775106",
"0.6174695",
"0.61744946",
"0.6173431",
"0.6169677",
"0.6168684",
"0.6168288"
] | 0.713139 | 4 |
Check the nearby queries generated by event id associator match expectations. | @Test
public void testNearbyQuery() throws Exception {
DefaultEventInfo event = new DefaultEventInfo();
event.setTime(new Date());
event.setLatitude(new BigDecimal("34"));
event.setLongitude(new BigDecimal("-118"));
event.setDepth(new BigDecimal("1.32"));
event.setMagnitude(new BigDecimal("4.5"));
EventQuery query;
EventComparison criteria = testAssociator.getNearbyCriteria();
testAssociator.getNearbyEvents(event, null);
query = testService.lastQuery;
long milliseconds = testAssociator.getNearbyCriteria().getTimeDifference()
.multiply(new BigDecimal("1000")).longValue();
Assert.assertEquals("expected start time", query.getStartTime(), new Date(
event.getTime().getTime() - milliseconds));
Assert.assertEquals("expected end time", query.getEndTime(), new Date(event
.getTime().getTime() + milliseconds));
Assert.assertEquals("expected latitude", event.getLatitude(),
query.getLatitude());
Assert.assertEquals("expected longitude", event.getLongitude(),
query.getLongitude());
Assert.assertEquals(
"expected radius",
criteria.getLocationDifference().divide(
EventIDAssociator.KILOMETERS_PER_DEGREE, MathContext.DECIMAL32),
query.getMaxRadius());
Assert.assertEquals("expected min depth",
event.getDepth().subtract(criteria.getDepthDifference()),
query.getMinDepth());
Assert.assertEquals("expected max depth",
event.getDepth().add(criteria.getDepthDifference()),
query.getMaxDepth());
Assert.assertEquals("expected min magnitude", event.getMagnitude()
.subtract(criteria.getMagnitudeDifference()), query.getMinMagnitude());
Assert.assertEquals("expected max magnitude",
event.getMagnitude().add(criteria.getMagnitudeDifference()),
query.getMaxMagnitude());
Assert.assertNull("expected null network", query.getCatalog());
testAssociator.getNearbyEvents(event, "testnetwork");
query = testService.lastQuery;
Assert.assertEquals("expected null network", "testnetwork",
query.getCatalog());
try {
testAssociator.getNearbyEvents(new DefaultEventInfo(), null);
Assert.fail("empty event should throw exception");
} catch (IllegalArgumentException iae) {
// expected
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void findNearByEvents() {\n LatLng latLng = mMapFragment.getCenterOfScreen();\n double longitude = latLng.longitude;\n double latitude = latLng.latitude;\n\n int spEventsPosition = mEventsSpinner.getSelectedItemPosition();\n int spTimesPosition = mTimesSpinner.getSelectedItemPosition();\n\n Log.e(\"MainAct\", \"Lat: \" + latitude + \" Lon: \" + longitude);\n mEventInteractor = new EventInteractor(this);\n EventSearchRequest eventSearchRequest = new EventSearchRequest();\n eventSearchRequest.setLat(String.valueOf(latitude));\n eventSearchRequest.setLon(String.valueOf(longitude));\n eventSearchRequest.setEventTime(spTimesPosition);\n eventSearchRequest.setEventType(spEventsPosition);\n mEventInteractor.eventSearch(eventSearchRequest, new EventSearchListener() {\n @Override\n public void onEventSearch(EventSearchResponse response) {\n mBottomSheetListFragment.refreshEvents(response.getEvents());\n mMapFragment.getEventsAndPin(response.getEvents());\n }\n\n @Override\n public void onError(String errorMessage) {\n showErrorMessage(errorMessage);\n }\n\n @Override\n public void onBeforeRequest() {\n showWaitingDialog();\n }\n\n @Override\n public void onAfterRequest() {\n dismissWaitingDialog();\n }\n });\n }",
"@Test\n\tpublic void testNullCriteria() throws Exception {\n\t\tEventQuery query = null;\n\t\tDate time = new Date();\n\t\tBigDecimal latitude = new BigDecimal(\"34\");\n\t\tBigDecimal longitude = new BigDecimal(\"-118\");\n\t\tBigDecimal depth = new BigDecimal(\"1.32\");\n\t\tBigDecimal magnitude = new BigDecimal(\"4.5\");\n\t\tString network = \"net\";\n\n\t\t// null location criteria\n\t\ttestAssociator.setNearbyCriteria(new EventComparison(\n\t\t\t\tBigDecimal.ONE, null, BigDecimal.ONE, BigDecimal.ONE));\n\t\ttestAssociator.getNearbyEvents(time, latitude, longitude, depth, magnitude, null);\n\t\tquery = testService.lastQuery;\n\t\tAssert.assertNotNull(\"starttime\", query.getStartTime());\n\t\tAssert.assertNotNull(\"endtime\", query.getEndTime());\n\t\tAssert.assertNull(\"no longitude\", query.getLongitude());\n\t\tAssert.assertNull(\"no latitude\", query.getLatitude());\n\t\tAssert.assertNull(\"no maxradius\", query.getMaxRadius());\n\t\tAssert.assertNotNull(\"mindepth\", query.getMinDepth());\n\t\tAssert.assertNotNull(\"maxdepth\", query.getMaxDepth());\n\t\tAssert.assertNotNull(\"minmagnitude\", query.getMinMagnitude());\n\t\tAssert.assertNotNull(\"maxmagnitude\", query.getMaxMagnitude());\n\t\tAssert.assertNull(\"catalog\", query.getCatalog());\n\n\t\t// do opposite\n\t\ttestAssociator.setNearbyCriteria(new EventComparison(\n\t\t\t\tnull, BigDecimal.ONE, null, null));\n\t\ttestAssociator.getNearbyEvents(time, latitude, longitude, depth, magnitude, network);\n\t\tquery = testService.lastQuery;\n\t\tAssert.assertNull(\"no starttime\", query.getStartTime());\n\t\tAssert.assertNull(\"no endtime\", query.getEndTime());\n\t\tAssert.assertNotNull(\"longitude\", query.getLongitude());\n\t\tAssert.assertNotNull(\"latitude\", query.getLatitude());\n\t\tAssert.assertNotNull(\"maxradius\", query.getMaxRadius());\n\t\tAssert.assertNull(\"no mindepth\", query.getMinDepth());\n\t\tAssert.assertNull(\"no maxdepth\", query.getMaxDepth());\n\t\tAssert.assertNull(\"no minmagnitude\", query.getMinMagnitude());\n\t\tAssert.assertNull(\"no maxmagnitude\", query.getMaxMagnitude());\n\t\tAssert.assertNotNull(\"catalog\", query.getCatalog());\n\n\t\t// with location criteria and partial location\n\t\ttestAssociator.setNearbyCriteria(new EventComparison(\n\t\t\t\tBigDecimal.ONE, BigDecimal.ONE, null, null));\n\t\ttestAssociator.getNearbyEvents(time, null, longitude, depth, magnitude, null);\n\t\tquery = testService.lastQuery;\n\t\tAssert.assertNull(\"no longitude\", query.getLongitude());\n\t\tAssert.assertNull(\"no latitude\", query.getLatitude());\n\t\tAssert.assertNull(\"no maxradius\", query.getMaxRadius());\n\t\ttestAssociator.getNearbyEvents(time, latitude, null, depth, magnitude, null);\n\t\tquery = testService.lastQuery;\n\t\tAssert.assertNull(\"no longitude\", query.getLongitude());\n\t\tAssert.assertNull(\"no latitude\", query.getLatitude());\n\t\tAssert.assertNull(\"no maxradius\", query.getMaxRadius());\n\t}",
"public void testQuery() throws Exception {\n DummyApprovalRequest req1 = new DummyApprovalRequest(reqadmin, null, caid, SecConst.EMPTY_ENDENTITYPROFILE, false);\n DummyApprovalRequest req2 = new DummyApprovalRequest(admin1, null, caid, SecConst.EMPTY_ENDENTITYPROFILE, false);\n DummyApprovalRequest req3 = new DummyApprovalRequest(admin2, null, 3, 2, false);\n\n approvalSessionRemote.addApprovalRequest(admin1, req1, gc);\n approvalSessionRemote.addApprovalRequest(admin1, req2, gc);\n approvalSessionRemote.addApprovalRequest(admin1, req3, gc);\n\n // Make som queries\n Query q1 = new Query(Query.TYPE_APPROVALQUERY);\n q1.add(ApprovalMatch.MATCH_WITH_APPROVALTYPE, BasicMatch.MATCH_TYPE_EQUALS, \"\" + req1.getApprovalType());\n\n List result = approvalSessionRemote.query(admin1, q1, 0, 3, \"cAId=\" + caid, \"(endEntityProfileId=\" + SecConst.EMPTY_ENDENTITYPROFILE + \")\");\n assertTrue(\"Result size \" + result.size(), result.size() >= 2 && result.size() <= 3);\n\n result = approvalSessionRemote.query(admin1, q1, 1, 3, \"cAId=\" + caid, \"(endEntityProfileId=\" + SecConst.EMPTY_ENDENTITYPROFILE + \")\");\n assertTrue(\"Result size \" + result.size(), result.size() >= 1 && result.size() <= 3);\n\n result = approvalSessionRemote.query(admin1, q1, 0, 1, \"cAId=\" + caid, \"(endEntityProfileId=\" + SecConst.EMPTY_ENDENTITYPROFILE + \")\");\n assertTrue(\"Result size \" + result.size(), result.size() == 1);\n\n Query q2 = new Query(Query.TYPE_APPROVALQUERY);\n q2.add(ApprovalMatch.MATCH_WITH_STATUS, BasicMatch.MATCH_TYPE_EQUALS, \"\" + ApprovalDataVO.STATUS_WAITINGFORAPPROVAL, Query.CONNECTOR_AND);\n q2.add(ApprovalMatch.MATCH_WITH_REQUESTADMINCERTSERIALNUMBER, BasicMatch.MATCH_TYPE_EQUALS, reqadmincert.getSerialNumber().toString(16));\n\n result = approvalSessionRemote.query(admin1, q1, 1, 3, \"cAId=\" + caid, \"(endEntityProfileId=\" + SecConst.EMPTY_ENDENTITYPROFILE + \")\");\n assertTrue(\"Result size \" + result.size(), result.size() >= 1 && result.size() <= 3);\n\n // Remove the requests\n int id1 = ((ApprovalDataVO) approvalSessionRemote.findApprovalDataVO(admin1, req1.generateApprovalId()).iterator().next()).getId();\n int id2 = ((ApprovalDataVO) approvalSessionRemote.findApprovalDataVO(admin1, req2.generateApprovalId()).iterator().next()).getId();\n int id3 = ((ApprovalDataVO) approvalSessionRemote.findApprovalDataVO(admin1, req3.generateApprovalId()).iterator().next()).getId();\n approvalSessionRemote.removeApprovalRequest(admin1, id1);\n approvalSessionRemote.removeApprovalRequest(admin1, id2);\n approvalSessionRemote.removeApprovalRequest(admin1, id3);\n }",
"public void testUsingQueriesFromQueryManger(){\n\t\tSet<String> names = testDataMap.keySet();\n\t\tUtils.prtObMess(this.getClass(), \"atm query\");\n\t\tDseInputQuery<BigDecimal> atmq = \n\t\t\t\tqm.getQuery(new AtmDiot());\n\t\tMap<String, ComplexQueryResult<BigDecimal>> bdResult = \n\t\t\t\tatmq.get(names, 1, TimeUnit.SECONDS);\n\t\tCollectionsStaticMethods.prtMapItems(bdResult);\n\n\t\tUtils.prtObMess(this.getClass(), \"vol query\");\n\t\tDseInputQuery<BigDecimal> volq = \n\t\t\t\tqm.getQuery(new VolDiotForTest());\n\t\tMap<String, ComplexQueryResult<BigDecimal>> dbResult = \n\t\t\t\tvolq.get(names, 1, TimeUnit.SECONDS);\n\t\tCollectionsStaticMethods.prtMapItems(dbResult);\n\t\n\t\tUtils.prtObMess(this.getClass(), \"integer query\");\n\t\tDseInputQuery<BigDecimal> strikeq = \n\t\t\t\tqm.getQuery(new StrikeDiotForTest());\n\t\tMap<String, ComplexQueryResult<BigDecimal>> strikeResult = \n\t\t\t\tstrikeq.get(names, 1, TimeUnit.SECONDS);\n\t\tCollectionsStaticMethods.prtMapItems(strikeResult);\n\t\n\t}",
"private void verifyWorkspace(long[][][] ids) {\n ArrayList<Long> allScreens = LauncherModel.loadWorkspaceScreensDb(getMockContext());\n assertEquals(ids.length, allScreens.size());\n int total = 0;\n\n for (int i = 0; i < ids.length; i++) {\n long screenId = allScreens.get(i);\n for (int y = 0; y < ids[i].length; y++) {\n for (int x = 0; x < ids[i][y].length; x++) {\n long id = ids[i][y][x];\n\n Cursor c = getMockContentResolver().query(LauncherSettings.Favorites.CONTENT_URI,\n new String[]{LauncherSettings.Favorites._ID},\n \"container=-100 and screen=\" + screenId +\n \" and cellX=\" + x + \" and cellY=\" + y, null, null, null);\n if (id == -1) {\n assertEquals(0, c.getCount());\n } else {\n assertEquals(1, c.getCount());\n c.moveToNext();\n assertEquals(id, c.getLong(0));\n total++;\n }\n c.close();\n }\n }\n }\n\n // Verify that not other entry exist in the DB.\n Cursor c = getMockContentResolver().query(LauncherSettings.Favorites.CONTENT_URI,\n new String[]{LauncherSettings.Favorites._ID},\n \"container=-100\", null, null, null);\n assertEquals(total, c.getCount());\n c.close();\n }",
"public void testQuery() {\n mActivity.runOnUiThread(\n new Runnable() {\n public void run() {\n //TODO: Should compare this against the db results directly.\n assertEquals(sendQuery(\"SFO\"), 7);\n assertEquals(sendQuery(\"RHV\"), 1);\n assertEquals(sendQuery(\"xyzzy\"), 0);\n }\n }\n );\n }",
"@Test\r\n\tpublic void testNearMiles() {\r\n\t\tlog.info(\"<<<<<<<<<<<<<<<<< testNearMiles >>>>>>>>>>>>>>>>>>>>\");\r\n\r\n\t\t//DB db = mongo.getDB(Properties.getString(\"mongodb.db.locs\"));\r\n\t\tDBObject index = new BasicDBObject();\r\n\t\tindex.put(\"coords\", \"2dsphere\");\r\n\t\tmongoOps.getCollection(\"locations\").ensureIndex(index);\r\n\r\n\t\tList<Location> locations = locationService.findByCityAndState(\r\n\t\t\t\t\"Wheeling\", \"WV\");\r\n\r\n\t\tassertNotNull(\"locations[0] was null.\", locations.get(0));\r\n\r\n\t\tassertEquals(\"City was not correct.\", \"Wheeling\", locations.get(0)\r\n\t\t\t\t.getCity());\r\n\t\tassertEquals(\"State was not correct.\", \"WV\", locations.get(0)\r\n\t\t\t\t.getState());\r\n\t\tassertEquals(\"ZipCode was not correct.\", \"26003\", locations.get(0)\r\n\t\t\t\t.getZipCode());\r\n\r\n\t\tList<Location> locales = this.locationService.findNear(\r\n\t\t\t\tlocations.get(0), 5);\r\n\r\n\t\tfor (Location locale : locales) {\r\n\t\t\tlog.info(locale.toString());\r\n\t\t}\r\n\r\n\t\tassertEquals(\"City was not correct.\", \"Yorkville\", locales.get(2)\r\n\t\t\t\t.getCity());\r\n\t\tassertEquals(\"City was not correct.\", \"Glen Dale\", locales.get(14)\r\n\t\t\t\t.getCity());\r\n\t}",
"@Test\n\tpublic void testGetOffsetsAgainstNgaTests() {\n\t\t// tolerances are tweaked to accept currently implemented model\n\t\tAssert.assertEquals(-31.628, Geoid.getOffset(new Location( 38.6281550, 269.7791550)), 0.45);\n\t\tAssert.assertEquals( -2.969, Geoid.getOffset(new Location(-14.6212170, 305.0211140)), 0.45);\n\t\tAssert.assertEquals(-43.575, Geoid.getOffset(new Location( 46.8743190, 102.4487290)), 0.05);\n\t\tAssert.assertEquals( 15.871, Geoid.getOffset(new Location(-23.6174460, 133.8747120)), 1.1);\n\t\tAssert.assertEquals( 50.066, Geoid.getOffset(new Location( 38.6254730, 359.9995000)), 0.25);\n\t\tAssert.assertEquals( 17.329, Geoid.getOffset(new Location( -0.4667440, 0.0023000)), 0.12);\n\n\t\t// test things at poles \n\t\t// TODO verify target offsets \n\t\tAssert.assertEquals( 13.73, Geoid.getOffset(new Location( 89.8, 0.1)), 0.05);\n\t\tAssert.assertEquals(-29.85, Geoid.getOffset(new Location(-89.8, 180.2)), 0.05);\n\n\t}",
"@Test\n public void locationInformationBelowMapTest() {\n int originalOrientation = intentsTestRule.getActivity().getRequestedOrientation();\n\n intentsTestRule.getActivity().setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);\n\n openActionBarOverflowOrOptionsMenu(intentsTestRule.getActivity());\n onView(withText(intentsTestRule.getActivity().getString(R.string.action_sort_distance))).check(matches(isDisplayed()));\n onView(withText(intentsTestRule.getActivity().getString(R.string.action_sort_distance))).perform(click());\n\n onView(withId(R.id.search_view)).perform(click());\n onView(withId(android.support.design.R.id.search_src_text)).perform(typeText(\"A\"));\n onView(withId(android.support.design.R.id.search_src_text)).check(matches(withText(\"A\")));\n closeSoftKeyboard();\n\n onView(isRoot()).perform(waitId(R.id.recycler_view, 500));\n\n onView(withId(R.id.recycler_view)).check(matches(isDisplayed()));\n onView(withId(R.id.recycler_view)).perform(actionOnItemAtPosition(0, click()));\n\n onView(isRoot()).perform(waitId(R.id.street_text, 500));\n\n onView(withId(R.id.street_text)).check(matches(isDisplayed()));\n onView(withId(R.id.street_text)).check(matches(withText(\"Accra, Ghana\")));\n onView(withId(R.id.street_text)).check(isBelow(withId(R.id.mapfragment)));\n\n onView(withId(R.id.postal_code_text)).check(matches(isDisplayed()));\n onView(withId(R.id.postal_code_text)).check(matches(withText(\"\")));\n onView(withId(R.id.postal_code_text)).check(isBelow(withId(R.id.mapfragment)));\n\n onView(withId(R.id.coordinates_text)).check(matches(isDisplayed()));\n onView(withId(R.id.coordinates_text)).check(matches(withText(\"5.57889,-0.23261\")));\n onView(withId(R.id.coordinates_text)).check(isBelow(withId(R.id.mapfragment)));\n\n onView(withId(R.id.distance_text)).check(matches(isDisplayed()));\n onView(withId(R.id.distance_text)).check(matches(withText(\"620.88km away\")));\n onView(withId(R.id.distance_text)).check(isBelow(withId(R.id.mapfragment)));\n\n intentsTestRule.getActivity().setRequestedOrientation(originalOrientation);\n }",
"@Test\r\n\tpublic void testNear() {\r\n\t\tlog.info(\"<<<<<<<<<<<<<<<<< testNear >>>>>>>>>>>>>>>>>>>>\");\r\n\t\t//DB db = mongo.getDB(Properties.getString(\"mongodb.db.locs\"));\r\n\t\tDBObject index = new BasicDBObject();\r\n\t\tindex.put(\"coords\", \"2dsphere\");\r\n\t\tmongoOps.getCollection(\"locations\").ensureIndex(index);\r\n\r\n\t\tList<Location> locations = locationService.findByCityAndState(\r\n\t\t\t\t\"Wheeling\", \"WV\");\r\n\r\n\t\tassertNotNull(\"locations[0] was null.\", locations.get(0));\r\n\r\n\t\tassertEquals(\"City was not correct.\", \"Wheeling\", locations.get(0)\r\n\t\t\t\t.getCity());\r\n\t\tassertEquals(\"State was not correct.\", \"WV\", locations.get(0)\r\n\t\t\t\t.getState());\r\n\t\tassertEquals(\"ZipCode was not correct.\", \"26003\", locations.get(0)\r\n\t\t\t\t.getZipCode());\r\n\r\n\t\tList<Location> locales = this.locationService.findNear(locations.get(0)\r\n\t\t\t\t.getLongitude(), locations.get(0).getLatitude(), GeoUtils\r\n\t\t\t\t.milesToMeters(5));\r\n\r\n\t\tfor (Location locale : locales) {\r\n\t\t\tlog.info(locale.toString());\r\n\t\t}\r\n\r\n\t\tassertEquals(\"City was not correct.\", \"Yorkville\", locales.get(2)\r\n\t\t\t\t.getCity());\r\n\t\tassertEquals(\"City was not correct.\", \"Glen Dale\", locales.get(14)\r\n\t\t\t\t.getCity());\r\n\t}",
"private void checkInlineQueries() throws Exceptions.OsoException, Exceptions.InlineQueryFailedError {\n Ffi.Query nextQuery = ffiPolar.nextInlineQuery();\n while (nextQuery != null) {\n if (!new Query(nextQuery, host).hasMoreElements()) {\n String source = nextQuery.source();\n throw new Exceptions.InlineQueryFailedError(source);\n }\n nextQuery = ffiPolar.nextInlineQuery();\n }\n }",
"@Test\n public void testGetNearbyFriendsInAgivenDistance02() {\n System.out.println(\"getNearbyFriendsInAgivenDistance\");\n User user = null;\n for (User user1 : sn10.getUsersList()) {\n if (user1.getNickname().equals(\"nick0\")) {\n user = user1;\n }\n }\n Double distance = 70.0;\n HashSet<User> expResult = new HashSet();\n expResult.add(new User(\"nick4\", \"[email protected]\"));\n\n HashSet<User> result = sn10.getNearbyFriendsInAgivenDistance(user, distance);\n assertFalse(expResult.equals(result));\n }",
"@Test\n\tvoid allUsersWithin50MilesOfLondon_expectResults() {\n\t\tList<User> result = locationService.filterUsersWithinDistanceOfLocation(allUserList, 50, LocationEnum.LONDON);\n\t\tassertTrue(result.size() == 3);\n\t}",
"@Test\n public void testNear()\n {\n String sName = \"near-client-listener\";\n generateEvents(sName);\n checkEvents(true, false);\n }",
"@Test\n public void testGetsAroundLocationI() throws DataSourceException, InvalidIdentifierException {\n // Get all demands from one location\n //\n Location where = new Location();\n where.setPostalCode(RobotResponder.ROBOT_POSTAL_CODE);\n where.setCountryCode(RobotResponder.ROBOT_COUNTRY_CODE);\n where = new LocationOperations().createLocation(where);\n\n ProposalOperations ops = new ProposalOperations();\n\n final Long ownerKey = 45678L;\n final Long storeKey = 78901L;\n Proposal first = new Proposal();\n first.setLocationKey(where.getKey());\n first.setOwnerKey(ownerKey);\n first.setStoreKey(storeKey);\n first = ops.createProposal(first);\n\n Proposal second = new Proposal();\n second.setLocationKey(where.getKey());\n second.setOwnerKey(ownerKey);\n second.setStoreKey(storeKey);\n second = ops.createProposal(second);\n\n first = ops.getProposal(first.getKey(), null, null);\n second = ops.getProposal(second.getKey(), null, null);\n\n List<Location> places = new ArrayList<Location>();\n places.add(where);\n\n List<Proposal> selection = ops.getProposals(places, 0);\n assertNotNull(selection);\n assertEquals(2, selection.size());\n assertTrue (selection.get(0).getKey().equals(first.getKey()) && selection.get(1).getKey().equals(second.getKey()) ||\n selection.get(1).getKey().equals(first.getKey()) && selection.get(0).getKey().equals(second.getKey()));\n // assertEquals(first.getKey(), selection.get(1).getKey()); // Should be second because of ordered by descending date\n // assertEquals(second.getKey(), selection.get(0).getKey()); // but dates are so closed that sometines first is returned first...\n }",
"private void assertDataUsageEquals(long[] dataIds, int... expectedValues) {\n if (dataIds.length != expectedValues.length) {\n throw new IllegalArgumentException(\"dataIds and expectedValues must be the same size\");\n }\n\n for (int i = 0; i < dataIds.length; i++) {\n assertDataUsageEquals(dataIds[i], expectedValues[i]);\n }\n }",
"@Test\n public void equals_SameBuyQuery_Test() {\n Assert.assertTrue(bq1.equals(bq0));\n }",
"private void assertNoStaleDataExistInNearCache(IMap<Integer, Integer> map) {\n Map<Integer, Integer> fromNearCache = getAllEntries(map);\n\n // 2. clear Near Cache\n ((NearCachedMapProxyImpl) map).getNearCache().clear();\n\n // 3. get all values when Near Cache is empty, these requests\n // will go directly to underlying IMap because Near Cache is empty\n Map<Integer, Integer> fromIMap = getAllEntries(map);\n\n for (int i = 0; i < ENTRY_COUNT; i++) {\n assertEquals(fromIMap.get(i), fromNearCache.get(i));\n }\n }",
"@Test\n public void distanceTest() {\n //Query Matrix API\n Response response = given()\n .param(\"locations\", getParameter(\"manyLocations\"))\n .param(\"sources\", \"all\")\n .param(\"destinations\",\"all\")\n .param(\"metrics\", \"distance\")\n .param(\"profile\", \"driving-car\")\n .param(\"resolve_locations\", \"true\")\n .when()\n .get(getEndPointName());\n\n String[] locations = (String[]) getParameter(\"manyLocationsArray\");\n\n Assert.assertEquals(response.getStatusCode(), 200);\n JSONObject jResponse = new JSONObject(response.body().asString());\n JSONArray jDistances = jResponse.getJSONArray(\"distances\");\n //Query Routing API 12x12 times\n for(int i = 0; i < 12; i++) {\n for (int j = 0; j < 12; j++) {\n Response response2 = given()\n .param(\"coordinates\", locations[i] + \"|\" + locations[j])\n .param(\"instructions\", \"false\")\n .param(\"preference\", getParameter(\"preference\"))\n .param(\"profile\", getParameter(\"carProfile\"))\n .when()\n .get(\"routes\");\n\n JSONObject jResponseRouting = new JSONObject(response2.body().asString());\n JSONObject jRoute = (jResponseRouting.getJSONArray(\"routes\")).getJSONObject(0);\n double routeDistance = jRoute.getJSONObject(\"summary\").getDouble(\"distance\");\n double matrixDistance = jDistances.getJSONArray(i).getDouble(j);\n Assert.assertTrue( matrixDistance - .1 < routeDistance);\n Assert.assertTrue( matrixDistance + .1 > routeDistance);\n\n }\n }\n }",
"boolean hasQueryZone();",
"private void assertGraphiteMetricIsContained(final String id) {\n assertThat(Iterables.any(graphiteMockServer.content, containsPattern(id)), is(true));\n }",
"private boolean isXpathQueryMatching(TreeWalkerAuditEvent event) {\n boolean isMatching;\n if (xpathExpression == null) {\n isMatching = true;\n }\n else {\n isMatching = false;\n final List<Item> items = getItems(event);\n for (Item item : items) {\n final AbstractNode abstractNode = (AbstractNode) item;\n isMatching = abstractNode.getTokenType() == event.getTokenType()\n && abstractNode.getLineNumber() == event.getLine()\n && abstractNode.getColumnNumber() == event.getColumnCharIndex();\n if (isMatching) {\n break;\n }\n }\n }\n return isMatching;\n }",
"@Test\n public void testInvalidAnd() {\n Query q = new Query();\n q.and(q.field(\"locality\").beginsWith(\"Los\"),\n q.within(new Circle(latitude, longitude, meters)));\n\n ReadResponse resp = factual.fetch(TABLE, q);\n assertOk(resp);\n }",
"private void check_for_t6(String[] allResultsExpected, String[] firstPackExpected, String[] secondPackExpected) { All results - We expect that we have no tags for more alarms.\n //\n RawAlarmsPack pack = dao.queryAlarms(EXISTING_ALARM.domain, EXISTING_ALARM.adapterName,\n \"0\", null, 5);\n Assert.assertArrayEquals(allResultsExpected, pack.alarmNotificationIdentifiers );\n assertThat(pack.tagOfTheNextAvailableAlarm, is(nullValue()));\n\n // First pack - We expect that we have the tag for the second pack.\n //\n RawAlarmsPack firstPack = dao.queryAlarms(EXISTING_ALARM.domain, EXISTING_ALARM.adapterName,\n \"0\", null, 2);\n Assert.assertArrayEquals( firstPackExpected, firstPack.alarmNotificationIdentifiers );\n assertThat(firstPack.tagOfTheNextAvailableAlarm, notNullValue());\n\n // Second pack - We expect that we have no tags for more alarms.\n //\n RawAlarmsPack secondPack = dao.queryAlarms(EXISTING_ALARM.domain, EXISTING_ALARM.adapterName,\n \"0\", firstPack.tagOfTheNextAvailableAlarm, 5);\n Assert.assertArrayEquals( secondPackExpected, secondPack.alarmNotificationIdentifiers );\n assertThat(secondPack.tagOfTheNextAvailableAlarm, is(nullValue()));\n }",
"@Test\n public void testBatchedInQuery() {\n TestDataCreator creator = new TestDataCreator(getSessionFactory());\n Town town = creator.createTestTown();\n\n int n = 10;\n List<Long> ids = new ArrayList<>(n);\n for (long i=0; i < n; i++) {\n Person savedPerson = creator.createTestPerson(town, \"P\" + i);\n ids.add(savedPerson.getId());\n }\n for (long i=0; i < n; i++) {\n creator.createTestPerson(town, \"P\" + i);\n }\n\n Person person = query.from(Person.class);\n query.where(person.getId()).in(ids, 2);\n\n validate(\"from Person hobj1 where hobj1.id in (:np1)\", ids);\n assertEquals(n, doQueryResult.size());\n }",
"private void checkLocation(String mapName, Set<Point> seenLocations, List<Point> wildLocations) {\n Assert.assertFalse(mapName, wildLocations.isEmpty());\n for (Point location : wildLocations) {\n Assert.assertFalse(seenLocations.contains(location));\n seenLocations.add(location);\n }\n }",
"@Test\r\n public void testGetKnownDiseaseAssociationsForMgiGeneId() {\r\n String mgiGeneId = \"MGI:95523\";\r\n\r\n Map<Disease, Set<DiseaseAssociation>> result = instance.getKnownDiseaseAssociationsForMgiGeneId(mgiGeneId);\r\n\r\n for (Disease disease : result.keySet()) {\r\n// System.out.println(disease);\r\n Set<DiseaseAssociation> diseaseAssociations = result.get(disease);\r\n if (disease.getDiseaseId().equals(\"OMIM:101200\")) {\r\n assertEquals(2, diseaseAssociations.size());\r\n }\r\n for (DiseaseAssociation diseaseAssociation : diseaseAssociations) {\r\n// System.out.println(String.format(\" %s\", diseaseAssociation));\r\n }\r\n }\r\n\r\n assertTrue(result.keySet().size() >= 11);\r\n \r\n \r\n }",
"public void testBoardAvailablePositions() {\n \tassertTrue(board6.hasAvailablePositionsForTile());\n \tList<PlacementLocation> expected = new ArrayList<PlacementLocation>();\n \tboard6.place(new Placement(Color.RED, 5, 21, Color.RED, 4, 16));\n \tboard6.place(new Placement(Color.RED, 4, 12, Color.RED, 5, 14));\n \tboard6.place(new Placement(Color.RED, 4, 8, Color.RED, 5, 11));\n \tboard6.place(new Placement(Color.RED, 5, 4, Color.RED, 4, 4));\n \tboard6.place(new Placement(Color.RED, 5, 1, Color.RED, 4, 0));\n \t\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 31)), board6.getCell(new Coordinate(5, 26))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(5, 26)), board6.getCell(new Coordinate(4, 20))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(4, 20)), board6.getCell(new Coordinate(5, 24))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(5, 24)), board6.getCell(new Coordinate(6, 29))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 29)), board6.getCell(new Coordinate(6, 30))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 30)), board6.getCell(new Coordinate(6, 31))));\n \t\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 29)), board6.getCell(new Coordinate(6, 28))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(5, 24)), board6.getCell(new Coordinate(6, 28))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(5, 24)), board6.getCell(new Coordinate(5, 23))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(5, 24)), board6.getCell(new Coordinate(4, 19))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(4, 20)), board6.getCell(new Coordinate(4, 19))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(4, 20)), board6.getCell(new Coordinate(3, 15))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(4, 20)), board6.getCell(new Coordinate(4, 21))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(5, 26)), board6.getCell(new Coordinate(4, 21))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(5, 26)), board6.getCell(new Coordinate(5, 27))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(5, 26)), board6.getCell(new Coordinate(6, 32))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 31)), board6.getCell(new Coordinate(6, 32))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 30)), board6.getCell(new Coordinate(7, 34))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 29)), board6.getCell(new Coordinate(7, 33))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 29)), board6.getCell(new Coordinate(7, 34))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 30)), board6.getCell(new Coordinate(7, 35))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 30)), board6.getCell(new Coordinate(7, 36))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 31)), board6.getCell(new Coordinate(7, 36))));\n \texpected.add(new PlacementLocation(board6.getCell(new Coordinate(6, 31)), board6.getCell(new Coordinate(7, 37))));\n \t\n \t\n \tfor (PlacementLocation location : board6.getAvailablePositionsForTile()) {\n \t\tif (!expected.contains(location))\n \t\t\tSystem.out.println(\"expected does not contain location: \" + location);\n \t}\n \tSet<PlacementLocation> locations = board6.getAvailablePositionsForTile();\n \tfor (PlacementLocation location : locations) {\n \t\tSystem.out.println(location);\n \t}\n \tfor (PlacementLocation location : expected) {\n \t\tif (!locations.contains(location))\n \t\t\tSystem.out.println(\"expected2 does not contain location: \" + location);\n \t}\n \t\n \tassertEquals(expected, board6.getAvailablePositionsForTile());\n \t\n \t\n }",
"@Test\n public void testSmallPillarNeighbors(){\n //test pillar at (0,0)\n pillar = smallPillarMap.get(Maze.position(0,0));\n pillarNeighbors = pillar.getNeighbors();\n assertEquals(2, pillarNeighbors.size());\n assertTrue(pillarNeighbors.containsKey(new Pillar(1, 0)));\n assertTrue(pillarNeighbors.containsKey(new Pillar(0, 1)));\n\n //test pillar at (1,0)\n pillar = smallPillarMap.get(Maze.position(1,0));\n pillarNeighbors = pillar.getNeighbors();\n assertEquals(3, pillarNeighbors.size());\n assertTrue(pillarNeighbors.containsKey(new Pillar(2, 0)));\n assertTrue(pillarNeighbors.containsKey(new Pillar(0, 0)));\n assertTrue(pillarNeighbors.containsKey(new Pillar(1, 1)));\n\n //test pillar at (2,0)\n pillar = smallPillarMap.get(Maze.position(2,0));\n pillarNeighbors = pillar.getNeighbors();\n assertEquals(2, pillarNeighbors.size());\n assertTrue(pillarNeighbors.containsKey(new Pillar(2, 1)));\n assertTrue(pillarNeighbors.containsKey(new Pillar(1, 0)));\n\n //test pillar at (0,1)\n pillar = smallPillarMap.get(Maze.position(0,1));\n pillarNeighbors = pillar.getNeighbors();\n assertEquals(3, pillarNeighbors.size());\n assertTrue(pillarNeighbors.containsKey(new Pillar(0, 0)));\n assertTrue(pillarNeighbors.containsKey(new Pillar(1, 1)));\n assertTrue(pillarNeighbors.containsKey(new Pillar(0, 2)));\n\n //test pillar at (1,1)\n pillar = smallPillarMap.get(Maze.position(1,1));\n pillarNeighbors = pillar.getNeighbors();\n assertEquals(4, pillarNeighbors.size());\n assertTrue(pillarNeighbors.containsKey(new Pillar(1, 2)));\n assertTrue(pillarNeighbors.containsKey(new Pillar(1, 0)));\n assertTrue(pillarNeighbors.containsKey(new Pillar(2, 1)));\n assertTrue(pillarNeighbors.containsKey(new Pillar(0, 1)));\n\n //test pillar at (2,1)\n pillar = smallPillarMap.get(Maze.position(2,1));\n pillarNeighbors = pillar.getNeighbors();\n assertEquals(3, pillarNeighbors.size());\n assertTrue(pillarNeighbors.containsKey(new Pillar(2, 2)));\n assertTrue(pillarNeighbors.containsKey(new Pillar(1, 1)));\n assertTrue(pillarNeighbors.containsKey(new Pillar(2, 0)));\n\n //test pillar at (0,2)\n pillar = smallPillarMap.get(Maze.position(0,2));\n pillarNeighbors = pillar.getNeighbors();\n assertEquals(2, pillarNeighbors.size());\n assertTrue(pillarNeighbors.containsKey(new Pillar(1, 2)));\n assertTrue(pillarNeighbors.containsKey(new Pillar(0, 1)));\n\n //test pillar at (1,2)\n pillar = smallPillarMap.get(Maze.position(1,2));\n pillarNeighbors = pillar.getNeighbors();\n assertEquals(3, pillarNeighbors.size());\n assertTrue(pillarNeighbors.containsKey(new Pillar(2, 2)));\n assertTrue(pillarNeighbors.containsKey(new Pillar(0, 2)));\n assertTrue(pillarNeighbors.containsKey(new Pillar(1, 1)));\n\n //test pillar at (2,2)\n pillar = smallPillarMap.get(Maze.position(2,2));\n pillarNeighbors = pillar.getNeighbors();\n assertEquals(2, pillarNeighbors.size());\n assertTrue(pillarNeighbors.containsKey(new Pillar(1, 2)));\n assertTrue(pillarNeighbors.containsKey(new Pillar(2, 1)));\n }",
"@Test\n public void testGetsAroundLocationII() throws InvalidIdentifierException, DataSourceException {\n // Get just one demand from one location\n //\n Location where = new Location();\n where.setPostalCode(RobotResponder.ROBOT_POSTAL_CODE);\n where.setCountryCode(RobotResponder.ROBOT_COUNTRY_CODE);\n where = new LocationOperations().createLocation(where);\n\n ProposalOperations ops = new ProposalOperations();\n\n final Long ownerKey = 45678L;\n final Long storeKey = 78901L;\n Proposal first = new Proposal();\n first.setLocationKey(where.getKey());\n first.setOwnerKey(ownerKey);\n first.setStoreKey(storeKey);\n first = ops.createProposal(first);\n\n Proposal second = new Proposal();\n second.setLocationKey(where.getKey());\n second.setOwnerKey(ownerKey);\n second.setStoreKey(storeKey);\n second = ops.createProposal(second);\n\n first = ops.getProposal(first.getKey(), null, null);\n second = ops.getProposal(second.getKey(), null, null);\n\n List<Location> places = new ArrayList<Location>();\n places.add(where);\n\n List<Proposal> selection = ops.getProposals(places, 1);\n assertNotNull(selection);\n assertEquals(1, selection.size());\n assertTrue (selection.get(0).getKey().equals(first.getKey()) ||\n selection.get(0).getKey().equals(second.getKey()));\n // assertEquals(first.getKey(), selection.get(1).getKey()); // Should be second because of ordered by descending date\n // assertEquals(second.getKey(), selection.get(0).getKey()); // but dates are so closed that sometines first is returned first...\n }",
"public void testNormalQueries()\r\n throws Exception\r\n {\r\n try\r\n {\r\n SCOMapTests.checkQuery(pmf,\r\n HashMap1.class,\r\n ContainerItem.class,\r\n rdbmsVendorID);\r\n }\r\n finally\r\n {\r\n clean(HashMap1.class);\r\n clean(ContainerItem.class);\r\n }\r\n }",
"public void testInsertReadProvider() {\n ResultDBHelper dbHelper = new ResultDBHelper(mContext);\n SQLiteDatabase db = dbHelper.getWritableDatabase();\n\n ContentValues values = TestDB.getLocationContentValues();\n\n Uri locationUri = mContext.getContentResolver().insert(ResultContract.LocationEntry.CONTENT_URI, values);\n long locationRowId = ContentUris.parseId(locationUri);\n\n // Verify we got a row back.\n assertTrue(locationRowId != -1);\n Log.d(LOG_TAG, \"New row id: \" + locationRowId);\n\n // Data's inserted. IN THEORY. Now pull some out to stare at it and verify it made\n // the round trip.\n\n // A cursor is your primary interface to the query results.\n Cursor cursor = mContext.getContentResolver().query(\n ResultContract.LocationEntry.buildLocationUri(locationRowId),\n null, // leaving \"columns\" null just returns all the columns.\n null, // cols for \"where\" clause\n null, // values for \"where\" clause\n null // sort order\n );\n\n TestDB.validateCursor(values, cursor);\n\n cursor.close();\n\n ContentValues resultValues = TestDB.getResultContentValues(locationRowId);\n Uri insertUri = mContext.getContentResolver().insert(ResultContract.ResultEntry.CONTENT_URI, resultValues);\n\n // Now see if we can successfully query if we include the row id\n Cursor resultCursor = mContext.getContentResolver().query(\n ResultContract.ResultEntry.CONTENT_URI, // Table to Query\n null, // leaving \"columns\" null just returns all the columns.\n null, // cols for \"where\" clause\n null, // values for \"where\" clause\n null // sort order\n );\n\n TestDB.validateCursor(resultValues, resultCursor);\n\n resultCursor.close();\n\n // For testing joins\n resultCursor = mContext.getContentResolver().query(\n ResultContract.ResultEntry.buildResultLocation(TEST_LATITUDE, TEST_LONGITUDE),\n null, // leaving \"columns\" null just returns all the columns.\n null, // cols for \"where\" clause\n null, // values for \"where\" clause\n null // sort order\n );\n\n TestDB.validateCursor(resultValues, resultCursor);\n\n resultCursor.close();\n\n // For testing joins\n resultCursor = mContext.getContentResolver().query(\n ResultContract.ResultEntry.buildResultLocationWithStartDate(TEST_LATITUDE, TEST_LONGITUDE, TEST_DATE),\n null, // leaving \"columns\" null just returns all the columns.\n null, // cols for \"where\" clause\n null, // values for \"where\" clause\n null // sort order\n );\n\n TestDB.validateCursor(resultValues, resultCursor);\n\n resultCursor.close();\n\n // For testing joins\n resultCursor = mContext.getContentResolver().query(\n ResultContract.ResultEntry.buildResultLocationWithDate(TEST_LATITUDE, TEST_LONGITUDE, TEST_DATE),\n null, // leaving \"columns\" null just returns all the columns.\n null, // cols for \"where\" clause\n null, // values for \"where\" clause\n null // sort order\n );\n\n TestDB.validateCursor(resultValues, resultCursor);\n\n resultCursor.close();\n\n dbHelper.close();\n }",
"@Test\n public void test02SendEvents() throws Exception{\n Event event1 = restService.registerEvent(createEvent(\"ACCOUNTS\", createMap(Object.class, \"date\", \"Yesterday\")));\n assertNotNull(event1.getId());\n Event event2 = restService.registerEvent(createEvent(\"TRANSACTIONS\", createMap(Object.class, \"date\", \"Yesterday\")));\n assertNotNull(event2.getId());\n Event event3 = restService.registerEvent(createEvent(\"PRODUCTS\", createMap(Object.class, \"date\", \"Yesterday\")));\n assertNotNull(event3.getId());\n Event event4 = restService.registerEvent(createEvent(\"ACCOUNTS\", createMap(Object.class, \"date\", \"Today\")));\n assertNotNull(event4.getId());\n Event event5 = restService.registerEvent(createEvent(\"TRANSACTIONS\", createMap(Object.class, \"date\", \"Today\")));\n assertNotNull(event5.getId());\n Event event6 = restService.registerEvent(createEvent(\"PRODUCTS\", createMap(Object.class, \"date\", \"Today\")));\n assertNotNull(event6.getId());\n Event event7 = restService.registerEvent(createEvent(\"ACCOUNTS\", createMap(Object.class, \"date\", \"Tomorrow\", \"premise\", \"PC2\")));\n assertNotNull(event7.getId());\n Event event8 = restService.registerEvent(createEvent(\"TRANSACTIONS\", createMap(Object.class, \"date\", \"Tomorrow\", \"premise\", \"PC2\")));\n assertNotNull(event8.getId());\n Event event9 = restService.registerEvent(createEvent(\"PRODUCTS\", createMap(Object.class, \"date\", \"Tomorrow\", \"premise\", \"PC2\")));\n assertNotNull(event9.getId());\n delay(10);\n\n //yesterday events\n List<CallbackData> list = restService.findCallbackInstancesBy(event1.getId(), null, null, null, 0, 0);\n// assertEquals(5, list.size());\n assertEquals(4, list.size());\n list = restService.findCallbackInstancesBy(event2.getId(), null, null, null, 0, 0);\n assertEquals(1, list.size());\n list = restService.findCallbackInstancesBy(event3.getId(), null, null, null, 0, 0);\n assertEquals(4, list.size());\n //today\n list = restService.findCallbackInstancesBy(event4.getId(), null, null, null, 0, 0);\n assertEquals(4, list.size());\n list = restService.findCallbackInstancesBy(event5.getId(), null, null, null, 0, 0);\n assertEquals(1, list.size());\n list = restService.findCallbackInstancesBy(event6.getId(), null, null, null, 0, 0);\n assertEquals(4, list.size());\n //premise\n list = restService.findCallbackInstancesBy(event7.getId(), null, null, null, 0, 0);\n assertEquals(5, list.size());\n list = restService.findCallbackInstancesBy(event8.getId(), null, null, null, 0, 0);\n assertEquals(2, list.size());\n list = restService.findCallbackInstancesBy(event9.getId(), null, null, null, 0, 0);\n assertEquals(5, list.size());\n\n //Event status check\n EventEntity evt = eventRepo.eventById(Long.parseLong(event1.getId()));\n assertEquals(evt.getStatus(), Constants.EVENT_INSTANCE_STATUS_PROCESSED);\n assertEquals(evt.getId(), Long.parseLong(event1.getId()));\n\n }",
"@Test\n public void testGetAllLocations() {\n\n Location loc1 = new Location();\n loc1.setLocationName(\"The Basement\");\n loc1.setDescription(\"Underground\");\n loc1.setAddress(\"123 nunya Ave\");\n loc1.setCity(\"Cityville USA\");\n loc1.setLatitude(123.456);\n loc1.setLongitude(123.456);\n locDao.addLocation(loc1);\n\n Location loc2 = new Location();\n loc2.setLocationName(\"The Attic\");\n loc2.setDescription(\"Above ground\");\n loc2.setAddress(\"123 nunya Ave\");\n loc2.setCity(\"HamletTown USA\");\n loc2.setLatitude(654.321);\n loc2.setLongitude(654.321);\n locDao.addLocation(loc2);\n \n List<Location> locations = locDao.getAllLocations();\n \n assertEquals(2, locations.size());\n }",
"@Test\n public void testFindDataEntryBetween() throws ConnectionException, InterruptedException {\n //adding test ProviderEntry to database\n ProviderEntry pe = MariaDbConnectorTest.instance.findProviderEntryByName(\"test\");\n ProviderEntry ppe = MariaDbConnectorTest.instance.findProviderEntryByName(\"test\");\n assertEquals(pe, ppe); // Passes if insert succeeded\n \n \n //adding test RouteEntry to database\n RouteEntry re = new RouteEntry();\n re.setName(\"test\");\n re.setDescription(\"test\");\n MariaDbConnectorTest.instance.insert(re);\n RouteEntry rre = MariaDbConnectorTest.instance.findRouteEntryByName(\"test\");\n assertEquals(re, rre); // Passes if insert has succeeded\n \n //Adding data\n Timestamp from = new Timestamp(Calendar.getInstance().getTime().getTime());\n for(int i=0; i<10; i++){\n DataEntry de = new DataEntry(i, rre, ppe);\n MariaDbConnectorTest.instance.insert(de);\n Thread.sleep(1000);\n }\n Timestamp to = new Timestamp(Calendar.getInstance().getTime().getTime());\n \n //Checking if 10 dataentries were added\n int count = MariaDbConnectorTest.instance.findDataEntryBetween(rre.getId(), ppe.getId(), from, to).size();\n assertEquals(10, count);\n \n //Cleaning up\n MariaDbConnectorTest.instance.delete(ppe);\n MariaDbConnectorTest.instance.delete(rre);\n }",
"boolean testCoords(Tester t) {\n return t.checkExpect(this.p3.xCoord(), 50) && t.checkExpect(this.p4.yCoord(), 600);\n }",
"@Test(timeout = 4000)\n public void test056() throws Throwable {\n boolean boolean0 = SQLUtil.isQuery(\"SELECT * FROM join SELECT * FROM as SELECT * FROM on SELECT * FROM .SELECT * FROM = SELECT * FROM .SELECT * FROM and SELECT * FROM .null = SELECT * FROM .null and SELECT * FROM .SELECT * FROM = SELECT * FROM .SELECT * FROM and SELECT * FROM .null = SELECT * FROM .null and SELECT * FROM .null = SELECT * FROM .null and SELECT * FROM .null = SELECT * FROM .null\");\n assertTrue(boolean0);\n }",
"private void assertDataUsageEquals(long dataId, int expectedValue) {\n // Query and assert value is expected.\n String[] projection = new String[]{ContactsContract.Data.TIMES_USED};\n String[] record = DataUtil.queryById(mResolver, dataId, projection);\n assertNotNull(record);\n long actual = 0;\n // Tread null as 0\n if (record[0] != null) {\n actual = Long.parseLong(record[0]);\n }\n assertEquals(expectedValue, actual);\n }",
"@Test\n public void testDAM31201001() {\n // In this test case the where clause is specified in a common sql shared in multiple queries.\n testDAM30505001();\n }",
"@Test\n public void testDistOverflow()\n {\n String sName = \"dist-overflow-top\";\n generateEvents(sName);\n checkEvents(false, true);\n BackingMapListener.INSTANCE.assertContext();\n }",
"@Test\n public void mapContains() {\n check(MAPCONT);\n query(MAPCONT.args(MAPNEW.args(), 1), false);\n query(MAPCONT.args(MAPENTRY.args(1, 2), 1), true);\n }",
"@Test\n\tpublic void testGetAllQuestions() {\n\t\tList<QnaQuestion> questions = questionLogic.getAllQuestions(LOCATION1_ID);\n\t\tAssert.assertEquals(5, questions.size());\n\t\tAssert.assertTrue(questions.contains(tdp.question1_location1));\n\t\tAssert.assertTrue(questions.contains(tdp.question2_location1));\n\t\tAssert.assertTrue(questions.contains(tdp.question3_location1));\n\t\tAssert.assertTrue(questions.contains(tdp.question4_location1));\n\t\tAssert.assertTrue(questions.contains(tdp.question5_location1));\n\t}",
"@Test\n void compareTo_Related_AddressMatch()\n {\n runIsMatchTest(AnswerType.no, AnswerType.yes, AnswerType.no, AnswerType.no, ContactMatchType.Related);\n }",
"private static void verifyMultipleSingleScanResults(InOrder handlerOrder, Handler handler,\n int requestId1, ScanResults results1, int requestId2, ScanResults results2,\n int listenerRequestId, ScanResults listenerResults) {\n ArgumentCaptor<Message> messageCaptor = ArgumentCaptor.forClass(Message.class);\n handlerOrder.verify(handler, times(listenerResults == null ? 4 : 5))\n .handleMessage(messageCaptor.capture());\n int firstListenerId = messageCaptor.getAllValues().get(0).arg2;\n assertTrue(firstListenerId + \" was neither \" + requestId2 + \" nor \" + requestId1,\n firstListenerId == requestId2 || firstListenerId == requestId1);\n if (firstListenerId == requestId2) {\n assertScanResultsMessage(requestId2,\n new WifiScanner.ScanData[] {results2.getScanData()},\n messageCaptor.getAllValues().get(0));\n assertSingleScanCompletedMessage(requestId2, messageCaptor.getAllValues().get(1));\n assertScanResultsMessage(requestId1,\n new WifiScanner.ScanData[] {results1.getScanData()},\n messageCaptor.getAllValues().get(2));\n assertSingleScanCompletedMessage(requestId1, messageCaptor.getAllValues().get(3));\n if (listenerResults != null) {\n assertScanResultsMessage(listenerRequestId,\n new WifiScanner.ScanData[] {listenerResults.getScanData()},\n messageCaptor.getAllValues().get(4));\n }\n } else {\n assertScanResultsMessage(requestId1,\n new WifiScanner.ScanData[] {results1.getScanData()},\n messageCaptor.getAllValues().get(0));\n assertSingleScanCompletedMessage(requestId1, messageCaptor.getAllValues().get(1));\n assertScanResultsMessage(requestId2,\n new WifiScanner.ScanData[] {results2.getScanData()},\n messageCaptor.getAllValues().get(2));\n assertSingleScanCompletedMessage(requestId2, messageCaptor.getAllValues().get(3));\n if (listenerResults != null) {\n assertScanResultsMessage(listenerRequestId,\n new WifiScanner.ScanData[] {listenerResults.getScanData()},\n messageCaptor.getAllValues().get(4));\n }\n }\n }",
"@Test\n\tpublic void insideRoomTests() {\n\t\t//Tests middle of room\n\t\tSet<BoardCell> testList = board.getAdjList(3, 11);\n\t\tassertEquals(0, testList.size());\n\t\t//Tests a room space that is next to a walkway space\n\t\ttestList = board.getAdjList(16, 10);\n\t\tassertEquals(0, testList.size());\n\n\t}",
"@Test\n void compareTo_PotentiallyRelated_AddressMightMatch()\n {\n runIsMatchTest(AnswerType.no, AnswerType.maybe, AnswerType.no, AnswerType.no,\n ContactMatchType.PotentiallyRelated);\n }",
"private void assertActiveFeedsEventually(List<Feed> knownFeeds, int expectedCount) {\n Asserts.eventually(new CountActiveSupplier(knownFeeds), Predicates.equalTo(expectedCount));\n }",
"@Test\n public void testClosePoints() {\n MapMatching mapMatching = new MapMatching(hopper, algoOptions);\n List<GPXEntry> inputGPXEntries = createRandomGPXEntries(\n new GHPoint(51.342422, 12.3613358),\n new GHPoint(51.342328, 12.3613358));\n MatchResult mr = mapMatching.doWork(inputGPXEntries);\n\n assertFalse(mr.getEdgeMatches().isEmpty());\n assertEquals(3, mr.getMatchLength(), 1);\n assertEquals(284, mr.getMatchMillis(), 1);\n }",
"public void getNearbyPlaces(double Lat, double Long)\n {\n String type=\"\";\n if(mType=='E')\n type=\"Events/\";\n else if(mType=='G')\n type=\"Groups/\";\n\n final DatabaseReference placeRef= database.getReference(type+mEntityID+\"/places\");\n final GeoFire geoFire= new GeoFire(placeRef);\n\n double R=0.05;\n placesQuery = geoFire.queryAtLocation(new GeoLocation(Lat,Long),R);\n placesQuery.addGeoQueryEventListener(new GeoQueryEventListener() {\n\n double R=1.0;\n int count=0;\n @Override\n public void onKeyEntered(String key, GeoLocation location) {\n try {\n Toast.makeText(getContext(), key+\"added\", Toast.LENGTH_SHORT).show();\n }\n catch (Exception e)\n {\n\n }\n count++;\n }\n\n @Override\n public void onKeyExited(String key) {\n\n try {\n Toast.makeText(getContext(), key+\"removed\", Toast.LENGTH_SHORT).show();\n }\n catch (Exception e)\n {\n\n }\n\n count--;\n\n }\n\n @Override\n public void onKeyMoved(String key, GeoLocation location) {\n\n }\n\n @Override\n public void onGeoQueryReady() {\n\n placesQuery.removeAllListeners();\n\n /* if (count < 2 && R < 25) {\n R += 1;\n placesQuery.setRadius(R);\n try {\n Toast.makeText(getContext(),Double.toString(R),Toast.LENGTH_SHORT).show();\n }\n catch (Exception e)\n {\n\n }\n } else if (count > 20) {\n\n R-=1;\n placesQuery.setRadius(R);\n\n }\n */\n }\n\n @Override\n public void onGeoQueryError(DatabaseError error) {\n\n }\n });\n\n\n }",
"@Test\n public void updateSeenByRadar() {\n radar.loop();\n radar.loop();\n radar.loop();\n assertTrue(radar.getObjectsSeenByRadar().stream().anyMatch(t -> t.getId().equals(\"tree_3\")));\n }",
"private void assertCountEvent(int exepectedCount, String eleementName, String json) {\n\n// System.out.println(\"debug \"+eleementName+\" \"+matchEventCount(eleementName, json));\n assertEquals(\"For event '\" + eleementName + \"' expecting count\", exepectedCount, matchEventCount(eleementName, json));\n }",
"@Test\n public void testDistanceTo() {\n System.out.println(\"Testing distanceTo() for a range of different GPS coordinates\");\n double distancesExpected[] = {\n 786.3,\n 786.3,\n 786.3,\n 786.3,\n\t\t\t102.2,\n\t\t\t102.2,\n\t\t\t102.2,\n\t\t\t102.2\n };\n\t\t\n for (int i = 0; i < this.testCoordinates.length; i++) {\n double expResult = distancesExpected[i];\n double result = this.origin.distanceTo(this.testCoordinates[i]);\n\t\t\tSystem.out.println(\"Expected: \" + expResult + \", Actual: \" + result);\n assertEquals(expResult, result, 0.1);\n }\n }",
"public void testEquals() throws Exception {\n State state1 = new State();\n state1.setCanJump(1);\n state1.setDirection(1);\n state1.setGotHit(1);\n state1.setHeight(1);\n state1.setMarioMode(1);\n state1.setOnGround(1);\n state1.setEnemiesSmall(new boolean[3]);\n state1.setObstacles(new boolean[4]);\n state1.setDistance(1);\n state1.setStuck(1);\n\n State state2 = new State();\n state2.setCanJump(1);\n state2.setDirection(1);\n state2.setGotHit(1);\n state2.setHeight(1);\n state2.setMarioMode(1);\n state2.setOnGround(1);\n state2.setEnemiesSmall(new boolean[3]);\n state2.setObstacles(new boolean[4]);\n state2.setStuck(1);\n\n State state3 = new State();\n state3.setCanJump(1);\n state3.setDirection(1);\n state3.setGotHit(1);\n state3.setHeight(1);\n state3.setMarioMode(2);\n state3.setOnGround(1);\n state3.setEnemiesSmall(new boolean[3]);\n state3.setObstacles(new boolean[4]);\n assertEquals(state1,state2);\n assertTrue(state1.equals(state2));\n assertFalse(state1.equals(state3));\n Set<State> qTable = new HashSet<State>();\n qTable.add(state1);\n qTable.add(state2);\n assertEquals(1,qTable.size());\n qTable.add(state3);\n assertEquals(2,qTable.size());\n\n }",
"@Test\n public void testQueryRepeats() {\n assertMetrics(\"absoluteProximity:0.1 proximity:1 head:0 tail:0\", \"a a a\",\"a\");\n assertMetrics(\"absoluteProximity:0.1 proximity:1 head:0 tail:0 gapLength:0\",\"a a b c c\",\"a a b c c\");\n assertMetrics(\"absoluteProximity:0.1 proximity:1 head:0 tail:0 gapLength:0\",\"a a b c c\",\"a b c\");\n assertMetrics(\"absoluteProximity:0.1 proximity:1 head:0 tail:0 gapLength:0\",\"a b a b\",\"a b a b\");\n assertMetrics(\"absoluteProximity:0.0903 proximity:0.9033 head:0 tail:0 gapLength:1\",\"a b a b\",\"a b x a b\");\n // Both terms take the same segment:\n assertMetrics(\"absoluteProximity:0.1 proximity:1 segments:2 gapLength:0 head:3 tail:18\",\"a a\",\"x x x a x x x x x x x x x x x x x x a x x x\");\n // But not when the second is preferable\n assertMetrics(\"absoluteProximity:0.1 proximity:1 segments:2 gapLength:0 head:3 tail:3\",\"a b b a\",\"x x x a b x x x x x x x x x x x x x x b a x x x\");\n\n assertMetrics(\"matches:2 fieldCompleteness:1\",\"a b b b\",\"a b\");\n }",
"boolean hasQueryAddress();",
"@Test\n public void testFreightChargeQueries() throws Exception {\n //Setup\n test = extent.createTest(\"Verify Freight Charges Queries\");\n try {\n driver.manage().timeouts().implicitlyWait(time_to_wait, TimeUnit.SECONDS);\n login.doLogin(test);\n test.log(Status.INFO, \"Clicking on Search Bar\");\n //query 1\n queryChecker.runSearchBubbleQuery(driver, \"list all charges\", test);\n test.createNode(\"list all Freight Charges verified successfully\");\n //query 2\n queryChecker.runSearchBubbleQuery(driver, \"list all charges where carrier id is fedex\", test);\n test.createNode(\"list all charges where carrier id is fedex verified successfully\");\n //query 3\n queryChecker.runSearchBubbleQuery(driver, \"list all charges where charge type is Disk and freight charges amount > 100\", test);\n test.createNode(\"list all charges where charge type is Disk and freight charges amount > 100 verified successfully\");\n //query 4\n queryChecker.runSearchBubbleQuery(driver, \"list all charges where carrier id is ups frieght\", test);\n test.createNode(\"list all charges where carrier id is ups frieght verified successfully\");\n }catch (Exception e){\n e.printStackTrace();\n }\n test.createNode(\"Verified Freight Charge Queries Successfully!\");\n }",
"@Test\r\n public void testGetAllChromInfo() throws Exception {\n assertEquals(7, queries.getAllChromInfo().size());\r\n }",
"@Test\n\tpublic void isValidQueryTest() {\n\t\tString query1 = \"< nice & cool \";\n\t\tString query2 = \"( hello & !!cool )\";\n\t\tString query3 = \"( hello | !cool )\";\n\t\t\n\t\texception.expect(IllegalArgumentException.class);\n\t\tqueryTest.isValidQuery(query1);\n\t\tqueryTest.isValidQuery(query2);\n\n\t\texception = ExpectedException.none();\n\t\tqueryTest.isValidQuery(query3);\n\n\t\t// test num of brackets\n\t\tquery1 = \"( nice & cool )\";\n\t\tquery2 = \"( ( nice & cool )\";\n\t\tquery3 = \"( hello & my | ( name | is ) | bar & ( hi )\";\n\t\t\n\t\tqueryTest.isValidQuery(query1);\n\t\texception.expect(IllegalArgumentException.class);\n\t\tqueryTest.isValidQuery(query2);\n\t\tqueryTest.isValidQuery(query3);\n\t\t\n\t\t// test phrases (+ used to indicate phrase)\n\t\tquery1 = \"hello+hi+my\";\n\t\tquery2 = \"hello+contains+my\";\n\t\tquery3 = \"( my+name & hello | ( oh my ))\";\n\t\t\n\t\texception = ExpectedException.none();\n\t\tqueryTest.isValidQuery(query1);\n\t\tqueryTest.isValidQuery(query2);\n\t\tqueryTest.isValidQuery(queryTest.fixSpacing(query3));\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n private QueryTracker queryAnswer(List<PlatformMetadata> testData)\r\n {\r\n SimpleQuery<PlatformMetadata> query = (SimpleQuery<PlatformMetadata>)EasyMock.getCurrentArguments()[0];\r\n\r\n DataModelCategory expected = new DataModelCategory(ourServer, Constants.PLATFORM_METADATA_FAMILY, ourTypeKey);\r\n assertEquals(expected, query.getDataModelCategory());\r\n assertEquals(Constants.PLATFORM_METADATA_DESCRIPTOR, query.getPropertyValueReceivers().get(0).getPropertyDescriptor());\r\n\r\n List<? extends PropertyMatcher<?>> matchers = query.getParameters();\r\n\r\n assertEquals(2, matchers.size());\r\n\r\n NumberPropertyMatcher<Long> lte = (NumberPropertyMatcher<Long>)matchers.get(0);\r\n NumberPropertyMatcher<Long> gte = (NumberPropertyMatcher<Long>)matchers.get(1);\r\n\r\n assertEquals(Constants.METADATA_TIMESTAMP_PROPERTY_DESCRIPTOR, lte.getPropertyDescriptor());\r\n assertEquals(OperatorType.LTE, lte.getOperator());\r\n assertEquals(myQueryTime, lte.getOperand().longValue());\r\n\r\n assertEquals(Constants.METADATA_TIMESTAMP_PROPERTY_DESCRIPTOR, gte.getPropertyDescriptor());\r\n assertEquals(OperatorType.GTE, gte.getOperator());\r\n assertEquals(myQueryTime - 1000, gte.getOperand().longValue());\r\n\r\n ((PropertyValueReceiver<PlatformMetadata>)query.getPropertyValueReceivers().get(0)).receive(testData);\r\n\r\n return null;\r\n }",
"@Test\n\t\t\tpublic void besidesRoomTests() {\n\t\t\t\t//Testing walkway space that is next to the kitchen with no door\n\t\t\t\tSet<BoardCell> testList = board.getAdjList(6, 1);\n\t\t\t\tassertEquals(3, testList.size());\n\t\t\t\tassertTrue(testList.contains(board.getCellAt(5, 1)));\n\t\t\t\tassertTrue(testList.contains(board.getCellAt(6, 0)));\n\t\t\t\tassertTrue(testList.contains(board.getCellAt(6, 2)));\n\t\t\t\t//Testing walkway space that is next to two kitchen spaces with no door\n\t\t\t\ttestList = board.getAdjList(6, 20);\n\t\t\t\tassertEquals(2, testList.size());\n\t\t\t\tassertTrue(testList.contains(board.getCellAt(5, 20)));\n\t\t\t\tassertTrue(testList.contains(board.getCellAt(6, 19)));\n\t\t\t\t//Testing walkway space that is between two room spaces and an edge\n\t\t\t\ttestList = board.getAdjList(20, 15);\n\t\t\t\tassertTrue(testList.contains(board.getCellAt(19, 15)));\n\t\t\t\tassertEquals(1, testList.size());\n\n\t\t\t}",
"@Test\n public void shouldFindProperLocationBasedOnDistance() {\n assertEquals(Location.B6,\n Location.findLocation(Color.RED, Location.B2, 4));\n\n assertEquals(Location.B2,\n Location.findLocation(Color.BLACK, Location.B6, 4));\n\n // moving off the board\n assertEquals(Location.B_BEAR_OFF,\n Location.findLocation(Color.BLACK, Location.B2, 4));\n assertEquals(Location.B_BEAR_OFF,\n Location.findLocation(Color.BLACK, Location.B2, 6));\n assertEquals(Location.R_BEAR_OFF,\n Location.findLocation(Color.RED, Location.R2, 6));\n\n // moving in from the bar\n assertEquals(Location.R3,\n Location.findLocation(Color.BLACK,\n Location.B_BAR, 3));\n assertEquals(Location.B6,\n Location.findLocation(Color.RED,\n Location.R_BAR, 6));\n // passing from red to black table and opposite\n assertEquals(Location.B10,\n Location.findLocation(Color.BLACK,\n Location.R10, 5));\n assertEquals(Location.R10,\n Location.findLocation(Color.RED,\n Location.B10, 5));\n }",
"@Test\n public void testNeighbors() {\n\n // Make a bigger nanoverse.runtime.geometry than the one from setUp\n Lattice lattice = new TriangularLattice();\n hex = new Hexagon(lattice, 3);\n Boundary boundary = new Arena(hex, lattice);\n Geometry geometry = new Geometry(lattice, hex, boundary);\n\n Coordinate query;\n\n // Check center\n query = new Coordinate2D(2, 2, 0);\n assertNeighborCount(6, query, geometry);\n\n // Check corner\n query = new Coordinate2D(0, 0, 0);\n assertNeighborCount(3, query, geometry);\n\n // Check side\n query = new Coordinate2D(1, 0, 0);\n assertNeighborCount(4, query, geometry);\n }",
"@Test\n public void testDistBm()\n {\n generateEvents(\"dist-bm-test\");\n checkEvents(false, true);\n BackingMapListener.INSTANCE.assertContext();\n }",
"void checkIn(int eventId, int childAdapterPosition, int parentAdapterPosition);",
"@Test\n public void testThatResultsAppearForAReturnJourney(){\n JourneyDetails journeyDetails = new JourneyDetailsBuilder().isOneWay(false).\n withOrigin(\"Bangalore\").withDestination(\"Delhi\").\n withDepartureDate(tomorrow()).withReturnDate(dayAfterTomorrow()).build();\n\n user.searchesForAReturnJourneyWith(journeyDetails);\n user.hasJourneyOptionsAvailableForTheReturnJourney();\n\n\n }",
"@Test\n public void testQueryMore1() throws Exception {\n testQueryMore(true, true);\n }",
"@Test\r\n\tpublic void testLocationCircleQuery() {\r\n\t\tlog.debug(\"<<<<<<<<<<<<<<<<< testLocationCircleQuery >>>>>>>>>>>>>>>>>>>>\");\r\n\r\n\t\t/*\r\n\t\t * List<Location> locations = locationService.findByCityAndState(\r\n\t\t * \"Wheeling\", \"WV\");\r\n\t\t */\r\n\r\n\t\tList<Location> locations = locationService\r\n\t\t\t\t.findByCityAndStateAndZipCode(\"Wheeling\", \"WV\", \"26003\");\r\n\r\n\t\tlog.debug(\"List Size: \" + locations.size());\r\n\r\n\t\tassertNotNull(\"locations[0] was null.\", locations.get(0));\r\n\r\n\t\tassertEquals(\"City was not correct.\", \"Wheeling\", locations.get(0)\r\n\t\t\t\t.getCity());\r\n\t\tassertEquals(\"State was not correct.\", \"WV\", locations.get(0)\r\n\t\t\t\t.getState());\r\n\t\tassertEquals(\"ZipCode was not correct.\", \"26003\", locations.get(0)\r\n\t\t\t\t.getZipCode());\r\n\r\n\t\t// Used to troubleshoot Location Repo\r\n\t\t/*\r\n\t\t * DBObject query = new BasicDBObject(); query.put(\"city\", \"Wheeling\");\r\n\t\t * query.put(\"state\", \"WV\");\r\n\t\t * \r\n\t\t * DBObject fields = new BasicDBObject(); fields.put(\"_id\", 0);\r\n\t\t * fields.put(\"city\", 1); fields.put(\"state\", 2);\r\n\t\t * \r\n\t\t * DBCollection collection = this.mongoOps.getCollection(\"locations\");\r\n\t\t * DBCursor cursor = collection.find(query, fields);\r\n\t\t * \r\n\t\t * log.info(cursor.size()+\"\");\r\n\t\t * \r\n\t\t * log.info(cursor.toString());\r\n\t\t * \r\n\t\t * while (cursor.hasNext()) { log.info(cursor.next().toString()); }\r\n\t\t */\r\n\r\n\t\tList<Location> locales = this.locationService\r\n\t\t\t\t.findByGeoWithin(new Circle(locations.get(0).getLongitude(),\r\n\t\t\t\t\t\tlocations.get(0).getLatitude(), 1));\r\n\r\n\t\tfor (Location locale : locales) {\r\n\t\t\tlog.info(locale.toString());\r\n\t\t}\r\n\r\n\t\tassertEquals(\"City was not correct.\", \"Aliquippa\", locales.get(0)\r\n\t\t\t\t.getCity());\r\n\t\tassertEquals(\"City was not correct.\", \"Conway\", locales.get(19)\r\n\t\t\t\t.getCity());\r\n\r\n\t}",
"@Test\n public void testRepeatedMatch() {\n assertMetrics(\"fieldCompleteness:1 queryCompleteness:0.6667 segments:1 earliness:1 gaps:1\",\n \"pizza hut pizza\",\"pizza hut\");\n }",
"public static void analyzeEventsQueriesAmounts() throws SQLException\r\n\t{\r\n\t\tStatement stat = conn.createStatement();\r\n \r\n ResultSet result = stat.executeQuery(\"SELECT * FROM fraud.afm_fraudeventrecord;\");\r\n \r\n while (result.next())\r\n {\r\n \tString event = result.getString(\"eventType\");\r\n \tString user = result.getString(\"userId\");\r\n \t\r\n \tif (\r\n \t\t\t(event.contains(\"LOAD\"))\r\n \t&& \t\t(user.equals(\"user40\"))\r\n \t\t\t\r\n \t\t\t){\r\n \tSystem.out.print(new Date(result.getInt(\"timestamp\")));\r\n \tSystem.out.print(\" User : \" + user);\r\n \tSystem.out.print(\" Event : \" + event);\r\n \t\r\n \tString recordId = result.getString(\"fraudScoreRecordId\");\r\n \t\r\n \tif (recordId != null)\r\n \t{\r\n \t\tStatement stat2 = conn.createStatement();\r\n \t\tResultSet s = stat2.executeQuery(\"SELECT * FROM fraud.afm_fraudscorerecord where recordId='\"+recordId+\"';\");\r\n \t\twhile (s.next())\r\n \t\t{\r\n \t\t\tSystem.out.print(\" Query Type: \" + s.getString(\"queryType\"));\r\n \t\t\tSystem.out.print(\" Amount: \" + s.getDouble(\"transactionAmount\"));\r\n \t\t}\r\n \t}\r\n \t\r\n \t\r\n \tSystem.out.println();\r\n \t} \t\r\n }\r\n stat.close();\r\n\t}",
"void expectMatchesAdmin(String adminSql, String user, String userSql) throws Exception;",
"@Test\n public void testQueryMore4() throws Exception {\n testQueryMore(true, false);\n }",
"@Test\n public void testGetsAroundLocationIII() throws InvalidIdentifierException, DataSourceException {\n // Get limited number of demands from many locations\n //\n LocationOperations lOps = new LocationOperations();\n ProposalOperations sOps = new ProposalOperations();\n\n Location lFirst = new Location();\n lFirst.setPostalCode(RobotResponder.ROBOT_POSTAL_CODE);\n lFirst.setCountryCode(RobotResponder.ROBOT_COUNTRY_CODE);\n lFirst = lOps.createLocation(lFirst);\n\n final Long ownerKey = 45678L;\n final Long storeKey = 78901L;\n Proposal sFirst = new Proposal();\n sFirst.setLocationKey(lFirst.getKey());\n sFirst.setOwnerKey(ownerKey);\n sFirst.setStoreKey(storeKey);\n sFirst = sOps.createProposal(sFirst);\n\n Location lSecond = new Location();\n lSecond.setPostalCode(\"H1H1H1\");\n lSecond.setCountryCode(RobotResponder.ROBOT_COUNTRY_CODE);\n lSecond = lOps.createLocation(lSecond);\n\n Proposal sSecond = new Proposal();\n sSecond.setLocationKey(lSecond.getKey());\n sSecond.setOwnerKey(ownerKey);\n sSecond.setStoreKey(storeKey);\n sOps.createProposal(sSecond);\n\n Proposal sThird = new Proposal();\n sThird.setLocationKey(lSecond.getKey());\n sThird.setOwnerKey(ownerKey);\n sThird.setStoreKey(storeKey);\n sOps.createProposal(sThird);\n\n sFirst = sOps.getProposal(sFirst.getKey(), null, null);\n sSecond = sOps.getProposal(sSecond.getKey(), null, null);\n sThird = sOps.getProposal(sThird.getKey(), null, null);\n\n List<Location> places = new ArrayList<Location>();\n places.add(lFirst);\n places.add(lSecond);\n\n List<Proposal> selection = sOps.getProposals(places, 2); // Should cut to 2 items\n assertNotNull(selection);\n assertEquals(2, selection.size());\n assertEquals(sFirst.getKey(), selection.get(0).getKey());\n // No more test because it appears sometimes sSecond comes back, sometimes sThird comes back\n // FIXME: re-insert the test for sSecond in the returned list when we're sure the issue related ordering on inherited attribute is fixed.\n }",
"boolean check(Long nodeID, int qID, GraphDatabaseService databaseService) {\n\n vertexClass vc = queryGraphNodes.get(qID);\n try(Transaction tx = databaseService.beginTx()) {\n for(int edge: vc.edges.keySet()) {\n\n boolean relExist = false;\n if(solution.containsKey(edge)) {\n // j<i condition confirmed\n Node edgeNode, otherNode;\n\n edgeNode = databaseService.getNodeById(solution.get(edge));\n otherNode = databaseService.getNodeById(nodeID);\n\n Iterable<Relationship> relationships = edgeNode.getRelationships(Direction.BOTH);\n\n Iterator <Relationship>iter = relationships.iterator();\n while (iter.hasNext()) {\n Relationship rel = iter.next();\n if(rel.getOtherNode(edgeNode).equals(otherNode))\n relExist = true;\n }\n if(!relExist)\n return false;\n }\n\n }\n tx.success();\n\n }\n\n\n return true;\n }",
"@Test\n public void testSmallSeparatedSearchDistance() throws IOException {\n Gpx gpx = xmlMapper.readValue(getClass().getResourceAsStream(\"/tour3-with-long-edge.gpx\"), Gpx.class);\n MapMatching mapMatching = new MapMatching(hopper, algoOptions);\n mapMatching.setMeasurementErrorSigma(20);\n MatchResult mr = mapMatching.doWork(gpx.trk.get(0).getEntries());\n assertEquals(Arrays.asList(\"Weinligstraße\", \"Weinligstraße\", \"Weinligstraße\",\n \"Fechnerstraße\", \"Fechnerstraße\"), fetchStreets(mr.getEdgeMatches()));\n assertEquals(mr.getGpxEntriesLength(), mr.getMatchLength(), 11); // TODO: this should be around 300m according to Google ... need to check\n assertEquals(mr.getGpxEntriesMillis(), mr.getMatchMillis(), 3000);\n }",
"private void checkDiffScanResults(KuduScanner scanner,\n int numExpectedMutations,\n int numExpectedDeletes) throws KuduException {\n int numMutations = 0;\n int numDeletes = 0;\n while (scanner.hasMoreRows()) {\n for (RowResult rowResult : scanner.nextRows()) {\n numMutations++;\n if (rowResult.isDeleted()) {\n numDeletes++;\n }\n }\n }\n assertEquals(numExpectedMutations, numMutations);\n assertEquals(numExpectedDeletes, numDeletes);\n }",
"private boolean checkPlayerActionAvailability(List<PlayerAction> playerActionList, Game game, Player player) {\n List<CompositeAction> possibleActions = player.getCharacterState().getPossibleActions(game.isFrenzy());\n return possibleActions.stream()\n // checks whether the different lists of Ids of the possible actions contain the list of Ids of the input\n .filter(composite ->\n composite.getAction().stream()\n .map(Targetable::getId)\n .collect(Collectors.toList()) // list of Ids of a particular possible action\n .containsAll\n (playerActionList.stream() // list of Ids of the input\n .map(Targetable::getId)\n .collect(Collectors.toList())))\n .anyMatch(composite -> { // checks whether among the possible actions that have the same Ids as the input, the move action has an allowed distance\n Supplier<Stream<PlayerAction>> supplier = () ->\n composite.getAction().stream()\n .filter(possiblePlayerAction -> possiblePlayerAction.getId().equals(Constants.MOVE)); // gets only the Move action\n if (supplier.get().count()==0) { // checks the presence of possible actions,\n return true; // if there is none it returns true,\n } // otherwise anyMatch would return false with no elements in the stream\n boolean res = supplier.get()\n .anyMatch(possiblePlayerAction -> { // the actual anyMatch that performs the check of the Move's distance\n MovePlayerAction mpa = playerActionList.stream()\n .filter(playerAction -> playerAction.getId().equals(Constants.MOVE))\n .map(pa -> (MovePlayerAction) pa)\n .findFirst().orElseThrow(IllegalStateException::new);\n int distance = game.getBoard().getTileTree()\n .distance(mpa.getPlayer().getCharacterState().getTile(), mpa.getMoveList().get(0));\n Logger.getGlobal().info(\"allowed distance :\" + possiblePlayerAction.getAmount());\n Logger.getGlobal().info(\"actual distance:\" + distance);\n if (possiblePlayerAction.getAmount() < distance || distance == -1) {\n // the predicate that checks the distance, if the selected tile gives a\n // greater distance then the action is not allowed\n // also checks reachability\n return false;\n }\n return true;\n });\n Logger.getGlobal().info(String.valueOf(res));\n\n if (!res) {\n addErrorMessage(MOVE_ACTION_ERROR_MESSAGE);\n } else {\n resetErrorMessages();\n }\n\n return res; // the result of the the internal anyMatch, it is returned as value of the external anyMatch\n }\n );\n }",
"private void testMediatorInvocationCounts(String table) throws AnalyticsException, InterruptedException {\n log.info(\"Checking mediator invocation count in \" + table + \" table:\");\n for (int proxyNumber = 0; proxyNumber < NUMBER_OF_PROXIES; proxyNumber++) {\n for (int mediatorNumber = 1; mediatorNumber <= NUMBER_OF_MEDIATORS; mediatorNumber++) {\n String mediatorId = \"AccuracyTestProxy_\" + proxyNumber + \"@\" + mediatorNumber + \":mediator_\" + \n mediatorNumber;\n int count = getCounts(table, TestConstants.NUMBER_OF_INVOCATION, mediatorId);\n Assert.assertEquals(count, TOTAL_REQUESTS_PER_PROXY, \"Invocation count is incorrect for mediator: \" +\n mediatorId + \" in \" + table + \" table.\");\n }\n log.info(\"AccuracyTestProxy_\" + proxyNumber + \": All mediators: Ok\");\n }\n }",
"@Override\n public boolean equals(Object o) {\n if (this == o) {\n return true;\n }\n if (!(o instanceof Query)) {\n return false;\n }\n return id != null && id.equals(((Query) o).id);\n }",
"@Test\n public void testVaticanReportMorePlayersEvent() {\n Game game = new Game(2);\n FaithTrack faithTrack1 = game.getPlayers().get(0).getFaithTrack();\n FaithTrack faithTrack2 = game.getPlayers().get(1).getFaithTrack();\n\n // entering the first vatican section\n faithTrack1.increasePos(7);\n // triggers the first vatican report\n faithTrack2.increasePos(8);\n\n // putting a sleep in order to let the dispatcher notify the subscribers\n try {\n Thread.sleep(100);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n assertEquals(2, faithTrack1.getBonusPoints()[0]);\n assertEquals(2, faithTrack2.getBonusPoints()[0]);\n }",
"public static void assertResult(\n String message, SummaSearcher searcher, String query, List<String> recordIDs) throws IOException {\n String result = search(searcher, query);\n log.debug(String.format(\"The result for query '%s' was:\\n%s\", query, result));\n // <field name=\"recordID\">foo2</field>\n int lastPos = -1;\n String lastID = null;\n for (String recordID : recordIDs) {\n int pos = result.indexOf(String.format(\"<field name=\\\"recordID\\\">%s</field>\", recordID));\n if (pos == -1) {\n fail(String.format(\"%s. The id '%s' could not be located in the result for query '%s'. \"\n + \"The result was:\\n%s\", message, recordID, query, result));\n }\n if (pos < lastPos) {\n fail(String.format(\"%s. The id '%s' was found at position %d, which is less than position %d from the \"\n + \"previous id '%s' in query '%s'. The result was:\\n%s\",\n message, recordID, pos, lastPos, lastID, query, result));\n }\n lastPos = pos;\n lastID = recordID;\n }\n }",
"@Test(timeout = 4000)\n public void test056() throws Throwable {\n boolean boolean0 = SQLUtil.isQuery(\"SELECT * FROM null WHERE delete = 'delete' AND delete = 'delete' AND delete = 'delete' AND delete = 'delete' AND delete = 'delete' AND delete = 'delete' AND delete = 'delete'\");\n assertTrue(boolean0);\n }",
"@Test\n public void moreThanOneCheckerOnToLocation() {\n\n assertTrue(game.move(Location.R1, Location.R2));\n assertTrue(game.move(Location.R1, Location.R3));\n game.nextTurn();\n // to der gerne skulle vaere lovlige og stemme med terningerne\n assertTrue(game.move(Location.R6, Location.R5));\n assertTrue(game.move(Location.R8, Location.R6));\n game.nextTurn();\n assertTrue(game.move(Location.R2, Location.R5));\n assertTrue(game.move(Location.R3, Location.R7));\n game.nextTurn();\n // der staar nu to sorte paa R4\n assertFalse(game.move(Location.R6, Location.R3));\n }",
"public void checkHits() {\n\t\t// your code here\n\t\tfor (int i = 0; i < enemyX.length; i++) {\n\t\t\tif (distance((int)xI, (int)yI, enemyX[i], enemyY[i]) <= DIAM_ENEMY/2 + DIAM_LAUNCHER/2) {\n\t\t\t}\n\t\t}\n\t}",
"public static void checkLocation(int dx, int dy, int x, int y)\n\t{\n\t\t// if the coordinate has an Event\n\t\tif(gridWorld[dx+MAX_COORDS][dy+MAX_COORDS].getEvent() != null){\n\t\t\t// As the search is a spiral then only add events until there is 5\n\t\t\tif(closestEvents.size() < 5)\n\t\t\t\tclosestEvents.add(gridWorld[dx+MAX_COORDS][dy+MAX_COORDS].getEvent());\n\t\t}\n\t\t\n\t}",
"@Test\r\n public void testFindAll() throws Exception {\r\n List<MonitoriaEntity> totalEntidades = persistence.findAll();\r\n Assert.assertEquals(data.size(), totalEntidades.size());\r\n for(MonitoriaEntity ent: totalEntidades){\r\n boolean encontro = false;\r\n for(MonitoriaEntity entity: data){\r\n if(ent.equals(entity)){\r\n encontro = true;\r\n }\r\n }\r\n Assert.assertTrue(true);\r\n }\r\n }",
"public boolean checkMeetingWithinMinutes() throws Exception {\n\n Fetcher fetcher = new Fetcher();\n fetcher.fetchAppointments(appointments);\n\n //is false if there are no appointments within 15 minutes of signing in\n boolean upcoming = false;\n\n for(int i = 0; i < appointments.size(); i++){\n\n //Add 15 minutes to the current time and store in a variable.\n LocalDateTime localPlusFifteen = current.plusMinutes(15);\n\n //Converts string to LocalDateTime and formats it to the provided formatter.\n LocalDateTime date = LocalDateTime.parse(appointments.get(i).getStart(), dateTimeFormatter);\n\n //If the provided date is greater than or equal to the current date AND is less than or equal to the current\n //date plus 15 minutes, a meeting is about to start and an alert box is triggered.\n if((date.isEqual(current) || date.isAfter(current)) && (date.isEqual(localPlusFifteen) || (date.isBefore(localPlusFifteen)))){\n\n upcoming = true;\n alerts.alertBoxInformation(\"An appointment is about to start!\\nID: \" + appointments.get(i).getAppointmentId()\n +\"\\nDate/Time: \" + appointments.get(i).getStart());\n\n }\n }\n\n //If no meetings are about to start an alert box indicates no upcoming appointments and return false.\n if(!upcoming){\n alerts.alertBoxInformation(\"There are no upcoming appointments\");\n return false;\n }\n\n return true;\n }",
"@Test\n\tpublic void sholdHaveEvents(){\n\t\tcalendar.addEvent(new Event(\"event0\", date0, date1, true),user);\n\t\tcalendar.addEvent(new Event(\"event0\", date1, date1, false), user);\n\t\tassertEquals(calendar.getAllEvents(user).size(), 2);\n\t\t\n\t}",
"@Test\n\tpublic void canFindDistilleryByRegion(){\n\t\tassertEquals(3, distilleryRepository.getByRegion(\"Highland\").size());\n\t}",
"@Test\n public void myNeighboursList_shouldNotBeEmpty() {\n // First scroll to the position that needs to be matched and click on it.\n onView(allOf(withId(R.id.list_neighbours),isDisplayed()))\n .check(matches(hasMinimumChildCount(1)));\n }",
"@Test\n public void testHandleInspectAddresses() {\n final List<Long> addresses = LongStream.rangeClosed(1L, 16L).boxed().collect(Collectors.toList());\n final List<Long> expectedEmpty = addresses.stream()\n .filter(address -> address > 9L).collect(Collectors.toList());\n\n RequestMsg request = getRequestMsg(\n getBasicHeader(ClusterIdCheck.CHECK, EpochCheck.CHECK),\n getInspectAddressesRequestMsg(addresses)\n );\n\n addresses.forEach(address -> when(mStreamLog.contains(address)).thenReturn(address < 10L));\n ArgumentCaptor<ResponseMsg> responseCaptor = ArgumentCaptor.forClass(ResponseMsg.class);\n logUnitServer.handleMessage(request, mChannelHandlerContext, mServerRouter);\n\n // Assert that the payload has an INSPECT_ADDRESSES response and that the\n // base header fields have remained the same.\n verify(mServerRouter).sendResponse(responseCaptor.capture(), eq(mChannelHandlerContext));\n ResponseMsg response = responseCaptor.getValue();\n assertTrue(compareBaseHeaderFields(request.getHeader(), response.getHeader()));\n assertTrue(response.getPayload().hasInspectAddressesResponse());\n\n // Assert that the response contains the expected addresses.\n assertEquals(expectedEmpty, response.getPayload().getInspectAddressesResponse().getEmptyAddressList());\n }",
"@Test\n public void testDistBoth()\n {\n generateEvents(\"dist-both-test\");\n checkEvents(true, true);\n BackingMapListener.INSTANCE.assertContext();\n }",
"@Test\n public void testNearBack()\n {\n String sName = \"near-back-listener\";\n generateEvents(sName);\n checkEvents(false, true);\n BackingMapListener.INSTANCE.assertContext();\n }",
"public boolean hasEqualMediaQueries(MSelector otherSelector)\n\t{\n\t\tList<MediaQuery> commonQueries = findCommonMediaQueries(otherSelector);\n\t\treturn _mediaQueries.containsAll(commonQueries) && commonQueries.containsAll(_mediaQueries);\n\t}",
"@Test\n\tpublic void testUpdatesSeeds() {\n\t\t//Arrange\n\t\tint startLoc[] = new int[]{2};\n\t\tint otherLocs[] = new int[]{0,1,3,4};\n\t\t\t\n\t\tMockito.when(randMock.generateRandomNumber(1, 4, seed)).thenReturn(startLoc);\n\t\tMockito.when(randMock.generateRandomNumber(10, 5, seed+1)).thenReturn(otherLocs);\n\t\t\t\n\t\t//Act\n\t\tlong seed = 2;\n\t\t\t\n\t\t//Assert\n\t\tassertEquals(seed, iteratorObj.startVisits());\n\t}",
"@Test\n public void testQuery() throws Exception {\n\n // Create a second requirement on CHECK 1\n EventKey lReq2Event = new EventKey( 4650, 999 );\n EvtEventTable lEvtEvent = EvtEventTable.create( lReq2Event );\n lEvtEvent.setEventSdesc( \"requirement 2 on check 1\" );\n lEvtEvent.setHEvent( StationCapacityData.Check.CHECK_ON_AIRCRAFT_1_ON_DAY_1.getEventKey() );\n lEvtEvent.setNhEvent( StationCapacityData.Check.CHECK_ON_AIRCRAFT_1_ON_DAY_1.getEventKey() );\n lEvtEvent.setHistBool( false );\n lEvtEvent.insert();\n\n TaskKey lReq2Task = new TaskKey( lReq2Event );\n SchedStaskTable lSchedStask = SchedStaskTable.create( lReq2Task );\n lSchedStask.setTaskClass( RefTaskClassKey.REQ );\n lSchedStask.insert();\n\n // Associate loose JIC tasks with labour requirements to a check\n StationCapacityData.assignTaskToCheck(\n StationCapacityData.Task.Labour.TASK_WITH_AVAILABLE_LABOUR_ON_DAY_1,\n StationCapacityData.Check.CHECK_ON_AIRCRAFT_1_ON_DAY_1,\n StationCapacityData.Check.CHECK_ON_AIRCRAFT_1_ON_DAY_1_REQUIREMENT );\n StationCapacityData.assignTaskToCheck(\n StationCapacityData.Task.Labour.TASK_WITH_UNAVAILABLE_LABOUR_ON_DAY_1,\n StationCapacityData.Check.CHECK_ON_AIRCRAFT_1_ON_DAY_1,\n StationCapacityData.Check.CHECK_ON_AIRCRAFT_1_ON_DAY_1_REQUIREMENT );\n StationCapacityData.assignTaskToCheck(\n StationCapacityData.Task.Labour.TASK_WITH_WARNING_LABOUR_ON_DAY_1,\n StationCapacityData.Check.CHECK_ON_AIRCRAFT_1_ON_DAY_1, lReq2Task );\n\n // Execute the query\n DataSet lDs = execute( StationCapacityData.Location.YOW_LINE, StationCapacityData.DAY_DT_1 );\n\n // Ensure five are returned - the table will have two labour skills for the check, two labour\n // rows for requirement 1 and one labour row for requirement 2\n\n MxAssert.assertEquals( \"Number of retrieved rows\", 5, lDs.getRowCount() );\n\n // Assert that the contents of the 4 rows\n assertRow( lDs, StationCapacityData.Check.CHECK_ON_AIRCRAFT_1_ON_DAY_1, RefLabourSkillKey.ENG,\n 21.0 );\n assertRow( lDs, StationCapacityData.Check.CHECK_ON_AIRCRAFT_1_ON_DAY_1, RefLabourSkillKey.LBR,\n 5.0 );\n assertRow( lDs, StationCapacityData.Check.CHECK_ON_AIRCRAFT_1_ON_DAY_1_REQUIREMENT,\n RefLabourSkillKey.ENG, 12.0 );\n assertRow( lDs, StationCapacityData.Check.CHECK_ON_AIRCRAFT_1_ON_DAY_1_REQUIREMENT,\n RefLabourSkillKey.LBR, 5.0 );\n assertRow( lDs, lReq2Task, RefLabourSkillKey.ENG, 9.0 );\n\n // unassign the jobcards from the requirement\n StationCapacityData.unassignTaskFromCheck(\n StationCapacityData.Task.Labour.TASK_WITH_AVAILABLE_LABOUR_ON_DAY_1 );\n StationCapacityData.unassignTaskFromCheck(\n StationCapacityData.Task.Labour.TASK_WITH_UNAVAILABLE_LABOUR_ON_DAY_1 );\n StationCapacityData.unassignTaskFromCheck(\n StationCapacityData.Task.Labour.TASK_WITH_WARNING_LABOUR_ON_DAY_1 );\n\n // Delete the second requirement\n lSchedStask.delete();\n lEvtEvent.delete();\n }",
"boolean hasQueryId();",
"boolean hasQueryId();",
"void findMatchings(boolean isProtein) {\n\n GraphDatabaseFactory dbFactory = new GraphDatabaseFactory();\n HashSet<String > searchSpaceList = new HashSet<>();\n GraphDatabaseService databaseService = dbFactory.newEmbeddedDatabase(graphFile);\n for (int id: queryGraphNodes.keySet()) {\n if(isProtein)\n searchSpaceList.add(queryGraphNodes.get(id).label);\n else\n searchSpaceList.add(String.valueOf(queryGraphNodes.get(id).labels.get(0)));\n }\n for(String x: searchSpaceList) {\n ResourceIterator<Node> xNodes;\n try(Transaction tx = databaseService.beginTx()) {\n xNodes = databaseService.findNodes(Label.label(x));\n tx.success();\n }\n\n while (xNodes.hasNext()) {\n Node node = xNodes.next();\n if (searchSpaceProtein.containsKey(x))\n searchSpaceProtein.get(x).add(node.getId());\n else {\n HashSet<Long> set = new HashSet<>();\n set.add(node.getId());\n searchSpaceProtein.put(x, set);\n }\n }\n\n }\n\n if(isProtein)\n search(0, databaseService, true);\n else\n search(0, databaseService, false);\n databaseService.shutdown();\n }",
"@Test\n\tvoid londonUsersWithin50Miles_expectNoResults() {\n\t\tList<User> result = locationService.filterUsersWithinDistanceOfLocation(londonUsersList, 50, LocationEnum.LONDON);\n\t\tassertTrue(result.size() == 0);\n\t}",
"@Test\n public void testCanIrrigateWhenOneCloseTileIsOcean(){\n \tAgendaEventListener ael = mock( AgendaEventListener.class );\n \tksession.addEventListener( ael );\n \t\n \t// prepare test data\n \t\n \tPlayerDTO player = getPlayer(11L, \"honza\");\n \tTileDTO tile = getTile(3L, 3L,3L,\"forest\", new HashSet<String>());\n\t\ttile.setDefenseBonus(50);\n\t\t\n\t\tUnitDTO unit = getUnit(\"phalanx\",tile.getId());\n\t\tunit.setOwner(player.getId());\n\t\tunit.getActions().add(\"irrigation\");\n\t\t// tile with ocean\n\t\tTileDTO tile2 = getTile(4L,3L,4L, \"ocean\", new HashSet<String>());\n\t\ttile2.setDefenseBonus(0);\n\t\t// cost of improvement irrigation is two turns, so action will last 2 turns\n\t\tTileImprovementDTO irrigation = getTileImp(\"irrigation\",2);\n\t\t\n\t\t// insert facts\n\t\tgame.insert(tile);\n\t\tgame.insert(tile2);\n\t\tgame.insert(irrigation);\n\t\tgame.insert(getUnitType(\"phalanx\"));\n\t\t\n\t\tgame.insert(player);\n\t\t\n\t\tgame.insert(unit);\n\t\t\n\t\tgame.unitBeginAction(unit.getId(), \"irrigation\");\n\t\t\n\t\t// new turn\n\t\tksession.getEntryPoint(\"GameControlStream\").insert(new TurnEvent());\n\t\tksession.fireAllRules();\n\t\t\n\t\t// new turn\n\t\tksession.getEntryPoint(\"GameControlStream\").insert(new TurnEvent());\n\t\tksession.fireAllRules();\n\t\t\n\t\t// get fired rules\n\t\tArgumentCaptor<AfterMatchFiredEvent> aafe = ArgumentCaptor.forClass( AfterMatchFiredEvent.class );\n\t\tverify( ael ,atLeastOnce()).afterMatchFired( aafe.capture() );\n\t\tList<String> firedRules = getFiredRules(aafe.getAllValues());\n\t\t// rule \"Build Improvement\" did fire\n\t\tAssert.assertTrue(\"Build Improvement Rule fired.\",firedRules.contains(\"Build Improvement\"));\n\t\tAssert.assertTrue(\"Process Build Improvement completed.\",tile.getImprovements().contains(\"irrigation\"));\n\t\tAssert.assertNull(\"Current action should change to null\", unit.getCurrentAction());\n }"
] | [
"0.57598406",
"0.56444526",
"0.54938644",
"0.5455396",
"0.53801197",
"0.5370869",
"0.53538597",
"0.5321831",
"0.5299498",
"0.52779925",
"0.5251142",
"0.52405876",
"0.51660985",
"0.51474655",
"0.51260686",
"0.5091775",
"0.5066142",
"0.5063292",
"0.5055531",
"0.50350434",
"0.50230515",
"0.5011658",
"0.50026137",
"0.4984731",
"0.49813288",
"0.49446613",
"0.49366558",
"0.49140528",
"0.49120498",
"0.4878681",
"0.48584265",
"0.4830582",
"0.4830226",
"0.481193",
"0.48102263",
"0.4792616",
"0.47855002",
"0.4781143",
"0.47680506",
"0.476469",
"0.4760391",
"0.47580886",
"0.4757997",
"0.47368717",
"0.4734261",
"0.472529",
"0.47247633",
"0.47193563",
"0.46954435",
"0.46929213",
"0.4691165",
"0.4690051",
"0.46883222",
"0.46860376",
"0.4684339",
"0.4673942",
"0.466529",
"0.46645132",
"0.46570516",
"0.4653904",
"0.4653815",
"0.46532845",
"0.46511436",
"0.46496153",
"0.46488726",
"0.46475124",
"0.46467906",
"0.46373537",
"0.46370828",
"0.46369797",
"0.46348602",
"0.46330154",
"0.46325245",
"0.46320552",
"0.46282613",
"0.46203947",
"0.46202898",
"0.46194774",
"0.46152613",
"0.46143302",
"0.4608281",
"0.46055952",
"0.46041125",
"0.4600782",
"0.45955867",
"0.4594389",
"0.45881855",
"0.45836708",
"0.45819587",
"0.4580035",
"0.4576926",
"0.457437",
"0.45702907",
"0.45586213",
"0.4558451",
"0.45541254",
"0.45541254",
"0.45540112",
"0.45465136",
"0.45453092"
] | 0.6821783 | 0 |
When a criteria is null, it should not be used in a query. | @Test
public void testNullCriteria() throws Exception {
EventQuery query = null;
Date time = new Date();
BigDecimal latitude = new BigDecimal("34");
BigDecimal longitude = new BigDecimal("-118");
BigDecimal depth = new BigDecimal("1.32");
BigDecimal magnitude = new BigDecimal("4.5");
String network = "net";
// null location criteria
testAssociator.setNearbyCriteria(new EventComparison(
BigDecimal.ONE, null, BigDecimal.ONE, BigDecimal.ONE));
testAssociator.getNearbyEvents(time, latitude, longitude, depth, magnitude, null);
query = testService.lastQuery;
Assert.assertNotNull("starttime", query.getStartTime());
Assert.assertNotNull("endtime", query.getEndTime());
Assert.assertNull("no longitude", query.getLongitude());
Assert.assertNull("no latitude", query.getLatitude());
Assert.assertNull("no maxradius", query.getMaxRadius());
Assert.assertNotNull("mindepth", query.getMinDepth());
Assert.assertNotNull("maxdepth", query.getMaxDepth());
Assert.assertNotNull("minmagnitude", query.getMinMagnitude());
Assert.assertNotNull("maxmagnitude", query.getMaxMagnitude());
Assert.assertNull("catalog", query.getCatalog());
// do opposite
testAssociator.setNearbyCriteria(new EventComparison(
null, BigDecimal.ONE, null, null));
testAssociator.getNearbyEvents(time, latitude, longitude, depth, magnitude, network);
query = testService.lastQuery;
Assert.assertNull("no starttime", query.getStartTime());
Assert.assertNull("no endtime", query.getEndTime());
Assert.assertNotNull("longitude", query.getLongitude());
Assert.assertNotNull("latitude", query.getLatitude());
Assert.assertNotNull("maxradius", query.getMaxRadius());
Assert.assertNull("no mindepth", query.getMinDepth());
Assert.assertNull("no maxdepth", query.getMaxDepth());
Assert.assertNull("no minmagnitude", query.getMinMagnitude());
Assert.assertNull("no maxmagnitude", query.getMaxMagnitude());
Assert.assertNotNull("catalog", query.getCatalog());
// with location criteria and partial location
testAssociator.setNearbyCriteria(new EventComparison(
BigDecimal.ONE, BigDecimal.ONE, null, null));
testAssociator.getNearbyEvents(time, null, longitude, depth, magnitude, null);
query = testService.lastQuery;
Assert.assertNull("no longitude", query.getLongitude());
Assert.assertNull("no latitude", query.getLatitude());
Assert.assertNull("no maxradius", query.getMaxRadius());
testAssociator.getNearbyEvents(time, latitude, null, depth, magnitude, null);
query = testService.lastQuery;
Assert.assertNull("no longitude", query.getLongitude());
Assert.assertNull("no latitude", query.getLatitude());
Assert.assertNull("no maxradius", query.getMaxRadius());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void testNotIsNullCriteria() throws Exception {\n String sql = \"Select a From db.g Where Not a IS NULL\";\n Node fileNode = sequenceSql(sql, TSQL_QUERY);\n\n Node queryNode = verify(fileNode, Query.ID, Query.ID);\n\n Node selectNode = verify(queryNode, Query.SELECT_REF_NAME, Select.ID);\n verifyElementSymbol(selectNode, Select.SYMBOLS_REF_NAME, \"a\");\n\n Node fromNode = verify(queryNode, Query.FROM_REF_NAME, From.ID);\n verifyUnaryFromClauseGroup(fromNode, From.CLAUSES_REF_NAME, \"db.g\");\n\n Node notCriteriaNode = verify(queryNode, Query.CRITERIA_REF_NAME, NotCriteria.ID);\n \n Node isNullCriteriaNode = verify(notCriteriaNode, NotCriteria.CRITERIA_REF_NAME, IsNullCriteria.ID);\n verifyElementSymbol(isNullCriteriaNode, IsNullCriteria.EXPRESSION_REF_NAME, \"a\");\n \n verifySql(\"SELECT a FROM db.g WHERE NOT (a IS NULL)\", fileNode);\n }",
"@Override\n\tpublic CriteriaBuilder getCriteriaBuilder() {\n\t\treturn null;\n\t}",
"@Test\n public void testIsNullCriteria2() throws Exception {\n String sql = \"Select a From db.g Where a IS NOT NULL\";\n Node fileNode = sequenceSql(sql, TSQL_QUERY);\n\n Node queryNode = verify(fileNode, Query.ID, Query.ID);\n\n Node selectNode = verify(queryNode, Query.SELECT_REF_NAME, Select.ID);\n verifyElementSymbol(selectNode, Select.SYMBOLS_REF_NAME, \"a\");\n\n Node fromNode = verify(queryNode, Query.FROM_REF_NAME, From.ID);\n verifyUnaryFromClauseGroup(fromNode, From.CLAUSES_REF_NAME, \"db.g\");\n\n Node criteriaNode = verify(queryNode, Query.CRITERIA_REF_NAME, IsNullCriteria.ID);\n verifyElementSymbol(criteriaNode, IsNullCriteria.EXPRESSION_REF_NAME, \"a\");\n verifyProperty(criteriaNode, IsNullCriteria.NEGATED_PROP_NAME, true);\n \n verifySql(\"SELECT a FROM db.g WHERE a IS NOT NULL\", fileNode);\n }",
"@Test\n public void testIsNullCriteria1() throws Exception {\n String sql = \"Select a From db.g Where a IS NULL\";\n Node fileNode = sequenceSql(sql, TSQL_QUERY);\n\n Node queryNode = verify(fileNode, Query.ID, Query.ID);\n\n Node selectNode = verify(queryNode, Query.SELECT_REF_NAME, Select.ID);\n verifyElementSymbol(selectNode, Select.SYMBOLS_REF_NAME, \"a\");\n\n Node fromNode = verify(queryNode, Query.FROM_REF_NAME, From.ID);\n verifyUnaryFromClauseGroup(fromNode, From.CLAUSES_REF_NAME, \"db.g\");\n\n Node criteriaNode = verify(queryNode, Query.CRITERIA_REF_NAME, IsNullCriteria.ID);\n verifyElementSymbol(criteriaNode, IsNullCriteria.EXPRESSION_REF_NAME, \"a\");\n \n verifySql(\"SELECT a FROM db.g WHERE a IS NULL\", fileNode);\n }",
"@Test\n\tpublic void basic_courses_without_students(){\n\t\t\n\t\tCriteriaBuilder criteriaBuilder = em.getCriteriaBuilder();\n\t\tCriteriaQuery<Course> criteriaQuery = criteriaBuilder.createQuery(Course.class);\n\t\t\n\t\t//2. Define root tables which are involved into query\n\t\tRoot<Course> courseRoot = criteriaQuery.from(Course.class);\t\t\n\n\t\t//3. Define predicate using criteria builder\n\t\tPredicate isEmptyStudentPredicate = criteriaBuilder.isEmpty(courseRoot.get(\"students\"));\n\t\t\n\t\t//4. Add predictes to the criteria query\n\t\tcriteriaQuery.where(isEmptyStudentPredicate);\n\t\t\n\t\t//5. Defined Typed Query\n\t\tTypedQuery<Course> query = em.createQuery(criteriaQuery.select(courseRoot));\n\t\t\n\t\tList<Course> resultList = query.getResultList();\n\t\t\n\t\tlogger.info(\"isEMPTY STUDENT COURSES ==> {}\", resultList);\n\t\t\t\n\t\t\n\t}",
"@Override\n public Criteria getCriteria() {\n //region your codes 2\n return null;\n //endregion your codes 2\n }",
"boolean isCriterionSpecified();",
"@Override\n\tpublic <T> TypedQuery<T> createQuery(CriteriaQuery<T> criteriaQuery) {\n\t\treturn null;\n\t}",
"private String bindNull() {\n String op;\n \n if (operator == null) {\n op = null;\n } else if (operator.equals(\"=\")) {\n op = \"IS\";\n } else if (operator.equals(\"!=\")) {\n op = \"IS NOT\";\n } else {\n op = operator;\n }\n if (column != null && skipNulls) {\n return \"1 = 1\";\n } else {\n return cond(column, op, \"NULL\");\n }\n }",
"public void clear() {\n\t\toredCriteria.clear();\n\t}",
"public void clear() {\n\t\toredCriteria.clear();\n\t}",
"public void clear() {\r\n\t\toredCriteria.clear();\r\n\t}",
"public void clear() {\r\n\t\toredCriteria.clear();\r\n\t}",
"public void clear() {\r\n\t\toredCriteria.clear();\r\n\t}",
"public void clear() {\r\n\t\toredCriteria.clear();\r\n\t}",
"public void clear() {\n oredCriteria.clear();\n }",
"@Override\n public String whetherDisabled(Where where) {\n return null;\n }",
"public void clear() {\r\n oredCriteria.clear();\r\n }",
"protected TableCommandRequestQueryCriteria() {\r\n\t\tthis(null, null);\r\n\t}",
"public void setCriteria(String criteria) {\r\n\t\tthis.criteria = criteria;\r\n\t}",
"boolean not_query(DiagnosticChain diagnostics, Map<Object, Object> context);",
"public void testFieldMatchCriteriaNullField() {\r\n try {\r\n new FieldMatchCriteria(null, \"str\");\r\n fail(\"testFieldMatchCriteriaNullField is failure.\");\r\n } catch (IllegalArgumentException iae) {\r\n // pass\r\n } catch (Exception e) {\r\n fail(\"testFieldMatchCriteriaNullField is failure.\");\r\n }\r\n }",
"default CriteriaContainer or(Criteria... criteria) {\n return legacyOperation();\n }",
"public void clear() {\n oredCriteria.clear();\n }",
"public void clear() {\n oredCriteria.clear();\n }",
"public void clear() {\n oredCriteria.clear();\n }",
"public void clear() {\n oredCriteria.clear();\n }",
"public void clear() {\n oredCriteria.clear();\n }",
"public void clear() {\n oredCriteria.clear();\n }",
"public void clear() {\r\n oredCriteria.clear();\r\n }",
"public void clear() {\r\n oredCriteria.clear();\r\n }",
"public void clear() {\r\n oredCriteria.clear();\r\n }",
"public void clear() {\r\n oredCriteria.clear();\r\n }",
"public void clear() {\r\n oredCriteria.clear();\r\n }",
"public void clear() {\r\n oredCriteria.clear();\r\n }",
"public void or(Criteria criteria) {\r\n oredCriteria.add(criteria);\r\n }",
"public void or(Criteria criteria) {\r\n oredCriteria.add(criteria);\r\n }",
"public void or(Criteria criteria) {\r\n oredCriteria.add(criteria);\r\n }",
"public void or(Criteria criteria) {\r\n oredCriteria.add(criteria);\r\n }",
"public void or(Criteria criteria) {\r\n oredCriteria.add(criteria);\r\n }",
"public void or(Criteria criteria) {\r\n oredCriteria.add(criteria);\r\n }",
"public void or(Criteria criteria) {\r\n oredCriteria.add(criteria);\r\n }",
"public void or(Criteria criteria) {\r\n oredCriteria.add(criteria);\r\n }",
"public void or(Criteria criteria) {\r\n oredCriteria.add(criteria);\r\n }",
"public void or(Criteria criteria) {\r\n oredCriteria.add(criteria);\r\n }",
"public void or(Criteria criteria) {\r\n oredCriteria.add(criteria);\r\n }",
"public void or(Criteria criteria) {\r\n oredCriteria.add(criteria);\r\n }",
"public void or(Criteria criteria) {\r\n oredCriteria.add(criteria);\r\n }",
"public void or(Criteria criteria) {\r\n oredCriteria.add(criteria);\r\n }",
"public void or(Criteria criteria) {\r\n oredCriteria.add(criteria);\r\n }",
"public void or(Criteria criteria) {\r\n oredCriteria.add(criteria);\r\n }",
"public void or(Criteria criteria) {\r\n oredCriteria.add(criteria);\r\n }",
"public void or(Criteria criteria) {\r\n oredCriteria.add(criteria);\r\n }",
"public void or(Criteria criteria) {\r\n oredCriteria.add(criteria);\r\n }",
"public void or(Criteria criteria) {\r\n oredCriteria.add(criteria);\r\n }",
"public void or(Criteria criteria) {\r\n oredCriteria.add(criteria);\r\n }",
"public void or(Criteria criteria) {\r\n oredCriteria.add(criteria);\r\n }",
"public void or(Criteria criteria) {\r\n oredCriteria.add(criteria);\r\n }",
"public void or(Criteria criteria) {\r\n\t\toredCriteria.add(criteria);\r\n\t}",
"public void or(Criteria criteria) {\r\n\t\toredCriteria.add(criteria);\r\n\t}",
"public void or(Criteria criteria) {\r\n\t\toredCriteria.add(criteria);\r\n\t}",
"public void or(Criteria criteria) {\r\n\t\toredCriteria.add(criteria);\r\n\t}",
"public void or(Criteria criteria) {\r\n\t\toredCriteria.add(criteria);\r\n\t}",
"public void or(Criteria criteria) {\r\n\t\toredCriteria.add(criteria);\r\n\t}",
"public void or(Criteria criteria) {\r\n\t\toredCriteria.add(criteria);\r\n\t}",
"public void or(Criteria criteria) {\r\n\t\toredCriteria.add(criteria);\r\n\t}",
"public void or(Criteria criteria) {\r\n\t\toredCriteria.add(criteria);\r\n\t}",
"boolean isNullOmittable();",
"public void or(Criteria criteria) {\n oredCriteria.add(criteria);\n }",
"public void or(Criteria criteria) {\n oredCriteria.add(criteria);\n }",
"public Query not() {\n builder.negateQuery();\n return this;\n }",
"public void or(Criteria criteria) {\n oredCriteria.add(criteria);\n }",
"public void or(Criteria criteria) {\n oredCriteria.add(criteria);\n }",
"public void or(Criteria criteria) {\n oredCriteria.add(criteria);\n }",
"public void or(Criteria criteria) {\n oredCriteria.add(criteria);\n }",
"public void or(Criteria criteria) {\n oredCriteria.add(criteria);\n }",
"public void or(Criteria criteria) {\n oredCriteria.add(criteria);\n }",
"public void or(Criteria criteria) {\n oredCriteria.add(criteria);\n }",
"public void or(Criteria criteria) {\n oredCriteria.add(criteria);\n }",
"public void or(Criteria criteria) {\n oredCriteria.add(criteria);\n }",
"public void or(Criteria criteria) {\n oredCriteria.add(criteria);\n }",
"public void or(Criteria criteria) {\n oredCriteria.add(criteria);\n }",
"public void or(Criteria criteria) {\n oredCriteria.add(criteria);\n }",
"public void or(Criteria criteria) {\n oredCriteria.add(criteria);\n }",
"public void or(Criteria criteria) {\n oredCriteria.add(criteria);\n }",
"public void or(Criteria criteria) {\n oredCriteria.add(criteria);\n }",
"public void or(Criteria criteria) {\n oredCriteria.add(criteria);\n }",
"public void or(Criteria criteria) {\n oredCriteria.add(criteria);\n }",
"public void or(Criteria criteria) {\n oredCriteria.add(criteria);\n }",
"public void or(Criteria criteria) {\n oredCriteria.add(criteria);\n }",
"public void or(Criteria criteria) {\n oredCriteria.add(criteria);\n }",
"public void or(Criteria criteria) {\n oredCriteria.add(criteria);\n }",
"public void or(Criteria criteria) {\n oredCriteria.add(criteria);\n }",
"public void or(Criteria criteria) {\n oredCriteria.add(criteria);\n }",
"public void or(Criteria criteria) {\n oredCriteria.add(criteria);\n }",
"public void or(Criteria criteria) {\n oredCriteria.add(criteria);\n }",
"public void or(Criteria criteria) {\n oredCriteria.add(criteria);\n }",
"public void or(Criteria criteria) {\n oredCriteria.add(criteria);\n }",
"public void or(Criteria criteria) {\n oredCriteria.add(criteria);\n }",
"public void or(Criteria criteria) {\n oredCriteria.add(criteria);\n }"
] | [
"0.65104944",
"0.6111943",
"0.60311836",
"0.59747124",
"0.5923899",
"0.58883536",
"0.5803454",
"0.56602085",
"0.5635744",
"0.5621694",
"0.5621694",
"0.5609602",
"0.5609602",
"0.5609602",
"0.5609602",
"0.55766857",
"0.5571523",
"0.5521336",
"0.55155635",
"0.54997927",
"0.54991955",
"0.5483389",
"0.5482208",
"0.5471023",
"0.5471023",
"0.5471023",
"0.5471023",
"0.5471023",
"0.5471023",
"0.54593045",
"0.54593045",
"0.54593045",
"0.54593045",
"0.54593045",
"0.54593045",
"0.5422111",
"0.54156536",
"0.54156536",
"0.54156536",
"0.54156536",
"0.54156536",
"0.54156536",
"0.54156536",
"0.54156536",
"0.54156536",
"0.54156536",
"0.54156536",
"0.54156536",
"0.54156536",
"0.54156536",
"0.54156536",
"0.54156536",
"0.54156536",
"0.54156536",
"0.54156536",
"0.54156536",
"0.54156536",
"0.54156536",
"0.540985",
"0.540985",
"0.540985",
"0.540985",
"0.540985",
"0.540985",
"0.540985",
"0.540985",
"0.540985",
"0.53990835",
"0.538587",
"0.538587",
"0.53855926",
"0.5372864",
"0.5372864",
"0.5372864",
"0.5372864",
"0.5372864",
"0.5372864",
"0.5372864",
"0.5372864",
"0.5372864",
"0.5372864",
"0.5372864",
"0.5372864",
"0.5372864",
"0.5372864",
"0.5372864",
"0.5372864",
"0.5372864",
"0.5372864",
"0.5372864",
"0.5372864",
"0.5372864",
"0.5372864",
"0.5372864",
"0.5372864",
"0.5372864",
"0.5372864",
"0.5372864",
"0.5372864",
"0.5372864"
] | 0.635013 | 1 |
Test sort order via getSortedNearbyEvents. | @Test
public void testAssociatorSort() throws Exception {
// add out of order to events list
JsonEventInfoComparatorTest comparatorTest = new JsonEventInfoComparatorTest();
comparatorTest.setup();
testService.events.add(comparatorTest.farEvent);
testService.events.add(comparatorTest.fartherEvent);
testService.events.add(comparatorTest.closeEvent);
JsonEventInfo reference = new JsonEventInfo(comparatorTest.referenceEvent);
List<JsonEventInfo> sorted = testAssociator.getSortedNearbyEvents(
reference, null);
Assert.assertEquals("closest event first",
comparatorTest.closeEvent, sorted.get(0).getEvent());
Assert.assertEquals("farther event last",
comparatorTest.fartherEvent,
sorted.get(testService.events.size() - 1).getEvent());
System.err.println(testAssociator.formatOutput(reference, null, sorted));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void sortEvents(){\n if(events.size()>0){\n Comparator<Event> comp = new Comparator<Event>(){\n public int compare(Event e1, Event e2){\n if(e1.getEventStartTime().before(e2.getEventStartTime())){\n return -1;\n }\n else if(e1.getEventStartTime().after(e2.getEventStartTime())){\n return 1;\n }\n else{\n return 0;\n }\n }\n \n };\n Collections.sort(events, comp);\n \n }}",
"public void sortEventsByTime() {\n for (OrgEvent event : events) {\n event.setCompareByTime(true);\n }\n Collections.sort(events);\n }",
"public void sortEvents() {\n\t\tCollections.sort(events);\n\t}",
"protected void sort(@NotNull ArrayList<Event<?>> events) {\n\t\tevents.sort(new Comparator<Event<?>>() {\n\t\t\t@Override\n\t\t\tpublic int compare(Event<?> e1, Event<?> e2) {\n\t\t\t\tif (e1.getEnd() < e2.getStart())\n\t\t\t\t\treturn -1;\n\t\t\t\telse\n\t\t\t\t\treturn 1;\n\t\t\t}\n\t\t});\n\t\tsnap(this.events);\n\t}",
"public void sortEventsByValue() {\n for (OrgEvent event : events) {\n event.setCompareByTime(false);\n }\n Collections.sort(events);\n }",
"private static SortedEventList sortEvents(LinkedList<Event> events) {\n\t\tSortedEventList sorted = new SortedEventList(); // Creates a new SortedEventList.\n\t\tfor (Event event : events) { // Iterates foreach Event.\n\t\t\tsorted.insertInOrder(event); // Adds the Event into the new SortedEventList.\n\t\t}\n\t\treturn sorted; // Returns the SortedEventList.\n\t}",
"@Test\n public void testSort() {\n topScreenModel.setSortFieldAndFields(Field.LOCALITY, fields);\n\n FieldValue previous = null;\n\n // Test for ascending sort\n topScreenModel.refreshMetricsData();\n\n for (Record record : topScreenModel.getRecords()) {\n FieldValue current = record.get(Field.LOCALITY);\n if (previous != null) {\n assertTrue(current.compareTo(previous) < 0);\n }\n previous = current;\n }\n\n // Test for descending sort\n topScreenModel.switchSortOrder();\n topScreenModel.refreshMetricsData();\n\n previous = null;\n for (Record record : topScreenModel.getRecords()) {\n FieldValue current = record.get(Field.LOCALITY);\n if (previous != null) {\n assertTrue(current.compareTo(previous) > 0);\n }\n previous = current;\n }\n }",
"default List<Event> sort(List<Event> events, Comparator<Event> cmp) {\n\t\tCollections.sort(events, cmp);\n\t\treturn events;\n\t}",
"private static void performSort(TestApp testApp) {\n testApp.testPartition();\n\n /*\n Date end = new Date();\n System.out.println(\"Sort ended @ \" + end.getTime());\n System.out.println(\"Total time = \" + (end.getTime() - start.getTime())/1000.0 + \" seconds...\");\n */\n }",
"public static void printAllEventListInSortedOrder(){\n sortEvents();\n for(int i=0;i<events.size();i++){\n System.out.println((events.get(i).getMonth()+1)+\"/\"+events.get(i).getDate()+\"/\"+events.get(i).getYear()+\" \"+events.get(i).getStringStartandFinish()+\" \"+events.get(i).getEventTitle());\n }\n }",
"@Test\n\tpublic void testSortOneElementInArray() {\n\t\tint[] arrayBeforeSort = { 565 };\n\t\tint[] arrayAfterSort = { 565 };\n\t\tArrayQuickSort.sort(arrayAfterSort);\n\t\tif (!isSorted(arrayBeforeSort, arrayAfterSort)) {\n\t\t\tAssert.fail(\"The array is not sorted!\");\n\t\t}\n\t}",
"public String arrangeEvents() throws Exception {\n JSONArray scheduledEventList = calObj.retrieveEvents(\"primary\").getJSONArray(\"items\");\n JSONArray unScheduledEventList = calObj.retrieveEvents(this.user.getCalId()).getJSONArray(\"items\");\n\n //Filter events for this week\n\n\n //Make a list of all events\n\n //Prioritise all unscheduled events\n\n\n //Send the list to client to display\n String events = \"\";\n for (int i = 0; i < scheduledEventList.length(); i++) {\n org.json.JSONObject jsonLineItem = scheduledEventList.getJSONObject(i);\n events += jsonLineItem.getString(\"summary\") + \" \" + jsonLineItem.getJSONObject(\"start\").getString(\"dateTime\") + \"\\n\";\n }\n // Unscheduled events set in bot created aPAS calendar\n for (int i = 0; i < unScheduledEventList.length(); i++) {\n org.json.JSONObject jsonLineItem = unScheduledEventList.getJSONObject(i);\n events += jsonLineItem.getString(\"summary\") + \" \" + jsonLineItem.getJSONObject(\"start\").getString(\"dateTime\") + \"\\n\";\n }\n return events;\n }",
"@Test\n\tpublic void testSortTwoElements() {\n\t\tint[] arrayBeforeSort = { 565, 45 };\n\t\tint[] arrayAfterSort = { 565, 45 };\n\t\tArrayQuickSort.sort(arrayAfterSort);\n\t\tif (!isSorted(arrayBeforeSort, arrayAfterSort)) {\n\t\t\tAssert.fail(\"The array is not sorted!\");\n\t\t}\n\t}",
"void updateSortingComparators(Comparator<ReadOnlyEntry> eventComparator,\n Comparator<ReadOnlyEntry> deadlineComparator,\n Comparator<ReadOnlyEntry> floatingTaskComparator);",
"@Test\n\tpublic void testSortNormalElements() {\n\t\tint[] arrayBeforeSort = { 565, 78, 34, 2, 23, 2222, 34 };\n\t\tint[] arrayAfterSort = { 565, 78, 34, 2, 23, 2222, 34 };\n\t\tArrayQuickSort.sort(arrayAfterSort);\n\t\tif (!isSorted(arrayBeforeSort, arrayAfterSort)) {\n\t\t\tAssert.fail(\"The array is not sorted!\");\n\t\t}\n\t}",
"private void assertSorted(final int[] testArr) {\n for (int i = 0; i < testArr.length - 1; i++) {\n assertTrue(\"Array was not sorted: element \" + i + \" was out \"\n + \"of order: \\n\" + Arrays.toString(testArr),\n testArr[i] <= testArr[i + 1]);\n\n }\n }",
"@Test\n\tpublic void testSortSortedNumbers() {\n\t\tint[] arrayBeforeSort = { 104, 103, 102, 101, 100, 99, 98 };\n\t\tint[] arrayAfterSort = { 104, 103, 102, 101, 100, 99, 98 };\n\t\tArrayQuickSort.sort(arrayAfterSort);\n\t\tif (!isSorted(arrayBeforeSort, arrayAfterSort)) {\n\t\t\tAssert.fail(\"The array is not sorted!\");\n\t\t}\n\t}",
"public final void testSortCriteria() throws Exception\n {\n Vector vect = new Vector();\n final long modifier = 100;\n long sdArr[][] = { { 0, 10 }, { 0, 12 }, { 0, 8 }, { -5, 20 }, { -5, 13 }, { -5, 15 }, { -5, -7 }, { 2, 10 },\n { 2, 8 }, { 2, 2 }, { 12, 14 }, { -5, 5 }, { 10, 2 } };\n long sorted[][] = { { -5, -7 }, { 10, 2 }, { 2, 2 }, { -5, 5 }, { 0, 8 }, { 2, 8 }, { 0, 10 }, { 2, 10 },\n { 0, 12 }, { -5, 13 }, { 12, 14 }, { -5, 15 }, { -5, 20 } };\n\n patchArray(sdArr, modifier);\n patchArray(sorted, modifier);\n\n for (int i = 0; i < sdArr.length; i++)\n {\n vect.addElement(new RecordingImplMock(new Date(sdArr[i][0]), sdArr[i][1]));\n }\n RecordingList recordingList = new RecordingListImpl(vect);\n Comparator comparator = new Comparator();\n\n RecordingList newList = recordingList.sortRecordingList(comparator);\n\n assertNotNull(\"recordingList returned null\", newList);\n\n // check results\n LocatorRecordingSpec lrs = null;\n RecordingRequest req = null;\n\n int i = newList.size();\n for (i = 0; i < newList.size(); i++)\n {\n req = (RecordingRequest) newList.getRecordingRequest(i);\n lrs = (LocatorRecordingSpec) req.getRecordingSpec();\n assertEquals(\"sort criteria is wrong\", sorted[i][1], lrs.getDuration());\n }\n }",
"private void execute() {\n this.waitForFinish();\n this.stop();\n logger.info(\"Finished eventing test {}\", this.getClass().getSimpleName());\n Event currentEvent = null;\n Map<Long, Integer> orderVerifyMap = new HashMap<Long, Integer>();\n while((currentEvent =eventRecievedList.poll()) != null)\n {\n \tInteger index = (Integer)currentEvent.getProperty(\"index\");\n \tLong threadId = (Long)currentEvent.getProperty(\"thread\");\n\n \tif(index != null && threadId != null){\n \t\tInteger previousIndex = orderVerifyMap.get(threadId);\n \t\tif(previousIndex == null)\n \t\t{\n \t\t\tif(index != 0)\n \t\t\t{\n \t\t\t\tSystem.out.println(\"Event \" + index + \" recieved first for thread \" + threadId);\n \t\t\t}\n \t\t\torderVerifyMap.put(threadId, index);\n \t\t}\n \t\telse\n \t\t{\n \t\t\tif(previousIndex > index)\n \t\t\t{\n \t\t\t\tSystem.out.println(\"Events for thread \" + threadId + \" out of order. Event \" + previousIndex + \" recieved before \" + index);\n \t\t\t}\n \t\t\telse\n \t\t\t{\n \t\t\t\torderVerifyMap.put(threadId, index);\n \t\t\t}\n \t\t}\n \t}\n }\n try {\n Thread.sleep(15 * 1000);\n } catch (final InterruptedException ie) {\n // ignore\n }\n }",
"@Test\n\tpublic void testNearbyQuery() throws Exception {\n\t\tDefaultEventInfo event = new DefaultEventInfo();\n\t\tevent.setTime(new Date());\n\t\tevent.setLatitude(new BigDecimal(\"34\"));\n\t\tevent.setLongitude(new BigDecimal(\"-118\"));\n\t\tevent.setDepth(new BigDecimal(\"1.32\"));\n\t\tevent.setMagnitude(new BigDecimal(\"4.5\"));\n\n\t\tEventQuery query;\n\t\tEventComparison criteria = testAssociator.getNearbyCriteria();\n\n\t\ttestAssociator.getNearbyEvents(event, null);\n\t\tquery = testService.lastQuery;\n\t\tlong milliseconds = testAssociator.getNearbyCriteria().getTimeDifference()\n\t\t\t\t.multiply(new BigDecimal(\"1000\")).longValue();\n\t\tAssert.assertEquals(\"expected start time\", query.getStartTime(), new Date(\n\t\t\t\tevent.getTime().getTime() - milliseconds));\n\t\tAssert.assertEquals(\"expected end time\", query.getEndTime(), new Date(event\n\t\t\t\t.getTime().getTime() + milliseconds));\n\t\tAssert.assertEquals(\"expected latitude\", event.getLatitude(),\n\t\t\t\tquery.getLatitude());\n\t\tAssert.assertEquals(\"expected longitude\", event.getLongitude(),\n\t\t\t\tquery.getLongitude());\n\t\tAssert.assertEquals(\n\t\t\t\t\"expected radius\",\n\t\t\t\tcriteria.getLocationDifference().divide(\n\t\t\t\t\t\tEventIDAssociator.KILOMETERS_PER_DEGREE, MathContext.DECIMAL32),\n\t\t\t\tquery.getMaxRadius());\n\t\tAssert.assertEquals(\"expected min depth\",\n\t\t\t\tevent.getDepth().subtract(criteria.getDepthDifference()),\n\t\t\t\tquery.getMinDepth());\n\t\tAssert.assertEquals(\"expected max depth\",\n\t\t\t\tevent.getDepth().add(criteria.getDepthDifference()),\n\t\t\t\tquery.getMaxDepth());\n\t\tAssert.assertEquals(\"expected min magnitude\", event.getMagnitude()\n\t\t\t\t.subtract(criteria.getMagnitudeDifference()), query.getMinMagnitude());\n\t\tAssert.assertEquals(\"expected max magnitude\",\n\t\t\t\tevent.getMagnitude().add(criteria.getMagnitudeDifference()),\n\t\t\t\tquery.getMaxMagnitude());\n\n\t\tAssert.assertNull(\"expected null network\", query.getCatalog());\n\n\t\ttestAssociator.getNearbyEvents(event, \"testnetwork\");\n\t\tquery = testService.lastQuery;\n\t\tAssert.assertEquals(\"expected null network\", \"testnetwork\",\n\t\t\t\tquery.getCatalog());\n\n\t\ttry {\n\t\t\ttestAssociator.getNearbyEvents(new DefaultEventInfo(), null);\n\t\t\tAssert.fail(\"empty event should throw exception\");\n\t\t} catch (IllegalArgumentException iae) {\n\t\t\t// expected\n\t\t}\n\t}",
"public static boolean testSort() {\r\n Manager inst;\r\n try {\r\n inst = new PokemonTable();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n return false;\r\n }\r\n LinkedList<Pokemon> list;\r\n list = inst.sortByAttack(true);\r\n for (int i = 1; i < list.size(); i++) {\r\n if (list.get(i - 1).getAttack() < list.get(i).getAttack()) {\r\n System.out.println(\"attack sort\");\r\n return false;\r\n }\r\n }\r\n list = inst.sortByAttack(false);\r\n for (int i = 1; i < list.size(); i++) {\r\n if (list.get(i - 1).getAttack() > list.get(i).getAttack()) {\r\n System.out.println(\"attack sort\");\r\n return false;\r\n }\r\n }\r\n list = inst.sortByDefense(true);\r\n for (int i = 1; i < list.size(); i++) {\r\n if (list.get(i - 1).getDefense() < list.get(i).getDefense()) {\r\n System.out.println(\"defense sort\");\r\n return false;\r\n }\r\n }\r\n list = inst.sortByDefense(false);\r\n for (int i = 1; i < list.size(); i++) {\r\n if (list.get(i - 1).getDefense() > list.get(i).getDefense()) {\r\n System.out.println(\"defense sort\");\r\n return false;\r\n }\r\n }\r\n list = inst.sortByFavorite(true);\r\n for (int i = 1; i < list.size(); i++) {\r\n if (!list.get(i - 1).getFavorite() && list.get(i).getFavorite()) {\r\n System.out.println(\"favorite sort\");\r\n return false;\r\n }\r\n }\r\n list = inst.sortByFavorite(false);\r\n for (int i = 1; i < list.size(); i++) {\r\n if (list.get(i - 1).getFavorite() && !list.get(i).getFavorite()) {\r\n System.out.println(\"favorite sort\");\r\n return false;\r\n }\r\n }\r\n list = inst.sortByHp(true);\r\n for (int i = 1; i < list.size(); i++) {\r\n if (list.get(i - 1).getHp() < list.get(i).getHp()) {\r\n System.out.println(\"hp sort\");\r\n return false;\r\n }\r\n }\r\n list = inst.sortByHp(false);\r\n for (int i = 1; i < list.size(); i++) {\r\n if (list.get(i - 1).getHp() > list.get(i).getHp()) {\r\n System.out.println(\"hp sort\");\r\n return false;\r\n }\r\n }\r\n list = inst.sortByLegendary(true);\r\n for (int i = 1; i < list.size(); i++) {\r\n if (!list.get(i - 1).isLegendary() && list.get(i).isLegendary()) {\r\n System.out.println(\"legendary sort\");\r\n return false;\r\n }\r\n }\r\n list = inst.sortByLegendary(false);\r\n for (int i = 1; i < list.size(); i++) {\r\n if (list.get(i - 1).isLegendary() && !list.get(i).isLegendary()) {\r\n System.out.println(\"legendary sort\");\r\n return false;\r\n }\r\n }\r\n list = inst.sortByName(true);\r\n for (int i = 1; i < list.size(); i++) {\r\n if (list.get(i - 1).getName().compareTo(list.get(i).getName()) > 0) {\r\n System.out.println(\"name sort\");\r\n return false;\r\n }\r\n }\r\n list = inst.sortByName(false);\r\n for (int i = 1; i < list.size(); i++) {\r\n if (list.get(i - 1).getName().compareTo(list.get(i).getName()) < 0) {\r\n System.out.println(\"name sort\");\r\n return false;\r\n }\r\n }\r\n list = inst.sortBySpAttack(true);\r\n for (int i = 1; i < list.size(); i++) {\r\n if (list.get(i - 1).getSpAttack() < list.get(i).getSpAttack()) {\r\n System.out.println(\"spAttack sort\");\r\n return false;\r\n }\r\n }\r\n list = inst.sortBySpAttack(false);\r\n for (int i = 1; i < list.size(); i++) {\r\n if (list.get(i - 1).getSpAttack() > list.get(i).getSpAttack()) {\r\n System.out.println(\"spAttack sort\");\r\n return false;\r\n }\r\n }\r\n list = inst.sortBySpDefense(true);\r\n for (int i = 1; i < list.size(); i++) {\r\n if (list.get(i - 1).getSpDefense() < list.get(i).getSpDefense()) {\r\n System.out.println(\"spDefense sort\");\r\n return false;\r\n }\r\n }\r\n list = inst.sortBySpDefense(false);\r\n for (int i = 1; i < list.size(); i++) {\r\n if (list.get(i - 1).getSpDefense() > list.get(i).getSpDefense()) {\r\n System.out.println(\"spDefense sort\");\r\n return false;\r\n }\r\n }\r\n list = inst.sortBySpeed(true);\r\n for (int i = 1; i < list.size(); i++) {\r\n if (list.get(i - 1).getSpeed() < list.get(i).getSpeed()) {\r\n System.out.println(\"speed sort\");\r\n return false;\r\n }\r\n }\r\n list = inst.sortBySpeed(false);\r\n for (int i = 1; i < list.size(); i++) {\r\n if (list.get(i - 1).getSpeed() > list.get(i).getSpeed()) {\r\n System.out.println(\"speed sort\");\r\n return false;\r\n }\r\n }\r\n return true;\r\n }",
"@Override\n public int compareTo(Event e) {\n\n if(this.getAllDay() && !e.getAllDay()){\n return -1;\n }\n\n else if(e.getAllDay() && !this.getAllDay()){\n return 1;\n }\n\n else if(this.getAllDay() && e.getAllDay()){\n return 0;\n }\n\n else {\n int event1 = parseTime(this.getStartTime());\n int event2 = parseTime(e.getStartTime());\n\n if(event1 - event2 < 0){\n return -1;\n }\n\n else if(event1 - event2 > 0){\n return 1;\n }\n\n else {\n return 0;\n }\n }\n }",
"private static void sortEventsByTokenIndex(Row row) {\n Collections.sort(row.getEvents(), new Comparator<GridEvent>() {\n @Override\n public int compare(GridEvent o1, GridEvent o2) {\n if (o1 == o2) {\n return 0;\n }\n if (o1 == null) {\n return -1;\n }\n if (o2 == null) {\n return +1;\n }\n\n return ((Integer) o1.getLeft()).compareTo(o2.getLeft());\n }\n });\n }",
"private void assertSorted(final IntPlus[] testArr,\n Comparator<IntPlus> cmp) {\n for (int i = 0; i < testArr.length - 1; i++) {\n assertTrue(\"Array was not sorted: element \" + i + \" was out \"\n + \"of order: \\n\" + Arrays.deepToString(testArr),\n cmp.compare(testArr[i], testArr[i + 1]) <= 0);\n\n }\n }",
"private void findNearByEvents() {\n LatLng latLng = mMapFragment.getCenterOfScreen();\n double longitude = latLng.longitude;\n double latitude = latLng.latitude;\n\n int spEventsPosition = mEventsSpinner.getSelectedItemPosition();\n int spTimesPosition = mTimesSpinner.getSelectedItemPosition();\n\n Log.e(\"MainAct\", \"Lat: \" + latitude + \" Lon: \" + longitude);\n mEventInteractor = new EventInteractor(this);\n EventSearchRequest eventSearchRequest = new EventSearchRequest();\n eventSearchRequest.setLat(String.valueOf(latitude));\n eventSearchRequest.setLon(String.valueOf(longitude));\n eventSearchRequest.setEventTime(spTimesPosition);\n eventSearchRequest.setEventType(spEventsPosition);\n mEventInteractor.eventSearch(eventSearchRequest, new EventSearchListener() {\n @Override\n public void onEventSearch(EventSearchResponse response) {\n mBottomSheetListFragment.refreshEvents(response.getEvents());\n mMapFragment.getEventsAndPin(response.getEvents());\n }\n\n @Override\n public void onError(String errorMessage) {\n showErrorMessage(errorMessage);\n }\n\n @Override\n public void onBeforeRequest() {\n showWaitingDialog();\n }\n\n @Override\n public void onAfterRequest() {\n dismissWaitingDialog();\n }\n });\n }",
"@Test\n\tpublic void testExitCodes() throws Exception {\n\t\tJsonEventInfoComparatorTest comparatorTest = new JsonEventInfoComparatorTest();\n\t\tcomparatorTest.setup();\n\t\ttestService.events.add(comparatorTest.farEvent);\n\t\ttestService.events.add(comparatorTest.fartherEvent);\n\t\ttestService.events.add(comparatorTest.closeEvent);\n\t\tJsonEventInfo reference = new JsonEventInfo(comparatorTest.referenceEvent);\n\t\tList<JsonEventInfo> sorted = testAssociator.getSortedNearbyEvents(\n\t\t\t\treference, null);\n\t\tJsonEventInfo good = sorted.get(0);\n\t\tJsonEventInfo bad = sorted.get(2);\n\n\t\t// no events\n\t\tAssert.assertEquals(\"no events\",\n\t\t\t\tEventIDAssociator.EXIT_EVENT_NOT_FOUND,\n\t\t\t\ttestAssociator.getExitCode(new ArrayList<JsonEventInfo>()));\n\t\t// multiple events\n\t\tAssert.assertEquals(\"multiple events\",\n\t\t\t\tEventIDAssociator.EXIT_MULTIPLE_EVENTS_FOUND,\n\t\t\t\ttestAssociator.getExitCode(sorted));\n\t\t// one good event\n\t\tsorted.clear();\n\t\tsorted.add(good);\n\t\tAssert.assertEquals(\"one good event\",\n\t\t\t\tEventIDAssociator.EXIT_SUCCESS,\n\t\t\t\ttestAssociator.getExitCode(sorted));\n\t\t// one bad event\n\t\tsorted.clear();\n\t\tsorted.add(bad);\n\t\tAssert.assertEquals(\"one bad event\",\n\t\t\t\tEventIDAssociator.EXIT_EVENT_NOT_SANE,\n\t\t\t\ttestAssociator.getExitCode(sorted));\n\t}",
"@Test\n public void testSort() {\n initialize();\n var realList = new HighScoreList();\n realList.setList(list);\n realList.sort();\n\n assertEquals(300, realList.getList().get(0).getScore());\n assertEquals(200, realList.getList().get(1).getScore());\n assertEquals(100, realList.getList().get(2).getScore());\n }",
"@Test\n public void case3SortTwoElements(){\n //Already sorted array\n SortDemoData data2 = new SortDemoData() ;\n\n int[] testArray = {1,2};\n data2.initializeArray(\"2 1\");\n assertTrue(map.get(algoUnderTest)+\" Before Sort ...First Element\",data2.myArray[1].key == testArray[0]);\n assertTrue(map.get(algoUnderTest)+\" Before Sort ...Second Element\",data2.myArray[0].key == testArray[1]);\n\n data2.runAlgo(algoUnderTest);\n \n if(algoUnderTest != 0)\n {\n assertTrue(map.get(algoUnderTest)+\" After Sort ...First Element\",data2.myArray[0].key == testArray[0]);\n assertTrue(map.get(algoUnderTest)+\" After Sort ...Second Element\",data2.myArray[1].key == testArray[1]);\n }\n \n else {\n \t assertFalse(map.get(algoUnderTest)+\" After Sort ...First Element\",data2.myArray[0].key == testArray[0]);\n assertFalse(map.get(algoUnderTest)+\" After Sort ...Second Element\",data2.myArray[1].key == testArray[1]);\n }\n\n\n }",
"@Test(dependsOnMethods = \"verifyInvoiceSortTest\")\r\n\tpublic void verifySchedDateSortTest() throws InterruptedException {\n\t\tcarrierschedulepayment.clickschdateColumn();\r\n\t\t// click first row to expand\r\n\t\tcarrierschedulepayment.clickFirstRow();\r\n\t\t// get the data elements from the first row displayed\r\n\t\tfirstRowData = carrierschedulepayment.getFirstRowData();\r\n\t\tAssert.assertTrue(firstRowData.size() > 0, \"No data rows found when sorting by date\");\r\n\t\t// click LoadID Column to change sort from ascending to descending\r\n\t\tcarrierschedulepayment.clickschdateColumn();\r\n\t\t// click first row to expand\r\n\t\tcarrierschedulepayment.clickFirstRow();\r\n\t\t// get the data elements from the first row displayed\r\n\t\tlastRowData = carrierschedulepayment.getFirstRowData();\r\n\t\t// compare to the database when sorted by given column-Descending\r\n\t\t// if (carrierschedulepayment.getRowCount() > 1)\r\n\t\t// Assert.assertNotEquals(firstRowData, lastRowData,\r\n\t\t// \"First Row Data: \\n\" + firstRowData + \"\\nLast Row Data: \\n\" + lastRowData);\r\n\t}",
"@Test\r\n public void testSort() {\r\n System.out.println(\"sort\");\r\n int[] array = {6, 3, 7, 9, 4, 1, 3, 7, 0};\r\n int[] expResult = {0, 1, 3, 3, 4, 6, 7, 7, 9};\r\n\r\n int[] result = new InsertionSort().sort(array);\r\n\r\n assertArrayEquals(expResult, result);\r\n \r\n array = new int[10000];\r\n for (int i = 0; i < array.length; i++) {\r\n array[i] = new Random().nextInt(Integer.MAX_VALUE);\r\n }\r\n expResult = Arrays.copyOf(array, array.length);\r\n Arrays.sort(expResult);\r\n \r\n result = new InsertionSort().sort(array);\r\n\r\n assertArrayEquals(expResult, result);\r\n }",
"public void testSortedList() {\r\n List<InfoNode> sortedList = MapUtils.sortByDistance(exampleList, node3.getTitle());\r\n assertTrue(sortedList.size() == 2);\r\n assertTrue(sortedList.get(0) == node2);\r\n assertTrue(sortedList.get(1) == node1);\r\n assertTrue(sortedList.contains(node1));\r\n assertTrue(sortedList.contains(node2));\r\n assertFalse(sortedList.contains(node3));\r\n\r\n sortedList = MapUtils.sortByDistance(exampleList, node1.getTitle());\r\n assertTrue(sortedList.size() == 2);\r\n assertTrue(sortedList.get(0) == node2);\r\n assertTrue(sortedList.get(1) == node3);\r\n assertFalse(sortedList.contains(node1));\r\n assertTrue(sortedList.contains(node2));\r\n assertTrue(sortedList.contains(node3));\r\n\r\n sortedList = MapUtils.sortByDistance(exampleList, \" \");\r\n assertTrue(sortedList.equals(exampleList));\r\n }",
"public void testArtistSort() {\n sorter.inssortArtist();\n list = sorter.getLibrary();\n assertEquals(list.get(0).getArtist(), \"Hayley\");\n assertEquals(list.get(1).getArtist(), \"James\");\n assertEquals(list.get(2).getArtist(), \"Jason\");\n }",
"public int compareTo(Event e)\n { \n int x =eventName.compareToIgnoreCase(e.eventName);\n if (x != 0 )\n return x;\n else return 0;\n \n }",
"@Override\r\n\t\tpublic int compareTo(Event compareEvent){\r\n\t\t\t\r\n\t\t\tint compareQuantity = ((Event)compareEvent).date;\r\n\t\t\t//ascending order\r\n\t\t\treturn this.date-compareQuantity;\r\n\t\t\t//descending order\r\n\t\t\t//return compareQuantity -this.quantity;\r\n\t\t}",
"@Test(priority = 7)\n\tpublic void validateSortingByDate() {\n\t\tlog = Logger.getLogger(HeroImageProducttestscripts.class);\n\t\tLogReport.getlogger();\n\t\tlogger = extent.startTest(\"Validating the Sorting functionality\");\n\t\tHeroImageProductPageFlow.selectSortingDropdown(0, locator);\n\t\theroImg.validateDate(1, locator, validate);\n\t\tHeroImageProductPageFlow.selectSortingDropdown(1, locator);\n\t\theroImg.validateDate(2, locator, validate);\n\t\tlog.info(\"sorting is correct\");\n\t}",
"@Override\n public int compare(Event o1, Event o2) {\n char[] event1 = o1.getEvent().toCharArray();\n char[] event2 = o2.getEvent().toCharArray();\n\n int i = 0; // Intiialize counter variable i\n\n while (i < event1.length && i < event2.length) // We reached the end, stop\n {\n if (event1[i] - event2[i] == 0) /* if the two elements are the same, tells us nothing about difference */\n {\n i++; // Keep going\n }\n\n else if (event1[i] - event2[i] < 0) // If true, this->str[i] comes first\n {\n return -1; // Return -1 for sorting\n }\n\n else if (event1[i] - event2[i] > 0) // If true,argStr.str[i] comes first\n {\n return 1;\n }\n }\n\n if (event1.length < event2.length)\n {\n return -1;\n }\n\n else if (event1.length > event2.length)\n {\n return 1;\n }\n\n else\n {\n return 0;\n }\n\n }",
"@Test\n void sortByDate() {\n }",
"@Test\n public void f13OrderRULTest() {\n clickOn(\"#thumbnailTab\").moveBy(90, 200);\n scroll(50, VerticalDirection.UP).sleep(1000);\n\n scroll(50, VerticalDirection.DOWN).sleep(1000);\n clickOn(\"#sortAsset\").type(KeyCode.DOWN).type(KeyCode.ENTER);\n\n sleep(1000).moveBy(-90, 200).scroll(50, VerticalDirection.UP).sleep(1000);\n\n boolean isOrdered = true;\n double[] ruls = getRuls();\n\n //Check if the ascending ruls are ordered\n for (int i = 0; i < ruls.length - 1; i++) {\n if (ruls[i] > ruls[i + 1]) {\n isOrdered = false;\n break;\n }\n }\n\n sleep(1000).scroll(50, VerticalDirection.DOWN).sleep(1000);\n assertTrue(\"All RULs after sorting by ascending are ordered from smallest to largest.\", isOrdered);\n }",
"@Test(priority = 6)\n\tpublic void validateSortingFunctionality() {\n\t\tlog = Logger.getLogger(HeroImageProducttestscripts.class);\n\t\tLogReport.getlogger();\n\t\tlogger = extent.startTest(\"Validating the Sorting functionality\");\n\t\tHeroImageProductPageFlow.clickCustomerReviews(locator);\n\t\tlog.info(\"Content is present\");\n\t\tlog.info(\"Starting Sorting functionality testing\");\n\t}",
"@Override\n\t\tpublic int compareTo(Event other) {\n\t\t\tif (this.time < other.time + 1.0e-9) return -1;\n\t\t\telse if (this.time > other.time - 1.0e-9) return 1;\n\t\t\telse {\n\t\t\t\tif(this.active > other.active) return 1;\n\t\t\t\telse return -1;\n\t\t\t}\n\t\t}",
"public int compareTo(Event other){\n return other.timestamp.compareTo(timestamp);\n }",
"public static void testSort() {\n\t\tint[] test = {-1,-2,-3,4,1,3,0,3,-2,1,-2,2,-1,1,-5,4,-3};\n\t\tArrays.sort(test);\n\t\tfor (int e : test) {\n\t\t\tSystem.out.print(e + \", \");\n\t\t}\n\t}",
"@Test\n\tpublic void testSortPositiveNegativeElements() {\n\t\tint[] arrayBeforeSort = { 565, -78, 34, -2, 23, 2222, 34 };\n\t\tint[] arrayAfterSort = { 565, -78, 34, -2, 23, 2222, 34 };\n\t\tArrayQuickSort.sort(arrayAfterSort);\n\t\tif (!isSorted(arrayBeforeSort, arrayAfterSort)) {\n\t\t\tAssert.fail(\"The array is not sorted!\");\n\t\t}\n\t}",
"@Test\n public void sortByCreationDateASC_ReturnTrue() {\n // Set SharedPreferences (Sort by Creation Date, ASC)\n mSharedPreferences.edit()\n .putInt(Constants.SORT_TYPE_KEY, Constants.SORT_TYPE_CREATION_DATE)\n .putBoolean(Constants.SORT_FAVORITES_ON_TOP_KEY, false)\n .putInt(Constants.SORT_DIRECTION_KEY, Constants.SORT_DIRECTION_ASC)\n .commit();\n\n // Click first position in RecyclerView\n onView(withId(R.id.fragment_notelist_recyclerview))\n .perform(RecyclerViewActions.actionOnItemAtPosition(0, click()));\n\n // Check that clicked Note matches Note (3) title/text\n onView(withId(R.id.fragment_note_title_edittext))\n .check(matches(withText(is(StringUtil.setFirstCharUpperCase(TestHelper.NOTE_3_TITLE)))));\n// onView(withId(R.id.fragment_note_text_textview))\n// .check(matches(withText(is(StringUtil.setFirstCharUpperCase(TestHelper.NOTE_3_TEXT)))));\n }",
"public void sortAppointments() {\n reminders = sort(reminders);\n followup = sort(followup);\n }",
"@Test\r\n public void SortTest() {\r\n System.out.println(\"sort\");\r\n List<String> array = Arrays.asList(\"3\", \"2\", \"1\");\r\n List<String> expResult = Arrays.asList(\"1\",\"2\",\"3\");\r\n instance.sort(array);\r\n assertEquals(expResult,array);\r\n }",
"@Test\n\tpublic void testSortRepeatableNumbers() {\n\t\tint[] arrayBeforeSort = { 104, 104, 0, 9, 56, 0, 9, 77, 88 };\n\t\tint[] arrayAfterSort = { 104, 104, 0, 9, 56, 0, 9, 77, 88 };\n\t\tArrayQuickSort.sort(arrayAfterSort);\n\t\tif (!isSorted(arrayBeforeSort, arrayAfterSort)) {\n\t\t\tAssert.fail(\"The array is not sorted!\");\n\t\t}\n\t}",
"@Test\n public void testNear()\n {\n String sName = \"near-client-listener\";\n generateEvents(sName);\n checkEvents(true, false);\n }",
"@Test\n public void testShipment_Sorted_By_Date() {\n List<Widget> widgets = shipment.getWidgetsSortedByDate();\n assertNotNull(widgets);\n assertTrue(widgets.size() == 10);\n Widget widget1 = (Widget) widgets.get(0);\n Widget widget2 = (Widget) widgets.get(1);\n assertTrue(widget1.getColor().compareTo(widget2.getColor()) <= 0);\n }",
"@Test\n public void testNearFront()\n {\n String sName = \"near-front-listener\";\n generateEvents(sName);\n checkEvents(true, false);\n }",
"private void sortResults(){\r\n this.sortedPlayers = new ArrayList<>();\r\n int size = players.size();\r\n while (size > 0) {\r\n Player lowestPointsPlayer = this.players.get(0);\r\n for(int i = 0; i<this.players.size(); i++){\r\n if(lowestPointsPlayer.getPoints() <= this.players.get(i).getPoints()){\r\n lowestPointsPlayer = this.players.get(i);\r\n }\r\n }\r\n this.sortedPlayers.add(lowestPointsPlayer);\r\n this.players.remove(lowestPointsPlayer);\r\n size--;\r\n }\r\n\r\n\r\n }",
"@Override\n public void onSortByDate() {\n mSorter.sortLocationsByDate(mListLocations);\n mAdapter.notifyDataSetChanged();\n }",
"@Test(timeout = 10000)\n public void testEvents() throws Exception {\n EventReader reader = new EventReader(new DataInputStream(new ByteArrayInputStream(getEvents())));\n HistoryEvent e = reader.getNextEvent();\n Assert.assertTrue(e.getEventType().equals(JOB_PRIORITY_CHANGED));\n Assert.assertEquals(\"ID\", getJobid().toString());\n e = reader.getNextEvent();\n Assert.assertTrue(e.getEventType().equals(JOB_STATUS_CHANGED));\n Assert.assertEquals(\"ID\", getJobid().toString());\n e = reader.getNextEvent();\n Assert.assertTrue(e.getEventType().equals(TASK_UPDATED));\n Assert.assertEquals(\"ID\", getTaskid().toString());\n e = reader.getNextEvent();\n Assert.assertTrue(e.getEventType().equals(REDUCE_ATTEMPT_KILLED));\n Assert.assertEquals(TestEvents.taskId, getTaskid().toString());\n e = reader.getNextEvent();\n Assert.assertTrue(e.getEventType().equals(JOB_KILLED));\n Assert.assertEquals(\"ID\", getJobid().toString());\n e = reader.getNextEvent();\n Assert.assertTrue(e.getEventType().equals(REDUCE_ATTEMPT_STARTED));\n Assert.assertEquals(TestEvents.taskId, getTaskid().toString());\n e = reader.getNextEvent();\n Assert.assertTrue(e.getEventType().equals(REDUCE_ATTEMPT_FINISHED));\n Assert.assertEquals(TestEvents.taskId, getTaskid().toString());\n e = reader.getNextEvent();\n Assert.assertTrue(e.getEventType().equals(REDUCE_ATTEMPT_KILLED));\n Assert.assertEquals(TestEvents.taskId, getTaskid().toString());\n e = reader.getNextEvent();\n Assert.assertTrue(e.getEventType().equals(REDUCE_ATTEMPT_KILLED));\n Assert.assertEquals(TestEvents.taskId, getTaskid().toString());\n e = reader.getNextEvent();\n Assert.assertTrue(e.getEventType().equals(REDUCE_ATTEMPT_STARTED));\n Assert.assertEquals(TestEvents.taskId, getTaskid().toString());\n e = reader.getNextEvent();\n Assert.assertTrue(e.getEventType().equals(REDUCE_ATTEMPT_FINISHED));\n Assert.assertEquals(TestEvents.taskId, getTaskid().toString());\n e = reader.getNextEvent();\n Assert.assertTrue(e.getEventType().equals(REDUCE_ATTEMPT_KILLED));\n Assert.assertEquals(TestEvents.taskId, getTaskid().toString());\n e = reader.getNextEvent();\n Assert.assertTrue(e.getEventType().equals(REDUCE_ATTEMPT_KILLED));\n Assert.assertEquals(TestEvents.taskId, getTaskid().toString());\n reader.close();\n }",
"@Test\n\tpublic void testSortOnlyNegativeElements() {\n\t\tint[] arrayBeforeSort = { -565, -78, -34, -2, -23, -2222, -34 };\n\t\tint[] arrayAfterSort = { -565, -78, -34, -2, -23, -2222, -34 };\n\t\tArrayQuickSort.sort(arrayAfterSort);\n\t\tif (!isSorted(arrayBeforeSort, arrayAfterSort)) {\n\t\t\tAssert.fail(\"The array is not sorted!\");\n\t\t}\n\t}",
"@Test\n public void flowTest3(){\n ItemToCalculate calculated = new ItemToCalculate(5);\n calculated.workerLastNumber = 5;\n calculated.curProgress = 5;\n calculated.firstRoot = 1;\n calculated.secondRoot = 5;\n\n ItemToCalculate small_inprog = new ItemToCalculate(10);\n ItemToCalculate big_inprog = new ItemToCalculate(30);\n\n calcApplication.itemToCalculateArrayList.add(calculated);\n calcApplication.itemToCalculateArrayList.add(small_inprog);\n calcApplication.itemToCalculateArrayList.add(big_inprog);\n Collections.sort(calcApplication.itemToCalculateArrayList, new ItemToCalculateComparator());\n\n shadowOf(getMainLooper()).idle();\n // expected to small_inprog be first, second big_inprog, last calculated\n\n assertEquals(calcApplication.itemToCalculateArrayList.get(0), small_inprog);\n assertEquals(calcApplication.itemToCalculateArrayList.get(1), big_inprog);\n assertEquals(calcApplication.itemToCalculateArrayList.get(2), calculated);\n\n\n calcApplication.itemToCalculateArrayList.clear();\n }",
"private void sortViewEntries() {\n runOnUiThread(new Runnable() {\n public void run() {\n try {\n Collections.sort(viewEntries, new DateComparator());\n } catch (final Exception ex) {\n // Log.i(\"sortViewEntries\", \"Exception in thread\");\n }\n }\n });\n }",
"@Test\n public void testFail(){\n List<StoryPart> storyParts = new ArrayList<>();\n StoryPart a = new StoryPart(LocalTime.of(0, 2), null, null, StoryEvent.HALF_TIME_A_END, StoryTitle.create(\"halftime 1 end\"),\n StoryDescription.create(\"halftime 2 end\"));\n StoryPart b = new StoryPart(LocalTime.of(0, 3), null, GameMinute.create(\"2.\"), StoryEvent.GOAL, StoryTitle.create(\"Goal 2\"),\n StoryDescription.create(\"goal 2\"));\n StoryPart c = new StoryPart(LocalTime.of(0, 1), null, GameMinute.create(\"1.\"), StoryEvent.YELLOW_CARD,\n StoryTitle.create(\"yellow card 1\"), StoryDescription.create(\"yellow card 1\"));\n storyParts.add(a);\n storyParts.add(b);\n storyParts.add(c);\n\n Collections.shuffle(storyParts);\n storyParts.sort(new StoryPartTimeLineComparator());\n List<StoryPart> sortA = new ArrayList<>(storyParts);\n Collections.shuffle(storyParts);\n storyParts.sort(new StoryPartTimeLineComparator());\n List<StoryPart> sortB = new ArrayList<>(storyParts);\n Collections.shuffle(storyParts);\n storyParts.sort(new StoryPartTimeLineComparator());\n List<StoryPart> sortC = new ArrayList<>(storyParts);\n\n assertEquals(sortA.get(0), sortB.get(0));\n assertEquals(sortA.get(0), sortC.get(0));\n\n assertEquals(sortA.get(1), sortB.get(1));\n assertEquals(sortA.get(1), sortC.get(1));\n\n assertEquals(sortA.get(2), sortB.get(2));\n assertEquals(sortA.get(2), sortC.get(2));\n\n }",
"@Test\n public void test_read_input_and_sort() {\n\n }",
"boolean areSorted();",
"@Test\r\n public void testGetShapesSortedByTimestamp() {\r\n List<Shape> expectedOutput = new ArrayList<Shape>();\r\n expectedOutput.add(circle);\r\n expectedOutput.add(square);\r\n expectedOutput.add(rectangle);\r\n expectedOutput.add(triangle);\r\n expectedOutput.add(regularPolygon);\r\n List<Shape> actualOutput = screen.sortShape(SortType.TIMESTAMP);\r\n assertEquals(expectedOutput, actualOutput);\r\n }",
"@Test\n public void case4SortSameSequence(){\n //Already sorted array\n SortDemoData data2 = new SortDemoData() ;\n\n int[] testArray = {1,2,3};\n data2.initializeArray(\"1 2 3\");\n assertTrue(map.get(algoUnderTest)+\" Before Sort ...First Element\",data2.myArray[0].key == testArray[0]);\n assertTrue(map.get(algoUnderTest)+\" Before Sort ...Second Element\",data2.myArray[1].key == testArray[1]);\n assertTrue(map.get(algoUnderTest)+\" Before Sort ...Third Element\",data2.myArray[2].key == testArray[2]);\n data2.runAlgo(algoUnderTest);\n\n assertTrue(map.get(algoUnderTest)+\" After Sort ...First Element\",data2.myArray[0].key == testArray[0]);\n assertTrue(map.get(algoUnderTest)+\" After Sort ...Second Element\",data2.myArray[1].key == testArray[1]);\n assertTrue(map.get(algoUnderTest)+\" After Sort ...Third Element\",data2.myArray[2].key == testArray[2]);\n\n }",
"boolean hasOrderByDay();",
"@Test\n public void newSortingTest5() {\n newSorting sort = new newSorting();\n int[] arr = {10, 100, 20, 90, 30, 80, 40, 70, 50, 60};\n int[] expected = {10, 20, 30, 40, 50, 60, 70, 80, 90, 100};\n sort.newSorting(arr, 2);\n assertArrayEquals(arr, expected);\n }",
"public void sortHub(List<Page> result) {\n\t\tCollections.sort(result, new Comparator<Page>() {\n\t\t\tpublic int compare(Page p1, Page p2) {\n\t\t\t\t// Sorts by 'TimeStarted' property\n\t\t\t\treturn p1.hub < p2.hub ? -1 : p1.hub > p2.hub ? 1 : secondaryOrderSort(p1, p2);\n\t\t\t}\n\n\t\t\t// If 'TimeStarted' property is equal sorts by 'TimeEnded' property\n\t\t\tpublic int secondaryOrderSort(Page p1, Page p2) {\n\t\t\t\treturn p1.getLocation().compareToIgnoreCase(p2.getLocation()) < 1 ? -1\n\t\t\t\t\t\t: p1.getLocation().compareToIgnoreCase(p2.getLocation()) > 1 ? 1 : 0;\n\t\t\t}\n\t\t});\n\t}",
"private void sortAndNotify() {\n Collections.sort(todoDBList, listComparator);\n adapter.notifyDataSetChanged();\n }",
"public void sortAuthority(List<Page> result) {\n\t\tCollections.sort(result, new Comparator<Page>() {\n\t\t\tpublic int compare(Page p1, Page p2) {\n\t\t\t\t// Sorts by 'TimeStarted' property\n\t\t\t\treturn p1.hub < p2.hub ? -1 : p1.hub > p2.hub ? 1 : secondaryOrderSort(p1, p2);\n\t\t\t}\n\n\t\t\t// If 'TimeStarted' property is equal sorts by 'TimeEnded' property\n\t\t\tpublic int secondaryOrderSort(Page p1, Page p2) {\n\t\t\t\treturn p1.getLocation().compareToIgnoreCase(p2.getLocation()) < 1 ? -1\n\t\t\t\t\t\t: p1.getLocation().compareToIgnoreCase(p2.getLocation()) > 1 ? 1 : 0;\n\t\t\t}\n\t\t});\n\t}",
"private static ArrayList<Quest> sortAfterTimestamp(ArrayList<Quest> questListToSort) {\n\t\tfor (int i = 0; i < questListToSort.size() - 1; i++) {\n\t\t\tint index = i;\n\t\t\tfor (int j = i + 1; j < questListToSort.size(); j++) {\n\t\t\t\tif (questListToSort.get(j).getTimestamp() > questListToSort.get(index).getTimestamp()) {\n\t\t\t\t\tindex = j;\n\t\t\t\t}\n\t\t\t}\n\t\t\tCollections.swap(questListToSort, index, i);\n\t\t}\n\t\treturn questListToSort;\n\t}",
"protected void sortCheck() {\n if (m_instances == null) {\n return;\n }\n \n if (m_simpleConfigPanel.isUsingANativeTimeStamp()) {\n String timeStampF = m_simpleConfigPanel.getSelectedTimeStampField();\n Attribute timeStampAtt = m_instances.attribute(timeStampF); \n if (timeStampAtt != null) {\n \n double lastNonMissing = Utils.missingValue();\n boolean ok = true;\n boolean hasMissing = false;\n for (int i = 0; i < m_instances.numInstances(); i++) {\n Instance current = m_instances.instance(i);\n \n if (Utils.isMissingValue(lastNonMissing)) {\n if (!current.isMissing(timeStampAtt)) {\n lastNonMissing = current.value(timeStampAtt);\n } else {\n hasMissing = true;\n }\n } else {\n if (!current.isMissing(timeStampAtt)) {\n if (current.value(timeStampAtt) - lastNonMissing < 0) {\n ok = false;\n break;\n }\n \n lastNonMissing = current.value(timeStampAtt);\n } else {\n hasMissing = true;\n }\n }\n }\n \n if (!ok && !hasMissing) {\n // ask if we should sort\n int result = JOptionPane.showConfirmDialog(ForecastingPanel.this, \n \"The data does not appear to be in sorted order of \\\"\"\n + timeStampF + \"\\\". Do you want to sort the data?\", \n \"Forecasting\", JOptionPane.YES_NO_OPTION);\n \n if (result == JOptionPane.YES_OPTION) {\n if (m_log != null) {\n m_log.statusMessage(\"Sorting data...\");\n }\n m_instances.sort(timeStampAtt);\n m_sortedCheck = true; \n }\n }\n \n if (!ok && hasMissing) {\n // we can't really proceed in this situation. We can't sort by the timestamp\n // because instances with missing values will be put at the end of the data.\n // The only thing we can do is to remove the instances with missing time\n // stamps but this is likely to screw up the periodicity and majorly impact\n // on results.\n \n int result = JOptionPane.showConfirmDialog(ForecastingPanel.this, \n \"The data does not appear to be in sorted order of \\\"\"\n + timeStampF + \"\\\". \\nFurthermore, there are rows with\\n\" +\n \t\t\"missing timestamp values. We can remove these\\n\" +\n \t\t\"rows and then sort the data but this is likely to\\n\" +\n \t\t\"result in degraded performance. It is strongly\\n\" +\n \t\t\"recommended that you fix these issues in the data\\n\" +\n \t\t\"before continuing. Do you want the system to proceed\\n\" +\n \t\t\"anyway by removing rows with missing timestamps and\\n\" +\n \t\t\"then sorting the data?\", \n \"Forecasting\", JOptionPane.YES_NO_OPTION);\n \n if (result == JOptionPane.YES_OPTION) {\n if (m_log != null) {\n m_log.statusMessage(\"Removing rows with missing time stamps and sorting data...\");\n }\n m_instances.deleteWithMissing(timeStampAtt);\n m_instances.sort(timeStampAtt);\n m_sortedCheck = true; \n }\n }\n }\n }\n }",
"private void sortEntities(){\n for (int i = 1; i < sorted.size; i++) {\n for(int j = i ; j > 0 ; j--){\n \tEntity e1 = sorted.get(j);\n \tEntity e2 = sorted.get(j-1);\n if(getRL(e1) < getRL(e2)){\n sorted.set(j, e2);\n sorted.set(j-1, e1);\n }\n }\n }\n }",
"public Boolean before(Event event) {\n int result = this.compareTo(event);\n if (result < 0) return true;\n return false;\n }",
"public void testTitleSort() {\n sorter.inssortTitle();\n list = sorter.getLibrary();\n assertEquals(list.get(0).getTitle(), \"one\");\n assertEquals(list.get(1).getTitle(), \"three\");\n assertEquals(list.get(2).getTitle(), \"two\");\n }",
"@Test\n public void newSortingTest() {\n newSorting sort = new newSorting();\n int[] arr = {3, 2, 6, 5, 1, 7, 4};\n int[] expected = {1, 2, 3, 4, 5, 6, 7};\n sort.newSorting(arr, 4);\n assertArrayEquals(arr, expected);\n }",
"@Test\r\n\tpublic void albumsListIsSorted() {\r\n\t\tListView listView = main.getActivity().getAlbumsListView();\r\n\t\t\r\n\t\tAlbumClass a1 = (AlbumClass) listView.getItemAtPosition(0);\r\n\t\tAlbumClass a2 = (AlbumClass) listView.getItemAtPosition(1);\r\n\t\tAlbumClass a3 = (AlbumClass) listView.getItemAtPosition(2);\r\n\t\tassertTrue(a1.getTitle().compareToIgnoreCase(a2.getTitle()) < 0);\r\n\t\tassertTrue(a2.getTitle().compareToIgnoreCase(a3.getTitle()) < 0);\r\n\t}",
"public static <T extends Comparable<? super T>> void sortTest2(T[] a) {\n int N = a.length;\n for (int i = 1; i < N; i++) { \n // Insert a[i] among a[i-1], a[i-2], a[i-3]... ..\n for (int j = i; j > 0 && lessTest(a[j], a[j-1]); j--) {\n exch(a, j, j-1);\n }\n }\n }",
"private ArrayList<Object> sortState(ArrayList<EcgInfo> array_ecgInfo, ArrayList<ActivityPoint> array_activityInfo,EcgInfo sleepDayInfo){\n\t\tArrayList<Object> sortedState=new ArrayList<Object>();\n\n\t\t//emily++++ insert sleepDayInfo into array_ecgInfo\n\t\tArrayList<EcgInfo> sortedEcgSleep=new ArrayList<EcgInfo>();\n\t\tif(sleepDayInfo.hasData){\n\t\t\twhile (array_ecgInfo.size()!=0 && sleepDayInfo.hasData){\n\t\t\t\tif(sleepDayInfo.measureTime > array_ecgInfo.get(0).measureTime){\n\t\t\t\t\tsortedEcgSleep.add(sleepDayInfo);\n\t\t\t\t\tsleepDayInfo.hasData=false;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tsortedEcgSleep.add(array_ecgInfo.get(0));\n\t\t\t\t\tarray_ecgInfo.remove(0);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(array_ecgInfo.size()!=0){\n\t\t\tsortedEcgSleep.addAll(array_ecgInfo);\n\t\t}\n\t\tif(sleepDayInfo.hasData){\n\t\t\tsortedEcgSleep.add(sleepDayInfo);\n\t\t}\n\t\t//emily----\n\n\t\twhile(sortedEcgSleep.size()!=0&&array_activityInfo.size()!=0){\n\t\t\tif(sortedEcgSleep.get(0).measureTime<array_activityInfo.get(0).time){\n\t\t\t\tsortedState.add(sortedEcgSleep.get(0));\n\t\t\t\tsortedEcgSleep.remove(0);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tsortedState.add(array_activityInfo.get(0));\n\t\t\t\tarray_activityInfo.remove(0);\n\t\t\t}\n\t\t}\n\t\tif(sortedEcgSleep.size()!=0){\n\t\t\tsortedState.addAll(sortedEcgSleep);\n\t\t}\n\t\telse{\n\t\t\tsortedState.addAll(array_activityInfo);\n\t\t}\n\t\treturn sortedState;\n\t}",
"@Test\n public void case5SortReversedSequence(){\n //Completely reverse sorted array\n int[] testArray = {1,2,3};\n SortDemoData data3 = new SortDemoData() ;\n data3.initializeArray(\"3 2 1\");\n assertTrue(map.get(algoUnderTest)+\" Before Sort ...First Element\",data3.myArray[2].key == testArray[0]);\n assertTrue(map.get(algoUnderTest)+\" Before Sort ...Second Element\",data3.myArray[1].key == testArray[1]);\n assertTrue(map.get(algoUnderTest)+\" Before Sort ...Third Element\",data3.myArray[0].key == testArray[2]);\n\n data3.runAlgo(algoUnderTest);\n\n if(algoUnderTest != 0)\n {\n assertTrue(map.get(algoUnderTest)+\" After Sort ...First Element\",data3.myArray[0].key == testArray[0]);\n assertTrue(map.get(algoUnderTest)+\" After Sort ...Second Element\",data3.myArray[1].key == testArray[1]);\n assertTrue(map.get(algoUnderTest)+\" After Sort ...Third Element\",data3.myArray[2].key == testArray[2]);\n }\n else {\n \t assertFalse(map.get(algoUnderTest)+\" After Sort ...First Element\",data3.myArray[0].key == testArray[0]);\n assertFalse(map.get(algoUnderTest)+\" After Sort ...Second Element\",data3.myArray[1].key == testArray[1]);\n assertFalse(map.get(algoUnderTest)+\" After Sort ...Third Element\",data3.myArray[2].key == testArray[2]);\n }\n \n }",
"public static ListObject getNearbyEvents (int userId) {\n\t\tProfile user = getUser(userId) ;\n\t\tList <Event> events =EventController.setUserStatus(user.getEventsWhoOwn(), 2);\n\t\tevents.addAll( EventController.setUserStatus(user.getEvents(), 1)) ;\n\t\tCollections.sort(events);\n\t\tList <Event> unfinished = EventController.getUnfinishedEvents(events) ;\n\t\tint size = 5 ;\n\t\tListObject obj ;\n\t\tif ( unfinished.size() <= 5 ) {\n\t\t\tobj = new ListObject(unfinished) ;\n\t\t\tif ( unfinished.size() >= events.size() ) {\n\t\t\t\tobj.moreExist = 1 ;\n\t\t\t}\n\t\t\telse obj.moreExist = 2 ;\n\t\t}\n\t\telse {\n\t\t\tobj = new ListObject(unfinished.subList(0,size));\n\t\t\tobj.moreExist = 2 ;\n\t\t}\n\t\t\n\t\treturn obj ;\n\t}",
"@Test(dependsOnMethods = \"verifyDaysSortTest\")\r\n\tpublic void verifyAmountSortTest() throws InterruptedException {\n\t\tcarrierschedulepayment.clickAmountColumn();\r\n\t\t// click first row to expand\r\n\t\tcarrierschedulepayment.clickFirstRow();\r\n\t\t// get the data elements from the first row displayed\r\n\t\tfirstRowData = carrierschedulepayment.getFirstRowData();\r\n\t\t// click Amount Column to change sort from ascending to descending\r\n\t\tcarrierschedulepayment.clickAmountColumn();\r\n\t\t// click first row to expand\r\n\t\tcarrierschedulepayment.clickFirstRow();\r\n\t\t// get the data elements from the first row displayed\r\n\t\tlastRowData = carrierschedulepayment.getFirstRowData();\r\n\t\t// compare to the database when sorted by given column-Descending (EXISTING BUG\r\n\t\t// BACKLOGGED)\r\n\t\t// if (carrierschedulepayment.getRowCount() > 1)\r\n\t\t// Assert.assertNotEquals(firstRowData, lastRowData,\r\n\t\t// \"First Row Data: \\n\" + firstRowData + \"\\nLast Row Data: \\n\" + lastRowData);\r\n\t}",
"@Test\n\tpublic void givenAnArrayWithTwoElements_ThenItIsSorted() {\n\t\tList<Integer> unsorted = new ArrayList<>();\n\t\tunsorted.add(2);\n\t\tunsorted.add(1);\n\t\t\n\t\t// Execute the code\n\t\tList<Integer> sorted = QuickSort.getInstance().sort(unsorted);\n\t\t\t\n\t\t// Verify the test result(s)\n\t\tassertThat(sorted.get(0), is(1));\n\t\tassertThat(sorted.get(1), is(2));\n\t}",
"@Test(dependsOnMethods = \"verifyLoadIdSortTest\")\r\n\tpublic void verifyInvoiceSortTest() throws InterruptedException {\n\t\tcarrierschedulepayment.clickInvoiceColumn();\r\n\t\t// click first row to expand\r\n\t\tcarrierschedulepayment.clickFirstRow();\r\n\t\t// get the data elements from the first row displayed\r\n\t\tfirstRowData = carrierschedulepayment.getFirstRowData();\r\n\t\t// click LoadID Column to change sort from ascending to descending\r\n\t\tcarrierschedulepayment.clickInvoiceColumn();\r\n\t\t// click first row to expand\r\n\t\tcarrierschedulepayment.clickFirstRow();\r\n\t\t// get the data elements from the first row displayed\r\n\t\tlastRowData = carrierschedulepayment.getFirstRowData();\r\n\t\t// compare to the database when sorted by given column-Descending\r\n\t\tif (carrierschedulepayment.getRowCount() > 1)\r\n\t\t\tAssert.assertNotEquals(firstRowData, lastRowData,\r\n\t\t\t\t\t\"First Row Data: \\n\" + firstRowData + \"\\nLast Row Data: \\n\" + lastRowData);\r\n\t}",
"@Test\n\tpublic void testAscendingComparator() {\n\t\tList<MockWorker> mockWorkers = createMockWorkers(10);\n\t\tsetAscendingParallelWorkCapacity(mockWorkers);\n\t\tCollections.reverse(mockWorkers);\n\t\tList<WorkerLoadSnapshot> snapshots = createSnapshots(mockWorkers);\n\t\tRandom rng = new Random(-1L);\n\t\tCollections.shuffle(snapshots, rng);\n\t\tCollections.sort(snapshots, WorkerLoadSnapshot.ascendingComparator());\n\t\tfor (PairIterator.Pair<MockWorker, WorkerLoadSnapshot> pair\n\t\t\t\t: PairIterator.iterable(mockWorkers, snapshots)) {\n\t\t\tassertSame(pair.getLeft(), pair.getRight().getWorker());\n\t\t}\n\t\tList<MockWorker> unorderedList = new ArrayList<>(mockWorkers);\n\t\tCollections.shuffle(snapshots);\n\t\tsetAscendingParallelWorkCapacity(unorderedList);\n\t\tCollections.shuffle(snapshots, rng);\n\t\tCollections.sort(snapshots, WorkerLoadSnapshot.ascendingComparator());\n\t\tfor (PairIterator.Pair<MockWorker, WorkerLoadSnapshot> pair\n\t\t\t\t: PairIterator.iterable(mockWorkers, snapshots)) {\n\t\t\tassertSame(pair.getLeft(), pair.getRight().getWorker());\n\t\t}\n\t}",
"@Override\n public int compareTo(TestTask o) {\n assert o != null;\n int result;\n if (this.isEvent()){\n result = o.isEvent() \n ? this.endTime.compareTo(o.endTime) \n : this.endTime.compareTo(o.deadline);\n } else {\n result = o.isEvent() \n ? this.deadline.compareTo(o.endTime) \n : this.deadline.compareTo(o.deadline);\n }\n return result == 0 \n ? this.name.compareTo(o.name)\n : result;\n }",
"@Test\n public void sortAlphabeticallyASC_ReturnTrue() {\n // Set SharedPreferences (Sort alphabetically, ASC)\n mSharedPreferences.edit()\n .putInt(Constants.SORT_TYPE_KEY, Constants.SORT_TYPE_ALPHABETICALLY)\n .putBoolean(Constants.SORT_FAVORITES_ON_TOP_KEY, false)\n .putInt(Constants.SORT_DIRECTION_KEY, Constants.SORT_DIRECTION_ASC)\n .commit();\n\n // Click first position in RecyclerView\n onView(withId(R.id.fragment_notelist_recyclerview))\n .perform(RecyclerViewActions.actionOnItemAtPosition(0, click()));\n\n // Check that clicked Note matches Note (2) title/text\n onView(withId(R.id.fragment_note_title_edittext))\n .check(matches(withText(StringUtil.setFirstCharUpperCase(TestHelper.NOTE_2_TITLE))));\n onView(withId(R.id.fragment_note_text_edittext))\n .check(matches(withText(StringUtil.setFirstCharUpperCase(TestHelper.NOTE_2_TEXT))));\n }",
"private void assertStablySorted(final IntPlus[] origArr,\n final IntPlus[] testArr,\n Comparator<IntPlus> cmp) {\n //Create copy of original array and sort it\n IntPlus[] stablySortedArr = cloneArr(origArr);\n Arrays.parallelSort(stablySortedArr, cmp); //guaranteed to be stable\n\n //Works since stable sorts are unique - there is 1 right answer.\n for (int i = 0; i < origArr.length; i++) {\n assertEquals(\"Array was not stably sorted: element \" + i + \" was \"\n + \"out of order. Expected:\\n\"\n + Arrays.deepToString(stablySortedArr) + \"\\nYours:\"\n + \"\\n\" + Arrays.deepToString(testArr),\n stablySortedArr[i], testArr[i]);\n }\n }",
"private void checkSortedAmount() {\n\n\t\tList<String> actualAmountList = new ArrayList<String>();\n\t\tList<WebElement> elementList = util.findElementsByXpath(\"//td[5]/span\");\n\t\tfor (WebElement we : elementList) {\n\t\t\tactualAmountList.add(we.getText());\n\t\t}\n\n\t\tassertEquals(actualAmountList, dataService.getAscendingAmounts());\n\t\tdriver.manage().timeouts().implicitlyWait(2, TimeUnit.SECONDS);\n\t}",
"public void incomingSortRequest(APDUEvent e)\n {\n LOGGER.finer(\"Incoming sortRequest\");\n }",
"public static <T extends Comparable<? super T>> void testArraySortedness(T[] array, double expectedSortedness, String testDescription) {\n\t\tNumberFormat formatter = NumberFormat.getPercentInstance();\n\t\tSystem.out.println(\"\\nSortedness of \" + Arrays.toString(array));\n\t\tdouble actualSortedness = sortedness(array);\n\t\tSystem.out.println(\"Expected sortedness = \" + formatter.format(expectedSortedness));\n\t\tSystem.out.println(\" Actual sortedness = \" + formatter.format(actualSortedness));\n\t\tif(Math.abs(expectedSortedness - actualSortedness) > 0.00001) {\n\t\t\tSystem.out.println(\"*****Test failed: \" + testDescription);\n\t\t}\n\t}",
"@Deployment(resources = \"org/camunda/bpm/engine/test/api/externaltask/externalTaskPriorityExpression.bpmn20.xml\")\n @Test\n public void testOrderByPriority() {\n List<ProcessInstance> instances = new ArrayList<ProcessInstance>();\n\n for (int i = 0; i < 5; i++) {\n instances.add(runtimeService.startProcessInstanceByKey(\"twoExternalTaskWithPriorityProcess\",\n Variables.createVariables().putValue(\"priority\", i)));\n }\n\n // then querying and ordering by priority works\n verifySortingAndCount(externalTaskService.createExternalTaskQuery().orderByPriority().asc(), 10, externalTaskByPriority());\n verifySortingAndCount(externalTaskService.createExternalTaskQuery().orderByPriority().desc(), 10, inverted(externalTaskByPriority()));\n }",
"public String doSort();",
"public boolean elementsAreAlphaUpSortedMorningCoffee(List<WebElement> elements){\n By multipleFirstResult = By.xpath(\"//div//h2//..//div[1]\");\n By test = By.xpath(\"//div[contains(@class,'footer-content')]\");\n\n\n boolean sortedWell = true;\n for (int i=0; i<elements.size()-1; i++){\n\n String frontElement = elements.get(i+1).getText();\n String backElement = elements.get(i).getText();\n\n if(frontElement.contains(\"Multiple\")){\n findElement(test);\n (elements.get(i+1)).click();\n waitForElementToAppear(multipleFirstResult);\n frontElement = findElement(multipleFirstResult).getText();\n\n // Sometimes multipleFirstResult returns nothing so we run a loop to try again 10 times until text is returned.\n for (int k = 0; k < 9; k++)\n {\n if (frontElement.equalsIgnoreCase(\"\")){\n (elements.get(i+1)).click();\n waitForElementToAppear(multipleFirstResult);\n frontElement = findElement(multipleFirstResult).getText();\n }\n else\n {\n break;\n }\n }\n clickCoordinate(searchBar,10,10);\n pause(500);\n }\n\n if(backElement.contains(\"Multiple\")){\n findElement(test);\n (elements.get(i)).click();\n waitForElementToAppear(multipleFirstResult);\n backElement = findElement(multipleFirstResult).getText();\n\n // Sometimes multipleFirstResult returns nothing so we run a loop to try again 10 times until text is returned.\n for (int k = 0; k < 9; k++)\n {\n if (backElement.equalsIgnoreCase(\"\")){\n (elements.get(i)).click();\n waitForElementToAppear(multipleFirstResult);\n backElement = findElement(multipleFirstResult).getText();\n }\n else\n {\n break;\n }\n }\n\n clickCoordinate(searchBar,10,10);\n pause(500);\n }\n\n if (frontElement.compareTo(backElement) < 0){\n System.out.println(\"MIS-SORT: Ascending: '\"+frontElement+\"' should not be after '\"+backElement+\"'\");\n sortedWell = false;\n }\n }\n return sortedWell;\n }",
"@Test\n\tpublic void sholdHaveEvents(){\n\t\tcalendar.addEvent(new Event(\"event0\", date0, date1, true),user);\n\t\tcalendar.addEvent(new Event(\"event0\", date1, date1, false), user);\n\t\tassertEquals(calendar.getAllEvents(user).size(), 2);\n\t\t\n\t}",
"@Test\n public void test02SendEvents() throws Exception{\n Event event1 = restService.registerEvent(createEvent(\"ACCOUNTS\", createMap(Object.class, \"date\", \"Yesterday\")));\n assertNotNull(event1.getId());\n Event event2 = restService.registerEvent(createEvent(\"TRANSACTIONS\", createMap(Object.class, \"date\", \"Yesterday\")));\n assertNotNull(event2.getId());\n Event event3 = restService.registerEvent(createEvent(\"PRODUCTS\", createMap(Object.class, \"date\", \"Yesterday\")));\n assertNotNull(event3.getId());\n Event event4 = restService.registerEvent(createEvent(\"ACCOUNTS\", createMap(Object.class, \"date\", \"Today\")));\n assertNotNull(event4.getId());\n Event event5 = restService.registerEvent(createEvent(\"TRANSACTIONS\", createMap(Object.class, \"date\", \"Today\")));\n assertNotNull(event5.getId());\n Event event6 = restService.registerEvent(createEvent(\"PRODUCTS\", createMap(Object.class, \"date\", \"Today\")));\n assertNotNull(event6.getId());\n Event event7 = restService.registerEvent(createEvent(\"ACCOUNTS\", createMap(Object.class, \"date\", \"Tomorrow\", \"premise\", \"PC2\")));\n assertNotNull(event7.getId());\n Event event8 = restService.registerEvent(createEvent(\"TRANSACTIONS\", createMap(Object.class, \"date\", \"Tomorrow\", \"premise\", \"PC2\")));\n assertNotNull(event8.getId());\n Event event9 = restService.registerEvent(createEvent(\"PRODUCTS\", createMap(Object.class, \"date\", \"Tomorrow\", \"premise\", \"PC2\")));\n assertNotNull(event9.getId());\n delay(10);\n\n //yesterday events\n List<CallbackData> list = restService.findCallbackInstancesBy(event1.getId(), null, null, null, 0, 0);\n// assertEquals(5, list.size());\n assertEquals(4, list.size());\n list = restService.findCallbackInstancesBy(event2.getId(), null, null, null, 0, 0);\n assertEquals(1, list.size());\n list = restService.findCallbackInstancesBy(event3.getId(), null, null, null, 0, 0);\n assertEquals(4, list.size());\n //today\n list = restService.findCallbackInstancesBy(event4.getId(), null, null, null, 0, 0);\n assertEquals(4, list.size());\n list = restService.findCallbackInstancesBy(event5.getId(), null, null, null, 0, 0);\n assertEquals(1, list.size());\n list = restService.findCallbackInstancesBy(event6.getId(), null, null, null, 0, 0);\n assertEquals(4, list.size());\n //premise\n list = restService.findCallbackInstancesBy(event7.getId(), null, null, null, 0, 0);\n assertEquals(5, list.size());\n list = restService.findCallbackInstancesBy(event8.getId(), null, null, null, 0, 0);\n assertEquals(2, list.size());\n list = restService.findCallbackInstancesBy(event9.getId(), null, null, null, 0, 0);\n assertEquals(5, list.size());\n\n //Event status check\n EventEntity evt = eventRepo.eventById(Long.parseLong(event1.getId()));\n assertEquals(evt.getStatus(), Constants.EVENT_INSTANCE_STATUS_PROCESSED);\n assertEquals(evt.getId(), Long.parseLong(event1.getId()));\n\n }",
"public boolean shouldPushOrderByOut() {\n return true;\n }",
"private void prepareData() {\n eventList = databaseHandler.getLatestDistinctEvents(prefs.getString(KEY_SORT_FIELD, \"name\"),\n prefs.getBoolean(KEY_SORT_ORDER_ASCENDING, true));\n\n // Send list to adapter\n eventLogAdapter.updateData(eventList);\n }",
"public ArrayList<Event> sortByDate() {\n\t\tArrayList<Event>calendarSortedByDate = new ArrayList();\n\t\tfor(int j = 0; j<calendar.size(); j++) {\n\t\t\tcalendarSortedByDate.add(calendar.get(j));\n\t\t\t\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < calendarSortedByDate.size() - 1; i++) {\n\t\t // Find the minimum in the list[i..list.size-1]\n\t\t Event currentMin = calendarSortedByDate.get(i);\n\t\t int currentMinIndex = i;\n\n\t\t for (int j = i + 1; j < calendarSortedByDate.size(); j++) {\n\t\t if (currentMin.compareDate(calendarSortedByDate.get(j)) > 0) {\n\t\t currentMin = calendarSortedByDate.get(j);\n\t\t currentMinIndex = j;\n\t\t }\n\t\t }\n\n\t\t // Swap list[i] with list[currentMinIndex] if necessary;\n\t\t if (currentMinIndex != i) {\n\t\t \t calendarSortedByDate.set(currentMinIndex, calendarSortedByDate.get(i));\n\t\t \t calendarSortedByDate.set(i, currentMin);\n\t\t }\n\t\t }\n\t\treturn calendarSortedByDate;\n\t}",
"public void setEvents(Event[] event) {\n\n setEventID(event[0].getEventID());\n\n //Store keys as EventID for later use to put it all in order\n Map<String, ArrayList<Event>> listMap = new HashMap<>();\n\n for (int i = 0; i < event.length; i++) {\n\n events.put(event[i].getEventID(), event[i]);\n eventTypes.add(event[i].getEventType().toLowerCase());\n\n if(!listMap.containsKey(event[i].getPersonID())) {\n ArrayList<Event> newEventList = new ArrayList<>();\n listMap.put(event[i].getPersonID(), newEventList);\n }\n listMap.get(event[i].getPersonID()).add(event[i]);\n }\n\n // Chronologically order for events\n for (String key : listMap.keySet()) {\n Set birthSet = new HashSet<>(); // birth events come first\n Set deathSet = new HashSet<>(); // death events come last (obviously)\n ArrayList<Event> eventList = new ArrayList<Event>();\n\n // Adding events in chronological order based on events\n for(int i = 0; i < listMap.get(key).size(); i++) {\n Event currEvent = listMap.get(key).get(i);\n\n if(currEvent.getEventType().toLowerCase().equals(\"birth\")) {\n birthSet.add(currEvent);\n } else if (currEvent.getEventType().toLowerCase().equals(\"death\")) {\n deathSet.add(currEvent);\n } else { // get events by year and sort them\n if(eventList.size() > 0) {\n if (currEvent.getYear() < eventList.get(0).getYear()) {\n eventList.add(0, currEvent);\n } else if (currEvent.getYear() >= eventList.get(eventList.size() - 1).getYear()) {\n eventList.add(currEvent);\n } else {\n for (int j = 0; j < eventList.size() - 1; j++) {\n if(eventList.get(j).getYear() <= currEvent.getYear() && eventList.get(j + 1).getYear() > currEvent.getYear()) {\n eventList.add(j + 1, currEvent);\n }\n }\n }\n } else {\n eventList.add(currEvent);\n }\n }\n }\n\n ArrayList<Event> orderedList = new ArrayList<Event>(); // will store ordered list for events\n\n orderedList.addAll(birthSet);\n orderedList.addAll(eventList);\n orderedList.addAll(deathSet);\n\n personEvents.put(key, orderedList);\n }\n }",
"@Test(dependsOnMethods = \"verifyAmountSortTest\")\r\n\tpublic void verifyPayerSortTest() throws InterruptedException {\n\t\tcarrierschedulepayment.clickPayerColumn();\r\n\t\t// click first row to expand\r\n\t\tcarrierschedulepayment.clickFirstRow();\r\n\t\t// get the data elements from the first row displayed\r\n\t\tfirstRowData = carrierschedulepayment.getFirstRowData();\r\n\t\t// click Payer Column to change sort from ascending to descending\r\n\t\tcarrierschedulepayment.clickPayerColumn();\r\n\t\t// click first row to expand\r\n\t\tcarrierschedulepayment.clickFirstRow();\r\n\t\t// get the data elements from the first row displayed\r\n\t\tlastRowData = carrierschedulepayment.getFirstRowData();\r\n\t\t// verify row data exists\r\n\t\tAssert.assertNotNull(firstRowData, \"First Row Data: \\n\" + firstRowData);\r\n\t\tAssert.assertNotNull(lastRowData, \"\\nLast Row Data: \\n\" + lastRowData);\r\n\t}",
"private ArrayList<Task> sortByDate(ArrayList<Task> toSort) {\n ArrayList<Task> sorted = new ArrayList<>();\n\n toSort = removeNoTimeTask(toSort);\n\n int size = toSort.size();\n for (int i = 0; i < size; i++) {\n Date earliest = new Date(Long.MAX_VALUE);\n int earliestIndex = -1;\n for (int j = 0; j < toSort.size(); j++) {\n if (toSort.get(j).getClass().equals(Deadline.class)) {\n Deadline temp = (Deadline) toSort.get(j);\n if (temp.getTime().before(earliest)) {\n earliest = temp.getTime();\n earliestIndex = j;\n }\n } else if (toSort.get(j).getClass().equals(Event.class)) {\n Event temp = (Event) toSort.get(j);\n if (temp.getTime().before(earliest)) {\n earliest = temp.getTime();\n earliestIndex = j;\n }\n } else if (toSort.get(j).getClass().equals(Period.class)) {\n Period temp = (Period) toSort.get(j);\n if (temp.getStart().before(earliest)) {\n earliest = temp.getStart();\n earliestIndex = j;\n }\n }\n }\n\n sorted.add(toSort.get(earliestIndex));\n toSort.remove(earliestIndex);\n }\n return sorted;\n }",
"double getSortTime();",
"public void sortByPopularity() {\n Log.d(Contract.TAG_WORK_PROCESS_CHECKING, \"ListPresenter - sortByPopularity\");\n\n listInteractor.sortByPopularity(new ListCallback() {\n @Override\n public void setPhotosList(List<BasePojo.Result> photosList) {\n Log.d(Contract.TAG_WORK_PROCESS_CHECKING, \"ListPresenter - ListCallback - setPhotosList\");\n getViewState().setData(photosList);\n }\n });\n }"
] | [
"0.691639",
"0.6702165",
"0.66437614",
"0.64927405",
"0.6365058",
"0.620671",
"0.6140558",
"0.6084896",
"0.6031376",
"0.5957156",
"0.59455943",
"0.5933842",
"0.5913158",
"0.5892678",
"0.5886245",
"0.58844405",
"0.58746886",
"0.5842658",
"0.58317393",
"0.58028924",
"0.5794243",
"0.5769313",
"0.5759302",
"0.5730041",
"0.5728251",
"0.571561",
"0.5675458",
"0.5650344",
"0.5643014",
"0.5632467",
"0.56225604",
"0.5590886",
"0.5590034",
"0.55894923",
"0.5578384",
"0.55773824",
"0.5562468",
"0.5535612",
"0.5525452",
"0.551718",
"0.5497984",
"0.5497924",
"0.5490925",
"0.54861313",
"0.5478736",
"0.54593956",
"0.54583585",
"0.54475564",
"0.5442752",
"0.5417517",
"0.54058045",
"0.5403696",
"0.5403535",
"0.5400116",
"0.5399986",
"0.5392166",
"0.53894943",
"0.537435",
"0.53737426",
"0.5372996",
"0.5370759",
"0.5339567",
"0.5337881",
"0.53323823",
"0.5329491",
"0.53248084",
"0.532364",
"0.53230035",
"0.53229576",
"0.5312741",
"0.53105605",
"0.53009343",
"0.52976346",
"0.5291566",
"0.5282764",
"0.52782315",
"0.52749497",
"0.5273424",
"0.52693164",
"0.52654636",
"0.5262042",
"0.5256756",
"0.52459955",
"0.5244604",
"0.5239829",
"0.5237186",
"0.52360094",
"0.523367",
"0.52326703",
"0.52319723",
"0.52265257",
"0.5220735",
"0.52119035",
"0.5200768",
"0.51988596",
"0.5197545",
"0.51838505",
"0.5182034",
"0.5179249",
"0.5171618"
] | 0.7362801 | 0 |
add out of order to events list | @Test
public void testExitCodes() throws Exception {
JsonEventInfoComparatorTest comparatorTest = new JsonEventInfoComparatorTest();
comparatorTest.setup();
testService.events.add(comparatorTest.farEvent);
testService.events.add(comparatorTest.fartherEvent);
testService.events.add(comparatorTest.closeEvent);
JsonEventInfo reference = new JsonEventInfo(comparatorTest.referenceEvent);
List<JsonEventInfo> sorted = testAssociator.getSortedNearbyEvents(
reference, null);
JsonEventInfo good = sorted.get(0);
JsonEventInfo bad = sorted.get(2);
// no events
Assert.assertEquals("no events",
EventIDAssociator.EXIT_EVENT_NOT_FOUND,
testAssociator.getExitCode(new ArrayList<JsonEventInfo>()));
// multiple events
Assert.assertEquals("multiple events",
EventIDAssociator.EXIT_MULTIPLE_EVENTS_FOUND,
testAssociator.getExitCode(sorted));
// one good event
sorted.clear();
sorted.add(good);
Assert.assertEquals("one good event",
EventIDAssociator.EXIT_SUCCESS,
testAssociator.getExitCode(sorted));
// one bad event
sorted.clear();
sorted.add(bad);
Assert.assertEquals("one bad event",
EventIDAssociator.EXIT_EVENT_NOT_SANE,
testAssociator.getExitCode(sorted));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setEvents(Event[] event) {\n\n setEventID(event[0].getEventID());\n\n //Store keys as EventID for later use to put it all in order\n Map<String, ArrayList<Event>> listMap = new HashMap<>();\n\n for (int i = 0; i < event.length; i++) {\n\n events.put(event[i].getEventID(), event[i]);\n eventTypes.add(event[i].getEventType().toLowerCase());\n\n if(!listMap.containsKey(event[i].getPersonID())) {\n ArrayList<Event> newEventList = new ArrayList<>();\n listMap.put(event[i].getPersonID(), newEventList);\n }\n listMap.get(event[i].getPersonID()).add(event[i]);\n }\n\n // Chronologically order for events\n for (String key : listMap.keySet()) {\n Set birthSet = new HashSet<>(); // birth events come first\n Set deathSet = new HashSet<>(); // death events come last (obviously)\n ArrayList<Event> eventList = new ArrayList<Event>();\n\n // Adding events in chronological order based on events\n for(int i = 0; i < listMap.get(key).size(); i++) {\n Event currEvent = listMap.get(key).get(i);\n\n if(currEvent.getEventType().toLowerCase().equals(\"birth\")) {\n birthSet.add(currEvent);\n } else if (currEvent.getEventType().toLowerCase().equals(\"death\")) {\n deathSet.add(currEvent);\n } else { // get events by year and sort them\n if(eventList.size() > 0) {\n if (currEvent.getYear() < eventList.get(0).getYear()) {\n eventList.add(0, currEvent);\n } else if (currEvent.getYear() >= eventList.get(eventList.size() - 1).getYear()) {\n eventList.add(currEvent);\n } else {\n for (int j = 0; j < eventList.size() - 1; j++) {\n if(eventList.get(j).getYear() <= currEvent.getYear() && eventList.get(j + 1).getYear() > currEvent.getYear()) {\n eventList.add(j + 1, currEvent);\n }\n }\n }\n } else {\n eventList.add(currEvent);\n }\n }\n }\n\n ArrayList<Event> orderedList = new ArrayList<Event>(); // will store ordered list for events\n\n orderedList.addAll(birthSet);\n orderedList.addAll(eventList);\n orderedList.addAll(deathSet);\n\n personEvents.put(key, orderedList);\n }\n }",
"public static void sortEvents(){\n if(events.size()>0){\n Comparator<Event> comp = new Comparator<Event>(){\n public int compare(Event e1, Event e2){\n if(e1.getEventStartTime().before(e2.getEventStartTime())){\n return -1;\n }\n else if(e1.getEventStartTime().after(e2.getEventStartTime())){\n return 1;\n }\n else{\n return 0;\n }\n }\n \n };\n Collections.sort(events, comp);\n \n }}",
"public void sortEvents() {\n\t\tCollections.sort(events);\n\t}",
"public void insert(List<Event> eventsList);",
"private static SortedEventList sortEvents(LinkedList<Event> events) {\n\t\tSortedEventList sorted = new SortedEventList(); // Creates a new SortedEventList.\n\t\tfor (Event event : events) { // Iterates foreach Event.\n\t\t\tsorted.insertInOrder(event); // Adds the Event into the new SortedEventList.\n\t\t}\n\t\treturn sorted; // Returns the SortedEventList.\n\t}",
"public void addEvent(Event newEvent) \n {\n ArrayList<Event> newEventList = new ArrayList<Event>();\n \n int counter = 0;\n \n for(int i = 0; i < eventList.size(); i++) \n {\n if(eventList.get(i).getTime() <= newEvent.getTime()) \n {\n newEventList.add(eventList.get(i));\n counter ++;\n }\n }\n \n newEventList.add(newEvent);\n \n for(int i = counter; i < eventList.size(); i++) \n {\n if(eventList.get(i).getTime() > newEvent.getTime()) \n {\n newEventList.add(eventList.get(i));\n }\n }\n eventList = newEventList;\n }",
"@Override\n\tpublic int getOrder() {\n\t\treturn CoreEvent.DEFAULT_ORDER - 1;\n\t}",
"public void sortEventsByValue() {\n for (OrgEvent event : events) {\n event.setCompareByTime(false);\n }\n Collections.sort(events);\n }",
"public void addCust(Event temp){\n eventLine.add(temp);\n }",
"public void addEvent(Event e){\r\n\t\tallEvents.add(e);\r\n\t}",
"public void addLongEvent(int order, Event event){\n LocalDate eventStart = event.getDateStart();\n\n boolean needsTitle = date.getDayOfWeek() == DayOfWeek.SUNDAY || eventStart.equals(date);\n boolean isContinuation = eventStart.isAfter(firstDate.minusDays(1)) && eventStart.isBefore(date);\n int cellWraps = 0;\n\n LocalDate temp = date;\n do{\n temp = temp.plusDays(1);\n cellWraps++;\n }while(temp.getDayOfWeek() != DayOfWeek.SUNDAY && event.occurs(temp));\n\n // Fill gaps with empty spaces\n while(order != longOrder){\n getChildren().add(new Blank(1, 20));\n longOrder++;\n }\n getChildren().add(new EventDisplay(event, needsTitle, isContinuation, cellWraps));\n longEvents.add(event);\n\n longOrder++;\n }",
"@Override\n public boolean add(T e) {\n if (elements.add(e)) {\n ordered.add(e);\n return true;\n } else {\n return false;\n }\n }",
"FutureEventList() {\n q = new PriorityQueue<Event>(10, new EventComperator());\n }",
"public List<ServiceEvent> genEventQueue(){\n for(int i=0; i<serviceNum; i++){\n genEvent(i);\n }\n Collections.sort(eventQueue, new EventComparator());\n return eventQueue;\n }",
"public static void InsertEvent(Event newEvent){\r\n\t int index=0;\r\n\t while (newEvent.date > alteredEventsFile.get(index).date ){\r\n\t\t index++;\r\n\t }\r\n\t alteredEventsFile.add(index, newEvent);\r\n }",
"public void addEvents(List<TimelineEvent> events) {\n this.events.addAll(events);\n }",
"public static void printAllEventListInSortedOrder(){\n sortEvents();\n for(int i=0;i<events.size();i++){\n System.out.println((events.get(i).getMonth()+1)+\"/\"+events.get(i).getDate()+\"/\"+events.get(i).getYear()+\" \"+events.get(i).getStringStartandFinish()+\" \"+events.get(i).getEventTitle());\n }\n }",
"public void sortEventsByTime() {\n for (OrgEvent event : events) {\n event.setCompareByTime(true);\n }\n Collections.sort(events);\n }",
"public void addEvent(Event t, Room r, ArrayList<Speaker> s, LocalDateTime start, LocalDateTime end){\n EventMapFeatures q = new EventMapFeatures(r, s, start, end);\n eventMap.put(t, q);\n eventList.add(t);\n Collections.sort(eventList, Comparator.comparing(Event::getStartTime));\n eventIdsList.clear();\n for (Event e : eventList){\n eventIdsList.add(e.getEventId());\n }\n }",
"public synchronized void pushEvents(Event[] events) {\r\n\r\n\t\tif (null == events) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tfor (Event event : events) {\r\n\t\t\tif (!this.events.containsKey(event.getTime())) {\r\n\t\t\t\tthis.events.put(new Long(event.getTime()), new ArrayList<Event>());\r\n\t\t\t}\r\n\t\t\tthis.events.get(event.getTime()).add(event);\r\n\t\t}\r\n\t}",
"public void swapEventQueues ()\r\n {\n myNextEventQueue.addAll(0, myCurrentEventQueue);\r\n myCurrentEventQueue.clear();\r\n\r\n LinkedList<IFiredEvent> temp = myCurrentEventQueue;\r\n\r\n myCurrentEventQueue = myNextEventQueue;\r\n // for memory efficiency, recycle the old queue\r\n myNextEventQueue = temp;\r\n myNextEventQueue.clear();\r\n }",
"static <T> void addTimeOrdered(List<T> source, TimestampSelector<T> selector, T toAdd) {\n int index = source.size() - 1;\n long timeToAdd = selector.select(toAdd);\n long last = selector.select(source.get(index));\n\n if(timeToAdd < last) {\n while(index > 0) {\n if(timeToAdd < last) {\n index--;\n last = selector.select(source.get(index));\n } else {\n index++;\n break;\n }\n }\n source.add(index, toAdd);\n } else {\n source.add(++index, toAdd);\n }\n }",
"public void addEvent()\n throws StringIndexOutOfBoundsException, ArrayIndexOutOfBoundsException {\n System.out.println(LINEBAR);\n try {\n String taskDescription = userIn.split(EVENT_IDENTIFIER)[DESCRIPTION].substring(EVENT_HEADER);\n String timing = userIn.split(EVENT_IDENTIFIER)[TIMING];\n Event event = new Event(taskDescription, timing);\n tasks.add(event);\n storage.writeToFile(event);\n ui.echoUserInput(event, tasks.taskIndex);\n } catch (StringIndexOutOfBoundsException e) {\n ui.printStringIndexOOB();\n } catch (ArrayIndexOutOfBoundsException e) {\n ui.printArrayIndexOOB();\n }\n System.out.println(LINEBAR);\n }",
"public boolean shouldPushOrderByOut() {\n return true;\n }",
"void addEvent(String name, int[] startDate, int[] endDate, boolean visible, String notes) {\n\n// index of the current node (event)\n int current = 0;\n\n// loops through Events until it has an earlier date than the next Event, adds new Event\n for (Event event : events) {\n if (wasSooner(startDate, event.startDate)) {\n events.add(current, new Event(this, name, startDate, endDate, visible, notes));\n return;\n }\n current++;\n }\n events.add(current, new Event(this, name, startDate, endDate, visible, notes));\n }",
"private void forwardChanges(ListChangeListener.Change<? extends CalendarEvent> c) {\n while (c.next()) {\n if (c.wasRemoved()) {\n for (CalendarEvent removedEvent : c.getRemoved()) {\n agenda.appointments().remove(removedEvent);\n }\n }\n if (c.wasAdded()) {\n for (CalendarEvent addedEvent : c.getAddedSubList()) {\n addedEvent.setAppointmentGroup(appointmentGroup);\n agenda.appointments().add(c.getFrom(), addedEvent);\n }\n }\n }\n }",
"void parseEventList() {\n\t\tfor (int eventsId : events.keySet()) {\n\t\t\tfinal Event event = events.get(eventsId);\n\t\t\tif (users.get(event.getUser().getName()).isActiveStatus()\n\t\t\t\t\t&& !event.isViewed()\n\t\t\t\t\t&& event.getInnerSisdate().compareTo(\n\t\t\t\t\t\t\tnew GregorianCalendar()) >= 0) {\n\t\t\t\tevent.setViewed(true);\n\t\t\t\tfinal SimpleDateFormat fm = new SimpleDateFormat(\n\t\t\t\t\t\t\"dd.MM.yyyy-HH:mm:ss\");\n\t\t\t\tt.schedule(new TimerTask() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tif (event.isActive()) {\n\t\t\t\t\t\t\tgenerateEventMessage(\"User \"\n\t\t\t\t\t\t\t\t\t+ event.getUser().getName()\n\t\t\t\t\t\t\t\t\t+ \" \"\n\t\t\t\t\t\t\t\t\t+ fm.format(event.getInnerSisdate()\n\t\t\t\t\t\t\t\t\t\t\t.getTime()) + \" \" + event.getText());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}, event.getInnerSisdate().getTime());\n\n\t\t\t}\n\t\t}\n\n\t}",
"@Test\n\tpublic void testAssociatorSort() throws Exception {\n\t\t// add out of order to events list\n\t\tJsonEventInfoComparatorTest comparatorTest = new JsonEventInfoComparatorTest();\n\t\tcomparatorTest.setup();\n\t\ttestService.events.add(comparatorTest.farEvent);\n\t\ttestService.events.add(comparatorTest.fartherEvent);\n\t\ttestService.events.add(comparatorTest.closeEvent);\n\n\t\tJsonEventInfo reference = new JsonEventInfo(comparatorTest.referenceEvent);\n\t\tList<JsonEventInfo> sorted = testAssociator.getSortedNearbyEvents(\n\t\t\t\treference, null);\n\t\tAssert.assertEquals(\"closest event first\",\n\t\t\t\tcomparatorTest.closeEvent, sorted.get(0).getEvent());\n\t\tAssert.assertEquals(\"farther event last\",\n\t\t\t\tcomparatorTest.fartherEvent,\n\t\t\t\tsorted.get(testService.events.size() - 1).getEvent());\n\n\t\tSystem.err.println(testAssociator.formatOutput(reference, null, sorted));\n\t}",
"public void addEventInventoryList (List<Inventory> eventInventoryList) {\n requireNonNull(eventInventoryList);\n\n for (Inventory item : eventInventoryList) {\n\n Optional<Inventory> optional = this.list.stream().filter(item::isSameInventory).findAny();\n\n if (optional.isPresent()) {\n\n Inventory existingItem = optional.get();\n\n\n //This item is already in a different event\n if (existingItem.getEventInstances() > 0) {\n existingItem.setEventInstances(existingItem.getEventInstances() + 1);\n } else {\n existingItem.setIsRemovable(false);\n existingItem.setEventInstances(1);\n }\n\n } else {\n item.setIsRemovable(false);\n item.setEventInstances(1);\n this.list.add(item);\n }\n\n }\n }",
"private List<Event> generateEvents() {\n\t\tList<Event> events = new ArrayList<Event>();\n\t\tint numEvents = random.nextInt(2) + 1;\n\t\tfor (int i = 0; i < numEvents; i++) {\n\t\t\tEvent newEvent = null;\n\t\t\tdo {\n\t\t\t\tnewEvent = new Event(db);\n\t\t\t} while (events.contains(newEvent)); // make sure only one instance of an event occurs per turn\n\t\t\tevents.add(newEvent);\t\t\t\n\t\t}\n\t\treturn events;\n\t}",
"public ArrayList<Event> getEvents(){return new ArrayList<Event>(events);}",
"public void createEvent(Event e) {\n\t\tLocalDate date = e.sDate;\n\t\tif(!map.containsKey(date)) {\n\t\t\tArrayList<Event> newList = new ArrayList<>();\n\t\t\tnewList.add(e);\n\t\t\tmap.put(date, newList);\n\t\t}\n\t\telse {\n\t\t\tmap.get(date).add(e);\n\n\t\t}\n\t}",
"public String arrangeEvents() throws Exception {\n JSONArray scheduledEventList = calObj.retrieveEvents(\"primary\").getJSONArray(\"items\");\n JSONArray unScheduledEventList = calObj.retrieveEvents(this.user.getCalId()).getJSONArray(\"items\");\n\n //Filter events for this week\n\n\n //Make a list of all events\n\n //Prioritise all unscheduled events\n\n\n //Send the list to client to display\n String events = \"\";\n for (int i = 0; i < scheduledEventList.length(); i++) {\n org.json.JSONObject jsonLineItem = scheduledEventList.getJSONObject(i);\n events += jsonLineItem.getString(\"summary\") + \" \" + jsonLineItem.getJSONObject(\"start\").getString(\"dateTime\") + \"\\n\";\n }\n // Unscheduled events set in bot created aPAS calendar\n for (int i = 0; i < unScheduledEventList.length(); i++) {\n org.json.JSONObject jsonLineItem = unScheduledEventList.getJSONObject(i);\n events += jsonLineItem.getString(\"summary\") + \" \" + jsonLineItem.getJSONObject(\"start\").getString(\"dateTime\") + \"\\n\";\n }\n return events;\n }",
"public void addEvent(String date, String name, String start, String end) {\n\n // Create event based on the parameters\n Event event = new Event(name, start, end);\n\n Boolean foundEventList = false;\n\n for (EventList e : events) {\n if (e.getDate().equals(date)) {\n e.add(event);\n foundEventList = true;\n break;\n }\n }\n\n if (!foundEventList) {\n EventList eventList = new EventList(date);\n eventList.add(event);\n events.add(eventList);\n }\n\n update();\n }",
"private void execute() {\n this.waitForFinish();\n this.stop();\n logger.info(\"Finished eventing test {}\", this.getClass().getSimpleName());\n Event currentEvent = null;\n Map<Long, Integer> orderVerifyMap = new HashMap<Long, Integer>();\n while((currentEvent =eventRecievedList.poll()) != null)\n {\n \tInteger index = (Integer)currentEvent.getProperty(\"index\");\n \tLong threadId = (Long)currentEvent.getProperty(\"thread\");\n\n \tif(index != null && threadId != null){\n \t\tInteger previousIndex = orderVerifyMap.get(threadId);\n \t\tif(previousIndex == null)\n \t\t{\n \t\t\tif(index != 0)\n \t\t\t{\n \t\t\t\tSystem.out.println(\"Event \" + index + \" recieved first for thread \" + threadId);\n \t\t\t}\n \t\t\torderVerifyMap.put(threadId, index);\n \t\t}\n \t\telse\n \t\t{\n \t\t\tif(previousIndex > index)\n \t\t\t{\n \t\t\t\tSystem.out.println(\"Events for thread \" + threadId + \" out of order. Event \" + previousIndex + \" recieved before \" + index);\n \t\t\t}\n \t\t\telse\n \t\t\t{\n \t\t\t\torderVerifyMap.put(threadId, index);\n \t\t\t}\n \t\t}\n \t}\n }\n try {\n Thread.sleep(15 * 1000);\n } catch (final InterruptedException ie) {\n // ignore\n }\n }",
"public static void main(String[] args) {\n List<Evento> listadoEventos = Evento.createShortList();\n List<Expositor> listadoExpositores = Expositor.createShortList();\n List<Asistente> Asistentes = Asistente.createShortList();\n //Asigno a los eventos sus expositores\n listadoEventos.get(0).setExpositor(listadoExpositores.get(0));\n listadoEventos.get(1).setExpositor(listadoExpositores.get(1));\n listadoEventos.get(2).setExpositor(listadoExpositores.get(2));\n listadoEventos.get(3).setExpositor(listadoExpositores.get(3));\n listadoEventos.get(4).setExpositor(listadoExpositores.get(4));\n listadoEventos.get(5).setExpositor(listadoExpositores.get(5));\n //Asigno los asistentes a los eventos\n listadoEventos.get(0).getListaAsistentes().add(Asistentes.get(0));\n listadoEventos.get(0).getListaAsistentes().add(Asistentes.get(1));\n\n listadoEventos.get(1).getListaAsistentes().add(Asistentes.get(2));\n\n listadoEventos.get(2).getListaAsistentes().add(Asistentes.get(3));\n\n listadoEventos.get(3).getListaAsistentes().add(Asistentes.get(4));\n listadoEventos.get(3).getListaAsistentes().add(Asistentes.get(5));\n\n listadoEventos.get(4).getListaAsistentes().add(Asistentes.get(6));\n\n listadoEventos.get(5).getListaAsistentes().add(Asistentes.get(7));\n listadoEventos.get(5).getListaAsistentes().add(Asistentes.get(8));\n listadoEventos.get(5).getListaAsistentes().add(Asistentes.get(9));\n\n //2A: Listado de manera ordenado por titulo descendiente, expositor y asistentes.\n\n Comparator<Integer> comparador = Collections.reverseOrder();\n\n //Ordenar de forma descendente por titulo\n Collections.sort(listadoEventos, (o1, o2) -> o2.getTitulo().compareTo(o1.getTitulo()));\n\n System.out.println(\"======Prueba 01 - Listado de eventos======\");\n for(Evento e:listadoEventos){\n System.out.println(\"****************************************\");\n System.out.println(\"Evento: \"+e.getTitulo());\n System.out.println(\"Expositor: \"+e.getExpositor().getNombre());\n System.out.println(\"Asistentes:\");\n for(Asistente a : e.getListaAsistentes()){\n System.out.println(a.getCodigo()+\"\\t\"+a.getNombre()+\"\\t\"+a.getApellidos());\n }\n }\n\n }",
"default List<Event> sort(List<Event> events, Comparator<Event> cmp) {\n\t\tCollections.sort(events, cmp);\n\t\treturn events;\n\t}",
"public void addEvent(Event event) {\n if (numEvents > maxLength - 1) {\n System.out.println(\"Heap is full. Exiting..\");\n System.exit(0);\n }\n eventArray[numEvents++] = event;\n siftUp(numEvents - 1);\n\n }",
"com.walgreens.rxit.ch.cda.EIVLEvent addNewEvent();",
"@Override\n public Set<Event> getNextEvents(LocalDateTime to) {\n return null;\n }",
"protected void sort(@NotNull ArrayList<Event<?>> events) {\n\t\tevents.sort(new Comparator<Event<?>>() {\n\t\t\t@Override\n\t\t\tpublic int compare(Event<?> e1, Event<?> e2) {\n\t\t\t\tif (e1.getEnd() < e2.getStart())\n\t\t\t\t\treturn -1;\n\t\t\t\telse\n\t\t\t\t\treturn 1;\n\t\t\t}\n\t\t});\n\t\tsnap(this.events);\n\t}",
"public void addEvent(Event event) {\n\t\t\n\t}",
"@Override\n\tpublic void inorder() {\n\n\t}",
"@Override\n public void postPriorityEvent(Event event)\n {\n priorityQueue.offer(event);\n }",
"public void add(IEvent event){\r\n\t\tqueue.add(event);\r\n\t}",
"public TaskBookBuilder addUnfinishedEventTasks() {\n final Iterable<EventTask> taskList = (new TypicalEventTasks()).getEventTasks();\n final List<EventTask> toAdd = new ArrayList<EventTask>();\n TaskUnfinishedPredicate predicate = new TaskUnfinishedPredicate(referenceDateTime);\n for (EventTask eventTask : taskList) {\n if (predicate.test(eventTask)) {\n toAdd.add(eventTask);\n }\n }\n return addEventTasks(toAdd);\n }",
"private void addClubEvent (ClubEvent clubEvent) {\n position = clubEventList.add (position.getClubEvent());\n if (position.hasValidIndex (clubEventList)) {\n writer.save(eventsFile, clubEvent, true, false);\n positionAndDisplay();\n }\n }",
"private void initEvents(){\n ArrayList<Event> en = new ArrayList();\n en.add(new Event_MessangerOfGods(this.village));\n en.add(new Event_PaganPriest(this.village));\n this.events = en;\n }",
"public void addEvPEC(Event ev);",
"public void addEvent(String s, boolean isLast) {\r\n\t\tevents.add(s);\r\n\t\tif (events.size() > 12) events.remove(0);\r\n\t\tif (isLast) {\r\n\t\t\tupdateEvents(false);\r\n\t\t}\r\n\t}",
"private void createEvents() {\n\t}",
"private void copyComponentEvents(String aEvType, List aList, ProcessTrace aPTr)\n throws IOException {\n String typeS;\n\n for (int i = 0; i < aList.size(); i++) {\n ProcessTraceEvent prEvent = (ProcessTraceEvent) aList.get(i);\n typeS = prEvent.getType();\n if (aEvType != null && aEvType.equals(typeS)) {\n aPTr.addEvent(prEvent);\n }\n }\n }",
"private void prepareData() {\n eventList = databaseHandler.getLatestDistinctEvents(prefs.getString(KEY_SORT_FIELD, \"name\"),\n prefs.getBoolean(KEY_SORT_ORDER_ASCENDING, true));\n\n // Send list to adapter\n eventLogAdapter.updateData(eventList);\n }",
"public static void eventList() {\n\t\tfor (Map.Entry<Calendar, TreeSet<Event>> entry : calendarToEvent.entrySet()) {\n\t\t\tTreeSet<Event> value = entry.getValue();\n\t\t\tfor (Event e: value) {\n\t\t\t\tSystem.out.println(e.toString());\n\t\t\t}\n\t\t}\n\t}",
"public void onOrderAdded(OrderEntry orderEntry);",
"@Override\n public void postEvent(Event event)\n {\n normalQueue.offer(event);\n }",
"private void toBeAddedEntities()\n\t{\n\t\tif( entitiesToAdd.isEmpty() )\n\t\t{\n\t\t\treturn ;\n\t\t}\n\n\t\tfinal List<Event<?>> events = MalletList.<Event<?>>newList() ;\n\n\t\tfinal int size = entitiesToAdd.size() ;\n\t\tfor( int i = 0; i < size; ++i )\n\t\t{\n\t\t\tfinal Entity entity = entitiesToAdd.get( i ) ;\n\t\t\thookEntity( eventSystem, events, entity ) ;\n\t\t\tentities.add( entity ) ;\n\t\t}\n\t\tentitiesToAdd.clear() ;\n\t\t\n\t\tif( size > capacity )\n\t\t{\n\t\t\t// If the size of entitiesToAdd exceeds our capacity then \n\t\t\t// we want to resize the array - it's easy for an \n\t\t\t// array to expand, it's much harder to shrink it!\n\t\t\tentitiesToAdd = MalletList.<Entity>newList( capacity ) ;\n\t\t}\n\t}",
"public void envoyerEvenements()\n {\n AWTEvent evenement;\n\n for (int i = 0; i < lstEvenements.size(); i++)\n {\n synchronized (lstEvenements)\n {\n evenement = (AWTEvent) lstEvenements.removeFirst();\n }\n traiteur.gererEvenement(evenement);\n }\n }",
"@Test\n public void cancelEventsBySizeNonzero(){\n List<String> s1=new ArrayList<>();\n s1.add(\"sSeyon\");\n List<String> a1=new ArrayList<>();\n a1.add(\"aHelen\");\n List<String> s2=new ArrayList<>();\n s2.add(\"sSeyon\");\n s2.add(\"sHelen\");\n List<String> a2=new ArrayList<>();\n a2.add(\"aHelen\");\n a2.add(\"aLeo\");\n List<String> s3=new ArrayList<>();\n List<String> a3=new ArrayList<>();\n\n\n es.addEvent(EventType.SINGLE_SPEAKER_EVENT, 3, \"CSC207\",t1,t2,\"HL205\",\n s1,a1);\n es.addEvent(EventType.MULTI_SPEAKER_EVENT,5,\"MAT224\",t3,t4,\"Bahen\",\n s2,a2);\n es.addEvent(EventType.NO_SPEAKER_EVENT,6,\"Party\",t5,t6,\"Party Room\",\n s3,a3);\n\n //cancels the 2-speakers event\n assertTrue(es.cancelEventsBySize(2, true));\n assertEquals(2,es.getListEvents().size());\n HashMap<String,String> expected1 = toMap(EventType.SINGLE_SPEAKER_EVENT, 3, \"CSC207\",t1,t2,\"HL205\",\n s1,a1);\n HashMap<String,String> actual1 = listToMap(es.getListEvents().get(0));\n assertEquals(expected1,actual1);\n HashMap<String,String> expected2 = toMap(EventType.NO_SPEAKER_EVENT,6,\"Party\",t5,t6,\"Party Room\",\n s3,a3);\n HashMap<String,String> actual2 = listToMap(es.getListEvents().get(1));\n assertEquals(expected2,actual2);\n\n // this leaves only the non_speaker event left\n assertTrue(es.cancelEventsBySize(1, true));\n assertEquals(1,es.getListEvents().size());\n HashMap<String,String> expected3 = toMap(EventType.NO_SPEAKER_EVENT,6,\"Party\",t5,t6,\"Party Room\",\n s3,a3);\n HashMap<String,String> actual3 = listToMap(es.getListEvents().get(0));\n assertEquals(expected3,actual3);\n }",
"private void addOrderByItem(Object theNode) {\n getOrderByItems().add(theNode);\n }",
"public static synchronized void insert(JeyEvent e) {\n queue.addLast(e);\r\n EventQueue.class.notifyAll();\r\n }",
"public void addEvent(Event e) {\n\t\t\n\t}",
"public void addEvent(Event e) {\n\t\t\n\t}",
"public void addEvent(String eventString) {\n String eventInfo[] = eventString.split(\",\");\n if (eventInfo[EVENT_TYPE_POS_IN_EVENT_STRING].equals(DelayEvent.DELAY_EVENT)) {\n int delay = Integer.parseInt(eventInfo[DELAY_POS_IN_EVENT_STRING]);\n events.add(new DelayEvent(delay));\n } else {\n int spawnNumber = Integer.parseInt(eventInfo[SLICER_NUMBER_POS_IN_EVENT_STRING]);\n String slicerType = eventInfo[SLICER_TYPE_POS_IN_EVENT_STRING];\n int spawnDelay = Integer.parseInt(eventInfo[SPAWN_DELAY_IN_EVENT_STRING]);\n events.add(new SpawnEvent(spawnNumber, slicerType, spawnDelay));\n }\n }",
"public static synchronized void insert(IEvent e) {\n queue.addLast(e);\r\n EventQueue.class.notifyAll();\r\n }",
"public void printEeventList() {\n PriorityQueue<Event> events = this.getEventList();\n while (!events.isEmpty()) {\n Event event = events.poll();\n if (!(event instanceof ServerRestEvent || event instanceof ServerBackEvent)) {\n System.out.println(event);\n }\n\n }\n }",
"void arrangeTask(Task task) {\n if (task.isReverseScheduled())\n\t\t\tnumberOfReverseScheduledTasks++;\n \ttask.setMarkerStatus(markerStatus);\n TaskReference previousTaskReference;\n \tTask previousTask;\n // go thru in reverse order inserting after first predecessor or parent encountered\n ListIterator i = list.listIterator();\n TaskReference taskReference = new TaskReference(task);\n while (i.hasNext()) {\n \tpreviousTaskReference = (TaskReference)i.next();\n \tpreviousTask = previousTaskReference.getTask();\n if (task.getWbsParentTask() == previousTask) {\n \ti.add(taskReference);\n return;\n }\n }\n i.previous(); // add before end sentinel\n i.add(taskReference);\n }",
"@Override\n public void addOrder(Order o) {\n orders.add(o);\n }",
"void storeEvents()\n {\n this.storedPresences = new ArrayList<Presence>();\n this.storeEvents = true;\n }",
"void addSimultaneousEvent(GameEvent event);",
"@Override\n\tpublic void placeOrder() {\n\t\t\n\t}",
"public List<List<PvPEvent>> defineNextEvents(String day, int serverHour, List<\n PvPEvent> events) {\n String[] days = defineDaysLine(day);\n\n List<List<PvPEvent>> testDefinedEvents = new ArrayList<>();\n List<PvPEvent> innerEventsCurrent = new ArrayList<>();\n List<PvPEvent> innerEvents1h = new ArrayList<>();\n List<PvPEvent> innerEvents2h = new ArrayList<>();\n List<PvPEvent> innerEvents3h = new ArrayList<>();\n\n for (int i = 0; i < 10; i++) {\n innerEventsCurrent.add(new PvPEvent(Const.NO_EVENT_ID, getString(R.string.no_event_name)));\n innerEvents1h.add(new PvPEvent(Const.NO_EVENT_ID, getString(R.string.no_event_name)));\n innerEvents2h.add(new PvPEvent(Const.NO_EVENT_ID, getString(R.string.no_event_name)));\n innerEvents3h.add(new PvPEvent(Const.NO_EVENT_ID, getString(R.string.no_event_name)));\n }\n\n for (PvPEvent e : events) {\n String currentDay = days[0];\n for (int i = 0; i < e.getTime().size(); i++) {\n if (currentDay.equals(e.getTime().get(i).getDay())) {\n if (serverHour == e.getTime().get(i).getBeginTime() ||\n (e.getTime().get(i).getBeginTime() < serverHour && e.getTime().get(i).getEndTime() > serverHour) &&\n e.getTime().get(i).getEndTime() < serverHour + 3) {\n if (innerEventsCurrent.size() == 10) {\n innerEventsCurrent.clear();\n }\n innerEventsCurrent.add(e);\n }\n if ((serverHour + 1) == e.getTime().get(i).getBeginTime() ||\n (e.getTime().get(i).getBeginTime() < (serverHour + 1) && e.getTime().get(i).getEndTime() > (serverHour + 1) &&\n e.getTime().get(i).getEndTime() < serverHour + 4)) {\n if (innerEvents1h.size() == 10) {\n innerEvents1h.clear();\n }\n innerEvents1h.add(e);\n }\n if ((serverHour + 2) == e.getTime().get(i).getBeginTime() ||\n (e.getTime().get(i).getBeginTime() < (serverHour + 2) && e.getTime().get(i).getEndTime() > (serverHour + 2) &&\n e.getTime().get(i).getEndTime() < serverHour + 5)) {\n if (innerEvents2h.size() == 10) {\n innerEvents2h.clear();\n }\n innerEvents2h.add(e);\n }\n if ((serverHour + 3) == e.getTime().get(i).getBeginTime() ||\n (e.getTime().get(i).getBeginTime() < (serverHour + 3) && e.getTime().get(i).getEndTime() > (serverHour + 3) &&\n e.getTime().get(i).getEndTime() < serverHour + 6)) {\n if (innerEvents3h.size() == 10) {\n innerEvents3h.clear();\n }\n innerEvents3h.add(e);\n }\n }\n\n if (serverHour == 21) {\n currentDay = days[1];\n if (currentDay.equals(e.getTime().get(i).getDay())) {\n if (0 == e.getTime().get(i).getBeginTime() ||\n (e.getTime().get(i).getEndTime() == 2)) {\n if (innerEvents3h.size() == 10) {\n innerEvents3h.clear();\n }\n innerEvents3h.add(e);\n }\n }\n }\n if (serverHour == 22) {\n currentDay = days[1];\n if (currentDay.equals(e.getTime().get(i).getDay())) {\n if (0 == e.getTime().get(i).getBeginTime() ||\n (e.getTime().get(i).getEndTime() == 2)) {\n if (innerEvents3h.size() == 10) {\n innerEvents3h.clear();\n }\n innerEvents3h.add(e);\n }\n if (1 == e.getTime().get(i).getBeginTime() ||\n (e.getTime().get(i).getEndTime() == 2)) {\n if (innerEvents2h.size() == 10) {\n innerEvents2h.clear();\n }\n innerEvents2h.add(e);\n }\n }\n }\n if (serverHour == 23) {\n currentDay = days[1];\n if (currentDay.equals(e.getTime().get(i).getDay())) {\n if (0 == e.getTime().get(i).getBeginTime() ||\n (e.getTime().get(i).getEndTime() == 2)) {\n if (innerEvents3h.size() == 10) {\n innerEvents3h.clear();\n }\n innerEvents3h.add(e);\n }\n if (1 == e.getTime().get(i).getBeginTime() ||\n (e.getTime().get(i).getEndTime() == 2)) {\n if (innerEvents2h.size() == 10) {\n innerEvents2h.clear();\n }\n innerEvents2h.add(e);\n }\n if (2 == e.getTime().get(i).getBeginTime() ||\n (e.getTime().get(i).getEndTime() == 2)) {\n if (innerEvents1h.size() == 10) {\n innerEvents1h.clear();\n }\n innerEvents1h.add(e);\n }\n }\n }\n }\n }\n\n testDefinedEvents.add(0, innerEventsCurrent);\n testDefinedEvents.add(1, innerEvents1h);\n testDefinedEvents.add(2, innerEvents2h);\n testDefinedEvents.add(3, innerEvents3h);\n\n return testDefinedEvents;\n }",
"public void writeEvent(){\n for (int i = 0; i<eventlist.size();i++){\n try {\n FileWriter fw = new FileWriter(eventFile, true);\n BufferedWriter bw = new BufferedWriter(fw);\n bw.write(eventlist.get(i).getConfirm()); //this is the username of whoever is writing the event, which will be used as a confirmation later\n bw.newLine();\n bw.write(eventlist.get(i).getEventName());\n bw.newLine();\n bw.write(eventlist.get(i).getEventType());\n bw.newLine();\n bw.write(eventlist.get(i).getDescription());\n bw.newLine();\n bw.write(eventlist.get(i).getPriority());\n bw.newLine();\n bw.write(eventlist.get(i).getDate());\n bw.newLine();\n eventlist.clear(); //clears the ArrayList to prevent duplicate events showing up\n bw.close();\n //each event will take up 6 lines in the file\n }\n catch(IOException ex){\n ex.printStackTrace();\n System.out.println(\"Error writing to files\");\n }\n } \n \n }",
"public void add(Item nextItemToAdd) {\n items.add(nextItemToAdd);\n Collections.sort(items);\n fireIntervalAdded(nextItemToAdd, indexOf(nextItemToAdd), indexOf(nextItemToAdd));\n }",
"private void createEvents()\r\n\t{\r\n\t\teventsCount.add(new Event(RequestMethod.PUT, 0));\r\n\t\teventsCount.add(new Event(RequestMethod.GET, 0));\r\n\t\teventsCount.add(new Event(RequestMethod.POST, 0));\r\n\t}",
"void addToWhatsLeft(WhatsLeft whatsLeft, List<Event> eventsToAdd) throws Exception {\n for (Event p: eventsToAdd) {\n whatsLeft.addEvent(p);\n }\n }",
"public void addEvents(ArrayList<FbEvent> events) throws SQLException{\n\t\tSQLiteDatabase db = tableHelper.getWritableDatabase();\n\t\ttry {\n\t\t\tfor (FbEvent event : events) {\n\t\t\t\tContentValues contents = prepareContentValues(event);\n\t\t\t\tdb.insert(SQLTablesHelper.MY_EVENT_TABLE_NAME, null, contents);\n\t\t\t}\n\t\t} finally {\n\t\t\tdb.close();\n\t\t}\n\t}",
"public void addEvent(Event event) {\n events.add(event);\n }",
"@Test\n\tpublic void testSaveEvent() {\n\t\tEvent em = new Event();\n\t\tem.setDate(new Date());\n\t\tem.setName(\"JohnDeere Event13\");\n\t\tem.setTitle(\"No Title\");\n\t\tfor(int i=0;i<10;i++){\n\t\t\t/*Event e = new Event();\n\t\t\te.setDate(new Date());\n\t\t\te.setName(\"name\"+i);\n\t\t\te.setTitle(\"tile\"+i);\n\t\t\te.getEventList().add(em);\n\t\t\tem.getEventList().add(e);*/\n\t\t\tPeople p = new People();\n\t\t\tp.setName(\"Name\"+i);\n\t\t\tp.getEventList().add(em);\n\t\t\tem.getPeopleList().add(p);\n//\t\t\tpList.add(p);\n\t\t\t\n\t\t}\n//\t\tem.setPeopleList(pList);\n//\t\teventService.insert(em);\n\t\ter.save(em);\n\t\t// fail(\"Not yet implemented\");\n\t}",
"@Override\n public void add(PaintOrder order) {\n queue.add(order);\n queuedOrders ++;\n }",
"public void addEvent(TimelineEvent event) {\n events.add(event);\n }",
"private void pushNewEvent(Event e) {\n\t\tec.pushNewElement(e);\n\t}",
"public void addPutEvent()\r\n\t{\r\n\t\tfor(Event recordedEvent : eventsCount)\r\n\t\t{\r\n\t\t\tif(recordedEvent.getRequestType().equals(RequestMethod.PUT))\r\n\t\t\t{\r\n\t\t\t\trecordedEvent.setAccessCount(recordedEvent.getAccessCount() + 1);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public PriorityQueue<Event> getEventList() {\n return new PriorityQueue<Event>(eventsList);\n }",
"public static List<Event> generateExpiredEvents() {\n\t\tEvent event1 = Event.create(0);\r\n\t\tevent1.infoStore().add(Info.create(1, 2, 3));\r\n\t\tList<Event> events = new ArrayList<Event>();\r\n\t\tevents.add(event1);\r\n\t\treturn events;\r\n\t}",
"public void orderList(ArrayList<DefaultActivity> scheduleList) {\n\n }",
"public int placeToDo(ObjectListElement e){\n\t\t//ObjectListElement e = new ObjectListElement(id, name);\n\t\tallToDoLists.add(e);\n\t\tsortToDo();\n\t\treturn allToDoLists.indexOf(e);\n\t}",
"public boolean addEvent(Event event)\n {\n for(Event temp: events)\n {\n if(temp.isTimeConflict(event))\n {\n return false;\n }\n }\n\n this.events.add(event);\n return true;\n }",
"private void arrivedAdd(Passenger in) {\n\t\tif(counter >= capacity) {\n\t\t\tcapacity *= 2;\n\t\t\tPassenger[] temp = new Passenger[capacity];\n\t\t\tfor(int i = 0; i < arrivedOrder.length; i++) {\n\t\t\t\ttemp[i] = arrivedOrder[i];\n\t\t\t}\n\t\t\tarrivedOrder = temp;\n\t\t}\n\t\tarrivedOrder[counter] = in;\n\t}",
"public void enqueueEvent(InputEvent event) {\n events.add(event);\n }",
"@Override\n public void add(LocalDateTime date, List<Gadget> list) {\n orders.put(date, list);\n }",
"public void addReceived() {\n this.indexExpected++;\n }",
"public Event addEvent(Event event) {\n\t\t\tif (events == null) {\n\t\t\t\tevents = new ArrayList<Event>();\n\t\t\t}\n\t\t\tif (!events.contains(event)) {\n\t\t\t\tevents.add(event);\n\t\t\t\tevent.addClient(this);\n\t\t\t}\n\t\t\n\t\t\treturn event;\n\t\t}",
"private static List<EventNode> addNodesToGraph(ChainsTraceGraph g,\n String[] labels) {\n LinkedList<EventNode> list = new LinkedList<EventNode>();\n for (String label : labels) {\n Event act = new Event(label);\n EventNode e = new EventNode(act);\n g.add(e);\n list.add(e);\n }\n\n g.tagInitial(list.get(0), Event.defTimeRelationStr);\n return list;\n }",
"protected abstract void createHistoryEvents();",
"public void add(GameEvent e);",
"@Override\r\n\tpublic void addLast(E e) {\n\t\t\r\n\t}",
"private static void updateOrderOnRemove( int nOrderId )\n {\n for ( GroupAction groupActionChange : getGroupActionList( ) )\n {\n int nGroupActionToUpdateOrder = groupActionChange.getOrdre( );\n\n if ( ( nGroupActionToUpdateOrder > nOrderId ) )\n {\n groupActionChange.setOrdre( nGroupActionToUpdateOrder - CONSTANT_STEP_ORDER );\n _dao.store( groupActionChange, _plugin );\n }\n }\n }",
"public static void insertEventoIniciales(Activity activity) {\n //creamos el arraylist de eventos por defecto\n String ubicacion =\"38.97876, -3.92874\";\n ArrayList<Evento> listEvent = new ArrayList<>();\n listEvent.add(new Evento(\"Bautizo Vazquez\",\"Es un bautizo en la tarde, va a haber banquete, cocteles y entrega de regalos\",\"Bautizo\",1,8,ubicacion,\"10/06/2021\",\"5\",150.50));\n listEvent.add(new Evento(\"Bautizo Gomez\",\"Es un bautizo en la tarde, va a haber banquete, cocteles y entrega de regalos\",\"Bautizo\",1,8,ubicacion,\"15/06/2021\",\"5\",150.50));\n listEvent.add(new Evento(\"Bautizo Vazquez\",\"Es un bautizo en la tarde, va a haber banquete, cocteles y entrega de regalos\",\"Bautizo\",5,6,ubicacion,\"20/06/2021\",\"5\",150.50));\n listEvent.add(new Evento(\"Bautizo Gomez\",\"Es un bautizo en la tarde, va a haber banquete, cocteles y entrega de regalos\",\"Bautizo\",5,8,ubicacion,\"25/06/2021\",\"5\",150.50));\n listEvent.add(new Evento(\"Boda Vazquez\",\"Es un boda en la tarde, va a haber banquete, cocteles y entrega de regalos\",\"Boda\",5,6,ubicacion,\"21/06/2021\",\"5\",150.50));\n listEvent.add(new Evento(\"Boda Gomez\",\"Es un Boda en la tarde, va a haber banquete, cocteles y entrega de regalos\",\"Boda\",1,6,ubicacion,\"25/06/2021\",\"5\",150.50));\n listEvent.add(new Evento(\"Compromiso Vazquez\",\"Es un Compromiso en la tarde, va a haber banquete, cocteles y entrega de regalos\",\"Compromiso\",5,8,ubicacion,\"10/06/2021\",\"5\",150.50));\n listEvent.add(new Evento(\"Compromiso Gomez\",\"Es un Compromiso en la tarde, va a haber banquete, cocteles y entrega de regalos\",\"Compromiso\",1,8,ubicacion,\"15/06/2021\",\"5\",150.50));\n //hacemos la conexion a la bbdd\n ConexionBBDD connection = new ConexionBBDD(activity,\"bd_events\",null,2);\n //recorremos el arraylist\n for (Evento evento:listEvent) {\n //realizamos la insercion del evento\n connection.insertEvento(evento);\n }\n }",
"eList(eList newElist)\r\n {\r\n head = null;\r\n keyword = new String(newElist.keyword);\r\n for(eNode start = newElist.head; start != null; start = start.getNext())\r\n {\r\n eNode toInsert = new eNode(start);\r\n addEvent(toInsert);\r\n }\r\n }",
"@Override\n public void handleEvents(List<Event> processorEvents) {\n\n }"
] | [
"0.6454972",
"0.64303905",
"0.6383815",
"0.63774925",
"0.63503593",
"0.63382137",
"0.60055023",
"0.6004235",
"0.5989689",
"0.5969868",
"0.59303236",
"0.5921688",
"0.5917881",
"0.59082377",
"0.58908975",
"0.5852294",
"0.58269954",
"0.5826792",
"0.58176345",
"0.58164215",
"0.5811928",
"0.58104455",
"0.5803393",
"0.57608193",
"0.5759654",
"0.5726128",
"0.57060355",
"0.56986296",
"0.5695852",
"0.56841403",
"0.56774884",
"0.56769127",
"0.56245464",
"0.56110024",
"0.55832285",
"0.55766064",
"0.55757207",
"0.5574392",
"0.55694777",
"0.55633783",
"0.55572176",
"0.5556529",
"0.5513051",
"0.55081934",
"0.5493869",
"0.5492682",
"0.5489493",
"0.54777956",
"0.547671",
"0.54726636",
"0.545973",
"0.54563",
"0.5451352",
"0.54426384",
"0.54314804",
"0.5418073",
"0.5411598",
"0.54074085",
"0.53983057",
"0.5398272",
"0.5376718",
"0.5368493",
"0.5368493",
"0.53675234",
"0.5360806",
"0.53603196",
"0.5355461",
"0.53473336",
"0.53451204",
"0.533784",
"0.5335551",
"0.5322637",
"0.5316194",
"0.531543",
"0.53017884",
"0.529702",
"0.52945745",
"0.52765256",
"0.5269547",
"0.5266582",
"0.5258858",
"0.5257377",
"0.5250131",
"0.5249363",
"0.5245523",
"0.52443516",
"0.52365875",
"0.52340204",
"0.5229444",
"0.52219576",
"0.5217604",
"0.5215515",
"0.5211723",
"0.52058065",
"0.51998496",
"0.5195086",
"0.5193286",
"0.5184925",
"0.5178914",
"0.51566",
"0.5146297"
] | 0.0 | -1 |
serve a custom feed with multiple events | @Test
public void testSuccess() throws Exception {
EventWebServiceTest.TestingWebServer server =
new EventWebServiceTest.TestingWebServer(
5680,
"etc/testdata/detail.geojson");
server.start();
EventIDAssociator.main(new String[] {
// include lat and lon argument so it will run
EventIDAssociator.LATITUDE_ARGUMENT + "-4.9489",
EventIDAssociator.LONGITUDE_ARGUMENT + "102.3727",
// use testing web server to get data
EventIDAssociator.SERVICE_URL_ARGUMENT + "http://localhost:5680/"
});
server.stop();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void queryEvents() {\n ParseQuery<Event> query = ParseQuery.getQuery(Event.class);\n // include data referred by user key\n query.include(Event.KEY_HOST);\n // limit query to latest 20 items\n query.setLimit(30);\n // order posts by creation date (newest first)\n query.addDescendingOrder(\"createdAt\");\n // start an asynchronous call for events\n query.findInBackground(new FindCallback<Event>() {\n @Override\n public void done(List<Event> events, com.parse.ParseException e) {\n\n // check for errors\n if (e != null) {\n Log.e(TAG, \"Issue with getting posts\", e);\n return;\n }\n\n // for debugging purposes let's print every event description to logcat\n for (Event event : events) {\n Log.i(TAG, \"Event: \" + event.getDescription() + \", username: \" + event.getHost().getUsername());\n }\n\n // save received events to list and notify adapter of new data\n allEvents.addAll(events);\n }\n\n });\n }",
"public void processOffers(List<OfferPublishedEvent> events) {\n }",
"public void publishEvents() {\n Bundle params = new Bundle();\n params.putString(\"name\", \"Reserva Cancha Finder\");\n params.putString(\"caption\", \"CanchaFinder\");\n params.putString(\"description\", Seleccion);\n params.putString(\"link\", \"http://www.solweb.co/reservas/CanchaFinder/index.php\");\n params.putString(\"picture\",\"http://www.solweb.co/reservas/api_movil/ic_launcher.png\");\n\n WebDialog feedDialog = (new WebDialog.FeedDialogBuilder(this,currentSession, params))\n .setOnCompleteListener(new WebDialog.OnCompleteListener() {\n\n @Override\n public void onComplete(Bundle values,FacebookException error) {\n if (error == null) {\n // When the story is posted, echo the success\n // and the post Id.\n final String postId = values.getString(\"post_id\");\n if (postId != null) {\n // do some stuff\n } else {\n // User clicked the Cancel button\n Toast.makeText(getApplicationContext(),\n \"Publish cancelled\", Toast.LENGTH_SHORT).show();\n }\n } else if (error instanceof FacebookOperationCanceledException) {\n // User clicked the \"x\" button\n Toast.makeText(getApplicationContext(),\n \"Publish cancelled\", Toast.LENGTH_SHORT).show();\n } else {\n // Generic, ex: network error\n Toast.makeText(getApplicationContext(),\n \"Error posting story\", Toast.LENGTH_SHORT).show();\n }\n }\n\n }).setFrom(\"\").build();\n feedDialog.show();\n\n }",
"@Override\r\n public void receiveStoryItems(String socialType, int feedType, List<StoryItemUnit> items, boolean isResponseByRefresh, boolean isFirstTimeUpdate) throws RemoteException {\n\r\n }",
"@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tgetGmailAtomFeed(access_token,token_type);\t\t\t\t\t\n\t\t\t\t}",
"@SuppressWarnings(\"unchecked\")\n @Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp)\n throws IOException {\n resp.setStatus(204);\n\n SyndFeed feed = Feeds.parseFeed(req.getInputStream());\n if (feed == null) {\n return;\n }\n \n List<SyndEntry> entries = feed.getEntries();\n \n if (entries.isEmpty()) {\n return;\n } \n \n JID user = new JID(req.getPathInfo().substring(1));\n // TODO(mihaip): this is potentially incorrect if a feed gets redirected and\n // its self URL changes since the time the subscription was created\n List<URL> feedUrls = Feeds.getLinkUrl(feed, Feeds.SELF_RELATION); \n if (!feedUrls.isEmpty()) {\n URL feedUrl = feedUrls.get(0);\n List<Subscription> subscriptions =\n Subscription.getSubscriptionsForUserAndFeedUrl(user, feedUrl);\n \n if (!subscriptions.isEmpty()) {\n final Subscription subscription = subscriptions.get(0);\n Set<String> seenEntryIds = subscription.getSeenEntryIds();\n List<String> newEntryIds = Lists.newArrayList();\n List<SyndEntry> filteredEntries = Lists.newArrayList();\n for (SyndEntry entry : entries) {\n String entryId = Feeds.getEntryId(entry);\n if (seenEntryIds.contains(entryId)) {\n logger.info(\"Filtering out already seen entry from \" + feedUrl);\n continue;\n }\n filteredEntries.add(entry);\n newEntryIds.add(entryId);\n }\n \n if (!filteredEntries.isEmpty()) {\n subscription.addSeenEntryIds(newEntryIds);\n Persistence.withManager(new Persistence.Closure() {\n @Override public void run(PersistenceManager manager) {\n manager.makePersistent(subscription);\n }\n });\n } else {\n return;\n }\n \n entries = filteredEntries;\n } else {\n logger.warning(\"Got notification for feed without subscription \" + feedUrl);\n }\n }\n \n \n // If subscribing to a previously unseen URL, the hub might report a bunch\n // of entries as new, so we sort them by published date and only show the\n // first few\n Collections.sort(entries, new Comparator<SyndEntry>() {\n @Override public int compare(SyndEntry o1, SyndEntry o2) {\n if (o1.getPublishedDate() == null) {\n return 1;\n }\n if (o2.getPublishedDate() == null) {\n return -1;\n }\n return o2.getPublishedDate().compareTo(o1.getPublishedDate());\n }\n });\n \n List<SyndEntry> displayEntries;\n if (entries.size() > MAX_ENTRIES_TO_DISPLAY) {\n displayEntries = entries.subList(0, MAX_ENTRIES_TO_DISPLAY);\n } else {\n displayEntries = entries;\n }\n \n StringBuilder message = new StringBuilder(\"Update from \")\n .append(StringEscapeUtils.unescapeHtml4(feed.getTitle())).append(\":\");\n for (SyndEntry displayEntry : displayEntries) {\n String title = displayEntry.getTitle();\n if (Strings.isNullOrEmpty(title)) {\n title = \"(title unknown)\";\n } else {\n title = StringEscapeUtils.unescapeHtml4(title);\n }\n String link = displayEntry.getLink();\n if (Strings.isNullOrEmpty(link)) {\n link = \"<no link>\";\n }\n \n message.append(\"\\n \").append(title).append(\": \").append(link);\n }\n \n if (displayEntries.size() != entries.size()) {\n message.append(\"\\n (and \")\n .append(entries.size() - displayEntries.size()).append(\" more)\");\n }\n \n Xmpp.sendMessage(user, message.toString());\n }",
"public interface PostListResponseListener {\n void fireInitData(List<Post> posts);\n}",
"@Override\n public void run() {\n ArrayList<Tweet> tweets = getTweets();\n int numTweets = tweets.size();\n long id = tweets.get(numTweets - 1).mUid - 1;\n Log.d(TAG, \"Requested items id starting at id = \" + id);\n populateHomeTimelineFromId(id);\n }",
"void handle(List<FeedEntry> feedEntryBatch);",
"private void getDataFromApi() throws IOException {\n DateTime now = new DateTime(System.currentTimeMillis());\n Events events = mService.events().list(\"primary\")\n .setTimeMin(now)\n .setOrderBy(\"startTime\")\n .setSingleEvents(true)\n .execute();\n List<Event> items = events.getItems();\n ScheduledEvents scheduledEvents;\n EventsList.clear();\n for (Event event : items) {\n DateTime start = event.getStart().getDateTime();\n if (start == null) {\n start = event.getStart().getDate();\n }\n DateTime end = event.getEnd().getDateTime();\n if (end == null) {\n end = event.getStart().getDate();\n }\n scheduledEvents = new ScheduledEvents();\n scheduledEvents.setEventId(event.getId());\n scheduledEvents.setDescription(event.getDescription());\n scheduledEvents.setEventSummery(event.getSummary());\n scheduledEvents.setLocation(event.getLocation());\n scheduledEvents.setStartDate(dateTimeToString(start));\n scheduledEvents.setEndDate(dateTimeToString(end));\n StringBuffer stringBuffer = new StringBuffer();\n if(event.getAttendees()!=null) {\n for (EventAttendee eventAttendee : event.getAttendees()) {\n if(eventAttendee.getEmail()!=null)\n stringBuffer.append(eventAttendee.getEmail() + \" \");\n }\n scheduledEvents.setAttendees(stringBuffer.toString());\n }\n else{\n scheduledEvents.setAttendees(\"\");\n }\n EventsList.add(scheduledEvents);\n }\n }",
"@Override\n public void publish(Object event) {\n System.out.println(\"Sending Event\");\n\n List<Hub> hubList = hubFacade.findAll();\n Iterator<Hub> it = hubList.iterator();\n while (it.hasNext()) {\n Hub hub = it.next();\n restEventPublisher.publish(hub, event);\n\n\n //Thread.currentThread().sleep(1000);\n }\n System.out.println(\"Sending Event After\");\n }",
"public void onEvent(EventIterator events) {\n\n }",
"private static void send() {\n Map<String, ArrayList<Event>> eventsByStream = new HashMap<>();\n for (Event event : QUEUE) {\n String stream = event.getStream();\n if (!eventsByStream.containsKey(stream) || eventsByStream.get(stream) == null) {\n eventsByStream.put(stream, new ArrayList<>());\n }\n eventsByStream.get(stream).add(event);\n }\n for (String stream : eventsByStream.keySet()) {\n if (Prefs.INSTANCE.isEventLoggingEnabled()) {\n sendEventsForStream(STREAM_CONFIGS.get(stream), eventsByStream.get(stream));\n }\n }\n }",
"void onContentChanged(@Nullable List<FeedContent> feedContents);",
"@Override\n protected void onHandleIntent(Intent intent) {\n AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(this);\n int[] appWidgetIds = appWidgetManager.getAppWidgetIds(new ComponentName(this,\n NextEventWidgetProvider.class));\n\n Uri eventUri = EventContract.EventEntry.CONTENT_URI;\n Cursor data = getContentResolver().query(eventUri, EVENT_COLUMNS, null,\n null, EventContract.EventEntry.COLUMN_DATE + \" DESC\");\n if (data == null) {\n return;\n }\n if (!data.moveToFirst()) {\n data.close();\n return;\n }\n\n // Extract the weather data from the Cursor\n int eventId = data.getInt(COL_EVENT_ID);\n String title = data.getString(COL_EVENT_TITLE);\n long date = data.getLong(COL_EVENT_DATE);\n String formattedDate = Utility.formatFullDate(date);\n String place = data.getString(COL_EVENT_PLACE);\n data.close();\n\n // Perform this loop procedure for each Today widget\n for (int appWidgetId : appWidgetIds) {\n RemoteViews views = new RemoteViews(getPackageName(), R.layout.widget_next_event);\n\n // Add the data to the RemoteViews\n views.setTextViewText(R.id.event_title_textview, title);\n views.setTextViewText(R.id.event_place_textview, place);\n views.setTextViewText(R.id.event_datetime_textview, formattedDate);\n\n // Create an Intent to launch MainActivity\n Uri nextEventUri = EventContract.EventEntry.buildEventUri(eventId);\n Intent launchIntent = new Intent(this, MainActivity.class);\n launchIntent.setData(nextEventUri);\n PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, launchIntent, 0);\n views.setOnClickPendingIntent(R.id.widget, pendingIntent);\n\n // Tell the AppWidgetManager to perform an update on the current app widget\n appWidgetManager.updateAppWidget(appWidgetId, views);\n }\n }",
"public void populateActivityfeed()\n {\n\n activityFeedArray.clear();\n\n /**\n //check how many events in the list\n DatabaseReference currentUserEventsRef = FirebaseDatabase.getInstance().getReference(\"Events\").child(currentFirebaseUser.getUid());\n currentUserEventsRef.addListenerForSingleValueEvent(new ValueEventListener()\n {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot)\n {\n Long countEvents = dataSnapshot.getChildrenCount();\n Toast.makeText(getActivity(), countEvents + \" events\", Toast.LENGTH_SHORT).show();\n\n if(countEvents<2)\n {\n Event header = new Event();\n header.isHeader = true;\n activityFeedArray.addFirst(header);\n activityFeedAdapter.notifyDataSetChanged();\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n **/\n\n DatabaseReference currentUserEventsRef = FirebaseDatabase.getInstance().getReference(\"Events\").child(currentFirebaseUser.getUid());\n Query limitToLast = currentUserEventsRef.limitToLast(Constants.getInstance().ACTIVITY_FEED_LIMIT);\n limitToLast.addChildEventListener(new ChildEventListener()\n {\n @Override\n public void onChildAdded(@NonNull DataSnapshot dataSnapshot, @Nullable String s)\n {\n Event event = dataSnapshot.getValue(Event.class);\n\n if(!activityFeedArray.contains(event) && !blockedEventsArray.contains(event.getnodeID()))\n {\n //if the Event doesnt already exist in the array - by comapring nodeID values\n activityFeedArray.addFirst(event);\n\n\n\n //load data for event\n loadEventComments(event.nodeID);\n loadEventLikes(event.nodeID);\n loadEventFightData(event.nodeID, event.createdById);\n\n //if the event has a photo, load the photo to memory\n if(!event.getPhotoPath().equals(\"\"))\n {\n loadActivityFeedImage(event.getPhotoPath(), event.getnodeID());\n }\n\n //load the event creators avatar to memory\n loadActivityFeedAvatars(event.nodeID, event.getCreatedById());\n activityFeedAdapter.notifyDataSetChanged();\n }\n else if(activityFeedArray.contains(event))\n {\n activityFeedAdapter.notifyDataSetChanged();\n }\n }\n\n @Override\n public void onChildChanged(@NonNull DataSnapshot dataSnapshot, @Nullable String s)\n {\n }\n\n @Override\n public void onChildRemoved(@NonNull DataSnapshot dataSnapshot)\n {\n }\n\n @Override\n public void onChildMoved(@NonNull DataSnapshot dataSnapshot, @Nullable String s) {\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n }\n });\n\n //########### GET LIST OF USERS THE CURRENT USER IS FOLLOWS #############\n DatabaseReference followsRef = FirebaseDatabase.getInstance().getReference(\"Follows\").child(currentFirebaseUser.getUid()).child(\"Following\");\n followsRef.addChildEventListener(new ChildEventListener() {\n @Override\n public void onChildAdded(@NonNull DataSnapshot dataSnapshot, @Nullable String s)\n {\n Follow followedUser = dataSnapshot.getValue(Follow.class);\n addFollowedUserToActivityFeed(followedUser.getUserID());\n }\n\n @Override\n public void onChildChanged(@NonNull DataSnapshot dataSnapshot, @Nullable String s)\n {\n }\n\n @Override\n public void onChildRemoved(@NonNull DataSnapshot dataSnapshot)\n {\n }\n\n @Override\n public void onChildMoved(@NonNull DataSnapshot dataSnapshot, @Nullable String s)\n {\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n }\n });\n\n }",
"public static List<Event> loadPubs() throws JSONException {\n \t\t\n \t\tString data = getJSON(Constants.PUBEVENTS);\n \t\t\n \t\tJSONObject json_obj = new JSONObject(data).getJSONObject(\"feed\");\n \t\tJSONArray json_arr = json_obj.getJSONArray(\"entry\");\n \t\t\t\n \t\tList<Event> events = new ArrayList<Event>();\n \t\t\t\n \t\t\t\n \t\tfor (int i = 0; i < json_arr.length(); i++){\n \t\t\tString title = json_arr.getJSONObject(i).getJSONObject(\"title\").optString(\"$t\");\n \t\t\tString description = json_arr.getJSONObject(i).getJSONObject(\"content\").optString(\"$t\");\n \t\t\tString time = json_arr.getJSONObject(i).getJSONArray(\"gd$when\").getJSONObject(0).optString(\"startTime\");\n \t\t\tString where = json_arr.getJSONObject(i).getJSONArray(\"gd$where\").getJSONObject(0).optString(\"valueString\");\n \t\t\t\n \t\t\t//If time is not an all day event\n \t\t\tif(time.length() > \"1967-09-03\".length()){\n \t\t\t\ttime = fromDate(time) + \" - SENT. \";\n \t\t\t}\n \t\t\t\n \n \t\t\tif (!title.equals(\"\")){\n \t\t\t\tevents.add(new Event(title, description, where, time));\n \t\t\t}\n \t\t}\n \t\t\t\n \t\treturn events;\n \t}",
"private void refreshFeed() {\n Calendar cal = new GregorianCalendar();\n cal.set(Calendar.HOUR_OF_DAY, 0);\n cal.set(Calendar.MINUTE, 0);\n cal.set(Calendar.SECOND, 0);\n cal.set(Calendar.DATE, cal.get(Calendar.DATE) - DEFAULT_DAYS_BACK);\n String asOfDate = iso8601.fromCalendar(cal);\n \n feedService.feed(asOfDate, new Callback<List<Post>>() {\n @Override\n public void success(List<Post> posts, Response response) {\n Log.i(TAG, \"Received \" + posts.size() + \" posts from the feed service.\");\n \n ArrayList<Post> p = new ArrayList<Post>(posts);\n postArrayAdapter = new PostArrayAdapter(context, R.layout.listitem_feed, p);\n listView.setAdapter(postArrayAdapter);\n }\n \n @Override\n public void failure(RetrofitError retrofitError) {\n //TODO: Handle this better\n Log.e(TAG, \"Error retrieving posts from the feed: \" + retrofitError.getCause().toString());\n \n if (!retrofitError.isNetworkError()) {\n Log.i(TAG, \"Not network error, so likely cookie has expired; return user to login page\");\n sessionManager.terminateSession();\n startActivity(new Intent(getApplicationContext(), MainActivity.class));\n }\n else {\n Toast toast = new Toast(context);\n toast.makeText(context, getString(R.string.error_connecting), Toast.LENGTH_SHORT).show();\n }\n }\n });\n }",
"@Scheduled(fixedRate = 120000)\n public void readRss() {\n\n List<ItemNews> itemList = new ArrayList<>();\n\n try {\n String url = \"https://www.nytimes.com/svc/collections/v1/publish/https://www.nytimes.com/section/world/rss.xml\";\n\n try (XmlReader reader = new XmlReader(new URL(url))) {\n SyndFeed feed = new SyndFeedInput().build(reader);\n for (SyndEntry entry : feed.getEntries()) {\n LocalDateTime localDateTime = entry.getPublishedDate().toInstant()\n .atZone(ZoneId.systemDefault())\n .toLocalDateTime();\n ItemNews item = new ItemNews();\n item.setTitle(entry.getTitle());\n item.setAuthor(entry.getAuthor());\n item.setLink(entry.getLink());\n item.setDescription(entry.getDescription().getValue());\n item.setDateTime(localDateTime);\n modifyItem(item);\n itemList.add(item);\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n if (!itemList.isEmpty()) {\n Collections.sort(itemList , Comparator.comparing(ItemNews::getDateTime));\n saveItems(itemList);\n }\n }",
"private void publishFeedExample() {\n final OnPublishListener onPublishListener = new OnPublishListener() {\n\n @Override\n public void onFail(String reason) {\n hideDialog();\n // insure that you are logged in before publishing\n Log.w(TAG, \"Failed to publish\");\n }\n\n @Override\n public void onException(Throwable throwable) {\n hideDialog();\n }\n\n @Override\n public void onThinking() {\n // show progress bar or something to the user while publishing\n toast(\"Processing\");\n showDialog();\n }\n\n @Override\n public void onComplete(String postId) {\n hideDialog();\n toast(\"Published successfully. The new post id = \" + postId);\n post_id=postId;\n }\n };\n\n // feed builder\n final Feed feed = new Feed.Builder()\n .setMessage(\"Album\")\n .setName(\"Album android App\")\n .setCaption(\"Its all about sharing moments\")\n .setDescription(\"This app provides you to share your photos. Like App official page.\")\n .setPicture(\"http://img1.wikia.nocookie.net/__cb20140420205329/ssb/images/b/bf/Abc.png\").setLink(\"https://www.facebook.com/pages/Album/1399781043626089\").build();\n\n // click on button and publish\n mButtonPublishFeed.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n mSimpleFacebook.publish(feed, true, onPublishListener);\n }\n });\n }",
"private void fetchAllEvents() {\n progressDialog.show();\n StringRequest stringRequest = new StringRequest(Request.Method.GET,\n Constants.URL_ALL_EVENTS,\n new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n try {\n progressDialog.dismiss();\n\n // response is a JSONArray\n JSONArray jArray = new JSONArray(response);\n\n // extracting JSONObjects from each element of JSONArray\n for (int i = 0; i < jArray.length(); i++) {\n JSONObject jb = jArray.getJSONObject(i);\n int id = jb.getInt(\"id\");\n String name = jb.getString(\"name\");\n String venue = jb.getString(\"venue\");\n String event_date = jb.getString(\"event_date\");\n String reg_deadline = jb.getString(\"reg_deadline\");\n String description = jb.getString(\"description\");\n int organizer_id = jb.getInt(\"organizer_id\");\n\n // creating a new Event object\n Event event = new Event(id, name, venue, event_date,\n reg_deadline, description, organizer_id);\n\n // add object to the array list\n arrayList.add(event);\n // notifying the adapter for the change\n adapter.notifyDataSetChanged();\n\n }\n } catch (JSONException e) {\n Toast.makeText(getApplicationContext(), e.getMessage(), Toast.LENGTH_LONG).show();\n e.printStackTrace();\n }\n }\n },\n new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n progressDialog.hide();\n Toast.makeText(getApplicationContext(), error.getMessage(), Toast.LENGTH_LONG).show();\n }\n }) {\n\n };\n RequestHandler.getInstance(this).addToRequestQueue(stringRequest);\n }",
"public void transmitEvents(){\n Log.info(\"Transmitting Events\", EventShare.class);\n for(Entry<Class, List<EventTrigger>> eventGroup: HandlerRegistry.getHandlers().entrySet()){\n String annotation = eventGroup.getKey().getName();\n for(EventTrigger trigger : eventGroup.getValue()){\n if(trigger.getServer()!=this) { // do not send own events...\n if(trigger.getMethod()!=null){ // its a local event\n if(trigger.getMethod().isAnnotationPresent(ES.class)){\n try {\n eventBusServer.write(new ESSharedEvent(annotation, trigger.getTrigger()));\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }else {\n try {\n eventBusServer.write(new ESSharedEvent(annotation, trigger.getTrigger()));\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }\n }\n }\n }",
"private final void updateEvent(Feed feed) {\n\t ContentValues values = new ContentValues();\n\t // values.put(NotePad.Notes.COLUMN_NAME_MODIFICATION_DATE, System.currentTimeMillis());\n\n\t // This puts the desired notes text into the map.\n\t values.put(FeedingEventsContract.Feeds.column_timeStamp, feed.ts.toString());\n\t values.put(FeedingEventsContract.Feeds.column_leftDuration, Integer.toString(feed.lDuration) );\n\t values.put(FeedingEventsContract.Feeds.column_rightDuration, Integer.toString(feed.rDuration));\n\t values.put(FeedingEventsContract.Feeds.column_bottleFeed, Double.toString(feed.BFQuantity));\n\t values.put(FeedingEventsContract.Feeds.column_expressFeed, Double.toString(feed.EFQuantity));\n\t values.put(FeedingEventsContract.Feeds.column_note, feed.note);\n\t \n\t /*\n\t * Updates the provider with the new values in the map. The ListView is updated\n\t * automatically. The provider sets this up by setting the notification URI for\n\t * query Cursor objects to the incoming URI. The content resolver is thus\n\t * automatically notified when the Cursor for the URI changes, and the UI is\n\t * updated.\n\t * Note: This is being done on the UI thread. It will block the thread until the\n\t * update completes. In a sample app, going against a simple provider based on a\n\t * local database, the block will be momentary, but in a real app you should use\n\t * android.content.AsyncQueryHandler or android.os.AsyncTask.\n\t */\n\t getContentResolver().update(\n\t mUri, // The URI for the record to update.\n\t values, // The map of column names and new values to apply to them.\n\t null, // No selection criteria are used, so no where columns are necessary.\n\t null // No where columns are used, so no where arguments are necessary.\n\t );\n\n\n\t }",
"public static List<Event> loadEvents() throws JSONException {\n \t\t\n \t\tString data = getJSON(Constants.GOOGLEEVENTS);\n \t\t\n \t\tJSONObject json_obj = new JSONObject(data).getJSONObject(\"feed\");\n \t\tJSONArray json_arr = json_obj.getJSONArray(\"entry\");\n \t\t\t\n \t\tList<Event> events = new ArrayList<Event>();\n \t\t\t\n \t\t//Collection the right content from JSON\n \t\tfor (int i = 0; i < json_arr.length(); i++){\n \t\t\tString title = json_arr.getJSONObject(i).getJSONObject(\"title\").optString(\"$t\");\n \t\t\tString description = json_arr.getJSONObject(i).getJSONObject(\"content\").optString(\"$t\");\n \t\t\tString time = json_arr.getJSONObject(i).getJSONArray(\"gd$when\").getJSONObject(0).optString(\"startTime\");\n \t\t\tString where = json_arr.getJSONObject(i).getJSONArray(\"gd$where\").getJSONObject(0).optString(\"valueString\");\n \t\t\t\t\n \t\t\t//If time is not an all day event\n \t\t\tif(time.length() > \"1967-09-03\".length()){\n \t\t\t\ttime = fromDate(time);\n \t\t\t}\n \t\t\t\n \t\t\t//Add events if it has i title\n \t\t\tif (!title.equals(\"\")){\n \t\t\t\tevents.add(new Event(title, description, where, time + \". \"));\n \t\t\t}\n \t\t}\t\n \t\treturn events;\n \t}",
"public List<NewsNotifications> getNewsFeed(int limit);",
"@Override\n public void onChanged(@Nullable List<Event> events) {\n adapter.setEvents(events);\n for (Event event:events) {\n Log.e(\"** EVENT **\", \"CATEGORY: \" +event.getCategoryId() + \", Event : \" + event.getName());\n }\n }",
"protected List<JsonEvent> parseJsonEventCollection(final InputStream input)\n\t\t\tthrows Exception {\n\t\tJSONParser parser = new JSONParser();\n\n\t\t// parse feature collection into objects\n\t\tJSONObject feed = JsonUtil.getJsonObject(parser\n\t\t\t\t.parse(new InputStreamReader(input)));\n\t\tif (feed == null) {\n\t\t\tthrow new Exception(\"Expected feed object\");\n\t\t}\n\n\t\t// check feed type\n\t\tString type = JsonUtil.getString(feed.get(\"type\"));\n\t\tif (type == null) {\n\t\t\tthrow new Exception(\"Expected geojson type\");\n\t\t}\n\n\t\tArrayList<JsonEvent> events = new ArrayList<JsonEvent>();\n\n\t\tif (type.equals(\"Feature\")) {\n\t\t\t// detail feed with one event\n\n\t\t\tevents.add(new JsonEvent(feed));\n\t\t} else if (type.equals(\"FeatureCollection\")) {\n\t\t\t// summary feed with many events\n\n\t\t\tJSONArray features = JsonUtil.getJsonArray(feed.get(\"features\"));\n\t\t\tif (features == null) {\n\t\t\t\tthrow new Exception(\"Expected features\");\n\t\t\t}\n\n\t\t\t// parse features into events\n\t\t\tIterator<?> iter = features.iterator();\n\t\t\twhile (iter.hasNext()) {\n\t\t\t\tJSONObject next = JsonUtil.getJsonObject(iter.next());\n\t\t\t\tif (next == null) {\n\t\t\t\t\tthrow new Exception(\"Expected feature\");\n\t\t\t\t}\n\t\t\t\tevents.add(new JsonEvent(next));\n\t\t\t}\n\t\t}\n\n\t\treturn events;\n\t}",
"@Override\r\n\tpublic void onMpnews(HttpRequest request, Mpnews news) {\n\r\n\t}",
"public void readFeed() {\n\t\tfeedSvc.getFeed(date, new GetFeedCallback());\n\t\tdate=new Date();\n\t}",
"static public List<InlineResponse2001> feedsGet()\n {\n ArrayList<InlineResponse2001> l = new ArrayList<>();\n\n for (int i = 0; i < 512; i += (i % 2 == 0) ? 3 : 7)\n {\n InlineResponse2001 f = new InlineResponse2001();\n\n f.setId(i);\n f.setTitle(\"Some random [\" + i + \"] feed\");\n l.add(f);\n }\n return l;\n }",
"void threadUpdateReceived(FeedItem feedItem);",
"private void doEvents() {\n\t\tapplyEvents(generateEvents());\t\t\n\t}",
"public interface RSSItemListener {\n\n void addRSSItem(RSSItem rssItem);\n\n ArrayList<RSSItem> getAllRSSItems();\n\n int getRSSItemCount();\n\n}",
"public void run(){\n ExecutionPlan executionPlan = new ExecutionPlan().invoke();\n\n Thread thisThread = Thread.currentThread();\n\n while (sidhdiThread == thisThread) {\n InputHandler inputHandler = executionPlan.getInputHandler();\n\n //Sending events to Siddhi\n try {\n List<BLE> bleReadings = read();\n for(BLE ble : bleReadings){\n System.out.println(\"Publishing data...\");\n inputHandler.send(new Object[]{ble.getId(), ble.getTimeStamp(), ble.getLocation()});\n }\n\n thisThread.sleep(INTERVAL);\n } catch (InterruptedException e) {\n e.printStackTrace();\n break;\n }\n }\n }",
"@Override\n public Cursor<Event> streamEvents() {\n ensureRatingCache();\n return cache.streamEvents();\n }",
"public void feed(int nutrients) {\r\n\t\treturn;\r\n\t}",
"@Override\n public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n long arg3) {\n openNewFeed(mUrls.get(arg2));\n\n }",
"public void createDataFeeds(){\n\n\t\tfinal MyDbHelper helper = new MyDbHelper(this);\n\t\tfinal SQLiteDatabase db = helper.getWritableDatabase();\n\t\t\n\t\tContentValues values = new ContentValues();\n\t\t\n\t\tDummyFeed.createFeeds(db, values);\t\t\n\t\t\n\t\tdb.close();\n\t\t\n\t}",
"private void createEvents()\r\n\t{\r\n\t\teventsCount.add(new Event(RequestMethod.PUT, 0));\r\n\t\teventsCount.add(new Event(RequestMethod.GET, 0));\r\n\t\teventsCount.add(new Event(RequestMethod.POST, 0));\r\n\t}",
"public void eventsPublishedByPub() {\r\n int index = 1;\r\n System.out.println(\"Events published by this publisher: \");\r\n for (Event event : pubEvents) {\r\n System.out.println(index + \"->\" + event + \"\\n\");\r\n index++;\r\n }\r\n }",
"public static void main (String args[]) {\n\t Subject newsFeed = new NewsFeed();\n\t \n\t //Create a couple of observers\n\t \n\t Subscriber subscriber1 = new Subscriber(\"Subscriber 1\", newsFeed);\n\t Subscriber subscriber2 = new Subscriber(\"Subscriber 2\", newsFeed);\n\t \n\t newsFeed.setState(\"News Flash 1\");\n\t newsFeed.setState(\"News Flash 2\");\n\t \n }",
"private void createEvents() {\n\t}",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\tURL url = new URL(\"https://mail.google.com/mail/feed/atom\");\n\t\t\t\t\tHttpURLConnection conn = (HttpURLConnection) url.openConnection();\n\t\t\t\t\tconn.addRequestProperty(\"Authorization\", token_type + \" \"+access_token);\n\t\t\t\t\tint respCode = conn.getResponseCode();\n\t\t\t\t\tif (respCode == HttpURLConnection.HTTP_OK) {\n\t\t\t\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\t\t\t\tInputStream is = conn.getInputStream();\n\t\t\t\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(is));\n\t\t\t\t\t\tString str;\n\t\t\t\t\t\twhile((str = br.readLine()) != null) {\n\t\t\t\t\t\t\tsb.append(str).append(\"\\n\\r\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfinal String text = sb.toString();\n\t\t\t\t\t\tmHandler.post(new Runnable() {\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\ttextView.setText(text);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmHandler.post(new Runnable() {\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\tToast.makeText(SampleGoogleOAuthActivity.this, \"������ ���� ����\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t} catch (MalformedURLException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}",
"@NonNull\n default T feed(\n @NonNull Iterator<Map<String, Object>> feeder, Function<Session, Integer> numberOfRecords) {\n return ScalaFeeds.apply(this, feeder, numberOfRecords);\n }",
"void fetchFactFeeds();",
"public void feeds(Parameters parameters, final onSuccessCallback callback){\n getJSONArray(parameters.buildQuery(Endpoint.FEEDS), new onSuccessCallback() {\n @Override\n public void onSuccess(JSONArray result) {\n callback.onSuccess(result);\n }\n\n @Override\n public void onError(VolleyError error) {\n callback.onError(error);\n }\n });\n }",
"public void doService() {\n EventManager eventManager = new EventManager();\n while (!queue.isEmpty()) {\n Event firstEvent = queue.poll();\n if (!(firstEvent instanceof ServerBackEvent) &&\n !(firstEvent instanceof ServerRestEvent)) {\n System.out.println(firstEvent);\n } \n Event nextEvent = eventManager.getNext(servers, gen, firstEvent, stats, probability);\n if (nextEvent != null) {\n queue.add(nextEvent);\n }\n }\n System.out.println(stats);\n \n\n }",
"public void readInEvents() {\n // read CSV file for events\n allEvents = new ArrayList<Event>();\n InputStream inputStream = getResources().openRawResource(R.raw.events);\n CSVFile csvFile = new CSVFile(inputStream);\n List scoreList = csvFile.read();\n // ignore first row because it is the title row\n for (int i = 1; i < scoreList.size(); i++) {\n String[] eventData = (String[]) scoreList.get(i);\n\n // group together description\n String description = getDescription(8, eventData);\n\n // inputs to Event constructor:\n // String name, String date, String startTime, String endTime, String location,\n // int photoID, String organizations, String categories, String description\n\n // get image ID according to its name\n int photoID = context.getResources().getIdentifier(eventData[5], \"drawable\", context.getPackageName());\n allEvents.add(new Event(eventData[0], eventData[1], eventData[2], eventData[3], eventData[4],\n photoID, eventData[6], eventData[7], description));\n\n\n //System.out.println(\"ADD Event: \" + eventData[0]);\n }\n\n }",
"@Override\n public void populateTimeline() {\n long fetchMoreStart = tweets.size() > 0 ? tweets.get(tweets.size() - 1).getUid() : -1;\n client.getHomeTimeline(new JsonHttpResponseHandler() {\n // on success\n\n @Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray json) {\n addAll(Tweet.fromJSONArray(json));\n }\n\n // on failure\n @Override\n public void onFailure(int statusCode, Header[] headers, Throwable throwable, JSONObject errorResponse) {\n Log.d(\"DEBUG\", errorResponse.toString());\n }\n }, fetchMoreStart);\n }",
"public void createFullFeed() {\n\n\t\tList<ProductDetailsDocument> productDataFromMongo = getProductListFromDb();\n\t\ttry {\n\t\t\tcreateCsvForProduct(productDataFromMongo);\n\t\t} catch (ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"public void populate(HttpServletRequest request, Context context, IndexableObject dso,\n List<IndexableObject> items, Map<String, String> labels) {\n String logoURL = null;\n String objectURL = null;\n String defaultTitle = null;\n boolean podcastFeed = false;\n this.request = request;\n // dso is null for the whole site, or a search without scope\n if (dso == null) {\n defaultTitle = configurationService.getProperty(\"dspace.name\");\n feed.setDescription(localize(labels, MSG_FEED_DESCRIPTION));\n objectURL = resolveURL(request, null);\n } else {\n Bitstream logo = null;\n if (dso instanceof IndexableCollection) {\n Collection col = ((IndexableCollection) dso).getIndexedObject();\n defaultTitle = col.getName();\n feed.setDescription(collectionService.getMetadataFirstValue(col,\n CollectionService.MD_SHORT_DESCRIPTION, Item.ANY));\n logo = col.getLogo();\n String cols = configurationService.getProperty(\"webui.feed.podcast.collections\");\n if (cols != null && cols.length() > 1 && cols.contains(col.getHandle())) {\n podcastFeed = true;\n }\n objectURL = resolveURL(request, col);\n } else if (dso instanceof IndexableCommunity) {\n Community comm = ((IndexableCommunity) dso).getIndexedObject();\n defaultTitle = comm.getName();\n feed.setDescription(communityService.getMetadataFirstValue(comm,\n CommunityService.MD_SHORT_DESCRIPTION, Item.ANY));\n logo = comm.getLogo();\n String comms = configurationService.getProperty(\"webui.feed.podcast.communities\");\n if (comms != null && comms.length() > 1 && comms.contains(comm.getHandle())) {\n podcastFeed = true;\n }\n objectURL = resolveURL(request, comm);\n }\n\n if (logo != null) {\n logoURL = urlOfBitstream(request, logo);\n }\n }\n feed.setTitle(labels.containsKey(MSG_FEED_TITLE) ?\n localize(labels, MSG_FEED_TITLE) : defaultTitle);\n feed.setLink(objectURL);\n feed.setPublishedDate(new Date());\n feed.setUri(objectURL);\n\n // add logo if we found one:\n if (logoURL != null) {\n // we use the path to the logo for this, the logo itself cannot\n // be contained in the rdf. Not all RSS-viewers show this logo.\n SyndImage image = new SyndImageImpl();\n image.setLink(objectURL);\n if (StringUtils.isNotBlank(feed.getTitle())) {\n image.setTitle(feed.getTitle());\n } else {\n image.setTitle(localize(labels, MSG_LOGO_TITLE));\n }\n image.setUrl(logoURL);\n feed.setImage(image);\n }\n\n // add entries for items\n if (items != null) {\n List<SyndEntry> entries = new ArrayList<>();\n for (IndexableObject idxObj : items) {\n if (!(idxObj instanceof IndexableItem)) {\n continue;\n }\n Item item = ((IndexableItem) idxObj).getIndexedObject();\n boolean hasDate = false;\n SyndEntry entry = new SyndEntryImpl();\n entries.add(entry);\n\n String entryURL = resolveURL(request, item);\n entry.setLink(entryURL);\n entry.setUri(entryURL);\n\n String title = getOneDC(item, titleField);\n entry.setTitle(title == null ? localize(labels, MSG_UNTITLED) : title);\n\n // \"published\" date -- should be dc.date.issued\n String pubDate = getOneDC(item, dateField);\n if (pubDate != null) {\n entry.setPublishedDate((new DCDate(pubDate)).toDate());\n hasDate = true;\n }\n // date of last change to Item\n entry.setUpdatedDate(item.getLastModified());\n\n StringBuilder db = new StringBuilder();\n for (String df : descriptionFields) {\n // Special Case: \"(date)\" in field name means render as date\n boolean isDate = df.indexOf(\"(date)\") > 0;\n if (isDate) {\n df = df.replaceAll(\"\\\\(date\\\\)\", \"\");\n }\n\n List<MetadataValue> dcv = itemService.getMetadataByMetadataString(item, df);\n if (dcv.size() > 0) {\n String fieldLabel = labels.get(MSG_METADATA + df);\n if (fieldLabel != null && fieldLabel.length() > 0) {\n db.append(fieldLabel).append(\": \");\n }\n boolean first = true;\n for (MetadataValue v : dcv) {\n if (first) {\n first = false;\n } else {\n db.append(\"; \");\n }\n db.append(isDate ? new DCDate(v.getValue()).toString() : v.getValue());\n }\n db.append(\"\\n\");\n }\n }\n if (db.length() > 0) {\n SyndContent desc = new SyndContentImpl();\n desc.setType(\"text/plain\");\n desc.setValue(db.toString());\n entry.setDescription(desc);\n }\n\n // This gets the authors into an ATOM feed\n List<MetadataValue> authors = itemService.getMetadataByMetadataString(item, authorField);\n if (authors.size() > 0) {\n List<SyndPerson> creators = new ArrayList<>();\n for (MetadataValue author : authors) {\n SyndPerson sp = new SyndPersonImpl();\n sp.setName(author.getValue());\n creators.add(sp);\n }\n entry.setAuthors(creators);\n }\n\n // only add DC module if any DC fields are configured\n if (dcCreatorField != null || dcDateField != null ||\n dcDescriptionField != null) {\n DCModule dc = new DCModuleImpl();\n if (dcCreatorField != null) {\n List<MetadataValue> dcAuthors = itemService\n .getMetadataByMetadataString(item, dcCreatorField);\n if (dcAuthors.size() > 0) {\n List<String> creators = new ArrayList<>();\n for (MetadataValue author : dcAuthors) {\n creators.add(author.getValue());\n }\n dc.setCreators(creators);\n }\n }\n if (dcDateField != null && !hasDate) {\n List<MetadataValue> v = itemService.getMetadataByMetadataString(item, dcDateField);\n if (v.size() > 0) {\n dc.setDate((new DCDate(v.get(0).getValue())).toDate());\n }\n }\n if (dcDescriptionField != null) {\n List<MetadataValue> v = itemService\n .getMetadataByMetadataString(item, dcDescriptionField);\n if (v.size() > 0) {\n StringBuilder descs = new StringBuilder();\n for (MetadataValue d : v) {\n if (descs.length() > 0) {\n descs.append(\"\\n\\n\");\n }\n descs.append(d.getValue());\n }\n dc.setDescription(descs.toString());\n }\n }\n entry.getModules().add(dc);\n }\n\n //iTunes Podcast Support - START\n if (podcastFeed) {\n // Add enclosure(s)\n List<SyndEnclosure> enclosures = new ArrayList();\n try {\n List<Bundle> bunds = itemService.getBundles(item, \"ORIGINAL\");\n if (bunds.get(0) != null) {\n List<Bitstream> bits = bunds.get(0).getBitstreams();\n for (Bitstream bit : bits) {\n String mime = bit.getFormat(context).getMIMEType();\n if (ArrayUtils.contains(podcastableMIMETypes, mime)) {\n SyndEnclosure enc = new SyndEnclosureImpl();\n enc.setType(bit.getFormat(context).getMIMEType());\n enc.setLength(bit.getSizeBytes());\n enc.setUrl(urlOfBitstream(request, bit));\n enclosures.add(enc);\n\n }\n }\n }\n //Also try to add an external value from dc.identifier.other\n // We are assuming that if this is set, then it is a media file\n List<MetadataValue> externalMedia = itemService\n .getMetadataByMetadataString(item, externalSourceField);\n if (externalMedia.size() > 0) {\n for (MetadataValue anExternalMedia : externalMedia) {\n SyndEnclosure enc = new SyndEnclosureImpl();\n enc.setType(\n \"audio/x-mpeg\"); //We can't determine MIME of external file, so just\n // picking one.\n enc.setLength(1);\n enc.setUrl(anExternalMedia.getValue());\n enclosures.add(enc);\n }\n }\n\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n entry.setEnclosures(enclosures);\n\n // Get iTunes specific fields: author, subtitle, summary, duration, keywords\n EntryInformation itunes = new EntryInformationImpl();\n\n String author = getOneDC(item, authorField);\n if (author != null && author.length() > 0) {\n itunes.setAuthor(author); // <itunes:author>\n }\n\n itunes.setSubtitle(title == null ? localize(labels, MSG_UNTITLED) : title); // <itunes:subtitle>\n\n if (db.length() > 0) {\n itunes.setSummary(db.toString()); // <itunes:summary>\n }\n\n String extent = getOneDC(item,\n \"dc.format.extent\"); // assumed that user will enter this field\n // with length of song in seconds\n if (extent != null && extent.length() > 0) {\n extent = extent.split(\" \")[0];\n long duration = Long.parseLong(extent);\n itunes.setDuration(new Duration(duration)); // <itunes:duration>\n }\n\n String subject = getOneDC(item, \"dc.subject\");\n if (subject != null && subject.length() > 0) {\n String[] subjects = new String[1];\n subjects[0] = subject;\n itunes.setKeywords(subjects); // <itunes:keywords>\n }\n\n entry.getModules().add(itunes);\n }\n }\n feed.setEntries(entries);\n }\n }",
"public void openNewFeed(final String datfeed) {\n\n //close the navigation drawer\n closeDrawer();\n\n //show swipe refresh\n swiperefresh.setRefreshing(true);\n\n //detect if there's a connection issue or not: if there's a connection problem stop refreshing and show message\n if (cM.getActiveNetworkInfo() == null) {\n Toast toast = Toast.makeText(getBaseContext(), R.string.no_internet, Toast.LENGTH_SHORT);\n toast.show();\n swiperefresh.setRefreshing(false);\n\n } else {\n\n Thread thread = new Thread(new Runnable() {\n @Override\n public void run() {\n DOMParser tmpDOMParser = new DOMParser();\n fFeed = tmpDOMParser.parseXml(datfeed);\n ListActivity.this.runOnUiThread(new Runnable() {\n\n @Override\n public void run() {\n if (fFeed != null && fFeed.getItemCount() > 0) {\n\n adapter.notifyDataSetChanged();\n\n //close swipe refresh\n swiperefresh.setRefreshing(false);\n\n //set feedURL calling setFeedString method, it is important if we want working swipe refresh listener\n setFeedString(datfeed);\n }\n }\n });\n }\n });\n thread.start();\n }\n }",
"@Override\n public void start(){\n final ChannelProcessor channel = getChannelProcessor();\n\n final Map<String, String> headers = new HashMap<String, String>();\n\n // The StatusListener is a twitter4j API, which can be added to a Twitter\n // stream, and will execute methods every time a message comes in through\n // the stream.\n StatusListener statusListener = new StatusListener() {\n // The onStatus method is executed every time a new tweet comes in.\n @Override\n public void onStatus(Status status) {\n // The EventBuilder is used to build an event using the headers and\n // the raw JSON of a tweet\n // shouldn't log possibly sensitive customer data\n //logger.debug(\"tweet arrived\");\n\n headers.put(\"timestamp\",String.valueOf(status.getCreatedAt().getTime()));\n\n Event event1;\n event1 = EventBuilder.withBody(TwitterObjectFactory.getRawJSON(status).getBytes(),headers);\n //event2 = EventBuilder.withBody(Integer.toString(status.getRetweetCount()),(Charset)headers);\n //event3 = EventBuilder.withBody(status.getText().getBytes(), headers);\n channel.processEvent(event1);\n //channel.processEvent(event2);\n\n }\n\n @Override public void onDeletionNotice(StatusDeletionNotice statusDeletionNotice) {\n\n }\n @Override public void onTrackLimitationNotice(int i) {\n\n }\n @Override public void onScrubGeo(long l, long l1) {\n\n }\n @Override public void onStallWarning(StallWarning stallWarning) {\n\n }\n @Override public void onException(Exception e) {\n\n }\n };\n\n twitterStream.addListener(statusListener);\n\n if(keywords.length != 0){\n FilterQuery filterQuery = new FilterQuery().track(keywords);\n twitterStream.filter(filterQuery);\n }else{\n twitterStream.sample();\n }\n super.start();\n }",
"void onNext(CorfuStreamEntries results);",
"@Override\n public void handleEvents(List<Event> processorEvents) {\n\n }",
"public interface OnFeedsLoadedListener {\n void onSuccess(List<FeedItem> feedItems, boolean loadedNewFeeds);\n\n void onFailure(String message);\n}",
"@Override\n\tprotected void processPostUpdateStream(KStream<String, Event> events) {\n\n\t}",
"@Subscribe(threadMode = ThreadMode.MAIN)\n public void onMessageEvent(MessageEventBus event) {\n for (int i = 0; i < list.size(); i++) {\n User userData = list.get(i);\n Integer id = userData.getId();\n String name = userData.getName();\n String username = userData.getUsername();\n String email = userData.getEmail();\n Log.i(\"@@@@@\", \"onMessageEvent : userData : \" + userData.toString());\n textView.append(\"User Id : \" + id + \"\\n\" + \"Name : \" + name + \"\\n\" + \"UserName : \" + username + \"\\n\" + \"Email : \" + email + \"\\n\\n\");\n }\n Toast.makeText(this, event.message, Toast.LENGTH_LONG).show();\n }",
"public static RemoteViews getTimeView(Context context){\r\n\t\t\t\t //String path = \"http://news.yahoo.com/rss/sports/\";\r\n\t\t\t\t //String path = \"http://chinatimes.feedsportal.com/c/33012/f/537199/index.rss\";\r\n\t\t\t\t String path = \"http://rss.5286phone.com/5.xml\";\r\n\t\t\t /* ����getRss()ȡ�ý������List */\r\n\t\t\t\t//CharSequence ch=DateFormat.format(\"hh:mm:ss\", time.toMillis(false));\r\n\t\t\t getRss(path);\r\n\t\t\t \r\n\t\t\tRemoteViews views=new RemoteViews(context.getPackageName(), R.layout.newswidget);\r\n\t\t\t//time.setToNow();\r\n\t\t\t//ʱ���ʽ��\r\n\t\t \r\n\t\t\tString currentInfo1 = null;\r\n\t\t\tString currentInfo2 = null;\r\n\t\t\tString currentInfo3 = null;\r\n\t\t\tString currentlink1 = null;\r\n\t\t\tString currentlink2 = null;\r\n\t\t\tString currentlink3 = null;\r\n\t\t\tif(li!=null&&li.size()>0)\r\n\t\t\t{\t\r\n\t\t\t int i = new java.util.Random().nextInt(li.size()-4);\r\n\t\t\t //zdd eboda 20120714 \r\n\t\t\t // int i = new java.util.Random().nextInt(li.size()-4)+1;\r\n\t\t\t currentInfo1 = li.get(i).getTitle();\r\n\t\t\t currentInfo2 = li.get(i+1).getTitle();\r\n\t\t\t currentInfo3 = li.get(i+2).getTitle();\r\n\t\t\t /*zdd eboda 20120714 \r\n\t\t\t currentInfo1 = li.get(0).getTitle();\r\n\t\t\t currentInfo2 = li.get(i).getTitle();\r\n\t\t\t currentInfo3 = li.get(i+1).getTitle();\r\n\t\t\t */\r\n\t\t\t currentlink1 = li.get(i).getLink();\r\n\t\t\t currentlink2 = li.get(i+1).getLink();\r\n\t\t\t currentlink3 = li.get(i+2).getLink();\r\n\r\n\t\t\t Uri uri1 = Uri.parse(currentlink1);\r\n\t\t\t Intent intent1 = new Intent(Intent.ACTION_VIEW,uri1);\r\n\t\t PendingIntent pendingIntent1 = PendingIntent.getActivity(context, 0, intent1, 0);\r\n\t\t\t views.setOnClickPendingIntent(R.id.newstitle1, pendingIntent1);\r\n\t\t\t Uri uri2 = Uri.parse(currentlink2);\r\n\t\t\t Intent intent2 = new Intent(Intent.ACTION_VIEW,uri2);\r\n\t\t PendingIntent pendingIntent2 = PendingIntent.getActivity(context, 0, intent2, 0);\r\n\t\t\t views.setOnClickPendingIntent(R.id.newstitle2, pendingIntent2);\r\n\t\t\t Uri uri3 = Uri.parse(currentlink3);\r\n\t\t\t Intent intent3 = new Intent(Intent.ACTION_VIEW,uri3);\r\n\t\t PendingIntent pendingIntent3 = PendingIntent.getActivity(context, 0, intent3, 0);\r\n//\t\t\t views.setOnClickPendingIntent(R.id.newstitle1, pendingIntent1);\r\n//\t\t\t views.setOnClickPendingIntent(R.id.newstitle2, pendingIntent2);\r\n\t\t\t views.setOnClickPendingIntent(R.id.newstitle3, pendingIntent3);\r\n\t\t\t views.setTextViewText(R.id.newstitle1, currentInfo1);\r\n\t\t \t views.setTextViewText(R.id.newstitle2, currentInfo2);\r\n\t\t\t views.setTextViewText(R.id.newstitle3, currentInfo3);\r\n\t\t\t \r\n\t\t\t}\r\n\t\t\treturn views;\r\n\t\t}",
"private void parseJsonFeed(JSONObject response) {\n try {\n JSONArray feedArray = response.getJSONArray(\"feed\");\n\n for (int i = 0; i < feedArray.length(); i++) {\n JSONObject feedObj = (JSONObject) feedArray.get(i);\n\n FeedItem item = new FeedItem();\n item.setId(feedObj.getInt(\"organisation_id\"));\n item.setPortId(feedObj.getInt(\"portfolio_id\"));\n item.setName(feedObj.getString(\"name\"));\n //int id=item.getId();\n // Image might be null sometimes\n String image = feedObj.isNull(\"image\") ? null : feedObj.getString(\"image\");\n item.setImge(image);\n item.setStatus(feedObj.getString(\"status\"));\n item.setProfilePic(feedObj.getString(\"profilePic\"));\n item.setTimeStamp(feedObj.getString(\"timeStamp\"));\n item.setCommentCount(feedObj.getString(\"commentCount\"));\n\n // url might be null sometimes\n String feedUrl = feedObj.isNull(\"url\") ? null : feedObj.getString(\"url\");\n item.setUrl(feedUrl);\n\n feedItems.add(item);\n }\n\n\n // notify data changes to list adapater\n listAdapter.notifyDataSetChanged();\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }",
"public void refreshAllRssFeeds()\n {\n Vector rssContactList = new Vector();\n rssContactList = opSetPersPresence.getContactListRoot().\n getRssURLList(rssContactList);\n Iterator rssContact = rssContactList.iterator();\n while(rssContact.hasNext())\n {\n ContactRssImpl contact = (ContactRssImpl)rssContact.next();\n try\n {\n \n submitRssQuery(contact, false);\n }\n catch (Exception ex)\n {\n logger.error(\"Failed to refresh feed for \" + contact, ex);\n }\n }\n }",
"public void onRequestMore() {\n buildTimeline(getLastTweetId() - 1, NO_SINCE_ID);\n }",
"private List<String> getDataFromApi() throws IOException {\n // List the next 10 events from the primary calendar.\n DateTime now = new DateTime(System.currentTimeMillis());\n Date nowToday = new Date(System.currentTimeMillis());\n Date now2 = new Date();\n Log.d(\"TIME\", now2.toString()); // Fri Apr 14 11:45:53 GMT-04:00 2017\n String show = DateFormat.getTimeInstance().format(nowToday); // 오후 4:22:40\n String show2 = DateFormat.getDateInstance().format(nowToday); // 2017. 4. 7.\n String show3 = DateFormat.getDateTimeInstance().format(nowToday); // 2017. 4. 7. 오후 4:22:40\n // String show4 = DateFormat.getDateInstance().format(now); 이건 안됌 에러\n Log.d(\"@@@@@LOOK HERE TIME@@\", show);\n Log.d(\"@@@@@LOOK HERE DATE@@\", show2);\n Log.d(\"@@@@@LOOK HERE DATETIME\", show3);\n List<String> eventStrings = new ArrayList<String>();\n Events events = mService.events().list(\"primary\")\n .setMaxResults(10)\n .setTimeMin(now)\n .setOrderBy(\"startTime\")\n .setSingleEvents(true)\n .execute();\n\n\n List<Event> items = events.getItems();\n // List<Map<String, String>> pairList = new ArrayList<Map<String, String>>();\n String nowDay = now.toString().substring(0, now.toString().indexOf(\"T\"));\n\n\n for (Event event : items) {\n DateTime start = event.getStart().getDateTime();\n if (start == null) {\n // All-day events don't have start times, so just use\n // the start date.\n start = event.getStart().getDate();\n }\n\n eventStrings.add(\n String.format(\"%s (%s)\", event.getSummary(), start));\n }\n List<String> realStrings = new ArrayList<String>();\n for (String a:eventStrings\n ) {\n // Log.d(\"@@@@\", a);\n String day;\n String korTimeSpeech = null;\n String newSpeech = null;\n day = a.substring(a.indexOf(\"(\"), a.indexOf(\")\"));\n day = day.substring(1);\n\n if(day.length() > 16) {\n int hour = Integer.parseInt(day.substring(11, 13));\n if(hour < 12) {\n korTimeSpeech = \"오전 \";\n } else{\n korTimeSpeech = \"오후 \";\n hour = hour - 12;\n }\n korTimeSpeech = korTimeSpeech + hour + \"시 \" + day.substring(14, 16) + \"분에 \";\n newSpeech = a.substring(0, a.indexOf(\"(\"));\n newSpeech = korTimeSpeech + newSpeech;\n //Make it in day format\n day = day.substring(0, day.indexOf(\"T\"));\n }else {\n // korTimeSpeech = day.substring(11, 13) + \"시 \" + day.substring(14, 16) + \"분에 \";\n newSpeech = a.substring(0, a.indexOf(\"(\"));\n newSpeech = newSpeech;\n }\n\n if (day.equals(nowDay)) {\n realStrings.add(newSpeech);\n }\n }\n\n return realStrings;\n }",
"@Override\n public void requestPostDataList(String userId)\n {\n if (userId == null || listener == null || mContext == null)\n return;\n\n Map<String, String> params = new HashMap<>();\n params.put(\"view_news_feed\", \"1\");\n params.put(\"user_id\", userId);\n\n remoteServer.sendData(RemoteServer.URL, params, new RemoteServer.VolleyStringListener() {\n @Override\n public void onVolleySuccessResponse(String response) {\n Log.i(TAG,\"response to get news feed list = \"+response);\n\n try{\n Gson gson = new Gson();\n NewsFeed newsFeed = gson.fromJson(response, NewsFeed.class);\n if (newsFeed != null && newsFeed.getStatus() != null && newsFeed.getStatus().equals(\"1\"))\n {\n listener.onPostListReceived(newsFeed.getListPostData());\n }\n else\n listener.onFailed(NewsFeed.FAILED_RECEIVING_POST_LIST, null);\n }catch (Exception e)\n {\n listener.onFailed(NewsFeed.FAILED_RECEIVING_POST_LIST, mContext.getString(R.string.error_occurred));\n e.printStackTrace();\n }\n }\n\n @Override\n public void onVolleyErrorResponse(VolleyError error) {\n listener.onFailed(NewsFeed.FAILED_RECEIVING_POST_LIST, mContext.getString(R.string.error_connecting_to_server));\n }\n });\n }",
"private void makeDummies()\n {\n \n MessagePost messagePost1;\n MessagePost messagePost2;\n PhotoPost photoPost1;\n PhotoPost photoPost2;\n EventPost eventPost1;\n \n //Making 2 message posts and 2 photo posts.\n messagePost1 = new MessagePost(\"kniven\",\"Jeg er skarp idag\");\n messagePost2 = new MessagePost(\"Oscar\", \"I dag er livet verdt å leve\");\n photoPost1 = new PhotoPost(\"Eirik\", \"sol.jpg\", \"Sola skinner fint idag\");\n photoPost2 = new PhotoPost(\"Ole Martin\", \"noSkjeg.jpg\", \"Tatt skjegget\");\n eventPost1 = new EventPost(\"Ole Martin\", \"Ole Martin has joined Solider of Are og Odin\");\n \n //Adding posts to the newsfeed\n newsFeed.addPost(messagePost1);\n newsFeed.addPost(messagePost2);\n newsFeed.addPost(photoPost1);\n newsFeed.addPost(photoPost2);\n newsFeed.addPost(eventPost1);\n newsFeed.addComment(messagePost1, \"Skarping as\");\n newsFeed.addComment(messagePost2, \"Så flott!\");\n newsFeed.addComment(messagePost2, \"Like, Betyr likar\");\n newsFeed.addComment(photoPost1, \"Deilig med sol\");\n newsFeed.addComment(photoPost2, \"Neeeeeeeeeeeeeeeeei! :'(\");\n \n }",
"public void listener() {\n\t\tif (this.command.getMode().equals(Command.MODE_TRACK)) {\n\t\t\tFilterQuery filterQuery = new FilterQuery();\n\t\t\tfilterQuery.track(this.command.getKeywords().toArray(new String[this.command.getKeywords().size()]));\n\t\t\ttwitterStream.addListener(myListener);\n\t\t\ttwitterStream.filter(filterQuery);\n\t\t} else if (this.command.getMode().equals(Command.MODE_SAMPLE)) {\n\t\t\ttwitterStream.addListener(myListener);\n\t\t\ttwitterStream.sample();\n\t\t} else {\n\t\t\t// do search\n\t\t}\n\t}",
"public void PopulateRSSData()\n {\n try\n {\n URL Feed = ParseRSSFromFeed();\n ParseRSS(Feed);\n }\n catch(java.net.MalformedURLException exp)\n {\n String message = exp.getMessage();\n System.out.println(message);\n }\n catch(com.rometools.rome.io.FeedException fexp)\n {\n String message = fexp.getMessage();\n System.out.println(message);\n }\n catch(java.io.IOException ioexp)\n {\n String message = ioexp.getMessage();\n System.out.println(message);\n }\n }",
"@Override\n protected List<Flower> doInBackground(String... params) {\n // InputStream in = null;\n String content = HttpManager.getData(params[0]);\n flowerList = JSONParser.parserFeed(content);\n return flowerList;\n }",
"EventChannel refresh();",
"public interface PostSingleEvent {\n void onStart();\n void onDone(PostResponse response);\n void onError(String err);\n Map<String, String> getHeaders();\n Map<String, String> getFiles();\n Map<String, String> getImages();\n}",
"@Override\n protected JSONArray doInBackground(Void... params) {\n try {\n String sid = MainActivity.get_SID();\n JSONObject posts = ServerConnector.GetFromServer(\"/user/posts\", sid);\n JSONArray posta = posts.getJSONArray(\"posts\");\n\n JSONObject shops = ServerConnector.GetFromServer(\"/user/shops\", sid);\n JSONArray shopa = shops.getJSONArray(\"shops\");\n Log.e (\"posta\", posta.toString());\n Log.e (\"shopa\", shopa.toString());\n if (posts.getBoolean(\"ok\") && shops.getBoolean(\"ok\")) {\n try {\n Log.e (\"posta size\", Integer.toString(posta.length()));\n for (int i=0; i<posta.length(); i++) {\n JSONObject post = posta.getJSONObject(i);\n String shopid = post.getString(\"shopId\");\n Shop_item shop = null;\n for (int j=0; j<shopa.length(); j++) {\n JSONObject shopo = shopa.getJSONObject(j);\n if (shopid.equals(shopo.getString(\"_id\"))) {\n shop = new Shop_item(shopo.getString(\"photo\"),\n shopo.getString(\"shopname\"),\n shopo.getString(\"category\"),\n shopo.getString(\"phonenum\"),\n shopo.getJSONObject(\"location\").getString(\"address\"),\n shopo.getJSONObject(\"location\").getDouble(\"lat\"),\n shopo.getJSONObject(\"location\").getDouble(\"lon\"),\n shopo.getString(\"_id\"));\n break;\n }\n }\n shop.setSubscribed();\n\n Feed_item feed = new Feed_item(shop,\n post.getString(\"body\"),\n post.getString(\"date\"),\n post.getString(\"_id\"),\n post.getString(\"photo\"));\n items.add(feed);\n }\n Log.e (\"items1\", Integer.toString(items.size()));\n } catch (JSONException e) {\n e.printStackTrace();\n }\n return posts.getJSONArray(\"posts\");\n }\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n } catch (JSONException e) {\n e.printStackTrace();\n return null;\n }\n\n // TODO: register the new account here.\n return null;\n }",
"private synchronized void processNews() throws ClientProtocolException,\n\t\t\t\tIOException, JSONException {\n\n\t\t\tlong lastTime = mAdapter.getItem(mCount - 1).date;\n\t\t\tlong startTime = lastTime - Utils.MONTH;\n\n\t\t\tsetNews(ApiHandler.getData(lastTime, startTime));\n\t\t\tmHandler.sendEmptyMessage(UPDATE_LIST);\n\t\t}",
"void parseEventList() {\n\t\tfor (int eventsId : events.keySet()) {\n\t\t\tfinal Event event = events.get(eventsId);\n\t\t\tif (users.get(event.getUser().getName()).isActiveStatus()\n\t\t\t\t\t&& !event.isViewed()\n\t\t\t\t\t&& event.getInnerSisdate().compareTo(\n\t\t\t\t\t\t\tnew GregorianCalendar()) >= 0) {\n\t\t\t\tevent.setViewed(true);\n\t\t\t\tfinal SimpleDateFormat fm = new SimpleDateFormat(\n\t\t\t\t\t\t\"dd.MM.yyyy-HH:mm:ss\");\n\t\t\t\tt.schedule(new TimerTask() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tif (event.isActive()) {\n\t\t\t\t\t\t\tgenerateEventMessage(\"User \"\n\t\t\t\t\t\t\t\t\t+ event.getUser().getName()\n\t\t\t\t\t\t\t\t\t+ \" \"\n\t\t\t\t\t\t\t\t\t+ fm.format(event.getInnerSisdate()\n\t\t\t\t\t\t\t\t\t\t\t.getTime()) + \" \" + event.getText());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}, event.getInnerSisdate().getTime());\n\n\t\t\t}\n\t\t}\n\n\t}",
"@NonNull\n default T feed(@NonNull Iterator<Map<String, Object>> feeder, String numberOfRecords) {\n return ScalaFeeds.apply(this, feeder, numberOfRecords);\n }",
"public void autonomousPeriodic() {\n myDog.feed();\n }",
"public void setEvents(List<TimelineEvent> events) {\n this.events = events;\n }",
"public void updateDetail(String uri) {\n // create fake data\n String newTime = String.valueOf(System.currentTimeMillis());\n // send data to activity\n if(listener!=null){\n listener.onRssItemSelected(newTime);\n }\n }",
"protected abstract void onQueryResult(NewsResponse newsResponse);",
"public interface EventView {\n void Arrived(List<EventModel> list);\n void NoEvents(String error);\n //void ArrivedAllEvents(List<EventModel> list);\n //void NoAllEvents(String error);\n\n}",
"interface ContentChangedListener {\n /**\n * Called by Stream when content being shown has changed. This could be new cards being\n * created, the content of a card changing, etc...\n * @param feedContents the list of feed contents after the change. Null if the contents are\n * not available.\n */\n void onContentChanged(@Nullable List<FeedContent> feedContents);\n }",
"private void getFeed(){\n JsonObjectRequest mchannelReq = new JsonObjectRequest(Request.Method.GET, url, null,\n new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n Log.d(TAG, response.toString());\n // hidePDialog();\n pDialog.dismiss();;\n\n try {\n JSONObject response1 = new JSONObject(response.toString());\n JSONArray list = response1.getJSONArray(\"items\"); // you have done this wrong\n\n\n // parsing json\n for(int i = 0; i<list.length();i++) {\n try {\n JSONObject obj = list.getJSONObject(i);\n\n ChannelList mchannel = new ChannelList();\n mchannel.setTitle(obj.getJSONObject(\"snippet\").getString(\"title\")); // this will work, but its not the good way\n\n // the better way will be like this below\n\n JSONObject snippetJSONObject = obj.getJSONObject(\"snippet\");\n mchannel.setDescription(snippetJSONObject.getString(\"description\"));\n mchannel.setDatetime(snippetJSONObject.getString(\"publishedAt\"));\n String img = snippetJSONObject.getJSONObject(\"thumbnails\").getJSONObject(\"default\").getString(\"url\");\n\n mchannel.setThumbnailurl(img);\n\n // adding movie to movies array\n rlist.add(mchannel);\n Log.d(\"rlist\",\"\"+rlist);\n\n } catch(Exception e) {\n e.printStackTrace();\n }\n\n }\n\n\n\n } catch(Exception e) {\n e.printStackTrace();\n }\n\n\n\n // notifying list adapter about data changes\n // so that it renders the list view with updated data\n madapter.notifyDataSetChanged();\n\n /* Gson gson = new Gson();\n String jsonoutput = response.toString();\n Type listType = new TypeToken<List<RoyList>>(){}.getType();\n List<RoyList> posts = gson.fromJson(jsonoutput, listType);\n Log.d(\"gsondd\", \"gsonposts\"+posts);*/\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n VolleyLog.d(TAG, \"Error: \" + error.getMessage());\n // hidePDialog();\n pDialog.dismiss();\n }\n });\n\n RequestQueue requestueue = Volley.newRequestQueue(this);\n requestueue.add(mchannelReq);\n }",
"EventHubs eventHubs();",
"private void parseJsonFeed(JSONObject response) {\n try {\n JSONArray newsArray = response.getJSONArray(\"news\");\n hidePDialog();\n\n for (int i = 0; i < newsArray.length(); i++) {\n JSONObject feedObj = (JSONObject) newsArray.get(i);\n\n NewsItem news = new NewsItem();\n\n news.setId(feedObj.getString(\"id\"));\n news.setTitle(feedObj.getString(\"title\"));\n news.setDate(\"Posted on \" + feedObj.getString(\"created_at\"));\n news.setBrief(feedObj.getString(\"brief\"));\n\n //news.setDate(feedObj.getString(\"mdate\"));\n// String rd = feedObj.getString(\"mdate\");\n// news.setDate(\"Release date: \" + rd);\n\n mItems.add(news);\n }\n\n // notify data changes to list adapater\n newsAdapter.notifyDataSetChanged();\n\n } catch (JSONException e) {\n e.printStackTrace();\n hidePDialog();\n }\n }",
"public interface INewsFeedModel {\n void getItems(String ownerEmail, OnContentListerner listerner);\n}",
"@NonNull\n default T feed(@NonNull Iterator<Map<String, Object>> feeder, int numberOfRecords) {\n return ScalaFeeds.apply(this, feeder, numberOfRecords);\n }",
"@Override\n protected String doInBackground(String... args) {\n // rss link url\n String query_url = args[0];\n\n // weather object of rss.\n woeid = parser.getRSSFeedWeather2(query_url);\n\n // updating UI from Background Thread\n runOnUiThread(new Runnable() {\n public void run() {\n /**\n * Updating parsed data into text view.\n * */\n Intent intent = new Intent(MainActivity.this, Summit.class);\n String description = woeid.getWoeid();\n intent.putExtra(EXTRA_MESSAGE, description);\n // Log.d(\"Long\", description);\n startActivity(intent);\n }\n });\n return null;\n }",
"private void doRemoteSearch(String query) {\n Calendar cal = Calendar.getInstance();\n cal.set(Calendar.YEAR,2018);\n cal.set(Calendar.MONTH,12);\n\n String[] titles = {\"Search Party\", \"Lunchtime Search Basketball\", \"Search Games\", \"Pickup Soccer Search\"};\n\n for(int i = 0 ; i < 10; i++ ) {\n cal.set(Calendar.DAY_OF_MONTH,i);\n eventList.add(new Event(titles[i % titles.length], \"test description\", \"test host\", cal.getTime(),cal.getTime(), cal.getTime(), \"test category\", \"test URL\", \"test owner\", \"test location\"));\n }\n }",
"public interface NextBusXmlFeed {\n\n @GET(\"/service/publicXMLFeed?command=agencyList\")\n Call<AgenciesResponse> agencyList();\n\n @GET(\"/service/publicXMLFeed?command=routeList\")\n Call<RoutesResponse> routeList(@Query(\"a\") final String agency);\n\n @GET(\"/service/publicXMLFeed?command=routeConfig\")\n Call<RouteConfigResponse> routeConfig(@Query(\"a\") final String agency, @Query(\"r\") final String route);\n\n @GET(\"/service/publicXMLFeed?command=predictions\")\n Call<PredictionResponse> predictions(@Query(\"a\") final String agency, @Query(\"r\") final String route, @Query(\"s\") final String stop);\n}",
"protected void populateFeed() {\n ParseQuery<Post> query = ParseQuery.getQuery(Post.class);\n query.include(Post.KEY_USER);\n query.addDescendingOrder(Post.CREATED_AT);\n query.setLimit(20);\n query.findInBackground(new FindCallback<Post>() {\n // Result of the call to Parse\n @Override\n public void done(List<Post> queryPosts, ParseException e) {\n // There is an error\n if(e != null) {\n Log.e(TAG, \"Error in getting posts\");\n return;\n }\n for(Post post : queryPosts) {\n // post.getUser() gets the Id... post.getUser().getUsername() gets the Username associated to the id of getUser in User's table\n Log.i(TAG, \"Post \" + post.getDescription() + \" username: \" + post.getUser().getUsername());\n }\n posts.addAll(queryPosts);\n adapter.notifyDataSetChanged();\n }\n });\n }",
"@Override\n public <E extends Event> Cursor<E> streamEvents(Class<E> type) {\n ensureRatingCache();\n return cache.streamEvents(type);\n }",
"private void fireOnTweetsReceived(ArrayList<AbstractTweet> arlis) {\n if ( mOnNewTweet != null ){\n mOnNewTweet.onNewTweet(arlis);\n }\n else{\n throw new NullPointerException(\"fireOnTweetsReceived(): WARNING:: we don't have listener registered. Suspicious logic\"); \n }\n }",
"public FeedCustomAdapter(List<Post> dataSet) {\n outfitDataSet = dataSet;\n }",
"public interface api {\n\n @GET(\"/feeds/flowers.json\")\n void getData(Callback<List<Flower>> response);\n}",
"public void firstFeedAdded() {\n mOnFirstFeedAddedListener.onFirstFeedAdded();\n }",
"public static HashMap<String, String> feedResponse(String responseUrl) throws Exception {\n\t\tSystem.out.println(responseUrl);\r\n\t\tObjectMapper objectMapper = new ObjectMapper();\r\n\t\tMap<String, Object> map = new HashMap<String, Object>();\r\n\t\t// convert JSON string to Map\r\n\t\tmap = objectMapper.readValue(responseUrl, new TypeReference<Map<String, Object>>() {\r\n\t\t});\r\n\t\t// System.out.println(map.size());\r\n\t\tMap<String, String> dynamicValuesMap = new HashMap<String, String>();\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tArrayList<Map<String, Object>> data = (ArrayList<Map<String, Object>>) map.get(\"entries\");\r\n\t\tArrayList<Map<String, Object>> seriesName;\r\n\t\tfor (Map<String, Object> show : data) {\r\n\t\t\tif (show.get(\"pl1$fullEpisode\").toString().equalsIgnoreCase(\"true\")) {\r\n\t\t\t\tdynamicValuesMap.put(\"s:stream:type\", \"VOD Episode\");\r\n\t\t\t} else {\r\n\t\t\t\tdynamicValuesMap.put(\"s:stream:type\", \"VOD Clip\");\r\n\t\t\t}\r\n\t\t\tif (show.get(\"pl1$entitlement\").toString().equalsIgnoreCase(\"free\")) {\r\n\t\t\t\tdynamicValuesMap.put(\"s:meta:videostatus\", \"Unrestricted\");\r\n\t\t\t} else {\r\n\t\t\t\tdynamicValuesMap.put(\"s:meta:videostatus\", \"Restricted\");\r\n\t\t\t}\r\n\t\t\t// System.out.println(show.get(\"pl1$episodeNumber\"));\r\n\t\t\t// System.out.println(show.get(\"pl1$seasonNumber\"));\r\n\t\t\t// System.out.println(show.get(\"guid\"));\r\n\t\t\tdynamicValuesMap.put(\"s:meta:videoguid\", show.get(\"guid\").toString());\r\n\t\t\t// Comscore event\r\n\t\t\tdynamicValuesMap.put(\"ns_st_ci\", show.get(\"guid\").toString());\r\n\t\t\tassetValuesFeedMap.put(\"VOD ID\", show.get(\"guid\").toString());\r\n\t\t\tdynamicValuesMap.put(\"s:meta:videodaypart\", show.get(\"pl1$dayPart\").toString());\r\n\t\t\tdynamicValuesMap.put(\"s:meta:videoepnumber\", show.get(\"pl1$episodeNumber\").toString());\r\n\t\t\t// Comscore events\r\n\t\t\tdynamicValuesMap.put(\"ns_st_en\", show.get(\"pl1$episodeNumber\").toString());\r\n\t\t\tassetValuesFeedMap.put(\"VOD Episode Number\", show.get(\"pl1$episodeNumber\").toString());\r\n\t\t\tdynamicValuesMap.put(\"s:meta:videotitle\", show.get(\"title\").toString());\r\n\t\t\tdynamicValuesMap.put(\"ns_st_pr\", show.get(\"title\").toString());\r\n\t\t\tdynamicValuesMap.put(\"ns_st_ep\", show.get(\"title\").toString());\r\n\t\t\tassetValuesFeedMap.put(\"VOD Episode\", show.get(\"title\").toString());\r\n\t\t\tdynamicValuesMap.put(\"s:asset:name\", show.get(\"title\").toString());\r\n\t\t\tdynamicValuesMap.put(\"VOD Episode Number\", show.get(\"pl1$episodeNumber\").toString());\r\n\t\t\tdynamicValuesMap.put(\"s:meta:videoseason\", show.get(\"pl1$seasonNumber\").toString());\r\n\t\t\tdynamicValuesMap.put(\"ns_st_sn\", show.get(\"pl1$seasonNumber\").toString());\r\n\t\t\t// setting parameter for s:meta:videoinitiate\r\n\t\t\tdynamicValuesMap.put(\"s:meta:videoinitiate\", \"Manual\");\r\n\t\t\tassetValuesFeedMap.put(\"VOD Season\", show.get(\"pl1$seasonNumber\").toString());\r\n\t\t\t// System.out.println(show.get(\"title\"));\r\n\t\t\tseriesName = (ArrayList<Map<String, Object>>) show.get(\"media$categories\");\r\n\t\t\tfor (Map<String, Object> series : seriesName) {\r\n\t\t\t\tSystem.out.println(series.get(\"media$name\"));\r\n\t\t\t\tdynamicValuesMap.put(\"s:meta:videoprogram\", series.get(\"media$name\").toString().replace(\"Series/\", \"\"));\r\n\t\t\t\t// Comscore Events\r\n\t\t\t\tdynamicValuesMap.put(\"c6\", series.get(\"media$name\").toString().replace(\"Series/\", \"\"));\r\n\t\t\t\tassetValuesFeedMap.put(\"VOD Series\", series.get(\"media$name\").toString().replace(\"Series/\", \"\"));\r\n\t\t\t}\r\n\t\t\tArrayList<Map<String, Object>> adPositions = new ArrayList<>();\r\n\t\t\tArrayList<String> positions = new ArrayList<>();\r\n\t\t\t// adPositions = (ArrayList<Map<String, Object>>)\r\n\t\t\t// show.get(\"plmedia$chapters\");\r\n\t\t\t// System.out.println(show);\r\n\t\t\tadPots = new HashMap<>();\r\n\t\t\t// System.out.println(show.get(\"plmedia$chapters\"));\r\n\t\t\t// for (Map<String, Object> series : adPositions) {\r\n\t\t\t// String pos = String.valueOf(series.get(\"plmedia$startTime\"));\r\n\t\t\t// positions.add(pos);\r\n\t\t\t// adPots.put(\"seekTo\", positions);\r\n\t\t\t// }\r\n\t\t}\r\n\t\tfor (String parameter : assetValuesFeedMap.keySet()) {\r\n\t\t\tSystem.out.println(parameter + \":\" + assetValuesFeedMap.get(parameter));\r\n\t\t}\r\n\t\t/*\r\n\t\t * for (String parameter : assetValuesFeedMap.keySet()) {\r\n\t\t * System.out.println(parameter + \":\" +\r\n\t\t * assetValuesFeedMap.get(parameter)); }\r\n\t\t */\r\n\t\treturn (HashMap<String, String>) dynamicValuesMap;\r\n\t}",
"public void msgGantryAtFeeder()\n\t{\n\t\tprint(\"Gantry: Gantry at feeder\");\n\t\tgantry_events.add(GantryEvents.GantryAtFeeder);\n\t//\tlog.add(new LoggedEvent(\"msgGantryAtFeeder sent from Server\"));\n\t\tstateChanged();\n\t}",
"public void handle(Object e){\n\t\tif(e.getClass().equals(GetResultRequestEvent.class)){\n\t\t\tgetResults((GetResultRequestEvent)e);\n\t\t}else if(e.getClass().equals(RefreshAllDataEvent.class)){\n\t\t\ttf.getData(app);\n\t\t}else if(e.getClass().equals(ExportDataEvent.class)){\n\t\t\ttf.exportItemDB();\n\t\t}\n\t}",
"public interface OnBlogsReceived {\n\n void onSuccess(BlogFeed blogFeedList);\n void onFailure();\n}",
"public abstract void onNext();",
"public void iterateEventList();",
"void feed (int amount);"
] | [
"0.6096098",
"0.60405236",
"0.60232097",
"0.5978878",
"0.58509725",
"0.572109",
"0.57127815",
"0.5704118",
"0.5693514",
"0.56719434",
"0.56638527",
"0.56529707",
"0.55847275",
"0.5582409",
"0.5568305",
"0.55507123",
"0.55153245",
"0.55059177",
"0.547023",
"0.54662097",
"0.54363185",
"0.5423587",
"0.54026884",
"0.54009557",
"0.5383829",
"0.5374655",
"0.5369347",
"0.53677565",
"0.536263",
"0.5356747",
"0.5351318",
"0.53330415",
"0.5326454",
"0.5308647",
"0.53001946",
"0.52983695",
"0.5276021",
"0.52700484",
"0.52631295",
"0.5261256",
"0.52511156",
"0.5249311",
"0.5241393",
"0.5236146",
"0.52345246",
"0.52177703",
"0.52158433",
"0.52134967",
"0.5201357",
"0.519533",
"0.5187804",
"0.51846653",
"0.5179167",
"0.516152",
"0.5157604",
"0.51518977",
"0.51507944",
"0.5145244",
"0.51340497",
"0.512343",
"0.511373",
"0.5106427",
"0.5105376",
"0.5100923",
"0.5097958",
"0.5097924",
"0.5091267",
"0.5086713",
"0.5085231",
"0.5083101",
"0.50801",
"0.5074842",
"0.5063579",
"0.5058301",
"0.5054787",
"0.50525236",
"0.5051658",
"0.5049488",
"0.5041303",
"0.5040537",
"0.50404483",
"0.5039463",
"0.50377893",
"0.5037549",
"0.50343865",
"0.5019331",
"0.5017814",
"0.5013069",
"0.50104433",
"0.5007669",
"0.500326",
"0.5000056",
"0.49976772",
"0.49933255",
"0.49909484",
"0.4988224",
"0.4984012",
"0.49783504",
"0.4978325",
"0.49746177",
"0.4973644"
] | 0.0 | -1 |
Create by zhoumingbing on 20190511 | public interface TaskErrorService {
PageResponse<List<TaskErrorPageVo>> findPage(TaskErrorQo taskErrorQo);
Response<TaskErrorInfoVo> findTaskErrorInfo(TaskErrorInfoQo dcErrorQo);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void create() {\n\t\t\n\t}",
"@Override\n\tpublic void create() {\n\t\t\n\t}",
"@Override\r\n\tpublic void create() {\n\t\t\r\n\t}",
"@Override\n\tpublic void create() {\n\n\t}",
"@Override\n\tpublic void create () {\n\n\t}",
"CreationData creationData();",
"@Override\r\n\tpublic void create() {\n\r\n\t}",
"public void create(){}",
"public Pitonyak_09_02() {\r\n }",
"public CreateData() {\n\t\t\n\t\t// TODO Auto-generated constructor stub\n\t}",
"private void m14053d() {\n try {\n File file = new File(f18051l);\n File file2 = new File(f18052m);\n if (!file.exists()) {\n file.mkdirs();\n }\n if (!file2.exists()) {\n file2.createNewFile();\n }\n if (file2.exists()) {\n SQLiteDatabase openOrCreateDatabase = SQLiteDatabase.openOrCreateDatabase(file2, null);\n openOrCreateDatabase.execSQL(\"CREATE TABLE IF NOT EXISTS bdcltb09(id CHAR(40) PRIMARY KEY,time DOUBLE,tag DOUBLE, type DOUBLE , ac INT);\");\n openOrCreateDatabase.execSQL(\"CREATE TABLE IF NOT EXISTS wof(id CHAR(15) PRIMARY KEY,mktime DOUBLE,time DOUBLE, ac INT, bc INT, cc INT);\");\n openOrCreateDatabase.setVersion(1);\n openOrCreateDatabase.close();\n }\n this.f18053a = true;\n } catch (Exception e) {\n }\n }",
"@DISPID(1001) //= 0x3e9. The runtime will prefer the VTID if present\r\n @VTID(8)\r\n int creator();",
"@DISPID(1001) //= 0x3e9. The runtime will prefer the VTID if present\r\n @VTID(8)\r\n int creator();",
"public abstract void create();",
"private zza.zza()\n\t\t{\n\t\t}",
"@Override\n\tpublic void createccuntNum() {\n\t\t\n\t}",
"Compleja createCompleja();",
"Udt createUdt();",
"@Test\n public void testCreationTimestamp() {\n Product newProduct = TestUtil.createProduct();\n productCurator.create(newProduct);\n Pool pool = createPoolAndSub(owner, newProduct, 1L,\n TestUtil.createDate(2011, 3, 30),\n TestUtil.createDate(2022, 11, 29));\n poolCurator.create(pool);\n \n assertNotNull(pool.getCreated());\n }",
"Vaisseau_longueur createVaisseau_longueur();",
"private CreateDateUtils()\r\n\t{\r\n\t}",
"@Override\n\tpublic String createTable() {\n\t\t\t\treturn \"CREATE TABLE history_table_view(id number(8) primary key not null ,sqltext text, pointid varchar2(1024), type varchar2(100))\";\n\t}",
"private Account createAccount8() {\n Account account = new Account(\"123456008\", \"Jean Sans Enfant\",\n new SimpleDate(4, 23, 1976).asDate(), \"[email protected]\", true, false, new CreditCard(\"4320123412340008\"));\n\n return account;\n }",
"Lehrkraft createLehrkraft();",
"For createFor();",
"protected MetadataUGWD() {/* intentionally empty block */}",
"@Override\n\tpublic void create(Owner owner) {\n\n\t}",
"private Long createId() {\n return System.currentTimeMillis() % 1000;\n }",
"public Creator_4_tables() {\n// this.sourceUnits = sourceUnits;\n sourceUnits = new HashMap<String, PojoSourceCreatorUnit>();\n sourceTemplatePool.logEnvOnSrcCreate = app.cfg.getCfgBean().logEnvOnSrcCreate;\n env.setLogLeading(\"--cfenv--\");\n }",
"public static void created() {\n\t\t// TODO\n\t}",
"public C23317d() {\n }",
"@Test\n\tpublic void testCreate() throws Exception {\n\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd hh:mm:ss\");\n\t\tDate startDate = new Date();\n\t\tCalendar calendar = new GregorianCalendar();\n\t\tcalendar.setTime(startDate);\n\t\tcalendar.add(Calendar.MONTH, 2);\n\t\t//\"name\":\"mizehau\",\"introduction\":\"dkelwfjw\",\"validityStartTime\":\"2015-12-08 15:06:21\",\"validityEndTime\":\"2015-12-10 \n\n\t\t//15:06:24\",\"cycle\":\"12\",\"industry\":\"1202\",\"area\":\"2897\",\"remuneration\":\"1200\",\"taskId\":\"TVRRME9UVTFPRE0zT0RBeU1EQXdNRFkyTVRnMU9EQTU=\"\n\t\tProject a = new Project();\n\t\tDate endDate = calendar.getTime();\n\t\tString name = \"mizehau\";\n\t\tString introduction = \"dkelwfjw\";\n\t\tString industry = \"1202\";\n\t\tString area = \"test闫伟旗创建项目\";\n\t\t//String document = \"test闫伟旗创建项目\";\n\t\tint cycle = 12;\n\t\tString taskId = \"TVRRME9UVTFPRE0zT0RBeU1EQXdNRFkyTVRnMU9EQTU=\";\n\t\tdouble remuneration = 1200;\n\t\tTimestamp validityStartTime = Timestamp.valueOf(sdf.format(startDate));\n\t\tTimestamp validityEndTime = Timestamp.valueOf(sdf.format(endDate));\n\t\ta.setArea(area);\n\t\ta.setName(name);\n\t\ta.setIntroduction(introduction);\n\t\ta.setValidityStartTime(validityStartTime);\n\t\ta.setValidityEndTime(validityEndTime);\n\t\ta.setCycle(cycle);\n\t\ta.setIndustry(industry);\n\t\ta.setRemuneration(remuneration);\n\t\ta.setDocument(taskId);\n\t\tProject p = projectService.create(a);\n\t\tSystem.out.println(p);\n\t}",
"public static MotionSaliencyBinWangApr2014 create()\n {\n \n MotionSaliencyBinWangApr2014 retVal = MotionSaliencyBinWangApr2014.__fromPtr__(create_0());\n \n return retVal;\n }",
"Klassenstufe createKlassenstufe();",
"public abstract Anuncio creaAnuncioTematico();",
"Vaisseau_ordonneeLaPlusHaute createVaisseau_ordonneeLaPlusHaute();",
"protected void createFields()\n {\n createEffectiveLocalDtField();\n createDiscontinueLocalDtField();\n createScanTypeField();\n createContractNumberField();\n createContractTypeField();\n createProductTypeField();\n createStatusIndicatorField();\n createCivilMilitaryIndicatorField();\n createEntryUserIdField();\n createLastUpdateUserIdField();\n createLastUpdateTsField();\n }",
"public final void mo51373a() {\n }",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\r\n\tpublic void crearVehiculo() {\n\t\t\r\n\t}",
"public co\n\t\t.com\n\t\t.telefonica\n\t\t.atiempo\n\t\t.soltec\n\t\t.datos_publicacion\n\t\t.ejb\n\t\t.sb\n\t\t.DatosPublicacionSTLocal create()\n\t\tthrows javax.ejb.CreateException;",
"@Override\n\tpublic boolean create(Dates obj) {\n\t\treturn false;\n\t}",
"public void create () {\n // TODO random generation of a ~100 x 100 x 100 world\n }",
"@Override\r\n\tpublic void creerTVA(TVA t) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic boolean create(Jeu obj) {\n\t\treturn false;\r\n\t}",
"public void mo1531a() {\n }",
"Information createInformation();",
"@Override\n public boolean create(Revue objet) {\n return false;\n }",
"private static void doCreate(SQLiteDatabase db) {\r\n Logger.info(Logger.Type.GHOST_SMS, \"*** execute doCreate\");\r\n final Version version = new Version(VERSION_1, Names.GHOST_SMS, DateTimeUtils.currentDateWithoutSeconds());\r\n Versions.insert(db, version);\r\n doUpgrade(db, version.version);\r\n }",
"Vaisseau_ordonneeLaPlusBasse createVaisseau_ordonneeLaPlusBasse();",
"private String createTableSQL()\n\t{\n\t\tStringBuffer str = new StringBuffer();\n\n\t\t// Keep track of the list of fields\n\t\tList<String> listFields = new ArrayList<String>();\n\n\t\t// Table command\n\t\tstr.append(\"CREATE TABLE \" + getFullPath() + \"( \");\n\t\tstr.append(createStandardGZFields());\n\n\t\t// Loop through all InputFields\n\t\tfor (InputFieldSet fieldSet : function.getInputFieldSets())\n\t\t{\n\t\t\tfor (InputField inputField : fieldSet.getInputFields())\n\t\t\t{\n\t\t\t\t// Phase 2 does not support repeating fields being journalled\n\t\t\t\tif (!Field.isRepeating(inputField))\n\t\t\t\t{\n\t\t\t\t\t// Field\n\t\t\t\t\tString fieldName = SQLToolbox.cvtToSQLFieldName(inputField.getId());\n\n\t\t\t\t\t// add if not yet existing\n\t\t\t\t\tif (listFields.indexOf(fieldName) == -1)\n\t\t\t\t\t{\n\t\t\t\t\t\tstr.append(\", \");\n\t\t\t\t\t\tString fieldDataType = inputField.getDataType();\n\t\t\t\t\t\tString fieldType = SQLToolbox.cvtToSQLFieldType(fieldDataType, inputField.getSize(), inputField\n\t\t\t\t\t\t\t\t\t\t.getDecimals());\n\t\t\t\t\t\tString fieldDefault = SQLToolbox.cvtToSQLDefault(fieldDataType);\n\t\t\t\t\t\tstr.append(fieldName + \" \" + fieldType + \" \" + \" not null default \" + fieldDefault);\n\t\t\t\t\t\tlistFields.add(fieldName);\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// End\n\t\tstr.append(\" ) \");\n\t\t// RCDFMT \" + getJournalRcdName());\n\n\t\treturn str.toString();\n\t}",
"void mo20141a();",
"public void createContract() {\n\r\n\t}",
"private final zzgy zzgb() {\n }",
"private Zzcron(java.lang.String alias) {\n\t\tsuper(alias, net.user1.union.zz.common.model.Public.PUBLIC, net.user1.union.zz.common.model.tables.Zzcron.ZZCRON);\n\t}",
"zzang mo29839S() throws RemoteException;",
"protected abstract D createData();",
"private MetaSparqlRequest createRollbackPreInsered() {\n\t\treturn createRollbackMT1();\n\t}",
"Parcelle createParcelle();",
"@Override\n\tpublic void createRelease(Version version) {\n\n\t}",
"public void createValue() {\r\n value = new com.timeinc.tcs.epay2.EPay2DTO();\r\n }",
"private stendhal() {\n\t}",
"ProjetoRN createProjetoRN();",
"void mo1507n();",
"OperacionColeccion createOperacionColeccion();",
"protected IPCGCallDetailCreator()\r\n {\r\n // empty\r\n }",
"private void initial(){\n storeAccount(\"201799990001030047\");\n }",
"public void markUeTimezoneCreate() throws JNCException {\n markLeafCreate(\"ueTimezone\");\n }",
"public void mo6081a() {\n }",
"Operacion createOperacion();",
"protected DPP createDPP() {\n\t\tDPP dpp = new DPP();\n\t\tdpp.add(null, OP_CREATE, ST_CREATED);\n\t\t// dpp.add(ST_CREATED, ..., ...);\n\t\treturn dpp;\n\t}",
"Secuencia createSecuencia();",
"@Override\n public Date getCreated()\n {\n return null;\n }",
"public final void mo91715d() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo38117a() {\n }",
"@Override\n\tpublic boolean create(Etape obj) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic void initDate() {\n\n\t}",
"Vaisseau_Vaisseau createVaisseau_Vaisseau();",
"Vaisseau_Vaisseau createVaisseau_Vaisseau();",
"Vaisseau_Vaisseau createVaisseau_Vaisseau();",
"Vaisseau_Vaisseau createVaisseau_Vaisseau();",
"private FXDealHistory() {}",
"public void CreateTables() {\n\t\ttry {\n\t\t\tString schema = Schema.META;\n\t\t\tInstall_DBMS_MetaData(schema.getBytes(),0);\n\n\t\t\t// load and install QEPs\n\t\t\tClass<?>[] executionPlans = new Class[] { QEP.class };\n\t\t\tQEPng.loadExecutionPlans(TCell_QEP_IDs.class, executionPlans);\n\t\t\tQEPng.installExecutionPlans(db);\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void createNewSchema() throws SQLException {\n ResultSet resultSet = databaseStatement.executeQuery(\"select count(datname) from pg_database\");\n int uniqueID = 0;\n if(resultSet.next()) {\n uniqueID = resultSet.getInt(1);\n }\n if(uniqueID != 0) {\n uniqueID++;\n databaseStatement.executeQuery(\"CREATE DATABASE OSM\"+uniqueID+\";\");\n }\n }",
"@Override\r\n\tpublic void makerear() {\n\t\t\r\n\t}",
"protected void mo6255a() {\n }",
"private TMCourse() {\n\t}",
"@SuppressWarnings(\"unused\")\n private void generateInfo()\n {\n }",
"BIG createBIG();",
"NFRSoftgoal createNFRSoftgoal();",
"public void crear() {\n con = new Conexion();\n con.setInsertar(\"insert into lenguajes_programacion (nombre, fecha_creacion, estado) values ('\"+this.getNombre()+\"', '\"+this.getFecha_creacion()+\"', 'activo')\");\n }",
"@Override\n\tpublic long getCreationTime() {\n\t\treturn 0;\n\t}",
"@Override\n\tpublic long getCreationTime() {\n\t\treturn 0;\n\t}",
"public void mo12930a() {\n }"
] | [
"0.62148166",
"0.61676604",
"0.6118888",
"0.6104417",
"0.6097941",
"0.59650785",
"0.5906937",
"0.5779652",
"0.5720234",
"0.56742907",
"0.5486155",
"0.54671395",
"0.54671395",
"0.5462599",
"0.5436598",
"0.5422036",
"0.53878343",
"0.53857577",
"0.53799444",
"0.5370157",
"0.5356918",
"0.5345747",
"0.5329436",
"0.5308838",
"0.5294404",
"0.528551",
"0.5282609",
"0.52711236",
"0.5270165",
"0.5251613",
"0.523448",
"0.520882",
"0.5205142",
"0.5190051",
"0.51823187",
"0.51734084",
"0.51709825",
"0.5164822",
"0.51584005",
"0.5141323",
"0.51377916",
"0.51354754",
"0.51313394",
"0.5129814",
"0.5099249",
"0.5092257",
"0.50902367",
"0.5088079",
"0.5079302",
"0.50789917",
"0.5076633",
"0.5070912",
"0.5064064",
"0.50612634",
"0.506101",
"0.50602245",
"0.50530857",
"0.50513834",
"0.50490886",
"0.50488245",
"0.5044809",
"0.5039559",
"0.50393355",
"0.5030567",
"0.5030298",
"0.50290495",
"0.5020348",
"0.5014135",
"0.5011432",
"0.50111896",
"0.50087374",
"0.50081855",
"0.50044733",
"0.5000234",
"0.4993149",
"0.4993149",
"0.4993149",
"0.4993149",
"0.4993149",
"0.4993149",
"0.4993149",
"0.4991382",
"0.49888146",
"0.4987331",
"0.49844232",
"0.49844232",
"0.49844232",
"0.49844232",
"0.49837425",
"0.49832582",
"0.4982075",
"0.49811536",
"0.49665082",
"0.49652284",
"0.49587515",
"0.4957802",
"0.49574056",
"0.49549487",
"0.49512497",
"0.49512497",
"0.49431282"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
protected EntityManager getEntityManager() {
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
byte, short, int, long, float , double Widening Casting | public static void main(String[] args) {
byte a = 18;
short b = 900;
int c = 900000;
System.out.println((double)a);
// Narrowing Casting
double d = 42.98;
int e = (int)d;
// Widening Casting
System.out.println((double)e);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main(String[] args) {\n int a=10;\n byte b=(byte)a; //explicit casting\n System.out.println(b);\n\n double DecimalNumber=10.5;\n float FloatNumber=(float) DecimalNumber;\n System.out.println(FloatNumber);\n\n double DecimalNumber2=10.5;\n float FloatNumber2=(int) DecimalNumber;//double>float\n System.out.println(FloatNumber2);\n\n long LongNum=300L;\n int IntNum=(short)LongNum;\n System.out.println(IntNum);\n\n //implicit casting: small size data to larger size of data...\n byte ByteNum=100;\n int IntNum2=ByteNum;\n System.out.println(IntNum2);\n\n\n short ShortNum=100;\n long LongNum2=ShortNum;\n\n\n \n }",
"public static void main(String[] args){\n short num=100;\n int inum=num;\n long lnum=num;\n float fnum=num;\n double dnum=num;\n //When you assign value of one data type to another,\n // the two types might not be compatible with each other.\n // If the data types are compatible,\n // then Java will perform the conversion automatically known as Automatic Type Conversion and\n // if not then they need to be casted or converted explicitly.\n //this happens only when\n //The two data types are compatible.\n //When we assign value of a smaller data type to a bigger data type.(byte<short<int<long<float<double)\n //For Example, in java the numeric data types are compatible with each other\n // but no automatic conversion is supported from numeric type to char or boolean.\n // Also, char and boolean are not compatible with each other.\n System.out.println(\"num is \"+num);\n System.out.println(\"inum is \"+inum);\n System.out.println(\"lnum is \"+lnum);\n System.out.println(\"fnum is \"+fnum);\n System.out.println(\"dnum is \"+dnum);\n\n //Narrowing or Explicit conversion\n dnum=323.142;\n byte bnum=(byte)dnum;//converting bigger data type o smaller data type\n //so explicit conversion is needed\n System.out.println(\"dnum converted to bnum(byte) is \"+bnum);\n\n }",
"public static void main(String[] args) {\n\t\t\n\t\tbyte b1 = 12;\n\t\tshort s1 = b1;\n\t\tint i1 = b1;\n\t\tfloat f1 = b1;\n\t\t\n\t\t/*\n\t\t byte < short < int < long < float < double\n\t\n\t\t Buyuk data type'larini kucuk data type'larina cevrime isini Java otomatik olarak yapmaz.\n\t\t Bu cevirmeyi biz asagidaki gibi kod yazarak yapariz. Bunun ismi \"Explicit Narrowing Casting\" dir\n\t \n\t\t */\n\t\t\n\t\tshort s2 = 1210; \n\t\tbyte b2 = (byte)s2;\n\t\t\n\t}",
"public static void main(String args[]) {\n\t\t \n\t\t // lets define some variables and try to insert other data type value\n\t\t int x = 23;\n\t\t double y ;\n\t\t y = x ; // here we are storing int to double ie. smaller to larger . So no error\n\t\t System.out.println(y);\n\t\t System.out.println(x);\n\t\t \n\t\t double a = 25.28;\n\t\t int b ;\n\t\t //b = a; // Here we can see error since we are trying to store double to int i.e larger to smaller w/o casting\n\t\t \n\t\t // lets do casting and store \n\t\t b = (int) a;\n\t\t System.out.println(b);\n\t\t \n\t\t boolean bool = true ;\n\t\t int num = bool; // not possible as we know boolean data type cannot be typecast;\n\t\t \n\t\t //int to long\n\t\t int value = 34;\n\t\t long value1 ;\n\t\t \n\t\t value1 = value;\n\t\t System.out.println(value1);\n\t\t value = value1; // trying longer to smaller w/o casting which is not possible;\n\t\t System.out.println(value);\n\t\t \n\t\t value = (int) value1;\n\t\t \n\t\t // long to float \n\t\t \n\t\t long value2 = 678;\n\t\t float value3; \n\t\t value3 = value2; // works fine since smaller to larger\n\t\t System.out.println(value3);\n\t\t value2 = value3 ; // trying longer to smaller w/o casting which is not possible;\n\t\t \n\t\t // so to assign value3 to value2 we need Explicitly type cast\n\t\t value2 = (long) value3;\n\t\t \n\t\t // float to long and vice versa \n\t\t \n\t\t float value4 = 567.78f;\n\t\t double value5 ;\n\t\t value5 = value4 ; // works fine since assigning smaller type to larger type\n\t\t System.out.println(value5);\n\t\t value4 = value5 ; // trying longer to smaller w/o casting which is not possible;\n\t\t \n\t\t // Also we can explicit cast for storing larger (double) to long/int/short\n\t\t double value6 = 3564.8;\n\t\t int value7 ;\n\t\t \n\t\t value7 = (int) value6;\n\t\t System.out.println(value7);\n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t }",
"public static void main(String[] args) {\n // example of type casting\n // it will store the double and store it as an int.\n //by default, java will round down\n\n int a = (int) 0.5;\n System.out.println(a);\n //results will be 0\n\n\n //some primitive data types - byte, short, char, int, long, float, double\n\n // byte a;\n // short b;\n // char c;\n // int d;\n // long e;\n // float f;\n // double g;\n\n //if you were to use int and then store it to double, it will cast to double by default.\n\n //it will work its way down this primitive types data\n\n \n }",
"public static void main(String[] args) {\n int x = 5;\n double y = 10.55;\n\n// System.out.println(\"x + y = \" + x + y );\n// double result = x + y;\n System.out.println(\"x + y = \" + (x + y));\n\n byte b = 10;\n int c = 5;\n double d = 4.5;\n\n double result = b + c + d;\n\n System.out.println(\"result= \" + result);\n\n // casting is converting \"bigger\" type to \"smaller\" type\n\n double myDouble = 5.55;\n int myInt = 4 + (int)myDouble;\n System.out.println(\"result= \" + myInt);\n\n int anotherInt = 125;\n byte myByte = 15;\n\n int intResult = anotherInt + myByte;\n byte byteResult = (byte)(anotherInt + myByte);\n\n System.out.println(\"intResult= \" + intResult);\n System.out.println(\"byteResult= \" + byteResult); // overflow\n }",
"public static void main(String[] args) {\ndouble anInt=1234;\nbyte aByte=12;\nshort aShort=12;\nlong aLong=1234567890987654321L;\ndouble anotherInt= (anInt * 10000000);\nSystem.out.println(\"The int is \" + anInt);\nSystem.out.println(\"The byte is \" + aByte);\nSystem.out.println(\"The short is \" + aShort);\nSystem.out.println(\"The long is \" + aLong);\nSystem.out.println(\"Another int is \" + anotherInt); \n\t}",
"public static void main(String[] args) {\n\t\t\n\t\tdouble d = 1; // implicit type cast\n\n\t\tfloat f = 1.3f;\n\t\t\n\t\tint y = (int)1.3; // explicit type cast\n\t\t\n\t\tint x = (int) (10.0f / 3.0f);\n\t\t\n\t\tshort s = (short)1921222;\n\t\t\n\t\tSystem.out.println(Integer.toBinaryString(1921222));\n\t\tSystem.out.println(Integer.toBinaryString((short)1921222));\n\t\t\n\t\tshort x1 = 10;\n\t\t\n\t\tshort y1 = 3;\n\t\t\n\t\tshort z = (short)(x1 * y1);\n\t\t\n\t}",
"private static void LessonBoxUnboxCast() {\n int x = 10;\n Object o = x;\n //System.out.println(o + o); //since o is an object you can't uses the + operator\n //LessonReflectionAndGenerics(o.getClass());\n\n // Example Unboxing (this is casting, explicit casting)\n int y = (int) o;\n System.out.println(y);\n\n // Example Implicit casting you can go from smaller data type to a bigger data type\n //But not the other way around unless you use explicit casting\n int i = 100;\n double d = i;\n System.out.println(d);\n\n // Example of tryin to cast a bigger data type into a smaller data type\n double a = 1.92;\n //int b = a; //gets and error\n //need to be explicit\n int b = (int) a;\n System.out.println(b);\n }",
"public static void main(String[] args) {\n\t\tbyte a = 1;\n\t\t\n\t\t//16 -bit = 32 -bit\n\t\tshort b = 1;\n\t\t\n\t\t\n\t\tint c = 1;\n\t\t\n\t\t// byte d = c; // NOT SAFE = what if c become 1.000.000 ??? \n\t\t\n\t\t// short s = c; // NOT SAFE\n\t\t\n\t\t\n\t}",
"void method2(){\r\n\t\tshort s = 111;\r\n\t\tShort ss = s;\r\n\t\tSystem.out.println(\"Cast short \"+ s +\" to Short \"+ ss);\r\n\r\n\t\tint i = 2147483647;\r\n\t\t// incorecy cast from primitive int Reference Varible Short\r\n\t\t//Short ii = i;\r\n\t\tShort sss = (short) i;\r\n\t\tSystem.out.println(\"Cast int \"+ i +\" to Short \"+ sss);\r\n\t\t\r\n\t\t\r\n\t}",
"public static void main(String[] args){\n\n int a = (int) 3.14;\n System.out.println(a);\n //Outputs 3\n\n // The code above is casting the value 3.14 to an integer, with 3 as the resulting value.\n\n double b = 42.571;\n int c = (int) b;\n System.out.println(c);\n//Outputs 42\n\n /*\n Java supports automatic type casting of integers to floating points, since there is no loss of precision.\nOn the other hand, type casting is mandatory when assigning floating point values to integer variables.\n */\n\n // downcasting\n\n /*\n Why is upcasting automatic, downcasting manual?\n Well, upcasting can never fail.\n But if you have a group of different Animals and want to downcast them all to a Cat,\n then there's a chance that some of these Animals are actually Dogs, so the process fails.\n */\n\n /*Upcasting*/\n\n// You can cast an instance of a subclass to its superclass.\n\n// Consider the following example, assuming that Cat is a subclass of Animal.\n// Animal a = new Cat();\n//\n// Java automatically upcasted the Cat type variable to the Animal type.\n//\n /*Downcasting */\n\n// Casting an object of a superclass to its subclass is called downcasting.\n// Example:\n\n// Animal a = new Animal();\n// ((Cat)a).makeSound();\n//\n// This will try to cast the variable a to the Cat type and call its makeSound() method.\n\n\n }",
"public static void main(String[] args) {\n byte byteValue = 20;\n\n\n // 16 bits\n short shortValue = 55;\n\n // 32 bits\n int intValue = 888;\n\n //\n long longValue = 23355;\n\n // need the f after a decimal to make it\n // read as a float\n float floatValue = 8834.8f;\n float floatValue2 = (float)99.3;\n\n // greater precision then float\n double doubleValue = 32.4;\n\n System.out.println(Byte.MAX_VALUE);\n\n\n intValue = (int)longValue;\n\n System.out.println(intValue);\n\n doubleValue = intValue;\n System.out.println(doubleValue);\n\n // chopped off the end so the point 8 is gone\n // not rounded either -- need Math.Rnd for for tht\n intValue = (int)floatValue;\n System.out.println(intValue);\n\n\n\n // The following won't work as we expect it to!!\n // 128 is too big for a byte.\n // Make sure your casting something into in\n // a vslue it will fit in!! Or else\n // you got weird results\n byteValue = (byte)128;\n System.out.println(byteValue);\n\n\n // You cant convert a String to an int or back again\n /// these videos are old though and from Java 7\n // I kknw aboout String.valueOf() would convert just about\n // anything I knw there are Double.valueOf()\n // or parseDouble()?? not sure which its called or\n // if its both but ill add them later\n\n\n System.out.println(\"////////// MY CODE //////////////////////\");\n\n System.out.println(\"\\nByte min value: \" + Byte.MIN_VALUE +\n \"\\nByte max value: \" + Byte.MAX_VALUE);\n\n\n System.out.println(\"\\nShort min value: \" + Short.MIN_VALUE +\n \"\\nShort max value: \" + Short.MAX_VALUE);\n\n\n System.out.println(\"\\nInt min value: \" + Integer.MIN_VALUE +\n \"\\nInt max value: \" + Integer.MAX_VALUE);\n\n\n System.out.println(\"\\nLong min value: \" + Long.MIN_VALUE +\n \"\\nLong max value: \" + Long.MAX_VALUE);\n\n\n System.out.println(\"\\nFloat min value: \" + Float.MIN_VALUE +\n \"\\nFloat max value: \" + Float.MAX_VALUE);\n\n System.out.println(\"\\nDouble min value: \" + Double.MIN_VALUE +\n \"\\nDouble max value: \" + Double.MAX_VALUE);\n\n\n\n\n\n\n }",
"public static void main(String[] args) {\n\t\tbyte byteValue = 20;\n\t\tshort shortValue = 55;\n\t\tint intValue = 888;\n\t\tlong longValue = 23355;\n\t\t\n\t\tfloat floatValue = 8834.3f;\t\t //Notice what we did to assign a float value\n\t\t//Or we can define this as this: float floatValue = (float) 8834.3;\n\t\tdouble doubleValue = 32.4;\n\t\t\n\t\t//Step-2: Find each Variable's max_value (Optional)\n\t\tSystem.out.println(\"Max value for 'Byte' is: \" + Byte.MAX_VALUE);\n\t\t\n\t\t//Step-3: What if we try to assign very big value than it's capacity\n\t\tbyteValue = (byte) 128;\t\t\t //128 is too big for byte\n\t\tSystem.out.println(\"Example: Saving bigger value than 'byte' capacity > \" + byteValue); //Notice what value will it print\n\t\t\n\t\t//Step-4: Assign small value than it's capacity (UPCASTING: Java will do that for us)\n\t\t//System.out.println(\"Max value for 'Short' is: \" + Short.MAX_VALUE);\n\t\tshortValue = 32766;\n\t\tSystem.out.println(\"Example: Saving small value than 'short' capacity > \" + shortValue); \n\n\t\t//Step-5: Convert 'long' to 'int' (DOWNCASTING: We have to do Manually)\n\t\tintValue = (int) longValue; \t //Taking our own risk: numeric data value may change\n\t\t\t\t\t\t\t\t\t \t //You can also think that by Casting we are informing Java about our decision\n\t\tSystem.out.println(\"Example: Convert 'long' to 'int' > \" + intValue);\n\t\t\n\t\t//Step-6: Convert 'int' to 'double'\t(UPCASTING: Java will do that for us)\n\t\tdoubleValue = intValue;\t\t \t //Will not have any major change of numeric data value\n\t\t\t\t\t\t\t\t\t\t //This is also known as 'WIDENING Primitive Conversion'\n\t\t\n\t\t//REMEMBER: A WIDENING primitive conversion does not lose information about the overall magnitude of a numeric value.\n\t\t\n\t\tSystem.out.println(\"Example: Convert 'int' to 'double' > \" + doubleValue);\n\t\t\n\t\t//Step-7: Convert 'float' to 'int' (DOWNCASTING: We have to do Manually)\n\t\tintValue = (int) floatValue; \t //Don't get confuse this nature with Java Math, round\n\t\t\t\t\t\t\t\t\t\t //This is also known as 'NARROWING Primitive Conversion'\n\t\t\n\t\t//REMEMBER: A NARROWING primitive conversion may lose information about the overall magnitude of a numeric value and \n\t\t// may also lose precision and range.\n\t\t\n\t\tSystem.out.println(\"Example: Convert 'float' to 'int' > \" + intValue); \n\t\t\n\t\n\t\t//Remember: Above we only dealt with NUMERIC VALUES/PRIMITIVE VALUE TYPES. We cannot just mass around this conversion concept with one TYPE\n\t\t//\t\t\tto another TYPE (Means PRIMITIVE (int) to OBJECT Type (String)). For that you have to follow by-passing technique which you\n\t\t// better try to avoid for simplicity\n\t\t\n\t\t\n\t\tSystem.out.println(\"--------------------------------\");\n\t\t\n\t\t//Example-2: Implement (IMPLICIT/EXPLICIT) Casting on OBJECT/REFERENCE VALUE TYPES\n\t\t//\t\t\t (This particular example is also taken from 'Cave of Programming' by John Purcell)\n\t\t\n\t\t//Step-1: Create two simple instances of our public two classes\n\t\tMachine myMachine = new Machine(); \t\t//Right side Object instance which we created once, will always remain their. Means, if we create\n\t\tPC myPC = new PC();\t\t\t\t\t\t//new Machine instance by 'new Machine()', that instance will never change.\n\t\t\n\t\t//Normally what we have seen before are as follows:\n\t\tmyMachine.start();\n\t\tmyPC.start();\n\t\tmyPC.osType();\n\t\t\n\t\t//Now lets deal with UPCASTING & DOWNCASTING (Remember: Any CUSTING we do/will do, will be on top of the variable we create on Left Side) \n\t\t//UPCASTING \n\t\t\n\t\tSystem.out.print(\"UPCASTING > \");\n\t\t\n\t\tMachine machine_one = new PC(); \t\t//Remember, this is Polymorphism\n\t\t//we can also write this above instance as follows:\n\t\t//Machine machine_one = myPC;\n\t\t\n\t\t//Which start() method will it RUN? PArent's one OR Child's one???\n\t\tmachine_one.start();\n\t\t//However, notice that we can call start() method of Child's Object but can't call osType()!!! Why???\n\t\t\n\t\tSystem.out.print(\"DOWNCASTING > \");\n\t\t\n\t\tMachine machine_two = new PC();\t\t\t//As we know PC is having osType() method which we couldn't access in our above example\n\t\tPC pc_one = (PC) machine_two;\t\t\t//This is the by passing way to make that DONE :) (By getting help from DOWNCASTING)\n\t\t// ^\n\t\t//\t |\n\t\t// Referring to which Object we r casting to (For any DOWNCASTING, Java needs our confirmation)\n\t\t\n\t\t//Now we can access all the methods from PC Object\n\t\tpc_one.start();\n\t\tpc_one.osType();\n\t\t\n\t\t//Observe this behaviors (related to DOWNCASTING) very CAREFULLY !!!\n\t\t//------------------------------------------------------------------------\t\t\n\t\t/*\n\t\t//NOTE: Always before we are going for any DOWNCASTING, we have to be very clear about what we are going to do and whether that is possible or\n\t\t// not to implement that concept in our situation. If you are NOT TAKING THIS POINT SERIOUSLY then notice a scenario below, where we will \n\t\t//\t\tget no Compiler time Error/Exception but the Run time, which Java will throw as follows:\n\t\t\n\t\tMachine machine_three = new Machine();\n\t\tPC pc_two = (PC) machine_three;\t\t\t//Can we change the actual Object which is Machine to PC? Notice, it is not throwing any Error\n\t\t\n\t\t//Now try to use PC Object's method start() & run the Application\n\t\tpc_two.start();\t\t\t// :( What just happened??? Meet with 'ClassCastException' ;)\n\t\t\n\t\t//REMEMBER (VERY IMPORTANT):\n\t\t//---------------------------------\n\t\t//\tWe cannot DOWNCAST between UNRELATED OBJECT, because we can't change one Object to another Object. Only what we can do is to deal with their\n\t\t//\tREFERENCE VARIABLE(S) and change their type if necessary. \n\t\t \n\t\t//\tYou have to be sure that the Object Variable you are CASTING, really does refer to the kind of Object that you are DOWNCASTING to. \t\t\t\t \n\t\t*/\n\t\t\n\t\tSystem.out.println(\"--------------------------------\");\n\t\t\n\t\t//Example-3: BOXING vs UNBOXING Conversions\n\t\t//Note: Converting from a PRIMITIVE TYPE to its REFERENCE TYPES is called BOXING Conversion and the opposite is called\n\t\t//\t\tUNBOXING Conversion.\n\t\t\n\t\tint a = 100;\n\t\tInteger aObj = new Integer (200);\n\t\t\n\t\t//Step1: Converting from a PRIMITIVE TYPE to its corresponding REFERENCE TYPES\n\t\taObj = a; \t//BOXING conversion\n\t\tSystem.out.println(\"AUTOBOXING/BOXING > \" + aObj);\n\t\t\n\t\t//Step2: Converting from a REFERENCE TYPES to its corresponding PRIMITIVE TYPE\n\t\ta = aObj;\t//UNBOXING conversion\n\t\tSystem.out.println(\"UNBOXING > \" + aObj);\n\t\t\n\t\tSystem.out.println(\"--------------------------------\");\n\t\t\n\t\t//Example-4: 'String' to 'int' vs 'int' to 'String' Conversion\n\t\t\n\t\t//Step-1: Convert 'String' to 'int'\n\t\tint b = Integer.parseInt(\"1234\");\n\t\tSystem.out.println(\"'String' to 'int' Conversion: \" + b + \" (int format)\");\n\t\t\n\t\t//Step-2: Convert 'int' to 'String'\n\t\tString c = Integer.toString(5678);\n\t\tSystem.out.println(\"'int' to 'String' Conversion: \" + c + \" (String format)\");\t\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t int a;\r\n\t double l = 456.78;\r\n\t \r\n\t a = (int)l;\r\n\t \r\n\t //we are storing the value of double into int therefore we have to perform explicit type casting as done above.\r\n\t System.out.println(a);\r\n\t \r\n\t byte b;\r\n\t\t int i = 56;\r\n\t\t b = (byte)i;\r\n\t\t System.out.println(b);\r\n\t\t \r\n\t\t char c;\r\n\t\t int ii = 78;\r\n\t\t c = (char)ii;\r\n\t\t System.out.println(c);/*When we try to convert int to char, the point to noted is it stores the \r\n\t\t char associated with that integer with respect to ASCII value.*/\r\n\t}",
"public static void main(String args[])\r\n\t{\n\t\tbyte byteVal = 10;\r\n\t\tshort shortVal = 20;\r\n\t\t\r\n\t\tByte firstByteObj = new Byte(byteVal);\r\n\t\tByte secondByteObj = new Byte(\"10\");\r\n\t\tSystem.out.println(\"Byte Created using Primitive - \" + firstByteObj);\r\n\t\tSystem.out.println(\"Byte Created using String - \" + secondByteObj);\r\n\t\t\r\n\t\tShort firstShortObj = new Short(shortVal);\r\n\t\tShort secondShortObj = new Short(\"20\");\r\n\t\tSystem.out.println(\"Short Created using primitive - \" + firstShortObj);\r\n\t\tSystem.out.println(\"Short Created using String - \" + secondShortObj);\r\n\t\t\r\n\t\tInteger firstIntegerObj = new Integer(100);\r\n\t\tInteger secondIntegerObj = new Integer(\"100\");\r\n\t\tSystem.out.println(\"Integer Created using primitive - \" + firstIntegerObj);\r\n\t\tSystem.out.println(\"Integer Created using String - \" + secondIntegerObj);\r\n\t\t\r\n\t\tLong firstLongObj = new Long(1000l);\r\n\t\tLong secondLongObj = new Long(\"1000\");\r\n\t\t//Long thirdLongObj = new Long(\"1000l\"); // throws java.lang.NumberFormatException: For input string: \"1000l\"\r\n\t\tSystem.out.println(\"Long Created using primitive - \" + firstLongObj);\r\n\t\tSystem.out.println(\"Long Created using String - \" + secondLongObj);\r\n\t\t//System.out.println(\"Long Created using String with convension - \" + thirdLongObj);\r\n\t\t\r\n\t\tFloat firstFloatObj = new Float(10.5f);\r\n\t\tFloat secondFloatObj = new Float(\"10.5f\");\r\n\t\tFloat thirdFloatObj = new Float(\"10.5\");\r\n\t\tFloat fourthFloatObj = new Float(10.5);\r\n\t\tSystem.out.println(\"Float created using primitive - \" + firstFloatObj);\r\n\t\tSystem.out.println(\"Float created using String with convension - \" + secondFloatObj);\r\n\t\tSystem.out.println(\"Float Created using String - \" + thirdFloatObj);\r\n\t\tSystem.out.println(\"Float created using Double - \" + fourthFloatObj);\r\n\t\t\r\n\t\tDouble firstDoubleObj = new Double(123.34);\r\n\t\tDouble secondDoubleObj = new Double(\"321.34\");\r\n\t\tSystem.out.println(\"Double Created using Double - \" + firstDoubleObj);\r\n\t\tSystem.out.println(\"Double Created using String - \" + secondDoubleObj);\r\n\t\t\r\n\t\tCharacter firstCharObj = new Character('a');\r\n\t\t// Character secondCharObj = new Character(\"a\"); // Cant create a Character wrapper using String\r\n\t\tSystem.out.println(\"Character created using primitive - \" + firstCharObj);\r\n\t\t\r\n\t\tBoolean firstBooleanObj = new Boolean(true);\r\n\t\tBoolean secondBooleanObj = new Boolean(false);\r\n\t\tBoolean thirdBooleanObj = new Boolean(\"true\");\r\n\t\tBoolean fourthBooleanObj = new Boolean(\"True\");\r\n\t\tBoolean fifthBooleanObj = new Boolean(\"TRUE\");\r\n\t\tBoolean sixthBooleanObj = new Boolean(\"false\");\r\n\t\tBoolean seventhBooleanObj = new Boolean(\"Baskar\");\r\n\t\t\r\n\t\tSystem.out.println(\"Boolean created using primitive - \" + firstBooleanObj); //true\r\n\t\tSystem.out.println(\"Boolean created using primitive - \" + secondBooleanObj); //false`\r\n\t\tSystem.out.println(\"Boolean created using String - \" + thirdBooleanObj); //true\r\n\t\tSystem.out.println(\"Boolean created using String - \" + fourthBooleanObj); // true\r\n\t\tSystem.out.println(\"Boolean created using String - \" + fifthBooleanObj); //true\r\n\t\tSystem.out.println(\"Boolean created using String - \" + sixthBooleanObj); //false\r\n\t\tSystem.out.println(\"Boolean created using String - \" + seventhBooleanObj); //false //default value is false\r\n\t}",
"void method(){\r\n\t\tInteger i = new Integer(Integer.MAX_VALUE);\r\n\t\tShort s = new Short(Short.MAX_VALUE);\r\n\t\t\r\n\t\tSystem.out.println(\"Int max \"+ Integer.MAX_VALUE + \" int min \"+ Integer.MIN_VALUE);\r\n\t\tSystem.out.println(\"Short max \"+ Short.MAX_VALUE + \" Short min \"+ Short.MIN_VALUE);\t\t\r\n\t\t\r\n\t\t//this is not upcast ! , this is side-cats !!-> Illegal\r\n\t\t//Short ss = (Short) new Integer(Integer.MAX_VALUE);\r\n\t\t\r\n\t\t//Illegal\r\n\t\t//Integer ii = (Integer) new Short(Short.MAX_VALUE);\r\n\t\t\r\n\t\t// real up-cast\r\n\t\tNumber ii = new Short(Short.MAX_VALUE);\r\n\t\tSystem.out.println((Short)ii);\r\n\t\t\r\n\t\t\r\n\t\tInteger iii = Integer.valueOf(s);\r\n\t\t\r\n\t\t\r\n\t}",
"private double convertToDbl(Object a) {\n double result = 0;\n\n //If the object is a Character...\n if(a instanceof Character){\n char x = (Character)a;\n result = (double)(x - '0'); // -'0' as it will convert the ascii number (e.g 4 is 52 in ascii) to the standard number\n }\n\n //If it is a Double...\n else if(a instanceof Double){\n result = (Double)a;\n }\n\n return result;\n }",
"public static void main(String[] args) {\n double x, y;\r\n byte b;\r\n int i;\r\n char ch;\r\n x = 10.0;\r\n y = 3.0;\r\n i = (int) (x / y); //truncation will occur when casting double to int\r\n System.out.println(\"Integer outcome of x / y: \" + i);\r\n\r\n i = 100;\r\n b = (byte) i;\r\n System.out.println(\"Value of b: \" + b); // no loss of info as a byte can hole the value 100\r\n\r\n i = 257;\r\n b = (byte) i;\r\n System.out.println(\"Value of b: \" + b); // loss of info as a byte can hole the value 257\r\n\r\n b = 88; //ASCII code fo X\r\n ch = (char) b;\r\n System.out.println(\"ch: \" + ch); // cast between incompatible types\r\n\r\n }",
"public static void main (String[] args){\n int myValue = 2_000;\n\n //Byte = 2^8 (8 bits - 1 byte)\n byte myByteValue = 10;\n\n //Java promotes variables to int to perform any binary operation.\n //Thus, results of expressions are integers. In order to store the result\n //in a variables of different type, explicit cast is needed.\n //The parenthesis are needed to cast the whole expression.\n byte myNewByteValue = (byte)(myByteValue/2);\n\n\n //Short = 2^16 (16 bits - 2 bytes)\n short myShort = 1_000;\n short myNewShortValue = (short)(myShort/2);\n /*\n Long = 2^64 (64 bits - 8 bytes)\n Without L suffix, Java considers the literal as an integer.\n Since int is a smaller type than long, int is auto casted and stored as a long\n without information loss (underflow or overflow)\n */\n long myLongValue = 100_000L;\n\n //Exercise:\n //Converts the expression automatically to long, since sizeof(long) > sizeof(int)\n //This rule applies for any two types that one is lager than the order, since the smaller is stored into the larger.\n //Otherwise, a explicit cast is need, like the short type below\n long myNewLongValue = 50_000L + 10L *(myByteValue+myShort+myValue);\n short myShortCastedValue = (short) (100 + 2*(myByteValue+myNewShortValue+myValue));\n System.out.println(myNewLongValue);\n System.out.println(myShortCastedValue);\n }",
"public static void main(String[] args) {\n\n Integer num1 = 100;\n double num2 = num1;\n System.out.println(num2);\n\n float f = 0.5f;\n Float fl = f;\n System.out.println(fl);\n\n System.out.println(Byte.MAX_VALUE);\n\n // parse method --> converting String value to primitives, returne primitive\n // valueOf --> converting String to Wrapper class, return Wrapper class\n\n String str1 = \"123\";\n int result = Integer.parseInt(str1);\n System.out.println(result+1);\n\n String str2 = \"true\";\n boolean r1 = Boolean.parseBoolean(str2);\n System.out.println(r1);\n\n // parse method not case sencetive\n String str3 = \"FaLse\"; // it is work\n boolean r2 = Boolean.parseBoolean(str3);\n System.out.println(r2);\n\n String s1 = \"100.5\";\n Double c1 = Double.parseDouble(s1);\n System.out.println(c1 + 1); // it is call auto boxing\n Double c2 = Double.valueOf(s1); // this in not auto and not unboxing\n\n System.out.println(c1);\n System.out.println(c2);\n\n String s2 = \"TrUe\";\n Boolean b1 = Boolean.valueOf(s2);\n System.out.println(b1); // no sensetive\n\n Double [] arr = new Double[3];\n System.out.println(Arrays.toString(arr));\n // default value of wrapper class always --> null, null, null\n\n String name = \"string\";\n String name1 = new String(\"string\");\n\n Integer I1 = new Integer(\"123\");\n\n System.out.println(addNum(12,13));\n System.out.println(addNum(15.3,7.4));\n \n }",
"public static void main(String[] args)\n {\n double x = 5.3;\n int y = (int)x;\n \n }",
"public static void main(String[] args) {\n\t\tbyte datoByte = 2; // Primitivo\n\t\tByte datoByteWrapper = 3; // Wrapper\n\t\tSystem.out.println(\"Primitivo: \" + datoByte);\n\t\tSystem.out.println(\"Wrapper: \" + datoByteWrapper);\n\t\t// Conversiones\n\t\tbyte datoByte1 = 5;\n\t\tByte datoConvertido = datoByte1;\n\t\tSystem.out.println(\"Dato Convertido: \" + datoConvertido);\n\t\t// Conversiones 2\n\t\tByte datoConvertido1 = 6;\n\t\tbyte datoByte2 = datoConvertido1.byteValue();\n\t\tSystem.out.println(\"Dato Byte: \" + datoConvertido1);\n\t\tSystem.out.println();\n\t\t\n\t\t// short\n\t\tshort datoShort = 1; // Primitivo\n\t\tShort datoShortWrapper = 1; // Wrapper\n\t\tSystem.out.println(\"Primitivo: \" + datoShort);\n\t\tSystem.out.println(\"Wrapper: \" + datoShortWrapper);\n\t\t// Conversiones\n\t\tshort datoShort1 = 4;\n\t\tShort shortConvertido = datoShort1;\n\t\tSystem.out.println(\"Dato Convertido: \" + datoShort1);\n\t\t// Conversiones 2\n\t\tShort shortConvertido1 = 6;\n\t\tshort datoShort2 = shortConvertido1.shortValue();\n\t\tSystem.out.println(\"Dato Short: \" + shortConvertido1);\n\t\tSystem.out.println();\n\n\t\t// int\n\t\tint edad = 45; // Primitivo\n\t\tInteger edadWrapper = 48; // Wrapper\n\t\tSystem.out.println(\"Primitivo: \" + edad);\n\t\tSystem.out.println(\"Wrapper: \" + edadWrapper);\n\t\t// Conversiones\n\t\tint edad1 = 4;\n\t\tInteger integerConvertido = edad1;\n\t\tSystem.out.println(\"Dato Convertido: \" + edad1);\n\t\t// Conversiones 2\n\t\tInteger integerConvertido1 = 6;\n\t\tint edad2 = integerConvertido1.intValue();\n\t\tSystem.out.println(\"Int Convertido: \" + integerConvertido1);\n\t\tSystem.out.println();\n\t\t\n\t\t// long\n\t\tlong valorGrande = 12321; // Primitivo\n\t\tLong valorGrandeWrapper = 123123L; // Wrapper\n\t\tSystem.out.println(\"Primitivo: \" + valorGrande);\n\t\tSystem.out.println(\"Wrapper: \" + valorGrandeWrapper);\n\t\t// Conversiones\n\t\tlong valorGrande1 = 4;\n\t\tLong longConvertido = valorGrande1;\n\t\tSystem.out.println(\"Dato Convertido: \" + valorGrande1);\n\t\t// Conversiones 2\n\t\tLong longConvertido1 = 23423L;\n\t\tlong valorGrande2 = longConvertido1.longValue();\n\t\tSystem.out.println(\"Int Convertido: \" + longConvertido1);\n\t\tSystem.out.println();\n\n\t\t// boolean\n\t\tboolean valorVerdad = true; // Primitivo\n\t\tBoolean valorVerdadWrapper = false; // Wrapper\n\t\tSystem.out.println(\"Primitivo: \" + valorVerdad);\n\t\tSystem.out.println(\"Wrapper: \" + valorVerdadWrapper);\n\t\t// Conversiones\n\t\tboolean valorVerdad1 = true;\n\t\tBoolean booleanConvertido = valorVerdad1;\n\t\tSystem.out.println(\"Dato Convertido: \" + valorVerdad1);\n\t\t// Conversiones 2\n\t\tBoolean booleanConvertido1 = false;\n\t\tboolean valorVerdad2 = booleanConvertido1.booleanValue();\n\t\tSystem.out.println(\"Int Convertido: \" + booleanConvertido1);\n\t\tSystem.out.println();\n\n\t\t// float\n\t\tfloat valor = 1; // Primitivo\n\t\tFloat valorWrapper = 9F; // Wrapper\n\t\tSystem.out.println(\"Primitivo: \" + valor);\n\t\tSystem.out.println(\"Wrapper: \" + valorWrapper);\n\t\t// Conversiones\n\t\tfloat valor1 = 23;\n\t\tFloat floatConvertido = valor1;\n\t\tSystem.out.println(\"Dato Convertido: \" + valor1);\n\t\t// Conversiones 2\n\t\tFloat floatConvertido1 = 65F;\n\t\tfloat valor2 = floatConvertido1.floatValue();\n\t\tSystem.out.println(\"Int Convertido: \" + floatConvertido1);\n\t\tSystem.out.println();\n\n\t\t// double\n\t\tdouble valorDecimal = 12.34; // Primitivo\n\t\tDouble valorDecimalWrapper = 34.78; // Wrapper\n\t\tSystem.out.println(\"Primitivo: \" + valorDecimal);\n\t\tSystem.out.println(\"Wrapper: \" + valorDecimalWrapper);\n\t\t// Conversiones\n\t\tdouble valorDecimal1 = 23.65;\n\t\tDouble doubleConvertido = valorDecimal1;\n\t\tSystem.out.println(\"Dato Convertido: \" + valorDecimal1);\n\t\t// Conversiones 2\n\t\tDouble doubleConvertido1 = 65.78;\n\t\tdouble valorDecimal2 = doubleConvertido1.doubleValue();\n\t\tSystem.out.println(\"Int Convertido: \" + doubleConvertido1);\n\t\tSystem.out.println();\n\n\t\t// char\n\t\tchar letraAlfabeto = 'J'; // Primitivo\n\t\tCharacter letraAlfabetoWrapper = 'C'; // Wrapper\n\t\tSystem.out.println(\"Primitivo: \" + letraAlfabeto);\n\t\tSystem.out.println(\"Wrapper: \" + letraAlfabetoWrapper);\n\t\t// Conversiones\n\t\tchar letraAlfabeto1 = 'F';\n\t\tCharacter charConvertido = letraAlfabeto1;\n\t\tSystem.out.println(\"Dato Convertido: \" + letraAlfabeto1);\n\t\t// Conversiones 2\n\t\tCharacter charConvertido1 = 'R';\n\t\tchar letraAlfabeto2 = charConvertido1.charValue();\n\t\tSystem.out.println(\"Int Convertido: \" + charConvertido1);\n\n\t}",
"private static double[] shortToDouble(short[] s, double[] d) {\n for (int i = 0; i < d.length; i++) {\n d[i] = s[i];\n }\n return d;\n }",
"public static void main(String[] args)\n {\n\n double myDouble = 3.14;\n float myFloat = 3.14f; //Removing the f will cause an error due to lossy conversion\n double yourDouble = myFloat; //Widening/lossless conversions won't raise errors\n }",
"public static void main(String[] args){\n byte b1=34;\n // -128, 127\n System.out.println(b1);\n\n\n // short example\n short s1=28;\n // stores whole numbers -32,768 to 32,767\n short s2=1000;\n short s3=35;\n\n //range of int 4 bytes stores -2,147,483,648 to 2,147,483,647\n int number=23456677;\n System.out.println(44); //as default it consider as \"int\"\n long l1= 200;\n long l2=9999999999L;/* when you move out of int range computer needs to know what is the number\n that is why you need to tell it is long by adding L at the end */\n System.out.println(999999999999L);\n\n //stores decimal numbers\n double d1= 5.5;\n System.out.println(d1);\n // as a default java picks double for decimal number\n System.out.println(3.5);\n float f1= 4.5f;\n System.out.println(f1);\n System.out.println(f1+d1);\n\n\n\n\n\n\n }",
"public static void main(String[] args) {\n\t\tint i = 'i';\n\t\tdouble d = 3;\n\t\tSystem.out.println(d);\n\t\t\n\t\t//Narrow conversion needs explicit casting. It will truncate where necessary\n\t\tfloat f = 3.14f;\n\t\tint fi = (int) f;\n\t\tSystem.out.println(fi);\n\t\t\n\t\t//Casting in a narrow conversion is needed even if the value fits in the target type\n\t\tint number = 100;\n\t\tbyte b = (byte) number;\n\t\t\n\t\t//The only exception is if you assign an int literal (default) to a short or byte variable\n\t\tbyte bb = 100;\n\t\tshort ss = 100;\n\t\t\n\t\t//This exception does not apply to double literal (default), which need to be casted to float\n\t\tfloat dd = (float) 3.14;\n\t}",
"public static void main(String[] args) {\n byte b1=10;\r\n byte b2=20;\r\n int b3=b1+b2; // byte+byte=int\r\n \r\n int a=10;\r\n long b=20L;\r\n double d=10.5;\r\n // a+b+d \r\n // a=10.0 b=20.0 d=10.5\r\n String s=\"\";\r\n // double r=a+b+d+s; \r\n // String \r\n\t}",
"public static void main(String[] args) {\n\t\tint intNumber=25;\n\t\tdouble doubleNumber=intNumber;\n\t\tSystem.out.println(\"The double number is\" +doubleNumber);\n\t\t//19 is between -128 and 127\n\t\tint numberInt=19;\n\t\tbyte numberByte=(byte)numberInt;\n\t\tSystem.out.println(\"The byte value is \" + numberByte);\n\t\t//260 is bigger than 256\n\t\tnumberInt=260;\n\t\tnumberByte=(byte)numberInt;\n\t\tSystem.out.println(\"The byte value is\"+ numberInt);\n\t\t\n\t\tnumberByte=80;\n\t\tnumberInt=(byte)numberByte;\n\t\tSystem.out.println(\"The int value is\"+ numberInt);\n\n\t}",
"public static void main(String[] args) {\n\t\n\t\tint i = 100;\n\t\tlong l = 70000;\n\t\tSystem.out.println(\"long value\" + l);\n\t\t\n\t\tint o = (int) l; //explicit type cast from long to int\n\t\t\n\t\tchar t = (char) i;\n\t\t\n\t\t\n\t\t//--TYPE CASTE BETWEEN DOUBLE AND FLOAT---//\n\t\t\n\t\tdouble d = 190.0;\n\t\tfloat r = (float)d;\n\t\tSystem.out.println(\"float value\" + r);\n\t\tSystem.out.println(\"double value\" + d);\n\t\t\n\t\t\n\t\t//--TYPE CASTE BETWEEN DOUBLE-->LONG--> INT---//\n\t\t\n\t\t\n\t\tdouble d2 = 1000.046543;\n\t\tSystem.out.println(\"double value\" + d2);\n\t\tlong l2 = (long)d2;\n\t\tint i2 = (int) l2;\n\t\tSystem.out.println(\"double value\" + d2);\n\t\tSystem.out.println(\"long value\" + l2);\n\t\tSystem.out.println(\"int value\" + i2);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\n\t}",
"private static Instruction propagateCastAsScalarVariablePrivacy(VariableCPInstruction inst, ExecutionContext ec){\n\t\tinst = (VariableCPInstruction) propagateFirstInputPrivacy(inst, ec); \n\t\treturn preprocessInstructionSimple(inst, ec);\n\t}",
"public static void main(String[] args) {\n byte primitiveByte = 127;\n Byte aByte = primitiveByte; // autoboxing\n byte unboxedByte = aByte; // unboxing\n\n short primitiveShort = 1234;\n Short aShort = primitiveShort;\n short unboxedShort = aShort;\n\n int primitiveInt = 123123;\n Integer anInteger = primitiveInt;\n int unboxedInt = anInteger;\n\n long primitiveLong = 1231241241l;\n Long aLong = primitiveLong;\n long unboxedLong = aLong;\n\n float primitiveFloat = 123.3F;\n Float aFloat = primitiveFloat;\n float unboxedFloat = aFloat;\n\n double pritiveDouble = 123.3;\n Double aDouble = pritiveDouble;\n double unboxedDouble = aDouble;\n\n boolean primitiveBolean = true;\n Boolean aBoolean = primitiveBolean;\n boolean unboxedBolean = aBoolean;\n\n char primitiveChar = 'A';\n Character aCharacter = primitiveChar;\n char unboxedChar = aCharacter;\n\n Character aNullCharacter = null;\n char unboxedNullChar = aNullCharacter;\n System.out.println(unboxedNullChar); //NullPointerException\n }",
"public static void main(String[] args) {\n\n\t\tdouble d=12/7;\n\t\tSystem.out.println(d);\n\t\t\n\t\tdouble e=9;//widening\n\t\tSystem.out.println(e);\n\t\t\n\t\tint i=(int)9.99;// narrowing\n\t\tSystem.out.println(i);\n\t\t\n\t\tbyte b=(byte)130;// narrowing\n\t\tSystem.out.println(b);\n\t\t\n\t\t\n\t\t\n\t}",
"public abstract Double toDouble(T t);",
"public static void main(String[] args) {\r\n\t\r\n\t int numInt=10;\r\n\t Integer numInteger=10;\r\n\t \r\n\t double numdouble=5.5;\r\n\t Double numDouble=5.5;\r\n\t \r\n\t long longnum=20l;\r\n\t Long Longnum=longnum; //auto-boxing\r\n\t \r\n\t System.out.println(longnum);\r\n\t System.out.println(Longnum);\r\n\t \r\n\t Boolean Booleanresult=false;\r\n\t boolean boolresult=Booleanresult; //unboxing\r\n\t \r\n//\t Methods for wrapper classes:\r\n //max_value: returns the max value of the primitive\r\n\t char maximumChar=Character.MAX_VALUE;\r\n\t System.out.println(maximumChar);\r\n\t \r\n\t//min_value: returns the minimum value of primitive.\r\n\t \r\n\t int minimum=Integer.MIN_VALUE;\r\n\t System.out.println(minimum);\r\n\t \r\n\t byte miniByte=Byte.MIN_VALUE;\r\n\t System.out.println(miniByte);\r\n\t \r\n\t//parse methods: converts String values to primitives, nad returns values as primitives.\r\n\t \r\n\t //parseInt(\"strValue\"):takes the String and converts it to int.\r\n\t \r\n\t Integer num1=Integer.parseInt(\"123\"); //auto-boxing\r\n\t System.out.println(num1+1); //124\r\n\t \r\n\t //parseByte(\"strValue\"):takes a string value and converts it to primitive returning a byte value.\r\n\t \r\n\t int num3=Byte.parseByte(\"19\");\r\n\t System.out.println(num3+1); //20\r\n\t \r\n\t //parseShort(\"strValue\"):takes a string value and converts it to primitive returning a short value.\r\n\t \r\n\t short num4=Short.parseShort(\"123\");\r\n\t System.out.println(num4+5); //128\r\n\t \r\n\t //parseBoolean(\"strValue\"): takes string value and converts it to boolean primitive.\r\n\t boolean A=Boolean.parseBoolean(\"CybertekBatch12\"); //any string value other than true, it will return false\r\n\t System.out.println(A); //false\r\n\t \r\n\t boolean B=Boolean.parseBoolean(\"TrUe\");\r\n\t System.out.println(B); //parseBoolean method ignores the case sensitivity in this case.\r\n\t \r\n\t \r\n//\t ValueOf methods: converts String value to Wrapper class value.\r\n\t \r\n\t int z=Integer.valueOf(\"1234\");\r\n\t System.out.println(z);\r\n\t \r\n\t boolean result1=Boolean.valueOf(\"TRUE\"); //this method also ignores the case sensitivity and \r\n\t //since the result is primitive, it prints out the exact one as the string\r\n\t System.out.println(result1);\r\n\t \r\n\t \r\n\t int totalNum=100;\r\n\t \r\n}",
"public static void main(String[] args) {\n\t\tdouble d=10;\n\t\tSystem.out.println(d);\n\t\t\n\t\tint i=(int)10.99;\n\t\tSystem.out.println(i);\n\t\tbyte b=(byte)1243;\n\t\tSystem.out.println(b);\n\t\t\n\n\t}",
"Datatype internalize(Datatype arg) throws CCAException;",
"@Test\n public void testLiteralCast() {\n for (int i = 0; i < 3; i++) {\n boolean useDecimalV2 = i > 1;\n boolean enableRewrite = (i % 2) == 1;\n {\n // Boundary case in which the positive value is a DECIMAL,\n // becomes BIGINT when negated by the parser.\n String query = \"select getBit(\" + Long.MIN_VALUE + \", 63)\";\n Expr expr = analyze(query, useDecimalV2, enableRewrite);\n assertEquals(Type.TINYINT, expr.getType());\n }\n {\n // Would eval to NaN, so keep original expr.\n String query = \"select cast(10 as double) / cast(0 as double)\";\n Expr expr = analyze(query, useDecimalV2, enableRewrite);\n assertEquals(Type.DOUBLE, expr.getType());\n assertTrue(expr instanceof ArithmeticExpr);\n }\n {\n // Extreme double value. Ensure double-->BigDecimal noise\n // does not cause overflows\n String query = \"select cast(\" + Double.toString(Double.MAX_VALUE) +\n \" as double)\";\n Expr expr = analyze(query, useDecimalV2, enableRewrite);\n assertEquals(Type.DOUBLE, expr.getType());\n if (enableRewrite) {\n assertTrue(expr instanceof NumericLiteral);\n } else {\n assertTrue(expr instanceof CastExpr);\n }\n }\n {\n // As above, but for extreme minimum (smallest) values\n String query = \"select cast(\" + Double.toString(Double.MIN_VALUE) +\n \" as double)\";\n Expr expr = analyze(query, useDecimalV2, enableRewrite);\n assertEquals(Type.DOUBLE, expr.getType());\n if (enableRewrite) {\n assertTrue(expr instanceof NumericLiteral);\n } else {\n assertTrue(expr instanceof CastExpr);\n }\n }\n {\n // Math would cause overflow, don't rewrite\n String query = \"select cast(1.7976931348623157e+308 as double)\" +\n \" / cast(2.2250738585072014e-308 as double)\";\n Expr expr = analyze(query, useDecimalV2, enableRewrite);\n assertEquals(Type.DOUBLE, expr.getType());\n assertTrue(expr instanceof ArithmeticExpr);\n }\n {\n // Math would cause overflow, don't rewrite\n String query = \"select cast(cast(1.7976931348623157e+308 as double) as float)\";\n Expr expr = analyze(query, useDecimalV2, enableRewrite);\n assertEquals(Type.FLOAT, expr.getType());\n assertTrue(expr instanceof CastExpr);\n }\n }\n }",
"public static void main(String[] args) {\n\t\t// Java is not a pure OOP language >> because we have primitive types in Java\n\n\t\tint num = 10;\n\t\tdouble num1 = 20;\n\n\t\t// if we know the number we want to convert takes enough space from the memory,\n\t\t// then we can do explicit casting.\n\t\tnum = (int) num1;\n\n\t\t// this is an implicit casting, it happens automatically\n\t\tnum1 = num;\n\n\t}",
"public <T> T cast();",
"public static int OpaqueToType(byte[] b) { \n int type = b[8];\n return type; \n }",
"public static void main(String[] args) {\n byte a=25;\n short b=124;\n int c=200;\n long d=50000L+10L*(a+b+c);\n System.out.println (d);\n\n short az=(short)(1000+10*(a+b+c));\n System.out.println (az);\n\n\n\n }",
"public static void main(String[] args) {\nint i=1;\nbyte b=1;\nshort s=1;\nlong l=1L;\ndouble d=1d;\nfloat f=1f;\nSystem.out.println(\"the values are \"+i);\nSystem.out.println(\"the values are \"+b);\n\nSystem.out.println(\"the values are \"+s);\nSystem.out.println(\"the values are \"+l);\nSystem.out.println(\"the values are \"+d);\nSystem.out.println(\"the values are \"+f);\n\n\t}",
"public static void main(String[]args) {\n\t\tdouble d=10;\n\t\tint num=10;\n\t\t\n\t\tSystem.out.println(d);\n\t\tint i=(int) 12.99;\n\t\tSystem.out.println(i);\n\t\tbyte b=(byte)130;\n\t\tSystem.out.println(b);\n\t\t\n\t double number =12;\n\t\tdouble result = number/5;\n\t\tSystem.out.println(result);\n\t\t\n\t\tdouble newNum=10;\n\t\tnewNum=newNum/3;\n\t\tSystem.out.println(newNum);\n\t\t\n\t\tdouble num1=10+10.5;\n\t\t\n\t\tSystem.out.println(num1);\n\t\t\n\t\n\t\t\n\t}",
"public static void main(String[] args) {\n\tbyte b2 = (byte)(300);\n\tSystem.out.println(b2);\n\t\n\tint i = 0X20; \n\tSystem.out.println(i);\n\t// When we put 0 before any int = it become octal\n\t// When we put 0X before any int = it become hexa-decimal\n\t\n\tlong j = 23_76_32_86_83_26_37_28l;\n\tSystem.out.println(j);\n\t// floating\n\t// float - 4 byte\n\t// double - 8 byte\n\t\n\t\n\tfloat fl = 90.8f;\n\tdouble d1 = 123.0d;\n\t\n\t// char - ascii 1 byte, unicode - 2byte\n\tchar c = 'j';\n\t// ASCII\n\tint k = c;\n\t// boolean - 1 bit (true/false)\n\tSystem.out.println(k);\n\t// all char is int\n\t\n\t\n\tint m = 1000; // 4 byte \n\tchar v = (char)m; // 1 byte\n\tSystem.out.println(v);\n\t\n\t\n\t// datatype , who values are keyword\n\t// we can have only 2 values = true/false\n\tboolean bool = true;\n\tbool = false;\n\t\n\t\n}",
"public static void main(String[] args) {\nshort i = 128;\r\nbyte shortToByte = (byte)i;\r\nSystem.out.println(shortToByte);\r\nbyte t = 127;\r\nt++;\r\nSystem.out.println(t);\r\nt++;\r\nSystem.out.println(t);\r\n\r\n\t}",
"private void ex04(){\n int number;\n number = 1;\n\n double number2;\n number2 = 1.5;\n\n String number3;\n number3 = \"3\";\n\n boolean bool = (number == 1);\n\n myWindow.clearOut();\n myWindow.writeOutLine(number);\n myWindow.writeOutLine(new String(String.valueOf(number))); //int to string\n myWindow.writeOutLine((double) number); //int to double\n myWindow.writeOutLine(bool); //int to boolean\n\n /*\n Java can perform number -> string\n method 1: numberType.toString\n method 2: String.valueOf(int/double/float) //used above in the code\n Java can also perform string -> number\n dataType.parseDatatype() // e.g.: Integer.parseInt()\n\n Java allows this only when the conversion is widening (small -> larger)\n alternatively reports a compile error if the conversion is narrowing\n */\n\n //YOUR CODE ABOVE HERE\n }",
"@Override\n\tpublic void visit(CastExpression arg0) {\n\t\t\n\t}",
"public static void main(String[] args) {\n// System.out.println(\"Run!Run!Run!!!!\");\n byte byteVar1; // its best to form a habbit to create names with meaning. creation of var\n// variable declaration\n byteVar1 = 35; // byteVar1 get information\n byteVar1 = 12; // change var.\n byte byteVar2 = 10;\n byte byteVar3, byteVar4;\n byte byteVar5 = 10, byteVar6 = 12;\n short shortVar = -155;\n int intVar = 312;\n int intVar2 = 1_000_123_000;\n long longVar = -3000000L; // only for long\n float floatVar = 5.7f;\n double doubleVar = 2.367;\n\n // char (2 bytes)\n // symbol nomber in unikod table\n\n boolean booleanVar = true;\n booleanVar = false;\n\n // Type merging.(Приведение типов)\n byte someByte = 10;\n int someInt = someByte; // variable someInt war created and then feelde with 10\n someInt = 200;\n// someByte = someInt; doesnot wark.\n // явное приведение!\n someByte = (byte) someInt;\n\n int a = 10;\n int b = 91;\n int c = b % a;\n// System.out.println(c + \" variable c\");\n short x = 56;\n short y = 397;\n// short z = x%y; result of all operations wth byte and short is always int!!!!!!!!!\n int res = x + y;\n long res2 = x / y;\n short rezTr = (short) (x + y);\n int n =100;\n double m =200.6;\n// int zeroDiv =n/0;\n// double zeroDivD = m/0;\n// System.out.println(\"Integer \"+zeroDiv);\n// System.out.println(\"Integer \"+zeroDivD);\n someByte =3;\n someByte =(byte) (someByte*7);\n someByte *=7; // the same. take somebyte multiply by 7 the assignment its comfortoble but troublemaking\n\n someInt =10;\n someInt = someInt +20;\n someInt +=20;\n //var =(condition) ? -> if true :if false\n\n int k =25;\n int l = 8;\n int wrk = 256;\n int res234 = ((wrk%2) == 0) ? wrk/2: wrk*2;\n System.out.println( \"итого \"+res234);\n\n\n\n }",
"@Override\r\n\tpublic void cast() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void cast() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void cast() {\n\t\t\r\n\t}",
"public interface Doubleton {\n static double identity(double input) {\n return input;\n }\n\n static float toFloat(double input) {\n return (float) input;\n }\n\n static byte toByte(double input) {\n return (byte) input;\n }\n\n static int toInt(double input) {\n return (int) input;\n }\n\n static long toLong(double input) {\n return (long) input;\n }\n\n static short toShort(double input) {\n return (short) input;\n }\n static String toString(double input) {\n return String.valueOf(input);\n }\n\n static Byte toBoxedByte(double input) {\n return toByte(input);\n }\n\n static Double toBoxedDouble(double input) {\n return input;\n }\n\n static Float toBoxedFloat(double input) {\n return toFloat(input);\n }\n\n static Integer toBoxedInteger(double input) {\n return toInt(input);\n }\n\n static Long toBoxedLong(double input) {\n return toLong(input);\n }\n\n static Short toBoxedShort(double input) {\n return toShort(input);\n }\n\n static double[] toArray(double value) {\n return new double[]{value};\n }\n}",
"private static int m6082a(Class<?> cls) {\n if (cls == Double.TYPE) {\n return 1;\n }\n if (cls == Float.TYPE) {\n return 2;\n }\n if (cls == Long.TYPE) {\n return 3;\n }\n if (cls == Integer.TYPE) {\n return 4;\n }\n if (cls == Short.TYPE) {\n return 5;\n }\n if (cls == Character.TYPE) {\n return 6;\n }\n if (cls == Byte.TYPE) {\n return 7;\n }\n if (cls == Boolean.TYPE) {\n return 99;\n }\n return 8;\n }",
"public T caseDatatype(Datatype object)\n {\n return null;\n }",
"public static void main(String[] args) {\n int iValue=256;//\n //强制把一个int类型的值转换为byte类型的值\n byte bValue=(byte)iValue;//-128--0-127\n System.out.println(bValue);//将输出多少?为什么\n short s3=100;\n s3=(short)(s3+2);\n\n byte b=25;//25.0\n char c='a';//97.0\n int i=23;\n double d=.3;\n //右边表达式中在最高等级操作数为duble类型,\n //则右边表达式的类型为double型,故付给一个double型变量\n float result=(float)(b+c+i*d);\n System.out.println(result);\n System.out.println('a'+\"\"+1);\n System.out.println('a'+1+\"\");\n\n System.out.println(1+\"\"+'a'+'b');\n System.out.println('a'+\"\"+'b');\n System.out.println('d'+1*'a'+'c');\n\n\n }",
"private void functionalInterfacesForDoubleIntLong() {\n double d = 1.0;\n DoubleToIntFunction f1 = x -> 1;\n f1.applyAsInt(d);\n\n }",
"public static void main(String[] args) {\n byte contohByte = 100;\n short contohShort = 10000;\n int contohInt = 32000;\n long contohLong = 12000000;\n long contohLong2 = 120000000L;\n\n float contohFloat = 3.14F;\n double contohDouble = 3.12345667;\n\n int desimalInt = 43;\n int hexadecimalInt = 0x123fa;\n int binaryInt = 0b00010001;\n\n\n\n }",
"public static void main(String[] args) {\n\t\t\n\t\t System.out.println(\"Hello World\");\n\t\t \n\t\t int myInt = 10; // Integer demo\n\t\t System.out.println(myInt); // Outputs 10\n\t\t \n\t\t float myFloat = 10.37f; // Float demo\n\t\t System.out.println(myFloat); // Outputs 10.37\n\t\t \n\t\t short myShort = 10000; // Short demo\n\t\t System.out.println(myShort); // Outputs 10000\n\t\t \n\t\t byte myByte = 100; // Byte demo\n\t\t System.out.println(myByte); // Outputs 100\n\t\t \n\t\t long myLong = -10000000000L; // long demo\n\t\t System.out.println(myLong); // Outputs -10000000000\n\t\t // don't understand doubles\n\t\t \n\t\t double myDouble = 19.99d; // double demo\n\t\t System.out.println(myDouble); // Outputs ?\n\t\t \n\t\t boolean myBoolean = true; // boolean demo\n\t\t System.out.println(myBoolean); //outputs true\n\t\t \n\t\t char myChar = 'F'; // char demo\n\t\t System.out.println(myChar); //outputs F\n\t\t \n\t\t String myString = \"yippee\"; // String demo\n\t\t System.out.println(myString); //outputs yippee\n\t\t \n\t\t int myNum = 1000; \n\t\t double myDoubleNum = myNum; // Automatic casting: int to double\n\t\t System.out.println(myNum); // Outputs 1000\n\t\t System.out.println(myDoubleNum); // Outputs 1000\n\t\t \n\t\t double myDouble2 = 9.78;\n\t\t int myInt2 = (int) myDouble2; // Manual casting: double to int\n\n\t\t System.out.println(myDouble2); // Outputs 9.78\n\t\t System.out.println(myInt2); // Outputs 9\n\t\t \n\t\t\n\n\t myInt = 9;\n\t\t myDouble = myInt; // Automatic casting: int to double\n\n\t\t System.out.println(myInt); // Outputs 9\n\t\t System.out.println(myDouble); // Outputs 9.0 \n\t\t\n\t\t //Operators\n\t\t\n\t\t\n\t\t System.out.println (\"\\nSection on Operators\"); // header on operators\n\n\t\t\n\t\t int x, y, z; //declare integers\n\t\t\n\t\t\t // Add an Interger\n\t x = 10; y=20; z=30; // Add integer demo\n\t\t x += 5; // add 5 to x\n\t\t System.out.println(x); // Outputs 15\n\t\t // subtract integer demo\n\t\t x -= 3; // subtract -1 from x\n\t\t System.out.println(x); // Outputs 9\n\t\t // division demo\n\t\t x /= 3; // divide by 3\n\t\t System.out.println(x); // outputs 3\n\t\t // multiplication demo\n\t\t x *= 4; // multiply by 4\n\t\t System.out.println(x); // outputs 16\t\n\t\t // increment by 1\n\t\t x++; // increase by 1\n\t\t System.out.println(x); // outputs 17\n\t\t // modulous demo\n\t\t x%=4; // divide x by 4 and save remainder which is 1 in x\n\t\t System.out.println(x); // outputs 1\n\t\t \n\t\t x+=17; // set 17 to x\n\t\t System.out.println(x); // outputs 18\n\t\t // decrement by 1\n\t\t x--; // decrease by 1\n\t\t System.out.println(x); //o utputs 17\n\t\t \n\t\t // Comparison Operators ==, !=, > , <, >=, <=\n\t\t System.out.println (\"\\nSection on Comparison Operators\"); // header on comparison operators\n\n\t\t System.out.println(x); \n\t\t System.out.println(x<y); // outputs true\n\t\t System.out.println(x<y && y<z); // outputs true \n\t\t System.out.println(x); // outputs 17\n\t\t System.out.println(y); // outputs 20\n\t\t System.out.println(z); // outputs 30\n\t\t // Comparing variables\n\t\t y = 2; // set y to 2\n\t\t System.out.println(x<y || y<z);\n\t\t x = 70;\n\t\t y = 50;\n\t\t System.out.println(x<y || y<z); // 70<2 50 or 50<30 which is false\n\t\t \n\t\t // Strings\n\t\t System.out.println (\"\\nSection on Strings\"); // header on strings\n\n\t\t String FirstName = (\"Jeffrey \"); // initialize to Jeff\n\t\t String MiddleName = (\"Edward \"); // initialize to Edward\n\t\t String LastName = (\"Dowds\"); //initialize to Dowds\n\t\t System.out.println (FirstName + MiddleName + LastName); // Output Jeffrey Edward Dowds\n\t\t System.out.println (FirstName + MiddleName + LastName ); // Output Jeffrey Edward Dowds\n\t\t System.out.println (FirstName.toUpperCase()); //convert first name to upper case\n\t\t System.out.println (FirstName.toLowerCase()); // convert first name to lower case\n\t\t System.out.println (FirstName.length()); //lenght of string and output 8\n System.out.println (FirstName.indexOf(\"rey\")); // character location of \"rey\"\n\t\t System.out.println (FirstName + MiddleName + LastName.toUpperCase()); // Output Jeffrey Edward Dowds\n System.out.println (FirstName.concat(MiddleName)+ LastName); // use concat method to put two strings together \n\t\t \n // Special Characters\n \n\t\t System.out.println (\"\\nSection on Special Characters\"); // header on special characters\n\t\t \n\t\t System.out.println (\"Going to kick \\\"ass\\\" at Java\"); // demo special char \\\n\t\t System.out.println (\"Demonstrating inserting a new line \\n\"); // demo on new line\n\t\t System.out.println (\"Did I put a new line in? I did\"); // verifying I put a new line in\n\t\t \n\t\t System.out.println (\"Demonstrating puting a carriage return in vs. a new line \\r\"); // demo carriage return\n\t\t System.out.println (\"Did I put a carriage return in? I did not what is a carriage return?\"); // verifying I put a new line in\n\t\t \n\t\t \n\t\t System.out.println (FirstName + LastName + \" getting good at Java\"); // concatenating strings\n\n // Java math\n\t\t \n\t\t System.out.println (\"\\nSection on Java Math\"); // header on Java Math\n int a = 16; // declaring and initializing variables a,b,c,d\n int b = 32;\n int c = 64;\n int d = -128;\n System.out.println(Math.min(a,b)); // executing math methods min,max,sqrt,abs\n System.out.println(Math.max(a, b));\n System.out.println(Math.sqrt(c));\n System.out.println(Math.abs(d));\n \n \t\t \n \t\t \n\t}",
"@Override\n\tpublic void outACastExpr(ACastExpr node) {\n\t\tType t = nodeTypes.get(node.getExpr());\n\t\tboxIt(t); \n\t\tType result = nodeTypes.get(node.getType()); \n\t\til.append(fi.createCast(getBecelType(t), getBecelType(result)));\n\t\tunboxIt(result); \t\n\t}",
"public abstract void writeAsDbl(int offset, double d);",
"public static Double toDouble(Object o,byte type) throws ExecException {\n try {\n switch (type) {\n case BOOLEAN:\n return (Boolean) o ? Double.valueOf(1.0D) : Double.valueOf(0.0D);\n\n case INTEGER:\n return new Double(((Integer)o).doubleValue());\n\n case LONG:\n return new Double(((Long)o).doubleValue());\n\n case FLOAT:\n return new Double(((Float)o).doubleValue());\n\n case DOUBLE:\n return (Double)o;\n\n case DATETIME:\n return new Double(Long.valueOf(((DateTime)o).getMillis()).doubleValue());\n\n case BYTEARRAY:\n return Double.valueOf(((DataByteArray)o).toString());\n\n case CHARARRAY:\n return Double.valueOf((String)o);\n\n case BIGINTEGER:\n return Double.valueOf(((BigInteger)o).doubleValue());\n\n case BIGDECIMAL:\n return Double.valueOf(((BigDecimal)o).doubleValue());\n\n case NULL:\n return null;\n\n case BYTE:\n case MAP:\n case INTERNALMAP:\n case TUPLE:\n case BAG:\n case UNKNOWN:\n default:\n int errCode = 1071;\n String msg = \"Cannot convert a \" + findTypeName(o) +\n \" to a Double\";\n throw new ExecException(msg, errCode, PigException.INPUT);\n }\n } catch (ClassCastException cce) {\n throw cce;\n } catch (ExecException ee) {\n throw ee;\n } catch (NumberFormatException nfe) {\n int errCode = 1074;\n String msg = \"Problem with formatting. Could not convert \" + o + \" to Double.\";\n throw new ExecException(msg, errCode, PigException.INPUT, nfe);\n } catch (Exception e) {\n int errCode = 2054;\n String msg = \"Internal error. Could not convert \" + o + \" to Double.\";\n throw new ExecException(msg, errCode, PigException.BUG);\n }\n }",
"public T convert(Number source)\r\n/* 26: */ {\r\n/* 27:56 */ return NumberUtils.convertNumberToTargetClass(source, this.targetType);\r\n/* 28: */ }",
"public abstract double readAsDbl(int offset);",
"public static void main(String[] args) {\n\t\n\tint i=100;\n\tInteger j=i; // auto boxing\n\t\n\tDouble d=34.2;\n\t\n\tboolean b=true;\n\tboolean b2=b;\n\t\n\tList<Integer>nums=new ArrayList<>();\n\tnums.add(433);\n\tint p=555;\n\tnums.add(p);\n\tnums.add(new Integer(77));\n\t\n\tSystem.out.println(nums);\n\t // UnBoxing == takind the wrapper class object and converting into primitive and happens automatically\n\tint r = nums.get(0);\n\t\n\tboolean bool= new Boolean(false);\n\tboolean boolprim=bool;\n\tSystem.out.println(boolprim);\n\t\n\tCharacter chObj='^'; //autoboxing\n\tchar chPrim=chObj;\n\t\n\tchar myChar='^';\n\tCharacter chObj2=myChar; // autoboxing\n\t\n\tchar chprim=chObj; // unboxing from character object\n\t\n\tInteger intValue = new Integer (400);\n\t\n\tif(intValue==400) { // unboxing \n\t\tSystem.out.println(\"Pass\");\n\t}else {\n\t\tSystem.out.println(\"Fail\");\n\t}\n\t\n\t\n\tString word=\"java\";\n\tword=word.toUpperCase();\n\tword=word+\"programminng\";\n\tSystem.out.println(word);\n}",
"public void puzzle4(){\n\t\tshort x = 0;\n\t\tint i = 123456;\n\t\tx += i; // narrowing primitive conversion [JLS 5.1.3]\n\t\t//x = x + i; // wont compile:possible loss of precision\n\t\tSystem.out.println(\"Value of x \"+x);\n\t}",
"public interface DoubleType extends NumericType {\n}",
"public interface ScalarType extends java.io.Serializable\n{\n /** create a clone of this scalar's value. It is important to note that you should return a copy here unless you really want \n scalars of your scalar type to be passed by reference. */\n public ScalarType copyValue(); \n\n /** convert the scalar to an int */\n public int intValue();\n\n /** convert the scalar to a long */\n public long longValue();\n\n /** convert the scalar to a double */\n public double doubleValue();\n\n /** convert the scalar to a string */\n public String toString();\n\n /** convert the scalar to an object value *shrug* */\n public Object objectValue();\n\n /** returns the Class type of this ScalarType. Use this instead of getClass to allow other functions to wrap ScalarType's without breaking\n functionality */\n public Class getType();\n}",
"public abstract Number getPrimitiveType();",
"@ZenCodeType.Caster\n @ZenCodeType.Method\n default double asDouble() {\n \n return notSupportedCast(BasicTypeID.DOUBLE);\n }",
"public V cast(Object object) {\n return valueClass.cast(object);\n }",
"@Override\r\n\tpublic void cast() {\n\r\n\t}",
"public static void main (String[] args) {\n\n byte number = 6;\n// byte number1 = 127;\n //byte number2 = 129; for byte the rangde is -128 to 127 why its not compile\n short number3 = 100;\n short number4 = 31789;\n\n int number1;\n int num$=9;\n //int 5num=12 ===> this is NOT OK\n\n //system.out.println =sout;\n\n int number5=32_000;// you can use underscore (__) in beetween digits\n\n int number6= 1_000_000;// you can use (_) in beetwen numbers they are not effecting screen show\n\n System.out.println(number6);\n\n long number7=34345;\n long number8=74_813_492_034_854L;// you should use L at the end of the long values ....\n\n System.out.println(number8);\n\n float number9 = 2.3f; // you should use f/F at the end of float values\n float number10=56.0f;\n System.out.println(\"Value of number10--->\" +number10);\n\n\n double number12=2.1;\n\n double number13=89;// 89--->89.0 double data type can store int values\n\n System.out.println();\n\n //MOST COMMON primitive data toe USAGES ARE int, double, long, boolean\n\n\n\n\n}",
"public abstract T fromDouble(Double d);",
"@ZenCodeType.Caster\n @ZenCodeType.Method\n default short asShort() {\n \n return notSupportedCast(BasicTypeID.SHORT);\n }",
"public double getAsDouble(int index) {\n switch (type) {\n case TIFFTag.TIFF_BYTE: case TIFFTag.TIFF_UNDEFINED:\n return ((byte[])data)[index] & 0xff;\n case TIFFTag.TIFF_SBYTE:\n return ((byte[])data)[index];\n case TIFFTag.TIFF_SHORT:\n return ((char[])data)[index] & 0xffff;\n case TIFFTag.TIFF_SSHORT:\n return ((short[])data)[index];\n case TIFFTag.TIFF_SLONG:\n return ((int[])data)[index];\n case TIFFTag.TIFF_LONG: case TIFFTag.TIFF_IFD_POINTER:\n return ((long[])data)[index];\n case TIFFTag.TIFF_FLOAT:\n return ((float[])data)[index];\n case TIFFTag.TIFF_DOUBLE:\n return ((double[])data)[index];\n case TIFFTag.TIFF_SRATIONAL:\n int[] ivalue = getAsSRational(index);\n return (double)ivalue[0]/ivalue[1];\n case TIFFTag.TIFF_RATIONAL:\n long[] lvalue = getAsRational(index);\n return (double)lvalue[0]/lvalue[1];\n case TIFFTag.TIFF_ASCII:\n String s = ((String[])data)[index];\n return Double.parseDouble(s);\n default:\n throw new ClassCastException();\n }\n }",
"protected Object readFixedType(BinaryReaderExImpl reader) throws BinaryObjectException {\n Object val = null;\n\n switch (mode) {\n case BYTE:\n val = reader.readByteNullable(id);\n\n break;\n\n case SHORT:\n val = reader.readShortNullable(id);\n\n break;\n\n case INT:\n val = reader.readIntNullable(id);\n\n break;\n\n case LONG:\n val = reader.readLongNullable(id);\n\n break;\n\n case FLOAT:\n val = reader.readFloatNullable(id);\n\n break;\n\n case DOUBLE:\n val = reader.readDoubleNullable(id);\n\n break;\n\n case CHAR:\n val = reader.readCharNullable(id);\n\n break;\n\n case BOOLEAN:\n val = reader.readBooleanNullable(id);\n\n break;\n\n case DECIMAL:\n val = reader.readDecimal(id);\n\n break;\n\n case STRING:\n val = reader.readString(id);\n\n break;\n\n case UUID:\n val = reader.readUuid(id);\n\n break;\n\n case DATE:\n val = reader.readDate(id);\n\n break;\n\n case TIMESTAMP:\n val = reader.readTimestamp(id);\n\n break;\n\n case TIME:\n val = reader.readTime(id);\n\n break;\n\n case BYTE_ARR:\n val = reader.readByteArray(id);\n\n break;\n\n case SHORT_ARR:\n val = reader.readShortArray(id);\n\n break;\n\n case INT_ARR:\n val = reader.readIntArray(id);\n\n break;\n\n case LONG_ARR:\n val = reader.readLongArray(id);\n\n break;\n\n case FLOAT_ARR:\n val = reader.readFloatArray(id);\n\n break;\n\n case DOUBLE_ARR:\n val = reader.readDoubleArray(id);\n\n break;\n\n case CHAR_ARR:\n val = reader.readCharArray(id);\n\n break;\n\n case BOOLEAN_ARR:\n val = reader.readBooleanArray(id);\n\n break;\n\n case DECIMAL_ARR:\n val = reader.readDecimalArray(id);\n\n break;\n\n case STRING_ARR:\n val = reader.readStringArray(id);\n\n break;\n\n case UUID_ARR:\n val = reader.readUuidArray(id);\n\n break;\n\n case DATE_ARR:\n val = reader.readDateArray(id);\n\n break;\n\n case TIMESTAMP_ARR:\n val = reader.readTimestampArray(id);\n\n break;\n\n case TIME_ARR:\n val = reader.readTimeArray(id);\n\n break;\n\n case OBJECT_ARR:\n val = reader.readObjectArray(id);\n\n break;\n\n case COL:\n val = reader.readCollection(id, null);\n\n break;\n\n case MAP:\n val = reader.readMap(id, null);\n\n break;\n\n case BINARY_OBJ:\n val = reader.readBinaryObject(id);\n\n break;\n\n case ENUM:\n val = reader.readEnum(id, field.getType());\n\n break;\n\n case ENUM_ARR:\n val = reader.readEnumArray(id, field.getType().getComponentType());\n\n break;\n\n case BINARY_ENUM:\n val = reader.readBinaryEnum(id);\n\n break;\n\n case BINARY:\n case OBJECT:\n val = reader.readObject(id);\n\n break;\n\n case CLASS:\n val = reader.readClass(id);\n\n break;\n\n default:\n assert false : \"Invalid mode: \" + mode;\n }\n\n return val;\n }",
"T convert(S e);",
"public static void main(String[] args) {\n\t\tDataTypeTest test = new DataTypeTest();\r\n\t\ttest.i = -1/0; \r\n\t\ttest.i = (int) 3.5f;\r\n\t\ttest.d = 2l;\r\n\t\t//test.s = (short) 10000000000000000000;\r\n\t\ttest.b = (byte) test.s;\r\n\t\ttest.f = test.l;\r\n\t\ttest.c = (char) test.i;\r\n\t\t//test.bool = 1;\r\n\t}",
"public int a(String paramString, int paramInt1, int paramInt2, int paramInt3)\r\n/* 239: */ {\r\n/* 240:247 */ return a(paramString, (float)paramInt1, (float)paramInt2, paramInt3, false);\r\n/* 241: */ }",
"public static void main(String[] args) {\n short x = 1;\r\n int y = x + 2;\r\n System.out.println(y);\r\n\r\n // Explicit Casting\r\n double z = 1.1;\r\n int v = (int)x + 2;\r\n System.out.println(v);\r\n\r\n \r\n String q = \"1\";\r\n //Integer.parseInt() = int\r\n //Short.parseShort, Float.parseFloat, etc.\r\n int w = Integer.parseInt(q) + 2;\r\n System.out.println(w);\r\n\r\n // what if string is a float...\r\n String e = \"1.1\";\r\n float r = Float.parseFloat(e) + 2;\r\n System.out.println(r);\r\n\r\n // what if string is a double...\r\n String t = \"1.1\";\r\n double p = Double.parseDouble(t) + 2;\r\n System.out.println(p);\r\n }",
"public NumberToNumber(Class<T> targetType)\r\n/* 21: */ {\r\n/* 22:52 */ this.targetType = targetType;\r\n/* 23: */ }",
"public static void main(String[] args) {\n\tint age = 56;\n\tInteger age2 = age;\n\tboolean raining = false;\n\tBoolean raining2 = raining;\n\tint i = 10;\n\tList<Integer> ages = new ArrayList<>();\n\tages.add(34);\n\t\n\t//valueO\n\t//If Integer gets converted to int type then its Unboxing\n}",
"protected static double convertNumberToDouble( final Object number )\n\t{\n\t\tdouble returnValue = 0.0d;\n\n\t\tif ( number instanceof Integer )\n\t\t{\n\t\t\treturnValue = ( ( Integer ) number ).doubleValue( );\n\t\t}\n\t\telse if ( number instanceof Double )\n\t\t{\n\t\t\treturnValue = ( ( Double ) number ).doubleValue( );\n\t\t}\n\n\t\treturn returnValue;\n\t}",
"OpFunctionCast createOpFunctionCast();",
"static double convert(double in) {\n return (in * 0.254);\n }",
"public static void main(String[] args) {\n Integer obj1 = Integer.valueOf(23);\n Double obj2 = Double.valueOf(5.55);\n Boolean obj3 = Boolean.valueOf(true);\n\n // converts into prinitive types\n int var1 = obj1.intValue();\n double var2 = obj2.intValue();\n boolean var3 = obj3.booleanValue();\n\n // print the primitive values\n System.out.println(\"The value of int variable: \" + var1);\n System.out.println(\"The value of double variable: \" + var2);\n System.out.println(\"The value of boolean variable: \" + var3);\n }",
"private static byte int2(int x) { return (byte)(x >> 16); }",
"@Override\n\tpublic short readScalarShort() throws IOException {\n\t\treturn 0;\n\t}",
"private final boolean m28064c(Number number) {\n return (number instanceof Short) || (number instanceof Byte);\n }",
"private static int[] doubleToInt(double[] s, int[] d) {\n // for (int i = 0; i < d.length; i++) {\n // d[i] = s[i];\n // }\n // return d;\n for (int i=0; i < s.length; i++) {\n d[i] = (int) s[i];\n }\n return d;\n }",
"int toInt (double val) {\n return (int)val;\n }",
"public static void main(String[] args) {\n\t\tfloat f1=100.0f;\r\n\t\tbyte b1=80;\r\n\t\tchar c='o';\r\n\t\tString s1=\"123\";\r\n\t\tf1=(int)f1<<2;\r\n\t\tb1=(byte)(b1<<2);\r\n\t\t//s1=s1<<2;\r\n\t\tc=(char)(c<<2);//位运算符的操作数只能是整形和字符型\r\n\t\tSystem.out.println(f1);\r\n\t\tSystem.out.println(b1);\r\n\t\tSystem.out.println(c);\r\n\t}",
"public abstract double read_double();",
"public OCFloat(OCInteger lenType)\r\n {\r\n super(lenType);\r\n setLength(4);\r\n }",
"@Override\r\n\tpublic void visit(CastExpression castExpression) {\n\r\n\t}",
"public abstract short read_short();",
"public static void main(String[] args) {\n\n int a1 = 100;\n float f1 = (long) a1;\n // f1 = 100L;\n //f1 = 100.0;\n System.out.println(f1);\n\n long l1 = (short) f1;\n //l1= 100;\n System.out.println(l1);\n\n String name;\n //System.out.println(name); //not compiling : In java: first come first serve\n\n String Name= \"Cybertek\";\n System.out.println(Name);\n\n\n\n }",
"@Test\n public void decodeDouble()\n {\n final double[] array = new double[4];\n array[0] = 0;\n array[1] = 0;\n array[2] = 1;\n array[3] = 1;\n\n final BinaryEncoder encoder = new BinaryEncoder(16);\n assertEquals(3.0, encoder.decode(array), 0.0);\n }",
"public abstract float read_float();"
] | [
"0.75439185",
"0.684201",
"0.66151124",
"0.65096426",
"0.6440909",
"0.64147806",
"0.61721146",
"0.6137102",
"0.60999525",
"0.6092341",
"0.60675293",
"0.60335886",
"0.601085",
"0.5965006",
"0.59521586",
"0.5941058",
"0.59058976",
"0.5869585",
"0.57795924",
"0.5611503",
"0.5608431",
"0.5608126",
"0.5603911",
"0.55836415",
"0.55804396",
"0.5580039",
"0.55625385",
"0.5537332",
"0.55344814",
"0.5534454",
"0.5533766",
"0.5493409",
"0.5491868",
"0.5476373",
"0.54722583",
"0.54585624",
"0.5435424",
"0.5409991",
"0.54080427",
"0.5398836",
"0.5371776",
"0.53714454",
"0.5333094",
"0.5315297",
"0.53121597",
"0.52997005",
"0.52982706",
"0.5277284",
"0.52761656",
"0.52599514",
"0.52599514",
"0.52599514",
"0.5257901",
"0.5242768",
"0.5240946",
"0.5237644",
"0.5235947",
"0.5230413",
"0.52288747",
"0.5226872",
"0.51868796",
"0.5182486",
"0.51649755",
"0.51634914",
"0.5158852",
"0.5151473",
"0.5144748",
"0.51425713",
"0.51237875",
"0.51031154",
"0.5092767",
"0.5090187",
"0.5086545",
"0.5086516",
"0.50739527",
"0.50738454",
"0.50578874",
"0.5056474",
"0.50469524",
"0.5042263",
"0.5039511",
"0.5034235",
"0.50291",
"0.5027944",
"0.5018882",
"0.50164425",
"0.5012017",
"0.501087",
"0.50106287",
"0.5010307",
"0.49950427",
"0.49848768",
"0.49708778",
"0.4970267",
"0.4969207",
"0.4969082",
"0.49682096",
"0.49681473",
"0.49664345",
"0.49545982"
] | 0.6768159 | 2 |
text in the card | public Cards(int imageProfile, String cardtext) {
this.imageProfile = imageProfile;
this.cardtext = cardtext;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\t\t\tpublic String getText() {\n\t\t\t\treturn text;\r\n\t\t\t}",
"@Override\n\tpublic String getText() {\n\t\treturn \"MMS: \" + text;\n\t}",
"public String cardDisplay(){\n if(this.faceDown) {\n return \"Bicycle\";}\n else{ return \"Friendly Names of: \" + this.rank + \":\"+this.suit;\n\n }\n }",
"@Override\n protected String[] getText() {\n return new String[] {\n MyTown.instance.LOCAL.getLocalization(\"mytown.sign.sell.title\").getUnformattedText(),\n MyTown.instance.LOCAL.getLocalization(\"mytown.sign.sell.description.owner\").getUnformattedText() + \" \" + owner.getPlayerName(),\n MyTown.instance.LOCAL.getLocalization(\"mytown.sign.sell.description.price\").getUnformattedText() + price,\n restricted ? MyTown.instance.LOCAL.getLocalization(\"mytown.sign.sell.description.restricted\").getUnformattedText() : \"\"\n };\n }",
"String getDisplayText();",
"@Override\r\n\tpublic void setText() {\n\t\t\r\n\t}",
"public String text() { return text; }",
"public String getText(){\r\n return text;\r\n }",
"public String getText(){\r\n\t\treturn text;\r\n\t}",
"public String getText();",
"public String getText();",
"public String getText();",
"public String getText();",
"public String text();",
"java.lang.String getText();",
"java.lang.String getText();",
"java.lang.String getText();",
"java.lang.String getText();",
"java.lang.String getText();",
"java.lang.String getText();",
"java.lang.String getText();",
"java.lang.String getText();",
"protected Text getText() {\n \t\treturn text;\n \t}",
"private void display()\r\n\t{\r\n\t\tif(cardSet.getCards().size() == 0)\r\n\t\t{\r\n\t\t\tString text = \"\";\r\n\t\t\ttextBox.setText(text);\r\n\t\t\tcardCounterTxt.setText(\"0 / 0\");\r\n\t\t\tMainRunner.getCardManager().setCurrentCard(null);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tCard card = cardSet.getCards().get(currentCardIdx);\r\n\t\t//set the current card in card manager.\r\n\t\tMainRunner.getCardManager().setCurrentCard(card);\r\n\t\tString text = \"\";\r\n\t\tif(front)\r\n\t\t{\r\n\t\t\ttext = card.getFront();\r\n\t\t\ttextBoxContainer.setStyle(\"-fx-border-color: blue\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tList<String> expl = card.getBack();\r\n\t\t\tfor(int i = 0; i < expl.size(); i++)\r\n\t\t\t{\r\n\t\t\t\tif(i + 1 == expl.size())\r\n\t\t\t\t\ttext += expl.get(i);\r\n\t\t\t\telse\r\n\t\t\t\t\ttext += expl.get(i) + \"\\n\";\r\n\t\t\t}\r\n\t\t\ttextBoxContainer.setStyle(\"-fx-border-color: green\");\r\n\t\t}\r\n\t\ttextBox.setText(text);\r\n\t\t\r\n\t\tcardCounterTxt.setText(currentCardIdx + 1 + \" / \" + cardSet.getCards().size());\r\n\t}",
"String getText();",
"String getText();",
"String getText();",
"String getText();",
"String getText();",
"String getText();",
"String getText();",
"public CharSequence getText();",
"@Override\n public String toString() {\n return text;\n }",
"protected Text getText()\r\n\t{\r\n\t\treturn text;\r\n\t}",
"public abstract String text();",
"public abstract String text();",
"@Override\n public void onCardAppeared(View view, int position) {\n TextView tv = view.findViewById(R.id.item_name);\n Log.d(TAG, \"onCardAppeared: \" + position + \", name: \" + tv.getText());\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\n return text;\n }",
"public abstract String getText();",
"public abstract String getText();",
"public abstract String getText();",
"public abstract String getText();",
"public String getText() {\r\n return text;\r\n }",
"public String getContent() {\r\n \r\n return text;\r\n }",
"@Override\r\n\tpublic String textOnPage(EnumContent content, int p){\n\t\tif(stack == null)\r\n\t\t\tstack = new ItemStack(ItemRegistry.nomadSack);\r\n\t\tif(con == null)\r\n\t\t\tcon = RecipeRegistry.getRecipreFor(new ItemStack(BlockRegistry.nest));\r\n\t\tString s = \"\";\r\n\t\tswitch(p){\r\n\t\tcase 0:\r\n\t\t\ts += \"The nomads wanted to protect their insects so they built \"\r\n\t\t\t + \"nests. They soon noticed that the insects thanked them by \"\r\n\t\t\t + \"working the envoirment in their favor. All the insects \"\r\n\t\t\t + \"have their own way to help the nomads. What is intressting \"\r\n\t\t\t + \"is the sleep they enter when there is no help to be given. \";\r\n\t\t\tbreak;\r\n\t\tcase 1: //Sodium acetate, Cara Rot (Carrot), Elle D'berry (Elderberry), Rabarberpaj... Carla & Fleur (Cauliflower)\r\n\t\t\ts += KnowledgeDescriptions.getDisplayName(con) + \"\\n\\n\";\r\n\t\t\ts += \" ~ Structure ~\\n\";\r\n\t\t\ts += KnowledgeDescriptions.getStructure(con);\r\n\t\t\ts += \" ~ Creation ~\\n\\n\";\r\n\t\t\ts += KnowledgeDescriptions.getResult(con);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn s;\r\n\t}",
"@Override\n public void showText(String s){\n }",
"@Override\n public void onCardClick(String p) {\n }",
"private Text initDescriptionText(){\n Text description = new Text(Values.DESCRIPTION);\n description.setStyle(\"-fx-font-size: 18;\");\n description.setTextAlignment(TextAlignment.CENTER);\n description.wrappingWidthProperty().bind(widthProperty());\n return description;\n }",
"@Override\n public String getText(SwccgGame game) {\n return \"Restored \" + GameUtils.getCardLink(_restoredCard);\n }",
"public String getText() {\r\n return text;\r\n }",
"public String getText() {\r\n return text;\r\n }",
"@DISPID(-2147417085)\n @PropGet\n java.lang.String innerText();",
"public String getText()\n\t{\n\t\treturn text;\n\t}",
"public String getText()\n\t{\n\t\treturn text;\n\t}",
"public String getText()\n\t{\n\t\treturn text;\n\t}",
"String getText()\n {\n return \"\";\n }",
"public String getAboutBoxText();",
"java.lang.String getExperienceText();",
"@Exported(visibility = 999)\n public String getText() {\n return text;\n }",
"public String displayText(){\n String displayText = \"\";\n displayText = \"Title: \" + getTitle() + \"\\nAuthor: \" + getAuthor() + \"\\nDescription: \" +getDescription();\n\n return displayText;\n\n }",
"@Override\n public String getText(SwccgGame game) {\n return \"Calculating sabacc total\";\n }",
"public String displayCard()\n {\n card = \"\";\n \n switch(cardValue)\n {\n case 11:\n card+= \"J\";\n break;\n case 12:\n card+= \"Q\";\n break;\n case 13:\n card+= \"K\";\n break;\n case 14:\n card+= \"A\";\n break; \n default:\n card+= String.valueOf(cardValue); \n break;\n }\n \n switch(cardSuit){\n case 0:\n card+= \" of Clubs\";\n break;\n case 1:\n card+= \" of Diamonds\";\n break;\n case 2:\n card+= \" of Spades\";\n break;\n case 3:\n card+= \" of Hearts\";\n break;\n default:\n break;\n }\n \n return card;\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\n return myText;\n }",
"public String getInfoText();",
"public void displayText() {\n\n // Draws the border on the slideshow aswell as the text\n image(border, slideshowPosX - borderDisplace, textPosY - textMargin - borderDisplace);\n\n // color of text background\n fill(textBackground);\n\n //background for text\n rect(textPosX - textMargin, textPosY - textMargin, textSizeWidth + textMargin * 2, textSizeHeight + textMargin * 2);\n\n //draw text\n image(texts[scene], textPosX, textPosY, textSizeWidth, textSizeHeight, 0, 0 + scrolled, texts[scene].width, textSizeHeight + scrolled);\n }",
"public String getText() {\r\n\t\treturn text;\r\n\t}",
"public String getText() {\r\n\t\treturn text;\r\n\t}",
"@Override\r\n\tpublic String getText(Object object) {\r\n\t\treturn super.getText(object);\r\n\t}",
"public CharSequence getText() {\r\n return text;\r\n }",
"public String text() {\r\n return mText;\r\n }",
"@Override\r\n\tpublic String toString() {\r\n\t\treturn text.toString();\r\n\t}",
"TextView getDescriptionView();",
"@Override\r\n\tpublic String getText() {\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic String getText() {\n\t\treturn null;\r\n\t}",
"public void empSlotText(SpriteBatch batch){\n batch.setProjectionMatrix(textCam.combined);\n String text = \"\"+manager.getEmployees()+\"/\"+manager.getEmployeeSlots();\n batch.begin();\n font2.draw(batch,text, 730, 370);\n batch.end();\n }",
"private String readTextCard(Date date) throws ThemeException {\n\t\tSimpleDateFormat formatter = new SimpleDateFormat(DATE_FORMAT);\n\n\t\t// use xpath to retrieve the text card\n\t\tXPath selectText = XPathFactory.newInstance().newXPath();\n\t\tString expression = String.format(\n\t\t\t\t\"/theme/textcards/textcard[date=\\\"%s\\\"]/text/text()\",\n\t\t\t\tformatter.format(date));\n\t\ttry {\n\t\t\treturn selectText.evaluate(expression, getXml());\n\t\t} catch (XPathExpressionException e) {\n\t\t\tthrow new ThemeException(\"XPath error while parsing \" + filename, e);\n\t\t}\n\t}",
"protected String printCard(){\r\n return ranks[rank] + \" of \" + suits[suit];\r\n }",
"private void setLabelText() {\n\t\tthis.addSpelers();\n\n\t\tfor (int i = 0; i < 3; i++) {\n\n\t\t\tString spelerid = Integer.toString(spelerids.get(i));\n\t\t\tString[] params1 = { spelerid };\n\t\t\tString query = \"SELECT COUNT(idontwikkelingskaart) FROM spelerontwikkelingskaart WHERE idspeler = ?\";\n\t\t\tResultSet result = dc.select(query, params1);\n\t\t\ttry {\n\t\t\t\tif (result.next()) {\n\t\t\t\t\tamountOfCards = result.getInt(1);\n\t\t\t\t\tcards.add(amountOfCards);\n\t\t\t\t}\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t\t// Second part, getting playername and filling in their amount of cards\n\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\ttry {\n\n\t\t\t\tString query = \"SELECT username FROM speler WHERE idspel = ? AND idspeler = ?\";\n\t\t\t\tString idspelString = Integer.toString(idspel);\n\t\t\t\tString spelerid = Integer.toString(spelerids.get(i));\n\t\t\t\tString[] params2 = { idspelString, spelerid };\n\t\t\t\tResultSet result2;\n\t\t\t\tresult2 = dc.select(query, params2);\n\t\t\t\twhile (result2.next()) {\n\t\t\t\t\tif (amountOfCards == 1) {\n\t\t\t\t\t\ttext = result2.getString(1) + \" has \" + Integer.toString(cards.get(i)) + \" card.\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttext = result2.getString(1) + \" has \" + Integer.toString(cards.get(i)) + \" cards.\";\n\t\t\t\t\t}\n\t\t\t\t\tlabels.get(i).setText(text);\n\t\t\t\t}\n\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"public String getText() {\r\n return this.text;\r\n }",
"private void createText() {\n Texture texture = new Texture(Gdx.files.internal(\"Text/item.png\"));\n texture.setFilter(Texture.TextureFilter.Linear, Texture.TextureFilter.Linear);\n TextureRegion region = new TextureRegion(texture);\n display = new BitmapFont(Gdx.files.internal(\"Text/item.fnt\"), region, false);\n display.setUseIntegerPositions(false);\n display.setColor(Color.BLACK);\n }",
"public String getText() {\n return \"\";\n }",
"public MentorConnectRequestCompose addTextDesc()\n\t{\n\t\tmentorConnectRequestObjects.queryText.sendKeys(\"Sharath test\");\n\t\tmentorConnectRequestObjects.addDescription.sendKeys(mentorConnectRequestObjects.details);\n\t\treturn new MentorConnectRequestCompose(driver);\n\t}",
"String getToText();",
"public String getText() {\n\t\treturn text;\n\t}"
] | [
"0.6790398",
"0.66073644",
"0.65792185",
"0.6425423",
"0.64083856",
"0.63763726",
"0.6356883",
"0.6316335",
"0.6303699",
"0.6257171",
"0.6257171",
"0.6257171",
"0.6257171",
"0.6238168",
"0.62361693",
"0.62361693",
"0.62361693",
"0.62361693",
"0.62361693",
"0.62361693",
"0.62361693",
"0.62361693",
"0.6225402",
"0.6220657",
"0.62132245",
"0.62132245",
"0.62132245",
"0.62132245",
"0.62132245",
"0.62132245",
"0.62132245",
"0.61976093",
"0.61848253",
"0.6167684",
"0.61413753",
"0.61413753",
"0.61149704",
"0.6113507",
"0.6113507",
"0.6113507",
"0.6113507",
"0.6113507",
"0.61097574",
"0.61097574",
"0.61097574",
"0.61097574",
"0.6095683",
"0.608772",
"0.60787874",
"0.6076996",
"0.60445917",
"0.60361713",
"0.603209",
"0.60267603",
"0.60267603",
"0.6018368",
"0.601804",
"0.601804",
"0.601804",
"0.60149205",
"0.60011405",
"0.5993885",
"0.59919673",
"0.59856194",
"0.597993",
"0.59766334",
"0.5976021",
"0.5976021",
"0.5976021",
"0.5976021",
"0.5976021",
"0.5976021",
"0.5976021",
"0.5976021",
"0.5976021",
"0.5976021",
"0.5976021",
"0.5976021",
"0.5976021",
"0.5966852",
"0.5961042",
"0.5958175",
"0.59575284",
"0.59575284",
"0.5948923",
"0.5940481",
"0.59386575",
"0.5931538",
"0.59285116",
"0.5914234",
"0.5914234",
"0.58969617",
"0.58924043",
"0.58864987",
"0.58827966",
"0.58827317",
"0.58815944",
"0.5877565",
"0.58700246",
"0.5866375",
"0.5861741"
] | 0.0 | -1 |
ivDamageMap.setImageBitmap(damageMap.getDamageMap()); /Intent intent = new Intent(); intent.putExtra("damageMap", damageMap.getDamageMap()); setResult(RESULT_OK, intent); finish(); | @Override
public void returnDamageMap(DamageMap damageMap) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\r\n Bitmap b=(Bitmap)data.getExtras().get(\"data\");\r\n i1.setImageBitmap(b);\r\n\r\n }",
"@Override\r\nprotected void onActivityResult(int requestCode, int resultCode, Intent vgt) {\n\t\tsuper.onActivityResult(requestCode, resultCode, vgt);\r\n\t\tBitmap bm=(Bitmap) vgt.getExtras().get(\"data\"); //Use only data\r\n\t\tiv.setImageBitmap(bm); \r\n\t}",
"protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == 7 && resultCode == RESULT_OK) {\n\n Bitmap bitmap = (Bitmap) data.getExtras().get(\"data\");\n currentBitMap = bitmap;\n imageView.setImageBitmap(bitmap);\n }\n\n try {\n if (requestCode == IMG_RESULT && resultCode == RESULT_OK && data != null) {\n Uri URI = data.getData();\n String[] FILE = {MediaStore.Images.Media.DATA};\n\n Cursor cursor = getContentResolver().query(URI, FILE, null, null, null);\n cursor.moveToFirst();\n\n int columnIndex = cursor.getColumnIndex(FILE[0]);\n String ImageDecode = cursor.getString(columnIndex);\n cursor.close();\n\n currentBitMap = BitmapFactory.decodeFile(ImageDecode);\n imageView.setImageBitmap(currentBitMap);\n }\n } catch (Exception e) {\n Toast.makeText(this, \"Please try again\", Toast.LENGTH_LONG)\n .show();\n }\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (resultCode == RESULT_OK) {\n Bundle extras = data.getExtras();\n Bitmap bmp = (Bitmap) extras.get(\"data\");\n iv.setImageBitmap(bmp);\n }\n super.onActivityResult(requestCode, resultCode, data);\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == 0 && resultCode == RESULT_OK ) {\n\n Uri imageUri=data.getData();\n\n\n try {\n Bitmap bm = null;\n ContentResolver resolver = getContentResolver();\n //获得图片的uri\n originalUri = data.getData();\n bitmapUri = originalUri;\n System.out.println(\"URi:\"+ originalUri);\n System.out.println(\"URi:\"+ originalUri.getClass());\n // isSelectPic = true;\n bm = MediaStore.Images.Media.getBitmap(resolver, originalUri);\n //显得到bitmap图片\n iv.setImageBitmap(bm);\n\n } catch (Exception e) {\n Log.e(\"TAG-->Error\", e.toString());\n }\n\n //放到imageview中\n\n\n }\n\n\n if (requestCode == 1 && resultCode == 2) {//当请求码是1&&返回码是2进行下面操作\n System.out.println(\"OK\");\n uid = data.getStringExtra(\"uid\");\n city = data.getStringExtra(\"city\");\n name = data.getStringExtra(\"name\");\n address = data.getStringExtra(\"address\");\n latitude = data.getDoubleExtra(\"latitude\", 0);\n longitude = data.getDoubleExtra(\"longitude\", 0);\n search_name.setText(name);\n // System.out.println(uid+\"\\n\"+city+\"\\n\"+name+\"\\n\"+address+\"\\n\"+latitude+\"\\n\"+longitude+\"\\n\");\n\n }\n\n }",
"@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\tif(requestCode==IMAGE_REQUEST_CODE){\n\t\t\tif(resultCode==RESULT_OK){\n\t\t\t\tBundle bundle = data.getExtras();\n\t\t\t\tbitmap = (Bitmap) bundle.get(\"data\");\n\t\t\t\timgView.setImageBitmap(bitmap);\n\t\t\t}\n\t\t}\n\t}",
"@Override\n protected void onActivityResult(int id, int result, Intent data) {\n if(result == RESULT_OK)\n {\n //check if its the choose image activity\n if(id == CHOOSE_IMAGE_ID)\n {\n Uri imageAddress = data.getData();\n //used to read image data\n InputStream inStream;\n\n try\n {\n inStream = getContentResolver().openInputStream(imageAddress);\n\n teamLogo = BitmapFactory.decodeStream(inStream);\n imageButton.setImageBitmap(teamLogo);\n }\n catch (FileNotFoundException e)\n {\n e.printStackTrace();\n }\n }\n }\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) { /// automatski se zove kada krene startActivityResult\n //super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == REQUEST_IMAGE_CAPTURE && resultCode == RESULT_OK){\n // get the photo\n Bundle extras = data.getExtras();\n Bitmap photo = (Bitmap)extras.get(\"data\"); // spremanje u bitmap\n mojImageView.setImageBitmap(photo); // stavljanje na zaslon\n\n }\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n try {\n\n if (requestCode == IMG_RESULT && resultCode == RESULT_OK\n && null != data) {\n\n\n imageeUri = data.getData();\n\n mInsertImage.setImageURI(imageeUri);\n }\n }\n catch (Exception e) {\n Toast.makeText(this, \"Please try again\", Toast.LENGTH_LONG)\n .show();\n }\n }",
"@Override\r\n protected void onActivityResult(int requestCode, int resultCode, Intent returnedIntent) {\r\n super.onActivityResult(requestCode, resultCode, returnedIntent);\r\n try {\r\n // When an Image is picked\r\n if (resultCode == RESULT_OK && null != returnedIntent) {\r\n // Get the Image from data\r\n Uri imageLocation = returnedIntent.getData();\r\n InputStream imageStream = getContentResolver().openInputStream(imageLocation);\r\n Bitmap selectedImage = BitmapFactory.decodeStream(imageStream);\r\n selectedImage = getResizedBitmap(selectedImage,1080/4,1920/4);\r\n currentUserEdit.setImageBitmap(selectedImage);\r\n currentSaveCharacter.setImage(selectedImage);\r\n saveCharacters(context);\r\n }\r\n } catch (Exception e) {\r\n Toast.makeText(this, \"ImageGet ERROR\", Toast.LENGTH_LONG)\r\n .show();\r\n Log.d(\"ImageGet ERROR\", e.toString());\r\n }\r\n\r\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if(requestCode==1&&resultCode==RESULT_OK&&data!=null&&data.getData()!=null){\n imguri=data.getData();\n picIv.setImageURI(imguri);\n }\n }",
"@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if(resultCode == RESULT_OK && requestCode ==200){\n Uri uri_img=data.getData();\n try{\n assert uri_img != null;\n InputStream input_img = updateView.getContext().getContentResolver().openInputStream(uri_img);\n DecodeImage_stream = BitmapFactory.decodeStream(input_img);\n chooseImage.setImageBitmap(DecodeImage_stream);\n }catch (FileNotFoundException f){\n Log.d(\"add new file not found:\",f.getMessage());\n }\n }\n }",
"protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode == CAPTURE_IMAGE_ACTIVITY_REQUEST_CODE) {\n if (resultCode == RESULT_OK) {\n\n Bitmap bp = (Bitmap) data.getExtras().get(\"data\");\n //iv.setImageBitmap(bp);\n storeImage(bp);\n\n Intent inte = new Intent(this, ScanResults.class);\n startActivity(inte);\n\n } else if (resultCode == RESULT_CANCELED) {\n // User cancelled the image capture\n } else {\n // Image capture failed, advise user\n }\n }\n\n\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == TAKE_IMAGE && resultCode == RESULT_OK) {\n Bundle extra = data.getExtras();\n bitmap = (Bitmap) extra.get(\"data\");\n saveImage(bitmap);\n imageView.setImageBitmap(bitmap);\n } else if (requestCode == SELECT_IMAGE && resultCode == RESULT_OK) {\n Uri targetUri = data.getData();\n Toast.makeText(getApplicationContext(), targetUri.toString(), Toast.LENGTH_LONG).show();\n Bitmap bitmap;\n try {\n\n bitmap = BitmapFactory.decodeStream(getContentResolver().openInputStream(targetUri));\n\n imageView.setImageBitmap(bitmap);\n } catch (FileNotFoundException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (resultCode == RESULT_CANCELED)\n return;\n\n super.onActivityResult(requestCode, resultCode, data);\n switch (requestCode) {\n case SELECT_LOCATION_REQUEST:\n String coordResult = (String) data.getExtras().get(\"selectedCoord\");\n geo_key.setText(coordResult);\n break;\n case PICK_IMAGE_REQUEST:\n Uri uri = data.getData();\n try {\n Bitmap imageBitmap = MediaStore.Images.Media.getBitmap(getContentResolver(), uri);\n Log.v(\"StegoCrypto-Image\", String.valueOf(imageBitmap));\n\n selectedImageIV.setImageBitmap(ImageUtility.getResizedBitmap(imageBitmap, ImageUtility.MAX_IMAGE_SIZE));\n } catch (IOException e) {e.printStackTrace();}\n break;\n case CAMERA_REQUEST:\n if (cameraFileUri != null) {\n try {\n Bitmap cameraBitmap = MediaStore.Images.Media.getBitmap(this.getContentResolver(), cameraFileUri);\n selectedImageIV.setImageBitmap(ImageUtility.getResizedBitmap(cameraBitmap, ImageUtility.MAX_IMAGE_SIZE));\n } catch (IOException e) {e.printStackTrace();}\n }\n break;\n case DRAW_REQUEST:\n Bitmap drawBitmap = data.getParcelableExtra(\"drawingBitmap\");\n selectedImageIV.setImageBitmap(ImageUtility.getResizedBitmap(drawBitmap, ImageUtility.MAX_IMAGE_SIZE));\n break;\n }\n }",
"public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n switch (requestCode) {\n case CAMERA_APP:\n if (resultCode == Activity.RESULT_OK) {\n //Accedemos al contenido de la imagen\n ContentResolver contRes = getContentResolver();\n contRes.notifyChange(this.pictureId, null);\n Bitmap picture;\n try {\n picture = android.provider.MediaStore.Images.Media\n .getBitmap(contRes, pictureId);\n //Reducimos la imagen\n int height = (int) (picture.getHeight() * 800 / picture.getWidth());\n Bitmap resized = Bitmap.createScaledBitmap(picture, 800, height, true);\n //Guardamos el mapa de bits\n FileOutputStream stream = new FileOutputStream(pictureId.toString().replace(\"file://\", \"\"));\n resized.compress(Bitmap.CompressFormat.JPEG, 100, stream);\n stream.flush();\n stream.close();\n //Lo asignamos al imageview\n ivProfileImage.setImageBitmap(resized);\n } catch (Exception e) {\n Log.i(\"Photo\", \"Something were wrong!\");\n }\n }\n }\n }",
"@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n //Checking if the result came from Camera or Gallery\n if (requestCode == 0 && resultCode == RESULT_OK) {\n // If its from Camera we retrieve the image and save it to firebase\n m_Map = (Bitmap) data.getExtras().get(\"data\");\n\n\n // Setting the picture.\n m_ProfilePic.setImageBitmap(m_Map);\n } else if (requestCode == 3 && resultCode == Activity.RESULT_OK) {\n // If its from Gallery we get the picture as Uri.\n m_FileUri = data.getData();\n try {\n //Converting it as a BitMap.\n m_Map = MediaStore.Images.Media.getBitmap(getContentResolver(), m_FileUri);\n\n // Setting the picture.\n m_ProfilePic.setImageBitmap(m_Map);\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (resultCode == RESULT_OK) {\n if (requestCode == CommenString.TAKE_PHOTO) {\n cameraUtil.photoZoomFromTake(CropperImageScale.square);\n } else if (requestCode == CommenString.LOCAL_PHOTO) {\n List<String> selectedImage = data.getStringArrayListExtra(\"paths\");\n cameraUtil.photoZoomFromMapStorage(selectedImage.get(0),\n CropperImageScale.square);\n } else if (requestCode == CommenString.PHOTO_RESULT) {\n Bundle extras = data.getExtras();\n if (extras != null) {\n headBitmap = extras.getParcelable(\"data\");\n image_up.setImageBitmap(headBitmap);\n }\n } else {\n }\n }\n }",
"@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode == 1 && resultCode == getActivity().RESULT_OK && data != null && data.getData() != null) {\n\n Uri uri = data.getData();\n\n try {\n ByteArrayOutputStream boas = new ByteArrayOutputStream();\n\n\n Bitmap btmap = MediaStore.Images.Media.getBitmap(getActivity().getContentResolver(), uri);\n\n btmap.compress(Bitmap.CompressFormat.JPEG, 70, boas); //bm is the bitmap object\n byte[] byteArrayImage = boas.toByteArray();\n\n\n BitmapFactory.Options opt;\n\n opt = new BitmapFactory.Options();\n opt.inTempStorage = new byte[16 * 1024];\n opt.inSampleSize = 2;\n Bitmap bitmap = BitmapFactory.decodeByteArray(byteArrayImage, 0, byteArrayImage.length, opt);\n\n ImageView imageView = (ImageView) getActivity().findViewById(R.id.profile_back);\n CircleImageView dp = (CircleImageView) getActivity().findViewById(R.id.dp1);\n dp.setImageBitmap(bitmap);\n Bitmap bitmap1=grayscale(bitmap);\n Bitmap blurred = blurRenderScript(bitmap1, 25);\n imageView.setImageBitmap(blurred);\n } catch (OutOfMemoryError a) {\n Toast.makeText(getActivity().getApplicationContext(), \"Image size high\", Toast.LENGTH_SHORT).show();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }",
"@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n switch (requestCode) {\n case SELECT_PHOTO:\n if (resultCode == RESULT_OK) {\n // imABoolean=true;\n try {\n filePath = data.getData();\n bitmap = MediaStore.Images.Media.getBitmap(getActivity().getContentResolver(), filePath);\n\n logo.setImageBitmap(bitmap);\n\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n break;\n }\n }\n\n\n }",
"@Override\r\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\r\n //jika image picker membawa sebuah data berupa foto maka\r\n if (ImagePicker.shouldHandle(requestCode, resultCode, data)) {\r\n //ambil data foto yang dipilih\r\n Image image = ImagePicker.getFirstImageOrNull(data);\r\n //ambil path/lokasi dari foto/gambar yang dipilih\r\n File imgFile = new File(image.getPath());\r\n if (imgFile.exists()) {\r\n //convert path ke bitmap dan tampilkan pada imageview\r\n Bitmap myBitmap = BitmapFactory.decodeFile(imgFile.getAbsolutePath());\r\n imgTranscript.setImageBitmap(myBitmap);\r\n\r\n //set variabel change true karena gambar telah diupdate\r\n isPicChange = true;\r\n }\r\n }\r\n\r\n super.onActivityResult(requestCode, resultCode, data);\r\n }",
"protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n switch (requestCode) {\n case RESULT_CODE:\n if (resultCode == Activity.RESULT_OK){\n Bundle bundle = data.getExtras();\n // 转化数据\n Bitmap bitmap = (Bitmap) bundle.get(\"data\");\n // 将图片添加到imagineview中\n imgview.setImageBitmap(bitmap);\n bitmap_orgin = getBitmap(imgview.getDrawable());\n }\n\n break;\n case SAVE_CODE:\n if (resultCode == RESULT_OK) {\n // 加载本地库的图片\n Uri uri = data.getData();\n imgview.setImageURI(uri);\n bitmap_orgin = getBitmap(imgview.getDrawable());\n }\n break;\n default:\n break;\n }\n }",
"@Override\n protected void onActivityResult(int requestCode,int resultCode,Intent data){\n super.onActivityResult(requestCode,resultCode,data);\n if(resultCode == RESULT_OK) {\n switch (requestCode){\n case PICK_GALLERY:\n imageURi = data.getData();\n imageView.setImageURI(imageURi);\n break;\n case REQUEST_IMAGE_CAPTURE:\n Bundle extras = data.getExtras();\n Bitmap bitmap = (Bitmap)extras.get(\"data\");\n imageView.setImageBitmap(bitmap);\n break;\n }\n }\n }",
"public void resultImgSet(Bitmap bitmap) {\n fpResultImg.setImageBitmap(bitmap);\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n try {\n\n // camera photo\n if (requestCode == REQUEST_IMAGE_CAPTURE && resultCode == RESULT_OK) {\n imageUri = Uri.fromFile(new File(mCameraFileName)); //zwraca zdjęcie z aparatu jako ścieszkę uri\n Log.d(TAG, \"onActivityResult: imageUri z aparatu: \" + imageUri);\n }\n\n // save picture to imageBitmap from taken mageUri from camera\n imageBitmap = MediaStore.Images.Media.getBitmap(this.getContentResolver(), imageUri);\n imageViewOfPhotoFromCamera.setImageBitmap(imageBitmap); // set imageBitmap in image View\n Log.d(TAG, \"onActivityResult, imageBitmap SAVED and set in imageView\");\n\n } catch (Exception e) {\n Log.d(TAG, \"onActivityResult, ERROr, imageBitmap NOT saved because e: \" + e);\n }\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == CODIGO_DE_SOLICITUD_IMAGEN\n && resultCode == RESULT_OK\n && data!=null\n && data.getData() != null){\n\n RutaArchivoUri = data.getData();\n try {\n //Convertimos a bitmap\n Bitmap bitmap = MediaStore.Images.Media.getBitmap(getContentResolver(),RutaArchivoUri);\n //seteamos la imagen\n ImagenAgregarSerie.setImageBitmap(bitmap);\n\n }catch (Exception e){\n Toast.makeText(this, \"\"+e.getMessage(), Toast.LENGTH_SHORT).show();\n\n }\n }\n }",
"public void setImage(){\n\n Bundle extras = getIntent().getExtras();\n String image = extras.getString(\"pic\");\n String imageFlower = extras.getString(\"picflower\");\n\n\n\n if(image != null) {\n int pic = getResources().getIdentifier(image + \".png\",\"drawable\",getPackageName());\n\n achvImage.setImageResource(pic);\n achvImage.setVisibility(View.VISIBLE);\n\n }else {\n int flowerPic = getResources().getIdentifier(imageFlower + \".jpg\", \"drawable\", getPackageName());\n achvImage.setImageResource(flowerPic);\n achvImage.setVisibility(View.VISIBLE);\n }\n\n achvImage.setImageResource(R.drawable.medaldetails);\n\n\n String text = extras.getString(\"text\");\n achvDetails.setText(text);\n\n String title = extras.getString(\"title\");\n achvTitle.setText(title);\n\n int points1 = extras.getInt(\"points\");\n points.setText(\"Points: \" + points1);\n\n\n String desText1 = extras.getString(\"achDesA\");\n des1.setText(desText1);\n\n\n\n\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if(requestCode == REQUEST_IMAGE_CAPTURE && resultCode == RESULT_OK){\n Bundle extras = data.getExtras();\n imageBitmap = (Bitmap) extras.get(\"data\");\n imgFoto.setImageBitmap(imageBitmap);\n }\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {\n if(resultCode == RESULT_OK) {\n imgView.setImageURI(image_uri);\n// image_uri = data.getData();\n// try {\n// InputStream inputStream = getContentResolver().openInputStream(image_uri);\n// bitmap = BitmapFactory.decodeStream(inputStream);\n// imgView.setImageBitmap(bitmap);\n//// imgView.setVisibility(View.VISIBLE);\n//// btnUpload.setVisibility(View.VISIBLE);\n// } catch (IOException e) {\n// e.printStackTrace();\n// }\n// Toast.makeText(GambarActivity.this, \"o\", Toast.LENGTH_SHORT).show();\n }\n// super.onActivityResult(requestCode, resultCode, data);\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\n if(requestCode == REQUEST_IMAGE_CAPTURE && resultCode == RESULT_OK){\n // Get the photo\n Bundle extras = data.getExtras();\n Bitmap photo = (Bitmap) extras.get(\"data\");\n myImageView.setImageBitmap(photo);\n }\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == PICK_IMAGE && resultCode == RESULT_OK && data != null && data.getData() != null) {\n filePath = data.getData();\n try {\n Bitmap bitmap = MediaStore.Images.Media.getBitmap(getContentResolver(), filePath);\n Image_brand.setImageBitmap(bitmap);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\tif (requestCode == CAMERA_PIC_REQUEST\n\t\t&& resultCode == Activity.RESULT_OK) {\n\t Bitmap picture = (Bitmap) data.getExtras().get(\"data\");\n\t ivMemberPicture.setImageBitmap(picture);\n\t pictureTaken = true;\n\t}\n }",
"@Override\n public void onClick(View view) {\n Intent gallery_intent=new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n startActivityForResult(gallery_intent,RESULT_LOAD_IMAGE);//Paasing intentobject and an integer value\n\n }",
"@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\tif (resultCode == RESULT_OK) {\n\t\t\tswitch (requestCode) {\n//\t\t\tcase EDIT_FROM_EDITOR:\n//\t\t\t\tbyte[] bb = data.getByteArrayExtra(\"bitmap\");\n//\t\t\t\tBitmap tmp_bitmap = BitmapFactory.decodeByteArray(bb, 0,\n//\t\t\t\t\t\tbb.length);\n//\t\t\t\tcur_bitmap_list.add(tmp_bitmap);\n//\t\t\t\tiv_seller_reply_img.setImageBitmap(cur_bitmap_list.get(0));\n//\t\t\t\tbreak;\n\t\t\tcase PICK_FROM_ALBUM :\n//\t\t\t\tIntent intent = new Intent(Consumer_post.this, ImageEditActivity.class);\n//\t\t\t\tintent.putExtra(\"output\", data.getData());\n//\t\t\t\tintent.putExtra(\"flag\", \"album\");\n//\t\t\t\tstartActivityForResult(intent, EDIT_FROM_EDITOR);\n\t\t\t\tif (!addImage(data)) {\n\t\t\t\t\tToast.makeText(Seller_reply.this, \"사진 첨부 실패\",\n\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t}\n\t\t\t\tbreak;\n//\t\t\tcase PICK_FROM_CAMERA:\n//\t\t\t\tIntent intent2 = new Intent(Seller_reply.this,\n//\t\t\t\t\t\tImageEditActivity.class);\n//\t\t\t\tintent2.putExtra(\"output\", path + \"/\" + TEMP_IMAGE);\n//\t\t\t\tintent2.putExtra(\"flag\", \"camera\");\n//\t\t\t\tstartActivityForResult(intent2, EDIT_FROM_EDITOR);\n//\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}",
"@Override\n protected void onActivityResult(int requestCode,int resultCode, Intent data){\n if (requestCode == 0x1 && resultCode == RESULT_OK) {\n if (data != null) {\n imageuri=data.getData();\n imageView.setImageURI(imageuri);\n changeUri(imageuri.toString());\n }\n }\n super.onActivityResult(requestCode, resultCode, data);\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == ACTIVITY_START_CAMERA_APP && resultCode == RESULT_OK){\n /*//Todo: Mensaje para mostrar al usuario al capturar la fotografia\n// Toast.makeText(this,\"Picture taken successfully\",Toast.LENGTH_LONG).show();\n\n //Todo: Se crea el objeto Bundle con el nombre extras\n Bundle extras = data.getExtras();\n //Todo: Devuelve el bundle que contenga el intent\n Bitmap photoCaptureBitmap = (Bitmap) extras.get(\"data\");\n //Todo: Se asigna a mPhotoCapturedImageView el valor que contenga el Bitmap photoCaptureBitmap\n mPhotoCapturedImageView.setImageBitmap(photoCaptureBitmap);\n*/\n //Bitmap photoCaptureBitmap = BitmapFactory.decodeFile(mImageFileLocation);\n //mPhotoCapturedImageView.setImageBitmap(photoCaptureBitmap);\n rotateImage(setReduceImageSize());\n }\n }",
"@Override\n\t\t\t\tpublic void onObtainBitmap(Bitmap bitmap, ImageView imageView) {\n\t\t\t\t\timageView.setImageBitmap(bitmap);\n\t\t\t\t}",
"private void setPicToView(Intent picdata) {\n Bundle extras = picdata.getExtras();\n if (extras != null) {\n Bitmap photo = extras.getParcelable(\"data\");\n Drawable drawable = new BitmapDrawable(getResources(), photo);\n groupSetAvatar.setImageDrawable(drawable);\n // uploadUserAvatar(Bitmap2Bytes(photo));\n saveBitmapFile(picdata);\n\n }\n\n }",
"protected void onPostExecute(Bitmap result){\n imageView.setImageBitmap(result);\n }",
"public void loadImage1(View view) {\n Intent intent = new Intent(this, SelectImageActivity.class);\n startActivityForResult(intent, REQUEST_SELECT_IMAGE_1);\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode == PICK_IMAGE_REQUEST && resultCode == RESULT_OK && data != null && data.getData() != null) {\n FilePathUri = data.getData();\n try {\n bitmap = MediaStore.Images.Media.getBitmap(getContentResolver(), FilePathUri);\n cowImage.setImageBitmap(bitmap);\n galleryChoose.setText(\"Image Selected\");\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }else if (requestCode == 123) {\n File imgFile = new File(pictureImagePath);\n if(imgFile.exists()){\n FilePathUri = Uri.parse(pictureImagePath);\n FilePathUri = photoURI;\n Bitmap myBitmap = BitmapFactory.decodeFile(imgFile.getAbsolutePath());\n //ImageView myImage = (ImageView) findViewById(R.id.imageviewTest);\n cowImage.setImageBitmap(myBitmap);\n\n }\n }\n else{\n System.out.println(\"error\" );\n }\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if(resultCode == RESULT_OK){\n if(requestCode == REQUEST_CODE && data.getExtras().get(\"data\")!=null){\n Bitmap bp = (Bitmap) data.getExtras().get(\"data\");\n prescription.setVisibility(View.VISIBLE);\n userNameQO.setVisibility(View.GONE);\n phoneNo.setVisibility(View.GONE);\n captureButton.setText(getResources().getString(R.string.send_prescription));\n prescription.setImageBitmap(bp);\n }\n }\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (resultCode == RESULT_OK) {\n try {\n final Uri imageUri = data.getData();\n final InputStream imageStream = getContentResolver().openInputStream(imageUri);\n final Bitmap selectedImage = BitmapFactory.decodeStream(imageStream);\n mImageViewSS.setImageBitmap(selectedImage);\n //Store image locally\n saveToInternalStorage(selectedImage);\n //EOF Store image locally\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n Toast.makeText(this, getString(R.string.image_error), Toast.LENGTH_LONG).show();\n }\n } else {\n Toast.makeText(this, getString(R.string.didnt_pick_image), Toast.LENGTH_LONG).show();\n }\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n try {\n // When an Image is picked\n if (requestCode == RESULT_LOAD_IMG && resultCode == RESULT_OK\n && null != data) {\n // Get the Image from data\n checkbit = 1;\n Uri selectedImage = data.getData();\n bitmap = scaleImage(this,selectedImage);\n origmap = bitmap;\n\n String[] filePathColumn = {MediaStore.Images.Media.DATA};\n\n // Get the cursor\n Cursor cursor = getContentResolver().query(selectedImage,\n filePathColumn, null, null, null);\n // Move to first row\n cursor.moveToFirst();\n\n int columnIndex = cursor.getColumnIndex(filePathColumn[0]);\n imgPath = cursor.getString(columnIndex);\n cursor.close();\n imgView.setImageBitmap(bitmap);\n\n Calendar c = Calendar.getInstance();\n SimpleDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n int amorpmint = c.get(Calendar.AM_PM);\n String amorpm;\n if (amorpmint == 0)\n {\n amorpm = \"AM\";\n } else {\n amorpm = \"PM\";\n }\n\n lastUpdated = df.format(c.getTime()) + \" \" + amorpm;\n SimpleDateFormat timef = new SimpleDateFormat(\"HH:mm\");\n time = timef.format(c.getTime()) + \" \" + amorpm;\n\n fileName = user + \"orig\";\n params = new ArrayList<>();\n // Put file name in Async Http Post Param which will used in Php web app\n params.add(new BasicNameValuePair(\"filename\", fileName));\n params.add(new BasicNameValuePair(\"username\", user));\n params.add(new BasicNameValuePair(\"Time\", time));\n params.add(new BasicNameValuePair(\"LastUpdated\", lastUpdated));\n\n } else {\n Toast.makeText(this, \"You haven't picked Image\",\n Toast.LENGTH_LONG).show();\n }\n } catch (Exception e) {\n Toast.makeText(this, \"Something went wrong\", Toast.LENGTH_LONG)\n .show();\n }\n\n }",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n\n\n\n\n Intent intent = new Intent(GuessTheImage.this, NamingFingers.class);\n // Bundle bundle = new Bundle();\n// bundle.putInt(\"ImageScore\", score);\n // bundle.putParcelable(\"result\", result);\n // intent.putExtras(bundle);\n if(result != null) {\n result.setNamingScore(score);\n intent.putExtra(\"result\", result);\n }\n startActivity(intent);\n\n //result.setNamingScore(score);\n\n // intent1.putExtra(\"result\",result );\n// Result tempResult = new Result();\n// tempResult.setNamingScore(score);\n//\n\n// result.setCommandsScore(1);\n// result.setComprehensionScore(1);\n// Patient patient = new Patient();\n// result.setPatient(patient);\n// result.getPatient().setFirstName(\"Brian\");\n\n // intent.putExtra(\"result\", result);\n // startActivity(intent);\n\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode == REQUEST_IMAGE_CAPTURE && resultCode == RESULT_OK && data != null && data.getData() != null) {\n\n Uri imageUri = data.getData();\n\n try {\n //Attempt for the application to save the picture the user wants to use\n Bitmap bitmap = MediaStore.Images.Media.getBitmap(getContentResolver(), imageUri);\n // Log.d(TAG, String.valueOf(bitmap));\n //Reference the ImageView\n ImageView imageView = (ImageView) findViewById(R.id.image_input);\n imageView.setImageBitmap(bitmap);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }",
"@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == 234 && data != null && data.getData() != null) {\n filePath = data.getData();\n Uri uri = data.getData();\n try {\n Bitmap bitmap = MediaStore.Images.Media.getBitmap(this.getContentResolver(), uri);\n ImageView imageView = findViewById(R.id.displayPicture);\n imageView.setImageBitmap(bitmap);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }\n }",
"@Override\n public void onActivityResult(int requestCode,int resultCode,Intent data)\n {\n alerta.dismiss();\n if(resultCode!=0)\n loading.abrir(\"Aguarde...\");\n\n super.onActivityResult(requestCode, resultCode, data);\n\n switch (requestCode) {\n case imagem_interna:\n if (resultCode == RESULT_OK) {\n Image img = new Image();\n ContentResolver cResolver = getContentResolver();\n Uri uri = data.getData();\n String[] projection = {MediaStore.Images.Media.DATA};\n Cursor cursor = cResolver.query(uri, projection, null, null, null);\n cursor.moveToFirst();\n int columnIndex = cursor.getColumnIndex(projection[0]);\n filepath = cursor.getString(columnIndex);\n cursor.close();\n\n File f64 = new File(filepath);\n if(f64!=null)\n {\n img.setResizedBitmap(f64,percentImgArq);\n img.setMimeFromImgPath(f64.getPath());\n }\n img64 = img.getBitmapBase64();\n tipoImagem = img.getMime();\n\n if(img.getBitmap()!=null)\n {\n imagem.setImageBitmap(img.getBitmap());\n }\n loading.fechar();\n }\n break;\n\n case imagem_camera:\n if (resultCode == RESULT_OK)\n {\n Image img = new Image();\n Bitmap photo = (Bitmap) data.getExtras().get(\"data\");\n\n Uri uri = img.getImageUri(pesqAgendaUser.this, photo);\n File file = new File(img.getRealPathFromURI(pesqAgendaUser.this,uri));\n String pathImgCamera = file.getPath();\n File f64 = new File(pathImgCamera);\n if(f64!=null)\n {\n img.setResizedBitmap(f64,percentImgCam);\n img.setMimeFromImgPath(f64.getPath());\n }\n img64 = img.getBitmapBase64();\n tipoImagem = img.getMime();\n\n if(img.getBitmap()!=null)\n {\n imagem.setImageBitmap(img.getBitmap());\n }\n loading.fechar();\n\n }\n break;\n\n default:\n loading.fechar();\n break;\n }//fim switch\n\n }",
"@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data)\n {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (resultCode == RESULT_OK) {\n if (requestCode == SELECT_PICTURE) {\n\n Uri selectedImageURI = data.getData();\n\n image_uri.setText(selectedImageURI.toString());\n Picasso.with(getBaseContext()).load(selectedImageURI).noPlaceholder().centerCrop().fit()\n .into((ImageView) findViewById(R.id.imageViewCountry));\n\n }\n }\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (resultCode == RESULT_OK) {\n if (requestCode == 1) {\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n int photoW = bmOptions.outWidth;\n int photoH = bmOptions.outHeight;\n\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inPurgeable = true;\n\n Bitmap bitmap = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n String txt = getTextFromImage(bitmap);\n searchByPhoto(txt);\n }else if(requestCode == 2){\n Bitmap bm=null;\n if (data != null) {\n try {\n bm = MediaStore.Images.Media.getBitmap(getApplicationContext().getContentResolver(), data.getData());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n String txt = getTextFromImage(bm);\n searchByPhoto(txt);\n }\n }\n }",
"protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n switch (requestCode) {\n case SELECTED_PICTURE:\n if (resultCode == RESULT_OK) {\n uri = data.getData();\n\n\n Log.e(\"Image path is \", \"\" + uri);\n String[] projection = {MediaStore.Images.Media.DATA};\n\n Cursor cursor = getContentResolver().query(uri, projection,\n null, null, null);\n cursor.moveToFirst();\n\n int columnIndex = cursor.getColumnIndex(projection[0]);\n String filePath = cursor.getString(columnIndex);\n String path = filePath;\n img = path;\n\n cursor.close();\n\n\n Bitmap yourSelectedImage = BitmapFactory.decodeFile(filePath);\n\n Drawable d = new BitmapDrawable(yourSelectedImage);\n\n newImage.setImageDrawable(d);\n Toast.makeText(getApplicationContext(), filePath,\n Toast.LENGTH_SHORT).show();\n\n\n\n }\n break;\n\n default:\n break;\n }\n }",
"@Override\n protected void onPostExecute(Bitmap bitmap) {\n imageView.setImageBitmap(bitmap);\n }",
"@Override\n public void onPositive(MaterialDialog materialDialog) {\n Intent intent = new Intent(ProductDetailImageActivity.this, CameraActivity.class);\n intent.putExtra(EXTRA_ZUOZHENG_IMAGE, isZuozhengImage);\n intent.putExtra(EXTRA_IMAGE_INDEX, index);\n startActivityForResult(intent, REQUEST_TAKE_PICTURE);\n }",
"@Override\n protected void onPostExecute(Bitmap bitmap) {\n if (bitmap != null) {\n imageView.setImageBitmap(bitmap);\n }\n dialog.dismiss();\n }",
"@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tsetContentView(R.layout.result);\r\n\t\timageCapture = (ImageView) findViewById(R.id.image_capture);\r\n\t\tString path = getIntent().getStringExtra(\"picPath\");\r\n\r\n\t\ttry {\r\n\t\t\tFileInputStream fis = new FileInputStream(path);\r\n\t\t\tMatrix matrix = new Matrix();\r\n\t\t\tmatrix.setRotate(90);\r\n\t\t\tBitmap bitmap = BitmapFactory.decodeStream(fis);\r\n\t\t\tbitmap = Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(),\r\n\t\t\t\t\tbitmap.getHeight(), matrix, true);\r\n\t\t\timageCapture.setImageBitmap(bitmap);\r\n\t\t\tfis.close();\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\t// Bitmap bitmap = BitmapFactory.decodeFile(path);\r\n\t\t// imageCapture.setImageBitmap(bitmap);\r\n\t}",
"protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode == CropImage.CROP_IMAGE_ACTIVITY_REQUEST_CODE) {\n CropImage.ActivityResult result = CropImage.getActivityResult(data);\n if (resultCode == RESULT_OK) {\n //getting Image to show\n Uri resultUri = result.getUri();\n profilePic.setImageURI(resultUri);\n\n //getting image to save bitmap formate\n try{\n bitmap = MediaStore.Images.Media.getBitmap(getContentResolver(),resultUri);\n imageChanged = true;\n }catch (IOException e){\n e.printStackTrace();\n }\n\n\n } else if (resultCode == CropImage.CROP_IMAGE_ACTIVITY_RESULT_ERROR_CODE) {\n Exception error = result.getError();\n Toast.makeText(this, \"\"+error, Toast.LENGTH_SHORT).show();\n }\n }\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode,\n Intent data) {\n if (requestCode == CAMERA_REQUEST_CODE && resultCode == RESULT_OK) {\n bitmap = (Bitmap) data.getExtras().get(\"data\");\n imageView.setImageBitmap(bitmap);\n callCloudVision(bitmap, feature);\n }\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (resultCode == RESULT_OK) {\n //everything processed successfully\n if (requestCode == Image_Gallery_Request) {\n //image gallery correctly responds\n Uri imageUri = data.getData(); //address of image on SD Card\n InputStream inputStream; //declaring stream to read data from SD card\n try {\n inputStream = getContentResolver().openInputStream(imageUri);\n Bitmap imagebtmp = BitmapFactory.decodeStream(inputStream); //Puts stream data into bitmap format\n Profile_Picture.setImageBitmap(imagebtmp); //Loads Image to ImageView\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n //error message if image is unavailable\n Toast.makeText(this, \"Unable to open image\", Toast.LENGTH_LONG).show();\n }\n }\n }\n }",
"@Override\n\tpublic void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\tLog.e(\"on success\", \"on success\");\n\t\tBitmap s = null;\n\n\t\tif (resultCode == getActivity().RESULT_OK) {\n\t\t\t// user is returning from capturing an image using the camera\n\t\t\tif (requestCode == CAMERA_CAPTURE) {\n\t\t\t\tLog.e(\"camera\", \"camera\");\n\t\t\t\tpicUri = data.getData();\n\t\t\t\tBundle extras = data.getExtras();\n\t\t\t\t// get the cropped bitmap\n\t\t\t\tBitmap thePic = extras.getParcelable(\"data\");\n\t\t\t\tsavetoaFileLocation(thePic);\n\t\t\t\tthePic = getResizedBitmap(thePic, 200, 200);\n\t\t\t\tcameraBitmap = thePic;\n\t\t\t\t// ImageView picView = (ImageView)\n\t\t\t\t// findViewById(R.id.img_userimage);\n\t\t\t\t// display the returned cropped image\n\t\t\t\tprofileimageeditflag=\"true\";\n\t\t\t\tGraphicsUtil graphicUtil = new GraphicsUtil();\n\t\t\t\t// picView.setImageBitmap(graphicUtil.getRoundedShape(thePic));\n\t\t\t\t\n\t\t\t\tpicview1.setImageBitmap(graphicUtil.getCircleBitmap(thePic, 16));\n\t\t\t\t//picview1.setImageBitmap(cameraBitmap);\n\t\t\t} else if (requestCode == GALLERY_CAPTURE) {\n\n\n\n\n\t\t\t\tUri selectedImage = data.getData();\n\n\t\t\t\tString stringUri;\n\t\t\t\tstringUri = selectedImage.toString();\n\t\t\t\tif ((stringUri != \"\") || stringUri != null) {\n\n\t\t\t\t\tString selectedImagePath = getPath(selectedImage);\ntry {\n\tExifInterface exifInterface = new ExifInterface(selectedImagePath);\n\torientation = exifInterface.getAttributeInt(ExifInterface.TAG_ORIENTATION, ExifInterface.ORIENTATION_NORMAL);\n\n}\ncatch (Exception e){}\n\n\n\n\t\t\t\t\tString[] filePathColumn = { MediaStore.Images.Media.DATA };\n\t\t\t\t\tCursor cursor = getActivity().getContentResolver().query(\n\t\t\t\t\t\t\tselectedImage, filePathColumn, null, null, null);\n\t\t\t\t\tcursor.moveToFirst();\n\t\t\t\t\tint columnIndex = cursor.getColumnIndex(filePathColumn[0]);\n\t\t\t\t\tString selectedimage_path = cursor.getString(columnIndex);\n\t\t\t\t\tLog.e(\"selected path\",selectedimage_path);\n\t\t\t\t\tcursor.close();\n\t\t\t\t\tif (selectedimage_path.startsWith(\"https://\")) {\n\t\t\t\t\t\tgetBiymapFromGoogleLocation(selectedimage_path);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts = getBitmapFromFile(selectedimage_path);\n\t\t\t\t\t}\n\t\t\t\t\ts = getResizedBitmap(s, 200, 200);\n\t\t\t\t\tcameraBitmap = s;\n\n\t\t\t\t\tswitch(orientation) {\n\t\t\t\t\t\tcase ExifInterface.ORIENTATION_ROTATE_90:\n\t\t\t\t\t\t\tcorrectedBitMap = rotateImage(cameraBitmap, 90);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase ExifInterface.ORIENTATION_ROTATE_180:\n\t\t\t\t\t\t\tcorrectedBitMap = rotateImage(cameraBitmap, 180);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase ExifInterface.ORIENTATION_ROTATE_270:\n\t\t\t\t\t\t\tcorrectedBitMap = rotateImage(cameraBitmap, 270);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tcorrectedBitMap=cameraBitmap;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\n\n\n\n\n\n\n\n\n\t\t\t\t\t// ImageView picView = (ImageView)\n\t\t\t\t\t// findViewById(R.id.img_userimage);\n\t\t\t\t\t// display the returned cropped image\nprofileimageeditflag=\"true\";\n\t\t\t\t\tGraphicsUtil graphicUtil = new GraphicsUtil();\n\n\n\t/*\t\t\t\tif(correctedBitMap!= null)\n\t\t\t\t\t{\n\t\t\t\t\t\tpicView.setImageBitmap(graphicUtil.getCircleBitmap(\n\t\t\t\t\t\t\t\tcorrectedBitMap, 16));\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t// picView.setImageBitmap(graphicUtil.getRoundedShape(thePic));\n\t\t\t\t\t\tpicView.setImageBitmap(graphicUtil.getCircleBitmap(\n\t\t\t\t\t\t\t\tcameraBitmap, 16));\n\t\t\t\t\t}\n\n*/\n\n\t\t\t\t\tif (correctedBitMap != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tpicview1.setImageBitmap(graphicUtil.getCircleBitmap(correctedBitMap, 16));\n\t\t\t\t\t\tsavetoaFileLocation(correctedBitMap);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tpicview1.setImageBitmap(graphicUtil.getCircleBitmap(s, 16));\n\t\t\t\t\t\tsavetoaFileLocation(s);\n\t\t\t\t\t}\n\n\n\n\t\t\t\t\t// picView.setImageBitmap(graphicUtil.getRoundedShape(thePic));\n\t\t\t\n\t\t\t\t//\tpicview1.setImageBitmap(graphicUtil.getCircleBitmap(s, 16));\n\t\t\t\t//\tpicview1.setImageBitmap(cameraBitmap);\n\t\t\t\t//\tsavetoaFileLocation(s);\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t}",
"protected void onPostExecute(Bitmap result) {\n\n\n\n bmImage.setImageBitmap(result);\n bmImage.setBackgroundResource( R.color.trans );\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if(requestCode == TAKE_IMAGE && resultCode == RESULT_OK){\n Bundle extra = data.getExtras();\n bitmap = (Bitmap) extra.get(\"data\");\n imageView.setImageBitmap(bitmap);\n }\n else {\n if (requestCode == SELECT_IMAGE && resultCode == RESULT_OK) {\n Uri targetUri = data.getData();\n Toast.makeText(getApplicationContext(), targetUri.toString(), Toast.LENGTH_SHORT).show();\n //textTargetUri.setText(targetUri.toString());\n Bitmap bitmap;\n try {\n\n bitmap = BitmapFactory.decodeStream(getContentResolver().openInputStream(targetUri));\n imageView.setImageBitmap(bitmap);\n } catch (FileNotFoundException e) {\n\n e.printStackTrace();\n }\n /*String[] filePathColumn = {MediaStore.Images.Media.DATA};\n\n\t\t\tCursor cursor = getContentResolver().query(data.getData(), filePathColumn, null, null, null);\n\t\t\tcursor.moveToFirst();\n\n\t\t\tint columnIndex = cursor.getColumnIndex(filePathColumn[0]);\n\n\t\t\tString filePath = cursor.getString(columnIndex);\n\t\t\tcursor.close();\n\n\t\t\tBitmap yourSelectedImage = BitmapFactory.decodeFile(filePath);\n\t\t\tToast.makeText(getApplicationContext(), filePath, 1000).show();\n\t\t\timageView.setImageBitmap(yourSelectedImage);\n*/\n }\n }\n if(requestCode == 0 && resultCode == RESULT_OK){\n Bundle extra = data.getExtras();\n bitmap = (Bitmap) extra.get(\"data\");\n // imageView.setImageBitmap(bitmap);\n\n\n File root = Environment.getExternalStorageDirectory();\n File file = new File(root.getAbsolutePath()+\"/DCIM/Camera/img.jpg\");\n try\n {\n file.createNewFile();\n FileOutputStream ostream = new FileOutputStream(file);\n bitmap.compress(Bitmap.CompressFormat.JPEG, 100, ostream);\n ostream.close();\n }\n catch (Exception e)\n {\n e.printStackTrace();\n Toast.makeText(this,\"Failed to save image, try again\",Toast.LENGTH_LONG).show();\n }\n }\n }",
"@Override\n protected void onPostExecute(Bitmap result) {\n imageProfile.setImageBitmap(result);\n }",
"public void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (resultCode == 1888) {\n\n Bitmap photo, resizedImage;\n\n fpath = data.getStringExtra(\"fpath\");\n String path = data.getStringExtra(\"path\");\n photo = BitmapFactory.decodeFile(path);\n resizedImage = getResizedBitmap(photo, 256);\n saveBitmap(resizedImage);\n\n\n Bundle bndl = data.getExtras();\n\n Intent intent = new Intent(VaccinationActivity.this, CardScanWriteVaccine.class);\n intent.putExtra(\"childid\", childID);\n intent.putExtra(\"bookid\", bookid);\n\n intent.putExtra(\"cnic\",cnic);\n intent.putExtra(\"pnum\",phone);\n\n if (bndl.size() >= 3) {\n\n intent.putExtra(\"vacc_details\", bndl.getString(\"vacc_details\"));\n intent.putExtra(\"visit_num\", bndl.getString(\"visit_num\"));\n\n }\n\n String date_String = Constants.getNextDueDate(Integer.parseInt(bndl.getString(\"visit_num\")), bndl.getString(\"vacc_details\").toString(),this.data.get(0).date_of_birth); // index wise it is correct\n intent.putExtra(\"curr_visit_num\", Integer.parseInt(bndl.getString(\"visit_num\"))-1);\n intent.putExtra(\"next_date\", date_String);\n this.finish();\n startActivity(intent);\n //imageView.setImageBitmap(photo);*/\n }\n\n\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data)\n {\n\n if ((requestCode == PICK_CODE) && (resultCode == RESULT_OK) && (data.getData() != null))\n {\n System.out.println(\"we are in if cond now try block run\");\n imgUriPath = data.getData();// this is full path of image\n\n try\n {\n Bitmap bitmap = MediaStore.Images.Media.getBitmap(getContentResolver(), imgUriPath);// got image in bitmap\n\n profile_pic.setImageBitmap(bitmap);//setting image\n\n\n } catch (IOException e)\n {\n\n e.printStackTrace();\n }\n\n }\n\n\n super.onActivityResult(requestCode, resultCode, data);\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n switch (requestCode) {\n case REQUEST_SELECT_IMAGE_1:\n if (resultCode == RESULT_OK) {\n // If image is selected successfully, set the image URI and bitmap.\n mImageUri1 = null;\n mBitmap1 = null;\n mImageUri1 = data.getData();\n mBitmap1 = ImageHelper.loadSizeLimitedBitmapFromUri(\n mImageUri1, getContentResolver());\n if (mBitmap1 != null) {\n // Show the image on screen.\n ImageView imageView = (ImageView) findViewById(R.id.image_0);\n imageView.setImageBitmap(mBitmap1);\n\n }\n // Clear the information panel.\n setInfo(\"\");\n\n // Enable button \"show baby\" as the image to detect is not selected.\n setShowButtonsEnabledStatus(true);\n }\n break;\n case REQUEST_SELECT_IMAGE_2:\n if (resultCode == RESULT_OK) {\n // If image is selected successfully, set the image URI and bitmap.\n mImageUri2 = null;\n mBitmap2 = null;\n mImageUri2 = data.getData();\n mBitmap2 = ImageHelper.loadSizeLimitedBitmapFromUri(\n mImageUri2, getContentResolver());\n if (mBitmap2 != null) {\n // Show the image on screen.\n ImageView imageView = (ImageView) findViewById(R.id.image_1);\n imageView.setImageBitmap(mBitmap2);\n\n }\n // Clear the information panel.\n setInfo(\"\");\n\n // Enable button \"show baby\" as the image to detect is not selected.\n setShowButtonsEnabledStatus(true);\n }\n break;\n default:\n break;\n }\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (resultCode == RESULT_OK) {\n\n SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(this);\n\n SharedPreferences.Editor editor = sharedPref.edit();\n\n editor.putString(\"Result choosen\", String.valueOf(requestCode));\n\n editor.commit();\n\n // Make sure the request was successful\n if (requestCode == TAKE_PICTURE ) {\n\n Log.d(\"scndactiv\", \"now in ONactivityresutl\");\n\n Intent secondactivityintent = new Intent(MainActivity.this, Secondactivity.class);\n secondactivityintent.putExtra(\"arg\",count);\n startActivity(secondactivityintent);\n\n }\n }\n\n if (resultCode == RESULT_OK) {\n if (requestCode == SELECT_PICTURE) {\n Uri selectedImageUri = data.getData();\n selectedImagePath = getPath(selectedImageUri);\n Intent secondactivityintent = new Intent(MainActivity.this, Secondactivity.class);\n secondactivityintent.putExtra(\"Openimagepicture\", selectedImagePath);\n startActivity(secondactivityintent);\n\n }\n }\n\n }",
"@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\n\t\t/*if (requestCode == REQUEST_CODE_TAKE_FROM_CAMERA && resultCode == RESULT_OK) {\n\t\t\tBundle extras = data.getExtras();\n\t\t\tBitmap imageBitmap = (Bitmap) extras.get(\"data\");\n\t\t\tif(imageBitmap!=null){\n\t\t\t\tBitmap scaledImageBitmap = getScaledImage(imageBitmap);\n\t\t\t\tprofilePic.setImageBitmap( scaledImageBitmap );\n\t\t\t}\n\n\t\t\tfinish();\n\t\t}*/\n\t}",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == CropImage.CROP_IMAGE_ACTIVITY_REQUEST_CODE) {\n CropImage.ActivityResult result = CropImage.getActivityResult(data);\n if (resultCode == RESULT_OK) {\n croppedURI = result.getUri();\n\n try {\n bitmap = MediaStore.Images.Media.getBitmap(this.getContentResolver(), croppedURI);\n\n Intent intent = new Intent(UploadHonjouActivity.this, ConfirmActivity.class);\n\n SharedPrefManager.getInstance(this).saveHonjou(getStringImage(bitmap));\n\n intent.putExtra(\"edit_flag\", false);\n\n startActivity(intent);\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n } else if (resultCode == CropImage.CROP_IMAGE_ACTIVITY_RESULT_ERROR_CODE) {\n\n }\n }\n }",
"void goToImageActivity(Bitmap image) {\n Intent intent = new Intent();\n intent.setClass(ScanHint.this, FullScreenImageActivity.class);\n Bundle extras = new Bundle();\n extras.putParcelable(\"BitmapImage\", image);\n intent.putExtras(extras);\n startActivity(intent);\n }",
"public void onActivityResult(int requestCode, int resultCode, Intent data) {\n imageView = (ImageView) findViewById(R.id.contactImg);\n\n if (resultCode == RESULT_OK) {\n if (requestCode == SELECT_PICTURE) {\n selectedImageUri = data.getData();\n\n if (null != selectedImageUri) {\n saveImage(selectedImageUri.toString());\n imageView.setImageURI(selectedImageUri);\n setSelectedImgURI(selectedImageUri);\n\n }\n\n }\n }\n }",
"@Override\n protected void onPostExecute(Bitmap imgBm){\n imgView.setImageBitmap(imgBm);\n\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n //here we are applying the condition\n if(requestCode==50 && resultCode==RESULT_OK){\n //here it will Get the url from data\n Uri selectedImageUri = data.getData();\n if (null != selectedImageUri) {\n //displays image\n imageView.setImageURI(selectedImageUri);\n }\n }\n }",
"public void activityCallback(int requestCode, int resultCode, Intent data) {\n\n Log.d(TAG,\"callback called. request code: \" + requestCode + \" result code: \" + resultCode);\n if (requestCode == REQUEST_TAKE_PHOTO && resultCode == Activity.RESULT_OK) {\n Bitmap imageBitmap = null;\n try {\n imageBitmap = MediaStore.Images.Media.getBitmap(context.getContentResolver(), Uri.fromFile(photoFile));\n } catch (IOException e) {\n e.printStackTrace();\n }\n ImageView mImageView = new ImageView(context);\n mImageView.setImageBitmap(imageBitmap);\n photoLayout.addView(mImageView);\n photoLayout.invalidate();\n photoLayout.refreshDrawableState();\n }\n\n\n\n }",
"@Override\n public void imageLoad(ImageView imageView, Bitmap bitmap) {\n imageView.setImageBitmap(bitmap);\n //item.picture = bitmap;\n }",
"protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == PICK_IMAGE_REQUEST && resultCode == RESULT_OK && data != null) {\n\n if(data.getData() != null){\n //One image selected\n try {\n Uri mImageUri=data.getData();\n Bitmap bmp = MediaStore.Images.Media.getBitmap(getContentResolver(), mImageUri);\n ByteArrayOutputStream stream = new ByteArrayOutputStream();\n bmp.compress(Bitmap.CompressFormat.JPEG, 100, stream);\n byte[] byteArray = stream.toByteArray();\n\n item.set_ITEM_IMG(byteArray);\n\n //show picture in imageView\n imageField.setScaleType(ImageView.ScaleType.CENTER_CROP);\n imageField.setImageBitmap(bmp);\n\n } catch (IOException e) {\n Log.e(\"LOG_TAG\", \"Caught IOException: \" + e.getMessage()); //Should never get here\n }\n } else {\n Toast toast = Toast.makeText(getApplicationContext(), \"Please pick an Item Image\", Toast.LENGTH_SHORT);\n }\n } else if (requestCode == ADD_ITEM_REQUEST_CODE && resultCode == RESULT_OK && data != null ) {\n Log.d(TAG, \"RECEIVED ADD ITEM INTENT FROM ALL ROOMS ACTIVITY\");\n item.set_ITEM_LOCATION(data.getStringExtra(\"RoomFaceName\"));\n item.set_ITEM_X(data.getFloatExtra(\"X_coord\", 0));\n item.set_ITEM_Y(data.getFloatExtra(\"Y_coord\", 0));\n Log.d(TAG, \"Got item with x and y of : \" + item.get_ITEM_X() + \" \" + item.get_ITEM_Y());\n } {\n\n }\n }",
"public void onClick(View vw) {\n try {\n Bitmap bitmap = QRCodeHelper.encodeAsBitmap(mETWaybillId.getText().toString(), BarcodeFormat.QR_CODE, 300, 300);\n if (bitmap != null) {\n mIVQRCode.setImageBitmap(bitmap);\n } else {\n mTVDescription.setText(\"Bitmap null\");\n }\n } catch (Exception e) {\n Log.e(\"MainActivity\", \"Exe \", e);\n }\n }",
"@Override\n protected void onPostExecute(String result) {\n this.bmImage.setImageBitmap(bitmap);\n }",
"@Override\n protected void onPostExecute(Bitmap result) {\n super.onPostExecute(result);\n if(result!=null){\n showImageView.setImageBitmap(result);\n }\n }",
"protected void onPostExecute(Bitmap bitmap) {\n image.setImageBitmap(bitmap);\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if(resultCode == this.RESULT_OK && requestCode == EDITAR_TWEET){\n Tweet tweetEditado = (Tweet) data.getExtras().get(Tweet.TWEET_EDIT);\n\n tweets.set(posicaoTweet, tweetEditado);\n\n tweetsAdapter.notifyDataSetChanged();\n }else if(resultCode == this.RESULT_OK && requestCode == TIRAR_FOTO){\n ImageView foto = findViewById(R.id.fotoPerfil);\n\n foto.setImageBitmap((Bitmap) data.getExtras().get(\"data\"));\n }\n }",
"@Override\n \t protected void onPostExecute(Bitmap result)\n \t {\n \t\t\tMapImageView imageView = (MapImageView)this.getActivity().findViewById(com.example.chronolocalization.R.id.mapImage);\n \t \n \t\t\tByteArrayOutputStream baos = new ByteArrayOutputStream();\n \t\t\tresult.compress(Bitmap.CompressFormat.PNG, 100, baos);\n \t\t\tInputStream is = new ByteArrayInputStream( baos.toByteArray());\n \t \t\t\n \t\t\t //decode with inSampleSize\n BitmapFactory.Options o2 = new BitmapFactory.Options();\n Bitmap resizedbitmap = BitmapFactory.decodeStream(is, null, o2);\n\t \n \t\t imageView.setImageBitmap(resizedbitmap);\n \t\t \n \t\t int bitmapHeight = resizedbitmap.getHeight();\n \t\t int bitmapWidth = resizedbitmap.getWidth();\n \t\t \n \t\t int imageViewHeight = imageView.getHeight();\n \t\t int imageViewWidth = imageView.getWidth();\n \t\t \n \t\t float additionalRatioX = (float) imageViewWidth / (float) bitmapWidth;\n \t\t float additionalRatioY = (float) imageViewHeight / (float) bitmapHeight;\n \t\t \n \t\t float additionalRatio = 1.0f;\n\t\t if( Math.abs(additionalRatioX - 1.0f) < Math.abs(additionalRatioY -1.0f) )\n \t\t {\n \t\t \tadditionalRatio = additionalRatioX;\n \t\t }\n \t\t else\n \t\t {\n \t\t \tadditionalRatio = additionalRatioY;\n \t\t }\n\t\t \n\t\t float heightInMeter = mapRecord.getHeight();\n\t\t float widthInMeter = mapRecord.getWidth();\n\t\t \n\t\t int heightInPixel = (int)heightInMeter * (int)mapRecord.getScalingY();\n\t\t int widthInPixel = (int)widthInMeter * (int)mapRecord.getScalingX();\n\t\t \n \t\t float scalingX = mapRecord.getScalingX() * additionalRatio;\n \t \tfloat scalingY = mapRecord.getScalingY() * additionalRatio;\n\t \t\n\t \tfloat offsetX = mapRecord.getOffsetX();\n\t \tfloat offsetY = mapRecord.getOffsetY();\n\t \t\n \t \tPoint oldZero = new Point(0.0f, 0.0f);\n\t \tPoint newZero = new Point(0.0f, -offsetY*additionalRatio);\n \t \t\n \t \tCoordinateTransformation coordinateTransformation = new CoordinateTransformation(oldZero, newZero);\n \t\t \n \t \timageView.clearReceiverPositions();\n \t\t for(ReceiverRecord receiverRecord : receiverRecords)\n \t\t {\n \t\t \tPoint receiverPosition = receiverRecord.getReceiverPosition();\n \t\t \treceiverPosition.scale(scalingX, scalingY);\n \t\t \treceiverPosition = coordinateTransformation.transformPosition(receiverPosition);\n \t\t \t\n \t\t \timageView.addReceiver(receiverRecord.getReceiverId(), receiverPosition);\n \t\t }\n \t\t \t\t \n \t\t imageView.invalidate();\n \n \t }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {\n // choose a image\n if (requestCode == RequestCode.CHOOSE_IMAGE) {\n if (resultCode == RESULT_OK) {\n if (data != null) {\n Uri dataUri = data.getData();\n if (dataUri != null) {\n // get a random name\n File imgFile = SpaceUtils.newUsableFile();\n mSelectPath = imgFile.getPath();\n Log.v(\"path\",mSelectPath);\n // the image intent just return a simple image\n // the Ucrop(裁剪) is solved after the image intent\n UCrop.Options options = new UCrop.Options();\n options.setCompressionQuality(100);\n UCrop.of(dataUri, Uri.fromFile(imgFile))\n .withOptions(options)\n .withMaxResultSize(mImageSize.x, mImageSize.y)\n .withAspectRatio(3, 4)\n .start(this, RequestCode.CROP_IMAGE);\n }\n }\n }\n } else if (requestCode == RequestCode.CROP_IMAGE) {\n // crop a image\n if (resultCode == RESULT_OK) {\n if (data != null) {\n Glide.with(this).load(mSelectPath).into(mImageViews.get(mCurrentIndex));\n startDetectFaceInfo();\n }\n }\n }\n super.onActivityResult(requestCode, resultCode, data);\n }",
"@Override\r\n protected void onActivityResult( int requestCode, int resultCode, Intent data) {\n if (resultCode == RESULT_OK) {\r\n if (requestCode == 1 && resultCode == RESULT_OK && data != null && data.getData() != null) {\r\n\r\n Uri selectedImageUri = data.getData();\r\n try {\r\n selectBitmap = MediaStore.Images.Media.getBitmap(getContentResolver(), selectedImageUri);\r\n uploadImage();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }\r\n }",
"@Override\n public void onActivityResult(int requestCode, int resultCode, Intent intent) {\n\n\n //photo taken from cam\n if (requestCode == REQUEST_IMAGE_CAPTURE && resultCode == RESULT_OK) {\n if (_mImageUri != null) {\n showTakenPhoto();\n }\n }\n\n //photo chosen\n if (requestCode == REQUEST_IMAGE_PICK && resultCode == RESULT_OK) {\n _mImageUri = intent.getData();\n\n\n try {\n _bitmap = MediaStore.Images.Media.getBitmap(\n getContentResolver(), _mImageUri);\n ImageView imageView = (ImageView) findViewById(R.id.uploadedImage);\n\n\n assert _bitmap != null;\n String[] filePathColumn = {MediaStore.Images.Media.DATA};\n\n Cursor cursor = getContentResolver().query(\n _mImageUri, filePathColumn, null, null, null);\n cursor.moveToFirst();\n\n int columnIndex = cursor.getColumnIndex(filePathColumn[0]);\n String filePath = cursor.getString(columnIndex);\n cursor.close();\n rotateImage(filePath);\n imageView.setImageBitmap(scaleBitmap(_bitmap, 350));\n _uploadButton.setEnabled(true);\n } catch (FileNotFoundException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }\n\n\n }",
"public void changePic(View v){\n //Intent gallery = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.INTERNAL_CONTENT_URI);\n //startActivityForResult(gallery,PICK_IMAGE);\n new AlertDialog.Builder(ProfileModify.this)\n .setIcon(android.R.drawable.ic_dialog_alert)\n .setTitle(\"Choose\")\n .setItems(Choose, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n if(which == 0) {\n Intent iGallery = new Intent(Intent.ACTION_PICK,MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n startActivityForResult(iGallery,PICK_GALLERY);\n }\n else {\n Intent iCamera = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n if(iCamera.resolveActivity(getPackageManager()) != null){\n startActivityForResult(iCamera,REQUEST_IMAGE_CAPTURE);\n }\n }\n }\n }).create().show();\n }",
"private void imagePic(){\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, \"Select Picture\"),1);\n\n }",
"@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == LocationPickerActivity.LOCATION_RESULT) {\n // Make sure the request was successful\n if (resultCode == RESULT_OK) {\n double lat = data.getDoubleExtra(\"lat\", 0.0);\n double lng = data.getDoubleExtra(\"lng\", 0.0);\n location = new LatLng(lat, lng);\n locationButton.setText(\"(\" + lat + \", \" + lng + \")\");\n }\n } else if (requestCode == REQUEST_TAKE_PHOTO && resultCode == RESULT_OK) {\n // Bundle extras = data.getExtras();\n // Bitmap imageBitmap = (Bitmap) extras.get(\"data\");\n // imageView.setImageBitmap(imageBitmap);\n galleryAddPic(); // add the current photo to the media gallery\n setPic(); // set the image view to show a scaled version of the image\n }\n }",
"public void onItemClick(View view, PictureModel pictureModel) {\n Intent intent = new Intent(getActivity(), SecondActivity.class);\n /*Bundle bundle = new Bundle();\n bundle.putParcelable(\"bitmap\",bitmap);\n intent.putExtra(\"bundle\",bundle);\n startActivity(intent);*/\n //intent.putExtra(\"path\",\"/sdcard/namecard/\");\n byte buff[] = new byte[1024*1024];//看你图有多大..自己看着改\n buff = Bitmap2Bytes(pictureModel.getPictureBitmap());\n intent.putExtra(\"image\",buff);\n startActivity(intent);\n\n\n\n }",
"@Override\n public void onFragmentResult(@NonNull String requestKey, @NonNull Bundle bundle) {\n String result = bundle.getString(\"bundleKey\");\n Uri imgUri = Uri.parse(result);\n Glide.with(requireActivity())\n .asBitmap()\n .load(imgUri)\n .into(new BitmapImageViewTarget(mProfileImg) {\n @Override\n public void onResourceReady(@NonNull Bitmap resource, @Nullable Transition<? super Bitmap> transition) {\n mProfileImg.setImageBitmap(resource);\n Palette.from(resource).generate(new Palette.PaletteAsyncListener() {\n public void onGenerated(Palette p) {\n Palette.Swatch vibrant = p.getVibrantSwatch();\n if(vibrant != null)\n mProfileImg.setBorderColor(vibrant.getRgb());\n }\n });\n }\n });\n }",
"public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (resultCode == RESULT_OK) {\n\n // compare the resultCode with the\n // SELECT_PICTURE constant\n if (requestCode == SELECT_PICTURE) {\n Uri selectedImageURI = data.getData();\n// File imageFile = new File(getRealPathFromURI(selectedImageURI));\n Uri selectedImageUri = data.getData( );\n String picturePath = getPath( getApplicationContext( ), selectedImageUri );\n Log.d(\"Picture Path\", picturePath);\n\n // Get the url of the image from data\n selectedImageUri = data.getData();\n if (null != selectedImageUri) {\n bitmap = null;\n // update the preview image in the layout\n try {\n bitmap = MediaStore.Images.Media.getBitmap(this.getContentResolver(), selectedImageUri);\n } catch (IOException e) {\n e.printStackTrace();\n }\n// IVPreviewImage.setImageURI(selectedImageUri);\n// runTextRecognition(bitmap);\n IVPreviewImage.setImageBitmap(bitmap);\n\n }\n }\n\n if (requestCode == 123) {\n\n\n Bitmap photo = (Bitmap) data.getExtras()\n .get(\"data\");\n\n // Set the image in imageview for display\n IVPreviewImage.setImageBitmap(photo);\n runTextRecognition(photo);\n\n }\n\n }\n }",
"@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode == request_code && resultCode == RESULT_OK && data != null && data.getData() != null) {\n uri = data.getData();\n slika.setImageURI(uri);\n }\n }",
"public void insertimg()\n {\n String name= countryname.getText().toString();\n DB = new DbContext(this);\n imageView.setDrawingCacheEnabled(true);\n\n //Bitmap bitmap = ((BitmapDrawable)imageView.getDrawable()).getBitmap();\n Bitmap bitmap = imageView.getDrawingCache();\n\n ByteArrayOutputStream stream = new ByteArrayOutputStream();\n bitmap.compress(Bitmap.CompressFormat.PNG, 100, stream);\n byte[] byteArray = stream.toByteArray();\n\n boolean isInserted = DB.insertCountry(name,byteArray);\n\n if (isInserted == true) {\n Toast.makeText(getApplicationContext(),\"Image Successfully Added\",Toast.LENGTH_LONG).show();\n }\n else\n {\n Toast.makeText(getApplicationContext(),\"Image Insert Unsuccessful\",Toast.LENGTH_LONG).show();\n }\n Intent intent = new Intent(getBaseContext(),AdminMenu.class);\n startActivity(intent);\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == RESULT_LOAD_IMAGE && resultCode == RESULT_OK && null != data) {\n Uri selectedImage = data.getData();\n String[] filePathColumn = {MediaStore.Images.Media.DATA};\n Cursor cursor = getContentResolver().query(selectedImage,\n filePathColumn, null, null, null);\n cursor.moveToFirst();\n int columnIndex = cursor.getColumnIndex(filePathColumn[0]);\n picturePath = cursor.getString(columnIndex);\n cursor.close();\n Bitmap bitmap = BitmapFactory.decodeFile(picturePath);\n mItemImageView.setImageBitmap(bitmap);\n }\n }",
"@Override\r\n\t protected void onPostExecute(Bitmap outBitmap) {\r\n\t\t\tLog.d(\"asdf\", \"ONPOSTEXE\");\r\n\t\t\tRectF dest = new RectF(x, y, x + width, y + height);\r\n\t\t\timageWrapper imwrap = new imageWrapper(outBitmap, startState, dest);\r\n\t\t\tfinal HashMap<Integer, imageWrapper> map = mapRef.get();\r\n\t\t\tmap.put(resId, imwrap);\r\n\t }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n try {\n\n if (requestCode == RESULT_LOAD_ARTIST_IMAGE && resultCode == RESULT_OK && null != data) {\n\n selectedImage = data.getData();\n imageToUpload.setImageURI(selectedImage);\n bitmap = MediaStore.Images.Media.getBitmap(this.getContentResolver(), selectedImage);\n\n isPicture = true;\n } else {\n Toast.makeText(this, R.string.noImagePicked, Toast.LENGTH_LONG).show();\n }\n }catch (Exception e ){\n Log.e(\"error\", e.toString());\n Toast.makeText(this, R.string.stgWentWrong, Toast.LENGTH_LONG).show();\n }\n\n }",
"public void onActivityResult(int requestCode, int resultCode, Intent data) {\n\n if (requestCode == 1001) {\n if (resultCode == getActivity().RESULT_OK) {\n //fetch the integer we passed into the dialog result which corresponds to the list position\n\n int nResult = data.getIntExtra(ResultsDialogActivity.POSITION, -99);\n\n\n if (nResult != -99) {\n try {\n mStrImageUrl = \"\";\n YelpResultsData.Business biz = mYelpResultsData.businesses.get(nResult);\n mNameField.setText(biz.name);\n mAddressField.setText(biz.location.address.get(0));\n mPhoneField.setText(PhoneNumberUtils.formatNumber(biz.phone));\n mYelpField.setText(biz.url);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n fetchPhoto(mPhotoView);\n }\n }\n if (resultCode == getActivity().RESULT_CANCELED) {\n //do nothing\n }\n }\n }",
"@Override\n public void onClick(View v) {\n MainActivity mainActivity = (MainActivity) getActivity();\n DatabaseHelper dbHelper = new DatabaseHelper(mainActivity);\n taskforshopphoto = dbHelper.getTaskInfo(String.valueOf(Shared.SelectedTask.ID));\n if (taskforshopphoto.PhotoID != null) {\n Dialog settingsDialog = new Dialog(getActivity());\n settingsDialog.getWindow().requestFeature(Window.FEATURE_NO_TITLE);\n View viewDialog = getActivity().getLayoutInflater().inflate(R.layout.image_layout, null);\n settingsDialog.setContentView(viewDialog);\n ImageView imgShop = (ImageView) viewDialog.findViewById(R.id.ShopImage);\n Bitmap bmp = BitmapFactory.decodeFile(taskforshopphoto.PhotoID);\n\n imgShop.setImageBitmap(bmp);\n settingsDialog.show();\n } else {\n Toast.makeText(getActivity(), \" No Shop photo\", Toast.LENGTH_LONG).show();\n }\n }",
"@Override\n public void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n //O sea que, la accion que ejecuta el usuario es igual a seleccionar una imagen de la galeria\n // Y \"&&\" que la seleccion de la imagen se hizo bien\n if (requestCode == CODIGO_GALERIA && resultCode == RESULT_OK);\n try {\n //Esto nos va transformar la URI en este archivo que esta aqui colocado.\n ArchivoImagen = UtilidadFile.from(this,data.getData());\n //Para que la imagen cargue en uno de los recuadros de la interfaz grafica se hara\n //esta implementacion en la cual recibe la ruta de la imagen.\n imgpost1.setImageBitmap(BitmapFactory.decodeFile(ArchivoImagen.getAbsolutePath()));\n }catch (Exception ex){\n Log.d(\"ERROR\", \"Ha ocurrido un error \"+ ex.getMessage());\n }\n }",
"@Override\n\tprotected void onPostExecute(Bitmap result) {\n\t\tsuper.onPostExecute(result);\n\n\t\tmsg.what = 1;\n\t\tpuente_envio.dispatchMessage(msg);\n\t\t// imgImagen.setImageBitmap(result);\n\n\t}",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\n if(requestCode == LOCATION_REQUEST && resultCode == RESULT_OK){\n PlaceOfInterest fromAdd = (PlaceOfInterest) data.getSerializableExtra(\"Place\");\n LatLng newLatLong = new LatLng(fromAdd.getLatitude(), fromAdd.getLongitude());\n MarkerOptions placeMarker = new MarkerOptions().position(newLatLong).title(fromAdd.getName())\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_YELLOW));\n if(fromAdd.getPicture() != null){\n Log.d(TAG, \"getPicture was not null\");\n int height = 100;\n int width = 100;\n Bitmap picture = ByteConvertor.convertToBitmap(fromAdd.getPicture());\n BitmapDrawable d = new BitmapDrawable(getResources(), picture);\n Bitmap smallMarker = Bitmap.createScaledBitmap(d.getBitmap(), width, height, false);\n\n placeMarker.icon(BitmapDescriptorFactory.fromBitmap(smallMarker));\n }\n places.add(fromAdd);\n mMap.addMarker(placeMarker);\n mMap.moveCamera(CameraUpdateFactory.newLatLng(newLatLong));\n }\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if(requestCode == gallaryPick && resultCode == RESULT_OK && data != null){\n imageUri = data.getData();\n try{\n saveTransactionPictureToFirebaseStorage();\n } catch (Exception ex){\n Toast.makeText(this, \"Error occurred, please try again...\", Toast.LENGTH_SHORT).show();\n }\n }\n }"
] | [
"0.77818406",
"0.7541768",
"0.7354",
"0.7210406",
"0.7119965",
"0.7072262",
"0.7056996",
"0.7005687",
"0.6990608",
"0.6989676",
"0.69697785",
"0.6962471",
"0.6961085",
"0.6946613",
"0.6940442",
"0.68794",
"0.6864243",
"0.6853377",
"0.6806152",
"0.67943555",
"0.675925",
"0.6722553",
"0.67183834",
"0.6707591",
"0.66864777",
"0.6679118",
"0.66738516",
"0.66573536",
"0.66541517",
"0.6631896",
"0.65726304",
"0.65674514",
"0.65435433",
"0.65343684",
"0.65179366",
"0.65109396",
"0.64955145",
"0.6482682",
"0.64799833",
"0.6478229",
"0.6476162",
"0.6465201",
"0.64601773",
"0.64401835",
"0.64368314",
"0.64076924",
"0.6401651",
"0.640008",
"0.6399622",
"0.6395969",
"0.6390126",
"0.6381377",
"0.6379911",
"0.6360191",
"0.6356159",
"0.6354005",
"0.63492",
"0.63478976",
"0.63444823",
"0.63424444",
"0.6341824",
"0.6340273",
"0.63314176",
"0.6326016",
"0.6324388",
"0.6321318",
"0.6320053",
"0.631973",
"0.63143134",
"0.630462",
"0.62994576",
"0.62914735",
"0.6288522",
"0.62827486",
"0.6274017",
"0.6271878",
"0.62674016",
"0.62583566",
"0.625756",
"0.6240941",
"0.62386334",
"0.6238398",
"0.6237301",
"0.62335455",
"0.62327194",
"0.6223215",
"0.6209089",
"0.6208848",
"0.6208707",
"0.6189257",
"0.6184357",
"0.61759394",
"0.61748093",
"0.6170814",
"0.61666125",
"0.6160873",
"0.6149808",
"0.61478037",
"0.61441624",
"0.6139897",
"0.6136474"
] | 0.0 | -1 |
Init the JLabel with the given title | public CategoryLabel(String title) {
super(title.toUpperCase());
setForeground(GUIParameters.LEFTBAR_CAT);
setAlignmentX(CENTER_ALIGNMENT);
Border empty = new EmptyBorder(0, 0, 20, 0);
setBorder(empty);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void setupTitle(){\n\t\tJLabel title = new JLabel(quiz_type.toString()+\": \"+parent_frame.getDataHandler().getLevelNames().get(parent_frame.getDataHandler().getCurrentLevel())); \n\t\ttitle.setFont(new Font(\"Arial Rounded MT Bold\", Font.BOLD, 65));\n\t\ttitle.setForeground(new Color(254, 157, 79));\n\t\ttitle.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tadd(title);\n\t\ttitle.setBounds(32, 24, 1136, 119);\n\t\ttitle.setOpaque(false);\n\t}",
"public TitleLabel(String title) {\n\t\tsuper(title);\n\t\tthis.setOpaque(false);\n\t\tthis.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tthis.setVerticalAlignment(SwingConstants.CENTER);\n\t\tthis.setMinimumSize(new Dimension(IConfigGUI.TITLE_WIDTH, IConfigGUI.TITLE_HEIGHT));\n\t\tthis.setMaximumSize(new Dimension(IConfigGUI.TITLE_WIDTH, IConfigGUI.TITLE_HEIGHT));\n\t\tthis.setPreferredSize(new Dimension(IConfigGUI.TITLE_WIDTH, IConfigGUI.TITLE_HEIGHT));\n\t\tthis.setBackground(IConfigGUI.TITLE_BACKGROUND_COLOR);\n\t\tthis.setBorder(new MatteBorder(0, 0, 3, 0, IConfigGUI.BLACK_BORDER_COLOR));\n\t\tthis.setFont(new Font(IConfigGUI.FONT_LOBSTER, 1, IConfigGUI.HUGE_FONT_SIZE * 2));\n\t\t\n\t\tint nbPictures = 16;\n\t\tint wp = (int) (Math.random() * nbPictures) + 1;\n\t\t\n\t\tthis.setForeground(IConfigGUI.TITLE_COLORS[wp - 1]);\n\t\tthis.setIcon(new ImageIcon(\"resources/wallpaper/wp\" + wp + \"_cropped_resized.jpg\"));\n\t\tthis.setIconTextGap(- IConfigGUI.TITLE_WIDTH * 5 / 6);\n\t}",
"private void initComponents() {\n\t\tlblTitle = new javax.swing.JLabel();\n\t\tlblTitle.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));\n\t\tjSeparator1 = new javax.swing.JSeparator();\n\n\t\tlblTitle.setFont(getTitleFont());\n\t\tlblTitle.setForeground(getTitleColor());\n\t\tlblTitle.setText(com.floreantpos.POSConstants.TITLE);\n\n\t\tsetLayout(new BorderLayout(5, 5));\n\t\tadd(lblTitle);\n\t\tadd(jSeparator1, BorderLayout.SOUTH);\n\n\t\tsetPreferredSize(PosUIManager.getSize(300, 60));\n\t}",
"public void setTitle(String title){\n lblTitle.setText(title);\n }",
"private void constructTitlePanel() {\n titlePanel = new JPanel();\n titlePanel.setPreferredSize(relativeSize(0.8f, 0.03f));\n \n JLabel titleLabel = new JLabel(\"JMarkets Server Interface\");\n titleLabel.setFont(new Font(\"Arial\", Font.BOLD, 18));\n titleLabel.setForeground(new Color(102, 51, 0));\n \n titlePanel.add(titleLabel);\n }",
"public void setTitle(String s){\n\t\tJLabel title = new JLabel(s);\r\n\t\tsetLayout(new BorderLayout());\r\n\t\tadd(title, BorderLayout.PAGE_START);\r\n\t}",
"public Title() {\n super();\n initComponents();\n }",
"private void createStartingLabel() {\n \tcreateLabel(myResources.getString(\"title\"), 1, 0, TITLE_FONT);\n }",
"private JLabel getTitleLabel(String txt) {\r\n\t\tif(lblTitle == null) {\r\n\t\t\tlblTitle = new JLabel(txt);\r\n\t\t\tlblTitle.setHorizontalAlignment(JLabel.CENTER);\r\n\t\t\tlblTitle.setFont(new Font(\"Segoe UI\", 0, 20));\r\n\t\t}\r\n\t\treturn lblTitle;\r\n\t}",
"private void createYourListsTitle() {\n\t\tjlYourLists = new JLabel(\"PLAYLISTS\");\t\t\n\t\tjlYourLists.setFont(new java.awt.Font(\"Century Gothic\",0, 17));\n\t\tjlYourLists.setForeground(new Color(250,250,250));\n\t}",
"public TitlePanel() {\n\t\tinitComponents();\n\t}",
"private void addTitle() {\n\t\tJXPanel titlePanel = new JXPanel();\n\t\ttitlePanel.setLayout(null);\n\t\ttitlePanel.setSize(180, 60);\n\t\ttitlePanel.setLocation(60, 10);\n\t\ttitlePanel.setToolTipText(\"www.i.hsr.ch\");\n\t\ttitlePanel.setBorder(new DropShadowBorder(new Color(0, 0, 0), 7, 0.5f, 12, true, true, true, true));\n\t\t\n\t\tJLabel title = GUIComponents.createLabel(YAETMMainView.PROGRAM, new Point(45, 12));\n\t\ttitle.setFont(new Font(\"Tahoma\", Font.BOLD, 25));\n\t\t\n\t\tJLabel titleExtend = GUIComponents.createLabel(YAETMMainView.PROGRAMEXT, new Point(10, 33));\n\t\ttitleExtend.setSize(200, 20);\n\t\ttitleExtend.setFont(new Font(\"Arial\", Font.PLAIN, 11));\n\t\t\n\t\ttitlePanel.add(titleExtend);\n\t\ttitlePanel.add(title);\n\t\tpanel.add(titlePanel);\n\t}",
"private void initHorPageTitle() {\n\t\tLabel pageTitle = new Label(\"Reports\");\n\t\tpageTitle.setSizeFull();\n\t\tpageTitle.setWidth(\"800px\");\n\t\tpageTitle.setHeight(\"45px\");\n\t\tpageTitle.addStyleName(\"posPageTitle\");\n\t\thorPageTitle.addComponent(pageTitle);\n\t\troot.addComponent(horPageTitle);\n\t\troot.setComponentAlignment(horPageTitle, Alignment.TOP_CENTER);\n\t}",
"private JLabel makeLabel(String title, boolean h1) {\n JLabel label = new JLabel(title);\n if (h1 == true) {//if the label is to be a title\n label.setForeground(themeColor);\n label.setFont(new Font(\"Terminal Bold\", Font.PLAIN, 48));\n } else {\n label.setFont(new Font(\"Terminal Bold\", Font.PLAIN, 25));\n label.setForeground(Color.white);\n }\n return label;\n\n }",
"private Label createTitle() {\n Label titleLbl = new Label(\"Tank Royale\");\n titleLbl.setFont(Font.loadFont(getClass().getResourceAsStream(\"/resources/fonts/ToetheLineless.ttf\"), 50));\n titleLbl.setPrefWidth(400);\n titleLbl.setLayoutX(545 - titleLbl.getWidth() - 157);\n titleLbl.setLayoutY(125);\n return titleLbl;\n }",
"private javax.swing.JLabel getJLabelTitle() {\n\tif (JLabelTitle == null) {\n\t\ttry {\n\t\t\tJLabelTitle = new javax.swing.JLabel();\n\t\t\tJLabelTitle.setName(\"JLabelTitle\");\n\t\t\tJLabelTitle.setFont(new java.awt.Font(\"dialog\", 1, 18));\n\t\t\tJLabelTitle.setText(\"License\");\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}\n\treturn JLabelTitle;\n}",
"public _15_TitleControllerExtend(){\r\n addOnInitializeWithSneakyThrow(()->{\r\n this.titleLabel.setText(title);\r\n });\r\n }",
"private JLabel makeJLabel(String title, int x, int y, int width, int height) {\r\n JLabel label = new JLabel(title);\r\n label.setBounds(x, y, width, height);\r\n return label;\r\n }",
"private Label setTitle() {\r\n Label title = new Label(TITLE);\r\n title.setFont(Font.font(null, FontWeight.BOLD, null, TITLESZE));\r\n return title;\r\n }",
"private void createYourMusicTitle() {\n\t\tjpYourMusic = new JPanel(new GridLayout(1,1));\n\t\tjpYourMusic.setOpaque(false);\n\t\tJLabel jlYourMusic = new JLabel(\"YOUR MUSIC\");\t\t\n\t\tjlYourMusic.setFont(new java.awt.Font(\"Century Gothic\",0, 17));\n\t\tjlYourMusic.setForeground(new Color(250,250,250));\n\t\tjpYourMusic.add(jlYourMusic);\n\t}",
"private void createLabel(String title, int row, int col, int fontsize) {\n \tLabel label1 = new Label(title);\n \tlabel1.setFont(Font.font(myResources.getString(\"font\"), \n \t\t\tFontWeight.EXTRA_BOLD, FontPosture.ITALIC, fontsize));\n \tlabel1.setTextFill(Color.RED);\n \tstartScreen.add(label1, row, col);\n }",
"void setTitle(java.lang.String title);",
"public void createLabels()\n {\n title = new JLabel(\"Game Over\");\n title.setForeground(Color.RED);\n title.setFont(new Font(title.getFont().getName(), Font.PLAIN, 42));\n title.setAlignmentX(Component.CENTER_ALIGNMENT);\n\n roundLabel = new JLabel(\"CPU was infected on round \"+roundLost);\n roundLabel.setForeground(Color.RED);\n roundLabel.setFont(new Font(title.getFont().getName(), Font.PLAIN, 18));\n roundLabel.setAlignmentX(Component.CENTER_ALIGNMENT);\n }",
"public void setTitle(java.lang.String title);",
"protected static JLabel generateTitle(String titleString) {\n JLabel title = new JLabel(titleString);\n title.setBorder(BorderFactory.createEmptyBorder(25, 0, 10, 0));\n title.setAlignmentX(Component.CENTER_ALIGNMENT);\n title.setFont(new Font(\"Arial\", Font.PLAIN, 30));\n return title;\n }",
"public void setTitle(String title) {\r\n this.title = title;\r\n impl.setTitle(getElement(),legend, title);\r\n }",
"@Override\n\tprotected void initTitle() {\n\t\tsetTitleContent(R.string.tocash);\n\t\tsetBtnBack();\n\t}",
"void setTitle(String title);",
"void setTitle(String title);",
"void setTitle(String title);",
"void setTitle(String title);",
"void setTitle(String title);",
"public void setTitle(String title);",
"public void setTitle(String title);",
"public void setTitle(String title);",
"public void titleImage(){\r\n\t\tint x = 75;\r\n\t\tint y = 100;\r\n\t\t//Title is displayed\r\n\t\tString title = \"Ticket Master\";\r\n\t\ttitleImage = new GLabel(title,x,y);\r\n\t\ttitleImage.setColor(Color.green);\r\n\t\ttitleImage.setFont(\"Arial-100\");\r\n\t\tcanvas.add(titleImage);\r\n\t}",
"public void Title ()\n {\n\tTitle = new Panel ();\n\tTitle.setBackground (Color.white);\n\tchessboard (Title);\n\tp_screen.add (\"1\", Title);\n }",
"public void setTitle(String title) { this.title = title; }",
"public void setTitle(String strTitle) { m_strTitle = strTitle; }",
"private void setTitle(java.lang.String title) {\n System.out.println(\"setting title \"+title);\n this.title = title;\n }",
"public static void initLabel(JLabel jlabel, String text, JPanel panel) {\n jlabel = new JLabel(text);\n panel.add(jlabel);\n }",
"public void makeTitle(JPanel upperPanel) {\n JLabel mainTitleLabel = new JLabel(\" Courses\");\n mainTitleLabel.setIcon(createImageIcon(\"./images/coursesIconWhite.png\"));\n mainTitleLabel.setFont(new Font(\"Proxima Nova\", Font.BOLD, 30));\n mainTitleLabel.setForeground(Color.white);\n mainTitleLabel.setBorder(new EmptyBorder(70, 70, 70, 0));\n upperPanel.add(mainTitleLabel, BorderLayout.CENTER);\n }",
"public void setTitle(String titleTemplate);",
"public void setTitle( String title )\n {\n _strTitle = title;\n }",
"private void initialize() {\r\n\t\tjLabel = new JLabel();\r\n\t\tsuper.setName(aplicacion.getI18nString(\"SelectSheetLayerPrintPanel.Name\"));\r\n\t\tjava.awt.GridBagConstraints gridBagConstraints1 = new GridBagConstraints();\r\n\t\tjava.awt.GridBagConstraints gridBagConstraints2 = new GridBagConstraints();\r\n\t\tthis.setLayout(new GridBagLayout());\r\n\t\tthis.setSize(365, 274);\r\n\t\tgridBagConstraints1.gridx = 0;\r\n\t\tgridBagConstraints1.gridy = 0;\r\n\t\tgridBagConstraints1.anchor = java.awt.GridBagConstraints.EAST;\r\n\t\tgridBagConstraints1.insets = new java.awt.Insets(0,34,0,0);\r\n\t\tgridBagConstraints2.gridwidth = 2;\r\n\t\tgridBagConstraints2.insets = new java.awt.Insets(0,0,0,40);\r\n\t\tthis.add(jLabel, gridBagConstraints1);\r\n\t\tthis.add(getJComboBox(), gridBagConstraints2);\r\n\t\tjLabel.setText(aplicacion.getI18nString(\"cbSheetLayer\")+\": \");\r\n\t\tgridBagConstraints2.gridx = 1;\r\n\t\tgridBagConstraints2.gridy = 0;\r\n\t\tgridBagConstraints2.weightx = 1.0;\r\n\t\tgridBagConstraints2.fill = java.awt.GridBagConstraints.HORIZONTAL;\r\n \r\n\t}",
"@Override\r\n\t\tpublic void setTitle(String title)\r\n\t\t\t{\n\t\t\t\t\r\n\t\t\t}",
"public void setTitle(Title title) {\r\n this.title = title;\r\n }",
"public void setTitle(String title){\n \tthis.title = title;\n }",
"public void setTitle(String title) {\n\t\tborder.setTitle(title);\n\t}",
"private void _initLabels() \n {\n _lblName = _createNewLabel( \"Mother Teres@ Practice Management System\");\n _lblVersion = _createNewLabel(\"Version 1.0.1 (Beta)\");\n _lblAuthor = _createNewLabel( \"Company: Valkyrie Systems\" );\n _lblRealAuthor = _createNewLabel( \"Author: Hein Badenhorst\" );\n _lblDate = _createNewLabel( \"Build Date:\" );\n _lblRealDate = _createNewLabel( \"31 October 2010\");\n }",
"private void setWindowTitle(String title) {\n this.title = title;\n }",
"public void setLabel(JLabel label) {\n\t\tswitch (label.getName()) {\t\t\t// the three labels are named via label.setName(labelName)\n\t\tcase \"title\": \t\ttitleLabel = label; break;\n\t\tcase \"artist(s)\": \tartistLabel = label; break;\n\t\tcase \"album\": \t\talbumLabel = label; break;\n\t\t}\n\t}",
"public void setTitle(String title) {\r\n\tthis.title = title;\r\n }",
"public void init() {\r\n\r\n\t\tJLabel lbl = new JLabel(\"Hello World\");\r\n\t\tadd(lbl);\r\n\r\n\t}",
"public void setTitle(String title) {\r\n this.title = title;\r\n }",
"public void setTitle(String title) {\r\n this.title = title;\r\n }",
"public void setTitle(String title) {\r\n this.title = title;\r\n }",
"public void setTitle(String title) {\r\n this.title = title;\r\n }",
"public void setTitle(String title)\n {\n this.title = title;\n }",
"public void setTitle(String title)\n {\n this.title = title;\n }",
"public void setTitle(String title)\n {\n this.title = title;\n }",
"public void setLeftTitle(String title);",
"public void setTitle(String title) {\n\tthis.title = title;\n}",
"private HorizontalLayout buildGridTitle() {\n\t\tgridTitle = new HorizontalLayout();\r\n\t\tgridTitle.setImmediate(false);\r\n\t\tgridTitle.setWidth(\"-1px\");\r\n\t\tgridTitle.setHeight(\"100.0%\");\r\n\t\tgridTitle.setMargin(false);\r\n\t\tgridTitle.setSpacing(true);\r\n\t\t\r\n\t\t// labelTitle\r\n\t\tlabelTitle = new Label();\r\n\t\tlabelTitle.setImmediate(false);\r\n\t\tlabelTitle.setWidth(\"-1px\");\r\n\t\tlabelTitle.setHeight(\"-1px\");\r\n\t\tlabelTitle.setValue(\"<h3>Título del libro</h3>\");\r\n\t\tlabelTitle.setContentMode(3);\r\n\t\tgridTitle.addComponent(labelTitle);\r\n\t\tgridTitle.setComponentAlignment(labelTitle, new Alignment(48));\r\n\t\t\r\n\t\t// labelEdition\r\n\t\tlabelEdition = new Label();\r\n\t\tlabelEdition.setImmediate(false);\r\n\t\tlabelEdition.setWidth(\"-1px\");\r\n\t\tlabelEdition.setHeight(\"-1px\");\r\n\t\tlabelEdition.setValue(\"Label\");\r\n\t\tgridTitle.addComponent(labelEdition);\r\n\t\tgridTitle.setComponentAlignment(labelEdition, new Alignment(33));\r\n\t\t\r\n\t\treturn gridTitle;\r\n\t}",
"@Override\r\n public void setTitle(String title) {\r\n this.title = title;\r\n gaugeName.setText(title);\r\n gauge.setTitle(title);\r\n }",
"public void setTitle(String title){\n this.title = title;\n }",
"public void setPollTitle(String title){\n this.pollTitle = title;\n TextView textView = (TextView)findViewById(R.id.poll_object_poll_title);\n textView.setText(this.pollTitle);\n }",
"protected void setTitle(String title) {\n this.title = title;\n }",
"@Override\n\tpublic void setTitle(String title) {\n\t\t\n\t}",
"public void setTitle(String title) {\r\n _title = title;\r\n }",
"public void setTitle(String title) {\r\n\t\tthis.title = title;\r\n\t}",
"public void setTitle(String title) {\r\n\t\tthis.title = title;\r\n\t}",
"public void setTitle(String title) {\r\n\t\tthis.title = title;\r\n\t}",
"public void setTitle(String title) {\r\n\t\tthis.title = title;\r\n\t}",
"public void setTitle(String title) {\r\n\t\tthis.title = title;\r\n\t}",
"public void setTitle(String title) {\n this.title = title;\n }",
"public void setTitle(String title) {\n this.title = title;\n }",
"public void setTitle(String title) {\n this.title = title;\n }",
"public void setTitle(String title) {\n this.title = title;\n }",
"public void setTitle(String title) {\n this.title = title;\n }",
"public void setTitle(String title) {\n this.title = title;\n }",
"public void setTitle(String title) {\n this.title = title;\n }",
"public void setTitle(String title) {\n this.title = title;\n }",
"public void setTitle(String title) {\n this.title = title;\n }",
"public void setTitle(String title) {\n this.title = title;\n }",
"public void setTitle(String title) {\n this.title = title;\n }",
"public void setTitle(String title) {\n this.title = title;\n }",
"public void setTitle(String title) {\n this.title = title;\n }",
"public void setTitle(String title) {\n this.title = title;\n }",
"public void setTitle(String title) {\n this.title = title;\n }",
"public void setTitle(String title) {\n this.title = title;\n }",
"public void setTitle(String title) {\n this.title = title;\n }",
"public void setTitle(String title) {\n this.title = title;\n }",
"public void setTitle(String title) {\n this.title = title;\n }",
"public void setTitle(String title) {\n this.title = title;\n }",
"public void setTitle(String title) {\n this.title = title;\n }",
"public void setTitle(String title) {\n this.title = title;\n }",
"public void setTitle(String title) {\n this.title = title;\n }",
"public void setTitle(java.lang.String title)\n {\n this.title = title;\n }",
"public void setTitle(String title){\n\t\tthis.title = title;\n\t}"
] | [
"0.79071593",
"0.74523896",
"0.738232",
"0.731225",
"0.71425194",
"0.71271724",
"0.70821434",
"0.7064416",
"0.7056218",
"0.6930188",
"0.6827571",
"0.67802083",
"0.67602986",
"0.6752829",
"0.6747383",
"0.67302924",
"0.671321",
"0.6708483",
"0.6677699",
"0.66203046",
"0.66184753",
"0.66036606",
"0.657497",
"0.65310854",
"0.6528802",
"0.652556",
"0.65140164",
"0.64947957",
"0.64947957",
"0.64947957",
"0.64947957",
"0.64947957",
"0.6488291",
"0.6488291",
"0.6488291",
"0.64869237",
"0.6466041",
"0.64523417",
"0.64458835",
"0.6443765",
"0.64430964",
"0.642948",
"0.6425316",
"0.64205426",
"0.640445",
"0.63857883",
"0.6382489",
"0.6360907",
"0.6356091",
"0.63474613",
"0.63282245",
"0.63274425",
"0.63222426",
"0.6317882",
"0.63148963",
"0.63148963",
"0.6311389",
"0.6311389",
"0.629753",
"0.629753",
"0.629753",
"0.62926435",
"0.62863964",
"0.62825954",
"0.62747705",
"0.62727004",
"0.62651235",
"0.62523526",
"0.62426865",
"0.62363964",
"0.6230647",
"0.6230647",
"0.6230647",
"0.6230647",
"0.6230647",
"0.6220393",
"0.6220393",
"0.6220393",
"0.6220393",
"0.6220393",
"0.6220393",
"0.6220393",
"0.6220393",
"0.6220393",
"0.6220393",
"0.6220393",
"0.6220393",
"0.6220393",
"0.6220393",
"0.6220393",
"0.6220393",
"0.6220393",
"0.6220393",
"0.6219677",
"0.6219677",
"0.6219677",
"0.6219677",
"0.62154967",
"0.6212442",
"0.6211462"
] | 0.6564276 | 23 |
1 2 3 4 5 6 | private static TreeNode getNode() {
TreeNode treeNode = new TreeNode(1);
TreeNode left = new TreeNode(2);
TreeNode right = new TreeNode(3);
treeNode.left = left;
treeNode.right = right;
left.left = new TreeNode(4);
right.left = new TreeNode(5);
right.right = new TreeNode(6);
return treeNode;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int getBlockNumbers(int index);",
"int getBlockNums(int index);",
"int getBlockNums(int index);",
"public static void main(String[] args) {\n int[] array = new int[6];\n array[0] = 33;\n int[] arr = { 2, 3, 5, 7 };\n \n //1 2,5 4,7\n for (int i = 0; i < arr.length; i++) {\n // for ctrl space to bring for loop\n //3,6\n System.out.println(arr[i]);\n\t}\n\n}",
"@Test\n void first() {\n int[] answers = {1,2,3,4,5,1,2,3,4,5};\n int[] first = {1,2,3,4,5};\n int collect = 0;\n for (int i=0; i < answers.length ; i++) {\n if (answers[i] == first[i % 5]) {\n //0 0\n //1 1\n //2 2\n //3 3\n //4 4\n //5 0\n //6 1\n //7 2\n collect++;\n }\n }\n assertThat(collect).isEqualTo(10);\n }",
"public static void main(String[] args) {\n\t\t\n\t\t int a[]= {1,2,3,4,6};\n\t int sum = 0;\n\t for(int i =0; i<a.length; i++){\n System.out.println(sum);\n\t sum = sum + a[i];\n\t int sum1= 0;\n\t for(int j=1; j<=6; j++) {\n\t \t\n\t }\n\t \n\t }\n\t\t\n\n\t}",
"public void multiplesOfFive()\n {\n int index = 10;\n int max = 95;\n\n while (index <= 95) {\n System.out.println(index);\n index += 5;\n }\n }",
"public static void main(String[] args) {\n\r\n for (int x = 1; x < 10; x++) {// x=1\r\n\r\n for (int h = 1; h < 10; h++) { // h=1+1+1...8+1\r\n\r\n System.out.println(x + \"*\" + h \"=\" +x*h);// 1-2-3....8-9\r\n\r\n if(h==2){\r\n break;\r\n }\r\n }\r\n\r\n if(x==4){\r\n continue;\r\n }\r\n\r\n }\r\n\r\n }",
"@Test\n public void testRangeMultipleIterations() {\n final int start = 1;\n final int max = 7;\n final int step = 2;\n\n final List<Integer> seq = new ArrayList<>();\n final IntegerSequence.Range r = IntegerSequence.range(start, max, step);\n\n final int numTimes = 3;\n for (int n = 0; n < numTimes; n++) {\n seq.clear();\n for (Integer i : r) {\n seq.add(i);\n }\n Assert.assertEquals(4, seq.size());\n Assert.assertEquals(seq.size(), r.size());\n }\n }",
"public static void main(String[] args) {\n int[] arr = new int[] {2,3,1,4,6};\n partition(arr, 0, arr.length - 1);\n for(int i : quickselect(arr, 0, arr.length - 1)) {\n System.out.print(i);\n }\n }",
"public static void main(String[] args) {\n\t\tint []a = {1,2,3,4,5,6};\n\t\tint i = a.length - 1;\n\t\t\n\t\twhile(i>=0) {\n\t\t\tSystem.out.println(a[i]); //continous loop of 6\n\t\t\ti--; //ye loop ko break krega from 6 to 1\n\t\t}\n\n\t}",
"public static void main(String[] args) {\n\t\tint i=0;\r\n\t\tint j=0;\r\n\t\tint cnt=0;\r\n\t\t\r\n while(true) {//무한 반복\r\n i=(int)(Math.random()*6)+1;//첫번째 주사위 1<=i<=6\r\n j=(int)(Math.random()*6)+1;//두번째 주사위 1<=j<=6\r\n if(i+j==5) break;//무한 반복을 빠져나가는 조건\r\n cnt++;\r\n }\r\n \r\n System.out.println(\"(\"+i+\",\"+j+\")\");\r\n\t System.out.println(\"총반복횟수:\"+cnt);\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\n int[] nums={5, 6, 2};\n System.out.println(groupSum6(0, nums, 8));\n }",
"public static void main(String[] args) \r\n\t{\n\t\tfor (int a=0; (a%6)<6;a++)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(a);\r\n\t\t\t}\r\n\t\t}",
"public static void main(String[] args) {\n\r\n\t\tint[] a = {23,12,45,98,54};\r\n\t\t\r\n\t\tint [] result = new int [6]; //{54,98,45,12,23}\r\n\t\t\r\n\t\tint [] b = new int[6];\r\n\t\r\n\t\t\r\n\t\tfor(int i =0; i<a.length; i++) {\r\n\t\t\tresult[5 - i] = a[i];\r\n\t\t}\r\n\t\tfor(int i : result) {\r\n\t\t\tSystem.out.println(i);\r\n\t\t}\r\n\t\t\r\n\t\t//a 배열과 b배열의 값은 index 해당하는 값을 더하고 그 결과가 3의 배수이면 result 의 \r\n\t\t//해당 index에 값을 5배 하여 저장하고 그렇지 않은 index에는 10을 저장함 \r\n\t\t\r\n\t\tfor (int i=0; i<6; i++) {\r\n\t\t\tif((a[i] + b[i])%3 ==0)\r\n\t\t\t{\r\n\t\t\t\tresult[i] = a[i] + b[i]*5;\r\n\t\t\t}\r\n\t\t\telse result[i] = 10;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}",
"public static void pattern6(int input){\n\t\tint counter=1;\n\t\tfor(int i=1;i<=input;i++){\n\t\t\tfor(int j=counter;j<=(i*(i+1)/2);j++){\n\t\t\t\tSystem.out.print(counter++ + \" \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"public static void main(String[] args) {\n\t\tint a[] = {2,5,4,3,6,7};\r\n\t\tint sum = 0;\r\n\t\tint b;\r\n\t\tfor(int i=0; i < a.length; i++) // Gonna loop 5 times\r\n\t\t{\r\n\t\t\t//System.out.println(a[i]);\r\n\t\t sum = sum + a[i];\r\n\t\t System.out.println(a[i]);\r\n\t\t if (a[i] == 6)\r\n\t\t {\r\n\t\t\t //System.out.println(i);\r\n\t\t\t // break;\r\n\t\t }\r\n\t\t //System.out.println(sum);\r\n\t\t}\r\n\t\t\r\n\t\t//System.out.println(sum);\r\n\r\n\t}",
"public static void main(String[] args) {\n\t\tint value = 1;\n\t\t int count = 7;\n\t\t\tint curr = 0;\n\t\t\t int prev = 0;\n\t\t\tint num = 0;\n\t\twhile (value <= count)\n\t\t{\n\t\t\tnum = curr + prev;\n\t\t\tSystem.out.print(num);\t\n\t\t\t\tvalue++;\n\t\t\t\tif (value == 2)\n\t\t\t\t{\n\t\t\t\t\tprev = num;\n\t\t\t\t\tcurr = 1;\n\t\t\t\t}\n\t\t\t\t\t\tprev = curr;\n\t\t\t\t\t\tcurr = num;\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}\n\n\t}",
"public int getIteration();",
"public static void main(String[] args) {\n\t\tint[] num = {1,1,5};\r\n\t\tnextPermutation(num);\r\n\t\tfor(int n : num)\r\n\t\t\tSystem.out.print(n + \" \");\r\n\t}",
"public static void main(String[] args) {\nint a1=0;\r\nint a2=1;\r\nint a3=a1+a2;\r\nfor(int row=1;row<=5;row++)\r\n{\r\n\tfor(int col=1;col<row;col++)\r\n\t{\r\n\t\tSystem.out.print(a3+\" \");\r\n\t\ta3=a1+a2;\t//0+1=1\t\t1+1=2 \r\n\t\ta1=a2;\t\t//0=1 1=1\t2=2\r\n\t\ta2=a3;\t\t//1=1 1=1\t1=1\r\n\t}\r\n\tSystem.out.println();\r\n}\r\n\t\r\n}",
"public static void main(String[] args) {\n\t\t\r\n\t\tint i, x=4,w=9,q;\r\n\t\tfor(i=-1;i<20;i+=3) {\r\n\t\t\tx++;\r\n\t\t\tfor(q=4;q<11;q++) {\r\n\t\t\t\tdo {\r\n\t\t\t\t\ti=+3;\r\n\t\t\t\t\tw=sizeof(i);\r\n\t\t\t\t\ti=x+w;\r\n\t\t\t\t\tx=w+i;\r\n\t\t\t\t\t\t\r\n\t\t\t\t} while (x<15);\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"x:\"+x+\"i:\"+i);\r\n\r\n\t}",
"int[] getGivenByOrder();",
"public static void main(String[] args) {\n\t\t\r\n\t\tint no1=0,no2=1,no3;\r\n\t\tfor(int i=0;i<=6;i++)\r\n\t\t{\r\n\t\t\tno3=no1+no2;\r\n\t\t\tno1=no2;\r\n\t\t\tno2=no3;\r\n\t\t\t\r\n\t\t\tSystem.out.println(no3);\r\n\t\t}\r\n\r\n\t}",
"public static void number_invsert(){\n for(int i=7; i > 0 ; i--){\n for(int j =1;j<=i;j++){\n System.out.print(j);\n }\n System.out.println();\n } \n }",
"public static void findFirstMultipleOfSixViaStreams(List<Integer> numbers){\n\n int abc = 9;\n numbers.stream().filter(x -> {\n System.out.println(\"x = \" + x);\n return x % 6 == 0;\n }).map(x -> x + abc).findFirst();\n// Optional<Integer> firstSixMultiple = numbers.stream()\n// .filter(x -> {\n// System.out.println(\"x = \" + x);\n// return x % 6 == 0;\n// })\n// .findFirst();\n\n// int ans = firstSixMultiple.orElse(-1);\n\n// System.out.println(ans);\n }",
"public static void main(String[] args) {\n\t\tint[] nums = {1, 6, 4}; \n\t\tSystem.out.println(array6(nums, 0)+\"\");\n\t}",
"private static void test4() {\n int[] numbers = {4, 5, 1, 6, 2, 7, 2, 8};\n int[] expected = {1, 2};\n\n test(\"Test4\", numbers, expected);\n }",
"void runTime1() {\n\t\tint[]numList= {45,78,99};\n\t\tSystem.out.println(numList[5]);\n\t}",
"public void Series() {\n\t\tint n=8,i=1,k=2,count=0;\n\t\tSystem.out.print(n+\" \");\n\t\twhile (count<5) {\n\t\t\tn=n*i;//12\n\t\t\tn=n-k;//9\n\t\t\tSystem.out.print(n+\" \");//9\n\t\t\ti++;\n\t\t\tk++;\n\t\t\tcount++;\n\t\t}\n\t\t/*System.out.println(n);//8\n\t\tn=n*1;//8\n\t\tn=n-2;//6\n\t\t\n\t\tSystem.out.println(n);//6\n\t\tn=n*2;//12\n\t\tn=n-3;//9\n\t\tSystem.out.println(n);//9\n\t\tn=n*3;//27\n\t\tn=n-4;//23\n\t\tSystem.out.println(n);\n\t\tn=n*4;//12\n\t\tn=n-5;*/\n\t\t\n\t\t/*System.out.println(n);\n\t\tn=n*5;//12\n\t\tn=n-6;\n\t\tSystem.out.println(n);*/\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\r\n\t\tint[] x = {1,2,2};\r\n\t\tint[] y = {1, 2, 1,2};\r\n\t\tint[] a = {2,1,2};\r\n\t\tint[] b = {2,2,1,2};\r\n\t\t\r\n\t\tSystem.out.println(nextToTwo(x));\r\n\t\tSystem.out.println(nextToTwo(y));\r\n\t\tSystem.out.println(nextToTwo(a));\r\n\t\tSystem.out.println(nextToTwo(b));\t\t\r\n\r\n\t}",
"public static void main(String[] args) {\n\t\tint num=5;\r\n\t\tint c=num*2-1;//5\r\n\t\tfor(int j=0 ; j< c ; j++){//j: 0, 1, 2,3 4\r\n\t\t\t\r\n\t\t\tif(j<num) {///j: 0, 1, 2\r\n\t\t\t\t// 1 ,2,3 : 0+1, 1+1, 2+1\r\n\t\t\t\tfor(int i=0; i<j+1 ; i++) {\r\n\t\t\t\t\tSystem.out.print(\"* \");\r\n\t\t\t\t}\r\n\t\t\t}else {//j: 3,4\r\n\t\t\t\t//2,1 : 5-3, 5-4\r\n\t\t\t\tfor(int i=0; i<c-j ; i++) {\r\n\t\t\t\t\tSystem.out.print(\"* \");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\r\n\t}",
"public static void main(String...args){\n\t\tIntStream.rangeClosed(2, 5).forEach(x -> System.out.println(x));\n\t\tSystem.out.println(IntStream.rangeClosed(2, 5).forEach(x -> System.out.println(x)));\n\t}",
"@Test\n public void test1And2And6() {\n int[] numbers = {1, 2, 6};\n assertTrue(obj.firstLast6(numbers));\n }",
"public static void main(String[] args) {\n\t\tint a=4;\r\n\t\tint b=16;\r\n\t\tfor (int i=1; i<5; i++){\r\n\t\t\tfor (int j=b; j>=a; j=j-4){\r\n\t\t\t\tSystem.out.print(j);\r\n\t\t\t\tSystem.out.print(\"\\t\");\r\n\t\t\t}\r\n\t\t\tb--;\r\n\t\t\ta--;\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}",
"private int elementNC(int i) {\n return first + i * stride;\n }",
"abstract int[] crossOver();",
"public static void main(String[] args) {\r\n\t\tint numRows = 15;\r\n\t\tfor(List<Integer> list : generate(numRows)){\r\n\t\t\tfor( Integer i : list ){\r\n\t\t\t\tSystem.out.print(i + \" \");\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}",
"int stepsToGo();",
"public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n ArrayList<ArrayList<Integer>> rows = new ArrayList<>();\n\n for (int i = 0; i < n; i++) {\n int r = scan.nextInt();\n ArrayList<Integer> row = new ArrayList<>();\n\n for (int j = 0; j < r; j++) {\n row.add(scan.nextInt());\n }\n rows.add(row);\n }\n\n int q = scan.nextInt();\n for (int k = 0; k < q; k++) {\n int x = scan.nextInt();\n int y = scan.nextInt();\n\n try {\n System.out.println(rows.get(x - 1).get(y - 1));\n } catch (IndexOutOfBoundsException e) {\n System.out.println(\"ERROR!\");\n }\n }\n }",
"public static void main(String[] args) {\r\n\t\t\r\n\t\tfor(int i = 1;i<= 7; i++)\r\n\t\t{\r\n\t\t\tfor(int j = 1;j<= i;j++)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.print(j+\" \");\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\tfor(int i = 6; i>=1; i--)\r\n\t\t{\r\n\t\t\tfor(int j = 1;j<=i; j++)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.print(j+\" \");\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\n\t\tint c = 7;\r\n\t\tfor(int i=1;i<=4;i++)\r\n\t\t{\r\n\t\t\tfor(int j=0;j<i;j++)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.print(c+\" \");\r\n\t\t\t\tc++;\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\r\n\t}",
"public int length() { return 1+maxidx; }",
"public static void main(String[] args) {\n Scanner scn = new Scanner(System.in);\n\t\tint n = new.nextInt();\n\t\tint v1=1,v2=0,v3=0;\n\t\tfor(int a=n;a>=1;a--){\n\t\t\tv3=v2+v1;\n\t\t\tSystem.out.print(v3+\"\\t\");\n\t\t\tv1=v2;\n\t\t\tv2=v3;\n\t\t}\n\t}",
"public void processingTotal(int i);",
"public static void main(String[] args) {\n\t\tint arr[] = {4,3,6,1,7,2};\r\n\t\tquick(arr,0,arr.length-1);\r\n\t\tfor(int i :arr){\r\n\t\t\tSystem.out.print(i+\" \");\r\n\t\t}\r\n\t}",
"public static void main(String[] args) {\n\t\tint a[]= {8,4,1,5,9,2};\r\n\t\tint n=6;\r\n\t\tfor(int i=1;i<n;i++)\r\n\t\t{\r\n\t\t\tint temp=a[i];\r\n\t\t\tint j=i-1;\r\n\t\t\twhile(j>=0 && a[j]>temp)\r\n\t\t\t{\r\n\t\t\t\ta[j+1]=a[j];\r\n\t\t\t\tj--;\r\n\t\t\t}\r\n\t\t\ta[j+1]=temp;\r\n\t\t}\r\n\t\t\r\n\t\tfor(int i=0;i<n;i++)\r\n\t\t{\r\n\t\t\tSystem.out.print(a[i]+\" \");\r\n\t\t}\r\n\r\n\t}",
"public int numRows(){ return numRows;}",
"public static void pattern7(int input){\n\t\tfor(int i=1;i<=input;i++){\n\t\t\tfor(int j=1;j<=i;j++){\n\t\t\t\tSystem.out.print(j+\" \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"public static void main(String[] args) {\n int N = 100, i, j, min;\n System.out.println(\"Value of N: \" + N);\n\n for (i = 1; i <= N; i++)\n {\n for (j = 1; j <= N; j++)\n {\n min = i < j ? i : j;\n System.out.print(N - min + 1);\n }\n System.out.println();\n\n\n\n\n }\n}",
"private int h1(int p){\n\t\t return p % table.length;\n\t}",
"public static void main(String[] args) {\n \r\n\t\tlove6(6,4);\r\n\t\tlove6(4,5);\r\n\t\tlove6(12,6);\r\n\t\tlove6(1,5);\r\n\t\t\r\n\t}",
"private static List<Integer> nextInt() {\n\t\tRandom rnd = new Random();\n\t\tList<Integer> l = new ArrayList<Integer>();\n\t\tfor (;;) {\n\t\t\tfinal int r = rnd.nextInt(5);\n\t\t\tif (!l.contains(r)) {\n\t\t\t\tl.add(r);\n\t\t\t}\n\t\t\tif (l.size() == 5)\n\t\t\t\treturn l;\n\t\t}\n\t}",
"public int size(){return n;}",
"public static void main(String[] args){\n\n for(int n = 2; n < 102; n+=2)System.out.printf(\"%d\\n\",n);\n \n \n }",
"int getTotalElements();",
"public static void main(String args[]){\n int int2DArr[][] = new int[4][5];\n int k=0;\n for (int i=0;i<4;i++) {\n for (int j=0;j<5;j++){\n int2DArr[i][j] = k++;\n }\n }\n for (int i=0;i<4;i++) {\n for (int j=0;j<5;j++){\n System.out.print(int2DArr[i][j] + \" \");\n }\n System.out.println();\n }\n }",
"public static void main(String[] args) \n\t{\n\t\t int i=20, j=40;\n\t\t int k=0;\n\t\t ArrayList<Integer> l1=new ArrayList<Integer>();\n\t\t ArrayList<Integer> l2=new ArrayList<Integer>();\n\t\t for(int a=i;a<=j;a++){\n\t\t int count=0;\n\t\t for(int b=2;b<a;b++)\n\t\t if(a%b==0)\n\t\t count++;\n\t\t if(count==0)\n\t\t l1.add(a); }\n\t\t for(int e=i;e<=j;e++)\n\t\t l2.add(e);\n\t\t l2.removeAll(l1);\n\t\t for(int d=0;d<l2.size();d++)\n\t\t k=k+l2.get(d);\n\t\t \n\t\tSystem.out.println(k);\n\t}",
"public static void m7() {\r\n\tchar ch ='A';\r\n\tfor(int i=1;i<=5;i++) {\r\n\t\tfor(int j =1;j<=i;j++)\r\n\t\t{\r\n\t\t\tSystem.out.print(ch);\r\n\t\t}\r\n\t\tch++;\r\n\t\tSystem.out.println();\r\n\t}\r\n}",
"public static void main(String[] args) {\n\r\n\t\tfor(int i = 1; i <= 6; i++) {\r\n\t\t\tSystem.out.print(\"*\");\r\n\t\t}\r\n\t\tSystem.out.println(\"\\n\");\r\n\t\t\r\n\t\t\r\n\t\tfor(int j = 1; j <= 4; j++) {\r\n\t\t\tfor(int i = 1; i <= 6; i++) {\r\n\t\t\t\tSystem.out.print('*');\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\t/*\t\t\t\tj(行号)\t\tk(*的个数)\r\n\t\t*\t\t\t\t1\t\t\t1\r\n\t\t**\t\t\t\t2\t\t\t2\r\n\t\t***\t\t\t\t3\t\t\t3\r\n\t\t****\t\t\t4\t\t\t4\r\n\t\t*****\t\t\t5\t\t\t5\r\n\t\t*/\r\n\t\t\r\n\t\tfor (int j = 1; j <= 5;j++) {//控制行数\r\n\t\t\tfor(int k = 1; k <= j; k++) {//控制列数\r\n\t\t\t\tSystem.out.print(\"*\");\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\t/*\t\t\t\tj(行号)\t\tk(*的个数)\t规律:j + k = 5 换句话说:k = 5 - j;\r\n\t\t****\t\t\t1\t\t\t4\r\n\t\t***\t\t\t\t2\t\t\t3\r\n\t\t**\t\t\t\t3\t\t\t2\r\n\t\t*\t\t\t\t4\t\t\t1\r\n\t\t*/\r\n\t\t\r\n\t\tfor (int j = 1; j <= 4;j++) {//控制行数\r\n\t\t\tfor(int k = 1; k <= 5 - j; k++) {//控制列数\r\n\t\t\t\tSystem.out.print(\"*\");\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\r\n\t}",
"public static void main(String[] args) {\n\t\tint first;\n\t\tint second;\n\t\tfor (first=0; first <=5; first++) {\n\t\t\tfor (second=0; second<=5;second++) {\n\t\t\t\tSystem.out.printf(\"%d%d\\t\",first,second);//is there any kind of methode u can represent with 00\n\t\t\t\t\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\n\t}",
"public static void main(String[] args) {\n\t\tint i;\n\t\tfor(i=1;i<=10;i++)// print 1 to 10\n\t\t{\n\t\t\tSystem.out.println(i);\n\t\t}\n\t\tfor(int x=10;x>=1;x--)// print 10 to 1\n\t\t{\n\t\t\tSystem.out.println(x);\n\t\t}\n\t\tfor(int z=1;z<=10;z++)// print 1 to 10 except 6\n\t\t{\n\t\t\tif(z!=6)\n\t\t\t{\n\t\t\tSystem.out.println(z);\n\t\t}\n\t}\n\n}",
"public static void main(String[] args) {\nfor(int i=0;i<5;i++)\n{\n\tSystem.out.println(i);\n}\n\t}",
"int main()\n{\n int n;\n cin >>n;\n int m = 11;\n for(int i=0; i<n; i++){\n cout << m*m << \" \";\n m += 4;\n }\n}",
"public static void main(String[] args) {\n\t\t\n\t\tint i=10;\n\t\tint j=++i;\n\t\tint g=2;\n\t\tg *= j;\n\t\t\n\t\tfor(int h=0; h<10;h++) {\n\t\t//System.out.println(i+j);\n\t\tSystem.out.println(g);\n\t\t}\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\t\n\tint num1=6;\n\tdo {\n\t\t\n\t\tSystem.out.println(num1);\n\t\tnum1++;\n\t\t\n\t}while(num1<=5);\n\t\t\n\t\t\n\t}",
"int fillCount();",
"List<Integer> getNeighbors(int x);",
"public static void main(String[] args) {\nint array[]= {13, 25, 9,56,54,89,17};\r\nint sum =0;\r\n\r\nfor (int i=0; i<=6; i++) {\r\n\tsum = sum + array[i];\r\n}\r\nSystem.out.println(\"the sume of the numbers is \" +sum);\r\n\t}",
"public static void main(String[] args) {\n\t\tint a[] = {1,2,3,4,5};\n\t\tint la = a.length;\n\t\tint b [] = {6,7,8,9,10};\n\t\tint lb = b.length;\n\t\tint c [] = new int[la+lb];\n\t\tint lc = c.length;\n\t\tint pos=la;\n\t\tfor(int i =0 ;i<la;i++)\n\t\t{\n\t\t\tc[i]=a[i];\n\t\t\t//pos=i+1;\n\t\t}\n\t\t//pos = la;\n\t\tfor(int j= 0;j<lb;j++)\n\t\t{\n\t\t\tc[pos]=b[j];\n\t\t\tpos++;\n\t\t}\n for(int k = 0;k<lc;k++)\n {\n \t System.out.println(c[k]);\n }\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\tfor(int i=1; i<=4; i++) {\n\t\t\tfor(int j=1; j<=4; j++) {\n\t\t\t\t\n\t\t\t\tSystem.out.print(j+ \" \");\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println();\n\t\t}\n\n\t\t//1, 1 2, 1 2 3\n\t\tfor(int i=1; i<=5; i++) {\n\t\t\tfor(int j=1; j<=i; j++) {\n\t\t\t\t\n\t\t\t\tSystem.out.print(j+ \" \");\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println();\n\t\t}\n\t\t\n\t\t//5, 5 4, 5 4 3.....\n\t\tfor(int i=5; i>=1; i--) {\n\t\t\tfor(int j=5; j>=i; j--) {\n\t\t\t\t\n\t\t\t\tSystem.out.print(j+ \" \");\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println();\n\t\t}\n\t\t\n\t\t//5, 4 4, 3 3 3.....\n\t\t\t\tfor(int i=5; i>=1; i--) {\n\t\t\t\t\tfor(int j=5; j>=i; j--) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tSystem.out.print(i+ \" \");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t}\n\n\n\t}",
"public static void main(String[] args) {\n BigInteger count1 = hanoiIteration(5);\r\n\r\n BigInteger count2 = hanoiIteration(64);\r\n// System.out.println(count);\r\n System.out.println(count1);\r\n System.out.println(count2);\r\n\r\n System.out.println(showStep2(5, \"A\", \"B\", \"C\"));\r\n }",
"public static void main(String[] args) {\n\n\t\t\n\t\t\n\t\tfor(int i=5; i>=1; i--) {\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t\tfor(int j=5; j>=1; j--) {\n\t\t\t\t\n\t\t\t\tSystem.out.print(j);\n\t\t\t}\n\t\t}\n\t\n\t\tfor(int i=5; i>1; i--) {\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t\tfor(int j=5; j>1; j--) {\n\t\t\t\t\n\t\t\t\tSystem.out.print(i);\n\t\t\t}\n\t\t\tSystem.out.print(i);\n\t\t}\n\t\n\t}",
"public static void show(){\n IntStream.rangeClosed(1,5)\n .forEach(System.out::println);\n }",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint total = sc.nextInt();\n\t\tint lastAns = 0;\n\t\tList<List<Integer>> list = new ArrayList();\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tlist.add(new ArrayList());\n\t\t}\n\t\tfor (int i = 0; i < total; i++) {\n\t\t\tint q = sc.nextInt();\n\t\t\tint x = sc.nextInt();\n\t\t\tint y = sc.nextInt();\n\t\t\tint seq = (x ^ lastAns) % N;\n\t\t\tList<Integer> seqList = list.get(seq);\n\t\t\t\n\t\t\tswitch (q) {\n\t\t\t\tcase 1:\n\t\t\t\t\tseqList.add(y);\n\t\t\t\t\tlist.set(seq, seqList);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tlastAns = seqList.get(y % seqList.size());\n\t\t\t\t\tSystem.out.println(lastAns);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t}",
"public static void main(String[] args)\n {\n int[][] ints;\n int[][] ints1;\n\n\n\n\n ints = new int[][]{\n {1, 2, 3, 4, 5, 6, 7, 8, 9},\n {10, 11, 12, 13, 14, 15, 16, 17, 18},\n {19, 20, 21, 22, 23, 24, 25, 26, 27},\n {28, 29, 30, 31, 32, 33, 34, 35, 36},\n {37, 38, 39, 40, 41, 42, 43, 44, 45},\n {46, 47, 48, 49, 50, 51, 52, 53, 54},\n {55, 56, 57, 58, 59, 60, 61, 62, 63},\n {64, 65, 66, 67, 68, 69, 70, 0, 71},\n {73, 74, 75, 76, 77, 78, 79, 80, 72}\n };\n\n ints = new int[][]{\n {1,0},\n {2,3},\n };\n ints1 = new int[][]{\n {1, 2, 3},\n {4, 5, 6},\n {7, 0, 8}\n };\n\n ints1 = new int[][]{\n {1, 2, 3},\n {4, 8, 5},\n {7, 0, 6}\n };\n ints = new int[][]{\n {5, 0, 4},\n {2, 3, 8},\n {7,1,6}\n };\n ints1 = new int[][]{\n {1, 6, 4},\n {7, 0, 8},\n {2, 3, 5}\n };\n\n ints1 = new int[][]{\n {6, 0, 5},\n {8, 7, 4},\n {3, 2, 1}\n };\n ints1 = new int[][]{\n {11, 0, 4, 7},\n {2, 15, 1, 8},\n {5, 14, 9, 3},\n {13, 6, 12, 10 }\n };\n\n\n ints1 = new int[][]{\n {14, 13, 5, 3},\n {0, 1, 8, 12},\n {6, 2, 4, 10},\n {11, 9, 15, 7 }\n };\n\n ints1 = new int[][]{\n {8, 4, 7},\n {1,5,6},\n {3,2,0}\n };\n\n\n ints1 = new int[][]{\n {8, 4, 7},\n {1,5,6},\n {3,2,0}\n };\n\n\n ints = new int[][]{\n {1, 2, 3},\n {4, 6,5},\n {7, 8,0}\n };\n ints1 = new int[][]{\n {8, 4, 7},\n {1,5,6},\n {3,2,0}\n };\n ints = new int[][]{\n {1,0},\n {2,3},\n };\n System.out.println(System.currentTimeMillis());\n Board board = new Board(ints);\n Solver solution = new Solver(board);\n\n for (Board el :solution.solution())\n {\n System.out.println(el);\n }\n System.out.println(System.currentTimeMillis());\n\n\n }",
"int getRange();",
"int getRows();",
"int getRows();",
"int getN();",
"int getRequestedValues(int index);",
"int toIndex(int x, int y);",
"@Test\n public void testGetInversions5by5() {\n int inversions = board5by5.getInversions();\n assertEquals(62, inversions);\n }",
"int main()\n{\n int n,p=0,n2=2;\n cin>>n;\n if(n>0)\n cout<<p<<\" \";\n for(int i=1;i<n;i++)\n {\n p=p+n2;\n cout<<p<<\" \";\n if(i%2==1)\n \tn2=n2+4;\n }\n \n}",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tArrayList<Integer> list = new ArrayList<>();\n\t\tint n =5;\n\t\tfor (int i = 0; i <= n; i++) {\n\t\t\tint a = sc.nextInt();\n\t\t\tlist.add(a);\n\t\t\t\n\t\t}\n\t\t\n\t\tfor (int i = 0; i <list.size(); i++) {\n\t\t\tSystem.out.print(list.get(i)+\" \");\n\t\t\t\n\t\t}\n\t\tSystem.out.println();\n\t\tfor (int i = list.size()-1; i >=0; i--) {\n\t\t\tSystem.out.print(list.get(i)+\" \");\n\t\t\t\n\t\t}\n\t\tSystem.out.println();\n\t\t\n\t\tSystem.out.println(\"E__F___L\");\n\t\tfor(int val : list) {\n\t\t\tSystem.out.print(val+\" \");\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\tint i, j;\n\n\t\tfor (i = 1; i <= 5; i++) {\n\n\t\t\tfor (j = 1; j <= i; j++) {\n\n\t\t\t\tSystem.out.print(j);\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"@Test\n public void findFirstSquareThatIsDivisibleBy5() {\n // HINT: IntStream.range(1, 100) creates a stream 1, 2, ... 99\n final int first = 0; // TODO\n\n assertEquals(25, first);\n }",
"public abstract int rows();",
"public static void main(String[] args) {\n\t\tfor(int i = 1, j = i + 10; i < 5; i++, j = i * 2) \r\n\t\t{\r\n System.out.println(\"i= \" + i + \" j= \" + j);\r\n\t\t}\r\n\t\tfor(int i=0, j=i+99; i<101; i++, j=i/2 ) {\r\n\t\t\tSystem.out.println(\"i= \" +i + \" j= \"+j);\r\n\t}\r\n\t\t\r\n\t\tint n=0;\r\n\t\twhile(n<10)\r\n\t\t{ System.out.println(n);\r\n\t\tn++;\r\n\t\t}\r\n\t\t\r\n//\t int a = 1;\r\n//\t int b = 2;\r\n//\t int c = 3;\r\n//\t \r\n//\t a += 5;\r\n//\t b *= 4;\r\n//\t c += a * b;\r\n//\t c %= 6;\r\n//\t System.out.println(\"a = \" + a);\r\n//\t System.out.println(\"b = \" + b);\r\n//\t System.out.println(\"c = \" + c);\r\n\r\n\r\n\t}",
"int order();",
"ArrayList<Integer> getStepCounterTileX();",
"public static void main(String[] args) {\n IntStream.range(0, 10)\n .forEach(System.out::print);\n\n System.out.println();\n\n // print the range of elements but skip first 5\n IntStream.range(0, 10)\n .skip(5)\n .forEach(System.out::print);\n\n // Integer stream with sum\n System.out.println(\n IntStream\n .range(0, 10)\n .sum());\n\n }",
"public static void main(String[] args) {\n\t\tint i=9;\n\t\tint j=0;\n\t\tif(i++==10&&++j==1){\n\t\t\tSystem.out.println(i);\n\t\t\tSystem.out.println(j);\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(i);\n\t\t\tSystem.out.println(j);\n\t\t}\n\t\tSystem.out.println(5<<63);\n\t}",
"public static void main(String[] args) {\n\t\tfor (int i = 1; i <= 7; i++) { //outer loop for 7 rows\n\t\t String print=\"\";\n\t\t for(int j = 1; j <= i; j++) { //inner loop\n\t\t print=print+i;\n\t\t }\n\t\t System.out.println(print);\n\t\t}\n\n\t}",
"public static void main(String[] args) {\n for(int i =0;i <=5;i++){ //i =0 , conditoon true ; i = 1; true;\n for(int j =0;j<=5;j++){ //j = 0 , true j=1; true ; j =3 ; true ;j =4 ; true ; j = 5 ; true ; j = 6\n System.out.println(\"the value of i is : \"+ i +\"The value of J is : \"+ j);\n }\n }\n }",
"public static void main(String[] args) {\n\t\tint number1 =0;\r\n\t\tint number2 =1;\r\n\t\tint number3,limit = 10;\r\n\t\t\r\n\t\tSystem.out.print(number1+\" \"+number2);\r\n\t\tint i=2;\r\n\t\tdo \r\n\t\t{\r\n\t\t\tnumber3= number1+number2;\r\n\t\t\tSystem.out.print(\" \"+number3);\r\n\t\t\tnumber1=number2;\r\n\t\t\tnumber2=number3;\r\n\t\t\ti++;\r\n\t\t}while(i<limit);\r\n\t}",
"void runTime3()throws RuntimeException{\n\t\tint[]numList= {45,78,99};\n\t\tSystem.out.println(numList[5]);\n\t}",
"public static void main(String[] args) {\n\t\tint[] a = {-1,0,0,3,3,3,0,0,0};\n\t\tint[] b = {1,2,2};\n\t\tmerge(a,6, b,3);\n\t\tfor(int i=0;i<a.length;i++) {\n\t\tSystem.out.println(a[i]);}\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\t int m= 9, n= 1,x=0 ;\n\t\t \n\t\t while (m>n) {\n\t\t\t m--;\n\t\t\t n+=2;\n\t\t\t x+=m+n;\n\t\t\t \n\t\t\t \n\t\t\t \n\t\t\t \n\t\t }\n\t\t System.out.println(x);\n\t\t \n\t\t \n\t\t \n\t\t // a) 11\n\t \t// b) 13\n //c) 23\n //d) 36\n //e) 50\n\t\t\n\n\t}",
"private void addTwoNumbers() {\n\t\t\n\t}",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n List<ArrayList<Integer>> lines = new ArrayList<>();\n for (int i = 0; i < n; i++) {\n int l = sc.nextInt();\n ArrayList<Integer> line = new ArrayList<>();\n for (int j = 0; j < l; j++) {\n line.add(sc.nextInt());\n }\n lines.add(line);\n }\n\n int k = sc.nextInt();\n for (int i = 0; i < k; i++) {\n int lineNumber = sc.nextInt();\n int elementNumber = sc.nextInt();\n\n if(lines.get(lineNumber - 1).size() >= elementNumber){\n System.out.println(lines.get(lineNumber - 1).get(elementNumber - 1));\n }else{\n System.out.println(\"ERROR!\");\n }\n }\n }"
] | [
"0.5784044",
"0.5639908",
"0.5639908",
"0.5622798",
"0.5599574",
"0.5560001",
"0.5554157",
"0.5531808",
"0.55103034",
"0.5507059",
"0.54803485",
"0.5465174",
"0.5458015",
"0.54307646",
"0.54145163",
"0.541098",
"0.5364151",
"0.5355388",
"0.535061",
"0.53505087",
"0.53338075",
"0.533036",
"0.53297323",
"0.53212464",
"0.53201354",
"0.5278337",
"0.52743524",
"0.5271356",
"0.5267339",
"0.5258749",
"0.52435166",
"0.52383345",
"0.5228368",
"0.52184325",
"0.5211349",
"0.52067465",
"0.5192081",
"0.51888794",
"0.51854044",
"0.51848793",
"0.51839894",
"0.5175996",
"0.5172578",
"0.5172251",
"0.5169735",
"0.5162055",
"0.51485056",
"0.5147513",
"0.514431",
"0.5135195",
"0.5128858",
"0.51233894",
"0.511804",
"0.5117332",
"0.51161027",
"0.51140195",
"0.51096934",
"0.51040846",
"0.5102269",
"0.51010656",
"0.5100041",
"0.509994",
"0.5096305",
"0.5092929",
"0.50916076",
"0.5090587",
"0.5089241",
"0.5084654",
"0.50840557",
"0.50825137",
"0.50777245",
"0.50768936",
"0.5073852",
"0.507332",
"0.50684476",
"0.50656223",
"0.5063681",
"0.5060727",
"0.5060727",
"0.5046607",
"0.50444853",
"0.5040835",
"0.503449",
"0.5033324",
"0.50328505",
"0.50300866",
"0.50271505",
"0.5023484",
"0.5022891",
"0.50187415",
"0.5012816",
"0.500674",
"0.50030047",
"0.49955007",
"0.49914157",
"0.4982593",
"0.4979035",
"0.49725387",
"0.496553",
"0.49631345",
"0.496079"
] | 0.0 | -1 |
connection: M person N jobs | public int match(boolean[][] connections) {
int matchCount = 0;
this.connections = connections;
M = connections.length;
N = connections[0].length;
matchx = new int[M];
matchy = new int[N];
Arrays.fill(matchx, -1);
Arrays.fill(matchy, -1);
/* For each one, check it can find a match */
for (int i = 0; i < M; i++) {
boolean[] seen = new boolean[N];
if (matchx[i] != -1 || findMatch(i, matchx, matchy, seen)) {
matchCount++;
}
}
return matchCount;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Jobs jobs();",
"public static void main(String[] args) {\n\t\tJob1 job = new Job1();\n\t\tjob.head = new Node(1);\n\t\tfor(int i = 2; i < 6; i ++) {\n\t\t\tjob.head.insertTail(new Node(i));\n\t\t}\n\t\tjob.head.printAll();\n\t}",
"cb.Careerbuilder.Job getJobs(int index);",
"public void scheduleJobs();",
"public String[][] generarJobs(int numeroJobs,int numeroParametros, Rango[] rangoParametros);",
"public interface ReadJob {\n\n Map<String, Object> getSharedNodesInfo();\n\n String getSharedKey(String value);\n\n void setSharedNodesInfo(Map<String, Object> sharedNodesInfo);\n\n String[] getShareNodeIds();\n}",
"public ModemWorker (IConnection connection) {\n\t\tthis.connection = connection;\n\t}",
"public static ArrayList<Job> getJob()\n {\n conn = DatabaseConnectionPostgre.connection();\n try {\n ArrayList<Job> returnValue = new ArrayList<>();\n\n stmt = conn.createStatement();\n String sql = \"SELECT * FROM job NATURAL JOIN recruiter NATURAL JOIN location;\";\n ResultSet rs = stmt.executeQuery(sql);\n while(rs.next()) {\n returnValue.add(new Job(\n rs.getInt(\"job_id\"),\n rs.getString(\"job_name\"),\n new Recruiter(\n rs.getInt(\"recruiter_id\"),\n rs.getString(\"name\"),\n rs.getString(\"email\"),\n rs.getString(\"phone_number\"),\n new Location(\n rs.getString(\"province\"),\n rs.getString(\"city\"),\n rs.getString(\"description\")\n )\n ),\n rs.getInt(\"fee\"),\n JobCategory.valueOf(rs.getString(\"category\"))\n ));\n }\n rs.close();\n stmt.close();\n conn.close();\n return returnValue;\n } catch (Exception e) {\n System.err.println(e.getClass().getName()+\": \"+ e.getMessage());\n return null;\n }\n }",
"public void execute()\n\t {\n\t // espera a que se conecte cada cliente\n\t for ( int i = 0; i < jugadores.length; i++ ) //<-- dos por defecto o de 0 a 1\n\t {\n\t try // espera la conexión, crea el objeto Jugador, inicia objeto Runnable\n\t {\n\t \t//el metodo accept() es bloqueante hasta recibir una conexion\n\t jugadores[i] = new Jugador( servidor.accept(), i );\n\t //el constructor de jugador recibe un objeto socket crea los flujos E/S\n\t ejecutarJuego.execute(jugadores[i]); // ejecuta el objeto Runnable subproceso\n\t } // fin de try\n\t catch ( IOException excepcionES ) \n\t {\n\t excepcionES.printStackTrace();\n\t System.exit(1);\n\t } // fin de catch\n\t } // fin de for\n\n\t bloqueoJuego.lock(); // bloquea el juego para avisar al subproceso del jugador Uno\n\n\t try\n\t {\n\t jugadores[JUGADOR_1].establecerSuspendido(false); // continúa el jugador Uno\n\t otroJugadorConectado.signal(); // despierta el subproceso del jugador Uno\n\t } // fin de try\n\t finally\n\t {\n\t bloqueoJuego.unlock(); // desbloquea el juego después de avisar al jugador Uno\n\t } // fin de finally\n\t }",
"public interface JobMapper {\n int addJob (Jobs job);\n List<Jobs> listJob();\n int deleteJob(int jid);\n int updateJob(Jobs job);\n List<Jobs> findByName(String jname);\n Jobs selectJob(int jid);\n //出手之后兼职state的变化\n int updateJobByState(Jobs job);\n int findByState(int jobid);\n List<Jobs> selectJobByUser(int userid);\n //关于简历部分的功能\n int addResume (Resumes resumes);\n List<Resumes> findResumeByJobId (int jid);\n Resumes selectOneResume(int resid);\n List<Jobs> selectResumeJob(int userid);\n List<Jobs> selectJobByReq(Jobs jobs);\n}",
"private static List<Employee> readWorkers(int arg) {\r\n\t\treturn WorkersLoader.readAllEmployyes(arg);\r\n\t}",
"public String[] getAllJobs();",
"com.google.cloud.talent.v4.Job getJobs(int index);",
"@SuppressWarnings(\"unchecked\")\n\tpublic List<IJobQueue> getJobs() throws IOException {\n\t\tfinal String sql = \"SELECT * from jobqueue order by id\";\n\t\tList<? extends IJobQueue> result = this.queryDataList(JobQueue.class,IJobQueue.Props.class, sql);\n\t\treturn (List<IJobQueue>) result;\t\t\n\t}",
"private void run() {\n //Create the store object\n Store store = new Store();\n\n //Populate the array of people\n for (int i = 0; i < 20; i++) {\n people.add(new Viewer(store));\n if (i < 6) { //Add buyers\n people.add(new Buyer(store));\n }\n }\n\n //Make a thread pool according to the size of people\n this.threadPoolExecutor =\n (ThreadPoolExecutor) Executors.newFixedThreadPool(people.size());\n\n //Start the life of every person\n for (Person person : this.people) {\n threadPoolExecutor.execute(person);\n }\n }",
"public interface JobService {\n boolean registerJob(Job job);\n\n boolean deleteJob(String domain, String jobId);\n\n List<JobWrapper> listJob(String domain);\n\n JobWrapper readJob(String domain, String jobId);\n\n NodeResult readNodeResult(String domain, String jobId, String ip);\n\n boolean runJob(String domain, String jobId);\n\n}",
"long countJobs();",
"public static void main(String[] args) {\n try {\r\n ServerSocket server=new ServerSocket(port);\r\n System.out.println(\"Waiting for a client...\");\r\n\r\n connections=new ArrayList<>();\r\n ExecutorService es = Executors.newFixedThreadPool(max_clients);\r\n\r\n Connection tmp;\r\n while(true) {\r\n\r\n\r\n Socket socket = server.accept();\r\n if(max_clients<=clients){\r\n OutputStream out = socket.getOutputStream();\r\n BufferedWriter rout= new BufferedWriter(new OutputStreamWriter(out));\r\n rout.write(\"Chat is full(\"+max_clients+\" users). You can't join. Try again later.\");\r\n rout.write(\"\\n\");\r\n rout.flush();\r\n socket.close();\r\n out.close();\r\n continue;\r\n }\r\n\r\n tmp=new Connection(socket);\r\n es.submit(tmp);\r\n clients++;\r\n System.out.println(\"New user has joined. Number of users - \"+clients);\r\n connections.add(tmp);\r\n }\r\n\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }",
"Multi createMulti();",
"private void startJobs() {\n List<JobProfile> profileList = getJobConfDb().getAcceptedJobs();\n for (JobProfile profile : profileList) {\n LOGGER.info(\"init starting job from db {}\", profile.toJsonStr());\n addJob(new Job(profile));\n }\n }",
"public abstract void mapJob(Job job, List sites);",
"public static void main(String[] args) {\n\t\ttry {\r\n\t\t\tServerSocketChannel socketChannel = ServerSocketChannel.open();\r\n\t\t\tsocketChannel.bind(new InetSocketAddress(8189));\r\n\t\t\tExecutorService service = Executors.newCachedThreadPool();\r\n\t\t\t\r\n\t\t\twhile (true) {\r\n\t\t\t\tSocketChannel socketChannel2 = socketChannel.accept();\r\n\t\t\t\tMultipleTask sTask = new MultipleTask(socketChannel2);\r\n\t\t\t\tservice.execute(sTask);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}",
"com.lvl6.proto.QuestProto.UserQuestJobProto getUserQuestJobs(int index);",
"int addJobs(Iterable<? extends PrintJob> jobs);",
"public GetJobs() {\r\n\t\tsuper();\r\n\t}",
"public void getJobs(String response) {\n\t\tDocument doc = Jsoup.parse(response);\r\n\t\tElements body = doc.getElementsByTag(\"tbody\");\r\n\t\tElement listOfJobs = body.get(3);\r\n\t\tElements groupOfJobs = listOfJobs.children(); //25 jobs\r\n\r\n\t\tfor (Element job: groupOfJobs) {\r\n\t\t\tJob newJob = createJob(job);\r\n\t\t\tmListOfJobs.add(newJob);\r\n\t\t}\r\n\t\tif (mAdapter != null) {\r\n\t\t\tmAdapter.notifyDataSetChanged();\r\n\t\t}\r\n\t}",
"void fetchEmployeeJobRelations(int selectedJobId, AsyncCallback<ArrayList<JobEmployeeRelation>> asyncCallback);",
"public List< IJob > getJobs( int maxAmount )\n {\n String fileName;\n String refFileName;\n URI fileURI;\n byte[] referenceData = null;\n InputStream ISrefData = null;\n DocumentBuilderFactory docBuilderFactory;\n DocumentBuilder docBuilder = null;\n Document doc;\n \n docBuilderFactory = DocumentBuilderFactory.newInstance();\n try\n {\n docBuilder = docBuilderFactory.newDocumentBuilder();\n }\n catch( ParserConfigurationException pce )\n {\n log.error( pce.getMessage() );\n }\n doc = docBuilder.newDocument();\n \n List<IJob> list = new ArrayList<IJob>();\n for( int i = 0; i < maxAmount && iter.hasNext() ; i++ )\n {\n fileName = (String)iter.next();\n refFileName = fileName.substring( 0, fileName.lastIndexOf( \".\" ) ) + \".ref\";\n //System.out.println( String.format( \"created ref name %s for file %s\", refFileName, fileName ) );\n File refFile = FileHandler.getFile( refFileName );\n if ( refFile.exists() )\n {\n try\n {\n ISrefData = FileHandler.readFile( refFileName );\n }\n catch( FileNotFoundException fnfe )\n {\n log.error( String.format( \"File for path: %s couldnt be read\", refFileName ) );\n }\n try\n {\n doc = XMLUtils.getDocument( new InputSource( ISrefData ) );\n }\n catch( ParserConfigurationException ex )\n {\n log.error( ex.getMessage() );\n }\n catch( SAXException ex )\n {\n log.error( ex.getMessage() );\n }\n catch( IOException ex )\n {\n log.error( ex.getMessage() );\n }\n \n File theFile = FileHandler.getFile( fileName );\n \n list.add( (IJob) new Job( new FileIdentifier( theFile.toURI() ), doc ) );\n }\n else\n {\n log.warn( String.format( \"the file: %s has no .ref file\", fileName ) );\n i--;\n }\n }\n return list;\n \n }",
"public void run() throws IOException {\n \n try {\n \n File file = new File(\"jobs.txt\");\n FileReader fileReader = new FileReader(file);\n \n BufferedReader bufferedReader = new BufferedReader(fileReader); \n StringBuffer stringBuffer = new StringBuffer();\n \n String line;\n \n // reading the first line = number of jobs and skipping it since\n // I do not need that information \n line = bufferedReader.readLine();\n \n //this.numOfjobs = Integer.parseInt(line);\n \n // read a line:\n while ((line = bufferedReader.readLine()) != null ) {\n \n int weight,length;\n \n String[] arr = line.split(\"\\\\s+\");\n \n // weight and length are\n weight = Integer.parseInt(arr[0]);\n length = Integer.parseInt(arr[1]);\n \n // putting into the priority queue\n this.putJob(weight, length);\n }\n \n // closing the fileReader:\n fileReader.close();\n \n }catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public boolean getHasMoreJobs() ;",
"public static void main (String args[]){\n\t\ttry{\n\t\tfinal String magicNumber = \"15540\";\n\t\tString id;\n\t\tDatagramSocket listenSocket = new DatagramSocket();\t\n\t\tSystem.out.println(\"Port: \" + listenSocket.getLocalPort());\n\t\tint portServer = Integer.parseInt(args[1]);\n\t\tInetAddress ipServer = InetAddress.getByName(args[0]);\n\t\tString message = \"REQUEST_TO_JOIN/\";\n\t\tbyte[] sendData = new byte[1024];\n\t\tsendData = message.getBytes();\n\t\tDatagramPacket sendPacket = new DatagramPacket(sendData, sendData.length, ipServer, portServer);\n\t\tlistenSocket.send(sendPacket);\n\t\tSystem.out.println(\"REQUEST_TO_JOIN\");\n\t\tlistenSocket.setSoTimeout(5000);\n\t\tArrayList<Job> jobQueue = new ArrayList<Job>();\n\n\t\t//Now waiting for server to acknowledge the Request\n\n\t\tbyte[] receiveData = new byte[1024];\n \t\tDatagramPacket receivePacket = new DatagramPacket(receiveData, receiveData.length);\n \t\tStringTokenizer st = null;\n \t\twhile (true){\n \t\t\ttry {\n\t \t\t\n\t \t\tlistenSocket.receive(receivePacket);\n\t \t\tSystem.out.println(\"Check1\");\n\t \t\tString fromServer = new String(receivePacket.getData());\n\t \t\tif (receivePacket.getAddress().toString().substring(1).equals(args[0]) && receivePacket.getPort() == portServer) // Checking if packet is received from server\n\t \t\t{\n\t \t\t\tst = new StringTokenizer(fromServer, \"/\");\n\t \t\t\tmessage = st.nextToken();\n\t \t\t\tid = st.nextToken();\n\t \t \t\tSystem.out.println(id);\t\n\t \t\t\tbreak;\n\t \t\t}\t\n\t\t\t}catch (SocketTimeoutException e) \n\t\t\t{\n\t \t\t\tSystem.out.println(\"Connection to Server: Timed out\");\n\t \t\t\treturn;\n\t\t\t}\n\t\t\t catch (Exception e) {e.printStackTrace();}\n\t\t\t}\n\t \t\t\n\t \t\t\n\t \tSystem.out.println(\"Connection to Server Established\");\n\t\tlistenSocket.setSoTimeout(100);\n\t\tboolean initFlag = true; // true if a job is currently \n\n\t\tJob currentJob = new Job();\n\t\t// waiting for commands from the server\n\t\twhile (true){\n\n\t\t\ttry {\n\t\t\tlistenSocket.receive(receivePacket);\n\t\t\tString fromServer = new String(receivePacket.getData());\n\t\t\tst = new StringTokenizer(fromServer, \"/\");\n\t\t\tmessage = st.nextToken();\n\n\t\t\tif (!message.equals(magicNumber))\n\t\t\t\tcontinue;\n\t\t\tmessage = st.nextToken();\n\n\t\t\t}catch (SocketTimeoutException e) {message = \"\";}\n\n\t\t\n\t\t\t// if not magic number, continue to next iteration\n\n\n\t\t\tif (!jobQueue.isEmpty() && !currentJob.running)\n\t\t\t{\n\t\t\t\t// System.out.println(\"Job Thread starting\");\n\t\t\t\tcurrentJob = jobQueue.remove(0);\n\t\t\t\tSystem.out.println(currentJob.rangeEnd);\n\t\t\t\tThread thread = new Thread(new WorkerThread(currentJob, ipServer, portServer, id));\n\t\t\t\tthread.start();\n\t\t\t}\n\n//=======================================================================================================================================================================\n// New job being assigned. Send JOB_ACK only if the current job is complete\n//=======================================================================================================================================================================\n\t\t\tif (message.equals(\"JOB\"))\n\t\t\t{\n\t\t\t\tif (!jobQueue.isEmpty())\n\t\t\t\t\tcontinue;\n\t\t\t\tString rangeStart = st.nextToken();\n\t\t\t\tString rangeEnd = st.nextToken();\n\t\t\t\tString hash = st.nextToken();\n\t\t\t\tSystem.out.println(\"=============== New Job Received ===============\");\n\t\t\t\tSystem.out.println(rangeStart);\n\t\t\t\tSystem.out.println(rangeEnd);\n\t\t\t\tSystem.out.println(\"=============== New Job Received ===============\");\t\t\t\t\n\t\t\t\tJob newJob = new Job(rangeStart, rangeEnd, hash);\n\t\t\t\tjobQueue.add(newJob);\n\t\t\t\tmessage = \"ACK_JOB/\" + rangeStart + '/' + rangeEnd + '/' + hash + '/';\n\t\t\t\tsendData = new byte[1024];\n\t\t\t\tsendData = message.getBytes();\n\t\t\t\tInetAddress ip = InetAddress.getByName(receivePacket.getAddress().toString().substring(1));\n\t\t\t\tint port = receivePacket.getPort();\n\t\t\t\tsendPacket = new DatagramPacket(sendData, sendData.length, ip, port);\n\t\t\t\tlistenSocket.send(sendPacket);\n\t\t\t}\n\t\t\t\n//=====================================================================================================================================\n// Do I make the server send additional details such as rangeStart, rangeEnd and hash while sending the cancel command?\n// Currently, working under the assumption that only CANCEL_JOB is being sent\n//=====================================================================================================================================\n\t\t\telse if (message.equals(\"CANCEL_JOB\"))\n\t\t\t{\t\n\t\t\t\tString hash = st.nextToken();\n\t\t\t\tif (currentJob.hash.equals(hash) && currentJob.running){\n\t\t\t\t\tcurrentJob.running = false;\n\t\t\t\tif (!jobQueue.isEmpty())\n\t\t\t\t{\n\t\t\t\t\tJob queued = jobQueue.get(0);\n\t\t\t\t\tif (queued.hash.equals(hash))\n\t\t\t\t\t\tjobQueue.remove(0);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n//=====================================================================================================================================\n// Send the Server the status of the current job\n//=====================================================================================================================================\n\n\t\t\telse if (message.equals(\"PING\"))\n\t\t\t{\n\n\t\t\t\tSystem.out.println(\"Ping Received\");\n\t\t\t\tif (!currentJob.running)\n\t\t\t\t{\n\t\t\t\t\tmessage = \"NO_JOB/\";\n\t\t\t\t}\n\t\t\t\tInetAddress ip = InetAddress.getByName(receivePacket.getAddress().toString().substring(1));\n\t\t\t\tint port = receivePacket.getPort();\n\n\t\t\t\tif (currentJob.running){\n\t\t\t\t\tString speed = Integer.toString(currentJob.speed);\n\t\t\t\t\tString rangeEnd = new String(currentJob.rangeEnd);\n\t\t\t\t\tString completed = new String(currentJob.completed);\n\t\t\t\t\tString command = \"1/\";\n\t\t\t\t\tmessage = Integer.toString(currentJob.speed) + '/' + currentJob.completed + '/' + rangeEnd + '/' + currentJob.hash + '/';\n\t\t\t\t\tif (!jobQueue.isEmpty()){\n\t\t\t\t\t\tJob queued = jobQueue.get(0);\n\t\t\t\t\t\tcommand = \"2/\";\n\t\t\t\t\t\tcompleted = new String(queued.rangeStart);\n\t\t\t\t\t\trangeEnd = new String(queued.rangeEnd);\n\t\t\t\t\t\tmessage = message + completed + '/' + rangeEnd + '/' + queued.hash + '/';\n\t\t\t\t\t}\n\n\t\t\t\t\tmessage = command + message;\n\t\t\t\t}\n\t\t\t\tSystem.out.println(message);\n\t\t\t\tsendData = new byte[1024];\n\t\t\t\tsendData = message.getBytes();\n\t\t\t\tsendPacket = new DatagramPacket(sendData, sendData.length, ip, port);\n\t\t\t\tlistenSocket.send(sendPacket);\n\t\t\t}\n//=====================================================================================================================================\n// When timeout occurs code gets directly to this point\n//=====================================================================================================================================\n\t\t}\n\n\t} catch (Exception e) {e.printStackTrace();}\n}",
"DatabaseClient newJobDbClient();",
"private void loadJobs(){\n\t\tsuperJobsList.clear();\n\t\tsuperJobs=jdbc.getProjectsAndJobs();\n\t\tfor(Job j: superJobs){\n\t\t\tsuperJobsList.addElement(j.jobname);\n\t\t}\n\t\t\n\t}",
"OMMPool getPool();",
"@Override\n Flux<Job> findAll();",
"int getJobsCount();",
"int getJobsCount();",
"int getJobsCount();",
"public static void main(String[] args) {\n\t\tfinal JobStream rootJobStream = new SerialJobStream(\"1\");\n\t\t// final JobStream rootJobStream = new ParallelJobStream(\"1\");\n\n\t\tfinal JobStream rootChild1 = new SerialJobStream(\"2\");\n\n\t\trootChild1.addJob(new Job(\"3\") {\n\t\t\t@Override\n\t\t\tpublic void process(Date tick, Object data) {\n\t\t\t\tsetJobSuccessful(null);\n\t\t\t}\n\t\t});\n\n\t\trootChild1.addJob(new Job(\"4\") {\n\t\t\t@Override\n\t\t\tpublic void process(Date tick, Object data) {\n\t\t\t\tsetJobSuccessful(null);\n\t\t\t}\n\t\t});\n\n\t\trootChild1.addJob(new Job(\"5\") {\n\t\t\t@Override\n\t\t\tpublic void process(Date tick, Object data) {\n\t\t\t\tsetJobSuccessful(null);\n\t\t\t}\n\t\t});\n\n\t\tfinal JobStream rootChild2 = new SerialJobStream(\"6\");\n\n\t\trootChild2.addJob(new Job(\"7\") {\n\t\t\t@Override\n\t\t\tpublic void process(Date tick, Object data) {\n\t\t\t\tsetJobSuccessful(null);\n\t\t\t}\n\t\t});\n\n\t\trootChild2.addJob(new Job(\"8\") {\n\t\t\t@Override\n\t\t\tpublic void process(Date tick, Object data) {\n\t\t\t\tsetJobSuccessful(null);\n\t\t\t}\n\t\t});\n\n\t\trootChild2.addJob(new Job(\"9\") {\n\t\t\t@Override\n\t\t\tpublic void process(Date tick, Object data) {\n\t\t\t\tsetJobSuccessful(null);\n\t\t\t}\n\t\t});\n\n\t\t// Add child job streams to root\n\t\trootJobStream.addJob(rootChild1);\n\t\trootChild1.addJob(rootChild2);\n\n\t\t// Start the runner\n\t\tfinal JobStreamRunner runnner = new JobStreamRunner(rootJobStream);\n\t\trunnner.start();\n\t}",
"public int getJobId() ;",
"public void sortBasedPendingJobs();",
"public void fetch(){ \n for(int i = 0; i < this.queries.size(); i++){\n fetch(i);\n }\n }",
"public interface JobManager {\n /**\n * Add a job to the execution queue.\n * @param job encapsulation of the execution data.\n * @return the unique id of the job.\n */\n String submitJob(JPPFJob job);\n\n /**\n * Add a task job to the execution queue.\n * @param job encapsulation of the execution data.\n * @param listener an optional listener to receive job status change notifications, may be null.\n * @return the unique id of the job.\n */\n String submitJob(JPPFJob job, JobStatusListener listener);\n\n /**\n * Add an existing job back into the execution queue.\n * @param job encapsulation of the execution data.\n * @return the unique id of the job.\n */\n String resubmitJob(JPPFJob job);\n\n /**\n * Determine whether there is a client connection available for execution.\n * @return true if at least one connection is available, false otherwise.\n */\n boolean hasAvailableConnection();\n\n /**\n * Determine whether local execution is enabled on this client.\n * @return <code>true</code> if local execution is enabled, <code>false</code> otherwise.\n */\n boolean isLocalExecutionEnabled();\n\n /**\n * Specify whether local execution is enabled on this client.\n * @param localExecutionEnabled <code>true</code> to enable local execution, <code>false</code> otherwise\n */\n void setLocalExecutionEnabled(final boolean localExecutionEnabled);\n\n /**\n * Get the list of available connections.\n * @return a vector of connections instances.\n */\n Vector<JPPFClientConnection> getAvailableConnections();\n\n /**\n * Get a listener to the status of the managed connections.\n * @return a {@link ClientConnectionStatusListener} instance.\n */\n ClientConnectionStatusListener getClientConnectionStatusListener();\n\n /**\n * Close this job manager and all the resources it uses.\n */\n void close();\n\n /**\n * Reset this job manager.\n */\n void reset();\n\n /**\n * Cancel the job with the specified id.\n * @param jobId the id of the job to cancel.\n * @return a <code>true</code> when cancel was successful <code>false</code> otherwise.\n * @throws Exception if any error occurs.\n */\n boolean cancelJob(String jobId) throws Exception;\n\n /**\n * Get the current load-balancer settings.\n * @return a {@link LoadBalancingInformation} instance, which encapsulates a load-balancing alfgorithm name, along with its parameters.\n */\n public LoadBalancingInformation getLoadBalancerSettings();\n\n /**\n * Change the load balancer settings for the client.\n * @param algorithm the name of load-balancing alogrithm to use.\n * @param parameters the algorithm's parameters, if any. The parmeter names are assumed no to be prefixed.\n * @throws Exception if any error occurs or if the algorithm name is {@code null} or not known.\n */\n public void setLoadBalancerSettings(final String algorithm, final Properties parameters) throws Exception;\n}",
"void allocateWorker(Work work);",
"Collection<String> submitJob(Job job) throws JobExecutionException;",
"public static void main(String[] args) {\n\n try {\n Coordinator cord = new Coordinator(cordPort, 3);\n runRunnable(cord);\n\n Participant one=new Participant(1001,cordPort);\n Participant two=new Participant(1002,cordPort);\n Participant three=new Participant(1003,cordPort);\n runRunnable(one);\n runRunnable(two);\n runRunnable(three);\n }catch (Exception ex){\n\n }\n\n }",
"DataResult<List<Job>> getAll();",
"public static void main(String[] args) {\r\n Restoran resto = new Restoran();\r\n int i = 0;\r\n for ( i = 0; i < 6; i++) {\r\n new Thread(new Cliente(resto,\"Cliente \" + i), \"Cliente \" + i).start();\r\n }\r\n new Thread(new Mozo(resto)).start();\r\n new Thread(new Cocinero(resto)).start();\r\n }",
"@Test\n public void testMultiJCPCalls() throws Exception {\n \n Topology topology = newTopology(\"testMultiJCPCalls\");\n \n for (int i = 0 ; i < 10; i++)\n topology.addJobControlPlane();\n \n submitAndCheckJCPIsThere(topology); \n }",
"protected void divideWorkersBySkill() {\n ResourcePool myResourcePool;\n\n for (Person person : this.getPersons()) {\n myResourcePool = this.getResourcePools().get(person.getSkill());\n\n // Create the pool if no other workers have yet been discovered with this skill\n if (myResourcePool == null) {\n myResourcePool = new ResourcePool(new ArrayList<>(), person.getSkill(),\n this.getName());\n this.getResourcePools().put(person.getSkill(), myResourcePool);\n }\n\n myResourcePool.addPerson(person);\n }\n }",
"public static void main(String [] args) {\n Task specialTask = new MessageTask(args[0],args[1],args[2],args[3],args[4],args[5]);\n specialTask.execute();\n\n System.out.println(\"Hello to your first Java program!\");\n\n Task[] tasks = new Task[5];\n tasks[0] = new MessageTask(\"1\",\"Seminar\",\"Hello world\",\"Computer\",\"Students\",\"2018-10-02 13:00\");\n tasks[1] = new MessageTask(\"2\",\"Laborator\",\"Beautiful world\",\"Love\",\"Ex's\",\"2012-05-02 15:00\");\n tasks[2] = new MessageTask(\"3\",\"Curs\",\"Cruel world\",\"Teacher\",\"Parents\",\"2058-08-02 13:35\");\n tasks[3] = new MessageTask(\"4\",\"Examen\",\"Great world\",\"Colleague\",\"Teachers\",\"1018-03-02 20:00\");\n tasks[4] = new MessageTask(\"5\",\"Colocviu\",\"Bye world\",\"Deputy\",\"Mayor\",\"2618-10-02 13:00\");\n\n// for(Task i: tasks)\n// i.execute();\n\n }",
"public interface JobManager {\n void startJob(JobConfig<String, JsonRecord> name);\n}",
"public void run() {\n\t\tZMQ.Socket sender = context.socket(ZMQ.PUSH);\n\t\tsender.bind(\"tcp://*:5557\");\n\t\t\n\t\t//this lets you go to another machine to start a worker\n\t\tSystem.out.println(\"Press Enter when the workers are ready: \");\n\t\ttry {\n\t\t\tSystem.in.read();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t// Messaging sending loop\n\t\tSystem.out.println(\"Sending tasks to workers\\n\");\n\t\twhile (!Thread.interrupted()) {\n\t\t\ttry {\n\t\t\t\t// If there are jobs to be sent, send them\n\t\t\t\t// Synchronize access to workParts structure before accessing it\n\t\t\t\tsynchronized (Master.lock) {\n\t\t\t\t\tif (!workParts.isEmpty()) {\t\n\t\t\t\t\t\tfor (Computation comp : workParts.values()) {\n\t\t\t\t\t\t\t// Submit only unsubmitted jobs\n\t\t\t\t\t\t\tif (!comp.isSubmitted()) {\n\t\t\t\t\t\t\t\tfor (int i=0; i < comp.getNumOfSubmissions(); i++) {\n\t\t\t\t\t\t\t\t\tsendJob(sender, comp);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// Set submitted flag\n\t\t\t\t\t\t\t\tcomp.setSubmitted(true);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Take a short break before reading the job list again\n\t\t\t\tThread.sleep(10);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}",
"public ModemWorker (Properties connectionProperties) {\n\t\tthis.connectionProperties = connectionProperties;\n\t}",
"@Override\n\tpublic void assignPids() {\n\t\tThread t = new Thread(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\twhile (nPidsAssigned < nProc -1) {\n\t\t\t\t\t\tinitConn.connectRetry(coordinatorHostname, 20000);\n\n\t\t\t\t\t\tnPidsAssigned++;\n\t\t\t\t\t\t// Pid 1 is reserved for the coordinator.\n\t\t\t\t\t\tint newPid = nPidsAssigned + 1;\n\t\t\t\t\t\tString hostname = initConn.getHostName();\n\t\t\t\t\t\tinitConn.send(((Integer)newPid).toString());\n\t\t\t\t\t\tinitConn.send(pidToHolderMap.get(newPid).toString());\n\t\t\t\t\t\tsynchronized (pidToHostnameMap) {\n\t\t\t\t\t\t\tpidToHostnameMap.put(newPid, hostname);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tSystem.out.println(\"PID: \" + newPid + \" sent\\n\");\n\n\t\t\t\t\t\tinitConn.close();\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tSystem.out.println(pidToHostnameMap.toString());\n\t\t\t}\n\t\t});\n\t\tt.start();\n\t}",
"protected synchronized ArrayList<Person> getResources(Job job) {\n\n // Declarations\n ResourcePool skillGroup;\n ArrayList<Person> candidates;\n boolean areAllRequirementsMet;\n String workerLogLine;\n Person worker;\n HashMap<String, Integer> mapOfNeededSkills;\n\n // Definitions\n candidates = new ArrayList<>();\n areAllRequirementsMet = true;\n workerLogLine = \"\";\n mapOfNeededSkills = new HashMap<>();\n\n /**\n * Implementation suggested <a href=\"https://stackoverflow.com/questions/81346\">here</a> as\n * an ideal Java 8 solution. Basically, to more easily keep track of duplicate skills needed\n * (i.e. two cooks for a job), we create a <code>HashMap</code> entry of that skill to\n * <code>mapOfNeededSkills</code> where the value is the number of workers with that skill\n * that are required to complete the job.\n */\n job.getRequirements().forEach((String skill) -> {\n mapOfNeededSkills.merge(skill, 1, Integer::sum);\n });\n\n outerLoop:\n for (String skill : job.getRequirements()) {\n\n // Grab the resource pool possessing all the workers who have this skill in the port\n skillGroup = this.getResourcePools().get(skill);\n\n // If no workers exist in the port with this specific skill...\n if (skillGroup == null) {\n job.getStatusLog().append(\"No qualified workers found for \" + job.getName()\n + \" (\" + job.getParentShip().getName() + \")\\n\");\n\n // Release the chopstick, Socrates\n this.returnResources(candidates);\n job.endJob();\n return new ArrayList<>();\n\n // If the total number of people with this skill is smaller than the needed number...\n } else if (skillGroup.getPersonsInPool().size() < mapOfNeededSkills.get(skill)) {\n job.getStatusLog().append(\"Not enough qualified workers found for \" + job.getName()\n + \" (\" + job.getParentShip().getName() + \")\\n\");\n\n // Gimme the fork, Epicurus\n this.returnResources(candidates);\n job.endJob();\n return new ArrayList<>();\n\n // Otherwise...\n } else {\n\n // For all workers with the required skill\n for (Person person : skillGroup.getPersonsInPool()) {\n\n // If this individual is not employed\n if (!person.getIsWorking()) {\n skillGroup.reservePerson(person);\n candidates.add(person);\n continue outerLoop;\n }\n }\n\n // If no available workers are present, we have to keep waiting\n areAllRequirementsMet = false;\n break;\n }\n } // end outerLoop\n\n // Basically a case of logical conjunction; we only return workers if all cases are true\n if (areAllRequirementsMet) {\n workerLogLine += job.getName() + \" (\" + job.getParentShip().getName() + \") reserving\";\n\n for (int i = 0; i < candidates.size(); i++) {\n worker = candidates.get(i);\n\n if (i == 0) {\n workerLogLine += \" \";\n } else if (i < candidates.size() - 1) {\n workerLogLine += \", \";\n } else {\n workerLogLine += \" & \";\n }\n\n workerLogLine += worker.getName();\n }\n job.getStatusLog().append(workerLogLine + \"\\n\");\n\n return candidates;\n } else {\n\n this.returnResources(candidates);\n return null;\n }\n }",
"public static void main(String[] args) {\n\t\tJGroupHelper j = new JGroupHelper(\"BieberFeverGroup\", \"127.0.0.1\", 51924);\n\t\tTask t = new Task(Integer.toString(new Random().nextInt(9999)), \"Rick Astley\", \"TODAY\", \"Completed\", \"This is a Rick Roll\", \"The BieberFever team\" );\n\t\tj.addTask(t);\n\t}",
"public static void main(String[] args) {\n if(args.length != 1) {\n System.err.println(\"Usage: java Ufficio <numero_persone>\");\n System.exit(1);\n }\n\n int numPersone = Integer.parseInt(args[0]);\n\n // Creo una coda bloccante per memorizzare i task (persone) in attesa nella sala1.\n BlockingQueue<Runnable> sala1 = new LinkedBlockingDeque<Runnable>();\n\n // Creo una coda bloccante per memorizzare i task (persone) in attesa nella sala2.\n BlockingQueue<Runnable> sala2 = new ArrayBlockingQueue<Runnable>(dimSala2);\n\n // Creo un pool di thread con al massimo 'numSportelli' thread.\n ExecutorService sportelli = new ThreadPoolExecutor(\n numSportelli, // Numero di thread da mantenere nel pool.\n numSportelli, // Numero massimo di thread possibili nel pool.\n 0L, // Tempo di keep-alive per i thread.\n TimeUnit.SECONDS,\n sala2, // Coda bloccante per i task.\n new RejectedExecutionHandler() {\n @Override\n public void rejectedExecution(Runnable persona, ThreadPoolExecutor sportelli) {\n try {\n sportelli.getQueue().put(persona);\n } catch(InterruptedException e) {\n System.err.println(\"Interruzione put (sala2).\");\n }\n }\n } // Politica di rifiuto: la persona rifiutata in sala2 aspetta che sia libera\n );\n\n // Creazione dei task (persone).\n for(int i = 1; i <= numPersone; i++) {\n sala1.add(new Persona(i));\n }\n\n // Sposto le persone dalla sala1 in sala2.\n for(int i = 1; i <= numPersone; i++) {\n try {\n sportelli.execute(sala1.take());\n } catch(RejectedExecutionException e) {\n System.err.printf(\"Persona %d: sala2 esaurita\\n\", i);\n } catch(InterruptedException e) {\n e.printStackTrace();\n }\n }\n\n sportelli.shutdown(); // Chiudo gli sportelli, dopo che la sala2 è vuota\n }",
"public interface RemoteCoordinator extends Remote, Identify {\n /**\n * a method to add a Peer to this RemoteCoordinator's list of available Peers\n * called by a MembershipManager\n *\n * @param peer the Uuid of the Peer to be added\n */\n void addPeer(Uuid peer) throws RemoteException;\n\n /**\n * a method to remove a Peer from this RemoteCoordinator's list of available Peers\n * called by a MembershipManager\n *\n * @param peer the Uuid of the Peer to be removed\n */\n void removePeer(Uuid peer) throws RemoteException;\n\n /**\n * a method to get the Uuid of a live Peer in this Coordinator's list of active Peers,\n * removing any dead Peers encountered along the way from the service\n *\n * @return the Uuid of a live Peer\n */\n Uuid getActivePeer() throws RemoteException, NotBoundException;\n\n /**\n * a method to get the list of active Peers from this RemoteCoordinator\n * called by the MembershipManager when bringing new RemoteCoordinators online\n *\n * @return the list of available Uuids from this RemoteCoordinator\n */\n List<Uuid> getActivePeers() throws RemoteException;\n\n /**\n * a method to set the map of active Peers for this RemoteCoordinator\n * called by the MembershipManager when bringing new RemoteCoordinators online\n */\n void setActivePeers(List<Uuid> activePeers) throws RemoteException;\n\n /**\n * a method to assign a JobId to a JobCoordinator\n * called by a User\n * delegates responsibility to its corresponding Coordinator method\n *\n * @param jobId the JobId of the Job being assigned\n * @return true if the job was successfully assigned, false otherwise\n * @throws RemoteException\n */\n boolean assignJob(JobId jobId) throws RemoteException;\n\n /**\n * a method to get an allocation of TaskManagers\n * called by a JobManager\n *\n * @param numRequested the number of TaskManagers being requested by the JobManager\n * @return a list of Uuids to be used by the calling JobManager as TaskManagers\n * @throws RemoteException\n */\n List<Uuid> getTaskManagers(int numRequested) throws RemoteException;\n}",
"java.util.List<cb.Careerbuilder.Job> \n getJobsList();",
"public static void main (String[] args){\r\n\t\tint num_threads = 100;\r\n\t\tpid_manager pid_test = new pid_manager();\r\n\t\tSystem.out.println(\"Ready \\n\");\r\n\t\tpid_test.allocate_map();\r\n\t\tfor(int i = 0; i < num_threads; i++){\r\n\t\t\tThread rc = new Thread(new mthread(pid_test));\r\n\t\t\trc.start();\r\n\t}\r\n}",
"public interface JobService {\n List<Job> findAllJobs();\n Job findOneJob(String id);\n void deleteOneJob(String jobId);\n void saveOneJob(String jobId, String jobTitle, int minSalary, int maxSalary);\n}",
"@Override\n\tpublic void establishNeighborConn() throws Exception {\n\t\tList <Thread> tList = new ArrayList<Thread>();\n\t\tList<Integer> neighborPids = neighborMap.get(pid);\n\t\tnNeighbors = neighborPids.size();\n\t\tfor (int neighborPid : neighborPids) {\n\t\t\tThread t = new Thread(new Runnable() {\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tString neighborHostname = pidToHostnameMap.get(neighborPid);\n\t\t\t\t\t\tConnection neighborConn = new ServerConnection();\n\t\t\t\t\t\tint port = 10000 + (100*pid) + neighborPid;\n\t\t\t\t\t\tneighborConn.connectRetry(coordinatorHostname, port);\n\t\t\t\t\t\tneighborPidToHostnameMap.put(neighborPid, neighborHostname);\n\t\t\t\t\t\tneighborPidToConnMap.put(neighborPid, neighborConn);\n\t\t\t\t\t\tsendQueues.put(neighborPid, new LinkedList<String>());\n\t\t\t\t\t\tsayHelloToNeighbor(neighborConn);\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\ttList.add(t);\n\t\t\tt.start();\n\t\t}\n\t\tfor (Thread t : tList) {\n\t\t\tt.join();\n\t\t}\n\t\tSystem.out.println(neighborPidToHostnameMap);\n\t\tSystem.out.println(neighborPidToConnMap);\n\t}",
"private void assignResourcesToJobs\n\t\t(long now)\n\t\tthrows IOException\n\t\t{\n\t\t// List of jobs to be canceled.\n\t\tList<JobInfo> cancelList = new LinkedList<JobInfo>();\n\n\t\t// Decide what to do with each waiting job.\n\t\tIterator<JobInfo> iter = myWaitingJobList.iterator();\n\t\tjobLoop : while (iter.hasNext())\n\t\t\t{\n\t\t\tJobInfo jobinfo = iter.next();\n\n\t\t\t// If the cluster doesn't have enough resources, don't try to\n\t\t\t// reserve any.\n\t\t\tif (! enoughResourcesForJob (jobinfo.Nn, jobinfo.Np, jobinfo.Nt))\n\t\t\t\t{\n\t\t\t\titer.remove();\n\t\t\t\tcancelList.add (jobinfo);\n\t\t\t\tcontinue jobLoop;\n\t\t\t\t}\n\n\t\t\t// Used to decide how many processes for each node.\n\t\t\tint Np_div_Nn = jobinfo.Np / jobinfo.Nn;\n\t\t\tint Np_rem_Nn = jobinfo.Np % jobinfo.Nn;\n\n\t\t\t// Reserve idle nodes for this job until there are no more idle\n\t\t\t// nodes or this job has all the nodes it needs.\n\t\t\tint be = myNextBackendNumber;\n\t\t\tdo\n\t\t\t\t{\n\t\t\t\t// Decide how many processes for this node.\n\t\t\t\tint Nproc = Np_div_Nn;\n\t\t\t\tif (jobinfo.nodeCount < Np_rem_Nn) ++ Nproc;\n\n\t\t\t\t// Reserve this node only if it is idle and it has enough CPUs.\n\t\t\t\tBackendInfo backendinfo = myBackendInfo[be];\n\t\t\t\tif (backendinfo.state == BackendInfo.State.IDLE &&\n\t\t\t\t\t\tbackendinfo.totalCpus >= Nproc)\n\t\t\t\t\t{\n\t\t\t\t\t// Reserve node.\n\t\t\t\t\tbackendinfo.state = BackendInfo.State.RESERVED;\n\t\t\t\t\tbackendinfo.stateTime = now;\n\t\t\t\t\tbackendinfo.job = jobinfo;\n\n\t\t\t\t\t// Used to decide how many CPUs for each process.\n\t\t\t\t\tint Nt_div_Nproc = backendinfo.totalCpus / Nproc;\n\t\t\t\t\tint Nt_rem_Nproc = backendinfo.totalCpus % Nproc;\n\n\t\t\t\t\t// Assign Np processes.\n\t\t\t\t\tfor (int i = 0; i < Nproc; ++ i)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t// Decide how many CPUs for this process.\n\t\t\t\t\t\tint Ncpus = jobinfo.Nt;\n\t\t\t\t\t\tif (Ncpus == 0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tNcpus = Nt_div_Nproc;\n\t\t\t\t\t\t\tif (i < Nt_rem_Nproc) ++ Ncpus;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Log information.\n\t\t\t\t\t\tmyLog.log\n\t\t\t\t\t\t\t(now,\n\t\t\t\t\t\t\t \"Job \" + jobinfo.jobnum + \" assigned \" +\n\t\t\t\t\t\t\t backendinfo.name + \", rank=\" + jobinfo.count +\n\t\t\t\t\t\t\t \", CPUs=\" + Ncpus);\n\n\t\t\t\t\t\t// Record information about process.\n\t\t\t\t\t\tjobinfo.backend[jobinfo.count] = backendinfo;\n\t\t\t\t\t\tjobinfo.cpus[jobinfo.count] = Ncpus;\n\t\t\t\t\t\t++ jobinfo.count;\n\n\t\t\t\t\t\t// Inform Job Frontend.\n\t\t\t\t\t\tjobinfo.frontend.assignBackend\n\t\t\t\t\t\t\t(/*theJobScheduler*/ this,\n\t\t\t\t\t\t\t /*name */ backendinfo.name,\n\t\t\t\t\t\t\t /*host */ backendinfo.host,\n\t\t\t\t\t\t\t /*jvm */ backendinfo.jvm,\n\t\t\t\t\t\t\t /*classpath */ backendinfo.classpath,\n\t\t\t\t\t\t\t /*jvmflags */ backendinfo.jvmflags,\n\t\t\t\t\t\t\t /*Nt */ Ncpus);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t// Assign one node.\n\t\t\t\t\t++ jobinfo.nodeCount;\n\t\t\t\t\t}\n\n\t\t\t\t// Consider next node.\n\t\t\t\tbe = (be + 1) % myBackendCount;\n\t\t\t\t}\n\t\t\twhile (be != myNextBackendNumber && jobinfo.count < jobinfo.Np);\n\t\t\tmyNextBackendNumber = be;\n\n\t\t\t// If this job now has Np processes, start running this job.\n\t\t\tif (jobinfo.count == jobinfo.Np)\n\t\t\t\t{\n\t\t\t\t// Log information.\n\t\t\t\tmyLog.log (now, \"Job \" + jobinfo.jobnum + \" started\");\n\n\t\t\t\t// Mark job as running.\n\t\t\t\titer.remove();\n\t\t\t\tmyRunningJobList.add (jobinfo);\n\t\t\t\tjobinfo.state = JobInfo.State.RUNNING;\n\t\t\t\tjobinfo.stateTime = now;\n\n\t\t\t\t// Mark all the job's nodes as running.\n\t\t\t\tfor (BackendInfo backendinfo : jobinfo.backend)\n\t\t\t\t\t{\n\t\t\t\t\tbackendinfo.state = BackendInfo.State.RUNNING;\n\t\t\t\t\tbackendinfo.stateTime = now;\n\t\t\t\t\t}\n\n\t\t\t\t// If the Job Scheduler is imposing a maximum job time, start\n\t\t\t\t// job timer.\n\t\t\t\tif (myJobTime > 0)\n\t\t\t\t\t{\n\t\t\t\t\tjobinfo.jobTimer.start (myJobTime * 1000L);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t// If this job does not yet have Np processes, don't schedule any\n\t\t\t// further jobs.\n\t\t\telse\n\t\t\t\t{\n\t\t\t\tbreak jobLoop;\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Cancel jobs for which there are insufficient resources.\n\t\tfor (JobInfo jobinfo : cancelList)\n\t\t\t{\n\t\t\tdoCancelJobTooFewResources (now, jobinfo);\n\t\t\t}\n\t\t}",
"@InSequence(2)\n @Test\n public void worksInMultipleRuns() throws InterruptedException {\n int sum = sendMessages(14);\n runJob();\n Assert.assertEquals(14, collector.getLastItemCount());\n Assert.assertEquals(sum, collector.getLastSum());\n Assert.assertEquals(2, collector.getNumberOfJobs());\n sum = sendMessages(8);// <1> Sending messages from separate connections makes no difference\n\n sum += sendMessages(4);\n runJob();\n Assert.assertEquals(12, collector.getLastItemCount());\n Assert.assertEquals(sum, collector.getLastSum());\n Assert.assertEquals(3, collector.getNumberOfJobs());\n }",
"List<MiniJobForUser> getMiniJobForUserId( String userId );",
"private String jobs() {\r\n\t\tint[] j=tile.getJobs();\r\n\t\tString out = \"Jobs Are: \";\r\n\t\tfor(int i=0; i<j.length;i++) {\r\n\t\t\tout=out.concat(i+\": \"+(j[i])+\" || \");\r\n\t\t}\r\n\t\treturn out;\r\n\t}",
"abstract void doJob();",
"public void createTasks(Integer _optID, String _tupleTag, String _taskType, String _info1, String _info2, String _destIP, String _port, String _location, long timestamp, Object _appSpecific){ \r\n //System.out.print(\"Create tasks\");\r\n boolean flag = false;\r\n String defaultIP = \"-1\";\r\n String defaultPort = \"-1\";\r\n \r\n //use wildcard to let one worker randomly choose the job to run\r\n //System.out.println(\"---What is optID: \" +_optID);\r\n if(_destIP.equals(\"RANDOM\")){\r\n int tempTaskID = getUpdatedTaskID();\r\n \r\n insertIntoParaList(tempTaskID, _optID, _tupleTag, _taskType,defaultIP,_info1,_info2,defaultPort,_location, timestamp,_appSpecific);\r\n flag = true;\r\n addEntryToResultList(_optID,flag);\r\n //------THE TASK IS INSERTED HERE\r\n insertTask(tempTaskID);\r\n }\r\n //send tuples to all\r\n else if(_destIP.equals(\"ALL\")){\r\n //Iterate through all sites that subscribe to certain types of task \r\n //System.out.println(\"infoSys.getSiteList(): \"+infoSys.getSiteList());\r\n Iterator it = infoSys.getSiteList().entrySet().iterator();\r\n while (it.hasNext()) {\r\n Map.Entry entry = (Map.Entry) it.next();\r\n _destIP = ((String) entry.getKey());\r\n ConcurrentHashMap<String, String> subscribeType = (ConcurrentHashMap<String, String>) entry.getValue();\r\n \r\n //option 2, if there is multiple subscribers of a certain taskType in one site\r\n Iterator subIt = subscribeType.entrySet().iterator();\r\n while (subIt.hasNext()) {\r\n Map.Entry subEntry = (Map.Entry) subIt.next();\r\n String[] typeAndAssociate = subEntry.getValue().toString().split(\",\");\r\n if (typeAndAssociate[0].equals(_tupleTag) && typeAndAssociate[1].equals(_taskType)) {\r\n _port = subEntry.getKey().toString();\r\n\r\n int tempTaskID = getUpdatedTaskID();\r\n insertIntoParaList(tempTaskID, _optID, _tupleTag, _taskType,_destIP, _info1,_info2,_port,_location, timestamp,_appSpecific);\r\n //System.out.println(\"Master out: \"+\"--\"+_tupleTag+\"--\"+_taskType+\"--\"+_optID+\"--\"+_destIP+\"--\"+_budget+\"--\"+_deadline+\"--\"+_port);\r\n flag = true;\r\n addEntryToResultList(_optID,flag);\r\n //------THE TASK IS INSERTED HERE\r\n insertTask(tempTaskID);\r\n \r\n }\r\n }\r\n }\r\n }\r\n //if user choose one specific worker, only send the message to it\r\n else{ \r\n //System.out.println(infoSys.getSiteList());\r\n //Check if this subscriber exists\r\n if (infoSys.hasAssociateSubscriber(_destIP, _port)) {\r\n int tempTaskID = getUpdatedTaskID();\r\n //System.out.println(\"Master out: \"+\"--\"+_tupleTag+\"--\"+_taskType+\"--\"+_optID+\"--\"+_destIP+\"--\"+_budget+\"--\"+_deadline+\"--\"+_port);\r\n insertIntoParaList(tempTaskID, _optID, _tupleTag, _taskType,_destIP,_info1,_info2,_port,_location, timestamp,_appSpecific);\r\n flag = true;\r\n addEntryToResultList(_optID,flag);\r\n insertTask(tempTaskID);\r\n } else {\r\n System.out.println(\"Incorrect destIP or destPort for creating task!\");\r\n }\r\n } \r\n //create entry in resultList\r\n addEntryToResultList(_optID,flag);\r\n }",
"public static void addDescriptionToAllGames(MongoConnection MONGO) throws Exception\n {\n int maxGameID= MONGO.getMaxGameId().element;\n int maxThreads = 30; //Number of threads\n \n System.out.println(\"Attempting to create \" + maxThreads + \" threads for scraping (maxGameID = \" + maxGameID);\n for(int i=0;i<maxThreads;i++)\n new ScrapingThread(i,maxGameID,maxThreads,new MongoConnection(\"172.16.0.80\",27018)).start();\n System.out.println(\"Threads Successfully created\");\n }",
"public Job(int id) {\n this.id = id;\n }",
"public static void main(String[] args) {\n int m = Integer.parseInt(args[0]);\n MinPQ<Transaction> pq = new MinPQ<Transaction>(m + 1);\n\n while (StdIn.hasNextLine()) {\n // Create an entry from the next line and put on the PQ.\n String line = StdIn.readLine();\n Transaction transaction = new Transaction(line);\n pq.insert(transaction);\n\n // remove minimum if m+1 entries on the PQ\n if (pq.size() > m)\n pq.delMin();\n } // top m entries are on the PQ\n\n // print entries on PQ in reverse order\n Stack<Transaction> stack = new Stack<Transaction>();\n for (Transaction transaction : pq)\n stack.push(transaction);\n for (Transaction transaction : stack)\n StdOut.println(transaction);\n }",
"private void query(){\n synchronized (slaveList) {\n for (Integer ID : slaveList.keySet()) {\n SDSlave slaveNode = slaveList.get(ID);\n slaveNode.out.write(\"Alive?\\n\");\n slaveNode.out.flush();\n }\n }\n }",
"public void startPopulateWorkers(){\r\n\t\tArrayList<Thread> threads = new ArrayList<Thread>();\r\n\t\t\r\n\t\t//Create threads\r\n\t\tfor(int i = 0; i < pts.length; i++){\r\n\t\t\tthreads.add(new Thread(pts[i]));\r\n\t\t\tthreads.get(i).start();\r\n\t\t}\r\n\t\t\r\n\t\t//Wait for threads to finish\r\n\t\tfor(int i = 0; i < pts.length; i++){\r\n\t\t\ttry {\r\n\t\t\t\tthreads.get(i).join();\r\n\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\tthrow new RuntimeException(e.getMessage());\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\r\n public void generateTasks() {\r\n int tasks = Integer.parseInt(this.getProperty(\"numTask\", \"1000\"));\r\n setNumOfTasks(tasks);\r\n //TODO:fixed port here !!!! need to change!!!\r\n serverPort = Integer.parseInt(this.getProperty(\"reqServerPort\", \"5560\")); \r\n PROC_MAX = Integer.parseInt(this.getProperty(\"reqServerMaxConcurrentClients\",\"10\"));\r\n location = this.getProperty(\"location\", \"rutgers\");\r\n energyplusPropertyFile = this.getProperty(\"energyplusTemplate\", \"energyplus.property\");\r\n \r\n winnerTakeAll = Boolean.parseBoolean(this.getProperty(\"winnerTakeAll\",\"true\"));\r\n jobDistributionMap = new HashMap<Integer,Integer>();\r\n copyJobDistributionMap = new HashMap<Integer,Integer>();\r\n //System.out.println(\"energyplusPropertyFile:\"+energyplusPropertyFile);\r\n \r\n initInfoSystem();\r\n initDistributionSystem();\r\n startFedServer();\r\n }",
"JobClient createJobClient();",
"public interface ThreadPool<Job extends Runnable> {\n\n void execute(Job job);\n\n void shutDown();\n\n void addWorkers(int num);\n\n void removeWorkers(int num);\n\n int getJobSize();\n\n}",
"@Override\n public void run() {\n if (nearMe.size() < HelperConstants.MAX_BYZANTINE_USERS + 1) {\n // If there are less nearby neighbors than required, there is no need to ask for proofs\n return;\n }\n\n for (GridUser gridUser: nearMe) {\n int targetPort = Utils.getListenerServicePortFromId(gridUser.getId());\n\n Thread t = new Thread(() -> sendRecordAndReceive(myRequest, gridUser, targetPort));\n t.start();\n ongoingProofRequests.add(t);\n }\n\n try {\n for (Thread t: ongoingProofRequests) {\n t.join();\n }\n } catch (InterruptedException e) {\n e.printStackTrace();\n for (Thread t: ongoingProofRequests) t.interrupt();\n }\n }",
"public Job getJob();",
"@Override\r\n\tpublic List<IncomingJobResponse> getJobList() {\n\t\tList<IncomingJobs> js = (List<IncomingJobs>)incomingRepository.fetchincomingJobs();\r\n\t\tList<IncomingJobResponse> joblist = new ArrayList<IncomingJobResponse>();\r\n\t\tfor(IncomingJobs job :js){\r\n\t\t\tIncomingJobResponse jobs = new IncomingJobResponse();\r\n\t\t\tSystem.out.println(\"ATA:\"+job.getAta()+\"ETA:\"+job.getEta());\r\n\t\t\tjobs.setJobid(job.getID());\r\n\t\t\t\r\n\t\t\tif(job.getEta()!=null){\r\n\t\t\tjobs.setEta(job.getEta().toString());\r\n\t\t\t}\r\n\t\t\tif(job.getAta()!=null){\r\n\t\t\tjobs.setAta(job.getAta().toString());\r\n\t\t\t}\r\n\t\t\tjobs.setBroker(job.getBroker());\r\n\t\t\tjobs.setClear(job.getClear());\r\n\t\t\tjobs.setConsignee(job.getConsignee());\r\n\t\t\tjobs.setDestination(job.getDestination());\r\n\t\t\tjobs.setFlight(job.getFlight());\r\n\t\t\tjobs.setHawb(job.getHawb());\r\n\t\t\tjobs.setHeld(job.getHeld());\r\n\t\t\tjobs.setMawb(job.getMawb());\r\n\t\t\tjobs.setMLID(job.getMLID());\r\n\t\t\tjobs.setNote(job.getNote());\r\n\t\t\tjobs.setOutturn(job.getOutturn());\r\n\t\t\tjobs.setPiece(job.getPiece());\r\n\t\t\tjobs.setWeight(job.getWeight());\r\n\t\t\tif(job.getInjectionDate()!=null){\r\n\t\t\t\tjobs.setInjectionDate(job.getInjectionDate().toString());\r\n\t\t\t\t}\r\n\t\t\tif(job.getClearanceDate()!=null){\r\n\t\t\t\tjobs.setClearanceDate(job.getClearanceDate().toString());\r\n\t\t\t\t}\r\n\t\t\tjobs.setDamage(job.getDamageNotes());\r\n\t\t\tjobs.setSurplus(job.getSurplusShortage());\r\n\t\t\tjoblist.add(jobs);\r\n\t\t\t\r\n\t\t}\r\n\t\treturn joblist;\r\n\t}",
"public static void main(String[] args) {\n int id = Integer.parseInt(args[0]);\n String hostname = args[1];\n int port = Integer.parseInt(args[2]);\n int timeBetweenRequests = Integer.parseInt(args[3]);\n int timeInCriticalSection = Integer.parseInt(args[4]);\n int numTotalRequests = Integer.parseInt(args[5]);\n String mutexAlgorithmName = args[6];\n String neighborString = args[7];\n\n System.out.println(\"Id: \" + id);\n System.out.println(\"Hostname: \" + hostname);\n System.out.println(\"Port: \" + port);\n\n Node node = new Node(id, hostname, port, mutexAlgorithmName, timeBetweenRequests,\n timeInCriticalSection, numTotalRequests);\n\n String[] neighbors = neighborString.split(\",\");\n\n for (String n : neighbors) {\n String[] neighborParams = n.split(\":\");\n\n int neighborId = Integer.parseInt(neighborParams[0]);\n String neighborHostname = neighborParams[1];\n int neighborPort = Integer.parseInt(neighborParams[2]);\n\n if (neighborId != id) {\n node.addNeighbor(neighborId, neighborHostname, neighborPort);\n }\n }\n\n node.startServer();\n\n try {\n TimeUnit.SECONDS.sleep(10);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n node.run();\n\n node.stopServer();\n\n\t\tSystem.out.printf(\"%d finished\\n\", id);\n }",
"@Override\n\tpublic void execute() {\n\t\tlog.info(\"running...\");\n\n\n\t\t/* example for finding the server agent */\n\t\tIAgentDescription serverAgent = thisAgent.searchAgent(new AgentDescription(null, \"ServerAgent\", null, null, null, null));\n\t\tif (serverAgent != null) {\n\t\t\tthis.server = serverAgent.getMessageBoxAddress();\n\n\t\t\t// TODO\n\t\t\tif (!hasGameStarted) {\n\t\t\t\tStartGameMessage startGameMessage = new StartGameMessage();\n\t\t\t\tstartGameMessage.brokerId = thisAgent.getAgentId();\n\t\t\t\tstartGameMessage.gridFile = \"/grids/h_01.grid\";\n\t\t\t\t// Send StartGameMessage(BrokerID)\n\t\t\t\tsendMessage(server, startGameMessage);\n\t\t\t\treward = 0;\n\t\t\t\tthis.hasGameStarted = true;\n\t\t\t}\n\n\t\t} else {\n\t\t\tSystem.out.println(\"SERVER NOT FOUND!\");\n\t\t}\n\n\n\t\t/* example of handling incoming messages without listener */\n\t\tfor (JiacMessage message : memory.removeAll(new JiacMessage())) {\n\t\t\tObject payload = message.getPayload();\n\n\t\t\tif (payload instanceof StartGameResponse) {\n\t\t\t\t/* do something */\n\n\t\t\t\t// TODO\n\t\t\t\tStartGameResponse startGameResponse = (StartGameResponse) message.getPayload();\n\n\t\t\t\tthis.maxNum = startGameResponse.initialWorkers.size();\n\t\t\t\tthis.agentDescriptions = getMyWorkerAgents(this.maxNum);\n\t\t\t\tthis.gameId = startGameResponse.gameId;\n\n\t\t\t\t/**\n\t\t\t\t *\n\t\t\t\t * DEBUGGING\n\t\t\t\t *\n\t\t\t\t */\n\t\t\t\tSystem.out.println(\"SERVER SENDING \" + startGameResponse.toString());\n\n\t\t\t\t// TODO handle movements and obstacles\n\t\t\t\tthis.gridworldGame = new GridworldGame();\n\t\t\t\tthis.gridworldGame.obstacles.addAll(startGameResponse.obstacles);\n\n\n\n\t\t\t\t// TODO nicht mehr worker verwenden als zur Verfügung stehen\n\n\t\t\t\t/**\n\t\t\t\t * Initialize the workerIdMap to get the agentDescription and especially the\n\t\t\t\t * MailBoxAdress of the workerAgent which we associated with a specific worker\n\t\t\t\t *\n\n\t\t\t\tfor (Worker worker: startGameResponse.initialWorkers) {\n\t\t\t\t\tworkerIdMap.put(worker.id, this.agentDescriptions.get(startGameResponse.initialWorkers.indexOf(worker)));\n\t\t\t\t\tworkerIdReverseAId.put(this.agentDescriptions.get(startGameResponse.initialWorkers.indexOf(worker)).getAid(), worker.id);\n\t\t\t\t} */\n\n\t\t\t\t/**\n\t\t\t\t * Send the Position messages to each Agent for a specific worker\n\t\t\t\t * PositionMessages are sent to inform the worker where it is located\n\t\t\t\t * additionally put the position of the worker in the positionMap\n\t\t\t\t */\n\t\t\t\tfor (Worker worker: startGameResponse.initialWorkers) {\n\t\t\t\t\tpositionMap.put(worker.id, worker.position);\n\n\t\t\t\t\tworkerIdMap.put(worker.id, this.agentDescriptions.get(startGameResponse.initialWorkers.indexOf(worker)));\n\t\t\t\t\tworkerIdReverseAID.put(this.agentDescriptions.get(startGameResponse.initialWorkers.indexOf(worker)).getAid(), worker.id);\n\n\t\t\t\t\tIAgentDescription agentDescription = workerIdMap.get(worker.id);\n\t\t\t\t\tICommunicationAddress workerAddress = agentDescription.getMessageBoxAddress();\n\n\t\t\t\t\t// Send each Agent their current position\n\t\t\t\t\tPositionMessage positionMessage = new PositionMessage();\n\t\t\t\t\tpositionMessage.workerId = agentDescription.getAid();\n\t\t\t\t\tpositionMessage.gameId = startGameResponse.gameId;\n\t\t\t\t\tpositionMessage.position = worker.position;\n\t\t\t\t\tpositionMessage.workerIdForServer = worker.id;\n\t\t\t\t\t//System.out.println(\"ADDRESS IS \" + workerAddress);\n\n\t\t\t\t\tsendMessage(workerAddress, positionMessage);\n\t\t\t\t\t//break;\n\t\t\t\t}\n\n\t\t\t\thasAgents = true;\n\n\t\t\t\tfor (Order order: savedOrders) {\n\t\t\t\t\t// 3 Runden anfangs zum Initialisieren\n\t\t\t\t\tICommunicationAddress workerAddress = decideOrderAssigment(order);\n\t\t\t\t\tPosition workerPosition = null;\n\t\t\t\t\tfor (IAgentDescription agentDescription: agentDescriptions) {\n\t\t\t\t\t\tif (agentDescription.getMessageBoxAddress().equals(workerAddress)) {\n\t\t\t\t\t\t\tString workerId = workerIdReverseAID.get(agentDescription.getAid());\n\t\t\t\t\t\t\tworkerPosition = positionMap.get(workerId);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tint steps = workerPosition.distance(order.position) + 2;\n\t\t\t\t\tint rewardMove = (steps > order.deadline)? 0 : order.value - steps * order.turnPenalty;\n\n\t\t\t\t\tSystem.out.println(\"REWARD: \" + rewardMove);\n\n\t\t\t\t\tif(rewardMove > 0) {\n\t\t\t\t\t\tTakeOrderMessage takeOrderMessage = new TakeOrderMessage();\n\t\t\t\t\t\ttakeOrderMessage.orderId = order.id;\n\t\t\t\t\t\ttakeOrderMessage.brokerId = thisAgent.getAgentId();\n\t\t\t\t\t\ttakeOrderMessage.gameId = gameId;\n\t\t\t\t\t\tsendMessage(server, takeOrderMessage);\n\n\t\t\t\t\t\t// Save order into orderMap\n\t\t\t\t\t\tthis.orderMap.put(order.id, order);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (payload instanceof PositionConfirm) {\n\t\t\t\tPositionConfirm positionConfirm = (PositionConfirm) message.getPayload();\n\t\t\t\tif(positionConfirm.state == Result.FAIL) {\n\t\t\t\t\tString workerId = workerIdReverseAID.get(positionConfirm.workerId);\n\t\t\t\t\tIAgentDescription agentDescription = workerIdMap.get(workerId);\n\t\t\t\t\tICommunicationAddress workerAddress = agentDescription.getMessageBoxAddress();\n\n\t\t\t\t\tPositionMessage positionMessage = new PositionMessage();\n\n\t\t\t\t\tpositionMessage.workerId = agentDescription.getAid();\n\t\t\t\t\tpositionMessage.gameId = positionConfirm.gameId;\n\t\t\t\t\tpositionMessage.position = positionMap.get(workerId);\n\t\t\t\t\tpositionMessage.workerIdForServer = workerId;\n\n\t\t\t\t\tsendMessage(workerAddress, positionMessage);\n\t\t\t\t} else {\n\t\t\t\t\tactiveWorkers.add(message.getSender());\n\t\t\t\t\tfor (String orderId: orderMessages) {\n\t\t\t\t\t\tICommunicationAddress workerAddress = decideOrderAssigment(this.orderMap.get(orderId));\n\t\t\t\t\t\tif(workerAddress.equals(message.getSender())){\n\t\t\t\t\t\t\tAssignOrderMessage assignOrderMessage = new AssignOrderMessage();\n\t\t\t\t\t\t\tassignOrderMessage.order = this.orderMap.get(orderId);\n\t\t\t\t\t\t\tassignOrderMessage.gameId = gameId;\n\t\t\t\t\t\t\tassignOrderMessage.server = this.server;\n\t\t\t\t\t\t\tif(activeWorkers.contains(workerAddress)){\n\t\t\t\t\t\t\t\tsendMessage(workerAddress, assignOrderMessage);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\n\n\t\t\tif (payload instanceof OrderMessage) {\n\n\t\t\t\t// TODO entscheide, ob wir die Order wirklich annehmen wollen / können\n\n\t\t\t\tOrderMessage orderMessage = (OrderMessage) message.getPayload();\n\n\t\t\t\tif (!hasAgents){\n\t\t\t\t\tsavedOrders.add(orderMessage.order);\n\t\t\t\t\tcontinue;\n\t\t\t\t}else {\n\t\t\t\t\tOrder thisOrder = orderMessage.order;\n\n\t\t\t\tICommunicationAddress workerAddress = decideOrderAssigment(thisOrder);\n\t\t\t\tPosition workerPosition = null;\n\t\t\t\tfor (IAgentDescription agentDescription: agentDescriptions) {\n\t\t\t\t\tif (agentDescription.getMessageBoxAddress().equals(workerAddress)) {\n\t\t\t\t\t\tString workerId = workerIdReverseAID.get(agentDescription.getAid());\n\t\t\t\t\t\tworkerPosition = positionMap.get(workerId);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// 3 Runden anfangs zum Initialisieren\n\t\t\t\t\tint steps = workerPosition.distance(thisOrder.position) + 1;\n\t\t\t\t\tint rewardMove = (steps > thisOrder.deadline)? 0 : thisOrder.value - steps * thisOrder.turnPenalty;\n\n\n\t\t\t\t\tSystem.out.println(\"REWARD: \" + rewardMove);\n\n\t\t\t\tif(rewardMove > 0) {\n\t\t\t\t\tTakeOrderMessage takeOrderMessage = new TakeOrderMessage();\n\t\t\t\t\ttakeOrderMessage.orderId = orderMessage.order.id;\n\t\t\t\t\ttakeOrderMessage.brokerId = thisAgent.getAgentId();\n\t\t\t\t\ttakeOrderMessage.gameId = orderMessage.gameId;\n\t\t\t\t\tsendMessage(server, takeOrderMessage);\n\n\t\t\t\t\t// Save order into orderMap\n\t\t\t\t\tOrder order = ((OrderMessage) message.getPayload()).order;\n\t\t\t\t\tthis.orderMap.put(order.id, order);\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t/**\n\t\t\t\t *\n\t\t\t\t * DEBUGGING\n\t\t\t\t *\n\t\t\t\t */\n\t\t\t\tSystem.out.println(\"SERVER SENDING \" + orderMessage.toString());\n\n\t\t\t\t// Save order into orderMap\n\n\t\t\t}\n\n\t\t\tif (payload instanceof TakeOrderConfirm) {\n\n\t\t\t\t// TODO\n\t\t\t\t// Got Order ?!\n\t\t\t\tTakeOrderConfirm takeOrderConfirm = (TakeOrderConfirm) message.getPayload();\n\t\t\t\tResult result = takeOrderConfirm.state;\n\n\t\t\t\t/**\n\t\t\t\t *\n\t\t\t\t * DEBUGGING\n\t\t\t\t *\n\t\t\t\t */\n\t\t\t\tSystem.out.println(\"SERVER SENDING \" + takeOrderConfirm.toString());\n\n\t\t\t\tif (result == Result.FAIL) {\n\t\t\t\t\t// Handle failed confirmation\n\n\t\t\t\t\t// Remove order from orderMap as it was rejected by the server\n\t\t\t\t\tthis.orderMap.remove(takeOrderConfirm.orderId);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\n\t\t\t\t// TODO send serverAddress\n\t\t\t\t// Assign order to Worker(Bean)\n\t\t\t\t// Send the order to the first agent\n\t\t\t\tAssignOrderMessage assignOrderMessage = new AssignOrderMessage();\n\t\t\t\tassignOrderMessage.order = this.orderMap.get(takeOrderConfirm.orderId);\n\t\t\t\tassignOrderMessage.gameId = takeOrderConfirm.gameId;\n\t\t\t\tassignOrderMessage.server = this.server;\n\t\t\t\tICommunicationAddress workerAddress = decideOrderAssigment(assignOrderMessage.order);\n\t\t\t\tif(activeWorkers.contains(workerAddress)){\n\t\t\t\t\tsendMessage(workerAddress, assignOrderMessage);\n\t\t\t\t} else {\n\t\t\t\t\torderMessages.add(takeOrderConfirm.orderId);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif (payload instanceof AssignOrderConfirm) {\n\n\t\t\t\t// TODO\n\t\t\t\tAssignOrderConfirm assignOrderConfirm = (AssignOrderConfirm) message.getPayload();\n\t\t\t\tResult result = assignOrderConfirm.state;\n\n\t\t\t\tif (result == Result.FAIL) {\n\t\t\t\t\t// Handle failed confirmation\n\t\t\t\t\t// TODO\n\t\t\t\t\tICommunicationAddress alternativeWorkerAddress = getAlternativeWorkerAddress(((AssignOrderConfirm) message.getPayload()).workerId);\n\t\t\t\t\treassignOrder(alternativeWorkerAddress, assignOrderConfirm);\n\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\torderMessages.remove(assignOrderConfirm.orderId);\n\n\t\t\t\t// TODO Inform other workers that this task is taken - notwendig??\n\n\t\t\t}\n\n\t\t\tif (payload instanceof OrderCompleted) {\n\n\t\t\t\tOrderCompleted orderCompleted = (OrderCompleted) message.getPayload();\n\t\t\t\tResult result = orderCompleted.state;\n\n\t\t\t\tif (result == Result.FAIL) {\n\t\t\t\t\t// TODO Handle failed order completion -> minus points for non handled rewards\n\t\t\t\t\treward += orderCompleted.reward;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\treward += orderCompleted.reward;\n\t\t\t\t// TODO remove order from the worker specific order queues\n\n\t\t\t}\n\n\t\t\tif (payload instanceof PositionUpdate) {\n\n\t\t\t\tPositionUpdate positionUpdate = (PositionUpdate) message.getPayload();\n\t\t\t\tupdateWorkerPosition(positionUpdate.position, positionUpdate.workerId);\n\n\t\t\t}\n\n\t\t\tif (payload instanceof EndGameMessage) {\n\n\t\t\t\tEndGameMessage endGameMessage = (EndGameMessage) message.getPayload();\n\t\t\t\t// TODO lernen lernen lernen lol\n\t\t\t\tSystem.out.println(\"Reward: \" + endGameMessage.totalReward);\n\t\t\t}\n\n\t\t}\n\t}",
"public static void main (String args[]) throws IOException{\n\t\tint PUERTO=4444;\n\t\tServerSocket servidor = new ServerSocket(PUERTO);\n\t\tSystem.out.println(\"Servidor iniciado...\");\n\t\t\n\t\tSocket tabla[] = new Socket[MAXIMO];\n\t\tComunHilos comun = new ComunHilos(MAXIMO, 0,0, tabla);\n\t\t\n\t\twhile(comun.getCONEXIONES()<MAXIMO) {\n\t\t\tSocket socket= new Socket();\n\t\t\tsocket= servidor.accept(); //esperando cliente\n\t\t\t\n\t\t\t//OBKETO COMPARTIDO POR LOS HILOS\n\t\t\t\n\t\t\tcomun.addtabla(socket, comun.getCONEXIONES());\n\t\t\tcomun.setACTUALES(comun.getACTUALES()+1);\n\t\t\tcomun.setCONEXIONES(comun.getCONEXIONES()+1);\n\t\t\t\n\t\t\tHiloservidorChat hilo = new HiloservidorChat(socket, comun);\n\t\t\thilo.start();\n\t\t}\n\t\tservidor.close();\n\t}",
"cb.Careerbuilder.JobOrBuilder getJobsOrBuilder(\n int index);",
"public void doJob() {\n if(User.count() == 0) {\n\t // Create classification dimensions\n\t ClassificationDimension whatDimension = new\n\t\t\t ClassificationDimension(\"What\", ClassificationDimension.WHAT_DIMENSION_ID);\n\t ClassificationDimension whereDimension = new\n\t\t\t ClassificationDimension(\"Where\", ClassificationDimension.WHERE_DIMENSION_ID);\n\t whatDimension.save();\n\t whereDimension.save();\n\n\t // Admin user\n\t User admin = new User(ADMIN_USER_EMAIL, ADMIN_USER_PASSWORD);\n\t admin.name = \"Admin user\";\n\t admin.save();\n\n\t // Tester user\n\t User tester = new User(TEST_USER_EMAIL, TEST_USER_PASSWORD);\n\t\t tester.name = \"Test user\";\n\t\t tester.save();\n\n\t // Tutorial user\n\t User tutorial = new User(TUTORIAL_USER_EMAIL, TUTORIAL_USER_PASSWORD);\n\t tutorial.name = \"Tutorial user\";\n\t tutorial.save();\n\n\t // First RCA case\n\t RCACase firstRCACase = new RCACase(tester);\n\t firstRCACase.caseName = \"\";\n\t firstRCACase.caseName = \"Test RCA case\";\n\t\t\tfirstRCACase.caseTypeValue = 2;\n\t\t\tfirstRCACase.caseGoals = \"Save the world\";\n\t\t\tfirstRCACase.companySizeValue = 2;\n\t\t\tfirstRCACase.description = \"We are going to save the world with our ARCA-tool!\";\n\t\t\tfirstRCACase.isMultinational = true;\n\t\t\tfirstRCACase.companyName = \"WiRCA\";\n\t\t\tfirstRCACase.companyProducts = \"ARCA-tool\";\n\t\t\tfirstRCACase.isCasePublic = true;\n\n\t // Problem of the first RCA case\n\t firstRCACase.problem = new Cause(firstRCACase, firstRCACase.caseName, tester).save();\n\t firstRCACase.save();\n\t tester.addRCACase(firstRCACase);\n\t tester.save();\n\t \n\t Cause testNode1 = firstRCACase.problem.addCause(\"test node 1\", tester);\n\t\t\ttestNode1.xCoordinate = -100;\n\t\t\ttestNode1.save();\n\t Cause testNode2 = firstRCACase.problem.addCause(\"test node 2\", tester);\n\t Cause testNode3 = testNode1.addCause(\"test node 3\", tester);\n\t\t\ttestNode3.xCoordinate = -75;\n\t\t\ttestNode3.save();\n\t Cause testNode4 = testNode1.addCause(\"test node 4\", tester);\n\t Cause testNode5 = testNode1.addCause(\"test node 5\", tester);\n\t\t\ttestNode5.xCoordinate = -200;\n\t\t\ttestNode5.save();\n\t Cause testNode6 = testNode2.addCause(\"test node 6\", tester);\n\t\t\ttestNode6.xCoordinate = 0;\n\t\t\ttestNode6.save();\n\t Cause testNode7 = testNode5.addCause(\"test node 7\", tester);\n\t Cause testNode8 = testNode4.addCause(\"test node 8\", tester);\n\t\t\ttestNode8.xCoordinate = 0;\n\t\t\ttestNode8.save();\n\t Cause testNode9 = testNode5.addCause(\"test node 9\", tester);\n\t\t\ttestNode9.xCoordinate = -100;\n\t\t\ttestNode9.save();\n\t Cause testNode10 = testNode9.addCause(\"test node 10\", tester);\n\t testNode7.addCause(testNode3);\n\t testNode8.addCause(testNode6);\n\t testNode10.addCause(testNode6);\n\n\t // Some classifications for \"firstRCACase\"\n\t Classification testClassification1 = new Classification(firstRCACase,\"Management\",admin,ClassificationDimension.WHERE_DIMENSION_ID,\n\t \"MA\", \"MA\");\n\t Classification testClassification2 = new Classification(firstRCACase,\"Software Testing\",admin,ClassificationDimension.WHERE_DIMENSION_ID,\n\t \"ST\", \"ST\");\n\t Classification testClassification3 = new Classification(firstRCACase,\"Implementation Work\",admin,ClassificationDimension.WHERE_DIMENSION_ID,\n\t \"IM\", \"IM\");\n\t Classification testClassification4 = new Classification(firstRCACase,\"Work Practices\",admin,ClassificationDimension.WHAT_DIMENSION_ID,\n\t \"WP\", \"WP\");\n\t Classification testClassification5 = new Classification(firstRCACase,\"Methods\",admin,ClassificationDimension.WHAT_DIMENSION_ID,\n\t \"ME\", \"ME\");\n\t Classification testClassification6 = new Classification(firstRCACase,\"Task Priority\",admin,ClassificationDimension.WHAT_DIMENSION_ID,\n\t \"TP\", \"TP\");\n\t Classification testClassification7 = new Classification(firstRCACase,\"Monitoring\",admin,ClassificationDimension.WHAT_DIMENSION_ID,\n\t \"MO\", \"MO\");\n\t Classification testClassification8 = new Classification(firstRCACase,\"Co-operation\",admin,ClassificationDimension.WHAT_DIMENSION_ID,\n\t \"CO\", \"CO\");\n\t testClassification1.save();\n\t testClassification2.save();\n\t testClassification3.save();\n\t testClassification4.save();\n\t testClassification5.save();\n\t testClassification6.save();\n\t testClassification7.save();\n\t testClassification8.save();\n\n\t ClassificationPair pair = new ClassificationPair(testClassification1, testClassification4);\n\t pair.save();\n\t SortedSet<ClassificationPair> set1 = new TreeSet<ClassificationPair>();\n\t set1.add(pair);\n\t testNode1.setClassifications(set1);\n\t testNode1.save();\n\n\t ClassificationPair pair2 = new ClassificationPair(testClassification1, testClassification4);\n\t pair2.save();\n\t SortedSet<ClassificationPair> set2 = new TreeSet<ClassificationPair>();\n\t set2.add(pair2);\n\t testNode2.setClassifications(set2);\n\t testNode2.save();\n\n final Calendar calendar = Calendar.getInstance();\n RCACase adminsPrivateCase = new RCACase(admin);\n\t adminsPrivateCase.caseName = \"\";\n\t adminsPrivateCase.caseName = \"Admin's private RCA case\";\n\t adminsPrivateCase.caseTypeValue = 2;\n\t\t\tadminsPrivateCase.caseGoals = \"Test the program\";\n\t\t\tadminsPrivateCase.companySizeValue = 2;\n\t\t\tadminsPrivateCase.description = \"We are going to save the world with our ARCA-tool!\";\n\t\t\tadminsPrivateCase.isMultinational = true;\n\t\t\tadminsPrivateCase.companyName = \"WiRCA\";\n\t\t\tadminsPrivateCase.companyProducts = \"ARCA-tool\";\n\t adminsPrivateCase.isCasePublic = false;\n\t adminsPrivateCase.problem = new Cause(adminsPrivateCase, adminsPrivateCase.caseName, admin).save();\n calendar.set(2011,Calendar.DECEMBER,02,11,31);\n adminsPrivateCase.created = calendar.getTime();\n adminsPrivateCase.save();\n\t admin.addRCACase(adminsPrivateCase);\n\t admin.save();\n\t tester.addRCACase(adminsPrivateCase);\n\t tester.save();\n\n\t RCACase adminsOwnPrivateCase = new RCACase(admin);\n adminsOwnPrivateCase.caseName = \"\";\n adminsOwnPrivateCase.caseName = \"Admin's own private RCA case\";\n adminsOwnPrivateCase.caseTypeValue = 2;\n adminsOwnPrivateCase.caseGoals = \"Test the program\";\n adminsOwnPrivateCase.companySizeValue = 2;\n adminsOwnPrivateCase.description = \"We are going to save the world with our ARCA-tool!\";\n adminsOwnPrivateCase.isMultinational = true;\n adminsOwnPrivateCase.companyName = \"WiRCA\";\n\t adminsOwnPrivateCase.companyProducts = \"ARCA-tool\";\n adminsOwnPrivateCase.isCasePublic = false;\n adminsOwnPrivateCase.problem = new Cause(adminsOwnPrivateCase, adminsOwnPrivateCase.caseName, admin).save();\n calendar.set(2012,Calendar.JUNE,05,10,30);\n adminsOwnPrivateCase.created = calendar.getTime();\n adminsOwnPrivateCase.save();\n admin.addRCACase(adminsOwnPrivateCase);\n admin.save();\n\n\t RCACase adminsPublicCase = new RCACase(admin);\n\t adminsPublicCase.caseName = \"\";\n\t adminsPublicCase.caseName = \"Admin's public RCA case\";\n\t adminsPublicCase.caseTypeValue = 2;\n\t\t\tadminsPublicCase.caseGoals = \"Test the program\";\n\t\t\tadminsPublicCase.companySizeValue = 2;\n\t\t\tadminsPublicCase.description = \"We are going to save the world with our ARCA-tool!\";\n\t\t\tadminsPublicCase.isMultinational = true;\n\t\t\tadminsPublicCase.companyName = \"WiRCA\";\n\t\t\tadminsPublicCase.companyProducts = \"ARCA-tool\";\n\t adminsPublicCase.isCasePublic = true;\n\t adminsPublicCase.problem = new Cause(adminsPublicCase, adminsPublicCase.caseName, admin).save();\n calendar.set(2011,Calendar.DECEMBER,6,22,12);\n adminsPublicCase.created = calendar.getTime();\n adminsPublicCase.save();\n\t admin.addRCACase(adminsPublicCase);\n\t admin.save();\n\t tester.addRCACase(adminsPublicCase);\n\t tester.save();\n\n\n\t Classification classification1 = new Classification(adminsPublicCase,\"Management\",admin,ClassificationDimension.WHERE_DIMENSION_ID,\n\t \"MA\", \"MA\");\n\t Classification classification2 = new Classification(adminsPublicCase,\"Software Testing\",admin,ClassificationDimension.WHERE_DIMENSION_ID,\n\t \"ST\", \"ST\");\n\t Classification classification3 = new Classification(adminsPublicCase,\"Implementation Work\",admin,ClassificationDimension.WHERE_DIMENSION_ID,\n\t \"IM\", \"IM\");\n\t Classification classification4 = new Classification(adminsPublicCase,\"Work Practices\",admin,ClassificationDimension.WHAT_DIMENSION_ID,\n\t \"WP\", \"WP\");\n\t Classification classification5 = new Classification(adminsPublicCase,\"Methods\",admin,ClassificationDimension.WHAT_DIMENSION_ID,\n\t \"ME\", \"ME\");\n\t Classification classification6 = new Classification(adminsPublicCase,\"Task Priority\",admin,ClassificationDimension.WHAT_DIMENSION_ID,\n\t \"TP\", \"TP\");\n\t Classification classification7 = new Classification(adminsPublicCase,\"Monitoring\",admin,ClassificationDimension.WHAT_DIMENSION_ID,\n\t \"MO\", \"MO\");\n\t Classification classification8 = new Classification(adminsPublicCase,\"Co-operation\",admin,ClassificationDimension.WHAT_DIMENSION_ID,\n\t \"CO\", \"CO\");\n\t classification1.save();\n\t classification2.save();\n\t classification3.save();\n\t classification4.save();\n\t classification5.save();\n\t classification6.save();\n\t classification7.save();\n\t classification8.save();\n\n\t //new TutorialRCACaseJob().doJob(tester, true);\n\t new TutorialRCACaseJob().doJob(tutorial,true);\n\n\t }\n }",
"public static void main(String args[]) {\n int portNumber = 2228;\r\n if (args.length < 1) {\r\n System.out.println(\"Usage: java MultiThreadChatServerSync <portNumber>\\n\"\r\n + \"Now using port number=\" + portNumber);\r\n } else {\r\n portNumber = Integer.valueOf(args[0]);\r\n }\r\n\r\n try {\r\n serverSocket = new ServerSocket(portNumber);\r\n } catch (IOException e) {\r\n System.out.println(e);\r\n }\r\n\r\n /*\r\n * Create a client socket for each connection and pass it to a new client\r\n * thread.\r\n */\r\n while (true) {\r\n try {\r\n clientSocket = serverSocket.accept();\r\n int i = 0;\r\n for (i = 0; i < maxClientsCount; i++) {\r\n if (threads[i] == null) {\r\n (threads[i] = new clientThread(clientSocket, threads, history, userList)).start();\r\n break;\r\n }\r\n }\r\n if (i == maxClientsCount) {\r\n PrintStream os = new PrintStream(clientSocket.getOutputStream());\r\n os.println(\"Server too busy. Try later.\");\r\n os.close();\r\n clientSocket.close();\r\n }\r\n } catch (IOException e) {\r\n System.out.println(e);\r\n }\r\n }\r\n }",
"@Override\n\tpublic Object[] splitTasks() {\n\t\tif (tasks == null) {\n\t\t\tSystem.out.println(\"There are \"+taskNum +\" tasks, and handled by \"+clientsNum+\" clients\");\n\t\t}\t\t\n\t\ttasks = new SimpleTask[clientsNum];\n\t\ttq = taskNum / clientsNum;\n//\t\tbatchSize = tq;\n\t\tint left = taskNum - tq * clientsNum;\n\t\t\n\t\tfor (int i = 0; i < tasks.length; i++) {\n\t\t\tint l = 0;\n\t\t\tif (left >= i+1) {\n\t\t\t\tl = 1;\n\t\t\t}\n\t\t\tif (i == 0) {\n\t\t\t\ttasks[i] = new SimpleTask(1, tq + l, batchSize);\n\t\t\t} else {\n\t\t\t\ttasks[i] = new SimpleTask(\n\t\t\t\t\t\ttasks[i - 1].getEnd()+ 1, tasks[i - 1].getEnd() + tq + l, batchSize);\n\t\t\t}\t\t\t\n\t\t}\n//\t\tSystem.out.println(\"done .\"+clientsNum);\n\t\tthis.srvQ2QLSTM.getCfg().getQlSTMConfigurator().setMBSize(batchSize);\n\t\tthis.srvQ2QLSTM.getCfg().getAlSTMConfigurator().setMBSize(batchSize);\t\t\n\t\treturn tasks;\n\t}",
"public static void main(String[] args) throws IOException {\r\n\t\tint chunkCtr = 0;\r\n\t\t// args[1] -> Monitor IP\r\n\t\t// args[0] -> communication port with the individual clients\r\n\t\tserverSocket = new ServerSocket(Integer.parseInt(args[0]));\r\n\t\tSystem.out.println(\"Master Server \" + Inet4Address.getLocalHost().getHostAddress() + \" Started\");\r\n\t\tFile file = new File(\"Namespace.csv\");\r\n\r\n\t\t// monitor Communication\r\n\t\ttry {\r\n\t\t\tSocket monitorSocket = new Socket(args[1], 7777);\r\n\t\t\tDataInputStream in = new DataInputStream(monitorSocket.getInputStream());\r\n\t\t\tDataOutputStream out = new DataOutputStream(monitorSocket.getOutputStream());\r\n\t\t\tSystem.out.println(Inet4Address.getLocalHost().getHostAddress() + \" \" + args[0]);\r\n\t\t\tout.writeUTF(Inet4Address.getLocalHost().getHostAddress() + \" \" + args[0]);\r\n\t\t\tThread monitorthread = new Thread() {\r\n\t\t\t\tpublic void run() {\r\n\t\t\t\t\twhile (true) {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tThread.sleep(3000);\r\n\t\t\t\t\t\t\tout.writeUTF(clientCtr + \"\");\r\n\t\t\t\t\t\t} catch (IOException | InterruptedException e) {\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\t\tmonitorthread.start();\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.err.println(\"Unable to Connect to Monitor\");\r\n\t\t\tSystem.exit(0);\r\n\t\t}\r\n\r\n\t\tPortMap.put(1, 9876);\r\n\t\tPortMap.put(2, 8765);\r\n\t\tPortMap.put(3, 7654);\r\n\t\tPortMap.put(4, 6543);\r\n\t\tPortMap.put(5, 5439);\r\n\t\tPortMap.put(6, 4398);\r\n\r\n\t\t// Chunk Interactions\r\n\t\tif (!file.exists()) {\r\n\t\t\tServerSocket chunkServerSocket;\r\n\t\t\tSocket chunkSocket = new Socket();\r\n\t\t\t// args[1] -> communication port with the individual chunks\r\n\t\t\tchunkServerSocket = new ServerSocket(5000);\r\n\t\t\tSystem.out.println(\"Waiting for chunk servers to proceed!\");\r\n\t\t\tFileOutputStream fout = new FileOutputStream(file);\r\n\t\t\twhile (chunkCtr < 6) {\r\n\t\t\t\tchunkCtr++;\r\n\t\t\t\tchunkSocket = chunkServerSocket.accept();\r\n\t\t\t\tSystem.out.println(\" Connected to: \" + chunkSocket.getInetAddress().getLocalHost().getHostAddress()\r\n\t\t\t\t\t\t+ \" Chunk Name: Chunk\" + chunkCtr);\r\n\t\t\t\tfout.write((chunkCtr + \",\" + chunkSocket.getInetAddress().getLocalHost().getHostAddress()).getBytes());\r\n\t\t\t\tfout.write(\"\\n\".getBytes());\r\n\t\t\t\tNamespaceMap.put(chunkCtr, chunkSocket.getInetAddress().getLocalHost().getHostAddress());\r\n\r\n\t\t\t}\r\n\t\t\tchunkSocket.close();\r\n\t\t\tchunkServerSocket.close();\r\n\r\n\t\t} else {\r\n\t\t\tBufferedReader buffReader = new BufferedReader(new FileReader(file));\r\n\t\t\tString str;\r\n\t\t\twhile ((str = buffReader.readLine()) != null) {\r\n\t\t\t\tNamespaceMap.put(Integer.parseInt(str.substring(0, 1)), (str.substring(2, str.length() - 1)));\r\n\t\t\t}\r\n\t\t}\r\n\t\tgenerateReplica();\r\n\r\n\t\tSystem.out.println(PortMap);\r\n\t\tSystem.out.println(NamespaceMap);\r\n\t\tSystem.out.println(ReplicationMap);\r\n\t\tSystem.out.println(\"Ready to receive request from Client\");\r\n\r\n\t\t// Client Communication\r\n\t\twhile (true) {\r\n\t\t\tclientSocket = serverSocket.accept();\r\n\t\t\tThread clientThread = new Thread() {\r\n\t\t\t\tpublic void run() {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tSystem.out.println(\"Interacting with Client: \"\r\n\t\t\t\t\t\t\t\t+ clientSocket.getInetAddress().getLocalHost().getHostAddress());\r\n\t\t\t\t\t\tclientCtr++;\r\n\t\t\t\t\t\tDataInputStream in = new DataInputStream(clientSocket.getInputStream());\r\n\t\t\t\t\t\tDataOutputStream out = new DataOutputStream(clientSocket.getOutputStream());\r\n\t\t\t\t\t\tString[] input = new String[2];\r\n\t\t\t\t\t\tinput = (in.readUTF()).split(\" \");\r\n\t\t\t\t\t\tSystem.out.println(\"Client: \" + input[0] + \" \" + input[1]);\r\n\t\t\t\t\t\tFile file = new File(input[0] + \"complete.txt\");\r\n\t\t\t\t\t\tchunkNum = (int) Math.ceil(((Integer.parseInt(input[1])) / 800)) + 1;\r\n\t\t\t\t\t\tif (!file.exists()) {\r\n\t\t\t\t\t\t\tSystem.out.println(\"Generating Complete file and Distributing it to the chunks\");\r\n\t\t\t\t\t\t\tString fl = runCrawler(input[0]);\r\n\t\t\t\t\t\t\tDataInputStream chunkIn;\r\n\t\t\t\t\t\t\tDataOutputStream chunkOut;\r\n\t\t\t\t\t\t\tFileInputStream fin = new FileInputStream(new File(fl));\r\n\t\t\t\t\t\t\tStringBuffer strBuff1 = new StringBuffer();\r\n\t\t\t\t\t\t\tStringBuffer strBuff2 = new StringBuffer();\r\n\t\t\t\t\t\t\tStringBuffer strBuff3 = new StringBuffer();\r\n\t\t\t\t\t\t\tStringBuffer strBuff4 = new StringBuffer();\r\n\t\t\t\t\t\t\tStringBuffer strBuff5 = new StringBuffer();\r\n\t\t\t\t\t\t\tStringBuffer strBuff6 = new StringBuffer();\r\n\t\t\t\t\t\t\tint lineCtr = 0;\r\n\r\n\t\t\t\t\t\t\twhile (lineCtr < 4800) {\r\n\t\t\t\t\t\t\t\tlineCtr++;\r\n\t\t\t\t\t\t\t\tif (lineCtr <= 800)\r\n\t\t\t\t\t\t\t\t\tstrBuff1.append((char) fin.read());\r\n\t\t\t\t\t\t\t\telse if (lineCtr > 800 && lineCtr <= 1600)\r\n\t\t\t\t\t\t\t\t\tstrBuff2.append((char) fin.read());\r\n\t\t\t\t\t\t\t\telse if (lineCtr > 1600 && lineCtr <= 2400)\r\n\t\t\t\t\t\t\t\t\tstrBuff3.append((char) fin.read());\r\n\t\t\t\t\t\t\t\telse if (lineCtr > 2400 && lineCtr <= 3200)\r\n\t\t\t\t\t\t\t\t\tstrBuff4.append((char) fin.read());\r\n\t\t\t\t\t\t\t\telse if (lineCtr > 3200 && lineCtr <= 4000)\r\n\t\t\t\t\t\t\t\t\tstrBuff5.append((char) fin.read());\r\n\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\tstrBuff6.append((char) fin.read());\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t// chunk 1\r\n\r\n\t\t\t\t\t\t\tSocket chunkSocket = new Socket(NamespaceMap.get(1), 3456);\r\n\t\t\t\t\t\t\tchunkIn = new DataInputStream(chunkSocket.getInputStream());\r\n\t\t\t\t\t\t\tchunkOut = new DataOutputStream(chunkSocket.getOutputStream());\r\n\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(\"Make chunk\");\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(input[0] + \"1\");\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(strBuff1.toString());\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(\"End chunk\");\r\n\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(\"Make chunk\");\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(input[0] + \"2Rep\");\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(strBuff2.toString());\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(\"End chunk\");\r\n\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(\"Make chunk\");\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(input[0] + \"3Rep\");\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(strBuff3.toString());\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(\"End chunk\");\r\n\r\n\t\t\t\t\t\t\t// chunk 2\r\n\t\t\t\t\t\t\tchunkSocket = new Socket(NamespaceMap.get(2), 4567);\r\n\t\t\t\t\t\t\tchunkIn = new DataInputStream(chunkSocket.getInputStream());\r\n\t\t\t\t\t\t\tchunkOut = new DataOutputStream(chunkSocket.getOutputStream());\r\n\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(\"Make chunk\");\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(input[0] + \"2\");\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(strBuff2.toString());\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(\"End chunk\");\r\n\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(\"Make chunk\");\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(input[0] + \"3Rep\");\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(strBuff3.toString());\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(\"End chunk\");\r\n\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(\"Make chunk\");\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(input[0] + \"4Rep\");\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(strBuff4.toString());\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(\"End chunk\");\r\n\r\n\t\t\t\t\t\t\t// chunk 3\r\n\t\t\t\t\t\t\tchunkSocket = new Socket(NamespaceMap.get(3), 5678);\r\n\t\t\t\t\t\t\tchunkIn = new DataInputStream(chunkSocket.getInputStream());\r\n\t\t\t\t\t\t\tchunkOut = new DataOutputStream(chunkSocket.getOutputStream());\r\n\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(\"Make chunk\");\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(input[0] + \"3\");\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(strBuff3.toString());\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(\"End chunk\");\r\n\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(\"Make chunk\");\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(input[0] + \"4Rep\");\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(strBuff4.toString());\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(\"End chunk\");\r\n\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(\"Make chunk\");\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(input[0] + \"5Rep\");\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(strBuff5.toString());\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(\"End chunk\");\r\n\r\n\t\t\t\t\t\t\t// chunk 4\r\n\t\t\t\t\t\t\tchunkSocket = new Socket(NamespaceMap.get(4), 6789);\r\n\t\t\t\t\t\t\tchunkIn = new DataInputStream(chunkSocket.getInputStream());\r\n\t\t\t\t\t\t\tchunkOut = new DataOutputStream(chunkSocket.getOutputStream());\r\n\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(\"Make chunk\");\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(input[0] + \"4\");\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(strBuff4.toString());\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(\"End chunk\");\r\n\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(\"Make chunk\");\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(input[0] + \"5Rep\");\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(strBuff5.toString());\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(\"End chunk\");\r\n\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(\"Make chunk\");\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(input[0] + \"6Rep\");\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(strBuff6.toString());\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(\"End chunk\");\r\n\r\n\t\t\t\t\t\t\t// chunk 5\r\n\t\t\t\t\t\t\tchunkSocket = new Socket(NamespaceMap.get(5), 7893);\r\n\t\t\t\t\t\t\tchunkIn = new DataInputStream(chunkSocket.getInputStream());\r\n\t\t\t\t\t\t\tchunkOut = new DataOutputStream(chunkSocket.getOutputStream());\r\n\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(\"Make chunk\");\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(input[0] + \"5\");\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(strBuff5.toString());\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(\"End chunk\");\r\n\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(\"Make chunk\");\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(input[0] + \"1Rep\");\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(strBuff1.toString());\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(\"End chunk\");\r\n\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(\"Make chunk\");\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(input[0] + \"6Rep\");\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(strBuff6.toString());\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(\"End chunk\");\r\n\r\n\t\t\t\t\t\t\t// chunk 6\r\n\t\t\t\t\t\t\tchunkSocket = new Socket(NamespaceMap.get(6), 8934);\r\n\t\t\t\t\t\t\tchunkIn = new DataInputStream(chunkSocket.getInputStream());\r\n\t\t\t\t\t\t\tchunkOut = new DataOutputStream(chunkSocket.getOutputStream());\r\n\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(\"Make chunk\");\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(input[0] + \"6\");\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(strBuff6.toString());\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(\"End chunk\");\r\n\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(\"Make chunk\");\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(input[0] + \"1Rep\");\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(strBuff1.toString());\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(\"End chunk\");\r\n\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(\"Make chunk\");\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(input[0] + \"2Rep\");\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(strBuff2.toString());\r\n\t\t\t\t\t\t\tchunkOut.writeUTF(\"End chunk\");\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tSystem.out.println(\"Chunk: \" + chunkNum + \" : \" + PortMap.get(chunkNum) + \" \" + chunkNum);\r\n\t\t\t\t\t\t// out.writeUTF(\"localhost \"+PortMap.get(chunkNum));\r\n\t\t\t\t\t\t// out.writeUTF(NamespaceMap.get(chunkNum)+\"\r\n\t\t\t\t\t\t// \"+PortMap.get(chunkNum)+\" \"+chunkNum);\r\n\t\t\t\t\t\tout.writeUTF(NamespaceMap.get(chunkNum) + \" \" + PortMap.get(chunkNum) + \" complete\");\r\n\t\t\t\t\t\tSystem.out.println(\"Sent chunk: \" + NamespaceMap.get(chunkNum) + \" \" + PortMap.get(chunkNum));\r\n\t\t\t\t\t\tclientCtr--;\r\n\t\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t\tSystem.err.println(e);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t\tclientThread.start();\r\n\t\t}\r\n\t}",
"@Override\n public synchronized void run() {\n while (true) {\n int nodesInQueue = 0;\n //find nodes for jobs to run on\n Iterator<AmuseJob> iterator = queue.iterator();\n while (iterator.hasNext()) {\n AmuseJob job = iterator.next();\n\n if (job.isPending()) {\n //find nodes to run this job on. Always only a single pilot, but may contain multiple nodes per pilot.\n PilotManager target = pilots.getSuitablePilot(job);\n\n //If suitable nodes are found\n if (target != null) {\n job.start(target);\n //remove this job from the queue\n iterator.remove();\n } else {\n nodesInQueue++;\n }\n } else {\n //remove this job from the queue\n iterator.remove();\n }\n }\n\n if (nodesInQueue > 0) {\n logger.info(\"Now \" + nodesInQueue + \" waiting in queue\");\n }\n \n try {\n wait(5000);\n } catch (InterruptedException e) {\n logger.debug(\"Scheduler thread interrupted, time to quit\");\n return;\n }\n \n \n }\n }",
"io.netifi.proteus.admin.om.Connection getConnections(int index);",
"public interface MemoryJobInstance<ID> extends JobInstance<ID> {\n\n /**\n * Sets the given id.\n *\n * @param id The id\n */\n void setId(ID id);\n\n /**\n * Returns the version.\n *\n * @return the version\n */\n long getVersion();\n\n /**\n * Sets the given version.\n *\n * @param version The version\n */\n void setVersion(long version);\n\n}",
"@Override\n\tpublic int[] getJob() throws RemoteException {\n\t\treturn (Server.jobs.size() > 0)? Server.jobs.remove(0) : null;\n\t}",
"private void createGridlet(int userID, int numGridlet)\n {\n int data = 500; // 500KB of data\n for (int i = 0; i < numGridlet; i++)\n {\n // Creates a Gridlet\n Gridlet gl = new Gridlet(i, data, data, data);\n gl.setUserID(userID);\n\n // add this gridlet into a list\n this.jobs.add(gl);\n }\n }",
"public void execute() { // FIXME extract to utility class\n\t\ttry {\n\t\t\tif (errorMsg != null && errorMsg.trim().length() > 0) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (connection == null || connection.isClosed()) {\n\t\t\t\terrorMsg = Messages.error_getConnection;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t//databaseInfo.getServerInfo().compareVersionKey(\"8.2.2\") >= 0;\n\t\t\tboolean isSupportCache = CompatibleUtil.isSupportCache(databaseInfo);\n\t\t\tString sql = \"SELECT owner.name, db_serial.* FROM db_serial WHERE class_name IS NULL\";\n\n\t\t\t// [TOOLS-2425]Support shard broker\n\t\t\tif (databaseInfo.isShard()) {\n\t\t\t\tsql = databaseInfo.wrapShardQuery(sql);\n\t\t\t}\n\n\t\t\tstmt = connection.createStatement();\n\t\t\trs = stmt.executeQuery(sql);\n\t\t\twhile (rs.next()) {\n\t\t\t\tString name = rs.getString(\"name\");\n\t\t\t\tString owner = rs.getString(\"owner.name\");\n\t\t\t\tString currentVal = rs.getString(\"current_val\");\n\t\t\t\tString incrementVal = rs.getString(\"increment_val\");\n\t\t\t\tString maxVal = rs.getString(\"max_val\");\n\t\t\t\tString minVal = rs.getString(\"min_val\");\n\t\t\t\tString cyclic = rs.getString(\"cyclic\");\n\t\t\t\tString startVal = rs.getString(\"started\");\n\t\t\t\tString className = rs.getString(\"class_name\");\n\t\t\t\tString attName = rs.getString(\"att_name\");\n\t\t\t\tboolean isCycle = false;\n\t\t\t\tif (cyclic != null && cyclic.equals(\"1\")) {\n\t\t\t\t\tisCycle = true;\n\t\t\t\t}\n\t\t\t\tString cacheCount = null;\n\t\t\t\tif (isSupportCache) {\n\t\t\t\t\tcacheCount = rs.getString(\"cached_num\");\n\t\t\t\t}\n\t\t\t\tSerialInfo serialInfo = new SerialInfo(name, owner, currentVal,\n\t\t\t\t\t\tincrementVal, maxVal, minVal, isCycle, startVal,\n\t\t\t\t\t\tcacheCount, className, attName);\n\t\t\t\tserialInfoList.add(serialInfo);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\terrorMsg = e.getMessage();\n\t\t\tLOGGER.error(e.getMessage(), e);\n\t\t} finally {\n\t\t\tfinish();\n\t\t}\n\t}",
"private static void getJokeOrProverb(String username, String userkey, String servername, int port){\n\t\tSocket socket;\n\t\tBufferedReader fromServer;\n\t\tPrintStream toServer;\n\n\t\ttry{\n\t\t\t// Open a new socket connection to the server with the specified port number\n\t\t\tsocket = new Socket(servername, port);\n\t\t\tfromServer = new BufferedReader(new InputStreamReader(socket.getInputStream()));\n\t\t\ttoServer = new PrintStream(socket.getOutputStream());\n\t\t\t// Send user name and user key to server\n\t\t\ttoServer.println(username + \" \" + userkey);\n\t\t\ttoServer.flush();\n\n\t\t\t// There is nothing special for the number(50) of iteration times\n\t\t\tString strOutput;\n\t\t\tfor (int ix = 1; ix <= 50; ix++){\n\t\t\t\tstrOutput = fromServer.readLine();\n\t\t\t\tif (strOutput == null){ // There is no more messages\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// Write log and print\n\t\t\t\t\twriteLog(strOutput);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Close the socket\n\t\t\tsocket.close();\n\t\t}\n\t\tcatch(IOException ex) {\n\t\t\twriteLog(\"Exception occurs, see the below details:\");\n\t\t\tex.printStackTrace ();\n\t\t}\n\t}",
"public void run() {\n Socket socket;\n try {\n socket = new Socket(servers.getServerAddress(),Integer.parseInt(servers.getServerPort()));\n } catch (IOException e) {\n // e.printStackTrace();\n System.err.println(\"Cannot connect to the server: \" + servers.getServerAddress()\n + \" at port:\" + servers.getServerPort());\n return;\n }\n\n ObjectOutputStream toServer = null;\n try {\n toServer = new ObjectOutputStream(socket.getOutputStream());\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n\n BufferedReader toClient = null;\n try {\n toClient = new BufferedReader(new InputStreamReader(socket.getInputStream()));\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n try {\n\n toServer.writeObject(argsToServer);\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n //get and print query results\n String line;\n int count = 0;\n ByteArrayOutputStream out = new ByteArrayOutputStream();\n PrintStream pr = new PrintStream(out);\n try {\n while((line = toClient.readLine()) != null) {\n System.out.println(\"<\" + servers.getServerAddress() + \"> :\" + line);\n count++;\n pr.println(line);\n }\n pr.flush();\n System.out.println(servers.getServerAddress()+ \" query count: \" + count);\n socket.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n //saveLocalFile(out);\n }",
"@Override\n public int getJobCount () {\n return pool.getJobCount();\n }",
"public static void main(String args[] ) throws Exception {\n Scanner s = new Scanner(System.in);\n int N = s.nextInt();\n\n int[] arr = new int[N];\n \n int relationNumber = s.nextInt();\n\n for (int i = 0; i < N; i++) {\n arr[i] = s.nextInt();\n }\n \n for(int j = 0; j < relationNumber; j++){\n relation.put(s.nextInt(), s.nextInt()); \n }\n \n queue.add(arr[0]);\n findRelationWithKey(arr[0]);\n System.out.println(counter);\n }",
"java.util.List<com.lvl6.proto.QuestProto.UserQuestJobProto> \n getUserQuestJobsList();",
"public static void main(String[] args){\r\n //zgodnie z algorytmem ustawiamy wszystkie wartosci tablic na false i 0:\r\n for(int i=0; i<n; i++){\r\n list[i] = false;\r\n number[i] = 0;\r\n }\r\n //tworzymy tablice watkow - podprocesy odpowiadajace za zachowanie klientow:\r\n Customer[] threads = new Customer[n];\r\n //wypelniamy ja klientami:\r\n for (int i = 0; i < n; i++) {\r\n threads[i] = new Customer(i);\r\n threads[i].start();\r\n }\r\n }",
"@Nonnull\n List<AbstractProject<?,?>> getAllJobs();"
] | [
"0.58026433",
"0.5522135",
"0.5367409",
"0.53616375",
"0.5352366",
"0.53466636",
"0.53361106",
"0.53249526",
"0.530714",
"0.52931505",
"0.527824",
"0.526853",
"0.52628",
"0.5260774",
"0.52579653",
"0.5232269",
"0.5228944",
"0.5228915",
"0.5218117",
"0.521718",
"0.516439",
"0.5151085",
"0.51483107",
"0.51393193",
"0.51222545",
"0.51196545",
"0.50507253",
"0.50395244",
"0.5012201",
"0.5011738",
"0.50029045",
"0.4984114",
"0.49731615",
"0.49641502",
"0.49573654",
"0.49528793",
"0.49528793",
"0.49528793",
"0.49496272",
"0.49355373",
"0.4928909",
"0.49213544",
"0.49148855",
"0.49103093",
"0.4903974",
"0.4899862",
"0.48879212",
"0.4886759",
"0.48822978",
"0.48815998",
"0.48794526",
"0.487858",
"0.48691922",
"0.48659605",
"0.48636138",
"0.48607886",
"0.48586085",
"0.48420444",
"0.48387384",
"0.48334244",
"0.48280743",
"0.4823496",
"0.4818483",
"0.48118073",
"0.4799619",
"0.47992432",
"0.47900817",
"0.47775128",
"0.47717977",
"0.47674826",
"0.47673342",
"0.47645584",
"0.47632927",
"0.47560376",
"0.4753786",
"0.47534737",
"0.47488856",
"0.4739581",
"0.4734023",
"0.47153574",
"0.4712765",
"0.4698309",
"0.46943077",
"0.46915117",
"0.46877822",
"0.4687064",
"0.468616",
"0.46832293",
"0.46797368",
"0.4676199",
"0.46702707",
"0.466904",
"0.46689156",
"0.46629664",
"0.46583265",
"0.46563217",
"0.46549925",
"0.46526957",
"0.46515203",
"0.46505952",
"0.46502733"
] | 0.0 | -1 |
/ For x, find if others can adjust so that it can find a mate | private boolean findMatch(int x, int[] matchx, int[] matchy, boolean[] seen) {
for (int y = 0; y < N; y++) {
if (!seen[y] && connections[x][y]) {
seen[y] = true;
if (matchy[y] == -1 || findMatch(matchy[y], matchx, matchy, seen)) {
matchx[x] = y;
matchy[y] = x;
return true;
}
}
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static final int adjustment(int x, int xn) \n\t {\n\t int xn2 = xn * xn;\n\t \n\t // |xn * xn - x|\n\t int comparitor0 = xn2 - x;\n\t if (comparitor0 < 0) {\n\t comparitor0 = -comparitor0;\n\t }\n\t \n\t int twice_xn = xn << 1;\n\t \n\t // |x - (xn-1) * (xn-1)|\n\t int comparitor1 = x - xn2 + twice_xn - 1;\n\t if (comparitor1 < 0) { // need to correct for x == 0 case?\n\t comparitor1 = -comparitor1; // only gets here when x == 0\n\t }\n\t \n\t // |(xn+1) * (xn+1) - x|\n\t int comparitor2 = xn2 + twice_xn + 1 - x;\n\t \n\t if (comparitor0 > comparitor1) {\n\t return (comparitor1 > comparitor2) ? ++xn : --xn;\n\t }\n\t \n\t return (comparitor0 > comparitor2) ? ++xn : xn;\n\t }",
"boolean check(int x){\n\t\tint size = ppx_list.size();\n\t\tif (x == 0){\n\t\t\treturn true;\n\t\t}\n\t\telse{\n\t\t\treturn (ppx_list.get(size-x)-ppx_list.get(size-(x+1)) < 1) && check(x-1);\n\t\t}\t\t\n\t}",
"static int canReach(int a, int b, int x) {\n return canReachHelper(a,b,x, 0);\n\n }",
"public static void monopolychecker(){\n\t\tfor(int x = 0; x < 40;x++){\r\n\t\t\trent[x] = baseRent[x];\r\n\t\t}\r\n\t\tfor(int x = 0; x < 8; x++){\r\n\t\t\tif(x == 0){//brown {1,3}\r\n\t\t\t\tif(whoOwnsIt[1] != 4 && whoOwnsIt[3] != 4){//see if come owns it\r\n\t\t\t\t\tif(whoOwnsIt[1] == whoOwnsIt[3]){//if the same person owns it;\r\n\t\t\t\t\t\tif(avenueLevel[1] == 0){\r\n\t\t\t\t\t\t\trent[1] = rent[1]*2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(avenueLevel[3] == 0){\r\n\t\t\t\t\t\t\trent[3] = rent[3]*2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else if(x == 1){//light blue {6,8,9}\r\n\t\t\t\tint a = 6; int b = 8; int c = 9;\r\n\t\t\t\tif(whoOwnsIt[a] != 4 && whoOwnsIt[b] != 4 && whoOwnsIt[c] != 4){//see if come owns it\r\n\t\t\t\t\tif((whoOwnsIt[a] == whoOwnsIt[b]) && (whoOwnsIt[a] == whoOwnsIt[c])){//if the same person owns it;\r\n\t\t\t\t\t\tif(avenueLevel[a] == 0){\r\n\t\t\t\t\t\t\trent[a] = rent[a]*2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(avenueLevel[b] == 0){\r\n\t\t\t\t\t\t\trent[b] = rent[b]*2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(avenueLevel[c] == 0){\r\n\t\t\t\t\t\t\trent[c] = rent[c]*2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else if(x == 2){//purple {11,13,14}\r\n\t\t\t\tint a = 11; int b = 13; int c = 14;\r\n\t\t\t\tif(whoOwnsIt[a] != 4 && whoOwnsIt[b] != 4 && whoOwnsIt[c] != 4){//see if come owns it\r\n\t\t\t\t\tif((whoOwnsIt[a] == whoOwnsIt[b]) && (whoOwnsIt[a] == whoOwnsIt[c])){//if the same person owns it;\r\n\t\t\t\t\t\tif(avenueLevel[a] == 0){\r\n\t\t\t\t\t\t\trent[a] = rent[a]*2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(avenueLevel[b] == 0){\r\n\t\t\t\t\t\t\trent[b] = rent[b]*2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(avenueLevel[c] == 0){\r\n\t\t\t\t\t\t\trent[c] = rent[c]*2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else if(x == 3){//orange {16,18,19}\r\n\t\t\t\tint a = 16; int b = 18; int c = 19;\r\n\t\t\t\tif(whoOwnsIt[a] != 4 && whoOwnsIt[b] != 4 && whoOwnsIt[c] != 4){//see if come owns it\r\n\t\t\t\t\tif((whoOwnsIt[a] == whoOwnsIt[b]) && (whoOwnsIt[a] == whoOwnsIt[c])){//if the same person owns it;\r\n\t\t\t\t\t\tif(avenueLevel[a] == 0){\r\n\t\t\t\t\t\t\trent[a] = rent[a]*2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(avenueLevel[b] == 0){\r\n\t\t\t\t\t\t\trent[b] = rent[b]*2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(avenueLevel[c] == 0){\r\n\t\t\t\t\t\t\trent[c] = rent[c]*2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else if(x == 4){//red {21,23,24}\r\n\t\t\t\tint a = 21; int b = 23; int c = 24;\r\n\t\t\t\tif(whoOwnsIt[a] != 4 && whoOwnsIt[b] != 4 && whoOwnsIt[c] != 4){//see if come owns it\r\n\t\t\t\t\tif((whoOwnsIt[a] == whoOwnsIt[b]) && (whoOwnsIt[a] == whoOwnsIt[c])){//if the same person owns it;\r\n\t\t\t\t\t\tif(avenueLevel[a] == 0){\r\n\t\t\t\t\t\t\trent[a] = rent[a]*2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(avenueLevel[b] == 0){\r\n\t\t\t\t\t\t\trent[b] = rent[b]*2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(avenueLevel[c] == 0){\r\n\t\t\t\t\t\t\trent[c] = rent[c]*2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else if(x == 5){//yellow {26,27,29}\r\n\t\t\t\tint a = 26; int b = 27; int c = 29;\r\n\t\t\t\tif(whoOwnsIt[a] != 4 && whoOwnsIt[b] != 4 && whoOwnsIt[c] != 4){//see if come owns it\r\n\t\t\t\t\tif((whoOwnsIt[a] == whoOwnsIt[b]) && (whoOwnsIt[a] == whoOwnsIt[c])){//if the same person owns it;\r\n\t\t\t\t\t\tif(avenueLevel[a] == 0){\r\n\t\t\t\t\t\t\trent[a] = rent[a]*2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(avenueLevel[b] == 0){\r\n\t\t\t\t\t\t\trent[b] = rent[b]*2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(avenueLevel[c] == 0){\r\n\t\t\t\t\t\t\trent[c] = rent[c]*2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else if(x == 6){//green {31,32,34}\r\n\t\t\t\tint a = 31; int b = 32; int c = 34;\r\n\t\t\t\tif(whoOwnsIt[a] != 4 && whoOwnsIt[b] != 4 && whoOwnsIt[c] != 4){//see if come owns it\r\n\t\t\t\t\tif((whoOwnsIt[a] == whoOwnsIt[b]) && (whoOwnsIt[a] == whoOwnsIt[c])){//if the same person owns it;\r\n\t\t\t\t\t\tif(avenueLevel[a] == 0){\r\n\t\t\t\t\t\t\trent[a] = rent[a]*2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(avenueLevel[b] == 0){\r\n\t\t\t\t\t\t\trent[b] = rent[b]*2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(avenueLevel[c] == 0){\r\n\t\t\t\t\t\t\trent[c] = rent[c]*2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else if(x == 7){//blue {37,39}\r\n\t\t\t\tint a = 37; int b = 39;\r\n\t\t\t\tif(whoOwnsIt[a] != 4 && whoOwnsIt[b] != 4){//see if come owns it\r\n\t\t\t\t\tif((whoOwnsIt[a] == whoOwnsIt[b])){//if the same person owns it;\r\n\t\t\t\t\t\tif(avenueLevel[a] == 0){\r\n\t\t\t\t\t\t\trent[a] = rent[a]*2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(avenueLevel[b] == 0){\r\n\t\t\t\t\t\t\trent[b] = rent[b]*2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}",
"private boolean isCheckMate() {\n if (whitePlayer.getOccupiedSet().isEmpty()) {\n System.out.println(\"BLACK PLAYER WINS\");\n return true;\n }\n else if (blackPlayer.getOccupiedSet().isEmpty()) {\n System.out.println(\"WHITE PLAYER WINS\");\n return true;\n }\n else return false;\n }",
"public boolean checkCheckMate() {\n\t\t// \n\t\tboolean checked = false;\n\t\tfor (int i = 0; i < 32; i++) { \n\t\t\tif (pieces[i].handlePieceCheckMate()) {\n\t\t\t\tchecked = true;\n\n\t\t\t\tswitch (pieces[i].getColor())\n\t\t\t\t{\n\t\t\t\tcase BLACK:\n\t\t\t\t\twhichKing = 28;\n\t\t\t\t\tbreak;\n\t\t\t\tcase WHITE:\n\t\t\t\t\twhichKing = 4;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\twhichKing = 40;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t} \t\n\t\t}\n\t\treturn checked;\n\t}",
"public boolean isSelfCrossing(int[] x) {\n for(int i = 0; i <= x.length - 1; i ++){\n // Case 1 where arrow i goes across arrow i - 3\n if(i >= 3 && x[i] >= x[i - 2] && x[i - 1] <= x[i - 3]) return true;\n // Case 2 where arrow i goes across arrow i - 4\n if(i >= 4 && x[i] + x[i - 4] >= x[i - 2] && x[i - 1] == x[i - 3]) return true;\n // Case 3 where arrow goes across arrow i - 5\n if(i >= 5 && x[i - 1] + x[i - 5] >= x[i - 3] && x[i] + x[i - 4] >= x[i - 2]\n && x[i - 2] >= x[i - 4] && x[i - 1] <= x[i - 3]) return true;\n }\n return false;\n }",
"private void updateCheckMove(boolean mate) {\n \tif(moveList.size() > 0) {\n \t\tint x = moveList.size()-1;\n \t\tif(mate) moveList.set(x, moveList.get(x) + \"#\");\n \t\telse moveList.set(x, moveList.get(x)+\"+\");\n \t}\n }",
"public int checkTheXCoordinate(char x) { //check the legality of the input\n if ((Character.toLowerCase(x) == 'A') || (Character.toUpperCase(x) == 'A'))\n return 0;\n else if ((Character.toLowerCase(x) == 'B') || (Character.toUpperCase(x) == 'B'))\n return 1;\n else if ((Character.toLowerCase(x) == 'C') || (Character.toUpperCase(x) == 'C'))\n return 2;\n else if ((Character.toLowerCase(x) == 'D') || (Character.toUpperCase(x) == 'D'))\n return 3;\n else if ((Character.toLowerCase(x) == 'E') || (Character.toUpperCase(x) == 'E'))\n return 4;\n else if ((Character.toLowerCase(x) == 'F') || (Character.toUpperCase(x) == 'F'))\n return 5;\n else if ((Character.toLowerCase(x) == 'G') || (Character.toUpperCase(x) == 'G'))\n return 6;\n else if ((Character.toLowerCase(x) == 'H') || (Character.toUpperCase(x) == 'H'))\n return 7;\n return -1; // Illegal move received\n }",
"public boolean isCheckmate()\n {\n Game g = Game.getInstance();\n\n int sum = 0;\n\n for(Piece[] p1 : g.m_board.m_pieces)\n {\n for(Piece p2 : p1)\n {\n if(p2 != null)\n {\n if(p2.m_color == this.m_color)\n {\n sum += p2.getLegalMoves().size();\n }\n }\n }\n }\n\n if(sum == 0){ return true; } else { return false; }\n }",
"private boolean reachX(Position target) {\n return position.x == target.x;\n }",
"private boolean isFound(int remaingingMarbles) {\n\n return (Math.log(remaingingMarbles) / Math.log(2)) % 1 == 0 ;\n\n }",
"private int gameV(int i, int j, int x) {\n int count = 2;\n for (int ii = 0; ii < i; ii++) {\n for (int jj = ii + 1; jj < n; jj++) {\n if (ii != x && jj != x) count++;\n }\n }\n for (int jj = i + 1; jj < j; jj++) {\n if (jj != x) count++;\n }\n return count;\n }",
"public boolean isMine(int x, int y);",
"public boolean xWins() {\n\t\tif (checkWinner(LETTER_X) == 1)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}",
"boolean isWinningCombination(Ticket ticket);",
"public static boolean solved(BaseBoard x)\r\n\t\t{\r\n\t\t//get the board\r\n\t\tint [][] board = x.getBoard();\r\n\t\t\t//row\r\n\t\t\tfor (int i = 0; i <board.length;i++)\r\n\t\t\t{\r\n\t\t\t\t//column\r\n\t\t\t\tfor (int j= 0; j< board[0].length ; j++)\r\n\t\t\t\t{\r\n\t\t\t\t\t//if the value in the slot is a zero then try to find the right value for it\r\n\t\t\t\t\tif(x.getBoard()[i][j] == 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t//valid values k 1-9\r\n\t\t\t\t\t\tfor(int k = 1; k <10; k++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t//check if constraints are met\r\n\t\t\t\t\t\t\tif(good(board, i, j, k))\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tx.fillSpot(k, i, j);\r\n\t\t\t\t\t\t\t\t//if the value k does not mess up the contraints then put it into the slot [i][j]\r\n\t\t\t\t\t\t\t\tif(solved(x))\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tx.fillSpot(0, i, j);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\t\r\n\t\t\t\t\t\t}return false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}return true;\r\n\t\t}",
"public boolean fitsInBotBoard(int x, int y) {\n if (rotation) { // na vysku\n if (!(x + sizeSelected - 1 < maxN)) {\n return false;\n }\n } else { // na sirku\n if (!(y + sizeSelected - 1 < maxN)) {\n return false;\n }\n }\n\n // skontrolujem ci nebude prekrvat inu lod\n if (rotation) { // na vysku\n for (int i = 0; i < sizeSelected; i++) {\n if (boardBot[x + i][y] == GameObject.Ship) {\n return false;\n }\n }\n } else { // na sirku\n for (int i = 0; i < sizeSelected; i++) {\n if (boardBot[x][y + i] == GameObject.Ship) {\n return false;\n }\n }\n }\n\n // skontrolujem ci sa nebude dotykat inej lode\n if (rotation) { // na vysku\n for (int i = 0; i < sizeSelected; i++) {\n if ((x - 1 >= 0 && boardBot[x + i - 1][y] == GameObject.Ship) ||\n (x - 1 >= 0 && y - 1 >= 0 && boardBot[x + i - 1][y - 1] == GameObject.Ship) ||\n (y - 1 >= 0 && boardBot[x + i][y - 1] == GameObject.Ship) ||\n (x + i + 1 < maxN && y - 1 >= 0 && boardBot[x + i + 1][y - 1] == GameObject.Ship) ||\n (x + i + 1 < maxN && boardBot[x + i + 1][y] == GameObject.Ship) ||\n (x + i + 1 < maxN && y + 1 < maxN && boardBot[x + i + 1][y + 1] == GameObject.Ship) ||\n (y + 1 < maxN && boardBot[x + i][y + 1] == GameObject.Ship) ||\n (x - 1 >= 0 && y + 1 < maxN && boardBot[x + i - 1][y + 1] == GameObject.Ship)) {\n return false;\n }\n }\n } else { // na sirku\n for (int i = 0; i < sizeSelected; i++) {\n if ((x - 1 >= 0 && boardBot[x - 1][y + i] == GameObject.Ship) ||\n (x - 1 >= 0 && y - 1 >= 0 && boardBot[x - 1][y + i - 1] == GameObject.Ship) ||\n (y - 1 >= 0 && boardBot[x][y + i - 1] == GameObject.Ship) ||\n (x + 1 < maxN && y - 1 >= 0 && boardBot[x + 1][y + i - 1] == GameObject.Ship) ||\n (x + 1 < maxN && boardBot[x + 1][y + i] == GameObject.Ship) ||\n (x + 1 < maxN && y + i + 1 < maxN && boardBot[x + 1][y + i + 1] == GameObject.Ship) ||\n (y + i + 1 < maxN && boardBot[x][y + i + 1] == GameObject.Ship) ||\n (x - 1 >= 0 && y + i + 1 < maxN && boardBot[x - 1][y + i + 1] == GameObject.Ship)) {\n return false;\n }\n }\n }\n\n return true;\n }",
"protected boolean noLife(int x, int y){\n \tint a[] = {x - 1 , x + 1 , x , x};\n \tint b[] = {y , y , y - 1 , y + 1};\n getPoint(x, y).setSigned(true);\n\n \tfor (int i = 0 ; i < 4 ; i++){\n \t\tif (!validatePoint(a[i], b[i]))\n \t\tcontinue;\n \t\telse {\n\t\t \t\tint xx = a[i];\n\t\t \tint yy = b[i];\n\t \t\tif (getPoint(xx, yy).isSigned()) continue;\n\t \tif (getPoint(xx, yy).getState() == GoPoint.EMPTY){\n\t \t\treturn false;\n\t \t}\n\t \tif (getPoint(xx, yy).getState() == getPoint(x, y).getState())\n\t \t\tif (!noLife(a[i], b[i]))\n\t \t\t\treturn false;\n\t\t }\n\t\t}\n\t\treturn true;\n }",
"private void flagSolver(int x, int y) {\n\t\tint flagsNear = 0;\n\t\tint tempX, tempY;\n\t\tTile tempTile;\n\t\tfor(int i = -1; i <= 1; i++) {\n\t\t\ttempY = y + i;\n\t\t\tfor(int j = -1; j <= 1; j++) {\n\t\t\t\ttempX = x + j;\n\t\t\t\tif(!(tempX == x && tempY == y)) {\n\t\t\t\t\ttempTile = game.getTile(tempX, tempY);\n\t\t\t\t\tif(!(tempTile == null) && tempTile.getMarker() == 1) {\n\t\t\t\t\t\tflagsNear++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(flagsNear == game.getTile(x, y).getAdjBombs()) {\n\t\t\tfor(int i = -1; i <= 1; i++) {\n\t\t\t\ttempY = y + i;\n\t\t\t\tfor(int j = -1; j <= 1; j++) {\n\t\t\t\t\ttempX = x + j;\n\t\t\t\t\tif(!(tempX == x && tempY == y)) {\n\t\t\t\t\t\ttempTile = game.getTile(tempX, tempY);\n\t\t\t\t\t\tif(!(tempTile == null) && !(tempTile.getMarker() == 1)) {\n\t\t\t\t\t\t\tunmarkedTile(tempX, tempY, false);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"private void updateSeen(int x, int y) {\n\t\tif (!currentState.inBounds(x, y)) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tboard.setSeen(x, y, true);\n\t\t\n\t\tif (currentState.isResourceAt(x, y)) {\n \tResourceView resource = currentState.getResourceNode(currentState.resourceAt(x, y));\n \tif(resource.getType().equals(ResourceNode.Type.GOLD_MINE)) {\n// \t\tSystem.out.printf(\"FOUND GOLDMINE AT %d,%d\\n\", x, y);\n \t\tfoundGoldMine = true;\n \t\testGoldMineLocation = new Pair<Integer, Integer>(x, y);\n \t} else if (resource.getType().equals(ResourceNode.Type.TREE)) {\n \t\tboard.setHasTree(x, y, true);\n \t}\n \t\n \tboard.setTowerProbability(x, y, 0);\n } else if (currentState.isUnitAt(x, y)) {\n \tint unitID = currentState.unitAt(x, y);\n \t\n String unitName = currentState.getUnit(unitID).getTemplateView().getName();\n if(unitName.equalsIgnoreCase(\"ScoutTower\")) {\n \tSystem.out.println(\"Found tower!\");\n \t\tboard.setTowerProbability(x, y, 1);\n } else {\n \tboard.setTowerProbability(x, y, 0);\n }\n }\n\t\t\n\t\t// Need to check if our original estimate for the goldmine location has been found\n\t\tif (!foundGoldMine && board.getSeen(estGoldMineLocation.getX(), estGoldMineLocation.getY())) {\n\t\t\tSystem.out.printf(\"No gold mine at %d,%d\\n\", estGoldMineLocation.getX(), estGoldMineLocation.getY());\n\t\t\tupdateGoldMineEstimate();\n\t\t}\n\t}",
"private boolean isChoseFine(){\n if(freeSpaces.size()!=2 & freeSpaces.size()!=3){ //if the number of chosen spaces is not 3 or 2, that means it can't be good.\n return false;\n }\n else if(freeSpaces.size()==2){ //if there are 2.\n if(freeSpaces.elementAt(0).place.distance(freeSpaces.elementAt(1).place)==1)\n return true;\n else //if the distance between the spaces isn't 1, that means it can't be two suite spaces.\n return false;\n }\n else{ //if there are 3.\n //get the all 3 elements.\n int aX = freeSpaces.elementAt(0).place.x;\n int aY = freeSpaces.elementAt(0).place.y;\n int bX = freeSpaces.elementAt(1).place.x;\n int bY = freeSpaces.elementAt(1).place.y;\n int cX = freeSpaces.elementAt(2).place.x;\n int cY = freeSpaces.elementAt(2).place.y;\n if(aX==bX && bX==cX){ //if they are in the same column.\n int min = Math.min(aY, Math.min(bY, cY));\n int max = Math.max(aY, Math.max(bY, cY));\n return (max - min == 2); //if the distance between the max and the min is 2, that means they 3 suited.\n }\n else if(aY==bY && bY==cY){ //if they are in the same row.\n int min = Math.min(aX, Math.min(bX, cX));\n int max = Math.max(aX, Math.max(bX, cX));\n return (max - min == 2); //if the distance between the max and the min is 2, that means they 3 suited.\n }\n else //if they are in different rows and columns, so it isn't good.\n return false;\n }\n }",
"static int waysToGiveACheck(char[][] board) {\n\t\tint[] pawnPos = new int[2];\n\t\tint[] bkPos = new int[2];\n\t\tint[] wkPos = new int[2];\n\t\tint[] forthPos = new int[2];\n\t\tchar fourth = 'x';\n\t\tint answerCount = 0;\n\t\tint hashCount = 0;\n\t\tfor(int board_i = 0; board_i < 8; board_i++){\n\t\t\tfor(int board_j = 0; board_j < 8; board_j++){\n\t\t\t\tswitch(board[board_i][board_j]){\n\t\t\t\tcase 35:\n\t\t\t\t\thashCount++;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 80:\n\t\t\t\t\t{pawnPos[0] = board_i;\n\t\t\t\t\tpawnPos[1] = board_j;\n\t\t\t\t\tbreak;}\n\t\t\t\tcase 107:\n\t\t\t\t\t{bkPos[0] = board_i;\n\t\t\t\t\tbkPos[1] = board_j;\n\t\t\t\t\tbreak;}\n\t\t\t\tcase 75:\n\t\t\t\t\t{wkPos[0] = board_i;\n\t\t\t\t\twkPos[1] = board_j;\n\t\t\t\t\tbreak;}\n\t\t\t\tdefault:\n\t\t\t\t\t{forthPos[0] = board_i;\n\t\t\t\t\tforthPos[1] = board_j;\n\t\t\t\t\tfourth = board[board_i][board_j];\n\t\t\t\t\tbreak;}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tint xdistPk = Math.abs(pawnPos[0] - bkPos[0]);\n\t\tint ydistPk = Math.abs(pawnPos[1] - bkPos[1]);\n\n\t\tif(xdistPk == ydistPk)\n\t\t\tanswerCount = answerCount+2;\n\t\tif(xdistPk==0)\n\t\t\tanswerCount++;\n\t\tif(ydistPk ==0)\n\t\t\tanswerCount++;\n\t\tif((xdistPk == 2 && ydistPk==1) || (xdistPk == 1 && ydistPk==2) )\n\t\t\tanswerCount++;\n\n\t\treturn answerCount;\n\n\t}",
"boolean canPickup(int x, int y) {\n return ((posX == x) && (posY == y));\n }",
"@Test\n public void moreThanOneCheckerOnToLocation() {\n\n assertTrue(game.move(Location.R1, Location.R2));\n assertTrue(game.move(Location.R1, Location.R3));\n game.nextTurn();\n // to der gerne skulle vaere lovlige og stemme med terningerne\n assertTrue(game.move(Location.R6, Location.R5));\n assertTrue(game.move(Location.R8, Location.R6));\n game.nextTurn();\n assertTrue(game.move(Location.R2, Location.R5));\n assertTrue(game.move(Location.R3, Location.R7));\n game.nextTurn();\n // der staar nu to sorte paa R4\n assertFalse(game.move(Location.R6, Location.R3));\n }",
"static int checkMateWithwazir(char[][] board, int P1r, int P1c) {\n\t\tint rb = P1r + 1, checMate = 0;\n\t\tfor (int c = P1c + 1; c < 8; c++) {\n\t\t\tif (board[rb][c] == 'k') {\n\t\t\t\tchecMate++;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\trb++;\n\t\t}\n\t\tint cb = P1c - 1;\n\t\tfor (int r = P1r + 1; r <= P1c; r++) {\n\t\t\tif (board[r][cb] == 'k') {\n\t\t\t\tchecMate++;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcb--;\n\t\t}\n\t\t\n\t\treturn checMate;\n\t}",
"private int findMutual(String me, String stranger){\r\n\t\tint num = 0;\r\n\t\tAdjVertex myfriend = myGraph[getId(me)].adjVertexHead;\r\n\t\twhile(myfriend != null){\r\n\t\t\t if(areFriends(myfriend.name, stranger)){\r\n\t\t\t\t num++;\r\n\t\t\t }\r\n\t\t\t myfriend = myfriend.next;\r\n\t\t}\r\n\t\treturn num;\r\n\t}",
"public void MovesRemainingExists() {\n InsideMovesRemainingExists = 1;\n NoMovesRemaining = 1;\n Beginning:\n for (int i = 0; i < 9; i++) {\n for (int j = 0; j < 9; j++) {\n previousX = i;\n previousY = j + 1;\n if ((i + 1) < 9) {\n ValidSwitch(i + 1, j + 1);\n if (NoMovesRemaining == 0) { //checks the candies to the right\n ResetState();\n break Beginning; //breaks the loop\n }\n }\n\n if ((i - 1) >= 0) {\n ValidSwitch(i - 1, j + 1);\n if (NoMovesRemaining == 0) { //checks the candies to the left\n ResetState();\n break Beginning;\n }\n }\n\n if ((j + 1) < 9) {\n ValidSwitch(i, j + 2);\n if (NoMovesRemaining == 0) { //checks the candies on the bottom\n ResetState();\n break Beginning;\n }\n }\n\n if ((j - 1) >= 0) {\n ValidSwitch(i, j);\n if (NoMovesRemaining == 0) { //checks the candies at the top\n ResetState();\n break Beginning;\n }\n }\n }\n\n }\n InsideMovesRemainingExists = 0;\n\n}",
"public boolean miniWin()\n {\n\treturn (jackpot()\n\t\t||( (! _fruits[0].equals(_fruits[1]))\n\t\t && (! _fruits[1].equals(_fruits[2]))\n\t\t && (! _fruits[0].equals(_fruits[2]))));\n }",
"private static int minimum() {\n\t\tint popSize = 0;\n\t\tChromosome thisChromo = null;\n\t\tChromosome thatChromo = null;\n\t\tint winner = 0;\n\t\tboolean foundNewWinner = false;\n\t\tboolean done = false;\n\n\t\twhile (!done) {\n\t\t\tfoundNewWinner = false;\n\t\t\tpopSize = population.size();\n\t\t\tfor (int i = 0; i < popSize; i++) {\n\t\t\t\tif (i != winner) { // Avoid self-comparison.\n\t\t\t\t\tthisChromo = population.get(i);\n\t\t\t\t\tthatChromo = population.get(winner);\n\t\t\t\t\tif (thisChromo.conflicts() < thatChromo.conflicts()) {\n\t\t\t\t\t\twinner = i;\n\t\t\t\t\t\tfoundNewWinner = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (foundNewWinner == false) {\n\t\t\t\tdone = true;\n\t\t\t}\n\t\t}\n\t\treturn winner;\n\t}",
"public int conflicts() {\n int total = 0;\n int dist;\n if (!isValid()) return 0;\n for (int r = 0; r < Board.dim; r++) {\n int row = r*Board.dim; \n for (int i = row; i < row + Board.dim; i++)\n for (int j = i + 1; j < row + Board.dim; j++) \n if (Board.rowOf[state[i]] == r && \n Board.rowOf[state[j]] == r &&\n state[i] != 0 && state[j] != 0 &&\n state[i] > state[j])\n total = total + 1;\n }\n for (int col = 0; col < Board.dim; col++) \n for (int i = col; i < state.length - Board.dim; i+= Board.dim) {\n for (int j = i + Board.dim; j < state.length; j+= Board.dim) \n if (Board.colOf[state[i]] == col &&\n Board.colOf[state[j]] == col &&\n state[i] != 0 && state[j] != 0 &&\n state[i] > state[j])\n total = total + 1;\n } \n return total; \n }",
"public int checkCastle(Board b, char race) {\n Set<Coordinate> opponentPieces = (race == 'b') ? b.white : b.black;\n Set<Coordinate> opponentMoves = new HashSet<Coordinate>();\n\n for (Coordinate each : opponentPieces) {\n if (b.board[each.x][each.y] instanceof King) {\n continue;\n }\n if (b.board[each.x][each.y] instanceof Pawn) {\n opponentMoves.addAll(((Pawn) (b.board[each.x][each.y])).killableMoves(b));\n } else {\n opponentMoves.addAll(b.board[each.x][each.y].displayMoves(b));\n }\n }\n\n switch (race) {\n case 'b':\n if (b.board[0][4] != null && b.board[0][4].move == 0) {\n int i = 0;\n if (b.board[0][0] != null && b.board[0][0].move == 0) {\n if (b.board[0][1] == null && b.board[0][2] == null && b.board[0][3] == null) {\n if (!opponentMoves.contains(new Coordinate(0, 2)) && !opponentMoves.contains(new Coordinate(0, 3))\n && !opponentMoves.contains(new Coordinate(0, 4))) {\n i++;\n }\n }\n }\n\n if (b.board[0][7] != null && b.board[0][7].move == 0) {\n if (b.board[0][5] == null && b.board[0][6] == null) {\n if (!opponentMoves.contains(new Coordinate(0, 6)) && !opponentMoves.contains(new Coordinate(0, 5))\n && !opponentMoves.contains(new Coordinate(0, 4))) {\n i += 10;\n }\n }\n }\n return i;\n }\n break;\n\n case 'w':\n if (b.board[7][4] != null && b.board[7][4].move == 0) {\n int i = 20;\n if (b.board[7][0] != null && b.board[7][0].move == 0) {\n if (b.board[7][1] == null && b.board[7][2] == null && b.board[7][3] == null) {\n if (!opponentMoves.contains(new Coordinate(7, 2)) && !opponentMoves.contains(new Coordinate(7, 3))\n && !opponentMoves.contains(new Coordinate(7, 4))) {\n i++;\n }\n }\n }\n\n if (b.board[7][7] != null && b.board[7][7].move == 0) {\n if (b.board[7][5] == null && b.board[7][6] == null) {\n if (!opponentMoves.contains(new Coordinate(7, 6)) && !opponentMoves.contains(new Coordinate(7, 5))\n && !opponentMoves.contains(new Coordinate(7, 4))) {\n i += 10;\n }\n }\n }\n return i;\n }\n break;\n }\n return 69;\n }",
"protected boolean checkRep() {\n if ( this.getX() < 0 || this.getY() < 0 || this.getX() >= 20 || this.getY() >= 20 ) {\n return false;\n }\n return true;\n }",
"private boolean isOwnOccupied(int x, int y) {\n for (int i = 0; i < player.own.length; i++) {\n if (player.own[i].x == x && player.own[i].y == y) {\n //System.out.println(\"own occupied:\" + i);\n return true;\n }\n }\n return false;\n }",
"public int compareAns(int x)\n\t{\n\t\tif(x == correctAns)\n\t\t{\n\t\t\treturn 1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\n\t\t\treturn 0;\n\t\t}\n\t}",
"public boolean isXsolution() {\n\t\tfor (int k=1; k<size*size; k++) {\n\t\t\tint count1 = 0;\n\t\t\tint count2 = 0;\n\t\t\tfor (int l=0; l<size*size; l++) {\n\t\t\t\tif (board[l][l]==k) count1++;\n\t\t\t\tif (board[l][size*size-l-1]==k) count2++;\n\t\t\t}\n\t\t\tif (count1!=1 || count2!=1) return false;\n\t\t}\n\t\treturn true;\n\t}",
"private boolean validMove(int xi, int yi, int xf, int yf) {\n\t\tPiece prevP = pieceAt(xi, yi);\n\t\tPiece nextP = pieceAt(xf, yf);\n\n\t\tif (prevP.isKing()) {\n\t\t\tif (((xf - xi) == 1 || (xi - xf) == 1) && ((yf - yi) == 1 || (yi - yf) == 1)) \n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t} else \n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tif (prevP.isFire()) \n\t\t{\n\t\t\tif (((xf - xi) == 1 || (xi - xf) == 1) && (yf - yi) == 1) \n\t\t\t{\n\t\t\t\tif (nextP != null && !nextP.isFire()) \n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t} \n\t\t\telse if ((xf - xi) == 2 && (yf - yi) == 2) \n\t\t\t{\n\t\t\t\tPiece pBetween = pieceAt(xi+1, yi+1);\n\t\t\t\tif (pBetween != null && prevP.side() != pBetween.side()) \n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t} \n\t\t\telse if ((xi - xf) == 2 && (yf - yi) == 2) \n\t\t\t{\n\t\t\t\tPiece pBetween = pieceAt(xi-1, yi+1);\n\t\t\t\tif (pBetween != null && prevP.side() != pBetween.side()) \n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t} else \n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else \n\t\t{\n\t\t\tif (((xf - xi) == 1 || (xi - xf) == 1) && (yi - yf) == 1) \n\t\t\t{\n\t\t\t\tif (nextP != null && nextP.isFire()) \n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t} \n\t\t\telse if ((xf - xi) == 2 && (yi - yf) == 2) \n\t\t\t{\n\t\t\t\tPiece pBetween = pieceAt(xi+1, yi-1);\n\t\t\t\tif (pBetween != null && prevP.side() != pBetween.side()) \n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t} \n\t\t\telse if ((xi - xf) == 2 && (yi - yf) == 2) \n\t\t\t{\n\t\t\t\tPiece pBetween = pieceAt(xi-1, yi-1);\n\t\t\t\tif (pBetween != null && prevP.side() != pBetween.side()) \n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t} \n\t\t\telse \n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"private static boolean isItVisted(Node node) {\n\t\t\n\t\tboolean areNodesEqual = false;\n\t\tfor (Node temp : nodesCovered) {\n\t\t\tif(choice==1){\n\t\t\t\tif (node.count == temp.count) \t\t\t\t{\n\t\t\t\t\tif (areTheyEqual(temp.stateSpace, node.stateSpace)) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t }\n\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t\n\t\t\t\t\tif (node.manhattanDist == temp.manhattanDist) {\n\t\t\t\t\t\tif (areTheyEqual(temp.stateSpace, node.stateSpace)) {\n\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n\t\treturn areNodesEqual;\n\t}",
"public boolean distLocX(Animal an) {\n return (locX != an.locX);\n }",
"public boolean CheckMate(Board b, Player p, boolean check) {\n int WhiteKingx = WhiteKing(b)[0];\r\n int WhiteKingy = WhiteKing(b)[1];\r\n int BlackKingx = BlackKing(b)[0];\r\n int BlackKingy = BlackKing(b)[1];\r\n\r\n if (check && p.getColor()) {\r\n //currently in check and color is white\r\n for (int horizontal = -1; horizontal < 2; horizontal++) {\r\n for (int vertical = -1; vertical < 2; vertical++) {\r\n if (b.blocks[WhiteKingx][WhiteKingy].getPiece().ValidMove(b.blocks, WhiteKingx, WhiteKingy, WhiteKingx + horizontal, WhiteKingy + vertical)) {\r\n /* Check which blocks the king can move to.\r\n * If the king can move, check if that block still puts the king on check\r\n * If all of them yield check, then see if there is a piece that can move to prevent the check\r\n */\r\n b.move(WhiteKingx, WhiteKingy, WhiteKingx + horizontal, WhiteKingy + vertical);\r\n if(!CheckChecker(b, p)) {\r\n b.move(WhiteKingx + horizontal, WhiteKingy + vertical, WhiteKingx, WhiteKingy);\r\n return false;\r\n }\r\n b.move(WhiteKingx + horizontal, WhiteKingy + vertical, WhiteKingx, WhiteKingy);\r\n }\r\n }\r\n }\r\n }\r\n if (check && !p.getColor()) {\r\n for(int horizontal = -1; horizontal < 2; horizontal++) {\r\n for(int vertical = -1; vertical < 2; vertical ++) {\r\n if(b.blocks[BlackKingx][BlackKingy].getPiece().ValidMove(b.blocks, BlackKingx, BlackKingy, BlackKingx + horizontal, BlackKingy + vertical)) {\r\n b.move(BlackKingx, BlackKingy, BlackKingx + horizontal, BlackKingy + vertical);\r\n if(!CheckChecker(b, p)) {\r\n b.move(BlackKingx + horizontal, BlackKingy + vertical, BlackKingx, BlackKingy);\r\n return false;\r\n }\r\n b.move(BlackKingx + horizontal, BlackKingy + vertical, BlackKingx, BlackKingy);\r\n }\r\n }\r\n }\r\n }\r\n return true;\r\n }",
"public boolean fitsInPlayerBoard(int x, int y) {\n if (rotation) { // na vysku\n if (!(x + sizeSelected - 1 < maxN)) {\n return false;\n }\n } else { // na sirku\n if (!(y + sizeSelected - 1 < maxN)) {\n return false;\n }\n }\n\n // skontrolujem ci nebude prekrvat inu lod\n if (rotation) { // na vysku\n for (int i = 0; i < sizeSelected; i++) {\n if (boardPlayer[x + i][y] == GameObject.Ship) {\n return false;\n }\n }\n } else { // na sirku\n for (int i = 0; i < sizeSelected; i++) {\n if (boardPlayer[x][y + i] == GameObject.Ship) {\n return false;\n }\n }\n }\n\n // skontrolujem ci sa nebude dotykat inej lode\n if (rotation) { // na vysku\n for (int i = 0; i < sizeSelected; i++) {\n if ((x - 1 >= 0 && boardPlayer[x + i - 1][y] == GameObject.Ship) ||\n (x - 1 >= 0 && y - 1 >= 0 && boardPlayer[x + i - 1][y - 1] == GameObject.Ship) ||\n (y - 1 >= 0 && boardPlayer[x + i][y - 1] == GameObject.Ship) ||\n (x + i + 1 < maxN && y - 1 >= 0 && boardPlayer[x + i + 1][y - 1] == GameObject.Ship) ||\n (x + i + 1 < maxN && boardPlayer[x + i + 1][y] == GameObject.Ship) ||\n (x + i + 1 < maxN && y + 1 < maxN && boardPlayer[x + i + 1][y + 1] == GameObject.Ship) ||\n (y + 1 < maxN && boardPlayer[x + i][y + 1] == GameObject.Ship) ||\n (x - 1 >= 0 && y + 1 < maxN && boardPlayer[x + i - 1][y + 1] == GameObject.Ship)) {\n return false;\n }\n }\n } else { // na sirku\n for (int i = 0; i < sizeSelected; i++) {\n if ((x - 1 >= 0 && boardPlayer[x - 1][y + i] == GameObject.Ship) ||\n (x - 1 >= 0 && y - 1 >= 0 && boardPlayer[x - 1][y + i - 1] == GameObject.Ship) ||\n (y - 1 >= 0 && boardPlayer[x][y + i - 1] == GameObject.Ship) ||\n (x + 1 < maxN && y - 1 >= 0 && boardPlayer[x + 1][y + i - 1] == GameObject.Ship) ||\n (x + 1 < maxN && boardPlayer[x + 1][y + i] == GameObject.Ship) ||\n (x + 1 < maxN && y + i + 1 < maxN && boardPlayer[x + 1][y + i + 1] == GameObject.Ship) ||\n (y + i + 1 < maxN && boardPlayer[x][y + i + 1] == GameObject.Ship) ||\n (x - 1 >= 0 && y + i + 1 < maxN && boardPlayer[x - 1][y + i + 1] == GameObject.Ship)) {\n return false;\n }\n }\n }\n\n return true;\n }",
"private boolean checkOrTurn(int row,int column, ItemState itemStateCurrentPlayer, int x, int y) {\n\t\t if(column==Settings.nbrRowsColumns||column<0){\n\t\t\t return false; //Get the hell out\n\t\t }\n\t\t if(row==Settings.nbrRowsColumns||row<0){ \n\t\t\t return false; //Get the hell out\n\t\t }\n\t\t if (gameStateInt[row][column]==Helpers.getOpponentPlayerCorrespondingInt(itemStateCurrentPlayer)){ //Still another color\n\t\t\t if(checkOrTurn(row+y,column+x, itemStateCurrentPlayer, x, y)){ //continue check next\n\t\t\t\t\t changed.add(new Action(row,column));\n\t\t\t\t return true;\n\t\t\t }else{\n\t\t\t\t return false;\n\t\t\t }\n\t\t }else if (gameStateInt[row][column]==Helpers.getPlayerCorrespondingInt(itemStateCurrentPlayer)){\n\t\t\t return true; //found same color\n\t\t }else{\n\t\t\t return false; //found grass\n\t\t }\n\t }",
"void whack (int x, int y) {\n\t\tint row = x;\n\t\tint col = y;\n\t\t\n\t\t// Check the value of the moleGrid coordinates and update score, number of attemptsLeft, and\n\t\t// molesLeft to find.\n\t\tif (moleGrid[row][col] == 'M') {\n\t\t\t// Moles was found so mark location as Whacked.\n\t\t\tmoleGrid[row][col] = 'W';\n\t\t\t\n\t\t\t// Increase the users score by an increment of one.\n\t\t\tscore++;\n\t\t\t\n\t\t\t// Reduce the molesLeft to find by an increment of one.\n\t\t\tmolesLeft--;\n\t\t\t\n\t\t\t// Reduce the number of attempts left to find moles by one.\n\t\t\tattemptsLeft--;\n\t\t\t\n\t\t\t// Post feedback to the user on successfully finding mole and inform them of the score and \n\t\t\t// the number of attempts left.\n\t\t\tSystem.out.println(\"Success, you found a mole. Your updated score is: \" + score + \". \"\n\t\t\t\t\t+ \"You have \" + attemptsLeft + \" attempts left to find \" + molesLeft + \" moles.\");\n\t\t\t\n\t\t} else if (moleGrid[row][col] == 'W') {\n\t\t\t// Post feedback to the user that a mole was already found at this location and inform \n\t\t\t// them of the number of attempts left.\n\t\t\tSystem.out.println(\"A mole was already found at this location.\");\n\t\t\tattemptsLeft--;\n\t\t\t// Print Attempts left to the console.\n\t\t\tSystem.out.println(\"You have \" + attemptsLeft + \" attempts left to find \" + molesLeft + \n\t\t\t\t\t\" moles.\");\n\t\t\t\n\t\t\n\t\t} else {\n\t\t\t// Post feedback to the user that NO mole was found at this location and inform \n\t\t\t// them of the number of attempts left.\n\t\t\tSystem.out.println(\"Sorry, NO mole was found at this location.\");\n\t\t\t\n\t\t\t// Reduce the number of attempts left to find moles by one.\n\t\t\tattemptsLeft--;\n\t\t\t\n\t\t\t// Print Attempts left to the console.\n\t\t\tSystem.out.println(\"You have \" + attemptsLeft + \" attempts left to find \" + molesLeft + \n\t\t\t\t\t\" moles.\");\n\n\t\t}\n\t}",
"private int checkWin(int x) {\n for (int row = 0; row < 8; row++) {\n for (int col = 0; col < 9; col++) {\n //Black = 1, Red = 0\n\n //Checks Vertically\n if ((buttons[row][col].getText() == \"O\") && (buttons[row][col+1].getText() == \"O\") && (buttons[row][col+2].getText() == \"O\") && (buttons[row][col+3].getText() == \"O\")) {\n return 0;\n }\n if ((buttons[row][col].getText() == \"X\") && (buttons[row][col+1].getText() == \"X\") && (buttons[row][col+2].getText() == \"X\") && (buttons[row][col+3].getText() == \"X\")) {\n return 1;\n }\n\n //Checks Vertically\n if ((buttons[row][col].getText() == \"O\") && (buttons[row+1][col].getText() == \"O\") && (buttons[row+2][col].getText() == \"O\") && (buttons[row+3][col].getText() == \"O\")) {\n return 0;\n }\n\n if ((buttons[row][col].getText() == \"X\") && (buttons[row+1][col].getText() == \"X\") && (buttons[row+2][col].getText() == \"X\") && (buttons[row+3][col].getText() == \"X\")) {\n return 1;\n }\n\n //Diagonal Top left to bottom right checker\n if((buttons[row][col].getText() == \"O\") && (buttons[row+1][col+1].getText() == \"O\") && (buttons[row+2][col+2].getText() == \"O\") && (buttons[row+3][col+3].getText() == \"O\")) {\n return 0;\n }\n if((buttons[row][col].getText() == \"X\") && (buttons[row+1][col+1].getText() == \"X\") && (buttons[row+2][col+2].getText() == \"X\") && (buttons[row+3][col+3].getText() == \"X\")) {\n return 1;\n }\n\n //Diagonal Bottom left to top right checker\n if((buttons[row][col].getText() == \"O\") && (buttons[row-1][col+1].getText() == \"O\") && (buttons[row-2][col+2].getText() == \"O\") && (buttons[row-3][col+3].getText() == \"O\")) {\n return 0;\n }\n if((buttons[row][col].getText() == \"X\") && (buttons[row-1][col+1].getText() == \"X\") && (buttons[row-2][col+2].getText() == \"X\") && (buttons[row-3][col+3].getText() == \"X\")) {\n return 1;\n }\n }\n }\n return 2;\n }",
"public void checkNeighbours(String word, int id, int x, List<Integer> usedIDs){\n ArrayList<Character> neighbours = charToLower(boggleModel.getNeighbours(id));\n ArrayList<Integer> neighbourIDs = boggleModel.getFieldIDs();\n\n\n // \"while\" word length > X, go into recursion\n if(word.length() > x) {\n // check if the character matches && if it has NOT already been used\n if ((neighbours.contains(word.charAt(x)))) {\n // check whether neighbours has word.charAt(x).. if true, we want to know what letter and where the letter is in the neighbours.\n // With that we can check in the neighboursID whether that ID is already in the usedIDs..\n int check = neighbourIDs.get(neighbours.indexOf(word.charAt(x)));\n\n // When there are more matches...\n if(check != neighbours.lastIndexOf(word.charAt(x))){\n if(usedIDs.contains(check)){\n check = neighbourIDs.get(neighbours.lastIndexOf(word.charAt(x)));\n }\n }\n\n // when check not in usedIDs yet, we can of course use it and find its neighbours..\n if(!usedIDs.contains(check)) {\n // increase X so word.charAt(x) will increase\n x++;\n id = check;\n\n // recursion\n usedIDs.add(check);\n checkNeighbours(word, id, x, usedIDs);\n }\n }\n } else if((word.length() == x)){\n foundWords.add(word);\n } else {\n System.out.println(\"Klaar met zoeken..\");\n\n }\n\n }",
"private boolean canCaptureSomewhere(int x, int y){\n\t\tfor (int i = -2; i <= 2; i=i+4){\n\t\t\tfor (int j = -2; j <= 2; j=j+4){\n\t\t\t\tif (!(x+i < 0 || x+i > N\t\t\n\t\t\t\t|| y+j < 0 || y+j > N)){\t\t//don't give validMove impossible final coordinates\n\t\t\t\t\tif (validMove(x, y, x+i, y+j)) return true;\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"boolean winsAgainst(Selection selection);",
"static int checkMateWithMantri(char[][] board, int P1r, int P1c) {\n\t\tint rb = P1r + 1, checMate = 0;\n\t\tfor (int c = P1c + 1; c < 8; c++) {\n\t\t\tif (board[rb][c] == 'k') {\n\t\t\t\tchecMate++;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\trb++;\n\t\t}\n\t\tint cb = P1c - 1;\n\t\tfor (int r = P1r + 1; r <= P1c; r++) {\n\t\t\tif (board[r][cb] == 'k') {\n\t\t\t\tchecMate++;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcb--;\n\t\t}\n\t\t\n\t\tint ch = P1c;\n\t\tfor (int r = P1r + 1; r < 8; r++) {\n\t\t\tif (board[r][ch] == 'k') {\n\t\t\t\tchecMate++;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn checMate;\n\t}",
"boolean isWinner() {\n if(checkTopLeftDownDiag('X') || checkTopLeftDownDiag('O')) {\n return true;\n } else if (checkBottomLeftUpDiag('X') || checkBottomLeftUpDiag('O')) {\n return true;\n } else if (checkRows('X') || checkRows('O')){\n return true;\n }\n else if (checkColumns('X') || checkColumns('O')){\n return true;\n }\n\n return false;\n }",
"@Override\n\t@SuppressWarnings(\"rawtypes\")\n\tpublic BlockPos findBiomePosition(int x, int z, int checkRadius, List viableBiomes, Random rand) {\n\t\tIntCache.resetIntCache();\n\t\tint minX = x - checkRadius >> 2;\n\t\tint minZ = z - checkRadius >> 2;\n\t\tint maxX = x + checkRadius >> 2;\n\t\tint maxZ = z + checkRadius >> 2;\n\t\tint sizeX = maxX - minX + 1;\n\t\tint sizeZ = maxZ - minZ + 1;\n\t\tint[] biomeArray = biomeGenLayer.getInts(minX, minZ, sizeX, sizeZ);\n\t\tBlockPos pos = null;\n\t\tint attempts = 0;\n\n\t\tfor (int index = 0; index < sizeX * sizeZ; ++index) {\n\t\t\tint finalX = minX + index % sizeX << 2;\n\t\t\tint finalZ = minZ + index / sizeX << 2;\n\n\t\t\tif (viableBiomes.contains(Biome.getBiome(biomeArray[index], Biomes.DEFAULT)) && (pos == null || rand.nextInt(attempts + 1) == 0)) {\n\t\t\t\tpos = new BlockPos(finalX, 0, finalZ);\n\t\t\t\t++attempts;\n\t\t\t}\n\t\t}\n\n\t\treturn pos;\n\t}",
"public static void nomovecheck(){\n\t\tnomovecount=0;\n\t\tboardcheck(\"x\");\n\t\tboardcheck(\"o\");\n\t}",
"public boolean relieComposantes(int x, int y, String col)\n\t{\n\t\t\tif(getLesVoisins(x, y, col).getX() == x && getLesVoisins(x, y, col).getY() == y)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn (getLesVoisins(x, y, col).getCol() == tableauPeres_[x][y].getCol());\n\t\t\t}\n\t\t/*}*/\n\t\t/*if (x == 0)\n\t\t{\n\t\t \treturn (tableauPeres_[x+1][y].getCol() == tableauPeres_[x][y].getCol()\n\t\t \t\t|| tableauPeres_[x][y-1].getCol() == tableauPeres_[x][y].getCol()\n\t\t \t\t|| tableauPeres_[x][y+1].getCol() == tableauPeres_[x][y].getCol()\n\t\t \t\t|| tableauPeres_[x+1][y-1].getCol() == tableauPeres_[x][y].getCol()\n\t\t \t\t|| tableauPeres_[x+1][y+1].getCol() == tableauPeres_[x][y].getCol());\n\t\t}\n\t\telse if (y == 0)\n\t\t{\n\t\t\treturn (tableauPeres_[x+1][y].getCol() == tableauPeres_[x][y].getCol()\n\t\t\t\t|| tableauPeres_[x-1][y].getCol() == tableauPeres_[x][y].getCol()\n\t\t\t\t|| tableauPeres_[x][y+1].getCol() == tableauPeres_[x][y].getCol()\n\t\t\t\t|| tableauPeres_[x+1][y+1].getCol() == tableauPeres_[x][y].getCol()\n\t\t\t\t|| tableauPeres_[x-1][y+1].getCol() == tableauPeres_[x][y].getCol());\n\t\t}\n\t\telse if (x == 0 && y == 0)\n\t\t{\n\t\t\treturn (tableauPeres_[x+1][y].getCol() == tableauPeres_[x][y].getCol()\n\t\t\t\t|| tableauPeres_[x][y+1].getCol() == tableauPeres_[x][y].getCol()\n\t\t\t\t|| tableauPeres_[x+1][y+1].getCol() == tableauPeres_[x][y].getCol());\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn (tableauPeres_[x-1][y].getCol() == tableauPeres_[x][y].getCol()\n\t\t\t\t|| tableauPeres_[x+1][y].getCol() == tableauPeres_[x][y].getCol()\n\t\t\t\t|| tableauPeres_[x][y+1].getCol() == tableauPeres_[x][y].getCol()\n\t\t \t\t|| tableauPeres_[x][y-1].getCol() == tableauPeres_[x][y].getCol()\n\t\t \t\t|| tableauPeres_[x-1][y-1].getCol() == tableauPeres_[x][y].getCol()\n\t\t \t\t|| tableauPeres_[x+1][y-1].getCol() == tableauPeres_[x][y].getCol()\n\t\t \t\t|| tableauPeres_[x-1][y+1].getCol() == tableauPeres_[x][y].getCol()\n\t\t \t\t|| tableauPeres_[x+1][y+1].getCol() == tableauPeres_[x][y].getCol());\n\t\t}*/\n\t\t\n\n\t}",
"private boolean checkAddSelectPoint(float x, float y) {\n mLastTouchX = x;\n mLastTouchY = y;\n for (int i = 0; i < mRectFPointList.size(); i++) {\n RectF rect = mRectFPointList.get(i);\n float mOuterOvalRadius = Math.max(mNormalOvalRadius, mSelectOvalRadius);\n if (mOuterOvalRadius < DEFAULT_NORMAL_OVAL_RADIUS) {\n mOuterOvalRadius = DEFAULT_NORMAL_OVAL_RADIUS;\n }\n if (getDistance(rect.centerX(), rect.centerY(), x, y) <= mOuterOvalRadius) {\n // valid distance\n if (!mRectFSelectPointList.contains(rect)) {\n mRectFSelectPointList.add(rect);\n mInputPassword.add(i + 1);\n return true;\n }\n return false;\n }\n }\n return false;\n }",
"@Override\r\n\tpublic boolean possibleMove(int x, int y) {\n\t\tif (this.sameColor(Board.getPiece(x, y)) == true) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (Math.abs(this.getY() - y) == 2 && Math.abs(this.getX() - x) == 1\r\n\t\t\t\t|| Math.abs(this.getY() - y) == 1 && Math.abs(this.getX() - x) == 2) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}",
"@Override\n\tpublic Monies change(int amount, Monies balance) throws CashRegisterException {\n\t\tif (balance.getMonetaryValue() < amount) {\n\t\t\tthrow new CashRegisterException(CashRegisterExceptionType.INSUFFICIENT_AMT, amount);\n\t\t}\n\n\t\tList<Integer> searchSpace = createChangeCombinationSearchSpace(amount, balance);\n\n\t\t// if the sum of all eligible banknotes is less than\n\t\t// the change amount we don't proceed.\n\t\t// For example if we have to change 14 and after filtering 20's\n\t\t// we are left with 5, 5, and 2. While the cash register had more\n\t\t// money originally than the change amount, the change banknotes that\n\t\t// we have are not appropriate to process the change.\n\t\tif (searchSpace.stream().mapToInt(Integer::intValue).sum() < amount) {\n\t\t\tthrow new CashRegisterException(CashRegisterExceptionType.NO_EXACT_CHANGE, amount);\n\t\t}\n\n\t\tArrayList<Integer> tempSearchSpace = new ArrayList<Integer>(searchSpace);\n\t\tArrayList<Integer> selectedBankNotes = new ArrayList<Integer>();\n\t\tArrayList<List<Integer>> goodCombinations = new ArrayList<List<Integer>>();\n\t\tint remainingAmount = amount;\n\n\t\tRandom random = new Random();\n\t\tint randomIndex;\n\t\t// Randomized search with pre-set size\n\t\tfor (int i = 0; i < MAX_NUMBER_OF_ATTEMPTS_FOR_FINDING_EXACT_CHANGE; i++) {\n\t\t\trandomIndex = random.nextInt(tempSearchSpace.size());\n\t\t\tInteger banknote = tempSearchSpace.get(randomIndex);\n\t\t\t// Since we continuously shrink the search set we do\n\t\t\t// not to have numbers greater than amount. So we don't need to\n\t\t\t// check\n\t\t\t// if the remaining amount is greater or equal to remaining\n\t\t\t// banknotes.\n\t\t\tremainingAmount -= banknote;\n\t\t\tselectedBankNotes.add(banknote);\n\n\t\t\tshrinkChangeCombinationSearchSpace(randomIndex, remainingAmount, tempSearchSpace);\n\n\t\t\t// if we found a combination we store it\n\t\t\tif (remainingAmount == 0) {\n\t\t\t\tstoreNewCombination(selectedBankNotes, goodCombinations);\n\t\t\t}\n\t\t\t// if we found a combination we reload everything\n\t\t\t// and look for others up to our number of randomized tries\n\t\t\t// or if there are no more banknotes that are smaller or equal\n\t\t\t// to the amount we have remaining.\n\t\t\tif (remainingAmount == 0 || tempSearchSpace.size() == 0) {\n\t\t\t\tselectedBankNotes = new ArrayList<Integer>();\n\t\t\t\tremainingAmount = amount;\n\t\t\t\ttempSearchSpace = new ArrayList<Integer>(searchSpace);\n\t\t\t}\n\t\t}\n\t\t// We have multiple combinations here.\n\t\t// The code is setup to handle these combinations differently through\n\t\t// strategy pattern. For the time being only one strategy has been\n\t\t// implemented\n\t\t// that takes the first combination from the list. Others could the\n\t\t// combinations\n\t\t// with fewest number of banknotes or the banknotes with the smallest\n\t\t// denominations.\n\t\tif (goodCombinations.size() > 0) {\n\t\t\ttry {\n\t\t\t\tMonies changedMonies = convertBankNotesToMonies(selectChangeCombination(goodCombinations));\n\t\t\t\treturn changedMonies;\n\t\t\t} catch (MoniesException mex) {\n\t\t\t\tthrow new CashRegisterException(CashRegisterExceptionType.UNEXPECTED_CURRENCY, mex);\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new CashRegisterException(CashRegisterExceptionType.NO_EXACT_CHANGE, amount);\n\t\t}\n\t}",
"public boolean checkmate(Boolean si) {\n\t\tif (!check(si)) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tfor (String s : legalMoves(!si)) {\n\t\t\tBoard nBD = new Board(getBoard());\n\t\t\tnBD.move(s, !si);\n\t\t\tnBD.update();\n\t\t\tif (!(nBD.check(si))) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t//System.out.println(\"Mate Test\");\n\t\treturn true;\n\t}",
"protected int checkWhere(float x, float y)\n\t{\n\t\t//check if it's in the first column\n\t\tif((x>0)&&(x<180))\n\t\t{\n\t\t\t//if it's in the first column, check which row it's in\n\t\t\tif(y<180)\n\t\t\t{\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\tif(y<360)\n\t\t\t{\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\tif(y<540)\n\t\t\t{\n\t\t\t\treturn 2;\n\t\t\t}\n\t\t}\n\n\t\t//check if it's in the second column\n\t\tif((x>180)&&(x<360))\n\t\t{\n\t\t\t//if it is, check which row it's in\n\t\t\tif(y<180)\n\t\t\t{\n\t\t\t\treturn 3;\n\t\t\t}\n\t\t\tif(y<360)\n\t\t\t{\n\t\t\t\treturn 4;\n\t\t\t}\n\t\t\tif(y<540)\n\t\t\t{\n\t\t\t\treturn 5;\n\t\t\t}\n\t\t}\n\n\t\t//if it's not in the first or second column, it's in the third column\n\t\tif(x>360)\n\t\t{\n\t\t\t//check which row it's in\n\t\t\tif(y<180)\n\t\t\t{\n\t\t\t\treturn 6;\n\t\t\t}\n\t\t\tif(y<360)\n\t\t\t{\n\t\t\t\treturn 7;\n\t\t\t}\n\t\t\tif(y<540)\n\t\t\t{\n\t\t\t\treturn 8;\n\t\t\t}\n\t\t}\n\t\t//just in case it's not in anything, then return 9.\n\t\t//this will cause the thingy to not change\n\t\treturn 9;\n\t}",
"@Override\r\n boolean isValidSpecialMove(final int newX, final int newY) {\r\n int xDisplacement = newX - getXLocation();\r\n int yDisplacement = newY - getYLocation();\r\n if (isValidRookMove(xDisplacement, yDisplacement)) {\r\n // Total number of steps the piece has to take.\r\n //Either x = 0 or y = 0.\r\n int steps = Math.max(Math.abs(xDisplacement),\r\n Math.abs(yDisplacement));\r\n int xDirection = xDisplacement / steps;\r\n int yDirection = yDisplacement / steps;\r\n // Check for obstacles in path of Rook.\r\n for (int i = 1; i < steps; i++) {\r\n ChessSquare squareToCheck = getCurrentBoard().getSquaresList()\r\n [getXLocation() + i * xDirection]\r\n [getYLocation() + i * yDirection];\r\n if (squareToCheck.getIsOccupied()) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n return false;\r\n\r\n }",
"public boolean checkmate()\n {\n return checkmate(PieceColor.BLACK)||checkmate(PieceColor.WHITE);\n }",
"public int possibleMoves(int i, int x, int y, int[][] board) {\n\t\tint canMove = 0;\n\n\t\tif (i == 12) {\n\t\t\tStdDraw.setPenColor(Move);\n\t\t\tif (((y > 0 && y <= 7) && (x > 1 && x <= 7))\n\t\t\t\t\t&& board[x - 2][y - 1] > 3) {\n\t\t\t\tcanMove = canMove\n\t\t\t\t\t\t+ possibleAttacks(x - 2, y - 1, board, StdDraw.BLACK);\n\t\t\t}\n\t\t\tif (((y > 0 && y <= 7) && (x > 1 && x <= 7))\n\t\t\t\t\t&& board[x - 2][y - 1] < 3) {\n\t\t\t\tStdDraw.filledRectangle(x - 1.5, y - .5, .5, .5);\n\t\t\t\tStdDraw.setPenColor();\n\t\t\t\tStdDraw.rectangle(x - 1.5, y - .5, .5, .5);\n\t\t\t\tboard[x - 2][y - 1] = 0;\n\t\t\t\tcanMove++;\n\t\t\t}\n\t\t\tStdDraw.setPenColor(Move);\n\t\t\tif (((y >= 0 && y < 7) && (x > 1 && x <= 7))\n\t\t\t\t\t&& board[x - 2][y + 1] > 3) {\n\t\t\t\tcanMove = canMove\n\t\t\t\t\t\t+ possibleAttacks(x - 2, y + 1, board, StdDraw.BLACK);\n\t\t\t}\n\n\t\t\tif (((y >= 0 && y < 7) && (x > 1 && x <= 7))\n\t\t\t\t\t&& board[x - 2][y + 1] < 3) {\n\t\t\t\tStdDraw.filledRectangle(x - 1.5, y + 1.5, .5, .5);\n\t\t\t\tStdDraw.setPenColor();\n\t\t\t\tStdDraw.rectangle(x - 1.5, y + 1.5, .5, .5);\n\t\t\t\tboard[x - 2][y + 1] = 0;\n\t\t\t\tcanMove++;\n\t\t\t}\n\t\t\tStdDraw.setPenColor(Move);\n\t\t\tif (((y >= 0 && y < 6) && (x > 0 && x <= 7))\n\t\t\t\t\t&& board[x - 1][y + 2] > 3) {\n\t\t\t\tcanMove = canMove\n\t\t\t\t\t\t+ possibleAttacks(x - 1, y + 2, board, StdDraw.BLACK);\n\t\t\t}\n\t\t\tif (((y >= 0 && y < 6) && (x > 0 && x <= 7))\n\t\t\t\t\t&& board[x - 1][y + 2] < 3) {\n\t\t\t\tStdDraw.filledRectangle(x - .5, y + 2.5, .5, .5);\n\t\t\t\tStdDraw.setPenColor();\n\t\t\t\tStdDraw.rectangle(x - .5, y + 2.5, .5, .5);\n\t\t\t\tboard[x - 1][y + 2] = 0;\n\t\t\t\tcanMove++;\n\t\t\t}\n\t\t\tStdDraw.setPenColor(Move);\n\t\t\tif (((y >= 0 && y < 6) && (x >= 0 && x < 7))\n\t\t\t\t\t&& board[x + 1][y + 2] > 3) {\n\t\t\t\tcanMove = canMove\n\t\t\t\t\t\t+ possibleAttacks(x + 1, y + 2, board, StdDraw.BLACK);\n\t\t\t}\n\t\t\tif (((y >= 0 && y < 6) && (x >= 0 && x < 7))\n\t\t\t\t\t&& board[x + 1][y + 2] < 3) {\n\t\t\t\tStdDraw.filledRectangle(x + 1.5, y + 2.5, .5, .5);\n\t\t\t\tStdDraw.setPenColor();\n\t\t\t\tStdDraw.rectangle(x + 1.5, y + 2.5, .5, .5);\n\t\t\t\tboard[x + 1][y + 2] = 0;\n\t\t\t\tcanMove++;\n\t\t\t}\n\t\t\tStdDraw.setPenColor(Move);\n\t\t\tif (((y >= 0 && y < 7) && (x >= 0 && x < 6))\n\t\t\t\t\t&& board[x + 2][y + 1] > 3) {\n\t\t\t\tcanMove = canMove\n\t\t\t\t\t\t+ possibleAttacks(x + 2, y + 1, board, StdDraw.BLACK);\n\t\t\t}\n\t\t\tif (((y >= 0 && y < 7) && (x >= 0 && x < 6))\n\t\t\t\t\t&& board[x + 2][y + 1] < 3) {\n\t\t\t\tStdDraw.filledRectangle(x + 2.5, y + 1.5, .5, .5);\n\t\t\t\tStdDraw.setPenColor();\n\t\t\t\tStdDraw.rectangle(x + 2.5, y + 1.5, .5, .5);\n\t\t\t\tboard[x + 2][y + 1] = 0;\n\t\t\t\tcanMove++;\n\t\t\t}\n\t\t\tStdDraw.setPenColor(Move);\n\t\t\tif (((y > 0 && y <= 7) && (x >= 0 && x < 6))\n\t\t\t\t\t&& board[x + 2][y - 1] > 3) {\n\t\t\t\tcanMove = canMove\n\t\t\t\t\t\t+ possibleAttacks(x + 2, y - 1, board, StdDraw.BLACK);\n\t\t\t}\n\t\t\tif (((y > 0 && y <= 7) && (x >= 0 && x < 6))\n\t\t\t\t\t&& board[x + 2][y - 1] < 3) {\n\t\t\t\tStdDraw.filledRectangle(x + 2.5, y - .5, .5, .5);\n\t\t\t\tStdDraw.setPenColor();\n\t\t\t\tStdDraw.rectangle(x + 2.5, y - .5, .5, .5);\n\t\t\t\tboard[x + 2][y - 1] = 0;\n\t\t\t\tcanMove++;\n\t\t\t}\n\t\t\tStdDraw.setPenColor(Move);\n\t\t\tif (((y > 1 && y <= 7) && (x >= 0 && x < 7))\n\t\t\t\t\t&& board[x + 1][y - 2] > 3) {\n\t\t\t\tcanMove = canMove\n\t\t\t\t\t\t+ possibleAttacks(x + 1, y - 2, board, StdDraw.BLACK);\n\t\t\t}\n\t\t\tif (((y > 1 && y <= 7) && (x >= 0 && x < 7))\n\t\t\t\t\t&& board[x + 1][y - 2] < 3) {\n\t\t\t\tStdDraw.filledRectangle(x + 1.5, y - 1.5, .5, .5);\n\t\t\t\tStdDraw.setPenColor();\n\t\t\t\tStdDraw.rectangle(x + 1.5, y - 1.5, .5, .5);\n\t\t\t\tboard[x + 1][y - 2] = 0;\n\t\t\t\tcanMove++;\n\t\t\t}\n\t\t\tStdDraw.setPenColor(Move);\n\t\t\tif (((y > 1 && y <= 7) && (x > 0 && x <= 7))\n\t\t\t\t\t&& board[x - 1][y - 2] > 3) {\n\t\t\t\tcanMove = canMove\n\t\t\t\t\t\t+ possibleAttacks(x - 1, y - 2, board, StdDraw.BLACK);\n\t\t\t}\n\t\t\tif (((y > 1 && y <= 7) && (x > 0 && x <= 7))\n\t\t\t\t\t&& board[x - 1][y - 2] < 3) {\n\t\t\t\tStdDraw.filledRectangle(x - .5, y - 1.5, .5, .5);\n\t\t\t\tStdDraw.setPenColor();\n\t\t\t\tStdDraw.rectangle(x - .5, y - 1.5, .5, .5);\n\t\t\t\tboard[x - 1][y - 2] = 0;\n\t\t\t\tcanMove++;\n\t\t\t}\n\n\t\t\tStdDraw.show(30);\n\t\t\treturn canMove;\n\t\t}\n\n\t\tif (i == 22) {\n\t\t\tStdDraw.setPenColor(Move);\n\t\t\tif (((y > 0 && y <= 7) && (x > 1 && x <= 7))\n\t\t\t\t\t&& board[x - 2][y - 1] > 3) {\n\t\t\t\tcanMove = canMove\n\t\t\t\t\t\t+ possibleAttacks(x - 2, y - 1, board, StdDraw.WHITE);\n\t\t\t}\n\t\t\tif (((y > 0 && y <= 7) && (x > 1 && x <= 7))\n\t\t\t\t\t&& board[x - 2][y - 1] < 3) {\n\t\t\t\tStdDraw.filledRectangle(x - 1.5, y - .5, .5, .5);\n\t\t\t\tStdDraw.setPenColor();\n\t\t\t\tStdDraw.rectangle(x - 1.5, y - .5, .5, .5);\n\t\t\t\tboard[x - 2][y - 1] = 0;\n\t\t\t\tcanMove++;\n\t\t\t}\n\t\t\tStdDraw.setPenColor(Move);\n\t\t\tif (((y >= 0 && y < 7) && (x > 1 && x <= 7))\n\t\t\t\t\t&& board[x - 2][y + 1] > 3) {\n\t\t\t\tcanMove = canMove\n\t\t\t\t\t\t+ possibleAttacks(x - 2, y + 1, board, StdDraw.WHITE);\n\t\t\t}\n\n\t\t\tif (((y >= 0 && y < 7) && (x > 1 && x <= 7))\n\t\t\t\t\t&& board[x - 2][y + 1] < 3) {\n\t\t\t\tStdDraw.filledRectangle(x - 1.5, y + 1.5, .5, .5);\n\t\t\t\tStdDraw.setPenColor();\n\t\t\t\tStdDraw.rectangle(x - 1.5, y + 1.5, .5, .5);\n\t\t\t\tboard[x - 2][y + 1] = 0;\n\t\t\t\tcanMove++;\n\t\t\t}\n\t\t\tStdDraw.setPenColor(Move);\n\t\t\tif (((y >= 0 && y < 6) && (x > 0 && x <= 7))\n\t\t\t\t\t&& board[x - 1][y + 2] > 3) {\n\t\t\t\tcanMove = canMove\n\t\t\t\t\t\t+ possibleAttacks(x - 1, y + 2, board, StdDraw.WHITE);\n\t\t\t}\n\t\t\tif (((y >= 0 && y < 6) && (x > 0 && x <= 7))\n\t\t\t\t\t&& board[x - 1][y + 2] < 3) {\n\t\t\t\tStdDraw.filledRectangle(x - .5, y + 2.5, .5, .5);\n\t\t\t\tStdDraw.setPenColor();\n\t\t\t\tStdDraw.rectangle(x - .5, y + 2.5, .5, .5);\n\t\t\t\tboard[x - 1][y + 2] = 0;\n\t\t\t\tcanMove++;\n\t\t\t}\n\t\t\tStdDraw.setPenColor(Move);\n\t\t\tif (((y >= 0 && y < 6) && (x >= 0 && x < 7))\n\t\t\t\t\t&& board[x + 1][y + 2] > 3) {\n\t\t\t\tcanMove = canMove\n\t\t\t\t\t\t+ possibleAttacks(x + 1, y + 2, board, StdDraw.WHITE);\n\t\t\t}\n\t\t\tif (((y >= 0 && y < 6) && (x >= 0 && x < 7))\n\t\t\t\t\t&& board[x + 1][y + 2] < 3) {\n\t\t\t\tStdDraw.filledRectangle(x + 1.5, y + 2.5, .5, .5);\n\t\t\t\tStdDraw.setPenColor();\n\t\t\t\tStdDraw.rectangle(x + 1.5, y + 2.5, .5, .5);\n\t\t\t\tboard[x + 1][y + 2] = 0;\n\t\t\t\tcanMove++;\n\t\t\t}\n\t\t\tStdDraw.setPenColor(Move);\n\t\t\tif (((y >= 0 && y < 7) && (x >= 0 && x < 6))\n\t\t\t\t\t&& board[x + 2][y + 1] > 3) {\n\t\t\t\tcanMove = canMove\n\t\t\t\t\t\t+ possibleAttacks(x + 2, y + 1, board, StdDraw.WHITE);\n\t\t\t}\n\t\t\tif (((y >= 0 && y < 7) && (x >= 0 && x < 6))\n\t\t\t\t\t&& board[x + 2][y + 1] < 3) {\n\t\t\t\tStdDraw.filledRectangle(x + 2.5, y + 1.5, .5, .5);\n\t\t\t\tStdDraw.setPenColor();\n\t\t\t\tStdDraw.rectangle(x + 2.5, y + 1.5, .5, .5);\n\t\t\t\tboard[x + 2][y + 1] = 0;\n\t\t\t\tcanMove++;\n\t\t\t}\n\t\t\tStdDraw.setPenColor(Move);\n\t\t\tif (((y > 0 && y <= 7) && (x >= 0 && x < 6))\n\t\t\t\t\t&& board[x + 2][y - 1] > 3) {\n\t\t\t\tcanMove = canMove\n\t\t\t\t\t\t+ possibleAttacks(x + 2, y - 1, board, StdDraw.WHITE);\n\t\t\t}\n\t\t\tif (((y > 0 && y <= 7) && (x >= 0 && x < 6))\n\t\t\t\t\t&& board[x + 2][y - 1] < 3) {\n\t\t\t\tStdDraw.filledRectangle(x + 2.5, y - .5, .5, .5);\n\t\t\t\tStdDraw.setPenColor();\n\t\t\t\tStdDraw.rectangle(x + 2.5, y - .5, .5, .5);\n\t\t\t\tboard[x + 2][y - 1] = 0;\n\t\t\t\tcanMove++;\n\t\t\t}\n\t\t\tStdDraw.setPenColor(Move);\n\t\t\tif (((y > 1 && y <= 7) && (x >= 0 && x < 7))\n\t\t\t\t\t&& board[x + 1][y - 2] > 3) {\n\t\t\t\tcanMove = canMove\n\t\t\t\t\t\t+ possibleAttacks(x + 1, y - 2, board, StdDraw.WHITE);\n\t\t\t}\n\t\t\tif (((y > 1 && y <= 7) && (x >= 0 && x < 7))\n\t\t\t\t\t&& board[x + 1][y - 2] < 3) {\n\t\t\t\tStdDraw.filledRectangle(x + 1.5, y - 1.5, .5, .5);\n\t\t\t\tStdDraw.setPenColor();\n\t\t\t\tStdDraw.rectangle(x + 1.5, y - 1.5, .5, .5);\n\t\t\t\tboard[x + 1][y - 2] = 0;\n\t\t\t\tcanMove++;\n\t\t\t}\n\t\t\tStdDraw.setPenColor(Move);\n\t\t\tif (((y > 1 && y <= 7) && (x > 0 && x <= 7))\n\t\t\t\t\t&& board[x - 1][y - 2] > 3) {\n\t\t\t\tcanMove = canMove\n\t\t\t\t\t\t+ possibleAttacks(x - 1, y - 2, board, StdDraw.WHITE);\n\t\t\t}\n\t\t\tif (((y > 1 && y <= 7) && (x > 0 && x <= 7))\n\t\t\t\t\t&& board[x - 1][y - 2] < 3) {\n\t\t\t\tStdDraw.filledRectangle(x - .5, y - 1.5, .5, .5);\n\t\t\t\tStdDraw.setPenColor();\n\t\t\t\tStdDraw.rectangle(x - .5, y - 1.5, .5, .5);\n\t\t\t\tboard[x - 1][y - 2] = 0;\n\t\t\t\tcanMove++;\n\t\t\t}\n\n\t\t\tStdDraw.show(30);\n\t\t\treturn canMove;\n\t\t} else\n\t\t\treturn canMove;\n\t}",
"private void checkVercticalWin() throws VictoryException {\n\n for (int x = 0; x < 3; x++) {\n if (myGame.myBoard[x].getText().toUpperCase().length() > 0) {\n\n if (myGame.myBoard[x].getText().toUpperCase().equals(myGame.myBoard[x + 3].getText().toUpperCase())\n && myGame.myBoard[x].getText().toUpperCase().equals(myGame.myBoard[x + 6].getText().toUpperCase())) {\n didAnyoneWin = true;\n }\n }\n\n if (didAnyoneWin) {\n throw (new VictoryException());\n }\n }\n }",
"@Override\n public boolean canMove(double x, double y) {\n double xRec=rectangle.getX();\n double yRec=rectangle.getY();\n rectangle.setLocation((int)(xRec+x*1),(int)(yRec+y*1));\n\n List<Rectangle> staticRectangles= board.getStaticRectangles();\n List<Creature> creatures=board.getCreatures();\n Iterator<Rectangle> itr1=staticRectangles.iterator();\n\n while(itr1.hasNext()){\n Rectangle tmpRectangle =itr1.next();\n if(rectangle.intersects(tmpRectangle)) {\n return false;\n }\n }\n Iterator<Creature> itr2=creatures.iterator();\n while(itr2.hasNext()){\n Creature creature=itr2.next();\n if(creature==this){\n continue;\n }\n else{\n if(rectangle.intersects(creature.getRectangle()))\n return false;\n }\n\n }\n\n return true;\n }",
"private void updatePeasantViewRange(int x, int y) {\n\t\tfor(int i = -PEASANT_RANGE; i <= PEASANT_RANGE; i++) {\n\t\t\tfor(int j = -PEASANT_RANGE; j <= PEASANT_RANGE; j++) {\n\t\t\t\tupdateSeen(x + i, y + j);\n\t\t\t}\n\t\t}\n\t}",
"boolean checkLegalMove(int posx, int posy) {\n\t\tBoolean bool;\n\t\tint change;\n\t\tchange = curPlayer > 1 ? (change = 1) : (change = -1);\n\t\tif (kingJumping(posx, posy, change)){\n\t\t\tbool = true;\n\t\t} else if (prevPosX == posx + change && (prevPosY == posy - 1 || prevPosY == posy + 1)){\n\t\t\tSystem.out.println(\"Normal move\");\n\t\t\tbool = true;\n\t\t} else if (jump(posx, posy, prevPiece) && (prevPosX == posx + (change * 2) && (prevPosY == posy - 2 || prevPosY == posy + 2))) {\n\t\t\tbool = true;\n\t\t} else if (((JLabel)prevComp).getIcon().equals(Playboard.rKing) || ((JLabel)prevComp).getIcon().equals(Playboard.bKing) || ((JLabel)prevComp).getIcon().equals(Playboard.blackSKing) || ((JLabel)prevComp).getIcon().equals(Playboard.redSKing)){\n\t\t\tchange *= (-1);\n\t\t\tif (prevPosX == posx + change && (prevPosY == posy - 1 || prevPosY == posy + 1)){\n\t\t\t\tbool = true;\n\t\t\t} else\n\t\t\t\tbool = false;\n\t\t} else if (prevPiece == 4 && (prevPosX == posx + 1 || prevPosX == posx -1) && (prevPosY == posy - 1 || prevPosY == posy +1)) { // King moves\n\t\t\tchange *= (-1);\n\t\t\tif (prevPosX == posx + change && (prevPosY == posy - 1 || prevPosY == posy + 1))\n\t\t\t\tbool = true;\n\t\t\telse\n\t\t\t\tbool = false;\n\t\t} else {\n\t\t\tbool = false;\n\t\t}\n\t\treturn bool;\n\t}",
"public boolean checkRep() {\n return location.x() >= 0 && location.x() < board.getWidth() && \n location.y() >= 0 && location.y() < board.getHeight(); \n }",
"private boolean checkNumbers(int x, ReturnValue returnValue) {\n\t\tint localCheck = 0;\n\t\tint localPoints = 0;\n\t\tboolean localBool = false;\n\t\tfor (Integer i : intList) {\n\t\t\tif (i == x) {\n\t\t\t\tlocalCheck++;\n\t\t\t}\n\t\t}\n\t\tif (localCheck > 0) {\n\t\t\tlocalBool = true;\n\t\t\tlocalPoints = localCheck * x;\n\t\t}\n\t\treturnValue.setValue(localBool, localPoints, findBox(x));\n\t\treturn true;\n\t}",
"public boolean helpForOne()\n {\n // Booléen de modification de la grille\n boolean update = false;\n \n // Valeurs déjà utilisées\n boolean val1 = false;\n boolean val2 = false;\n boolean val3 = false;\n boolean val4 = false;\n \n boolean retry;\n boolean all = (val1 && val2 && val3 && val4);\n \n Random r = new Random();\n int rand;\n \n\t\t// Tant qu'aucune modification n'a été faite, faire {...}\n while (!update && !all)\n {\n do\n {\n\t\t\t\t// Génération d'un entier aléatoire compris dans [0,4[ puis incrémentation pour obtenir [1,5[ (soit [1,4])\n rand = r.nextInt(4) + 1;\n\t\t\t\t\n // Booléen à vrai si toutes les valeurs sont utilisées\n all = (val1 && val2 && val3 && val4);\n\n // Booléen à vrai s'il existe un conflit (exemple : aléatoire tiré à 1 mais valeur 1 déjà utilisée) et qu'il reste des nombres non utilisés\n retry = !((rand == 1 && !val1) | (rand == 2 && !val2) | (rand == 3 && !val3) | (rand == 4 && !val4) | all);\n } while (retry);\n\t\t\t\n // Choix aléatoire de la direction de l'IA et mouvement dans cette direction\n switch (rand)\n {\n case 1:\n\t\t\t\t\tval1 = true;\n update = this.moveUp();\n break;\n case 2:\n val2 = true;\n update = this.moveDown();\n break;\n case 3:\n val3 = true;\n update = this.moveLeft();\n break;\n case 4:\n val4 = true;\n update = this.moveRight();\n break;\n default:\n break;\n }\n }\n \n\t\t// Ajout d'une case à la grille\n this.addCase();\n \n // Notification de la (non-)modification de la grille\n return update;\n }",
"private int win_determination()\n {\n int flag=0;\n String box1 = jButton1.getText();\n String box2 = jButton2.getText();\n String box3 = jButton3.getText();\n String box4 = jButton4.getText();\n String box5 = jButton5.getText();\n String box6 = jButton6.getText();\n String box7 = jButton7.getText();\n String box8 = jButton8.getText();\n String box9 = jButton9.getText();\n \n \n if(box1==box2 && box1==box3) //check for equality then sign and then declare winner\n {\n if(box1.equalsIgnoreCase(\"X\"))\n {\n Xwins();\n }\n if(box1.equalsIgnoreCase(\"O\"))\n {\n OWins();\n flag=1;\n }\n }\n \n if(box4==box5 && box4==box6) //check for equality then sign and then declare winner\n {\n if(box4.equalsIgnoreCase(\"X\"))\n {\n Xwins();\n }\n if(box4.equalsIgnoreCase(\"O\"))\n {\n OWins();\n flag=1;\n }\n }\n if(box7==box8 && box7==box9) //check for equality then sign and then declare winner\n {\n if(box7.equalsIgnoreCase(\"X\"))\n {\n Xwins();\n }\n if(box7.equalsIgnoreCase(\"O\"))\n {\n OWins();\n flag=1;\n }\n }\n \n if(box1==box4 && box1==box7) //check for equality then sign and then declare winner\n {\n if(box1.equalsIgnoreCase(\"X\"))\n {\n Xwins();\n }\n if(box1.equalsIgnoreCase(\"O\"))\n {\n OWins();\n flag=1;\n }\n }\n if(box2==box5 && box2==box8) //check for equality then sign and then declare winner\n {\n if(box2.equalsIgnoreCase(\"X\"))\n {\n Xwins();\n }\n if(box2.equalsIgnoreCase(\"O\"))\n {\n OWins();\n flag=1;\n }\n }\n if(box3==box6 && box3==box9) //check for equality then sign and then declare winner\n {\n if(box3.equalsIgnoreCase(\"X\"))\n {\n Xwins();\n }\n if(box3.equalsIgnoreCase(\"O\"))\n {\n OWins();\n flag=1;\n }\n }\n if(box1==box5 && box1==box9) //check for equality then sign and then declare winner\n {\n if(box1.equalsIgnoreCase(\"X\"))\n {\n Xwins();\n }\n if(box1.equalsIgnoreCase(\"O\"))\n {\n OWins();\n flag=1;\n }\n }\n if(box3==box5 && box3==box7) //check for equality then sign and then declare winner\n {\n if(box3.equalsIgnoreCase(\"X\"))\n {\n Xwins();\n }\n if(box3.equalsIgnoreCase(\"O\"))\n {\n OWins();\n flag=1;\n }\n }\n return flag;\n }",
"Boolean CheckForLimit(float xVal, float yVal) {\n double xCalc = Math.pow(xVal - this.oval.centerX(), 2) / Math.pow((this.oval.width() / 2), 2);\n double yCalc = Math.pow(yVal - this.oval.centerY(), 2) / Math.pow((this.oval.height() / 2), 2);\n xCalc += yCalc;\n if (xCalc <= 1) {\n return true;\n } else {\n return false;\n }\n }",
"void updateAvailMovesInBoxForFirstMove(int x, int y, int num) {\n\t\tint counter = 0;\n\t\tint i = x/boxSize;\n\t\tint j = y/boxSize;\n\t\tfor (int k = boxSize * i; k < boxSize * i + boxSize; k++) {\n\t\t\tfor (int l = boxSize * j; l < boxSize * j + boxSize; l++) {\n\t\t\t\tif (availMoves[k][l][num-1] == true) {\n\t\t\t\t\tcounter++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// next we see if there is a horizontal/vertical line that contains all of them, if it does, we can remove them from the line in the other boxes.\n\t\tif (counter > 1) {\n\t\t\tint lineCounter;\n\t\t\t// see if all the the availMoves that contain num are vertical\n\t\t\tfor (int k = boxSize * i; k < boxSize * i + boxSize; k++) {\n\t\t\t\tlineCounter = 0;\n\t\t\t\tfor (int l = boxSize * j; l < boxSize * j + boxSize; l++) {\n\t\t\t\t\tif (availMoves[k][l][num-1] == true) {\n\t\t\t\t\t\tlineCounter++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (lineCounter == counter) {\n\t\t\t\t\tupdateAvailMovesInLineInBoxVertical(num, k, j);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse if(lineCounter > 0) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// see if all the the availMoves that contain num are horizontal\n\t\t\tfor (int l = boxSize * j; l < boxSize * j + boxSize; l++) {\n\t\t\t\tlineCounter = 0;\n\t\t\t\tfor (int k = boxSize * i; k < boxSize * i + boxSize; k++) {\n\t\t\t\t\tif (availMoves[k][l][num-1] == true) {\n\t\t\t\t\t\tlineCounter++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (lineCounter == counter) {\n\t\t\t\t\tupdateAvailMovesInLineInBoxHorizontal(num, l, i);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse if(lineCounter > 0) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t}",
"public Sim chooseMate(Sim x, double time) {\n Sim y = null;\n Sim z;\n if(!x.isInARelationship(time) || RND.nextDouble() > FIDELITY) {\n do {\n z = population.randomSim();\n // isMatingAge() vérifie si z est de l'age adéquat\n if (z.getSex() != x.getSex() && z.isMatingAge(time)) {\n if (x.isInARelationship(time) // z accepte si x est infidèle\n || !z.isInARelationship(time)\n || RND.nextDouble() > FIDELITY)\n { y = z; }\n }\n } while (y == null);\n } else { y = x.getMate(); } //retourne le partenaire precedent\n return y;\n }",
"public char checkmate()\n\t{\n\t\tif(p1.king.liv_status==0)\n\t\t{\n\t\t\tcheckm=1;\n\t\t\treturn 'b';\n\t\t}\n\t\telse if(p2.king.liv_status==0)\n\t\t{\n\t\t\tcheckm=1;\n\t\t\treturn 'w';\n\t\t}\n\t\telse\n\t\t\treturn '0';\n\t}",
"void findSoloAvailMoves(int x, int y) {\n\t\tint counter;\n\t\tint toInsert = 0;\n\t\tfor(int i = 0; i < boardSize; i++) {\n\t\t\tfor (int j = 0; j < boardSize; j++) {\n\t\t\t\tcounter = 0;\n\t\t\t\tfor (int k = 0; k < boardSize; k++) {\n\t\t\t\t\tif (availMoves[i][j][k] == true) {\n\t\t\t\t\t\tcounter++;\n\t\t\t\t\t\ttoInsert = k + 1;\n\t\t\t\t\t\tif (counter > 1) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(counter == 1) {\n\t\t\t\t\tinsertNumber(i, j, toInsert);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"private static int calcReturn(int x) {\n if ( x < 0 )\n return Expr.CMP_LESS ;\n if ( x > 0 )\n return Expr.CMP_GREATER ;\n return Expr.CMP_EQUAL ;\n }",
"private boolean isAtLeastOneMemberNotToFarAwayFromSpawnPoint(final LinkedList<Fightable> kis) {\n\t\t\n\t\tfor (Fightable ki : kis) {\n\t\t\tif (Points.distBetweenTwoPoints(ki.getCoord(), ki.getSpawnPoint()) \n\t\t\t\t\t< ki.getAttributeValue(Attribute.viewRange) * VIEWRANGE_FACTOR) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"private void checkWinningMove(TicTacToeElement element,int x,int y) {\n int logicalSize = boardProperties.getBoardLength()-1;\r\n // Check column (only the one we just played)\r\n for(int i=0;i<=logicalSize;i++){\r\n if( gameState.getBoard()[x][i] != element.getValue()){\r\n break;\r\n }\r\n // Be sure to be at the last index\r\n if(i == logicalSize){\r\n gameState.setWinner(element);\r\n }\r\n\r\n }\r\n // Check row (only the one we just played)\r\n for(int i=0;i<=logicalSize;i++){\r\n if( gameState.getBoard()[i][y] != element.getValue()){\r\n break;\r\n }\r\n // Be sure to be at the last index\r\n if(i == logicalSize){\r\n gameState.setWinner(element);\r\n }\r\n }\r\n // Check diagonal\r\n // normal diagonal\r\n for(int i= 0;i<=logicalSize;i++){\r\n if( gameState.getBoard()[i][i] != element.getValue()){\r\n break;\r\n }\r\n // Be sure to be at the last index\r\n if(i == logicalSize){\r\n gameState.setWinner(element);\r\n }\r\n }\r\n // anti diagonal\r\n for(int i= 0;i<=logicalSize;i++){\r\n if( gameState.getBoard()[i][logicalSize-i] != element.getValue()){\r\n break;\r\n }\r\n //Be sure to be at the last index\r\n if(i == logicalSize){\r\n gameState.setWinner(element);\r\n }\r\n }\r\n // check draw\r\n if(gameState.getMoveCount() == Math.pow(logicalSize,2)-1){\r\n gameState.setDraw(true);\r\n }\r\n\r\n }",
"private void checkIsBetterSolution() {\n if (solution == null) {\n solution = generateSolution();\n //Si la solucion que propone esta iteracion es mejor que las anteriores la guardamos como mejor solucion\n } else if (getHealthFromAvailableWorkers(availableWorkersHours, errorPoints.size()) < solution.getHealth()) {\n solution = generateSolution();\n }\n }",
"public boolean isCheckmate(Board board) {\n\t\tif (!getMoves(board).isEmpty()) return false;\n\t\tLinkedList<Attack> attacks = getAttacks(board, getSpace());\n\t\tLinkedList<Space> spacesToBlock = attacks.get(0).spacesToBlock; // need to block only one of these to prevent checkmate\n\t\tif (attacks.size() > 1) {\n\t\t\tfor (int i = 1; i < attacks.size(); i++) {\n\t\t\t\tLinkedList<Space> compare = attacks.get(i).spacesToBlock;\n\t\t\t\tspacesToBlock = getSharedSpaces(spacesToBlock, compare);\n\t\t\t}\n\t\t}\n\t\tKing enemy = board.getKing(!isWhite());\n\t\tfor (Space s : spacesToBlock) {\n\t\t\tif (enemy.isInCheck(board, s)) return false;\n\t\t}\n\t\treturn true; \n\t}",
"private boolean checkGreedyDefense() {\r\n return enTotal.get(2)+1 < myTotal.get(2) && enTotal.get(0)+1 < myTotal.get(0);\r\n }",
"private boolean hayTorretas(int x1,int x2){\r\n\t\tboolean ret = false;\r\n\t\tint i = 0;\r\n\t\twhile(!ret && i < torretas.size()){\r\n\t\t\tTorreta aux = (Torreta) torretas.get(i);\r\n\t\t\tret = aux.getX() > x1 && aux.getX() < x2;\r\n\t\t\ti++;\r\n\t\t}\r\n\t\treturn ret;\r\n\t}",
"private void checkLegal() {\n\tif (undoStack.size() == 2) {\n ArrayList<Integer> canGo = \n getMoves(undoStack.get(0), curBoard);\n boolean isLegal = false;\n int moveTo = undoStack.get(1);\n for (int i = 0; i < canGo.size(); i++) {\n if(canGo.get(i) == moveTo) {\n isLegal = true;\n break;\n }\n }\n\n if(isLegal) {\n curBoard = moveUnit(undoStack.get(0), \n moveTo, curBoard);\n clearStack();\n\n moveCount++;\n\t setChanged();\n\t notifyObservers();\n }\n\t}\n }",
"public void checkRightCollision(FloatRect x) {\r\n if((int)rect1.left+rect1.width > x.left+x.width ){\r\n centerX+=6;\r\n }\r\n }",
"public Point getAlteredCoord(Point actualPoint) {\n //If breath rate is out of range, returns an altered coordinate according to the level of out of range and\n //the current game level (Easy, Medium, Hard). If breath is in range, return the same coord.\n Point alteratedPoint = actualPoint;\n\n Random randomNoise = new Random();\n\n //As USER_CURRENT_BREATH_RATE will be changing, we must do a \"snapshot\" at this time to work with proper measures.\n double userCurrentSnap = USER_CURRENT_BREATH_RATE;\n\n //Consider 6-8, MAX_IDEAL_BREATH_RATE (8) will be the max\n double referenceDistance = MAX_BREATH_RATE - MAX_IDEAL_BREATH_RATE;\n double myRateExcess = userCurrentSnap - MAX_IDEAL_BREATH_RATE;\n double relationPreferedActual = myRateExcess / referenceDistance;\n\n //How much far of the ideal is?, according to our limit of 20\n double percentOfExcess = relationPreferedActual * 100;\n\n /*\n EASY:\n Speed: 25%\n Range of speed change: (up to 15%)\n Maximum amount of noise: +/- 30% of the maximum number on coord x or y\n MEDIUM:\n Speed: 45%\n Range of speed change: (up to 15%)\n Maximum amount of noise: +/- 50% of the maximum number on coord x or y\n HARD:\n Speed: 80%\n Range of speed change: (up to 15%)\n Maximum amount of noise: +/- 80% of the maximum number on coord x or y\n */\n\n //Maximum increment of speed in 15% of MAX_SCALED_SPEED\n double mxSpdInc = MAX_SCALED_SPEED * .15;\n\n //NOTE: The formulas obtained were based on x^2\n /*\n *Solving y=ax^2 + b\n *Finding the variables a, and b. X represents the amount of excess and Y represents the speed for that amount\n */\n double a, b;\n double maxSpeed; //Max space in case of 100% of\n double easyNoise = .38, mediumNoise = .58, hardNoise = .75; //Percents\n\n //drive_control works acording to the size of the wheel. And as closer to the circumference as faster that will be.\n int maxX = this.wheel.getBounds().width(); //This represent the max X possible coord on the wheel\n int maxY = this.wheel.getBounds().height();\n\n if (percentOfExcess > 0) {\n switch (this.ACTUAL_DIFICULTY) {\n case EASY:\n\n //Alter speed. The speed will be changed\n maxSpeed = EASY_BASE_SPEED + mxSpdInc;\n b = EASY_BASE_SPEED; //Minimum\n a = (maxSpeed - b) / (100 * 100); //Maximum\n this.drive_control.setSpeedScale((float) getSpeedAccordingExcessPercent(a, b, percentOfExcess));\n\n alteratedPoint = getFinalPoint(maxX, maxY, easyNoise, percentOfExcess, actualPoint.x, actualPoint.y);\n\n break;\n case MEDIUM:\n maxSpeed = MEDIUM_BASE_SPEED + mxSpdInc;\n b = MEDIUM_BASE_SPEED; //Minimum\n a = (maxSpeed - b) / (100 * 100); //Maximum\n this.drive_control.setSpeedScale((float) getSpeedAccordingExcessPercent(a, b, percentOfExcess));\n alteratedPoint = getFinalPoint(maxX, maxY, mediumNoise, percentOfExcess, actualPoint.x, actualPoint.y);\n\n\n break;\n case HARD:\n maxSpeed = HARD_BASE_SPEED + mxSpdInc;\n b = HARD_BASE_SPEED; //Minimum\n a = (maxSpeed - b) / (100 * 100); //Maximum\n this.drive_control.setSpeedScale((float) getSpeedAccordingExcessPercent(a, b, percentOfExcess));\n alteratedPoint = getFinalPoint(maxX, maxY, hardNoise, percentOfExcess, actualPoint.x, actualPoint.y);\n\n\n break;\n }\n } else {//Else, the user's breath rate must be under 8 so it's ok.\n //In this case, we will ensure that the speed it's acording to the level.\n switch (this.ACTUAL_DIFICULTY) {\n case EASY:\n this.drive_control.setSpeedScale(this.EASY_BASE_SPEED);\n break;\n case MEDIUM:\n this.drive_control.setSpeedScale(this.MEDIUM_BASE_SPEED);\n break;\n case HARD:\n this.drive_control.setSpeedScale(this.HARD_BASE_SPEED);\n break;\n }\n }\n return alteratedPoint;\n }",
"private boolean canMageHarrasing(Creature m) {\n return (heroC.getX() - m.getX()) * (heroC.getX() - m.getX()) == (heroC.getY() - m.getY()) * (heroC.getY() - m.getY());\n }",
"public boolean CheckVictory()\n {\n\n for (int i = 0; i < 6; i++) {\n if(isFiveAligned(\n getCell(i, 0),\n getCell(i, 1),\n getCell(i, 2),\n getCell(i, 3),\n getCell(i, 4),\n getCell(i, 5) )){\n Winner=getCell(i, 2);\n return true;\n }\n }\n\n for (int i = 0; i < 6; i++) {\n if(isFiveAligned(\n getCell(0,i),\n getCell(1,i),\n getCell(2,i),\n getCell(3,i),\n getCell(4,i),\n getCell(5,i) )){\n Winner=getCell(2, i);\n return true;\n }\n }\n CellType[] arrTypes={getCell(0, 0),getCell(1, 1),getCell(2, 2),getCell(3, 3),\n getCell(4, 4),getCell(5, 5)};\n\n \n if(isFiveAligned(arrTypes))\n {\n Winner=arrTypes[2];\n return true;\n }\n\n CellType[] REVERSE_arrTypes={getCell(0, 5),getCell(1, 4),getCell(2, 3),getCell(3, 2),\n getCell(4, 1),getCell(5, 0)};\n\n \n\n if(isFiveAligned(REVERSE_arrTypes))\n {\n Winner=REVERSE_arrTypes[2]; \n return true;\n }\n\n\n if(isFiveAligned(new CellType[]{getCell(0, 1),\n getCell(1, 2),\n getCell(2, 3),\n getCell(3, 4),\n getCell(4, 5),\n CellType.None\n })) {\n Winner=getCell(3, 4);\n return true;\n }\n \n if(isFiveAligned(new CellType[]{getCell(1, 0),\n getCell(2, 1),\n getCell(3, 2),\n getCell(4, 3),\n getCell(5, 4),\n CellType.None\n })) {\n Winner=getCell(4, 3);\n return true;\n }\n\n if(isFiveAligned(new CellType[]{\n getCell(4, 0),\n getCell(3, 1),\n getCell(2, 2),\n getCell(1, 3),\n getCell(0, 4),\n CellType.None\n \n })){\n Winner=getCell(2, 2);\n return true;}\n\n if(isFiveAligned(new CellType[]{\n getCell(5, 1),\n getCell(4, 2),\n getCell(3, 3),\n getCell(2, 4),\n getCell(1, 5),\n CellType.None\n \n })){\n Winner=getCell(3, 3);\n return true;}\n\n \n \n\n\n \n\n return false;\n }",
"public void checkInflected(Individual other)\n\t{\n\t\tdouble probability = world.getSpreadingFactor() * (1+(Math.max(other.getConversationTime(), getConversationTime()) / 10))\n\t\t\t\t* getMaskIndicator() * other.getMaskIndicator() * (1-(Math.min(other.getSocialDistance(), getSocialDistance()) / 10));\n\t\tif(Math.min(probability, 1) > 0.3)\n\t\t\tgetCovid();\n\t\t\t\n\t}",
"@Override\n\tpublic boolean canMateWith(EntityAnimal mate) {\n\t\treturn getReproductionHelper().canMateWith(mate);\n\t}",
"void checkRepeated() {\r\n Move check = listOfMoves.peek();\r\n if (map.containsKey(check)) {\r\n _repeated = true;\r\n _winner = map.get(check.from()).opponent();\r\n }\r\n _repeated = false;\r\n }",
"public int checkChasingPlayer()\n {\n if(stunCountdown > 0)\n {\n chasingPlayer = false;\n return stunCountdown;\n }\n if(Game.getInstance().getPlayer().getCurrentRoom().isControlRoom())\n {\n chasingPlayer = false;\n return(-1);\n }\n else\n {\n List<Exit> neighbors = getCurrentRoom().getCollectionOfExits();\n for(Exit neighbor : neighbors)\n {\n if(getCurrentRoom().getExit(neighbor).equals(Game.getInstance().getPlayer().getCurrentRoom()) && neighbor.isOperating())\n {\n chasingPlayer = true;\n return(5 + (int) Math.floor(Math.random() * 6));\n }\n }\n chasingPlayer = false;\n return(-1);\n }\n }",
"private boolean isTargetTerritoryOneBlockAway() {\n for(Territory territory:getCurrentPlayerTerritories()) {\n if(Math.abs(territory.getID()-selectedTerritoryByPlayer.getID()) == 1) {\n int minID = Math.min(territory.getID(),selectedTerritoryByPlayer.getID());\n int maxID = Math.max(territory.getID(),selectedTerritoryByPlayer.getID());\n if(maxID % gameDescriptor.getColumns() == 0)\n return true;\n if((minID % gameDescriptor.getColumns() != 0 )\n && (minID / gameDescriptor.getColumns() == maxID / gameDescriptor.getColumns())) {\n return true;\n }\n }\n else if(Math.abs(territory.getID()-selectedTerritoryByPlayer.getID()) == gameDescriptor.getColumns())\n return true;\n }\n return false;\n }",
"public boolean isDifficult()\n {\n int count = 0;\n for (int i = 1; i < markers.length; i++) {\n if (Math.abs(markers[i] - markers[i-1]) >= 30){\n count++;\n }\n }\n return (count >= 3);\n }",
"private boolean caughtEmAll(){\n\t\tint howMany = 1;\n\t\tArrayList<Pokemon> pokedex = theTrainer.getPokedex();\n\t\tCollections.sort(pokedex);\n\t\tfor(int i = 0; i < pokedex.size() - 1; i++){\n\t\t\tif(pokedex.get(i+1).getPokemonID() != pokedex.get(i).getPokemonID()){\n\t\t\t\thowMany++;\n\t\t\t}\n\t\t}\n\t\treturn (howMany == 10);\n\t}",
"public Marker gameWon() {\r\n for (int s : sums) {\r\n if (s == BOARD_SIZE) {\r\n return Marker.X;\r\n }\r\n else if (s == -BOARD_SIZE) {\r\n return Marker.O;\r\n }\r\n }\r\n\r\n return Marker.EMPTY;\r\n }",
"boolean checkStability() {\n\r\n for (int roommateIndex = 0; roommateIndex < preferenceA.length - 1; roommateIndex++) {//Iterates through all roommates to check their pair is stable\r\n\r\n int roommate = roommateIndex + 1; //Sets roommate equal to the roommateIndex + 1\r\n int roommatePair = getPairedRoommate(roommate);//roommatePair is set equal to the roommate's pair\r\n\r\n for (int roommatePrefIndex = 0; roommatePrefIndex < preferenceA[roommateIndex].length; roommatePrefIndex++) {//Iterates through roommate's preferences until the loop is broken\r\n\r\n int roommatePref = preferenceA[roommateIndex][roommatePrefIndex];//Sets the roommatePref equal to the roommate's current preference in the preference array\r\n if (roommatePref == roommatePair) //If the roommate's preference is equal to it's pair before it is equal to a roommate that prefers them, then the current roommate is stable\r\n break;\r\n\r\n int roommatePrefPair = getPairedRoommate(roommatePref);//sets roommatePrefPair to the roommate's current preference's paired roommate\r\n for (int roommatePrefPrefIndex = 0; roommatePrefPrefIndex < preferenceA[roommateIndex].length; roommatePrefPrefIndex++) {//Iterates through roommate's current preference's preferences until the loop is broken\r\n\r\n int roommatePrefPref = preferenceA[roommatePref - 1][roommatePrefPrefIndex];//sets roommatePrefPref equal to the roommate's current preference's current preference\r\n if (roommatePrefPref == roommatePrefPair) // if roommatePrefPref is equal to roommatePrefPair then the roommate's current preference does not want to pair with roommate\r\n break;\r\n if (roommatePrefPref == roommate) //if the roommatePrefPref is equal to roommate then the roommate's current preference wants to pair with the roommate, which means the system is unstable\r\n return false;\r\n }\r\n }\r\n }\r\n return true;\r\n }",
"public boolean ariFight(){\n\t\tint Xari = 0;\n\t\tint Yari = 0;\n\t\tint Xyou = 1;\n\t\tint Yyou = 1;\n\t\tfor(int i = 0 ; i < this.Ari.length;i++){\n\t\t\tfor(int p = 0; p < this.Ari.length;p++){\n\t\t\t\tif(this.Ari[i][p] == 1){\n\t\t\t\t\tYari = i;\n\t\t\t\t\tXari = p;\n\t\t\t\t}\n\t\t\t\tif(this.position[i][p] == 1){\n\t\t\t\t\tYyou = i;\n\t\t\t\t\tXyou = p;\n\t\t\t\t}\n\t\t\t}\n\t\t}//end of outter for\n\t\tif(Yari==Yyou && Xari==Xyou){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"private boolean check(int[] bestPoint) {\n\t\tif (bestPoint[0] > Mirror.spec || bestPoint[1] > Mirror.spec || bestPoint[0] < width - Mirror.spec\n\t\t\t\t|| bestPoint[1] < width - Mirror.spec) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\n\t}",
"public void tellNearby(int x, int y)\r\n {\r\n // checks for nearby bombs\r\n for (int row = y - 1; row <= y + 1; row++)\r\n {\r\n for (int col = x - 1; col <= x + 1; col++)\r\n {\r\n try\r\n {\r\n gameBoard.gameCells[row][col].addBombNearby();\r\n } catch (ArrayIndexOutOfBoundsException e)\r\n {\r\n }\r\n }\r\n }\r\n }",
"private boolean routine1(Graph<V, E> g, Set<V> X)\n {\n return containsCleanShortestOddHole(g) || containsShortestOddHole(g, X);\n }",
"public boolean isInHand( int x)\n\t{\n\t\tfor(int i=0; i<5;i++)\n\t\t{\n\t\t\tif(x == cardNumbers[i]) // verify that you are not adding the same replacement card twice\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\t\n\t}",
"@Test\n\tpublic void testIfForbriddenSelfKillAdvanced(){\n\t\tboard.commitMove(new Point(2,1), 1);\n\t\tboard.commitMove(new Point(3,1), 1);\n\t\tboard.commitMove(new Point(4,2), 1);\n\t\tboard.commitMove(new Point(3,3), 1);\n\t\tboard.commitMove(new Point(3,4), 1);\n\t\tboard.commitMove(new Point(2,5), 1);\n\t\tboard.commitMove(new Point(1,4), 1);\n\t\tboard.commitMove(new Point(1,3), 1);\n\t\tboard.commitMove(new Point(1,2), 1);\n\t\t\n\t\tboard.commitMove(new Point(2,4), 0);\n\t\tboard.commitMove(new Point(2,3), 0);\n\t\tassertEquals(0, board.commitMove(new Point(2,2), 0));\n\t\tassertNotEquals(0,board.commitMove(new Point(3,2), 0));\n//\t\tboard.printBoard();\n\t}",
"public static int checkForWin(BitSet state, BitSet theirBoard) {\n \n BitSet[] myWins = Shifts.doShifts(state, 5, true);\n BitSet[] theirWins = Shifts.doShifts(theirBoard, 5, true);\n\n\n boolean iWon = !myWins[0].isEmpty() || !myWins[1].isEmpty() || !myWins[2].isEmpty() || !myWins[3].isEmpty();\n boolean theyWon = !theirWins[0].isEmpty() || !theirWins[1].isEmpty() || !theirWins[2].isEmpty() || !theirWins[3].isEmpty();\n \n if (iWon && theyWon) {\n //draw, we both have a win\n return 0;\n }\n else if (iWon) {\n return 3000; \n }\n else if (theyWon){\n return -3000;\n }\n else {\n return 13;\n }\n }"
] | [
"0.5967246",
"0.5759592",
"0.5702273",
"0.5670725",
"0.56538826",
"0.5632116",
"0.56262827",
"0.5564814",
"0.5552652",
"0.5541905",
"0.547824",
"0.54348224",
"0.5413651",
"0.5406163",
"0.5403137",
"0.53888166",
"0.5371721",
"0.5366362",
"0.5362925",
"0.53532034",
"0.53327894",
"0.5331192",
"0.53170955",
"0.53162086",
"0.5308379",
"0.52910095",
"0.5289314",
"0.5288078",
"0.5287181",
"0.52813923",
"0.52784014",
"0.5273373",
"0.5272913",
"0.5269973",
"0.52696586",
"0.52690387",
"0.5260054",
"0.5258358",
"0.5245673",
"0.52254784",
"0.5221717",
"0.5221188",
"0.5217867",
"0.5217249",
"0.52160263",
"0.5215975",
"0.52155906",
"0.5213166",
"0.5210222",
"0.5207038",
"0.5198852",
"0.5198842",
"0.51942736",
"0.51723945",
"0.5165726",
"0.5161429",
"0.51609004",
"0.5160759",
"0.51599836",
"0.5157615",
"0.5151727",
"0.5143995",
"0.5141952",
"0.5140814",
"0.5134177",
"0.5130003",
"0.5129198",
"0.51261127",
"0.51203746",
"0.5118141",
"0.51149917",
"0.51143783",
"0.511356",
"0.51126707",
"0.51116264",
"0.51110864",
"0.5107935",
"0.5104598",
"0.5097725",
"0.50973153",
"0.5088999",
"0.5086471",
"0.5085958",
"0.50808144",
"0.50769734",
"0.5068351",
"0.50682706",
"0.5065418",
"0.50619215",
"0.50598556",
"0.50587636",
"0.5050099",
"0.5049814",
"0.5045117",
"0.5044451",
"0.50406957",
"0.5040029",
"0.5037598",
"0.5027851",
"0.5026454",
"0.5023271"
] | 0.0 | -1 |
Given a input folder name, this function will create a dictionary of TF, IDF, TFIDF, TFIDF2 values | public void createDictionary(int wordLength, int shiftLength, String lettersInputFolder) throws IOException{
//read File
// go to letters directory
String seriesLetterFolder = lettersInputFolder + File.separator + "letters";
File directory = new File(seriesLetterFolder);
fileNames = directory.listFiles(new FileFilter() {
@Override
public boolean accept(File pathname) {
String name = pathname.getName().toLowerCase();
return name.endsWith(".csv") && pathname.isFile();
}
});
for (int i = 0; i < fileNames.length; i++) {
// Overall structure is as follows:
// On each row, for each word - we have a Map of String and List<Double> indicating a word
// and list for TF, IDF, and IDF2 values. So for each csv file, you will have a List of these maps.
// the size of the list is 20. Eventually the global dictionary will be a List of such lists.
// in case of sample data, the global dictionary is of 60 lists.
BufferedReader in = new BufferedReader(new FileReader(fileNames[i]));
// for each document
List<Map<String,List<Double>>> mapPerGestureFile = new ArrayList<Map<String,List<Double>>>();
Map<String,List<Double>> wordMap = null; //per row
while(in.ready()) {
wordMap = new HashMap<String, List<Double>>(); //per rows
String series = in.readLine();
String letters[]= series.split(",");
Integer lastLocationForRef = -1; // for padding
double totalWordCountPerDocument = 0.0;
for (int curLineCharLocation = 0; curLineCharLocation < letters.length
- wordLength + 1; curLineCharLocation = curLineCharLocation
+ shiftLength) {
// this for loop runs on each line and curLineCharLocation
// indicates the current pointer
// from which we should be forming the word
// extract a word and move the shift length
String currentWord = "";
for (int currentWordLocation = curLineCharLocation; currentWordLocation < wordLength
+ curLineCharLocation; currentWordLocation++) {
// this inner for loop denotes the current word to be
// created
currentWord = currentWord
+ letters[currentWordLocation];
}
addWordToMap(wordMap, currentWord);
lastLocationForRef = curLineCharLocation + shiftLength;
totalWordCountPerDocument = totalWordCountPerDocument + 1;
}
// check to see if we have any leftover strings. If yes then pad that word using
// the last character pointed by lastLocationForRef
Integer difference = letters.length - lastLocationForRef;
if (difference > 0) {
String paddedWord = "";
Integer extraPaddingSize = wordLength - difference;
while (difference > 0) {
// this while loop will simply create the padded word
// to be appended at the end
paddedWord = paddedWord + letters[lastLocationForRef];
difference = difference - 1;
lastLocationForRef = lastLocationForRef + 1; //advance to next location
}
while(extraPaddingSize > 0) {
paddedWord = paddedWord + letters[lastLocationForRef-1];
extraPaddingSize = extraPaddingSize - 1;
}
addWordToMap(wordMap, paddedWord);
totalWordCountPerDocument = totalWordCountPerDocument + 1;
}
wordMap = updateWordMapForTotalCountK(wordMap,totalWordCountPerDocument); // n/k , where n is frequency of word in doc/ k total freq
mapPerGestureFile.add(wordMap);
}
getTfMapArrayIDF().add(mapPerGestureFile);
//count idf2 per document
initIDF2Map(mapPerGestureFile);
in.close();
}
//populate global map for IDF values List<LIst<Map>
initIDFMap(getTfMapArrayIDF());
//Generate IDF Files from Global Map * TF Values
calculateIDFValues();
//Generate IDF2 Files
calculateIDF2Values();
//normalize tfidf and tfidf2
normalizeDictionary();
createDatabaseFiles(getTfMapArrayIDF(),lettersInputFolder);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static Multimap<String, File> createMapOfFiles(File folder) throws Exception {\n Multimap<String, File> map = ArrayListMultimap.create();\n return createMapOfFiles(folder, map);\n }",
"private static Multimap<String, File> createMapOfFiles(File folder, Multimap<String, File> map) throws Exception {\n if (folder.exists()) {\n File[] allFiles = folder.listFiles();\n assert allFiles != null;\n for (File file : allFiles) {\n if (file.isDirectory()) {\n createMapOfFiles(file, map);\n } else {\n String name = normaliseFileName(file.getName());\n map.put(name, file);\n }\n }\n return map;\n } else\n throw new Exception(\"Tried to sort an directory that no longer exist\");\n }",
"public static TreeMap<Integer,String> calc_tf_idf( String \tbaseFolder,\n\t\t\t\t\t\t\t\t\t\t\t\t\t String baseFolder_out,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tString \tinputFile, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\tString delimiter_for_inputFile,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tint \ttoken_index_having_text,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tString \toutFile,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tboolean is_do_stemming_on_word,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tboolean is_ignore_stop_words_all_together,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tboolean isSOPprint\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t){\n\t\tTreeMap<Integer,String> mapOut=new TreeMap<Integer, String>();\n\t\ttry{\n\t\t\tString line=\"\";\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream( inputFile) ));\n\t\t\t//boolean is_do_stemming_on_word=true;\n\t\t\tStemmer stemmer=new Stemmer(); String token=\"\";\n\t\t TreeMap<String, Integer> mapVoc_Freq=new TreeMap<String, Integer>();\n\t\t TreeMap<String, List<Integer>> map_Word_UniqueDocumentIdHavingIT=new TreeMap<String, List<Integer>>();\n\t\t TreeMap<Integer, TreeMap<String, Integer > > map_DocID_wordFrequency=new TreeMap<Integer, TreeMap<String,Integer>>();\n\t\t\t\tint lineNumber=0; int last_doc_id=-1;\n\t\t\t\n\t\t\tFileWriter writer_voc=new FileWriter(new File(baseFolder_out+\"unique_word_vocabulary.txt\"));\n\t\t\t\t\n\t\t\tFileWriter writer=new FileWriter(new File(outFile));\n\t\t\t// files for docID wordID tf-idf output\n\t\t\tFileWriter writer_no_stopword=new FileWriter(new File(outFile+\"_noStopWord.txt\"));\t\t\t\n\t\t\tFileWriter writer_wordID=new FileWriter(new File(outFile+\"_WORD_ID.txt\"));\n\t\t\tFileWriter writer_wordID_no_stopword=new FileWriter(new File(outFile+\"_noStopWord_WORD_ID.txt\"));\n\t\t\tFileWriter writer_word_stemmedWord=new FileWriter(new File(outFile+\"_Word_stemmedWord.txt\"));\n\t\t\t\n\t\t\t// files for docID wordID frequency output\n\t\t\tFileWriter writer2=new FileWriter(new File(outFile+\"_docWordID_freq2.txt\"));\n\t\t\tFileWriter writer2_no_stopword=new FileWriter(new File(outFile+\"_noStopWord2.txt\"));\n\t\t\tFileWriter writer2_wordID=new FileWriter(new File(outFile+\"_WORD_ID2.txt\"));\n\t\t\tFileWriter writer2_wordID_no_stopword=new FileWriter(new File(outFile+\"_noStopWord_WORD_ID2.txt\"));\n\t\t\tFileWriter writer2_word_stemmedWord=new FileWriter(new File(outFile+\"_Word_stemmedWord2.txt\"));\n\t\t\t\n\n\t\t\t\n\t\t\tFileWriter writer_debug=new FileWriter(new File(outFile+\"_DEBUG.txt\"));\n\t\t\tFileWriter writer_debug_2=new FileWriter(new File(outFile+\"_DEBUG_2.txt\"));\n\t\t\t\n\t\t\tTreeMap<String,Integer> map_already_wrote=new TreeMap<String, Integer>();\n\t\t\t//\n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\tlineNumber++;\n\t\t\t\tSystem.out.println(\"lineNumber:\"+lineNumber);\n\t\t\t\t\n\t\t\t\t//DEBUG BREAK\n//\t\t\t\tif(lineNumber>100) break;\n\t\t\t\t\n\t\t\t\t//mapVoc_Freq=new TreeMap<String, Integer>();\n\t\t\t\tint curr_doc_id=lineNumber;\n\t\t\t\tString [] token_= line.split(delimiter_for_inputFile);\n\t\t\t\t\n\t\t\t\t //clean\n\t\t\t\t token=token_[token_index_having_text-1].replace(\"\\\"\", \" \").replace(\"'\", \" \").replace(\",\", \" \").replace(\";\",\" \").replace(\".\", \" \")\n\t\t\t\t\t\t\t\t .replace(\"‘\", \" \").replace(\"“\", \" \").replace(\"–\", \" \").replace(\")\", \" \").replace(\"(\", \" \")\n\t\t\t\t\t\t\t\t .replace(\"-\", \" \").replace(\":\", \" \").replace(\"’\", \" \").replace(\"”\", \" \").replace(\"—\", \" \")\n\t\t\t\t\t\t\t\t .replace(\"#\", \" \").replace(\"%\", \" \")//.replace(\"$\", \" \")\n\t\t\t\t\t\t\t\t .replace(\"/\",\" \")\n\t\t\t\t\t\t\t\t .replace(\" \", \" \");\n\t\t\t\t \n\t\t\t\t token=token.toLowerCase();\n\n\t\t\t\t \n\t\t\t\t // \n\t\t\t\t String [] arr_token=token.split(\" \");\n\t\t\t\t int cnt=0;\n\t\t\t\t // \n\t\t\t\t while(cnt < arr_token.length){\n\t\t\t\t\t String temp= Ltrim.ltrim( arr_token[cnt]);\n\t\t\t\t\t \n\t\t\t\t\t // ignore stop words all together\n\t\t\t\t\t if(is_ignore_stop_words_all_together==true && Stopwords.is_stopword(temp)){\n\t\t\t\t\t\t cnt++;\n\t\t\t\t\t\t continue;\n\t\t\t\t\t }\n\t\t\t\t\t \n\t\t\t\t\t // do stemming\n\t\t\t\t\t if(is_do_stemming_on_word){\n\t\t\t\t\t\t String orig_temp=temp;\n\t\t\t\t\t\t //ltrim.ltrim(\n\t\t\t\t\t\t temp= stemmer.stem(temp);\n\t\t\t\t\t\t \n\t\t\t\t\t\t if(!map_already_wrote.containsKey(orig_temp)){\n\t\t\t\t\t\t\t writer_word_stemmedWord.append(orig_temp+\"!!!\"+temp +\"\\n\");\n\t\t\t\t\t\t\t writer_word_stemmedWord.flush();\n\t\t\t\t\t\t }\n\t\t\t\t\t\t \n\t\t\t\t\t\t map_already_wrote.put(orig_temp, -1);\n\t\t\t\t\t\t \n\t\t\t\t\t }\n\t\t\t\t\t else \n\t\t\t\t\t\t temp=temp;\n\n\t\t\t\t\t\t // \n\t\t\t\t\t\t if(!mapVoc_Freq.containsKey(temp)){\n\t\t\t\t\t\t\t //vocabulary term-freq\n\t\t\t\t\t\t\t mapVoc_Freq.put(temp, 1);\t\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t //word-document freq- unique number of documents this word occurs.\n\t\t\t\t\t\t\t List l=new ArrayList<Integer>();\n\t\t\t\t\t\t\t l.add(curr_doc_id);\n\t\t\t\t\t\t\t map_Word_UniqueDocumentIdHavingIT.put(temp, l);\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t //doc-wise frequency\n\t\t\t\t\t\t\t if(!map_DocID_wordFrequency.containsKey(curr_doc_id)){\n\t\t\t\t\t\t\t\t TreeMap<String,Integer> t2=new TreeMap<String, Integer>();\n\t\t\t\t\t\t\t\t t2.put( temp, 1 ) ;\n\t\t\t\t\t\t\t\t map_DocID_wordFrequency.put(curr_doc_id, t2);\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t else{\n\t\t\t\t\t\t\t\t TreeMap<String,Integer> t2=map_DocID_wordFrequency.get(curr_doc_id);\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t if(!t2.containsKey(temp)){\n\t\t\t\t\t\t\t\t\t TreeMap<String,Integer> t2_2=map_DocID_wordFrequency.get(curr_doc_id);\n\t\t\t\t\t\t\t\t\t t2_2.put( temp, 1 ) ;\n\t\t\t\t\t\t\t\t\t map_DocID_wordFrequency.put(curr_doc_id, t2_2);\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t else{\n\t\t\t\t\t\t\t\t\t TreeMap<String,Integer> t2_2=map_DocID_wordFrequency.get(curr_doc_id);\n\t\t\t\t\t\t\t\t\t int sz=t2.get(temp)+1;\n\t\t\t\t\t\t\t\t\t t2_2.put( temp, sz ) ;\n\t\t\t\t\t\t\t\t\t map_DocID_wordFrequency.put(curr_doc_id, t2_2);\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t }\n\t\t\t\t\t\t else{\n\t\t\t\t\t\t\t int freq=mapVoc_Freq.get(temp)+1;\n\t\t\t\t\t\t\t //System.out.println(\"last_doc_id!=curr_doc_id->\"+last_doc_id+\"<-->\"+curr_doc_id );\n\t\t\t\t\t\t\t //vocabulary term-freq\n\t\t\t\t\t\t\t mapVoc_Freq.put(temp, freq);\n\t\t\t\t\t\t\t // word-document freq- unique number of documents this word occurs.\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t List<Integer> uniq_doc=map_Word_UniqueDocumentIdHavingIT.get(temp);\n\t\t\t\t\t\t\t\t // if this docID not contained before in list\n\t\t\t\t\t\t\t\t if(!uniq_doc.contains(curr_doc_id)){\n\t\t\t\t\t\t\t\t\t uniq_doc.add(curr_doc_id );\n\t\t\t\t\t\t\t\t\t map_Word_UniqueDocumentIdHavingIT.put(temp, uniq_doc);\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t //doc-wise frequency\n\t\t\t\t\t\t\t\t if(!map_DocID_wordFrequency.containsKey(curr_doc_id)){\n\t\t\t\t\t\t\t\t\t TreeMap<String,Integer> t2=new TreeMap<String, Integer>();\n\t\t\t\t\t\t\t\t\t t2.put( temp, 1 ) ;\n\t\t\t\t\t\t\t\t\t map_DocID_wordFrequency.put(curr_doc_id, t2);\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t else{\n\t\t\t\t\t\t\t\t\t TreeMap<String,Integer> t2=map_DocID_wordFrequency.get(curr_doc_id);\n\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t if(!t2.containsKey(temp)){\n\t\t\t\t\t\t\t\t\t\t TreeMap<String,Integer> t2_2=map_DocID_wordFrequency.get(curr_doc_id);\n\t\t\t\t\t\t\t\t\t\t t2_2.put( temp, 1 ) ;\n\t\t\t\t\t\t\t\t\t\t map_DocID_wordFrequency.put(curr_doc_id, t2_2);\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t else{\n\t\t\t\t\t\t\t\t\t\t TreeMap<String,Integer> t2_2=map_DocID_wordFrequency.get(curr_doc_id);\n\t\t\t\t\t\t\t\t\t\t int sz=t2.get(temp)+1;\n\t\t\t\t\t\t\t\t\t\t t2_2.put( temp, sz ) ;\n\t\t\t\t\t\t\t\t\t\t map_DocID_wordFrequency.put(curr_doc_id, t2_2);\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t }\n\t\t\t\t\tcnt++;\n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t if(isSOPprint){\n\t\t\t\t\t System.out.println(\"doc:\"+curr_doc_id+\" token-freq:\"+mapVoc_Freq.size()+\" token-doc.freq:\"+map_Word_UniqueDocumentIdHavingIT.size());\n\t\t\t\t }\n\t\t\t\t //\n\t\t\t\t last_doc_id=curr_doc_id;\n\t\t\t}\n\t\t\tSystem.out.println(\" token-freq:\"+mapVoc_Freq.size()+\" token-doc.freq:\"+map_Word_UniqueDocumentIdHavingIT.size());\n\t\t\tint uniq_word_id=1;\n\t\t\tTreeMap<String, Integer> mapVocabulary_word_wordID= new TreeMap<String, Integer>();\n\t\t\t// create uniq_word_id for each word in vocabulary\n\t\t\tfor(String word:mapVoc_Freq.keySet()){\n\t\t\t\tmapVocabulary_word_wordID.put(word, uniq_word_id);\n\t\t\t\t\n\t\t\t\twriter_voc.append(word+\"!!!\"+uniq_word_id+\"\\n\");\n\t\t\t\twriter_voc.flush();\n\t\t\t\t \n\t\t\t\tuniq_word_id++;\n\t\t\t}\n\t\t\tSystem.out.println(\"step 1: running docid-wordid-tf-IDF\");\n\t\t\t//step 1: calculate tf-idf (DONT COMMENT BELOW)\n\t\t\tfor(int docID:map_DocID_wordFrequency.keySet()){\n\t\t\t\t//System.out.println(\"docID:\"+docID+ \" size:\" +map_DocID_wordFrequency.get(docID).size()); //\t+\" word-freq:\"+map_DocID_wordFrequency.get(docID));\n\t\t\t\twriter_debug.append(\"docID:\"+docID+ \" size:\" +map_DocID_wordFrequency.get(docID).size()+\" word-freq:\"+map_DocID_wordFrequency.get(docID)+\"\\n\");\n\t\t\t\twriter_debug.flush();\n\t\t\t\tdouble tf_idf=0.0;\n\t\t\t\t//Iterate each word in current document\n\t\t\t\tfor(String word:map_DocID_wordFrequency.get(docID).keySet() ){\n\t\t\t\t\t//\n\t\t\t\t\tif(mapVoc_Freq.containsKey(word )){\n\t\t\t\t\t\t\n\t\t\t\t\t\t//System.out.println(\"param1,2:\"+map_DocID_wordFrequency.get(docID).get(word) +\" \"+map_Word_UniqueDocumentIdHavingIT.get(word).size() );\n\t\t\t\t\t\t// tf-idf\n\t\t\t\t\t\ttf_idf=map_DocID_wordFrequency.get(docID).get(word) * Math.log10( map_DocID_wordFrequency.size() / map_Word_UniqueDocumentIdHavingIT.get(word).size() );\n\t\t\t\t\t\t//System.out.println();\n\t\t\t\t\t\twriter.append( docID+\"!!!\"+word+\"!!!\"+tf_idf+\"\\n\");\n\t\t\t\t\t\twriter.flush();\n\t\t\t\t\t\t\n\t\t\t\t\t\twriter_wordID.append( docID+\"!!!\"+mapVocabulary_word_wordID.get(word)+\"!!!\"+tf_idf+\"\\n\");\n\t\t\t\t\t\twriter_wordID.flush();\n\t\t\t\t\t\t\n\t\t\t\t\t\t// \n\t\t\t\t\t\tif(!Stopwords.is_stopword(word.toLowerCase())){\n\t\t\t\t\t\t\twriter_no_stopword.append(docID+\"!!!\"+word+\"!!!\"+tf_idf+\"\\n\");\n\t\t\t\t\t\t\twriter_no_stopword.flush();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\twriter_wordID_no_stopword.append(docID+\"!!!\"+ mapVocabulary_word_wordID.get(word) +\"!!!\"+tf_idf+\"\\n\");\n\t\t\t\t\t\t\twriter_wordID_no_stopword.flush();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\twriter_debug_2.append( \"(not exist in vocab) word->\"+word+\" for doc_id->\"+docID+\"\\n\");\n\t\t\t\t\t\twriter_debug_2.flush();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} //for(int docID:map_DocID_wordFrequency.keySet()){\n\t\t\t\n\t\t\tSystem.out.println(\"step 2: running docid-wordid-frquency\");\n\t\t\t//step 2: (DOC-WORDID AND FREQUENCY)another output - writing <docID!!!wordID!!!frequency>\n\t\t\tfor(int docID:map_DocID_wordFrequency.keySet()){\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"2.docID:\"+docID+ \" size:\" +map_DocID_wordFrequency.get(docID).size()); //\t+\" word-freq:\"+map_DocID_wordFrequency.get(docID));\n\t\t\t\t//writer_debug.append(\"docID:\"+docID+ \" size:\" +map_DocID_wordFrequency.get(docID).size()+\" word-freq:\"+map_DocID_wordFrequency.get(docID)+\"\\n\");\n\t\t\t\t//writer_debug.flush();\n\t\t\t\tint frequency=0;\n\t\t\t\t//Iterate each word in current document\n\t\t\t\tfor(String word:map_DocID_wordFrequency.get(docID).keySet() ){\n\t\t\t\t\t//\n\t\t\t\t\tif(mapVoc_Freq.containsKey(word )){\n\t\t\t\t\t\t\n\t\t\t\t\t\t// System.out.println(\"param1,2:\"+map_DocID_wordFrequency.get(docID).get(word) +\" \"+map_Word_UniqueDocumentIdHavingIT.get(word).size() );\n\t\t\t\t\t\t// frequency\n\t\t\t\t\t\tfrequency=map_DocID_wordFrequency.get(docID).get(word);\n\t\t\t\t\t\t//System.out.println();\n\t\t\t\t\t\twriter2.append( docID+\"!!!\"+word+\"!!!\"+frequency+\"\\n\");\n\t\t\t\t\t\twriter2.flush();\n\t\t\t\t\t\t\n\t\t\t\t\t\twriter2_wordID.append( docID+\"!!!\"+mapVocabulary_word_wordID.get(word)+\"!!!\"+frequency+\"\\n\");\n\t\t\t\t\t\twriter2_wordID.flush();\n\t\t\t\t\t\t \n\t\t\t\t\t\t// \n\t\t\t\t\t\tif(!Stopwords.is_stopword(word.toLowerCase())){\n\t\t\t\t\t\t\twriter2_no_stopword.append(docID+\"!!!\"+word+\"!!!\"+frequency+\"\\n\");\n\t\t\t\t\t\t\twriter2_no_stopword.flush();\n\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\twriter2_wordID_no_stopword.append(docID+\"!!!\"+ mapVocabulary_word_wordID.get(word) +\"!!!\"+frequency+\"\\n\");\n\t\t\t\t\t\t\twriter2_wordID_no_stopword.flush();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\twriter_debug_2.append( \"(not exist in vocab) word->\"+word+\" for doc_id->\"+docID+\"\\n\");\n\t\t\t\t\t\twriter_debug_2.flush();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} //for(int docID:map_DocID_wordFrequency.keySet()){\n\n\t\t\tSystem.out.println(\"********************************************\");\n\t\t\tSystem.out.println(\"File holding the not found words in vocabulary: \"+\"outFile+\\\"_DEBUG_2.txt\\\"\");\n\t\t\tSystem.out.println(\"Doc-wise word freq: \"+\"outFile+\\\"_DEBUG.txt\\\"\");\n\t\t\tSystem.out.println(\"******Below files are docId-wordID-tfIDF\");\n\t\t\tSystem.out.println(\"with Word->\"+outFile);\n\t\t\tSystem.out.println(\"with Word(no stopword)->\"+outFile+\"_noStopWord.txt\");\n\t\t\tSystem.out.println(\"with WordID->\"+outFile+\"_WORD_ID.txt\");\n\t\t\tSystem.out.println(\"with WordID(no stopword)->\"+outFile+\"_noStopWord_WORD_ID.txt\");\n\t\t\tSystem.out.println(\"VOC FILE ->\"+baseFolder+\"unique_word_vocabulary.txt\");\n\t\t\t//**********/\n\t\t\tSystem.out.println(\"***********Below files are docId-wordID-frequency (file ends with \\\"format2.txt\\\"\");\n\t\t\tSystem.out.println( \"\"+outFile+\"_docWordID_freq2.txt\");\n\t\t\tSystem.out.println( \"\"+outFile+\"_noStopWord2.txt\");\n\t\t\tSystem.out.println( \"\"+outFile+\"_WORD_ID2.txt\");\n\t\t\tSystem.out.println( \"\"+outFile+\"_noStopWord_WORD_ID2.txt\");\n\t\t\tSystem.out.println( \"\"+outFile+\"_Word_stemmedWord2.txt\");\n\t\t\t \n\t\t\tmapOut.put(-99, outFile+\"_noStopWord_WORD_ID.txt\");\n\t\t\t//maximum word id\n\t\t\tmapOut.put(1, String.valueOf( uniq_word_id) );\n\t\t}\n\t\tcatch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn mapOut;\n\t}",
"public Map<String, Object> fileFinder(String file_id) {\n\t\tMap<String, Object> tempMap = new HashMap<String,Object>();\n\t\tMap<String, Object> findMap = new HashMap<String,Object>();\n\t\tArrayList<File> rootList= new ArrayList<File>(Arrays.asList(rootFile.listFiles()));\n\t\tString curName;\n\t\tfor(File file:rootList) {\n\t\t\tcurName = file.getName();\n\t\t\tString reg1 = \"(^[FP]_\"+file_id+\"_TB.xml$)\";\n\t\t\tPattern p = Pattern.compile(reg1);\n\t\t\tMatcher m = p.matcher(curName);\n\t\t\tif(m.find()) {\n\t\t\t\tif((file.getName()).charAt(0)=='F')\n\t\t\t\t\ttempMap.put(\"F\", new File(file.getPath()));\n\t\t\t\telse\n\t\t\t\t\ttempMap.put(\"P\", new File(file.getPath()));\n\t\t\t}\n\t\t\ttempMap.put(curName, tempMap);\n\t\t}\n\t\treturn tempMap;\n\t}",
"public static HashMap<String, Double> getTFIDF(String inputStr) throws IOException{\n\t\tHashMap<String, Double> result = new HashMap<String, Double>();\n\t\tHashMap<String, Integer> termsMap = new HashMap<String, Integer>();\t\t\n\t\tArrayList<String> inputTerms = getTerms(inputStr);\n\t\t\n\t\tfor(String s : inputTerms){\n\t\t\tif(termsMap.containsKey(s) != true){\n\t\t\t\ttermsMap.put(s, 1);\n\t\t\t}else{\n\t\t\t\ttermsMap.put(s, termsMap.get(s)+1);\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(String term : termsMap.keySet()){\n\t\t\tdouble TF;\n\t\t\t//System.out.println(term + \" \" + termsMap.get(term));\t\t\t\t\n\t\t\tTF = (double)termsMap.get(term)/inputTerms.size();\n\t\t\tresult.put(term, TF*cal_IDF(term));\n\t\t}\n\t\t\n\t\treturn result;\n\t}",
"private Map<String, String> getDirectory() {\n return new HashMap<>() {{\n put(\"Moran Lin\", \"1111111111\"); // 546*6*\n put(\"Ming Kho\", \"2222222222\"); // 546*6*\n put(\"Sam Haboush\", \"3333333333\"); // 4226874*7*\n put(\"Heidi Haboush\", \"4444444444\"); // 4226874*4*\n put(\"Hakeem Haboush\", \"5555555555\"); // 4226874*4*\n put(\"Amanda Holden\", \"6666666666\"); // 465336*2*\n put(\"Megan Fox\", \"7777777777\"); // 369*6*\n put(\"Kate Moss\", \"8888888888\"); // 6677*5*\n put(\"Sarah Louche\", \"9999999999\"); // 568243*7*\n put(\"Cameron Diaz\", \"0000000000\"); // 3429*2*\n// put(\"Heidi Klum\", \"1212121212\"); // 5586*4* doesn't exist in dictionary\n }};\n }",
"private void createDicts(String inputFile){\n\t\tproductIds = new TreeMap<>();\n\t\ttokenDict = new TreeMap<>();\n\t\treviewIds = new TreeMap<>();\n\n\t\tDataParser dataParser = null;\n\t\ttry {\n\t\t\tdataParser = new DataParser(inputFile);\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Error occurred while reading the reviews input file.\");\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t\tfor (int i = 0; i < dataParser.allReviews.size(); i++) {\n\t\t\taddProductId(dataParser.allReviews.get(i).get(\"productId\"), i + 1);\n\t\t\tint length = addReviewText(dataParser.allReviews.get(i).get(\"text\"), i + 1);\n\t\t\taddReviewId(dataParser.allReviews.get(i), i, length);\n\t\t}\n\t}",
"public void buildWordFileMap(){\n hashWords.clear();\n DirectoryResource dr = new DirectoryResource();\n for (File f : dr.selectedFiles()){ //for all the files selected make the hashWords hashmap\n addWordsFromFile(f);\n }\n \n }",
"public static EncFSPropertyHolder createFSPropertyHolder(String foldername) {\n foldername = emptyFilename(foldername);\n \n File propFolder = new File(foldername);\n\n // create folder\n propFolder.mkdirs();\n\n return new EncFSPropertyHolder(foldername);\n }",
"private static Map<String , Integer> getMap(File dir , String search){\n\t\tMap<String, Integer> map = new HashMap<String, Integer>();\n\t\tString token;\n\t\tStringTokenizer st = new StringTokenizer(search, \" \");\n\n\t\tint total;\n\t\tfor(File f : dir.listFiles()) {\n\t\t\ttotal =0 ;\t\t\n\t\t\twhile(st.hasMoreTokens()) {\n\t\t\t\ttoken = st.nextToken();\n\t\t\t\tSystem.out.println(token);\n\t\t\t\tif(god.get(f.getName()).containsKey(token)) {\n\t\t\t\t\tSystem.out.println(god.get(f.getName()).get(token));\n\t\t\t\t\ttotal += god.get(f.getName()).get(token);\n\t\t\t\t}\n\t\t\t\tSystem.out.println(total);\n\t\t\t}\n\t\t\tmap.put(f.getName(), total );\n\t\t}\n\t\treturn map;\n\t}",
"public static void main(String[] args) {\n\t\tHashMap<String, HashMap<String, Double>> file_alph_tf = new HashMap<String, HashMap<String, Double>>();\n\t\tHashMap<String, Double> file_alph_idf = new HashMap<String, Double>();\n\t\tHashMap<String, Double> tmp_idf = new HashMap<String, Double>();\n\t\tHashMap<String, HashMap<String, Double>> result_map = new HashMap<String, HashMap<String, Double>>();\n\t\t// 이후에 cosine similarity를 계산할때 사용할 top5해쉬맵\n\t\tHashMap<String, HashMap<String, Double>> top5 = new HashMap<String, HashMap<String, Double>>();\n\t\t\n\t\tTest01 t1 = new Test01();\n\t\tTest02 t2 = new Test02();\n\t\tTest03 t3 = new Test03();\n\t\t\n\t\t// 각 문서의 특성을 추출 : Test04 - map\t\t\n\t\t\n\t\tFile[] fileList = t1.get_file();\n\t\t\n\t\tfor (File file : fileList) {\n\t\t\t\n\t\t\tHashMap <String, Double> tmp_map = new HashMap <String, Double>();\n\t\t\t\n\t\t\t// count alphabet _ each files\n\t\t\ttry {\n\t\t\t\tFileReader file_reader = new FileReader(file);\n\t\t\t\tint cur = 0;\n\t\t\t\twhile ((cur = file_reader.read()) != -1) {\n\t\t\t\t\tif (cur != 32) {\n\t\t\t\t\t\tif (!tmp_map.containsKey(String.valueOf((char)cur))) {\n\t\t\t\t\t\t\ttmp_map.put(String.valueOf((char)cur), (double) 1);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tdouble temp_num = tmp_map.get(String.valueOf((char)cur));\n\t\t\t\t\t\t\ttmp_map.put(String.valueOf((char)cur),temp_num+1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch(FileNotFoundException e) {\n\t\t\t\te.getStackTrace();\n\t\t\t} catch(IOException e) {\n\t\t\t\te.getStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t// calc_TF\n\t\t\tArrayList<String> key_lst = new ArrayList<String>(tmp_map.keySet());\n\t\t\tdouble sum_value = 0;\n\t\t\t// TF의 분모 문서내에 오는 모든수 더하기\n\t\t\tfor (String k : key_lst) {\n\t\t\t\tsum_value += tmp_map.get(k);\t\n\t\t\t}\n\t\t\t// TF의 분자 : 해당 파일에 있는 알파벳의 갯수 (tmp_map에 저장되어있음) / tf분모\n\t\t\tfor (String tf_k : key_lst) {\n\t\t\t\tdouble tf = tmp_map.get(tf_k) / sum_value;\n\t\t\t\ttmp_map.put(tf_k, tf);\n\t\t\t}\n\t\t\tsum_value = 0;\n\t\t\tfile_alph_tf.put(file.getName(), tmp_map);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t// calc_IDF_Bottom : counting IDF_Bottom\n\t\t\ttmp_idf = file_alph_tf.get(file.getName());\n\t\t\t\n\t\t\tfor (String idf_k : key_lst) {\n\t\t\t\tif (tmp_idf.get(idf_k) != 0) {\n\t\t\t\t\tif (!file_alph_idf.containsKey(idf_k)) {\n\t\t\t\t\t\tfile_alph_idf.put(idf_k, (double) 1);\n\t\t\t\t\t}else {\n\t\t\t\t\t\tdouble tmp_num = file_alph_idf.get(idf_k);\n\t\t\t\t\t\tfile_alph_idf.put(idf_k, tmp_num+1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\n\t\t} // file의 이름으로 반복\n\t\t\n\t\t\n\t\t// calc_IDF\n\t\tfor (File file : fileList) {\n\t\t\tHashMap<String, Double> aa = new HashMap<String, Double>();\n\t\t\tArrayList<String> key_lst = new ArrayList<String>(file_alph_idf.keySet());\n\t\t\tdouble temp_num = 0;\n\t\t\tfor (String key : key_lst) {\n\t\t\t\t\n\t\t\t\tdouble tf;\n\t\t\t\ttemp_num = 0;\n\t\t\t\ttry {\n\t\t\t\t\ttf = file_alph_tf.get(file.getName()).get(key);\n\t\t\t\t\tif (file_alph_idf.get(key) != 0) {\n\t\t\t\t\t\tdouble tt = file_alph_idf.get(key);\n\t\t\t\t\t\ttemp_num = 7/tt;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttemp_num = 0;\n\t\t\t\t\t}\n\t\t\t\t} catch(NullPointerException e) {\n\t\t\t\t\ttf = 0;\n\t\t\t\t}\n\t\t\t\tdouble idf = Math.log(1+ temp_num);\n\t\t\t\tdouble tfidf = tf*idf;\n\t\t\t\taa.put(key, tfidf);\n\t\t\t}\n//\t\t\tSystem.out.println();\n\t\t\tresult_map.put(file.getName(), aa);\n\t\t}\t\n\t\n\t\t\n\t\t\n\t\t\n\t\tfor(File f : fileList) {\n\t\t\t\n\t//---------------------------------------상위 5개-------------------------------------------\t\t\t\n\t\t\t\n//\t\t\tSystem.out.println(f.getName());\n\t\t\tString f_n = f.getName(); \n\t\t\t\n\t\t\t// 0. 정렬 전 파일 출력\n//\t\t\tArrayList <String> key_lst = new ArrayList<String>(result_map.get(f_n).keySet());\n//\t\t\tfor (String kk : key_lst) {\n//\t\t\t\tSystem.out.println(kk + \" : \" + result_map.get(f_n).get(kk));\n//\t\t\t}\n\t\t\t\n\t\t\tArrayList<String> Top5List = sortHSbyValue_double(result_map.get(f_n));\n//\t\t\tSystem.out.println(Top5List);\n\t\t\tHashMap<String, Double> map = new HashMap<String, Double>();\n\t\t\tfor (String s : Top5List) {\n\t\t\t\tmap.put(s, result_map.get(f_n).get(s));\n\t\t\t}\n\n\t\t\ttop5.put(f_n, map);\t\n\t\t}\n\t\t\n\t\t// cosine_similarity\n\t\t// 구하기 전에 벡터의 차원을 맞춰준다.\n\t\t// input받는 파일을 제외한 나머지 파일들과의 유사도를 구한다.\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tSystem.out.print(\"문서 이름을 입력하세요 : \");\n\t\tString input = sc.next();\n\t\t\n\t\tHashMap<String, Double> csMap = new HashMap<String, Double>();\n\t\t\n\t\tfor (File f : fileList) {\n\t\t\tHashMap<String, Double> a = (HashMap<String, Double>) top5.get(input).clone();\n\t\t\tArrayList<String> a_key_lst = new ArrayList<String>(a.keySet());\n\t\t\tArrayList<String> total_key = new ArrayList<String>();\n\t\t\t\n\t\t\tif (input.equals(f.getName())) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tHashMap<String, Double> b = (HashMap<String, Double>) top5.get(f.getName()).clone();\n\t\t\tArrayList<String> b_key_lst = new ArrayList<String>(b.keySet());\n\t\t\t\n\t\t\tfor (String a_k : a_key_lst) {\n\t\t\t\ttotal_key.add(a_k);\n\t\t\t}\n\t\t\tfor (String b_k : b_key_lst) {\n\t\t\t\ttotal_key.add(b_k);\n\t\t\t}\n\t\t\t\n\t\t\tfor (String t_k : total_key) {\n\t\t\t\tif(!a.containsKey(t_k)) {\n\t\t\t\t\ta.put(t_k, (double)0);\n\t\t\t\t}\n\t\t\t\tif(!b.containsKey(t_k)) {\n\t\t\t\t\tb.put(t_k, (double)0);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tdouble[] a_lst = t3.mapToList(a);\n\t\t\tdouble[] b_lst = t3.mapToList(b);\n\t\t\tdouble cs = cosinSimilarity(a_lst, b_lst);\n\t\t\tcsMap.put(f.getName(), cs);\n\t\t\t\n\t\t\ta_key_lst.clear();\n\t\t\ttotal_key.clear();\n\t\t\t\n\t\t}\n\t\t\n\t\tt2.sort_print(csMap, input);\n\t\t\n\t\tSystem.out.println();\n\t}",
"public static void calcuTFIDF() throws IOException {\n\n\t\tHashtable<String, Double> idf = new Hashtable<String, Double>();\n\t\tArrayList<String> terms = new ArrayList<String>();\n\t\tdouble fileCount = 0.0;\n\t\tString featurePath = \"./corpus/features\";\n\t\tString featureWeight = \"./corpus/featureWeight\";\n\t\tString trainPath = \"./corpus/trainData\";\n\t\tString testPath = \"./corpus/testData\";\n\t\tString stopPath = \"./corpus/english.stop\";\n\t\tString trainOutPath = \"./corpus/trainVectors\";\n\t\tString testOutPath = \"./corpus/testVectors\";\n\t\tBufferedReader br = new BufferedReader(new FileReader(featurePath));\n\t\tBufferedWriter featureWriter = new BufferedWriter(new FileWriter(\n\t\t\t\tfeatureWeight));\n\t\tBufferedReader trainReader = new BufferedReader(new FileReader(\n\t\t\t\ttrainPath));\n\t\tBufferedReader testReader = new BufferedReader(new FileReader(testPath));\n\t\tBufferedReader br2 = new BufferedReader(new FileReader(stopPath));\n\t\tBufferedWriter writer = new BufferedWriter(new FileWriter(trainOutPath));\n\t\tBufferedWriter testWriter = new BufferedWriter(new FileWriter(\n\t\t\t\ttestOutPath));\n\t\tString oneline;\n\t\tArrayList<String> as = new ArrayList<String>();\n\t\twhile ((oneline = br2.readLine()) != null) {\n\t\t\tas.add(oneline);\n\t\t}\n\t\tString[] stopWords = new String[as.size()];\n\t\tas.toArray(stopWords);\n\t\tAnalyzer analyzer = new SnowballAnalyzer(\"English\", stopWords);\n\n\t\twhile ((oneline = br.readLine()) != null) {\n\t\t\tidf.put(oneline, 0.0);\n\t\t\tterms.add(oneline);\n\t\t}\n\n\t\twhile ((oneline = trainReader.readLine()) != null) {\n\n\t\t\tint pos = oneline.indexOf(\"\\t\");\n\t\t\tString topic = oneline.substring(0, pos);\n\t\t\tString content = oneline.substring(pos + 1);\n\t\t\tfileCount++;\n\t\t\tHashtable<String, Integer> termList = new Hashtable<String, Integer>();\n\t\t\tTokenStream stream = analyzer.tokenStream(\"\", new StringReader(\n\t\t\t\t\tcontent));\n\t\t\twhile (true) {\n\t\t\t\tToken token = stream.next();\n\t\t\t\tif (token == null)\n\t\t\t\t\tbreak;\n\t\t\t\tString tmp = token.termText();\n\t\t\t\tif (!termList.containsKey(tmp))\n\t\t\t\t\ttermList.put(tmp, new Integer(1));\n\t\t\t}\n\t\t\tSet<String> keys = termList.keySet();\n\t\t\tfor (String tmp : keys) {\n\t\t\t\tif (idf.containsKey(tmp)) {\n\t\t\t\t\tDouble num = idf.get(tmp);\n\t\t\t\t\tidf.put(tmp, num + 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (String term : terms) {\n\n\t\t\tdouble weightOfTerm = Math.log((double) fileCount / idf.get(term)\n\t\t\t\t\t+ 0.01);\n\t\t\tfeatureWriter.write(term + \" \" + weightOfTerm);\n\t\t\tfeatureWriter.newLine();\n\t\t\tidf.put(term, weightOfTerm);\n\n\t\t}\n\t\tfeatureWriter.flush();\n\t\tfeatureWriter.close();\n\n\t\ttrainReader = new BufferedReader(new FileReader(trainPath));\n\t\twhile ((oneline = trainReader.readLine()) != null) {\n\n\t\t\tint pos = oneline.indexOf(\"\\t\");\n\t\t\tString topic = oneline.substring(0, pos);\n\t\t\tString content = oneline.substring(pos + 1);\n\t\t\tHashtable<String, Integer> termFrequent = new Hashtable<String, Integer>();\n\t\t\tTokenStream stream = analyzer.tokenStream(\"\", new StringReader(\n\t\t\t\t\tcontent));\n\t\t\twhile (true) {\n\t\t\t\tToken token = stream.next();\n\t\t\t\tif (token == null)\n\t\t\t\t\tbreak;\n\t\t\t\tString tmp = token.termText();\n\t\t\t\tif (!termFrequent.containsKey(tmp))\n\t\t\t\t\ttermFrequent.put(tmp, new Integer(1));\n\t\t\t\telse {\n\t\t\t\t\tInteger num = termFrequent.get(tmp);\n\t\t\t\t\ttermFrequent.put(tmp, num + 1);\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble weights[] = new double[terms.size()];\n\t\t\tdouble denominator = 0.0;\n\t\t\tint i = 0;\n\t\t\tfor (String term : terms) {\n\t\t\t\tdouble count;\n\t\t\t\tif (termFrequent.containsKey(term)) {\n\t\t\t\t\tcount = termFrequent.get(term);\n\t\t\t\t} else {\n\t\t\t\t\tcount = 0;\n\t\t\t\t}\n\n\t\t\t\tdouble tmp = count * idf.get(term);\n\t\t\t\tdenominator += tmp;\n\t\t\t\tweights[i++] = tmp;\n\t\t\t}\n\t\t\tdenominator = Math.sqrt(denominator);\n\t\t\twriter.write(topic);\n\t\t\tfor (int j = 1; j <= weights.length; j++) {\n\t\t\t\tdouble tmp = weights[j - 1];\n\t\t\t\tif (tmp > 0.0) {\n\t\t\t\t\ttmp = Math.sqrt(tmp) / denominator;\n\t\t\t\t\twriter.write(\" \" + j + \":\" + tmp);\n\t\t\t\t}\n\t\t\t}\n\t\t\twriter.newLine();\n\t\t}\n\n\t\twhile ((oneline = testReader.readLine()) != null) {\n\n\t\t\tint pos = oneline.indexOf(\"\\t\");\n\t\t\tString topic = oneline.substring(0, pos);\n\t\t\tString content = oneline.substring(pos + 1);\n\t\t\tHashtable<String, Integer> termFrequent = new Hashtable<String, Integer>();\n\t\t\tTokenStream stream = analyzer.tokenStream(\"\", new StringReader(\n\t\t\t\t\tcontent));\n\t\t\twhile (true) {\n\t\t\t\tToken token = stream.next();\n\t\t\t\tif (token == null)\n\t\t\t\t\tbreak;\n\t\t\t\tString tmp = token.termText();\n\t\t\t\tif (!termFrequent.containsKey(tmp))\n\t\t\t\t\ttermFrequent.put(tmp, new Integer(1));\n\t\t\t\telse {\n\t\t\t\t\tInteger num = termFrequent.get(tmp);\n\t\t\t\t\ttermFrequent.put(tmp, num + 1);\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble weights[] = new double[terms.size()];\n\t\t\tdouble denominator = 0.0;\n\t\t\tint i = 0;\n\t\t\tfor (String term : terms) {\n\t\t\t\tdouble count;\n\t\t\t\tif (termFrequent.containsKey(term)) {\n\t\t\t\t\tcount = termFrequent.get(term);\n\t\t\t\t} else {\n\t\t\t\t\tcount = 0;\n\t\t\t\t}\n\t\t\t\tdouble tmp = count * idf.get(term);\n\t\t\t\tdenominator += tmp;\n\t\t\t\tweights[i++] = tmp;\n\t\t\t}\n\t\t\tdenominator = Math.sqrt(denominator);\n\t\t\ttestWriter.write(topic);\n\t\t\tfor (int j = 1; j <= weights.length; j++) {\n\t\t\t\tdouble tmp = weights[j - 1];\n\t\t\t\tif (tmp > 0.0) {\n\t\t\t\t\ttmp = Math.sqrt(tmp) / denominator;\n\t\t\t\t\ttestWriter.write(\" \" + j + \":\" + tmp);\n\t\t\t\t}\n\t\t\t}\n\t\t\ttestWriter.newLine();\n\t\t}\n\t\twriter.close();\n\t\ttestWriter.close();\n\t}",
"public static void main(String[] args, String str) {\n\t\tHashMap<String, HashMap<String, Double>> file_alph_tf = new HashMap<String, HashMap<String, Double>>();\n\t\tHashMap<String, Double> file_alph_idf = new HashMap<String, Double>();\n\t\tHashMap<String, Double> tmp_idf = new HashMap<String, Double>();\n\t\tHashMap<String, HashMap<String, Double>> result_map = new HashMap<String, HashMap<String, Double>>();\n\t\t// 이후에 cosine similarity를 계산할때 사용할 top5해쉬맵\n\t\tHashMap<String, HashMap<String, Double>> top5 = new HashMap<String, HashMap<String, Double>>();\n\t\t\n\t\tTest01 t1 = new Test01();\n\t\tTest02 t2 = new Test02();\n\t\tTest03 t3 = new Test03();\n\t\t\n\t\t// 입력\n\t\t\n\t\tFile[] fileList = t1.get_file();\n\t\t\n\t\tfor (File file : fileList) {\n\t\t\t\n\t\t\tHashMap <String, Double> tmp_map = new HashMap <String, Double>();\n\t\t\t\n\t\t\t// count alphabet _ each files\n\t\t\ttry {\n\t\t\t\tFileReader file_reader = new FileReader(file);\n\t\t\t\tint cur = 0;\n\t\t\t\twhile ((cur = file_reader.read()) != -1) {\n\t\t\t\t\tif (cur != 32) {\n\t\t\t\t\t\tif (!tmp_map.containsKey(String.valueOf((char)cur))) {\n\t\t\t\t\t\t\ttmp_map.put(String.valueOf((char)cur), (double) 1);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tdouble temp_num = tmp_map.get(String.valueOf((char)cur));\n\t\t\t\t\t\t\ttmp_map.put(String.valueOf((char)cur),temp_num+1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch(FileNotFoundException e) {\n\t\t\t\te.getStackTrace();\n\t\t\t} catch(IOException e) {\n\t\t\t\te.getStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t// calc_TF\n\t\t\tArrayList<String> key_lst = new ArrayList<String>(tmp_map.keySet());\n\t\t\tdouble sum_value = 0;\n\t\t\t// TF의 분모 문서내에 오는 모든수 더하기\n\t\t\tfor (String k : key_lst) {\n\t\t\t\tsum_value += tmp_map.get(k);\t\n\t\t\t}\n\t\t\t// TF의 분자 : 해당 파일에 있는 알파벳의 갯수 (tmp_map에 저장되어있음) / tf분모\n\t\t\tfor (String tf_k : key_lst) {\n\t\t\t\tdouble tf = tmp_map.get(tf_k) / sum_value;\n\t\t\t\ttmp_map.put(tf_k, tf);\n\t\t\t}\n\t\t\tsum_value = 0;\n\t\t\tfile_alph_tf.put(file.getName(), tmp_map);\n\t\t\t\n\t\t\t// calc_IDF_Bottom : counting IDF_Bottom\n\t\t\ttmp_idf = file_alph_tf.get(file.getName());\n\t\t\t\n\t\t\tfor (String idf_k : key_lst) {\n\t\t\t\tif (tmp_idf.get(idf_k) != 0) {\n\t\t\t\t\tif (!file_alph_idf.containsKey(idf_k)) {\n\t\t\t\t\t\tfile_alph_idf.put(idf_k, (double) 1);\n\t\t\t\t\t}else {\n\t\t\t\t\t\tdouble tmp_num = file_alph_idf.get(idf_k);\n\t\t\t\t\t\tfile_alph_idf.put(idf_k, tmp_num+1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t} // file의 이름으로 반복\n\t\t\n\t\t\n\t\t\n\t\t// calc_IDF\n\t\tfor (File file : fileList) {\n\t\t\tHashMap<String, Double> aa = new HashMap<String, Double>();\n\t\t\tArrayList<String> key_lst = new ArrayList<String>(file_alph_idf.keySet());\n\t\t\tdouble temp_num = 0;\n\t\t\tfor (String key : key_lst) {\n\t\t\t\t\n\t\t\t\tdouble tf;\n\t\t\t\ttemp_num = 0;\n\t\t\t\ttry {\n\t\t\t\t\ttf = file_alph_tf.get(file.getName()).get(key);\n\t\t\t\t\tif (file_alph_idf.get(key) != 0) {\n\t\t\t\t\t\tdouble tt = file_alph_idf.get(key);\n\t\t\t\t\t\ttemp_num = 7/tt;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttemp_num = 0;\n\t\t\t\t\t}\n\t\t\t\t} catch(NullPointerException e) {\n\t\t\t\t\ttf = 0;\n\t\t\t\t}\n\t\t\t\tdouble idf = Math.log(1+ temp_num);\n\t\t\t\tdouble tfidf = tf*idf;\n\t\t\t\taa.put(key, tfidf);\n\t\t\t}\n\t\t\tresult_map.put(file.getName(), aa);\n\t\t}\t\n\t\n\t\t\n\t\t\n\t\t\n\t\tfor(File f : fileList) {\n\t\t\t\n\t//---------------------------------------상위 5개-------------------------------------------\t\t\t\n\t\t\t\n//\t\t\t\n\t\t\tString f_n = f.getName(); \n//\t\t\tSystem.out.println(f_n);\n\t\t\t// 0. 정렬 전 파일 출력\n//\t\t\tArrayList <String> key_lst = new ArrayList<String>(result_map.get(f_n).keySet());\n//\t\t\tfor (String kk : key_lst) {\n//\t\t\t\tSystem.out.println(kk + \" : \" + result_map.get(f_n).get(kk));\n//\t\t\t}\n\t\t\t\n\t\t\tArrayList<String> Top5List = sortHSbyValue_double(result_map.get(f_n));\n\t\t\tHashMap<String, Double> map = new HashMap<String, Double>();\n\t\t\tfor (String s : Top5List) {\n\t\t\t\tmap.put(s, result_map.get(f_n).get(s));\n\t\t\t}\n\n\t\t\ttop5.put(f_n, map);\n\t\t\t\n\t\t}\n\t\t\n\t\t// cosine_similarity\n\t\t// 구하기 전에 벡터의 차원을 맞춰준다.\n\t\t// input받는 파일을 제외한 나머지 파일들과의 유사도를 구한다.\n\t\tString input = str;\n\t\tHashMap<String, Double> csMap = new HashMap<String, Double>();\n\t\t\n\t\tfor (File f : fileList) {\n\t\t\tHashMap<String, Double> a = (HashMap<String, Double>) top5.get(input).clone();\n\t\t\tArrayList<String> a_key_lst = new ArrayList<String>(a.keySet());\n\t\t\tArrayList<String> total_key = new ArrayList<String>();\n\t\t\t\n\t\t\tif (input.equals(f.getName())) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tHashMap<String, Double> b = (HashMap<String, Double>) top5.get(f.getName()).clone();\n\t\t\tArrayList<String> b_key_lst = new ArrayList<String>(b.keySet());\n\t\t\t\n\t\t\tfor (String a_k : a_key_lst) {\n\t\t\t\ttotal_key.add(a_k);\n\t\t\t}\n\t\t\tfor (String b_k : b_key_lst) {\n\t\t\t\ttotal_key.add(b_k);\n\t\t\t}\n\t\t\t\n\t\t\tfor (String t_k : total_key) {\n\t\t\t\tif(!a.containsKey(t_k)) {\n\t\t\t\t\ta.put(t_k, (double)0);\n\t\t\t\t}\n\t\t\t\tif(!b.containsKey(t_k)) {\n\t\t\t\t\tb.put(t_k, (double)0);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tdouble[] a_lst = t3.mapToList(a);\n\t\t\tdouble[] b_lst = t3.mapToList(b);\n\t\t\tdouble cs = cosinSimilarity(a_lst, b_lst);\n\t\t\tcsMap.put(f.getName(), cs);\n\t\t\t\n\t\t\ta_key_lst.clear();\n\t\t\ttotal_key.clear();\n\t\t\t\n\t\t}\n\n\t\tt2.sort_print(csMap, input);\n\t\t\n\t\tSystem.out.println();\n\t}",
"public static void readDirectory(String dir){\n\t\tMap<Integer,Integer> catemap = new HashMap<Integer, Integer>();\r\n\t\tFile[] names = null;\r\n\t\tFile file = new File(dir);\r\n\t\tif(file.isFile())\r\n\t\t\tnames = new File[]{file};\r\n\t\telse\r\n\t\t\tnames = new File(dir).listFiles();\r\n\t\tList<String> lines = null;\r\n\t\tList<String> strs = null;\r\n\t\tList<Integer> keys = new ArrayList<Integer>();\r\n\t\tList<Integer> values = new ArrayList<Integer>();\r\n\t\tint v = 0;\r\n\t\tif(null!=names&&names.length>0){\r\n\t\t\tfor(File f:names){\r\n\t\t\t\tif(null!=lines)\r\n\t\t\t\t\tlines.clear();\r\n\t\t\t\tlines = readFile(f,\"utf-8\");\r\n\t\t\t\tif(null!=lines){\r\n\t\t\t\t\tint j = 0;\r\n\t\t\t\t\tint k=0;\r\n\t\t\t\t\tfor(String line:lines){\r\n\t\t\t\t\t\tstrs = parseStr2List(line, \"\\\\t\");\r\n//\t\t\t\t\t\tif(null!=strs&&strs.size()==7){\r\n//\t\t\t\t\t\t\tv = getPerValue(strs.get(3));\r\n//\t\t\t\t\t\t\tmaxmap.put(v, 1+DataFormat.parseInt(maxmap.get(v)));\r\n//\t\t\t\t\t\t\tv = getPerValue(strs.get(5));\r\n//\t\t\t\t\t\t\tcatemap.put(v, 1+DataFormat.parseInt(catemap.get(v)));\r\n//\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(null!=strs&&strs.size()==2){\r\n\t\t\t\t\t\t\tv = DataFormat.parseInt(strs.get(0));\r\n//\t\t\t\t\t\t\tif(v<=500){\r\n//\t\t\t\t\t\t\t\tv = j/5+1;\r\n//\t\t\t\t\t\t\t\tj = j+1;\r\n//\t\t\t\t\t\t\t}else{\r\n//\t\t\t\t\t\t\t\tv = 101;\r\n//\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif(k>500) break;\r\n\t\t\t\t\t\t\tk++;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif(j<20){\r\n\t\t\t\t\t\t\t\tkeys.add(v);\r\n\t\t\t\t\t\t\t\tvalues.add(DataFormat.parseInt(strs.get(1)));\r\n\t\t\t\t\t\t\t\tj++;\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tj=0;\r\n\t\t\t\t\t\t\t\tSystem.out.println(Arrays.toString(keys.toArray(new Integer[]{})));\r\n\t\t\t\t\t\t\t\tSystem.out.println(Arrays.toString(values.toArray(new Integer[]{})));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n//\t\t\t\t\t\t\tcatemap.put(v, DataFormat.parseInt(strs.get(1))+DataFormat.parseInt(catemap.get(v)));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n//\t\tfor(Entry<Integer, Integer> entry:maxmap.entrySet()){\r\n//\t\t\tUtils.appendToFile(\"/vol/user_log/maxmap.txt\", entry.getKey()+\"\\t\"+entry.getValue());\r\n//\t\t}\r\n//\t\tfor(Entry<Integer, Integer> entry:catemap.entrySet()){\r\n//\t\t\tUtils.appendToFile(\"C:\\\\Program Files\\\\SecureCRT\\\\download\\\\map.txt\", entry.getKey()+\"\\t\"+entry.getValue());\r\n//\t\t}\r\n\t}",
"public static Map<String, ArrayList<ImageDataModel>> getImageFolderMap(Activity activity) {\r\n imageFolderMap.clear();\r\n keyList.clear();\r\n imageDataModelList.clear();\r\n String BUCKET_ORDER_BY;\r\n Uri uri;\r\n Cursor cursor;\r\n int columnIndexDataPath, columnIndexFolderName, columnIndexTitleName,\r\n columnIndexDate, columnIndexSize, columnIndexBucketId, columnIndexAlbumId, columnIndexDuration;\r\n String absolutePathOfImage, folderName, imageTitle, fileDate, bucketId, AlbumId, fileSize, duration;\r\n\r\n /**\r\n * Fetching Audio type of files through content provider\r\n */\r\n /**\r\n * Fetching audio type of files through content provider\r\n */\r\n uri = MediaStore.Audio.Media.EXTERNAL_CONTENT_URI;\r\n BUCKET_ORDER_BY = MediaStore.Audio.Media.DATE_MODIFIED + \" DESC\";\r\n String selection = MediaStore.Audio.Media.IS_MUSIC + \" != 0\";\r\n String[] projection1 = new String[]{MediaStore.Audio.AudioColumns.ALBUM,\r\n MediaStore.Audio.AudioColumns.ALBUM_ID,\r\n MediaStore.Audio.AudioColumns.DISPLAY_NAME,\r\n MediaStore.Audio.AudioColumns.DATA,\r\n MediaStore.Audio.AudioColumns.SIZE,\r\n MediaStore.Audio.AudioColumns.DATE_MODIFIED,\r\n\r\n MediaStore.Audio.AudioColumns.DURATION};\r\n\r\n cursor = activity.getContentResolver().query(uri, projection1, selection, null, BUCKET_ORDER_BY);\r\n if (cursor != null) {\r\n columnIndexFolderName = cursor\r\n .getColumnIndexOrThrow(MediaStore.Audio.AudioColumns.ALBUM);\r\n columnIndexAlbumId = cursor\r\n .getColumnIndexOrThrow(MediaStore.Audio.AudioColumns.ALBUM_ID);\r\n columnIndexTitleName = cursor\r\n .getColumnIndexOrThrow(MediaStore.Audio.AudioColumns.DISPLAY_NAME);\r\n\r\n columnIndexDataPath = cursor.getColumnIndexOrThrow(MediaStore.Audio.AudioColumns.DATA);\r\n while (cursor.moveToNext()) {\r\n absolutePathOfImage = cursor.getString(columnIndexDataPath);\r\n folderName = Constant.AUDIO_FOLDER_NAME;\r\n imageTitle = cursor.getString(columnIndexTitleName);\r\n\r\n ImageDataModel imageDataModel = new ImageDataModel();\r\n imageDataModel.setFile(new File(absolutePathOfImage));\r\n imageDataModel.setFolderName(folderName);\r\n imageDataModel.setPath(absolutePathOfImage);\r\n imageDataModel.setImageTitle(imageTitle);\r\n imageDataModel.setBucketId(\"1\");\r\n imageDataModel.setTimeDuration(\"0\");\r\n imageDataModel.setSelected(false);\r\n if (FileUtils.isImageFile(absolutePathOfImage)) {\r\n imageDataModel.setImage(true);\r\n } else if (FileUtils.isVideoFile(absolutePathOfImage)) {\r\n imageDataModel.setVideo(true);\r\n } else if (FileUtils.isAudioFile(absolutePathOfImage)) {\r\n imageDataModel.setAudio(true);\r\n }\r\n if (imageDataModel.getFile().length() > 0) {\r\n imageDataModelList.add(imageDataModel);\r\n if (imageFolderMap.containsKey(folderName)) {\r\n imageFolderMap.get(folderName).add(imageDataModel);\r\n } else {\r\n ArrayList<ImageDataModel> listOfAllImages = new ArrayList<ImageDataModel>();\r\n listOfAllImages.add(imageDataModel);\r\n imageFolderMap.put(folderName, listOfAllImages);\r\n }\r\n }\r\n }\r\n cursor.close();\r\n }\r\n keyList.addAll(imageFolderMap.keySet());\r\n //Send notification through main thread\r\n new Handler(Looper.getMainLooper()).post(new Runnable() {\r\n @Override\r\n public void run() {\r\n GlobalBus.getBus().post(new LandingFragmentNotification(Constant.UPDATE_UI));\r\n }\r\n });\r\n return imageFolderMap;\r\n }",
"public FileObject folderId(UUID folderId) {\n this.folderId = folderId;\n return this;\n }",
"public void map(Object key, Text value, Context context\n\t\t ) throws IOException, InterruptedException {\n\n\t\t\t\n\t\t\t\n\t\t\t \n\t\t\t String curr_string=value.toString();\n\t\t\t /// splitting based on \"*\" as a delimiter...\n\t\t\t String [] parts=curr_string.split(\"\\\\*\");\n\t\t\t String curr_key=parts[0];\n\t\t\t // Removing spaces from both left and right part of the string..\n\t\t\t String curr_value=parts[1].trim();\n\t\t\t String [] small_parts=curr_value.split(\",\");\n\t\t\t // Taking the count of unique files which are present in the input given to tfidf\n\t\t\t int no_of_unique_files=Integer.parseInt(small_parts[small_parts.length-1]);\n\t\t\t /// The formula to compute idf is log((1+no_of_files)/no_of_unique_files))....\n\t\t\t Configuration conf=context.getConfiguration();\n\t\t\t String value_count=conf.get(\"test\");\n\t\t\t if(!value_count.isEmpty())\n\t\t\t {\n\t\t\t int total_no_files=Integer.parseInt(value_count);\n\t\t\t double x=(total_no_files/no_of_unique_files);\n\t\t\t // Formula fo rcomputing the idf value....\n\t\t\t double idf_value=Math.log10(1+x);\n\t\t\t for(int i=0;i<small_parts.length-1;i++)\n\t\t\t {\n\t\t\t\t String [] waste=small_parts[i].split(\"=\");\n\t\t\t\t String file_name=waste[0];\n\t\t\t\t // Computing the tfidf on the fly...\n\t\t\t\t double tf_idf=idf_value*Double.parseDouble(waste[1]);\n\t\t\t\t Text word3 = new Text();\n\t\t\t\t Text word4 = new Text();\n\t\t\t\t word3.set(curr_key+\"#####\"+file_name+\",\");\n\t\t\t\t word4.set(tf_idf+\"\");\n\t\t\t\t context.write(word3,word4);\n\t\t\t\t \n\t\t\t }\n\t\t\t //word1.set(curr_key);\n\t\t\t //word2.set(idf_value+\"\");\n\t\t\t //context.write(word1,word2); \n\t\t\t} \n\t\t}",
"private void scanDocuments()\n{\n document_counts = new HashMap<>();\n kgram_counts = new HashMap<>();\n for (File f : root_files) {\n addDocuments(f);\n }\n}",
"HashMap<String, ?> getOutputFiles();",
"NodeRef getCurrentSearchTermsFolder(NodeRef searchTermsFolder);",
"public static void createHashtable(String fileDirectory, Hashtable <String, Integer> hash){\n\t\tFile directory = new File(fileDirectory);\n\t\tFile[] files = directory.listFiles();\n\t\t\n\t\t// Adds file names and their corresponding update times into the hash table\n\t\tfor (int i = 0; i < files.length; i++){\n\t\t\tString fileName = files[i].getName();//variable for the file name\n\t\t\t\n\t\t\t// Gets files in this project folder, excludes source files and compiled files\n\t\t\tif(!fileName.startsWith(\".\") && !fileName.equals(\"src\") && !fileName.equals(\"bin\")) {\n\t\t\t\thash.put(files[i].getName(), (int) files[i].lastModified());\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(hash + \"\\n\");// Displays Hashtable of key and value pairs\n\t}",
"WithCreate withFolderPath(String folderPath);",
"public static Map<String, Path> getTableStoreFilePathMap(final FileSystem fs,\n final Path hbaseRootDir, PathFilter sfFilter, ExecutorService executor,\n ProgressReporter progressReporter) throws IOException, InterruptedException {\n ConcurrentHashMap<String, Path> map = new ConcurrentHashMap<>(1024, 0.75f, 32);\n\n // if this method looks similar to 'getTableFragmentation' that is because\n // it was borrowed from it.\n\n // only include the directory paths to tables\n for (Path tableDir : FSUtils.getTableDirs(fs, hbaseRootDir)) {\n getTableStoreFilePathMap(map, fs, hbaseRootDir, CommonFSUtils.getTableName(tableDir),\n sfFilter, executor, progressReporter);\n }\n return map;\n }",
"void process(boolean process, Integer frequency) {\r\n\r\n\t\t// Folder iterator\r\n\t\tfor (File file : folder.listFiles()) {\r\n\t\t\tString fileName = file.getName();\r\n\r\n\t\t\tif (DEBUG) {\r\n\t\t\t\tSystem.out.println(\"\\t\" + fileName);\r\n\t\t\t}\r\n\r\n\t\t\tMap<String, Integer> wordCount = new HashMap<String, Integer>();\r\n\t\t\tMap<Map<String, Integer>, Integer> classification = new HashMap<Map<String, Integer>, Integer>();\r\n\t\t\ttry {\r\n\t\t\t\tFileReader fr = new FileReader(file);\r\n\t\t\t\tBufferedReader br = new BufferedReader(fr);\r\n\t\t\t\tString line = br.readLine();\r\n\t\t\t\twhile (line != null) {\r\n\t\t\t\t\tStringTokenizer tokenizer;\r\n\t\t\t\t\tif (process) {\r\n\t\t\t\t\t\ttokenizer = new StringTokenizer(line,\r\n\t\t\t\t\t\t\t\t\" \\t\\n\\r\\f,.:;?![]'->@()/+-\\\"#\\\\<*_=&~`{}$%|^0123456789\");\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\ttokenizer = new StringTokenizer(line);\r\n\t\t\t\t\t}\r\n\t\t\t\t\twhile (tokenizer.hasMoreTokens()) {\r\n\t\t\t\t\t\tString word = tokenizer.nextToken();\r\n\t\t\t\t\t\tif (vocabulary.containsKey(word)) {\r\n\t\t\t\t\t\t\tvocabulary.put(word, vocabulary.get(word) + 1);\r\n\t\t\t\t\t\t\t// System.out.println(fileName + \"\\tUpdated word: \"\r\n\t\t\t\t\t\t\t// + word);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tvocabulary.put(word, 1);\r\n\t\t\t\t\t\t\t// System.out.println(fileName + \"\\tAdded new word:\r\n\t\t\t\t\t\t\t// \" + word);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// for (int i = 0; i < word.length(); i++) {\r\n\t\t\t\t\t\t// if (!characters.contains(word.charAt(i))) {\r\n\t\t\t\t\t\t// characters.add(word.charAt(i));\r\n\t\t\t\t\t\t// }\r\n\t\t\t\t\t\t// }\r\n\r\n\t\t\t\t\t\t// Add to the spam or not spam vocab;\r\n\t\t\t\t\t\tif (fileName.substring(0, 2).equals(\"sp\")) {\r\n\t\t\t\t\t\t\tif (spamVocab.containsKey(word)) {\r\n\t\t\t\t\t\t\t\tspamVocab.put(word, spamVocab.get(word) + 1);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tspamVocab.put(word, 1);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tclassWordCount.put(SPAM,\r\n\t\t\t\t\t\t\t\t\tclassWordCount.get(SPAM) + 1);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tif (notSpamVocab.containsKey(word)) {\r\n\t\t\t\t\t\t\t\tnotSpamVocab.put(word,\r\n\t\t\t\t\t\t\t\t\t\tnotSpamVocab.get(word) + 1);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tnotSpamVocab.put(word, 1);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tclassWordCount.put(NOT_SPAM,\r\n\t\t\t\t\t\t\t\t\tclassWordCount.get(NOT_SPAM) + 1);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Document index\r\n\t\t\t\t\t\tif (wordCount.containsKey(word)) {\r\n\t\t\t\t\t\t\twordCount.put(word, wordCount.get(word) + 1);\r\n\t\t\t\t\t\t\tif (DEBUG) {\r\n\t\t\t\t\t\t\t\tSystem.out.println(fileName\r\n\t\t\t\t\t\t\t\t\t\t+ \"\\tUpdated word: \" + word + \" - \"\r\n\t\t\t\t\t\t\t\t\t\t+ wordCount.get(word));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\twordCount.put(word, 1);\r\n\t\t\t\t\t\t\tif (DEBUG) {\r\n\t\t\t\t\t\t\t\tSystem.out.println(fileName\r\n\t\t\t\t\t\t\t\t\t\t+ \"\\tAdded new word: \" + word + \" - \"\r\n\t\t\t\t\t\t\t\t\t\t+ wordCount.get(word));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\ttotalWordCount++;\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// load next line\r\n\t\t\t\t\tline = br.readLine();\r\n\t\t\t\t}\r\n\t\t\t} catch (FileNotFoundException fNFE) {\r\n\t\t\t\tfNFE.printStackTrace();\r\n\t\t\t} catch (IOException iOE) {\r\n\t\t\t\tiOE.printStackTrace();\r\n\t\t\t}\r\n\r\n\t\t\t// classify\r\n\t\t\tif (fileName.substring(0, 2).equals(\"sp\")) {\r\n\t\t\t\tclassification.put(wordCount, SPAM);\r\n\t\t\t} else {\r\n\t\t\t\tclassification.put(wordCount, NOT_SPAM);\r\n\t\t\t}\r\n\r\n\t\t\tdocuments.put(fileName, classification);\r\n\t\t}\r\n\r\n\t\tif (DEBUG) {\r\n\t\t\t// for (char c : characters) {\r\n\t\t\t// System.out.print(c);\r\n\t\t\t// }\r\n\t\t}\r\n\r\n\t\tInteger numWords;\r\n\t\tif (process) {\r\n\t\t\tnumWords = eliminateWordByFreq(frequency);\r\n\t\t} else {\r\n\t\t\tnumWords = eliminateWordByFreq(0);\r\n\t\t}\r\n\r\n\t\tif (DEBUG) {\r\n\t\t\tSystem.out.println(\"Eliminated \" + numWords + \" words\");\r\n\t\t\tSystem.out.println(\"VOCABULARY:\\t\\t\" + vocabulary);\r\n\t\t\tSystem.out.println(\"SPAM VOCABULARY:\\t\" + spamVocab);\r\n\t\t\tSystem.out.println(\"REGULAR VOCABULARY:\\t\" + notSpamVocab);\r\n\t\t}\r\n\t}",
"public void addFolder(String path) {\n\t\tFile f = new File(path);\r\n\t\tif (!f.exists())\r\n\t\t\tSystem.out.println(\"File khong ton tai\");\r\n\t\tString[] flist = f.list();\r\n\r\n\t\tString fname;\r\n\t\tBufferedReader bf;\r\n\t\tString sentence;\r\n\t\tString w[];\r\n\r\n\t\tString D = \"_S2_\"; // dump\r\n\t\tString prev2, prev1;\r\n\t\tprev2 = D;\r\n\t\tprev1 = D;\r\n\t\tfor (int i = 0; i < flist.length; i++) {\r\n\t\t\tfname = flist[i];\r\n\t\t\t// System.out.println(\"process file \" + flist[i]);\r\n\t\t\t// TimePerf.tic();\r\n\t\t\ttry {\r\n\r\n\t\t\t\t// open file for reading\r\n\t\t\t\tbf = new BufferedReader(new InputStreamReader(\r\n\t\t\t\t\t\tnew FileInputStream(path + \"/\" + fname)));\r\n\t\t\t\twhile ((sentence = bf.readLine()) != null) {\r\n\t\t\t\t\t// tokenize to words\r\n\t\t\t\t\tString[] wlist = sentence.split(\"\\\\s+\");\r\n\t\t\t\t\tprev2 = D;\r\n\t\t\t\t\tprev1 = D;\r\n\t\t\t\t\tfor (int j = 0; j < wlist.length; j++) {\r\n\t\t\t\t\t\tw = wlist[j].split(\"/\");\r\n\r\n\t\t\t\t\t\tif (w.length != 2)\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\tw[1] = w[1].toUpperCase();\r\n\r\n\t\t\t\t\t\tif (size == ModelSize.SMALL) {\r\n\t\t\t\t\t\t\tif (w[1].matches(\"[A-Z]+\"))\r\n\t\t\t\t\t\t\t\tw[1] = \"\" + w[1].charAt(0);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// add tag count\r\n\t\t\t\t\t\tuModel.inc(w[1]);\r\n\r\n\t\t\t\t\t\t// add new tags\r\n\t\t\t\t\t\ttags.add(w[1]);\r\n\r\n\t\t\t\t\t\t// add new tag to word\r\n\t\t\t\t\t\taddTagToWord(w[0], w[1]);\r\n\r\n\t\t\t\t\t\t// increase count of word tag\r\n\t\t\t\t\t\twtProb.inc(w[1], w[0]);\r\n\r\n\t\t\t\t\t\t// increase count of bigram\r\n\t\t\t\t\t\t// if (j > 0) {\r\n\t\t\t\t\t\tbiModel.inc(prev1, w[1]);\r\n\t\t\t\t\t\t// }\r\n\r\n\t\t\t\t\t\t// increase count of trigram\r\n\t\t\t\t\t\t// if (j > 1) {\r\n\t\t\t\t\t\ttriModel.inc(prev1 + \" \" + prev2, w[1]);\r\n\t\t\t\t\t\t// }\r\n\r\n\t\t\t\t\t\tprev2 = prev1;\r\n\t\t\t\t\t\tprev1 = w[1];\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tbf.close();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\t// System.out.println(\"Process time \" + TimePerf.toc() + \"ms\");\r\n\t\t}\r\n\t\t// handle unknown word (word which has word count < 5)\r\n\t\tHashSet<String> tmp = new HashSet<String>();\r\n\t\tfor (String wd : wordTags.keySet()) {\r\n\r\n\t\t\tfor (String t : wordTags.get(wd)) {\r\n\t\t\t\tif (t.matches(\"\\\\w+\") && wtProb.getCombinationCount(t, wd) < 5) {\r\n\t\t\t\t\twtProb.inc(t, \"<UNK>\", wtProb.getCombinationCount(t, wd));\r\n\t\t\t\t\ttmp.add(t);\r\n\t\t\t\t\tSystem.out.println(\"<\" + wd + \",\" + t + \">\"\r\n\t\t\t\t\t\t\t+ wtProb.freq(\"UNK\", t));\r\n\t\t\t\t}\r\n\t\t\t\t// addTagToWord(\"<UNK>\", t);\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t\twordTags.put(\"<UNK>\", tmp);\r\n\r\n\t\tSystem.out.println(\"Total of tags : \" + tags.size());\r\n\t\tStringBuffer t = new StringBuffer();\r\n\t\tfor (String s : tags)\r\n\t\t\tif (s.matches(\"\\\\w+\"))\r\n\t\t\t\tt.append(\" \" + s);\r\n\t\tSystem.out.println(t.toString());\r\n\t\tthis.computeLambda();\r\n\t\tSystem.out.println(\"Unkown word type: \");\r\n\t\tfor (String t2 : getPosibleTags(\"<UNK>\"))\r\n\t\t\tSystem.out.println(\"Tag \" + t + \", p= \" + getProbWordGivenTag(\"<UNK>\", t2));\r\n\r\n\t}",
"public void LoadDirectory(String folder, String suffix) {\n\t\tFile dir = new File(folder);\n\t\tint size = m_reviews.size();\n\t\tfor (File f : dir.listFiles()) {\n\t\t\tif (f.isFile() && f.getName().endsWith(suffix)) {\n\t\t\t\tanalyzeDocumentDemo(LoadJson(f.getAbsolutePath()));\n\t\t\t} else if (f.isDirectory())\n\t\t\t\tLoadDirectory(f.getAbsolutePath(), suffix);\n\t\t}\n\n\t\t// compute Cosine similarity\n\t\t\n\t\tComputeSimilarity();\n \n\t\t//This part of code is for my another program for validating Zipf's Law \n\t\t// which requires to get word frequency and output it\n\t\t/*\n\t\t * try { pw = new PrintWriter(new FileOutputStream(\n\t\t * \"C:/Users/Ryan/Desktop/information/IR task/IR task/data/Model/WC.txt\"\n\t\t * )); qw= new PrintWriter(new FileOutputStream(\n\t\t * \"C:/Users/Ryan/Desktop/information/IR task/IR task/data/Model/Fre.txt\"\n\t\t * )); mw= new PrintWriter(new FileOutputStream(\n\t\t * \"C:/Users/Ryan/Desktop/information/IR task/IR task/data/Model/Times.txt\"\n\t\t * ));\n\t\t * \n\t\t * } catch(Exception e) {\n\t\t * \n\t\t * }\n\t\t * \n\t\t * pw.close();\n\t\t */\n\t\tsize = m_reviews.size() - size;\n\t\tSystem.out.println(\"Loading \" + size + \" review documents from \"\n\t\t\t\t+ folder);\n\t}",
"Update withFolderPath(String folderPath);",
"public String createNewFolder(String token) throws IOException, GeneralSecurityException {\n String folderID = null;\n Drive service = getDriveService(token);\n File fileMetadata = new File();\n fileMetadata.setName(FOLDER_NAME);\n fileMetadata.setMimeType(\"application/vnd.google-apps.folder\");\n List<File> files = search(token, FOLDER_NAME);\n log.debug(\"files is empty? {}, {}\", files.size(), files.isEmpty());\n if (files.isEmpty()) {\n File file = service.files().create(fileMetadata).setFields(\"id\").execute();\n log.debug(\"Folder ID: \" + file.getId());\n folderID = file.getId();\n } else {\n boolean folderExists = false;\n for (File file : files) {\n if (file.getOwnedByMe() && !file.getTrashed()) {\n log.debug(\"Folder ID: {}, trashed {}, ownedbyme {}\", file.getId(), file.getTrashed(), file.getOwnedByMe());\n folderID = file.getId();\n folderExists = true;\n break;\n }\n }\n if (!folderExists) {\n File createdFile = service.files().create(fileMetadata).setFields(\"id\").execute();\n log.debug(\"Folder ID: \" + createdFile.getId());\n folderID = createdFile.getId();\n\n }\n }\n return folderID;\n }",
"public SymbolManager(FileObject folder) {\r\n this.folder = folder;\r\n }",
"public DocumentListEntry createFolder(String folderName) throws MalformedURLException, IOException, ServiceException;",
"java.lang.String getFolderId();",
"private void initIDFMap(List<List<Map<String,List<Double>>>> tfMap){\n\t\tfor (int i = 0; i < tfMap.size(); i++) {\n\t\t\tList<Map<String,List<Double>>> gestureDocument = tfMap.get(i);\n\t\t\tfor (int j = 0; j < gestureDocument.size(); j++) {\n\t\t\t\tMap<String,List<Double>> tempMap = gestureDocument.get(j);\n\t\t\t\tIterator<Entry<String, List<Double>>> it = tempMap.entrySet().iterator();\n\t\t\t\t while (it.hasNext()) {\n\t\t\t\t Map.Entry<String,Integer> pairs = (Map.Entry)it.next(); \n\t\t\t\t if(getTfIDFMapGlobal().containsKey(pairs.getKey()))\n\t\t\t\t \tgetTfIDFMapGlobal().put(pairs.getKey(), getTfIDFMapGlobal().get(pairs.getKey())+1);\n\t\t\t\t else\n\t\t\t\t \tgetTfIDFMapGlobal().put(pairs.getKey(), 1);\n\t\t\t\t }\n\t\t\t}\n\t\t}\n\t}",
"public ViewMap(String viewFolder) {\n\t\tthis.viewMap = new HashMap<String,View>();\n\t\tthis.viewFolder = viewFolder;\n\t}",
"@Override\n public Map<String, List<String>> getSubmissionFiles(SubmissionFilesRequest request) {\n Map<String, List<String>> result = null;\n List<File> files = new ArrayList<>();\n String token = request.getFilesToken();\n String[] arr = token.split(\"~\");\n String firstFile = \"\";\n String secondFile = \"\";\n\n String extension = \"\";\n if (arr != null && arr.length >= 2) {\n int indexFirstFile = arr[0].lastIndexOf(\"_\");\n int indexSecondFile = arr[1].lastIndexOf(\"_\");\n if (indexFirstFile > 0 && indexSecondFile > 0) {\n firstFile = arr[0].substring(0, indexFirstFile);\n secondFile = arr[1].substring(0, indexSecondFile);\n if (firstFile.contains(EXTENSION_JAVA) && secondFile.contains(EXTENSION_JAVA)) {\n extension = EXTENSION_JAVA;\n } else if (firstFile.contains(EXTENSION_CSHARP) && secondFile.contains(EXTENSION_CSHARP)) {\n extension = EXTENSION_CSHARP;\n } else if (firstFile.contains(EXTENSION_C) && secondFile.contains(EXTENSION_C)) {\n extension = EXTENSION_C;\n }\n FileManager.getAllFiles(PATH_SERVER_REPOSITORY, files, extension);\n if (files.size() > 0) {\n result = new HashMap<>();\n if (!firstFile.equals(\"\") && !secondFile.equals(\"\")) {\n for (File file : files) {\n String fileName = file.getName();\n if ((fileName.contains(firstFile) || fileName.contains(secondFile)) && fileName.contains(request.getExamCode())) {\n try {\n if (!result.containsKey(fileName)) {\n List<String> fileString = Files.readAllLines(Paths.get(file.getAbsolutePath()));\n result.put(fileName, fileString);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n }\n }\n }\n }\n return result;\n }",
"private static Map<String,Node> buildFOCMap(List<Node> focs) throws Exception\n\t{\n\t\tMap<String,Node> known_focs = new HashMap<String,Node>();\n\t\t\n\t\tfor(Node foc : focs)\n\t\t{\n\t\t\tString n = (String)foc.getProperty(FeatureOrientedChangeNode._name);\n\t\t\tif(!known_focs.containsKey(n))\n\t\t\t\tknown_focs.put(n,foc);\n\t\t}\n\n\t\treturn known_focs;\n\t}",
"static void returnTfIdfResults() {\n\t\tSet<String> specificWords = findKeywords();\n\n\t\t// for every phrase\n\t\tfor (String word : specificWords) {\n\t\t\t// get the total number of documents\n\t\t\tdouble totalSize = size;\n\n\t\t\t// get the collection of documents containing that word\n\t\t\tCollection<File> containingWordSet = invertedMap.getValues(word);\n\n\t\t\t// makes a new one if null (for ease of code)\n\t\t\tif (containingWordSet == null) {\n\t\t\t\tcontainingWordSet = new HashSet<File>();\n\t\t\t}\n\n\t\t\t// the number containing the word\n\t\t\tdouble numContainingWord = containingWordSet.size();\n\n\t\t\t// get the idf (log(total/(1 + |# contain word|)\n\t\t\t// it is normalize with 1 to prevent division by 0\n\t\t\tdouble idf = Math.log(totalSize / (1 + numContainingWord));\n\n\t\t\t// System.out.println(\"------------------\");\n\t\t\t// System.out.println(word + \" totalSize \" + totalSize);\n\t\t\t// System.out.println(word + \" numContainingWord \" +\n\t\t\t// numContainingWord);\n\t\t\t// System.out.println(word + \" idf \" + idf);\n\t\t\t// System.out.println(\"------------------\");\n\n\t\t\t// set the wordscore to 0\n\t\t\tdouble wordScore = 0;\n\n\t\t\t// for all of the files with the word\n\t\t\tfor (File file : containingWordSet) {\n\t\t\t\tString fileName = file.getName();\n\n\t\t\t\t// get the phrase count for this document\n\t\t\t\tInteger phraseCount = phraseCountMap.get(fileName);\n\t\t\t\tdouble numPhrases = phraseCount.doubleValue();\n\n\t\t\t\t// get the word frequency map for this page\n\t\t\t\tHashMap<String, Integer> docFreqMap = wordFreqMap.get(fileName);\n\t\t\t\tInteger freq = docFreqMap.get(word);\n\n\t\t\t\t// otherwise, get the tf\n\t\t\t\tdouble tf;\n\t\t\t\tif (freq == null) {\n\t\t\t\t\t// if it's not present, it's 0\n\t\t\t\t\ttf = 0;\n\t\t\t\t} else {\n\t\t\t\t\t// otherwise, it's the value\n\t\t\t\t\ttf = freq / numPhrases;\n\t\t\t\t\t// System.out.println(tf);\n\t\t\t\t}\n\n\t\t\t\t// multiply for this score\n\t\t\t\tdouble score = tf * idf;\n\n\t\t\t\t// add it to the page score\n\t\t\t\twordScore += score;\n\t\t\t}\n\n\t\t\t// make a node with the sum of tf-idf for all relevant phrases and\n\t\t\t// add to pq\n\t\t\tWordNode w = new WordNode(word, wordScore);\n\t\t\tpq.add(w);\n\t\t}\n\t}",
"@Override\n public void visitFolder(final String folder, BaseDirective directive, RepoVisitor visitor) {\n\n log.info(String.format(Messages.getString(\"NVersionedRepo.visitRep\"), folder)); //$NON-NLS-1$\n\n final Map<String, JsonContent> values = new HashMap<>();\n\n metaHandler.visitKeys(folder, new StoreKeyVisitor() {\n\n @Override\n public boolean visit(String key, String value) {\n String partialKey = folder.isEmpty() ? key : key.substring(folder.length() + 1);\n int indexPoint = partialKey.indexOf('/');\n if (indexPoint == -1) {\n values.put(partialKey, new JsonContent(value));\n } else {\n String innerKey = partialKey.substring(0, indexPoint);\n if (!values.containsKey(innerKey)) {\n values.put(innerKey, null);\n }\n }\n return true;\n }\n\n });\n\n for (Map.Entry<String, JsonContent> entry : values.entrySet()) {\n visitor.visit(entry.getKey(), entry.getValue(), entry.getValue() == null);\n }\n }",
"@Override\n public void visitFolders(final String folderPrefix, BaseDirective directive, final RepoFolderVisitor visitor) {\n\n metaHandler.visitKeys(folderPrefix, new StoreKeyVisitor() {\n\n @Override\n public boolean visit(String key, String value) {\n // Remove prefix from key\n // Find all of the unique folders in this key\n String[] parts = key.split(\"/\"); //$NON-NLS-1$\n StringBuilder f = new StringBuilder();\n for (int i = 0; i < parts.length; i++) {\n f.append(parts[i]);\n visitor.folder(f.toString());\n f.append(\"/\"); //$NON-NLS-1$\n }\n return true;\n }\n\n });\n }",
"private List<AttributesRule> getRulesForFolder(File folder) {\n return rulesAtPath.computeIfAbsent(folder, f -> parseRules(new File(f, Constants.DOT_GIT_ATTRIBUTES)));\n }",
"public void buildMap(){\n this.map = new HashMap<String, String>();\n map.put(\"user\", \"user\");\n map.put(\"pw\", \"pass\");\n map.put(\"quit\", \"quit\");\n map.put(\"features\", \"feat\");\n map.put(\"cd\", \"cwd\");\n map.put(\"dir\", \"list\");\n map.put(\"get\", \"retr\");\n }",
"public static FileIDDictionary getInstance() {\n return FILE_ID_DICTIONARY;\n }",
"public static Map<String, Path> getTableStoreFilePathMap(final FileSystem fs,\n final Path hbaseRootDir) throws IOException, InterruptedException {\n return getTableStoreFilePathMap(fs, hbaseRootDir, null, null, (ProgressReporter) null);\n }",
"public void listFilesForFolder(final File folder) {\n\t\tfor (final File fileEntry : folder.listFiles()) {\n\t\t\tif (fileEntry.isDirectory()) {\n\t\t\t\tlistFilesForFolder(fileEntry);\n\t\t\t} else if (!fileEntry.getName().startsWith(\".\")) {\n\t\t\t\tRunConfigDataNode temp = new RunConfigDataNode(null);\n\t\t\t\ttemp.setName(fileEntry.getName());\n\t\t\t\ttemp.setSerializeDestination(serializePath);\n\t\t\t\tString name = fileEntry.getName();\n\t\t\t\tif (!name.equals(\"entries\")) {\n\t\t\t\t\tRunConfigDataNode config = temp.deserialize();\n\t\t\t\t\tif (!config.isMarkedForDelete()) {\n\t\t\t\t\t\tsavedConfigs.put(name, config);\n\t\t\t\t\t\tnewConfigsNum++;\n\t\t\t\t\t}\n\t\t\t\t\t// if the config is marked for delete, delete it.\n\t\t\t\t\telse {\n\t\t\t\t\t\tfileEntry.delete();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"private void calculateIdf(){\r\n\t\tIdf = new HashMap<>();\r\n\t\tOcc = new HashMap<>();\r\n\t\t\r\n\t\tfor (Entry<String, Document> doc : Docs.entrySet()){\r\n\t\t\tdoc.getValue().wordSet.forEach(word -> {\r\n\t\t\t\tdouble count = Idf.containsKey(word) ? Idf.get(word) : 0;\r\n \tIdf.put(word, count+1);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tdoc.getValue().words.forEach((w, o) -> words.add(w));\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tfor (Entry<String, Double> e : new HashMap<>(Idf).entrySet()){\r\n\t\t\tIdf.put(e.getKey(),\r\n\t\t\t\t\tMath.log(Idf.keySet().size() / e.getValue()));\r\n\t\t}\r\n\t}",
"private void scanFolder(FileObject folder, ContainerEntry container) {\n if (LOGGABLE) log.fine(\"scanFolder(\" + folder.getPath() + \") START\");\n container.displayName = folder.getName();\n try {\n container.displayName = folder.getFileSystem ().getDecorator ().annotateName(folder.getName(), Collections.singleton(folder));\n } catch (Exception x) {\n log.log(Level.WARNING, container.displayName, x);\n }\n container.entries = new ArrayList();\n Object rowsAttr = folder.getAttribute(\"rows\");\n if (rowsAttr != null) {\n container.rows = ((Integer)rowsAttr).intValue();\n }\n Object columnsAttr = folder.getAttribute(\"columns\");\n if (columnsAttr != null) {\n container.columns = ((Integer)columnsAttr).intValue();\n }\n Object labelFormat = folder.getAttribute(\"labelFormat\");\n if (labelFormat instanceof String) {\n container.labelFormat = (String)labelFormat;\n }\n // in order to get the order we need Registry API:\n Context con = Context.getDefault().getSubcontext(folder.getPath());\n List orderedNames = con.getOrderedNames();\n for (Iterator it = orderedNames.iterator(); it.hasNext();) {\n String name = (String) it.next();\n if (LOGGABLE) log.fine(\"scanFolder checking \" + name);\n if (name.endsWith(\"/\")) {\n name = name.substring(0, name.length()-1);\n }\n FileObject child = folder.getFileObject(name);\n String []extensions = { \"instance\", \"ser\", \"setting\", \"xml\", \"shadow\" };\n int extNum = 0;\n while ((child == null) && (extNum < extensions.length)) {\n child = folder.getFileObject(name, extensions[extNum++]);\n }\n if (child == null) {\n log.fine(\"child == null: Registry returned an invalid name \" + name + \" in folder \" + folder.getPath());\n continue;\n }\n if (! child.isValid()) {\n log.fine(\"!child.isValid(): Registry returned an invalid name \" + name + \" in folder \" + folder.getPath());\n continue;\n }\n if (child.isData()) {\n String ext = child.getExt();\n String componentID = (String)child.getAttribute(\"componentID\");\n if (componentID == null) {\n log.fine(\"File \" + child.getPath() + \" is missing the componentID attribute\");\n continue;\n }\n if (LOGGABLE) log.fine(\"adding result with ID \" + componentID);\n ControlEntry e = new ControlEntry();\n e.id = componentID;\n Object c = con.getObject(name, null);\n if (c instanceof ControlFactory) {\n e.control = (ControlFactory)c;\n } else {\n log.fine(\"Invalid control \" + name + \" in folder \" + folder.getPath()+ \" expected Control but was \" + c);\n continue;\n }\n e.label = (String)child.getAttribute(\"label\");\n e.labelBundle = (String)child.getAttribute(\"labelBundle\");\n Object lac = child.getAttribute(\"labelAbove\");\n if (lac instanceof Boolean) {\n e.labelAboveControl = ((Boolean)lac).booleanValue();\n }\n container.entries.add(e);\n }\n if (child.isFolder()) {\n Object a1 = child.getAttribute(\"createHandle\");\n if ((a1 instanceof Boolean) && ((Boolean)a1).booleanValue()) {\n ContainerEntry c = new ContainerEntry();\n scanFolder(child, c);\n container.entries.add(c);\n }\n }\n }\n if (LOGGABLE) log.fine(\"scanFolder(\" + folder.getPath() + \") END\");\n }",
"public static Map<Object, Object> processDocuments(\n\t\t\tString trainingSetFolderPath,boolean removeStopWords, boolean doSmoothing) {\n\t\tint numTokens = 0; \n\n\t\t// Map to store the processed results.\n\t\tMap<Object, Object> result = new HashMap<Object, Object>(); \n\n\t\t// Map to keep track of words and its frequency\n\n\t\tMap<String, Integer> tokenCntMap = new HashMap<String, Integer>(); \n\n\t\tFile trainingSetFolder = new File(trainingSetFolderPath);\n\t\tFile[] documents = trainingSetFolder.listFiles();\n\t\tfor (File doc : documents) {\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\tBufferedReader bufferedReader = new BufferedReader(\n\t\t\t\t\t\tnew FileReader(doc));\n\t\t\t\tString line;\n\t\t\t\twhile ((line = bufferedReader.readLine()) != null) {\n\t\t\t\t\tString[] tokens = line.split(\"\\\\s+\");\n\t\t\t\t\tnumTokens += tokens.length;\n\t\t\t\t\tif(removeStopWords == false){\n\t\t\t\t\t\tfor (String token : tokens) {\n\t\t\t\t\t\t\ttoken = token.replaceAll(\"[^a-zA-Z]\", \"\");\n\t\t\t\t\t\t\ttoken = token.toLowerCase();\n\t\t\t\t\t\t\tif(!token.isEmpty()){\n\t\t\t\t\t\t\t\tif (tokenCntMap.containsKey(token)) {\n\t\t\t\t\t\t\t\t\ttokenCntMap.put(token, tokenCntMap.get(token)\n\t\t\t\t\t\t\t\t\t\t\t.intValue() + 1);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ttokenCntMap.put(token, 1);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tfor (String token : tokens) {\n\t\t\t\t\t\t\ttoken = token.replaceAll(\"[^a-zA-Z]\", \"\");\n\t\t\t\t\t\t\ttoken = token.toLowerCase();\n\t\t\t\t\t\t\tif(!token.isEmpty() && !stopWords.contains(token)){\n\t\t\t\t\t\t\t\tif (tokenCntMap.containsKey(token)) {\n\t\t\t\t\t\t\t\t\ttokenCntMap.put(token, tokenCntMap.get(token)\n\t\t\t\t\t\t\t\t\t\t\t.intValue() + 1);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ttokenCntMap.put(token, 1);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbufferedReader.close();\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\tresult.put(\"NumTokens\", numTokens);\n\t\tresult.put(\"NumDocuments\", documents.length);\n\t\tresult.put(\"TokenCntMap\", tokenCntMap);\n\t\treturn result;\n\n\t}",
"private static void initFileNames() {\n if (fileNames == null) {\n fileNames = new HashMap<>();\n }\n fileNames.put(\"Linked List (simple)\", \"MySimpleLinkedList\");\n fileNames.put(\"Linked List\", \"MyLinkedList\");\n fileNames.put(\"Stack\", \"MyStack\");\n fileNames.put(\"Queue\", \"MyArrayDeque\");\n fileNames.put(\"Graph\", \"MyGraph\");\n fileNames.put(\"HashTable\", \"MyHashTable\");\n fileNames.put(\"Linear Search\", \"Algorithms\");\n fileNames.put(\"Binary Search\", \"Algorithms\");\n fileNames.put(\"Bubble Sort\", \"Algorithms\");\n fileNames.put(\"Insertion Sort\", \"Algorithms\");\n fileNames.put(\"Selection Sort\", \"Algorithms\");\n fileNames.put(\"Shell Sort\", \"Algorithms\");\n fileNames.put(\"Merge Sort\", \"Algorithms\");\n fileNames.put(\"Merge Sort (in-place)\", \"Algorithms\");\n fileNames.put(\"Quick Sort\", \"Algorithms\");\n }",
"public Hashtable<String, Double> fakeResumeTFIDF() {\n resume_tfidf = new Hashtable<String, Double>();\n resume_tfidf.put(\"am\", (double) 0);\n resume_tfidf.put(\"learning\", (double) 0);\n resume_tfidf.put(\"javascript\", (double) 1 / 10);\n resume_tfidf.put(\"java\", (double) 0);\n resume_tfidf.put(\"is\", (double) 2 / 10);\n resume_tfidf.put(\"cool\", (double) 0);\n resume_tfidf.put(\"language\", (double) 1 / 10);\n resume_tfidf.put(\"requirement\", (double) 1 / 10 + (double) 1 / 10 * Math.log(2));\n resume_tfidf.put(\"for\", (double) 1 / 10 + (double) 1 / 10 * Math.log(2));\n resume_tfidf.put(\"this\", (double) 1 / 10 + (double) 1 / 10 * Math.log(2));\n resume_tfidf.put(\"job\", (double) 1 / 10 + (double) 1 / 10 * Math.log(2));\n resume_tfidf.put(\"python\", (double) 1 / 10 + (double) 1 / 10 * Math.log(2));\n resume_tfidf.put(\"wonderful\", (double) 1 / 10 + (double) 1 / 10 * Math.log(2));\n return resume_tfidf;\n }",
"private HashMap<String,HashMap<String,Integer>> computeTFForQueryWords(ArrayList<String> queryPostingLines) {\n HashMap<String,HashMap<String,Integer>> queryWordsTF = new HashMap<>();\n HashMap<String,HashMap<String,Integer>> queryWordsTFPerDoc = new HashMap<>();\n String docID,term;\n Integer tf;\n HashSet<String> docIDs = new HashSet<>();\n for(String postingLine : queryPostingLines){\n HashMap<String,Integer> frequenciesInDocuments = new HashMap<>();\n term = postingLine.substring(0,postingLine.indexOf(\"|\"));\n postingLine = postingLine.substring(postingLine.indexOf(\"|\")+1);\n while(!postingLine.equals(\"\")) {\n docID = postingLine.substring(0, postingLine.indexOf(\":\"));\n docIDs.add(docID);\n postingLine = postingLine.substring(postingLine.indexOf(\"_\") + 1);\n tf = Integer.valueOf(postingLine.substring(0, postingLine.indexOf(\"_\")));\n postingLine = postingLine.substring(postingLine.indexOf(\"_\") + 1);\n frequenciesInDocuments.put(docID,tf);\n }\n queryWordsTF.put(term,frequenciesInDocuments);\n }\n\n ArrayList<String> allTermsInQuery = new ArrayList<>(queryWordsTF.keySet());\n for(String doc : docIDs){\n HashMap<String,Integer> tfsInDoc = new HashMap<>();\n for(String termInQuery : allTermsInQuery){\n HashMap<String,Integer> termsTFInDoc = queryWordsTF.get(termInQuery);\n if(termsTFInDoc.containsKey(doc)){\n tfsInDoc.put(termInQuery,termsTFInDoc.get(doc));\n }\n }\n queryWordsTFPerDoc.put(doc,tfsInDoc);\n }\n return queryWordsTFPerDoc;\n }",
"public void setFolderId(UUID folderId) {\n this.folderId = folderId;\n }",
"private static HashMap makeLabelMapping(String szlabelmapping) throws IOException\n {\n\tHashMap hmlabelExtend = new HashMap();\n\tif (szlabelmapping != null)\n\t{\n BufferedReader bridlabel = Util.getBufferedReader(szlabelmapping);\n\t String szLine;\n\n\t //Loading in a mapping from state ID to a label description\n\n\t while ((szLine = bridlabel.readLine())!=null)\n {\n\t StringTokenizer st = new StringTokenizer(szLine,\"\\t\");\n\t String szID = st.nextToken().trim();\n\t String szLabelExtend = st.nextToken().trim();\n\t hmlabelExtend.put(szID,szLabelExtend);\n\t }\n\t bridlabel.close();\n\t}\n\n\treturn hmlabelExtend;\n }",
"public Hashtable<String, Double> fakeJobDescriptionTFIDF() {\n job_description_tfidf = new Hashtable<String, Double>();\n job_description_tfidf.put(\"am\", (double) 1 / 7 + (double) 1 / 7 * Math.log(2));\n job_description_tfidf.put(\"learning\", (double) 1 / 7 + (double) 1 / 7 * Math.log(2));\n job_description_tfidf.put(\"javascript\", (double) 1 / 7);\n job_description_tfidf.put(\"java\", (double) 1 / 7 + (double) 1 / 7 * Math.log(2));\n job_description_tfidf.put(\"is\", (double) 1 / 7);\n job_description_tfidf.put(\"cool\", (double) 1 / 7 + (double) 1 / 7 * Math.log(2));\n job_description_tfidf.put(\"language\", (double) 1 / 7);\n job_description_tfidf.put(\"requirement\", (double) 0);\n job_description_tfidf.put(\"for\", (double) 0);\n job_description_tfidf.put(\"this\", (double) 0);\n job_description_tfidf.put(\"job\", (double) 0);\n job_description_tfidf.put(\"python\", (double) 0);\n job_description_tfidf.put(\"wonderful\", (double) 0);\n return job_description_tfidf;\n }",
"Map<File, File> getOutputFileMap();",
"public abstract String getConfigurationFolderKey();",
"private void processFolders(List<File> folderList, java.io.File parentFolder) {\n // process each folder to see if it needs to be updated;\n for (File f : folderList) {\n String folderName = f.getTitle();\n java.io.File localFolder = new java.io.File(parentFolder, folderName);\n Log.e(\"folder\",localFolder.getAbsolutePath());\n if (!localFolder.exists())\n localFolder.mkdirs();\n getFolderContents(f, localFolder);\n }\n }",
"public static void loadTargetTerm2IdMapping(File input) throws IOException {\n\t\t\tm_namesMap = new SimpleBidirectionalMap<String, Integer>();\n\t\t\tString encoding = FileUtils.getFileEncoding(input);\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(input), encoding));\n\t\t\tString line = reader.readLine();\n\t\t\tint lineNum = 1;\n\t\t\tboolean testFormat = false;\n\t\t\tif(StringUtils.checkIfNumber(line.split(\"\\t\")[0]))\n\t\t\t\ttestFormat = true;\n\t\t\twhile(line!= null) {\n\t\t\t\tif(line.equals(\"@@@\"))\n\t\t\t\t\tbreak;\n\t\t\t\tif(testFormat) {\n\t\t\t\t\tString num = line.split(\"\\t\")[0];\n\t\t\t\t\tSystem.out.println(\"key: \"+line.trim().substring(num.length()+1) + \" value: \" + Integer.parseInt(num));\n\t\t\t\t\tm_namesMap.put(line.trim().substring(num.length()+1), Integer.parseInt(num));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println(\"key????\" + lineNum + \"instead of \" + line.split(\"\\t\")[0]);\n\t\t\t\t\tm_namesMap.put(line.trim(), lineNum);\n\t\t\t\t}\n\t\t\t\tline = reader.readLine();\n\t\t\t\tlineNum ++;\n\t\t\t}\n\t\t}",
"public JSONObject getSubTypes(CoreSession session, DocumentModel folder) throws UnsupportedEncodingException {\n JSONObject subTypes = new JSONObject();\n\n boolean canAddChildren = session.hasPermission(folder.getRef(), SecurityConstants.ADD_CHILDREN);\n if (canAddChildren) {\n Collection<Type> allowedSubTypes = this.typeService.getAllowedSubTypes(folder.getType());\n for (Type subType : allowedSubTypes) {\n subTypes.put(subType.getId(), URLEncoder.encode(subType.getLabel(), \"UTF-8\"));\n }\n }\n\n return subTypes;\n }",
"public HashMap<Integer, Double> tfidf(String wordToLookFor, ArrayList<Document> documents) {\n HashMap<Integer, Double> results = new HashMap<Integer, Double>();\n Tokenizer tokenizer = new Tokenizer();\n HashMap<String, ArrayList<Integer>> tokensHM = tokenizer.generateHashMap(documents);\n double idf = idf(wordToLookFor, tokensHM, documents);\n if (idf != 0) {\n for (Document doc : documents) {\n double tf = tf(wordToLookFor, tokensHM, doc);\n if (tf != 0) {\n results.put(doc.getIndex(), tf / idf);\n }\n }\n }\n return results;\n }",
"private static Map<String, ManifestItem> manifestItems(final File rootDir, final Document opfDoc) throws IOException {\n\n Map<String, ManifestItem> files = Maps.newLinkedHashMap();\n\n for(Element element : opfDoc.select(\"manifest > item\")) {\n String href = element.attr(\"href\").trim();\n if(href.isEmpty()) {\n continue;\n } else if(href.startsWith(\"/\")) {\n href = href.substring(1);\n }\n\n File file = new File(rootDir, href);\n if(!file.exists()) {\n throw new IOException(String.format(\"Missing file, '%s'\", file.getAbsolutePath()));\n }\n\n String id = element.attr(\"id\").trim();\n if(id.isEmpty()) {\n throw new IOException(String.format(\"Missing id for, '%s'\", file.getAbsolutePath()));\n }\n\n String mediaType = element.attr(\"media-type\").trim();\n\n files.put(id, new ManifestItem(id, href, file, mediaType));\n }\n\n return files;\n }",
"private void buildTFIDFAnnotations() throws IOException {\n\t\tTFIDFTrendExtractor trendExtractor = new TFIDFTrendExtractor(false, trainingInstances);\n\t\tTFIDFInvestigationMethodExtractor invMExtractor = new TFIDFInvestigationMethodExtractor(false,\n\t\t\t\ttrainingInstances);\n\n\t\tnew File(\"data/annotations/invMTFIDF/\").mkdirs();\n\t\tnew File(\"data/annotations/trendTFIDF/\").mkdirs();\n\n\t\tfor (Instance instance : testInstances) {\n//\t\t\tannotations.putIfAbsent(instance, new HashSet<>());\n\t\t\tSet<DocumentLinkedAnnotation> invAnns = new HashSet<>();\n\t\t\tfor (List<DocumentToken> sentence : instance.getDocument().getSentences()) {\n\t\t\t\tinvAnns.addAll(invMExtractor.getInvestigationMethodForSentence(instance.getDocument(), sentence));\n\t\t\t}\n//\t\t\tannotations.get(instance).addAll(invAnns);\n\t\t\tnew JsonNerlaIO(true).writeNerlas(new File(\"data/annotations/invMTFIDF/\" + instance.getName()), invAnns);\n\t\t\tSet<DocumentLinkedAnnotation> trendAnns = new HashSet<>();\n\t\t\tfor (List<DocumentToken> sentence : instance.getDocument().getSentences()) {\n\t\t\t\ttrendAnns.addAll(trendExtractor.getTrendsForSentence(instance.getDocument(), sentence));\n\t\t\t}\n//\t\t\tannotations.get(instance).addAll(trendAnns);\n\t\t\tnew JsonNerlaIO(true).writeNerlas(new File(\"data/annotations/trendTFIDF/\" + instance.getName()), trendAnns);\n//\t\t\tSystem.out.println(\"SIZE = \" + annotations.get(instance).size());\n\t\t}\n\n//\t\treturn annotations;\n\n\t}",
"private Path initFolder(String folder) throws IOException {\n return Files.createDirectory(Paths.get(uploadFolder + \"/\" + folder));\n }",
"public String getFolderId() {\r\n return folderId;\r\n }",
"private void makeIDconverter(String fName) throws IOException{\n TextFile gte = new TextFile(fName, false);\n IDconverter = gte.readAsHashMap(1, 0);\n gte.close();\n }",
"public void getVector() throws IOException {\n\t\tint i=1;\r\n\t\tfor(String key:keyword){\r\n\t\t\tWord w=new Word();\r\n\t\t\tdouble tf=calTF(key);\r\n\t\t\tdouble idf=calIDF(key);\r\n\t\t\tdouble tfidf=tf*idf;\r\n\t\t\tw.setId(i);\r\n\t\t\ti++;\r\n\t\t\tw.setName(key);\r\n\t\t\tw.setTfidf(tfidf);\r\n\t\t\tif(word.containsKey(key)){\r\n\t\t\t\tw.setCount((Integer) word.get(key));\r\n\t\t\t}\r\n\t\t\tkeymap.add(w);\r\n\t\t}\r\n\t\tFileHelper.writeTrainFile(keymap);\r\n\t\tFileHelper.writeTestFile(keymap);\r\n\t}",
"@Nullable\n private static Map<Integer, String> readNwsoSubCenter(String path) {\n Map<Integer, String> result = new HashMap<>();\n\n try (InputStream is = GribResourceReader.getInputStream(path);\n BufferedReader br = new BufferedReader(new InputStreamReader(is, StandardCharsets.UTF_8))) {\n while (true) {\n String line = br.readLine();\n if (line == null) {\n break;\n }\n if ((line.isEmpty()) || line.startsWith(\"#\")) {\n continue;\n }\n\n StringBuilder lineb = new StringBuilder(line);\n StringUtil2.removeAll(lineb, \"'+,/\");\n String[] flds = lineb.toString().split(\"[:]\");\n\n int val = Integer.parseInt(flds[0].trim()); // must have a number\n String name = flds[1].trim() + \": \" + flds[2].trim();\n\n result.put(val, name);\n }\n return Collections.unmodifiableMap(result); // all at once - thread safe\n\n } catch (IOException ioError) {\n logger.warn(\"An error occurred in Grib1Tables while trying to open the table \" + path + \" : \" + ioError);\n return null;\n }\n }",
"public String getFolderId() {\n return folderId;\n }",
"@DISPID(1610743810) //= 0x60020002. The runtime will prefer the VTID if present\r\n @VTID(9)\r\n uic.prominent.ScreenLogging.wsh.Folder folder();",
"public static void pageRankmain() {\n\t\t\t\n\t\t\tstopWordStore();\n\t\t\t//File[] file_read= dir.listFiles();\n\t\t\t//textProcessor(file_read);// Will be called from LinkCrawler\n\t\t\t//queryProcess();\n\t\t\t//System.out.println(\"docsave \"+ docsave);\n\t\t\t/*for ( Map.Entry<String, ArrayList<String>> entry : docsave.entrySet()) {\n\t\t\t String key = entry.getKey();\n\t\t\t List<String> values = entry.getValue();\n\t\t\t System.out.print(\"Key = \" + key);\n\t\t\t System.out.println(\" , Values = \"+ values);\n\t\t\t}*/\n\t\t\t//########## RESPOINSIBLE FOR CREATING INVERTED INDEX OF TERMS ##########\n\t\t\tfor(int i=0;i<vocabulary.size();i++) {\n\t\t\t\tint count=1;\n\t\t\t\tMap<String, Integer> nestMap = new HashMap<String, Integer>();\n\t\t\t\tfor ( Map.Entry<String, ArrayList<String>> entry : docsave.entrySet()) {\n\t\t\t\t String keyMain = entry.getKey();\n\t\t\t\t List<String> values = entry.getValue();\n\t\t\t\t if(values.contains(vocabulary.get(i)))\n\t\t\t\t \t{\n\t\t\t\t \tentryDf.put(vocabulary.get(i), count);//entryDf stores documents frequency of vocabulary word \\\\it increase the count value for specific key\n\t\t\t\t \tcount++;\n\t\t\t\t \t}\n\t\t\t\t \n\t\t\t\t nestMap.put(keyMain, Collections.frequency(values,vocabulary.get(i)));\n\t\t\t \t\n\t\t\t \t//System.out.println(\"VOC \"+ vocabulary.get(i)+ \" KeyMain \" +keyMain+ \" \"+ Collections.frequency(values,vocabulary.get(i)));\n\t\t\t\t\t}\n\t\t\t\t\ttfList.put(vocabulary.get(i), nestMap);\n\t\t\t}\n\t\t\t//########## RESPOINSIBLE FOR CREATING A MAP \"storeIdf\" TO STORE IDF VALUES OF TERMS ##########\n\t\t\tfor ( Map.Entry<String, Integer> endf : entryDf.entrySet()) {\n\t\t\t\tString keydf = endf.getKey();\n\t\t\t\tint valdf = endf.getValue();\n\t\t\t\t//System.out.print(\"Key = \" + \"'\"+keydf+ \"'\");\n\t\t\t //System.out.print(\" , Values = \"+ valdf);\n\t\t\t double Hudai = (double) (docsave.size())/valdf;\n\t\t\t //System.out.println(\"docsave size \"+docsave.size()+ \" valdf \"+ valdf + \" Hudai \"+ Hudai+ \" log Value1 \"+ Math.log(Hudai)+ \" log Value2 \"+ Math.log(2));\n\t\t\t double idf= Math.log(Hudai)/Math.log(2);\n\t\t\t storeIdf.put(keydf, idf);\n\t\t\t //System.out.print(\" idf-> \"+ idf);\n\t\t\t //System.out.println();\n\t\t\t} \n\t\t\t\n\t\t\t//############ Just for Printing ##########NO WORK HERE########\n\t\t\tfor (Map.Entry<String, Map<String, Integer>> tokTf : tfList.entrySet()) {\n\t\t\t\tString keyTf = tokTf.getKey();\n\t\t\t\tMap<String, Integer> valTF = tokTf.getValue();\n\t\t\t\tSystem.out.println(\"Inverted Indexing by Key Word = \" + \"'\"+keyTf+ \"'\");\n\t\t\t\tfor (Map.Entry<String, Integer> nesTf : valTF.entrySet()) {\n\t\t\t\t\tString keyTF = nesTf.getKey();\n\t\t\t\t\tInteger valTf = nesTf.getValue();\n\t\t\t\t\tSystem.out.print(\" Document Consists This Key Word = \" + \"'\"+ keyTF+ \"'\");\n\t\t\t\t\tSystem.out.println(\" , Term Frequencies in This Doc = \"+ valTf);\n\t\t\t\t} \n\t\t\t}\n\t\t\t//########### FOR CALCULATING DOCUMENT LENTH #############//\n\t\t\tfor ( Map.Entry<String, ArrayList<String>> entry_new : docsave.entrySet()) // Iterating Number of Documents\n\t\t\t{\n\t\t\t\tString keyMain_new = entry_new.getKey();\n\t\t\t\t//int countStop=0;\n\t\t\t\tdouble sum=0;\n\t\t\t\t for(Map.Entry<String, Map<String, Integer>> tokTf_new : tfList.entrySet()) // Iterating through the vocabulary\n\t\t\t\t { \n\t\t\t\t\t Map<String, Integer> valTF_new = tokTf_new.getValue();\n\t\t\t\t\t for (Map.Entry<String, Integer> nesTf_new : valTF_new.entrySet()) // Iterating Through the Documents\n\t\t\t\t\t {\n\t\t\t\t\t\t if(keyMain_new.equals(nesTf_new.getKey())) // Only doc name EQUAL with docsave name can enter here\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t double val = nesTf_new.getValue()* (Double) storeIdf.get(tokTf_new.getKey());\n\t\t\t\t\t\t\t sum = sum+ Math.pow(val, 2);\n\t\t\t\t\t\t }\n\t\t\t\t\t }\n\t\t\t\t\t \n\t\t\t\t\t //countStop++;\n\t\t\t\t }\n\t\t\t\t docLength.put(keyMain_new, Math.sqrt(sum));\n\t\t\t\t sum=0;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tSystem.out.println(\"Document Length \"+ docLength);\n\t\t\t//System.out.println(\"tfList \"+tfList);\n\t\t\t\n\t\t\t //########### FOR CALCULATING QUERY LENTH #############///\n\t\t\t\tdouble qrySum=0;\n\t\t\t\t for(String qryTerm: queryList) // Iterating through the vocabulary\n\t\t\t\t {\n\t\t\t\t\t//entryQf.put(qryTerm, Collections.frequency(queryList,qryTerm));// VUl ase\n\t\t\t\t\t \n\t\t\t\t\t\t if(storeIdf.get(qryTerm) != null) \n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t entryQf.put(qryTerm, Collections.frequency(queryList,qryTerm));\n\t\t\t\t\t\t\t double val = entryQf.get(qryTerm)* (Double) storeIdf.get(qryTerm);\n\t\t\t\t\t\t\t qrySum = qrySum+ Math.pow(val, 2);\n\t\t\t\t\t\t }\n\t\t\t\t\t System.out.println(qryTerm+\" \"+entryQf.get(qryTerm)+ \" \"+ (Double) storeIdf.get(qryTerm));\n\t\t\t\t }\n\t\t\t\t qrySum=Math.sqrt(qrySum);\n\t\t\t\t System.out.println(\"qrySum \" + qrySum);\n\t\t\t\t \n\t\t\t\t//########### FOR CALCULATING COSINE SIMILARITY #############///\n\t\t\t\t for ( Map.Entry<String, ArrayList<String>> entry_dotP : docsave.entrySet()) // Iterating Number of Documents\n\t\t\t\t\t{\n\t\t\t\t\t\tdouble sumProduct=0;\n\t\t\t\t\t\tdouble productTfIdf=0;\n\t\t\t\t\t\tString keyMain_new = entry_dotP.getKey(); //Geting Doc Name\n\t\t\t\t\t\t for(Map.Entry<String, Integer> qryTermItr : entryQf.entrySet()) // Iterating through the vocabulary\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t Map<String, Integer> matchTerm = tfList.get(qryTermItr.getKey()); // Getting a map of doc Names by a Query Term as value of tfList\n\n\t\t\t\t\t\t\t\t if(matchTerm.containsKey(keyMain_new)) // Only doc name EQUAL with docsave name can enter here\n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t //System.out.println(\"Test \"+ matchTerm.get(keyMain_new) +\" keyMain_new \" + keyMain_new);\n\t\t\t\t\t\t\t\t\t double docTfIdf= matchTerm.get(keyMain_new) * storeIdf.get(qryTermItr.getKey());\n\t\t\t\t\t\t\t\t\t double qryTfIdf= qryTermItr.getValue() * storeIdf.get(qryTermItr.getKey());\n\t\t\t\t\t\t\t\t\t productTfIdf = docTfIdf * qryTfIdf;\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t sumProduct= sumProduct+productTfIdf;\n\t\t\t\t\t\t\t //System.out.println(\"productTfIdf \"+productTfIdf+\" sumProduct \"+ sumProduct);\n\t\t\t\t\t\t\t productTfIdf=0;\n\t\t\t\t\t\t }\n\t\t\t\t\t\t cosineProd.put(entry_dotP.getKey(), sumProduct/(docLength.get(entry_dotP.getKey())*qrySum));\n\t\t\t\t\t\t sumProduct=0;\n\t\t\t\t\t\t //System.out.println(entry_dotP.getKey()+ \" \" + docLength.get(entry_dotP.getKey()));\n\t\t\t\t\t}\n\t\t\t\t System.out.println(\"cosineProd \"+ cosineProd);\n\t\t\t\t \n\t\t\t\t System.out.println(\"Number of Top Pages you want to see\");\n\t\t\t\t int topRank = Integer.parseInt(scan.nextLine());\n\t\t\t\t Map<String, Double> result = cosineProd.entrySet().stream()\n\t\t\t .sorted(Map.Entry.comparingByValue(Comparator.reverseOrder())).limit(topRank)\n\t\t\t .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue,\n\t\t\t (oldValue, newValue) -> oldValue, LinkedHashMap::new));\n\n\t\t\t\t scan.close();\n\t\t\t //Alternative way\n\t\t\t //Map<String, Double> result2 = new LinkedHashMap<>();\n\t\t\t //cosineProd.entrySet().stream().sorted(Map.Entry.<String, Double>comparingByValue().reversed()).limit(2).forEachOrdered(x -> result2.put(x.getKey(), x.getValue()));\n\n\t\t\t System.out.println(\"Sorted...\");\n\t\t\t System.out.println(result);\n\t\t\t //System.out.println(result2);\n\t}",
"private void processNewData(Map<Integer, ArrayList<String>> data, ArrayList<String> folderName) throws IOException {\n for(int x=0; x<folderName.size();x++) {\n if(Arrays.asList(this.getListOfFileInArray()).contains(folderName.get(x))) {\n this.problemSolve(folderName.get(x), data.get(x*2), data.get(x*2+1)); \n } else {\n this.addData(folderName.get(x), data.get(x*2), data.get(x*2+1));\n }\n }\n }",
"private FileIDDictionary() {\n }",
"private Map<String, Object> analysisMap(ArrayList<String> data) {\n Map<String, Object> map = new HashMap<>();\n map.put(DAILY, data);\n return map;\n }",
"public static String getFolderType(String dir) {\n\t\treturn FOLDERTYPES.get(dir);\n\t}",
"private void buildFreqMap() {\n\t\toriginalFreq = new HashMap<String, WordOccurence>();\n\n\t\tfor (ListIterator<Caption> itr = original.captionIterator(0); itr\n\t\t\t\t.hasNext();) {\n\t\t\tfinal Caption currentCap = itr.next();\n\t\t\tfinal String[] words = currentCap.getCaption().split(\"\\\\s+\");\n\t\t\tfor (int i = 0; i < words.length; i++) {\n\t\t\t\tfinal String lowerCasedWord = words[i].toLowerCase();\n\t\t\t\tif (originalFreq.containsKey(lowerCasedWord)) {\n\t\t\t\t\toriginalFreq.get(lowerCasedWord).addOccurence(\n\t\t\t\t\t\t\t(int) currentCap.getTime());\n\t\t\t\t} else {\n\t\t\t\t\tfinal WordOccurence occ = new WordOccurence(\n\t\t\t\t\t\t\t(int) currentCap.getTime());\n\t\t\t\t\toriginalFreq.put(lowerCasedWord, occ);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (int i = 0; i < identified.size(); i++) {\n\t\t\tResultChunk curretResult = identified.get(i);\n\t\t\tfinal String[] words = curretResult.getDetectedString().split(\n\t\t\t\t\t\"\\\\s+\");\n\t\t\tint identifiedAt = curretResult.getDetectedAt();\n\t\t\tfor (int j = 0; j < words.length; j++) {\n\t\t\t\tString currentWord = words[j].toLowerCase();\n\t\t\t\tif (originalFreq.containsKey(currentWord)) {\n\t\t\t\t\tint detectedAt = (int) (identifiedAt - (words.length - j)\n\t\t\t\t\t\t\t* AVG_WORD_TIME);\n\t\t\t\t\toriginalFreq.get(currentWord).addVoiceDetection(detectedAt);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public static void createTempMapsetName() {\r\n UUID id;\r\n String tmpPrefix;\r\n String tmpSuffix;\r\n String tmpBase;\r\n String tmpFolder;\r\n\r\n id = UUID.randomUUID();\r\n tmpPrefix = new String(GrassUtils.TEMP_PREFIX);\r\n tmpSuffix = new String(\"_\" + id);\r\n tmpBase = new String(System.getProperty(\"java.io.tmpdir\"));\r\n if (tmpBase.endsWith(File.separator)) {\r\n tmpFolder = new String(tmpBase + tmpPrefix + tmpSuffix.replace('-', '_') + File.separator + \"user\");\r\n }\r\n else {\r\n tmpFolder = new String(tmpBase + File.separator + tmpPrefix + tmpSuffix.replace('-', '_') + File.separator + \"user\");\r\n }\r\n m_sGrassTempMapsetFolder = tmpFolder;\r\n\r\n }",
"private Map<String,Map<String,List<String>>> buildDictionary(Document doc){\n\t\t\n\t\tElement root = doc.getDocumentElement();\n\t\t\n\t\t\n\t\tMap<String,Map<String,List<String>>> dictionary = new HashMap<String,Map<String,List<String>>>();\n\t\tthis.termSet = new TreeSet<String>();\n\t\t\n\t\tNodeList termList = doc.getElementsByTagName(\"term\");\n\t\tfor(int i = 0; i < termList.getLength(); i++){\n\t\t\tElement termElement = (Element) termList.item(i);\n\t\t\tElement nameElement = (Element) termElement.getElementsByTagName(\"name\").item(0);\n\t\t\tString name = nameElement.getTextContent();\n\t\t\tthis.termSet.add(name);\n\n\t\t\tMap<String,List<String>> synonymGroup = new HashMap<String,List<String>>();\n\t\t\tsynonymGroup.put(\"exact\", new ArrayList<String>());\n\t\t\tsynonymGroup.put(\"related\", new ArrayList<String>());\n\t\t\tsynonymGroup.put(\"broad\", new ArrayList<String>());\n\t\t\tsynonymGroup.put(\"narrow\", new ArrayList<String>());\n\t\t\t\n\t\t\tNodeList synonyms = termElement.getElementsByTagName(\"synonym\");\n\t\t\tfor(int j=0; j<synonyms.getLength(); j++){\n\t\t\t\tElement synonymElement = (Element) synonyms.item(j);\n\t\t\t\tString synonym = synonymElement.getTextContent();\n\t\t\t\tString scope = synonymElement.getAttribute(\"scope\");\n\t\t\t\t//System.out.println(scope);\n\t\t\t\tList<String> synonymList = (List<String>) synonymGroup.get(scope);\n\t\t\t\t\n\t\t\t\t//System.out.println(synonym);\n\t\t\t\t\n\t\t\t\tsynonymList.add(synonym);\n\t\t\t}\n\t\t\t\n\t\t\tdictionary.put(name,synonymGroup);\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\treturn dictionary;\n\t}",
"private static Map<String, String> organizeTransducer () {\n Map<String, String> properTransducerName = new HashMap<String, String>();\n\n properTransducerName.put(\"TEMP\", \"temperature\");\n properTransducerName.put(\"LIGHT\", \"light\");\n properTransducerName.put(\"HUMI\", \"humidity\");\n properTransducerName.put(\"PRES\", \"pressure\");\n properTransducerName.put(\"VBAT\", \"voltage\");\n properTransducerName.put(\"DOOR\", \"door\");\n properTransducerName.put(\"RSSI\", \"RSSI\");\n\n return properTransducerName;\n }",
"public static HashMap<String, IRI> processCSVGoTHash(String path) throws FileNotFoundException {\n BufferedReader in = null;\n in = new java.io.BufferedReader(new java.io.FileReader(path));\n String currentLine;\n int lineN = 0;\n String value=\"\";\n String term=\"\";\n HashMap<String, IRI> got = new HashMap<String, IRI>();\n try {\n while ((currentLine = in.readLine()) != null) {\n if (lineN == 0) {\n lineN++; //get rid of the headers\n } else {\n //process each vocab\n String[] info = currentLine.split(\";\");\n if(info.length==2) {\n value = info[0];\n term = info[1];\n }\n got.put(value, IRI.create(term));\n\n }\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n try {\n in.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return got ;\n }",
"public static Map<Byte, String> genTypeToNameMap(){\n byte[] types = genAllTypes();\n String[] names = genAllTypeNames();\n Map<Byte,String> ret = new HashMap<Byte, String>();\n for(int i=0;i<types.length;i++){\n ret.put(types[i], names[i]);\n }\n return ret;\n }",
"@PreAuthorize(\"hasAuthority('file:write')\")\n @PostMapping(\"/newDirectory\")\n public String createNewDirectory(@RequestParam(\"folderName\") String folderName,\n HttpSession httpSession,\n RedirectAttributes redirectAttributes) {\n String currentDirectory = httpSession.getAttribute(\"currentFolderPath\").toString();\n\n //create New directory from the request\n storageService.createNewDirectory(currentDirectory + File.separator + folderName);\n\n redirectAttributes.addFlashAttribute(\"message\",\n \"New directory created\");\n\n return \"redirect:/\";\n }",
"private Map rdf2map(RdfRDF rdf) {\n \n \t\tHashMap map = new HashMap();\n \t\tRdfDescription dc = (RdfDescription) rdf.getDescription().get(0);\n \n \t\tIterator it = dc.getDcmes().iterator();\n \t\twhile (it.hasNext()) {\n \t\t\tObject entry = it.next();\n \t\t\t// This is a hack: extract label from class name\n \t\t\tString className = entry.getClass().toString();\n \t\t\tString[] parts = className.split(\"\\\\.\");\n \t\t\tparts = parts[parts.length - 1].split(\"Impl\");\n \n \t\t\tfinal String label = parts[0];\n \t\t\tif (label.startsWith(\"Date\")) {\n \t\t\t\tmap.put(label, ((Date) entry).getContent().get(0).toString());\n \t\t\t} else if (label.startsWith(\"Title\")) {\n \t\t\t\tTitle title = (Title) entry;\n \t\t\t\tmap.put(label, title.getContent().get(0).toString());\n \t\t\t} else if (label.startsWith(\"Identifier\")) {\n \t\t\t\tmap.put(label, ((Identifier) entry).getContent().get(0)\n \t\t\t\t\t\t.toString());\n \t\t\t} else if (label.startsWith(\"Description\")) {\n \t\t\t\tmap.put(label, ((Description) entry).getContent().get(0)\n \t\t\t\t\t\t.toString());\n \t\t\t} else if (label.startsWith(\"Source\")) {\n \t\t\t\tmap.put(label, ((Source) entry).getContent().get(0).toString());\n \t\t\t} else if (label.startsWith(\"Type\")) {\n \t\t\t\tmap.put(label, ((Type) entry).getContent().get(0).toString());\n \t\t\t} else if (label.startsWith(\"Format\")) {\n \t\t\t\tmap.put(label, ((Format) entry).getContent().get(0).toString());\n \t\t\t} else {\n \t\t\t\t//\n \t\t\t}\n \n \t\t}\n \t\treturn map;\n \t}",
"private HashMap<String, double[]> readFeature(String featurePath, int currCount){\n HashMap<String, double[]> fList = new HashMap<>();\n try{\n FileReader fr = new FileReader(featurePath);\n BufferedReader br = new BufferedReader(fr);\n\n String line = br.readLine();\n while(line != null){\n\n String[] split = line.trim().split(\"\\t\");\n if (split.length < 2)\n continue;\n double[] fs = new double[split.length - 1];\n for (int i = 1; i < split.length; i ++){\n fs[i-1] = Double.valueOf(split[i]);\n }\n\n fList.put(split[0], fs);\n \n // Update ProgressBar\n SoundEffectDemo.s_progressBar.setValue(currCount);\n \t\tdouble currPercentage = ((double) currCount / ((double) s_numTrainingData * 4.0)) * 100.0;\n \t\tSoundEffectDemo.s_progressBar.setString(String.format(\"%.2f\", currPercentage) + \"%\");\n \t\tcurrCount++;\n \t\t\n line = br.readLine();\n }\n br.close();\n\n }catch (Exception e){\n e.printStackTrace();\n }\n\n return fList;\n }",
"public void setFolderId(long folderId) {\n\t\tthis.folderId = folderId;\n\t}",
"private static ArrayList<String> ReadTrigramsChar(String corpusPath, String ngramPath) {\n Hashtable<String, Integer> oNgrams = new Hashtable<>();\n ArrayList<String> aNgrams = new ArrayList<>();\n\n if (new File(ngramPath).exists()) {\n FileReader fr = null;\n BufferedReader bf = null;\n\n try {\n fr = new FileReader(ngramPath);\n bf = new BufferedReader(fr);\n String sCadena = \"\";\n\n while ((sCadena = bf.readLine())!=null)\n {\n String []data = sCadena.split(\":::\");\n if (data.length==2) {\n String sTerm = data[0];\n aNgrams.add(sTerm);\n }\n }\n } catch (Exception ex) {\n System.out.println(ex.toString());\n } finally {\n if (bf!=null) { try { bf.close(); } catch (Exception k) {} }\n if (fr!=null) { try { fr.close(); } catch (Exception k) {} }\n }\n } else {\n ArrayList<File> files = getFilesFromSubfolders(corpusPath, new ArrayList<File>());\n //File directory = new File(corpusPath);\n //File []files = directory.listFiles();\n\n int countFiles = 0;\n for (File file : files) {\n System.out.println(\"--> Preprocessing \" + (++countFiles) + \"/\" + files.size());\n\n try {\n Scanner scn = new Scanner(file, \"UTF-8\");\n\n //Reading and Parsing Strings to Json\n while(scn.hasNext()){\n JSONObject tweet= (JSONObject) new JSONParser().parse(scn.nextLine());\n\n String textTweet = (String) tweet.get(\"text\");\n\n StringReader reader = new StringReader(textTweet);\n\n NGramTokenizer gramTokenizer = new NGramTokenizer(reader, MINSIZENGRAM, MAXSIZENGRAM);\n CharTermAttribute charTermAttribute = gramTokenizer.addAttribute(CharTermAttribute.class);\n gramTokenizer.reset();\n\n while (gramTokenizer.incrementToken()){\n String sTerm = charTermAttribute.toString();\n if (sTerm.endsWith(\":\")){\n sTerm = sTerm.substring(0, sTerm.length()-1);\n }\n int iFreq = 0;\n if (oNgrams.containsKey(sTerm)) {\n iFreq = oNgrams.get(sTerm);\n }\n oNgrams.put(sTerm, ++iFreq);\n //System.out.println(charTermAttribute.toString());\n }\n\n gramTokenizer.end();\n gramTokenizer.close();\n }\n } catch (Exception ex) {\n System.out.println(\"Error reading JSON file\");\n }\n }\n\n //Se ordena por frecuencia\n ValueComparator bvc = new ValueComparator(oNgrams);\n TreeMap<String,Integer> sorted_map = new TreeMap<>(bvc);\n sorted_map.putAll(oNgrams);\n\n //Se guarda en disco\n FileWriter fw = null;\n try {\n fw = new FileWriter(ngramPath);\n for( Iterator it = sorted_map.keySet().iterator(); it.hasNext();) {\n String sTerm = (String)it.next();\n int iFreq = oNgrams.get(sTerm);\n\n aNgrams.add(sTerm);\n fw.write(sTerm + \":::\" + iFreq + \"\\n\");\n fw.flush();\n }\n } catch (Exception ex) {\n System.out.println(\"ERROR: \" + ex.toString());\n } finally {\n if (fw!=null) { try {fw.close();} catch(Exception k) {} }\n }\n }\n\n return aNgrams;\n }",
"protected DataPackage createFolderAndDocument(Map<Object, Object> document,\tList<String> folders, Map<Object, Object> metadatas, String ext)\r\n\t\t\tthrows Exception {\r\n\r\n\t\tObjectIdentity objIdentity = new ObjectIdentity(REPOSITORY_NAME);\r\n\r\n\t\tDataPackage dataPackage = new DataPackage();\r\n\r\n\t\ttry {\r\n\r\n\t\t\tStringBuilder sPath = new StringBuilder();\r\n\r\n\t\t\tsPath.append(BAR_FOLDER);\r\n\r\n\t\t\tsPath.append(CABINET);\r\n\r\n\t\t\t// sPath.append(BAR_FOLDER);\r\n\r\n\t\t\t// sPath.append(FOLDER_LEVEL_2);\r\n\r\n\t\t\tString path = sPath.toString();\r\n\r\n\t\t\tDataObject folderObject = null;\r\n\r\n\t\t\tfor (String folder : folders) {\r\n\r\n\t\t\t\tpath = path.concat(BAR_FOLDER + folder);\r\n\r\n\t\t\t\tStringBuilder sb = new StringBuilder();\r\n\r\n\t\t\t\tsb.append(String.format(DQL_SELECT_FOLDER, path));\r\n\r\n\t\t\t\tString dqlSelectFolder = sb.toString();\r\n\r\n\t\t\t\tList<DataObject> dataObjectFolder = getDataObjectsByDql(dqlSelectFolder);\r\n\r\n\t\t\t\tif (dataObjectFolder.size() == 0) {\r\n\r\n\t\t\t\t\tString containnerPath = path;\r\n\r\n\t\t\t\t\tcontainnerPath = containnerPath.replace(\r\n\t\t\t\t\t\t\tBAR_FOLDER + folder, EMPTY);\r\n\r\n\t\t\t\t\tString dqlCreateFolder = String.format(DQL_CREATE_FOLDER,\r\n\t\t\t\t\t\t\tfolder, containnerPath);\r\n\r\n\t\t\t\t\tInteger returnCreateFolder = executeQuery(dqlCreateFolder);\r\n\r\n\t\t\t\t\tif (returnCreateFolder == 1) {\r\n\r\n\t\t\t\t\t\tdataObjectFolder = getDataObjectsByDql(dqlSelectFolder);\r\n\r\n\t\t\t\t\t\tfolderObject = dataObjectFolder.get(0);\r\n\r\n\t\t\t\t\t} else {\r\n\r\n\t\t\t\t\t\tthrow new Exception(String.format(ERROR_CREATE_FOLDER,\r\n\t\t\t\t\t\t\t\tfolder, containnerPath));\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t\tfolderObject = dataObjectFolder.get(0);\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\tDataObject docDataObj = null;\r\n\r\n\t\t\tif (document.containsKey(CHAVE_TIPO_DOCUMENTAL)) {\r\n\r\n\t\t\t\tdocDataObj = new DataObject(objIdentity,\r\n\t\t\t\t\t\tString.valueOf(document.get(CHAVE_TIPO_DOCUMENTAL)));\r\n\r\n\t\t\t} else {\r\n\r\n\t\t\t\tthrow new Exception(String.format(ERROR_MISSING_KEY_MAP,\r\n\t\t\t\t\t\tCHAVE_TIPO_DOCUMENTAL));\r\n\r\n\t\t\t}\r\n\r\n\t\t\tPropertySet properties = new PropertySet();\r\n\r\n\t\t\tif (document.containsKey(CHAVE_ARQUIVO)) {\r\n\r\n\t\t\t\tproperties.set(TITLE,\r\n\t\t\t\t\t\t((File) document.get(CHAVE_ARQUIVO)).getName());\r\n\r\n\t\t\t} else {\r\n\r\n\t\t\t\tthrow new Exception(String.format(ERROR_MISSING_KEY_MAP,\r\n\t\t\t\t\t\tCHAVE_ARQUIVO));\r\n\r\n\t\t\t}\r\n\r\n\t\t\t// properties.set(A_CONTENT_TYPE, ext);\r\n\r\n\t\t\tif (null != metadatas && metadatas.size() > 0) {\r\n\r\n\t\t\t\tfor (Entry<Object, Object> metadata : metadatas.entrySet()) {\r\n\r\n\t\t\t\t\tlogger.info(INFO_CREATE_METADATA\r\n\t\t\t\t\t\t\t.concat(String.valueOf(metadata.getKey()))\r\n\t\t\t\t\t\t\t.concat(SPACE).concat(UNDERSCORE).concat(SPACE)\r\n\t\t\t\t\t\t\t.concat(String.valueOf(metadata.getValue())));\r\n\r\n\t\t\t\t\tproperties.set(String.valueOf(metadata.getKey()),\r\n\t\t\t\t\t\t\tmetadata.getValue());\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\tdocDataObj.setProperties(properties);\r\n\r\n\t\t\tdocDataObj.getContents().add(\r\n\t\t\t\t\tnew FileContent(((File) document.get(CHAVE_ARQUIVO))\r\n\t\t\t\t\t\t\t.getAbsolutePath(), PDF));\r\n\r\n\t\t\tObjectRelationship objRelationship = new ObjectRelationship();\r\n\r\n\t\t\tobjRelationship.setTarget(folderObject);\r\n\r\n\t\t\tobjRelationship.setName(Relationship.RELATIONSHIP_FOLDER);\r\n\r\n\t\t\tobjRelationship.setTargetRole(Relationship.ROLE_PARENT);\r\n\r\n\t\t\tdocDataObj.getRelationships().add(\r\n\t\t\t\t\tnew ObjectRelationship(objRelationship));\r\n\r\n\t\t\tdataPackage.addDataObject(docDataObj);\r\n\r\n\t\t\tRelationshipProfile relationProfile = new RelationshipProfile();\r\n\r\n\t\t\trelationProfile.setResultDataMode(ResultDataMode.REFERENCE);\r\n\r\n\t\t\trelationProfile.setTargetRoleFilter(TargetRoleFilter.ANY);\r\n\r\n\t\t\trelationProfile.setNameFilter(RelationshipNameFilter.ANY);\r\n\r\n\t\t\trelationProfile.setDepthFilter(DepthFilter.SPECIFIED);\r\n\r\n\t\t\trelationProfile.setDepth(2);\r\n\r\n\t\t\tOperationOptions operationOptions = new OperationOptions();\r\n\r\n\t\t\toperationOptions.setRelationshipProfile(relationProfile);\r\n\r\n\t\t\tString fileName = null;\r\n\r\n\t\t\tif (document.containsKey(CHAVE_NOME_ARQUIVO)) {\r\n\r\n\t\t\t\tfileName = (String) document.get(CHAVE_NOME_ARQUIVO);\r\n\r\n\t\t\t\tproperties.set(OBJECT_NAME, fileName);\r\n\r\n\t\t\t} else {\r\n\r\n\t\t\t\tthrow new Exception(String.format(ERROR_MISSING_KEY_MAP,\r\n\t\t\t\t\t\tCHAVE_NOME_ARQUIVO));\r\n\r\n\t\t\t}\r\n\r\n\t\t\tlogger.info(INFO_INICIACAO_OPERACAO);\r\n\r\n\t\t\tdataPackage = this.objectService.create(dataPackage,\r\n\t\t\t\t\toperationOptions);\r\n\r\n\t\t\tlogger.info(INFO_CREATED_FILE_EMC.concat(fileName));\r\n\r\n\t\t} catch (CoreServiceException e) {\r\n\r\n\t\t\tlogger.error(ERROR_REPOSITORIO_EMC.concat(e.getLocalizedMessage()));\r\n\r\n\t\t} catch (ServiceException e) {\r\n\r\n\t\t\tlogger.error(ERROR_SERVICO_EMC.concat(e.getLocalizedMessage()));\r\n\r\n\t\t}\r\n\r\n\t\treturn dataPackage;\r\n\t}",
"private void populateDictionary() {\n Scanner scanner = null;\n try {\n scanner = new Scanner(new FileInputStream(filePath));\n while(scanner.hasNextLine()) {\n String word = scanner.nextLine();\n rwDictionary.put(reducedWord(word), word);\n lcDictionary.put(word.toLowerCase(), word);\n }\n } catch(IOException e) {\n System.err.println(e.toString());\n e.printStackTrace();\n } finally {\n if(scanner != null) {\n scanner.close();\n }\n }\n }",
"private void getDictionary(){\r\n // TODO: read Dictionary\r\n try{\r\n lstDictionary.clear();\r\n for(int i = 0; i < IConfig.LABEL_COUNT; i++){\r\n lstDictionary.add(new HashMap<>());\r\n DictionaryReader dictionaryReader = new DictionaryReader(lstDictionary.get(i), IConfig.DICTIONARY_URL[i]);\r\n dictionaryReader.read();\r\n }\r\n }catch (Exception e){\r\n e.printStackTrace();\r\n }\r\n }",
"private VariableMap getParamMappingAsVariableMap() {\n paramValueEncodings.put(fileNameToIndex.keySet().toString(), \" FileNames\");\n paramValueEncodings.put(functionNameToIndex.keySet().toString(), \" FunctionNames\");\n paramValueEncodings.put(typeToIndex.keySet().toString(), \" Types\");\n\n VariableMap preInversedMap = new VariableMap(paramValueEncodings);\n ImmutableMap<String, String> inversedMap = preInversedMap.getNewNameToOriginalNameMap();\n return new VariableMap(inversedMap);\n }",
"NodeRef getSearchTermsFolder();",
"private void initIDF2Map(List<Map<String, List<Double>>> mapPerGestureFile) {\n\t\tMap<String,Double> idf2PerDocument = new HashMap<String, Double>(); // per univariate series\n\t\t\n\t\tfor (int i = 0; i < mapPerGestureFile.size(); i++) {\n\t\t\tMap<String,List<Double>> tmpMap = mapPerGestureFile.get(i);\n\t\t\tIterator<Entry<String, List<Double>>> iterator = tmpMap.entrySet().iterator();\n\t\t\twhile(iterator.hasNext()) {\n\t\t\t\tMap.Entry<String, List<Double>> pairs = (Entry<String, List<Double>>) iterator.next();\n\t\t\t\tif(idf2PerDocument.containsKey(pairs.getKey()))\n\t\t\t\t\t\tidf2PerDocument.put(pairs.getKey(), idf2PerDocument.get(pairs.getKey())+1.0); \n\t\t\t\telse\n\t\t\t\t\t\tidf2PerDocument.put(pairs.getKey(), 1.0);\n\t\t\t}\n\t\t}\n\t\tgetTfMapArrayIDF2().add(idf2PerDocument);\n\t}",
"private static Map<String, FeatureType> buildAvailableFeatureMap(List<FeatureType> features){\r\n\t\tMap<String, FeatureType> featureMap = new HashMap<String, FeatureType>();\r\n\t\tfor(FeatureType feature : features){\r\n\t\t\tfeatureMap.put(feature.getExternalId(), feature);\r\n\t\t}\r\n\t\treturn featureMap;\r\n\t}",
"@Override\n public Map<String, Integer> getFeatures(List<String> objects) {\n\n HashMap<String, Integer> features = new HashMap<>();\n\n for (String cCategory : objects) {\n //Create feature name by add \n //language + the prefix boolean + the feature name to Lower Case + true/false\n String[] tmpSplit = cCategory.toLowerCase().split(\":\");\n String featureName = tmpSplit[0].trim();\n\n String featureTrue\n = language\n + \".boolean.\"\n + featureName\n + \".true\";\n\n String featureFalse\n = language\n + \".boolean.\"\n + featureName\n + \".false\";\n\n if (Boolean.parseBoolean(tmpSplit[1])) {\n //Add featureTrue ton Map with value 1\n features.put(featureTrue, 1);\n //Add featureFalse ton Map with value 1\n features.put(featureFalse, 0);\n } else {\n //Add featureTrue ton Map with value 1\n features.put(featureTrue, 0);\n //Add featureFalse ton Map with value 1\n features.put(featureFalse, 1);\n }\n }\n\n return features;\n }",
"public static void main(String[] args) throws IOException {\r\n\t\tString folderPath = \"F:\\\\2.true-false-timewindow\";\r\n\t\tfolderPath = \"f:\\\\Dropbox\\\\research\\\\2nd\\\\Experiments\\\\2013\\\\Precise4.0\\\\1.true-false-selectivity\";\r\n\t\tfolderPath = \"f:\\\\Dropbox\\\\research\\\\2nd\\\\Experiments\\\\2013\\\\Precise4.0\\\\2.true-false-timewindow\";\r\n\t\tfolderPath = \"F:\\\\Dropbox\\\\research\\\\2nd\\\\Experiments\\\\2013\\\\Precise4.0\\\\3.false-selectivity\";\r\n\t\tfolderPath = \"F:\\\\Dropbox\\\\research\\\\2nd\\\\Experiments\\\\2013\\\\Precise4.0\\\\4.false-timewindow\";\r\n\t\tfolderPath = \"F:\\\\Dropbox\\\\research\\\\2nd\\\\Experiments\\\\2013\\\\Precise4.0\\\\5.true-selectivity\";\r\n\t\tfolderPath = \"F:\\\\Dropbox\\\\research\\\\2nd\\\\Experiments\\\\2013\\\\Precise4.0\\\\6.true-timewindow\";\r\n\t\tfolderPath = \"F:\\\\Dropbox\\\\research\\\\2nd\\\\Experiments\\\\2013\\\\Precise4.0\\\\7.inconsistent-selectivity\";\r\n\t\tfolderPath = \"F:\\\\Dropbox\\\\research\\\\2nd\\\\Experiments\\\\2013\\\\Precise4.0\\\\8.inconsistent-timewindow\";\r\n\t\tfolderPath = \"F:\\\\Dropbox\\\\research\\\\2nd\\\\Experiments\\\\2013\\\\Imprecise\\\\1.true-false-selectivity\";\r\n\t\tfolderPath = \"F:\\\\Dropbox\\\\research\\\\2nd\\\\Experiments\\\\2013\\\\Imprecise\\\\3.true-false-uncertaintyinterval\";\r\n\t\tfolderPath = \"F:\\\\Dropbox\\\\research\\\\2nd\\\\Experiments\\\\2013\\\\Imprecise\\\\2.true-false-timewindow\";\r\n\t\t\r\n\t\tfolderPath = \"F:\\\\Dropbox\\\\research\\\\2nd\\\\Experiments\\\\2013\\\\Imprecise2.0\\\\a.1\";\r\n\t\tfolderPath = \"F:\\\\Dropbox\\\\research\\\\2nd\\\\Experiments\\\\2013\\\\imprecise3.0\\\\confidence\";\r\n\t\tfolderPath = \"F:\\\\Dropbox\\\\research\\\\2nd\\\\Experiments\\\\2013\\\\imprecise3.0\\\\true\";\r\n\t\tfolderPath = \"F:\\\\Dropbox\\\\research\\\\2nd\\\\Experiments\\\\2013\\\\imprecise3.0\\\\true-false\";\r\n\t\tfolderPath = \"F:\\\\Dropbox\\\\research\\\\2nd\\\\Experiments\\\\dpc\\\\half3\";\r\n\t\tfolderPath = \"F:\\\\Dropbox\\\\research\\\\2nd\\\\Experiments\\\\dpc\\\\half1\";\r\n\t\tfolderPath = \"F:\\\\Dropbox\\\\research\\\\2nd\\\\Experiments\\\\dpc\\\\half2\";\r\n\t\tfolderPath = \"F:\\\\Dropbox\\\\research\\\\2nd\\\\Experiments\\\\dpc\\\\obelix\\\\half5\";\t\t\r\n\t\tfolderPath = \"F:\\\\Dropbox\\\\research\\\\2nd\\\\Experiments\\\\dpc\\\\obelix\\\\half5-largerwindow\";\r\n\r\n\t\t\r\n\t\tfolderPath = \"F:\\\\Dropbox\\\\research\\\\2nd\\\\Experiments\\\\2013\\\\Precise4.0\\\\3.false-selectivity\";\r\n\t\tfolderPath = \"F:\\\\Dropbox\\\\research\\\\2nd\\\\Experiments\\\\2013\\\\Precise4.0\\\\4.false-timewindow\";\r\n\t\tfolderPath = \"F:\\\\Dropbox\\\\research\\\\2nd\\\\Experiments\\\\2013\\\\Precise4.0\\\\5.true-selectivity\";\r\n\t\tfolderPath = \"F:\\\\Dropbox\\\\research\\\\2nd\\\\Experiments\\\\2013\\\\Precise4.0\\\\6.true-timewindow\";\r\n\t\tfolderPath = \"F:\\\\Dropbox\\\\research\\\\2nd\\\\Experiments\\\\2013\\\\Precise4.0\\\\7.inconsistent-selectivity\";\r\n\t\tfolderPath = \"F:\\\\Dropbox\\\\research\\\\2nd\\\\Experiments\\\\2013\\\\Precise4.0\\\\8.inconsistent-timewindow\";\r\n\t\t\r\n\t\t\r\n\t\tGroupResultSet rSet = new GroupResultSet(folderPath);\r\n\t\trSet.printResults();\r\n\t\t//rSet.printAttribute(\"averageThroughput\");\r\n\t\trSet.printAttribute(\"Throughput\");\r\n\t\trSet.printAttribute(\"Number Of Runs Created\");\r\n\t\trSet.printAttribute(\"Time for compute confidence\");\r\n\t\trSet.printAttribute(\"Time on Create New Run Baseline\");\r\n\t\trSet.printAttribute(\"Time for sorting events in imprecise\");\r\n\t\trSet.printAttribute(\"Pattern matching time\");\r\n\t\trSet.printAttribute(\"Enumeration time\");\r\n\t\trSet.printAttribute(\"Time for compute confidence\");\r\n\t\trSet.printAttribute(\"Total Running Time\");\r\n\t\t\r\n\t}",
"void Create(){\n map = new TreeMap<>();\r\n\r\n // Now we split the words up using punction and spaces\r\n String wordArray[] = wordSource.split(\"[{ \\n\\r.,]}}?\");\r\n\r\n // Now we loop through the array\r\n for (String wordArray1 : wordArray) {\r\n String key = wordArray1.toLowerCase();\r\n // If this word is not present in the map then add it\r\n // and set the word count to 1\r\n if (key.length() > 0){\r\n if (!map.containsKey(map)){\r\n map.put(key, 1);\r\n }\r\n else {\r\n int wordCount = map.get(key);\r\n wordCount++;\r\n map.put(key, wordCount);\r\n }\r\n }\r\n } // end of for loop\r\n \r\n // Get all entries into a set\r\n // I think that before this we just have key-value pairs\r\n entrySet = map.entrySet();\r\n \r\n }",
"public static Map<String, Byte> genNameToTypeMap(){\n byte[] types = genAllTypes();\n String[] names = genAllTypeNames();\n Map<String, Byte> ret = new HashMap<String, Byte>();\n for(int i=0;i<types.length;i++){\n ret.put(names[i], types[i]);\n }\n return ret;\n }",
"@InputFiles\n @Incremental\n @PathSensitive(PathSensitivity.RELATIVE)\n public abstract ConfigurableFileCollection getFeatureDexFolder();",
"private Map<Integer, Integer> buildRenaming() {\n\t\tMap<Integer, Integer> map = new HashMap<>();\n\n\t\tfor(int i = 0; i < this.dimension; i++){\n\t\t\tfor(int j = 0; j < this.dimension; j++)\n\t\t\t\tmap.put(board_p[i][j].var(), board[i][j].var());\n\t\t}\n\n\t\treturn map;\n\t}",
"public static Hashtable<String, ArrayList<String>> createClassTable() {\n\t\tResourceHandler resourceHandler = getResourceHandler(CLASSES_DIR);\n\t\tHashtable<String, ArrayList<String>> table = new Hashtable<String, ArrayList<String>>();\n\t\tfor(String dir : resourceHandler.listDirs()){\n\t\t\ttable.put(dir, new ArrayList<String>());\n\t\t\tfor(String file : resourceHandler.listFiles(dir)){\n\t\t\t\tfile = file.replaceAll(\"/\", \"\");\n\t\t\t\tif(!dir.endsWith(\"/\")){\n\t\t\t\t\tfile = \"/\" + file;\n\t\t\t\t}\n\t\t\t\ttable.get(dir).add(StringUtils.toFileName((dir+file.replaceAll(\"\\\\.xml\", \"\"))));\n\t\t\t}\n\t\t}\n\t\treturn table;\n\t}",
"public Map<Integer, Integer> getMap(String fileContent) {\n\t\tString[] words = fileContent.split(\" \");\n\t\tfor (String word : words) {\n\t\t\tint hash = word.hashCode();\n\t\t\tint frequency = 1;\n\t\t\tif (map.containsKey(hash)) {\n\t\t\t\tfrequency += map.get(hash);\n\t\t\t\tmap.put(hash, frequency);\n\t\t\t} else {\n\t\t\t\tmap.put(hash, frequency);\n\t\t\t}\n\t\t}\n\t\treturn map;\n\t}",
"com.google.protobuf.ByteString\n getFolderIdBytes();",
"private void makeGlbMap(Object gsd) {\n\t\tif(glbMap != null) return;\n\t\tglbMap = new HashMap<String, Integer>();\n\t\tField [] glbFields = gsd.getClass().getDeclaredFields();\n\t\tfor(int i=0; i<glbFields.length; i++) {\n\t\t\tObject object;\n\t\t\ttry {\n\t\t\t\tobject = glbFields[i].get(gsd);\n\t\t\t\tif(object == null) continue;\n\t\t\t\tString n = glbFields[i].getName();\n\t\t\t\tif(n != null && (object instanceof Var || object instanceof Group)) {\n\t\t\t\t\tif(store.containsKey(n)) {\n\t\t\t\t\t\tif(Config.DEBUG) System.out.println(\"Adding peristence Var \" + n);\n\t\t\t\t\t\tInteger v = i;\n\t\t\t\t\t\tglbMap.put(n, v);\n\t\t\t\t\t}\n\t\t\t\t} else if(n != null && (object instanceof Var [])) {\n\t\t\t\t\tif(store.containsKey(n)) {\n\t\t\t\t\t\tif(Config.DEBUG) System.out.println(\"Adding peristence Var \" + n + \"[]\");\n\t\t\t\t\t\tInteger v = i;\n\t\t\t\t\t\tglbMap.put(n, v);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch(IllegalArgumentException ex) {\n\t\t\t} catch (IllegalAccessException e) {\n\t\t\t}\n\t\t}\n\t}"
] | [
"0.5624183",
"0.52676463",
"0.5252109",
"0.5205088",
"0.51363707",
"0.5103464",
"0.49902079",
"0.49226457",
"0.48545137",
"0.48386058",
"0.48250934",
"0.47831",
"0.47224247",
"0.4641467",
"0.45931143",
"0.45928538",
"0.45865667",
"0.45760232",
"0.4547543",
"0.45460838",
"0.4539216",
"0.45359567",
"0.45123196",
"0.4495237",
"0.44924018",
"0.44896716",
"0.448721",
"0.44803998",
"0.44728568",
"0.44632027",
"0.4455501",
"0.44528043",
"0.44402677",
"0.44287625",
"0.44269177",
"0.44232282",
"0.44134736",
"0.44024155",
"0.43958881",
"0.43946394",
"0.4391292",
"0.43885097",
"0.43827075",
"0.43677604",
"0.43633488",
"0.43458864",
"0.43276978",
"0.4327362",
"0.43191457",
"0.43121818",
"0.43102798",
"0.4307651",
"0.43062094",
"0.42970386",
"0.42930797",
"0.42790574",
"0.42766955",
"0.427578",
"0.42595753",
"0.4245175",
"0.42435846",
"0.42424273",
"0.42337847",
"0.42254928",
"0.42253044",
"0.42026398",
"0.418967",
"0.41858363",
"0.41855344",
"0.41823053",
"0.4176422",
"0.4174129",
"0.41740817",
"0.41722912",
"0.41666618",
"0.4165969",
"0.41583422",
"0.41493446",
"0.41415277",
"0.41405746",
"0.41382694",
"0.41348875",
"0.41266862",
"0.41247264",
"0.41221154",
"0.4119352",
"0.41165474",
"0.41158953",
"0.41119912",
"0.41063696",
"0.41014528",
"0.40991598",
"0.40918577",
"0.4078563",
"0.40756825",
"0.40745062",
"0.40733778",
"0.40697348",
"0.40637952",
"0.4056864"
] | 0.43940648 | 40 |
Simply add this word to given map | private void addWordToMap(Map<String, List<Double>> wordMap,
String currentWord) {
if (wordMap.containsKey(currentWord)) {
List<Double> list = wordMap.get(currentWord);
list.set(0, list.get(0) + 1.0F); // 0 index for TF
wordMap.put(currentWord, list);
} else {
List<Double> list = new ArrayList<Double>();
list.add(0, 1.0);
//bad logic - should have used Double Array
list.add(1,0.0);
list.add(2,0.0);
list.add(3,0.0);
list.add(4,0.0);
list.add(5,0.0); // unnormilzed TF
//
wordMap.put(currentWord, list);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void addWord(Word word);",
"public void addWord(String word) {\n if (word == null || word.equals(\"\")) return;\n char[] str = word.toCharArray();\n WordDictionary cur = this;\n for (char c: str) {\n if (cur.letters[c - 'a'] == null) cur.letters[c - 'a'] = new WordDictionary();\n cur = cur.letters[c - 'a'];\n }\n cur.end = true;\n }",
"private void addToMap(Word from, Word to) {\n Set<Word> s = wordMap.get(from);\n if(s == null) {\n s = new HashSet<>();\n wordMap.put(from, s);\n }\n s.add(to);\n }",
"public void insert(String word, DictionaryData data) {\r\n\r\n dictionaryMap.put(word.toUpperCase(),data);\r\n }",
"public void addWord(String word) {\n char[] chs = word.toCharArray();\n TreeNode cur = root;\n for (int i = 0; i < chs.length; i++) {\n int ind = chs[i] - 'a';\n if (cur.map[ind] == null) {\n cur.map[ind] = new TreeNode();\n }\n cur = cur.map[ind];\n }\n cur.end = true;\n }",
"public void addWord(String word) {\n root = put(root, word, 0);\n }",
"public void addWord(String word) {\n char[] wordChars = word.toCharArray();\n TrieNode curr = root;\n for (char c : wordChars) {\n if(curr.map.containsKey(c)) {\n curr = curr.map.get(c);\n } else {\n TrieNode newNode = new TrieNode();\n curr.map.put(c, newNode);\n curr = newNode;\n }\n }\n curr.isLeaf = true;\n }",
"public void addToMap(){\n\t\tInteger hc = currentQuery.hashCode();\n\t\tif (!hmcache.containsKey(hc)) {\n\t\t\thmcache.put(hc, 0);\n\t\t}else{\n\t\t\tInteger val = hmcache.get(hc) + (currentQuery.getWords().size());\n\t\t\thmcache.put(hc, val);\n\t\t}\n\t}",
"void insert(String mappedNumber, String word);",
"public void add(String word) {\n Signature sig = new Signature(word);\n add(sig, word);\n }",
"public void add(ArrayList<String> phrase) {\t\t\r\n\t\tfor (int i = 0 ; i < phrase.size(); i++) {\r\n\t\t\tWordTrieNode cur = root;\r\n\t\t\tfor (int j = i; j < phrase.size(); j++) {\r\n\t\t\t\tString word = phrase.get(j);\r\n\t\t\t\tif (!cur.getMap().containsKey(word)) {\r\n\t\t\t\t\tcur.getMap().put(word, new WordTrieNode(word));\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tcur = cur.getMap().get(word);\r\n\t\t\t\tcur.increaseFrequence();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void addWord(String word) {\n trie.insert(word);\n }",
"public void add(T word);",
"private void addToMap(String line, HashMap<String, String> map) {\n if (!line.contains(\" \")) {\n return;\n }\n String[] parts = line.split(\" \");\n map.put(parts[0].toLowerCase(), parts[1]);\n }",
"public void addWord(String word) {\n TrieNode curr = root;\n for (char c : word.toCharArray()) {\n curr = curr.chars.computeIfAbsent(c, (k) -> new TrieNode());\n\n }\n curr.isWord = true;\n }",
"public void addWord(String word) {\n root.addWord(word);\n }",
"public static void addKeyWord(String word)\r\n\t{\r\n\t\tkeywords.add(word);\r\n\t}",
"public void add(LLNodeHash word){\n if (!checkWord(word)){\n put(word);\n }\n }",
"private void addCustomWords() {\r\n\r\n }",
"public void addPos(String word, IPosition pos);",
"public boolean add(String word) {\r\n\t\treturn dict.add(word);\r\n\t}",
"public void addWord(String word) {\n // Write your code here\n TrieNode now = root;\n for(int i = 0; i < word.length(); i++) {\n Character c = word.charAt(i);\n if (!now.children.containsKey(c)) {\n now.children.put(c, new TrieNode());\n }\n now = now.children.get(c);\n }\n now.hasWord = true;\n }",
"private void wordAdd(String word){\n if (!fileWords.containsKey(word)){\n fileWords.put(word,1);\n if (probabilities.containsKey(word)) {\n double oldCount = probabilities.get(word);\n probabilities.put(word, oldCount+1);\n } else {\n probabilities.put(word, 1.0);\n }\n }\n }",
"public void add(String word) {\n if (hashTable.contains(word)) {\n hashTable.put(word, hashTable.get(word) + 1);\n }\n else {\n hashTable.put(word,1);\n }\n }",
"public void addWord(String word) {\n if (word != null){\n Map<Character, TrieNode> children=root.children;\n for (int i=0;i<word.length();i++){\n char c=word.charAt(i);\n TrieNode t;\n if (children.containsKey(c)){\n t=children.get(c);\n }else {\n t=new TrieNode(c);\n children.put(c, t);\n }\n children=t.children;\n if (i==word.length()-1){\n t.isLeaf=true;\n }\n }\n }\n }",
"public void add (String word) {\n Trie pointeur ;\n\n if(word.length() != 0){\n String lettre = Character.toString(word.charAt(0));\n String ssChaine = word.substring(1);\n pointeur = this.fils.get(lettre);\n if(pointeur == null){\n pointeur = new Trie();\n this.fils.put(lettre,pointeur);\n\n }\n pointeur.add(ssChaine);\n if(ssChaine.length()==0){\n this.fin = true;\n }\n \n }\n \n }",
"public void addWord(String word) {\n\t\taddWord(word, root);\n\t}",
"public void add (List words) {\n\t\tint pos = 0;\n\t\tfor (Iterator it = words.iterator(); it.hasNext(); ) {\n\t\t\tWord word = (Word)it.next();\n\t\t\tInfo info = (Info)map.get(word);\n\t\t\tif (info == null) {\n\t\t\t\tinfo = new Info();\n\t\t\t\tinfo.loaded = false;\n\t\t\t\tmap.put(word, info);\n\t\t\t}\n\t\t\tinfo.list = words;\n\t\t\tinfo.pos = pos;\n\t\t\tpos++;\n\t\t}\n\t}",
"public void addWord(String word) {\n // Write your code here\n TrieNode cur=root;\n for(int i=0;i<word.length();++i){\n char c=word.charAt(i);\n TrieNode nextNode=cur.children.get(c);\n if(nextNode==null){\n nextNode=new TrieNode();\n cur.children.put(c,nextNode);\n }\n cur=nextNode;\n }\n cur.hasWord=true;\n }",
"public void insert(String word) {\n TrieNode curr=root;\n for(int i=0;i<word.length();i++){\n char c = word.charAt(i);\n TrieNode node=curr.hmap.get(c);\n if(node==null){\n node=new TrieNode();\n curr.hmap.put(c, node);\n }\n curr=node;\n }\n curr.endOfWord=true;\n }",
"public void addElement(String word, String signature) {\n\t\tif(dictionaryMap.get(signature)!= null)\n\t\t\tdictionaryMap.get(signature).add(word);\n\t\telse {\n\t\t\tSet<String> newSignature = new TreeSet<>();\n\t\t\tnewSignature.add(word);\n\t\t\tdictionaryMap.put(signature, newSignature);\n\t\t}\n\t}",
"public void addWord(String word) {\n // Write your code here\n TrieNode now = root;\n for(int i = 0; i < word.length(); i++) {\n Character c = word.charAt(i);\n if (now.children[c - 'a'] == null) {\n now.children[c - 'a'] = new TrieNode();\n }\n now = now.children[c - 'a'];\n }\n now.hasWord = true;\n }",
"public void insert(String word) {\n char[] chars = word.toCharArray();\n int length = chars.length;\n\n Map<Character,Node> map = this.root.map;\n for(int i = 0;i < length;i++){\n if(map.containsKey(chars[i])){\n Node node = map.get(chars[i]);\n }else{\n map.put(chars[i],new Node(chars[i]));\n }\n\n if(i == length - 1){\n map.get(chars[i]).isWordEnd = true;\n }\n map = map.get(chars[i]).map;\n }\n }",
"void addWord(Nod n, String word) {\n\t\tint i = 0;\n\t\twhile (i < 26) {\n\n\t\t\tif (n.frunze.get(i).cuvant.equals(\"%\")) {\n\t\t\t\tn.frunze.get(i).cuvant = word;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t}",
"public void addWord(String word)\n {\n TrieNode1 node = root;\n for (char c:word.toCharArray())\n {\n if (node.childerens[c-'a']==null)\n {\n node.childerens[c-'a'] = new TrieNode1();\n }\n node = node.childerens[c-'a'];\n }\n node.isEnd = true;\n\n }",
"public void addWord(String word) {\n TrieNode cur = root;\n for(char c : word.toCharArray()) {\n if(cur.next[c-'a'] == null) {\n cur.next[c-'a'] = new TrieNode(c);\n }\n cur = cur.next[c-'a'];\n }\n cur.isWord = true;\n }",
"public void addWord(String word) {\n dataStructure.put(word, \"\");\n }",
"public void addWord(String word) {\n TrieNode cur = root;\n for(int i = 0; i < word.length(); i++) {\n char c = word.charAt(i);\n TrieNode node = cur.children.get(c);\n if(node == null) {\n node = new TrieNode();\n cur.children.put(c, node);\n }\n cur = node;\n }\n cur.isEnd = true;\n }",
"public void addWord(String word) {\n TrieNode node = root;\n char[] words = word.toCharArray();\n for (char c: words){\n if (node.children[c-'a'] == null){\n node.children[c-'a']=new TrieNode();\n }\n node = node.children[c-'a'];\n }\n node.item = word;\n }",
"public void addWord(String word) {\n CharNode target = root ;\n for(int i=0; i<word.length(); i++) {\n target = target.insertCharInChildren(word.charAt(i)) ;\n }\n target.end = true ;\n }",
"public void populateWord(String word) {\n\t\tthis.add(word);\n\t}",
"public void addWord(String word) {\n HashMap<Character, TrieNode> children = root.children;\n TrieNode Tnode;\n char[] charArray = word.toCharArray();\n for (int i = 0; i < word.length(); i++) {\n if (children.containsKey(charArray[i])) {\n Tnode = children.get(charArray[i]);\n }\n else\n {\n Tnode = new TrieNode(charArray[i]);\n children.put(charArray[i], Tnode);\n }\n children = Tnode.children;\n\n if (i == word.length() - 1) {\n Tnode.isLeaf = true;\n }\n }\n }",
"public void addWord(String word) {\r\n Trie node = root;\r\n for(char ch: word.toCharArray()){\r\n if(node.child[ch - 'a'] == null)\r\n node.child[ch - 'a'] = new Trie(ch);\r\n node = node.child[ch - 'a'];\r\n }\r\n node.end = true;\r\n }",
"public void addWord(String word) {\r\n Node node = root;\r\n for(char c : word.toCharArray()){\r\n node.nodes[c-'a'] = new Node();\r\n node = node.nodes[c-'a'];\r\n }\r\n node.isLeaf = true;\r\n }",
"public void insert(String word) {\n\t\tTrie curr = this;\n\t\tfor(Character ch : word.toCharArray()) {\n\t\t\tTrie n = curr.nodes[ch - 'a'];\n\t\t\t\n\t\t\tif (n == null) {\n\t\t\t\tn = new Trie();\n\t\t\t\tn.isWord = false;\n\t\t\t\tcurr.nodes[ch - 'a'] = n;\n\t\t\t}\n\t\t\t\n\t\t\tcurr = n;\n\t\t}\n\t\tcurr.isWord = true;\n\t}",
"@Override\r\n\tpublic void insert(Map<String, String> map) {\n\t\t\r\n\t}",
"public void buildMap()\n {\n for(int letterNum=0; letterNum < myText.length()-myNum; letterNum++) {\n String key = myText.substring(letterNum,letterNum+myNum);\n String nextLetter = String.valueOf(myText.charAt(letterNum + myNum));\n if (!map.containsKey(key)) {\n ArrayList<String> lettersArray = new ArrayList<String>();\n lettersArray.add(nextLetter);\n map.put(key,lettersArray);\n }else\n {\n map.get(key).add(nextLetter);\n }\n }\n }",
"public void addWord(String word) {\n maxLength = Math.max(maxLength, word.length());\n\n TrieNode temp = root;\n for (int i = 0; i < word.length(); i++) {\n char c = word.charAt(i);\n if (temp.children[c - 'a'] == null) {\n temp.children[c - 'a'] = new TrieNode(c);\n }\n temp = temp.children[c - 'a'];\n }\n temp.isWord = true;\n }",
"public void addWord(String word) {\n \tTrieNode curr=root;\n for(int i=0;i<word.length();i++){\n \tchar ch=word.charAt(i);\n \tif(curr.children[ch-'a']==null)\n \t\tcurr.children[ch-'a']=new TrieNode();\n \tif(i==word.length()-1)\n \t\tcurr.children[ch-'a'].isCompleteword=true;\n \t\n \tcurr=curr.children[ch-'a'];\n }\n }",
"public void addWord(String word) {\n TrieNode curr = root;\n for (int i = 0; i < word.length(); i++) {\n char c = word.charAt(i);\n if (curr.children[c - 'a'] == null )\n curr.children[c - 'a'] = new TrieNode();\n curr = curr.children[c - 'a'];\n }\n curr.end = true;\n }",
"public void add(String alphabetizedWord, String word){\n int index = word.length();\n if(index >= tree.size()){\n tree.setSize(index + 1);\n }\n if(tree.get(index) == null){\n tree.set(index, new Trie());\n }\n //add word to appropriate trie\n tree.get(index).addWord(alphabetizedWord, word);\n }",
"public void add(Word w)\n {\n words = words + w.getWords();\n syllables = syllables + w.getSyllables();\n sentences = sentences + w.getSentences();\n }",
"public void addWord(String word) {\n TrieNode cur = root;\n for (int i=0; i<word.length(); i++) {\n int pos = word.charAt(i) - 'a';\n if (cur.next[pos] == null) {\n cur.next[pos] = new TrieNode();\n }\n cur = cur.next[pos];\n }\n cur.isWord = true;\n }",
"public void addWord(String word) {\n TrieNode node = root;\n for (int i = 0; i < word.length(); i++) {\n char c = word.charAt(i);\n if (!node.children.containsKey(c)) {\n node.children.put(c, new TrieNode());\n }\n node = node.children.get(c);\n }\n node.isEnd = true;\n }",
"public void add(String word) {\n\t\twordList.add(word);\n\t\t// TODO Add your code here\n\t}",
"public void addWord(String word) {\n all.add(word);\n TrieNode head = root;\n \n for (char i :word.toCharArray()){\n\n int k = i-'a';\n if (head.child[k]==null)\n {\n head.child[k] = new TrieNode();\n }\n head = head.child[k];\n \n }\n head.end = true;\n }",
"private void add(String key) {\n dict = add(dict, key, 0);\n }",
"public void add(CharSequence s, Language lang) {\r\n\t\t\r\n\t\t//Convert String to Hash Code\r\n\t\tint kmer = s.hashCode();\r\n\t\t\r\n\t\t//Get The Handle of the map for the particular language\r\n\t\tMap<Integer, LanguageEntry> langDb = getLanguageEntries(lang);\r\n\t\t\r\n\t\t\r\n\t\tint frequency = 1;\r\n\t\t//If Language Mapping Already has the Kmer, increment its Frequency\r\n\t\tif (langDb.containsKey(kmer)) {\r\n\t\t\tfrequency += langDb.get(kmer).getFrequency();\r\n\t\t}\r\n\t\t//Otherwise Insert into Map as New Language Entry\r\n\t\tlangDb.put(kmer, new LanguageEntry(kmer, frequency));\r\n\t\r\n\t\t\r\n\t}",
"public void fillMap(Map<String, List<String>> map){\n \tfor(String word : dictionary.words){ //Iterate over the ArrayList in the Dictionary object\n \t\tList<String> list = new ArrayList<String>();\n \t\tfor(String w : dictionary.words){ //iterate through all words in dictionary to find all one letter off from word\n \t\t\tif(isOneLetterOff(w, word))\n \t\t\t\tlist.add(w);\n \t\t\t//if w isn't off from word by one letter, check next w\n \t\t}\n \t\tmap.put(word, list);\n \t}\n }",
"public void addWord(int id, int start, int length, int[] type);",
"public void putWord(String word) {\n if(index < words.length) {\n words[index] = word;\n }\n index++;\n }",
"public void insert(String word) {\n if (word == null) {\n return;\n }\n if (value == null) {\n value = new ArrayList<>();\n }\n value.add(word);\n }",
"public void dictionaryAdd(String engWord, String vietWord) {\n String[] explain = vietWord.split(\"\\n\");\n\n if (dictionary.getWordList().get(engWord) != null) {\n dictionary.getWordList().get(engWord).addAll(Arrays.asList(explain));\n } else {\n ArrayList<String> arrayList = new ArrayList<>(Arrays.asList(explain));\n dictionary.getWordList().put(engWord, arrayList);\n }\n }",
"public void insert(String word) {\n\t\t\tTrieNode curr = root;\n\t\t\tfor (char c : word.toCharArray()) {\n\t\t\t\tif (!curr.children.containsKey(c))\n\t\t\t\t\tcurr.children.put(c, new TrieNode());\n\t\t\t\tcurr = curr.children.get(c);\n\t\t\t}\n\t\t\tcurr.isWord = true;\n\t\t}",
"public void addWord(String word) {\n if (word !=null && word.length() > 0) {\n TrieNode t = this.root;\n for (int i = 0; i < word.length(); i++) {\n int offset = word.charAt(i) - 'a';\n if (t.children[offset] == null) {\n t.children[offset] = new TrieNode();\n }\n t = t.children[offset];\n if (i == word.length() - 1) {\n t.endWithWord = true;\n }\n }\n }\n }",
"public static void addToMap(String Name)\n {\n Name = Name.toLowerCase(); // convert name to lower case\n String[] splitItup = new String[Name.split(\"[ ]+\").length]; // split the name according to spaces\n splitItup = Name.split(\"[ ]+\");\n \n for(String words : splitItup)\n {\n if (map.get(words) == null) // if word doesnt exist in the map, put it there\n {\n map.putIfAbsent(words, new ArrayList<Integer>());\n }\n\n map.get(words).add(productList.size()-1); // add the index to the arraylist\n }\n }",
"public boolean addWord(String word) {\n return false;\n }",
"public void insert(String word) {\n\t\tTrieNode node = root;\n\t\tfor (char c: word.toCharArray()) {\n\t\t\tif (!node.containsKey(c)) {\n\t\t\t\tnode.put(c);\n\t\t\t}\n\t\t\tnode = node.get(c);\n\t\t}\n\t\tnode.setEnd();\n\t}",
"private void addWords(){\n wordList.add(\"EGE\");\n wordList.add(\"ABBAS\");\n wordList.add(\"KAZIM\");\n }",
"public void addWord(String word) {\n //Corner Case\n if(word == null || word.length() == 0){\n return;\n }\n TrieNode node = root;\n int d = 0;\n \n while(d<word.length()){\n char c = word.charAt(d);\n if(node.next[c-'a']==null){\n node.next[c-'a'] = new TrieNode();\n }\n node = node.next[c-'a'];\n d++;\n }\n \n node.isWord = true;\n }",
"public void insert(String word) {\n char[] chs = word.toCharArray();\n TreeNode cur = root;\n for (int i = 0; i < chs.length; i++) {\n int ind = chs[i] - 'a';\n if (cur.map[ind] == null) {\n cur.map[ind] = new TreeNode();\n }\n cur = cur.map[ind];\n }\n cur.end = true;\n }",
"public void updateWordPoints() {\n for (String word: myList.keySet()) {\n int wordValue = 0;\n for (int i = 0; i < word.length(); i++) {\n // gets individual characters from word and\n // from that individual character get the value from scrabble list\n int charValue = scrabbleList.get(word.toUpperCase().charAt(i));\n // add character value gotten from character key from scrabble map to word value\n wordValue = wordValue + charValue;\n }\n\n // update the value of the word in myList map\n myList.put(word, wordValue);\n }\n }",
"public void insert(String word) {\n TrieTree point = root;\n for(int i = 0; i < word.length(); i++){\n char ch = word.charAt(i);\n if(point.getChild(ch - 'a') == null){\n point.setChild(ch - 'a', ch);\n }\n point = point.getChild(ch - 'a');\n }\n point.setIsWord();\n }",
"public void insert(String word) {\n Trie cur = this;\n int i = 0;\n while(i < word.length()) {\n int c = word.charAt(i) - 'a';\n if(cur.tries[c] == null) {\n cur.tries[c] = new Trie();\n }\n cur = cur.tries[c];\n i++;\n }\n cur.hasWord = true;\n }",
"private void addEntry(String word, String file, int position, HashMap<String, ArrayList<Integer>> subIndex) {\n\t\tif (subIndex.containsKey(word)) {\r\n\t\t\t// checks if the file name is a key in the nested\r\n\t\t\t// hash map of the word\r\n\t\t\tsubIndex.get(word).add(position);\r\n\t\t\r\n\t\t/*\r\n\t\t * if the word is not yet a key, create a new entry in the hash map.\r\n\t\t * Create new hash map to hold the file the word is found and an array\r\n\t\t * to find the position Then put that in the wordMap hash map as value\r\n\t\t * and the word as a key.\r\n\t\t */\r\n\t\t}else {\r\n\t\t\tsubIndex.put(word, new ArrayList<Integer>());\r\n\t\t\tsubIndex.get(word).add(position);\r\n\t\t\r\n\t\t}\r\n\t\r\n\t}",
"private void addWordsFromFile(File file){\n \n FileResource fr = new FileResource(file);\n String fileName = file.getName();\n for (String word : fr.words()) {\n if (!hashWords.containsKey(word)) {// if hash map doesnt contain the key word\n ArrayList<String> newList = new ArrayList<String>();//create a new Arraylist\n newList.add(fileName);//add the file name to it \n hashWords.put(word, newList);// map the word to the new list\n } else if (hashWords.containsKey(word)\n && !hashWords.get(word).contains(fileName)) {\n //the hash map contains the keyword but not the filename\n // it gets stored as a new value in the\n //arraylist of the hashmap:\n \n ArrayList<String> currentList = hashWords.get(word);//currentList is the existing array list of files\n //for the given word\n currentList.add(fileName);//Add new file name to existing list\n hashWords.put(word, currentList);//map the 'word' to the updated arraylist\n }\n }\n }",
"private void addPair(int word1, int word2) {\n\t\trelatedPairs[word1].add(word2);\n\t}",
"public void insert(String word) {\r\n tree.add(word);\r\n }",
"public void insert(String word) {\n Trie root = this;\n for (char c : word.toCharArray()) {\n if (root.next[c - 'a'] == null) {\n root.next[c - 'a'] = new Trie();\n }\n root = root.next[c - 'a'];\n }\n root.word = word;\n }",
"private void addWord(String s) {\n TrieNode node = root;\n for(int i = 0; i < s.length(); i++) {\n int index = s.charAt(i) - 'a';\n if (node.trieNodes[index] == null) {\n node.trieNodes[index] = new TrieNode();\n }\n node = node.trieNodes[index];\n }\n node.isLeave = true;\n }",
"public void insert(String word) {\n TrieNode node = root;\n\n // for each char in the word, add to the TrieNode\n for (char c: word.toCharArray()) {\n // if there are no such child, then we add it\n if (node.children[c - 'a'] == null) {\n node.children[c - 'a'] = new TrieNode(c);\n }\n // move the node to next layer\n node = node.children[c - 'a'];\n\n }\n // mark the isWord\n node.isWord = true;\n }",
"public void insert(String word) {\n\n int length = word.length();\n TrieNode node = root;\n for(int i=0; i<length; i++) {\n char curr = word.charAt(i);\n if(!node.containsKey(curr)){\n node.put(curr, new TrieNode());\n }\n node = node.get(curr);\n }\n node.setEnd();\n }",
"private void addWord(String word, int articleId, int times) {\n // if input is \"\" means here is the end of the woed then we can add the articleId to this node\n if(word.equals(\"\")) {\n addAricles(articleId, times);\n } else {\n Result res = findChild(word);\n // if the node is not exist, then we need to create an new one with next char of the word, and add word to next node \n if(res == null) {\n Node nextNode = new Node(word.substring(0, 1));\n this.addChildren(nextNode);\n nextNode.addWord(word.substring(1), articleId, times);\n } \n //if the node exist, add substring to next node\n else {\n Node nextNode = res.getN();\n String nextString = res.getS();\n nextNode.addWord(nextString, articleId, times);\n }\n }\n }",
"public void insert(String word) {\n TrieNode cur = root;\n HashMap<Character, TrieNode> curChildren = root.children;\n char[] wordArray = word.toCharArray();\n for(int i = 0; i < wordArray.length; i++){\n char wc = wordArray[i];\n if(curChildren.containsKey(wc)){\n cur = curChildren.get(wc);\n } else {\n TrieNode newNode = new TrieNode(wc);\n curChildren.put(wc, newNode);\n cur = newNode;\n }\n curChildren = cur.children;\n if(i == wordArray.length - 1){\n cur.hasWord= true;\n }\n }\n }",
"public void insert(String word) {\n TrieNode now = root;\n for(int i = 0; i < word.length(); i++) {\n Character c = word.charAt(i);\n if (!now.children.containsKey(c)) {\n now.children.put(c, new TrieNode());\n }\n now = now.children.get(c);\n }\n now.hasWord = true;\n}",
"public void addWord(Word englishWord, Word frenchWord) {\n\t\tdictFr.add(frenchWord);\n\t\tdictEn.add(englishWord);\n\t\twordsAdded(englishWord, frenchWord);\n\t}",
"public void addToDictionary(String word, int n) {\n\t\tConcurrentNavigableMap<String, String> listVocabulary = dbStats\n\t\t\t\t.getTreeMap(\"voca\");\n\t\tString strTimes = listVocabulary.get(word);\n\t\tint times = 0;\n\t\tif (strTimes != null) {\n\t\t\ttimes = Integer.parseInt(strTimes);\n\t\t\ttimes = times + n;\n\t\t} else {\n\t\t\ttimes = n;\n\t\t}\n\t\tlistVocabulary.put(word, Integer.toString(times));\n\t}",
"public void insert(String word) {\n TrieNode tn = root;\n int len = word.length();\n for(int i=0; i<len; i++){\n char c = word.charAt(i);\n TrieNode temp = tn.hm.get(c);\n if(!tn.hm.containsKey(c)){\n tn = new TrieNode();\n tn.hm.put(c, temp);\n }\n tn = temp;\n }\n tn.flag = true;\n }",
"public void insert(String word) {\n var node = root;\n for(char currentChar : word.toCharArray()){\n if(!node.containsKey(currentChar)) {\n node.put(currentChar, new Node());\n }\n node = node.get(currentChar);\n }\n node.setEnd();\n }",
"public void insert(String word) {\n TrieNode n = root;\n for(char c : word.toCharArray()) {\n if(n.children[c]==null) {\n n.children[c] = new TrieNode();\n }\n n = n.children[c];\n }\n n.isWord = true;\n n.word = word;\n }",
"void addWordToDoc(int doc,VocabWord word);",
"public void add(Word d) {\n d.incFrequency();\n root = add(d, root);\n }",
"public void insert(String word) {\n Entry tempRoot = root;\n for(int i=0; i<word.length(); i++){\n char ch = word.charAt(i);\n Entry childNode = tempRoot.getChildNode(ch);\n if(childNode == null){\n tempRoot.setChildNode(new Entry(), ch);\n }\n tempRoot = tempRoot.getChildNode(ch);\n }\n\n tempRoot.setIsWord(true);\n }",
"public void insert(String word) {\n \tHashMap<Character, TrieNode> children=root.children;\n \tfor(int i=0;i<word.length();i++)\n \t{\n \t\tchar c=word.charAt(i);\n \t\tTrieNode t;\n \t\tif(children.get(c)!=null)\n \t\t{\n \t\t\tt=children.get(c);\n \t\t}\n \t\telse\n \t\t{\n \t\t\tt=new TrieNode(c);\n \t\t\tchildren.put(c, t);\n \t\t}\n \t\tchildren=t.children;\n \t\tif(i==word.length()-1)\n \t\t\tt.leaf=true;\n \t}\n }",
"public void insert(String word) {\n\t\tcur = root;\n\t\tfor (char c : word.toCharArray()) {\n\t\t\tif (cur.children[c - 'a'] == null) {\n\t\t\t\tcur.children[c - 'a'] = new TrieNode(c);\n\t\t\t}\n\t\t\tcur = cur.children[c - 'a'];\n\t\t}\n\t\tcur.isWord = true;\n\t}",
"private void add(Node node, String word, int iter) {\n if (iter < word.length()) {\n if (!node.children.containsKey(word.charAt(iter)))\n node.children.put(word.charAt(iter), new Node(false));\n add(node.children.get(word.charAt(iter)), word, iter + 1);\n } else\n // we're done traversing, the current node is a leaf node\n node.leaf = true;\n }",
"public void add(String word, String file, int position) {\n\t \taddHelper(word, file, position);\n\t}",
"private void addToRoot(String line) {\r\n String[] components = line.split(\"\\\",\\\"\"); //get all components of line, that are [word, type, meaning]\r\n removeSpaces(components); //remove space and extra symbol from all components\r\n\r\n if (components.length == 3) { //if the components are valid\r\n\r\n boolean[] status = dict.addWord(components[0], components[1], components[2], 'a'); //try adding in add mode\r\n\r\n if (status[1]) { // if word already exists but have other meaning so need to append the meaning\r\n dict.addWord(components[0], components[1], components[2], 'u'); //add in update mdoe\r\n }\r\n }\r\n\r\n //System.out.println(\"Added word : \" + components[0]);\r\n }",
"public void addRef(String word) {\n addRef(word.toCharArray()); }",
"public void insert(String word) {\n TrieNode curr = root;\n for (char c : word.toCharArray()) {\n int idx = c - 'a';\n if (curr.children[idx] == null) {\n curr.children[idx] = new TrieNode();\n }\n curr = curr.children[idx];\n }\n curr.isWord = true;\n }"
] | [
"0.7270224",
"0.71906537",
"0.70597947",
"0.69225055",
"0.68503493",
"0.6850122",
"0.6848261",
"0.6792612",
"0.6713712",
"0.66738915",
"0.66724676",
"0.665979",
"0.66592115",
"0.6654387",
"0.6623308",
"0.6616589",
"0.6587592",
"0.6584136",
"0.6577165",
"0.6576644",
"0.6556402",
"0.65150255",
"0.6514136",
"0.6513418",
"0.65105593",
"0.6483893",
"0.6479473",
"0.64568704",
"0.64229673",
"0.6376094",
"0.6365665",
"0.63588953",
"0.6358584",
"0.63517284",
"0.6324393",
"0.6315347",
"0.6310033",
"0.6305177",
"0.62983024",
"0.62956285",
"0.62928593",
"0.62784857",
"0.6261671",
"0.62574965",
"0.62530226",
"0.6242642",
"0.6236721",
"0.6235189",
"0.62183815",
"0.6204913",
"0.62034434",
"0.6203302",
"0.61895823",
"0.61702436",
"0.6162382",
"0.61189187",
"0.61156774",
"0.611204",
"0.61031675",
"0.6103078",
"0.60996264",
"0.609647",
"0.60882515",
"0.6088186",
"0.60837823",
"0.6076845",
"0.6065274",
"0.60564727",
"0.60542846",
"0.6052372",
"0.6047915",
"0.6026582",
"0.60114264",
"0.6003349",
"0.59994215",
"0.59942013",
"0.5981356",
"0.59778106",
"0.59720075",
"0.5961543",
"0.59576535",
"0.5953373",
"0.5952237",
"0.5950987",
"0.5939016",
"0.593877",
"0.5928627",
"0.592831",
"0.5920464",
"0.59199685",
"0.5919807",
"0.59081733",
"0.59069943",
"0.5901068",
"0.59003884",
"0.5894908",
"0.5887695",
"0.5882262",
"0.58757955",
"0.58744776"
] | 0.67657346 | 8 |
This function is actually calculating the TF values for each word and setting those values back into the original map | private Map<String, List<Double>> updateWordMapForTotalCountK(
Map<String, List<Double>> wordMap, double totalWordCountPerDocument) {
Iterator<Entry<String, List<Double>>> iterator = wordMap.entrySet().iterator();
while(iterator.hasNext()){
Map.Entry<String, List<Double>> entry = (Map.Entry<String, List<Double>>) iterator.next();
if(totalWordCountPerDocument> 0.0)
entry.getValue().set(5,entry.getValue().get(0)); //store unnormized version
entry.getValue().set(0,entry.getValue().get(0)/totalWordCountPerDocument); //add all tf for total words
}
return wordMap;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void updateFinalMaps() {\r\n\t\t//prints out probMap for each tag ID and makes new map with ln(frequency/denominator) for each\r\n\t\t//wordType in transMapTemp\r\n\t\tTreeMap<String, TreeMap<String, Float>> tagIDsFinal = new TreeMap<String, TreeMap<String, Float>>();\r\n\t\tfor (String key: this.transMapTemp.keySet()) {\r\n\t\t\tProbMap probMap = this.transMapTemp.get(key);\r\n\t\t\ttagIDsFinal.put(key, this.transMapTemp.get(key).map);\r\n\r\n\t\t\tfor (String key2: probMap.map.keySet()) {\r\n\t\t\t\ttagIDsFinal.get(key).put(key2, (float) Math.log(probMap.map.get(key2) / probMap.getDenominator()));\r\n\t\t\t\tSystem.out.println(key + \": \" + key2 + \" \" + tagIDsFinal.get(key).get(key2));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//makes new map with ln(frequency/denominator) for each word in emissionMapTemp\r\n\t\tTreeMap<String, TreeMap<String, Float>> emissionMapFinal = new TreeMap<String, TreeMap<String, Float>>();\r\n\t\tfor (String key: this.emissionMapTemp.keySet()) {\r\n\t\t\tProbMap probMap = this.emissionMapTemp.get(key);\r\n\t\t\temissionMapFinal.put(key, this.emissionMapTemp.get(key).map);\r\n\t\t\tfor (String key2: probMap.map.keySet()) {\r\n\r\n\t\t\t\temissionMapFinal.get(key).put(key2, (float) Math.log(probMap.map.get(key2) / probMap.getDenominator()));\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.transMap = tagIDsFinal;\r\n\t\tthis.emissionMap = emissionMapFinal;\t\t\r\n\t}",
"private IDictionary<String, Double> computeTfScores(IList<String> words) {\n IDictionary<String, Double> tfScores = new ChainedHashDictionary<String, Double>();\n IDictionary<String, Double> wordCounts = new ChainedHashDictionary<String, Double>();\n \n // maps each given word to their frequency\n for (String word: words) {\n \t\tif (!wordCounts.containsKey(word)) {\n \t\t\twordCounts.put(word, 1.0);\n \t\t} else {\n \t\t\tDouble count = wordCounts.get(word);\n \t\t\twordCounts.put(word, count + 1.0);\n \t\t} \t\t\n }\n Double totalWords = (double) words.size();\n \n // Computes TF scores\n for (KVPair<String, Double> pair: wordCounts) {\n \t\ttfScores.put(pair.getKey(), pair.getValue() / totalWords);\n }\n return tfScores;\n }",
"private void normalizeDictionary() {\n\t\t\n\t\tCollections.sort(idfValues, Collections.reverseOrder());\n\t\tCollections.sort(idf2Values, Collections.reverseOrder());\n\t\tDouble maxIDF=idfValues.get(0)==0.0?1.0:idfValues.get(0);\n\t\tDouble maxIDF2=idf2Values.get(0)==0.0?1.0:idf2Values.get(0);\t\n\t\tfor (int i = 0; i < getTfMapArrayIDF().size(); i++) {\n\t\t\tList<Map<String,List<Double>>> gestureDocument = getTfMapArrayIDF().get(i);\n\t\t\tfor (int j = 0; j < gestureDocument.size(); j++) {\n\t\t\t\tMap<String,List<Double>> tempMap = gestureDocument.get(j);\n\t\t\t\tIterator<Entry<String, List<Double>>> it = tempMap.entrySet().iterator();\n\t\t\t\t while (it.hasNext()) {\n\t\t\t\t Map.Entry<String,List<Double>> pairs = (Map.Entry)it.next();\n\t\t\t\t \t//normalize tf-idf\n\t\t\t\t \tpairs.getValue().set(3, pairs.getValue().get(3)/maxIDF);\n\t\t\t\t \t//normalize tf-idf2\n\t\t\t\t \tpairs.getValue().set(4, pairs.getValue().get(4)/maxIDF2);\n\t\t\t\t }\n\t\t\t}\n\t\t}\n\t}",
"private void addWordToMap(Map<String, List<Double>> wordMap,\n\t\t\tString currentWord) {\n\t\tif (wordMap.containsKey(currentWord)) {\n\t\t\tList<Double> list = wordMap.get(currentWord);\n\t\t\tlist.set(0, list.get(0) + 1.0F); // 0 index for TF\n\t\t\twordMap.put(currentWord, list);\n\t\t} else {\n\t\t\tList<Double> list = new ArrayList<Double>();\n\t\t\t\n\t\t\t\n\t\t\tlist.add(0, 1.0);\n\t\t\t\n\t\t //bad logic - should have used Double Array\n\t\t \tlist.add(1,0.0);\n\t\t \tlist.add(2,0.0);\n\t\t \tlist.add(3,0.0);\n\t\t \tlist.add(4,0.0);\n\t\t \tlist.add(5,0.0); // unnormilzed TF\n\t\t \t// \t\t\n\t\t \t\n\t\t\twordMap.put(currentWord, list);\n\t\t}\n\t}",
"private HashMap<String,HashMap<String,Integer>> computeTFForQueryWords(ArrayList<String> queryPostingLines) {\n HashMap<String,HashMap<String,Integer>> queryWordsTF = new HashMap<>();\n HashMap<String,HashMap<String,Integer>> queryWordsTFPerDoc = new HashMap<>();\n String docID,term;\n Integer tf;\n HashSet<String> docIDs = new HashSet<>();\n for(String postingLine : queryPostingLines){\n HashMap<String,Integer> frequenciesInDocuments = new HashMap<>();\n term = postingLine.substring(0,postingLine.indexOf(\"|\"));\n postingLine = postingLine.substring(postingLine.indexOf(\"|\")+1);\n while(!postingLine.equals(\"\")) {\n docID = postingLine.substring(0, postingLine.indexOf(\":\"));\n docIDs.add(docID);\n postingLine = postingLine.substring(postingLine.indexOf(\"_\") + 1);\n tf = Integer.valueOf(postingLine.substring(0, postingLine.indexOf(\"_\")));\n postingLine = postingLine.substring(postingLine.indexOf(\"_\") + 1);\n frequenciesInDocuments.put(docID,tf);\n }\n queryWordsTF.put(term,frequenciesInDocuments);\n }\n\n ArrayList<String> allTermsInQuery = new ArrayList<>(queryWordsTF.keySet());\n for(String doc : docIDs){\n HashMap<String,Integer> tfsInDoc = new HashMap<>();\n for(String termInQuery : allTermsInQuery){\n HashMap<String,Integer> termsTFInDoc = queryWordsTF.get(termInQuery);\n if(termsTFInDoc.containsKey(doc)){\n tfsInDoc.put(termInQuery,termsTFInDoc.get(doc));\n }\n }\n queryWordsTFPerDoc.put(doc,tfsInDoc);\n }\n return queryWordsTFPerDoc;\n }",
"@Override\n\t\tprotected void map(Text key, Text value, Context context)throws IOException, InterruptedException {\n\t\t\tString val = value.toString();\n\t\t\t//String word = line.split(\",\")[0];\n\t\t\t//String docname = line.split(\",\")[1];\n\t\t\tdouble n = Double.parseDouble(val.split(\",\")[0]);\n\t\t\tdouble max = Double.parseDouble(val.split(\",\")[1]);\n\t\t\tdouble N = Double.parseDouble(val.split(\",\")[2]);\n\t\t\tdouble m = Double.parseDouble(val.split(\",\")[3]);\n\t\t\t//System.out.println(\"n is:\"+n+\"max is:\"+max+\" N is:\"+N+\" m is:\"+m+\" D is:\"+D);\n\t\t\tdouble tf = n/max;\n\t\t\t//System.out.println(\"TF is:\"+tf);\n\t\t\t//String TF = \"tf: \"+tf;\n\t\t\tdouble idf = (Math.log(D/m)/Math.log(2));\n\t\t\tdouble tfidf = tf*idf;\n\t\t\t//System.out.println(\"IDF is:\"+idf);\n\t\t\t//String IDF = \"idf: \"+idf;\n\t\t\tString word = key.toString().split(\",\")[0];\n\t\t\tString article = key.toString().split(\",\")[1];\n\t\t\tString new_val = word+\",\"+tf+\",\"+idf+\",\"+tfidf;\n\t\t\tcontext.write(new Text(article),new Text(new_val));\n\t\t}",
"public void updateWordPoints() {\n for (String word: myList.keySet()) {\n int wordValue = 0;\n for (int i = 0; i < word.length(); i++) {\n // gets individual characters from word and\n // from that individual character get the value from scrabble list\n int charValue = scrabbleList.get(word.toUpperCase().charAt(i));\n // add character value gotten from character key from scrabble map to word value\n wordValue = wordValue + charValue;\n }\n\n // update the value of the word in myList map\n myList.put(word, wordValue);\n }\n }",
"public static <T extends Object> void applySubstitutionToWeights(Map<String, HashMap<T, Double>> weightMap, PatriciaTrie<HashMap<String, Double>> substitutionMap) {\n\t\tHashMap<String, HashMap<T, Double>> mapChanges = new HashMap<>();\r\n\t\t\r\n\t\tfor(Entry<String, HashMap<T, Double>> entry : weightMap.entrySet()) {\r\n\t\t\tString word = entry.getKey();\r\n\t\t\tfor(int i = 0; i < word.length(); i++) {\r\n\t\t\t\t// Search for entries that apply to this sentence (use first letter in prefix map to speed up the search)\r\n\t\t\t\tMap<String, HashMap<String, Double>> potentialSubstitutionMap = substitutionMap.prefixMap(word.substring(i, i+1));\r\n\t\t\t\tfor(Entry<String, HashMap<String, Double>> subEntry : potentialSubstitutionMap.entrySet() ) {\r\n\t\t\t\t\tString from = subEntry.getKey();\r\n\t\t\t\t\tif(word.length() - i >= from.length()) {\r\n\t\t\t\t\t\tif(word.substring(i, i+from.length()).equals(from)) {\r\n\t\t\t\t\t\t\t// We have a confirmed substitution\r\n\t\t\t\t\t\t\tfor(Entry<String, Double> substitution : subEntry.getValue().entrySet()) {\r\n\t\t\t\t\t\t\t\tString newWord = word.substring(0, i) + substitution.getKey() + word.substring(i+from.length());\r\n\t\t\t\t\t\t\t\tmapChanges.put(newWord, returnScaledMap(weightMap.get(word), substitution.getValue()));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Merge substitutions\r\n\t\tfor(Entry<String, HashMap<T, Double>> entry : mapChanges.entrySet()) {\r\n\t\t\tString word = entry.getKey();\r\n\t\t\tHashMap<T, Double> map = entry.getValue();\r\n\t\t\t// If the weight map didn't already contain the modified word, add the word to it\r\n\t\t\tif(!weightMap.containsKey(word)) {\r\n\t\t\t\tweightMap.put(word, map);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tHashMap<T, Double> currentMap = weightMap.get(word);\r\n\t\t\t\tfor(Entry<T, Double> weightEntry : map.entrySet()) {\r\n\t\t\t\t\tT key = weightEntry.getKey();\r\n\t\t\t\t\tif(currentMap.containsKey(key)) {\r\n\t\t\t\t\t\t// Add the old weight and new weight together if already exists\r\n\t\t\t\t\t\tcurrentMap.put(key, currentMap.get(key) + weightEntry.getValue());\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tcurrentMap.put(key, weightEntry.getValue());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public Vector mapDocument(BOW bow) {\n //logger.info(\"lsm.mapDocument\");\n SparseVector vector = new SparseVector();\n\n Iterator<String> it = bow.termSet().iterator();\n String term = null;\n int index = 0;\n //int tf = 0;\n float tfIdf;\n for (int i = 0; it.hasNext(); i++) {\n //logger.info(i + \" \" + t[i]);\n term = it.next();\n index = termIndex.get(term);\n\n if (index != -1) {\n //tf = bow.getFrequency(term);\n //tfIdf = (float) (log2(tf)) * Iidf[index];\n //tfIdf = (float) bow.augmentedFrequency(term) * Iidf[index];\n tfIdf = (float) bow.tf(term) * Iidf[index];\n //logger.info(term + \" ==> \" + index + \", tf.idf = \" + tf + \"(\" + (log2(tf)) + \") * \" + Iidf[index] + \" = \" + tfIdf);\n vector.add(index, tfIdf);\n\n }\n } // end for\n\n return vector;\n }",
"public void normalize() {\n // YOUR CODE HERE\n String w1, w2;\n for (int i = 0; i < row; i++) {\n w1 = NDTokens.get(i);\n for (int j = 0; j < column; j++) {\n w2 = NDTokens.get(j);\n if(smooth) {\n bi_grams_normalized[NDTokens.indexOf(w1)][NDTokens.indexOf(w2)] = (getCount(w1, w2))/(uni_grams[NDTokens.indexOf(w1)] + NDTokens_size);\n }else {\n bi_grams_normalized[NDTokens.indexOf(w1)][NDTokens.indexOf(w2)] = getCount(w1, w2)/(uni_grams[NDTokens.indexOf(w1)]);\n }\n }\n }\n }",
"public void map(Object key, Text value, Context context\n\t\t ) throws IOException, InterruptedException {\n\n\t\t\t\n\t\t\t\n\t\t\t \n\t\t\t String curr_string=value.toString();\n\t\t\t /// splitting based on \"*\" as a delimiter...\n\t\t\t String [] parts=curr_string.split(\"\\\\*\");\n\t\t\t String curr_key=parts[0];\n\t\t\t // Removing spaces from both left and right part of the string..\n\t\t\t String curr_value=parts[1].trim();\n\t\t\t String [] small_parts=curr_value.split(\",\");\n\t\t\t // Taking the count of unique files which are present in the input given to tfidf\n\t\t\t int no_of_unique_files=Integer.parseInt(small_parts[small_parts.length-1]);\n\t\t\t /// The formula to compute idf is log((1+no_of_files)/no_of_unique_files))....\n\t\t\t Configuration conf=context.getConfiguration();\n\t\t\t String value_count=conf.get(\"test\");\n\t\t\t if(!value_count.isEmpty())\n\t\t\t {\n\t\t\t int total_no_files=Integer.parseInt(value_count);\n\t\t\t double x=(total_no_files/no_of_unique_files);\n\t\t\t // Formula fo rcomputing the idf value....\n\t\t\t double idf_value=Math.log10(1+x);\n\t\t\t for(int i=0;i<small_parts.length-1;i++)\n\t\t\t {\n\t\t\t\t String [] waste=small_parts[i].split(\"=\");\n\t\t\t\t String file_name=waste[0];\n\t\t\t\t // Computing the tfidf on the fly...\n\t\t\t\t double tf_idf=idf_value*Double.parseDouble(waste[1]);\n\t\t\t\t Text word3 = new Text();\n\t\t\t\t Text word4 = new Text();\n\t\t\t\t word3.set(curr_key+\"#####\"+file_name+\",\");\n\t\t\t\t word4.set(tf_idf+\"\");\n\t\t\t\t context.write(word3,word4);\n\t\t\t\t \n\t\t\t }\n\t\t\t //word1.set(curr_key);\n\t\t\t //word2.set(idf_value+\"\");\n\t\t\t //context.write(word1,word2); \n\t\t\t} \n\t\t}",
"@Override\n\t\tpublic void reduce(Text key,Iterable<Text> values,Context context)throws IOException,InterruptedException\n\t\t{\n\t\t\tfor(Text val:values)\n\t\t\t{\n\t\t\t\tString line = val.toString();\n\t\t\t\tString word = line.split(\",\")[0];\n\t\t\t\t//System.out.println(\"Word is:\"+word);\n\t\t\t\tString article = key.toString();\n\t\t\t\tdouble tf = Double.parseDouble(line.split(\",\")[1]);\n\t\t\t\t//System.out.println(\"TF is:\"+tf);\n\t\t\t\tdouble idf = Double.parseDouble(line.split(\",\")[2]);\n\t\t\t\tdouble tfidf = Double.parseDouble(line.split(\",\")[3]);\n\t\t\t\t//System.out.println(\"IDF is:\"+idf);\n\t\t\t\tString new_key = article+\",\"+word+\",\"+tf+\",\"+idf;\n\t\t\t\tmap.put(new_key, tfidf);\n\t\t\t}\n\t\t\tComparator<String> comparator1 = new StringValueComparator(map);\n\t\t\tTreeMap<String,Double> TopFive = new TreeMap<String,Double>(comparator1);\n\t\t\tTopFive.putAll(map);\n\t\t\t\n\t\t\tIterator<Entry<String,Double>> iter = TopFive.entrySet().iterator();\n\t\t\tEntry<String,Double> entry = null;\n\t\t\twhile(TopFive.size()>10)\n\t\t\t{\n\t\t\t\tentry = iter.next();\n\t\t\t\titer.remove();\n\t\t\t}\n\t\t\t//System.out.println(\"Size of HashMap:\"+map.size()+\"Size after deletion:\"+TopFive.size());\n\t\t\twhile(iter.hasNext())\n\t\t\t{\n\t\t\t\tEntry<String,Double> temp = iter.next();\n\t\t\t\tString val = temp.getKey();\n\t\t\t\tdouble tfidf = temp.getValue();\n\t\t\t\tString word = val.split(\",\")[1];\n\t\t\t\tString article = val.split(\",\")[0];\n\t\t\t\tdouble tf = Double.parseDouble(val.split(\",\")[2]);\n\t\t\t\tdouble idf = Double.parseDouble(val.split(\",\")[3]);\n\t\t\t\tString new_val = \"Word--->\"+word+\",Term Frequency--->\"+tf+\",IDF--->\"+idf+\",TFIDF--->\"+tfidf;\n\t\t\t\tcontext.write(new Text(article), new Text(new_val));\n\t\t\t}\n\t\t}",
"static void returnTfIdfResults() {\n\t\tSet<String> specificWords = findKeywords();\n\n\t\t// for every phrase\n\t\tfor (String word : specificWords) {\n\t\t\t// get the total number of documents\n\t\t\tdouble totalSize = size;\n\n\t\t\t// get the collection of documents containing that word\n\t\t\tCollection<File> containingWordSet = invertedMap.getValues(word);\n\n\t\t\t// makes a new one if null (for ease of code)\n\t\t\tif (containingWordSet == null) {\n\t\t\t\tcontainingWordSet = new HashSet<File>();\n\t\t\t}\n\n\t\t\t// the number containing the word\n\t\t\tdouble numContainingWord = containingWordSet.size();\n\n\t\t\t// get the idf (log(total/(1 + |# contain word|)\n\t\t\t// it is normalize with 1 to prevent division by 0\n\t\t\tdouble idf = Math.log(totalSize / (1 + numContainingWord));\n\n\t\t\t// System.out.println(\"------------------\");\n\t\t\t// System.out.println(word + \" totalSize \" + totalSize);\n\t\t\t// System.out.println(word + \" numContainingWord \" +\n\t\t\t// numContainingWord);\n\t\t\t// System.out.println(word + \" idf \" + idf);\n\t\t\t// System.out.println(\"------------------\");\n\n\t\t\t// set the wordscore to 0\n\t\t\tdouble wordScore = 0;\n\n\t\t\t// for all of the files with the word\n\t\t\tfor (File file : containingWordSet) {\n\t\t\t\tString fileName = file.getName();\n\n\t\t\t\t// get the phrase count for this document\n\t\t\t\tInteger phraseCount = phraseCountMap.get(fileName);\n\t\t\t\tdouble numPhrases = phraseCount.doubleValue();\n\n\t\t\t\t// get the word frequency map for this page\n\t\t\t\tHashMap<String, Integer> docFreqMap = wordFreqMap.get(fileName);\n\t\t\t\tInteger freq = docFreqMap.get(word);\n\n\t\t\t\t// otherwise, get the tf\n\t\t\t\tdouble tf;\n\t\t\t\tif (freq == null) {\n\t\t\t\t\t// if it's not present, it's 0\n\t\t\t\t\ttf = 0;\n\t\t\t\t} else {\n\t\t\t\t\t// otherwise, it's the value\n\t\t\t\t\ttf = freq / numPhrases;\n\t\t\t\t\t// System.out.println(tf);\n\t\t\t\t}\n\n\t\t\t\t// multiply for this score\n\t\t\t\tdouble score = tf * idf;\n\n\t\t\t\t// add it to the page score\n\t\t\t\twordScore += score;\n\t\t\t}\n\n\t\t\t// make a node with the sum of tf-idf for all relevant phrases and\n\t\t\t// add to pq\n\t\t\tWordNode w = new WordNode(word, wordScore);\n\t\t\tpq.add(w);\n\t\t}\n\t}",
"public void map(Object key, Text value, Context context) throws IOException, InterruptedException {\n StringTokenizer itr = new StringTokenizer(value.toString());\n while (itr.hasMoreTokens()) {\n word = itr.nextToken().toLowerCase();\n for(String word2 : WordMap){\n\n Double similarity = calculateJaccardSimilarity(word, word2);\n\n // which have Jaccard similarity not 0 and no larger than 0.15?\n if ((similarity > 0.0) && (similarity <= 0.15)) {\n DoubleWritable result = new DoubleWritable(similarity);\n context.write(new Text(word+\"\\t\"+word2), result);\n }\n }\n }\n }",
"private void writeVocabPost(FlIndexer fi) throws IOException{\n this.docNormPow = new HashMap<>();\n \n LinkedList<Integer> tf;\n LinkedList<String> files;\n String token;\n int position=0;\n File file = new File(\"CollectionIndex/VocabularyFile.txt\");\n File Postingfile = new File(\"CollectionIndex/PostingFile.txt\");\n \n\tFileWriter fw = new FileWriter(file.getAbsoluteFile());\n FileWriter fw_posting = new FileWriter(Postingfile.getAbsolutePath());\n try (BufferedWriter bw = new BufferedWriter(fw)) {\n try (BufferedWriter bw_posting = new BufferedWriter(fw_posting)){\n for (Map.Entry<String, TermNode> entry : fi.mapTerms.entrySet()){\n double idf = ((double)this.docMap.size())/entry.getValue().getDf();\n //idf=log2(idf, 2);\n bw.write(entry.getValue().getTerm()+\" \"+entry.getValue().getDf()+\" \"+idf+\" \"+position+\"\\n\");\n \n tf=entry.getValue().getTfList();\n files=entry.getValue().getFileList();\n int i=tf.size();\n for (int j=0; j<i; j++){\n double tfidf=idf*((double)tf.get(j)/fi.getMaxTF(files.get(j)));\n double tfidfpow=Math.pow(tfidf, 2);\n\n \n if(this.docNormPow.containsKey(files.get(j))){\n //this.docNorm.put(files.get(j), this.docNorm.get(files.get(j))+tfidf);\n this.docNormPow.put(files.get(j), this.docNormPow.get(files.get(j))+tfidfpow);\n }\n else{\n //this.docNorm.put(files.get(j), tfidf);\n this.docNormPow.put(files.get(j), tfidfpow);\n }\n \n token=this.docMap.get(files.get(j))+\" \"+tf.get(j)+\" \"\n +entry.getValue().multiMap.get(files.get(j))+\" \"+tfidf+\"\\n\";\n position= position + token.length();\n \n bw_posting.write(token);\n }\n }\n }\n }\n \n System.out.println(\"Done creating VocabularyFile.txt\");\n System.out.println(\"Done creating PostingFile.txt\");\n }",
"public void translate() {\n\t\tif(!init)\r\n\t\t\treturn; \r\n\t\ttermPhraseTranslation.clear();\r\n\t\t// document threshold: number of terms / / 8\r\n//\t\tdocThreshold = (int) (wordKeyList.size() / computeAvgTermNum(documentTermRelation) / 8.0);\r\n\t\t//\t\tuseDocFrequency = true;\r\n\t\tint minFrequency=1;\r\n\t\temBkgCoefficient=0.5;\r\n\t\tprobThreshold=0.001;//\r\n\t\titerationNum = 20;\r\n\t\tArrayList<Token> tokenList;\r\n\t\tToken curToken;\r\n\t\tint j,k;\r\n\t\t//p(w|C)\r\n\r\n\t\tint[] termValues = termIndexList.values;\r\n\t\tboolean[] termActive = termIndexList.allocated;\r\n\t\ttotalCollectionCount = 0;\r\n\t\tfor(k=0;k<termActive.length;k++){\r\n\t\t\tif(!termActive[k])\r\n\t\t\t\tcontinue;\r\n\t\t\ttotalCollectionCount +=termValues[k];\r\n\t\t}\r\n\t\t\r\n\t\t// for each phrase\r\n\t\tint[] phraseFreqKeys = phraseFrequencyIndex.keys;\r\n\t\tint[] phraseFreqValues = phraseFrequencyIndex.values;\r\n\t\tboolean[] states = phraseFrequencyIndex.allocated;\r\n\t\tfor (int phraseEntry = 0;phraseEntry<states.length;phraseEntry++){\r\n\t\t\tif(!states[phraseEntry]){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tif (phraseFreqValues[phraseEntry] < minFrequency)\r\n\t\t\t\tcontinue;\r\n\t\t\ttokenList=genSignatureTranslation(phraseFreqKeys[phraseEntry]); // i is phrase number\r\n\t\t\tfor (j = 0; j <tokenList.size(); j++) {\r\n\t\t\t\tcurToken=(Token)tokenList.get(j);\r\n\t\t\t\tif(termPhraseTranslation.containsKey(curToken.getIndex())){\r\n\t\t\t\t\tIntFloatOpenHashMap old = termPhraseTranslation.get(curToken.getIndex());\r\n\t\t\t\t\tif(old.containsKey(phraseFreqKeys[phraseEntry])){\r\n\t\t\t\t\t\tSystem.out.println(\"aha need correction\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\told.put(phraseFreqKeys[phraseEntry], (float) curToken.getWeight()); //phrase, weight\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tIntFloatOpenHashMap newPhrase = new IntFloatOpenHashMap();\r\n\t\t\t\t\tnewPhrase.put(phraseFreqKeys[phraseEntry], (float) curToken.getWeight());\r\n\t\t\t\t\ttermPhraseTranslation.put(curToken.getIndex(), newPhrase);\r\n\t\t\t\t}\r\n\t\t\t\t//\t\t\t\toutputTransMatrix.add(i,curToken.getIndex(),curToken.getWeight());\r\n\t\t\t\t//\t\t\t\toutputTransTMatrix.add(curToken.getIndex(), i, curToken.getWeight());\r\n\t\t\t\t//TODO termPhrase exists, create PhraseTerm\r\n\t\t\t}\r\n\t\t\ttokenList.clear();\r\n\t\t}\r\n\r\n\t}",
"public Vector mapDocument(MultiSet<String> bow) {\n //logger.info(\"lsm.mapDocument\");\n SparseVector vector = new SparseVector();\n\n Iterator<String> it = bow.iterator();\n String term = null;\n int index = 0;\n int tf = 0;\n float tfIdf;\n for (int i = 0; it.hasNext(); i++) {\n //logger.info(i + \" \" + t[i]);\n term = it.next();\n index = termIndex.get(term);\n\n if (index != -1) {\n tf = bow.getFrequency(term);\n tfIdf = (float) (log2(tf)) * Iidf[index];\n\n //logger.info(term + \" ==> \" + index + \", tf.idf = \" + tf + \"(\" + (log2(tf)) + \") * \" + Iidf[index] + \" = \" + tfIdf);\n vector.add(index, tfIdf);\n\n }\n } // end for\n\n return vector;\n }",
"@Override\n\t\tprotected void map(Object key, Text value, Context context)\n\t\t\t\tthrows IOException, InterruptedException {\n\t\t\tStringTokenizer str=new StringTokenizer(value.toString());\n//\t\t\tString[]str=new String(value.toString()).split(\"a\");\n\t\t\twhile(str.hasMoreTokens()){\n\t\t\t\tword.set(str.nextToken());\n\t\t\t\tcontext.write(word, one);\n\t\t\t\t}\n//\t\t\tfor(String b:str){\n//\t\t\t\tword.set(b);\n//\t\t\t\tcontext.write(word, one);\n//\t\t\t\t\n//\t\t\t}\n\t\t\t\n\t\t}",
"private Map<Double, List<String>> getScoreMap() {\n\t\t//dfMap = new HashMap<String, Integer>();\n\t\t\n\t\tfor (Map.Entry<String, FreqAndLists> entry: map.entrySet()) {\n\t\t\tString term = entry.getKey();\n\t\t\tif (originalTerms.contains(term)) { // expanded terms should not contain original terms\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdouble totalScore = 0;\n\t\t\tList<PositionList> postingList = entry.getValue().getPostingList();\n\t\t\tfor (PositionList positionList : postingList) {\n\t\t\t\tlong dr = positionList.getDocID();\n\t\t\t\tint rawDf = GetRawDf.getRawDf(qryId, term);\n\t\t\t\t//dfMap.put(term, rawDf);\n\t\t\t\ttotalScore += sf.getScore(term, dr, rawDf);\n\t\t\t}\n\t\t\t//System.out.println(term + \" \" + totalScore);\n\t\t\tif (scoreMap.containsKey(totalScore)) {\n\t\t\t\tscoreMap.get(totalScore).add(term);\n\t\t\t} else {\n\t\t\t\tList<String> list = new ArrayList<>();\n\t\t\t\tlist.add(term);\n\t\t\t\tscoreMap.put(totalScore, list);\n\t\t\t}\n\t\t}\n\t\t\n\t\t/*for (Map.Entry<Double, List<String>> entry : scoreMap.entrySet()) {\n\t\t\tSystem.out.println(\"000 \" + entry.getKey());\n\t\t\tList<String> list = entry.getValue();\n\t\t\tfor (String term : list) {\n\t\t\t\tSystem.out.println(\" \" + term);\n\t\t\t}\n\t\t}*/\n\t\t\n\t\t//writeToFile();\n\t\treturn scoreMap;\n\t}",
"public void map(Object key, Text value, Context context\n ) throws IOException, InterruptedException {\n StringTokenizer itr = new StringTokenizer(value.toString(), \"\\n\");\n\n // Loop through all lines\n while (itr.hasMoreTokens()) {\n String filteredSentence;\n String sentence = itr.nextToken().toLowerCase(Locale.ROOT);\n\n // Remove all special characters from the word and replace them with *\n filteredSentence = sentence.replaceAll(\"[^a-zA-Z ]\", \"*\");\n // Add a space at the end of every line to also represent the end of the last word in the sentence in the bigrams\n filteredSentence += \" \";\n\n // Write every lineCount + a map of the bigram and frequency of 1 to the context\n for(int i = 0; i < filteredSentence.length() - 1; i++){\n String pair = filteredSentence.substring(i, i + 2);\n context.write(new IntWritable(lineCount), new StringDoubleWritable(pair, 1.0));\n }\n lineCount++;\n }\n }",
"private void calculateIDF2Values() throws IOException {\n\t\tfor (int i = 0; i < getTfMapArrayIDF().size(); i++) {\n\t\t\tList<Map<String, List<Double>>> gestureDocument = getTfMapArrayIDF()\n\t\t\t\t\t.get(i);\n\t\t\tMap<String, Double> idf2PerDocument = getTfMapArrayIDF2().get(i);\n\n\t\t\tfor (int j = 0; j < gestureDocument.size(); j++) {\n\t\t\t\tMap<String, List<Double>> tempMap = gestureDocument.get(j);\n\t\t\t\tIterator<Entry<String, List<Double>>> it = tempMap.entrySet()\n\t\t\t\t\t\t.iterator();\n\t\t\t\twhile (it.hasNext()) {\n\t\t\t\t\tMap.Entry<String, List<Double>> pairs = (Map.Entry) it\n\t\t\t\t\t\t\t.next();\n\t\t\t\t\tDouble inverse = (new Double(getTfMapArrayIDF().get(0)\n\t\t\t\t\t\t\t.size()) / idf2PerDocument.get(pairs.getKey())); // already\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// inversse\n\t\t\t\t\tList<Double> tf = pairs.getValue();\n\t\t\t\t\ttf.set(2,Math.log(inverse));\n\t\t\t\t\ttf.set(3,tf.get(0) * tf.get(1)); //tf-idf\n\t\t\t\t\tidfValues.add(tf.get(1));\n\t\t\t\t\ttf.set(4,tf.get(0) * tf.get(2)); //tf-idf2\n\t\t\t\t\tidf2Values.add(tf.get(2));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void updateTransitionMap(){\n\t\tfor(String yWord:transition_map.keySet()){\n\t\t\tHashMap<String,DataUnit> stateTransitionMap=transition_map.get(yWord).state_transition;\n\t\t\t\n\t\t\t//count the total number of Nyo(y)\n\t\t\tint totalStateTransitionCount=0;\n\t\t\tfor(String nextY:stateTransitionMap.keySet()){\n\t\t\t\ttotalStateTransitionCount+=stateTransitionMap.get(nextY).count;\n\t\t\t}\n\t\t\t\n\t\t\tfor(String nextY:stateTransitionMap.keySet()){\n\t\t\t\tstateTransitionMap.get(nextY).prob=(stateTransitionMap.get(nextY).count*1.0)/totalStateTransitionCount;\n\t\t\t}\n\t\t\t\n\t\t\t//count the total number of Nyo(x,y)\n\t\t\tHashMap<String,DataUnit> terminalTransitionMap=transition_map.get(yWord).terminal_transition;\n\t\t\t\n\t\t\tint totalTerminalTransitionCount=0;\n\t\t\tint typeCount=0;\n\t\t\tfor(String xWord:terminalTransitionMap.keySet()){\n\t\t\t\ttotalTerminalTransitionCount+=terminalTransitionMap.get(xWord).count;\n\t\t\t\ttypeCount++;\n\t\t\t}\n\t\t\ttypeCount++;\n\t\t\tfor(String xWord:terminalTransitionMap.keySet()){\n\t\t\t\tterminalTransitionMap.get(xWord).prob=(terminalTransitionMap.get(xWord).count+1.0)/(totalTerminalTransitionCount+typeCount);\n\t\t\t}\n\t\t\t\n\t\t\tterminalTransitionMap.put(unknown_word,new DataUnit(1,1.0/(totalTerminalTransitionCount+typeCount)));\n\t\t}\n\t}",
"public static void WeightedVector() throws FileNotFoundException {\n int doc = 0;\n for(Entry<String, List<Integer>> entry: dictionary.entrySet()) {\n List<Integer> wtg = new ArrayList<>();\n List<Double> newList = new ArrayList<>();\n wtg = entry.getValue();\n int i = 0;\n Double mul = 0.0;\n while(i<57) {\n mul = wtg.get(i) * idfFinal.get(doc);\n newList.add(i, mul);\n i++;\n }\n wtgMap.put(entry.getKey(),newList);\n doc++;\n }\n savewtg();\n }",
"private IDictionary<URI, IDictionary<String, Double>> computeAllDocumentTfIdfVectors(ISet<Webpage> pages) {\n // Hint: this method should use the idfScores field and\n // call the computeTfScores(...) method.\n\t\tdocumentTfIdfVectors = new ChainedHashDictionary<URI, IDictionary<String, Double>>();\n\t\t\n\t\t// Iterates through the given set of webpages\n\t\tfor (Webpage page: pages) {\n\t\t\tIDictionary<String, Double> tfIdfScores = new ChainedHashDictionary<String, Double>();\n\t\t\tIDictionary<String, Double> tfScores = computeTfScores(page.getWords());\n\t\t\t\n\t\t\t// Computes TfIdf scores\n\t\t\tfor (KVPair<String, Double> pair: tfScores) {\n\t\t\t\tDouble tfIdfScore = pair.getValue() * idfScores.get(pair.getKey());\n\t\t\t\ttfIdfScores.put(pair.getKey(), tfIdfScore);\n\t\t\t}\n\t\t\tdocumentTfIdfVectors.put(page.getUri(), tfIdfScores);\n\t\t}\n\t\treturn documentTfIdfVectors;\n }",
"public void map(Object key, Text value, Context context) throws IOException, InterruptedException {\n String line = value.toString().toLowerCase();\n line = line.replaceAll(regex, \" \");\n\n StringTokenizer itr = new StringTokenizer(line);\n while (itr.hasMoreTokens()) {\n word.set(itr.nextToken());\n context.write(word, one);\n }\n }",
"@Override\n\tpublic void setTraining(String text) {\n\t\tmyWords = text.split(\"\\\\s+\");\n\t\tmyMap = new HashMap<String , ArrayList<String>>();\n\t\t\n\t\tfor (int i = 0; i <= myWords.length-myOrder; i++)\n\t\t{\n\t\t\tWordGram key = new WordGram(myWords, i, myOrder);\n\t\t\tif (!myMap.containsKey(key))\n\t\t\t{\n\t\t\t\tArrayList<String> list = new ArrayList<String>();\n\t\t\t\tif (i+myOrder != myWords.length)\n\t\t\t\t{\n\t\t\t\t\tlist.add(myWords[i+myOrder]);\n\t\t\t\t\tmyMap.put(key, list);\n\t\t\t\t} else {\n\t\t\t\t\tlist.add(PSEUDO_EOS);\n\t\t\t\t\tmyMap.put(key, list);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (i+myOrder != myWords.length)\n\t\t\t\t{\n\t\t\t\t\t((ArrayList<String>) myMap.get(key)).add(myWords[i+myOrder]);\n\t\t\t\t} else {\n\t\t\t\t\t((ArrayList<String>) myMap.get(key)).add(PSEUDO_EOS);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public Vector mapDocument(BOW bow, boolean b) {\n //logger.info(\"lsm.mapDocument \" + b);\n SparseVector vector = new SparseVector();\n\n Iterator<String> it = bow.termSet().iterator();\n for (int i = 0; it.hasNext(); i++) {\n //logger.info(i + \" \" + t[i]);\n String term = it.next();\n int index = termIndex.get(term);\n\n if (index != -1) {\n int tf = bow.getFrequency(term);\n float tfIdf = (float) (log2(tf));\n if (b) {\n tfIdf *= Iidf[index];\n }\n\n //logger.info(term + \" ==> \" + index + \", tf.idf = \" + tf + \"(\" + (log2(tf)) + \") * \" + Iidf[index] + \" = \" + tfIdf);\n vector.add(index, tfIdf);\n\n }\n } // end for\n\n return vector;\n }",
"public static void main(String[] args) {\n\t\tHashMap<String, HashMap<String, Double>> file_alph_tf = new HashMap<String, HashMap<String, Double>>();\n\t\tHashMap<String, Double> file_alph_idf = new HashMap<String, Double>();\n\t\tHashMap<String, Double> tmp_idf = new HashMap<String, Double>();\n\t\tHashMap<String, HashMap<String, Double>> result_map = new HashMap<String, HashMap<String, Double>>();\n\t\t// 이후에 cosine similarity를 계산할때 사용할 top5해쉬맵\n\t\tHashMap<String, HashMap<String, Double>> top5 = new HashMap<String, HashMap<String, Double>>();\n\t\t\n\t\tTest01 t1 = new Test01();\n\t\tTest02 t2 = new Test02();\n\t\tTest03 t3 = new Test03();\n\t\t\n\t\t// 각 문서의 특성을 추출 : Test04 - map\t\t\n\t\t\n\t\tFile[] fileList = t1.get_file();\n\t\t\n\t\tfor (File file : fileList) {\n\t\t\t\n\t\t\tHashMap <String, Double> tmp_map = new HashMap <String, Double>();\n\t\t\t\n\t\t\t// count alphabet _ each files\n\t\t\ttry {\n\t\t\t\tFileReader file_reader = new FileReader(file);\n\t\t\t\tint cur = 0;\n\t\t\t\twhile ((cur = file_reader.read()) != -1) {\n\t\t\t\t\tif (cur != 32) {\n\t\t\t\t\t\tif (!tmp_map.containsKey(String.valueOf((char)cur))) {\n\t\t\t\t\t\t\ttmp_map.put(String.valueOf((char)cur), (double) 1);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tdouble temp_num = tmp_map.get(String.valueOf((char)cur));\n\t\t\t\t\t\t\ttmp_map.put(String.valueOf((char)cur),temp_num+1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch(FileNotFoundException e) {\n\t\t\t\te.getStackTrace();\n\t\t\t} catch(IOException e) {\n\t\t\t\te.getStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t// calc_TF\n\t\t\tArrayList<String> key_lst = new ArrayList<String>(tmp_map.keySet());\n\t\t\tdouble sum_value = 0;\n\t\t\t// TF의 분모 문서내에 오는 모든수 더하기\n\t\t\tfor (String k : key_lst) {\n\t\t\t\tsum_value += tmp_map.get(k);\t\n\t\t\t}\n\t\t\t// TF의 분자 : 해당 파일에 있는 알파벳의 갯수 (tmp_map에 저장되어있음) / tf분모\n\t\t\tfor (String tf_k : key_lst) {\n\t\t\t\tdouble tf = tmp_map.get(tf_k) / sum_value;\n\t\t\t\ttmp_map.put(tf_k, tf);\n\t\t\t}\n\t\t\tsum_value = 0;\n\t\t\tfile_alph_tf.put(file.getName(), tmp_map);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t// calc_IDF_Bottom : counting IDF_Bottom\n\t\t\ttmp_idf = file_alph_tf.get(file.getName());\n\t\t\t\n\t\t\tfor (String idf_k : key_lst) {\n\t\t\t\tif (tmp_idf.get(idf_k) != 0) {\n\t\t\t\t\tif (!file_alph_idf.containsKey(idf_k)) {\n\t\t\t\t\t\tfile_alph_idf.put(idf_k, (double) 1);\n\t\t\t\t\t}else {\n\t\t\t\t\t\tdouble tmp_num = file_alph_idf.get(idf_k);\n\t\t\t\t\t\tfile_alph_idf.put(idf_k, tmp_num+1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\n\t\t} // file의 이름으로 반복\n\t\t\n\t\t\n\t\t// calc_IDF\n\t\tfor (File file : fileList) {\n\t\t\tHashMap<String, Double> aa = new HashMap<String, Double>();\n\t\t\tArrayList<String> key_lst = new ArrayList<String>(file_alph_idf.keySet());\n\t\t\tdouble temp_num = 0;\n\t\t\tfor (String key : key_lst) {\n\t\t\t\t\n\t\t\t\tdouble tf;\n\t\t\t\ttemp_num = 0;\n\t\t\t\ttry {\n\t\t\t\t\ttf = file_alph_tf.get(file.getName()).get(key);\n\t\t\t\t\tif (file_alph_idf.get(key) != 0) {\n\t\t\t\t\t\tdouble tt = file_alph_idf.get(key);\n\t\t\t\t\t\ttemp_num = 7/tt;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttemp_num = 0;\n\t\t\t\t\t}\n\t\t\t\t} catch(NullPointerException e) {\n\t\t\t\t\ttf = 0;\n\t\t\t\t}\n\t\t\t\tdouble idf = Math.log(1+ temp_num);\n\t\t\t\tdouble tfidf = tf*idf;\n\t\t\t\taa.put(key, tfidf);\n\t\t\t}\n//\t\t\tSystem.out.println();\n\t\t\tresult_map.put(file.getName(), aa);\n\t\t}\t\n\t\n\t\t\n\t\t\n\t\t\n\t\tfor(File f : fileList) {\n\t\t\t\n\t//---------------------------------------상위 5개-------------------------------------------\t\t\t\n\t\t\t\n//\t\t\tSystem.out.println(f.getName());\n\t\t\tString f_n = f.getName(); \n\t\t\t\n\t\t\t// 0. 정렬 전 파일 출력\n//\t\t\tArrayList <String> key_lst = new ArrayList<String>(result_map.get(f_n).keySet());\n//\t\t\tfor (String kk : key_lst) {\n//\t\t\t\tSystem.out.println(kk + \" : \" + result_map.get(f_n).get(kk));\n//\t\t\t}\n\t\t\t\n\t\t\tArrayList<String> Top5List = sortHSbyValue_double(result_map.get(f_n));\n//\t\t\tSystem.out.println(Top5List);\n\t\t\tHashMap<String, Double> map = new HashMap<String, Double>();\n\t\t\tfor (String s : Top5List) {\n\t\t\t\tmap.put(s, result_map.get(f_n).get(s));\n\t\t\t}\n\n\t\t\ttop5.put(f_n, map);\t\n\t\t}\n\t\t\n\t\t// cosine_similarity\n\t\t// 구하기 전에 벡터의 차원을 맞춰준다.\n\t\t// input받는 파일을 제외한 나머지 파일들과의 유사도를 구한다.\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tSystem.out.print(\"문서 이름을 입력하세요 : \");\n\t\tString input = sc.next();\n\t\t\n\t\tHashMap<String, Double> csMap = new HashMap<String, Double>();\n\t\t\n\t\tfor (File f : fileList) {\n\t\t\tHashMap<String, Double> a = (HashMap<String, Double>) top5.get(input).clone();\n\t\t\tArrayList<String> a_key_lst = new ArrayList<String>(a.keySet());\n\t\t\tArrayList<String> total_key = new ArrayList<String>();\n\t\t\t\n\t\t\tif (input.equals(f.getName())) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tHashMap<String, Double> b = (HashMap<String, Double>) top5.get(f.getName()).clone();\n\t\t\tArrayList<String> b_key_lst = new ArrayList<String>(b.keySet());\n\t\t\t\n\t\t\tfor (String a_k : a_key_lst) {\n\t\t\t\ttotal_key.add(a_k);\n\t\t\t}\n\t\t\tfor (String b_k : b_key_lst) {\n\t\t\t\ttotal_key.add(b_k);\n\t\t\t}\n\t\t\t\n\t\t\tfor (String t_k : total_key) {\n\t\t\t\tif(!a.containsKey(t_k)) {\n\t\t\t\t\ta.put(t_k, (double)0);\n\t\t\t\t}\n\t\t\t\tif(!b.containsKey(t_k)) {\n\t\t\t\t\tb.put(t_k, (double)0);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tdouble[] a_lst = t3.mapToList(a);\n\t\t\tdouble[] b_lst = t3.mapToList(b);\n\t\t\tdouble cs = cosinSimilarity(a_lst, b_lst);\n\t\t\tcsMap.put(f.getName(), cs);\n\t\t\t\n\t\t\ta_key_lst.clear();\n\t\t\ttotal_key.clear();\n\t\t\t\n\t\t}\n\t\t\n\t\tt2.sort_print(csMap, input);\n\t\t\n\t\tSystem.out.println();\n\t}",
"public void updateTransitionMapSmooth(){\n\t\tfor(String yWord:transition_map.keySet()){\n\t\t\tHashMap<String,DataUnit> stateTransitionMap=transition_map.get(yWord).state_transition;\n\t\t\tHashMap<String,DataUnit> terminalTransitionMap=transition_map.get(yWord).terminal_transition;\n\t\t\t\n\t\t\t//count the total number of Nyo(y)\n\t\t\tint totalStateTransitionCount=0;\n\t\t\tfor(String nextY:stateTransitionMap.keySet()){\n\t\t\t\ttotalStateTransitionCount+=stateTransitionMap.get(nextY).count;\n\t\t\t}\n\t\t\t\n\t\t\tfor(String nextY:stateTransitionMap.keySet()){\n\t\t\t\tstateTransitionMap.get(nextY).prob=(stateTransitionMap.get(nextY).count*1.0)/totalStateTransitionCount;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t//count the total number of Nyo(x,y)\n\t\t\tint totalTerminalTransitionCount=0,unknown_count=0;\n\t\t\tfor(String xWord:terminalTransitionMap.keySet()){\n\t\t\t\ttotalTerminalTransitionCount+=terminalTransitionMap.get(xWord).count;\n\t\t\t\tif(unknown_set.contains(xWord)){\n\t\t\t\t\tunknown_count++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\ttotalTerminalTransitionCount+=unknown_count;\n\t\t\tterminalTransitionMap.put(unknown_word,new DataUnit(unknown_count,0.0));\n\t\t\t\n\t\t\tfor(String xWord:terminalTransitionMap.keySet()){\n\t\t\t\tterminalTransitionMap.get(xWord).prob=(terminalTransitionMap.get(xWord).count*1.0)/(totalTerminalTransitionCount);\n\t\t\t}\t\n\t\t}\n\t}",
"private void buildFreqMap() {\n\t\toriginalFreq = new HashMap<String, WordOccurence>();\n\n\t\tfor (ListIterator<Caption> itr = original.captionIterator(0); itr\n\t\t\t\t.hasNext();) {\n\t\t\tfinal Caption currentCap = itr.next();\n\t\t\tfinal String[] words = currentCap.getCaption().split(\"\\\\s+\");\n\t\t\tfor (int i = 0; i < words.length; i++) {\n\t\t\t\tfinal String lowerCasedWord = words[i].toLowerCase();\n\t\t\t\tif (originalFreq.containsKey(lowerCasedWord)) {\n\t\t\t\t\toriginalFreq.get(lowerCasedWord).addOccurence(\n\t\t\t\t\t\t\t(int) currentCap.getTime());\n\t\t\t\t} else {\n\t\t\t\t\tfinal WordOccurence occ = new WordOccurence(\n\t\t\t\t\t\t\t(int) currentCap.getTime());\n\t\t\t\t\toriginalFreq.put(lowerCasedWord, occ);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (int i = 0; i < identified.size(); i++) {\n\t\t\tResultChunk curretResult = identified.get(i);\n\t\t\tfinal String[] words = curretResult.getDetectedString().split(\n\t\t\t\t\t\"\\\\s+\");\n\t\t\tint identifiedAt = curretResult.getDetectedAt();\n\t\t\tfor (int j = 0; j < words.length; j++) {\n\t\t\t\tString currentWord = words[j].toLowerCase();\n\t\t\t\tif (originalFreq.containsKey(currentWord)) {\n\t\t\t\t\tint detectedAt = (int) (identifiedAt - (words.length - j)\n\t\t\t\t\t\t\t* AVG_WORD_TIME);\n\t\t\t\t\toriginalFreq.get(currentWord).addVoiceDetection(detectedAt);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void computeWords(){\n\n loadDictionary();\n\n CharacterGrid characterGrid = readCharacterGrid();\n\n Set<String> wordSet = characterGrid.findWordMatchingDictionary(dictionary);\n\n System.out.println(wordSet.size());\n for (String word : wordSet) {\n\t System.out.println(word);\n }\n\n // System.out.println(\"Finish scanning character grid in \" + (System.currentTimeMillis() - startTime) + \" ms\");\n }",
"SwiftScoredSet getTfIdf(String text,ASTNode n,boolean kgram)\n{\n Map<String,Integer> words = null;\n Map<String,Integer> totals = null;\n double tot = 0;\n if (kgram){\n words = buildKgramCounts(text,n);\n totals = kgram_counts;\n tot = total_kdocuments;\n } \n else {\n words = handleDocumentText(text);\n totals = document_counts;\n tot = total_documents;\n }\n double termtot = 1;\n \n for (Integer iv : words.values()) {\n termtot += iv;\n }\n \n SwiftScoredSet rslt = new SwiftScoredSet();\n for (Map.Entry<String,Integer> ent : words.entrySet()) {\n String wd = ent.getKey();\n double ct = ent.getValue();\n Integer docs = totals.get(wd);\n double docct = 0;\n if (docs != null) docct = docs;\n double idf = Math.log(tot/(1+docct));\n double tf = ct/termtot;\n double tfidf = tf*idf;\n rslt.add(wd,tfidf);\n }\n rslt.normalize();\n \n return rslt;\n}",
"@Override\n\tpublic void map(Object key, Text value, Context context)\n\tthrows IOException, InterruptedException {\n\tString[] words = value.toString().split(\"[ \\t]+\");\n\tfor(String originalWord:words)\n\t{\n\t\t//Remove all alphanumeric characters\n\t\toriginalWord = originalWord.replaceAll(\"[^a-zA-Z0-9]\",\"\");\n\t\t\n\t\t//Convert the words to lower case\n\t\t//word = word.toLowerCase();\n\t\n\t\tchar[] chars = originalWord.toCharArray();\n\t\tArrays.sort(chars);\n\t\tString sortedWord= new String(chars);\n\t\tcontext.write(new Text(sortedWord), new Text(originalWord));\n\t\tSystem.err.println(\"RKUMLOG:This is a mapper.\");\n\t}\n\t}",
"public void getVector() throws IOException {\n\t\tint i=1;\r\n\t\tfor(String key:keyword){\r\n\t\t\tWord w=new Word();\r\n\t\t\tdouble tf=calTF(key);\r\n\t\t\tdouble idf=calIDF(key);\r\n\t\t\tdouble tfidf=tf*idf;\r\n\t\t\tw.setId(i);\r\n\t\t\ti++;\r\n\t\t\tw.setName(key);\r\n\t\t\tw.setTfidf(tfidf);\r\n\t\t\tif(word.containsKey(key)){\r\n\t\t\t\tw.setCount((Integer) word.get(key));\r\n\t\t\t}\r\n\t\t\tkeymap.add(w);\r\n\t\t}\r\n\t\tFileHelper.writeTrainFile(keymap);\r\n\t\tFileHelper.writeTestFile(keymap);\r\n\t}",
"@Override\n public void postInserts() \n {\n for(IndexObject i: myIndex.values())\n {\n i.tfidf(documentData);\n }\n }",
"private void calculateIdf(){\r\n\t\tIdf = new HashMap<>();\r\n\t\tOcc = new HashMap<>();\r\n\t\t\r\n\t\tfor (Entry<String, Document> doc : Docs.entrySet()){\r\n\t\t\tdoc.getValue().wordSet.forEach(word -> {\r\n\t\t\t\tdouble count = Idf.containsKey(word) ? Idf.get(word) : 0;\r\n \tIdf.put(word, count+1);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tdoc.getValue().words.forEach((w, o) -> words.add(w));\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tfor (Entry<String, Double> e : new HashMap<>(Idf).entrySet()){\r\n\t\t\tIdf.put(e.getKey(),\r\n\t\t\t\t\tMath.log(Idf.keySet().size() / e.getValue()));\r\n\t\t}\r\n\t}",
"private Map<String,List<Invertedindex>> collecting() //\r\n {\r\n Map<String,List<Invertedindex>> maps = new TreeMap<>();\r\n for (Core pon:pondred){\r\n for(Map.Entry<String,Double> term:pon.allTerms.entrySet()){\r\n if (maps.containsKey(term.getKey())){\r\n List<Invertedindex> index = maps.get(term.getKey());\r\n index.add(new Invertedindex(pon.m_cle,term.getValue(),pon.getBalise(term.getKey())));\r\n maps.put(term.getKey(), index);\r\n }else {\r\n List<Invertedindex> index = new ArrayList<>();\r\n index.add(new Invertedindex(pon.m_cle,term.getValue(),pon.getBalise(term.getKey())));\r\n maps.put(term.getKey(), index);\r\n }\r\n if(cleFreq.containsKey(pon.m_cle))\r\n cleFreq.put(pon.m_cle,cleFreq.get(pon.m_cle)+term.getValue());\r\n else cleFreq.put(pon.m_cle,term.getValue());\r\n\r\n }\r\n }\r\n return maps;\r\n }",
"private void initIDFMap(List<List<Map<String,List<Double>>>> tfMap){\n\t\tfor (int i = 0; i < tfMap.size(); i++) {\n\t\t\tList<Map<String,List<Double>>> gestureDocument = tfMap.get(i);\n\t\t\tfor (int j = 0; j < gestureDocument.size(); j++) {\n\t\t\t\tMap<String,List<Double>> tempMap = gestureDocument.get(j);\n\t\t\t\tIterator<Entry<String, List<Double>>> it = tempMap.entrySet().iterator();\n\t\t\t\t while (it.hasNext()) {\n\t\t\t\t Map.Entry<String,Integer> pairs = (Map.Entry)it.next(); \n\t\t\t\t if(getTfIDFMapGlobal().containsKey(pairs.getKey()))\n\t\t\t\t \tgetTfIDFMapGlobal().put(pairs.getKey(), getTfIDFMapGlobal().get(pairs.getKey())+1);\n\t\t\t\t else\n\t\t\t\t \tgetTfIDFMapGlobal().put(pairs.getKey(), 1);\n\t\t\t\t }\n\t\t\t}\n\t\t}\n\t}",
"protected Float additionalTransformation(String term, Float value){\n\t\tif(!ENABLE_ADD_NORMALIZATION) return value;\n\t\t\n\t\tFloat result = value;\n\t\t//result *= this.weightTermUniqeness(term); \n\t\tresult = this.sigmoidSmoothing(result);\n\t\t\n\t\treturn result;\n\t}",
"public void replaceThesarusWordwithGoogleWord ( ) {\r\n\t \t\t \t\r\n\t \tfor (Map.Entry<String, List<String>> entry : GoogleToThesarus.entrySet()) {\r\n\t String key = entry.getKey();\r\n\t List<String> values = entry.getValue();\r\n\t //String wordIsReplaced=null;\r\n\t \r\n\t for (String temp: values) {\r\n\t \t//why is this null\r\n\t \t\r\n\t \tif (splitto.equals(temp)) {\r\n\t \t\tsplitto=key;\r\n\t \t\tif(!replacedWordList.contains(splitto))\r\n\t \t\t\treplacedWordList.add(splitto);\r\n \t\t\r\n\t \t \t\t \t\t}\r\n\t \telse {\r\n\t \t\t//wordIsReplaced=splitto;\r\n\t \t\t//System.out.println(\"failed\");\r\n\t \t}\r\n\t \t\t }\r\n\t \t}\r\n\t }",
"public void tempArray() {\n for (int i = 0; i < newWord.length(); i++) {\n for (String c : keySetNewWord) {\n if(String.valueOf(newWord.charAt(i)).equals(c)) {\n int p = mapNewWord.get(c) + 1;\n mapNewWord.put(c, p);\n }\n }\n }\n }",
"public static void main(String[] args, String str) {\n\t\tHashMap<String, HashMap<String, Double>> file_alph_tf = new HashMap<String, HashMap<String, Double>>();\n\t\tHashMap<String, Double> file_alph_idf = new HashMap<String, Double>();\n\t\tHashMap<String, Double> tmp_idf = new HashMap<String, Double>();\n\t\tHashMap<String, HashMap<String, Double>> result_map = new HashMap<String, HashMap<String, Double>>();\n\t\t// 이후에 cosine similarity를 계산할때 사용할 top5해쉬맵\n\t\tHashMap<String, HashMap<String, Double>> top5 = new HashMap<String, HashMap<String, Double>>();\n\t\t\n\t\tTest01 t1 = new Test01();\n\t\tTest02 t2 = new Test02();\n\t\tTest03 t3 = new Test03();\n\t\t\n\t\t// 입력\n\t\t\n\t\tFile[] fileList = t1.get_file();\n\t\t\n\t\tfor (File file : fileList) {\n\t\t\t\n\t\t\tHashMap <String, Double> tmp_map = new HashMap <String, Double>();\n\t\t\t\n\t\t\t// count alphabet _ each files\n\t\t\ttry {\n\t\t\t\tFileReader file_reader = new FileReader(file);\n\t\t\t\tint cur = 0;\n\t\t\t\twhile ((cur = file_reader.read()) != -1) {\n\t\t\t\t\tif (cur != 32) {\n\t\t\t\t\t\tif (!tmp_map.containsKey(String.valueOf((char)cur))) {\n\t\t\t\t\t\t\ttmp_map.put(String.valueOf((char)cur), (double) 1);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tdouble temp_num = tmp_map.get(String.valueOf((char)cur));\n\t\t\t\t\t\t\ttmp_map.put(String.valueOf((char)cur),temp_num+1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch(FileNotFoundException e) {\n\t\t\t\te.getStackTrace();\n\t\t\t} catch(IOException e) {\n\t\t\t\te.getStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t// calc_TF\n\t\t\tArrayList<String> key_lst = new ArrayList<String>(tmp_map.keySet());\n\t\t\tdouble sum_value = 0;\n\t\t\t// TF의 분모 문서내에 오는 모든수 더하기\n\t\t\tfor (String k : key_lst) {\n\t\t\t\tsum_value += tmp_map.get(k);\t\n\t\t\t}\n\t\t\t// TF의 분자 : 해당 파일에 있는 알파벳의 갯수 (tmp_map에 저장되어있음) / tf분모\n\t\t\tfor (String tf_k : key_lst) {\n\t\t\t\tdouble tf = tmp_map.get(tf_k) / sum_value;\n\t\t\t\ttmp_map.put(tf_k, tf);\n\t\t\t}\n\t\t\tsum_value = 0;\n\t\t\tfile_alph_tf.put(file.getName(), tmp_map);\n\t\t\t\n\t\t\t// calc_IDF_Bottom : counting IDF_Bottom\n\t\t\ttmp_idf = file_alph_tf.get(file.getName());\n\t\t\t\n\t\t\tfor (String idf_k : key_lst) {\n\t\t\t\tif (tmp_idf.get(idf_k) != 0) {\n\t\t\t\t\tif (!file_alph_idf.containsKey(idf_k)) {\n\t\t\t\t\t\tfile_alph_idf.put(idf_k, (double) 1);\n\t\t\t\t\t}else {\n\t\t\t\t\t\tdouble tmp_num = file_alph_idf.get(idf_k);\n\t\t\t\t\t\tfile_alph_idf.put(idf_k, tmp_num+1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t} // file의 이름으로 반복\n\t\t\n\t\t\n\t\t\n\t\t// calc_IDF\n\t\tfor (File file : fileList) {\n\t\t\tHashMap<String, Double> aa = new HashMap<String, Double>();\n\t\t\tArrayList<String> key_lst = new ArrayList<String>(file_alph_idf.keySet());\n\t\t\tdouble temp_num = 0;\n\t\t\tfor (String key : key_lst) {\n\t\t\t\t\n\t\t\t\tdouble tf;\n\t\t\t\ttemp_num = 0;\n\t\t\t\ttry {\n\t\t\t\t\ttf = file_alph_tf.get(file.getName()).get(key);\n\t\t\t\t\tif (file_alph_idf.get(key) != 0) {\n\t\t\t\t\t\tdouble tt = file_alph_idf.get(key);\n\t\t\t\t\t\ttemp_num = 7/tt;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttemp_num = 0;\n\t\t\t\t\t}\n\t\t\t\t} catch(NullPointerException e) {\n\t\t\t\t\ttf = 0;\n\t\t\t\t}\n\t\t\t\tdouble idf = Math.log(1+ temp_num);\n\t\t\t\tdouble tfidf = tf*idf;\n\t\t\t\taa.put(key, tfidf);\n\t\t\t}\n\t\t\tresult_map.put(file.getName(), aa);\n\t\t}\t\n\t\n\t\t\n\t\t\n\t\t\n\t\tfor(File f : fileList) {\n\t\t\t\n\t//---------------------------------------상위 5개-------------------------------------------\t\t\t\n\t\t\t\n//\t\t\t\n\t\t\tString f_n = f.getName(); \n//\t\t\tSystem.out.println(f_n);\n\t\t\t// 0. 정렬 전 파일 출력\n//\t\t\tArrayList <String> key_lst = new ArrayList<String>(result_map.get(f_n).keySet());\n//\t\t\tfor (String kk : key_lst) {\n//\t\t\t\tSystem.out.println(kk + \" : \" + result_map.get(f_n).get(kk));\n//\t\t\t}\n\t\t\t\n\t\t\tArrayList<String> Top5List = sortHSbyValue_double(result_map.get(f_n));\n\t\t\tHashMap<String, Double> map = new HashMap<String, Double>();\n\t\t\tfor (String s : Top5List) {\n\t\t\t\tmap.put(s, result_map.get(f_n).get(s));\n\t\t\t}\n\n\t\t\ttop5.put(f_n, map);\n\t\t\t\n\t\t}\n\t\t\n\t\t// cosine_similarity\n\t\t// 구하기 전에 벡터의 차원을 맞춰준다.\n\t\t// input받는 파일을 제외한 나머지 파일들과의 유사도를 구한다.\n\t\tString input = str;\n\t\tHashMap<String, Double> csMap = new HashMap<String, Double>();\n\t\t\n\t\tfor (File f : fileList) {\n\t\t\tHashMap<String, Double> a = (HashMap<String, Double>) top5.get(input).clone();\n\t\t\tArrayList<String> a_key_lst = new ArrayList<String>(a.keySet());\n\t\t\tArrayList<String> total_key = new ArrayList<String>();\n\t\t\t\n\t\t\tif (input.equals(f.getName())) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tHashMap<String, Double> b = (HashMap<String, Double>) top5.get(f.getName()).clone();\n\t\t\tArrayList<String> b_key_lst = new ArrayList<String>(b.keySet());\n\t\t\t\n\t\t\tfor (String a_k : a_key_lst) {\n\t\t\t\ttotal_key.add(a_k);\n\t\t\t}\n\t\t\tfor (String b_k : b_key_lst) {\n\t\t\t\ttotal_key.add(b_k);\n\t\t\t}\n\t\t\t\n\t\t\tfor (String t_k : total_key) {\n\t\t\t\tif(!a.containsKey(t_k)) {\n\t\t\t\t\ta.put(t_k, (double)0);\n\t\t\t\t}\n\t\t\t\tif(!b.containsKey(t_k)) {\n\t\t\t\t\tb.put(t_k, (double)0);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tdouble[] a_lst = t3.mapToList(a);\n\t\t\tdouble[] b_lst = t3.mapToList(b);\n\t\t\tdouble cs = cosinSimilarity(a_lst, b_lst);\n\t\t\tcsMap.put(f.getName(), cs);\n\t\t\t\n\t\t\ta_key_lst.clear();\n\t\t\ttotal_key.clear();\n\t\t\t\n\t\t}\n\n\t\tt2.sort_print(csMap, input);\n\t\t\n\t\tSystem.out.println();\n\t}",
"public static void InvertedDocFrequency() throws FileNotFoundException {\n //int totalDoc = totaldocument;\n int i = 0;\n for(Entry<String, List<Integer>> entry: dictionary.entrySet()) {\n List<Integer> docFrequency = new ArrayList<>();\n //\tList<Double> idfValue = new ArrayList<>();\n docFrequency = entry.getValue(); //again taking the list of word terms from the same dictionary hashmap\n int df = docFrequency.get(totaldocument+1); // it will save the idf of every word term at the 57th index\n double ans = Math.log10(df);\n ans /= totaldocument;\n\n idfFinal.add(i,ans); //updatin\n i++;\n }\n saveidf();\n }",
"private static void buildTrainingSet(ArrayList<ArrayList<String>> posTrainSet, HashMap<String, Integer> hashMap1,\r\n\t\t\tHashMap<String, Integer> hashMap2)\r\n\t{\n\tfor (ArrayList<String> currentReview : posTrainSet) \r\n\t{ \t\r\n\t \t\r\n \tint negation = 0;\r\n \t\r\n \tfor(String word : currentReview)\r\n {\r\n \t\t//ADD OTHER NEGATIVE WORDS.ALSO CONSIDER NOT ONLY AND NEITHER NOR\r\n \tif(word.equals(\"not\") || word.equals(\"but\") || word.equals(\"no\") || word.equals(\"never\"))\r\n \t{\r\n \t\tnegation = 1- negation;\r\n \t}\r\n \telse if(word.equals(\".\"))\r\n \t{\r\n \t\tnegation =0;\r\n \t}\r\n \telse if(negation == 0)\r\n \t{\r\n \t\tInteger count = hashMap1.get(word);\r\n \t\t if (count == null) {\r\n \t\t count = 0;\r\n \t\t }\r\n \t\t hashMap1.put(word, count + 1);\r\n \t\t \r\n \t\t //ADD TO NEGATIVE NOT_WORD\r\n \t\t String negForm = \"NOT_\"+ word;\r\n \t\t count = hashMap2.get(negForm);\r\n \t\t if (count == null) {\r\n \t\t count = 0;\r\n \t\t }\r\n \t\t hashMap2.put(negForm, count + 1);\r\n \t\t \r\n \t}\r\n \telse\r\n \t{\r\n \t\tString negForm = \"NOT_\"+ word;\r\n \t\tInteger count = hashMap1.get(negForm);\r\n \t\t if (count == null) {\r\n \t\t count = 0;\r\n \t\t }\r\n \t\t hashMap1.put(negForm, count + 1);\r\n \t}\r\n \t\r\n }\r\n\t\r\n }\r\n\t}",
"private static void feedMapWithWordList(List<String> wordList, HashMap<String, Long> dataMap) {\n\n\t\tfor(int i = 0, size = wordList.size(); i < size; i++) { // Go through the list of words being fed - if a word already exists, add 1 to its frequency; otherwise, create a new key and give it a value of 1\n\n\t\t\tfinal String word = wordList.get(i);\n\n\t\t\tif(dataMap.containsKey(word))\n\n\t\t\t\tdataMap.replace(word, dataMap.get(word) + 1);\n\n\t\t\telse\n\n\t\t\t\tdataMap.put(word, 1L);\n\t\t}\n\t}",
"public static void tfidfTemplateWeights(HashMap<String, Double> wordWeights, Collection<TemplateFormat> allTemplates) {\r\n\t\tfor(Entry<String, Double> entry : wordWeights.entrySet()) {\r\n\t\t\tint appearances = 0;\r\n\t\t\t// Try to find this word in all templates\r\n\t\t\tfor(TemplateFormat template : allTemplates) {\r\n\t\t\t\tif(searchWordInTemplate(template, entry.getKey())) appearances ++;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Modify weights to respect tfidf\r\n\t\t\t// Formula from here http://ethen8181.github.io/machine-learning/clustering_old/tf_idf/tf_idf.html\r\n\t\t\tentry.setValue(entry.getValue() * Math.log(allTemplates.size() * 1.0 / (1 + appearances)));\r\n\t\t}\r\n\t}",
"public void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException\n {\n String line = value.toString().toLowerCase();\n\n // Splitting into doc number and its text\n String document_split[] = line.split(\"\\t\",2);\n Text document_number = new Text(document_split[0]);\n\n // Replace all non alphabetic characters and non spaces with a space\n String document_content=document_split[1].replaceAll(\"[^ a-z]+\", \" \");\n\n String bigram_word_1=null;\n String bigram_word_2=null;\n // Tokenize into words\n StringTokenizer tokenizer = new StringTokenizer(document_content);\n int x=0;\n while(tokenizer.hasMoreTokens())\n {\n x+=1;\n if(x==1)\n {\n bigram_word_1=tokenizer.nextToken();\n }\n else\n {\n bigram_word_2=tokenizer.nextToken();\n String bigram_pair_string=bigram_word_1+\" \"+bigram_word_2;\n bigram_pair.set(bigram_pair_string);\n context.write(bigram_pair, document_number);\n break;\n }\n }\n while(tokenizer.hasMoreTokens())\n {\n bigram_word_1=bigram_word_2;\n bigram_word_2=tokenizer.nextToken();\n String bigram_pair_string=bigram_word_1+\" \"+bigram_word_2;\n bigram_pair.set(bigram_pair_string);\n context.write(bigram_pair, document_number);\n }\n }",
"private void buildLanguageModel() {\n int total = 0;\n Map<Integer, Integer> wordCount = new HashMap<>();\n for (List<Integer> story : corpus.getStories()) {\n for (Integer word : story) {\n total++;\n if (wordCount.get(word) == null) wordCount.put(word, 0);\n wordCount.put(word, wordCount.get(word) + 1);\n }\n }\n wordValues = new HashMap<>();\n for (Map.Entry<Integer, Integer> entry : wordCount.entrySet()) {\n wordValues.put(entry.getKey(), total * 1.0 / entry.getValue());\n }\n }",
"public void analyzeDocument(String text) {\n\t\tString[] tokens = m_tokenizer.tokenize(text.toLowerCase());\n\t\tfor (int j = 0; j < tokens.length; j++)\n\t\t\ttokens[j] = SnowballStemmingDemo(NormalizationDemo(tokens[j]));\n\t\tHashMap<String, Integer> document_tf = new HashMap<String, Integer>();\n\t\tfor (String token : tokens) {\n\t\t\tif (!document_tf.containsKey(token))\n\t\t\t\tdocument_tf.put(token, 1);\n\t\t\telse\n\t\t\t\tdocument_tf.put(token, document_tf.get(token) + 1);\n\t\t\tif (!df.containsKey(token))\n\t\t\t\tdf.put(token, 1);\n\t\t\telse\n\t\t\t\tdf.put(token, df.get(token) + 1);\n\t\t}\n\t\ttf.add(document_tf);\n\t\t/*\n\t\t * for(String token : document_tf.keySet()) { if(!df.containsKey(token))\n\t\t * df.put(token, 1); else df.put(token, df.get(token) + 1); if(!) }\n\t\t */\n\t\tm_reviews.add(text);\n\t}",
"private static void setWordPosition() {\n\t\tSet setKeys = Utility.vocabHM.keySet();\n\t\tIterator i = setKeys.iterator();\n\t\tint position = 0;\n\t\twhile (i.hasNext()) {\n\t\t\tString w = (String) i.next();\n\t\t\tInteger rows[] = new Integer[2];\n\t\t\trows[0] = new Integer(position); /* word position */\n\t\t\trows[1] = (Integer) Utility.vocabHM.get(w); /* df */\n\n\t\t\tUtility.vocabHM.put(w, rows);\n\t\t\tposition++;\n\t\t}\n\t}",
"public ArrayList<String> predict(String sentence){\r\n\t\t//Splits the String and creates the necessary maps\r\n\t\tString words[] = sentence.split(\" \");\r\n\t\tSystem.out.println(\"SENTENCE \" + sentence + \" LENGTH \" + words.length);\r\n\t\tTreeMap<String, Float> prevscores = new TreeMap<String, Float>();\r\n\t\tArrayList<TreeMap<String, String>> backtrack = new ArrayList<TreeMap<String, String>>(); \r\n\t\tFloat zero = new Float(0);\r\n\t\tprevscores.put(\"start\", zero);\r\n\t\t//Looping over every word in the String\r\n\t\tfor (int i = 0; i < words.length; i++){\r\n\t\t\tTreeMap<String, Float> scores = new TreeMap<String, Float>();\r\n\t\t\tSet<String> keys = prevscores.keySet();\r\n\t\t\tbacktrack.add(new TreeMap<String, String>());\r\n\t\t\t//Looping over all the previous states\r\n\t\t\tfor(String state : keys){\r\n\t\t\t\tSet<String> tagKeys = this.transMap.get(state).keySet();\r\n\t\t\t\t//Looping over all the possible states\r\n\t\t\t\tfor(String tagKey : tagKeys){\r\n\t\t\t\t\r\n\t\t\t\t\tfloat nextscore = (prevscores.get(state) + this.transMap.get(state).get(tagKey));\r\n\t\t\t\t\tif(this.emissionMap.containsKey(tagKey) && this.emissionMap.get(tagKey).containsKey(words[i])){\r\n\t\t\t\t\t\tnextscore += this.emissionMap.get(tagKey).get(words[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse nextscore += -200;\r\n\t\t\t\t\tif(!scores.containsKey(tagKey) || nextscore > scores.get(tagKey)){\r\n\t\t\t\t\t\tscores.put(tagKey, nextscore);\r\n\t\t\t\t\t\tbacktrack.get(i).put(tagKey, state);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tprevscores = scores;\r\n\r\n\t\t}\r\n\t\tString finalState = \"\";\r\n\t\tSet<String> prevKeys = prevscores.keySet();\r\n\t\tfloat max = -100000;\r\n\t\tfor(String key : prevKeys){\r\n\t\t\tfloat num = prevscores.get(key);\r\n\t\t\tif(num > max) {\r\n\t\t\t\tmax = num;\r\n\t\t\t\tfinalState = key;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tString[] end_states = new String[sentence.split(\" \").length];\r\n\t\tend_states[backtrack.size() - 1] = finalState;\r\n\r\n\t\tString state = finalState;\r\n\t\tfor(int i = backtrack.size() - 1; i>=1; i-- ) {\r\n\t\t\tstate = backtrack.get(i).get(state);\r\n\t\t\tend_states[i - 1] = state;\r\n\t\t}\r\n\t\t\r\n\t\tArrayList<String> sequence = new ArrayList<String>();\r\n\t\tfor(int i = 0; i < end_states.length; i++) {\r\n\t\t\tsequence.add(end_states[i]);\r\n\t\t}\r\n\t\treturn sequence;\r\n\t}",
"public void performLaplaceSmoothing() {\n // YOUR CODE HERE\n String w1, w2;\n for (int i = 0; i < NDTokens.size(); i++) {\n w1 = NDTokens.get(i);\n for (int j = 0; j < NDTokens.size(); j++) {\n w2 = NDTokens.get(j);\n // Adding one with everything\n bi_grams[NDTokens.indexOf(w1)][NDTokens.indexOf(w2)]++;\n }\n }\n smooth = true;\n normalize();\n }",
"@Override\n protected void map(\n \t\tLongWritable key, // input key type\n Text value, // input value type\n Context context) throws IOException, InterruptedException {\n\n \t\t//Create array with the words from input, splitted by space character\n String[] words = value.toString().split(\"\\\\s+\");\n \n for (String string : words) {\n \t//Remove not alphabetic characters\n \tString cleanWord = string.replaceAll(\"[^\\\\p{Alpha}]\", \"\");\n \t//Export lowercased word along with the name of the file the word comes from \n \tif (!cleanWord.isEmpty()) {\n\t\t\t\t\tcontext.write(new Text(cleanWord.toLowerCase()),new Text(((FileSplit)context.getInputSplit()).getPath().getName()));\n\t\t\t\t}\n\t\t\t}\n }",
"public void calculateTermWeights() {\n\t\tfor (String termString : terms.keySet()) {\n\t\t\tTerm t = terms.get(termString);\n\t\t\tMap<Integer, TermDoc> posting = t.getPostings();\n\n\t\t\t// Iterate through the docs in which the selected term is found.\n\t\t\tfor (Integer docId : posting.keySet()) {\n\n\t\t\t\tTermDoc td = posting.get(docId);\n\t\t\t\tDocument doc = this.getDocument(docId);\n\n\t\t\t\tfinal double a = 0.4;\n\t\t\t\tdouble ntf = a + (1 - a) * (double) td.getFreq() / (double) doc.getMaxTermFreq();\n\t\t\t\tdouble idf = Math.log((double) documents.size() / (1 + (double) t.getDocFreq()));\n\t\t\t\tdoc.addWeight(termString, ntf * idf);\n\t\t\t}\n\t\t}\n\n\t\tfor (Document doc : documents.values())\n\t\t\tdoc.setEuclideanDistance();\n\t}",
"public static HashMap<String, HashMap<String, Double>> fileToObv(String wordsPathName, String posPathName) throws IOException{\n //initialize BufferedReaders and ap to put observations in\n BufferedReader wordsInput = null;\n BufferedReader posInput = null;\n HashMap<String, HashMap<String, Double>> observations = new HashMap<String, HashMap<String, Double>>();\n try{\n //try to open files\n posInput = new BufferedReader(new FileReader(posPathName));\n wordsInput = new BufferedReader(new FileReader(wordsPathName));\n String posLine = posInput.readLine();\n String wordsLine = wordsInput.readLine();\n //While there are more lines in each of the given files\n while (wordsLine != null && posLine != null){\n //Lowercase the sentence file, and split both on white space\n wordsLine = wordsLine.toLowerCase();\n //posLine = posLine.toLowerCase();\n String[] wordsPerLine = wordsLine.split(\" \");\n String[] posPerLine = posLine.split(\" \");\n //Checks for the '#' character, if it's already in the map,\n //checks if the first word in the sentence is already in the inner map\n //if it is, then add 1 to the integer value associated with it, if not,\n //add it to the map with an integer value of 1.0\n if (observations.containsKey(\"#\")){\n HashMap<String, Double> wnc = new HashMap<String, Double>();\n wnc = observations.get(\"#\");\n if (wnc.containsKey(wordsPerLine[0])){\n Double num = wnc.get(wordsPerLine[0]) +1;\n wnc.put(wordsPerLine[0], num);\n observations.put(\"#\", wnc);\n }\n else{\n wnc.put(wordsPerLine[0], 1.0);\n observations.put(\"#\", wnc);\n }\n }\n else{\n HashMap<String, Double> map = new HashMap<String, Double>();\n map.put(wordsPerLine[0], 1.0);\n observations.put(\"#\", map);\n }\n //for each word in line of the given string\n for (int i = 0; i < wordsPerLine.length-1; i ++){\n HashMap<String, Double> wordsAndCounts = new HashMap<String, Double>();\n //if the map already contains the part of speech\n if (observations.containsKey(posPerLine[i])){\n //get the inner map associated with that part of speech\n wordsAndCounts = observations.get(posPerLine[i]);\n //if that inner map contains the associated word\n //add 1 to the integer value\n if (wordsAndCounts.containsKey(wordsPerLine[i])){\n Double num = wordsAndCounts.get(wordsPerLine[i]) + 1;\n wordsAndCounts.put(wordsPerLine[i], num);\n }\n //else, add the word to the inner map with int value of 1\n else{\n wordsAndCounts.put(wordsPerLine[i], 1.0);\n }\n }\n //else, add the word to an empty map with the int value of 1\n else{\n wordsAndCounts.put(wordsPerLine[i], 1.0);\n }\n //add the part of speech and associated inner map to the observations map.\n observations.put(posPerLine[i], wordsAndCounts);\n }\n //read the next lines in each of the files\n posLine = posInput.readLine();\n wordsLine = wordsInput.readLine();\n }\n }\n //Catch exceptions\n catch (IOException e){\n e.printStackTrace();\n }\n //close files\n finally{\n wordsInput.close();\n posInput.close();\n }\n //return created map\n return observations;\n }",
"void Create(){\n map = new TreeMap<>();\r\n\r\n // Now we split the words up using punction and spaces\r\n String wordArray[] = wordSource.split(\"[{ \\n\\r.,]}}?\");\r\n\r\n // Now we loop through the array\r\n for (String wordArray1 : wordArray) {\r\n String key = wordArray1.toLowerCase();\r\n // If this word is not present in the map then add it\r\n // and set the word count to 1\r\n if (key.length() > 0){\r\n if (!map.containsKey(map)){\r\n map.put(key, 1);\r\n }\r\n else {\r\n int wordCount = map.get(key);\r\n wordCount++;\r\n map.put(key, wordCount);\r\n }\r\n }\r\n } // end of for loop\r\n \r\n // Get all entries into a set\r\n // I think that before this we just have key-value pairs\r\n entrySet = map.entrySet();\r\n \r\n }",
"@Override\n public List<Prediction> predictWord(final String string) {\n Trace.beginSection(\"predictWord\");\n\n Trace.beginSection(\"preprocessText\");\n Log.e(TAG, \"inut_string: \" + string);\n //TODO\n\n String[] input_words = string.split(\" \");\n data_len[0] = input_words.length;\n Log.e(TAG, \"data_len: \" + data_len[0]);\n //intValues = new int[input_words.length];\n if (input_words.length < input_max_Size) {\n for (int i = 0; i < input_words.length; ++i) {\n Log.e(TAG, \"input_word: \" + input_words[i]);\n if (word_to_id.containsKey(input_words[i])) intValues[i] = word_to_id.get(input_words[i]);\n else intValues[i] = 6; //rare words, <unk> in the vocab\n Log.e(TAG, \"input_id: \" + intValues[i]);\n }\n for (int i = input_words.length; i < input_max_Size; ++i) {\n intValues[i] = 0; //padding using <eos>\n Log.e(TAG, \"input_id: \" + intValues[i]);\n }\n }\n else {\n Log.e(TAG, \"input out of max Size allowed!\");\n return null;\n }\n Trace.endSection();\n // Copy the input data into TensorFlow.\n Trace.beginSection(\"fillNodeFloat\");\n // TODO\n inferenceInterface.fillNodeInt(inputName, new int[] {1, input_max_Size}, intValues);\n Log.e(TAG, \"fillNodeInt success!\");\n inferenceInterface.fillNodeInt(inputName2, new int[] {1}, data_len);\n Log.e(TAG, \"fillDATA_LEN success!\");\n Trace.endSection();\n\n // Run the inference call.\n Trace.beginSection(\"runInference\");\n inferenceInterface.runInference(outputNames);\n Log.e(TAG, \"runInference success!\");\n Trace.endSection();\n\n // Copy the output Tensor back into the output array.\n Trace.beginSection(\"readNodeFloat\");\n inferenceInterface.readNodeFloat(outputName, outputs);\n Log.e(TAG, \"readNodeFloat success!\");\n Trace.endSection();\n\n // Find the best predictions.\n PriorityQueue<Prediction> pq = new PriorityQueue<Prediction>(3,\n new Comparator<Prediction>() {\n @Override\n public int compare(Prediction lhs, Prediction rhs) {\n // Intentionally reversed to put high confidence at the head of the queue.\n return Float.compare(rhs.getConfidence(), lhs.getConfidence());\n }\n });\n for (int i = 0; i < outputs.length; ++i) { //don't show i = 0 <unk>; i = 1<eos>\n if (outputs[i] > THRESHOLD) {\n pq.add(new Prediction(\"\" + i, id_to_word.get(i), outputs[i]));\n }\n }\n final ArrayList<Prediction> predictions = new ArrayList<Prediction>();\n for (int i = 0; i < Math.min(pq.size(), MAX_RESULTS); ++i) {\n predictions.add(pq.poll());\n }\n for (int i = 0; i < predictions.size(); ++i) {\n Log.e(TAG, predictions.get(i).toString());\n }\n Trace.endSection(); // \"predict word\"\n return predictions;\n }",
"public double calTF(String key) throws IOException {\n\t\tList<String> in = FileHelper.readFile(Constants.inputpath);\r\n\t\tStringBuffer sb=new StringBuffer();\r\n\t\tfor (String s:in){\r\n\t\t\tsb.append(s.trim()+\" \");\r\n\t\t}\r\n\t\tString[] input = sb.toString().trim().split(\" \");\r\n\t\tint num=0;\r\n\t\tfor(String cutword:input){\r\n\t\t\tif (cutword.equals(key)){\r\n\t\t\t\tnum++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tdouble tf=(double)num/input.length;\r\n\t\treturn tf;\r\n\t}",
"private void initiateWordCount(){\n for(String key: DataModel.bloomFilter.keySet()){\n WordCountHam.put(key, 0);\n WordCountSpam.put(key, 0);\n }\n }",
"@Override\n\tprotected void map(LongWritable key, Text value,Context context)\n\t\t\tthrows IOException, InterruptedException {\n\t\tString line=value.toString();\n\t\t//String[] words=line.split(\" \");\n\t\tStringTokenizer tokenizer=new StringTokenizer(line); //another way better datastructure\n\t\twhile(tokenizer.hasMoreTokens()){\n\t\t\tString word = tokenizer.nextToken();\n\t\t\t\n\t\t\toutkey.set(word); //outkey value reset\n\t\t\tcontext.write(outkey,outvalue);\n\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}",
"public static void calcuTFIDF() throws IOException {\n\n\t\tHashtable<String, Double> idf = new Hashtable<String, Double>();\n\t\tArrayList<String> terms = new ArrayList<String>();\n\t\tdouble fileCount = 0.0;\n\t\tString featurePath = \"./corpus/features\";\n\t\tString featureWeight = \"./corpus/featureWeight\";\n\t\tString trainPath = \"./corpus/trainData\";\n\t\tString testPath = \"./corpus/testData\";\n\t\tString stopPath = \"./corpus/english.stop\";\n\t\tString trainOutPath = \"./corpus/trainVectors\";\n\t\tString testOutPath = \"./corpus/testVectors\";\n\t\tBufferedReader br = new BufferedReader(new FileReader(featurePath));\n\t\tBufferedWriter featureWriter = new BufferedWriter(new FileWriter(\n\t\t\t\tfeatureWeight));\n\t\tBufferedReader trainReader = new BufferedReader(new FileReader(\n\t\t\t\ttrainPath));\n\t\tBufferedReader testReader = new BufferedReader(new FileReader(testPath));\n\t\tBufferedReader br2 = new BufferedReader(new FileReader(stopPath));\n\t\tBufferedWriter writer = new BufferedWriter(new FileWriter(trainOutPath));\n\t\tBufferedWriter testWriter = new BufferedWriter(new FileWriter(\n\t\t\t\ttestOutPath));\n\t\tString oneline;\n\t\tArrayList<String> as = new ArrayList<String>();\n\t\twhile ((oneline = br2.readLine()) != null) {\n\t\t\tas.add(oneline);\n\t\t}\n\t\tString[] stopWords = new String[as.size()];\n\t\tas.toArray(stopWords);\n\t\tAnalyzer analyzer = new SnowballAnalyzer(\"English\", stopWords);\n\n\t\twhile ((oneline = br.readLine()) != null) {\n\t\t\tidf.put(oneline, 0.0);\n\t\t\tterms.add(oneline);\n\t\t}\n\n\t\twhile ((oneline = trainReader.readLine()) != null) {\n\n\t\t\tint pos = oneline.indexOf(\"\\t\");\n\t\t\tString topic = oneline.substring(0, pos);\n\t\t\tString content = oneline.substring(pos + 1);\n\t\t\tfileCount++;\n\t\t\tHashtable<String, Integer> termList = new Hashtable<String, Integer>();\n\t\t\tTokenStream stream = analyzer.tokenStream(\"\", new StringReader(\n\t\t\t\t\tcontent));\n\t\t\twhile (true) {\n\t\t\t\tToken token = stream.next();\n\t\t\t\tif (token == null)\n\t\t\t\t\tbreak;\n\t\t\t\tString tmp = token.termText();\n\t\t\t\tif (!termList.containsKey(tmp))\n\t\t\t\t\ttermList.put(tmp, new Integer(1));\n\t\t\t}\n\t\t\tSet<String> keys = termList.keySet();\n\t\t\tfor (String tmp : keys) {\n\t\t\t\tif (idf.containsKey(tmp)) {\n\t\t\t\t\tDouble num = idf.get(tmp);\n\t\t\t\t\tidf.put(tmp, num + 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (String term : terms) {\n\n\t\t\tdouble weightOfTerm = Math.log((double) fileCount / idf.get(term)\n\t\t\t\t\t+ 0.01);\n\t\t\tfeatureWriter.write(term + \" \" + weightOfTerm);\n\t\t\tfeatureWriter.newLine();\n\t\t\tidf.put(term, weightOfTerm);\n\n\t\t}\n\t\tfeatureWriter.flush();\n\t\tfeatureWriter.close();\n\n\t\ttrainReader = new BufferedReader(new FileReader(trainPath));\n\t\twhile ((oneline = trainReader.readLine()) != null) {\n\n\t\t\tint pos = oneline.indexOf(\"\\t\");\n\t\t\tString topic = oneline.substring(0, pos);\n\t\t\tString content = oneline.substring(pos + 1);\n\t\t\tHashtable<String, Integer> termFrequent = new Hashtable<String, Integer>();\n\t\t\tTokenStream stream = analyzer.tokenStream(\"\", new StringReader(\n\t\t\t\t\tcontent));\n\t\t\twhile (true) {\n\t\t\t\tToken token = stream.next();\n\t\t\t\tif (token == null)\n\t\t\t\t\tbreak;\n\t\t\t\tString tmp = token.termText();\n\t\t\t\tif (!termFrequent.containsKey(tmp))\n\t\t\t\t\ttermFrequent.put(tmp, new Integer(1));\n\t\t\t\telse {\n\t\t\t\t\tInteger num = termFrequent.get(tmp);\n\t\t\t\t\ttermFrequent.put(tmp, num + 1);\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble weights[] = new double[terms.size()];\n\t\t\tdouble denominator = 0.0;\n\t\t\tint i = 0;\n\t\t\tfor (String term : terms) {\n\t\t\t\tdouble count;\n\t\t\t\tif (termFrequent.containsKey(term)) {\n\t\t\t\t\tcount = termFrequent.get(term);\n\t\t\t\t} else {\n\t\t\t\t\tcount = 0;\n\t\t\t\t}\n\n\t\t\t\tdouble tmp = count * idf.get(term);\n\t\t\t\tdenominator += tmp;\n\t\t\t\tweights[i++] = tmp;\n\t\t\t}\n\t\t\tdenominator = Math.sqrt(denominator);\n\t\t\twriter.write(topic);\n\t\t\tfor (int j = 1; j <= weights.length; j++) {\n\t\t\t\tdouble tmp = weights[j - 1];\n\t\t\t\tif (tmp > 0.0) {\n\t\t\t\t\ttmp = Math.sqrt(tmp) / denominator;\n\t\t\t\t\twriter.write(\" \" + j + \":\" + tmp);\n\t\t\t\t}\n\t\t\t}\n\t\t\twriter.newLine();\n\t\t}\n\n\t\twhile ((oneline = testReader.readLine()) != null) {\n\n\t\t\tint pos = oneline.indexOf(\"\\t\");\n\t\t\tString topic = oneline.substring(0, pos);\n\t\t\tString content = oneline.substring(pos + 1);\n\t\t\tHashtable<String, Integer> termFrequent = new Hashtable<String, Integer>();\n\t\t\tTokenStream stream = analyzer.tokenStream(\"\", new StringReader(\n\t\t\t\t\tcontent));\n\t\t\twhile (true) {\n\t\t\t\tToken token = stream.next();\n\t\t\t\tif (token == null)\n\t\t\t\t\tbreak;\n\t\t\t\tString tmp = token.termText();\n\t\t\t\tif (!termFrequent.containsKey(tmp))\n\t\t\t\t\ttermFrequent.put(tmp, new Integer(1));\n\t\t\t\telse {\n\t\t\t\t\tInteger num = termFrequent.get(tmp);\n\t\t\t\t\ttermFrequent.put(tmp, num + 1);\n\t\t\t\t}\n\t\t\t}\n\t\t\tdouble weights[] = new double[terms.size()];\n\t\t\tdouble denominator = 0.0;\n\t\t\tint i = 0;\n\t\t\tfor (String term : terms) {\n\t\t\t\tdouble count;\n\t\t\t\tif (termFrequent.containsKey(term)) {\n\t\t\t\t\tcount = termFrequent.get(term);\n\t\t\t\t} else {\n\t\t\t\t\tcount = 0;\n\t\t\t\t}\n\t\t\t\tdouble tmp = count * idf.get(term);\n\t\t\t\tdenominator += tmp;\n\t\t\t\tweights[i++] = tmp;\n\t\t\t}\n\t\t\tdenominator = Math.sqrt(denominator);\n\t\t\ttestWriter.write(topic);\n\t\t\tfor (int j = 1; j <= weights.length; j++) {\n\t\t\t\tdouble tmp = weights[j - 1];\n\t\t\t\tif (tmp > 0.0) {\n\t\t\t\t\ttmp = Math.sqrt(tmp) / denominator;\n\t\t\t\t\ttestWriter.write(\" \" + j + \":\" + tmp);\n\t\t\t\t}\n\t\t\t}\n\t\t\ttestWriter.newLine();\n\t\t}\n\t\twriter.close();\n\t\ttestWriter.close();\n\t}",
"public HashMap<Integer, Double> tfidf(String wordToLookFor, ArrayList<Document> documents) {\n HashMap<Integer, Double> results = new HashMap<Integer, Double>();\n Tokenizer tokenizer = new Tokenizer();\n HashMap<String, ArrayList<Integer>> tokensHM = tokenizer.generateHashMap(documents);\n double idf = idf(wordToLookFor, tokensHM, documents);\n if (idf != 0) {\n for (Document doc : documents) {\n double tf = tf(wordToLookFor, tokensHM, doc);\n if (tf != 0) {\n results.put(doc.getIndex(), tf / idf);\n }\n }\n }\n return results;\n }",
"private void fillTermsDF(SortedMap<String, String[]> finalDictionary){\n termsDF = new HashMap<>();\n ArrayList<String> terms = new ArrayList<>(finalDictionary.keySet());\n\n for(String term : terms){\n termsDF.put(term,finalDictionary.get(term)[1]);\n }\n }",
"private Map<String, Double> distance1Generation(String word) {\n if (word == null || word.length() < 1) throw new RuntimeException(\"Input words Error: \" + word);\n\n Map<String, Double> result = new HashMap<String, Double>();\n\n String prev;\n String last;\n\n for (int i = 0; i < word.length(); i++) {\n // Deletion\n prev = word.substring(0, i);\n last = word.substring(i + 1, word.length());\n result.put(prev + last, 1.0);\n\n // transposition\n if ((i + 1) < word.length()) {\n prev = word.substring(0, i);\n last = word.substring(i + 2, word.length());\n String trans = prev + word.charAt(i + 1) + word.charAt(i) + last;\n result.put(trans, 1.0);\n }\n\n // alter\n prev = word.substring(0, i);\n last = word.substring(i + 1, word.length());\n for (int j = 0; j < 26; j++) {\n result.put(prev + (char) (j + 97) + last, 1.0);\n }\n\n // insertion\n prev = word.substring(0, i);\n last = word.substring(i + 1, word.length());\n for (int j = 0; j < 26; j++) {\n result.put(prev + (char) (j + 97) + word.charAt(i) + last, 1.0);\n result.put(prev + word.charAt(i) + (char) (j + 97) + last, 1.0);\n }\n\n }\n\n result.remove(word);\n return result;\n }",
"@Override\n\tprotected void map(LongWritable key, Text value,\n\t\t\tContext context)\n\t\t\tthrows IOException, InterruptedException {\n\t\t\n\t\tString line = value.toString();\n\t\tStringTokenizer st = new StringTokenizer(line,\" \");\n\t\t\n\t\twhile(st.hasMoreTokens()){\n\t\t\tSystem.out.println(\"in\");\n\t\t\tword.set(st.nextToken().toString());\n\t\t\tcontext.write(new Text(\"kk\"),word);\n\t\t\t \n\t\t\t//System.out.println(\"mapper\"+st.nextToken());\n\t\t}\n\t\t\n\t}",
"public void buildWordFileMap(){\n hashWords.clear();\n DirectoryResource dr = new DirectoryResource();\n for (File f : dr.selectedFiles()){ //for all the files selected make the hashWords hashmap\n addWordsFromFile(f);\n }\n \n }",
"private void getWordCounts() {\n Map<String, List<String>> uniqueWordsInClass = new HashMap<>();\n List<String> uniqueWords = new ArrayList<>();\n\n for (ClassificationClass classificationClass : classificationClasses) {\n uniqueWordsInClass.put(classificationClass.getName(), new ArrayList<>());\n }\n\n for (Document document : documents) {\n String[] terms = document.getContent().split(\" \");\n\n for (String term : terms) {\n if (term.isEmpty()) {\n continue;\n }\n if (!uniqueWords.contains(term)) {\n uniqueWords.add(term);\n }\n\n for (ClassificationClass docClass : document.getClassificationClasses()) {\n if (!uniqueWordsInClass.get(docClass.getName()).contains(term)) {\n uniqueWordsInClass.get(docClass.getName()).add(term);\n }\n if (totalWordsInClass.containsKey(docClass.getName())) {\n this.totalWordsInClass.put(docClass.getName(), this.totalWordsInClass.get(docClass.getName()) + document.getFeatures().get(term));\n } else {\n this.totalWordsInClass.put(docClass.getName(), document.getFeatures().get(term));\n }\n }\n }\n }\n\n this.totalUniqueWords = uniqueWords.size();\n }",
"private HashMap<String, TObjectDoubleHashMap<String>> getNGramPRFScores(List<Document> initial, int size) {\n FieldLanguageModel flm = new FieldLanguageModel(size);\n for (Document d : initial) {\n if (d.terms != null && d.terms.size() > 0) {\n flm.addDocument(d);\n }\n }\n HashMap<String, TObjectDoubleHashMap<String>> outer = new HashMap<String, TObjectDoubleHashMap<String>>();\n List<String> grams = getGrams(size);\n for (String gram : grams) {\n TObjectDoubleHashMap<String> inner = new TObjectDoubleHashMap<String>();\n double normalizer = 0.0;\n\n for (String field : fields) {\n double fieldprob = flm.getTermProbGivenField(gram, field);\n inner.put(field, fieldprob);\n normalizer += fieldprob;\n }\n\n // Now normalize\n for (String field : fields) {\n inner.put(field, inner.get(field) / normalizer);\n }\n // Have to map to a single term\n String key = (size == 1) ? gram : gram.split(\" \")[size - 1];\n outer.put(key, inner);\n }\n return outer;\n }",
"public Map<String, WordImageRelevaces> calculateImageWordRelevanceCompact(\r\n\t\t\tMap<String, WordImage> wordImageRel) {\r\n\r\n\t\tMap<String, WordImageRelevaces> wordImgRelevance = new HashMap<String, WordImageRelevaces>();\r\n\r\n\t\tdouble IuWTotal1 = 0; // The normalization factor\r\n\t\tdouble IuWTotal2 = 0; // The normalization factor\r\n\t\tdouble IuWTotal3 = 0; // The normalization factor\r\n\t\tdouble IuWTotal4 = 0; // The normalization factor\r\n\t\tdouble IuWTotal5 = 0; // The normalization factor\r\n\t\tdouble IuWTotal6 = 0; // The normalization factor\r\n\r\n\t\tint index = 0;\r\n\r\n\t\tdouble IuWSingle1[] = new double[wordImageRel.size()];\r\n\t\tdouble IuWSingle2[] = new double[wordImageRel.size()];\r\n\t\tdouble IuWSingle3[] = new double[wordImageRel.size()];\r\n\t\tdouble IuWSingle4[] = new double[wordImageRel.size()];\r\n\t\tdouble IuWSingle5[] = new double[wordImageRel.size()];\r\n\t\tdouble IuWSingle6[] = new double[wordImageRel.size()];\r\n\r\n\t\tfor (String word : wordImageRel.keySet()) { // For each word\r\n\r\n\t\t\tWordImage wordImage = wordImageRel.get(word);\r\n\t\t\tdouble PcjW = wordImage.getImageProbability();\r\n\r\n\t\t\tdouble Pw1 = wordImage.getPwOnlyWords();\r\n\t\t\tdouble Pw2 = wordImage.getPwAllUsers();\r\n\t\t\tdouble Pw3 = wordImage.getPwOnlyUniqueUsers();\r\n\t\t\tdouble Pw4 = wordImage.getPwTFIDFlOnlyWords();\r\n\t\t\tdouble Pw5 = wordImage.getPwTFIDFlAllUsers();\r\n\t\t\tdouble Pw6 = wordImage.getPwTFIDFOnlyUniqueUsers();\r\n\r\n\t\t\tint C = totalNumberOfImages;\r\n\t\t\tint R = totalNumberOfSimilarImages;\r\n\t\t\tint Rw = wordImageRel.get(word).getSimlarImages().size();\r\n\t\t\tint Lw = wordImageRel.get(word).getOcurrances();\r\n\r\n\t\t\tSet<String> imgIDs = wordImage.getSimilarImageIDs(); // Get images\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// related\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// to that\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// word\r\n\r\n\t\t\tfor (String imgID : imgIDs) {\r\n\r\n\t\t\t\tdouble PIc = wordImage.getSimilarImage(imgID)\r\n\t\t\t\t\t\t.getPointSimilarity();\r\n\r\n\t\t\t\tIuWSingle1[index] += Pw1 * PcjW * PIc;\r\n\t\t\t\tIuWSingle2[index] += Pw2 * PcjW * PIc;\r\n\t\t\t\tIuWSingle3[index] += Pw3 * PcjW * PIc;\r\n\t\t\t\tIuWSingle4[index] += Pw4 * PcjW * PIc;\r\n\t\t\t\tIuWSingle5[index] += Pw5 * PcjW * PIc;\r\n\t\t\t\tIuWSingle6[index] += Pw6 * PcjW * PIc;\r\n\r\n\t\t\t}\r\n\r\n\t\t\t// Normalise\r\n\t\t\tWordImageRelevaces wImgRels = new WordImageRelevaces();\r\n\t\t\twImgRels.setFreqRelOnlyWords(IuWSingle1[index]);\r\n\t\t\twImgRels.setFreqRelWordsAndAllUsers(IuWSingle2[index]);\r\n\t\t\twImgRels.setFreqRelWordAndOnlyUniqueUsers(IuWSingle3[index]);\r\n\t\t\twImgRels.setTfIdfRelOnlyWords(IuWSingle4[index]);\r\n\t\t\twImgRels.setTfIdfRelWordsAndAllUsers(IuWSingle5[index]);\r\n\t\t\twImgRels.setTfIdfRelWordAndOnlyUniqueUsers(IuWSingle6[index]);\r\n\r\n\t\t\twordImgRelevance.put(word, wImgRels); // unnormalized value\r\n\r\n\t\t\tIuWTotal1 += IuWSingle1[index];\r\n\t\t\tIuWTotal2 += IuWSingle2[index];\r\n\t\t\tIuWTotal3 += IuWSingle3[index];\r\n\t\t\tIuWTotal4 += IuWSingle4[index];\r\n\t\t\tIuWTotal5 += IuWSingle5[index];\r\n\t\t\tIuWTotal6 += IuWSingle6[index];\r\n\r\n\t\t\tindex++;\r\n\t\t}\r\n\r\n\t\tfor (String word : wordImgRelevance.keySet()) {\r\n\r\n\t\t\tdouble notNormalizedValue1 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getFreqRelOnlyWords();\r\n\t\t\twordImgRelevance.get(word).setFreqRelOnlyWords(\r\n\t\t\t\t\tnotNormalizedValue1 / IuWTotal1);\r\n\r\n\t\t\tdouble notNormalizedValue2 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getFreqRelWordsAndAllUsers();\r\n\t\t\twordImgRelevance.get(word).setFreqRelWordsAndAllUsers(\r\n\t\t\t\t\tnotNormalizedValue2 / IuWTotal2);\r\n\r\n\t\t\tdouble notNormalizedValue3 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getFreqRelWordAndOnlyUniqueUsers();\r\n\t\t\twordImgRelevance.get(word).setFreqRelWordAndOnlyUniqueUsers(\r\n\t\t\t\t\tnotNormalizedValue3 / IuWTotal3);\r\n\r\n\t\t\tdouble notNormalizedValue4 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getTfIdfRelOnlyWords();\r\n\t\t\twordImgRelevance.get(word).setTfIdfRelOnlyWords(\r\n\t\t\t\t\tnotNormalizedValue4 / IuWTotal4);\r\n\r\n\t\t\tdouble notNormalizedValue5 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getTfIdfRelWordsAndAllUsers();\r\n\t\t\twordImgRelevance.get(word).setTfIdfRelWordsAndAllUsers(\r\n\t\t\t\t\tnotNormalizedValue5 / IuWTotal5);\r\n\r\n\t\t\tdouble notNormalizedValue6 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getTfIdfRelWordAndOnlyUniqueUsers();\r\n\t\t\twordImgRelevance.get(word).setTfIdfRelWordAndOnlyUniqueUsers(\r\n\t\t\t\t\tnotNormalizedValue6 / IuWTotal6);\r\n\r\n\t\t}\r\n\t\treturn wordImgRelevance;\r\n\r\n\t}",
"private static void wordCountWithMap() throws FileNotFoundException {\n Map<String, Integer> wordCounts = new HashMap<String, Integer>();\n\n Scanner input = new Scanner(new File(fileLocation));\n while (input.hasNext()) {\n String word = input.next();\n if (!wordCounts.containsKey(word)) {\n wordCounts.put(word, 1);\n } else {\n int oldValue = wordCounts.get(word);\n wordCounts.put(word, oldValue + 1);\n }\n }\n\n String term = \"test\";\n System.out.println(term + \" occurs \" + wordCounts.get(term));\n\n // loop over the map\n for (String word : wordCounts.keySet()) {\n int count = wordCounts.get(word);\n if (count >= 500) {\n System.out.println(word + \", \" + count + \" times\");\n }\n }\n\n }",
"@Override\n public void postGlobal() {\n if (_minFreq > 1) filterMin();\n _vocabArray = _vocabHM.values().toArray(new ValueStringCount[_vocabHM.size()]);\n Arrays.sort(_vocabArray);\n _vocabHM = null;\n VOCABHM = null;\n buildFrame();\n }",
"private void initialize() {\n\t\tfor(String key: count_e_f.keySet()){\n\t\t\tcount_e_f.put(key, 0.0);\n\t\t}\n\t\t\n\t\tfor(Integer key: total_f.keySet()){\n\t\t\ttotal_f.put(key, 0.0);\n\t\t}\n\t\t\n\t\t//This code is not efficient.\n//\t\tfor(Entry<String, Integer> german : mainIBM.gerWordsIdx.entrySet()){\n//\t\t\tfor(Entry<String, Integer> english : mainIBM.engWordsIdx.entrySet()){\n//\t\t\t\tcount_e_f.put(english.getValue() + \"-\" + german.getValue(), 0.0);\n//\t\t\t}\n//\t\t\ttotal_f.put(german.getValue(), 0.0);\n//\t\t}\t\n\n\t}",
"private static void processFreqVectors(Map<String, Integer[]> vocabulary\r\n\t\t\t, Map<Path, Vector> freqVectors, int numOfDocs) {\r\n\t\tfor (Map.Entry<Path, Vector> entry : freqVectors.entrySet()) {\r\n\t\t\tVector vector = entry.getValue();\r\n\t\t\t\r\n\t\t\tfor (Map.Entry<String, Integer[]> word : vocabulary.entrySet()) {\r\n\t\t\t\tint index = word.getValue()[0];\r\n\t\t\t\tdouble nOfDocsWithWord = word.getValue()[1];\r\n\t\t\t\tdouble freqOfWordInDoc = vector.valueAt(index);\r\n\t\t\t\tdouble idf = Math.log(numOfDocs/nOfDocsWithWord);\r\n\t\t\t\tdouble value = freqOfWordInDoc * idf;\r\n\t\t\t\tvector.setValueAt(index, value);\r\n\t\t\t\tidfVectors.put(word.getKey(), idf);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}",
"public Map<String, Integer> findUnicalWord(ArrayList<Word> text)\n {\n String[] words=new String[text.size()];\n for(int i=0; i<text.size(); i++){\n words[i]=text.get(i).toString();\n }\n HashMap<String, Integer> myWordsCount = new HashMap<>();\n for (String s : words){\n if (myWordsCount.containsKey(s)) myWordsCount.replace(s, myWordsCount.get(s) + 1);\n else myWordsCount.put(s, 1);\n }\n\n Map<String, Integer> newWordsCount = myWordsCount\n .entrySet()\n .stream()\n .sorted(Collections.reverseOrder(Map.Entry.comparingByValue()))\n .collect(\n toMap(Map.Entry::getKey, Map.Entry::getValue, (e1, e2) -> e2,\n LinkedHashMap::new));\n\n return newWordsCount;\n\n }",
"public void map(Object key, Text value, Context context\n ) throws IOException, InterruptedException {\n String[] temp = new String[10];\n temp = value.toString().split(\",\");\n if ((temp[2].equals(\"TMAX\") || temp[2].equals(\"TMIN\") && !temp[3].equals(\"\"))){\n HashMap<String,Double[]> h= new HashMap<String, Double[]>();\n Double[] d = new Double[2];\n d[0] = Double.parseDouble(temp[3]);\n d[1] = 1.0;\n if (results.containsKey(temp[0])){\n if (results.get(temp[0]).containsKey(temp[2])){\n results.get(temp[0]).get(temp[2])[0] += Double.parseDouble(temp[3]);\n results.get(temp[0]).get(temp[2])[1] += 1.0;\n }\n else{\n results.get(temp[0]).put(temp[2],d);\n }\n }\n else{\n h.put(temp[2],d);\n results.put(temp[0], h);\n }\n }\n }",
"public static void pageRankmain() {\n\t\t\t\n\t\t\tstopWordStore();\n\t\t\t//File[] file_read= dir.listFiles();\n\t\t\t//textProcessor(file_read);// Will be called from LinkCrawler\n\t\t\t//queryProcess();\n\t\t\t//System.out.println(\"docsave \"+ docsave);\n\t\t\t/*for ( Map.Entry<String, ArrayList<String>> entry : docsave.entrySet()) {\n\t\t\t String key = entry.getKey();\n\t\t\t List<String> values = entry.getValue();\n\t\t\t System.out.print(\"Key = \" + key);\n\t\t\t System.out.println(\" , Values = \"+ values);\n\t\t\t}*/\n\t\t\t//########## RESPOINSIBLE FOR CREATING INVERTED INDEX OF TERMS ##########\n\t\t\tfor(int i=0;i<vocabulary.size();i++) {\n\t\t\t\tint count=1;\n\t\t\t\tMap<String, Integer> nestMap = new HashMap<String, Integer>();\n\t\t\t\tfor ( Map.Entry<String, ArrayList<String>> entry : docsave.entrySet()) {\n\t\t\t\t String keyMain = entry.getKey();\n\t\t\t\t List<String> values = entry.getValue();\n\t\t\t\t if(values.contains(vocabulary.get(i)))\n\t\t\t\t \t{\n\t\t\t\t \tentryDf.put(vocabulary.get(i), count);//entryDf stores documents frequency of vocabulary word \\\\it increase the count value for specific key\n\t\t\t\t \tcount++;\n\t\t\t\t \t}\n\t\t\t\t \n\t\t\t\t nestMap.put(keyMain, Collections.frequency(values,vocabulary.get(i)));\n\t\t\t \t\n\t\t\t \t//System.out.println(\"VOC \"+ vocabulary.get(i)+ \" KeyMain \" +keyMain+ \" \"+ Collections.frequency(values,vocabulary.get(i)));\n\t\t\t\t\t}\n\t\t\t\t\ttfList.put(vocabulary.get(i), nestMap);\n\t\t\t}\n\t\t\t//########## RESPOINSIBLE FOR CREATING A MAP \"storeIdf\" TO STORE IDF VALUES OF TERMS ##########\n\t\t\tfor ( Map.Entry<String, Integer> endf : entryDf.entrySet()) {\n\t\t\t\tString keydf = endf.getKey();\n\t\t\t\tint valdf = endf.getValue();\n\t\t\t\t//System.out.print(\"Key = \" + \"'\"+keydf+ \"'\");\n\t\t\t //System.out.print(\" , Values = \"+ valdf);\n\t\t\t double Hudai = (double) (docsave.size())/valdf;\n\t\t\t //System.out.println(\"docsave size \"+docsave.size()+ \" valdf \"+ valdf + \" Hudai \"+ Hudai+ \" log Value1 \"+ Math.log(Hudai)+ \" log Value2 \"+ Math.log(2));\n\t\t\t double idf= Math.log(Hudai)/Math.log(2);\n\t\t\t storeIdf.put(keydf, idf);\n\t\t\t //System.out.print(\" idf-> \"+ idf);\n\t\t\t //System.out.println();\n\t\t\t} \n\t\t\t\n\t\t\t//############ Just for Printing ##########NO WORK HERE########\n\t\t\tfor (Map.Entry<String, Map<String, Integer>> tokTf : tfList.entrySet()) {\n\t\t\t\tString keyTf = tokTf.getKey();\n\t\t\t\tMap<String, Integer> valTF = tokTf.getValue();\n\t\t\t\tSystem.out.println(\"Inverted Indexing by Key Word = \" + \"'\"+keyTf+ \"'\");\n\t\t\t\tfor (Map.Entry<String, Integer> nesTf : valTF.entrySet()) {\n\t\t\t\t\tString keyTF = nesTf.getKey();\n\t\t\t\t\tInteger valTf = nesTf.getValue();\n\t\t\t\t\tSystem.out.print(\" Document Consists This Key Word = \" + \"'\"+ keyTF+ \"'\");\n\t\t\t\t\tSystem.out.println(\" , Term Frequencies in This Doc = \"+ valTf);\n\t\t\t\t} \n\t\t\t}\n\t\t\t//########### FOR CALCULATING DOCUMENT LENTH #############//\n\t\t\tfor ( Map.Entry<String, ArrayList<String>> entry_new : docsave.entrySet()) // Iterating Number of Documents\n\t\t\t{\n\t\t\t\tString keyMain_new = entry_new.getKey();\n\t\t\t\t//int countStop=0;\n\t\t\t\tdouble sum=0;\n\t\t\t\t for(Map.Entry<String, Map<String, Integer>> tokTf_new : tfList.entrySet()) // Iterating through the vocabulary\n\t\t\t\t { \n\t\t\t\t\t Map<String, Integer> valTF_new = tokTf_new.getValue();\n\t\t\t\t\t for (Map.Entry<String, Integer> nesTf_new : valTF_new.entrySet()) // Iterating Through the Documents\n\t\t\t\t\t {\n\t\t\t\t\t\t if(keyMain_new.equals(nesTf_new.getKey())) // Only doc name EQUAL with docsave name can enter here\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t double val = nesTf_new.getValue()* (Double) storeIdf.get(tokTf_new.getKey());\n\t\t\t\t\t\t\t sum = sum+ Math.pow(val, 2);\n\t\t\t\t\t\t }\n\t\t\t\t\t }\n\t\t\t\t\t \n\t\t\t\t\t //countStop++;\n\t\t\t\t }\n\t\t\t\t docLength.put(keyMain_new, Math.sqrt(sum));\n\t\t\t\t sum=0;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tSystem.out.println(\"Document Length \"+ docLength);\n\t\t\t//System.out.println(\"tfList \"+tfList);\n\t\t\t\n\t\t\t //########### FOR CALCULATING QUERY LENTH #############///\n\t\t\t\tdouble qrySum=0;\n\t\t\t\t for(String qryTerm: queryList) // Iterating through the vocabulary\n\t\t\t\t {\n\t\t\t\t\t//entryQf.put(qryTerm, Collections.frequency(queryList,qryTerm));// VUl ase\n\t\t\t\t\t \n\t\t\t\t\t\t if(storeIdf.get(qryTerm) != null) \n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t entryQf.put(qryTerm, Collections.frequency(queryList,qryTerm));\n\t\t\t\t\t\t\t double val = entryQf.get(qryTerm)* (Double) storeIdf.get(qryTerm);\n\t\t\t\t\t\t\t qrySum = qrySum+ Math.pow(val, 2);\n\t\t\t\t\t\t }\n\t\t\t\t\t System.out.println(qryTerm+\" \"+entryQf.get(qryTerm)+ \" \"+ (Double) storeIdf.get(qryTerm));\n\t\t\t\t }\n\t\t\t\t qrySum=Math.sqrt(qrySum);\n\t\t\t\t System.out.println(\"qrySum \" + qrySum);\n\t\t\t\t \n\t\t\t\t//########### FOR CALCULATING COSINE SIMILARITY #############///\n\t\t\t\t for ( Map.Entry<String, ArrayList<String>> entry_dotP : docsave.entrySet()) // Iterating Number of Documents\n\t\t\t\t\t{\n\t\t\t\t\t\tdouble sumProduct=0;\n\t\t\t\t\t\tdouble productTfIdf=0;\n\t\t\t\t\t\tString keyMain_new = entry_dotP.getKey(); //Geting Doc Name\n\t\t\t\t\t\t for(Map.Entry<String, Integer> qryTermItr : entryQf.entrySet()) // Iterating through the vocabulary\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t Map<String, Integer> matchTerm = tfList.get(qryTermItr.getKey()); // Getting a map of doc Names by a Query Term as value of tfList\n\n\t\t\t\t\t\t\t\t if(matchTerm.containsKey(keyMain_new)) // Only doc name EQUAL with docsave name can enter here\n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t //System.out.println(\"Test \"+ matchTerm.get(keyMain_new) +\" keyMain_new \" + keyMain_new);\n\t\t\t\t\t\t\t\t\t double docTfIdf= matchTerm.get(keyMain_new) * storeIdf.get(qryTermItr.getKey());\n\t\t\t\t\t\t\t\t\t double qryTfIdf= qryTermItr.getValue() * storeIdf.get(qryTermItr.getKey());\n\t\t\t\t\t\t\t\t\t productTfIdf = docTfIdf * qryTfIdf;\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t sumProduct= sumProduct+productTfIdf;\n\t\t\t\t\t\t\t //System.out.println(\"productTfIdf \"+productTfIdf+\" sumProduct \"+ sumProduct);\n\t\t\t\t\t\t\t productTfIdf=0;\n\t\t\t\t\t\t }\n\t\t\t\t\t\t cosineProd.put(entry_dotP.getKey(), sumProduct/(docLength.get(entry_dotP.getKey())*qrySum));\n\t\t\t\t\t\t sumProduct=0;\n\t\t\t\t\t\t //System.out.println(entry_dotP.getKey()+ \" \" + docLength.get(entry_dotP.getKey()));\n\t\t\t\t\t}\n\t\t\t\t System.out.println(\"cosineProd \"+ cosineProd);\n\t\t\t\t \n\t\t\t\t System.out.println(\"Number of Top Pages you want to see\");\n\t\t\t\t int topRank = Integer.parseInt(scan.nextLine());\n\t\t\t\t Map<String, Double> result = cosineProd.entrySet().stream()\n\t\t\t .sorted(Map.Entry.comparingByValue(Comparator.reverseOrder())).limit(topRank)\n\t\t\t .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue,\n\t\t\t (oldValue, newValue) -> oldValue, LinkedHashMap::new));\n\n\t\t\t\t scan.close();\n\t\t\t //Alternative way\n\t\t\t //Map<String, Double> result2 = new LinkedHashMap<>();\n\t\t\t //cosineProd.entrySet().stream().sorted(Map.Entry.<String, Double>comparingByValue().reversed()).limit(2).forEachOrdered(x -> result2.put(x.getKey(), x.getValue()));\n\n\t\t\t System.out.println(\"Sorted...\");\n\t\t\t System.out.println(result);\n\t\t\t //System.out.println(result2);\n\t}",
"public Hashtable<String, Double> fakeResumeTFIDF() {\n resume_tfidf = new Hashtable<String, Double>();\n resume_tfidf.put(\"am\", (double) 0);\n resume_tfidf.put(\"learning\", (double) 0);\n resume_tfidf.put(\"javascript\", (double) 1 / 10);\n resume_tfidf.put(\"java\", (double) 0);\n resume_tfidf.put(\"is\", (double) 2 / 10);\n resume_tfidf.put(\"cool\", (double) 0);\n resume_tfidf.put(\"language\", (double) 1 / 10);\n resume_tfidf.put(\"requirement\", (double) 1 / 10 + (double) 1 / 10 * Math.log(2));\n resume_tfidf.put(\"for\", (double) 1 / 10 + (double) 1 / 10 * Math.log(2));\n resume_tfidf.put(\"this\", (double) 1 / 10 + (double) 1 / 10 * Math.log(2));\n resume_tfidf.put(\"job\", (double) 1 / 10 + (double) 1 / 10 * Math.log(2));\n resume_tfidf.put(\"python\", (double) 1 / 10 + (double) 1 / 10 * Math.log(2));\n resume_tfidf.put(\"wonderful\", (double) 1 / 10 + (double) 1 / 10 * Math.log(2));\n return resume_tfidf;\n }",
"@Override\n protected double elementValueTransformer(Word w, Double actualValue) {\n \n // computing words log frequencies * idf(word) : \n // log-freq(word) = { 0 when count(word)=0\n // 1+log(count(word)) when count(word)>0 }\n \n //return (actualValue==0.0 ? (0.0) : (1.0 + Math.log(actualValue)) ) \n // * idfProvider.getInverseDocumentFrequency(w);\n\n double tf = actualValue/(actualValue + 0.5 + 1.5*this.getOriginalSumOfValues()/idfProvider.getAverageDocumentLength());\n double idf = idfProvider.getInverseDocumentFrequency(w);\n \n double val = tf*idf;\n \n return val;\n \n }",
"public static void setAuthFreq(Map<String, AuthorMod> models)\n\t{\n\t\tfor (AuthorMod curAuth: models.values()) \n\t\t{\n\t\t\tfor(String uGram: curAuth.ug.getAll()) \n\t\t\t{\n\t\t\t\tint ucount = curAuth.ug.getCount(uGram);\n/*>>>>\t \t\tif (ucount<2) {curAuth.unks++;\t\t\t\t*** unkown word handling\n \t\t\t\tif (curAuth.ug.contains(\"<unk>\")) \n\t\t\t\t\t{ curAuth.ug.updateSeen(\"<unk>\");}\n\t\t\t\t\telse{ curAuth.ug.addNew(\"<unk>\");}\n*/\n\t\t\t\tdouble ufreq= ((double)ucount/curAuth.trainSize);\n\t\t\t\tcurAuth.ug.setFreq(uGram, ufreq);\n\t\t\t}\n\n\t\t//set bigram HT entries for frequency, \n\t\t//calculated by normalizing BG count by prefix count\n\t\t\tfor(Pair<String, String> bGram: curAuth.bg.getAll())\n\t\t\t{\n/*\t>>>\t\t\t\t-first, need a test to see if the unigram count for either word in bigram is less than 2. If yes, we will replace with <unk> tag\n\t\t\t\t\t\t\t- code to get counts for each word in bigram would look like curAuth.ug.getCount(bgram.getFirst()) \n\t\t\t\t\t-make new bg, with the count 1 word replaced with <Unk> tag. Use the parametered Pair<String, String> constructor with arguements (word, <unk>) depending on which is unk (or both)\n\t\t\t\t\t-do an updateSeen(bigram) or addNew(bigram) on curAuth.bg depending on if this new bigram has been seen (use curAuth.bg.contains(**this new bigram**)) \n\t\t\t\t\t-use data structure to remember what still needs updating (some type of set. we want something with no duplicates) \n\t\t\t\t\t-remove original bigram, put updated bigram in set\n\t\t\t\t\t-skip rest of loop for this bigram, and update the freq for the set after the loop */\n\t\t\t\t\t\n\t\t\t\t\tint bcount = curAuth.bg.getBgCount(bGram);\n\t\t\t\t\tint pcount = curAuth.ug.getCount(bGram.getFirst()); //sets p count to count of prefix from unigram table\n\t\t\t\t\tdouble bfreq = ((double)bcount)/pcount;\n\t\t\t\t\tcurAuth.bg.setFreq(bGram, bfreq);\n\t\t\t}\n\t\t\t//set frequncies for items we placed in set of bigrams containing the <unk> tag\n\t\t}\n\t}",
"public EfficientWordMarkov()\n\t{\n\t\tsuper();\n\t\tmyMap = new HashMap<WordGram , ArrayList<String>>();\n\t}",
"private static HashMap<String, Integer> makeMap(String[] words) {\n HashMap<String, Integer> map = new HashMap();\n for (int i = 0; i < words.length; i++) {\n map.merge(words[i], 1, Integer::sum);\n }\n return map;\n}",
"public void ComputeSimilarity() {\n\t\t\n\t\t//first construct the vector space representations for these five reviews\n\t\t// the our smaples vector, finally get the similarity metric \n\t\tanalyzequery(LoadJson(\"./data/samples/query.json\"));\n\t\n\t\t\n\t\tHashMap<String, Double> Similarity = new HashMap<String, Double>();\n\n\t\tfor (int i = 0; i < m_reviews.size(); i++) {\n\t\t\tString content = m_reviews.get(i).getContent();\n\n\t\t\tHashMap<String, Integer> conunttf = new HashMap<String, Integer>();\n\n\t\t\tHashSet<String> biminiset = new HashSet<String>();\n \n\t\t\t//danci means word unit: one or two words\n\t\t\tArrayList danci = new ArrayList();\n\n\t\t\tfor (String token : tokenizer.tokenize(content)) {\n\t\t\t\tif (m_stopwords.contains(token))\n\t\t\t\t\tcontinue;\n\t\t\t\tif (token.isEmpty())\n\t\t\t\t\tcontinue;\n\n\t\t\t\tdanci.add(PorterStemmingDemo(SnowballStemmingDemo(NormalizationDemo(token))));\n\n\t\t\t}\n \n\t\t\t//get word count in a document\n\t\t\tfor (int k = 0; k < danci.size(); k++) {\n\n\t\t\t\tif (conunttf.containsKey(danci.get(k).toString())) {\n\t\t\t\t\tconunttf.put(danci.get(k).toString(),\n\t\t\t\t\t\t\tconunttf.get(danci.get(k).toString()) + 1);\n\t\t\t\t} else {\n\t\t\t\t\tconunttf.put(danci.get(k).toString(), 1);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tArrayList<String> N_gram = new ArrayList<String>();\n\n\t\t\tfor (String token : tokenizer.tokenize(content)) {\n\n\t\t\t\ttoken = PorterStemmingDemo(SnowballStemmingDemo(NormalizationDemo(token)));\n\t\t\t\tif (token.isEmpty()) {\n\n\t\t\t\t\tcontinue;\n\t\t\t\t} else {\n\n\t\t\t\t\tN_gram.add(token);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tString[] fine = new String[N_gram.size()];\n \n\t\t\t//get rid of stopwords\n\t\t\tfor (int p = 0; p < N_gram.size() - 1; p++) {\n\t\t\t\tif (m_stopwords.contains(N_gram.get(p)))\n\t\t\t\t\tcontinue;\n\t\t\t\tif (m_stopwords.contains(N_gram.get(p + 1)))\n\t\t\t\t\tcontinue;\n\n\t\t\t\tfine[p] = N_gram.get(p) + \"-\" + N_gram.get(p + 1);\n\n\t\t\t}\n\n\t\t\t\n\t\t\tfor (String str2 : fine) {\n\n\t\t\t\tif (conunttf.containsKey(str2)) {\n\t\t\t\t\tconunttf.put(str2, conunttf.get(str2) + 1);\n\t\t\t\t} else {\n\t\t\t\t\tconunttf.put(str2, 1);\n\t\t\t\t}\n\t\t\t}\n \n\t\t\t//compute tf * idf for each document\n\t\t\tfor (String key : conunttf.keySet()) {\n\t\t\t\tif (m_stats.containsKey(key)) {\n\t\t\t\t\tdouble df = (double) m_stats.get(key);\n\n\t\t\t\t\tdouble idf = (1 + Math.log(102201 / df));\n\n\t\t\t\t\tdouble tf = conunttf.get(key);\n\n\t\t\t\t\tdouble result = tf * idf;\n\n\t\t\t\t\tm_idf.put(key, result);\n\t\t\t\t} else {\n\t\t\t\t\tm_idf.put(key, 0.0);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t\n\n\t\t\tHashMap<String, Double> query = new HashMap<String, Double>();\n\t\t\tHashMap<String, Double> test = new HashMap<String, Double>();\n \n\t\t\t//If query contains this word, store it for future computation \n\t\t\tfor (Map.Entry<String, Double> entry : m_idf.entrySet()) {\n\t\t\t\tString key = entry.getKey();\n\t\t\t\tif (query_idf.containsKey(key)) {\n\t\t\t\t\tquery.put(key, query_idf.get(key));\n\t\t\t\t\ttest.put(key, m_idf.get(key));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tdouble dotProduct = 0.00;\n\t\t\tdouble magnitude1 = 0.0;\n\t\t\tdouble magnitude2 = 0.0;\n\t\t\tdouble magnitude3 = 0.0;\n\t\t\tdouble magnitude4 = 0.0;\n\t\t\tdouble cosineSimilarity = 0;\n \n\t\t\t\n\t\t\t//compute Compute similarity between query document and each document in file\n\t\t\tfor (String cal : test.keySet()) {\n\t\t\t\tdotProduct += query.get(cal) * test.get(cal); // a.b\n\t\t\t\tmagnitude1 += Math.pow(query.get(cal), 2); // (a^2)\n\t\t\t\tmagnitude2 += Math.pow(test.get(cal), 2); // (b^2)\n\n\t\t\t\tmagnitude3 = Math.sqrt(magnitude1);// sqrt(a^2)\n\t\t\t\tmagnitude4 = Math.sqrt(magnitude2);// sqrt(b^2)\n\t\t\t}\n\n\t\t\tif (magnitude3 != 0.0 | magnitude4 != 0.0)\n\t\t\t\tcosineSimilarity = dotProduct / (magnitude3 * magnitude4);\n\n\t\t\telse\n\t\t\t\tcosineSimilarity = 0;\n\n\t\t\tSimilarity.put(content, cosineSimilarity);\n\n\t\t\t\t\t\n\n\t\t}\n\n\t\t// sort output to get 3 reviews with the highest similarity with query review\n\t\tList<Map.Entry<String, Double>> infoIds = new ArrayList<Map.Entry<String, Double>>(\n\t\t\t\tSimilarity.entrySet());\n\n\t\tCollections.sort(infoIds, new Comparator<Map.Entry<String, Double>>() {\n\t\t\tpublic int compare(Map.Entry<String, Double> o1,\n\t\t\t\t\tMap.Entry<String, Double> o2) {\n\t\t\t\treturn (int) (o1.getValue() - o2.getValue());\n\t\t\t}\n\t\t});\n\n\t\tfor (int i = infoIds.size() - 1; i > infoIds.size() - 4; i--) {\n\t\t\tEntry<String, Double> ent = infoIds.get(i);\n\t\t\tSystem.out.println(ent.getValue()+\"++\"+ent.getKey()+\"\\n\");\n\n\t\t}\n\n\t}",
"private void populateMaps() {\n\t\t//populate the conversion map.\n\t\tconvertMap.put(SPACE,(byte)0);\n\t\tconvertMap.put(VERTICAL,(byte)1);\n\t\tconvertMap.put(HORIZONTAL,(byte)2);\n\n\t\t//build the hashed numbers based on the training input. 1-9\n\t\tString trainingBulk[] = new String[]{train1,train2,train3,\"\"};\n\t\tbyte[][] trainer = Transform(trainingBulk);\n\t\tfor(int i=0; i < 9 ;++i) {\n\t\t\tint val = hashDigit(trainer, i);\n\t\t\tnumbers.put(val,i+1);\n\t\t}\n\t\t//train Zero\n\t\ttrainingBulk = new String[]{trainz1,trainz2,trainz3,\"\"};\n\t\tint zeroVal = hashDigit(Transform(trainingBulk), 0);\n\t\tnumbers.put(zeroVal,0);\n\n\n\t}",
"public static TreeMap<Integer,String> calc_tf_idf( String \tbaseFolder,\n\t\t\t\t\t\t\t\t\t\t\t\t\t String baseFolder_out,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tString \tinputFile, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\tString delimiter_for_inputFile,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tint \ttoken_index_having_text,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tString \toutFile,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tboolean is_do_stemming_on_word,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tboolean is_ignore_stop_words_all_together,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tboolean isSOPprint\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t){\n\t\tTreeMap<Integer,String> mapOut=new TreeMap<Integer, String>();\n\t\ttry{\n\t\t\tString line=\"\";\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream( inputFile) ));\n\t\t\t//boolean is_do_stemming_on_word=true;\n\t\t\tStemmer stemmer=new Stemmer(); String token=\"\";\n\t\t TreeMap<String, Integer> mapVoc_Freq=new TreeMap<String, Integer>();\n\t\t TreeMap<String, List<Integer>> map_Word_UniqueDocumentIdHavingIT=new TreeMap<String, List<Integer>>();\n\t\t TreeMap<Integer, TreeMap<String, Integer > > map_DocID_wordFrequency=new TreeMap<Integer, TreeMap<String,Integer>>();\n\t\t\t\tint lineNumber=0; int last_doc_id=-1;\n\t\t\t\n\t\t\tFileWriter writer_voc=new FileWriter(new File(baseFolder_out+\"unique_word_vocabulary.txt\"));\n\t\t\t\t\n\t\t\tFileWriter writer=new FileWriter(new File(outFile));\n\t\t\t// files for docID wordID tf-idf output\n\t\t\tFileWriter writer_no_stopword=new FileWriter(new File(outFile+\"_noStopWord.txt\"));\t\t\t\n\t\t\tFileWriter writer_wordID=new FileWriter(new File(outFile+\"_WORD_ID.txt\"));\n\t\t\tFileWriter writer_wordID_no_stopword=new FileWriter(new File(outFile+\"_noStopWord_WORD_ID.txt\"));\n\t\t\tFileWriter writer_word_stemmedWord=new FileWriter(new File(outFile+\"_Word_stemmedWord.txt\"));\n\t\t\t\n\t\t\t// files for docID wordID frequency output\n\t\t\tFileWriter writer2=new FileWriter(new File(outFile+\"_docWordID_freq2.txt\"));\n\t\t\tFileWriter writer2_no_stopword=new FileWriter(new File(outFile+\"_noStopWord2.txt\"));\n\t\t\tFileWriter writer2_wordID=new FileWriter(new File(outFile+\"_WORD_ID2.txt\"));\n\t\t\tFileWriter writer2_wordID_no_stopword=new FileWriter(new File(outFile+\"_noStopWord_WORD_ID2.txt\"));\n\t\t\tFileWriter writer2_word_stemmedWord=new FileWriter(new File(outFile+\"_Word_stemmedWord2.txt\"));\n\t\t\t\n\n\t\t\t\n\t\t\tFileWriter writer_debug=new FileWriter(new File(outFile+\"_DEBUG.txt\"));\n\t\t\tFileWriter writer_debug_2=new FileWriter(new File(outFile+\"_DEBUG_2.txt\"));\n\t\t\t\n\t\t\tTreeMap<String,Integer> map_already_wrote=new TreeMap<String, Integer>();\n\t\t\t//\n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\tlineNumber++;\n\t\t\t\tSystem.out.println(\"lineNumber:\"+lineNumber);\n\t\t\t\t\n\t\t\t\t//DEBUG BREAK\n//\t\t\t\tif(lineNumber>100) break;\n\t\t\t\t\n\t\t\t\t//mapVoc_Freq=new TreeMap<String, Integer>();\n\t\t\t\tint curr_doc_id=lineNumber;\n\t\t\t\tString [] token_= line.split(delimiter_for_inputFile);\n\t\t\t\t\n\t\t\t\t //clean\n\t\t\t\t token=token_[token_index_having_text-1].replace(\"\\\"\", \" \").replace(\"'\", \" \").replace(\",\", \" \").replace(\";\",\" \").replace(\".\", \" \")\n\t\t\t\t\t\t\t\t .replace(\"‘\", \" \").replace(\"“\", \" \").replace(\"–\", \" \").replace(\")\", \" \").replace(\"(\", \" \")\n\t\t\t\t\t\t\t\t .replace(\"-\", \" \").replace(\":\", \" \").replace(\"’\", \" \").replace(\"”\", \" \").replace(\"—\", \" \")\n\t\t\t\t\t\t\t\t .replace(\"#\", \" \").replace(\"%\", \" \")//.replace(\"$\", \" \")\n\t\t\t\t\t\t\t\t .replace(\"/\",\" \")\n\t\t\t\t\t\t\t\t .replace(\" \", \" \");\n\t\t\t\t \n\t\t\t\t token=token.toLowerCase();\n\n\t\t\t\t \n\t\t\t\t // \n\t\t\t\t String [] arr_token=token.split(\" \");\n\t\t\t\t int cnt=0;\n\t\t\t\t // \n\t\t\t\t while(cnt < arr_token.length){\n\t\t\t\t\t String temp= Ltrim.ltrim( arr_token[cnt]);\n\t\t\t\t\t \n\t\t\t\t\t // ignore stop words all together\n\t\t\t\t\t if(is_ignore_stop_words_all_together==true && Stopwords.is_stopword(temp)){\n\t\t\t\t\t\t cnt++;\n\t\t\t\t\t\t continue;\n\t\t\t\t\t }\n\t\t\t\t\t \n\t\t\t\t\t // do stemming\n\t\t\t\t\t if(is_do_stemming_on_word){\n\t\t\t\t\t\t String orig_temp=temp;\n\t\t\t\t\t\t //ltrim.ltrim(\n\t\t\t\t\t\t temp= stemmer.stem(temp);\n\t\t\t\t\t\t \n\t\t\t\t\t\t if(!map_already_wrote.containsKey(orig_temp)){\n\t\t\t\t\t\t\t writer_word_stemmedWord.append(orig_temp+\"!!!\"+temp +\"\\n\");\n\t\t\t\t\t\t\t writer_word_stemmedWord.flush();\n\t\t\t\t\t\t }\n\t\t\t\t\t\t \n\t\t\t\t\t\t map_already_wrote.put(orig_temp, -1);\n\t\t\t\t\t\t \n\t\t\t\t\t }\n\t\t\t\t\t else \n\t\t\t\t\t\t temp=temp;\n\n\t\t\t\t\t\t // \n\t\t\t\t\t\t if(!mapVoc_Freq.containsKey(temp)){\n\t\t\t\t\t\t\t //vocabulary term-freq\n\t\t\t\t\t\t\t mapVoc_Freq.put(temp, 1);\t\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t //word-document freq- unique number of documents this word occurs.\n\t\t\t\t\t\t\t List l=new ArrayList<Integer>();\n\t\t\t\t\t\t\t l.add(curr_doc_id);\n\t\t\t\t\t\t\t map_Word_UniqueDocumentIdHavingIT.put(temp, l);\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t //doc-wise frequency\n\t\t\t\t\t\t\t if(!map_DocID_wordFrequency.containsKey(curr_doc_id)){\n\t\t\t\t\t\t\t\t TreeMap<String,Integer> t2=new TreeMap<String, Integer>();\n\t\t\t\t\t\t\t\t t2.put( temp, 1 ) ;\n\t\t\t\t\t\t\t\t map_DocID_wordFrequency.put(curr_doc_id, t2);\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t else{\n\t\t\t\t\t\t\t\t TreeMap<String,Integer> t2=map_DocID_wordFrequency.get(curr_doc_id);\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t if(!t2.containsKey(temp)){\n\t\t\t\t\t\t\t\t\t TreeMap<String,Integer> t2_2=map_DocID_wordFrequency.get(curr_doc_id);\n\t\t\t\t\t\t\t\t\t t2_2.put( temp, 1 ) ;\n\t\t\t\t\t\t\t\t\t map_DocID_wordFrequency.put(curr_doc_id, t2_2);\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t else{\n\t\t\t\t\t\t\t\t\t TreeMap<String,Integer> t2_2=map_DocID_wordFrequency.get(curr_doc_id);\n\t\t\t\t\t\t\t\t\t int sz=t2.get(temp)+1;\n\t\t\t\t\t\t\t\t\t t2_2.put( temp, sz ) ;\n\t\t\t\t\t\t\t\t\t map_DocID_wordFrequency.put(curr_doc_id, t2_2);\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t }\n\t\t\t\t\t\t else{\n\t\t\t\t\t\t\t int freq=mapVoc_Freq.get(temp)+1;\n\t\t\t\t\t\t\t //System.out.println(\"last_doc_id!=curr_doc_id->\"+last_doc_id+\"<-->\"+curr_doc_id );\n\t\t\t\t\t\t\t //vocabulary term-freq\n\t\t\t\t\t\t\t mapVoc_Freq.put(temp, freq);\n\t\t\t\t\t\t\t // word-document freq- unique number of documents this word occurs.\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t List<Integer> uniq_doc=map_Word_UniqueDocumentIdHavingIT.get(temp);\n\t\t\t\t\t\t\t\t // if this docID not contained before in list\n\t\t\t\t\t\t\t\t if(!uniq_doc.contains(curr_doc_id)){\n\t\t\t\t\t\t\t\t\t uniq_doc.add(curr_doc_id );\n\t\t\t\t\t\t\t\t\t map_Word_UniqueDocumentIdHavingIT.put(temp, uniq_doc);\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t //doc-wise frequency\n\t\t\t\t\t\t\t\t if(!map_DocID_wordFrequency.containsKey(curr_doc_id)){\n\t\t\t\t\t\t\t\t\t TreeMap<String,Integer> t2=new TreeMap<String, Integer>();\n\t\t\t\t\t\t\t\t\t t2.put( temp, 1 ) ;\n\t\t\t\t\t\t\t\t\t map_DocID_wordFrequency.put(curr_doc_id, t2);\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t else{\n\t\t\t\t\t\t\t\t\t TreeMap<String,Integer> t2=map_DocID_wordFrequency.get(curr_doc_id);\n\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t if(!t2.containsKey(temp)){\n\t\t\t\t\t\t\t\t\t\t TreeMap<String,Integer> t2_2=map_DocID_wordFrequency.get(curr_doc_id);\n\t\t\t\t\t\t\t\t\t\t t2_2.put( temp, 1 ) ;\n\t\t\t\t\t\t\t\t\t\t map_DocID_wordFrequency.put(curr_doc_id, t2_2);\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t else{\n\t\t\t\t\t\t\t\t\t\t TreeMap<String,Integer> t2_2=map_DocID_wordFrequency.get(curr_doc_id);\n\t\t\t\t\t\t\t\t\t\t int sz=t2.get(temp)+1;\n\t\t\t\t\t\t\t\t\t\t t2_2.put( temp, sz ) ;\n\t\t\t\t\t\t\t\t\t\t map_DocID_wordFrequency.put(curr_doc_id, t2_2);\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t }\n\t\t\t\t\tcnt++;\n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t if(isSOPprint){\n\t\t\t\t\t System.out.println(\"doc:\"+curr_doc_id+\" token-freq:\"+mapVoc_Freq.size()+\" token-doc.freq:\"+map_Word_UniqueDocumentIdHavingIT.size());\n\t\t\t\t }\n\t\t\t\t //\n\t\t\t\t last_doc_id=curr_doc_id;\n\t\t\t}\n\t\t\tSystem.out.println(\" token-freq:\"+mapVoc_Freq.size()+\" token-doc.freq:\"+map_Word_UniqueDocumentIdHavingIT.size());\n\t\t\tint uniq_word_id=1;\n\t\t\tTreeMap<String, Integer> mapVocabulary_word_wordID= new TreeMap<String, Integer>();\n\t\t\t// create uniq_word_id for each word in vocabulary\n\t\t\tfor(String word:mapVoc_Freq.keySet()){\n\t\t\t\tmapVocabulary_word_wordID.put(word, uniq_word_id);\n\t\t\t\t\n\t\t\t\twriter_voc.append(word+\"!!!\"+uniq_word_id+\"\\n\");\n\t\t\t\twriter_voc.flush();\n\t\t\t\t \n\t\t\t\tuniq_word_id++;\n\t\t\t}\n\t\t\tSystem.out.println(\"step 1: running docid-wordid-tf-IDF\");\n\t\t\t//step 1: calculate tf-idf (DONT COMMENT BELOW)\n\t\t\tfor(int docID:map_DocID_wordFrequency.keySet()){\n\t\t\t\t//System.out.println(\"docID:\"+docID+ \" size:\" +map_DocID_wordFrequency.get(docID).size()); //\t+\" word-freq:\"+map_DocID_wordFrequency.get(docID));\n\t\t\t\twriter_debug.append(\"docID:\"+docID+ \" size:\" +map_DocID_wordFrequency.get(docID).size()+\" word-freq:\"+map_DocID_wordFrequency.get(docID)+\"\\n\");\n\t\t\t\twriter_debug.flush();\n\t\t\t\tdouble tf_idf=0.0;\n\t\t\t\t//Iterate each word in current document\n\t\t\t\tfor(String word:map_DocID_wordFrequency.get(docID).keySet() ){\n\t\t\t\t\t//\n\t\t\t\t\tif(mapVoc_Freq.containsKey(word )){\n\t\t\t\t\t\t\n\t\t\t\t\t\t//System.out.println(\"param1,2:\"+map_DocID_wordFrequency.get(docID).get(word) +\" \"+map_Word_UniqueDocumentIdHavingIT.get(word).size() );\n\t\t\t\t\t\t// tf-idf\n\t\t\t\t\t\ttf_idf=map_DocID_wordFrequency.get(docID).get(word) * Math.log10( map_DocID_wordFrequency.size() / map_Word_UniqueDocumentIdHavingIT.get(word).size() );\n\t\t\t\t\t\t//System.out.println();\n\t\t\t\t\t\twriter.append( docID+\"!!!\"+word+\"!!!\"+tf_idf+\"\\n\");\n\t\t\t\t\t\twriter.flush();\n\t\t\t\t\t\t\n\t\t\t\t\t\twriter_wordID.append( docID+\"!!!\"+mapVocabulary_word_wordID.get(word)+\"!!!\"+tf_idf+\"\\n\");\n\t\t\t\t\t\twriter_wordID.flush();\n\t\t\t\t\t\t\n\t\t\t\t\t\t// \n\t\t\t\t\t\tif(!Stopwords.is_stopword(word.toLowerCase())){\n\t\t\t\t\t\t\twriter_no_stopword.append(docID+\"!!!\"+word+\"!!!\"+tf_idf+\"\\n\");\n\t\t\t\t\t\t\twriter_no_stopword.flush();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\twriter_wordID_no_stopword.append(docID+\"!!!\"+ mapVocabulary_word_wordID.get(word) +\"!!!\"+tf_idf+\"\\n\");\n\t\t\t\t\t\t\twriter_wordID_no_stopword.flush();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\twriter_debug_2.append( \"(not exist in vocab) word->\"+word+\" for doc_id->\"+docID+\"\\n\");\n\t\t\t\t\t\twriter_debug_2.flush();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} //for(int docID:map_DocID_wordFrequency.keySet()){\n\t\t\t\n\t\t\tSystem.out.println(\"step 2: running docid-wordid-frquency\");\n\t\t\t//step 2: (DOC-WORDID AND FREQUENCY)another output - writing <docID!!!wordID!!!frequency>\n\t\t\tfor(int docID:map_DocID_wordFrequency.keySet()){\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"2.docID:\"+docID+ \" size:\" +map_DocID_wordFrequency.get(docID).size()); //\t+\" word-freq:\"+map_DocID_wordFrequency.get(docID));\n\t\t\t\t//writer_debug.append(\"docID:\"+docID+ \" size:\" +map_DocID_wordFrequency.get(docID).size()+\" word-freq:\"+map_DocID_wordFrequency.get(docID)+\"\\n\");\n\t\t\t\t//writer_debug.flush();\n\t\t\t\tint frequency=0;\n\t\t\t\t//Iterate each word in current document\n\t\t\t\tfor(String word:map_DocID_wordFrequency.get(docID).keySet() ){\n\t\t\t\t\t//\n\t\t\t\t\tif(mapVoc_Freq.containsKey(word )){\n\t\t\t\t\t\t\n\t\t\t\t\t\t// System.out.println(\"param1,2:\"+map_DocID_wordFrequency.get(docID).get(word) +\" \"+map_Word_UniqueDocumentIdHavingIT.get(word).size() );\n\t\t\t\t\t\t// frequency\n\t\t\t\t\t\tfrequency=map_DocID_wordFrequency.get(docID).get(word);\n\t\t\t\t\t\t//System.out.println();\n\t\t\t\t\t\twriter2.append( docID+\"!!!\"+word+\"!!!\"+frequency+\"\\n\");\n\t\t\t\t\t\twriter2.flush();\n\t\t\t\t\t\t\n\t\t\t\t\t\twriter2_wordID.append( docID+\"!!!\"+mapVocabulary_word_wordID.get(word)+\"!!!\"+frequency+\"\\n\");\n\t\t\t\t\t\twriter2_wordID.flush();\n\t\t\t\t\t\t \n\t\t\t\t\t\t// \n\t\t\t\t\t\tif(!Stopwords.is_stopword(word.toLowerCase())){\n\t\t\t\t\t\t\twriter2_no_stopword.append(docID+\"!!!\"+word+\"!!!\"+frequency+\"\\n\");\n\t\t\t\t\t\t\twriter2_no_stopword.flush();\n\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\twriter2_wordID_no_stopword.append(docID+\"!!!\"+ mapVocabulary_word_wordID.get(word) +\"!!!\"+frequency+\"\\n\");\n\t\t\t\t\t\t\twriter2_wordID_no_stopword.flush();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\twriter_debug_2.append( \"(not exist in vocab) word->\"+word+\" for doc_id->\"+docID+\"\\n\");\n\t\t\t\t\t\twriter_debug_2.flush();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} //for(int docID:map_DocID_wordFrequency.keySet()){\n\n\t\t\tSystem.out.println(\"********************************************\");\n\t\t\tSystem.out.println(\"File holding the not found words in vocabulary: \"+\"outFile+\\\"_DEBUG_2.txt\\\"\");\n\t\t\tSystem.out.println(\"Doc-wise word freq: \"+\"outFile+\\\"_DEBUG.txt\\\"\");\n\t\t\tSystem.out.println(\"******Below files are docId-wordID-tfIDF\");\n\t\t\tSystem.out.println(\"with Word->\"+outFile);\n\t\t\tSystem.out.println(\"with Word(no stopword)->\"+outFile+\"_noStopWord.txt\");\n\t\t\tSystem.out.println(\"with WordID->\"+outFile+\"_WORD_ID.txt\");\n\t\t\tSystem.out.println(\"with WordID(no stopword)->\"+outFile+\"_noStopWord_WORD_ID.txt\");\n\t\t\tSystem.out.println(\"VOC FILE ->\"+baseFolder+\"unique_word_vocabulary.txt\");\n\t\t\t//**********/\n\t\t\tSystem.out.println(\"***********Below files are docId-wordID-frequency (file ends with \\\"format2.txt\\\"\");\n\t\t\tSystem.out.println( \"\"+outFile+\"_docWordID_freq2.txt\");\n\t\t\tSystem.out.println( \"\"+outFile+\"_noStopWord2.txt\");\n\t\t\tSystem.out.println( \"\"+outFile+\"_WORD_ID2.txt\");\n\t\t\tSystem.out.println( \"\"+outFile+\"_noStopWord_WORD_ID2.txt\");\n\t\t\tSystem.out.println( \"\"+outFile+\"_Word_stemmedWord2.txt\");\n\t\t\t \n\t\t\tmapOut.put(-99, outFile+\"_noStopWord_WORD_ID.txt\");\n\t\t\t//maximum word id\n\t\t\tmapOut.put(1, String.valueOf( uniq_word_id) );\n\t\t}\n\t\tcatch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn mapOut;\n\t}",
"public void getThesaurusMap (String wordTofind) {\r\n\t \tfor (Entry<String, List> entry : tMap.entrySet()) {\r\n\t \t\tList singleListofSynonims = entry.getValue();\r\n\t \t\tif (singleListofSynonims.contains(wordTofind)){\r\n\t \t\t\t\r\n\t \t\t\tmappedList.add(singleListofSynonims);\r\n\t \t\t\tGoogleToThesarus.put(wordTofind,singleListofSynonims);\r\n\t \t\t}\r\n\t \t\telse {\r\n\t \t\t\t//System.out.println(\"value not in map\");\r\n\t \t}\r\n\t \t}\r\n\t }",
"public abstract void substitutedWords(long ms, int n);",
"public void normalization(Map <String,ArrayList<Point>> map){\r\n \t/*First Translation*/\r\n \tint minX,minY,x,y,i = 0;\r\n \tminX = minXValue(map);\r\n \tminY = minYValue(map);\r\n \tint indexTrans = 0;\r\n \tfor (String key : map.keySet()) {\r\n \t\tx = (int) (map.get(key).get(indexTrans).getX() - minX);\r\n \t\ty = (int) (map.get(key).get(indexTrans).getY()- minY);\r\n \t\t/*set new x and y*/\r\n \t\tmap.get(key).set(i, new Point(x,y));\r\n \t\tindexTrans++;\r\n \t\t}\r\n \t/*Scaling */\r\n \t/*x = x*s ; y = y*s */\r\n \t/*initialize s*/\r\n \tint xMaxWindow= 600,yMaxWindow = 600,s;\r\n \tif ((xMaxWindow/maxXValue(map)) < (yMaxWindow/maxYValue(map)))\r\n \t{\r\n \t\t\ts = (int) (0.8*(xMaxWindow/maxXValue(map)));\r\n \t}\r\n \t\telse\r\n \t\t{\r\n \t\ts = (int) (0.8*(yMaxWindow/maxYValue(map)));\r\n \t\t}\r\n \tint indexScaling = 0;\r\n \tfor (String key : map.keySet()) {\r\n \t\tx = (int) (map.get(key).get(indexScaling).getX()*s);\r\n \t\ty = (int) (map.get(key).get(indexScaling).getY()*s);\r\n \t\t/*set new x and y*/\r\n \t\tmap.get(key).set(i, new Point(x,y));\r\n \t\tindexScaling++;\r\n \t\t}\r\n \t/*Translation Back*/\r\n \t/* x = x + 0.1*xMaxWindow ; y = y + 0.1*yMaxWindow */\r\n \tint iSecTrans = 0;\r\n \tfor (String key : map.keySet()) {\r\n \t\tx = (int) (map.get(key).get(i).getX() + 0.1*xMaxWindow);\r\n \t\ty = (int) (map.get(key).get(i).getY() + 0.1*yMaxWindow);\r\n \t\t/*set new x and y*/\r\n \t\tmap.get(key).set(i, new Point(x,y));\r\n \t\tiSecTrans++;\r\n \t\t}\r\n \r\n \t\r\n \t\r\n }",
"private void populateDictionaryByLemmatizer() throws IOException {\n\n Enumeration e = dictionaryTerms.keys();\n while (e.hasMoreElements()) {\n String word = (String) e.nextElement();\n String tag = dictionaryTerms.get(word);\n\n if (!(word.contains(\" \")||word.contains(\"+\") ||word.contains(\"\\\"\") ||word.contains(\"'\")||word.contains(\".\") ||word.contains(\":\") || word.contains(\"(\") || word.contains(\")\") ||word.contains(\"-\")|| word.contains(\";\"))) {\n String tokenizedWords[] = tokenize(word);\n\n if (tokenizedWords.length == 1) {\n List<String> stemmings = stanfordLemmatizer.lemmatize(word);\n\n for (int i = 0; i < stemmings.size(); i++) {\n if (!dictionaryTerms.containsKey(stemmings.get(i))) {\n dictionaryTerms.put(stemmings.get(i), tag);\n System.out.println(\"Stemming: \" + word + \"\\t\" + stemmings.get(i));\n }\n }\n }\n }\n }\n }",
"public double[][] fit_transform(int[][] tf) {\n double[][] tfIdf = new double[tf.length][tf[0].length];\n int numDocument = tf.length;\n int[] df = df(tf);\n double[] idf = idf(numDocument, df);\n for (int i = 0; i < tf.length; i++) {\n int[] row = tf[i];\n for (int j = 0; j < row.length; j++) {\n tfIdf[i][j] = tf[i][j] * idf[j];\n }\n }\n return euclideanNorm(tfIdf);\n }",
"public double tf(String wordToLookFor, HashMap<String, ArrayList<Integer>> tokensHM, Document doc) {\n if (tokensHM.containsKey(wordToLookFor)) {\n double count = 0;\n String[] words = doc.generateWordList(doc.getDocument());\n if(tokensHM.get(wordToLookFor).contains(doc.getIndex())) {\n for (String word : words) {\n if (word.equals(wordToLookFor)) {\n count++;\n }\n }\n }\n return count/words.length;\n }\n else {\n return 0;\n }\n }",
"public void fillMap(Map<String, List<String>> map){\n \tfor(String word : dictionary.words){ //Iterate over the ArrayList in the Dictionary object\n \t\tList<String> list = new ArrayList<String>();\n \t\tfor(String w : dictionary.words){ //iterate through all words in dictionary to find all one letter off from word\n \t\t\tif(isOneLetterOff(w, word))\n \t\t\t\tlist.add(w);\n \t\t\t//if w isn't off from word by one letter, check next w\n \t\t}\n \t\tmap.put(word, list);\n \t}\n }",
"@Override\n public double makePrediction(ParsedText text) {\n double pr = 0.0;\n\n /* FILL IN HERE */\n double productSpam = 0;\n double productNoSpam = 0;\n \n int i, tempSpam,tempNoSpam;\n int minSpam, minNoSpam ;\n \n \n for (String ng: text.ngrams) {\n \tminSpam = Integer.MAX_VALUE;\n \tminNoSpam = Integer.MAX_VALUE;\n \n\n \tfor (int h = 0;h < nbOfHashes; h++) {\n \t\ti = hash(ng,h);\n\n \t\ttempSpam = counts[1][h][i];\n \t\ttempNoSpam = counts[0][h][i];\n \t\t\n \t\t//System.out.print(tempSpam + \" \");\n\n \t\tminSpam = minSpam<tempSpam?minSpam:tempSpam; \n \t\tminNoSpam = minNoSpam<tempNoSpam?minNoSpam:tempNoSpam; \n \t\t\n \t}\n\n \t//System.out.println(minSpam + \"\\n\");\n \tproductSpam += Math.log(minSpam);\n \tproductNoSpam += Math.log(minNoSpam);\n }\n \n // size of set minus 1\n int lm1 = text.ngrams.size() - 1;\n \n //System.out.println((productNoSpam - productSpam ));\n //System.out.println((lm1*Math.log(this.classCounts[1]) - lm1*Math.log(this.classCounts[0])));\n\n //\n pr = 1 + Math.exp(productNoSpam - productSpam + lm1*(Math.log(classCounts[1]) - Math.log(classCounts[0])));\n // System.out.print(1.0/pr + \"\\n\");\n \n return 1.0 / pr;\n\n }",
"public static HashMap<String, Double> getTFIDF(String inputStr) throws IOException{\n\t\tHashMap<String, Double> result = new HashMap<String, Double>();\n\t\tHashMap<String, Integer> termsMap = new HashMap<String, Integer>();\t\t\n\t\tArrayList<String> inputTerms = getTerms(inputStr);\n\t\t\n\t\tfor(String s : inputTerms){\n\t\t\tif(termsMap.containsKey(s) != true){\n\t\t\t\ttermsMap.put(s, 1);\n\t\t\t}else{\n\t\t\t\ttermsMap.put(s, termsMap.get(s)+1);\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(String term : termsMap.keySet()){\n\t\t\tdouble TF;\n\t\t\t//System.out.println(term + \" \" + termsMap.get(term));\t\t\t\t\n\t\t\tTF = (double)termsMap.get(term)/inputTerms.size();\n\t\t\tresult.put(term, TF*cal_IDF(term));\n\t\t}\n\t\t\n\t\treturn result;\n\t}",
"private void RecalculateCharDistribution() {\r\n\t\tMap<Character, Integer> temp = new HashMap<>();\r\n\t\tfor (String s : sameWordLength) {\r\n\t\t\tfor (int i = 0; i < s.length(); i++) {\r\n\r\n\t\t\t\tchar ch = s.charAt(i);\r\n\t\t\t\tif (guessedCharacter.contains(ch)) {\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (!temp.containsKey(ch)) {\r\n\t\t\t\t\t\ttemp.put(ch, 1);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tint t = temp.get(ch) + 1;\r\n\t\t\t\t\t\ttemp.put(ch, t);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tcharCount = temp;\r\n\r\n\t}",
"public void apply(GlobalWindow window, Iterable<String> values, \n Collector<Tuple2<String,Integer>> out) throws Exception {\n \t HashMap <String,Integer> countWord = new HashMap<String,Integer>();\n \n for (String value : values) {\n \t \n \t String[] tokens = value.toLowerCase().split(\"\\\\W+\");\n \t for (String token : tokens)\n \t {\t if (token.length() >0) {\n \t\t if (countWord.get(token) != null)\n { countWord.put(token, countWord.get(token)+1);}\n else\n {countWord.put(token, 1);}\n \t }\n \t\t \n \t }\n }\n \n \n //Comparator to sort in reverse\n \t\t\tComparator<String> comparator = new Comparator<String>() {\n \t\t\t public int compare(String o1, String o2) {\n \t\t\t return countWord.get(o1).compareTo(countWord.get(o2));\n \t\t\t }\n \t\t\t};\n\n \t\t\tArrayList<String> words = new ArrayList<String>();\n \t\t\twords.addAll(countWord.keySet());\n\n \t\t\tCollections.sort(words,comparator);\n \t\t\tCollections.reverse(words);\n \t\t\t\n// System.out.println(Arrays.asList(words));\n \t\t\tSystem.out.println(\"10 most frequent words per stream\");\n System.out.println(\"-----------\");\n \n for(int i = 0; i < 10; i++) {\n \tSystem.out.println(words.get(i) + \" : \" + countWord.get(words.get(i)));\n }\n \n \n System.out.println(\"\\n\");\n \n }",
"public static Hashtable<String, Double> fakeResumeTF() {\n resume_tf = new Hashtable<String, Double>();\n resume_tf.put(\"am\", (double) 0);\n resume_tf.put(\"learning\", (double) 0);\n resume_tf.put(\"javascript\", (double) 1 / 10);\n resume_tf.put(\"java\", (double) 0);\n resume_tf.put(\"is\", (double) 2 / 10);\n resume_tf.put(\"cool\", (double) 0);\n resume_tf.put(\"language\", (double) 1 / 10);\n resume_tf.put(\"requirement\", (double) 1 / 10);\n resume_tf.put(\"for\", (double) 1 / 10);\n resume_tf.put(\"this\", (double) 1 / 10);\n resume_tf.put(\"job\", (double) 1 / 10);\n resume_tf.put(\"python\", (double) 1 / 10);\n resume_tf.put(\"wonderful\", (double) 1 / 10);\n return resume_tf;\n }",
"public int calWord() {\n for(int i = 0; i < newWord.length(); i++) {\n for (String c : keySetPoint) {\n if(String.valueOf(newWord.charAt(i)).equals(c)) {\n point += mapPoint.get(c);\n }\n }\n }\n\n return point;\n }",
"public static HashMap<String, HashMap<TemplateString, Double>> createStringWeightMapByWord(HashMap<TemplateString, HashMap<String, Double>> stringMap) {\r\n\t\tHashMap<String, HashMap<TemplateString, Double>> out = new HashMap<>();\r\n\t\t\r\n\t\tfor(Entry<TemplateString, HashMap<String, Double>> entry : stringMap.entrySet()) {\r\n\t\t\tTemplateString template = entry.getKey();\r\n\t\t\tHashMap<String, Double> wordMap = entry.getValue();\r\n\t\t\tfor(Entry<String, Double> wordEntry : wordMap.entrySet()) {\r\n\t\t\t\tString word = wordEntry.getKey();\r\n\t\t\t\tDouble weight = wordEntry.getValue();\r\n\t\t\t\t// If doesn't already have word, put in an empty map\r\n\t\t\t\tif(!out.containsKey(word)) out.put(word, new HashMap<TemplateString, Double>());\r\n\t\t\t\tout.get(word).put(template, weight);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn out;\r\n\t}",
"private Map<String, Map<String, Integer>> computeConfusionMatrix(List<String> sentences, List<String> targets) {\r\n Map<String, Map<String, Integer>> confusionMap = new HashMap<>();\r\n // initialize the map (confusion matrix) of occurrences to be all zeros\r\n for (String trueCategory : categories) {\r\n Map<String, Integer> subConfusionMap = new HashMap<>();\r\n for (String predictedCategory : categories) {\r\n subConfusionMap.put(predictedCategory, 0);\r\n }\r\n confusionMap.put(trueCategory, subConfusionMap);\r\n }\r\n\r\n List<String> predictions = predict(sentences);\r\n for (int i = 0; i < sentences.size(); i++) {\r\n String trueCategory = targets.get(i);\r\n String predictedCategory = predictions.get(i);\r\n Map<String, Integer> subConfusionMap = confusionMap.get(trueCategory);\r\n subConfusionMap.put(predictedCategory, subConfusionMap.get(predictedCategory) + 1);\r\n }\r\n return confusionMap;\r\n }",
"public static void main(String[] args) throws Exception {\n\t\tint i;\r\n\t\tint [][]preci_recall = new int [5][6]; \r\n\r\n\t\tNGRAM ngram = new NGRAM();\r\n\t\t\r\n\t\tfor(i=0; i<5; i++) {\r\n\t\t\t\r\n\t\t\tSystem.out.println((i+1) + \" th FOLD IS A TEST SET\");\r\n\t\t\t\r\n\t\t\tdouble[][] test_ngram_features = ngram.feature(i,1);\r\n\t\t\tdouble[][] train_ngram_features = ngram.feature(i,0);\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"NGRAM FEATURES...OK\");\r\n\t\r\n//\t\t\t\r\n//\t\t\tLIWC liwc = new LIWC();\r\n//\t\t\t\r\n//\t\t\tdouble[][] test_liwc_features = liwc.feature(i,1,test_ngram_features.length);\r\n//\t\t\tdouble[][] train_liwc_features = liwc.feature(i,0,train_ngram_features.length);\r\n//\r\n//\t\t\tSystem.out.println(\"LIWC FEATURES..OK\");\r\n//\t\t\t\r\n//\t\t\tCOMBINE combine = new COMBINE();\r\n//\t\t\tdouble[][] train_features = combine.sum(train_liwc_features,train_ngram_features);\r\n//\t\t\tdouble[][] test_features = combine.sum(test_liwc_features,test_ngram_features);\r\n//\t\t\t\r\n//\t\t\tSystem.out.println(\"COMBINE...OK\");\r\n\t\t\r\n\t\t\tSVMLIGHT svmlight = new SVMLIGHT();\r\n\t\t\tpreci_recall[i]=svmlight.calcc(train_ngram_features, test_ngram_features);\r\n\r\n\t\t}\r\n\t\t\r\n//\t 0 : truthful TP\r\n//\t 1 : truthful TP+FP\r\n//\t 2 : truthful TP+FN\r\n//\t 3 : deceptive TP\r\n//\t 4 : deceptive TP+FP\r\n//\t 5 : deceptive TP+FN\r\n\t\t\r\n\t\tint truthful_TP_sum=0,truthful_TPFP_sum=0,truthful_TPFN_sum=0;\r\n\t\tint deceptive_TP_sum=0,deceptive_TPFP_sum=0,deceptive_TPFN_sum=0;\r\n\t\t\r\n\t\tfor(i=0;i<5;i++) {\r\n\t\t\ttruthful_TP_sum+=preci_recall[i][0];\r\n\t\t\ttruthful_TPFP_sum+=preci_recall[i][1];\r\n\t\t\ttruthful_TPFN_sum+=preci_recall[i][2];\r\n\t\t\t\r\n\t\t\tdeceptive_TP_sum+=preci_recall[i][3];\r\n\t\t\tdeceptive_TPFP_sum+=preci_recall[i][4];\r\n\t\t\tdeceptive_TPFN_sum+=preci_recall[i][5];\r\n\t\t}\r\n\t\t\t\t\r\n\t\tSystem.out.println(\"\\n\\nTRUTHFUL_TP_SUM : \" + truthful_TP_sum);\r\n\t\tSystem.out.println(\"TRUTHFUL_TPFP_SUM : \" + truthful_TPFP_sum);\r\n\t\tSystem.out.println(\"TRUTHFUL_TPFN_SUM : \" + truthful_TPFN_sum);\r\n\t\t\r\n\t\tSystem.out.println(\"DECEPTIVE_TP_SUM : \" + deceptive_TP_sum);\r\n\t\tSystem.out.println(\"DECEPTIVE_TPFP_SUM : \" + deceptive_TPFP_sum);\r\n\t\tSystem.out.println(\"DECEPTIVE_TPFN_SUM : \" + deceptive_TPFN_sum);\r\n\t\t\r\n\t\tSystem.out.println(\"\\nTRUTHFUL PRECISION : \" + (double)(truthful_TP_sum)/(double)(truthful_TPFP_sum));\r\n\t\tSystem.out.println(\"TRUTHFUL RECALL : \" + (double)(truthful_TP_sum)/(double)(truthful_TPFN_sum));\r\n\t\t\r\n\t\tSystem.out.println(\"DECEPTIVE PRECISION : \" + (double)(deceptive_TP_sum)/(double)(deceptive_TPFP_sum));\r\n\t\tSystem.out.println(\"DECEPTIVE RECALL : \" + (double)(deceptive_TP_sum)/(double)(deceptive_TPFN_sum));\r\n\t\t\r\n\r\n\t}"
] | [
"0.660973",
"0.6539411",
"0.6469359",
"0.64470387",
"0.63040376",
"0.6137505",
"0.61077434",
"0.60718906",
"0.6050372",
"0.6037364",
"0.5984397",
"0.59153646",
"0.5898678",
"0.5851378",
"0.5834764",
"0.5831748",
"0.5801007",
"0.5797828",
"0.5785454",
"0.5764725",
"0.5737832",
"0.57031965",
"0.56994015",
"0.5679461",
"0.5665297",
"0.5641167",
"0.5620469",
"0.56031966",
"0.5598923",
"0.5582404",
"0.5569255",
"0.5549114",
"0.5546332",
"0.55276245",
"0.5525073",
"0.5478099",
"0.5450063",
"0.5429231",
"0.5425837",
"0.5415316",
"0.5384983",
"0.5370546",
"0.53646654",
"0.5364337",
"0.53595454",
"0.53558207",
"0.53555703",
"0.53362",
"0.5333996",
"0.5333474",
"0.5323425",
"0.53041625",
"0.52969825",
"0.5288392",
"0.5287596",
"0.5273743",
"0.5270593",
"0.5267684",
"0.5247307",
"0.52456677",
"0.52336276",
"0.523303",
"0.5231694",
"0.5218284",
"0.5216154",
"0.52138424",
"0.5195576",
"0.51932734",
"0.51857233",
"0.5176417",
"0.51683784",
"0.5165183",
"0.51640165",
"0.5160031",
"0.5154333",
"0.51526743",
"0.5150915",
"0.51444393",
"0.51309603",
"0.51305854",
"0.512233",
"0.5099066",
"0.508809",
"0.50799584",
"0.5079779",
"0.5075064",
"0.507389",
"0.5072325",
"0.505579",
"0.50501174",
"0.504632",
"0.50307107",
"0.50264305",
"0.5020115",
"0.5015459",
"0.50145364",
"0.50109416",
"0.5009246",
"0.5007758",
"0.5004445"
] | 0.63658506 | 4 |
After all values are calculated, normalize those | private void normalizeDictionary() {
Collections.sort(idfValues, Collections.reverseOrder());
Collections.sort(idf2Values, Collections.reverseOrder());
Double maxIDF=idfValues.get(0)==0.0?1.0:idfValues.get(0);
Double maxIDF2=idf2Values.get(0)==0.0?1.0:idf2Values.get(0);
for (int i = 0; i < getTfMapArrayIDF().size(); i++) {
List<Map<String,List<Double>>> gestureDocument = getTfMapArrayIDF().get(i);
for (int j = 0; j < gestureDocument.size(); j++) {
Map<String,List<Double>> tempMap = gestureDocument.get(j);
Iterator<Entry<String, List<Double>>> it = tempMap.entrySet().iterator();
while (it.hasNext()) {
Map.Entry<String,List<Double>> pairs = (Map.Entry)it.next();
//normalize tf-idf
pairs.getValue().set(3, pairs.getValue().get(3)/maxIDF);
//normalize tf-idf2
pairs.getValue().set(4, pairs.getValue().get(4)/maxIDF2);
}
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void normalize() {\n // determine the maximum value\n \n Double max = getMaxValue();\n \n if(max!=null) {\n normalize(max);\n }\n }",
"private void normalize() {\r\n // GET MAX PRICE \r\n for (Alternative alt : alternatives) {\r\n if (alt.getPrice() > 0 && alt.getPrice() < minPrice) {\r\n minPrice = alt.getPrice();\r\n }\r\n }\r\n\r\n for (Alternative alt : alternatives) {\r\n // NORMALIZE PRICE - NON BENIFICIAL using max - min \r\n double price = alt.getPrice();\r\n double value = minPrice / price;\r\n alt.setPrice(value);\r\n // BENITIFICIAL v[i,j] = x[i,j] / x[max,j]\r\n double wood = alt.getWood();\r\n value = wood / maxWood;\r\n alt.setWood(value);\r\n\r\n double brand = alt.getBrand();\r\n value = wood / maxBrand;\r\n alt.setBrand(value);\r\n\r\n double origin = alt.getOrigin();\r\n value = origin / maxOrigin;\r\n alt.setOrigin(value);\r\n\r\n }\r\n }",
"public void normalize() {\n double maxTotalTime = findMaxTotalTimeSeconds();\n int maxTotalMoves = findMaxTotalMoves();\n ResultMaxTotals maxTotals = new ResultMaxTotals(maxTotalTime, maxTotalMoves);\n\n updateNormalizedValues(maxTotals);\n }",
"public static void normalize()\n {\n int sum;\n\n for(int i=0;i<12;i++)\n {\n for(int j=0;j<12;j++) {\n sum = sumAll(i,j);\n if (sum != 0)\n for (int n = 0; n < 12; n++)\n weights[i][j][n] /= sum;\n }\n }\n }",
"public void normalize() {\r\n\t\tfor (int i = 0; i<no_goods; i++) {\t\t\t\r\n\t\t\tfor (IntegerArray r : prob[i].keySet()) {\t\t\t\t\r\n\t\t\t\tdouble[] p = prob[i].get(r);\r\n\t\t\t\tint s = sum[i].get(r);\r\n\t\t\t\t\r\n\t\t\t\tfor (int j = 0; j<p.length; j++)\r\n\t\t\t\t\tp[j] /= s;\r\n\t\t\t}\r\n\r\n\t\t\t// compute the marginal distribution for this good\r\n\t\t\tfor (int j = 0; j<no_bins; j++)\r\n\t\t\t\tmarg_prob[i][j] /= marg_sum;\r\n\t\t}\r\n\t\t\r\n\t\tready = true;\r\n\t}",
"public void normalize(){\n\t_defense = originalDefense;\n\t_strength = originalStrength;\n }",
"public void normalize(double normalizingFactor) {\n //System.out.println(\"norm: \" + normalizingFactor);\n for (T value : getFirstDimension()) {\n for (T secondValue : getMatches(value)) {\n double d = get(value, secondValue) / normalizingFactor;\n set(value, secondValue, d);\n }\n }\n }",
"public void normalize() {}",
"protected void updateValues(){\n double total = 0;\n for(int i = 0; i < values.length; i++){\n values[i] = \n operation(minimum + i * (double)(maximum - minimum) / (double)numSteps);\n \n total += values[i];\n }\n for(int i = 0; i < values.length; i++){\n values[i] /= total;\n }\n }",
"public final void normalize() {\n\tsvd(this);\n }",
"public void normalize()\n\t{\n\t\tif (this.getDenom() < 0)\n\t\t{\n\t\t\tthis.setDenom(this.getDenom() * (-1));\n\t\t\tthis.setNumer(this.getNumer() * (-1));\n\t\t}\n\t}",
"private static double[] normalize(double[] data)\n {\n double sum = 0;\n \n for (double d : data)\n sum += d;\n \n if (sum != 1 && sum != 0)\n {\n for (int i = 0; i < data.length; i++)\n data[i] /= sum;\n }\n \n return data;\n }",
"public void normalize(){\n\tstrength = 50;\n\tdefense = 55;\n\tattRating = 0.4\t;\n }",
"public void normalize() {\r\n\t\tfloat length = (float) this.lenght();\r\n\t\tif (length > 0) {\r\n\t\t\tx /= length;\r\n\t\t\ty /= length;\r\n\t\t\tz /= length;\r\n\t\t}\r\n\t}",
"public abstract void recalcNormalizationExtrema();",
"public void normalize() {\n // YOUR CODE HERE\n String w1, w2;\n for (int i = 0; i < row; i++) {\n w1 = NDTokens.get(i);\n for (int j = 0; j < column; j++) {\n w2 = NDTokens.get(j);\n if(smooth) {\n bi_grams_normalized[NDTokens.indexOf(w1)][NDTokens.indexOf(w2)] = (getCount(w1, w2))/(uni_grams[NDTokens.indexOf(w1)] + NDTokens_size);\n }else {\n bi_grams_normalized[NDTokens.indexOf(w1)][NDTokens.indexOf(w2)] = getCount(w1, w2)/(uni_grams[NDTokens.indexOf(w1)]);\n }\n }\n }\n }",
"public Double[][] normalize(Double[][] dataSet) {\n Double maxVal = Collections.max(DataClean.twoDArrToArrList(dataSet));\n Double minVal = Collections.min(DataClean.twoDArrToArrList(dataSet)); \n \n Double[][] newData = new Double[dataSet.length][dataSet[0].length];\n for (int i=0; i<dataSet.length; i++) {\n for (int j=0; j<dataSet[0].length; j++) {\n newData[i][j]= (dataSet[i][j]-minVal)/(maxVal-minVal);\n }\n }\n return newData;\n }",
"public static void normalise(double[] v) {\n double tot = 0;\r\n for (int i=0; i<v.length; i++) {\r\n tot += v[i] * v[i];\r\n }\r\n double div = Math.sqrt(tot);\r\n if (div > 0) {\r\n for (int i=0; i<v.length; i++) {\r\n v[i] /= div;\r\n }\r\n }\r\n }",
"@Override\r\n\t\tpublic void normalize()\r\n\t\t\t{\n\t\t\t\t\r\n\t\t\t}",
"public void normalize() {\n float length = (float)Math.sqrt(nx * nx + ny * ny);\n nx/=length;\n ny/=length;\n }",
"public void normalize()\n {\n\tdef += 200*counter;\n\tdmg -= 0.5*counter;\n\tcounter = 0;\n }",
"public double[] getNormalizedInputValues(){\r\n\t\tdouble [] norm = new double[realValues[0].length];\r\n\t\tfor (int i=0; i<norm.length; i++){\r\n\t\t\tif (!missingValues[0][i])\r\n\t\t\t\tnorm[i] = Attributes.getInputAttribute(i).normalizeValue(realValues[0][i]);\r\n\t\t\telse \r\n\t\t\t\tnorm[i] = -1.;\r\n\t\t}\r\n\t\treturn norm;\r\n\t}",
"public void normalization(){\n normalization = processControlBlock[0].getArrivalTime();\n }",
"public double[] getNormalizedOutputValues(){\r\n\t\tdouble [] norm = new double[realValues[1].length];\r\n\t\tfor (int i=0; i<norm.length; i++){\r\n\t\t\tif (!missingValues[1][i])\r\n\t\t\t\tnorm[i] = Attributes.getOutputAttribute(i).normalizeValue(realValues[1][i]);\r\n\t\t\telse\r\n\t\t\t\tnorm[i] = -1.;\r\n\t\t}\r\n\t\treturn norm;\r\n\t}",
"public void normalize()\n {\n double magnitude = this.magnitude();\n this.x = x / (float)magnitude;\n this.y = y / (float)magnitude;\n this.z = z / (float)magnitude;\n this.w = w / (float)magnitude;\n }",
"public void normalize() {\n\t\tdouble norm = norm();\n\t\tif (DoubleComparison.eq(norm, 0)) {\n\t\t\tthrow new RuntimeException(\"Failed to normalize: length is zero\");\n\t\t}\n\t\tthis.x = this.x / norm;\n\t\tthis.y = this.y / norm;\n\t\tthis.z = this.z / norm;\n\t}",
"public void normaliseProbs() {\n\t\t// Get total\n\t\tdouble sum = 0;\n\t\tfor (Double d : itemProbs_.values()) {\n\t\t\tsum += d;\n\t\t}\n\n\t\t// If already at 1, just return.\n\t\tif ((sum >= 0.9999) && (sum <= 1.0001))\n\t\t\treturn;\n\n\t\t// Normalise\n\t\tint count = itemProbs_.size();\n\t\tfor (T element : itemProbs_.keySet()) {\n\t\t\t// If the sum is 0, everything is equal.\n\t\t\tif (sum == 0)\n\t\t\t\titemProbs_.put(element, 1.0 / count);\n\t\t\telse\n\t\t\t\titemProbs_.put(element, itemProbs_.get(element) / sum);\n\t\t}\n\t\trebuildProbs_ = true;\n\t\tklSize_ = 0;\n\t}",
"private void zScoreNormalize(List<Double> data)\n\t{\n\t\tdouble mean=Statistics.mean(data);\n\t\tdouble sd=Statistics.sd(data);\n\t\tfor(int i=0; i!= data.size(); ++i)\n\t\t{\n\t\t\tdata.set(i, (data.get(i)-mean)/sd);\n\t\t}\n\n\t}",
"void normalizeSafe()\r\n {\r\n float fLengthSquared = lengthSquared();\r\n if ( 0.0f == fLengthSquared )\r\n {\r\n set(ZERO);\r\n }\r\n else\r\n {\r\n scale(1.0f/(float)Math.sqrt(fLengthSquared));\r\n }\r\n }",
"public void normalize() { sets length to 1\n //\n double length = Math.sqrt(x * x + y * y);\n\n if (length != 0.0) {\n float s = 1.0f / (float) length;\n x = x * s;\n y = y * s;\n }\n }",
"@Override\n\tpublic double\n\tnormalize()\n\t{\n\t\tdouble len = length();\n\n\t\tif( len != 0 )\n\t\t{\n\t\t\tdata[0] /= len;\n\t\t\tdata[1] /= len;\n\t\t\tdata[2] /= len;\n\t\t}\n\t\t\n\t\treturn len;\n\t}",
"private double[] normalize(double[] p) {\n double sum = 0;\n double[] output = new double[p.length];\n for (double i : p) {\n sum += i;\n }\n for (int i = 0; i < output.length; i++) {\n output[i] = p[i]/sum;\n }\n return output;\n }",
"private double valueToNormalized(T value) {\n if (0 == absoluteCriticalValuePrim - absoluteWarningValuePrim) {\n // prevent division by zero, simply return 0.\n return 0d;\n }\n return (value.doubleValue() - absoluteWarningValuePrim) / (absoluteCriticalValuePrim - absoluteWarningValuePrim);\n }",
"public void histNormalize() {\n\n double max = max();\n double min = min();\n max = max - min;\n for (int i = 0; i < pixelData.length; i++) {\n double value = pixelData[i] & 0xff;\n pixelData[i] = (byte) Math.floor((value - min) * 255 / max);\n }\n }",
"public void normalize(){\r\n \tif(!normal){\r\n\t attack/=2;\r\n\t defense*=2;\r\n\t normal=true;\r\n\t}\r\n }",
"public void normalize(){\r\n \tif(!normal){\r\n\t attack/=2;\r\n\t defense*=2;\r\n\t normal=true;\r\n\t}\r\n }",
"public Vector normalize ( );",
"private double denormalizePrediction(double normalizedPrediction) {\n\t\t\t\n\t\t\tif (this.statsTarget.getCounter()==0)\n\t\t\t\treturn 0 ;\n\t\t\t\n\t\t\tdouble value = 0;\n\t\t\tif (normalizeationOption.getChosenIndex() == 0 || normalizeationOption.getChosenIndex() == 1) {\n\t\t\t\tvalue = normalizedPrediction * this.statsTarget.getStandardDeviation()\n\t\t\t\t\t\t+ this.statsTarget.getCurrentMean();\n\t\t\t} else if (normalizeationOption.getChosenIndex() == 2) {\n\t\t\t\tvalue = normalizedPrediction * this.statsTarget.getRange() + this.statsTarget.getMin();\n\t\t\t}else {\n\t\t\t\tvalue = normalizedPrediction ;\n\t\t\t}\n\t\t\treturn value;\n\t\t}",
"public void normalize(){\r\n /*//cambios 30 de agosto\r\n if (firstExtreme<0&&secondExtreme<0){\r\n firstExtreme=-firstExtreme;\r\n secondExtreme=-secondExtreme;\r\n }\r\n //fin cambios 30 de agosto*/\r\n if (firstExtreme>secondExtreme){\r\n double auxExtreme = firstExtreme;\r\n char auxLimit = feIncluded;\r\n firstExtreme = secondExtreme;\r\n secondExtreme = auxExtreme;\r\n feIncluded = seIncluded==']'?'[':'(';\r\n seIncluded = auxLimit=='['?']':')';\r\n }\r\n }",
"private double normalizeImageValue(double value){\n return value/(31);\n }",
"private void normalize() {\n this.x = (this.x - RobocodeRunner.width / 2) / RobocodeRunner.width;\n this.y = (this.y - RobocodeRunner.height / 2) / RobocodeRunner.height;\n this.distance /= Math.sqrt(RobocodeRunner.width * RobocodeRunner.width + RobocodeRunner.height * RobocodeRunner.height);\n this.enemyHeading /= 90;\n this.enemyDx /= 8;\n this.enemyDy /= 8;\n this.gunToTurn /= 180;\n this.angle /= 180;\n }",
"private void preprocessOutputs() {\n\t\tfor (int i = 0 ; i < numberOfOutputs; i++) {\n\t\t\tdouble minValue = Double.MAX_VALUE;\n\t\t\tdouble maxValue = 0;\n\t\t\tfor (int j = 0; j < numberOfRecords; j++) {\n\t\t\t\tif (records.get(j).output[i] < minValue) {\n\t\t\t\t\tminValue = records.get(j).output[i];\n\t\t\t\t}\n\t\t\t\tif (records.get(j).output[i] > maxValue) {\n\t\t\t\t\tmaxValue = records.get(j).output[i];\n\t\t\t\t}\n\t\t\t}\n\t\t\t// set global minimums and maximums\n\t\t\toutputMinimums[i] = minValue;\n\t\t\toutputMaximums[i] = maxValue;\n\n\t\t\t// scale output to be between 0 and 1\n\t\t\tif (minValue < 0 || maxValue > 1) {\n\t\t\t\tfor (int j = 0; j < numberOfRecords; j++) {\n\n\t\t\t\t\tdouble oldOutput = records.get(j).output[i];\n\t\t\t\t\tdouble newOutput = (oldOutput - minValue) / (maxValue - minValue);\n\t\t\t\t\trecords.get(j).output[i] = newOutput;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"static void normalize(double[] state) {\r\n double norm = 1/Math.sqrt(state[0]*state[0]+state[2]*state[2]+state[4]*state[4]+state[6]*state[6]);\r\n state[0] *= norm;\r\n state[2] *= norm;\r\n state[4] *= norm;\r\n state[6] *= norm;\r\n }",
"private void normalizePrior(NumericSequenceData prior) {\n double sum=0;\n int length=prior.getSize();\n for (int i=0;i<length;i++) {\n sum+=prior.getValueAtRelativePosition(i);\n }\n for (int i=0;i<length;i++) {\n double oldvalue=prior.getValueAtRelativePosition(i); \n //if (sum==0) prior.setValueAtRelativePosition(i,1.0/(double)length);\n if (sum==0) prior.setValueAtRelativePosition(i,0);\n else prior.setValueAtRelativePosition(i, oldvalue/sum);\n } \n }",
"public double[] getNormalizedInputValues( InstanceAttributes instAttributes ){\r\n\t\tdouble [] norm = new double[realValues[0].length];\r\n\t\tfor (int i=0; i<norm.length; i++){\r\n\t\t\tif (!missingValues[0][i])\r\n\t\t\t\tnorm[i] = instAttributes.getInputAttribute(i).normalizeValue(realValues[0][i]);\r\n\t\t\telse \r\n\t\t\t\tnorm[i] = -1.;\r\n\t\t}\r\n\t\treturn norm;\r\n\t}",
"public static void normalization(double[] array)\r\n\t{\r\n\t\tdouble sum = Σ(array);\r\n\r\n\t\tif (sum == 0 || array.length == 0)\r\n\t\t\treturn;\r\n\r\n\t\tfor (int i = 0; i < array.length; i++)\r\n\t\t\tarray[i] = array[i] / sum;\r\n\t}",
"public double[] getNormalizedOutputValues( InstanceAttributes instAttributes ){\r\n\t\tdouble [] norm = new double[realValues[1].length];\r\n\t\tfor (int i=0; i<norm.length; i++){\r\n\t\t\tif (!missingValues[1][i])\r\n\t\t\t\tnorm[i] = instAttributes.getOutputAttribute(i).normalizeValue(realValues[1][i]);\r\n\t\t\telse\r\n\t\t\t\tnorm[i] = -1.;\r\n\t\t}\r\n\t\treturn norm;\r\n\t}",
"public final void normalizeCP() {\n\t// domain error may occur\n\tdouble s = Math.pow(determinant(), -1.0/3.0);\n\tmul((float)s);\n }",
"public Vector3D normalize()\r\n {\r\n float oneOverMagnitude = 0;\r\n float mag = magnitude();\r\n \r\n if (mag!=0) {\r\n oneOverMagnitude = 1 / mag;\r\n }\r\n\r\n return this.product(oneOverMagnitude);\r\n }",
"private void normalizeCriteriaWeights(){\n\t\tSystem.out.println(\"SYSTEM: Normalizing general criteria\");\n\t\tdouble total = 0;\n\t\tfor(Criterion crit : data.getCriteria()){\n\t\t\ttotal = total + crit.getWeight();\n\t\t}\n\t\t\n\t\tfor(Criterion crit : data.getCriteria()){\n\t\t\tdouble res = crit.getWeight() / total;\n\t\t\tSystem.out.println(\"SYSTEM: Total: \"+ total +\" || value: \"+crit.getWeight()+\"|| res: \"+ res);\n\t\t\tcrit.setWeight(res);\n\t\t}\n\t\t\n\t\t//normalize each of the Service Templates\n\t\tfor(ServiceTemplate template : data.getServiceTemplates()){\n\t\t\tSystem.out.println(\"SYSTEM: Normalizing criteria of the serviceTemplate: \"+ template.getId());\n\t\t\tdouble templateTotal = 0;\n\t\t\tfor(Criterion crit : template.getCriteria()){\n\t\t\t\ttemplateTotal = templateTotal + crit.getWeight();\n\t\t\t}\n\t\t\t\n\t\t\tfor(Criterion crit : template.getCriteria()){\n\t\t\t\tdouble res = crit.getWeight() / templateTotal;\n\t\t\t\tSystem.out.println(\"SYSTEM: Total: \"+ templateTotal +\" || value: \"+crit.getWeight()+\"|| res: \"+ res);\n\t\t\t\tcrit.setWeight(res);\n\t\t\t}\n\t\t}\n\t}",
"private double normaliseRating(double boundedRating) {\n return (boundedRating - MIN_RATING) / RANGE;\n }",
"@Override\n\tpublic List<Double> computeValues() {\n\t\treturn null;\n\t}",
"public void normalizeColumn(final int columnIndex) {\r\n double max = Double.NEGATIVE_INFINITY;\r\n double min = Double.POSITIVE_INFINITY;\r\n for (int i = 0; i < this.getRowCount(); i++) {\r\n double val = getLogicalValueAt(i, columnIndex);\r\n if (val > max) {\r\n max = val;\r\n }\r\n if (val < min) {\r\n min = val;\r\n }\r\n }\r\n for (int i = 0; i < this.getRowCount(); i++) {\r\n setLogicalValue(i, columnIndex, (getLogicalValueAt(i, columnIndex) - min)\r\n / (max - min), false);\r\n }\r\n this.fireTableDataChanged();\r\n }",
"public Vector2f normalizeLocal ()\n {\n return normalize(this);\n }",
"private void normalize(DMatrixRMaj M) {\n double suma=0;\n Equation eq = new Equation();\n eq.alias(M, \"M\");\n eq.alias(suma,\"s\");\n\n// for (int i=0;i<M.numRows;i++) {\n// for (int j = 0; j < M.numCols; j++) {\n// eq.alias(i, \"i\");\n// eq.alias(j, \"j\");\n// eq.process(\"s = s + M(i,j)\");\n//// suma = suma + M.get(i,j);\n// }\n// }\n// for (int i=0;i<M.numRows;i++){\n// for (int j=0;j<M.numCols;j++){\n//// eq.alias(i,\"i\");\n//// eq.alias(j,\"j\");\n//// eq.process(\"s = s + M(i,j)\");\n// M.set(i,j,M.get(i,j)/suma);\n// }\n for(int i=0; i < M.numRows; i++){\n eq.alias(i, \"i\");\n //eq.process(\"M(i,:) = exp(M(i,:) - max(M(i,:)))\"); // to prevent high values in exp(M)\n //eq.process(\"M(i,:) = M(i,:) / sum(M(i,:))\");\n eq.process(\"M(i,:) = M(i,:) / sum(M(i,:))\");\n// eq.process(\"M(i,:) = M(i,:) / s\");\n }\n }",
"private void updateMuVariance() {\n\t\tmu = train.getLocalMean(); \n\t\tsigma = train.getLocalVariance(); \n\t\t\n\t\t/*\n\t\t * If the ratio of data variance between dimensions is too small, it \n\t\t * will cause numerical errors. To address this, we artificially boost\n\t\t * the variance by epsilon, a small fraction of the standard deviation\n\t\t * of the largest dimension. \n\t\t * */\n\t\tupdateEpsilon(); \n\t\tsigma = MathUtils.add(sigma, epsilon); \n\t\t\n\t}",
"@Override\n public double getResult(Map<String, Double> values) {\n List<Node> nodes = getChildNodes();\n double result = nodes.get(0).getResult(values);\n if (nodes.size() > 1) {\n for (int i = 1; i < nodes.size(); i++) {\n result = result / nodes.get(i).getResult(values);\n }\n }\n return result;\n }",
"public double[] Normalizar01(int[] v){\n double[] result=new double[v.length];\n double s=v[0];\n double max=v[0];\n double min=v[0];\n for (int i=1;i<v.length;i++){\n s+=v[i];\n //minimo\n if (v[i]<min)\n min=v[i];\n if (v[i]>max)\n max=v[i];\n //maximo\n }\n for (int i=0;i<v.length;i++){\n result[i]=((double)v[i]-min)/(max-min);\n }\n\n return result;\n }",
"public ArrayList<Double> normalize( ArrayList<Double> data, double scale )\n {\n double min = Double.MAX_VALUE;\n double max = Double.MIN_VALUE;\n ArrayList<Double> result = new ArrayList<Double>();\n\n // First, need to find the min value in the array\n for( double value : data )\n {\n if( value < min )\n {\n min = value;\n }\n }\n\n // Next, translate by the min amount\n for( double value : data )\n {\n double temp = (value - min);\n result.add( temp );\n if( temp > max )\n {\n max = temp;\n }\n }\n\n // Finally, scale by max\n for( int i=0; i<result.size(); i++ )\n {\n result.set( i, (scale * ( result.get( i ) / max )) );\n }\n\n return result;\n }",
"public double[][] normalize( double[][] data )\n {\n double[][] result = new double[ data.length ][];\n\n for( int i=0; i<data.length; i++ )\n {\n result[ i ] = normalize( data[ i ], 1 );\n }\n\n return result;\n }",
"@SuppressWarnings(\"unchecked\")\n private T normalizedToValue(double normalized) {\n double v = absoluteWarningValuePrim + normalized * (absoluteCriticalValuePrim - absoluteWarningValuePrim);\n // TODO parameterize this rounding to allow variable decimal points\n return (T) numberType.toNumber(Math.round(v * 100) / 100d);\n }",
"public Vector normalize(){\n\t\tdouble mag = magnitude();\n\t\treturn new Vector(x/mag, y/mag, z/mag);\n\t}",
"private double[][] normalize (float[][] in) {\n\n\t\tdouble[][] temp = new double[in.length][2];\n\n\t\t// Get centroid\n\t\tfloat[] centroid = getCentroid(in);\n\n\t\t// Normalize\n\t\tfor(int i = 0; i < in.length; i++) {\n\t\t\ttemp[i][0] = in[i][0] - centroid[0];\n\t\t\ttemp[i][1] = in[i][1] - centroid[1];\n\t\t}\n\n\t\treturn temp;\n\t}",
"public void checkNormalized() {\n double tot = 0.0;\n int i;\n for (i = 0; i < histogram_proportions.size(); i++)\n tot += histogram_proportions.elementAt(i).doubleValue();\n if (!Statistics.APPROXIMATELY_EQUAL(tot, 1.0, EPS))\n Dataset.perror(\"Histogram.class :: not normalized \");\n }",
"private void calculateMaxTemperatureNormalisation() {\n maxTemperatureNormalisation = (temperatureMax - temperatureMin) / 2;\n }",
"public Vector normalize() {\n double num=1/length();\n head = scale(num).head;\n return this;\n }",
"@Override \n public double[] fastApply(double[] x) {\n double d = dot.norm(x);\n scale.fastDivide(x, d);\n return x;\n }",
"private void normalize(double[] scores, boolean wantSmall) {\n\n // Yes\n double randomLowValue = 0.00001;\n\n if (wantSmall) {\n double min = Double.MAX_VALUE;\n for (double score : scores) {\n if (score < min) min = score;\n }\n\n for (int i = 0; i < scores.length; i++) {\n scores[i] = min / Math.max(scores[i], randomLowValue);\n }\n\n } else {\n double max = Double.MIN_VALUE;\n for (double score : scores) {\n if (score > max) max = score;\n }\n\n if (max == 0) max = randomLowValue;\n for (int i = 0; i < scores.length; i++) {\n scores[i] = scores[i] / max;\n }\n }\n }",
"protected void calcMinMax() {\n }",
"private void normalizeServiceTemplateWeights(){\n\t\tSystem.out.println(\"SYSTEM: Normalizing Service Template Weights\");\n\t\tdouble total = 0;\n\t\tfor(ServiceTemplate template : data.getServiceTemplates()){\n\t\t\ttotal = total + template.getWeight();\n\t\t}\n\t\t\n\t\tfor(ServiceTemplate template : data.getServiceTemplates()){\n\t\t\tdouble res = template.getWeight() / total;\n\t\t\tSystem.out.println(\"SYSTEM: Total: \"+ total +\" || value: \"+template.getWeight()+\"|| res: \"+ res);\n\t\t\ttemplate.setWeight((float) res);\n\t\t}\n\t}",
"public double[] Normalizar(int[] v){\n double[] result=new double[v.length];\n double s=0;\n for (int i=0;i<v.length;i++){\n s+=v[i];\n }\n for (int i=0;i<v.length;i++){\n result[i]=(double)v[i]/(double)s;\n }\n\n return result;\n }",
"private static double minMaxNormalization(final double value) {\n return (((value - Configuration.ACTUAL_MIN) / (Configuration.ACTUAL_MAX - Configuration.ACTUAL_MIN)) * (Configuration.NORMALIZED_MAX - Configuration.NORMALIZED_MIN)) + Configuration.NORMALIZED_MIN;\n }",
"public Array2DRowRealMatrix getNormalisedData() {\r\n\t\t\r\n\t\t//declare variables\r\n\t\tdouble dataVal;\r\n\t\tdouble normalisationVal;\r\n\t\tdouble finalVal;\r\n\t\r\n\t\tArray2DRowRealMatrix returnMatrix = new Array2DRowRealMatrix(noOfWavelengths,2);\r\n\t\t\r\n\t\t//iterate through data\r\n\t\tfor(int rowIndex=0; rowIndex < noOfWavelengths; rowIndex++) {\r\n\t\t\t\r\n\t\t\t//normalised data value = (recorded data value / recorded normalisation value) * calibration ratio\r\n\t\t\tdouble[] normalData = new double[2];\r\n\r\n\t\t\tdataVal = data.getRow(rowIndex)[1];\r\n\t\t\tnormalisationVal = normalisationData.getRow(rowIndex)[1];\r\n\t\t\t\r\n\t\t\tnormalData[0] = data.getRow(rowIndex)[0];\r\n\t\t\tnormalData[1] = (dataVal / normalisationVal) * calibRatio;\r\n\t\t\t\r\n\t\t\treturnMatrix.setRow(rowIndex, normalData);\r\n\t\t}\r\n\r\n\t\treturn returnMatrix;\r\n\t}",
"public Vec2double normalise() {\n\t\tdouble len = (double) (1 / Math.sqrt(x*x + y*y));\n//\t\tx *= len;\n//\t\ty *= len;\n\t\treturn new Vec2double(x*len, y*len);\n\t}",
"public void normalize(List<RankList> samples) {\n/* 667 */ for (RankList sample : samples) nml.normalize(sample);\n/* */ \n/* */ }",
"@Override\n\tpublic void\n\tscalarDiv( double value )\n\t{\n\t\tdata[0] /= value;\n\t\tdata[1] /= value;\n\t\tdata[2] /= value;\n\t}",
"public ArrayList<DataPoint> normalizeFeatures(ArrayList<DataPoint> datapoints) {\n\t\t\n\t\tdouble[] vector = new double[featureCount];\n\t\t// now normalize ALL the points!\n\t\tfor (DataPoint aPoint : datapoints) {\n\t\t\tvector = aPoint.vector;\n\t\t\tfor (int i = 0; i < featureCount; ++i) {\n\t\t\t\tvector[i] = (vector[i] - meansOfFeatures.get(i))\n\t\t\t\t\t\t/ stdevOfFeatures.get(i);\n\t\t\t}\n\t\t\taPoint.setVector(vector);\n\t\t}\n\t\treturn datapoints;\n\t}",
"public static double[] normalize(double[] v) {\n double[] tmp = new double[3];\n tmp[0] = v[0] / VectorMath.length(v); \n tmp[1] = v[1] / VectorMath.length(v); \n tmp[2] = v[2] / VectorMath.length(v); \n return tmp; \n }",
"@Override\n protected void afterAttach(){\n\n float scaleE = (float) Math.pow(toValue, 1.0 / totalIterations);\n scaleTransform.updateValues(scaleE, scaleE, scaleE);\n }",
"public List<Page> normalize(List<Page> pages) {\n\t\tdouble hubTotal = 0;\n\t\tdouble authTotal = 0;\n\t\tfor (Page p : pages) {\n\t\t\t// Sum Hub scores over all pages\n\t\t\thubTotal += Math.pow(p.hub, 2);\n\t\t\t// Sum Authority scores over all pages\n\t\t\tauthTotal += Math.pow(p.authority, 2);\n\t\t}\n\t\t// divide all hub and authority scores for all pages\n\t\tfor (Page p : pages) {\n\t\t\tif (hubTotal > 0) {\n\t\t\t\tp.hub /= hubTotal;\n\t\t\t} else {\n\t\t\t\tp.hub = 0;\n\t\t\t}\n\t\t\tif (authTotal > 0) {\n\t\t\t\tp.authority /= authTotal;\n\t\t\t} else {\n\t\t\t\tp.authority = 0;\n\t\t\t}\n\t\t}\n\t\treturn pages; // with normalised scores now\n\t}",
"public final void normalize(Matrix3f m1) {\n\tset(m1);\n\tsvd(this);\n }",
"private double[] normalizeHistogram(double[] inputHistogram, int totalPixels) {\n\t\tdouble[] normalized=new double[inputHistogram.length];\n\t\tfor(int i=0;i<inputHistogram.length&&start;i++){\n\t\t\tnormalized[i]=inputHistogram[i]/totalPixels;\n\t\t}\n\t\treturn normalized;\n\t}",
"public Vector2f normalize() {\n return div(length());\n }",
"public void unaverage() {\n\t\tif (!averaged)\n\t\t\tthrow new AssertionError(\"can't unaverage twice!!\");\n\t\t\n\t\tfor (int i = 0; i < w.length; i++)\n\t\t\tw[i] = (w[i] + wupdates[i])/(t+1.0);\n\t\t\n\t\tscale = 1.0;\n\t\taveraged = false;\n\t}",
"public double l1_norm()\r\n {\r\n double sum = 0.0;\r\n for (Double c : this.values())\r\n sum += Math.abs(c);\r\n\r\n return sum;\r\n }",
"@Override\n public void crunch(float values[]){\n int biggest = 0;\n int smallest = 0;\n\n for(int j = 0; j <= values.length -1; j++){\n for(int i = 0; i <= values.length -1; i++){\n if(values[i+1] > values[i]){\n biggest = i+1;\n smallest = i;\n } else{\n biggest = i;\n smallest = i+1;\n }\n }\n if(smallest != 0){\n values[biggest] /= values[smallest];\n }\n }\n }",
"public Vector330Class normalize(){\n if(this.magnitude() <= EPS){\n return new Vector330Class(0, 0);\n }\n else{\n return new Vector330Class(this.x * (1/this.magnitude()), this.y * (1/this.magnitude()));\n }\n }",
"public double[] preprocessDataNormalizationOnly(double[] data) {\n return dataNormalization.normalizeNewData(data);\n }",
"private void updateVariance() {\r\n double variance = 0.0;\r\n updateMean();\r\n for (Tweet t : members) {\r\n variance += ((t.getDateLong() - this.mean) * (t.getDateLong() - this.mean));\r\n }\r\n variance /= members.size();\r\n this.variance = variance;\r\n }",
"float getScaler();",
"IVec3 normalized();",
"private static void normalizeFromLog10(double[] array) {\n double maxValue = findMaxEntry(array).first;\n for (int i = 0; i < array.length; i++)\n array[i] = Math.pow(10, array[i] - maxValue);\n \n // normalize\n double sum = 0.0;\n for (int i = 0; i < array.length; i++)\n sum += array[i];\n for (int i = 0; i < array.length; i++)\n array[i] /= sum;\n }",
"private double norm(IDictionary<String, Double> vector) {\n\t\t double output = 0.0;\n\t\t for (KVPair<String, Double> pair : vector) {\n\t\t\t double score = pair.getValue();\n\t\t output = output + (score * score);\n\t\t }\n\t return Math.sqrt(output);\t \n }",
"@Override\n public double calculate(double input)\n {\n return input/getValue();\n }",
"public void normalizeTable() {\r\n for (int i = 0; i < this.getLogicalColumnCount(); i++) {\r\n normalizeColumn(i);\r\n }\r\n }",
"@Test\n void normalize() {\n\n Vector v = new Vector(1, 2, 3);\n Vector vCopy = new Vector(v.getHead());\n Vector vCopyNormalize = vCopy.normalize();\n if (vCopy != vCopyNormalize)\n fail(\"ERROR: normalize() function creates a new vector\");\n if (!isZero(vCopyNormalize.length() - 1))\n fail(\"ERROR: normalize() result is not a unit vector\");\n Vector u = v.normalized();\n if (u == v)\n fail(\"ERROR: normalized() function does not create a new vector\");\n }",
"private void normalizeLambda_mode3(double[] origLambda) {\n double max = NegInf;\n double min = PosInf;\n double scaling = 0.0;\n\n for (int i = 1; i < origLambda.length; i++) {\n if (origLambda[i] > max) max = origLambda[i];\n if (origLambda[i] < min) min = origLambda[i];\n }\n\n if (Math.abs(max) > 1e-30 || Math.abs(min) > 1e-30) // not all weights are\n // zero\n {\n if (max > 0 && min > 0)\n scaling = max;\n else if (max > 0 && min < 0) {\n if (Math.abs(max) > Math.abs(min))\n scaling = max;\n else\n scaling = Math.abs(min);\n } else if (max <= 0) scaling = Math.abs(min);\n\n for (int i = 1; i < origLambda.length; i++)\n origLambda[i] /= scaling;\n }\n }",
"public void normalize() {\n\t\tVector initPos = palmData.get(0)[0];\n\n\t\tfor (int i=1; i<length; i++) { //skip first frame\n\t\t\t//normalize palm\n\t\t\tVector framePos = palmData.get(i)[0];\n\n\t\t\tframePos.setX(framePos.getX() - initPos.getX());\n\t\t\tframePos.setY(framePos.getY() - initPos.getY());\n\t\t\tframePos.setZ(framePos.getZ() - initPos.getZ());\n\n\t\t\t//normalize fingers\n\t\t\tfor (int j=0; j<5; j++) {\n\t\t\t\tVector fingerPos = fingerData.get(i)[j][0];\n\n\t\t\t\tif (fingerPos != null) {\n\t\t\t\t\tif (rightHanded) {\n\t\t\t\t\t\tfingerPos.setX(fingerPos.getX() - initPos.getX());\n\t\t\t\t\t\tfingerPos.setY(fingerPos.getY() - initPos.getY());\n\t\t\t\t\t\tfingerPos.setZ(fingerPos.getZ() - initPos.getZ());\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfingerPos.setX(-(fingerPos.getX() - initPos.getX()));\n\t\t\t\t\t\tfingerPos.setY(-(fingerPos.getY() - initPos.getY()));\n\t\t\t\t\t\tfingerPos.setZ(-(fingerPos.getZ() - initPos.getZ()));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tVector framePos = palmData.get(0)[0];\n\n\t\t//set first frame\n\t\tpalmData.get(0)[0].setX(framePos.getX() - initPos.getX());\n\t\tpalmData.get(0)[0].setY(framePos.getY() - initPos.getY());\n\t\tpalmData.get(0)[0].setZ(framePos.getZ() - initPos.getZ());\n\n\t\t//normalize fingers\n\t\tfor (int i=0; i<5; i++) {\n\t\t\tVector fingerPos = fingerData.get(0)[i][0];\n\n\t\t\tif (fingerPos != null) {\n\t\t\t\tfingerPos.setX(fingerPos.getX() - initPos.getX());\n\t\t\t\tfingerPos.setY(fingerPos.getY() - initPos.getY());\n\t\t\t\tfingerPos.setZ(fingerPos.getZ() - initPos.getZ());\n\t\t\t}\n\t\t}\n\t}",
"public static final double[] normalize(final double[] V)\n {\n double []vec = new double[periodNum];\t\n\t//Vector vec = new Vector(periodNum);\n\t//Double zero = new Double(0);\n\t//for(int i=0;i<periodNum;i++)\n\t// vec.insertElementAt(zero,i);\n\n\tdouble sum =0;\n\t\n\tfor(int i=0;i<periodNum;i++)\n\t{\n\t\tsum += V[i];\n\t\t//sum += ((Double)V.elementAt(i)).doubleValue();\n\t}\n\t// if sum is 0, can't divide using it\n\tif(sum ==0)\n\t return V;\n\n\n\tfor(int i=0;i<periodNum;i++)\n\t{\n\t double d = V[i];//((Double)V.elementAt(i)).doubleValue();\n\t double dd = d/sum;\n\n\t vec[i] = dd;\n\t //vec.addElement(new Double(dd));\n\t}\n\t \n\treturn vec;\n }",
"private void computeNormal() {\n normal = getDirection();\r\n\r\n // Rotate by -90 degrees to get normal of line\r\n float oldY = normal.y;\r\n normal.y = -normal.x;\r\n normal.x = oldY;\r\n }"
] | [
"0.7920224",
"0.7794805",
"0.74737483",
"0.7249475",
"0.7148371",
"0.7142368",
"0.70593905",
"0.7026577",
"0.7025298",
"0.7023994",
"0.69747174",
"0.6924783",
"0.6875507",
"0.6869066",
"0.68162763",
"0.67675906",
"0.6757978",
"0.666621",
"0.6652158",
"0.6640004",
"0.66021377",
"0.6598927",
"0.65709424",
"0.6564486",
"0.65421206",
"0.652801",
"0.6524396",
"0.6504223",
"0.6502924",
"0.64608586",
"0.64532274",
"0.6434265",
"0.6390001",
"0.6337872",
"0.6335767",
"0.6335767",
"0.63245326",
"0.63146985",
"0.63093525",
"0.63087255",
"0.6296372",
"0.6273906",
"0.6240547",
"0.62342346",
"0.62276965",
"0.62266743",
"0.61825216",
"0.617616",
"0.6171501",
"0.61353165",
"0.6060754",
"0.60397166",
"0.60317737",
"0.60291827",
"0.60163105",
"0.6012",
"0.5985584",
"0.59824014",
"0.59757286",
"0.59680045",
"0.5967748",
"0.596748",
"0.59623396",
"0.59568346",
"0.5956034",
"0.59537023",
"0.59452677",
"0.59255075",
"0.5899313",
"0.58987296",
"0.58985156",
"0.58831084",
"0.5879086",
"0.5866221",
"0.5862499",
"0.5861234",
"0.58592004",
"0.58579767",
"0.5851577",
"0.5835642",
"0.58179575",
"0.5800198",
"0.579917",
"0.5798716",
"0.5788117",
"0.5783831",
"0.57771665",
"0.5775759",
"0.57557213",
"0.5750376",
"0.57463855",
"0.57221",
"0.5721009",
"0.57193625",
"0.57108486",
"0.57051533",
"0.5680655",
"0.5639042",
"0.5636924",
"0.5621822"
] | 0.6117062 | 50 |
Again this is just a pre processing step | private void initIDFMap(List<List<Map<String,List<Double>>>> tfMap){
for (int i = 0; i < tfMap.size(); i++) {
List<Map<String,List<Double>>> gestureDocument = tfMap.get(i);
for (int j = 0; j < gestureDocument.size(); j++) {
Map<String,List<Double>> tempMap = gestureDocument.get(j);
Iterator<Entry<String, List<Double>>> it = tempMap.entrySet().iterator();
while (it.hasNext()) {
Map.Entry<String,Integer> pairs = (Map.Entry)it.next();
if(getTfIDFMapGlobal().containsKey(pairs.getKey()))
getTfIDFMapGlobal().put(pairs.getKey(), getTfIDFMapGlobal().get(pairs.getKey())+1);
else
getTfIDFMapGlobal().put(pairs.getKey(), 1);
}
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void preProcess();",
"public void preprocess() {\n }",
"public void preprocess() {\n }",
"public void preprocess() {\n }",
"public void preprocess() {\n }",
"protected void preRun() {\r\n\t\tthis.preparePairs();\r\n\t}",
"@Override\n public void preprocess() {\n }",
"public void intermediateProcessing() {\n //empty\n }",
"@Override\r\n\tprotected void doPre() {\n\t\t\r\n\t}",
"@Override\n public void preprocess() {\n }",
"protected void additionalProcessing() {\n\t}",
"@Override\n public Object preProcess() {\n return null;\n }",
"protected void runBeforeIteration() {}",
"@Override\n\tpublic void pre()\n\t{\n\n\t}",
"public void prepareForDeferredProcessing() {\n\n }",
"public void prepareNextPhase() {\n if (evaluatedCells != null) {\n log.info(\"Preparing Next Phase \" + evaluatedCells.size());\n for (Cell cell : evaluatedCells) {\n cell.prepareNextPhase();\n }\n evaluatedCells.clear();\n }\n }",
"public void postProcessing() {\n //empty\n }",
"protected void runBeforeIterations() {}",
"public void prePerform() {\n // nothing to do by default\n }",
"protected abstract void preRun();",
"@Override\n public void preRun() {\n super.preRun();\n }",
"public void pre() {\r\n if(!isTiling) return;\r\n if(firstFrame) firstFrame=false;\r\n else if(secondFrame) {\r\n secondFrame=false;\r\n tileInc();\r\n }\r\n setupCamera();\r\n }",
"@Override\n\tpublic void processing() {\n\n\t}",
"void PrepareRun() {\n }",
"@Override\r\n \tpublic void process() {\n \t\t\r\n \t}",
"public void traversePreOrder() {\n\t\tpreOrder(this);\n\t}",
"@Override\n\tpublic void preorder() {\n\n\t}",
"void clearDataAndProceed() {\n\t\tclearData();\n\t\tfileCounter++;\n\t\tif (fileCounter >= fileNames.size()){\n\t\t\tSystem.exit(0);\n\t\t\tSystem.out.println(\"Images over\");\n\t\t}\n\t\tloadImage();\n\t}",
"@Override\n\tpublic void preBacktrack() {\n\t\t\n\t}",
"public void preSetup() {\r\n // Any of your pre setup before the loop starts should go here\r\n }",
"protected void reInitialize() {\n resetCurrent();\n incrementIterCount();\n setFirst(true);\n recoverRunningVersion();\n }",
"public void preSetup() {\r\n // Any of your pre setup before the loop starts should go here\r\n\r\n }",
"private void prepareNext() {\n this.hasNext = false;\n while (!this.hasNext && this.nodesIterator.hasNext()) {\n this.next = this.nodesIterator.next();\n this.hasNext = this.computeHasNext();\n }\n }",
"private void constructorPostProcessing()\n {\n prepareNextRequest();\n fetchNextBatch();\n advanceObjectSummary();\n }",
"protected abstract void recombineNext();",
"@Override\n\tpublic void startProcessing() {\n\n\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"public void preGame() {\n\n\t}",
"private void processUnprocessed()\n {\n List<Geometry> unprocAdds;\n myUnprocessedGeometryLock.lock();\n try\n {\n // Processing the unprocessed geometries may result in them being\n // added back to one of the unprocessed maps, so create a clean set\n // of maps for them to be added to.\n if (myUnprocessedAdds.isEmpty())\n {\n unprocAdds = null;\n }\n else\n {\n unprocAdds = myUnprocessedAdds;\n myUnprocessedAdds = New.list();\n }\n }\n finally\n {\n myUnprocessedGeometryLock.unlock();\n }\n\n if (unprocAdds != null)\n {\n distributeGeometries(unprocAdds, Collections.<Geometry>emptyList());\n }\n }",
"@Override\r\n\tprotected void doNext() {\n\t\t\r\n\t}",
"private void reset() throws TransformerException {\n if (firstRun) {\n firstRun = false;\n // Does IMS need this?\n }\n }",
"public void redibujarAlgoformers() {\n\t\t\n\t}",
"public void pre() {\n\t\t//handlePreReset(); //replaced with handlePostReset \n\t\tsendKeepAlive();\n\t\tcurrentQuery = new Query();\n\t\tfastForward = false;\n\n\t\t// System.out.println(\"New query starts now.\");\n\t}",
"public void processing();",
"private static void postProcess() {\n Set<Transition> ts = petrinet.getTransitions();\n for(Transition t : ts) {\n List<Flow> outEdges = new ArrayList<Flow>(t.getPostsetEdges());\n List<Flow> inEdges = new ArrayList<Flow>(t.getPresetEdges());\n try {\n Flow f = petrinet.getFlow(t.getId(), \"void\");\n System.out.println(\"contain void!\");\n assert(f.getWeight() == 1);\n //if (outEdges.size() == 1) { // Delete the transition.\n f.setWeight(0);\n //}\n } catch (NoSuchEdgeException e) {}\n }\n }",
"@Override\n\tpublic void reset() {\n\t\tthis.prepare();\n\t\tsuper.reset();\n\t}",
"@Override\n\t\tpublic void resume() {\n\t\t \n\t\t}",
"private void postProcessing() {\n // create the element for erode\n Mat erodeElement = Imgproc.getStructuringElement(Imgproc.CV_SHAPE_RECT,\n new Size(2 * KERNELSIZE_ERODE + 1,2 * KERNELSIZE_ERODE + 1 ),\n new Point(KERNELSIZE_ERODE, KERNELSIZE_ERODE));\n // create the element for dialte\n Mat dialElement = Imgproc.getStructuringElement(Imgproc.CV_SHAPE_RECT,\n new Size(2 * KERNELSIZE_DILATE + 1,2 * KERNELSIZE_DILATE + 1 ),\n new Point(KERNELSIZE_DILATE, KERNELSIZE_DILATE));\n\n // erode image to remove small noise\n Imgproc.erode(binary, binary, erodeElement);\n\n // dilate the image DILATETIMES to increase what we see\n for (int i = 0; i < DILATETIMES; i++)\n Imgproc.dilate(binary, binary, dialElement);\n }",
"void takeBefore(){\n beforeTimeNs=System.nanoTime();\n }",
"protected void runAfterIteration() {}",
"@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t\t\r\n\t\t\t}",
"public void before() {\n process = Thread.currentThread();\n }",
"@Override\r\n\t\t\t\tpublic void autInitProcess() {\n\t\t\t\t\t\r\n\t\t\t\t}",
"@Override\r\n\t\t\t\tpublic void autInitProcess() {\n\t\t\t\t\t\r\n\t\t\t\t}",
"protected void runAfterIterations() {}",
"public void process()\n\t{\n\t\tthis.layers = new ArrayList<Layer>();\n\t\t\n\t\t/**\n\t\t * list of layers to remove\n\t\t */\n\t\tthis.layersToRemove = new ArrayList<Layer>();\n\t\t\n\t\t/**\n\t\t * find all layers we need to process in the document\n\t\t */\n\t\tthis.allLayers();\n\t\t\n\t\t/**\n\t\t * we'll remove all layers which are unused in psd\n\t\t */\n\t\tthis.removeUnusedLayers();\n\t\t\n//\t\tthis.discoverMaximumLayerDepth();\n\t\t\n\t\t/*this.showLayersInformation(this.layers);\n\t\tSystem.exit(0)*/;\n\t}",
"private void preRequest() {\n\t\tSystem.out.println(\"pre request, i am playing job\");\n\t}",
"@Override\r\n\tpublic void resume() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void resume() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void resume() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void resume() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void resume() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void resume() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void resume() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void resume() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void resume() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void resume() {\n\t\t\r\n\t}",
"public void preFlush(Iterator iterator) {\r\n\t\t//System.out.println(\"preFlush\");\r\n\t}",
"private void m18357t() {\n AudioProcessor[] k;\n ArrayList<AudioProcessor> newAudioProcessors = new ArrayList<>();\n for (AudioProcessor audioProcessor : m18348k()) {\n if (audioProcessor.mo25036a()) {\n newAudioProcessors.add(audioProcessor);\n } else {\n audioProcessor.flush();\n }\n }\n int count = newAudioProcessors.size();\n this.f16596P = (AudioProcessor[]) newAudioProcessors.toArray(new AudioProcessor[count]);\n this.f16597Q = new ByteBuffer[count];\n m18347j();\n }",
"protected void reset() {\n\t\t}",
"private void startHeavyLifting(int first, int count)\n {\n }",
"private void goForwardOne() \n {\n if (m_bufferOffset_ < 0) {\n // we're working on the source and not normalizing. fast path.\n // note Thai pre-vowel reordering uses buffer too\n m_source_.setIndex(m_source_.getIndex() + 1);\n }\n else {\n // we are in the buffer, buffer offset will never be 0 here\n m_bufferOffset_ ++;\n }\n }",
"public void resetProcessed() {\r\n for (int x = 0; x < image.getWidth(); x++) {\r\n for (int y = 0; y < image.getHeight(); y++) {\r\n maskDone[x][y] = false;\r\n }\r\n }\r\n }",
"protected void runBeforeStep() {}",
"@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}",
"private static void preprocess() {\n \tLOG.info(\"Begin preprocessing of data.\");\n \t\n \tLOG.debug(\"Create a IterativeDirectoryReader.\");\n \t// Create a reader for directories\n \tIterativeDirectoryReader iterativeDirectoryReader = (IterativeDirectoryReader) ReaderFactory.instance().getIterativeDirectoryReader();\n \titerativeDirectoryReader.setDirectoryName(clArgs.preprocessInDir);\n \titerativeDirectoryReader.setPathInChildDirectory(clArgs.preprocessPathInChildDir);\n \t\n \tLOG.debug(\"Create a IterativeFileReader.\");\n \t// Create a reader for text files and set an appropriate file filter\n \tIterativeFileReader iterativeFileReader = (IterativeFileReader) ReaderFactory.instance().getIterativeFileReader();\n \titerativeFileReader.setFileFilter(FileUtil.acceptVisibleFilesFilter(false, true));\n \t\n \tLOG.debug(\"Create a TextFileLineReader.\");\n \t// Create a reader for text files, the first six lines are not relevant in this data set\n \tTextFileLineReader textFileLineReader = (TextFileLineReader) ReaderFactory.instance().getTextFileLineReader();\n \ttextFileLineReader.setOffset(clArgs.preprocessLineOffset);\n \t\n \tLOG.debug(\"Create a GpsLogLineProcessor.\");\n \t// Create a processor for user points\n \tGpsLogLineProcessor processor = new GpsLogLineProcessor(clArgs.preprocessOutFile);\n \t\n \t// Build reader chain\n \titerativeDirectoryReader.setReader(iterativeFileReader);\n \titerativeFileReader.setReader(textFileLineReader);\n \ttextFileLineReader.setProcessor(processor);\n \t\n \titerativeDirectoryReader.attach(processor, \n \t\t\t\tnew Interests[] {\n \t\t\t\t\tInterests.NewChildDirectory,\n \t\t\t\t\tInterests.HasFinished\n \t\t\t\t});\n \t\n \tLOG.debug(\"Read GPS logs. Save the data in a new file {}.\", clArgs.preprocessOutFile);\n \t// Read and save the data\n \titerativeDirectoryReader.read();\n\n \tLOG.info(\"Finished preprocessing of data.\");\n }",
"private void setReadyPre() {\n\t\tint preIndex=getPreIndex();\r\n\t\tLog.d(TAG, \"setReadyPre: \"+preIndex);\r\n\t\tmApplications.get(preIndex).resetToFrontPlace();\r\n\t\tif(mApplications.get(preIndex).getReady() ==-1)\r\n\t\t\tsetTexId(preIndex);\r\n\t}",
"private void reset() {\n }",
"void restoreBefore() {\r\n\t\t\tsurface.basemap.clear();\r\n\t\t\tsurface.basemap.putAll(basemapBefore);\r\n\t\t\tsurface.buildingmap.clear();\r\n\t\t\tsurface.buildingmap.putAll(buildingmapBefore);\r\n\t\t\tsurface.features.clear();\r\n\t\t\tsurface.features.addAll(surfaceBefore);\r\n\t\t\tsurface.buildings.clear();\r\n\t\t\tsurface.buildings.addAll(buildingsBefore);\r\n\t\t}",
"public void arraiter() {\n \tthis.running = false;\n }",
"protected void preUpdate() {\n freeX = true;\n freeY = true;\n }",
"private void loadingPhase() {\n try { Thread.sleep(10000); } catch(InterruptedException e) { return; }\n ClickObserver.getInstance().setTerrainFlag(\"\");\n }",
"private void initSharedPre() {\n\t}",
"public void preFlow() {\n\t\tg.getVertex(source).h = g.getV();\n\t\tg.getVertex(sink).h = 0;\n\t\t\n\t\tfor (int i : g.getAdjacents(source)) {\n\t\t\tpushFillingFlow(source, i);\n\t\t}\n\t}",
"public void renitialiser() \n\t{\n\t\tbuffer = new byte[Constants.PAGESIZE];\n\t\tidDeLaPage = null;\n\t\tpin_count = 0;\n\t\tflagDirty = 0;\n\t\testCharge = false;\n\t}",
"public void prepareRematch() {\r\n\t\tgame.prepareRematch();\r\n\t}",
"public void flowAbrupted() {\n prevInstruction = null;\n }",
"public void prepare() {\r\n\t\tmyPreviousBet = 0;\r\n\t\tmyCurrentBet = 0;\r\n\t\tstage = 0;\r\n\t\tposition = -1;\r\n\t\tintel.reset();\r\n\t\tfor (int i = 0; i < boards.length; i++)\r\n\t\t\tboards[i] = \"UNKNOWN\";\r\n\t}",
"@Override\n\tpublic Map<String, Object> preProccess() {\n\t\treturn null;\n\t}",
"void recompute () {\n current_part.t_Cl = current_part.t_Cd = current_part.t_Cm = null;\n computeFlowAndRegenPlot();\n }",
"@Override\n protected void preSequencePreparations() {\n //initializing the HTML sequence report:\n htmlReport = new HtmlSequenceReport(scenarioCount, sequenceCount);\n // updating scenarioCount based on existing HTML files - sequence 1 gets the correct scenarioCount:\n scenarioCount = htmlReport.getScenarioCount();\n }",
"@Override\n\tprotected void postRun() {\n\n\t}",
"@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t}",
"private void remplirPrestaraireData() {\n\t}"
] | [
"0.69254494",
"0.68335766",
"0.68335766",
"0.68335766",
"0.68335766",
"0.6742979",
"0.66989166",
"0.6604545",
"0.6573679",
"0.65676284",
"0.6558388",
"0.64882314",
"0.64644814",
"0.62714267",
"0.6269644",
"0.6267559",
"0.6171241",
"0.613984",
"0.61132085",
"0.6089097",
"0.6073479",
"0.6023095",
"0.5991034",
"0.59712285",
"0.5948275",
"0.58526766",
"0.5850796",
"0.5826517",
"0.5809721",
"0.5777165",
"0.5775459",
"0.57496685",
"0.57422704",
"0.57330555",
"0.5706922",
"0.56980014",
"0.5691886",
"0.569174",
"0.5681861",
"0.5681068",
"0.56806934",
"0.5648545",
"0.56469274",
"0.5564141",
"0.5553794",
"0.5545334",
"0.55381393",
"0.552286",
"0.55143064",
"0.54941314",
"0.5488733",
"0.5488733",
"0.5488733",
"0.5488733",
"0.5488733",
"0.54881734",
"0.5488049",
"0.5488049",
"0.5481975",
"0.5472869",
"0.5468953",
"0.5468716",
"0.5468716",
"0.5468716",
"0.5468716",
"0.5468716",
"0.5468716",
"0.5468716",
"0.5468716",
"0.5468716",
"0.5468716",
"0.54673856",
"0.54493666",
"0.5444587",
"0.54444313",
"0.5441501",
"0.54345435",
"0.54304826",
"0.5427949",
"0.5427949",
"0.5427949",
"0.5427949",
"0.5415602",
"0.5414086",
"0.5405346",
"0.5396763",
"0.53935456",
"0.5392531",
"0.53880787",
"0.5384545",
"0.53842944",
"0.53821105",
"0.53816295",
"0.5379952",
"0.5373953",
"0.53737694",
"0.53714514",
"0.53708965",
"0.5363831",
"0.53593874",
"0.53583235"
] | 0.0 | -1 |
Find a word has occurred in how many documents in a gesture file Just update the count this is a pre processing step | private void initIDF2Map(List<Map<String, List<Double>>> mapPerGestureFile) {
Map<String,Double> idf2PerDocument = new HashMap<String, Double>(); // per univariate series
for (int i = 0; i < mapPerGestureFile.size(); i++) {
Map<String,List<Double>> tmpMap = mapPerGestureFile.get(i);
Iterator<Entry<String, List<Double>>> iterator = tmpMap.entrySet().iterator();
while(iterator.hasNext()) {
Map.Entry<String, List<Double>> pairs = (Entry<String, List<Double>>) iterator.next();
if(idf2PerDocument.containsKey(pairs.getKey()))
idf2PerDocument.put(pairs.getKey(), idf2PerDocument.get(pairs.getKey())+1.0);
else
idf2PerDocument.put(pairs.getKey(), 1.0);
}
}
getTfMapArrayIDF2().add(idf2PerDocument);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void countWord() {\n\t\tiniStorage();\n\t\tWordTokenizer token = new WordTokenizer(\"models/jvnsensegmenter\",\n\t\t\t\t\"data\", true);\n\t\t// String example =\n\t\t// \"Nếu bạn đang tìm kiếm một chiếc điện thoại Android? Đây là, những smartphone đáng để bạn cân nhắc nhất. Thử linh tinh!\";\n\t\t// token.setString(example);\n\t\t// System.out.println(token.getString());\n\n\t\tSet<Map.Entry<String, String>> crawlData = getCrawlData().entrySet();\n\t\tIterator<Map.Entry<String, String>> i = crawlData.iterator();\n\t\twhile (i.hasNext()) {\n\t\t\tMap.Entry<String, String> pageContent = i.next();\n\t\t\tSystem.out.println(pageContent.getKey());\n\t\t\tPageData pageData = gson.fromJson(pageContent.getValue(),\n\t\t\t\t\tPageData.class);\n\t\t\ttoken.setString(pageData.getContent().toUpperCase());\n\t\t\tString wordSegment = token.getString();\n\t\t\tString[] listWord = wordSegment.split(\" \");\n\t\t\tfor (String word : listWord) {\n\t\t\t\taddToDictionary(word, 1);\n\t\t\t\tDate date;\n\t\t\t\ttry {\n\t\t\t\t\tdate = simpleDateFormat.parse(pageData.getTime().substring(\n\t\t\t\t\t\t\t0, 10));\n\t\t\t\t} catch (ParseException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\taddToStatByDay(date, word, 1);\n\t\t\t}\n\t\t}\n\t}",
"private void updateCount(String word) {\n\t\t\tthis.count += invertedIndex.get(word).get(this.location).size();\n\t\t\tthis.score = (double) this.count / counts.get(this.location);\n\t\t}",
"private void handleDocument(String name,InputStream ins)\n{\n Map<String,Integer> words = new HashMap<>();\n Map<String,Integer> kgrams = new HashMap<>();\n \n try {\n String cnts = IvyFile.loadFile(ins);\n CompilationUnit cu = JcompAst.parseSourceFile(cnts);\n words = handleDocumentText(cnts);\n kgrams = buildKgramCounts(cnts,cu);\n }\n catch (IOException e) {\n IvyLog.logI(\"Problem reading document file \" + name + \": \" + e);\n }\n \n if (words.size() > 0) {\n ++total_documents;\n for (String s : words.keySet()) {\n Integer v = document_counts.get(s);\n if (v == null) document_counts.put(s,1);\n else document_counts.put(s,v+1);\n }\n }\n if (kgrams.size() > 0) {\n ++total_kdocuments;\n for (String s : kgrams.keySet()) {\n Integer v = kgram_counts.get(s);\n if (v == null) kgram_counts.put(s,1);\n else kgram_counts.put(s,v+1);\n }\n }\n}",
"private static void wordCountWithMap() throws FileNotFoundException {\n Map<String, Integer> wordCounts = new HashMap<String, Integer>();\n\n Scanner input = new Scanner(new File(fileLocation));\n while (input.hasNext()) {\n String word = input.next();\n if (!wordCounts.containsKey(word)) {\n wordCounts.put(word, 1);\n } else {\n int oldValue = wordCounts.get(word);\n wordCounts.put(word, oldValue + 1);\n }\n }\n\n String term = \"test\";\n System.out.println(term + \" occurs \" + wordCounts.get(term));\n\n // loop over the map\n for (String word : wordCounts.keySet()) {\n int count = wordCounts.get(word);\n if (count >= 500) {\n System.out.println(word + \", \" + count + \" times\");\n }\n }\n\n }",
"public void increment(){\n\t\twordCount += 1;\n\t}",
"public void analyzeDocument(String text) {\n\t\tString[] tokens = m_tokenizer.tokenize(text.toLowerCase());\n\t\tfor (int j = 0; j < tokens.length; j++)\n\t\t\ttokens[j] = SnowballStemmingDemo(NormalizationDemo(tokens[j]));\n\t\tHashMap<String, Integer> document_tf = new HashMap<String, Integer>();\n\t\tfor (String token : tokens) {\n\t\t\tif (!document_tf.containsKey(token))\n\t\t\t\tdocument_tf.put(token, 1);\n\t\t\telse\n\t\t\t\tdocument_tf.put(token, document_tf.get(token) + 1);\n\t\t\tif (!df.containsKey(token))\n\t\t\t\tdf.put(token, 1);\n\t\t\telse\n\t\t\t\tdf.put(token, df.get(token) + 1);\n\t\t}\n\t\ttf.add(document_tf);\n\t\t/*\n\t\t * for(String token : document_tf.keySet()) { if(!df.containsKey(token))\n\t\t * df.put(token, 1); else df.put(token, df.get(token) + 1); if(!) }\n\t\t */\n\t\tm_reviews.add(text);\n\t}",
"public void addWordCount(){\r\n\t\twordCount = wordCount + 1;\r\n\t}",
"public void countWords(String path) {\n\t\n//\t\tdeclaration and initialization\n\t\tFile file = new File(path);\n\t\tString str = \"\",word = \"\";\n\t\tBufferedReader br;\n\t\tint counter = 1;\n\t\t\n\t\ttry {\n\t\t\tbr = new BufferedReader(new FileReader(file));\n\t\t\t\n//\t\t\tReads the file lines until eof\n\t\t\twhile ((str = br.readLine()) != null) {\n\t\t\t\tword = word.concat(str);\n\t\t\t}\n\t\t\t\n//\t\t\tReplace both comma and dot with whitespace\n\t\t\tword = word.replace(',',' ');\n\t\t\tword = word.replace('.',' ');\n\t\t\t\n//\t\t\tSplit the string using space\n\t\t\tString[] words = word.split(\"\\\\s+\");\n\t\n//\t\t\tCompare the words and if they are same words increase the counter\n\t\t\tfor (int i = 0; i < words.length; i++){\n\t\t\t\tfor(int j = i+1; j < words.length; j++){\n\t\t\t\t\tif(words[i] != null && words[i].equals(words[j]) ){\n\t\t\t\t\t\tcounter++;\n\t\t\t\t\t\twords[j] = null; //replace the repeated word with null\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n//\t\t\t\tdisplays the count of the words\n\t\t\t\tif(words[i] != null)\n\t\t\t\tSystem.out.println(words[i]+\": \"+counter);\n\t\t\t\tcounter = 1;\n\t\t\t}\n\t\t\tbr.close();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"IO Exception\");\n\t\t}\n\t}",
"private static void wordCount(File fileEntry) throws FileNotFoundException {\n\t\tScanner sc = new Scanner(new FileInputStream(fileEntry));\n\t\t int count=0;\n\t\t while(sc.hasNext()){\n\t\t sc.next();\n\t\t count++;\n\t\t }\n\t\tSystem.out.println(\"Number of words: \" + count);\n\t\t\n\t\t\n\t}",
"private void getWordCounts() {\n Map<String, List<String>> uniqueWordsInClass = new HashMap<>();\n List<String> uniqueWords = new ArrayList<>();\n\n for (ClassificationClass classificationClass : classificationClasses) {\n uniqueWordsInClass.put(classificationClass.getName(), new ArrayList<>());\n }\n\n for (Document document : documents) {\n String[] terms = document.getContent().split(\" \");\n\n for (String term : terms) {\n if (term.isEmpty()) {\n continue;\n }\n if (!uniqueWords.contains(term)) {\n uniqueWords.add(term);\n }\n\n for (ClassificationClass docClass : document.getClassificationClasses()) {\n if (!uniqueWordsInClass.get(docClass.getName()).contains(term)) {\n uniqueWordsInClass.get(docClass.getName()).add(term);\n }\n if (totalWordsInClass.containsKey(docClass.getName())) {\n this.totalWordsInClass.put(docClass.getName(), this.totalWordsInClass.get(docClass.getName()) + document.getFeatures().get(term));\n } else {\n this.totalWordsInClass.put(docClass.getName(), document.getFeatures().get(term));\n }\n }\n }\n }\n\n this.totalUniqueWords = uniqueWords.size();\n }",
"private void scanDocuments()\n{\n document_counts = new HashMap<>();\n kgram_counts = new HashMap<>();\n for (File f : root_files) {\n addDocuments(f);\n }\n}",
"public void count(String dataFile) {\n\t\tScanner fileReader;\n\t\ttry {\n\t\t\tfileReader= new Scanner(new File(dataFile));\n\t\t\twhile(fileReader.hasNextLine()) {\n\t\t\t\tString line= fileReader.nextLine().trim(); \n\t\t\t\tString[] data= line.split(\"[\\\\W]+\");\n\t\t\t\tfor(String word: data) {\n\t\t\t\t\tthis.wordCounter= map.get(word);\n\t\t\t\t\tthis.wordCounter= (this.wordCounter==null)?1: ++this.wordCounter;\n\t\t\t\t\tmap.put(word, this.wordCounter);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfileReader.close();\n\t\t}\n\t\tcatch(FileNotFoundException fnfe) {\n\t\t\tSystem.out.println(\"File\" +dataFile+ \"can not be found.\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t}",
"public void count(String word) {\n if(word.equals(\"\")){\n return;\n }\n\n for (int i=0; i < counters.length; i++) {\n //TODO: If you find the word increment the count and return\n if (counters[i] != null){\n if (counters[i].wordMatches(word)){\n counters[i].incrementCount();\n break;\n }\n } else {\n counters[i] = new SingleWordCounter(word);\n counters[i].incrementCount();\n break;\n }\n }\n\n //TODO: You didn't find the word. Add a new word counter to the array.\n // Don't forget to increment the word's count to get it to 1!\n\n\t}",
"public boolean processDocument(String fileDirectory){\n if(aux == null) { return false;}\n FileReader file = new FileReader();\n String key;\n int val;\n \n file.openFile(fileDirectory);\n \n while(file.hasNextToRead()){\n //System.out.print(i);\n key = file.readNextWord();\n val = aux.getOrDefault(key, 0) + 1;\n \n \n aux.put(key, val);\n \n }\n return true;\n }",
"public HotWordsAnalyzer (String hotWordsFileName, String docFileName){\r\n //Setting the filenames to the variables to make them easier to type\r\n doc = docFileName;\r\n hw = hotWordsFileName;\r\n \r\n //If opening of the file fails, an ioException will be thrown\r\n\t\ttry{\r\n hotword = new Scanner(Paths.get(hw));\r\n }\r\n catch (IOException ioException){\r\n System.err.println(\"Error opening file. Terminating.\");\r\n System.exit(1);\r\n }\r\n \r\n try{\r\n \r\n docs = new Scanner(Paths.get(doc));\r\n }\r\n catch (IOException ioException){\r\n System.err.println(\"Error opening file. Terminating.\");\r\n System.exit(1);\r\n }\r\n \r\n //Above opens both files\r\n \r\n //Goes through hotwords file and takes each word and pushes them to \r\n //the map words so they can be used to locate the hotwords in the document\r\n\t\ttry{\r\n while(hotword.hasNext()){\r\n String y;\r\n String x = hotword.next();\r\n y = x.toLowerCase();\r\n //sets hotword as key and 0 for the count of that hotword in the document\r\n words.put(y, 0);\r\n }\r\n }\r\n //The element doesn't exist- file must not be a file\r\n catch(NoSuchElementException elementException){\r\n System.err.println(\"Improper file. Terminating.\");\r\n System.exit(1);\r\n }\r\n //The file may not be readable or corrupt\r\n catch(IllegalStateException stateException){\r\n System.err.println(\"Error reading from file. Terminating.\");\r\n System.exit(1);\r\n }\r\n \r\n //Above gets words and puts them into the words map\r\n try{\r\n //reads the document and when it finds a hotword it increments the count in words\r\n while(docs.hasNext()){\r\n //gets next word\r\n String x = docs.next();\r\n String y = x.toLowerCase();\r\n //Gets rid of the commas and periods\r\n y = y.replace(\",\", \"\");\r\n y = y.replace(\".\", \"\");\r\n //If the word y is in the hotwords list\r\n if(words.containsKey(y)){\r\n //Adds to words map and increments count\r\n consec.add(y);\r\n int z;\r\n z = words.get(y);\r\n z++;\r\n words.put(y, z);\r\n }\r\n }\r\n }\r\n catch(NoSuchElementException elementException){\r\n System.err.println(\"Improper file. Terminating.\");\r\n System.exit(1);\r\n }\r\n catch(IllegalStateException stateException){\r\n System.err.println(\"Error reading from file. Terminating.\");\r\n System.exit(1);\r\n }\r\n \r\n \r\n\t\t\r\n\t}",
"@Override\r\n\tpublic Long call() throws Exception {\r\n\t\tString line;\r\n\t\tchar [] wordArray;\r\n\t\tint i;\r\n\t\tchar c;\r\n\t\ttry {\r\n\t\t\tline = setOfLines.take();\r\n\t\t\tString[] words = line.replaceAll(\"\\\\s+\", \" \").split(\" \");\r\n\t\t\t\r\n\t\t\tfor(String word : words) {\r\n\t\t\t\twordArray = word.toCharArray();\r\n\t\t\t\tfor(i=0;i<wordArray.length;i++) {\r\n\t\t\t\t\tc = wordArray[i];\r\n\t\t\t\t\tif(countNumbers ? (!((c>64&&c<91)||(c>96 &&c<123)||(c>47&&c<58))) : (!((c>64&&c<91)||(c>96 &&c<123))) ) {\r\n\t\t\t\t\t\tword = word.replace(c+\"\",\"\" );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif(word.isEmpty()) continue;\r\n\t\t\t\tsynchronized (this) {\r\n\t\t\t\t\tif(wordCount.containsKey(word)) {\r\n\t\t\t\t\t\twordCount.put(word, (wordCount.get(word)+1));\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\twordCount.put(word, 1);\r\n\t\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t} \r\n\t\tcatch (InterruptedException e) {\r\n\t\t\tcustomFile.setErrorString(\"An Error occurred while processing this file, word count may not\"\r\n\t\t\t\t\t+\"be accurate\");\r\n\t\t\t\r\n\t\t\tlogger.error(e);\r\n\t\t}\r\n\t\treturn new Long(0);\r\n\t}",
"public synchronized void process() \n\t{\n\t\t// for each word in a line, tally-up its frequency.\n\t\t// do sentence-segmentation first.\n\t\tCopyOnWriteArrayList<String> result = textProcessor.sentenceSegmementation(content.get());\n\t\t\n\t\t// then do tokenize each word and count the terms.\n\t\ttextProcessor.tokenizeAndCount(result);\n\t}",
"WordCounter(String inputText){\r\n \r\n wordSource = inputText;\r\n }",
"public static void DocumentFrequencies() throws FileNotFoundException {\n for (Entry<String, List<Integer>> entry : dictionary.entrySet()) {\n List<Integer> termfrequency = new ArrayList<>();\n\n termfrequency = entry.getValue();\t// getting each word's termfrequency list\n int i = 0;\n termfrequency.add(0); \t\t\t//maintaining documentfrequency at the 57th index\n Integer documentFrequency = termfrequency.get(totaldocument+1);\n while(i<56) { //iterate 0 to 55 all speeches term frequency\n if(termfrequency.get(i)>0) {\t\t//increment document frequency of that word if termfrequency is greater than 0.0\n documentFrequency++;\t\t\t//increment document frequency\n }\n i++;\t\t//increment index\n }\n termfrequency.set(57, documentFrequency);\t//re-set the documentfrequency and save the current maintained document frequency from 0 to calculated value\n dictionary.put(entry.getKey(), termfrequency);\t\t// place the incremented final value of that word back to the same list in dictionary hashmap\n }\n //save();\n }",
"public static void readDatafiles() throws FileNotFoundException {\n int docNumber = 0;\n\n while(docNumber<totaldocument) { // loop will run until all 0 - 55 speech data is read\n String tempBuffer = \"\";\n\n Scanner sc_obj = new Scanner(new File(\"./inputFiles/speech_\"+docNumber+\".txt\"));\n sc_obj.nextLine(); //skip the first line of every document\n\n while(sc_obj.hasNext()) {\n tempBuffer = sc_obj.next();\n tempBuffer = tempBuffer.replaceAll(\"[^a-zA-Z]+\",\" \");\n\n String[] wordTerm = tempBuffer.split(\" |//.\"); // the read data will convert into single word from whole stream of characters\n // it will split according to white spaces . - , like special characters\n\n for (int i=0; i < wordTerm.length; i++) {\n\n String term = wordTerm[i].toLowerCase();\t\t//each splitted word will be converted into lower case\n term = RemoveSpecialCharacter(term);\t\t\t// it will remove all the characters apart from the english letters\n term = removeStopWords(term);\t\t\t\t\t// it will remove the stopWords and final version of the term in the form of tokens will form\n\n if(!term.equalsIgnoreCase(\"\") && term.length()>1) {\n term = Lemmatize(term);\t\t\t\t\t//all the words in the form of tokens will be lemmatized\n //increment frequency of word if it is already present in dictionary\n if(dictionary.containsKey(term)) {\t\t//all the lemmatized words will be placed in HashMap dictionary\n List<Integer> presentList = dictionary.get(term);\n int wordFrequency = presentList.get(docNumber);\n wordFrequency++;\n presentList.set(docNumber, wordFrequency);\t\t//frequency of all the lemmatized words in dictionary is maintained \t\t\t\t\t\t\t\t\t//i.e: Word <2.0,1.0,3.0,0.0 ...> here hashmap<String,List<Double> is used\n }\t\t\t\t\t\t\t\t\t\t//the 0th index shows the word appared 2 times in doc 0 and 1 times in doc 1 and so forth..\n else { // if word was not in the dictionary then it will be added\n // if word was found in 5 doc so from 0 to 4 index representing doc 0 to doc 4 (0.0) will be placed\n List<Integer>newList = new ArrayList<>();\n for(int j=0; j<57; j++) {\n if(j != docNumber)\n newList.add(0);\n else\n newList.add(1);\n }\n dictionary.put(term, newList);\n }\n }\n }\n\n }\n docNumber++;\n }\n }",
"WordCounter(){\r\n }",
"void documentFrequncy(Set<String> features,\n int index,\n int troush\n ) {\n for (String str : features) {\n switch (index) {\n case 1:\n for (int i = 0; i < count1; i++) {\n if (economydocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyeco.put(str, e);\n }\n e = 0;\n break;\n case 2:\n for (int i = 0; i < count2; i++) {\n if (educationdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyedu.put(str, e);\n }\n e = 0;\n break;\n case 3:\n for (int i = 0; i < count3; i++) {\n if (sportdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyspo.put(str, e);\n }\n e = 0;\n break;\n case 4:\n for (int i = 0; i < count4; i++) {\n if (culturedocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencycul.put(str, e);\n }\n e = 0;\n break;\n case 5:\n for (int i = 0; i < count5; i++) {\n if (accedentdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyaccid.put(str, e);\n }\n e = 0;\n break;\n case 6:\n for (int i = 0; i < count6; i++) {\n if (environmntaldocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyenv.put(str, e);\n }\n e = 0;\n break;\n case 7:\n for (int i = 0; i < count7; i++) {\n if (foreign_affairdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencydep.put(str, e);\n }\n e = 0;\n break;\n case 8:\n for (int i = 0; i < count8; i++) {\n if (law_justicedocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencylaw.put(str, e);\n }\n e = 0;\n break;\n case 9:\n for (int i = 0; i < count9; i++) {\n if (agriculture[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyagri.put(str, e);\n }\n e = 0;\n break;\n case 10:\n for (int i = 0; i < count10; i++) {\n if (politicsdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencypoltics.put(str, e);\n }\n e = 0;\n break;\n// case 11:\n//\n// for (int i = 0; i < count11; i++) {\n// if (social_affairsdocument[i].contains(str)) {\n// e++;\n// }\n// }\n// if (e > troush) {\n// documntfrequencysocial.put(str, e);\n// }\n// e = 0;\n// break;\n case 11:\n for (int i = 0; i < count12; i++) {\n if (science_technologydocument[i].contains(str)) {\n e++;\n }\n }\n\n if (e > troush) {\n documntfrequencysci.put(str, e);\n }\n e = 0;\n break;\n case 12:\n for (int i = 0; i < count13; i++) {\n if (healthdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyhel.put(str, e);\n }\n e = 0;\n break;\n case 13:\n for (int i = 0; i < count14; i++) {\n if (army[i].contains(str)) {\n e++;\n }\n }\n\n if (e > troush) {\n documntfrequencyarmy.put(str, e);\n }\n e = 0;\n break;\n default:\n break;\n }\n\n }\n }",
"public void updateCounts(WordCounter wordCounter) {\n wordCounter.wordMap.forEach((w, c) -> {\n wordMap.merge(w, c, Double::sum);\n });\n numDocs++;\n }",
"int getDocumentCount();",
"public static String wordCounting(File file)\n {\n return null;\n }",
"private void countWords(String text, String ws) {\n BufferedReader reader = new BufferedReader(new InputStreamReader(new ByteArrayInputStream(text.getBytes(StandardCharsets.UTF_8))));\n String line;\n\n // Get words and respective count\n while (true) {\n try {\n if ((line = reader.readLine()) == null)\n break;\n String[] words = line.split(\"[ ,;:.?!“”(){}\\\\[\\\\]<>']+\");\n for (String word : words) {\n word = word.toLowerCase();\n if (\"\".equals(word)) {\n continue;\n }\n if (lista.containsKey(word)){\n lista.get(word).add(ws);\n }else{\n HashSet<String> temp = new HashSet<>();\n temp.add(ws);\n lista.put(word, temp);\n }\n\n /*if (!countMap.containsKey(word)) {\n countMap.put(word, 1);\n }\n else {\n countMap.put(word, countMap.get(word) + 1);\n }*/\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n // Close reader\n try {\n reader.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n // Display words and counts\n /*for (String word : countMap.keySet()) {\n if (word.length() >= 3) { // Shall we ignore small words?\n //System.out.println(word + \"\\t\" + countMap.get(word));\n }\n }*/\n }",
"public static void keywordHit()\r\n\t{\r\n\t\tkeywordHits++;\r\n\t}",
"private void wordAdd(String word){\n if (!fileWords.containsKey(word)){\n fileWords.put(word,1);\n if (probabilities.containsKey(word)) {\n double oldCount = probabilities.get(word);\n probabilities.put(word, oldCount+1);\n } else {\n probabilities.put(word, 1.0);\n }\n }\n }",
"private double countWordFrequencyScore(Page page, String[] queryWords) {\n double score = 0;\n for (String word : queryWords) {\n int wordId = this.pb.getIdForWord(word);\n for (double pageWordId : page.getWords()) {\n if (wordId == pageWordId) score++;\n }\n }\n\n return score;\n }",
"@Override\n public void processNextSentence(Sentence target) {\n String[] tokens = target.getTokens();\n\n //Create hash of alignments word->frequency:\n HashMap<String, Integer> counts = new HashMap<>();\n\n //Get word counts:\n for (String token : tokens) {\n if (counts.get(token) == null) {\n counts.put(token, 1);\n } else {\n counts.put(token, counts.get(token) + 1);\n }\n }\n\n //Add resource to sentence:\n target.setValue(\"wordcounts\", counts);\n }",
"public void setDocumentCount(Integer arg0) {\n \n }",
"abstract public int docFreq(Term t) throws IOException;",
"public void count(String problem2)\n\t\t{\n\t\t\t\t\n\t\t\t//this will begin to run\n\t\t\ttry\n\t\t\t{\n\t\t\t\t\n\t\t\t\t//we create a scanner for input\n\t\t\t\tScanner readUserFile = new Scanner(new File(problem2));\n\t\t\t\t\n\t\t\t\t//a while function that will run as long as the text has more input\n\t\t\t\twhile(readUserFile.hasNext())\n\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tString nextUserWord = readUserFile.next();\n\t\t\t\t\t\n\t\t\t\t\tif (totalOccurence.containsKey(nextUserWord))\n\t\t\t\t\t\t\n\t\t\t\t\t{\n\t\t\t\t\t\tint occurence = totalOccurence.get(nextUserWord);\n\t\t\t\t\t\ttotalOccurence.put(nextUserWord, occurence + 1);\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\telse totalOccurence.put(nextUserWord, 1);\n\t\t\t\t\t\n\t\t\t\t\t}\n\n\t\t\t\t//free up used resources\n\t\t\t\treadUserFile.close();\n\t\t\t\n\t\t\t//we have a catch in place for any issues\t\n\t\t\t}\n\t\t\tcatch(IOException e)\n\t\t\t{\n\t\t\t\t//system print out if any error occurs\n\t\t\t\tSystem.out.println(\"Unfourtantly an issue occured when opening the file!\");\n\t\t\t\tSystem.out.println(e);\n\t\t\t}\t\n\t\t}",
"private void loadDocStatFromFile(String path) {\n docStat = new HashMap<String, Integer>();\n List<String> stats = fu.textFileToList(path);\n int totLength = 0;\n for (String stat : stats) {\n String docID = stat.split(\" \")[0];\n int docLen = Integer.parseInt(stat.split(\" \")[1]);\n totLength += docLen;\n docStat.put(docID, docLen);\n }\n avdl = totLength / N;\n }",
"int countByExample(WdWordDictExample example);",
"private void initiateWordCount(){\n for(String key: DataModel.bloomFilter.keySet()){\n WordCountHam.put(key, 0);\n WordCountSpam.put(key, 0);\n }\n }",
"private static int computeOccurrences(String filename, Map< String, Integer> occurrences) {\n // Since we can't change a local variable inside a lambda expression\n // we can't just do \"int count = 0;\". This is simply not possible inside\n // a lamda. Therefore we create a class counter like we have seen before\n // to store the count for each method call. We then return the int value\n // of this counter.\n Counter counter = new Counter();\n try {\n Files.lines(Paths.get(filename))\n .flatMap(Words::extractWords)\n .map(s -> {\n if (s.startsWith(\"L\")) {\n counter.increment();\n }\n return s.toLowerCase();\n })\n .forEach(s -> {\n synchronized (occurrences) {\n occurrences.merge(s, 1, Integer::sum);\n }\n });\n } catch (IOException e) {\n e.printStackTrace();\n }\n return counter.getValue();\n }",
"private static void ProcessFile(File fileEntry) throws FileNotFoundException {\n \n\t wordCount(fileEntry) ;\n\t\t\n countVowels(fileEntry);\n\t\n\t\t\n}",
"public int searchWord(File filePath, String s1) throws IOException, NullPointerException\r\n\t{\r\n\t\tint counter = 0;\r\n\t\tString data = \"\";\r\n\t\tBufferedReader bufferReader = new BufferedReader(new FileReader(filePath));\r\n\t\tString line = null;\r\n\t\twhile ((line = bufferReader.readLine()) != null)\r\n\t\t{\r\n\t\t\tdata = data + line;\r\n\t\t}\r\n\t\tbufferReader.close();\r\n\t\tString txt = data;\r\n\t\tBoyerMoore bm = new BoyerMoore(s1);\r\n\t\tint offset = 0;\r\n\t\tfor (int loc = 0; loc <= txt.length(); loc += offset + s1.length())\r\n\t\t{\r\n\t\t\t offset = bm.search(s1, txt.substring(loc));\r\n\t\t\t if ((offset + loc) < txt.length())\r\n\t\t\t { \r\n\t\t\t\t counter++; \r\n\t\t\t\t System.out.printf(\"The word '\"+s1 +\"' is present at the position \" + (offset + loc)+\"\\n\"); //printing position of word \r\n\t\t\t } \r\n\t\t}\r\n\t\tif(counter!=0)\r\n\t\t{ \r\n\t\t\t System.out.println(\" In the FILE: \"+filePath.getName()+\"\\n\");\r\n\t\t}\r\n\t\treturn counter; \r\n\t}",
"public ArrayList<WordMap> countWordOccurrences(String filePaths, WordMap corpus,\n Word.Polarity polarity) {\n\n Scanner sc1, sc2;\n ArrayList<WordMap> wordMaps = new ArrayList<WordMap>();\n\n // Where the training texts are located\n String subFolder;\n if (polarity == Word.Polarity.POSITIVE) subFolder = FOLDER_POSITIVE;\n else if (polarity == Word.Polarity.NEGATIVE) subFolder = FOLDER_NEGATIVE;\n else subFolder = FOLDER_NEUTRAL;\n\n try {\n String previousWord = \"\";\n\n sc1 = new Scanner(new File(filePaths));\n\n //For each training file\n while (sc1.hasNextLine()) {\n // Contains one filename per row\n String currentFile = FOLDER_TXT + subFolder + sc1.nextLine();\n\n sc2 = new Scanner(new File(currentFile));\n WordMap textMap = new WordMap(); // Map for this text\n\n while (sc2.hasNextLine()) {\n String[] words = sc2.nextLine().split(\" \");\n\n for (int j = 0; j < words.length; j++){\n //Replaces all characters which might cause us to miss the key\n String word = words[j].replaceAll(\"\\\\W\", \"\");\n\n //For each word, if it is in the WordMap increment the count\n if (corpus.has(word)) {\n // Store a new word if it has not been created\n if (!textMap.has(words[j])) {\n Word objWord = copyWord(corpus.get(word));\n textMap.put(word, objWord);\n }\n\n //If the words are negated, flip the count\n if (polarity == Word.Polarity.POSITIVE &&\n negations.contains(previousWord)) { // Negate\n textMap.addCountNegative(word);\n } else if (polarity == Word.Polarity.POSITIVE) {\n textMap.addCountPositive(word);\n } else if (polarity == Word.Polarity.NEGATIVE &&\n negations.contains(previousWord)) { // Negate\n textMap.addCountPositive(word);\n } else if (polarity == Word.Polarity.NEGATIVE) {\n textMap.addCountNegative(word);\n } else { // Neutral, don't negate\n textMap.addCountNeutral(word);\n }\n }\n\n previousWord = word;\n }\n }\n\n wordMaps.add(textMap);\n\n sc2.close();\n }\n\n sc1.close();\n } catch (Exception e) {\n System.err.println(\"Error in countWordOccurences\");\n System.err.println(e.getMessage());\n e.printStackTrace();\n return null;\n }\n\n return wordMaps;\n }",
"public void writeDocumentForA(String filename, String path) throws Exception\r\n\t{\n\t\tFile folder = new File(path);\r\n\t\tFile[] listOfFiles = folder.listFiles();\r\n\t \r\n\t \r\n\t \tFileWriter fwText;\r\n\t\tBufferedWriter bwText;\r\n\t\t\r\n\t\tfwText = new FileWriter(\"C:/Users/jipeng/Desktop/Qiang/updateSum/TAC2008/Parag/\"+ filename+\"/\" +\"A.txt\");\r\n\t\tbwText = new BufferedWriter(fwText);\r\n\t\t\r\n\t \tfor ( int i=0; i<listOfFiles.length; i++) {\r\n\t \t\t//String name = listOfFiles[i].getName();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tString text = readText(listOfFiles[i].getAbsolutePath());\r\n\t\t\t\r\n\t\t\tFileWriter fwWI = new FileWriter(\"C:/pun.txt\");\r\n\t\t\tBufferedWriter bwWI = new BufferedWriter(fwWI);\r\n\t\t\t\r\n\t\t\tbwWI.write(text);\r\n\t\t\t\r\n\t\t\tbwWI.close();\r\n\t\t\tfwWI.close();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tList<List<HasWord>> sentences = MaxentTagger.tokenizeText(new BufferedReader(new FileReader(\"C:/pun.txt\")));\r\n\t\t\t\r\n\t\t\t//System.out.println(text);\r\n\t\t\tArrayList<Integer> textList = new ArrayList<Integer>();\r\n\t\t\t\r\n\t\t\tfor (List<HasWord> sentence : sentences)\r\n\t\t\t {\r\n\t\t\t ArrayList<TaggedWord> tSentence = tagger.tagSentence(sentence);\r\n\t\t\t \r\n\t\t\t for(int j=0; j<tSentence.size(); j++)\r\n\t\t\t {\r\n\t\t\t \t \tString word = tSentence.get(j).value();\r\n\t\t\t \t \t\r\n\t\t\t \t \tString token = word.toLowerCase();\r\n\t\t\t \t \r\n\t\t\t \t \tif(token.length()>2 )\r\n\t\t\t\t \t{\r\n\t\t\t \t\t\t if (!m_EnStopwords.isStopword(token)) \r\n\t\t\t \t\t\t {\r\n\t\t\t \t\t\t\t\r\n\t\t\t\t\t\t\t\t if (word2IdHash.get(token)==null)\r\n\t\t\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t\t\t textList.add(id);\r\n\t\t\t\t\t\t\t\t\t // bwText.write(String.valueOf(id)+ \" \");\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t word2IdHash.put(token, id);\r\n\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t allWordsArr.add(token);\r\n\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t id++;\r\n\t\t\t\t\t\t\t\t } else\r\n\t\t\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t\t \tint wid=(Integer)word2IdHash.get(token);\r\n\t\t\t\t\t\t\t\t \tif(!textList.contains(wid))\r\n\t\t\t\t\t\t\t\t \t\ttextList.add(wid);\r\n\t\t\t\t\t\t\t\t \t//bwText.write(String.valueOf(wid)+ \" \");\r\n\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t \t\r\n\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t \t}\r\n\t\t\t \t }\r\n\t\t\t }\r\n\t\t\tCollections.sort(textList);\r\n\t\t \r\n\t\t\tString text2 = valueFromList(textList);\r\n\t\t bwText.write(text2);\r\n\t\t //System.out.println(text2);\r\n\t\t bwText.newLine();\r\n\t\t textList.clear();\r\n\t\t \r\n\t \t}\r\n\t \tbwText.close();\r\n\t fwText.close();\r\n\t}",
"public void countWords(File sourceFile) throws IOException {\n Scanner wordScanner = new Scanner(sourceFile);\n// wordScanner.useDelimiter(\"(?!')[^A-Za-z]+\");\n wordScanner.useDelimiter(\"(?!')[^A-Za-z]+\");\n addWordToMap(wordScanner);\n wordScanner.close(); // Close underlying file.\n }",
"public void computeWords(){\n\n loadDictionary();\n\n CharacterGrid characterGrid = readCharacterGrid();\n\n Set<String> wordSet = characterGrid.findWordMatchingDictionary(dictionary);\n\n System.out.println(wordSet.size());\n for (String word : wordSet) {\n\t System.out.println(word);\n }\n\n // System.out.println(\"Finish scanning character grid in \" + (System.currentTimeMillis() - startTime) + \" ms\");\n }",
"public void addWordCount(int increment){\r\n\t\twordCount = wordCount + increment;\r\n\t}",
"public static void main(String[] args) {\n\t\tint[] i = new int[100];\n\t\tint unique = 0;\n\t\tfloat ratio = 0;\n\t\tList<String> inputWords = new ArrayList<String>();\n\t\tMap<String,List<String>> wordcount = new HashMap<String,List<String>>();\n\t\ttry{\n\t\t\tBufferedReader in = new BufferedReader(new FileReader(\"/Users/huziyi/Documents/NLP file/Assignment1/Twitter messages.txt\"));\n\t\t\tString str;\n\t\t\twhile((str = in.readLine())!=null){\n\t\t\t\tstr = str.toLowerCase();\n\t\t\t\t\n\t\t\t\tString[] words = str.split(\"\\\\s+\");\n\t\t\t\t\n\t\t\t//\tSystem.out.println(words);\n\t\t\t//\tSystem.out.println(\"1\");\n\t\t\t\tfor(String word:words){\n\t\t\t\t\t\n\t\t\t//\t\tString word = new String();\n\t\t\t\t\t\n\t\t\t\t\tword = word.replaceAll(\"[^a-zA-Z]\", \"\");\n\t\t\t\t\tinputWords.add(word);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\tfor(int k=0;k<inputWords.size()-1;k++){\n\t\t\tString thisWord = inputWords.get(k);\n\t\t\tString nextWord = inputWords.get(k+1);\n\t\t\tif(!wordcount.containsKey(thisWord)){\n\t\t\t\twordcount.put(thisWord, new ArrayList<String>());\n\t\t\t}\n\t\t\twordcount.get(thisWord).add(nextWord);\n\t\t}\n\t\t for(Entry e : wordcount.entrySet()){\n\t// System.out.println(e.getKey());\n\t\tMap<String, Integer>count = new HashMap<String, Integer>();\n List<String>words = (List)e.getValue();\n for(String s : words){\n if(!count.containsKey(s)){\n count.put(s, 1);\n }\n else{\n count.put(s, count.get(s) + 1);\n }\n }\n \t\n // for(Entry e1 : wordcount.entrySet()){\n for(Entry f : count.entrySet()){\n \n // \tint m = 0;\n //\tint[] i = new int[100];\n //\ti[m] = (Integer) f.getValue();\n \tint n = (Integer) f.getValue();\n \tn = (Integer) f.getValue();\n // \tList<String> values = new ArrayList<String>();\n \t\t// values.addAll(count.g());\n \tif(n>=120){\n \tif(!(e.getKey().equals(\"\"))&&!(f.getKey().equals(\"\"))){\n //\t\t int a = (Integer) f.getValue();\n //\t\t Arrays.sort(a);\n System.out.println(e.getKey()+\" \"+f.getKey() + \" : \" + f.getValue());\n \n \t}\n \t}\n //\tm++;\n \t }\n\t\t }\n\t\t \n\t\n\t\t \n\t\t// Arrays.sort(i);\n\t\t //System.out.println(i[0]+i[1]);\n/*\n\t\t ArrayList<String> values = new ArrayList<String>();\n\t\t values.addAll(count.values());\n\n\t\t Collections.sort(values, Collections.reverseOrder());\n\n\t\t int last_i = -1;\n\n\t\t for (Integer i : values.subList(0, 99)) { \n\t\t if (last_i == i) \n\t\t continue;\n\t\t last_i = i;\n\n\n\n\n\t\t for (String s : wordcount.keySet()) { \n\n\t\t if (wordcount.get(s) == i)\n\t\t \n\t\t \tSystem.out.println(s+ \" \" + i);\n\n\t\t }\n\t\t \n\t\t\t}*/\n\t}",
"public boolean count()\n {\n if(!textReaderWriter.initTextReader(fileName))\n return false;\n\n while(textReaderWriter.hasNextString()) {\n String temp = textReaderWriter.readOneString();\n String[] wordsTable = temp.split(\" \");\n for (int i = 0; i < wordsTable.length; i ++) // go throw words in a 1 line\n {\n for (StringPattern stringPattern : stringPatternList) { // go throw patterns\n if(containsPattern(stringPattern.getPattern(), wordsTable[i]))\n {\n stringPattern.incrementCountWords();\n }\n }\n }\n }\n return true;\n }",
"private double countWordLocationScore(Page page, String[] queryWords) {\n double score = 0;\n boolean wasFound = false;\n\n for (String word : queryWords) {\n int queryWordId = this.pb.getIdForWord(word);\n for (int i = 0; i < page.getWords().size(); i++) {\n if (page.getWords().get(i) == queryWordId) {\n score += i;\n wasFound = true;\n break;\n }\n }\n\n if (!wasFound) {\n score += 100000;\n } else {\n wasFound = false;\n }\n }\n return score;\n }",
"private void addFile(String file){\r\n\t\ttry(\r\n\t\t\tBufferedReader reader = new BufferedReader(new FileReader(file));\r\n\t\t){\r\n\t\t\tString html = \"\";\r\n\t\t\tString line = \"\";\r\n\t\t\t// read in html from passed file argument\r\n\t\t\twhile((line=reader.readLine())!=null){\r\n\t\t\t\thtml += line;\r\n\t\t\t}\r\n\t\t\t// retrieve all text content elements from page\r\n\t\t\tElements paragraphs = Jsoup.parse(html).select(\"p\");\r\n\t\t\tString content = \"\";\r\n\t\t\tfor (Element i : paragraphs){\r\n\t\t\t\tcontent += i.text()+\" \";\r\n\t\t\t}\r\n\t\t\t// tokenize and log all unique words\r\n\t\t\tMatcher matcher = pattern.matcher(content);\r\n\t\t\tString[] results = matcher.results().map(MatchResult::group).toArray(String[]::new);\r\n\t\t\tHashMap<String, Integer> count = new HashMap<String, Integer>();\r\n\t\t\tfor (int i = 0;i<results.length;++i){\r\n\t\t\t\tString word = results[i];\r\n\t\t\t\tif (count.get(word) != null){\r\n\t\t\t\t\tcount.put(word, count.get(word)+1);\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tcount.put(word, 1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//create term objects with ids\r\n\t\t\tHashMap<Term, Integer> rCount = new HashMap<Term, Integer>();\r\n\t\t\tint id = 0;\r\n\t\t\tfor (Map.Entry<String, Integer> subset : count.entrySet()){\r\n\t\t\t\trCount.put(new Term(processWord(subset.getKey()),id), subset.getValue());\r\n\t\t\t}\r\n\t\t\t// store data from file\r\n\t\t\tindex.put(file, new IndexedDoc(rCount));\r\n\t\t\treader.close();\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"@Override\n public void run() {\n long beginTime = System.currentTimeMillis();\n String[] words = text.split(\" \");\n long endTime = System.currentTimeMillis();\n System.out.printf(\"Regex time: %d;\\n\", endTime - beginTime);\n int count = 0;\n beginTime = System.currentTimeMillis();\n for (int i = 0; i < text.length(); i++) {\n char c = text.charAt(i);\n if (c == ' ' || c == '.' || c == '!' || c == '?') {\n count++;\n }\n }\n endTime = System.currentTimeMillis();\n System.out.printf(\"For time: %d;\\n\", endTime - beginTime);\n System.out.printf(\"Words: %d;\\n\", words.length);\n System.out.printf(\"Count word: %d;\\n\", count);\n }",
"@Override\n public void textFileLoaded(File file, int wc, String contents)\n {\n cur_file = file;\n this.action_panel.setWordCount(wc);\n \n new Thread(new MarkdownProcessor(file, this)).start();\n }",
"public static int countWords(String text) throws UIMAException { \n JCas jCas = JCasFactory.createJCas();\n jCas.setDocumentText(text);\n jCas.setDocumentLanguage(\"en\");\n initEngines();\n\n runPipeline(jCas, segmenter); \n \n int cnt = 0; \n for (Token tok : select(jCas, Token.class)) {\n String token = tok.getCoveredText();\n if (token.matches(\"\\\\p{Alpha}*\")) cnt++;\n }\n \n return cnt;\n }",
"public int count(String word);",
"private static Positional_inverted_index posindexCorpus(DocumentCorpus corpus) throws ClassNotFoundException, InstantiationException, IllegalAccessException, FileNotFoundException, IOException {\n\n NewTokenProcessor processor = new NewTokenProcessor();\n Iterable<Document> docs = corpus.getDocuments(); //call registerFileDocumentFactory first?\n\n List<Double> Doc_length = new ArrayList<>();\n Positional_inverted_index index = new Positional_inverted_index();\n\n double token_count = 0;\n\n // Iterate through the documents, and:\n for (Document d : docs) {\n //File f = new File(path + \"\\\\\" + d.getTitle());\n File f = new File(path + \"\\\\\" + d.getFileName().toString());\n double Filesize = f.length();\n //edited by bhavya\n double doc_weight = 0; //first entry in docweights.bin\n double doc_tokens = 0;\n double doc_length = 0;\n HashMap<String, Integer> tftd = new HashMap<>();\n // Tokenize the document's content by constructing an EnglishTokenStream around the document's content.\n Reader reader = d.getContent();\n EnglishTokenStream stream = new EnglishTokenStream(reader); //can access tokens through this stream\n N++;\n // Iterate through the tokens in the document, processing them using a BasicTokenProcessor,\n //\t\tand adding them to the HashSet vocabulary.\n Iterable<String> tokens = stream.getTokens();\n int i = 0;\n\n for (String token : tokens) {\n\n //adding token in index\n List<String> word = new ArrayList<String>();\n word = processor.processToken(token);\n //System.out.println(word.get(0));\n if (word.get(0).matches(\"\")) {\n continue;\n } else {\n\n index.addTerm(word.get(0), i, d.getId());\n\n }\n i = i + 1;\n\n //we check if token already exists in hashmap or not. \n //if it exists, increase its freq by 1 else make a new entry.\n if (tftd.containsKey(word.get(0))) {\n doc_tokens++;\n int count = tftd.get(word.get(0));\n tftd.replace(word.get(0), count + 1);\n } else {\n doc_tokens++;\n// token_count++; //gives total number of tokens.\n tftd.put(word.get(0), 1);\n }\n\n }\n double length = 0;\n double wdt = 0;\n\n double total_tftd = 0;\n for (Map.Entry<String, Integer> entry : tftd.entrySet()) {\n\n wdt = 1 + log(entry.getValue());\n\n length = length + pow(wdt, 2);\n total_tftd = total_tftd + entry.getValue();\n }\n token_count = token_count + doc_tokens;\n doc_weight = pow(length, 0.5);\n double avg_tftd = total_tftd / (double) tftd.size();\n\n Doc_length.add(doc_weight);\n Doc_length.add(avg_tftd);\n Doc_length.add(doc_tokens);\n Doc_length.add(Filesize);\n }\n Doc_length.add(token_count / N);\n\n DiskIndexWriter d = new DiskIndexWriter();\n d.write_doc(path, Doc_length);\n\n return index;\n }",
"private static void printTable(int numberOfDocs) {\n \n Gson gs = new Gson();\n String json = gs.toJson(wor);\n // System.out.println(json);\n \n List<String> queryWords = new ArrayList();\n //to test it for other query word you can change the following two words\n //queryWords.add(\"carpet\");\n //queryWords.add(\"hous\");\n queryWords.add(\"the\");\n queryWords.add(\"crystallin\");\n queryWords.add(\"len\");\n queryWords.add(\"vertebr\");\n queryWords.add(\"includ\");\n \n \n FrequencySummary frequencySummary = new FrequencySummary();\n frequencySummary.getSummary(json,docName, queryWords);\n \n System.exit(0);\n \n Hashtable<Integer,Integer> g = new Hashtable<>();\n \n /* wor.entrySet().forEach((wordToDocument) -> {\n String currentWord = wordToDocument.getKey();\n Map<String, Integer> documentToWordCount = wordToDocument.getValue();\n freq.set(0);\n df.set(0);\n documentToWordCount.entrySet().forEach((documentToFrequency) -> {\n String document = documentToFrequency.getKey();\n Integer wordCount = documentToFrequency.getValue();\n freq.addAndGet(wordCount);\n System.out.println(\"Word \" + currentWord + \" found \" + wordCount +\n \" times in document \" + document);\n \n if(g.getOrDefault(currentWord.hashCode(), null)==null){\n g.put(currentWord.hashCode(),1);\n \n }else {\n System.out.println(\"Hello\");\n \n int i = g.get(currentWord.hashCode());\n System.out.println(\"i \"+i);\n g.put(currentWord.hashCode(), i++);\n }\n // System.out.println(currentWord+\" \"+ g.get(currentWord.hashCode()));\n // g.put(currentWord.hashCode(), g.getOrDefault(currentWord.hashCode(), 0)+wordCount);\n \n });\n // System.out.println(freq.doubleValue());\n \n // System.out.println(\"IDF for this word: \"+Math.log10( (double)(counter/freq.doubleValue())));\n });\n // System.out.println(g.get(\"plai\".hashCode()));\n //System.out.println(\"IDF for this word: \"+Math.log10( (double)(counter/(double)g.get(\"plai\".hashCode()))));\n */\n }",
"public abstract void insertedWords(long ms, int n);",
"int getGrammarMatchCount();",
"public static void wordCount(String filename) {\n SparkConf conf = new SparkConf().setMaster(\"local\").setAppName(\"Word count App\");\n\n // create a java version of the spark context from the configuration\n JavaSparkContext sc = new JavaSparkContext(conf);\n\n // load input data, which is a text file read main\n // the repartition breaks up the document into 20 segments for parallelism\n JavaRDD<String> input = sc.textFile( filename ).repartition(20);\n // split input string into words\n JavaRDD<String> words = input.flatMap(s -> Arrays.asList(s.split(\" \")));\n\n // transform the collection of words into pairs (word and 1). We do not use a combiner here\n JavaPairRDD<String, Integer> counts = words\n // lowercase, remove apostrophes, grammar and lowercase\n .map(p -> p.replaceAll(\"(')|(\\\\W)\", \"$1\"))\n .map(r -> r.replaceAll(\"[^a-zA-Z ]\", \"\"))\n .map(q -> q.toLowerCase())\n\n .mapToPair(t -> new Tuple2( t, 1 ) )\n .partitionBy(new HashPartitioner(4))\n // this is reducing that parallelism back to one\n .reduceByKey( (x, y) -> (int)x + (int)y )\n .coalesce(1);\n\n counts.saveAsTextFile(\"src/main/java/resources/output\");\n }",
"private static int[] countWordsInFile(String fileToParse, String[] searchWords) throws FileNotFoundException {\n\n int[] wordCounter = new int[searchWords.length];\n\n FileReader searchFile = new FileReader(fileToParse);\n Scanner sc = new Scanner(searchFile);\n while (sc.hasNext()) {\n String word = sc.next();\n for (int i = 0; i < searchWords.length; i++) {\n if (matchSearchWord(word, searchWords[i]))\n wordCounter[i]++;\n }\n\n }\n sc.close();\n return wordCounter;\n\n }",
"public long getCount(String word) throws FileNotFoundException,IOException{\n\t\tlong count=0;\n\t\tLong cacheCount=counts.get(word);\n\t\tif(cacheCount==null){\n\t\t\tsynchronized(this){\n\t\t\t\ttry(BufferedReader inputFile=new BufferedReader(new FileReader(GlobalResources.FILE_PATH))){\n\t\t\t\t\tString line=inputFile.readLine();\n\t\t\t\t\tStringTokenizer tokenizer=null;\n\t\t\t\t\twhile(line!=null){\n\t\t\t\t\t\ttokenizer=new StringTokenizer(line);\n\t\t\t\t\t\tString token=null;\n\t\t\t\t\t\twhile(tokenizer.hasMoreElements()){\n\t\t\t\t\t\t\ttoken=(String)tokenizer.nextElement();\n\t\t\t\t\t\t\tif(token.equalsIgnoreCase(word))count++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tline=inputFile.readLine();\n\t\t\t\t\t}\n\t\t\t\t}catch(FileNotFoundException fileNotFoundException){\n\t\t\t\t\tSystem.out.println(\"FileNotFoundException in class FileDAO : method : getCount(String) \"+fileNotFoundException.getMessage());\n\t\t\t\t\tthrow fileNotFoundException;\n\t\t\t\t}catch(IOException ioException){\n\t\t\t\t\tSystem.out.println(\"IOException in class FileDAO : method : getCount(String) \"+ioException.getMessage());\n\t\t\t\t\tthrow ioException;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcounts.put(word, count);\n\t\t}else{\n\t\t\tcount=cacheCount.longValue();\n\t\t}\n\t\treturn count;\n\t}",
"private int getCount(String token, String content) {\n int index = 0;\n int count = 0;\n// String[] parts = token.split(\"\\\\s+\");\n// int size = parts.length;\n boolean hasPreview = false;\n while ((index = content.indexOf(token, index)) != -1) {\n if (!hasPreview) {\n int end = Math.min(content.length(), index + 200);\n while (end < content.length() && content.charAt(end) != ' ') {\n end++;\n }\n preview = content.substring(index, end);\n hasPreview = true;\n }\n count++;\n index += token.length();\n }\n return count;\n }",
"private WordCounting() {\r\n }",
"@Test\n void testProcess() {\n HtmlDocumentProcessor documentProcessor = new HtmlDocumentProcessor();\n Document document = Document.createShell(\"\");\n document.text(\"2hh 3aaa 4bbbbbb 5CCCCC 8eeeeeeee\"); // sets body text\n documentProcessor.process(document);\n Map<Integer, Long> counts = documentProcessor.getCounts();\n // expecting 10 e's (ASCII 101), 8 b's (ASCII 98), 5 C's (ASCII 67), 7 h's (ASCII 104), 2 t's (ASCII 116)\n assertEquals(counts.get(101), 10L);\n assertEquals(counts.get(98), 8L);\n assertEquals(counts.get(104), 6L);\n assertEquals(counts.get(67), 5L);\n assertEquals(counts.get(116), 2L);\n\n // process same doc again and verify doubled counts\n documentProcessor.process(document);\n counts = documentProcessor.getCounts();\n assertEquals(counts.get(101), 20L);\n assertEquals(counts.get(98), 16L);\n assertEquals(counts.get(104), 12L);\n assertEquals(counts.get(67), 10L);\n assertEquals(counts.get(116), 4L);\n }",
"void updateFrequencyCount() {\n //Always increments by 1 so there is no need for a parameter to specify a number\n this.count++;\n }",
"public void annotate(CoreDocument document){\r\n for(int i=0;i<document.tokens().size();i++){\r\n CoreLabel token = document.tokens().get(i);\r\n if(token.word().equals(sch))\r\n token.set(SearchAnnotation.class,i);\r\n }\r\n }",
"void process(boolean process, Integer frequency) {\r\n\r\n\t\t// Folder iterator\r\n\t\tfor (File file : folder.listFiles()) {\r\n\t\t\tString fileName = file.getName();\r\n\r\n\t\t\tif (DEBUG) {\r\n\t\t\t\tSystem.out.println(\"\\t\" + fileName);\r\n\t\t\t}\r\n\r\n\t\t\tMap<String, Integer> wordCount = new HashMap<String, Integer>();\r\n\t\t\tMap<Map<String, Integer>, Integer> classification = new HashMap<Map<String, Integer>, Integer>();\r\n\t\t\ttry {\r\n\t\t\t\tFileReader fr = new FileReader(file);\r\n\t\t\t\tBufferedReader br = new BufferedReader(fr);\r\n\t\t\t\tString line = br.readLine();\r\n\t\t\t\twhile (line != null) {\r\n\t\t\t\t\tStringTokenizer tokenizer;\r\n\t\t\t\t\tif (process) {\r\n\t\t\t\t\t\ttokenizer = new StringTokenizer(line,\r\n\t\t\t\t\t\t\t\t\" \\t\\n\\r\\f,.:;?![]'->@()/+-\\\"#\\\\<*_=&~`{}$%|^0123456789\");\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\ttokenizer = new StringTokenizer(line);\r\n\t\t\t\t\t}\r\n\t\t\t\t\twhile (tokenizer.hasMoreTokens()) {\r\n\t\t\t\t\t\tString word = tokenizer.nextToken();\r\n\t\t\t\t\t\tif (vocabulary.containsKey(word)) {\r\n\t\t\t\t\t\t\tvocabulary.put(word, vocabulary.get(word) + 1);\r\n\t\t\t\t\t\t\t// System.out.println(fileName + \"\\tUpdated word: \"\r\n\t\t\t\t\t\t\t// + word);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tvocabulary.put(word, 1);\r\n\t\t\t\t\t\t\t// System.out.println(fileName + \"\\tAdded new word:\r\n\t\t\t\t\t\t\t// \" + word);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// for (int i = 0; i < word.length(); i++) {\r\n\t\t\t\t\t\t// if (!characters.contains(word.charAt(i))) {\r\n\t\t\t\t\t\t// characters.add(word.charAt(i));\r\n\t\t\t\t\t\t// }\r\n\t\t\t\t\t\t// }\r\n\r\n\t\t\t\t\t\t// Add to the spam or not spam vocab;\r\n\t\t\t\t\t\tif (fileName.substring(0, 2).equals(\"sp\")) {\r\n\t\t\t\t\t\t\tif (spamVocab.containsKey(word)) {\r\n\t\t\t\t\t\t\t\tspamVocab.put(word, spamVocab.get(word) + 1);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tspamVocab.put(word, 1);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tclassWordCount.put(SPAM,\r\n\t\t\t\t\t\t\t\t\tclassWordCount.get(SPAM) + 1);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tif (notSpamVocab.containsKey(word)) {\r\n\t\t\t\t\t\t\t\tnotSpamVocab.put(word,\r\n\t\t\t\t\t\t\t\t\t\tnotSpamVocab.get(word) + 1);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tnotSpamVocab.put(word, 1);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tclassWordCount.put(NOT_SPAM,\r\n\t\t\t\t\t\t\t\t\tclassWordCount.get(NOT_SPAM) + 1);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Document index\r\n\t\t\t\t\t\tif (wordCount.containsKey(word)) {\r\n\t\t\t\t\t\t\twordCount.put(word, wordCount.get(word) + 1);\r\n\t\t\t\t\t\t\tif (DEBUG) {\r\n\t\t\t\t\t\t\t\tSystem.out.println(fileName\r\n\t\t\t\t\t\t\t\t\t\t+ \"\\tUpdated word: \" + word + \" - \"\r\n\t\t\t\t\t\t\t\t\t\t+ wordCount.get(word));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\twordCount.put(word, 1);\r\n\t\t\t\t\t\t\tif (DEBUG) {\r\n\t\t\t\t\t\t\t\tSystem.out.println(fileName\r\n\t\t\t\t\t\t\t\t\t\t+ \"\\tAdded new word: \" + word + \" - \"\r\n\t\t\t\t\t\t\t\t\t\t+ wordCount.get(word));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\ttotalWordCount++;\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// load next line\r\n\t\t\t\t\tline = br.readLine();\r\n\t\t\t\t}\r\n\t\t\t} catch (FileNotFoundException fNFE) {\r\n\t\t\t\tfNFE.printStackTrace();\r\n\t\t\t} catch (IOException iOE) {\r\n\t\t\t\tiOE.printStackTrace();\r\n\t\t\t}\r\n\r\n\t\t\t// classify\r\n\t\t\tif (fileName.substring(0, 2).equals(\"sp\")) {\r\n\t\t\t\tclassification.put(wordCount, SPAM);\r\n\t\t\t} else {\r\n\t\t\t\tclassification.put(wordCount, NOT_SPAM);\r\n\t\t\t}\r\n\r\n\t\t\tdocuments.put(fileName, classification);\r\n\t\t}\r\n\r\n\t\tif (DEBUG) {\r\n\t\t\t// for (char c : characters) {\r\n\t\t\t// System.out.print(c);\r\n\t\t\t// }\r\n\t\t}\r\n\r\n\t\tInteger numWords;\r\n\t\tif (process) {\r\n\t\t\tnumWords = eliminateWordByFreq(frequency);\r\n\t\t} else {\r\n\t\t\tnumWords = eliminateWordByFreq(0);\r\n\t\t}\r\n\r\n\t\tif (DEBUG) {\r\n\t\t\tSystem.out.println(\"Eliminated \" + numWords + \" words\");\r\n\t\t\tSystem.out.println(\"VOCABULARY:\\t\\t\" + vocabulary);\r\n\t\t\tSystem.out.println(\"SPAM VOCABULARY:\\t\" + spamVocab);\r\n\t\t\tSystem.out.println(\"REGULAR VOCABULARY:\\t\" + notSpamVocab);\r\n\t\t}\r\n\t}",
"public void incFileCount(){\n\t\tthis.num_files++;\n\t}",
"private void buildFreqMap() {\n\t\toriginalFreq = new HashMap<String, WordOccurence>();\n\n\t\tfor (ListIterator<Caption> itr = original.captionIterator(0); itr\n\t\t\t\t.hasNext();) {\n\t\t\tfinal Caption currentCap = itr.next();\n\t\t\tfinal String[] words = currentCap.getCaption().split(\"\\\\s+\");\n\t\t\tfor (int i = 0; i < words.length; i++) {\n\t\t\t\tfinal String lowerCasedWord = words[i].toLowerCase();\n\t\t\t\tif (originalFreq.containsKey(lowerCasedWord)) {\n\t\t\t\t\toriginalFreq.get(lowerCasedWord).addOccurence(\n\t\t\t\t\t\t\t(int) currentCap.getTime());\n\t\t\t\t} else {\n\t\t\t\t\tfinal WordOccurence occ = new WordOccurence(\n\t\t\t\t\t\t\t(int) currentCap.getTime());\n\t\t\t\t\toriginalFreq.put(lowerCasedWord, occ);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (int i = 0; i < identified.size(); i++) {\n\t\t\tResultChunk curretResult = identified.get(i);\n\t\t\tfinal String[] words = curretResult.getDetectedString().split(\n\t\t\t\t\t\"\\\\s+\");\n\t\t\tint identifiedAt = curretResult.getDetectedAt();\n\t\t\tfor (int j = 0; j < words.length; j++) {\n\t\t\t\tString currentWord = words[j].toLowerCase();\n\t\t\t\tif (originalFreq.containsKey(currentWord)) {\n\t\t\t\t\tint detectedAt = (int) (identifiedAt - (words.length - j)\n\t\t\t\t\t\t\t* AVG_WORD_TIME);\n\t\t\t\t\toriginalFreq.get(currentWord).addVoiceDetection(detectedAt);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public int distinctCount(){\r\n int distinct = 0;\r\n //Loop through each key in words\r\n for(String key: words.keySet()){\r\n //If they appear in the file\r\n if(words.get(key) != 0){\r\n //count it\r\n distinct++;\r\n }\r\n }\r\n return distinct;\r\n\t}",
"public int getFrequencyOf(String word) {\r\n\t\tint frequency = 0;\r\n\t\tif (readDocument != null) {\r\n\t\t\tfrequency = readDocument.getFrequencyOf(word);\r\n\t\t\tSystem.out.println(\"Frequency: \" + frequency);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"You have not read in a document. Please indicate file name\"\r\n\t\t\t\t\t+ \" before using this feature.\");\r\n\t\t}\r\n\t\treturn frequency;\r\n\t}",
"private void update(String person){\n\n\t\tint index = myWords.indexOf(person);\n\t\tif(index == -1){\n\t\t\tmyWords.add(person);\n\t\t\tmyFreqs.add(1);\n\t\t}\n\t\telse{\n\t\t\tint value = myFreqs.get(index);\n\t\t\tmyFreqs.set(index,value+1);\n\t\t}\n\t}",
"public void setWordCount(int countIn) {\n this.wordCount = countIn;\n }",
"public int getDocFreq(Term t){\n\t\tint freq = 0;\r\n\t\tfor (Map.Entry<String, IndexedDoc> set : index.entrySet()){\r\n\t\t\tif (set.getValue().containsTerm(t)){\r\n\t\t\t\tfreq++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn freq;\r\n\t}",
"public void buildWordFileMap(){\n hashWords.clear();\n DirectoryResource dr = new DirectoryResource();\n for (File f : dr.selectedFiles()){ //for all the files selected make the hashWords hashmap\n addWordsFromFile(f);\n }\n \n }",
"public WordOccurence(final int time) {\n\t\t\toccurences = new ArrayList<Integer>();\n\t\t\toccurences.add(time);\n\t\t\tvDitected = new ArrayList<Integer>();\n\t\t\tvaluesSet = false;\n\t\t}",
"public int numWordsCurrent() {\r\n return 0;\r\n }",
"public double getCount(String word1, String word2) {\n double count = 0;\n // YOUR CODE HERE\n if (KnownWord(word1) && KnownWord(word2)) {\n count = bi_grams[NDTokens.indexOf(word1)][NDTokens.indexOf(word2)];\n } else {\n count = smooth ? 1 : 0;\n }\n return count;\n }",
"static void returnTfIdfResults() {\n\t\tSet<String> specificWords = findKeywords();\n\n\t\t// for every phrase\n\t\tfor (String word : specificWords) {\n\t\t\t// get the total number of documents\n\t\t\tdouble totalSize = size;\n\n\t\t\t// get the collection of documents containing that word\n\t\t\tCollection<File> containingWordSet = invertedMap.getValues(word);\n\n\t\t\t// makes a new one if null (for ease of code)\n\t\t\tif (containingWordSet == null) {\n\t\t\t\tcontainingWordSet = new HashSet<File>();\n\t\t\t}\n\n\t\t\t// the number containing the word\n\t\t\tdouble numContainingWord = containingWordSet.size();\n\n\t\t\t// get the idf (log(total/(1 + |# contain word|)\n\t\t\t// it is normalize with 1 to prevent division by 0\n\t\t\tdouble idf = Math.log(totalSize / (1 + numContainingWord));\n\n\t\t\t// System.out.println(\"------------------\");\n\t\t\t// System.out.println(word + \" totalSize \" + totalSize);\n\t\t\t// System.out.println(word + \" numContainingWord \" +\n\t\t\t// numContainingWord);\n\t\t\t// System.out.println(word + \" idf \" + idf);\n\t\t\t// System.out.println(\"------------------\");\n\n\t\t\t// set the wordscore to 0\n\t\t\tdouble wordScore = 0;\n\n\t\t\t// for all of the files with the word\n\t\t\tfor (File file : containingWordSet) {\n\t\t\t\tString fileName = file.getName();\n\n\t\t\t\t// get the phrase count for this document\n\t\t\t\tInteger phraseCount = phraseCountMap.get(fileName);\n\t\t\t\tdouble numPhrases = phraseCount.doubleValue();\n\n\t\t\t\t// get the word frequency map for this page\n\t\t\t\tHashMap<String, Integer> docFreqMap = wordFreqMap.get(fileName);\n\t\t\t\tInteger freq = docFreqMap.get(word);\n\n\t\t\t\t// otherwise, get the tf\n\t\t\t\tdouble tf;\n\t\t\t\tif (freq == null) {\n\t\t\t\t\t// if it's not present, it's 0\n\t\t\t\t\ttf = 0;\n\t\t\t\t} else {\n\t\t\t\t\t// otherwise, it's the value\n\t\t\t\t\ttf = freq / numPhrases;\n\t\t\t\t\t// System.out.println(tf);\n\t\t\t\t}\n\n\t\t\t\t// multiply for this score\n\t\t\t\tdouble score = tf * idf;\n\n\t\t\t\t// add it to the page score\n\t\t\t\twordScore += score;\n\t\t\t}\n\n\t\t\t// make a node with the sum of tf-idf for all relevant phrases and\n\t\t\t// add to pq\n\t\t\tWordNode w = new WordNode(word, wordScore);\n\t\t\tpq.add(w);\n\t\t}\n\t}",
"public static void main(String[] args) {\n\t\t\r\n\t\tScanner info = new Scanner(System.in);\r\n\t\t\r\n\t\tSystem.out.println(\"Enter the phrase:\");\r\n\t\tString sentence = info.nextLine();\r\n\t\t\r\n\t\tsentence = sentence.trim().toUpperCase();\r\n\t\t\r\n\t\tfor (int i = 0; i < sentence.length(); i++) {\r\n\t\t\tif (sentence.charAt(i) <'A' || sentence.charAt(i) > 'Z' ) {\r\n\t\t\t\tsentence = sentence.replace(\"\"+sentence.charAt(i), \"/\");\r\n//\t\t\t\tSystem.out.println(sentence);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tString[] word = sentence.split(\"/\") ;\r\n\t\t\r\n\t\tint total = 0;\r\n\t\tif (word.length < 1) {\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\r\n\t\t\tHashMap hMap = new HashMap();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif (word[0].length() > 0) {\r\n\t\t\t\thMap.put(word[0].length(), 1);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tfor (int i = 1; i < word.length; i++) {\r\n\t\t\t\tfor (int j = 0; j < i; j++) {\r\n\t\t\t\t\tif (word[i].length() == word[j].length()) {\r\n\t\t\t\t\t\tint cnt = (int) hMap.get(word[i].length());\r\n\t//\t\t\t\t\tSystem.out.println(\"cnt==>\"+cnt);\r\n\t\t\t\t\t\thMap.put(word[i].length(),++cnt);\r\n\t\t\t\t\t\t\t\r\n\t//\t\t\t\t\tSystem.out.println(word[i].length()+\"==>\"+hMap.get(word[i].length()));\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif (j == (i-1)){\r\n\t\t\t\t\t\t\thMap.put(word[i].length(), 1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tSet<Integer> keys1 = hMap.keySet();\r\n\t\r\n\t\t\tfor(int key:keys1) {\r\n\t\t\t\tif (key !=0) {\r\n\t\t\t\t\tSystem.out.println(hMap.get(key)+\" \"+key +\" letter words\");\r\n\t\t\t\t\ttotal += (int)hMap.get(key);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(total+\" total words\");\r\n\t\t\r\n\t}",
"public void theDude() {\n\t\ttotal_targets = 0;\n\t\ttotal = 0;\n\t\tint target_count = 0;\n\t\tresult.clear();\n\t\t\n\t\tfor(int k=0; k<input.getWords().size();k++) {\n\t\t\tWord currentWordStat = input.getWordStatistics().get(k);\n\t\t\ttarget_count = 0;\n\t\t\t\n\t\t\tfor(int i=0;i<input.getWords().get(k).length();i++) {\n\t\t\t\tif(target.contains(input.getWords().get(k).charAt(i))) {\n\t\t\t\t\ttarget_count++;\n\t\t\t\t\ttotal_targets++;\n\t\t\t\t}\n\t\t\t\ttotal++;\n\t\t\t}\n\t\t\t\n\t\t\tif(result.containsKey(currentWordStat)) {\n\t\t\t\tresult.put(currentWordStat, result.get(currentWordStat)+target_count);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tresult.put(currentWordStat, target_count);\n\t\t\t}\n\t\t}\t\n\t}",
"public static void numOfBook2() {\n\t\t/*\n\t\t 1. write a java program that can count how many time \n\t\t \tthe word \"book\" is appeared in a String\n\t\t Ex:\n\t\t\tinput: I like books, I have books, I need book\n\t\t\toutput: 3\n\t\t */\n\t\t\n\t\tString a = \"Book is very Book. I like to read Book and I like to give Boroky. And I like to sell Book\";\n\t\tint counter=0;\n\t\t\n\t\twhile(a.contains(\"Book\")) {\n\t\t\ta = a.replaceFirst(\"Book\", \"\");\n\t\t\tcounter++;\n\t\t}\n\t\t\n\t\tSystem.out.println(counter);\n\t\t\n\t}",
"int[] documents(VocabWord vocabWord);",
"@Override\r\n\t\t\tpublic void keyTyped(KeyEvent e) {\n\t\t\t\tcount_text();\r\n\t\t\t}",
"public WordCount(String _word, int lnNum)\n {\n //initializes common variables \n count = 1;\n lineNums = new CircularList();\n //initializes specific passed variables\n word = _word;\n addLineNum(lnNum);\n }",
"void highlightNextWord() {\n\t\tif(findIndex < finder.size()) {\n\t\t\ttextEditor.getHighlighter().removeAllHighlights();\n\t\t\ttry {\n\t\t\t\thighlighter.addHighlight(finder.get(findIndex).p1, \n\t\t\t\t\t\tfinder.get(findIndex).p2-1, painter);\n\t\t\t} catch (BadLocationException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tfindIndex++;\n\t\t}\n\t\telse {\n\t\t\tfindIndex = 0;\n\t\t}\n\t}",
"public void analyzeDocumentDemo(JSONObject json) {\n\t\ttry {\n\t\t\tJSONArray jarray = json.getJSONArray(\"Reviews\");\n\t\t\tfor (int i = 0; i < jarray.length(); i++) {\n\t\t\t\tPost review = new Post(jarray.getJSONObject(i));\n\t\t\t\tString content = review.getContent();\n\n\n\t\t\t\tHashSet<String> uniminiset = new HashSet<String>();\n\t\t\t\tHashSet<String> biminiset = new HashSet<String>();\n\n\t\t\t\tString[] unigram = tokenizer.tokenize(content);\n\n\t\t\t\tfor (String token : unigram) {\n\t\t\t\t\ttoken = PorterStemmingDemo(SnowballStemmingDemo(NormalizationDemo(token)));\n\n\t\t\t\t\tuniminiset.add(token);\n\t\t\t\t}\n\n\t\t\t\t// count word frequency for unigram\n\t\t\t\tfor (String token2 : uniminiset) {\n\t\t\t\t\tif (m_stopwords.contains(token2))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\telse {\n\t\t\t\t\t\ttoken2 = PorterStemmingDemo(SnowballStemmingDemo(NormalizationDemo(token2)));\n\t\t\t\t\t\tif (m_stats.containsKey(token2)) {\n\t\t\t\t\t\t\tm_stats.put(token2, m_stats.get(token2) + 1);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tm_stats.put(token2, 1);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tArrayList<String> N_gram = new ArrayList<String>();\n\n\t\t\t\tfor (String token : tokenizer.tokenize(content)) {\n\n\t\t\t\t\ttoken = PorterStemmingDemo(SnowballStemmingDemo(NormalizationDemo(token)));\n\t\t\t\t\tif (token.isEmpty()) {\n\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tN_gram.add(token);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tString[] fine = new String[N_gram.size()];\n // In bigram, neither two words should occur in the stopwords\n\t\t\t\tfor (int p = 0; p < N_gram.size() - 1; p++) {\n\t\t\t\t\tif (m_stopwords.contains(N_gram.get(p)))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tif (m_stopwords.contains(N_gram.get(p + 1)))\n\t\t\t\t\t\tcontinue;\n\n\t\t\t\t\tfine[p] = N_gram.get(p) + \"-\" + N_gram.get(p + 1);\n\n\t\t\t\t}\n\n\t\t\t\tfor (String str : fine) {\n\n\t\t\t\t\tbiminiset.add(str);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// count word frequency for unigram\n\t\t\t\tfor (String str2 : biminiset) {\n\n\t\t\t\t\tif (m_stats.containsKey(str2)) {\n\t\t\t\t\t\tm_stats.put(str2, m_stats.get(str2) + 1);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tm_stats.put(str2, 1);\n\t\t\t\t\t}\n\t\t\t\t}\n \n\t\t\t\t// store review content on m_reviews so later on when want to use it \n\t\t\t\t// we do not have to reread it from file\n\t\t\t\tm_reviews.add(review);\n \n\t\t\t\t//monitor the process of the program\n\t\t\t\tSystem.out.println(\"level\" + m_reviews.size());\n\n\t\t\t}\n\t\t}\n\n\t\tcatch (JSONException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"int countByExample(AvwFileprocessExample example);",
"public int countOccurrences(String word) {\n\t\tint i = 0;\n\t\tfor (int j = 0; j < wordList.size(); j++) {\n\t\t\tif (wordList.get(j).equals(word)) {\n\t\t\t\ti++;\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\t\treturn i;\n\t\t// TODO Add your code here\n\t}",
"public static int totalWord(File file) throws FileNotFoundException {\r\n Scanner scan = new Scanner(file); // scanner for scanning the file\r\n int count = 0;\r\n while (scan.hasNext()) // scan until end\r\n {\r\n String word = scan.next();\r\n if (isWord(word)) // is the content is a word than increase count by 1\r\n count++;\r\n }\r\n return count;\r\n }",
"public void countWordLengthsWithIsLettermethod(FileResource resource, int[] counts) {\r\n for (String word : resource.words()) {\r\n String trim = word.trim();\r\n int wordSize = trim.length();\r\n char firstChar = trim.charAt(0);\r\n char endChar = trim.charAt(trim.length()-1);\r\n if (!Character.isLetter(firstChar) && !Character.isLetter(endChar)) {\r\n wordSize -= 2;\r\n } else \r\n if (!Character.isLetter(firstChar) || !Character.isLetter(endChar)) {\r\n wordSize -= 1;\r\n }\r\n if(wordSize>=counts.length) {\r\n counts[counts.length-1] += 1; \r\n } else\r\n //right algorithm\r\n if( wordSize> 0 && counts[wordSize] != 0 ) {\r\n counts[wordSize] += 1;\r\n \r\n } else if ( wordSize> 0) {\r\n counts[wordSize] = 1;\r\n }\r\n }\r\n \r\n //test\r\n for(int i : counts) {\r\n System.out.println(i);\r\n }\r\n }",
"int getNumberOfDocuments();",
"int count(String s) {\r\n\t\tif (m_words.containsKey(s)) {\r\n\t\t\treturn m_words.get(s);\r\n\t\t} else {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t}",
"private static String lookForSentenceWhichContains(String[] words, String documentPath) throws IOException {\r\n\r\n File document = new File(documentPath);\r\n\r\n if (!document.exists()) throw new FileNotFoundException(\"File located at \"+documentPath+\" doesn't exist.\\n\");\r\n\r\n FileReader r = new FileReader(document);\r\n BufferedReader br = new BufferedReader(r);\r\n\r\n String line;\r\n String documentText = \"\";\r\n while ( (line=br.readLine()) != null) {\r\n documentText += line;\r\n }\r\n\r\n documentText = Jsoup.parse(documentText).text();\r\n\r\n String[] listOfSentences = documentText.split(\"\\\\.\");\r\n HashMap<String,String> originalToNormalized = new HashMap<>();\r\n String original;\r\n\r\n for (String sentence: listOfSentences){\r\n\r\n original = sentence;\r\n\r\n sentence = sentence.toLowerCase();\r\n sentence = StringUtils.stripAccents(sentence);\r\n sentence = sentence.replaceAll(\"[^a-z0-9-._\\\\n]\", \" \");\r\n\r\n originalToNormalized.put(original,sentence);\r\n }\r\n\r\n int matches, maxMatches = 0;\r\n String output = \"\";\r\n\r\n for (Map.Entry<String,String> sentence: originalToNormalized.entrySet()){\r\n\r\n matches = 0;\r\n\r\n for (String word: words){\r\n if (sentence.getValue().contains(word)) matches++;\r\n }\r\n\r\n if (matches == words.length) return sentence.getKey();\r\n if (matches > maxMatches){\r\n maxMatches = matches;\r\n output = sentence.getKey();\r\n }\r\n }\r\n\r\n return output;\r\n\r\n }",
"public double tf(String wordToLookFor, HashMap<String, ArrayList<Integer>> tokensHM, Document doc) {\n if (tokensHM.containsKey(wordToLookFor)) {\n double count = 0;\n String[] words = doc.generateWordList(doc.getDocument());\n if(tokensHM.get(wordToLookFor).contains(doc.getIndex())) {\n for (String word : words) {\n if (word.equals(wordToLookFor)) {\n count++;\n }\n }\n }\n return count/words.length;\n }\n else {\n return 0;\n }\n }",
"public abstract void overallWords(long ms, int n);",
"public static void avarageNum() throws IOException\n\t{\n\t\t// Read data from text file\n\t\tHashMap<String, Integer> wordCountMap = new HashMap<String, Integer>();\n\t \n BufferedReader reader = null;\n \n try\n {\n //Creating BufferedReader object\n \n reader = new BufferedReader(new FileReader(\"NumOUTPUT.txt\"));\n \n //Reading the first line into currentLine\n \n String currentLine = reader.readLine();\n \n while (currentLine != null)\n { \n // Splitting the currentLine into words \n String[] numbers = currentLine.toLowerCase().split(\" \");\n \n // Iterating each word\n for (String word : numbers)\n {\n // If word is already present in wordCountMap, updating its count\n \n if(wordCountMap.containsKey(word))\n { \n wordCountMap.put(word, wordCountMap.get(word) + 1);\n }\n \n // Otherwise inserting the word as key and 1 as its value\n else\n {\n wordCountMap.put(word, 1);\n }\n }\n \n // Reading next line into currentLine \n currentLine = reader.readLine();\n }\n \n // Getting the most repeated word and its occurrence \n String mostRepeatedNum = null;\n \n int count = 0;\n \n Set<java.util.Map.Entry<String, Integer>> entrySet = wordCountMap.entrySet();\n \n for (java.util.Map.Entry<String, Integer> entry : entrySet)\n {\n if(((java.util.Map.Entry<String, Integer>) entry).getValue() > count)\n { \n \t\tmostRepeatedNum = entry.getKey(); \n count = entry.getValue(); \n }\n }\n \n System.out.println(\"The most repeated number is : \" + mostRepeatedNum);\n \n System.out.println(\"Times repeated : \" + count);\n } \n catch (IOException e) \n {\n e.printStackTrace();\n }\n finally\n {\n try\n {\n reader.close(); //Closing the reader\n }\n catch (IOException e) \n {\n e.printStackTrace();\n }\n }\n\t\t\n\t}",
"static void allDocumentAnalyzer() throws IOException {\n\t\tFile allFiles = new File(\".\"); // current directory\n\t\tFile[] files = allFiles.listFiles(); // file array\n\n\t\t// recurse through all documents\n\t\tfor (File doc : files) {\n\t\t\t// other files we don't need\n\t\t\tif (doc.getName().contains(\".java\") || doc.getName().contains(\"words\") || doc.getName().contains(\"names\")\n\t\t\t\t\t|| doc.getName().contains(\"phrases\") || doc.getName().contains(\".class\")\n\t\t\t\t\t|| doc.getName().contains(\"Data\") || doc.getName().contains(\".sh\") || doc.isDirectory()\n\t\t\t\t\t|| !doc.getName().contains(\".txt\")) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tString name = doc.getName();\n\t\t\tSystem.out.println(name);\n\t\t\tname = name.substring(0, name.length() - 11);\n\t\t\tSystem.out.println(name);\n\n\t\t\tif (!names.contains(name)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// make readers\n\t\t\tFileReader fr = new FileReader(doc);\n\t\t\tBufferedReader br = new BufferedReader(fr);\n\n\t\t\t// phrase list\n\t\t\tArrayList<String> words = new ArrayList<String>();\n\n\t\t\t// retrieve all text, trim, refine and add to phrase list\n\t\t\tString nextLine = br.readLine();\n\t\t\twhile (nextLine != null) {\n\t\t\t\tnextLine = nextLine.replace(\"\\n\", \" \");\n\t\t\t\tnextLine = nextLine.trim();\n\n\t\t\t\tif (nextLine.contains(\"no experience listed\")) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tString[] lineArray = nextLine.split(\"\\\\s+\");\n\n\t\t\t\t// recurse through every word to find phrases\n\t\t\t\tfor (int i = 0; i < lineArray.length - 1; i++) {\n\t\t\t\t\t// get the current word and refine\n\t\t\t\t\tString currentWord = lineArray[i];\n\n\t\t\t\t\tcurrentWord = currentWord.trim();\n\t\t\t\t\tcurrentWord = refineWord(currentWord);\n\n\t\t\t\t\tif (currentWord.equals(\"\") || currentWord.isEmpty()) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\twords.add(currentWord);\n\t\t\t\t}\n\t\t\t\tnextLine = br.readLine();\n\t\t\t}\n\n\t\t\tbr.close();\n\n\t\t\t// continue if empty\n\t\t\tif (words.size() == 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// otherwise, increment number of files in corpus\n\t\t\tsize++;\n\n\t\t\t// updating the phrase count map for tf\n\t\t\tString fileName = doc.getName();\n\t\t\tphraseCountMap.put(fileName, words.size());\n\n\t\t\t// recurse through every word\n\t\t\tfor (String word : words) {\n\t\t\t\t// get map from string to freq\n\t\t\t\tHashMap<String, Integer> textFreqMap = wordFreqMap.get(fileName);\n\n\t\t\t\t// if it's null, make one\n\t\t\t\tif (textFreqMap == null) {\n\t\t\t\t\ttextFreqMap = new HashMap<String, Integer>();\n\t\t\t\t\t// make freq as 1\n\t\t\t\t\ttextFreqMap.put(word, 1);\n\t\t\t\t\t// put that in wordFreq\n\t\t\t\t\twordFreqMap.put(fileName, textFreqMap);\n\t\t\t\t} else {\n\t\t\t\t\t// otherwise, get the current num\n\t\t\t\t\tInteger currentFreq = textFreqMap.get(word);\n\n\t\t\t\t\t// if it's null,\n\t\t\t\t\tif (currentFreq == null) {\n\t\t\t\t\t\t// the frequency is just 0\n\t\t\t\t\t\tcurrentFreq = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t// increment the frequency\n\t\t\t\t\tcurrentFreq++;\n\n\t\t\t\t\t// put it in the textFreqMap\n\t\t\t\t\ttextFreqMap.put(word, currentFreq);\n\n\t\t\t\t\t// put that in the wordFreqMap\n\t\t\t\t\twordFreqMap.put(fileName, textFreqMap);\n\t\t\t\t}\n\n\t\t\t\t// add this to record (map from phrases to docs with that\n\t\t\t\t// phrase)\n\t\t\t\tinvertedMap.addValue(word, doc);\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public int getTermFrequencyByDocument(String term, String url) {\n return 0;\n }",
"int numDocuments();",
"@Override\r\n\t\t\tpublic long getDocumentFrequency(String term) {\n\t\t\t\treturn 0;\r\n\t\t\t}",
"public void updateCounts() {\n\n Map<Feel, Integer> counts_of = new HashMap<>();\n\n for (Feel feeling : Feel.values()) {\n counts_of.put(feeling, 0);\n }\n\n for (FeelingRecord record : this.records) {\n counts_of.put(record.getFeeling(), counts_of.get(record.getFeeling()) + 1);\n }\n\n this.angry_count.setText(\"Anger: \" + counts_of.get(Feel.ANGER).toString());\n this.fear_count.setText(\"Fear: \" + counts_of.get(Feel.FEAR).toString());\n this.joyful_count.setText(\"Joy: \" + counts_of.get(Feel.JOY).toString());\n this.love_count.setText(\"Love: \" + counts_of.get(Feel.LOVE).toString());\n this.sad_count.setText(\"Sad:\" + counts_of.get(Feel.SADNESS).toString());\n this.suprise_count.setText(\"Suprise: \" + counts_of.get(Feel.SURPRISE).toString());\n }",
"int getShotAnnotationsCount();"
] | [
"0.68543667",
"0.67432225",
"0.66478574",
"0.65705603",
"0.6474805",
"0.6342908",
"0.628605",
"0.6254677",
"0.6226739",
"0.6196794",
"0.61812097",
"0.61342806",
"0.61041594",
"0.60401154",
"0.5987318",
"0.596824",
"0.59634215",
"0.5956461",
"0.5933216",
"0.5927491",
"0.59255445",
"0.5923191",
"0.5920949",
"0.58967614",
"0.5888715",
"0.5882267",
"0.58454686",
"0.5844199",
"0.5827807",
"0.5797598",
"0.57876235",
"0.57777244",
"0.5753091",
"0.5745198",
"0.57385254",
"0.5737252",
"0.5699035",
"0.5693706",
"0.56771713",
"0.56764305",
"0.5672024",
"0.56703955",
"0.56625265",
"0.5662503",
"0.56542313",
"0.5653267",
"0.56417924",
"0.56388307",
"0.5629895",
"0.5629719",
"0.5625919",
"0.561019",
"0.56065255",
"0.560408",
"0.5600526",
"0.5589616",
"0.55895376",
"0.5570582",
"0.55565464",
"0.55554736",
"0.5553113",
"0.5548177",
"0.55447596",
"0.55415547",
"0.5521649",
"0.55202824",
"0.55102026",
"0.5508706",
"0.5506824",
"0.55004174",
"0.5496958",
"0.5490369",
"0.5482673",
"0.54820615",
"0.5480183",
"0.5473421",
"0.5473159",
"0.5472486",
"0.5470393",
"0.54699194",
"0.54685134",
"0.5454211",
"0.5450392",
"0.5450372",
"0.5449217",
"0.5427838",
"0.54253066",
"0.54185367",
"0.54053235",
"0.5402813",
"0.5397415",
"0.5394523",
"0.53937835",
"0.5391596",
"0.53908324",
"0.5388793",
"0.5383434",
"0.5378243",
"0.53733003",
"0.53728527",
"0.53658986"
] | 0.0 | -1 |
Calculate actual IDF2 values | private void calculateIDF2Values() throws IOException {
for (int i = 0; i < getTfMapArrayIDF().size(); i++) {
List<Map<String, List<Double>>> gestureDocument = getTfMapArrayIDF()
.get(i);
Map<String, Double> idf2PerDocument = getTfMapArrayIDF2().get(i);
for (int j = 0; j < gestureDocument.size(); j++) {
Map<String, List<Double>> tempMap = gestureDocument.get(j);
Iterator<Entry<String, List<Double>>> it = tempMap.entrySet()
.iterator();
while (it.hasNext()) {
Map.Entry<String, List<Double>> pairs = (Map.Entry) it
.next();
Double inverse = (new Double(getTfMapArrayIDF().get(0)
.size()) / idf2PerDocument.get(pairs.getKey())); // already
// inversse
List<Double> tf = pairs.getValue();
tf.set(2,Math.log(inverse));
tf.set(3,tf.get(0) * tf.get(1)); //tf-idf
idfValues.add(tf.get(1));
tf.set(4,tf.get(0) * tf.get(2)); //tf-idf2
idf2Values.add(tf.get(2));
}
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static float A00(DDD ddd, int i, float f, float f2) {\n float[] fArr;\n DDG[] ddgArr = ddd.A01;\n if (ddgArr == null || (fArr = ddd.A00) == null) {\n return BaseViewManager.CAMERA_DISTANCE_NORMALIZATION_MULTIPLIER;\n }\n int i2 = i - 1;\n DDG ddg = ddgArr[i2];\n float f3 = fArr[i2];\n float f4 = fArr[i] - f3;\n float f5 = (f - f3) / f4;\n byte b = ddg.A00;\n if (b == 0) {\n C29831DCs dCs = ddg.A01;\n C29831DCs dCs2 = ddg.A02;\n if (!(dCs == null || dCs2 == null)) {\n float f6 = dCs.A00;\n float f7 = dCs.A01;\n float f8 = f6 * 3.0f;\n float f9 = ((dCs2.A00 - f6) * 3.0f) - f8;\n float f10 = (1.0f - f8) - f9;\n float f11 = f7 * 3.0f;\n float f12 = ((dCs2.A01 - f7) * 3.0f) - f11;\n float f13 = (1.0f - f11) - f12;\n float min = Math.min(0.005f, 1.0f / ((f4 * f2) * 200.0f));\n float f14 = f5;\n int i3 = 0;\n float f15 = f14;\n while (true) {\n if (i3 >= 8) {\n break;\n }\n float f16 = (((((f10 * f15) + f9) * f15) + f8) * f15) - f5;\n if (Math.abs(f16) < min) {\n break;\n }\n float f17 = (((f10 * 3.0f * f15) + (2.0f * f9)) * f15) + f8;\n if (((double) Math.abs(f17)) < 1.0E-6d) {\n break;\n }\n f15 -= f16 / f17;\n i3++;\n }\n return ((((f13 * f15) + f12) * f15) + f11) * f15;\n }\n } else if (b != 1) {\n return BaseViewManager.CAMERA_DISTANCE_NORMALIZATION_MULTIPLIER;\n } else {\n return f5;\n }\n return BaseViewManager.CAMERA_DISTANCE_NORMALIZATION_MULTIPLIER;\n }",
"public double getValue()\n\t{\n\t\treturn ifD1.getValue();// X100 lux\n\t}",
"float getField2();",
"public double getF();",
"float calcularFinal(){\n return (calif1*0.3f)+(calif2*0.3f)+(calif3*0.4f);// debo agregar la f para que lo tome como float y no como double\r\n }",
"public double calculateFact() {\n\t\tdouble rootTwoPi = 2.5071326821120348744018252306904d;\n\t\treturn Math.log10(rootTwoPi) + (numForFact+0.5)*Math.log10(numForFact) - Math.log10(numForFact);\n\t}",
"public double getValueOfEDFA() {\n\t\treturn valueOfEDFA;\n\t}",
"private static int m7217a(float f, float f2, int[] iArr, int i, int i2, int i3) {\n int i4 = iArr[1] - iArr[0];\n if (i4 == 0) {\n return 0;\n }\n int i5 = i - i3;\n int i6 = (int) (((f2 - f) / ((float) i4)) * ((float) i5));\n int i7 = i2 + i6;\n if (i7 >= i5 || i7 < 0) {\n return 0;\n }\n return i6;\n }",
"public float Total2(){\r\n\t\treturn Total2();\r\n\t}",
"static int m51587b(int i, int i2, float f) {\n return Math.round(((float) (i2 - i)) * f) + i;\n }",
"public float getField2() {\n return field2_;\n }",
"private static void computeIDF()throws Exception{\r\n\t\tidfArray = new double[nounList.size()];\r\n\t\tBufferedReader br = new BufferedReader(new FileReader(NOUN_DF));\r\n\t\tString line = null;\r\n\t\tline = br.readLine();\r\n\t\tint cnt = 0;\r\n\t\tdocumentSize = Integer.parseInt(line);\r\n\t\twhile((line = br.readLine())!=null){\r\n\t\t\tdouble df = Double.parseDouble(line.split(\":\")[1]);\r\n\t\t\tif(df == 0.0){\r\n\t\t\t\tidfArray[cnt++] = 0;\r\n\t\t\t}else{\r\n\t\t\t\tdouble idf = Math.log10(documentSize / df);\r\n\t\t\t\tidfArray[ cnt++ ] = idf;\r\n\t\t\t}\r\n\t\t}\r\n\t\tbr.close();\r\n\t}",
"public double getFeIF() {\n return _avTable.getDouble(ATTR_FE_IF, 0.0);\n }",
"float getIva();",
"public float getField2() {\n return field2_;\n }",
"public void getPIDF() {\n p = SmartDashboard.getNumber(\"P \" + name, p);\n i = SmartDashboard.getNumber(\"I \" + name, i);\n d = SmartDashboard.getNumber(\"D \" + name, d);\n f = SmartDashboard.getNumber(\"F \" + name, f);\n setPIDF(p, i, d, f);\n }",
"protected int f(Long eID) {\n\t\tincreaseAccess();\n\t\treturn graph.getValE(eID, flowAttr);\n\t}",
"public double[] method_4317(int var1, float var2) {\r\n String[] var3 = class_752.method_4253();\r\n float var11;\r\n int var10000 = (var11 = this.method_406() - 0.0F) == 0.0F?0:(var11 < 0.0F?-1:1);\r\n if(var3 != null) {\r\n if(var10000 <= 0) {\r\n var2 = 0.0F;\r\n }\r\n\r\n var2 = 1.0F - var2;\r\n var10000 = this.field_3402 - var1 * 1 & 63;\r\n }\r\n\r\n int var4 = var10000;\r\n int var5 = this.field_3402 - var1 * 1 - 1 & 63;\r\n double[] var6 = new double[3];\r\n double var7 = this.field_3401[var4][0];\r\n double var9 = class_1715.method_9580(this.field_3401[var5][0] - var7);\r\n var6[0] = var7 + var9 * (double)var2;\r\n var7 = this.field_3401[var4][1];\r\n var9 = this.field_3401[var5][1] - var7;\r\n var6[1] = var7 + var9 * (double)var2;\r\n var6[2] = this.field_3401[var4][2] + (this.field_3401[var5][2] - this.field_3401[var4][2]) * (double)var2;\r\n return var6;\r\n }",
"public int getDie2FaceValue()\r\n {\r\n return die2FaceValue;\r\n }",
"public void cal_AdjustedFuelMoist(){\r\n\tADFM=0.9*FFM+0.5+9.5*Math.exp(-BUO/50);\r\n}",
"float getValue();",
"float getValue();",
"float getValue();",
"public abstract float getValue();",
"@Override\n\tpublic double calculate() \n\t{\t\n\t\t//return 2.45e6;\n\t\t//return (2499.64 - (2.51 * tempCelsius.value)) * 1000;\t\n\t\t//return ((2.501 - (0.002361 * tempCelsius.value)) * 1e6)*0.33;\n\t\treturn ((2.501 - (0.002361 * tempCelsius.value)) * 1e6);\n\t}",
"@VTID(14)\r\n double getValue();",
"private void calculateIdf(){\r\n\t\tIdf = new HashMap<>();\r\n\t\tOcc = new HashMap<>();\r\n\t\t\r\n\t\tfor (Entry<String, Document> doc : Docs.entrySet()){\r\n\t\t\tdoc.getValue().wordSet.forEach(word -> {\r\n\t\t\t\tdouble count = Idf.containsKey(word) ? Idf.get(word) : 0;\r\n \tIdf.put(word, count+1);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tdoc.getValue().words.forEach((w, o) -> words.add(w));\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tfor (Entry<String, Double> e : new HashMap<>(Idf).entrySet()){\r\n\t\t\tIdf.put(e.getKey(),\r\n\t\t\t\t\tMath.log(Idf.keySet().size() / e.getValue()));\r\n\t\t}\r\n\t}",
"protected abstract float getValue(Entity e,FloatTrait t);",
"private float m23258a(float f, float f2, float f3) {\n return f + ((f2 - f) * f3);\n }",
"public int calculateF(){\n\t\tf=getH()+getG();\n\t\treturn f;\n\t}",
"public void mo4342f(int i, int i2) {\n this.f3131A = i;\n this.f3132B = i2;\n C0785d dVar = this.f3134D;\n if (dVar != null) {\n dVar.mo4361Y();\n }\n mo4685A();\n }",
"float getD();",
"double getValue(int id);",
"public us.ihmc.idl.IDLSequence.Float getValues()\n {\n return values_;\n }",
"private void updateFMeasure(){\n double precisionValue = precision.get(precision.size()-1);\n double recallValue = recall.get(recall.size()-1);\n if(precisionValue==0.0 || recallValue==0.0){\n fMeasures.add(0.0);\n }else{\n fMeasures.add((2*precisionValue*recallValue)/(precisionValue+recallValue));\n }\n \n }",
"final void ec_dec_update(final int _fl, final int _fh, final int _ft) {// FIXME calling with int\r\n\t\t// java: if ft > fh > fl, than & 0xffffffff don't need\r\n\t\t/*\r\n\t\tfinal long s = ( _this.ext * ((long)(_ft - _fh) & 0xffffffffL) );\r\n\t\t_this.val -= s;\r\n\t\t_this.rng = _fl > 0 ? ( _this.ext * ((long)(_fh - _fl) & 0xffffffffL) ) : _this.rng - s;\r\n\t\tec_dec_normalize( _this );\r\n\t\t*/\r\n\t\tfinal long fl = (long)_fl & 0xffffffffL;// java\r\n\t\tfinal long fh = (long)_fh & 0xffffffffL;// java\r\n\t\tfinal long ft = (long)_ft & 0xffffffffL;// java\r\n\t\tfinal long s = ( this.ext * (ft - fh) );\r\n\t\tthis.val -= s;\r\n\t\t// _this.rng = fl > 0 ? ( _this.ext * (fh - fl) ) : _this.rng - s;\r\n\t\t// java: unsigned _fl, so _fl > 0 equals _fl != 0\r\n\t\tthis.rng = _fl != 0 ? (this.ext * (fh - fl)) : this.rng - s;\r\n\t\tec_dec_normalize();\r\n\t}",
"public void mo3285a(int i, float f, float f2) {\n C0809e eVar;\n int i2;\n C0807a aVar;\n C0809e eVar2;\n int i3;\n if (this.f2569b == i) {\n if (i == -1) {\n aVar = (C0807a) this.f2572e.valueAt(0);\n } else {\n aVar = (C0807a) this.f2572e.get(this.f2569b);\n }\n if (this.f2570c == -1 || !((C0808b) aVar.f2576b.get(this.f2570c)).mo3289a(f, f2)) {\n int a = aVar.mo3287a(f, f2);\n if (this.f2570c != a) {\n if (a == -1) {\n eVar2 = this.f2568a;\n } else {\n eVar2 = ((C0808b) aVar.f2576b.get(a)).f2584f;\n }\n if (a == -1) {\n i3 = aVar.f2577c;\n } else {\n i3 = ((C0808b) aVar.f2576b.get(a)).f2583e;\n }\n if (eVar2 != null) {\n this.f2570c = a;\n if (this.f2574g != null) {\n this.f2574g.mo3309a(-1, i3);\n }\n eVar2.mo3297b(this.f2571d);\n if (this.f2574g != null) {\n this.f2574g.mo3310b(-1, i3);\n }\n }\n }\n }\n } else {\n this.f2569b = i;\n C0807a aVar2 = (C0807a) this.f2572e.get(this.f2569b);\n int a2 = aVar2.mo3287a(f, f2);\n if (a2 == -1) {\n eVar = aVar2.f2578d;\n } else {\n eVar = ((C0808b) aVar2.f2576b.get(a2)).f2584f;\n }\n if (a2 == -1) {\n i2 = aVar2.f2577c;\n } else {\n i2 = ((C0808b) aVar2.f2576b.get(a2)).f2583e;\n }\n if (eVar == null) {\n StringBuilder sb = new StringBuilder();\n sb.append(\"NO Constraint set found ! id=\");\n sb.append(i);\n sb.append(\", dim =\");\n sb.append(f);\n sb.append(\", \");\n sb.append(f2);\n Log.v(\"ConstraintLayoutStates\", sb.toString());\n return;\n }\n this.f2570c = a2;\n if (this.f2574g != null) {\n this.f2574g.mo3309a(i, i2);\n }\n eVar.mo3297b(this.f2571d);\n if (this.f2574g != null) {\n this.f2574g.mo3310b(i, i2);\n }\n }\n }",
"public java.math.BigDecimal getField_737();",
"@Override\r\n\tpublic double calculate() {\n\t\treturn n1 / n2;\r\n\t}",
"public void mo3806e(int i, int i2) {\n if (i2 == 0) {\n this.f1436K = i;\n } else if (i2 == 1) {\n this.f1437L = i;\n }\n }",
"final int ec_decode(final int _fti) {// FIXME it is called with int _ft, result uses as int\r\n\t\tfinal long _ft = ((long)_fti & 0xffffffffL);// java\r\n\t\tthis.ext = ( this.rng / _ft );\r\n\t\tlong s = (this.val / this.ext);\r\n\t\t// return (int)(_ft - EC_MINI( s + 1L, _ft ));\r\n\t\ts++;\r\n\t\tlong b = _ft;\r\n\t\tb -= s;\r\n\t\tif( b > 0 ) {\r\n\t\t\tb = 0;\r\n\t\t}\r\n\t\ts += b;\r\n\t\treturn (int)(_ft - s);\r\n\t}",
"public BigDecimal getFid() {\n return fid;\n }",
"double getValue();",
"double getValue();",
"double getValue();",
"public float approach_y_GET()\n { return (float)(Float.intBitsToFloat((int) get_bytes(data, 45, 4))); }",
"public int getd2() {\n\t\treturn d2;\n\t}",
"public void mo3804d(int i, int i2) {\n this.f1435J = i;\n this.f1431F = i2 - i;\n int i3 = this.f1431F;\n int i4 = this.f1442Q;\n if (i3 < i4) {\n this.f1431F = i4;\n }\n }",
"public double getAmount2() // getAmount2 method start\n\t\t{\n\t\t\treturn Double.parseDouble(amountField2.getText());\n\t\t}",
"public double getAmount2() // getAmount2 method start\n\t\t{\n\t\t\treturn Double.parseDouble(amountField2.getText());\n\t\t}",
"public static int m20195a(float f, float f2, float f3, float f4) {\n int i = f != 0.0f ? (int) (((float) 527) * f) : 17;\n if (f2 != 0.0f) {\n i = (int) (((float) (i * 31)) * f2);\n }\n if (f3 != 0.0f) {\n i = (int) (((float) (i * 31)) * f3);\n }\n return f4 != 0.0f ? (int) (((float) (i * 31)) * f4) : i;\n }",
"public abstract double getComplianceFee();",
"float mo106364f();",
"public double result(double f) {\n double phi = Math.pow((Math.sin(2.0 * Math.PI * f / (2.0 * sample_rate))), 2.0);\n double r = (Math.pow(b0 + b1 + b2, 2.0) - 4.0 * (b0 * b1 + 4.0 * b0 * b2 + b1 * b2) * phi + 16.0 * b0 * b2 * phi * phi) / (Math.pow(1.0 + a1 + a2, 2.0) - 4.0 * (a1 + 4.0 * a2 + a1 * a2) * phi + 16.0 * a2 * phi * phi);\n if (r < 0) {\n r = 0;\n }\n return Math.sqrt(r);\n }",
"ScaleTwoDecimal calculateApplicableFandARate(Award award);",
"@Override\n\tpublic double calc(double d1, double d2) {\n\t\treturn 0;\n\t}",
"void mo9704b(float f, float f2, int i);",
"double getDoubleValue2();",
"public abstract float mo9744i();",
"public String getIDFV() {\n return this.IDFV;\n }",
"int getEvd();",
"private double f2c(double f)\n {\n return (f-32)*5/9;\n }",
"public BigDecimal getLBR_DIFAL_TaxRateICMSUFDest();",
"public void testF() {\n\t\tfor (int k = 0; k < usedSS; k++) {\n\t\t\tList<Integer> subStr = vals.subList(k*compSize, (k+1)*compSize);\n\t\t\tint sum = (int) subStr.stream().filter(i -> i != BipartiteMatching.FREE).count();\n\t\t\tfData.add(sum);\t\t\t\n\t\t}\n\t}",
"public BigDecimal getFC_AMOUNT() {\r\n return FC_AMOUNT;\r\n }",
"public double getFlete(){\n return localFlete;\n }",
"public double mo3926df(double v1, double v2, double n1, double n2) {\r\n return (((v1 / n1) + (v2 / n2)) * ((v1 / n1) + (v2 / n2))) / (((v1 * v1) / ((n1 * n1) * (n1 - 1.0d))) + ((v2 * v2) / ((n2 * n2) * (n2 - 1.0d))));\r\n }",
"void example2() {\n\t\t\n\t\tIndexedDataSource<HighPrecisionMember> list = ArrayDataSource.construct(G.HP, 1234);\n\t\t\n\t\t// fill the list with values\n\t\t\n\t\tFill.compute(G.HP, G.HP.unity(), list);\n\t\t\n\t\t// then calculate a result\n\n\t\tHighPrecisionMember result = G.HP.construct();\n\t\t\n\t\tSum.compute(G.HP, list, result); // result should equal 1234\n\t}",
"public BigDecimal getLBR_DIFAL_TaxRateFCPUFDest();",
"public double calculateValue () {\n return double1 * double2;\n }",
"double getField3();",
"public long mo9502f() {\n return this.f1516e;\n }",
"public float getTemp2() {\n\t\treturn temp2;\n\t}",
"public synchronized int a(float f2, boolean z2) {\n if (z2) {\n this.k = 0.0f;\n } else {\n this.k += f2;\n }\n return (int) (this.k * 100.0f);\n }",
"public int mo4305g(int i, int i2) {\n if (this.f3138s != 1 || !mo4323M()) {\n int[] iArr = this.f3121J;\n return iArr[i2 + i] - iArr[i];\n }\n int[] iArr2 = this.f3121J;\n int i3 = this.f3120I;\n return iArr2[i3 - i] - iArr2[(i3 - i) - i2];\n }",
"double computeFMeasure() {\n\t\tfMeasure = (2 * recall * precision) / (recall + precision);\n\t\treturn fMeasure;\n\t}",
"public RealValuedFunctTwoOps deriv2() {\n\treturn new RealValuedFunctTwoOps() {\n\t public double valueAt(double x, double y) {\n\t\treturn RealValuedFunctionTwo.this.deriv2At(x, y);\n\t }\n\t};\n }",
"@Override\n\tpublic float getDistance(float[] fv1, float[] fv2) {\n\t\tif(settings.getMetric() == 1){\n\t\t\treturn getL1Distance(fv1, fv2);\n\t\t} else { //metric == 2\n\t\t\treturn getL2Distance(fv1, fv2);\n\t\t}\n\t\t\n\t\t\n\t}",
"public Object getValue2() { return this.value2; }",
"public void mo6196a(float f, float f2) {\n this.f4749a.set(f, f2);\n }",
"float getSteamSupplyRating2();",
"BigDecimal getFare();",
"double getRealValue();",
"public BigDecimal getLBR_DIFAL_TaxBaseFCPUFDest();",
"public abstract double computeValue(Density density);",
"@Override\n\tpublic double getResult(String id) {\n\t\treturn 0;\n\t}",
"@Override\r\n protected void calculateValues(DataContext ctx)\r\n {\r\n\t//Common MTF Inputs\r\n\tint mtfPeriod = getSettings().getInteger(MTF_MULTIPLIER);\r\n Object mtfInput = getSettings().getInput(SMI_INPUT, Enums.BarInput.CLOSE);\r\n \r\n int mtfSmooth = getSettings().getInteger(SMI_SMOOTH);\r\n int mtfSignal = getSettings().getInteger(SMI_SIGNAL);\r\n int mtfHLinc = getSettings().getInteger(SMI_HL_MTF_INC);\r\n int mtfMAinc = getSettings().getInteger(SMI_MA_MTF_INC);\r\n \r\n\tint mtfHL = getSettings().getInteger(SMI_HL1_MTF);\r\n\tint mtfMA = getSettings().getInteger(SMI_MA1_MTF);\r\n \r\n /* MTF Bar sizing */\r\n BarSize barSize = ctx.getChartBarSize(); //Gets the barsize off the chart\r\n int mtfbarint = barSize.getInterval(); //Gets the interval of the chart\r\n int barSizeint = mtfbarint * mtfPeriod; //Multiply the interval by the mtf multiplier\r\n \r\n //Calculates a longer period interval based upon the mtfPeriod\r\n BarSize barSizeNew = barSize.getBarSize(barSize.getType(), barSizeint); \r\n //Assembes the longer period timeframe series\r\n DataSeries series2 = ctx.getDataSeries(barSizeNew);\r\n\r\n String valStringOut; //variables for the return results\r\n String valStringD;\r\n String valStringHL;\r\n String valStringD_MA;\r\n String valStringHL_MA;\r\n int hlPeriodmtf;\r\n int maPeriodmtf;\r\n \r\n StudyHeader header = getHeader();\r\n boolean updates = getSettings().isBarUpdates() || (header != null && header.requiresBarUpdates());\r\n\r\n // Calculates Moving Average for the Secondary Data Series\r\n for(int i = 1; i < series2.size(); i++) {\r\n if (series2.isComplete(i)) continue;\r\n if (!updates && !series2.isBarComplete(i)) continue;\r\n //Double sma = series2.ma(MAMethod.SMA, i, mtfPeriod, mtfInput);\r\n \r\n //insert smi logic\r\n for(int j = 1; j <= 4; j++) {\r\n \t \r\n switch (j) {\r\n case 1:\r\n \t valStringOut \t = \"Values.MTF1\"; //D1, HL1, D_MA1, HL_MA1 mtfHLinc\r\n \t valStringD \t = \"Values.D1\";\r\n \t valStringHL \t = \"Values.HL1\";\r\n \t valStringD_MA\t = \"Values.D_MA1\";\r\n \t valStringHL_MA = \"Values.HL_MA1\";\r\n \t hlPeriodmtf = mtfHL; //Base HL\r\n \t maPeriodMA = mtfMA; //Base MA\r\n \t break;\r\n case 2:\r\n \t valStringOut = \"Values.MTF2\";\r\n \t valStringD \t = \"Values.D2\";\r\n \t valStringHL \t = \"Values.HL2\";\r\n \t valStringD_MA\t = \"Values.D_MA2\";\r\n \t valStringHL_MA = \"Values.HL_MA2\";\r\n \t hlPeriodmtf = mtfHL + mtfHLinc; //Base HL + Increment\r\n \t maPeriodMA = mtfMA + mtfMAinc; //Base MA + Increment \t \r\n \t break;\r\n case 3:\r\n \t valStringOut = \"Values.MTF3\";\r\n \t valStringD \t = \"Values.D3\";\r\n \t valStringHL \t = \"Values.HL3\";\r\n \t valStringD_MA\t = \"Values.D_MA3\";\r\n \t valStringHL_MA = \"Values.HL_MA3\";\r\n \t hlPeriodmtf = mtfHL + (mtfHLinc*2); //Base HL + Increment*2\r\n \t maPeriodMA = mtfMA + (mtfMAinc*2); //Base MA + Increment*2 \t \r\n \t break;\r\n case 4:\r\n \t valStringOut = \"Values.MTF4\";\r\n \t valStringD \t = \"Values.D4\";\r\n \t valStringHL \t = \"Values.HL4\";\r\n \t valStringD_MA\t = \"Values.D_MA4\";\r\n \t valStringHL_MA = \"Values.HL_MA4\";\r\n \t hlPeriodmtf = mtfHL + (mtfHLinc*3); //Base HL + Increment\r\n \t maPeriodMA = mtfMA + (mtfMAinc*3); //Base MA + Increment\r\n \t break;\r\n default:\r\n \t break;\t \r\n } //end switch\r\n \r\n //base HL period is mtfHL\r\n if (i < mtfHL) return;\r\n\r\n double HH = series2.highest(i, hlPeriodmtf, Enums.BarInput.HIGH);\r\n double LL = series2.lowest(i, hlPeriodmtf, Enums.BarInput.LOW);\r\n double M = (HH + LL)/2.0;\r\n double D = series2.getClose(i) - M;\r\n \r\n series.setDouble(i, valStringD, D);\r\n series.setDouble(i, valStringHL, HH - LL);\r\n \r\n int maPeriod = getSettings().getInteger(MA_PERIOD);\r\n if (index < hlPeriod + maPeriod) return;\r\n \r\n Enums.MAMethod method = getSettings().getMAMethod(Inputs.METHOD);\r\n series.setDouble(index, Values.D_MA, series.ma(method, index, maPeriod, Values.D));\r\n series.setDouble(index, Values.HL_MA, series.ma(method, index, maPeriod, Values.HL));\r\n \r\n int smoothPeriod= getSettings().getInteger(SMOOTH_PERIOD);\r\n if (index < hlPeriod + maPeriod + smoothPeriod) return;\r\n \r\n Double D_SMOOTH = series.ma(method, index, smoothPeriod, Values.D_MA);\r\n Double HL_SMOOTH = series.ma(method, index, smoothPeriod, Values.HL_MA);\r\n \r\n if (D_SMOOTH == null || HL_SMOOTH == null) return;\r\n double HL2 = HL_SMOOTH/2;\r\n double SMI = 0;\r\n if (HL2 != 0) SMI = 100 * (D_SMOOTH/HL2);\r\n\r\n series.setDouble(index, Values.SMI, SMI);\r\n\r\n int signalPeriod= getSettings().getInteger(Inputs.SIGNAL_PERIOD);\r\n if (index < hlPeriod + maPeriod + smoothPeriod + signalPeriod) return;\r\n\r\n Double signal = series.ma(method, index, signalPeriod, Values.SMI);\r\n if (signal == null) return;\r\n series.setDouble(index, Values.SMI_SIGNAL, signal);\r\n\r\n \r\n \r\n } //end j bracket\r\n \r\n \r\n \r\n \r\n \r\n series2.setDouble(i, Values.MTF, sma);\r\n }\r\n\r\n // Invoke the parent method to run the \"calculate\" method below for the primary (chart) data series\r\n super.calculateValues(ctx);\r\n }",
"static int valDiv2 (){\n return val/2;\n }",
"public double calcularTarifa(){\n\t\treturn TARIFA_BASE * 1.2;\n\t}",
"public abstract double getValue();",
"void mo34547J(float f, float f2);",
"void mo9696a(float f, float f2, int i);",
"public void calcFund(FundamentalDomain fd)\n {\n \tfd.fund[0].setLC(1, frameO, 1, frameV);\n \tfd.fund[1].set(frameO);\n \tfd.fund[2].setLC(1, frameO, 1, frameU);\n \tif(fd.det>0)\n \t\tfd.fund[3].setLC(1, frameO, 1,frameU, 2, frameV);\n \telse\n \t\tfd.fund[3].setLC(1, frameO, 2,frameU, 1, frameV);\n \tfd.numFund = 4;\n }",
"private void m4005h(int i, int i2) {\n this.f3139t.f3157c = i2 - this.f3140u.mo5120f();\n C0784c cVar = this.f3139t;\n cVar.f3158d = i;\n cVar.f3159e = this.f3143x ? 1 : -1;\n C0784c cVar2 = this.f3139t;\n cVar2.f3160f = -1;\n cVar2.f3156b = i2;\n cVar2.f3161g = Integer.MIN_VALUE;\n }",
"static float m51586b(float f, float f2, float f3) {\n return ((f2 - f) * f3) + f;\n }",
"@Override\r\n\tpublic double calculate() {\n\t\treturn n1 * n2;\r\n\t}",
"public Function differentiate() {\n return new Product(this,\n new Sum(new Quotient(new Product(f2,\n f1.differentiate()),\n f1),\n new Product(new Log(new Complex(Math.E, 0.0), f1),\n f2.differentiate())));\n }",
"public double getDoubleValue2() {\n return doubleValue2_;\n }",
"protected float compute(){\n float result = 0f;\n String[] post = in2post(this.arr);\n result = post2ans(post);\n return result;\n }",
"public float d() {\n if (B1() || A1()) {\n return this.A + this.o + this.B;\n }\n return 0.0f;\n }"
] | [
"0.63305604",
"0.62872607",
"0.5957517",
"0.58682597",
"0.57670385",
"0.57172966",
"0.5714924",
"0.57034206",
"0.5668757",
"0.5611535",
"0.56059784",
"0.55962425",
"0.5577505",
"0.5575044",
"0.5570376",
"0.55625385",
"0.5526366",
"0.5516575",
"0.55163443",
"0.55058855",
"0.5475164",
"0.5475164",
"0.5475164",
"0.5469014",
"0.54571825",
"0.5454816",
"0.5453015",
"0.5452",
"0.54332733",
"0.54233444",
"0.5419099",
"0.54182583",
"0.54075885",
"0.5406504",
"0.5370427",
"0.535879",
"0.53564787",
"0.53471977",
"0.53259313",
"0.53057945",
"0.5301182",
"0.5297338",
"0.5297152",
"0.5297152",
"0.5297152",
"0.52941513",
"0.5289347",
"0.5284943",
"0.5284318",
"0.5284318",
"0.5281456",
"0.5275903",
"0.5263814",
"0.5256355",
"0.5255666",
"0.52528864",
"0.52516884",
"0.5248178",
"0.5245611",
"0.52433753",
"0.5236696",
"0.52282035",
"0.5227103",
"0.522193",
"0.5216193",
"0.52134025",
"0.52114743",
"0.5207238",
"0.5204963",
"0.5204762",
"0.5195807",
"0.5191856",
"0.5183785",
"0.51829475",
"0.5181961",
"0.5180735",
"0.517867",
"0.51782125",
"0.51696646",
"0.51650786",
"0.5163486",
"0.51623094",
"0.51619375",
"0.5154271",
"0.5133434",
"0.5128782",
"0.5125551",
"0.5122465",
"0.5117726",
"0.5117598",
"0.51168346",
"0.51145875",
"0.51082575",
"0.5106822",
"0.5106563",
"0.510163",
"0.5087106",
"0.50862676",
"0.50829583",
"0.5081884"
] | 0.74717885 | 0 |
/ Normal Getters and Setters | public void setTfIDFMapGlobal(Map<String,Integer> tfIDFMapGlobal) {
this.tfIDFMapGlobal = tfIDFMapGlobal;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected abstract Set method_1559();",
"@Override\n public void get() {}",
"@Override\r\n\tpublic void get() {\n\t\t\r\n\t}",
"@Override\n String get();",
"public void get() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"public int getAge() {return age;}",
"public void setAge(int age) { this.age = age; }",
"@Test\r\n\tpublic void testGettersSetters()\r\n\t{\r\n\t\tPerson p = new Person(42);\r\n\t\tp.setDisplayName(\"Fred\");\r\n\t\tassertEquals(\"Fred\", p.getFullname());\r\n\t\tp.setPassword(\"hunter2\");\r\n\t\tassertEquals(\"hunter2\", p.getPassword());\r\n\t\tassertEquals(42, p.getID());\r\n\t}",
"public void setdat()\n {\n }",
"public String get();",
"public abstract String get();",
"String setValue();",
"public int getAge(){\n return age;\n }",
"public Object get()\n {\n return m_internalValue;\n }",
"public int\t\tget() { return value; }",
"public T get() {\n return value;\n }",
"@Override\n\tpublic void getData() {\n\t\t\n\t}",
"public int getAge()\r\n {\r\n return age;\r\n }",
"public T get() {\n return value;\n }",
"public T get() {\n return value;\n }",
"public int getlife(){\r\n return life;\r\n}",
"private PropertyAccess() {\n\t\tsuper();\n\t}",
"@Test\n public void testSongGettersSetters() {\n Integer id = 4;\n String title=\"title\",uri = \"uri\";\n\n Song song = new Song();\n song.setId(id);\n song.setTitle(title);\n song.setUri(uri);\n\n assertEquals(\"Problem with id\",id, song.getId());\n assertEquals(\"Problem with title\",title, song.getTitle());\n assertEquals(\"Problem with uri\",uri, song.getUri());\n }",
"public int get () { return rating; }",
"public V get() {\n return value;\n }",
"public String get()\n {\n return this.string;\n }",
"@Test\r\n\tpublic void gettersSettersTest() {\r\n\t\tItem item = new Item();\r\n\t\titem.setCount(NUMBER);\r\n\t\tassertEquals(item.getCount(), NUMBER);\r\n\t\titem.setDescription(\"word\");\r\n\t\tassertEquals(item.getDescription(), \"word\");\r\n\t\titem.setId(NUMBER);\r\n\t\tassertEquals(item.getId(), NUMBER);\r\n\t\titem.setName(\"word\");\r\n\t\tassertEquals(item.getName(), \"word\");\r\n\t\titem.setPicture(\"picture\");\r\n\t\tassertEquals(item.getPicture(), \"picture\");\r\n\t\titem.setPrice(FLOATNUMBER);\r\n\t\tassertEquals(item.getPrice(), FLOATNUMBER, 0);\r\n\t\titem.setType(\"word\");\r\n\t\tassertEquals(item.getType(), \"word\");\r\n\t\titem.setSellerId(NUMBER);\r\n\t\tassertEquals(item.getSellerId(), NUMBER);\r\n\t\titem.setDeleted(false);\r\n\t\tassertEquals(item.isDeleted(), false);\r\n\t\titem.setDeleted(true);\r\n\t\tassertEquals(item.isDeleted(), true);\t\t\r\n\t}",
"public int getAge()\n {\n return age;\n }",
"public void setPrice(double price){this.price=price;}",
"public int getArmadura(){return armadura;}",
"private ReadProperty()\r\n {\r\n\r\n }",
"public Student getStudent() { return student; }",
"public int getSet() {\n return set;\n }",
"public int getNumber(){return number;}",
"public String getValue() {\n/* 99 */ return this.value;\n/* */ }",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void setX(int x) { this.x=x; }",
"@Override\n\n // <editor-fold defaultstate=\"collapsed\" desc=\" UML Marker \"> \n // #[regen=yes,id=DCE.E1700BD9-298C-DA86-4BFF-194B41A6CF5E]\n // </editor-fold> \n protected String getProperties() {\n\n return \"Size = \" + size + \", Index = \" + value;\n\n }",
"public Book getBook() \t\t{ return this.myBook; }",
"public int getValue() {\n/* 450 */ return this.value;\n/* */ }",
"public void setAge(int age);",
"@Override\n public int get()\n { \n return this.pr;\n }",
"public Empleado getEmpleado()\r\n/* 183: */ {\r\n/* 184:337 */ return this.empleado;\r\n/* 185: */ }",
"@Override\r\n\tpublic String get() {\n\t\treturn null;\r\n\t}",
"public void setNombre(String nombre) {this.nombre = nombre;}",
"private void assignment() {\n\n\t\t\t}",
"public int getAge() {\r\n return age;\r\n }",
"public Age getAge() {\n return age;\n }",
"public String getNombre()\r\n/* 17: */ {\r\n/* 18:41 */ return this.nombre;\r\n/* 19: */ }",
"public int getLives(){return lives;}",
"public double getPrice(){return price;}",
"@Override\n protected void updateProperties() {\n }",
"public int getAge() {\n\t \t return age; \n\t}",
"@Override\npublic void setAttributes() {\n\t\n}",
"@Override\n public Object getValue()\n {\n return value;\n }",
"public String getNombre()\r\n/* 113: */ {\r\n/* 114:204 */ return this.nombre;\r\n/* 115: */ }",
"@Override\n Derived get();",
"public void setNombre(String nombre) {\r\n\tthis.nombre = nombre;\r\n}",
"@java.lang.Override\n public int getAge() {\n return age_;\n }",
"public int getSpeed(){return this.speed;}",
"public String getNombre()\r\n/* 60: */ {\r\n/* 61: 67 */ return this.nombre;\r\n/* 62: */ }",
"public Object getValue() { return _value; }",
"public String getValor()\n/* 17: */ {\n/* 18:27 */ return this.valor;\n/* 19: */ }",
"@Override\r\n public Object getValue() {\r\n return value;\r\n }",
"public Object getValue(){\n \treturn this.value;\n }",
"@Override\n\tpublic void set() {\n\t\tSystem.out.println(\"A==========set\");\n\t}",
"public Address getAddress() { return address; }",
"private Get() {}",
"private Get() {}",
"@Override\n //Method for getting output from String declaration\n //First set of accessor/mutator that returns value as String\n public String toString(){\n return \"[\"+name+\",\"+type+\",\"+value+\"]\";\n }",
"int getBlue(){\n\n return this.blue;\n }",
"@Override\n\tpublic void get() {\n\t\tSystem.out.println(\"this is get\");\n\t}",
"public int value() { \n return this.value; \n }",
"@Override\n\tpublic String get() {\n\t\treturn null;\n\t}",
"public int getID(){\r\n return this.ID;\r\n }",
"public String getAuthor(){return author;}",
"public int getAge() {\n return age;\n }",
"public int getAge() {\n return age;\n }",
"public int getAge() {\n return age;\n }",
"public int getAge() {\n return age;\n }",
"public int getAge() {\n return age;\n }",
"public int getAge() {\n return age;\n }",
"public int getAge() {\n return age;\n }",
"public int getAge() {\n return age;\n }",
"public int getYearsOffice()\n {\n return yearsOffice;\n}",
"@Override\n\t\tpublic void set(E arg0) {\n\t\t\t\n\t\t}",
"public int getPrice(){\n return price;\n }",
"@Test\n\tpublic void get_test()\n\t{\n\t\tb.set(1,2,'x');\n\t\tassertEquals(b.get(1,2),'x');\n\t}",
"public int getPrice(){\n\n return this.price;\n }",
"public double getWage(){\r\n return wage; \r\n }",
"@Override\n\tpublic void setData() {\n\n\t}",
"public Object getValue() { return this.value; }",
"public String get() {\n return value;\n\t}",
"public int getNumber(){\r\n return num;\r\n }",
"public int getNumber()\n {\n return number;\n}",
"public void set() {\r\n\t\tage = 19;\r\n\t\tname = \"ΎΛ·»\";\r\n\t\theight = 161;\r\n\t\tsetWeight(50);\r\n\t\tSystem.out.println(getWeight());\r\n\t}",
"@Override\n public int getValue() {\n return super.getValue();\n }",
"public Object getNewValue()\n {\n return newValue;\n }",
"@Override\n public void setX(int x) {\n this.x=x;\n }",
"public Empresa getEmpresa()\r\n/* 84: */ {\r\n/* 85:131 */ return this.empresa;\r\n/* 86: */ }"
] | [
"0.6866259",
"0.6789662",
"0.67850846",
"0.63868994",
"0.638121",
"0.6367659",
"0.6358538",
"0.6351699",
"0.6193435",
"0.6162784",
"0.61460257",
"0.61336225",
"0.61259484",
"0.6111829",
"0.6108436",
"0.60938156",
"0.60877526",
"0.6070894",
"0.60645294",
"0.6062834",
"0.6062834",
"0.60587704",
"0.60472536",
"0.6039769",
"0.6036795",
"0.59902847",
"0.5979746",
"0.59775877",
"0.5956837",
"0.5945175",
"0.59393203",
"0.5933017",
"0.59308416",
"0.5918533",
"0.5917259",
"0.5897367",
"0.5881196",
"0.5880725",
"0.5858031",
"0.5848706",
"0.584491",
"0.5843532",
"0.58429855",
"0.58283156",
"0.58233404",
"0.5812173",
"0.5806685",
"0.58055794",
"0.5805513",
"0.5805027",
"0.5800856",
"0.58008176",
"0.5797477",
"0.57968414",
"0.57900184",
"0.5784152",
"0.57821745",
"0.5782112",
"0.5780464",
"0.5778903",
"0.57686985",
"0.5767678",
"0.5766316",
"0.57587534",
"0.57557034",
"0.57504255",
"0.5749161",
"0.57442355",
"0.57427174",
"0.57427174",
"0.5742606",
"0.5742334",
"0.57421243",
"0.57379794",
"0.5737832",
"0.5736514",
"0.5734911",
"0.57340246",
"0.57340246",
"0.57340246",
"0.57340246",
"0.57340246",
"0.57340246",
"0.57340246",
"0.57340246",
"0.5730535",
"0.5718321",
"0.5710636",
"0.5704787",
"0.57047355",
"0.57023",
"0.57015073",
"0.57000595",
"0.56983036",
"0.5697692",
"0.5693975",
"0.56920284",
"0.56901604",
"0.56898713",
"0.56897",
"0.56787384"
] | 0.0 | -1 |
METHODS DEALING WITH BUILDING UNITS (HOUSES AND HOTELS) | public boolean canBuild(int numToBuild)
{
return (numBuildings+numToBuild) <= MAX_NUM_UNITS;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main(String[] args) {\n\tArrayList<Item> hallInventory = new ArrayList<>();\n\tArrayList<Exit> hallExits = new ArrayList<>();\n\tRoom Hall = new Room(\"Entrance Hall\", \"It is an entrance hall of a very grand house\", hallInventory, hallExits);\n\n\t//kitchen\n\tArrayList<Item> kitchenInventory = new ArrayList<>();\n\tArrayList<Exit> kitchenExits = new ArrayList<>();\n\tRoom Kitchen = new Room(\"Kitchen\", \"This is a very large kitchen.\", kitchenInventory, kitchenExits);\n\n\t//dining room\n\tArrayList<Item> diningInventory = new ArrayList<>();\n\tArrayList<Exit> diningExits = new ArrayList<>();\n\tRoom Dining = new Room(\"Dining Room\", \"This dining room is set for 12 people\", diningInventory, diningExits);\n\n\t//lounge\n\tArrayList<Item> loungeInventory = new ArrayList<>();\n\tArrayList<Exit> loungeExits = new ArrayList<>();\n\tRoom Lounge = new Room(\"Lounge\", \"The Lounge is a mess, and there are blood spatters on the wall\", loungeInventory, loungeExits);\n\n\t//</editor-fold>\n\n\t//<editor-fold defaultstate=\"collapsed\" desc=\"Fill rooms with objects\">\n\thallInventory.add(new Item(\"a fruit bowl\", \"The fruit bowl contains some fruit\"));\n\thallInventory.add(new Item(\"a clock\", \"Tick Tock\"));\n\tkitchenInventory.add(new Item(\"a stove\", \"The stove is very hot\"));\n\tkitchenInventory.add(new Item(\"a knife\", \"The knife is blunt\"));\n\t//</editor-fold>\n\n\t//<editor-fold defaultstate=\"collapsed\" desc=\"add exits to rooms\">\n\thallExits.add(new Exit(1, Lounge));\n\thallExits.add(new Exit(4, Dining));\n\tloungeExits.add(new Exit(2, Hall));\n\tdiningExits.add(new Exit(3, Hall));\n\tdiningExits.add(new Exit(4, Kitchen));\n\tkitchenExits.add(new Exit(3, Dining));\n\t//</editor-fold>\n\n\t//create character : Avatar\n\t//<editor-fold defaultstate=\"collapsed\" desc=\"character creation\">\n\tArrayList<Item> invent = new ArrayList<>();\n\tCharacter Avatar = new Character(\"Tethys\", \"A tall elf dressed in armour\", 100, invent);\n\tinvent.add(new Item(\"armour\", \"leather armour\"));\n\t//</editor-fold>\n\t//begin\n\tRoom currentLoc = Hall;\n\tSystem.out.print(\"You are standing in the \" + currentLoc.getName() + \"\\n\" + currentLoc.getDesc() + \"\\n\");\n\tcurrentLoc.printInventory();\n\tcurrentLoc.printExits();\n\n\tBufferedReader command = new BufferedReader(new InputStreamReader(System.in));\n\tString orders = null;\n\twhile (true) {\n\t System.out.print(\"What do you want to do? \");\n\t try {\n\t\torders = command.readLine();\n\t } catch (IOException ioe) {\n\t\tSystem.out.println(\"I'm sorry, I didn't understand that!\");\n\t\tSystem.exit(1);\n\t }\n\n\t String[] orderWords = orders.split(\" \");\n\n//\t for (String s : orderWords){\n//\t\tSystem.out.print(s);\n\t switch (orderWords[0].toLowerCase()) {\n\t\tcase \"go\":\n\t\t int count = 0;\n\t\t for (Exit e : currentLoc.getExits()) {\n\t\t\tString direct = orderWords[1].toUpperCase();\n\t\t\tif (direct.equals(e.getDirectionName())) {\n\t\t\t currentLoc = e.getLeadsTo();\n\t\t\t count++;\n\t\t\t System.out.print(\"You are standing in the \" + currentLoc.getName() + \"\\n\" + currentLoc.getDesc() + \"\\n\");\n\t\t\t currentLoc.printInventory();\n\t\t\t currentLoc.printExits();\n\t\t\t break;\n\t\t\t}\n\t\t }\n\t\t if (count == 0) {\n\t\t\tSystem.out.print(\"I'm sorry, I can't go that way.\\n\");\n\t\t }\n\t\t break;\n\n\t\tcase \"pick\":\n\n\n\t\tcase \"put\":\n\n\n\t\tcase \"exit\":\n\t\t System.exit(0);\n\t\t break;\n\t }\n\n\t}\n\n\n }",
"@Override\n public void updateConvexHull() {\n BuildingModel buildingModel;\n convexHull = new CompositeConvexHull();\n convexObject.setConvexPolygon(convexHull.getConvexPolygon());\n if (convexObject != null && convexObject.getConvexPolygon() != null && convexObject.getConvexPolygon().npoints != 0) {\n for (int i = 0; i < convexObject.getConvexPolygon().npoints; i++) {\n convexHull.addPoint(convexObject.getConvexPolygon().xpoints[i],\n convexObject.getConvexPolygon().ypoints[i]);\n }\n }\n\n for (StandardEntity entity : entities) {\n if (entity instanceof Building) {\n buildingModel = world.getBuildingModel(entity.getID());\n\n /*if (isDying && building.getEstimatedFieryness() > 0 && building.getEstimatedFieryness() < 3) {\n setDying(false);\n }*/\n\n if (isEdge && !world.getMapSideBuildings().contains(buildingModel.getID())) {\n setEdge(false);\n }\n\n //try {\n// if (membershipChecker.checkMembership(building)) {\n// convexHull.addPoint(building.getSelfBuilding().getX(),\n// building.getSelfBuilding().getY());\n for (int i = 0; i < buildingModel.getSelfBuilding().getApexList().length; i += 2) {\n convexHull.addPoint(buildingModel.getSelfBuilding().getApexList()[i], buildingModel.getSelfBuilding().getApexList()[i + 1]);\n }\n\n// }\n /*} catch (Exception e) {\n e.printStackTrace();\n }*/\n }\n }\n\n\n// sizeOfBuildings(); mostafas commented this\n //if (world.getTime() % 5 == 0) {\n List<BuildingModel> dangerBuildings = new ArrayList<BuildingModel>();\n double clusterEnergy = 0;\n for (StandardEntity entity : getEntities()) {\n BuildingModel burningBuilding = world.getBuildingModel(entity.getID());\n if (burningBuilding.getEstimatedFieryness() == 1) {\n dangerBuildings.add(burningBuilding);\n clusterEnergy += burningBuilding.getEnergy();\n }\n if (burningBuilding.getEstimatedFieryness() == 2) {\n dangerBuildings.add(burningBuilding);\n clusterEnergy += burningBuilding.getEnergy();\n }\n if (burningBuilding.getEstimatedFieryness() == 3 && burningBuilding.getEstimatedTemperature() > 150) {\n dangerBuildings.add(burningBuilding);\n }\n }\n\n setDying(dangerBuildings.isEmpty());\n setControllable(clusterEnergy);\n buildings = dangerBuildings;\n //}\n convexObject.setConvexPolygon(convexHull.getConvexPolygon());\n setBorderEntities();\n setCentre();\n// sizeOfBuildings();\n// setTotalDistance();\n\n setOuterDangerBuildings(); //XXX test\n setOuterBuildings();\n }",
"@Test\n public void getUnitsWithTypeJoiningUser() {\n assertEquals(0, dao.getUnitsWithTypeJoiningUser().size());\n\n // Create a peasant and two soldiers joining the user.\n RoosterDaoUtil.creditUnit(dao, GameConfig.PEASANT_ID, 1, null);\n RoosterDaoUtil.creditUnit(dao, SOLDIER_UNIT_TYPE_ID, 2, null);\n\n // Create unrelated units at buildings.\n RoosterDaoUtil.creditUnit(dao, GameConfig.PEASANT_ID, 3, wheatFieldId);\n RoosterDaoUtil.creditUnit(dao, SOLDIER_UNIT_TYPE_ID, 4, wheatFieldId);\n\n // Test code.\n List<UnitWithType> unitsWithType = cache.getUnitsWithTypeJoiningUser();\n\n // Assert outcome\n assertNotNull(unitsWithType);\n assertEquals(3, unitsWithType.size());\n }",
"void buildDome(Tile t);",
"private void populateLevel() {\n\t\t// Make the ragdoll\n\t\tragdoll = new RagdollModel(DOLL_POS.x, DOLL_POS.y);\n\t\tragdoll.setDrawScale(scale.x,scale.y);\n\t\tragdoll.setPartTextures(bodyTextures);\n\t\tragdoll.getBubbleGenerator().setTexture(bubbleTexture);\n\t\taddObject(ragdoll);\n\n\t\t// Create ground pieces\n\t\tPolygonObstacle obj;\n\t\tobj = new PolygonObstacle(WALL1, 0, 0);\n\t\tobj.setBodyType(BodyDef.BodyType.StaticBody);\n\t\tobj.setDensity(BASIC_DENSITY);\n\t\tobj.setFriction(BASIC_FRICTION);\n\t\tobj.setRestitution(BASIC_RESTITUTION);\n\t\tobj.setDrawScale(scale);\n\t\tobj.setTexture(earthTile);\n\t\tobj.setName(\"wall1\");\n\t\taddObject(obj);\n\n\t\tobj = new PolygonObstacle(WALL2, 0, 0);\n\t\tobj.setBodyType(BodyDef.BodyType.StaticBody);\n\t\tobj.setDensity(BASIC_DENSITY);\n\t\tobj.setFriction(BASIC_FRICTION);\n\t\tobj.setRestitution(BASIC_RESTITUTION);\n\t\tobj.setDrawScale(scale);\n\t\tobj.setTexture(earthTile);\n\t\tobj.setName(\"wall2\");\n\t\taddObject(obj);\n\n\t\tselector = new ObstacleSelector(world);\n\t\tselector.setTexture(crosshairTexture);\n\t\tselector.setDrawScale(scale);\n\t\t\n\t\t/*\n\t\tBodyDef groundDef = new BodyDef();\n\t\tgroundDef.type = BodyDef.BodyType.StaticBody;\n\t\tEdgeShape groundShape = new EdgeShape();\n\t\tgroundShape.set(-500.0f, 0.0f, 500.0f, 0.0f);\n\t\tground = world.createBody(groundDef);\n\t\tground.createFixture(groundShape,0);\n\t\t*/\n\t}",
"private void setupRooms() {\n\t\tthis.listOfCoordinates = new ArrayList<Coordinates>();\r\n\t\tthis.rooms = new HashMap<String,Room>();\r\n\t\t\r\n\t\tArrayList<Coordinates> spaEntrances = new ArrayList<Coordinates>();\r\n\t\tspaEntrances.add(grid[5][6].getCoord());\r\n\r\n\t\tArrayList<Coordinates> theatreEntrances = new ArrayList<Coordinates>();\r\n\t\ttheatreEntrances.add(grid[13][2].getCoord());\r\n\t\ttheatreEntrances.add(grid[10][8].getCoord());\r\n\r\n\t\tArrayList<Coordinates> livingRoomEntrances = new ArrayList<Coordinates>();\r\n\t\tlivingRoomEntrances.add(grid[13][5].getCoord());\r\n\t\tlivingRoomEntrances.add(grid[16][9].getCoord());\r\n\r\n\t\tArrayList<Coordinates> observatoryEntrances = new ArrayList<Coordinates>();\r\n\t\tobservatoryEntrances.add(grid[21][8].getCoord());\r\n\r\n\t\tArrayList<Coordinates> patioEntrances = new ArrayList<Coordinates>();\r\n\t\tpatioEntrances.add(grid[5][10].getCoord());\r\n\t\tpatioEntrances.add(grid[8][12].getCoord());\r\n\t\tpatioEntrances.add(grid[8][16].getCoord());\r\n\t\tpatioEntrances.add(grid[5][18].getCoord());\r\n\r\n\t\t// ...\r\n\t\tArrayList<Coordinates> poolEntrances = new ArrayList<Coordinates>();\r\n\t\tpoolEntrances.add(grid[10][17].getCoord());\r\n\t\tpoolEntrances.add(grid[17][17].getCoord());\r\n\t\tpoolEntrances.add(grid[14][10].getCoord());\r\n\r\n\t\tArrayList<Coordinates> hallEntrances = new ArrayList<Coordinates>();\r\n\t\thallEntrances.add(grid[22][10].getCoord());\r\n\t\thallEntrances.add(grid[18][13].getCoord());\r\n\t\thallEntrances.add(grid[18][14].getCoord());\r\n\r\n\t\tArrayList<Coordinates> kitchenEntrances = new ArrayList<Coordinates>();\r\n\t\tkitchenEntrances.add(grid[6][21].getCoord());\r\n\r\n\t\tArrayList<Coordinates> diningRoomEntrances = new ArrayList<Coordinates>();\r\n\t\tdiningRoomEntrances.add(grid[12][18].getCoord());\r\n\t\tdiningRoomEntrances.add(grid[16][21].getCoord());\r\n\r\n\t\tArrayList<Coordinates> guestHouseEntrances = new ArrayList<Coordinates>();\r\n\t\tguestHouseEntrances.add(grid[20][20].getCoord());\r\n\r\n\t\t// setup entrances map\r\n\t\tthis.roomEntrances = new HashMap<Coordinates, Room>();\r\n\t\tfor (LocationCard lc : this.listOfLocationCard) {\r\n\t\t\tString name = lc.getName();\r\n\t\t\tRoom r;\r\n\t\t\tif (name.equals(\"Spa\")) {\r\n\t\t\t\tr = new Room(name, lc, spaEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : spaEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"Theatre\")) {\r\n\t\t\t\tr = new Room(name, lc,theatreEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : theatreEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"LivingRoom\")) {\r\n\t\t\t\tr = new Room(name, lc,livingRoomEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : livingRoomEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"Observatory\")) {\r\n\t\t\t\tr = new Room(name, lc,observatoryEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : observatoryEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"Patio\")) {\r\n\t\t\t\tr = new Room(name,lc, patioEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : patioEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"Pool\")) {\r\n\t\t\t\tr = new Room(name,lc,poolEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : poolEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"Hall\")) {\r\n\t\t\t\tr = new Room(name, lc,hallEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : hallEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"Kitchen\")) {\r\n\t\t\t\tr = new Room(name, lc,kitchenEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : kitchenEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"DiningRoom\")) {\r\n\t\t\t\tr = new Room(name, lc,diningRoomEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : diningRoomEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"GuestHouse\")) {\r\n\t\t\t\tr = new Room(name, lc,guestHouseEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : guestHouseEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void populateLevel() {\r\n\r\n\r\n\t\t// Setup Goal\r\n\t\tJsonValue goalVal = levelAssets.get(\"goal\");\r\n\t\tfloat gWidth = goalTile.getRegionWidth()/scale.x;\r\n\t\tfloat gHeight = goalTile.getRegionHeight()/scale.y;\r\n\t\tfloat gX = goalVal.get(\"pos\").getFloat(0) + gWidth / 2;\r\n\t\tfloat gY = goalVal.get(\"pos\").getFloat(1) + gHeight / 2;\r\n\t\tgoalDoor = new DoorModel(gX, gY, gWidth, gHeight);\r\n\t\tgoalDoor.setBodyType(BodyDef.BodyType.StaticBody);\r\n\t\tgoalDoor.setDensity(constants.get(\"goal\").getFloat(\"density\", 0));\r\n\t\tgoalDoor.setFriction(constants.get(\"goal\").getFloat(\"friction\", 0));\r\n\t\tgoalDoor.setRestitution(constants.get(\"goal\").getFloat(\"restitution\", 0));\r\n\t\tgoalDoor.setSensor(true);\r\n\t\tgoalDoor.setDrawScale(scale);\r\n\t\tgoalDoor.setTexture(goalTile);\r\n\t\tgoalDoor.setName(\"goal\");\r\n\t\taddObject(goalDoor);\r\n\t\taddObjectTo(goalDoor, LevelCreator.allTag);\r\n\r\n\t\t// Get default values\r\n\t\tJsonValue defaults = constants.get(\"defaults\");\r\n\t\tJsonValue objs = levelAssets.get(\"objects\");\r\n\r\n\t\t//group platform constants together for access in following for-loop\r\n\t\tTextureRegion[] xTexture = {lightTexture, darkTexture, allTexture,\r\n\t\t\tlightningLightTexture, lightningDarkTexture, lightningAllTexture,\r\n\t\t\trainLightTexture, rainDarkTexture, rainAllTexture,\r\n\t\t\t\tcrumbleLightTexture, crumbleDarkTexture, crumbleAllTexture};\r\n\r\n\t\tTextureRegion[] reducedXTexture = {lightTexture, darkTexture, allTexture,\r\n\t\t\t\tlightningLightTextureReduced, lightningDarkTextureReduced, lightningAllTextureReduced,\r\n\t\t\t\trainLightTextureReduced, rainDarkTextureReduced, rainAllTextureReduced,\r\n\t\t\t\tcrumbleLightTextureReduced, crumbleDarkTextureReduced, crumbleAllTextureReduced};\r\n\r\n\r\n\t\t// Setup platforms\r\n\t\tfor(int i=0; i < (objs != null ? objs.size : 0); i++)\r\n\t\t{\r\n\t\t\tJsonValue obj = objs.get(i);\r\n\r\n\t\t\t// Get platform attributes\r\n\t\t\tint platformType = obj.get(\"type\").asInt();\r\n\t\t\tint property = obj.get(\"property\") == null ? 0: obj.get(\"property\").asInt();\r\n\t\t\tJsonValue platformArgs = obj.get(\"positions\");\r\n\t\t\tJsonValue pathsArgs = obj.get(\"paths\");\r\n\r\n\t\t\tfor (int j = 0; j < platformArgs.size; j++) {\r\n\t\t\t\tfloat[] bounds = platformArgs.get(j).asFloatArray();\r\n\t\t\t\tfloat x = bounds[0], y = bounds[1], width = bounds[2], height = bounds[3];\r\n\t\t\t\tTextureRegion newXTexture;\r\n\t\t\t\tTextureRegion crumbleTexture = null;\r\n\t\t\t\tTexture originalTexture = null;\r\n\t\t\t\ttry {\r\n\t\t\t\t\t// temporary - need to refactor asset directory\r\n\t\t\t\t\tJsonValue assetName = obj.get(\"assetName\");\r\n\t\t\t\t\tint assetIndex = assetName.asInt();\r\n\t\t\t\t\tnewXTexture = new TextureRegion(tutorial_signs[assetIndex]);\r\n\t\t\t\t} catch(Exception e) {\r\n\t\t\t\t\tint platIdx = platformType-1+(property - 1)*3;\r\n\t\t\t\t\tint crumbleIdx = platIdx + 3;\r\n\t\t\t\t\tnewXTexture = new TextureRegion(xTexture[platIdx]);\r\n\t\t\t\t\toriginalTexture = newXTexture.getTexture();\r\n\t\t\t\t\t// For crumble animation\r\n\t\t\t\t\tif (platIdx > 5) {\r\n\t\t\t\t\t\tcrumbleTexture = new TextureRegion(xTexture[crumbleIdx]);\r\n//\t\t\t\t\t\tcrumbleTexture.setRegion(0, 0, width, height);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// If the platform size is the same as the spritesheet size\r\n\t\t\t\t\tif (originalTexture.getWidth() > 32 && width%(originalTexture.getWidth()/32) == 0) {\r\n\t\t\t\t\t\tnewXTexture = new TextureRegion(reducedXTexture[platIdx]);\r\n\t\t\t\t\t\toriginalTexture = newXTexture.getTexture();\r\n\t\t\t\t\t\tif (platIdx > 5) {\r\n\t\t\t\t\t\t\tcrumbleTexture = new TextureRegion(reducedXTexture[crumbleIdx]);\r\n//\t\t\t\t\t\t\tcrumbleTexture.setRegion(0, 0, width, height);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n//\t\t\t\t\tnewXTexture.setRegion(0, 0, width, height);\r\n\t\t\t\t}\r\n\t\t\t\tPlatformModel platformModel = new PlatformModel(bounds, platformType, property, newXTexture, scale,\r\n\t\t\t\t\t\tdefaults.getFloat( \"density\", 0.0f ), defaults.getFloat( \"friction\", 0.0f ) ,\r\n\t\t\t\t\t\tdefaults.getFloat( \"restitution\", 0.0f ), originalTexture, crumbleTexture);\r\n\t\t\t\tplatformModel.setTag(platformType);\r\n\t\t\t\tplatformModel.setProperty(property);\r\n\t\t\t\taddObject(platformModel);\r\n\t\t\t\taddObjectTo(platformModel, platformType);\r\n\t\t\t\t//TODO: Moving platforms\r\n\r\n\r\n\t\t\t\tif (pathsArgs != null) {\r\n\t\t\t\t\tfloat[] paths = pathsArgs.get(j).asFloatArray();\r\n\r\n\t\t\t\t\t//** Moving platform if > 1 path or different path from starting position\r\n\t\t\t\t\tif (hasValidPath(x, y, paths)) {\r\n\t\t\t\t\t\tplatformModel.setBodyType(BodyDef.BodyType.KinematicBody);\r\n\t\t\t\t\t\tmovingObjects.add(platformModel);\r\n\r\n\t\t\t\t\t\tPooledList<Vector2> pathList = new PooledList<>();\r\n\t\t\t\t\t\tfor (int k = 0; k < paths.length; k+=2) {\r\n\t\t\t\t\t\t\tpathList.add(new Vector2(paths[k], paths[k+1]));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tfloat velocity = 3;\r\n\r\n\t\t\t\t\t\tplatformModel.setGravityScale(0);\r\n\t\t\t\t\t\tplatformModel.setPaths(pathList);\r\n\t\t\t\t\t\tplatformModel.setVelocity(velocity);\r\n\r\n\t\t\t\t\t\tmovingObjects.add(platformModel);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// This world is heavier\r\n\t\tworld.setGravity( new Vector2(0,defaults.getFloat(\"gravity\",0)) );\r\n\r\n\t\t// Set level background index\r\n\t\tint backgroundTextureIndex = levelAssets.get(\"background\").asInt();\r\n\t\tbackgroundLightTexture = backgrounds[backgroundTextureIndex - 1];\r\n\t\tbackgroundDarkTexture = backgrounds[backgroundTextureIndex];\r\n\t\tbackgroundTexture = backgroundLightTexture;\r\n\r\n\t\t// Initialize background animations\r\n\t\tactualBackgroundTexture = backgroundTexture.getTexture();\r\n\t\tbackgroundEntirePixelWidth = actualBackgroundTexture.getWidth();\r\n\t\tbackgroundNumAnimFrames = (int)(backgroundEntirePixelWidth/backgroundFramePixelWidth);\r\n\t\tbackgroundAnimator = new FilmStrip(backgroundTexture,1, backgroundNumAnimFrames, backgroundNumAnimFrames);\r\n\t\tbackgroundAnimator.setFrame(0);\r\n\t\tbackgroundAnimeframe = 0;\r\n\t\tbackgroundOrigin = new Vector2(backgroundAnimator.getRegionWidth()/2.0f, backgroundAnimator.getRegionHeight()/2.0f);\r\n\r\n\t\t// Set level bounds\r\n\t\twidthUpperBound = levelAssets.get(\"dimensions\").getInt(0);\r\n\t\theightUpperBound = levelAssets.get(\"dimensions\").getInt(1);\r\n\r\n\t\t// Setup Somni\r\n\r\n\t\tJsonValue somniVal = levelAssets.get(\"somni\");\r\n\t\tfloat sWidth = somniTexture.getRegionWidth()/scale.x;\r\n\t\tfloat sHeight = somniTexture.getRegionHeight()/scale.y;\r\n\t\tfloat sX = somniVal.get(\"pos\").getFloat(0) + sWidth / 2;\r\n\t\tfloat sY = somniVal.get(\"pos\").getFloat(1) + sHeight / 2;\r\n\t\tsomni = new CharacterModel(constants.get(\"somni\"), sX, sY, sWidth, sHeight, platformController.somnif, CharacterModel.LIGHT);\r\n\t\tsomni.setDrawScale(scale);\r\n\t\tsomni.setTexture(somniIdleTexture);\r\n\t\tsomni.setFilterData(platformController.somnif);\r\n\t\tsomni.setActive(true);\r\n\t\taddObject(somni);\r\n\t\taddObjectTo(somni, LevelCreator.allTag);\r\n\r\n\r\n\t\t// Setup Phobia\r\n\r\n\t\tJsonValue phobiaVal = levelAssets.get(\"phobia\");\r\n\t\tfloat pWidth = phobiaTexture.getRegionWidth()/scale.x;\r\n\t\tfloat pHeight = phobiaTexture.getRegionHeight()/scale.y;\r\n\t\tfloat pX = phobiaVal.get(\"pos\").getFloat(0) + pWidth / 2;\r\n\t\tfloat pY = phobiaVal.get(\"pos\").getFloat(1) + pHeight / 2;\r\n\t\tphobia = new CharacterModel(constants.get(\"phobia\"), pX, pY, pWidth, pHeight, platformController.phobiaf, CharacterModel.DARK);\r\n\t\tphobia.setDrawScale(scale);\r\n\t\tphobia.setTexture(phobiaIdleTexture);\r\n\t\tphobia.setFilterData(platformController.phobiaf);\r\n\t\taddObject(phobia);\r\n\t\taddObjectTo(phobia, LevelCreator.allTag);\r\n\t\tphobia.setActive(true);\r\n\r\n\t\t// Setup Combined\r\n\r\n\t\tfloat cWidth = combinedTexture.getRegionWidth()/scale.x;\r\n\t\tfloat cHeight = combinedTexture.getRegionHeight()/scale.y;\r\n\r\n\t\tcombined = new CharacterModel(constants.get(\"combined\"), 0, 0, cWidth, cHeight, platformController.combinedf, CharacterModel.DARK);\r\n\t\tcombined.setDrawScale(scale);\r\n\t\tcombined.setTexture(somniPhobiaTexture);\r\n\t\t//combined.setTag();\r\n\t\tcombined.setFilterData(platformController.combinedf);\r\n\t\taddObject(combined);\r\n\t\taddObjectTo(combined, LevelCreator.allTag);\r\n\t\tcombined.setActive(true);\r\n\r\n\t\t//Remove combined\r\n\t\tobjects.remove(combined);\r\n\t\tsharedObjects.remove(combined);\r\n\t\tcombined.setActive(false);\r\n\r\n\t\taction = 0;\r\n\r\n\t\tPreferences prefs = GDXRoot.getPreferences();\r\n\t\tvolume = prefs.contains(\"volume\") ? prefs.getFloat(\"volume\") : defaults.getFloat(\"volume\",\r\n\t\t\t\t1.0f);\r\n//\t\tSystem.out.println(volume);\r\n\r\n\t\tplatformController.applyFilters(objects);\r\n\t}",
"public void init() {\r\n int width = img.getWidth();\r\n int height = img.getHeight();\r\n floor = new Floor(game, width, height);\r\n units = new ArrayList<Unit>();\r\n objects = new ArrayList<GameObject>();\r\n for (int y=0; y<height; y++) {\r\n for (int x=0; x<width; x++) {\r\n int rgb = img.getRGB(x,y);\r\n Color c = new Color(rgb);\r\n Tile t;\r\n if (c.equals(GRASS_COLOR)) {\r\n t = new Tile(game, new Posn(x,y), \"tile_48x24_grass.png\");\r\n } else if (c.equals(STONE_COLOR)) {\r\n t = new Tile(game, new Posn(x,y), \"tile_48x24_stone.png\");\r\n } else {\r\n /* Check all the surrounding tiles. Take a consensus for the underlying tile color. */\r\n int numGrass=0, numStone=0;\r\n for (int j=y-1; j<=y+1; j++) {\r\n for (int i=x-1; i<=x+1; i++) {\r\n if (i>=0 && i<img.getWidth() && j>=0 && j<img.getHeight() && !(i==x && j==y)) {\r\n int rgb2 = img.getRGB(i,j);\r\n Color c2 = new Color(rgb2);\r\n if (c2.equals(GRASS_COLOR)) numGrass++;\r\n else if (c2.equals(STONE_COLOR)) numStone++;\r\n }\r\n }\r\n }\r\n if (numGrass >= numStone) {\r\n t = new Tile(game, new Posn(x,y), \"tile_48x24_grass.png\");\r\n } else {\r\n t = new Tile(game, new Posn(x,y), \"tile_48x24_stone.png\");\r\n }\r\n }\r\n floor.setTile(x, y, t);\r\n \r\n if (c.equals(TREE_COLOR)) {\r\n //objects.add(new GameObject(x,y))\r\n } else if (c.equals(WALL_COLOR)) {\r\n objects.add(new Wall(game, new Posn(x,y), \"wall_48x78_1.png\"));\r\n } else if (c.equals(WIZARD_COLOR)) {\r\n addWizard(x,y);\r\n } else if (c.equals(ZOMBIE_COLOR)) {\r\n addZombie(x,y);\r\n } else if (c.equals(BANDIT_COLOR)) {\r\n addBandit(x,y);\r\n } else if (c.equals(PLAYER_COLOR)) {\r\n game.getPlayerUnit().setPosn(new Posn(x,y));\r\n units.add(game.getPlayerUnit());\r\n }\r\n }\r\n }\r\n }",
"protected void levelUp() {\n\t\tlevel++;\n\t\t// set up floors for next level\n\t\tint[] nextFloors = floors[level];\n\t\tint[] nextFurnishing = furnishings[level];\n\t\tfor(int i = 0; i < nextFloors.length; i++) {\n\t\t\tFloor newFloor = game.getFloorByKey(nextFloors[i]);\n\t\t\ttiles[i].setFloor(newFloor);\n\t\t\tif(nextFurnishing[i] != 0) {\n\t\t\t\tFurnishingDirectory newFurn = game.getFurnishingByKey(nextFurnishing[i]);\n\t\t\t\tnew Furnishing(newFurn, tiles[i]);\n\t\t\t}\n\t\t}\n\t}",
"void fetchForRentHousesData();",
"public interface IHouseService {\n\n Suite getSuiteByRoom(long roomId);\n\n Suite getSuiteByHouse(long houseId);\n\n List<HouseAndUser> getHouseAndUsers(int maxSize);\n \n List<HouseAndUser> getHouseAndUsers(String searchKey);\n\n House getHouse(long houseId);\n\n List<House> getHouses();\n\n List<Room> getRooms(long houseId);\n\n List<Room> getImageUnbackupedRooms();\n\n HouseAndRoom getHouseAndRoom(long houseId);\n\n /**\n * Get only when the specified user is the owner of the specified house.\n */\n HouseAndRoom getHouseAndRoom(String username, long houseId);\n\n Long addHouseAndRooms(User user, House house, List<Room> rooms);\n\n void addRooms(String username, long houseId, List<Room> rooms);\n\n void updateHouse(House house);\n\n void updateHouse(String username, House house);\n\n void updateRoom(Room room);\n \n void updateRoomReportUsers(long houseId, Long roomId, User user, String reportType, String extralInfo);\n\n void deleteRoom(String username, long roomId);\n\n /**\n * @see IHouseDao#closeAll(long)\n */\n void closeAll(String username, long houseId);\n\n /**\n * Add when no room ID.\n */\n Room updateOrAddRoom(String username, Room room);\n \n void updateHouseReportUsers(long houseId, User user, String reportType, String extraInfo);\n\n /**\n * update house status without validation.\n */\n void updateHouseStatus(long houseId, int status);\n\n /**\n * update house status with username validation.\n */\n void updateHouseStatus(String username, long houseId, int status);\n\n /**\n * update room status without validation.\n */\n void updateRoomStatus(long roomId, int status);\n \n /**\n * update room status with username validation.\n */\n void updateRoomStatus(String username, long roomId, int status);\n\n void updateCover(long houseId, String imageId);\n\n /**\n * Raised by system not user.\n */\n void update(Room room);\n\n SearchInfo getFavors(String username);\n\n /**\n * Add when not exist.\n */\n void updateFavor(HouseFavor houseFavor);\n\n /**\n * Temp.\n */\n Long getHouseId(String username);\n \n /**\n * get houses by telephone, wechat, qq.\n * suppose none or only one house should returned.\n */\n List<House> getHousesByContact(String telephone, String wechat, String qq);\n\n /**\n * @param user\n * non-null\n * @return house contact of the house landlord\n * @throws InsufficientBalanceException\n * when user hasn't applied for this house, and has no\n * sufficient balance at present\n */\n HouseContact applyForHouse(User user, long houseId)\n throws InsufficientBalanceException;\n\n int getRejectedHouseCount();\n\n void closeDeprecated();\n \n void remindDeprecated(int week);\n \n public static enum ReportType{\n UNKNOWN, RENTED, IS_BROKER, OTHER_REASON; \n }\n}",
"void fetchHolidayRentalHousesData();",
"@Override\n public void run(String... args) throws Exception {\n Outfit outfit = new Outfit();\n outfit.setCurrentoutfit(true);\n outfitRepository.save(outfit);\n\n\n// Category category = new Category();\n//\n// category.setTops(\"Tops\");\n// category.setBottoms(\"Bottoms\");\n// category.setShoes(\"sneakers\");\n// category.setAccessories(\"\");\n// category.setJackets(\"\");\n// categoryRepository.save(category);\n Category tops = new Category();\n tops.setCategoryType(\"Tops\");\n categoryRepository.save(tops);\n\n Category bottoms = new Category();\n bottoms.setCategoryType(\"Bottoms\");\n categoryRepository.save(bottoms);\n\n Category accessories = new Category();\n accessories.setCategoryType(\"Accessories\");\n categoryRepository.save(accessories);\n\n Category shoes = new Category();\n shoes.setCategoryType(\"Shoes\");\n categoryRepository.save(shoes);\n\n Category jackets = new Category();\n jackets.setCategoryType(\"Jacket\");\n categoryRepository.save(jackets);\n/**\n * Here is where the items start for Outfit 1\n * */\n Item topOne = new Item();\n topOne.setCategory(tops);\n topOne.setColor(\"Black\");\n topOne.setFabricMaterial(\"cotton\");\n topOne.setSize(7);\n topOne.setItemName(\"Shirt\");\n topOne.setImages(\"image/women.png\");\n itemRepository.save(topOne);\n\n Item bottomOne = new Item();\n bottomOne.setCategory(bottoms);\n bottomOne.setColor(\"Light Blue\");\n bottomOne.setFabricMaterial(\"Denim\");\n bottomOne.setSize(31);\n bottomOne.setItemName(\"Bleached Light Blue Jeans\");\n itemRepository.save(bottomOne);\n\n Item shoeOne = new Item();\n shoeOne.setCategory(shoes);\n shoeOne.setColor(\"Black\");\n shoeOne.setFabricMaterial(\"Mesh\");\n shoeOne.setSize(7);\n shoeOne.setItemName(\"Shoe\");\n itemRepository.save(shoeOne);\n\n Item accessoryOne = new Item();\n accessoryOne.setCategory(accessories);\n accessoryOne.setColor(\"Gold\");\n accessoryOne.setFabricMaterial(\"Gold\");\n accessoryOne.setSize(1);\n accessoryOne.setItemName(\"Gold Watch\");\n itemRepository.save(accessoryOne);\n\n\n Item jacketOne = new Item();\n jacketOne.setCategory(jackets);\n jacketOne.setColor(\"Black\");\n jacketOne.setFabricMaterial(\"Leather\");\n jacketOne.setSize(30);\n jacketOne.setItemName(jacketOne.getColor() + \" Jacket\");\n itemRepository.save(jacketOne);\n\n\n /**\n * Here is where the items start for Outfit 2\n * */\n Item topTwo = new Item();\n topTwo.setCategory(tops);\n topTwo.setColor(\"White\");\n topTwo.setFabricMaterial(\"Blend\");\n topTwo.setSize(7);\n topTwo.setItemName(\"Crew Neck Tee Shirt\");\n itemRepository.save(topTwo);\n\n Item bottomTwo = new Item();\n bottomTwo.setCategory(bottoms);\n bottomTwo.setColor(\"Grey\");\n bottomTwo.setFabricMaterial(\"Denim\");\n bottomTwo.setSize(34);\n bottomTwo.setItemName(\"Skinny Jeans\");\n itemRepository.save(bottomTwo);\n\n Item shoeTwo = new Item();\n shoeTwo.setCategory(shoes);\n shoeTwo.setColor(\"White, Black, Red\");\n shoeTwo.setFabricMaterial(\"Mesh\");\n shoeTwo.setSize(7);\n shoeTwo.setItemName(\"Tennis Shoes\");\n itemRepository.save(shoeTwo);\n\n Item accessoryTwo = new Item();\n accessoryTwo.setCategory(accessories);\n accessoryTwo.setColor(\"Green\");\n accessoryTwo.setFabricMaterial(\"\");\n accessoryTwo.setSize(7);\n accessoryTwo.setItemName(\"Shirt\");\n itemRepository.save(accessoryTwo);\n\n Item jacketTwo = new Item();\n jacketTwo.setCategory(jackets);\n jacketTwo.setColor(\"Tan\");\n jacketTwo.setFabricMaterial(\"Leather\");\n jacketTwo.setSize(30);\n jacketTwo.setItemName(jacketTwo.getColor() + \" Jacket\");\n itemRepository.save(jacketTwo);\n\n\n /**\n * Here is where the items start for Outfit 3\n * */\n Item topThree = new Item();\n topThree.setCategory(tops);\n topThree.setColor(\"red\");\n topThree.setFabricMaterial(\"cotton\");\n topThree.setSize(7);\n topThree.setItemName(\"Shirt\");\n itemRepository.save(topThree);\n\n Item bottomThree = new Item();\n bottomThree.setCategory(bottoms);\n bottomThree.setColor(\"green\");\n bottomThree.setFabricMaterial(\"cotton\");\n bottomThree.setSize(31);\n bottomThree.setItemName(\"Jeans\");\n itemRepository.save(bottomThree);\n\n Item shoeThree = new Item();\n shoeThree.setCategory(shoes);\n shoeThree.setColor(\"green\");\n shoeThree.setFabricMaterial(\"\");\n shoeThree.setSize(7);\n shoeThree.setItemName(\"Shoe\");\n itemRepository.save(shoeThree);\n\n Item accessoryThree = new Item();\n accessoryThree.setCategory(accessories);\n accessoryThree.setColor(\"green\");\n accessoryThree.setFabricMaterial(\"\");\n accessoryThree.setSize(7);\n accessoryThree.setItemName(\"Shirt\");\n itemRepository.save(accessoryThree);\n\n\n\n\n\n /**\n * Here is where the items start for Outfit 4\n * */\n Item topFour = new Item();\n topFour.setCategory(tops);\n topFour.setColor(\"red\");\n topFour.setFabricMaterial(\"cotton\");\n topFour.setSize(7);\n topFour.setItemName(\"Shirt\");\n itemRepository.save(topFour);\n\n Item bottomFour = new Item();\n bottomFour.setCategory(bottoms);\n bottomFour.setColor(\"green\");\n bottomFour.setFabricMaterial(\"cotton\");\n bottomFour.setSize(31);\n bottomFour.setItemName(\"Jeans\");\n itemRepository.save(bottomFour);\n\n Item shoeFour = new Item();\n shoeFour.setCategory(shoes);\n shoeFour.setColor(\"green\");\n shoeFour.setFabricMaterial(\"\");\n shoeFour.setSize(7);\n shoeFour.setItemName(\"Shoe\");\n itemRepository.save(shoeFour);\n\n Item accessoryFour = new Item();\n accessoryFour.setCategory(accessories);\n accessoryFour.setColor(\"green\");\n accessoryFour.setFabricMaterial(\"\");\n accessoryFour.setSize(7);\n accessoryFour.setItemName(\"Shirt\");\n itemRepository.save(accessoryFour);\n\n\n\n\n\n /**\n * Here is where the items start for Outfit 5\n * */\n Item topFive = new Item();\n topFive.setCategory(tops);\n topFive.setColor(\"red\");\n topFive.setFabricMaterial(\"cotton\");\n topFive.setSize(7);\n topFive.setItemName(\"Shirt\");\n itemRepository.save(topFive);\n\n Item bottomFive = new Item();\n bottomFive.setCategory(bottoms);\n bottomFive.setColor(\"green\");\n bottomFive.setFabricMaterial(\"cotton\");\n bottomFive.setSize(31);\n bottomFive.setItemName(\"Jeans\");\n itemRepository.save(bottomFive);\n\n Item shoeFive = new Item();\n shoeFive.setCategory(shoes);\n shoeFive.setColor(\"green\");\n shoeFive.setFabricMaterial(\"\");\n shoeFive.setSize(7);\n shoeFive.setItemName(\"Shoe\");\n itemRepository.save(shoeFive);\n\n Item accessoriesFive = new Item();\n accessoriesFive.setCategory(accessories);\n accessoriesFive.setColor(\"green\");\n accessoriesFive.setFabricMaterial(\"\");\n accessoriesFive.setSize(7);\n accessoriesFive.setItemName(\"Shirt\");\n itemRepository.save(accessoriesFive);\n }",
"@Override\n public void update(App_Risk_Game.src.interfaces.Observable observable) {\n List<String> territories = new ArrayList<>();\n Iterator iterator = ((Board)observable).getTiles().keySet().iterator();\n while (iterator.hasNext()){\n String name = (String) iterator.next();\n territories.add(name);\n }\n CardsCollection cardsCollection = new CardsCollection(territories, 5);\n List<Player> players = PlayerCollectionTest.players;\n CardsCollection.distributeCards(players);\n for (Player p:players\n ) {\n System.out.println(p.getName());\n\n System.out.println(p.getTerritories());\n }\n Turns.turns.setCurrentPlayerID(players.get(0).getId());\n Turns.turns.setCurrent_player(players.get(0).getName());\n }",
"private OwnedPuckemon buildOwned(int id, int level,String nickName){\n List<Object> data = excelReader.getExcelData(id);\n return new OwnedPuckemon(id,level,(String)data.get(0), dissectListTypes((String)data.get(1)),(int) data.get(2),(int)data.get(3)\n ,(int)data.get(4),(int)data.get(5),(int)data.get(6),(int)data.get(7), dissectList((String)data.get(8)),nickName);\n }",
"public void initTiles() {\n\t\ttileList.add(new Go());\n\n\t\t// Brown properties\n\t\tProperty mediterranean = new Property(\"Mediterranean\");\n\t\tProperty balticAve = new Property(\"Baltic Avenue\");\n\n\t\t// Light blue properties\n\t\tProperty orientalAve = new Property(\"Oriental Avenue\");\n\t\tProperty vermontAve = new Property(\"Vermont Avenue\");\n\t\tProperty connecticutAve = new Property(\"Connecticut Avenue\");\n\n\t\t// Magenta properties\n\t\tProperty stCharles = new Property(\"St. Charles Place\");\n\t\tProperty statesAve = new Property(\"States Avenue\");\n\t\tProperty virginiaAve = new Property(\"Virginia Avenue\");\n\n\t\t// Orange properties\n\t\tProperty stJames = new Property(\"St. James Place\");\n\t\tProperty tennesseeAve = new Property(\"Tennessee Avenue\");\n\t\tProperty newYorkAve = new Property(\"New York Avenue\");\n\n\t\t// Red properties\n\t\tProperty kentuckyAve = new Property(\"Kentucky Avenue\");\n\t\tProperty indianaAve = new Property(\"Indiana Avenue\");\n\t\tProperty illinoisAve = new Property(\"Illinois Avenue\");\n\n\t\t// Yellow Properties\n\t\tProperty atlanticAve = new Property(\"Atlantic Avenue\");\n\t\tProperty ventnorAve = new Property(\"Ventnor Avenue\");\n\t\tProperty marvinGard = new Property(\"Marvin Gardins\");\n\n\t\t// Green Properties\n\t\tProperty pacificAve = new Property(\"Pacific Avenue\");\n\t\tProperty northCar = new Property(\"North Carolina Avenue\");\n\t\tProperty pennsylvannia = new Property(\"Pennsylvania Avenue\");\n\n\t\t// Dark blue properties\n\t\tProperty parkPlace = new Property(\"Park Place\");\n\t\tProperty boardWalk = new Property(\"Boardwalk\");\n\n\t\t// Tax tiles\n\t\tTaxTile incomeTax = new TaxTile(\"Income Tax\", 200);\n\t\tTaxTile luxuryTax = new TaxTile(\"Luxury Tax\", 100);\n\n\t\t// Utilities\n\t\tUtility electric = new Utility(\"Electric Company\");\n\t\tUtility water = new Utility(\"Water Works\");\n\n\t\t// Railroads\n\t\tRailroad reading = new Railroad(\"Reading\");\n\t\tRailroad pennRail = new Railroad(\"Pennsylvania\");\n\t\tRailroad bno = new Railroad(\"B & O\");\n\t\tRailroad shortLine = new Railroad(\"Short Line\");\n\n\t\t// Chance and community chest\n\t\tChance chance = new Chance();\n\t\tCommunity chest = new Community();\n\n\t\t// Adds the properties by color in accordance with their position on the board\n\t\t// adds color + placement of piece to a list of their respective colors\n\t\tbrown.add(1);\n\t\tbrown.add(3);\n\t\trailroads.add(5);\n\t\tlightBlue.add(6);\n\t\tlightBlue.add(8);\n\t\tlightBlue.add(9);\n\t\tmagenta.add(11);\n\t\tutilities.add(12);\n\t\tmagenta.add(13);\n\t\tmagenta.add(14);\n\t\trailroads.add(15);\n\t\torange.add(16);\n\t\torange.add(18);\n\t\torange.add(19);\n\t\tred.add(21);\n\t\tred.add(23);\n\t\tred.add(24);\n\t\trailroads.add(25);\n\t\tyellow.add(26);\n\t\tyellow.add(27);\n\t\tutilities.add(28);\n\t\tyellow.add(29);\n\t\tgreen.add(31);\n\t\tgreen.add(32);\n\t\tgreen.add(34);\n\t\trailroads.add(35);\n\t\tdarkBlue.add(37);\n\t\tdarkBlue.add(39);\n\n\t\t// tileList is the list of tiles of the board where each tile is representative of a place on the board\n\t\t// adds each tile is chronological order beginning of the board \"go\"\n\t\t//this list includes: properties, taxes, railroads, chance, community chest\n\t\t\n\t\ttileList.add(new Go());\n\n\t\ttileList.add(mediterranean);\n\t\ttileList.add(chest);\n\t\ttileList.add(balticAve);\n\t\ttileList.add(incomeTax);\n\t\ttileList.add(reading);\n\t\ttileList.add(orientalAve);\n\t\ttileList.add(chance);\t\n\t\ttileList.add(vermontAve);\n\t\ttileList.add(connecticutAve);\n\n\t\ttileList.add(new Jail());\n\t\t\t\n\t\ttileList.add(stCharles);\n\t\ttileList.add(electric);\t\t\t\n\t\ttileList.add(statesAve);\t\t\t\n\t\ttileList.add(virginiaAve);\n\t\ttileList.add(pennRail);\n\t\ttileList.add(stJames);\t\n\t\ttileList.add(chest);\n\t\ttileList.add(tennesseeAve);\t\t\t\n\t\ttileList.add(newYorkAve);\n\n\t\ttileList.add(new FreeParking());\n\t\t\t\n\t\ttileList.add(kentuckyAve);\t\t\n\t\ttileList.add(chance);\t\n\t\ttileList.add(indianaAve);\t\t\t\n\t\ttileList.add(illinoisAve);\n\t\ttileList.add(bno);\n\t\ttileList.add(atlanticAve);\t\t\t\n\t\ttileList.add(ventnorAve);\n\t\ttileList.add(water);\n\t\ttileList.add(marvinGard);\n\n\t\ttileList.add(new GoToJail());\n\t\t\t\t\t\n\t\ttileList.add(pacificAve);\t\t\t\n\t\ttileList.add(northCar);\n\t\ttileList.add(chest);\t\t\t\n\t\ttileList.add(pennsylvannia);\n\t\ttileList.add(shortLine);\n\t\ttileList.add(chance);\n\t\ttileList.add(parkPlace);\n\t\ttileList.add(luxuryTax);\n\t\ttileList.add(boardWalk);\n\t}",
"public static Tile[][] setUpMap() {\n\n Tile[][] tiles = new Tile[5][9];\n String[][] defaultMapLayout = GameMap.getMapLayout();\n\n for (int i = 0; i < 5; i++) {\n\n for (int j = 0; j < 9; j++) {\n\n String tileType = defaultMapLayout[i][j];\n\n if (tileType.equals(\"P\")) {\n Tile newTileName = new Plain();\n tiles[i][j] = newTileName;\n\n } else if (tileType.equals(\"R\")) {\n Tile newTileName = new River();\n tiles[i][j] = newTileName;\n\n } else if (tileType.equals(\"M1\")) {\n Tile newTileName = new Mountain1();\n tiles[i][j] = newTileName;\n\n } else if (tileType.equals(\"M2\")) {\n Tile newTileName = new Mountain2();\n tiles[i][j] = newTileName;\n\n } else if (tileType.equals(\"M3\")) {\n Tile newTileName = new Mountain3();\n tiles[i][j] = newTileName;\n\n } else if (tileType.equals(\"SM\")) {\n Tile newTileName = new SwampMonster();\n tiles[i][j] = newTileName;\n\n } else if (tileType.equals(\"O\")) {\n Tile newTileName = new Ocean();\n tiles[i][j] = newTileName;\n\n } else if (tileType.equals(\"G\")) {\n Tile newTileName = new Grass();\n tiles[i][j] = newTileName;\n\n } else if (tileType.equals(\"V\")) {\n Tile newTileName = new Volcano();\n tiles[i][j] = newTileName;\n\n }else {\n Tile newTileName = new Plain();\n tiles[i][j] = newTileName;\n newTileName.setOwner(null);\n }\n\n }\n }\n return tiles;\n }",
"public StructureVillagePieces.Village buildComponent(StructureVillagePieces.PieceWeight parPieceWeight, StructureVillagePieces.Start parStart, List<StructureComponent> parPiecesList, Random parRand, int parMinX, int parMinY, int parMinZ, EnumFacing parFacing, int parType) {\n/* 50 */ System.out.println(\"TekHouse6 buildComponent() at \" + parMinX + \", \" + parMinY + \", \" + parMinZ);\n/* */ \n/* 52 */ StructureBoundingBox structureboundingbox = StructureBoundingBox.getComponentToAddBoundingBox(parMinX, parMinY, parMinZ, 0, 0, 0, 9, 7, 12, parFacing);\n/* 53 */ return (canVillageGoDeeper(structureboundingbox) && StructureComponent.findIntersecting(parPiecesList, structureboundingbox) == null) ? (StructureVillagePieces.Village)new TekHouse6(parStart, parType, parRand, structureboundingbox, parFacing) : null;\n/* */ }",
"private void initTestBuildingWithRoomsAndWorkplaces() {\n\t\tinfoBuilding = dataHelper.createPersistedBuilding(\"50.20\", \"Informatik\", new ArrayList<Property>());\n\t\troom1 = dataHelper.createPersistedRoom(\"Seminarraum\", \"-101\", -1, Arrays.asList(new Property(\"WLAN\")));\n\n\t\tworkplace1 = dataHelper.createPersistedWorkplace(\"WP1\",\n\t\t\t\tArrays.asList(new Property(\"LAN\"), new Property(\"Lampe\")));\n\t\tworkplace2 = dataHelper.createPersistedWorkplace(\"WP2\", Arrays.asList(new Property(\"LAN\")));\n\n\t\troom1.addContainedFacility(workplace1);\n\t\troom1.addContainedFacility(workplace2);\n\n\t\tinfoBuilding.addContainedFacility(room1);\n\t}",
"public void createRooms()//Method was given\n { \n \n // create the rooms, format is name = new Room(\"description of the situation\"); ex. desc = 'in a small house' would print 'you are in a small house.'\n outside = new Room(\"outside\", \"outside of a small building with a door straight ahead. There is a welcome mat, a mailbox, and a man standing in front of the door.\", false);\n kitchen = new Room(\"kitchen\", \"in what appears to be a kitchen. There is a sink and some counters with an easter egg on top of the counter. There is a locked door straight ahead, and a man standing next to a potted plant. There is also a delicious looking chocolate bar sitting on the counter... how tempting\", true);\n poolRoom = new Room(\"pool room\", \"in a new room that appears much larger than the first room.You see a table with a flashlight, towel, and scissors on it. There is also a large swimming pool with what looks like a snorkel deep in the bottom of the pool. Straight ahead of you stands the same man as before.\", true);\n library = new Room(\"library\", \"facing east in a new, much smaller room than before. There are endless rows of bookshelves filling the room. All of the books have a black cover excpet for two: one red book and one blue book. The man stands in front of you, next to the first row of bookshelves\", true);\n exitRoom = new Room(\"exit\", \"outside of the building again. You have successfully escaped, congratulations! Celebrate with a non-poisonous chocolate bar\",true);\n \n // initialise room exits, goes (north, east, south, west)\n outside.setExits(kitchen, null, null, null);\n kitchen.setExits(poolRoom, null, outside, null);\n poolRoom.setExits(null, library, kitchen, null);\n library.setExits(null, null, exitRoom, poolRoom);\n exitRoom.setExits(null, null, null, null); \n \n currentRoom = outside; // start game outside\n }",
"private void createNHospitals(int n) {\n ProbabilityDistribution<CommunalPlace.Size> p =\n PopulationParameters.get().buildingDistribution.hospitalSizeDistribution.sizeDistribution();\n\n BiFunction<CommunalPlace.Size, Integer, Hospital> cons = (s, i) -> {\n if (i % PopulationParameters.get().buildingDistribution.covidHospitalRatio == 0) {\n return new CovidHospital(s);\n } else {\n return new Hospital(s);\n }\n };\n\n createNGeneric(cons, n, p, allHospitals);\n\n // Hospitals are also cached based on their type to allow easy access for appts/covid cases\n // Limited use of instanceof to ensure a safe cast\n List<CovidHospital> chospitals = new ArrayList<>();\n List<Hospital> nonCHospitals = new ArrayList<>();\n for (Hospital h : getAllHospitals()) {\n if (h instanceof CovidHospital) {\n chospitals.add((CovidHospital) h);\n } else {\n nonCHospitals.add(h);\n }\n }\n\n createPlaceDistribution(covidHospitals, chospitals);\n createPlaceDistribution(nonCovidHospitals, nonCHospitals);\n }",
"private Set<BoardObject> createWeapons(){\r\n\t\tSet<BoardObject> weaps = new HashSet<BoardObject>();\r\n\r\n\t\tweaps.add(new BoardObject(getImage(\"xboardObjects/revolver1.png\"), new Coordinate(3,12), \"Revolver\"));\r\n\t\tweaps.add(new BoardObject(getImage(\"xboardObjects/candlestick3.png\"), new Coordinate(2,3), \"Candlestick\"));\r\n\t\tweaps.add(new BoardObject(getImage(\"xboardObjects/knife1.png\"), new Coordinate(12,3), \"Knife\"));\r\n\t\tweaps.add(new BoardObject(getImage(\"xboardObjects/leadpipe1.png\"), new Coordinate(20,3), \"LeadPipe\"));\r\n\t\tweaps.add(new BoardObject(getImage(\"xboardObjects/rope1.png\"), new Coordinate(20,10), \"Rope\"));\r\n\t\tweaps.add(new BoardObject(getImage(\"xboardObjects/spanner1.png\"), new Coordinate(20,16), \"Wrench\"));\r\n\t\treturn weaps;\r\n\t}",
"private void buildGame (Game game) throws ServiceException {\r\n\r\n List<Horse> horses = null;\r\n try {\r\n horses = gameHorsesDao.findAll(game.getId());\r\n } catch (DaoException e) {\r\n logger.error(e);\r\n throw new ServiceException(e);\r\n }\r\n game.setHorses(horses);\r\n\r\n Map<Horse, List<BetType>> horseBetTypes = new LinkedHashMap<>();\r\n\r\n for (Horse horse : horses){\r\n\r\n try {\r\n if (gameBetsDao.findAllByHorseId(game.getId(), horse.getId()) == null){\r\n horseBetTypes.put(horse, new ArrayList<>());\r\n } else {\r\n List<BetType> betTypes = gameBetsDao.findAllByHorseId(game.getId(), horse.getId());\r\n horseBetTypes.put(horse, betTypes);\r\n }\r\n } catch (DaoException e) {\r\n logger.error(e);\r\n throw new ServiceException(e);\r\n }\r\n }\r\n\r\n game.setHorseBetTypes(horseBetTypes);\r\n }",
"private void createNewUnit()\r\n {\r\n int currentPlayer = worldPanel.getCurrentPlayer();\r\n int currentUnit = worldPanel.getCurrentUnit();\r\n int randomNumber = (int)Math.ceil(Math.random() * 8);\r\n boolean canBuild = false;\r\n\r\n if(currentPlayer == 1)\r\n {\r\n int unitType = worldPanel.player1.units[currentUnit - 1].getUnitType();\r\n if(unitType == 1)//if unit is a settler\r\n canBuild = true;\r\n }\r\n\r\n else if(currentPlayer == 2)\r\n {\r\n int unitType = worldPanel.player2.units[currentUnit - 1].getUnitType();\r\n if(unitType == 1)//if unit is a settler\r\n canBuild = true;\r\n }\r\n\r\n //if the unit who presses build is a settler\r\n if(canBuild == true)\r\n {\r\n if(currentPlayer == 1)\r\n {\r\n int playerLoc = worldPanel.player1.units[currentUnit - 1].getPosition();\r\n worldPanel.player1.addUnit2(randomNumber);\r\n int noUnits = worldPanel.player1.getNumUnits();\r\n\t\t\t\t\t\t\t\tif(randomNumber == 7)//if unit is a ship\r\n\t\t\t\t\t\t\t\t\tworldPanel.player1.units[noUnits].setPosition(getSeaLoc(playerLoc));\r\n\t\t\t\t\t\t\t\telse\r\n \tworldPanel.player1.units[noUnits].setPosition(playerLoc);\r\n worldPanel.player1.setNumUnits(noUnits + 1);\r\n currentUnit++;\r\n worldPanel.setCurrentUnit(currentUnit);\r\n }//end if\r\n else if(currentPlayer == 2)\r\n {\r\n int playerLoc = worldPanel.player2.units[currentUnit - 1].getPosition();\r\n worldPanel.player2.addUnit2(randomNumber);\r\n int noUnits = worldPanel.player2.getNumUnits();\r\n\t\t\t\t\t\t\t\tif(randomNumber == 7)//if unit is a ship\r\n\t\t\t\t\t\t\t\t\tworldPanel.player2.units[noUnits].setPosition(getSeaLoc(playerLoc));\r\n\t\t\t\t\t\t\t\telse\r\n \tworldPanel.player2.units[noUnits].setPosition(playerLoc);\r\n worldPanel.player2.setNumUnits(noUnits + 1);\r\n currentUnit++;\r\n worldPanel.setCurrentUnit(currentUnit);\r\n }//end elseif\r\n }//end if\r\n\r\n //set new player and unit if necessary\r\n int temp = worldPanel.getNumUnits(currentPlayer);\r\n if(currentUnit > temp)\r\n {\r\n if(currentPlayer == 1)\r\n worldPanel.setCurrentPlayer(2);\r\n else\r\n worldPanel.setCurrentPlayer(1);\r\n worldPanel.setCurrentUnit(1);\r\n }//end if\r\n\r\n //set up new mapPosition if player moved\r\n if(canBuild == true)\r\n setMapPos();\r\n setInfoPanel();//set up information panel\r\n }",
"private Set<BoardObject> populateBoard(){\r\n\t\tSet<BoardObject> ob = new HashSet<BoardObject>();\r\n\t\tob.addAll(createCharacters());\r\n\t\tob.addAll(createWeapons());\r\n\t\treturn ob;\r\n\t}",
"public void populate(IChunkProvider par1IChunkProvider, int par2, int par3)\n {\n int var4 = par2 * 16;\n int var5 = par3 * 16;\n BiomeGenBase var6 = this.worldObj.getBiomeGenForCoords(var4 + 16, var5 + 16);\n boolean var7 = false;\n this.random.setSeed(this.worldObj.getSeed());\n long var8 = this.random.nextLong() / 2L * 2L + 1L;\n long var10 = this.random.nextLong() / 2L * 2L + 1L;\n this.random.setSeed((long)par2 * var8 + (long)par3 * var10 ^ this.worldObj.getSeed());\n Iterator var12 = this.field_82696_f.iterator();\n int k;\n int l;\n \n Random r = random;\n Chunk c = this.worldObj.getChunkFromChunkCoords(par2, par3);\n ArrayList<Object> var20 = rooms;\n \n for (int i = 1; i < 5; i++)\n {\n k = r.nextInt(23); //# of different rooms to generate\n l = r.nextInt(5); //Chance for boss rooms to generate 1/number specified\n\n if (k > 19 && l != 0 || i > 3) // boss chance\n {\n k = r.nextInt(20);\n }\n\n if (k < 21) //boss rooms have to use world gen while the rest use chunk gen\n {\n \t((DungeonComponentBase)(var20.get(k))).generate(c, r, var4, i * 8, var5);\n }\n else\n {\n \t((WorldGenerator)(var20.get(k))).generate(this.worldObj, r, var4, i * 8, var5);\n }\n }\n DungeonCeiling var21 = ceiling;\n var21.generate(c, r, var4, 40, var5);//80\n }",
"private void buildWalls() {\n for (Position floor : floors) {\n addWall(floor.xCoordinate, floor.yCoordinate);\n }\n }",
"private void createInstances()\n {\n Room EnchantedForest, IdyllicGlade, GumdropHill, DenseWoods, VolcanoHell, SecretHotSpring, MagmaChamber, MysteriousCloud, SkyParadise, Cirrostratus, Nimbostratus, Stratocumulus, WaterTemple, Whirlpool, EyeoftheStorm, BossQuarters, Portal;\n \n random = new Random();\n allrooms = new ArrayList<Room>();\n \n // create the rooms providing an ID to be passed into the room constructor\n EnchantedForest = new EnchantedForestRoom();\n allrooms.add(EnchantedForest);\n IdyllicGlade = new IdyllicGladeRoom();\n allrooms.add(IdyllicGlade);\n GumdropHill = new GumdropHillRoom();\n allrooms.add(GumdropHill);\n DenseWoods = new DenseWoodsRoom();\n allrooms.add(DenseWoods);\n VolcanoHell = new VolcanoHellRoom();\n allrooms.add(VolcanoHell);\n SecretHotSpring = new SecretHotSpringRoom();\n allrooms.add(SecretHotSpring);\n MagmaChamber = new MagmaChamberRoom();\n allrooms.add(MagmaChamber);\n MysteriousCloud = new MysteriousCloudRoom();\n allrooms.add(MysteriousCloud);\n SkyParadise = new SkyParadiseRoom();\n allrooms.add(SkyParadise);\n Cirrostratus = new CirrostratusRoom();\n allrooms.add(Cirrostratus);\n Nimbostratus = new NimbostratusRoom();\n allrooms.add(Nimbostratus);\n Stratocumulus = new StratocumulusRoom();\n allrooms.add(Stratocumulus);\n WaterTemple = new WaterTempleRoom();\n allrooms.add(WaterTemple);\n Whirlpool = new WhirlpoolRoom();\n allrooms.add(Whirlpool);\n EyeoftheStorm = new EyeoftheStormRoom();\n allrooms.add(EyeoftheStorm);\n BossQuarters = new BossQuartersRoom(); \n allrooms.add(BossQuarters);\n Portal = new PortalRoom();\n \n \n // initialise room exits, items and creatures\n EnchantedForest.setExit(\"east\", IdyllicGlade);\n EnchantedForest.setExit(\"west\", GumdropHill);\n EnchantedForest.setExit(\"south\", DenseWoods);\n \n IdyllicGlade.setExit(\"west\", EnchantedForest);\n \n GumdropHill.setExit(\"down\", EnchantedForest);\n GumdropHill.setExit(\"up\", MysteriousCloud);\n\n DenseWoods.setExit(\"north\", EnchantedForest);\n DenseWoods.setExit(\"south\", VolcanoHell);\n \n MagmaChamber.setExit(\"north\",VolcanoHell);\n \n VolcanoHell.setExit(\"east\", SecretHotSpring);\n VolcanoHell.setExit(\"north\", DenseWoods);\n VolcanoHell.setExit(\"west\", MysteriousCloud);\n VolcanoHell.setExit(\"south\", MagmaChamber);\n \n SecretHotSpring.setExit(\"west\", VolcanoHell);\n \n MysteriousCloud.setExit(\"west\", VolcanoHell);\n MysteriousCloud.setExit(\"in\", Portal);\n MysteriousCloud.setExit(\"up\", SkyParadise);\n \n SkyParadise.setExit(\"down\", MysteriousCloud);\n SkyParadise.setExit(\"up\", Cirrostratus);\n SkyParadise.setExit(\"east\", Nimbostratus);\n \n Cirrostratus.setExit(\"north\", SkyParadise);\n Cirrostratus.setExit(\"down\", WaterTemple);\n \n Nimbostratus.setExit(\"west\", SkyParadise);\n Nimbostratus.setExit(\"east\", Stratocumulus);\n \n Stratocumulus.setExit(\"west\", Nimbostratus);\n Stratocumulus.setExit(\"down\", WaterTemple);\n \n WaterTemple.setExit(\"up\",Stratocumulus);\n WaterTemple.setExit(\"high\", Cirrostratus);\n WaterTemple.setExit(\"down\", Whirlpool);\n WaterTemple.setExit(\"in\", BossQuarters);\n \n Whirlpool.setExit(\"up\", WaterTemple);\n Whirlpool.setExit(\"down\", EyeoftheStorm);\n \n EyeoftheStorm.setExit(\"up\", Whirlpool);\n EyeoftheStorm.setExit(\"in\", BossQuarters);\n \n BossQuarters.setExit(\"out\", WaterTemple);\n \n currentRoom = EnchantedForest; \n }",
"public void update() {\r\n\r\n\t\tfor(int p=0;p<200;p++) {\r\n\t\t\tfor(int k=0;k<200;k++) {\r\n\r\n\t\t\t\tif(tileMap[p][k].getBuilding()!=null) {\r\n\t\t\t\t\tBuilding m=tileMap[p][k].getBuilding();\r\n\t\t\t\t\t//update the buildings\r\n\t\t\t\t\ttileMap[p][k].getBuilding().update();\r\n\r\n\t\t\t\t\t//Check if battery is giving off power\r\n\t\t\t\t\tif( (m instanceof LowTierBattery) || (m instanceof LargeBattery) || (m instanceof IndustrialGradeBattery) ) {\r\n\r\n\t\t\t\t\t\t//If it's a Battery\r\n\t\t\t\t\t\tLowTierBattery f =(LowTierBattery) tileMap[p][k].getBuilding();\t\r\n\r\n\t\t\t\t\t\t//Check if its getting power and charging\r\n\t\t\t\t\t\tif(checkPowerLine(p,k,3)) {\r\n\t\t\t\t\t\t\tpowerSwitcher(p,k,2,true); //If it is then give off power\r\n\t\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\tpowerSwitcher(p,k,2,f.getCapacity()>0); ///if it isnt then only give power if there is capacity\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//If a building is generating power add power to tiles;\r\n\t\t\t\t\t}else if( (m instanceof SteamEngine) || (m instanceof HandCrankGenerator) || (m instanceof SteamTurbine) || (m instanceof WindTurbine) ) {\r\n\r\n\t\t\t\t\t\tpowerSwitcher(p,k,3,((PoweredBuilding) m).getPower()); //Adds power or remove power based on the status of the generators\r\n\r\n\t\t\t\t\t\t//Powerline only get power from other powerline or buildings\r\n\t\t\t\t\t}else if(m instanceof PowerLine) {\r\n\r\n\t\t\t\t\t\tpowerSwitcher(p,k,5,checkPowerLine(p,k,5)); //Checks if the powerline is powered by other buildings then give it to powerSwitch method\r\n\r\n\t\t\t\t\t}else if(m instanceof LargePowerLine) {\r\n\t\t\t\t\t\tpowerSwitcher(p,k,10,checkPowerLine(p,k,10)); //Checks if the powerline is powered by other buildings then give it to powerSwitch method\r\n\r\n\t\t\t\t\t\t//If its just a powered building enable it if the tile under it is powered;\r\n\t\t\t\t\t}else if((m instanceof PoweredBuilding)) {\r\n\t\t\t\t\t\t((PoweredBuilding) tileMap[p][k].getBuilding()).setPower(tileMap[p][k].getPowered());\r\n\t\t\t\t\t}\r\n\r\n\r\n\t\t\t\t\t//Pipe movement\r\n\t\t\t\t\tif(m instanceof Pipe ) {\r\n\t\t\t\t\t\tpipeCheck(p,k,m);\r\n\t\t\t\t\t}else if(m.getOutputInventorySize()>0) {\r\n\t\t\t\t\t\tbuildingPipeCheck(p,k,m);\r\n\t\t\t\t\t}\r\n\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void update(GameState gameState) {\n for (int i = 0;i < map.length; i++) {\n for (int j = 0;j < map[0].length;j++) {\n if (map[i][j] == TileType.WATER) {\n continue;\n }\n\n if (map[i][j] == TileType.MY_ANT) {\n map[i][j] = TileType.LAND;\n }\n\n if (gameState.getMap()[i][j] != TileType.UNKNOWN) {\n this.map[i][j] = gameState.getMap()[i][j];\n }\n }\n }\n\n this.myAnts = gameState.getMyAnts();\n this.enemyAnts = gameState.getEnemyAnts();\n this.myHills = gameState.getMyHills();\n this.seenEnemyHills.addAll(gameState.getEnemyHills());\n\n // remove eaten food\n MapUtils mapUtils = new MapUtils(gameSetup);\n Set<Tile> filteredFood = new HashSet<Tile>();\n filteredFood.addAll(seenFood);\n for (Tile foodTile : seenFood) {\n if (mapUtils.isVisible(foodTile, gameState.getMyAnts(), gameSetup.getViewRadius2())\n && getTileType(foodTile) != TileType.FOOD) {\n filteredFood.remove(foodTile);\n }\n }\n\n // add new foods\n filteredFood.addAll(gameState.getFoodTiles());\n this.seenFood = filteredFood;\n\n // explore unseen areas\n Set<Tile> copy = new HashSet<Tile>();\n copy.addAll(unseenTiles);\n for (Tile tile : copy) {\n if (isVisible(tile)) {\n unseenTiles.remove(tile);\n }\n }\n\n // remove fallen defenders\n Set<Tile> defenders = new HashSet<Tile>();\n for (Tile defender : motherlandDefenders) {\n if (myAnts.contains(defender)) {\n defenders.add(defender);\n }\n }\n this.motherlandDefenders = defenders;\n\n // prevent stepping on own hill\n reservedTiles.clear();\n reservedTiles.addAll(gameState.getMyHills());\n\n targetTiles.clear();\n }",
"public static void initLoot()\n\t{\n\t\tChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(Disc1),0,1,5));\n\t\tChestGenHooks.getInfo(ChestGenHooks.STRONGHOLD_CORRIDOR).addItem(new WeightedRandomChestContent(new ItemStack(Disc1),0,1,15));\n\t\tChestGenHooks.getInfo(ChestGenHooks.STRONGHOLD_LIBRARY).addItem(new WeightedRandomChestContent(new ItemStack(Disc1),0,1,15));\n\t\tChestGenHooks.getInfo(ChestGenHooks.STRONGHOLD_CROSSING).addItem(new WeightedRandomChestContent(new ItemStack(Disc1),0,1,15));\n\t\tChestGenHooks.getInfo(ChestGenHooks.MINESHAFT_CORRIDOR).addItem(new WeightedRandomChestContent(new ItemStack(Disc1),0,1,5));\n\t\tChestGenHooks.getInfo(ChestGenHooks.PYRAMID_DESERT_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(Disc1),0,1,5));\n\t\tChestGenHooks.getInfo(ChestGenHooks.PYRAMID_JUNGLE_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(Disc1),0,1,15));\n\t}",
"private void createRooms()//refactored\n {\n currentRoom = RoomCreator.buildCurrentRooms();//new\n }",
"ArrayList<Habit> getHabits();",
"private OwnedPuckemon buildOwned(int id, int level){\n List<Object> data = excelReader.getExcelData(id);\n return new OwnedPuckemon(id,level,(String)data.get(0), dissectListTypes((String)data.get(1)),(int) data.get(2),(int)data.get(3)\n ,(int)data.get(4),(int)data.get(5),(int)data.get(6),(int)data.get(7), dissectList((String)data.get(8)));\n }",
"public List<Unit> build() {\n return units;\n }",
"public Map<String, Feature> getRawFeatures(GameState state, int player) {\n Map<String, Feature> features = initializeFeatures(state);\n\n // gets the opponent's index:\n int opponent = 1 - player;\n\n // divides the map in quadrants\n int horizQuadLength = state.getPhysicalGameState().getWidth() / numQuadrants;\n int vertQuadLength = state.getPhysicalGameState().getHeight() / numQuadrants;\n\n // for each quadrant, counts the number of units of each type per player\n for (int horizQuad = 0; horizQuad < numQuadrants; horizQuad++) {\n for (int vertQuad = 0; vertQuad < numQuadrants; vertQuad++) {\n\n // arrays counting the sum of hit points and number of units owned by each\n // player\n float hpSum[] = new float[2];\n int unitCount[] = new int[2];\n\n // a collection of units in this quadrant:\n Collection<Unit> unitsInQuad = state.getPhysicalGameState().getUnitsInRectangle(\n horizQuad * horizQuadLength, vertQuad * vertQuadLength, horizQuadLength, vertQuadLength);\n\n // initializes the unit count of each type and player as zero\n // also initializes the sum of HP of units owned per player as zero\n for (int p = 0; p < 2; p++) { // p for each player\n // unitCountPerQuad.put(p, new HashMap<>());\n hpSum[p] = 0;\n unitCount[p] = 0;\n\n /*\n * for(UnitType type : state.getUnitTypeTable().getUnitTypes()){ //type for each\n * unit type //unitCountPerQuad.get(p).put(type, 0); if(type.isResource)\n * continue; //ignores resources\n * features.put(FeatureNames.unitTypeCountPerQuad(horizQuad, vertQuad, p, type),\n * 0.0f);\n * \n * }\n */\n }\n\n // traverses the list of units in quadrant, incrementing their feature count\n for (Unit u : unitsInQuad) {\n if (u.getType().isResource)\n continue; // ignores resources\n\n unitCount[u.getPlayer()]++;\n hpSum[u.getPlayer()] += u.getHitPoints();\n\n String name = FeatureNames.unitsOfTypePerQuad(horizQuad, vertQuad, u.getPlayer(), u.getType());\n\n // counts and increment the number of the given unit in the current quadrant\n Feature typeCountPerQuadrant = features.get(name);\n typeCountPerQuadrant.setValue(1 + typeCountPerQuadrant.getValue());\n // features.put(name, features.get(name) + 1 );\n }\n\n // computes the average HP of units owned by each player\n for (int p = 0; p < 2; p++) { // p for each player\n float avgHP = unitCount[p] != 0 ? hpSum[p] / unitCount[p] : 0;\n Feature avgHealthInQuad = features.get(FeatureNames.avgHealthPerQuad(horizQuad, vertQuad, p));\n avgHealthInQuad.setValue(avgHP);\n // features.put(FeatureNames.avgHealthPerQuad(horizQuad, vertQuad, p), avgHP);\n }\n\n }\n }\n\n // sets the resources owned by the players\n features.get(FeatureNames.RESOURCES_OWN).setValue((float) state.getPlayer(player).getResources());\n features.get(FeatureNames.RESOURCES_OPP).setValue((float) state.getPlayer(opponent).getResources());\n\n // sets game time\n features.get(FeatureNames.GAME_TIME).setValue((float) state.getTime());\n\n return features;\n\n }",
"public void initTiles()\n {\n PropertiesManager props = PropertiesManager.getPropertiesManager(); \n String imgPath = props.getProperty(MahjongSolitairePropertyType.IMG_PATH);\n int spriteTypeID = 0;\n SpriteType sT;\n \n // WE'LL RENDER ALL THE TILES ON TOP OF THE BLANK TILE\n String blankTileFileName = props.getProperty(MahjongSolitairePropertyType.BLANK_TILE_IMAGE_NAME);\n BufferedImage blankTileImage = miniGame.loadImageWithColorKey(imgPath + blankTileFileName, COLOR_KEY);\n ((MahjongSolitairePanel)(miniGame.getCanvas())).setBlankTileImage(blankTileImage);\n \n // THIS IS A HIGHLIGHTED BLANK TILE FOR WHEN THE PLAYER SELECTS ONE\n String blankTileSelectedFileName = props.getProperty(MahjongSolitairePropertyType.BLANK_TILE_SELECTED_IMAGE_NAME);\n BufferedImage blankTileSelectedImage = miniGame.loadImageWithColorKey(imgPath + blankTileSelectedFileName, COLOR_KEY);\n ((MahjongSolitairePanel)(miniGame.getCanvas())).setBlankTileSelectedImage(blankTileSelectedImage);\n \n // FIRST THE TYPE A TILES, OF WHICH THERE IS ONLY ONE OF EACH\n // THIS IS ANALOGOUS TO THE SEASON TILES IN FLAVORLESS MAHJONG\n ArrayList<String> typeATiles = props.getPropertyOptionsList(MahjongSolitairePropertyType.TYPE_A_TILES);\n for (int i = 0; i < typeATiles.size(); i++)\n {\n String imgFile = imgPath + typeATiles.get(i); \n sT = initTileSpriteType(imgFile, TILE_SPRITE_TYPE_PREFIX + spriteTypeID);\n initTile(sT, TILE_A_TYPE);\n spriteTypeID++;\n }\n \n // THEN THE TYPE B TILES, WHICH ALSO ONLY HAVE ONE OF EACH\n // THIS IS ANALOGOUS TO THE FLOWER TILES IN FLAVORLESS MAHJONG\n ArrayList<String> typeBTiles = props.getPropertyOptionsList(MahjongSolitairePropertyType.TYPE_B_TILES);\n for (int i = 0; i < typeBTiles.size(); i++)\n {\n String imgFile = imgPath + typeBTiles.get(i); \n sT = initTileSpriteType(imgFile, TILE_SPRITE_TYPE_PREFIX + spriteTypeID);\n initTile(sT, TILE_B_TYPE);\n spriteTypeID++;\n }\n \n // AND THEN TYPE C, FOR WHICH THERE ARE 4 OF EACH \n // THIS IS ANALOGOUS TO THE CHARACTER AND NUMBER TILES IN FLAVORLESS MAHJONG\n ArrayList<String> typeCTiles = props.getPropertyOptionsList(MahjongSolitairePropertyType.TYPE_C_TILES);\n for (int i = 0; i < typeCTiles.size(); i++)\n {\n String imgFile = imgPath + typeCTiles.get(i);\n sT = initTileSpriteType(imgFile, TILE_SPRITE_TYPE_PREFIX + spriteTypeID); \n for (int j = 0; j < 4; j++)\n {\n initTile(sT, TILE_C_TYPE);\n }\n spriteTypeID++;\n }\n }",
"public static void main(String[] args) {\n\n Building building1 = new Building(\"Building_A\");\n building1.addRoom(new Room(\"Kitchen\", 256, 2));\n try {\n building1.getRoom(\"Kitchen\")\n .addLightBulb(new LightBulbs(25))\n .addFurniture(new Armchair(\"Armchair_1\", 25, 45))\n .addLightBulb(new LightBulbs(58));\n } catch (RoomNotFoundException e) {\n System.out.println(e.getMessage());\n }\n building1.addRoom(new Room(\"Bedroom\", 258, 4));\n try {\n building1.getRoom(\"Bedroom\")\n .addLightBulb(new LightBulbs(684))\n .addLightBulb(new LightBulbs(158))\n .addFurniture(new Table(\"Table\", 45))\n .addFurniture(new Armchair(\"Armchair_2\", 12, 15));\n } catch (RoomNotFoundException e) {\n System.out.println(e.getMessage());\n }\n\n building1.addRoom(new Room(\"Bathroom\", 25, 1));\n if (building1.verifyBuilding() == false) {\n return;\n }\n System.out.println(building1.describe());\n }",
"@Override\n protected void generateTiles() {\n }",
"public void populateRooms(){\n }",
"public Tiles() {\n basketWeave();\n med1();\n med2();\n }",
"private void createNewCity()\r\n {\r\n int currentPlayer = worldPanel.getCurrentPlayer();\r\n int currentUnit = worldPanel.getCurrentUnit();\r\n boolean canBuild = false;\r\n\r\n if(currentPlayer == 1)\r\n {\r\n int unitType = worldPanel.player1.units[currentUnit - 1].getUnitType();\r\n if(unitType == 1)//if unit is a settler\r\n canBuild = true;\r\n }\r\n\r\n else if(currentPlayer == 2)\r\n {\r\n int unitType = worldPanel.player1.units[currentUnit - 1].getUnitType();\r\n if(unitType == 1)//if unit is a settler\r\n canBuild = true;\r\n }\r\n\r\n //if the unit who presses build is a settler\r\n if(canBuild == true)\r\n {\r\n if(currentPlayer == 1)\r\n {\r\n int playerLoc = worldPanel.player1.units[currentUnit - 1].getPosition();\r\n worldPanel.player1.addCity(playerLoc);\r\n currentUnit++;\r\n worldPanel.setCurrentUnit(currentUnit);\r\n }//end if\r\n else if(currentPlayer == 2)\r\n {\r\n int playerLoc = worldPanel.player2.units[currentUnit - 1].getPosition();\r\n worldPanel.player2.addCity(playerLoc);\r\n currentUnit++;\r\n worldPanel.setCurrentUnit(currentUnit);\r\n }//end elseif\r\n }//end if\r\n\r\n //set new player and unit if necessary\r\n int temp = worldPanel.getNumUnits(currentPlayer);\r\n if(currentUnit > temp)\r\n {\r\n if(currentPlayer == 1)\r\n worldPanel.setCurrentPlayer(2);\r\n else\r\n worldPanel.setCurrentPlayer(1);\r\n worldPanel.setCurrentUnit(1);\r\n }//end if\r\n\r\n //set up new mapPosition if player moved\r\n if(canBuild == true)\r\n setMapPos();\r\n setInfoPanel();\r\n }",
"public void createTiles() {\r\n Session session = sessionService.getCurrentSession();\r\n Campaign campaign = session.getCampaign();\r\n\r\n tilePane.getChildren().clear();\r\n List<Pc> pcs = null;\r\n try {\r\n pcs = characterService.getPlayerCharacters();\r\n } catch (MultiplePlayersException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n if (pcs != null) {\r\n pcs = pcs.stream().filter(pc -> campaign.getPcs().stream().anyMatch(\r\n campaignPc -> campaignPc.getId().equalsIgnoreCase(pc.getId())\r\n )).collect(Collectors.toList());\r\n\r\n for (Pc pc : pcs) {\r\n SortedMap<String, String> items = getTileItems(pc);\r\n Tile tile = new Tile(pc.getId(), pc.getName(), items);\r\n tile.setOnMouseClicked(mouseEvent -> {\r\n try {\r\n sessionService.updateParticipant(playerManagementService.getRegisteredPlayer().getId(), tile.getObjectId());\r\n } catch (EntityNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n parentController.updateSession(sessionService.getCurrentSession());\r\n parentController.switchView();\r\n });\r\n tilePane.getChildren().add(tile);\r\n }\r\n }\r\n }",
"@Override\n protected void populate()\n {\n for (int i = 0; i < getHeight(); i++)\n {\n add(new Tile(), 1, i);\n add(new Block(), 2, i);\n add(new Tile(), 3, i);\n }\n for (int i = 2; i < 5; i++)\n {\n add(new LightableTile(), 4, i);\n }\n }",
"public EpicTargetItems(byte kingdomTemplateId) {\n/* 107 */ this.kingdomId = kingdomTemplateId;\n/* 108 */ loadAll();\n/* 109 */ MissionHelper.loadAll();\n/* */ }",
"@Override\r\n\tpublic void buildCity() {\n\t\t\r\n\t}",
"private void prepare()\n {\n treespawn treespawn2 = new treespawn();\n addObject(treespawn2,30,486);\n\n hantu hantu = new hantu();\n addObject(hantu,779,359);\n \n hantu hantu2 = new hantu();\n addObject(hantu2,88,84);\n \n bergerak bergerak2 = new bergerak();\n addObject(bergerak2,745,423);\n\n bergerak bergerak3 = new bergerak();\n addObject(bergerak3,266,566);\n \n bergerak bergerak4 = new bergerak();\n addObject(bergerak4,564,566);\n\n hantu hantu3 = new hantu();\n addObject(hantu3,671,490);\n \n hantu hantu4 = new hantu();\n addObject(hantu4,371,499);\n\n bergerak bergerak = new bergerak();\n addObject(bergerak,150,148);\n\n lantai lantai = new lantai();\n addObject(lantai,561,577); \n addObject(lantai,419,579); \n\n player player = new player();\n addObject(player,882,498);\n\n lantai3 lantai3 = new lantai3();\n addObject(lantai3,120,148);\n\n flyinglantai flyinglantai = new flyinglantai();\n addObject(flyinglantai,292,148);\n\n treespawn treespawn = new treespawn();\n addObject(treespawn,30,291);\n\n lantai4 lantai4 = new lantai4();\n addObject(lantai4,235,536);\n \n lantai4 lantai42 = new lantai4();\n addObject(lantai42,275,508);\n \n lantai4 lantai43 = new lantai4();\n addObject(lantai43,323,480);\n \n lantai4 lantai44 = new lantai4();\n addObject(lantai44,369,454);\n\n lantai2 lantai2 = new lantai2();\n addObject(lantai2,680,424);\n\n \n lantai3 lantai32 = new lantai3();\n addObject(lantai32,938,146);\n \n lantai4 lantai45 = new lantai4();\n addObject(lantai45,21,370);\n\n lantai4 lantai46 = new lantai4();\n addObject(lantai46,210,180);\n \n lantai4 lantai47 = new lantai4();\n addObject(lantai47,257,201);\n \n lantai4 lantai48 = new lantai4();\n addObject(lantai48,302,229);\n \n lantai4 lantai49 = new lantai4();\n addObject(lantai49,354,255);\n \n lantai4 lantai410 = new lantai4();\n addObject(lantai410,402,281);\n \n lantai4 lantai411 = new lantai4();\n addObject(lantai411,444,302);\n \n lantai4 lantai412 = new lantai4();\n addObject(lantai412,491,334);\n \n lantai4 lantai413 = new lantai4();\n addObject(lantai413,546,364);\n \n lantai4 lantai414 = new lantai4();\n addObject(lantai414,582,397);\n \n doorlv3 doorlv3 = new doorlv3();\n addObject(doorlv3,910,45);\n\n \n }",
"public SpaceHulkWorldModel(TiledMap map, int players)\r\n/* 49: */ {\r\n/* 50: 49 */ super(map);\r\n/* 51: 50 */ this.mission = false;\r\n/* 52: 51 */ this.reachablePlaces = 0;\r\n/* 53: 52 */ this.highlight = new int[getWidthInTiles()][getHeightInTiles()];\r\n/* 54: 53 */ this.walkable = new boolean[getWidthInTiles()][getHeightInTiles()];\r\n/* 55: 54 */ this.blocked = new boolean[getWidthInTiles()][getHeightInTiles()];\r\n/* 56: 55 */ this.finish = new boolean[getWidthInTiles()][getHeightInTiles()];\r\n/* 57: 56 */ this.door = new boolean[getWidthInTiles()][getHeightInTiles()];\r\n/* 58: 57 */ this.rock = new boolean[getWidthInTiles()][getHeightInTiles()];\r\n/* 59: 58 */ this.fire = new boolean[getWidthInTiles()][getHeightInTiles()];\r\n/* 60: 59 */ this.grass = new boolean[getWidthInTiles()][getHeightInTiles()];\r\n/* 61: 60 */ this.sand = new boolean[getWidthInTiles()][getHeightInTiles()];\r\n/* 62: */ \r\n/* 63: 62 */ this.reach = new boolean[getWidthInTiles()][getHeightInTiles()];\r\n/* 64: 64 */ for (int x = 0; x < getWidthInTiles(); x++) {\r\n/* 65: 66 */ for (int y = 0; y < getHeightInTiles(); y++) {\r\n/* 66: 69 */ this.walkable[x][y] = checkTileProperty(x, y, \"walkable\", \"true\");\r\n/* 67: */ }\r\n/* 68: */ }\r\n/* 69: */ }",
"public void addUnitsTestMethod() {\n minimapUnits = new ArrayList<>();\n System.out.println(\"JOINED PLAYERS: \" + game.getJoinedPlayers());\n for (int i = 0; i < game.getJoinedPlayers(); ++i) {\n Player player = game.getPlayers().get(i);\n System.out.println(\"PLAYER: \" + player);\n Color color;\n if (i == 0) {\n color = Color.RED;\n } else if (i == 1) {\n color = Color.BLUE;\n } else if (i == 2) {\n color = Color.YELLOW;\n } else {\n color = Color.GREEN;\n }\n System.out.println(\"COLOR: \" + color);\n\n for (int j = 0; j < 10; ++j) {\n MinimapUnit minimapUnit = new MinimapUnit(blockSize, blockSize);\n minimapUnit.setMyPlayer(player);\n minimapUnit.setColor(color);\n int id = i * 10 + j;\n Unit unit = new Unit().setPosX(i).setPosY(j).setId(String.valueOf(id));\n minimapUnit.setMyUnit(unit);\n minimapUnit.setPosXY((i * blockSize) + 1, (j * blockSize) + 1);\n minimapUnits.add(minimapUnit);\n drawPane.getChildren().add(minimapUnit);\n System.out.println(\"MINIMAP UNIT: \" + minimapUnit);\n }\n }\n }",
"private static abstract class <init> extends com.google.android.gms.games.hodImpl\n{\n\n public com.google.android.gms.games.quest.Result zzau(Status status)\n {\n return new com.google.android.gms.games.quest.Quests.ClaimMilestoneResult(status) {\n\n final Status zzQs;\n final QuestsImpl.ClaimImpl zzavH;\n\n public Milestone getMilestone()\n {\n return null;\n }\n\n public Quest getQuest()\n {\n return null;\n }\n\n public Status getStatus()\n {\n return zzQs;\n }\n\n \n {\n zzavH = QuestsImpl.ClaimImpl.this;\n zzQs = status;\n super();\n }\n };\n }",
"private void assignCapitals() {\n City bestCity = null;\n int mostLandTilesSurrounding = 0;\n int landTilesSurrounding = 0;\n int minRow = 0;\n int maxRow = 0;\n int minColumn = 0;\n int maxColumn = 0;\n if (numPlayers == 2) {\n for (int i = 0; i < 2; i++) {\n mostLandTilesSurrounding = 0;\n if (i == 0) {\n minRow = 0;\n maxRow = MAP_LENGTH-1;\n minColumn = 0;\n maxColumn = MAP_LENGTH/2;\n } else if (i == 1) {\n minRow = 0;\n maxRow = MAP_LENGTH-1;\n minColumn = MAP_LENGTH/2;;\n maxColumn = MAP_LENGTH-1;\n }\n for (int r = minRow; r < maxRow; r++) {\n for (int c = minColumn; c < maxColumn; c++) {\n if (tileMap[r][c].getCity() != null) {\n landTilesSurrounding = surroundingLandCheckCity(tileMap[r][c].getCity());\n if (landTilesSurrounding > mostLandTilesSurrounding) {\n mostLandTilesSurrounding = landTilesSurrounding;\n bestCity = tileMap[r][c].getCity();\n }\n }\n }\n }\n tileMap[bestCity.getRow()][bestCity.getCol()].getCity().setTribe(i);\n tileMap[bestCity.getRow()][bestCity.getCol()].getCity().setCapital(true);\n capitalCities[numCapitalCities] = tileMap[bestCity.getRow()][bestCity.getCol()].getCity();\n numCapitalCities++;\n }\n } else if (numPlayers == 3) {\n\n for (int i = 0; i < 3; i++) {\n mostLandTilesSurrounding = 0;\n if (i == 0) {\n minRow = 0;\n maxRow = MAP_LENGTH / 2;\n minColumn = 0;\n maxColumn = MAP_LENGTH / 2;\n } else if (i == 1) {\n minRow = 0;\n maxRow = MAP_LENGTH / 2;\n minColumn = MAP_LENGTH / 2;\n maxColumn = MAP_LENGTH - 1;\n } else if (i == 2) {\n minRow = MAP_LENGTH / 2;\n maxRow = MAP_LENGTH - 1;\n minColumn = 0;\n maxColumn = MAP_LENGTH / 2;\n }\n for (int r = minRow; r < maxRow; r++) {\n for (int c = minColumn; c < maxColumn; c++) {\n if (tileMap[r][c].getCity() != null) {\n landTilesSurrounding = surroundingLandCheckCity(tileMap[r][c].getCity());\n if (landTilesSurrounding > mostLandTilesSurrounding) {\n mostLandTilesSurrounding = landTilesSurrounding;\n bestCity = tileMap[r][c].getCity();\n }\n }\n }\n }\n tileMap[bestCity.getRow()][bestCity.getCol()].getCity().setTribe(i);\n tileMap[bestCity.getRow()][bestCity.getCol()].getCity().setCapital(true);\n capitalCities[numCapitalCities] = tileMap[bestCity.getRow()][bestCity.getCol()].getCity();\n numCapitalCities++;\n System.out.println(\"Capital city of player \" + i + \" is at \" + bestCity.getCol() + \", \" + bestCity.getRow()); //For checking capital city determination\n }\n } else if (numPlayers == 4) {\n for (int i = 0; i < 4; i++) {\n mostLandTilesSurrounding = 0;\n if (i == 0) {\n minRow = 0;\n maxRow = MAP_LENGTH/2;\n minColumn = 0;\n maxColumn = MAP_LENGTH/2;\n } else if (i == 1) {\n minRow = 0;\n maxRow = MAP_LENGTH/2;\n minColumn = MAP_LENGTH/2;\n maxColumn = MAP_LENGTH-1;\n } else if (i == 2) {\n minRow = MAP_LENGTH/2;\n maxRow = MAP_LENGTH-1;\n minColumn = 0;\n maxColumn = MAP_LENGTH/2;\n } else if (i == 3) {\n minRow = MAP_LENGTH/2;\n maxRow = MAP_LENGTH-1;\n minColumn = MAP_LENGTH/2;\n maxColumn = MAP_LENGTH-1;\n }\n for (int r = minRow; r < maxRow; r++) {\n for (int c = minColumn; c < maxColumn; c++) {\n if (tileMap[r][c].getCity() != null) {\n landTilesSurrounding = surroundingLandCheckCity(tileMap[r][c].getCity());\n if (landTilesSurrounding > mostLandTilesSurrounding) {\n mostLandTilesSurrounding = landTilesSurrounding;\n bestCity = tileMap[r][c].getCity();\n }\n }\n }\n }\n tileMap[bestCity.getRow()][bestCity.getCol()].getCity().setTribe(i);\n tileMap[bestCity.getRow()][bestCity.getCol()].getCity().setCapital(true);\n capitalCities[numCapitalCities] = tileMap[bestCity.getRow()][bestCity.getCol()].getCity();\n numCapitalCities++;\n }\n }\n }",
"private void refreshGoalData () {\n DateTime now = DateTime.now();\n if((now.getWeekOfWeekyear() > userGoals.getWeekOfYear()) || now.getWeekOfWeekyear() == 0 ) {\n userGoals.setWeekOfYear(now.getWeekOfWeekyear());\n userGoals.setRunsPerWeekActual(0);\n userGoals.setMilesPerWeekActual(0.0);\n }\n\n //Calculates weekly mileage and runs per week\n double mileage = 0.0;\n int numOfRuns = 0;\n if(runMap != null && !(runMap.isEmpty())) {\n //Get current year and current week of the year\n int year = now.getYear();\n int currWeek = now.getWeekOfWeekyear();\n Calendar c = Calendar.getInstance();\n c.clear();\n //Set calendar to beginning of week\n c.set(Calendar.YEAR, year);\n c.set(Calendar.WEEK_OF_YEAR, currWeek);\n Date beginningOfWeek = c.getTime();\n\n SimpleDateFormat formatter = new SimpleDateFormat(\"MM/dd/yyyy\");\n\n for (String key : runMap.keySet()) {\n Run run = runMap.get(key);\n //Date stored as MM/dd/yyyy\n try {\n Date dateOfRun = formatter.parse(run.getDate());\n if (dateOfRun.compareTo(beginningOfWeek) >= 0) {\n mileage += run.getMileage();\n numOfRuns++;\n }\n }catch (ParseException p) {\n //idfk\n }\n\n }\n\n if(userShoes != null && !userShoes.isEmpty()) {\n //While we're here, we're going to update the mileage for each shoe\n for (String shoeKey : userShoes.keySet()) {\n Shoe currShoe = userShoes.get(shoeKey);\n currShoe.setMileage(0.0);\n for (String runKey : runMap.keySet()) {\n if (currShoe.getName().equals(runMap.get(runKey).getShoe())) {\n currShoe.addMileage(runMap.get(runKey).getMileage());\n }\n }\n }\n }\n\n }\n userGoals.setRunsPerWeekActual(numOfRuns);\n userGoals.setMilesPerWeekActual(mileage);\n\n\n goalRef.setValue(userGoals);\n shoeRef.setValue(userShoes);\n\n check = 1;\n }",
"private void buildWorld() {\r\n\t\tremoveAll();\r\n\t\tintro = null;\r\n\t\tfacingEast = true;\r\n\t\t\r\n\t\taddLevels();\r\n\t\taddCharacters();\r\n\t\taddLifeDisplay();\r\n\t}",
"private static void buildTunnels()\n {\n //Initialize necessary member variables\n totalCost = 0;\n connectedHills = 1;\n \n //Create a disjoint set for all of the hills on the current campus\n h = scan.nextInt();\n campus = new DisjointSet(h);\n \n //Read how many tunnels can be built\n t = scan.nextInt();\n \n //Create an array for all the possible tunnels\n edges = new edge[t];\n \n //Loop through all of the possible tunnels\n for (tunnel = 0; tunnel < t; tunnel++)\n {\n //Save all information for the current possible tunnel\n edges[tunnel] = new edge();\n }\n \n //Sort the array of tunnels by their costs\n Arrays.sort(edges);\n \n //Loop through all the possible tunnels again\n for (tunnel = 0; tunnel < t; tunnel++)\n {\n //Try to connect the hills with the current tunnel and check if it was successful\n if (campus.union(edges[tunnel].x - 1, edges[tunnel].y - 1))\n {\n //Add the cost to build that tunnel to the total cost\n totalCost += edges[tunnel].d;\n \n //Incrememnt the amount of total hills connected\n connectedHills++;\n }\n \n //Check if the tunnels have connected all of the hills\n if (connectedHills == h)\n {\n //Stop trying to build tunnels\n return;\n }\n }\n }",
"public static CreationEntry createMetallicEntries(int aPrimarySkill, int aObjectSource, int aObjectTarget, int aObjectCreated, boolean depleteSource, boolean depleteTarget, float aPercentageLost, boolean depleteEqually, boolean aCreateOnGround, int aCustomCreationCutOff, double aMinimumSkill, CreationCategories aCategory) {\n/* 3657 */ CreationEntry defaultEntry = createSimpleEntry(aPrimarySkill, aObjectSource, aObjectTarget, aObjectCreated, depleteSource, depleteTarget, aPercentageLost, depleteEqually, aCreateOnGround, aCustomCreationCutOff, aMinimumSkill, aCategory);\n/* */ \n/* */ \n/* 3660 */ if (ItemFactory.isMetalLump(aObjectTarget)) {\n/* */ \n/* 3662 */ for (int targetTemplateId : ItemFactory.metalLumpList)\n/* */ {\n/* 3664 */ if (targetTemplateId != aObjectTarget)\n/* */ {\n/* */ \n/* 3667 */ createSimpleEntry(aPrimarySkill, aObjectSource, targetTemplateId, aObjectCreated, depleteSource, depleteTarget, aPercentageLost, depleteEqually, aCreateOnGround, aCustomCreationCutOff, aMinimumSkill, aCategory);\n/* */ }\n/* */ }\n/* */ \n/* 3671 */ } else if (ItemFactory.isMetalLump(aObjectSource)) {\n/* */ \n/* 3673 */ for (int sourceTemplateId : ItemFactory.metalLumpList) {\n/* */ \n/* 3675 */ if (sourceTemplateId != aObjectSource)\n/* */ {\n/* */ \n/* 3678 */ createSimpleEntry(aPrimarySkill, sourceTemplateId, aObjectTarget, aObjectCreated, depleteSource, depleteTarget, aPercentageLost, depleteEqually, aCreateOnGround, aCustomCreationCutOff, aMinimumSkill, aCategory);\n/* */ }\n/* */ } \n/* */ } \n/* */ \n/* 3683 */ return defaultEntry;\n/* */ }",
"public void solucioInicial2() {\n int grupsRecollits = 0;\n for (int i=0; i<numCentres*helisPerCentre; ++i) {\n Helicopter hel = new Helicopter();\n helicopters.add(hel);\n }\n int indexHelic = 0;\n int indexGrup = 0;\n int places = 15;\n while (indexGrup < numGrups) {\n int trajecte[] = {-1,-1,-1};\n for (int i=0; i < 3 && indexGrup<numGrups; ++i) {\n Grupo grup = grups.get( indexGrup );\n if (places - grup.getNPersonas() >= 0) {\n places -= grup.getNPersonas();\n trajecte[i] = indexGrup;\n indexGrup++;\n\n }\n else i = 3;\n }\n Helicopter helicopter = helicopters.get( indexHelic );\n helicopter.addTrajecte( trajecte, indexHelic/helisPerCentre );\n places = 15;\n indexHelic++;\n if (indexHelic == numCentres*helisPerCentre) indexHelic = 0;\n }\n }",
"public void fillWithIslandTiles() {\n\t\tthis.addCard(new IslandTile(\"Breakers Bridge\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Bronze Gate\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Cliffs of Abandon\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Cave of Embers\", CardType.TILE, TreasureType.CRYSTAL_OF_FIRE));\n\t\tthis.addCard(new IslandTile(\"Crimson Forest\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Copper Gate\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Coral Palace\", CardType.TILE, TreasureType.OCEAN_CHALICE));\n\t\tthis.addCard(new IslandTile(\"Cave of Shadows\", CardType.TILE, TreasureType.CRYSTAL_OF_FIRE));\n\t\tthis.addCard(new IslandTile(\"Dunes of Deception\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Fool's Landing\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Gold Gate\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Howling Garden\", CardType.TILE, TreasureType.STATUE_OF_WIND));\n\t\tthis.addCard(new IslandTile(\"Iron Gate\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Lost Lagoon\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Misty Marsh\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Observatory\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Phantom Rock\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Silver Gate\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Temple of the Moon\", CardType.TILE, TreasureType.EARTH_STONE));\n\t\tthis.addCard(new IslandTile(\"Tidal Palace\", CardType.TILE, TreasureType.OCEAN_CHALICE));\n\t\tthis.addCard(new IslandTile(\"Temple of the Sun\", CardType.TILE, TreasureType.EARTH_STONE));\n\t\tthis.addCard(new IslandTile(\"Twilight Hollow\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Whispering Garden\", CardType.TILE, TreasureType.STATUE_OF_WIND));\n\t\tthis.addCard(new IslandTile(\"Watchtower\", CardType.TILE, TreasureType.NONE));\n\t}",
"void makeNborLists(){\n\t\t\tfor (int i = 0; i < N; i++){\n\t\t\t\tint ct = 0;\n\t\t\t\tint boundsCt = 0;\n\t\t\t\tfor (int j = 0; j < maxNbors; j++){\n\t\t\t\t\tint nborSite = nborList[i][j];\n\t\t\t\t\tif(nborSite>=1){\n\t\t\t\t\t\tif (aliveLattice[nborSite]){\n\t\t\t\t\t\t\tct += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tboundsCt += 1;\n\t\t\t\t\t}\n\t\t\t\t\tint noDead = maxNbors - ct;\n\t\t\t\t\tfracDeadNbors[i] = (double)noDead/maxNbors;\n\t\t\t\t\tif(deadDissipation==true) noNborsForSite[i] = noNbors; \n\t\t\t\t\telse if (deadDissipation==false){\n\t\t\t\t\t\tif(boundaryConditions==\"Open\")\n\t\t\t\t\t\t\tnoNborsForSite[i]=ct+boundsCt;\n\t\t\t\t\t\telse if(boundaryConditions == \"Periodic\")\n\t\t\t\t\t\t\tnoNborsForSite[i]=ct;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(deadDissipation==true){\n\t\t\t\tfor (int i = 0; i < N; i++)\tnoNborsForSite[i] = noNbors; \n\t\t\t\tfor (int i = 0; i < N; i++){\n\t\t\t\t\tint ct = 0;\n\t\t\t\t\tfor (int j = 0; j < maxNbors; j++){\n\t\t\t\t\t\tif (aliveLattice[nborList[i][j]]){\n\t\t\t\t\t\t\tct += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tint noDead = maxNbors - ct;\n\t\t\t\t\t\tfracDeadNbors[i] = (double)noDead/maxNbors;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else if (deadDissipation==false){\n\t\t\t\tfor (int i = 0; i < N; i++){\n\t\t\t\t\tint ct = 0;\n\t\t\t\t\tfor (int j = 0; j < maxNbors; j++){\n\t\t\t\t\t\tif (aliveLattice[nborList[i][j]]){\n\t\t\t\t\t\t\tct += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tint noDead = maxNbors - ct;\n\t\t\t\t\t\tfracDeadNbors[i] = (double)noDead/maxNbors;\n\t\t\t\t\t\tnoNborsForSite[i]=ct;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t}",
"private void createTile(){\n for(int i = 0; i < COPY_TILE; i++){\n for(int k = 0; k < DIFF_TILES -2; k++){\n allTiles.add(new Tile(k));\n }\n }\n }",
"private void createRooms()\n {\n Room outside, garden, kitchen, frontyard, garage, livingroom,\n upperhallway, downhallway, bedroom1, bedroom2, toilet,teleporter;\n\n // create the rooms\n outside = new Room(\"outside the house\",\"Outside\");\n garden = new Room(\"in the Garden\", \"Garden\");\n kitchen = new Room(\"in the Kitchen\",\"Kitchen\");\n frontyard = new Room(\"in the Frontyard of the house\", \"Frontyard\");\n garage = new Room(\"in the Garage\", \"Garage\");\n livingroom = new Room(\"in the Living room\", \"Living Room\");\n upperhallway = new Room(\"in the Upstairs Hallway\",\"Upstairs Hallway\");\n downhallway = new Room(\"in the Downstairs Hallway\", \"Downstairs Hallway\");\n bedroom1 = new Room(\"in one of the Bedrooms\", \"Bedroom\");\n bedroom2 = new Room(\"in the other Bedroom\", \"Bedroom\");\n toilet = new Room(\"in the Toilet upstairs\",\"Toilet\");\n teleporter = new Room(\"in the Warp Pipe\", \"Warp Pipe\");\n\n // initialise room exits\n outside.setExit(\"north\", garden);\n outside.setExit(\"east\", frontyard);\n\n garden.setExit(\"south\", outside);\n garden.setExit(\"east\", kitchen);\n\n kitchen.setExit(\"west\", garden);\n kitchen.setExit(\"north\", livingroom);\n kitchen.setExit(\"south\", downhallway);\n\n frontyard.setExit(\"west\", outside);\n frontyard.setExit(\"north\", downhallway);\n frontyard.setExit(\"east\", garage);\n\n garage.setExit(\"west\", frontyard);\n garage.setExit(\"north\", downhallway);\n\n livingroom.setExit(\"west\", kitchen);\n\n downhallway.setExit(\"north\",kitchen);\n downhallway.setExit(\"west\",frontyard);\n downhallway.setExit(\"south\",garage);\n downhallway.setExit(\"east\",upperhallway);\n\n upperhallway.setExit(\"north\", bedroom2);\n upperhallway.setExit(\"east\", bedroom1);\n upperhallway.setExit(\"south\", toilet);\n upperhallway.setExit(\"west\", downhallway);\n\n toilet.setExit(\"north\", upperhallway);\n\n bedroom1.setExit(\"west\",upperhallway);\n\n bedroom2.setExit(\"south\", upperhallway);\n\n rooms.add(outside);\n rooms.add(garden);\n rooms.add(kitchen);\n rooms.add(frontyard);\n rooms.add(garage);\n rooms.add(livingroom);\n rooms.add(upperhallway);\n rooms.add(downhallway);\n rooms.add(bedroom1);\n rooms.add(bedroom2);\n rooms.add(toilet);\n }",
"private Map<String, SortedSet<PortletCategoryBean>> getRegistry43(\n WebRequest request,\n IPerson user,\n PortletCategory rootCategory,\n boolean includeUncategorized,\n Set<IPortletDefinition> favorites) {\n\n /*\n * This collection of all the portlets in the portal is for the sake of\n * tracking which ones are uncategorized. They will be added to the\n * output if includeUncategorized=true.\n */\n Set<IPortletDefinition> portletsNotYetCategorized =\n includeUncategorized\n ? new HashSet<>(portletDefinitionRegistry.getAllPortletDefinitions())\n : new HashSet<>(); // Not necessary to fetch them if we're not\n // tracking them\n\n // construct a new channel registry\n Map<String, SortedSet<PortletCategoryBean>> rslt = new TreeMap<>();\n SortedSet<PortletCategoryBean> categories = new TreeSet<>();\n\n // add the root category and all its children to the registry\n final Locale locale = getUserLocale(user);\n categories.add(\n preparePortletCategoryBean(\n request, rootCategory, portletsNotYetCategorized, user, locale, favorites));\n\n if (includeUncategorized) {\n /*\n * uPortal historically has provided for a convention that portlets not in any category\n * may potentially be viewed by users but may not be subscribed to.\n *\n * As of uPortal 4.2, the logic below now takes any portlets the user has BROWSE access to\n * that have not already been identified as belonging to a category and adds them to a category\n * called Uncategorized.\n */\n\n EntityIdentifier ei = user.getEntityIdentifier();\n IAuthorizationPrincipal ap =\n AuthorizationServiceFacade.instance().newPrincipal(ei.getKey(), ei.getType());\n\n Set<PortletDefinitionBean> marketplacePortlets = new HashSet<>();\n for (IPortletDefinition portlet : portletsNotYetCategorized) {\n if (authorizationService.canPrincipalBrowse(ap, portlet)) {\n PortletDefinitionBean pdb =\n preparePortletDefinitionBean(\n request, portlet, locale, favorites.contains(portlet));\n marketplacePortlets.add(pdb);\n }\n }\n\n // construct a new channel category bean for this category\n final String uncName = messageSource.getMessage(UNCATEGORIZED, new Object[] {}, locale);\n final String uncDescription =\n messageSource.getMessage(UNCATEGORIZED_DESC, new Object[] {}, locale);\n PortletCategory pc =\n new PortletCategory(\n uncName); // Use of this String for Id matches earlier version of API\n pc.setName(uncName);\n pc.setDescription(uncDescription);\n PortletCategoryBean unc =\n PortletCategoryBean.fromPortletCategory(pc, null, marketplacePortlets);\n\n // Add even if no portlets in category\n categories.add(unc);\n }\n\n rslt.put(CATEGORIES_MAP_KEY, categories);\n return rslt;\n }",
"private void createGWBuildings()\n\t{\n\t\t//Generate block 0 (50x50)\n\t\t//(7,7)-(57,57)\n\t\tmakeBlocker0();\n\n\t\t//Generate block 1 (50x50)\n\t\t//(64,7)-(114,57)\n\t\tmakeSEH();\n\t\tmakeFullBright();\n\t\tmakeKennedy();\n\t\tmakeMunson();\n\n\t\t//Generate block 2 (80x50)\n\t\t//(121,7)-(201,57)\n\t\tmakeAcademicCenter();\n\t\tmakeRomePhilips();\n\t\tmakeDistrict();\n\t\tmakeMarvin();\n\t\tmakeLafayette();\n\n\t\t//Generate block 3 (65x50)\n\t\t//(208,7)-(273,57)\n\t\tmake2000Penn();\n\t\tmakeSMPA();\n\t\tmakeBlocker3();\n\n\t\t//Generate block 4 (63x50)\n\t\t//(280,7)-(343,57)\n\t\tmakeBlocker4();\n\n\t\t//Generate block 5 (50x60)\n\t\t//(7,64)-(57,124)\n\t\tmakeAmsterdam();\n\t\tmakeHealWell();\n\t\tmakeBlocker5();\n\n\t\t//Generate block 6 (50x60)\n\t\t//(64,64)-(114,124)\n\t\tmakeTompkins();\n\t\tmakeMadison();\n\t\tmakeDuquesAndFunger();\n\n\t\t//Generate block 7 (80x60)\n\t\t//(121,64)-(201,124)\n\t\tmakeGelman();\n\t\tmakeLisner();\n\t\tmakeStaughton();\n\t\tmakeMonroe();\n\n\t\t//Generate block 8 (65x60)\n\t\t//(208,64)-(273,124)\n\t\tmakeCorcoran();\n\t\tmakeLawSchool();\n\t\tmakeLisnerHall();\n\t\tmakeTextileMuseum();\n\n\t\t//Generate block 9 (63x60)\n\t\t//(280,64)-(343,124)\n\t\tmakeBlocker9();\n\n\t\t//Generate block 10 (50x50)\n\t\t//(7,131)-(57,181)\n\t\tmakeShenkman();\n\t\tmakeBlocker10();\n\n\t\t//Generate block 11 (50x50)\n\t\t//(64,131)-(114,181)\n\t\tmakeTownHouses();\n\t\tmakeSmithCenter();\n\n\t\t//Generate block 12 (80x50)\n\t\t//(121,131)-(201,181)\n\t\tmakeSouthHall();\n\t\tmakeGuthridge();\n\t\tmakeBlocker12();\n\n\t\t//Generate block 13 (65x50)\n\t\t//(208,131)-(273,181)\n\t\tmakeBlocker13();\n\t\tmakeFSK();\n\t\tmakePatomac();\n\n\t\t//Generate block 14 (63x50)\n\t\t//(280,131)-(343,181)\n\t\tmakeBlocker14();\n\n\t\t//Generate block 15 (50x57)\n\t\t//(7,188)-(57,245)\n\t\tmakeBlocker15();\n\n\t\t//Generate block 16 (50x57)\n\t\t//(64,188)-(114,245)\n\t\tmakeIHouse();\n\t\tmakeBlocker16();\n\n\t\t//Generate block 17 (80x57)\n\t\t//(121,188)-(201,245)\n\t\tmakeBlocker17();\n\t\tmakeDakota();\n\n\t\t//Generate block 18 (65x57)\n\t\t//(208,188)-(273,245)\n\t\tmakeBlocker18();\n\n\t\t//Generate block 19 (63x57)\n\t\t//(280,188)-(343,245)\n\t\tmakeBlocker19();\n\t\tmakeElliot();\n\t\tmakeThurston();\n\t}",
"void fetchForSaleHousesData();",
"public void update()\r\n\t{\r\n\t\tList<Unit> deadButNotFinished = new ArrayList<Unit>();\r\n\t\t//first check for dead units\r\n\t\tfor(int i = 0; i < units.size();)\r\n\t\t\tif(units.get(i).getState() == MapItemState.Dead && units.get(i).finished()) {\r\n\t\t\t\towner.notifySweepAndPruneUnitRemoved(units.remove(i));\r\n\t\t\t} else if(units.get(i).getState().equals(MapItemState.Dead)) {\r\n\t\t\t\tdeadButNotFinished.add(units.remove(i));\r\n\t\t\t} else {\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t\r\n\t\t//don't do anything if there are no units\r\n\t\tif(units.size() <= 0 && deadButNotFinished.size() <= 0)\r\n\t\t{\r\n\t\t\tinCombat = false;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\r\n\t\t//if(!(units.get(0) instanceof Gate))\r\n\t\t\t//System.out.println(\"Unit position == \" + units.get(0).getPosition().getX() + \", \" + units.get(0).getPosition().getY());\r\n\t\t\r\n\t\t//first get the max radius\r\n\t\tdouble maxRad = 0;\r\n\t\tPosition center = this.getCenter();\r\n\t\tfor(Unit u : units)\r\n\t\t{\r\n\t\t\tdouble rad = Math.sqrt(center.distanceSquared(u.getPosition())) + u.getCombatStrategy().getRange();\r\n\t\t\tif(rad > maxRad)\r\n\t\t\t\tmaxRad = rad;\r\n\t\t}\r\n\t\t\r\n\t\t//this is to prevent units from doing a run by on accident\r\n\t\tif(maxRad < owner.getWidth())\r\n\t\t\tmaxRad = owner.getWidth();\r\n\t\t\r\n\t\tAABB box = new AABB(center.getX() - maxRad, center.getY() - maxRad, \r\n\t\t\t\tcenter.getX() + maxRad, center.getY() + maxRad);\r\n\t\tList<Unit> unitsInRange = owner.getUnitsIn(box);\r\n\t\tList<Unit> alliesInRange = new ArrayList<Unit>();\r\n\t\t//remove friendly units\r\n\t\tfor(int i = 0; i < unitsInRange.size();)\r\n\t\t\tif(unitsInRange.get(i).getOwner().equals(units.get(0).getOwner()))\r\n\t\t\t\talliesInRange.add(unitsInRange.remove(i));\r\n\t\t\telse\r\n\t\t\t\ti++;\r\n\t\t\r\n\t\t//if there are units, we're in combat!\r\n\t\tif(unitsInRange.size() > 0)\r\n\t\t{\r\n\t\t\t//for efficiency reasons\r\n\t\t\tUnit[] unitsInRangeArray = unitsInRange.toArray(new Unit[unitsInRange.size()]);\r\n\t\t\tUnit[] alliesInRangeArray = alliesInRange.toArray(new Unit[alliesInRange.size()]);\r\n\t\t\tfor(Unit u : units)\r\n\t\t\t\tu.getCombatStrategy().fight(unitsInRangeArray, alliesInRangeArray);\r\n\t\t\tinCombat = true;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tinCombat = false;\r\n\t\t\t//figure out which direction we're going\r\n\t\t\tboolean forward = true;\r\n\t\t\tif (origin.getTransformation().getPosition().distanceSquared(\r\n\t\t\t\t\towner.getPosition(1).getPosition()) < origin.getTransformation().getPosition()\r\n\t\t\t\t\t.distanceSquared(owner.getPosition(0).getPosition()))\r\n\t\t\t\tforward = false;\r\n\t\t\t\r\n\t\t\t//we're gonna move straight forward because I said so -Connor\r\n\t\t\tdouble wayTheFuckOutThere = 100000000;\r\n\t\t\tdouble min = 1;\r\n\t\t\t\r\n\t\t\t//for efficiency reasons\r\n\t\t\tHashMap<Unit, Transformation> closestPoints = new HashMap<Unit, Transformation>();\r\n\t\t\t\r\n\t\t\t//go through each unit and see how far it's going to go\r\n\t\t\tfor(int i = 0; i < units.size();)\r\n\t\t\t{\r\n\t\t\t\tUnit u = units.get(i);\r\n\t\t\t\tdouble pos = u.getPositionAlongCurve();\r\n\t\t\t\tNode target = owner.getNodes()[0];\r\n\t\t\t\tif(target.equals(origin))\r\n\t\t\t\t\ttarget = owner.getNodes()[1];\r\n\t\t\t\t//check to see if we've made it to the node we're going for\r\n\t\t\t\t//also, don't allow entering the node if the gate is still up\r\n\t\t\t\tif(((forward && Math.abs(1 - pos) <= 0.01) || (!forward && Math.abs(pos) <= 0.01)) && \r\n\t\t\t\t\t\t(owner.getGate(target) == null || owner.getGate(target).getState().equals(MapItemState.Dead) \r\n\t\t\t\t\t\t\t\t|| u.getOwner().equals(owner.getGate(target).getOwner())))\r\n\t\t\t\t{\r\n\t\t\t\t\tif(target.getOwner() == null || target.isContested() || !target.getOwner().equals(u.getOwner()))\r\n\t\t\t\t\t\ttarget.setInvader(u.getOwner());\r\n\t\t\t\t\tu.setTransformation(target.getTransformation());\r\n\t\t\t\t\ttarget.addUnit(u);\r\n\t\t\t\t\towner.notifySweepAndPruneUnitRemoved(units.remove(i));\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t//if we're close enough but the gate isn't down\r\n\t\t\t\telse if((forward && Math.abs(1 - pos) <= 0.01) || (!forward && Math.abs(pos) <= 0.01))\r\n\t\t\t\t{\r\n\t\t\t\t\tTransformation t = owner.getPosition(pos);\r\n\t\t\t\t\tclosestPoints.put(u, t);\r\n\t\t\t\t\tu.setState(MapItemState.Idle);\r\n\t\t\t\t\tu.getMovementStrategy().setTarget(u.getTransformation());\r\n\t\t\t\t\ti++;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\ti++;\r\n\t\t\t\t\r\n\t\t\t\tTransformation t = owner.getPosition(pos);\r\n//\t\t\t\tif(Math.abs(t.getRotation()) < .001){\r\n//\t\t\t\t\tSystem.out.println(\"t's rotation is 0\");\r\n//\t\t\t\t}\r\n\t\t\t\tclosestPoints.put(u, t);\r\n\t\t\t\tdouble angle = t.getRotation();\r\n\t\t\t\tif(!forward)\r\n\t\t\t\t\tangle -= Math.PI;\r\n\t\t\t\tdouble m = u.getMovementStrategy().setTarget(\r\n\t\t\t\t\t\tnew Transformation(u.getPosition().add(\r\n\t\t\t\t\t\t\t\twayTheFuckOutThere * Math.cos(angle),\r\n\t\t\t\t\t\t\t\twayTheFuckOutThere * Math.sin(angle)), angle));\r\n\t\t\t\tif(m < min)\r\n\t\t\t\t\tmin = m;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//go through each unit and set its actual target\r\n\t\t\tdouble dis = wayTheFuckOutThere*min;\r\n\t\t\tfor(int i = 0; i < units.size(); i++)\r\n\t\t\t{\r\n\t\t\t\tdouble angle = closestPoints.get(units.get(i)).getRotation();\r\n\t\t\t\tif(!forward)\r\n\t\t\t\t\tangle -= Math.PI;\r\n//\t\t\t\tTransformation t = owner.getPosition(owner.getClosestPointRatio(closestPoints.get(i)\r\n//\t\t\t\t\t\t\t\t.getPosition().add(dis * Math.cos(angle),dis * Math.sin(angle)))); \r\n\t\t\t\tTransformation t = new Transformation(units.get(i).getPosition().add(dis*Math.cos(angle), dis*Math.sin(angle)), angle);\r\n\t\t\t\tunits.get(i).getMovementStrategy().setTarget(t);\r\n\t\t\t}\r\n\t\t\tinCombat = false;\r\n\t\t}\r\n\t\t\r\n\t\tfor(Unit u : units)\r\n\t\t{\r\n\t\t\tu.getMovementStrategy().move();\r\n\t\t\tu.updateMapItem();\r\n\t\t}\r\n\t\t\r\n\t\t//add the dead but not finished units back in\r\n\t\t//also call update for them so they may finish their abilities\r\n\t\tfor(Unit u : deadButNotFinished)\r\n\t\t{\r\n\t\t\tu.updateMapItem();\r\n\t\t\tunits.add(u);\r\n\t\t}\r\n\t\t\r\n\t\tfor(Unit u : unitsInNeedOfRemoval)\r\n\t\t{\r\n\t\t\tunits.remove(u);\r\n\t\t\towner.notifySweepAndPruneUnitRemoved(u);\r\n\t\t}\r\n\t\tunitsInNeedOfRemoval.clear();\r\n\t}",
"public abstract void constructHull();",
"@Override\r\n\tpublic Room buildRoom(final XMLTag piece, final Map<String,Object> defined, final Exit[] exits, final int direction) throws CMException\r\n\t{\r\n\t\taddDefinition(\"DIRECTION\",CMLib.directions().getDirectionName(direction).toLowerCase(),defined);\r\n\r\n\t\tfinal String classID = findStringNow(\"class\",piece,defined);\r\n\t\tfinal Room R = CMClass.getLocale(classID);\r\n\t\tif(R == null)\r\n\t\t\tthrow new CMException(\"Unable to build room on classID '\"+classID+\"', Data: \"+CMParms.toKeyValueSlashListString(piece.parms())+\":\"+CMStrings.limit(piece.value(),100));\r\n\t\taddDefinition(\"ROOM_CLASS\",classID,defined);\r\n\t\tfinal List<String> ignoreStats=new XArrayList<String>(new String[]{\"CLASS\",\"DISPLAY\",\"DESCRIPTION\"});\r\n\t\tfillOutRequiredStatCodeSafe(R, ignoreStats, \"ROOM_\", \"TITLE\", \"DISPLAY\", piece, defined);\r\n\t\tfillOutRequiredStatCodeSafe(R, ignoreStats, \"ROOM_\", \"DESCRIPTION\", \"DESCRIPTION\", piece, defined);\r\n\t\tfillOutCopyCodes(R, ignoreStats, \"ROOM_\", piece, defined);\r\n\t\tfillOutStatCodes(R, ignoreStats, \"ROOM_\", piece, defined);\r\n\t\tignoreStats.addAll(Arrays.asList(R.getStatCodes()));\r\n\t\tfillOutStatCodes(R.basePhyStats(),ignoreStats,\"ROOM_\",piece,defined);\r\n\t\tfinal List<MOB> mV = findMobs(piece,defined);\r\n\t\tfor(int i=0;i<mV.size();i++)\r\n\t\t{\r\n\t\t\tfinal MOB M=mV.get(i);\r\n\t\t\tM.setSavable(true);\r\n\t\t\tM.bringToLife(R,true);\r\n\t\t}\r\n\t\tfinal List<Item> iV = findItems(piece,defined);\r\n\t\tfor(int i=0;i<iV.size();i++)\r\n\t\t{\r\n\t\t\tfinal Item I=iV.get(i);\r\n\t\t\tR.addItem(I);\r\n\t\t\tI.setSavable(true);\r\n\t\t\tI.setExpirationDate(0);\r\n\t\t}\r\n\t\tfinal List<Ability> aV = findAffects(R,piece,defined,null);\r\n\t\tfor(int i=0;i<aV.size();i++)\r\n\t\t{\r\n\t\t\tfinal Ability A=aV.get(i);\r\n\t\t\tA.setSavable(true);\r\n\t\t\tR.addNonUninvokableEffect(A);\r\n\t\t}\r\n\t\tfinal List<Behavior> bV = findBehaviors(R,piece,defined);\r\n\t\tfor(int i=0;i<bV.size();i++)\r\n\t\t{\r\n\t\t\tfinal Behavior B=bV.get(i);\r\n\t\t\tB.setSavable(true);\r\n\t\t\tR.addBehavior(B);\r\n\t\t}\r\n\t\tfor(int dir=0;dir<Directions.NUM_DIRECTIONS();dir++)\r\n\t\t{\r\n\t\t\tExit E=exits[dir];\r\n\t\t\tif((E==null)&&(defined.containsKey(\"ROOMLINK_\"+CMLib.directions().getDirectionChar(dir).toUpperCase())))\r\n\t\t\t{\r\n\t\t\t\tdefined.put(\"ROOMLINK_DIR\",CMLib.directions().getDirectionChar(dir).toUpperCase());\r\n\t\t\t\tfinal Exit E2=findExit(R,piece, defined);\r\n\t\t\t\tif(E2!=null)\r\n\t\t\t\t\tE=E2;\r\n\t\t\t\tdefined.remove(\"ROOMLINK_DIR\");\r\n\t\t\t\tif(CMSecurity.isDebugging(CMSecurity.DbgFlag.MUDPERCOLATOR))\r\n\t\t\t\t\tLog.debugOut(\"MUDPercolator\",\"EXIT:NEW:\"+((E==null)?\"null\":E.ID())+\":DIR=\"+CMLib.directions().getDirectionChar(dir).toUpperCase()+\":ROOM=\"+R.getStat(\"DISPLAY\"));\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\tif((CMSecurity.isDebugging(CMSecurity.DbgFlag.MUDPERCOLATOR))\r\n\t\t\t&&defined.containsKey(\"ROOMLINK_\"+CMLib.directions().getDirectionChar(dir).toUpperCase()))\r\n\t\t\t\tLog.debugOut(\"MUDPercolator\",\"EXIT:OLD:\"+((E==null)?\"null\":E.ID())+\":DIR=\"+CMLib.directions().getDirectionChar(dir).toUpperCase()+\":ROOM=\"+R.getStat(\"DISPLAY\"));\r\n\t\t\tR.setRawExit(dir, E);\r\n\t\t\tR.startItemRejuv();\r\n\t\t}\r\n\t\treturn R;\r\n\t}",
"public interface Outfits extends Serializable {\r\n\r\n /**\r\n * @return the id of an outfit.\r\n */\r\n UUID getId();\r\n\r\n /**\r\n * @return an outfit.\r\n */\r\n List<UUID> getOutfit();\r\n\r\n /**\r\n * @return the name of an outfit.\r\n */\r\n String getName();\r\n\r\n /**\r\n * @return how many times an outfit was worn.\r\n */\r\n Integer getWornCount();\r\n\r\n /**\r\n * @return the outfit's type.\r\n */\r\n Outfit getOutfitType();\r\n\r\n /**\r\n * @return the creation date of an outfit.\r\n */\r\n LocalDate getDate();\r\n\r\n /**\r\n * @param dressList\r\n * a container with some dresses.\r\n *\r\n * @return a new outfit.\r\n */\r\n Outfits createOutfit(List<UUID> dressList);\r\n\r\n /**\r\n * @param categoryMap\r\n * a container with all the dresses.\r\n *\r\n * @return a new outfit (generated).\r\n */\r\n Outfits createOutfit(Map<Category, Categories> categoryMap);\r\n\r\n /**\r\n * @param name\r\n * the name of the outfit to assign.\r\n * @return the result of the operation.\r\n */\r\n Status setName(String name);\r\n\r\n /**\r\n * This method increments by one the worn count of a particular outfit.\r\n * \r\n * @return the result of the operation.\r\n */\r\n Status setWornCount();\r\n\r\n /**\r\n * @param date\r\n * the updated date of an outfit when it's modified.\r\n * \r\n * @return the result of the operation.\r\n */\r\n Status setDate(LocalDate date);\r\n\r\n /**\r\n * @param dressList\r\n * a list with some dresses ids.\r\n * \r\n * @return the result of the operation.\r\n */\r\n Status setOutfit(List<UUID> dressList);\r\n}",
"public static void main(String[] ar){\n Room living = new Room(\"Living\");\n Room kitchen = new Room(\"Kitchen\");\n Room bathroom = new Room(\"Bathroom\");\n Room garage = new Room(\"Garage\");\n \n Room bedroom1 = new Room(\"Bedroom1\");\n Room bedroom2 = new Room(\"Bedroom2\");\n Room bathroom1stf=new Room(\"Bathroom\");\n \n \n //Living\n living.addDevice(new Device(\"Aire acondicionado\", \"LG\", \"pm07sp\", true));\n living.addDevice(new Device(\"Luces\", \"Philips\", \"Hue\", true));\n //Kitchen\n kitchen.addDevice(new Device(\"luces\",\"Ahorradoras\",\"34234\", true));\n //Bathroom\n bathroom.addDevice(new Device(\"luce\",\"simple\",\"354676\", true));\n //Garage\n garage.addDevice(new Device(\"lightbulb\",\"the best\",\"X3000\",true));\n \n //Bedroom 1\n bedroom1.addDevice(new Device(\"Aire acondicionado\", \"Mabe\" , \"Mmt12cdbs3\", true));\n bedroom1.addDevice(new Device(\"Luces\",\"Philips\",\"EcoVantage\",true));\n \n //Bedroom 2\n bedroom2.addDevice(new Device(\"Aire acondicionado\", \"Hisense\" , \"AS-12CR5FVETD/1TR\", true));\n bedroom2.addDevice(new Device(\"Luces\",\"Ho Iluminacion\",\"A19 60W Claro\",true));\n \n //baño primer piso\n bathroom1stf.addDevice(new Device(\"Luces\",\"Alefco\",\"lw100\",true));\n \n \n \n Level groundFloor = new Level(\"Ground Floor\");\n Level firstFloor = new Level(\"First Floor\");\n \n \n groundFloor.addRoom(living);\n groundFloor.addRoom(kitchen);\n groundFloor.addRoom(bathroom);\n groundFloor.addRoom(garage);\n \n firstFloor.addRoom(bedroom1);\n firstFloor.addRoom(bedroom2);\n firstFloor.addRoom(bathroom1stf);\n \n\n House myhouse = new House(\"MyHome\");\n \n myhouse.addLevel(groundFloor);\n myhouse.addLevel(firstFloor);\n \n System.out.println(myhouse);\n \n \n /*\n room.addDevice(new Device(\"Reynaldo\", \"LG\", \"123456\", true));\n room.addDevice(new Device(\"Andrea\", \"Nokia\", \"Lumia-520\", true));\n room.addDevice(new Device(\"Karina\",\"Panasonic\",\"465464\", true));\n room.addDevice(new Device(\"Martin\", \"ZTE\", \"V7\",true));\n room.addDevice(new Device(\"Antonio\",\"Samsung\",\"J5\",true));\n room.addDevice(new Device(\"Roberto\",\"HP\",\"SpectreX360\",true));\n room.addDevice(new Device(\"Gabriel\",\"Linu\",\"Ilium_S106\",true));\n room.addDevice(new Device (\"Limberth\",\"LG\", \"lg-206\",true));\n room.addDevice(new Device(\"jesus\", \"hp\",\"2997\", true));\n room.addDevice(new Device(\"Rich\", \"Asus\",\"Zenfone_4_Max\",true));\n room.addDevice(new Device(\"Adrian\",\"Apple\",\"SE\",true));\n room.addDevice(new Device (\"Jonatan\",\"samsung\",\"J5\",true));\n room.addDevice(new Device(\"Jessica\", \"Huaweii\", \"P9LITE\", true));\n */\n \n \n \n \n \n }",
"public void addRandoms() {\n //Add random boulders on tiles that aren't Lava\n int tileNumber;\n int selector;\n Tile t;\n String tileTexture;\n Random random = new Random();\n SquareVector playerPos = getPlayerEntity().getPosition();\n int tileCount = GameManager.get().getWorld().getTiles().size();\n AbstractWorld world = GameManager.get().getWorld();\n int randIndex;\n\n for (int i = 0; i < 20; i++) {\n //Get respective volcano tile (5 <= Lava tiles Index <= 8\n do {\n randIndex = random.nextInt(tileCount);\n t = world.getTile(randIndex);\n } while (t.getCoordinates().isCloseEnoughToBeTheSame(playerPos));\n\n tileTexture = t.getTextureName();\n tileNumber = Integer.parseInt(tileTexture.split(\"_\")[1]);\n\n selector = random.nextInt(2);\n if (tileNumber < 5 && tileNumber > 1 && selector == 1 && !t.hasParent()) {\n entities.add(new Rock(t, true));\n } else if (t != null && (tileNumber == 3 || tileNumber == 4) &&\n selector == 0 && !t.hasParent()) {\n entities.add(new VolcanoBurningTree(t, true));\n } else {\n i--;\n }\n }\n }",
"@Override\n\tprotected void generateTiles() {\n\t}",
"@Override\n public void build() {\n\n // Create the missive\n this.createMissive();\n }",
"public void populate() { \n \n // make some grounds\n ground1 = new Body(world, PolygonShape.makeBox(100, 5), Body.Type.STATIC);\n ground1.setPosition(new Vec2(-380, -200));\n \n Body ground2 = new Body(world, PolygonShape.makeBox(100, 5), Body.Type.STATIC);\n ground2.setPosition(new Vec2(-0, -200));\n\n Body ground3 = new Body(world, PolygonShape.makeBox(100, 5), Body.Type.STATIC);\n ground3.setPosition(new Vec2(300, -100));\n \n // make a moving platform \n Body movingPlatform = new SlidingPlatform(world, PolygonShape.makeBox(100, 5), new Vec2(130, 0), 2);\n movingPlatform.setPosition(new Vec2(-260, -150));\n \n // make some bottles\n Bottle bottle1 = new Bottle(game);\n bottle1.putOn(ground1);\n bottle1.setName(\"bottle1\");\n \n Bottle bottle2 = new Bottle(game);\n bottle2.putOn(ground2);\n bottle2.setName(\"bottle2\");\n \n Bottle bottle3 = new Bottle(game);\n bottle3.putOn(ground3);\n bottle3.setName(\"bottle3\");\n \n // show dialog with information about level\n JOptionPane.showMessageDialog(frame, \"Press N or M to throw bottles to kill Boxies.\", \"Level instructions:\", JOptionPane.PLAIN_MESSAGE);\n \n // make some boxies\n Boxy boxy1 = new Boxy(game);\n boxy1.setName(\"boxy1\");\n Vec2 vec1 = new Vec2(100, 0);\n boxy1.move(vec1);\n\n Boxy boxy2 = new Boxy(game);\n boxy2.setName(\"boxy2\");\n Vec2 vec2 = new Vec2(-100, 200);\n boxy2.move(vec2);\n\n Boxy boxy3 = new Boxy(game);\n boxy3.setName(\"boxy3\");\n Vec2 vec3 = new Vec2(-400, 200);\n boxy3.move(vec3);\n \n }",
"public static CreationEntry createMetallicEntries(int aPrimarySkill, int aObjectSource, int aObjectTarget, int aObjectCreated, boolean depleteSource, boolean depleteTarget, float aPercentageLost, boolean depleteEqually, boolean aCreateOnGround, CreationCategories aCategory) {\n/* 3596 */ CreationEntry defaultEntry = createSimpleEntry(aPrimarySkill, aObjectSource, aObjectTarget, aObjectCreated, depleteSource, depleteTarget, aPercentageLost, depleteEqually, aCreateOnGround, aCategory);\n/* */ \n/* */ \n/* 3599 */ if (ItemFactory.isMetalLump(aObjectTarget)) {\n/* */ \n/* 3601 */ for (int targetTemplateId : ItemFactory.metalLumpList)\n/* */ {\n/* 3603 */ if (targetTemplateId != aObjectTarget)\n/* */ {\n/* */ \n/* 3606 */ createSimpleEntry(aPrimarySkill, aObjectSource, targetTemplateId, aObjectCreated, depleteSource, depleteTarget, aPercentageLost, depleteEqually, aCreateOnGround, aCategory);\n/* */ }\n/* */ }\n/* */ \n/* 3610 */ } else if (ItemFactory.isMetalLump(aObjectSource)) {\n/* */ \n/* 3612 */ for (int sourceTemplateId : ItemFactory.metalLumpList) {\n/* */ \n/* 3614 */ if (sourceTemplateId != aObjectSource)\n/* */ {\n/* */ \n/* 3617 */ createSimpleEntry(aPrimarySkill, sourceTemplateId, aObjectTarget, aObjectCreated, depleteSource, depleteTarget, aPercentageLost, depleteEqually, aCreateOnGround, aCategory);\n/* */ }\n/* */ } \n/* */ } \n/* */ \n/* 3622 */ return defaultEntry;\n/* */ }",
"private void buildHashSet(int capacity, ClosedHashCell[] hashSet){\r\n for (int i=0; i < capacity; i++){\r\n hashSet[i] = new ClosedHashCell();\r\n }\r\n }",
"private void init()\n\t{\n\t\tselectedUnits = new ArrayList<UnitEntry>();\n\n\t\tif (!player.isHuman())\n\t\t{\n\t\t\tArrayList<UnitEntry> unitTypes = new ArrayList<UnitEntry>(units);\n\t\t\tfor (int i = 0; i < maxUnits; i++)\n\t\t\t{\n\t\t\t\tplayer.addUnit(new Unit(\n\t\t\t\t\t\tunitTypes.get((int) (Math.random() * maxUnits)), player));\n\t\t\t}\n\t\t\tcompleted = true;\n\t\t}\n\t}",
"public static void init() {\n buildings = new HashMap<Long, JSONObject>();\n arr = new ArrayList();\n buildingOfRoom = new HashMap<Long, Long>();\n }",
"private void buildCategories() {\n List<Category> categories = categoryService.getCategories();\n if (categories == null || categories.size() == 0) {\n throw new UnrecoverableApplicationException(\n \"no item types found in database\");\n }\n\n Map<Category, List<Category>> categoriesMap = new HashMap<Category, List<Category>>();\n for (Category subCategory : categories) {\n Category parent = subCategory.getParentCategory();\n if (categoriesMap.get(parent) == null) {\n categoriesMap.put(parent, new ArrayList<Category>());\n categoriesMap.get(parent).add(subCategory);\n } else {\n categoriesMap.get(parent).add(subCategory);\n }\n }\n\n this.allCategories = categories;\n this.sortedCategories = categoriesMap;\n }",
"public Scenario() {\n Room ninjaRoom, weaponroom, meetingRoom, zenTemple, stealthRoom, restRoom, masterRoom, ninjaTransporter;\n\n // create the rooms\n ninjaRoom = new Room(\"in the main enterence to the camp. You'll need to walk 10000 steps to get to the next room.\");\n weaponroom = new Room(\"in the Weapon's room. Normally this is where you go to grab your Nunchaku, but not today.\");\n meetingRoom = new Room(\"in the Meeting room. This is where classes are normally held. We will be here tomorrow to be sure\");\n zenTemple = new Room(\"in the Meditation room. When done for the day, this is where you clear your head.\");\n stealthRoom = new Room(\"in the Stealth training room. Ninja are made here, slow but steady will keep you alive.\");\n restRoom = new Room(\"in the Barracks. When I am done for th day, I will come back here for some rest.\");\n masterRoom = new Room(\"in the Master's room. Master is current meditating right now. Better leave him alone.\");\n ninjaTransporter = new TransporterRoom(\"in the secret Shumpo room...with this I can teleport anywhere\", this);\n\n weaponroom.addItem(new Item(\"Katana\", 3));\n weaponroom.addItem(new Item(\"Nunchaku\", 1));\n weaponroom.addItem(new Item(\"Bo\", 2));\n weaponroom.addItem(new Item(\"Sai\", 2));\n ninjaRoom.addItem(new Item(\"Master's Keys\", 1));\n meetingRoom.addItem(new Item(\"Secret Plans\", 1));\n zenTemple.addItem(new Item(\"Prayer beads\", 1));\n stealthRoom.addItem(new Item(\"Throwing Star\", 2));\n restRoom.addItem(new Item(\"Risque magazines\", 1));\n masterRoom.addItem(new Item(\"Ancient Shinobi Scroll\", 5));\n\n // initialise room exits\n ninjaRoom.setExits(\"north\", ninjaTransporter);\n\n ninjaTransporter.setExits(\"north\", weaponroom);\n ninjaTransporter.setExits(\"south\", ninjaRoom);\n\n weaponroom.setExits(\"north\", meetingRoom);\n weaponroom.setExits(\"south\", ninjaTransporter);\n\n meetingRoom.setExits(\"north\", stealthRoom);\n meetingRoom.setExits(\"east\", restRoom);\n meetingRoom.setExits(\"south\", weaponroom);\n meetingRoom.setExits(\"west\", zenTemple);\n\n zenTemple.setExits(\"east\", meetingRoom);\n\n stealthRoom.setExits(\"south\", meetingRoom);\n\n restRoom.setExits(\"east\", masterRoom);\n restRoom.setExits(\"west\", meetingRoom);\n\n masterRoom.setExits(\"west\", restRoom);\n\n // Set the start room\n startRoom = ninjaRoom; // start game @ ninjaRoom\n\n rooms = new ArrayList();\n rooms.add(ninjaRoom);\n rooms.add(weaponroom);\n rooms.add(meetingRoom);\n rooms.add(zenTemple);\n rooms.add(stealthRoom);\n rooms.add(restRoom);\n rooms.add(masterRoom);\n rooms.add(ninjaTransporter);\n\n random = new Random();\n }",
"void _lookupUnit( WorkUnit inWU )\r\n\t{\r\n\t\t_lookupUnit( inWU, true, false );\r\n\t}",
"private void generateItemEntities(){\n\t\tfinal int NUM_POTIONS = 6;\n\t\tfinal int NUM_IRON_ARMOUR = 1;\n\t\tfinal int NUM_CHESTS = 2;\n\t\tfinal String ITEM_BOX_STYLE = \"tundra\";\n\t\t\n\n\t\tfor (int i = 0; i < NUM_POTIONS; i++) {\n\t\t\tTile tile = getTile(Item.randomItemPositionGenerator(DEFAULT_WIDTH),\n\t\t\t\t\tItem.randomItemPositionGenerator(DEFAULT_HEIGHT));\n\t\t\tif (!tile.hasParent()) {\n\t\t\t\tHealthPotion potion = new HealthPotion(tile, false,(PlayerPeon) getPlayerEntity(), ITEM_BOX_STYLE);\n\t\t\t\tentities.add(potion);\n\t\t\t\tthis.allTundraDialogues.add(potion.getDisplay());\n\t\t\t} else {\n\t\t\t\ti--;\n\t\t\t}\n\n\t\t}\n\t\tfor (int i = 0; i < NUM_IRON_ARMOUR; i++) {\n\t\t\tTile tile = getTile(Item.randomItemPositionGenerator(DEFAULT_WIDTH),\n\t\t\t\t\tItem.randomItemPositionGenerator(DEFAULT_HEIGHT));\n\t\t\tif (!tile.hasParent()) {\n\t\t\t\tIronArmour ironArmour = new IronArmour(tile, false,\n\t\t\t\t\t\t(PlayerPeon) getPlayerEntity(), ITEM_BOX_STYLE,200);\n\t\t\t\tentities.add(ironArmour);\n\t\t\t\tthis.allTundraDialogues.add(ironArmour.getDisplay());\n\t\t\t} else {\n\t\t\t\ti--;\n\t\t\t}\n\n\t\t}\n\t\tfor (int i = 0; i < NUM_CHESTS; i++) {\n\t\t\tTile tile = getTile(Item.randomItemPositionGenerator(DEFAULT_WIDTH),\n\t\t\t\t\tItem.randomItemPositionGenerator(DEFAULT_HEIGHT));\n\t\t\tif (!tile.hasParent()) {\n\t\t\t\tTreasure chest = new Treasure(tile, false,(PlayerPeon) getPlayerEntity(), ITEM_BOX_STYLE);\n\t\t\t\tentities.add(chest);\n\t\t\t\tthis.allTundraDialogues.add(chest.getDisplay());\n\t\t\t} else {\n\t\t\t\ti--;\n\t\t\t}\n\t\t}\n\n\t\tTile cooldownring = getTile(18,17);\n\t\tCooldownRing cdring = new CooldownRing(cooldownring, false,\n\t\t\t\t(PlayerPeon) this.getPlayerEntity(), ITEM_BOX_STYLE,0.5f);\n\t\tentities.add(cdring);\n\t\tthis.allTundraDialogues.add(cdring.getDisplay());\n\n\t\tTile attackAmuletTile = getTile(-19,14);\n\t\tAmulet attackAmulet = new Amulet(attackAmuletTile, false,\n\t\t\t\t(PlayerPeon) this.getPlayerEntity(), ITEM_BOX_STYLE,10);\n\t\tentities.add(attackAmulet);\n\t\tthis.allTundraDialogues.add(attackAmulet.getDisplay());\n\n\t}",
"@Test\n public void getAllComputerBuildsFromUser() {\n Iterable<ComputerBuild> computerBuilds = computerBuildService.getAllComputerBuildsFromUser(ANOTHER_USER_NAME_TO_CREATE_NEW_USER);\n assertNotNull(computerBuilds);\n assertNotEquals(0, computerBuilds.spliterator().getExactSizeIfKnown());\n }",
"public BeautyCustomizedLevel(int width, int height, long seed, int difficulty, int type,int count,int num_ODDS_HILL_STRAIGHT,int num_ODDS_TUBES, int num_ODDS_JUMP,\r\n\t\t\t\tint num_ODDS_CANNONS, int num_BLOCK_ELEMENT, int num_COINS, int num_ENEMY_RED_KOOPA, int num_ENEMY_GREEN_KOOPA, int num_ENEMY_GOOMBA, \r\n\t\t\t\tint num_ENEMY_SPIKY, int num_ENEMY_FLOWER, int num_ENEMY_ARMORED_TURTLE, int num_ENEMY_JUMP_FLOWER, int num_ENEMY_CANNON_BALL,\r\n\t\t\t\tint num_ENEMY_CHOMP_FLOWER,int num_ODDS_TUBES_FLOWER,int num_ODDS_HILL_STRAIGHT_FLOAT,int num_WOOD,int num_SMALL_TUBE,int num_BLOCK_BLUE,int num_BLOCK_WOOD)\r\n\t {\r\n\t\t\t\r\n\t this(width, height);\r\n\t creatManySearches(seed, difficulty, type,num_ODDS_HILL_STRAIGHT,num_ODDS_TUBES, num_ODDS_JUMP,\r\n\t \t\t\tnum_ODDS_CANNONS, num_BLOCK_ELEMENT, num_COINS, num_ENEMY_RED_KOOPA, num_ENEMY_GREEN_KOOPA, num_ENEMY_GOOMBA, \r\n\t \t\t\tnum_ENEMY_SPIKY, num_ENEMY_FLOWER, num_ENEMY_ARMORED_TURTLE, num_ENEMY_JUMP_FLOWER, num_ENEMY_CANNON_BALL,\r\n\t \t\t\tnum_ENEMY_CHOMP_FLOWER,count,num_ODDS_TUBES_FLOWER,num_ODDS_HILL_STRAIGHT_FLOAT,num_WOOD,num_SMALL_TUBE,num_BLOCK_BLUE,num_BLOCK_WOOD);\r\n\t \r\n\t \r\n\t }",
"public void createRooms()\n { \n // create the rooms\n //RDC//\n hall = new Room(\"Hall\", \"..\\\\pictures\\\\Rooms\\\\hall.png\");\n banquetinghall = new Room (\"Banqueting hall\", \"..\\\\pictures\\\\Rooms\\\\banquet.png\");\n poolroom = new Room (\"PoolRoom\", \"..\\\\pictures\\\\Rooms\\\\billard.png\");\n dancingroom = new Room (\"Dancing Room\", \"..\\\\pictures\\\\Rooms\\\\bal.png\");\n kitchen = new Room(\"Kitchen\", null);\n garden = new Room(\"Garden\", null);\n well = new Room(\"Well\", null);\n gardenerhut = new Room(\"Gardener hut\", null);\n //Fin RDN //\n \n //-1//\n anteroom = new Room(\"Anteroom\", null);\n ritualroom = new Room(\"Ritual Room\", null);\n cellar = new Room(\"Cellar\", null);\n // FIN -1//\n // +1 //\n livingroom = new Room(\"Living Room\", null); \n library = new Room (\"Library\", null);\n laboratory = new Room(\"Laboratory\", null);\n corridor= new Room(\"Corridor\", null);\n bathroom = new Room(\"Bathroom\", null);\n bedroom = new Room(\"Bedroom\", null);\n guestbedroom = new Room(\"Guest Bedroom\", null); \n //FIN +1 //\n //+2//\n attic = new Room(\"Attic\", null);\n //Fin +2//\n //Fin create room // \n \n // initialise room exits\n //RDC\n hall.setExits(\"north\",garden, false, \"> You must explore the mansion before\");\n hall.setExits(\"south\",banquetinghall, true, null); \n banquetinghall.setExits(\"north\",hall, true, null);\n banquetinghall.setExits(\"south\",dancingroom, false, \"> The door is blocked by Bob's toys\");\n banquetinghall.setExits(\"east\",kitchen, true, null);\n banquetinghall.setExits(\"west\",poolroom, true, null);\n //poolroom.setExits(\"east\",banquetinghall, false, \"> You have not finished examining the crime scene\");\n poolroom.setExits(\"east\",banquetinghall, true, \"> You have not finished examining the crime scene\");\n dancingroom.setExits(\"north\",banquetinghall, true, null);\n dancingroom.setExits(\"up\",livingroom, true, null);\n kitchen.setExits(\"west\",banquetinghall, true, null);\n kitchen.setExits(\"down\",cellar, true, null);\n garden.setExits(\"south\",hall, true, null);\n garden.setExits(\"north\",well, true, null);\n garden.setExits(\"east\",gardenerhut, true, null);\n well.setExits(\"south\",garden, true, null);\n gardenerhut.setExits(\"west\",garden, true, null);\n //gardenerhut.setExits(\"down\",anteroom, false, null);\n //-1// \n anteroom.setExits(\"south\",ritualroom, true, null);\n anteroom.setExits(\"up\",gardenerhut, false, \"> The door is locked. You cannot go backward\");\n anteroom.setExits(\"west\",cellar, true, null);\n ritualroom.setExits(\"north\",anteroom, true, null);\n cellar.setExits(\"up\",kitchen, true, null);\n //cellar.setExits(\"east\", anteroom, false); To unlock\n //+1//\n livingroom.setExits(\"down\",dancingroom, true, null);\n livingroom.setExits(\"north\",library, true, null);\n livingroom.setExits(\"west\",corridor, true, null);\n library.setExits(\"south\",livingroom, true, null);\n //library.setExits(\"north\",laboratory, false); To unlock\n laboratory.setExits(\"south\",library, true, null);\n corridor.setExits(\"north\",bathroom, true, null);\n corridor.setExits(\"south\",bedroom, false, \"> The door is locked. A key may be mandatory\");\n corridor.setExits(\"east\",livingroom, true, null);\n corridor.setExits(\"west\",guestbedroom, true, null);\n corridor.setExits(\"up\",attic, false, \"> You see a weird lock in the ceiling\");\n bathroom.setExits(\"south\",corridor, true, null);\n bedroom.setExits(\"north\",corridor, true, null);\n guestbedroom.setExits(\"east\",corridor, true, null);\n attic.setExits(\"down\",corridor, true, null);\n \n //currentRoom = poolroom; // start game outside\n currentRoom = poolroom;\n }",
"public abstract Set<Tile> getNeighbors(Tile tile);",
"private void obtainProblem(){\n followers = frame.getFollowers();\n followers = Math.min(followers, CreatureFactory.getStrongestMonster().getFollowers() * Formation.MAX_MEMBERS);\n maxCreatures = frame.getMaxCreatures();\n heroes = frame.getHeroes();//is this field needed?\n prioritizedHeroes = frame.getHeroes(Priority.ALWAYS);\n //create boss formation\n LinkedList<Creature> list = new LinkedList<>();\n list.add(frame.getBoss());\n bossFormation = new Formation(list);\n containsRandomBoss = bossFormation.containsRandomHeroes();\n yourRunes = frame.getYourRunes();\n for (int i = 0; i < Formation.MAX_MEMBERS; i++){\n //System.out.println(yourRunes[i]);\n if (!(yourRunes[i] instanceof Nothing)){\n hasRunes = true;\n //System.out.println(\"hasRunes\");\n break;\n }\n }\n \n NHWBEasy = heroes.length == 0 && prioritizedHeroes.length == 0 && frame.getBoss().getMainSkill().WBNHEasy() && !hasRunes && !containsRandomBoss;\n \n }",
"private static Achievement createCuistotAchievement(){\n\n ArrayList<String> picturesPaths = new ArrayList<>();\n picturesPaths.add(\"cuistot_none\");\n picturesPaths.add(\"cuistot_bronze\");\n picturesPaths.add(\"cuistot_silver\");\n picturesPaths.add(\"cuistot_diamond\");\n\n ArrayList<String> picturesLabels = new ArrayList<>();\n picturesLabels.add(\"No recipes\");\n picturesLabels.add(\"Starting Chef\");\n picturesLabels.add(\"Casual Chef\");\n picturesLabels.add(\"Legacy Chef\");\n\n ArrayList<Integer> levelSteps = new ArrayList<>();\n levelSteps.add(1);\n levelSteps.add(10);\n levelSteps.add(50);\n\n Function<User, Integer> getUserNbRecipes = u -> u.getRecipes().size();\n\n return new Achievement(\"cuistot\", STANDARD_NB_LEVELS, picturesPaths, picturesLabels, levelSteps, getUserNbRecipes);\n }",
"public static void main(String[] args) {\n City city = new City(60, 200);\n TourManager.addCity(city);\n City city2 = new City(180, 200);\n TourManager.addCity(city2);\n City city3 = new City(80, 180);\n TourManager.addCity(city3);\n City city4 = new City(140, 180);\n TourManager.addCity(city4);\n City city5 = new City(20, 160);\n TourManager.addCity(city5);\n City city6 = new City(100, 160);\n TourManager.addCity(city6);\n City city7 = new City(200, 160);\n TourManager.addCity(city7);\n City city8 = new City(140, 140);\n TourManager.addCity(city8);\n City city9 = new City(40, 120);\n TourManager.addCity(city9);\n City city10 = new City(100, 120);\n TourManager.addCity(city10);\n City city11 = new City(180, 100);\n TourManager.addCity(city11);\n City city12 = new City(60, 80);\n TourManager.addCity(city12);\n City city13 = new City(120, 80);\n TourManager.addCity(city13);\n City city14 = new City(180, 60);\n TourManager.addCity(city14);\n City city15 = new City(20, 40);\n TourManager.addCity(city15);\n City city16 = new City(100, 40);\n TourManager.addCity(city16);\n City city17 = new City(200, 40);\n TourManager.addCity(city17);\n City city18 = new City(20, 20);\n TourManager.addCity(city18);\n City city19 = new City(60, 20);\n TourManager.addCity(city19);\n City city20 = new City(160, 20);\n TourManager.addCity(city20);\n\n // Initialize population\n Population pop = new Population(50, true);\n System.out.println(\"Initial distance: \" + pop.getFittest().getDistance());\n\n // Evolve population for 100 generations\n pop = GA.evolvePopulation(pop);\n for (int i = 0; i < 100; i++) {\n pop = GA.evolvePopulation(pop);\n }\n\n // Print final results\n System.out.println(\"Finished\");\n System.out.println(\"Final distance: \" + pop.getFittest().getDistance());\n System.out.println(\"Solution:\");\n System.out.println(pop.getFittest());\n }",
"public void createRooms()\n {\n Room outside,bedroom, bathroom, hallway1, hallway2, spareroom, kitchen, fridge;\n\n // create the rooms\n bedroom = new Room(\"Bedroom\", \"your bedroom. A simple room with a little bit too much lego\");\n bathroom = new Room(\"Bathroom\", \"the bathroom where you take your business calls. Also plenty of toilet paper\");\n hallway1 = new Room(\"Hallway1\", \"the hallway outside your room, there is a dog here blocking your path. Youll need to USE something to distract him\");\n hallway2 = new Room(\"Hallway2\", \"the same hallway? This part leads to the spare room and kitchen\");\n spareroom = new Room(\"Spare room\", \"the spare room. This is for guests\");\n kitchen = new Room(\"Kitchen\", \"your kitchen. There is a bowl with cereal in it waiting for you,But its still missing some things\");\n fridge = new Room (\"Walk in Fridge\", \"a walkin fridge. Have you ever seen Ratatouille? Its like that\");\n outside = new Room(\"Outside\", \"the outside world, breathe it in\");\n \n \n Item toiletPaper, milk, spoon, poison;// creates the items and sets their room\n \n toiletPaper = new Item(\"Toilet-Paper\", hallway1);\n toiletPaper.setDescription(\"Just your standard bog roll. Dont let your dog get a hold of it\");\n bathroom.setItems(\"Toilet-Paper\",toiletPaper);\n \n milk = new Item(\"Milk\", kitchen);\n milk.setDescription(\"white and creamy, just like mama used to make\");\n fridge.setItems(\"Milk\", milk);\n \n spoon = new Item(\"Spoon\", kitchen);\n spoon.setDescription(\"Like a fork but for liquids\");\n spareroom.setItems(\"Spoon\", spoon);\n \n poison = new Item(\"Poison\", outside);\n poison.setDescription(\"This will probably drain all of your energy, dont USE it\");\n outside.setItems(\"Poison\", poison);\n \n // initialise room exits\n bedroom.setExit(\"east\", bathroom);\n bedroom.setExit(\"north\", hallway1);\n \n bathroom.setExit(\"west\", bedroom);\n \n hallway1.setExit(\"south\", bedroom);\n hallway1.setExit(\"north\", hallway2);\n \n hallway2.setExit(\"south\", hallway1);\n hallway2.setExit(\"west\", spareroom);\n hallway2.setExit(\"north\", kitchen);\n \n spareroom.setExit(\"east\", hallway2);\n \n kitchen.setExit(\"east\", outside);\n kitchen.setExit(\"west\", fridge);\n \n fridge.setExit(\"east\", kitchen);\n \n \n outside.setExit(\"west\", kitchen);\n \n\n this.currentRoom = bedroom; // start game in bedroom\n \n }",
"@Override\n\tpublic int createHitos(Hitos h) {\n\t\treturn hitosDao.createHitos(h);\n\t}",
"private void createLookup() {\r\n\t\tcreateLooupMap(lookupMap, objectdef, objectdef.getName());\r\n\t\tcreateChildIndex(childIndex, objectdef, objectdef.getName());\r\n\r\n\t}",
"private Map<String, SortedSet<?>> getRegistryOriginal(WebRequest request, IPerson user) {\n\n /*\n * This collection of all the portlets in the portal is for the sake of\n * tracking which ones are uncategorized.\n */\n Set<IPortletDefinition> portletsNotYetCategorized =\n new HashSet<>(portletDefinitionRegistry.getAllPortletDefinitions());\n\n // construct a new channel registry\n Map<String, SortedSet<?>> rslt = new TreeMap<>();\n SortedSet<ChannelCategoryBean> categories = new TreeSet<>();\n\n // add the root category and all its children to the registry\n final PortletCategory rootCategory = portletCategoryRegistry.getTopLevelPortletCategory();\n final Locale locale = getUserLocale(user);\n categories.add(\n prepareCategoryBean(\n request, rootCategory, portletsNotYetCategorized, user, locale));\n\n /*\n * uPortal historically has provided for a convention that portlets not in any category\n * may potentially be viewed by users but may not be subscribed to.\n *\n * As of uPortal 4.2, the logic below now takes any portlets the user has BROWSE access to\n * that have not already been identified as belonging to a category and adds them to a category\n * called Uncategorized.\n */\n\n EntityIdentifier ei = user.getEntityIdentifier();\n IAuthorizationPrincipal ap =\n AuthorizationServiceFacade.instance().newPrincipal(ei.getKey(), ei.getType());\n\n // construct a new channel category bean for this category\n String uncategorizedString =\n messageSource.getMessage(UNCATEGORIZED, new Object[] {}, locale);\n ChannelCategoryBean uncategorizedPortletsBean =\n new ChannelCategoryBean(new PortletCategory(uncategorizedString));\n uncategorizedPortletsBean.setName(UNCATEGORIZED);\n uncategorizedPortletsBean.setDescription(\n messageSource.getMessage(UNCATEGORIZED_DESC, new Object[] {}, locale));\n\n for (IPortletDefinition portlet : portletsNotYetCategorized) {\n if (authorizationService.canPrincipalBrowse(ap, portlet)) {\n // construct a new channel bean from this channel\n ChannelBean channel = getChannel(portlet, request, locale, user);\n uncategorizedPortletsBean.addChannel(channel);\n }\n }\n // Add even if no portlets in category\n categories.add(uncategorizedPortletsBean);\n\n rslt.put(CATEGORIES_MAP_KEY, categories);\n return rslt;\n }",
"private void generateLoot( Integer lootLevel ){\n }",
"private void generateItemEntities(){\n final int NUM_POTIONS = 6;\n final int NUM_IRON_ARMOUR = 1;\n final int NUM_CHESTS = 2;\n final String ITEM_BOX_STYLE = \"volcano\";\n\n\n for (int i = 0; i < NUM_POTIONS; i++) {\n Tile tile = getTile(Item.randomItemPositionGenerator(DEFAULT_WIDTH),\n Item.randomItemPositionGenerator(DEFAULT_HEIGHT));\n if (Integer.parseInt(tile.getTextureName().split(\"_\")[1]) < 5\n && !tile.hasParent()) {\n HealthPotion potion = new HealthPotion(tile,false,\n (PlayerPeon) getPlayerEntity(), ITEM_BOX_STYLE);\n entities.add(potion);\n this.allVolcanoDialogues.add(potion.getDisplay());\n } else {\n i--;\n }\n }\n for (int i =0; i < NUM_IRON_ARMOUR; i++){\n Tile tile = getTile(Item.randomItemPositionGenerator(DEFAULT_WIDTH),\n Item.randomItemPositionGenerator(DEFAULT_HEIGHT));\n if (Integer.parseInt(tile.getTextureName().split(\"_\")[1]) < 5\n && !tile.hasParent()) {\n IronArmour ironArmour = new IronArmour(tile, false,\n (PlayerPeon) getPlayerEntity(),ITEM_BOX_STYLE,200);\n entities.add(ironArmour);\n this.allVolcanoDialogues.add(ironArmour.getDisplay());\n } else {\n i--;\n }\n }\n for (int i = 0; i <NUM_CHESTS; i++){\n Tile tile = getTile(Item.randomItemPositionGenerator(DEFAULT_WIDTH),\n Item.randomItemPositionGenerator(DEFAULT_HEIGHT));\n if (Integer.parseInt(tile.getTextureName().split(\"_\")[1]) < 5\n && !tile.hasParent()) {\n Treasure chest = new Treasure(tile, false,\n (PlayerPeon) getPlayerEntity(),ITEM_BOX_STYLE);\n entities.add(chest);\n this.allVolcanoDialogues.add(chest.getDisplay());\n } else {\n i--;\n }\n }\n\n Tile cooldownring = getTile(20,-7);\n CooldownRing cdring = new CooldownRing(cooldownring, false,\n (PlayerPeon) this.getPlayerEntity(), ITEM_BOX_STYLE,0.5f);\n entities.add(cdring);\n this.allVolcanoDialogues.add(cdring.getDisplay());\n\n Tile attackAmuletTile = getTile(2,14);\n Amulet attackAmulet = new Amulet(attackAmuletTile, false,\n (PlayerPeon) this.getPlayerEntity(), ITEM_BOX_STYLE,10);\n entities.add(attackAmulet);\n this.allVolcanoDialogues.add(attackAmulet.getDisplay());\n\n }",
"private void getData(){\n mapFStreets = new ArrayList<>();\n mapFAreas = new ArrayList<>();\n mapIcons = new ArrayList<>();\n coastLines = new ArrayList<>();\n //Get a rectangle of the part of the map shown on screen\n bounds.updateBounds(getVisibleRect());\n Rectangle2D windowBounds = bounds.getBounds();\n sorted = zoomLevel >= 5;\n\n coastLines = (Collection<MapFeature>) (Collection<?>) model.getVisibleCoastLines(windowBounds);\n\n Collection < MapData > bigRoads = model.getVisibleBigRoads(windowBounds, sorted);\n mapFStreets = (Collection<MapFeature>)(Collection<?>) bigRoads;\n\n if (drawAttributeManager.isTransport() && zoomLevel > 9)\n mapFAreas.addAll((Collection<MapFeature>)(Collection<?>) model.getVisibleLanduse(windowBounds, sorted));\n else if (zoomLevel > 4)\n mapFAreas.addAll((Collection<MapFeature>)(Collection<?>) model.getVisibleLanduse(windowBounds, sorted));\n\n if (drawAttributeManager.isTransport() && zoomLevel > 9)\n mapFAreas.addAll((Collection<MapFeature>)(Collection<?>)model.getVisibleNatural(windowBounds, sorted));\n else if (zoomLevel > 7)\n mapFAreas.addAll((Collection<MapFeature>)(Collection<?>)model.getVisibleNatural(windowBounds, sorted));\n\n if (drawAttributeManager.isTransport())\n mapFStreets.addAll((Collection<MapFeature>) (Collection<?>) model.getVisibleStreets(windowBounds, sorted));\n else if(zoomLevel > 7)\n mapFStreets.addAll((Collection<MapFeature>) (Collection<?>) model.getVisibleStreets(windowBounds, sorted));\n\n if (drawAttributeManager.isTransport())\n mapFStreets.addAll((Collection<MapFeature>) (Collection<?>) model.getVisibleRailways(windowBounds, sorted));\n else if(zoomLevel > 7) {\n mapFStreets.addAll((Collection<MapFeature>) (Collection<?>) model.getVisibleRailways(windowBounds, sorted));\n }\n\n if (drawAttributeManager.isTransport() && zoomLevel > 14)\n mapFAreas.addAll((Collection<MapFeature>)(Collection<?>) model.getVisibleBuildings(windowBounds, sorted));\n else if(zoomLevel > 10)\n mapFAreas.addAll((Collection<MapFeature>)(Collection<?>) model.getVisibleBuildings(windowBounds, sorted));\n\n if(zoomLevel > 14)\n mapIcons = (Collection<MapIcon>) (Collection<?>) model.getVisibleIcons(windowBounds);\n\n if (!drawAttributeManager.isTransport())\n mapFAreas.addAll((Collection<MapFeature>)(Collection<?>) model.getVisibleBigForests(windowBounds, sorted));\n else {\n if (zoomLevel > 3)\n mapFAreas.addAll((Collection<MapFeature>)(Collection<?>) model.getVisibleBigForests(windowBounds, sorted));\n }\n mapFAreas.addAll((Collection<MapFeature>) (Collection<?>) model.getVisibleBikLakes(windowBounds, sorted));\n\n }",
"private static Loot choosespecialedition() {\r\n final List<Loot> suitableLoot = new ArrayList<Loot>();\r\n // FIND ALL LOOT TYPES\r\n for (final Location loc : i.location) {\r\n if (loc.renting() == null) {\r\n continue;\r\n }\r\n for (final AbstractItem<? extends AbstractItemType> l : loc.lcs().loot) {\r\n if (!(l instanceof Loot)) {\r\n continue;\r\n }\r\n // Temporary, maybe put special edition definition into an xml\r\n // file. -XML\r\n if (l.id().equals(\"LOOT_CEOPHOTOS\") || l.id().equals(\"LOOT_CEOLOVELETTERS\")\r\n || l.id().equals(\"LOOT_CEOTAXPAPERS\") || l.id().equals(\"LOOT_INTHQDISK\")\r\n || l.id().equals(\"LOOT_CORPFILES\") || l.id().equals(\"LOOT_JUDGEFILES\")\r\n || l.id().equals(\"LOOT_RESEARCHFILES\") || l.id().equals(\"LOOT_PRISONFILES\")\r\n || l.id().equals(\"LOOT_CABLENEWSFILES\") || l.id().equals(\"LOOT_AMRADIOFILES\")\r\n || l.id().equals(\"LOOT_SECRETDOCUMENTS\") || l.id().equals(\"LOOT_POLICERECORDS\")) {\r\n continue;\r\n }\r\n suitableLoot.add((Loot) l);\r\n }\r\n }\r\n for (final Squad sq : i.squad) {\r\n for (final AbstractItem<? extends AbstractItemType> l : sq.loot()) {\r\n if (!(l instanceof Loot)) {\r\n continue;\r\n }\r\n // Temporary, maybe put special edition definition into an xml\r\n // file. -XML\r\n if (l.id().equals(\"LOOT_CEOPHOTOS\") || l.id().equals(\"LOOT_CEOLOVELETTERS\")\r\n || l.id().equals(\"LOOT_CEOTAXPAPERS\") || l.id().equals(\"LOOT_INTHQDISK\")\r\n || l.id().equals(\"LOOT_CORPFILES\") || l.id().equals(\"LOOT_JUDGEFILES\")\r\n || l.id().equals(\"LOOT_RESEARCHFILES\") || l.id().equals(\"LOOT_PRISONFILES\")\r\n || l.id().equals(\"LOOT_CABLENEWSFILES\") || l.id().equals(\"LOOT_AMRADIOFILES\")\r\n || l.id().equals(\"LOOT_SECRETDOCUMENTS\") || l.id().equals(\"LOOT_POLICERECORDS\")) {\r\n continue;\r\n }\r\n suitableLoot.add((Loot) l);\r\n }\r\n }\r\n if (suitableLoot.size() == 0) {\r\n return new Loot(\"LOOT_DIRTYSOCK\");\r\n }\r\n // PICK ONE\r\n do {\r\n ui().text(\"Do you want to run a special edition?\").bold().add();\r\n int y = 'a';\r\n for (final Loot l : suitableLoot) {\r\n ui(R.id.gcontrol).button(y++).text(l.toString()).add();\r\n }\r\n ui(R.id.gcontrol).button(10).text(\"Not in this month's Liberal Guardian\").add();\r\n final int c = getch();\r\n if (c == 10) {\r\n return null;\r\n }\r\n if (c >= 'a') {\r\n final Loot rval = suitableLoot.get(c - 'a');\r\n for (final Squad sq : i.squad) {\r\n sq.loot().remove(rval);\r\n }\r\n for (final Location loc : i.location) {\r\n loc.lcs().loot.remove(rval);\r\n }\r\n return rval;\r\n }\r\n } while (true);\r\n }",
"private void addItems() {\n int random3 = 0;\n for (int i = 0; i < MAP_LENGTH; i++) {\n for (int j = 0; j < MAP_LENGTH; j++) {\n random3 = (int)(Math.round(Math.random()*9));\n if (tileMap[i][j].getTerrain() instanceof Grass) {\n if (adjacentCity(i, j) && tileMap[i][j].getCity() == null) { //Only have an item if possibly within city borders\n if (random3 == 0) {\n tileMap[i][j].setResource(new Fruit(i,j)); //Rep Fruit\n } else if (random3 == 1) {\n tileMap[i][j].setResource(new Animal(i,j)); //Rep Animal\n } else if (random3 == 2) {\n tileMap[i][j].setResource(new Forest(i,j)); //Rep Trees (forest)\n } else if (random3 == 3) {\n tileMap[i][j].setResource(new Crop(i,j)); //Rep Crop\n }\n }\n } else {\n if (adjacentCity(i, j)) {\n if (random3 < 2) {\n tileMap[i][j].setResource(new Fish(i, j)); //Rep fish\n } else if (random3 == 4) {\n if (Math.random() < 0.5) {\n tileMap[i][j].setResource(new Whale(i, j)); //Rep whale\n }\n }\n }\n }\n }\n }\n }",
"public static void createCreationEntries() {\n/* 60 */ long start = System.nanoTime();\n/* */ \n/* 62 */ createSimpleEntry(1005, 24, 9, 22, false, true, 100.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 64 */ createSimpleEntry(1005, 7, 9, 860, false, true, 15.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 66 */ createSimpleEntry(1005, 8, 9, 23, false, true, 100.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 68 */ createSimpleEntry(1005, 685, 688, 691, false, true, 100.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 70 */ createSimpleEntry(1005, 8, 688, 691, false, true, 100.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 72 */ createSimpleEntry(1005, 8, 9, 711, false, true, 100.0F, false, false, CreationCategories.WEAPONS);\n/* */ \n/* */ \n/* 75 */ createSimpleEntry(1031, 8, 9, 459, false, true, 100.0F, false, false, CreationCategories.BOWS);\n/* */ \n/* 77 */ createSimpleEntry(1031, 8, 9, 461, false, true, 100.0F, false, false, CreationCategories.BOWS);\n/* */ \n/* 79 */ createSimpleEntry(1031, 8, 9, 460, false, true, 100.0F, false, false, CreationCategories.BOWS);\n/* */ \n/* */ \n/* 82 */ createSimpleEntry(1031, 685, 9, 459, false, true, 200.0F, false, false, CreationCategories.BOWS);\n/* */ \n/* 84 */ createSimpleEntry(1031, 685, 9, 461, false, true, 200.0F, false, false, CreationCategories.BOWS);\n/* */ \n/* 86 */ createSimpleEntry(1031, 685, 9, 460, false, true, 200.0F, false, false, CreationCategories.BOWS);\n/* */ \n/* 88 */ createSimpleEntry(1007, 8, 9, 36, false, true, 0.0F, false, false, CreationCategories.KINDLINGS);\n/* */ \n/* 90 */ createSimpleEntry(1007, 685, 9, 36, false, true, 0.0F, false, false, CreationCategories.KINDLINGS);\n/* */ \n/* 92 */ createSimpleEntry(1007, 24, 9, 36, false, true, 0.0F, false, false, CreationCategories.KINDLINGS);\n/* */ \n/* 94 */ createSimpleEntry(1007, 87, 9, 36, false, true, 0.0F, false, false, CreationCategories.KINDLINGS);\n/* */ \n/* 96 */ createSimpleEntry(1007, 3, 9, 36, false, true, 0.0F, false, false, CreationCategories.KINDLINGS);\n/* */ \n/* 98 */ createSimpleEntry(1007, 90, 9, 36, false, true, 0.0F, false, false, CreationCategories.KINDLINGS);\n/* */ \n/* 100 */ createSimpleEntry(1007, 8, 169, 36, false, true, 0.0F, false, false, CreationCategories.KINDLINGS);\n/* */ \n/* 102 */ createSimpleEntry(1007, 8, 22, 36, false, true, 0.0F, false, false, CreationCategories.KINDLINGS);\n/* */ \n/* 104 */ createSimpleEntry(1007, 685, 169, 36, false, true, 0.0F, false, false, CreationCategories.KINDLINGS);\n/* */ \n/* 106 */ createSimpleEntry(1007, 24, 169, 36, false, true, 0.0F, false, false, CreationCategories.KINDLINGS);\n/* */ \n/* 108 */ createSimpleEntry(1007, 87, 169, 36, false, true, 0.0F, false, false, CreationCategories.KINDLINGS);\n/* */ \n/* 110 */ createSimpleEntry(1007, 3, 169, 36, false, true, 0.0F, false, false, CreationCategories.KINDLINGS);\n/* */ \n/* 112 */ createSimpleEntry(1007, 90, 169, 36, false, true, 0.0F, false, false, CreationCategories.KINDLINGS);\n/* */ \n/* 114 */ createSimpleEntry(1007, 7, 9, 36, false, true, 0.0F, false, false, CreationCategories.KINDLINGS);\n/* */ \n/* 116 */ createSimpleEntry(1007, 7, 169, 36, false, true, 0.0F, false, false, CreationCategories.KINDLINGS);\n/* */ \n/* */ \n/* 119 */ createSimpleEntry(1007, 24, 22, 790, false, true, 0.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* */ \n/* 122 */ createSimpleEntry(1010, 143, 36, 37, false, true, 0.0F, false, true, CreationCategories.FIRE);\n/* */ \n/* */ \n/* 125 */ createSimpleEntry(1010, 169, 36, 37, true, true, 0.0F, false, true, CreationCategories.FIRE);\n/* */ \n/* 127 */ createSimpleEntry(1011, 14, 130, 181, false, true, 0.0F, false, false, CreationCategories.POTTERY);\n/* */ \n/* 129 */ createSimpleEntry(1011, 14, 130, 182, false, true, 0.0F, false, false, CreationCategories.POTTERY);\n/* */ \n/* 131 */ createSimpleEntry(1011, 14, 130, 183, false, true, 0.0F, false, false, CreationCategories.POTTERY);\n/* */ \n/* 133 */ createSimpleEntry(1011, 14, 130, 769, false, true, 0.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 135 */ createSimpleEntry(1011, 14, 130, 777, false, true, 0.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 137 */ createSimpleEntry(1011, 14, 130, 789, false, true, 0.0F, false, false, CreationCategories.TOOLS);\n/* */ \n/* 139 */ if (Features.Feature.AMPHORA.isEnabled()) {\n/* */ \n/* 141 */ createSimpleEntry(1011, 14, 130, 1019, false, true, 0.0F, false, false, CreationCategories.POTTERY);\n/* */ \n/* 143 */ createSimpleEntry(1011, 14, 130, 1021, false, true, 0.0F, false, false, CreationCategories.POTTERY);\n/* */ } \n/* */ \n/* */ \n/* 147 */ if (Features.Feature.METALLIC_ITEMS.isEnabled()) {\n/* */ \n/* 149 */ createMetallicEntries(10015, 63, 46, 64, false, true, 0.0F, false, false, CreationCategories.TOOLS);\n/* */ \n/* 151 */ createMetallicEntries(10015, 62, 46, 64, false, true, 0.0F, false, false, CreationCategories.TOOLS);\n/* */ \n/* */ \n/* 154 */ createMetallicEntries(10010, 185, 46, 148, false, true, 0.0F, false, false, CreationCategories.BLADES);\n/* */ \n/* 156 */ createMetallicEntries(10010, 64, 46, 147, false, true, 0.0F, false, false, CreationCategories.BLADES);\n/* */ \n/* 158 */ createMetallicEntries(10010, 185, 46, 149, false, true, 0.0F, false, false, CreationCategories.BLADES);\n/* */ \n/* 160 */ createMetallicEntries(10010, 185, 46, 269, false, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* 162 */ createMetallicEntries(10010, 185, 46, 270, false, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* */ \n/* 165 */ createMetallicEntries(10011, 64, 46, 89, false, true, 0.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 167 */ createMetallicEntries(10011, 64, 46, 523, false, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* 169 */ createMetallicEntries(10011, 185, 46, 91, false, true, 0.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 171 */ createMetallicEntries(10011, 185, 46, 88, false, true, 0.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 173 */ createMetallicEntries(10011, 185, 46, 293, false, true, 0.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 175 */ createMetallicEntries(10011, 185, 46, 295, false, true, 0.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 177 */ createMetallicEntries(10011, 185, 46, 294, false, true, 0.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 179 */ createMetallicEntries(10011, 185, 46, 708, false, true, 0.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* */ }\n/* */ else {\n/* */ \n/* 184 */ createSimpleEntry(10015, 63, 46, 64, false, true, 0.0F, false, false, CreationCategories.TOOLS);\n/* */ \n/* 186 */ createSimpleEntry(10015, 62, 46, 64, false, true, 0.0F, false, false, CreationCategories.TOOLS);\n/* */ \n/* */ \n/* 189 */ createSimpleEntry(10010, 185, 46, 148, false, true, 0.0F, false, false, CreationCategories.BLADES);\n/* */ \n/* 191 */ createSimpleEntry(10010, 64, 46, 147, false, true, 0.0F, false, false, CreationCategories.BLADES);\n/* */ \n/* 193 */ createSimpleEntry(10010, 185, 694, 148, false, true, 0.0F, false, false, CreationCategories.BLADES);\n/* */ \n/* 195 */ createSimpleEntry(10010, 64, 694, 147, false, true, 0.0F, false, false, CreationCategories.BLADES);\n/* */ \n/* 197 */ createSimpleEntry(10010, 185, 837, 148, false, true, 0.0F, false, false, CreationCategories.BLADES);\n/* */ \n/* 199 */ createSimpleEntry(10010, 64, 837, 147, false, true, 0.0F, false, false, CreationCategories.BLADES);\n/* */ \n/* 201 */ createSimpleEntry(10010, 185, 698, 148, false, true, 0.0F, false, false, CreationCategories.BLADES);\n/* */ \n/* 203 */ createSimpleEntry(10010, 64, 698, 147, false, true, 0.0F, false, false, CreationCategories.BLADES);\n/* */ \n/* 205 */ createSimpleEntry(10010, 185, 205, 148, false, true, 0.0F, false, false, CreationCategories.BLADES);\n/* */ \n/* 207 */ createSimpleEntry(10010, 64, 205, 147, false, true, 0.0F, false, false, CreationCategories.BLADES);\n/* */ \n/* 209 */ createSimpleEntry(10010, 185, 694, 149, false, true, 0.0F, false, false, CreationCategories.BLADES);\n/* */ \n/* 211 */ createSimpleEntry(10010, 185, 837, 149, false, true, 0.0F, false, false, CreationCategories.BLADES);\n/* */ \n/* 213 */ createSimpleEntry(10010, 185, 698, 149, false, true, 0.0F, false, false, CreationCategories.BLADES);\n/* */ \n/* 215 */ createSimpleEntry(10010, 185, 46, 149, false, true, 0.0F, false, false, CreationCategories.BLADES);\n/* */ \n/* 217 */ createSimpleEntry(10010, 185, 205, 149, false, true, 0.0F, false, false, CreationCategories.BLADES);\n/* */ \n/* 219 */ createSimpleEntry(10010, 185, 46, 269, false, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* 221 */ createSimpleEntry(10010, 185, 46, 270, false, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* 223 */ createSimpleEntry(10010, 185, 698, 270, false, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* 225 */ createSimpleEntry(10010, 185, 205, 270, false, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* 227 */ createSimpleEntry(10010, 185, 694, 270, false, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* 229 */ createSimpleEntry(10010, 185, 837, 270, false, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* */ \n/* 232 */ createSimpleEntry(10011, 64, 46, 89, false, true, 0.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 234 */ createSimpleEntry(10011, 64, 46, 523, false, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* 236 */ createSimpleEntry(10011, 185, 46, 91, false, true, 0.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 238 */ createSimpleEntry(10011, 185, 46, 88, false, true, 0.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 240 */ createSimpleEntry(10011, 185, 46, 293, false, true, 0.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 242 */ createSimpleEntry(10011, 185, 46, 295, false, true, 0.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 244 */ createSimpleEntry(10011, 185, 46, 294, false, true, 0.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 246 */ createSimpleEntry(10011, 185, 46, 708, false, true, 0.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 248 */ createSimpleEntry(10011, 64, 694, 89, false, true, 0.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 250 */ createSimpleEntry(10011, 64, 694, 523, false, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* 252 */ createSimpleEntry(10011, 185, 694, 91, false, true, 0.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 254 */ createSimpleEntry(10011, 185, 694, 88, false, true, 0.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 256 */ createSimpleEntry(10011, 185, 694, 293, false, true, 0.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 258 */ createSimpleEntry(10011, 185, 694, 295, false, true, 0.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 260 */ createSimpleEntry(10011, 185, 694, 294, false, true, 0.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 262 */ createSimpleEntry(10011, 185, 694, 708, false, true, 0.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 264 */ createSimpleEntry(10011, 64, 837, 89, false, true, 0.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 266 */ createSimpleEntry(10011, 64, 837, 523, false, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* 268 */ createSimpleEntry(10011, 185, 837, 91, false, true, 0.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 270 */ createSimpleEntry(10011, 185, 837, 88, false, true, 0.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 272 */ createSimpleEntry(10011, 185, 837, 293, false, true, 0.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 274 */ createSimpleEntry(10011, 185, 837, 295, false, true, 0.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 276 */ createSimpleEntry(10011, 185, 837, 294, false, true, 0.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 278 */ createSimpleEntry(10011, 185, 837, 708, false, true, 0.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 280 */ createSimpleEntry(10011, 64, 205, 89, false, true, 0.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 282 */ createSimpleEntry(10011, 64, 205, 523, false, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* 284 */ createSimpleEntry(10011, 185, 205, 91, false, true, 0.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 286 */ createSimpleEntry(10011, 185, 205, 88, false, true, 0.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 288 */ createSimpleEntry(10011, 185, 205, 293, false, true, 0.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 290 */ createSimpleEntry(10011, 185, 205, 295, false, true, 0.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 292 */ createSimpleEntry(10011, 185, 205, 294, false, true, 0.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 294 */ createSimpleEntry(10011, 185, 205, 708, false, true, 0.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 296 */ createSimpleEntry(10011, 64, 698, 89, false, true, 0.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 298 */ createSimpleEntry(10011, 64, 698, 523, false, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* 300 */ createSimpleEntry(10011, 185, 698, 91, false, true, 0.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 302 */ createSimpleEntry(10011, 185, 698, 88, false, true, 0.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 304 */ createSimpleEntry(10011, 185, 698, 293, false, true, 0.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 306 */ createSimpleEntry(10011, 185, 698, 295, false, true, 0.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 308 */ createSimpleEntry(10011, 185, 698, 294, false, true, 0.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 310 */ createSimpleEntry(10011, 185, 698, 708, false, true, 0.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ } \n/* */ \n/* */ \n/* 314 */ createSimpleEntry(1005, 8, 23, 99, false, true, 0.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 316 */ createSimpleEntry(1005, 8, 23, 862, false, true, 0.0F, false, false, CreationCategories.TOOLS);\n/* */ \n/* 318 */ createSimpleEntry(1005, 8, 23, 561, false, true, 0.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 320 */ createSimpleEntry(1005, 8, 23, 397, false, true, 0.0F, false, false, CreationCategories.TOOLS);\n/* */ \n/* 322 */ createSimpleEntry(1005, 8, 23, 396, false, true, 0.0F, false, false, CreationCategories.TOOLS);\n/* */ \n/* 324 */ createSimpleEntry(1005, 685, 23, 99, false, true, 0.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 326 */ createSimpleEntry(1005, 685, 23, 561, false, true, 0.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 328 */ createSimpleEntry(1005, 685, 23, 397, false, true, 0.0F, false, false, CreationCategories.TOOLS);\n/* */ \n/* 330 */ createSimpleEntry(1005, 685, 23, 396, false, true, 0.0F, false, false, CreationCategories.TOOLS);\n/* */ \n/* */ \n/* 333 */ createSimpleEntry(1032, 685, 23, 454, false, true, 0.0F, false, false, CreationCategories.FLETCHING);\n/* */ \n/* 335 */ createSimpleEntry(1032, 8, 23, 454, false, true, 0.0F, false, false, CreationCategories.FLETCHING);\n/* */ \n/* 337 */ createSimpleEntry(1032, 451, 454, 455, true, true, 0.0F, false, false, CreationCategories.FLETCHING);\n/* */ \n/* 339 */ createSimpleEntry(1032, 452, 454, 456, true, true, 0.0F, false, false, CreationCategories.FLETCHING);\n/* */ \n/* */ \n/* 342 */ createSimpleEntry(1016, 99, 148, 21, true, true, 0.0F, false, false, CreationCategories.WEAPONS);\n/* */ \n/* 344 */ createSimpleEntry(1016, 99, 147, 80, true, true, 0.0F, false, false, CreationCategories.WEAPONS);\n/* */ \n/* 346 */ createSimpleEntry(1016, 99, 149, 81, true, true, 0.0F, false, false, CreationCategories.WEAPONS);\n/* */ \n/* 348 */ createSimpleEntry(1016, 99, 269, 267, true, true, 0.0F, false, false, CreationCategories.TOOLS);\n/* */ \n/* 350 */ createSimpleEntry(1016, 709, 711, 705, true, true, 0.0F, false, false, CreationCategories.WEAPONS);\n/* */ \n/* 352 */ createSimpleEntry(1016, 710, 709, 707, true, true, 0.0F, false, false, CreationCategories.WEAPONS);\n/* */ \n/* 354 */ createSimpleEntry(1016, 711, 708, 706, true, true, 0.0F, false, false, CreationCategories.WEAPONS);\n/* */ \n/* 356 */ createSimpleEntry(1016, 23, 89, 3, true, true, 0.0F, false, false, CreationCategories.WEAPONS);\n/* */ \n/* 358 */ createSimpleEntry(1016, 23, 91, 90, true, true, 0.0F, false, false, CreationCategories.WEAPONS);\n/* */ \n/* 360 */ createSimpleEntry(1016, 23, 88, 87, true, true, 0.0F, false, false, CreationCategories.WEAPONS);\n/* */ \n/* 362 */ createSimpleEntry(1016, 23, 270, 268, true, true, 0.0F, false, false, CreationCategories.TOOLS);\n/* */ \n/* */ \n/* 365 */ createSimpleEntry(1016, 23, 293, 290, true, true, 0.0F, false, false, CreationCategories.WEAPONS);\n/* */ \n/* 367 */ createSimpleEntry(1016, 23, 295, 292, true, true, 0.0F, false, false, CreationCategories.WEAPONS);\n/* */ \n/* 369 */ createSimpleEntry(1016, 23, 294, 291, true, true, 0.0F, false, false, CreationCategories.WEAPONS);\n/* */ \n/* 371 */ createSimpleEntry(1005, 8, 9, 139, false, true, 0.0F, false, false, CreationCategories.TOOLS);\n/* */ \n/* 373 */ createSimpleEntry(1005, 685, 9, 139, false, true, 0.0F, false, false, CreationCategories.TOOLS);\n/* */ \n/* */ \n/* 376 */ if (Features.Feature.METALLIC_ITEMS.isEnabled()) {\n/* */ \n/* 378 */ createMetallicEntries(1016, 185, 205, 710, false, true, 10.0F, false, false, CreationCategories.WEAPONS);\n/* */ \n/* 380 */ createMetallicEntries(10015, 64, 46, 215, false, true, 400.0F, false, false, CreationCategories.TOOLS);\n/* */ \n/* 382 */ createMetallicEntries(10015, 64, 46, 259, false, true, 10.0F, false, false, CreationCategories.COOKING_UTENSILS);\n/* */ \n/* 384 */ createMetallicEntries(10015, 64, 46, 257, false, true, 10.0F, false, false, CreationCategories.COOKING_UTENSILS);\n/* */ \n/* 386 */ createMetallicEntries(10015, 64, 46, 258, false, true, 10.0F, false, false, CreationCategories.COOKING_UTENSILS);\n/* */ \n/* */ }\n/* */ else {\n/* */ \n/* 391 */ createSimpleEntry(1016, 185, 205, 710, false, true, 10.0F, false, false, CreationCategories.WEAPONS);\n/* */ \n/* 393 */ createSimpleEntry(10015, 64, 46, 215, false, true, 400.0F, false, false, CreationCategories.TOOLS);\n/* */ \n/* 395 */ createSimpleEntry(10015, 64, 46, 259, false, true, 10.0F, false, false, CreationCategories.COOKING_UTENSILS);\n/* */ \n/* 397 */ createSimpleEntry(10015, 64, 46, 257, false, true, 10.0F, false, false, CreationCategories.COOKING_UTENSILS);\n/* */ \n/* 399 */ createSimpleEntry(10015, 64, 46, 258, false, true, 10.0F, false, false, CreationCategories.COOKING_UTENSILS);\n/* */ \n/* 401 */ createSimpleEntry(10015, 64, 45, 259, false, true, 10.0F, false, false, CreationCategories.COOKING_UTENSILS);\n/* */ \n/* 403 */ createSimpleEntry(10015, 64, 45, 257, false, true, 10.0F, false, false, CreationCategories.COOKING_UTENSILS);\n/* */ \n/* 405 */ createSimpleEntry(10015, 64, 45, 258, false, true, 10.0F, false, false, CreationCategories.COOKING_UTENSILS);\n/* */ \n/* 407 */ createSimpleEntry(10015, 64, 47, 216, false, true, 400.0F, false, false, CreationCategories.TOOLS);\n/* */ } \n/* */ \n/* 410 */ createSimpleEntry(10015, 185, 46, 681, false, true, 0.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 412 */ createSimpleEntry(10015, 446, 205, 143, true, true, 10.0F, false, false, CreationCategories.TOOLS);\n/* */ \n/* 414 */ createSimpleEntry(10015, 64, 47, 772, false, true, 0.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* */ \n/* 417 */ createSimpleEntry(10015, 64, 46, 773, false, true, 0.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* */ \n/* 420 */ createSimpleEntry(10015, 64, 220, 1298, false, true, 0.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 422 */ createSimpleEntry(10015, 64, 49, 1299, false, true, 0.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* */ \n/* 425 */ createSimpleEntry(10015, 64, 205, 597, false, true, 0.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* */ \n/* 428 */ createSimpleEntry(10015, 64, 44, 599, false, true, 0.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 430 */ createSimpleEntry(10015, 64, 45, 598, false, true, 0.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 432 */ createSimpleEntry(10015, 185, 47, 838, false, true, 0.0F, false, false, 20, 30.0D, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* */ \n/* */ \n/* 436 */ createSimpleEntry(10091, 128, 169, 1270, false, true, 0.0F, true, false, CreationCategories.WRITING);\n/* */ \n/* 438 */ createSimpleEntry(10091, 747, 745, 748, false, true, 0.0F, false, false, CreationCategories.WRITING);\n/* */ \n/* 440 */ createSimpleEntry(10091, 747, 1270, 1272, false, true, 0.0F, false, false, CreationCategories.WRITING);\n/* */ \n/* 442 */ createSimpleEntry(10092, 774, 743, 756, false, true, 0.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 444 */ createSimpleEntry(10092, 774, 620, 756, false, true, 0.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* */ \n/* 447 */ createSimpleEntry(10007, 8, 743, 749, false, true, 0.0F, false, false, CreationCategories.WRITING);\n/* */ \n/* */ \n/* 450 */ createSimpleEntry(10016, 216, 213, 113, false, true, 0.0F, false, false, CreationCategories.CLOTHES);\n/* */ \n/* 452 */ createSimpleEntry(10016, 215, 213, 113, false, true, 0.0F, false, false, CreationCategories.CLOTHES);\n/* */ \n/* 454 */ createSimpleEntry(10016, 216, 213, 109, false, true, 0.0F, false, false, CreationCategories.CLOTHES);\n/* */ \n/* 456 */ createSimpleEntry(10016, 215, 213, 109, false, true, 0.0F, false, false, CreationCategories.CLOTHES);\n/* */ \n/* 458 */ createSimpleEntry(10016, 216, 213, 1427, false, true, 0.0F, false, false, CreationCategories.CLOTHES);\n/* */ \n/* 460 */ createSimpleEntry(10016, 215, 213, 1427, false, true, 0.0F, false, false, CreationCategories.CLOTHES);\n/* */ \n/* 462 */ createSimpleEntry(10016, 215, 213, 704, false, true, 0.0F, false, false, CreationCategories.ANIMAL_EQUIPMENT);\n/* */ \n/* 464 */ createSimpleEntry(10016, 216, 213, 704, false, true, 0.0F, false, false, CreationCategories.ANIMAL_EQUIPMENT);\n/* */ \n/* 466 */ createSimpleEntry(10016, 215, 213, 1425, false, true, 0.0F, false, false, CreationCategories.CLOTHES);\n/* */ \n/* 468 */ createSimpleEntry(10016, 216, 213, 1425, false, true, 0.0F, false, false, CreationCategories.CLOTHES);\n/* */ \n/* */ \n/* 471 */ createSimpleEntry(10016, 216, 213, 486, false, true, 0.0F, false, false, CreationCategories.RESOURCES);\n/* */ \n/* 473 */ createSimpleEntry(10016, 215, 213, 486, false, true, 0.0F, false, false, CreationCategories.RESOURCES);\n/* */ \n/* */ \n/* 476 */ createSimpleEntry(10016, 216, 213, 110, false, true, 0.0F, false, false, CreationCategories.CLOTHES);\n/* */ \n/* 478 */ createSimpleEntry(10016, 215, 213, 110, false, true, 0.0F, false, false, CreationCategories.CLOTHES);\n/* */ \n/* 480 */ createSimpleEntry(10016, 216, 213, 114, false, true, 0.0F, false, false, CreationCategories.CLOTHES);\n/* */ \n/* 482 */ createSimpleEntry(10016, 215, 213, 114, false, true, 0.0F, false, false, CreationCategories.CLOTHES);\n/* */ \n/* 484 */ createSimpleEntry(10016, 216, 213, 1426, false, true, 0.0F, false, false, CreationCategories.CLOTHES);\n/* */ \n/* 486 */ createSimpleEntry(10016, 215, 213, 1426, false, true, 0.0F, false, false, CreationCategories.CLOTHES);\n/* */ \n/* 488 */ createSimpleEntry(10016, 215, 213, 2, false, true, 0.0F, false, false, CreationCategories.BAGS);\n/* */ \n/* */ \n/* 491 */ createSimpleEntry(10016, 215, 213, 555, false, true, 0.0F, false, false, CreationCategories.SAILS);\n/* */ \n/* 493 */ createSimpleEntry(10016, 215, 213, 591, false, true, 0.0F, false, false, CreationCategories.SAILS);\n/* */ \n/* 495 */ createSimpleEntry(10016, 215, 213, 554, false, true, 0.0F, false, false, CreationCategories.SAILS);\n/* */ \n/* */ \n/* 498 */ createSimpleEntry(10016, 216, 213, 555, false, true, 0.0F, false, false, CreationCategories.SAILS);\n/* */ \n/* 500 */ createSimpleEntry(10016, 216, 213, 591, false, true, 0.0F, false, false, CreationCategories.SAILS);\n/* */ \n/* 502 */ createSimpleEntry(10016, 216, 213, 554, false, true, 0.0F, false, false, CreationCategories.SAILS);\n/* */ \n/* 504 */ createSimpleEntry(10016, 215, 213, 831, false, true, 0.0F, false, false, CreationCategories.CLOTHES);\n/* */ \n/* 506 */ createSimpleEntry(10016, 216, 213, 831, false, true, 0.0F, false, false, CreationCategories.CLOTHES);\n/* */ \n/* */ \n/* 509 */ if (Features.Feature.METALLIC_ITEMS.isEnabled()) {\n/* */ \n/* 511 */ createMetallicEntries(10015, 185, 46, 627, false, true, 0.0F, false, false, CreationCategories.ANIMAL_EQUIPMENT_PART);\n/* */ \n/* 513 */ createMetallicEntries(10015, 185, 46, 623, false, true, 0.0F, false, false, CreationCategories.ANIMAL_EQUIPMENT);\n/* */ \n/* */ \n/* 516 */ createMetallicEntries(10015, 64, 46, 127, false, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* 518 */ createMetallicEntries(10010, 64, 46, 154, false, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* 520 */ createMetallicEntries(10010, 64, 46, 389, false, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* 522 */ createMetallicEntries(10010, 64, 46, 494, false, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* 524 */ createMetallicEntries(10010, 64, 46, 709, false, true, 0.0F, false, false, CreationCategories.BLADES);\n/* */ \n/* 526 */ createMetallicEntries(10010, 64, 46, 391, false, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* 528 */ createMetallicEntries(10010, 64, 46, 393, false, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* 530 */ createMetallicEntries(10010, 64, 46, 395, false, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* 532 */ createMetallicEntries(10010, 64, 46, 125, false, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* 534 */ createMetallicEntries(10010, 64, 46, 126, false, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* */ \n/* 537 */ createMetallicEntries(10015, 185, 46, 75, false, true, 0.0F, false, false, CreationCategories.COOKING_UTENSILS);\n/* */ \n/* 539 */ createMetallicEntries(10015, 185, 46, 351, false, true, 0.0F, false, false, CreationCategories.COOKING_UTENSILS);\n/* */ \n/* 541 */ createMetallicEntries(10015, 64, 46, 734, false, true, 0.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 543 */ createMetallicEntries(10015, 64, 46, 720, false, true, 0.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 545 */ createMetallicEntries(10015, 185, 46, 721, false, true, 0.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 547 */ createMetallicEntries(10015, 64, 46, 735, false, true, 0.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 549 */ createMetallicEntries(10015, 185, 46, 350, false, true, 0.0F, false, false, CreationCategories.COOKING_UTENSILS);\n/* */ \n/* */ }\n/* */ else {\n/* */ \n/* 554 */ createSimpleEntry(10015, 185, 46, 627, false, true, 0.0F, false, false, CreationCategories.ANIMAL_EQUIPMENT_PART);\n/* */ \n/* 556 */ createSimpleEntry(10015, 185, 46, 623, false, true, 0.0F, false, false, CreationCategories.ANIMAL_EQUIPMENT);\n/* */ \n/* 558 */ createSimpleEntry(10015, 185, 205, 627, false, true, 0.0F, false, false, CreationCategories.ANIMAL_EQUIPMENT_PART);\n/* */ \n/* 560 */ createSimpleEntry(10015, 185, 205, 623, false, true, 0.0F, false, false, CreationCategories.ANIMAL_EQUIPMENT);\n/* */ \n/* 562 */ createSimpleEntry(10043, 185, 44, 623, false, true, 0.0F, false, false, CreationCategories.ANIMAL_EQUIPMENT);\n/* */ \n/* 564 */ createSimpleEntry(10043, 185, 45, 623, false, true, 0.0F, false, false, CreationCategories.ANIMAL_EQUIPMENT);\n/* */ \n/* */ \n/* 567 */ createSimpleEntry(10015, 64, 46, 127, false, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* 569 */ createSimpleEntry(10010, 64, 46, 154, false, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* 571 */ createSimpleEntry(10010, 64, 46, 389, false, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* 573 */ createSimpleEntry(10010, 64, 46, 494, false, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* 575 */ createSimpleEntry(10010, 64, 46, 709, false, true, 0.0F, false, false, CreationCategories.BLADES);\n/* */ \n/* 577 */ createSimpleEntry(10010, 64, 205, 709, false, true, 0.0F, false, false, CreationCategories.BLADES);\n/* */ \n/* 579 */ createSimpleEntry(10010, 64, 698, 709, false, true, 0.0F, false, false, CreationCategories.BLADES);\n/* */ \n/* 581 */ createSimpleEntry(10010, 64, 694, 709, false, true, 0.0F, false, false, CreationCategories.BLADES);\n/* */ \n/* 583 */ createSimpleEntry(10010, 64, 837, 709, false, true, 0.0F, false, false, CreationCategories.BLADES);\n/* */ \n/* 585 */ createSimpleEntry(10010, 64, 46, 391, false, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* 587 */ createSimpleEntry(10010, 64, 46, 393, false, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* 589 */ createSimpleEntry(10010, 64, 205, 393, false, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* 591 */ createSimpleEntry(10010, 64, 694, 393, false, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* 593 */ createSimpleEntry(10010, 64, 837, 393, false, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* 595 */ createSimpleEntry(10010, 64, 698, 393, false, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* 597 */ createSimpleEntry(10010, 64, 46, 395, false, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* 599 */ createSimpleEntry(10015, 185, 46, 75, false, true, 0.0F, false, false, CreationCategories.COOKING_UTENSILS);\n/* */ \n/* 601 */ createSimpleEntry(10015, 185, 46, 351, false, true, 0.0F, false, false, CreationCategories.COOKING_UTENSILS);\n/* */ \n/* 603 */ createSimpleEntry(10015, 64, 46, 734, false, true, 0.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 605 */ createSimpleEntry(10015, 64, 221, 720, false, true, 0.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 607 */ createSimpleEntry(10015, 185, 223, 721, false, true, 0.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 609 */ createSimpleEntry(10015, 64, 46, 735, false, true, 0.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 611 */ createSimpleEntry(10015, 185, 46, 350, false, true, 0.0F, false, false, CreationCategories.COOKING_UTENSILS);\n/* */ \n/* */ \n/* 614 */ createSimpleEntry(10010, 64, 46, 125, false, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* 616 */ createSimpleEntry(10010, 64, 46, 126, false, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* 618 */ createSimpleEntry(10010, 64, 205, 126, false, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* 620 */ createSimpleEntry(10010, 64, 698, 126, false, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* 622 */ createSimpleEntry(10010, 64, 694, 126, false, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* 624 */ createSimpleEntry(10010, 64, 837, 126, false, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ } \n/* */ \n/* */ \n/* 628 */ createSimpleEntry(10015, 99, 393, 392, true, true, 0.0F, false, false, CreationCategories.TOOLS);\n/* */ \n/* 630 */ createSimpleEntry(10015, 395, 395, 394, true, true, 0.0F, false, false, CreationCategories.TOOLS);\n/* */ \n/* 632 */ createSimpleEntry(10015, 185, 205, 582, false, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* 634 */ createSimpleEntry(10015, 99, 154, 97, true, true, 0.0F, false, false, CreationCategories.TOOLS);\n/* */ \n/* 636 */ createSimpleEntry(10015, 99, 389, 388, true, true, 0.0F, false, false, CreationCategories.TOOLS);\n/* */ \n/* 638 */ createSimpleEntry(10015, 99, 494, 493, true, true, 0.0F, false, false, CreationCategories.TOOLS);\n/* */ \n/* 640 */ createSimpleEntry(10015, 99, 391, 390, true, true, 0.0F, false, false, CreationCategories.TOOLS);\n/* */ \n/* 642 */ createSimpleEntry(10015, 23, 127, 62, true, true, 0.0F, false, false, CreationCategories.TOOLS);\n/* */ \n/* 644 */ createSimpleEntry(10010, 64, 45, 793, false, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* */ \n/* 647 */ createSimpleEntry(10042, 128, 141, 73, true, true, 0.0F, false, false, CreationCategories.ALCHEMY);\n/* */ \n/* 649 */ createSimpleEntry(10042, 128, 436, 437, true, true, 0.0F, false, false, CreationCategories.ALCHEMY);\n/* */ \n/* 651 */ createSimpleEntry(10042, 437, 46, 431, true, true, 0.0F, false, false, CreationCategories.DYES);\n/* */ \n/* 653 */ createSimpleEntry(10042, 128, 48, 432, true, true, 0.0F, false, false, CreationCategories.DYES);\n/* */ \n/* 655 */ createSimpleEntry(10042, 128, 47, 435, true, true, 0.0F, false, false, CreationCategories.DYES);\n/* */ \n/* 657 */ createSimpleEntry(10042, 128, 439, 433, true, true, 0.0F, false, false, CreationCategories.DYES);\n/* */ \n/* 659 */ createSimpleEntry(10042, 128, 440, 434, true, true, 0.0F, false, false, CreationCategories.DYES);\n/* */ \n/* 661 */ createSimpleEntry(10042, 140, 214, 133, true, true, 0.0F, false, false, CreationCategories.LIGHTS_AND_LAMPS);\n/* */ \n/* 663 */ createSimpleEntry(10042, 356, 140, 650, true, true, 0.0F, false, false, CreationCategories.HEALING);\n/* */ \n/* 665 */ createSimpleEntry(10042, 1254, 214, 133, true, true, 0.0F, false, false, CreationCategories.LIGHTS_AND_LAMPS);\n/* */ \n/* */ \n/* 668 */ createSimpleEntry(1013, 130, 298, 492, true, true, 0.0F, true, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* */ \n/* */ \n/* 672 */ createSimpleEntry(1016, 99, 125, 93, true, true, 0.0F, false, false, CreationCategories.TOOLS);\n/* */ \n/* 674 */ createSimpleEntry(1016, 99, 126, 8, true, true, 0.0F, false, false, CreationCategories.TOOLS);\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 705 */ createSimpleEntry(1005, 24, 9, 632, false, true, 0.0F, false, false, CreationCategories.CART_PARTS);\n/* */ \n/* 707 */ createSimpleEntry(10016, 139, 144, 214, false, true, 0.0F, false, false, CreationCategories.RESOURCES);\n/* */ \n/* 709 */ createSimpleEntry(10016, 139, 171, 214, false, true, 0.0F, false, false, CreationCategories.RESOURCES);\n/* */ \n/* 711 */ createSimpleEntry(10016, 226, 214, 213, false, true, 0.0F, false, false, CreationCategories.RESOURCES);\n/* */ \n/* 713 */ createSimpleEntry(10016, 226, 214, 646, false, true, 0.0F, false, false, CreationCategories.RUGS);\n/* */ \n/* 715 */ createSimpleEntry(10016, 226, 214, 645, false, true, 0.0F, false, false, CreationCategories.RUGS);\n/* */ \n/* 717 */ createSimpleEntry(10016, 226, 214, 644, false, true, 0.0F, false, false, CreationCategories.RUGS);\n/* */ \n/* 719 */ createSimpleEntry(10016, 226, 214, 639, false, true, 0.0F, false, false, CreationCategories.RUGS);\n/* */ \n/* 721 */ createSimpleEntry(10016, 213, 23, 487, true, true, 0.0F, false, false, CreationCategories.FLAGS);\n/* */ \n/* 723 */ createSimpleEntry(10016, 213, 23, 577, true, true, 0.0F, false, false, CreationCategories.FLAGS);\n/* */ \n/* 725 */ createSimpleEntry(10016, 213, 23, 579, true, true, 0.0F, false, false, CreationCategories.FLAGS);\n/* */ \n/* 727 */ createSimpleEntry(10016, 213, 23, 578, true, true, 0.0F, false, false, CreationCategories.FLAGS);\n/* */ \n/* 729 */ createSimpleEntry(10016, 213, 23, 999, true, true, 0.0F, false, false, 10, 35.0D, CreationCategories.FLAGS);\n/* */ \n/* */ \n/* 732 */ createSimpleEntry(1005, 685, 23, 862, false, true, 0.0F, false, false, CreationCategories.TOOLS);\n/* */ \n/* */ \n/* 735 */ createSimpleEntry(1020, 169, 385, 652, true, true, 0.0F, false, false, CreationCategories.DECORATION);\n/* */ \n/* */ \n/* 738 */ if (Features.Feature.METALLIC_ITEMS.isEnabled()) {\n/* */ \n/* 740 */ createMetallicEntries(10013, 185, 46, 284, false, true, 10.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 742 */ createMetallicEntries(10013, 185, 46, 280, false, true, 10.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 744 */ createMetallicEntries(10013, 185, 46, 281, false, true, 10.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 746 */ createMetallicEntries(10013, 185, 46, 282, false, true, 10.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 748 */ createMetallicEntries(10013, 185, 46, 283, false, true, 10.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 750 */ createMetallicEntries(10013, 185, 46, 285, false, true, 10.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 752 */ createMetallicEntries(10013, 185, 46, 286, false, true, 10.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 754 */ createMetallicEntries(10013, 185, 46, 287, false, true, 10.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* */ \n/* 757 */ createMetallicEntries(10012, 185, 46, 288, false, true, 10.0F, false, false, CreationCategories.RESOURCES);\n/* */ \n/* */ \n/* 760 */ createMetallicEntries(10043, 185, 46, 326, false, true, 10.0F, false, false, CreationCategories.DECORATION);\n/* */ \n/* */ }\n/* */ else {\n/* */ \n/* 765 */ createSimpleEntry(10013, 185, 205, 284, false, true, 10.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 767 */ createSimpleEntry(10013, 185, 205, 280, false, true, 10.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 769 */ createSimpleEntry(10013, 185, 205, 281, false, true, 10.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 771 */ createSimpleEntry(10013, 185, 205, 282, false, true, 10.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 773 */ createSimpleEntry(10013, 185, 205, 283, false, true, 10.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 775 */ createSimpleEntry(10013, 185, 205, 285, false, true, 10.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 777 */ createSimpleEntry(10013, 185, 205, 286, false, true, 10.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 779 */ createSimpleEntry(10013, 185, 205, 287, false, true, 10.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* */ \n/* 782 */ createSimpleEntry(10013, 185, 698, 284, false, true, 10.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 784 */ createSimpleEntry(10013, 185, 698, 280, false, true, 10.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 786 */ createSimpleEntry(10013, 185, 698, 281, false, true, 10.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 788 */ createSimpleEntry(10013, 185, 698, 282, false, true, 10.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 790 */ createSimpleEntry(10013, 185, 698, 283, false, true, 10.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 792 */ createSimpleEntry(10013, 185, 698, 285, false, true, 10.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 794 */ createSimpleEntry(10013, 185, 698, 286, false, true, 10.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 796 */ createSimpleEntry(10013, 185, 698, 287, false, true, 10.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* */ \n/* 799 */ createSimpleEntry(10013, 185, 694, 284, false, true, 10.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 801 */ createSimpleEntry(10013, 185, 694, 280, false, true, 10.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 803 */ createSimpleEntry(10013, 185, 694, 281, false, true, 10.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 805 */ createSimpleEntry(10013, 185, 694, 282, false, true, 10.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 807 */ createSimpleEntry(10013, 185, 694, 283, false, true, 10.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 809 */ createSimpleEntry(10013, 185, 694, 285, false, true, 10.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 811 */ createSimpleEntry(10013, 185, 694, 286, false, true, 10.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 813 */ createSimpleEntry(10013, 185, 694, 287, false, true, 10.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* */ \n/* 816 */ createSimpleEntry(10013, 185, 837, 284, false, true, 10.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 818 */ createSimpleEntry(10013, 185, 837, 280, false, true, 10.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 820 */ createSimpleEntry(10013, 185, 837, 281, false, true, 10.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 822 */ createSimpleEntry(10013, 185, 837, 282, false, true, 10.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 824 */ createSimpleEntry(10013, 185, 837, 283, false, true, 10.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 826 */ createSimpleEntry(10013, 185, 837, 285, false, true, 10.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 828 */ createSimpleEntry(10013, 185, 837, 286, false, true, 10.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 830 */ createSimpleEntry(10013, 185, 837, 287, false, true, 10.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* */ \n/* 833 */ createSimpleEntry(10013, 185, 46, 284, false, true, 10.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 835 */ createSimpleEntry(10013, 185, 46, 280, false, true, 10.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 837 */ createSimpleEntry(10013, 185, 46, 281, false, true, 10.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 839 */ createSimpleEntry(10013, 185, 46, 282, false, true, 10.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 841 */ createSimpleEntry(10013, 185, 46, 283, false, true, 10.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 843 */ createSimpleEntry(10013, 185, 46, 285, false, true, 10.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 845 */ createSimpleEntry(10013, 185, 46, 286, false, true, 10.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 847 */ createSimpleEntry(10013, 185, 46, 287, false, true, 10.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* */ \n/* 850 */ createSimpleEntry(10012, 185, 205, 288, false, true, 10.0F, false, false, CreationCategories.RESOURCES);\n/* */ \n/* 852 */ createSimpleEntry(10012, 185, 46, 288, false, true, 10.0F, false, false, CreationCategories.RESOURCES);\n/* */ \n/* 854 */ createSimpleEntry(10012, 185, 694, 288, false, true, 10.0F, false, false, CreationCategories.RESOURCES);\n/* */ \n/* 856 */ createSimpleEntry(10012, 185, 837, 288, false, true, 10.0F, false, false, CreationCategories.RESOURCES);\n/* */ \n/* 858 */ createSimpleEntry(10012, 185, 698, 288, false, true, 10.0F, false, false, CreationCategories.RESOURCES);\n/* */ \n/* 860 */ createSimpleEntry(10012, 185, 47, 288, false, true, 10.0F, false, false, CreationCategories.RESOURCES);\n/* */ \n/* 862 */ createSimpleEntry(10012, 185, 223, 288, false, true, 10.0F, false, false, CreationCategories.RESOURCES);\n/* */ \n/* 864 */ createSimpleEntry(10012, 185, 45, 288, false, true, 10.0F, false, false, CreationCategories.RESOURCES);\n/* */ \n/* 866 */ createSimpleEntry(10012, 185, 44, 288, false, true, 10.0F, false, false, CreationCategories.RESOURCES);\n/* */ \n/* */ \n/* 869 */ createSimpleEntry(10043, 185, 205, 326, false, true, 10.0F, false, false, CreationCategories.DECORATION);\n/* */ \n/* 871 */ createSimpleEntry(10043, 185, 46, 326, false, true, 10.0F, false, false, CreationCategories.DECORATION);\n/* */ \n/* 873 */ createSimpleEntry(10043, 185, 47, 326, false, true, 10.0F, false, false, CreationCategories.DECORATION);\n/* */ \n/* 875 */ createSimpleEntry(10043, 185, 223, 326, false, true, 10.0F, false, false, CreationCategories.DECORATION);\n/* */ \n/* 877 */ createSimpleEntry(10043, 185, 45, 326, false, true, 10.0F, false, false, CreationCategories.DECORATION);\n/* */ \n/* 879 */ createSimpleEntry(10043, 185, 44, 326, false, true, 10.0F, false, false, CreationCategories.DECORATION);\n/* */ \n/* 881 */ createSimpleEntry(10043, 185, 694, 326, false, true, 10.0F, false, false, CreationCategories.DECORATION);\n/* */ \n/* 883 */ createSimpleEntry(10043, 185, 837, 326, false, true, 10.0F, false, false, CreationCategories.DECORATION);\n/* */ \n/* 885 */ createSimpleEntry(10043, 185, 698, 326, false, true, 10.0F, false, false, CreationCategories.DECORATION);\n/* */ } \n/* */ \n/* */ \n/* 889 */ createSimpleEntry(10013, 185, 372, 478, false, true, 0.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 891 */ createSimpleEntry(10013, 185, 372, 474, false, true, 0.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 893 */ createSimpleEntry(10013, 185, 372, 475, false, true, 0.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 895 */ createSimpleEntry(10013, 185, 372, 476, false, true, 0.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 897 */ createSimpleEntry(10013, 185, 372, 477, false, true, 0.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* */ \n/* 900 */ createSimpleEntry(10012, 185, 288, 274, false, true, 10.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 902 */ createSimpleEntry(10012, 185, 288, 279, false, true, 10.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 904 */ createSimpleEntry(10012, 185, 288, 278, false, true, 10.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 906 */ createSimpleEntry(10012, 185, 288, 275, false, true, 10.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 908 */ createSimpleEntry(10012, 185, 288, 276, false, true, 10.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 910 */ createSimpleEntry(10012, 185, 288, 277, false, true, 10.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 912 */ createSimpleEntry(10012, 185, 288, 703, false, true, 10.0F, false, false, CreationCategories.ANIMAL_EQUIPMENT);\n/* */ \n/* */ \n/* 915 */ createSimpleEntry(10017, 73, 71, 72, true, true, 0.0F, false, false, CreationCategories.RESOURCES);\n/* */ \n/* 917 */ createSimpleEntry(10017, 215, 172, 72, false, true, 50.0F, false, false, CreationCategories.RESOURCES);\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 923 */ createSimpleEntry(10017, 215, 72, 105, false, true, 10.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 925 */ createSimpleEntry(10017, 215, 72, 107, false, true, 10.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 927 */ createSimpleEntry(10017, 215, 72, 103, false, true, 10.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 929 */ createSimpleEntry(10017, 215, 72, 108, false, true, 10.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 931 */ createSimpleEntry(10017, 215, 72, 104, false, true, 10.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 933 */ createSimpleEntry(10017, 215, 72, 106, false, true, 10.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 935 */ createSimpleEntry(10017, 215, 72, 102, false, true, 10.0F, false, false, CreationCategories.CLOTHES);\n/* */ \n/* 937 */ createSimpleEntry(10017, 394, 72, 100, false, true, 10.0F, false, false, CreationCategories.RESOURCES);\n/* */ \n/* 939 */ createSimpleEntry(10017, 215, 371, 469, false, true, 0.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 941 */ createSimpleEntry(10017, 215, 371, 470, false, true, 0.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 943 */ createSimpleEntry(10017, 215, 371, 472, false, true, 0.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 945 */ createSimpleEntry(10017, 215, 371, 471, false, true, 0.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 947 */ createSimpleEntry(10017, 215, 371, 473, false, true, 0.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 949 */ createSimpleEntry(10017, 215, 371, 468, false, true, 0.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* */ \n/* 952 */ createSimpleEntry(10017, 215, 72, 79, false, true, 10.0F, false, false, CreationCategories.BAGS);\n/* */ \n/* 954 */ createSimpleEntry(10017, 215, 72, 1, false, true, 10.0F, false, false, CreationCategories.BAGS);\n/* */ \n/* 956 */ createSimpleEntry(10017, 215, 72, 462, false, true, 10.0F, false, false, CreationCategories.BAGS);\n/* */ \n/* */ \n/* 959 */ createSimpleEntry(10017, 215, 72, 629, false, true, 10.0F, false, false, CreationCategories.ANIMAL_EQUIPMENT_PART);\n/* */ \n/* 961 */ createSimpleEntry(10017, 215, 72, 630, false, true, 10.0F, false, false, CreationCategories.ANIMAL_EQUIPMENT_PART);\n/* */ \n/* 963 */ createSimpleEntry(10017, 215, 72, 628, false, true, 10.0F, false, false, CreationCategories.ANIMAL_EQUIPMENT_PART);\n/* */ \n/* 965 */ createSimpleEntry(10017, 215, 72, 631, false, true, 10.0F, false, false, CreationCategories.ANIMAL_EQUIPMENT_PART);\n/* */ \n/* 967 */ createSimpleEntry(10017, 215, 72, 625, false, true, 10.0F, false, false, CreationCategories.ANIMAL_EQUIPMENT_PART);\n/* */ \n/* 969 */ createSimpleEntry(10017, 215, 72, 626, false, true, 10.0F, false, false, CreationCategories.ANIMAL_EQUIPMENT_PART);\n/* */ \n/* */ \n/* 972 */ createSimpleEntry(10017, 215, 72, 1332, false, true, 10.0F, false, false, CreationCategories.ANIMAL_EQUIPMENT_PART);\n/* */ \n/* */ \n/* 975 */ if (Features.Feature.METALLIC_ITEMS.isEnabled()) {\n/* */ \n/* 977 */ createMetallicEntries(10015, 64, 46, 131, false, true, 10.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 979 */ createMetallicEntries(10015, 64, 46, 517, false, true, 10.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 981 */ createMetallicEntries(10015, 64, 46, 444, false, true, 10.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* */ \n/* 984 */ createMetallicEntries(10011, 64, 46, 451, false, true, 10.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 986 */ createMetallicEntries(10011, 64, 46, 452, false, true, 10.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* */ \n/* 989 */ createMetallicEntries(10015, 185, 46, 135, false, true, 0.0F, false, false, CreationCategories.LIGHTS_AND_LAMPS);\n/* */ \n/* 991 */ createMetallicEntries(10015, 185, 46, 497, false, true, 0.0F, false, false, CreationCategories.LIGHTS_AND_LAMPS);\n/* */ \n/* 993 */ createMetallicEntries(10015, 185, 46, 675, false, true, 0.0F, false, false, CreationCategories.LIGHTS_AND_LAMPS);\n/* */ \n/* 995 */ createMetallicEntries(10015, 185, 46, 660, false, true, 0.0F, false, false, CreationCategories.LIGHTS_AND_LAMPS);\n/* */ \n/* 997 */ createMetallicEntries(10015, 185, 46, 674, false, true, 0.0F, false, false, CreationCategories.LIGHTS_AND_LAMPS);\n/* */ \n/* */ \n/* 1000 */ createMetallicEntries(10011, 64, 46, 123, false, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* */ \n/* 1003 */ createMetallicEntries(10015, 64, 46, 219, false, true, 0.0F, false, false, CreationCategories.TOOLS);\n/* */ \n/* 1005 */ createMetallicEntries(10015, 64, 46, 701, false, true, 0.0F, false, false, CreationCategories.TOOLS);\n/* */ \n/* 1007 */ createMetallicEntries(10015, 64, 46, 124, false, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* 1009 */ createMetallicEntries(10015, 64, 46, 24, false, true, 0.0F, false, false, CreationCategories.TOOLS);\n/* */ \n/* */ }\n/* */ else {\n/* */ \n/* 1014 */ createSimpleEntry(10015, 64, 46, 131, false, true, 10.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 1016 */ createSimpleEntry(10015, 64, 205, 131, false, true, 10.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 1018 */ createSimpleEntry(10015, 64, 47, 131, false, true, 10.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 1020 */ createSimpleEntry(10015, 64, 45, 131, false, true, 10.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 1022 */ createSimpleEntry(10015, 64, 44, 131, false, true, 10.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 1024 */ createSimpleEntry(10015, 64, 223, 131, false, true, 10.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 1026 */ createSimpleEntry(10015, 64, 694, 131, false, true, 10.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 1028 */ createSimpleEntry(10015, 64, 837, 131, false, true, 10.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 1030 */ createSimpleEntry(10015, 64, 698, 131, false, true, 10.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* */ \n/* 1033 */ createSimpleEntry(10015, 64, 46, 517, false, true, 10.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 1035 */ createSimpleEntry(10015, 64, 205, 517, false, true, 10.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 1037 */ createSimpleEntry(10015, 64, 47, 517, false, true, 10.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 1039 */ createSimpleEntry(10015, 64, 45, 517, false, true, 10.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 1041 */ createSimpleEntry(10015, 64, 44, 517, false, true, 10.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 1043 */ createSimpleEntry(10015, 64, 223, 517, false, true, 10.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* */ \n/* 1046 */ createSimpleEntry(10015, 64, 46, 444, false, true, 10.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 1048 */ createSimpleEntry(10015, 64, 205, 444, false, true, 10.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 1050 */ createSimpleEntry(10015, 64, 47, 444, false, true, 10.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 1052 */ createSimpleEntry(10015, 64, 45, 444, false, true, 10.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 1054 */ createSimpleEntry(10015, 64, 44, 444, false, true, 10.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 1056 */ createSimpleEntry(10015, 64, 223, 444, false, true, 10.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* */ \n/* 1059 */ createSimpleEntry(10011, 64, 46, 451, false, true, 10.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 1061 */ createSimpleEntry(10011, 64, 698, 451, false, true, 10.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 1063 */ createSimpleEntry(10011, 64, 694, 451, false, true, 10.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 1065 */ createSimpleEntry(10011, 64, 837, 451, false, true, 10.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 1067 */ createSimpleEntry(10011, 64, 205, 451, false, true, 10.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 1069 */ createSimpleEntry(10011, 64, 47, 451, false, true, 10.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 1071 */ createSimpleEntry(10011, 64, 45, 451, false, true, 10.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 1073 */ createSimpleEntry(10011, 64, 44, 451, false, true, 10.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 1075 */ createSimpleEntry(10011, 64, 223, 451, false, true, 10.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 1077 */ createSimpleEntry(10011, 64, 46, 452, false, true, 10.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 1079 */ createSimpleEntry(10011, 64, 698, 452, false, true, 10.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 1081 */ createSimpleEntry(10011, 64, 694, 452, false, true, 10.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 1083 */ createSimpleEntry(10011, 64, 837, 452, false, true, 10.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 1085 */ createSimpleEntry(10011, 64, 205, 452, false, true, 10.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 1087 */ createSimpleEntry(10011, 64, 47, 452, false, true, 10.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 1089 */ createSimpleEntry(10011, 64, 45, 452, false, true, 10.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 1091 */ createSimpleEntry(10011, 64, 44, 452, false, true, 10.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 1093 */ createSimpleEntry(10011, 64, 223, 452, false, true, 10.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* */ \n/* 1096 */ createSimpleEntry(10015, 185, 46, 135, false, true, 0.0F, false, false, CreationCategories.LIGHTS_AND_LAMPS);\n/* */ \n/* 1098 */ createSimpleEntry(10015, 185, 46, 497, false, true, 0.0F, false, false, CreationCategories.LIGHTS_AND_LAMPS);\n/* */ \n/* 1100 */ createSimpleEntry(10015, 185, 221, 497, false, true, 0.0F, false, false, CreationCategories.LIGHTS_AND_LAMPS);\n/* */ \n/* 1102 */ createSimpleEntry(10015, 185, 46, 675, false, true, 0.0F, false, false, CreationCategories.LIGHTS_AND_LAMPS);\n/* */ \n/* 1104 */ createSimpleEntry(10015, 185, 46, 660, false, true, 0.0F, false, false, CreationCategories.LIGHTS_AND_LAMPS);\n/* */ \n/* */ \n/* 1107 */ createSimpleEntry(10015, 185, 47, 674, false, true, 0.0F, false, false, CreationCategories.LIGHTS_AND_LAMPS);\n/* */ \n/* 1109 */ createSimpleEntry(10015, 185, 223, 674, false, true, 0.0F, false, false, CreationCategories.LIGHTS_AND_LAMPS);\n/* */ \n/* 1111 */ createSimpleEntry(10015, 185, 221, 674, false, true, 0.0F, false, false, CreationCategories.LIGHTS_AND_LAMPS);\n/* */ \n/* 1113 */ createSimpleEntry(10015, 185, 44, 674, false, true, 0.0F, false, false, CreationCategories.LIGHTS_AND_LAMPS);\n/* */ \n/* 1115 */ createSimpleEntry(10015, 185, 45, 674, false, true, 0.0F, false, false, CreationCategories.LIGHTS_AND_LAMPS);\n/* */ \n/* */ \n/* 1118 */ createSimpleEntry(10011, 64, 46, 123, false, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* 1120 */ createSimpleEntry(10011, 64, 205, 123, false, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* 1122 */ createSimpleEntry(10011, 64, 694, 123, false, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* 1124 */ createSimpleEntry(10011, 64, 837, 123, false, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* 1126 */ createSimpleEntry(10011, 64, 698, 123, false, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* */ \n/* 1129 */ createSimpleEntry(10015, 64, 46, 219, false, true, 0.0F, false, false, CreationCategories.TOOLS);\n/* */ \n/* 1131 */ createSimpleEntry(10015, 64, 46, 701, false, true, 0.0F, false, false, CreationCategories.TOOLS);\n/* */ \n/* 1133 */ createSimpleEntry(10015, 64, 46, 124, false, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* 1135 */ createSimpleEntry(10015, 64, 46, 24, false, true, 0.0F, false, false, CreationCategories.TOOLS);\n/* */ } \n/* */ \n/* */ \n/* 1139 */ createSimpleEntry(10015, 64, 46, 217, false, true, 0.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 1141 */ createSimpleEntry(10015, 64, 46, 218, false, true, 0.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 1143 */ createSimpleEntry(10015, 23, 444, 441, true, true, 10.0F, false, false, CreationCategories.TOOLS);\n/* */ \n/* 1145 */ createSimpleEntry(1005, 318, 23, 647, true, true, 10.0F, false, false, CreationCategories.TOOLS);\n/* */ \n/* */ \n/* 1148 */ createSimpleEntry(10017, 131, 105, 116, true, true, 0.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 1150 */ createSimpleEntry(10017, 131, 107, 117, true, true, 0.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 1152 */ createSimpleEntry(10017, 131, 103, 119, true, true, 0.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 1154 */ createSimpleEntry(10017, 131, 108, 118, true, true, 0.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 1156 */ createSimpleEntry(10017, 131, 104, 120, true, true, 0.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* 1158 */ createSimpleEntry(10017, 131, 106, 115, true, true, 0.0F, false, false, CreationCategories.ARMOUR);\n/* */ \n/* */ \n/* 1161 */ createSimpleEntry(1005, 23, 156, 63, true, true, 0.0F, false, false, CreationCategories.TOOLS);\n/* */ \n/* 1163 */ createSimpleEntry(1005, 8, 23, 156, false, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* 1165 */ createSimpleEntry(1005, 685, 23, 156, false, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* 1167 */ createSimpleEntry(10015, 185, 205, 609, false, true, 0.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 1169 */ createSimpleEntry(10015, 23, 523, 7, true, true, 0.0F, false, false, CreationCategories.TOOLS);\n/* */ \n/* */ \n/* 1172 */ createSimpleEntry(10017, 100, 99, 101, true, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* */ \n/* 1175 */ createSimpleEntry(10015, 9, 497, 496, true, true, 0.0F, false, false, CreationCategories.LIGHTS_AND_LAMPS);\n/* */ \n/* 1177 */ createSimpleEntry(10015, 9, 660, 657, true, true, 0.0F, false, false, CreationCategories.LIGHTS_AND_LAMPS);\n/* */ \n/* 1179 */ createSimpleEntry(10015, 9, 674, 658, true, true, 0.0F, false, false, CreationCategories.LIGHTS_AND_LAMPS);\n/* */ \n/* 1181 */ createSimpleEntry(10015, 185, 221, 136, false, true, 0.0F, false, false, CreationCategories.LIGHTS_AND_LAMPS);\n/* */ \n/* 1183 */ if (Features.Feature.METALLIC_ITEMS.isEnabled()) {\n/* */ \n/* 1185 */ for (int sourceTemplateId : ItemFactory.metalLumpList)\n/* */ {\n/* */ \n/* */ try {\n/* 1189 */ ItemTemplate lump = ItemTemplateFactory.getInstance().getTemplate(sourceTemplateId);\n/* 1190 */ CreationEntry temp = createSimpleEntry(10015, sourceTemplateId, 675, 659, true, true, 0.0F, false, false, CreationCategories.LIGHTS_AND_LAMPS);\n/* */ \n/* 1192 */ temp.objectTargetMaterial = lump.getMaterial();\n/* */ }\n/* 1194 */ catch (NoSuchTemplateException noSuchTemplateException) {}\n/* */ \n/* */ }\n/* */ \n/* */ \n/* */ }\n/* */ else {\n/* */ \n/* 1202 */ createSimpleEntry(10015, 46, 675, 659, true, true, 0.0F, false, false, CreationCategories.LIGHTS_AND_LAMPS);\n/* */ } \n/* */ \n/* */ \n/* 1206 */ createSimpleEntry(10015, 23, 123, 20, true, true, 0.0F, false, false, CreationCategories.TOOLS);\n/* */ \n/* 1208 */ createSimpleEntry(10015, 735, 721, 718, true, true, 0.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 1210 */ createSimpleEntry(10015, 23, 686, 687, true, true, 0.0F, false, false, CreationCategories.TOOLS);\n/* */ \n/* 1212 */ createSimpleEntry(10015, 691, 686, 687, true, true, 0.0F, false, false, CreationCategories.TOOLS);\n/* */ \n/* */ \n/* 1215 */ createSimpleEntry(10015, 23, 1010, 1011, true, true, 0.0F, false, false, CreationCategories.TOOLS);\n/* */ \n/* 1217 */ createSimpleEntry(10015, 691, 1010, 1011, true, true, 0.0F, false, false, CreationCategories.TOOLS);\n/* */ \n/* 1219 */ createSimpleEntry(10015, 23, 124, 27, true, true, 0.0F, false, false, CreationCategories.TOOLS);\n/* */ \n/* */ \n/* 1222 */ if (Features.Feature.METALLIC_ITEMS.isEnabled()) {\n/* */ \n/* 1224 */ createMetallicEntries(10014, 185, 46, 86, false, true, 0.0F, false, false, CreationCategories.SHIELDS);\n/* */ \n/* 1226 */ createMetallicEntries(10014, 185, 46, 4, false, true, 0.0F, false, false, CreationCategories.SHIELDS);\n/* */ \n/* 1228 */ createMetallicEntries(10014, 185, 46, 83, false, true, 0.0F, false, false, CreationCategories.SHIELDS);\n/* */ \n/* */ \n/* 1231 */ createMetallicEntries(10015, 185, 46, 121, false, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* */ \n/* 1234 */ createMetallicEntries(10043, 64, 46, 228, false, true, 0.0F, false, false, CreationCategories.LIGHTS_AND_LAMPS);\n/* */ \n/* 1236 */ createMetallicEntries(10043, 64, 46, 232, false, true, 0.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 1238 */ createMetallicEntries(10043, 64, 46, 229, false, true, 0.0F, false, false, CreationCategories.JEWELRY);\n/* */ \n/* */ }\n/* */ else {\n/* */ \n/* 1243 */ createSimpleEntry(10014, 185, 46, 86, false, true, 0.0F, false, false, CreationCategories.SHIELDS);\n/* */ \n/* 1245 */ createSimpleEntry(10014, 185, 46, 4, false, true, 0.0F, false, false, CreationCategories.SHIELDS);\n/* */ \n/* 1247 */ createSimpleEntry(10014, 185, 46, 83, false, true, 0.0F, false, false, CreationCategories.SHIELDS);\n/* */ \n/* 1249 */ createSimpleEntry(10014, 185, 698, 86, false, true, 0.0F, false, false, CreationCategories.SHIELDS);\n/* */ \n/* 1251 */ createSimpleEntry(10014, 185, 698, 4, false, true, 0.0F, false, false, CreationCategories.SHIELDS);\n/* */ \n/* 1253 */ createSimpleEntry(10014, 185, 698, 83, false, true, 0.0F, false, false, CreationCategories.SHIELDS);\n/* */ \n/* 1255 */ createSimpleEntry(10014, 185, 205, 86, false, true, 0.0F, false, false, CreationCategories.SHIELDS);\n/* */ \n/* 1257 */ createSimpleEntry(10014, 185, 205, 4, false, true, 0.0F, false, false, CreationCategories.SHIELDS);\n/* */ \n/* 1259 */ createSimpleEntry(10014, 185, 205, 83, false, true, 0.0F, false, false, CreationCategories.SHIELDS);\n/* */ \n/* 1261 */ createSimpleEntry(10014, 185, 694, 86, false, true, 0.0F, false, false, CreationCategories.SHIELDS);\n/* */ \n/* 1263 */ createSimpleEntry(10014, 185, 694, 4, false, true, 0.0F, false, false, CreationCategories.SHIELDS);\n/* */ \n/* 1265 */ createSimpleEntry(10014, 185, 694, 83, false, true, 0.0F, false, false, CreationCategories.SHIELDS);\n/* */ \n/* 1267 */ createSimpleEntry(10014, 185, 837, 86, false, true, 0.0F, false, false, CreationCategories.SHIELDS);\n/* */ \n/* 1269 */ createSimpleEntry(10014, 185, 837, 4, false, true, 0.0F, false, false, CreationCategories.SHIELDS);\n/* */ \n/* 1271 */ createSimpleEntry(10014, 185, 837, 83, false, true, 0.0F, false, false, CreationCategories.SHIELDS);\n/* */ \n/* */ \n/* 1274 */ createSimpleEntry(10015, 185, 46, 121, false, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* 1276 */ createSimpleEntry(10015, 185, 205, 121, false, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* 1278 */ createSimpleEntry(10015, 185, 698, 121, false, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* 1280 */ createSimpleEntry(10015, 185, 694, 121, false, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* 1282 */ createSimpleEntry(10015, 185, 837, 121, false, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* */ \n/* 1285 */ createSimpleEntry(10043, 64, 44, 229, false, true, 0.0F, false, false, CreationCategories.JEWELRY);\n/* */ \n/* 1287 */ createSimpleEntry(10043, 64, 45, 229, false, true, 0.0F, false, false, CreationCategories.JEWELRY);\n/* */ \n/* */ \n/* 1290 */ createSimpleEntry(10043, 64, 44, 228, false, true, 0.0F, false, false, CreationCategories.LIGHTS_AND_LAMPS);\n/* */ \n/* 1292 */ createSimpleEntry(10043, 64, 45, 228, false, true, 0.0F, false, false, CreationCategories.LIGHTS_AND_LAMPS);\n/* */ \n/* 1294 */ createSimpleEntry(10043, 64, 46, 228, false, true, 0.0F, false, false, CreationCategories.LIGHTS_AND_LAMPS);\n/* */ \n/* 1296 */ createSimpleEntry(10043, 64, 698, 228, false, true, 0.0F, false, false, CreationCategories.LIGHTS_AND_LAMPS);\n/* */ \n/* 1298 */ createSimpleEntry(10043, 64, 694, 228, false, true, 0.0F, false, false, CreationCategories.LIGHTS_AND_LAMPS);\n/* */ \n/* 1300 */ createSimpleEntry(10043, 64, 837, 228, false, true, 0.0F, false, false, CreationCategories.LIGHTS_AND_LAMPS);\n/* */ \n/* 1302 */ createSimpleEntry(10043, 64, 47, 228, false, true, 0.0F, false, false, CreationCategories.LIGHTS_AND_LAMPS);\n/* */ \n/* 1304 */ createSimpleEntry(10043, 64, 44, 232, false, true, 0.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 1306 */ createSimpleEntry(10043, 64, 45, 232, false, true, 0.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 1308 */ createSimpleEntry(10043, 64, 46, 232, false, true, 0.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 1310 */ createSimpleEntry(10043, 64, 47, 232, false, true, 0.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 1312 */ createSimpleEntry(10043, 64, 223, 232, false, true, 0.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 1314 */ createSimpleEntry(10043, 64, 221, 232, false, true, 0.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 1316 */ createSimpleEntry(10043, 64, 49, 232, false, true, 0.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 1318 */ createSimpleEntry(10043, 64, 205, 232, false, true, 0.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 1320 */ createSimpleEntry(10043, 64, 694, 232, false, true, 0.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 1322 */ createSimpleEntry(10043, 64, 837, 232, false, true, 0.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 1324 */ createSimpleEntry(10043, 64, 698, 232, false, true, 0.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ } \n/* */ \n/* */ \n/* 1328 */ createSimpleEntry(10015, 185, 46, 188, false, true, 0.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 1330 */ createSimpleEntry(10015, 23, 121, 25, true, true, 0.0F, false, false, CreationCategories.TOOLS);\n/* */ \n/* 1332 */ createSimpleEntry(1005, 23, 689, 690, true, true, 0.0F, false, false, CreationCategories.TOOLS);\n/* */ \n/* 1334 */ createSimpleEntry(1005, 691, 689, 690, true, true, 0.0F, false, false, CreationCategories.TOOLS);\n/* */ \n/* 1336 */ createSimpleEntry(10041, 204, 46, 205, true, true, 0.0F, true, false, CreationCategories.RESOURCES);\n/* */ \n/* 1338 */ createSimpleEntry(10041, 220, 47, 223, true, true, 0.0F, false, false, CreationCategories.RESOURCES);\n/* */ \n/* 1340 */ createSimpleEntry(10041, 48, 47, 221, true, true, 0.0F, false, false, CreationCategories.RESOURCES);\n/* */ \n/* 1342 */ createSimpleEntry(10043, 64, 44, 227, false, true, 0.0F, false, false, CreationCategories.STATUETTES);\n/* */ \n/* 1344 */ createSimpleEntry(10043, 64, 45, 227, false, true, 0.0F, false, false, CreationCategories.STATUETTES);\n/* */ \n/* 1346 */ createSimpleEntry(10043, 64, 1411, 227, false, true, 0.0F, false, false, CreationCategories.STATUETTES);\n/* */ \n/* 1348 */ createSimpleEntry(10043, 64, 44, 505, false, true, 0.0F, false, false, CreationCategories.STATUETTES);\n/* */ \n/* 1350 */ createSimpleEntry(10043, 64, 45, 505, false, true, 0.0F, false, false, CreationCategories.STATUETTES);\n/* */ \n/* 1352 */ createSimpleEntry(10043, 64, 1411, 505, false, true, 0.0F, false, false, CreationCategories.STATUETTES);\n/* */ \n/* 1354 */ createSimpleEntry(10043, 64, 44, 506, false, true, 0.0F, false, false, CreationCategories.STATUETTES);\n/* */ \n/* 1356 */ createSimpleEntry(10043, 64, 45, 506, false, true, 0.0F, false, false, CreationCategories.STATUETTES);\n/* */ \n/* 1358 */ createSimpleEntry(10043, 64, 1411, 506, false, true, 0.0F, false, false, CreationCategories.STATUETTES);\n/* */ \n/* 1360 */ createSimpleEntry(10043, 64, 44, 507, false, true, 0.0F, false, false, CreationCategories.STATUETTES);\n/* */ \n/* 1362 */ createSimpleEntry(10043, 64, 45, 507, false, true, 0.0F, false, false, CreationCategories.STATUETTES);\n/* */ \n/* 1364 */ createSimpleEntry(10043, 64, 1411, 507, false, true, 0.0F, false, false, CreationCategories.STATUETTES);\n/* */ \n/* 1366 */ createSimpleEntry(10043, 64, 44, 508, false, true, 0.0F, false, false, CreationCategories.STATUETTES);\n/* */ \n/* 1368 */ createSimpleEntry(10043, 64, 45, 508, false, true, 0.0F, false, false, CreationCategories.STATUETTES);\n/* */ \n/* 1370 */ createSimpleEntry(10043, 64, 1411, 508, false, true, 0.0F, false, false, CreationCategories.STATUETTES);\n/* */ \n/* 1372 */ createSimpleEntry(10043, 64, 44, 230, false, true, 0.0F, false, false, CreationCategories.JEWELRY);\n/* */ \n/* 1374 */ createSimpleEntry(10043, 64, 45, 230, false, true, 0.0F, false, false, CreationCategories.JEWELRY);\n/* */ \n/* 1376 */ createSimpleEntry(10043, 64, 1411, 230, false, true, 0.0F, false, false, CreationCategories.JEWELRY);\n/* */ \n/* 1378 */ createSimpleEntry(10043, 64, 44, 231, false, true, 0.0F, false, false, CreationCategories.JEWELRY);\n/* */ \n/* 1380 */ createSimpleEntry(10043, 64, 45, 231, false, true, 0.0F, false, false, CreationCategories.JEWELRY);\n/* */ \n/* 1382 */ createSimpleEntry(10043, 64, 1411, 231, false, true, 0.0F, false, false, CreationCategories.JEWELRY);\n/* */ \n/* 1384 */ createSimpleEntry(10043, 64, 694, 231, false, true, 0.0F, false, false, CreationCategories.JEWELRY);\n/* */ \n/* 1386 */ createSimpleEntry(10043, 64, 837, 231, false, true, 0.0F, false, false, CreationCategories.JEWELRY);\n/* */ \n/* 1388 */ createSimpleEntry(10043, 64, 698, 231, false, true, 0.0F, false, false, CreationCategories.JEWELRY);\n/* */ \n/* 1390 */ createSimpleEntry(10043, 64, 44, 297, false, true, 100.0F, false, false, CreationCategories.JEWELRY);\n/* */ \n/* 1392 */ createSimpleEntry(10043, 64, 45, 297, false, true, 100.0F, false, false, CreationCategories.JEWELRY);\n/* */ \n/* 1394 */ createSimpleEntry(10043, 64, 1411, 297, false, true, 100.0F, false, false, CreationCategories.JEWELRY);\n/* */ \n/* 1396 */ createSimpleEntry(10043, 64, 698, 297, false, true, 100.0F, false, false, CreationCategories.JEWELRY);\n/* */ \n/* 1398 */ createSimpleEntry(10043, 64, 694, 297, false, true, 100.0F, false, false, CreationCategories.JEWELRY);\n/* */ \n/* 1400 */ createSimpleEntry(10043, 64, 837, 297, false, true, 100.0F, false, false, CreationCategories.JEWELRY);\n/* */ \n/* 1402 */ createSimpleEntry(10043, 229, 232, 233, true, true, 0.0F, false, false, CreationCategories.TOOLS);\n/* */ \n/* 1404 */ createSimpleEntry(10043, 185, 47, 839, false, true, 0.0F, false, false, 20, 30.0D, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 1406 */ createSimpleEntry(10043, 185, 44, 840, false, true, 0.0F, false, false, 20, 30.0D, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* */ \n/* 1409 */ createSimpleEntry(10051, 214, 23, 271, true, true, 100.0F, false, false, CreationCategories.TOYS);\n/* */ \n/* 1411 */ createSimpleEntry(10074, 97, 146, 132, false, true, 10.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 1413 */ createSimpleEntry(10074, 97, 146, 1122, false, true, 10.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 1415 */ createSimpleEntry(10074, 97, 785, 786, false, true, 10.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 1417 */ createSimpleEntry(10074, 97, 770, 784, false, true, 10.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 1419 */ createSimpleEntry(10074, 97, 146, 519, false, true, 10.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 1421 */ createSimpleEntry(10074, 97, 1116, 1121, false, true, 10.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 1423 */ createSimpleEntry(10074, 97, 770, 1123, false, true, 10.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* */ \n/* 1426 */ createSimpleEntry(10074, 97, 146, 202, false, true, 10.0F, false, false, CreationCategories.TOOLS);\n/* */ \n/* 1428 */ createSimpleEntry(10074, 97, 146, 296, false, true, 10.0F, false, false, CreationCategories.TOOLS);\n/* */ \n/* 1430 */ createSimpleEntry(10074, 97, 146, 402, false, true, 10.0F, false, true, CreationCategories.STATUES);\n/* */ \n/* 1432 */ createSimpleEntry(10074, 97, 146, 399, false, true, 10.0F, false, true, CreationCategories.STATUES);\n/* */ \n/* 1434 */ createSimpleEntry(10074, 97, 146, 400, false, true, 10.0F, false, true, CreationCategories.STATUES);\n/* */ \n/* 1436 */ createSimpleEntry(10074, 97, 146, 403, false, true, 10.0F, false, true, CreationCategories.STATUES);\n/* */ \n/* 1438 */ createSimpleEntry(10074, 97, 146, 398, false, true, 10.0F, false, true, CreationCategories.STATUES);\n/* */ \n/* 1440 */ createSimpleEntry(10074, 97, 146, 401, false, true, 10.0F, false, true, CreationCategories.STATUES);\n/* */ \n/* 1442 */ createSimpleEntry(10074, 97, 146, 406, false, true, 10.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 1444 */ createSimpleEntry(10074, 97, 785, 787, false, true, 10.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 1446 */ createSimpleEntry(10074, 97, 1116, 1124, false, true, 10.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 1448 */ createSimpleEntry(10074, 97, 770, 771, false, true, 10.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 1450 */ createSimpleEntry(10074, 97, 146, 905, false, true, 10.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 1452 */ createSimpleEntry(10074, 97, 785, 906, false, true, 10.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 1454 */ createSimpleEntry(10074, 97, 770, 1302, false, true, 10.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 1456 */ createSimpleEntry(10074, 97, 1116, 1305, false, true, 10.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 1458 */ createSimpleEntry(1011, 14, 130, 1303, false, true, 0.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 1460 */ createSimpleEntry(10074, 97, 146, 408, false, true, 10.0F, false, true, CreationCategories.FOUNTAINS_AND_WELLS);\n/* */ \n/* 1462 */ createSimpleEntry(10074, 97, 146, 635, false, true, 10.0F, false, true, CreationCategories.FOUNTAINS_AND_WELLS);\n/* */ \n/* 1464 */ createSimpleEntry(10074, 97, 146, 405, false, true, 10.0F, false, true, CreationCategories.FOUNTAINS_AND_WELLS);\n/* */ \n/* 1466 */ createSimpleEntry(10074, 97, 146, 593, false, true, 10.0F, false, true, CreationCategories.MINE_DOORS);\n/* */ \n/* 1468 */ createSimpleEntry(10074, 684, 146, 685, true, true, 10.0F, false, false, CreationCategories.TOOLS);\n/* */ \n/* 1470 */ createSimpleEntry(10074, 685, 146, 686, false, true, 10.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* 1472 */ createSimpleEntry(10074, 685, 146, 689, false, true, 10.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* 1474 */ createSimpleEntry(10074, 685, 146, 1010, false, true, 10.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* 1476 */ createSimpleEntry(10074, 97, 146, 686, false, true, 10.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* 1478 */ createSimpleEntry(10074, 97, 146, 689, false, true, 10.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* 1480 */ createSimpleEntry(10074, 97, 146, 1010, false, true, 10.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* 1482 */ createSimpleEntry(1005, 685, 688, 36, false, true, 10.0F, false, false, CreationCategories.KINDLINGS);\n/* */ \n/* 1484 */ createSimpleEntry(1005, 8, 688, 36, false, true, 10.0F, false, false, CreationCategories.KINDLINGS);\n/* */ \n/* 1486 */ createSimpleEntry(1005, 93, 688, 36, false, true, 10.0F, false, false, CreationCategories.KINDLINGS);\n/* */ \n/* 1488 */ createSimpleEntry(1005, 685, 688, 23, false, true, 10.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 1490 */ createSimpleEntry(1005, 8, 688, 23, false, true, 10.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 1492 */ createSimpleEntry(1005, 93, 688, 23, false, true, 10.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* */ \n/* 1495 */ if (Features.Feature.METALLIC_ITEMS.isEnabled()) {\n/* */ \n/* 1497 */ createMetallicEntries(10034, 64, 46, 167, false, true, 0.0F, false, false, CreationCategories.LOCKS);\n/* */ \n/* 1499 */ createMetallicEntries(10034, 64, 46, 194, false, true, 0.0F, false, false, CreationCategories.LOCKS);\n/* */ \n/* 1501 */ createMetallicEntries(10034, 64, 46, 193, false, true, 0.0F, false, false, CreationCategories.LOCKS);\n/* */ \n/* 1503 */ createMetallicEntries(10034, 64, 46, 463, false, true, 0.0F, false, false, 0, 25.0D, CreationCategories.TOOLS);\n/* */ \n/* 1505 */ createMetallicEntries(10034, 185, 46, 252, false, true, 0.0F, false, false, CreationCategories.LOCKS);\n/* */ \n/* 1507 */ createMetallicEntries(10034, 185, 46, 568, false, true, 0.0F, false, false, CreationCategories.LOCKS);\n/* */ \n/* */ \n/* 1510 */ createMetallicEntries(10015, 64, 46, 185, false, true, 0.0F, false, true, CreationCategories.TOOLS);\n/* */ \n/* */ \n/* 1513 */ createMetallicEntries(10015, 185, 46, 547, false, true, 0.0F, false, true, CreationCategories.SHIPBUILDING);\n/* */ \n/* */ }\n/* */ else {\n/* */ \n/* 1518 */ createSimpleEntry(10034, 64, 46, 167, false, true, 0.0F, false, false, CreationCategories.LOCKS);\n/* */ \n/* 1520 */ createSimpleEntry(10034, 64, 46, 194, false, true, 0.0F, false, false, CreationCategories.LOCKS);\n/* */ \n/* 1522 */ createSimpleEntry(10034, 64, 46, 193, false, true, 0.0F, false, false, CreationCategories.LOCKS);\n/* */ \n/* 1524 */ createSimpleEntry(10034, 64, 694, 167, false, true, 0.0F, false, false, CreationCategories.LOCKS);\n/* */ \n/* 1526 */ createSimpleEntry(10034, 64, 694, 194, false, true, 0.0F, false, false, CreationCategories.LOCKS);\n/* */ \n/* 1528 */ createSimpleEntry(10034, 64, 694, 193, false, true, 0.0F, false, false, CreationCategories.LOCKS);\n/* */ \n/* 1530 */ createSimpleEntry(10034, 64, 837, 167, false, true, 0.0F, false, false, CreationCategories.LOCKS);\n/* */ \n/* 1532 */ createSimpleEntry(10034, 64, 837, 194, false, true, 0.0F, false, false, CreationCategories.LOCKS);\n/* */ \n/* 1534 */ createSimpleEntry(10034, 64, 837, 193, false, true, 0.0F, false, false, CreationCategories.LOCKS);\n/* */ \n/* 1536 */ createSimpleEntry(10034, 64, 698, 167, false, true, 0.0F, false, false, CreationCategories.LOCKS);\n/* */ \n/* 1538 */ createSimpleEntry(10034, 64, 698, 194, false, true, 0.0F, false, false, CreationCategories.LOCKS);\n/* */ \n/* 1540 */ createSimpleEntry(10034, 64, 698, 193, false, true, 0.0F, false, false, CreationCategories.LOCKS);\n/* */ \n/* 1542 */ createSimpleEntry(10034, 64, 46, 463, false, true, 0.0F, false, false, 0, 25.0D, CreationCategories.TOOLS);\n/* */ \n/* 1544 */ createSimpleEntry(10034, 64, 205, 463, false, true, 0.0F, false, false, 0, 25.0D, CreationCategories.TOOLS);\n/* */ \n/* 1546 */ createSimpleEntry(10034, 64, 694, 463, false, true, 0.0F, false, false, 0, 25.0D, CreationCategories.TOOLS);\n/* */ \n/* 1548 */ createSimpleEntry(10034, 64, 837, 463, false, true, 0.0F, false, false, 0, 25.0D, CreationCategories.TOOLS);\n/* */ \n/* 1550 */ createSimpleEntry(10034, 64, 698, 463, false, true, 0.0F, false, false, 0, 25.0D, CreationCategories.TOOLS);\n/* */ \n/* 1552 */ createSimpleEntry(10034, 64, 47, 463, false, true, 0.0F, false, false, 0, 25.0D, CreationCategories.TOOLS);\n/* */ \n/* 1554 */ createSimpleEntry(10034, 185, 46, 252, false, true, 0.0F, false, false, CreationCategories.LOCKS);\n/* */ \n/* 1556 */ createSimpleEntry(10034, 185, 46, 568, false, true, 0.0F, false, false, CreationCategories.LOCKS);\n/* */ \n/* */ \n/* 1559 */ createSimpleEntry(10015, 64, 46, 185, false, true, 0.0F, false, true, CreationCategories.TOOLS);\n/* */ \n/* */ \n/* 1562 */ createSimpleEntry(10015, 185, 49, 547, false, true, 0.0F, false, true, CreationCategories.SHIPBUILDING);\n/* */ } \n/* */ \n/* */ \n/* 1566 */ createSimpleEntry(10034, 168, 130, 342, false, true, 0.0F, false, false, CreationCategories.TOOLS);\n/* */ \n/* 1568 */ createSimpleEntry(10034, 343, 47, 341, false, true, 0.0F, false, false, CreationCategories.LOCKS);\n/* */ \n/* 1570 */ createSimpleEntry(10034, 341, 130, 342, false, true, 0.0F, false, false, CreationCategories.TOOLS);\n/* */ \n/* */ \n/* 1573 */ createSimpleEntry(1014, 320, 318, 319, false, true, 30.0F, false, false, CreationCategories.ROPES);\n/* */ \n/* 1575 */ createSimpleEntry(1014, 320, 318, 557, false, true, 30.0F, false, false, CreationCategories.ROPES);\n/* */ \n/* 1577 */ createSimpleEntry(1014, 320, 318, 559, false, true, 30.0F, false, false, CreationCategories.ROPES);\n/* */ \n/* 1579 */ createSimpleEntry(1014, 320, 318, 558, false, true, 30.0F, false, false, CreationCategories.ROPES);\n/* */ \n/* 1581 */ createSimpleEntry(1014, 320, 318, 457, false, true, 30.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* 1583 */ createSimpleEntry(10039, 428, 203, 488, true, true, 0.0F, false, false, CreationCategories.FOOD);\n/* */ \n/* 1585 */ createSimpleEntry(10039, 66, 203, 488, true, true, 0.0F, false, false, CreationCategories.FOOD);\n/* */ \n/* 1587 */ createSimpleEntry(10039, 68, 203, 488, true, true, 0.0F, false, false, CreationCategories.FOOD);\n/* */ \n/* 1589 */ createSimpleEntry(10039, 69, 203, 488, true, true, 0.0F, false, false, CreationCategories.FOOD);\n/* */ \n/* 1591 */ createSimpleEntry(10039, 67, 203, 488, true, true, 0.0F, false, false, CreationCategories.FOOD);\n/* */ \n/* 1593 */ createSimpleEntry(10039, 415, 203, 488, true, true, 0.0F, false, false, CreationCategories.FOOD);\n/* */ \n/* 1595 */ createSimpleEntry(10039, 70, 203, 488, true, true, 0.0F, false, false, CreationCategories.FOOD);\n/* */ \n/* 1597 */ createSimpleEntry(10039, 464, 203, 488, true, true, 0.0F, false, false, CreationCategories.FOOD);\n/* */ \n/* */ \n/* 1600 */ createSimpleEntry(10042, 413, 752, 753, false, true, 50.0F, false, false, CreationCategories.WRITING);\n/* */ \n/* */ \n/* 1603 */ createSimpleEntry(1018, 8, 33, 522, false, true, 0.0F, false, false, CreationCategories.DECORATION);\n/* */ \n/* 1605 */ createSimpleEntry(1018, 685, 33, 522, false, true, 0.0F, false, false, CreationCategories.DECORATION);\n/* */ \n/* */ \n/* 1608 */ createSimpleEntry(10043, 185, 45, 325, false, true, 0.0F, false, true, CreationCategories.ALTAR);\n/* */ \n/* 1610 */ createSimpleEntry(10043, 185, 44, 324, false, true, 0.0F, false, true, CreationCategories.ALTAR);\n/* */ \n/* */ \n/* 1613 */ createSimpleEntry(10082, 24, 9, 556, false, true, 60.0F, false, false, CreationCategories.SHIPBUILDING);\n/* */ \n/* 1615 */ createSimpleEntry(10082, 24, 9, 545, false, true, 20.0F, false, false, CreationCategories.SHIPBUILDING);\n/* */ \n/* 1617 */ createSimpleEntry(10082, 8, 9, 550, false, true, 30.0F, false, false, CreationCategories.SHIPBUILDING);\n/* */ \n/* 1619 */ createSimpleEntry(10082, 8, 9, 549, false, true, 30.0F, false, false, CreationCategories.SHIPBUILDING);\n/* */ \n/* 1621 */ createSimpleEntry(10082, 8, 23, 567, false, true, 30.0F, false, false, CreationCategories.SHIPBUILDING);\n/* */ \n/* */ \n/* 1624 */ createSimpleEntry(10082, 8, 9, 551, false, true, 40.0F, false, false, CreationCategories.SHIPBUILDING);\n/* */ \n/* 1626 */ createSimpleEntry(10082, 24, 9, 546, false, true, 0.0F, false, false, CreationCategories.SHIPBUILDING);\n/* */ \n/* 1628 */ createSimpleEntry(10082, 24, 9, 566, false, true, 40.0F, false, false, CreationCategories.SHIPBUILDING);\n/* */ \n/* 1630 */ createSimpleEntry(10082, 7, 385, 552, false, true, 20.0F, false, false, CreationCategories.SHIPBUILDING);\n/* */ \n/* 1632 */ createSimpleEntry(10082, 7, 385, 588, false, true, 20.0F, false, false, CreationCategories.SHIPBUILDING);\n/* */ \n/* 1634 */ createSimpleEntry(10082, 7, 385, 590, false, true, 20.0F, false, false, CreationCategories.SHIPBUILDING);\n/* */ \n/* 1636 */ createSimpleEntry(10082, 7, 385, 589, false, true, 20.0F, false, false, CreationCategories.SHIPBUILDING);\n/* */ \n/* */ \n/* 1639 */ createSimpleEntry(10082, 7, 385, 560, false, true, 50.0F, false, false, CreationCategories.SHIPBUILDING);\n/* */ \n/* 1641 */ createSimpleEntry(1020, 558, 547, 565, true, true, 0.0F, false, false, CreationCategories.SHIPBUILDING);\n/* */ \n/* */ \n/* 1644 */ createSimpleEntry(10042, 73, 492, 782, true, true, 0.0F, true, false, CreationCategories.RESOURCES);\n/* */ \n/* 1646 */ createSimpleEntry(10074, 97, 146, 811, false, true, 10.0F, false, true, CreationCategories.STATUES);\n/* */ \n/* */ \n/* 1649 */ createSimpleEntry(10015, 185, 46, 859, false, true, 0.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* */ \n/* 1652 */ createSimpleEntry(10042, 383, 711, 825, true, true, 0.0F, false, false, CreationCategories.MAGIC);\n/* */ \n/* 1654 */ createSimpleEntry(10042, 377, 711, 826, true, true, 0.0F, false, false, CreationCategories.MAGIC);\n/* */ \n/* 1656 */ createSimpleEntry(10042, 381, 711, 827, true, true, 0.0F, false, false, CreationCategories.MAGIC);\n/* */ \n/* 1658 */ createSimpleEntry(10042, 379, 711, 828, true, true, 0.0F, false, false, CreationCategories.MAGIC);\n/* */ \n/* 1660 */ createSimpleEntry(10042, 375, 711, 829, true, true, 0.0F, false, false, CreationCategories.MAGIC);\n/* */ \n/* 1662 */ createSimpleEntry(1011, 14, 130, 812, false, true, 0.0F, false, false, CreationCategories.POTTERY);\n/* */ \n/* 1664 */ createSimpleEntry(10074, 97, 146, 821, false, true, 0.0F, false, false, CreationCategories.DECORATION);\n/* */ \n/* 1666 */ createSimpleEntry(10015, 64, 221, 902, false, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* 1668 */ createSimpleEntry(10015, 64, 223, 904, false, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* 1670 */ createSimpleEntry(10016, 922, 921, 925, false, true, 0.0F, false, false, CreationCategories.RESOURCES);\n/* */ \n/* 1672 */ createSimpleEntry(10016, 226, 925, 926, false, true, 0.0F, false, false, CreationCategories.RESOURCES);\n/* */ \n/* */ \n/* 1675 */ createSimpleEntry(10016, 215, 926, 943, false, true, 0.0F, false, false, CreationCategories.CLOTHES);\n/* */ \n/* */ \n/* 1678 */ createSimpleEntry(10016, 216, 926, 943, false, true, 0.0F, false, false, CreationCategories.CLOTHES);\n/* */ \n/* */ \n/* */ \n/* 1682 */ createSimpleEntry(10016, 215, 926, 954, false, true, 0.0F, false, false, CreationCategories.CLOTHES);\n/* */ \n/* */ \n/* 1685 */ createSimpleEntry(10016, 216, 926, 954, false, true, 0.0F, false, false, CreationCategories.CLOTHES);\n/* */ \n/* */ \n/* */ \n/* 1689 */ createSimpleEntry(10017, 926, 847, 959, true, true, 0.0F, false, false, CreationCategories.ARMOUR)\n/* 1690 */ .setFinalMaterial((byte)16);\n/* 1691 */ createSimpleEntry(10017, 215, 72, 960, false, true, 0.0F, false, false, CreationCategories.CLOTHES);\n/* */ \n/* */ \n/* */ \n/* 1695 */ createSimpleEntry(10016, 215, 926, 961, false, true, 0.0F, false, false, CreationCategories.CLOTHES);\n/* */ \n/* */ \n/* 1698 */ createSimpleEntry(10016, 216, 926, 961, false, true, 0.0F, false, false, CreationCategories.CLOTHES);\n/* */ \n/* */ \n/* */ \n/* 1702 */ createSimpleEntry(10016, 226, 214, 908, false, true, 0.0F, false, false, 0, 20.0D, CreationCategories.RUGS)\n/* */ \n/* 1704 */ .setDepleteFromTarget(3000);\n/* */ \n/* 1706 */ createSimpleEntry(10016, 226, 214, 909, false, true, 0.0F, false, false, 0, 30.0D, CreationCategories.RUGS)\n/* */ \n/* 1708 */ .setDepleteFromTarget(4000);\n/* */ \n/* 1710 */ createSimpleEntry(10016, 226, 214, 910, false, true, 0.0F, false, false, 0, 40.0D, CreationCategories.RUGS)\n/* */ \n/* 1712 */ .setDepleteFromTarget(5000);\n/* */ \n/* */ \n/* 1715 */ createSimpleEntry(10074, 97, 785, 402, false, true, 10.0F, false, true, CreationCategories.STATUES);\n/* */ \n/* 1717 */ createSimpleEntry(10074, 97, 785, 403, false, true, 10.0F, false, true, CreationCategories.STATUES);\n/* */ \n/* 1719 */ createSimpleEntry(10074, 97, 785, 398, false, true, 10.0F, false, true, CreationCategories.STATUES);\n/* */ \n/* 1721 */ createSimpleEntry(10074, 97, 785, 401, false, true, 10.0F, false, true, CreationCategories.STATUES);\n/* */ \n/* 1723 */ createSimpleEntry(10074, 97, 785, 811, false, true, 10.0F, false, true, CreationCategories.STATUES);\n/* */ \n/* */ \n/* 1726 */ createSimpleEntry(1011, 14, 130, 1160, false, true, 0.0F, false, false, CreationCategories.POTTERY);\n/* */ \n/* 1728 */ createSimpleEntry(1011, 14, 130, 1164, false, true, 0.0F, false, false, CreationCategories.POTTERY);\n/* */ \n/* 1730 */ createSimpleEntry(1011, 14, 130, 1168, false, true, 0.0F, false, false, CreationCategories.POTTERY);\n/* */ \n/* 1732 */ createSimpleEntry(1011, 14, 130, 1171, false, true, 0.0F, false, false, CreationCategories.POTTERY);\n/* */ \n/* 1734 */ createSimpleEntry(1011, 14, 130, 1251, false, true, 0.0F, false, false, CreationCategories.POTTERY);\n/* */ \n/* 1736 */ createSimpleEntry(10015, 64, 220, 1166, false, true, 0.0F, false, false, CreationCategories.TOOLS);\n/* */ \n/* 1738 */ createSimpleEntry(10074, 97, 785, 1167, false, true, 10.0F, false, false, CreationCategories.TOOLS);\n/* */ \n/* 1740 */ createSimpleEntry(10074, 97, 785, 1237, false, true, 10.0F, false, false, CreationCategories.TOOLS);\n/* */ \n/* 1742 */ createSimpleEntry(1005, 8, 9, 1173, false, true, 0.0F, false, false, CreationCategories.COOKING_UTENSILS);\n/* */ \n/* */ \n/* */ \n/* 1746 */ int[] metalTypes = { 221, 223, 220, 694, 698, 44, 45, 205, 47, 46, 49, 48, 837 };\n/* */ \n/* */ \n/* 1749 */ int[] runeTypes = { 1290, 1293, 1292, 1289, 1291 };\n/* 1750 */ for (int metal : metalTypes) {\n/* */ \n/* 1752 */ for (int rune : runeTypes) {\n/* */ \n/* 1754 */ createSimpleEntry(10074, 1102, metal, rune, true, true, 0.0F, false, false, CreationCategories.MAGIC)\n/* */ \n/* 1756 */ .setDepleteFromTarget(200);\n/* 1757 */ createSimpleEntry(10043, 1103, metal, rune, true, true, 0.0F, false, false, CreationCategories.MAGIC)\n/* */ \n/* 1759 */ .setDepleteFromTarget(200);\n/* 1760 */ createSimpleEntry(10044, 1104, metal, rune, true, true, 0.0F, false, false, CreationCategories.MAGIC)\n/* */ \n/* 1762 */ .setDepleteFromTarget(200);\n/* */ } \n/* */ } \n/* */ \n/* */ \n/* */ \n/* 1768 */ createSimpleEntry(10074, 1102, 1411, 1290, true, true, 0.0F, false, false, CreationCategories.MAGIC)\n/* */ \n/* 1770 */ .setDepleteFromTarget(200);\n/* 1771 */ createSimpleEntry(10043, 1103, 1411, 1290, true, true, 0.0F, false, false, CreationCategories.MAGIC)\n/* */ \n/* 1773 */ .setDepleteFromTarget(200);\n/* 1774 */ createSimpleEntry(10044, 1104, 1411, 1290, true, true, 0.0F, false, false, CreationCategories.MAGIC)\n/* */ \n/* 1776 */ .setDepleteFromTarget(200);\n/* */ \n/* */ \n/* 1779 */ createSimpleEntry(10041, 44, 45, 1411, true, true, 0.0F, false, false, CreationCategories.RESOURCES);\n/* */ \n/* */ \n/* 1782 */ createSimpleEntry(10074, 97, 785, 1430, false, true, 10.0F, false, true, CreationCategories.STATUES);\n/* */ \n/* */ \n/* */ \n/* 1786 */ CreationEntry brownBearRug = createSimpleEntry(10017, 302, 349, 847, true, true, 0.0F, false, false, 0, 30.0D, CreationCategories.RUGS);\n/* */ \n/* 1788 */ brownBearRug.setDepleteFromSource(3000);\n/* 1789 */ brownBearRug.setDepleteFromTarget(1);\n/* */ \n/* 1791 */ CreationEntry blackBearRug = createSimpleEntry(10017, 302, 349, 846, true, true, 0.0F, false, false, 0, 30.0D, CreationCategories.RUGS);\n/* */ \n/* 1793 */ blackBearRug.setDepleteFromSource(3000);\n/* 1794 */ blackBearRug.setDepleteFromTarget(1);\n/* */ \n/* 1796 */ CreationEntry mountainLionRug = createSimpleEntry(10017, 313, 349, 848, true, true, 0.0F, false, false, 0, 30.0D, CreationCategories.RUGS);\n/* */ \n/* 1798 */ mountainLionRug.setDepleteFromSource(300);\n/* 1799 */ mountainLionRug.setDepleteFromTarget(1);\n/* */ \n/* 1801 */ CreationEntry blackWolfRug = createSimpleEntry(10017, 302, 349, 849, true, true, 0.0F, false, false, 0, 30.0D, CreationCategories.RUGS);\n/* */ \n/* 1803 */ blackWolfRug.setDepleteFromSource(3000);\n/* 1804 */ blackWolfRug.setDepleteFromTarget(1);\n/* */ \n/* 1806 */ AdvancedCreationEntry lRudder = createAdvancedEntry(10082, 23, 22, 544, false, false, 0.0F, true, false, CreationCategories.SHIPBUILDING);\n/* */ \n/* 1808 */ lRudder.addRequirement(new CreationRequirement(1, 22, 5, true));\n/* */ \n/* 1810 */ AdvancedCreationEntry bellCot = createAdvancedEntry(1005, 217, 22, 723, false, false, 0.0F, true, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 1812 */ bellCot.addRequirement(new CreationRequirement(1, 22, 25, true));\n/* 1813 */ bellCot.addRequirement(new CreationRequirement(2, 9, 4, true));\n/* */ \n/* 1815 */ AdvancedCreationEntry bellTower = createAdvancedEntry(1005, 718, 723, 722, false, false, 0.0F, true, false, CreationCategories.DECORATION);\n/* */ \n/* 1817 */ bellTower.addRequirement(new CreationRequirement(1, 319, 1, true));\n/* */ \n/* 1819 */ AdvancedCreationEntry bellSmall = createAdvancedEntry(10015, 734, 720, 719, false, false, 0.0F, true, false, CreationCategories.TOYS);\n/* */ \n/* 1821 */ bellSmall.addRequirement(new CreationRequirement(1, 99, 1, true));\n/* */ \n/* 1823 */ AdvancedCreationEntry lHelm = createAdvancedEntry(10082, 23, 22, 548, false, false, 0.0F, true, true, CreationCategories.SHIPBUILDING);\n/* */ \n/* 1825 */ lHelm.addRequirement(new CreationRequirement(1, 23, 5, true));\n/* 1826 */ lHelm.addRequirement(new CreationRequirement(2, 22, 4, true));\n/* 1827 */ lHelm.addRequirement(new CreationRequirement(3, 561, 8, true));\n/* */ \n/* 1829 */ AdvancedCreationEntry well = createAdvancedEntry(1013, 132, 130, 608, false, false, 0.0F, true, true, CreationCategories.FOUNTAINS_AND_WELLS);\n/* */ \n/* 1831 */ well.addRequirement(new CreationRequirement(1, 132, 10, true));\n/* 1832 */ well.addRequirement(new CreationRequirement(2, 130, 10, true));\n/* 1833 */ well.addRequirement(new CreationRequirement(3, 319, 1, true));\n/* 1834 */ well.addRequirement(new CreationRequirement(4, 421, 1, true));\n/* */ \n/* 1836 */ AdvancedCreationEntry lStern = createAdvancedEntry(10082, 551, 546, 553, false, false, 0.0F, true, false, CreationCategories.SHIPBUILDING);\n/* */ \n/* 1838 */ lStern.addRequirement(new CreationRequirement(1, 546, 10, true));\n/* 1839 */ lStern.addRequirement(new CreationRequirement(2, 551, 9, true));\n/* 1840 */ lStern.addRequirement(new CreationRequirement(3, 561, 20, true));\n/* */ \n/* 1842 */ AdvancedCreationEntry lRigS = createAdvancedEntry(10082, 589, 555, 564, false, false, 0.0F, true, false, CreationCategories.SHIPBUILDING);\n/* */ \n/* 1844 */ lRigS.addRequirement(new CreationRequirement(1, 559, 4, true));\n/* 1845 */ lRigS.addRequirement(new CreationRequirement(2, 549, 2, true));\n/* 1846 */ lRigS.addRequirement(new CreationRequirement(3, 550, 2, true));\n/* */ \n/* 1848 */ AdvancedCreationEntry lRigT = createAdvancedEntry(10082, 588, 554, 563, false, false, 0.0F, true, false, CreationCategories.SHIPBUILDING);\n/* */ \n/* 1850 */ lRigT.addRequirement(new CreationRequirement(1, 559, 2, true));\n/* 1851 */ lRigT.addRequirement(new CreationRequirement(2, 549, 2, true));\n/* */ \n/* 1853 */ AdvancedCreationEntry spinRigT = createAdvancedEntry(10082, 588, 591, 584, false, false, 0.0F, true, false, CreationCategories.SHIPBUILDING);\n/* */ \n/* 1855 */ spinRigT.addRequirement(new CreationRequirement(1, 559, 2, true));\n/* 1856 */ spinRigT.addRequirement(new CreationRequirement(2, 549, 2, true));\n/* */ \n/* 1858 */ AdvancedCreationEntry lRigCrows = createAdvancedEntry(10082, 590, 555, 585, false, false, 0.0F, true, false, CreationCategories.SHIPBUILDING);\n/* */ \n/* 1860 */ lRigCrows.addRequirement(new CreationRequirement(1, 559, 8, true));\n/* 1861 */ lRigCrows.addRequirement(new CreationRequirement(2, 583, 1, true));\n/* 1862 */ lRigCrows.addRequirement(new CreationRequirement(3, 550, 4, true));\n/* 1863 */ lRigCrows.addRequirement(new CreationRequirement(4, 549, 2, true));\n/* */ \n/* 1865 */ AdvancedCreationEntry tRigCrows = createAdvancedEntry(10082, 552, 555, 587, false, false, 0.0F, true, false, CreationCategories.SHIPBUILDING);\n/* */ \n/* 1867 */ tRigCrows.addRequirement(new CreationRequirement(1, 559, 16, true));\n/* 1868 */ tRigCrows.addRequirement(new CreationRequirement(2, 583, 1, true));\n/* 1869 */ tRigCrows.addRequirement(new CreationRequirement(3, 555, 5, true));\n/* 1870 */ tRigCrows.addRequirement(new CreationRequirement(4, 550, 8, true));\n/* 1871 */ tRigCrows.addRequirement(new CreationRequirement(5, 549, 4, true));\n/* */ \n/* 1873 */ AdvancedCreationEntry lRigSqY = createAdvancedEntry(10082, 552, 555, 586, false, false, 0.0F, true, false, CreationCategories.SHIPBUILDING);\n/* */ \n/* 1875 */ lRigSqY.addRequirement(new CreationRequirement(1, 559, 12, true));\n/* 1876 */ lRigSqY.addRequirement(new CreationRequirement(2, 555, 3, true));\n/* 1877 */ lRigSqY.addRequirement(new CreationRequirement(3, 550, 6, true));\n/* */ \n/* 1879 */ AdvancedCreationEntry bardingLeather = createAdvancedEntry(10017, 131, 72, 702, false, false, 0.0F, true, false, CreationCategories.ANIMAL_EQUIPMENT);\n/* */ \n/* 1881 */ bardingLeather.addRequirement(new CreationRequirement(1, 72, 4, true));\n/* 1882 */ bardingLeather.addRequirement(new CreationRequirement(2, 131, 50, true));\n/* */ \n/* 1884 */ AdvancedCreationEntry bridle = createAdvancedEntry(10017, 627, 631, 624, false, false, 0.0F, true, false, CreationCategories.ANIMAL_EQUIPMENT);\n/* */ \n/* 1886 */ bridle.addRequirement(new CreationRequirement(1, 628, 1, true));\n/* */ \n/* 1888 */ AdvancedCreationEntry saddle = createAdvancedEntry(10017, 625, 629, 621, false, false, 0.0F, true, false, CreationCategories.ANIMAL_EQUIPMENT);\n/* */ \n/* 1890 */ saddle.addRequirement(new CreationRequirement(1, 626, 1, true));\n/* */ \n/* 1892 */ AdvancedCreationEntry saddleL = createAdvancedEntry(10017, 625, 630, 622, false, false, 0.0F, true, false, CreationCategories.ANIMAL_EQUIPMENT);\n/* */ \n/* */ \n/* 1895 */ saddleL.addRequirement(new CreationRequirement(1, 626, 1, true));\n/* */ \n/* 1897 */ AdvancedCreationEntry saddleBag = createAdvancedEntry(10017, 1332, 102, 1333, false, false, 0.0F, true, false, CreationCategories.ANIMAL_EQUIPMENT);\n/* */ \n/* 1899 */ saddleBag.addRequirement(new CreationRequirement(1, 102, 1, true));\n/* 1900 */ saddleBag.addRequirement(new CreationRequirement(2, 1332, 1, true));\n/* */ \n/* 1902 */ AdvancedCreationEntry birdcage = createAdvancedEntry(10043, 897, 444, 1025, false, false, 0.0F, true, false, CreationCategories.DECORATION);\n/* */ \n/* 1904 */ birdcage.addRequirement(new CreationRequirement(1, 897, 1, true));\n/* 1905 */ birdcage.addRequirement(new CreationRequirement(2, 131, 10, true));\n/* 1906 */ birdcage.addRequirement(new CreationRequirement(3, 444, 4, true));\n/* 1907 */ birdcage.addRequirement(new CreationRequirement(4, 326, 1, true));\n/* 1908 */ birdcage.addRequirement(new CreationRequirement(5, 221, 10, true));\n/* 1909 */ birdcage.addRequirement(new CreationRequirement(6, 464, 1, true));\n/* 1910 */ birdcage.setIsEpicBuildMissionTarget(false);\n/* */ \n/* */ \n/* */ \n/* 1914 */ createBoatEntries();\n/* */ \n/* */ \n/* 1917 */ AdvancedCreationEntry sacknife = createAdvancedEntry(1016, 101, 793, 792, false, false, 0.0F, true, false, CreationCategories.WEAPONS);\n/* */ \n/* */ \n/* 1920 */ sacknife.addRequirement(new CreationRequirement(1, 376, 3, true));\n/* 1921 */ sacknife.addRequirement(new CreationRequirement(2, 382, 3, true));\n/* 1922 */ sacknife.addRequirement(new CreationRequirement(3, 380, 1, true));\n/* */ \n/* 1924 */ AdvancedCreationEntry torch = createAdvancedEntry(1010, 153, 23, 138, false, false, 0.0F, true, false, CreationCategories.LIGHTS_AND_LAMPS);\n/* */ \n/* 1926 */ torch.addRequirement(new CreationRequirement(1, 479, 1, true));\n/* */ \n/* 1928 */ AdvancedCreationEntry oven = createAdvancedEntry(1013, 132, 130, 178, false, false, 0.0F, true, true, CreationCategories.FIRE);\n/* */ \n/* 1930 */ oven.addRequirement(new CreationRequirement(1, 132, 10, true));\n/* 1931 */ oven.addRequirement(new CreationRequirement(2, 130, 10, true));\n/* */ \n/* 1933 */ AdvancedCreationEntry forge = createAdvancedEntry(1013, 132, 130, 180, false, false, 0.0F, true, true, CreationCategories.FIRE);\n/* */ \n/* 1935 */ forge.addRequirement(new CreationRequirement(1, 132, 10, true));\n/* 1936 */ forge.addRequirement(new CreationRequirement(2, 130, 10, true));\n/* */ \n/* 1938 */ AdvancedCreationEntry colossus = createAdvancedEntry(1013, 519, 130, 518, false, false, 0.0F, true, true, CreationCategories.STATUES);\n/* */ \n/* 1940 */ colossus.addRequirement(new CreationRequirement(1, 519, 1999, true));\n/* 1941 */ colossus.addRequirement(new CreationRequirement(2, 130, 1999, true));\n/* 1942 */ colossus.setIsEpicBuildMissionTarget(false);\n/* */ \n/* 1944 */ AdvancedCreationEntry pylon = createAdvancedEntry(1013, 406, 130, 713, false, false, 0.0F, true, true, CreationCategories.EPIC);\n/* */ \n/* 1946 */ pylon.addRequirement(new CreationRequirement(1, 406, 100, true));\n/* 1947 */ pylon.addRequirement(new CreationRequirement(2, 130, 1999, true));\n/* 1948 */ pylon.addRequirement(new CreationRequirement(3, 132, 1000, true));\n/* 1949 */ pylon.addRequirement(new CreationRequirement(4, 221, 1000, true));\n/* 1950 */ pylon.isOnlyCreateEpicTargetMission = true;\n/* */ \n/* 1952 */ AdvancedCreationEntry shrine = createAdvancedEntry(1005, 406, 130, 712, false, false, 0.0F, true, true, CreationCategories.EPIC);\n/* */ \n/* 1954 */ shrine.addRequirement(new CreationRequirement(1, 406, 10, true));\n/* 1955 */ shrine.addRequirement(new CreationRequirement(2, 22, 100, true));\n/* 1956 */ shrine.addRequirement(new CreationRequirement(3, 218, 10, true));\n/* 1957 */ shrine.addRequirement(new CreationRequirement(4, 221, 100, true));\n/* 1958 */ shrine.addRequirement(new CreationRequirement(5, 502, 10, true));\n/* 1959 */ shrine.isOnlyCreateEpicTargetMission = true;\n/* */ \n/* 1961 */ AdvancedCreationEntry temple = createAdvancedEntry(1013, 406, 130, 715, false, false, 0.0F, true, true, CreationCategories.EPIC);\n/* */ \n/* 1963 */ temple.addRequirement(new CreationRequirement(1, 406, 10, true));\n/* 1964 */ temple.addRequirement(new CreationRequirement(2, 130, 100, true));\n/* 1965 */ temple.addRequirement(new CreationRequirement(3, 132, 1000, true));\n/* 1966 */ temple.addRequirement(new CreationRequirement(4, 223, 100, true));\n/* 1967 */ temple.addRequirement(new CreationRequirement(5, 504, 10, true));\n/* 1968 */ temple.isOnlyCreateEpicTargetMission = true;\n/* */ \n/* 1970 */ AdvancedCreationEntry obelisk = createAdvancedEntry(1013, 132, 130, 714, false, false, 0.0F, true, true, CreationCategories.EPIC);\n/* */ \n/* 1972 */ obelisk.addRequirement(new CreationRequirement(1, 132, 1000, true));\n/* 1973 */ obelisk.addRequirement(new CreationRequirement(2, 130, 1000, true));\n/* 1974 */ obelisk.addRequirement(new CreationRequirement(3, 223, 100, true));\n/* 1975 */ obelisk.isOnlyCreateEpicTargetMission = true;\n/* */ \n/* 1977 */ AdvancedCreationEntry pillarDecoration = createAdvancedEntry(1013, 132, 130, 736, false, false, 0.0F, true, true, CreationCategories.DECORATION);\n/* */ \n/* 1979 */ pillarDecoration.addRequirement(new CreationRequirement(1, 132, 50, true));\n/* 1980 */ pillarDecoration.addRequirement(new CreationRequirement(2, 130, 50, true));\n/* */ \n/* 1982 */ AdvancedCreationEntry pillar = createAdvancedEntry(1013, 132, 130, 717, false, false, 0.0F, true, true, CreationCategories.EPIC);\n/* */ \n/* 1984 */ pillar.addRequirement(new CreationRequirement(1, 132, 100, true));\n/* 1985 */ pillar.addRequirement(new CreationRequirement(2, 130, 100, true));\n/* 1986 */ pillar.addRequirement(new CreationRequirement(3, 439, 10, true));\n/* 1987 */ pillar.isOnlyCreateEpicTargetMission = true;\n/* */ \n/* 1989 */ AdvancedCreationEntry spiritgate = createAdvancedEntry(1013, 132, 130, 716, false, false, 0.0F, true, true, CreationCategories.EPIC);\n/* */ \n/* 1991 */ spiritgate.addRequirement(new CreationRequirement(1, 132, 1000, true));\n/* 1992 */ spiritgate.addRequirement(new CreationRequirement(2, 130, 1000, true));\n/* 1993 */ spiritgate.addRequirement(new CreationRequirement(3, 44, 1000, true));\n/* 1994 */ spiritgate.isOnlyCreateEpicTargetMission = true;\n/* */ \n/* 1996 */ AdvancedCreationEntry sbench = createAdvancedEntry(1013, 132, 406, 404, false, false, 0.0F, true, true, CreationCategories.FURNITURE);\n/* */ \n/* 1998 */ sbench.addRequirement(new CreationRequirement(1, 132, 1, true));\n/* 1999 */ sbench.addRequirement(new CreationRequirement(2, 130, 2, true));\n/* */ \n/* 2001 */ AdvancedCreationEntry coff = createAdvancedEntry(1013, 132, 406, 407, false, false, 0.0F, true, true, CreationCategories.STORAGE);\n/* */ \n/* 2003 */ coff.addRequirement(new CreationRequirement(1, 132, 4, true));\n/* 2004 */ coff.addRequirement(new CreationRequirement(2, 130, 4, true));\n/* 2005 */ coff.addRequirement(new CreationRequirement(3, 406, 3, true));\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 2012 */ AdvancedCreationEntry ropetool = createAdvancedEntry(10044, 22, 23, 320, false, false, 0.0F, true, false, CreationCategories.TOOLS);\n/* */ \n/* 2014 */ ropetool.addRequirement(new CreationRequirement(1, 217, 3, true));\n/* */ \n/* 2016 */ AdvancedCreationEntry wheelSmall = createAdvancedEntry(10044, 22, 23, 187, false, false, 0.0F, true, false, CreationCategories.CART_PARTS);\n/* */ \n/* 2018 */ wheelSmall.addRequirement(new CreationRequirement(1, 22, 2, true));\n/* 2019 */ wheelSmall.addRequirement(new CreationRequirement(2, 23, 1, true));\n/* */ \n/* 2021 */ AdvancedCreationEntry wheelAxlSmall = createAdvancedEntry(10044, 23, 187, 191, false, true, 0.0F, true, false, CreationCategories.CART_PARTS);\n/* */ \n/* 2023 */ wheelAxlSmall.addRequirement(new CreationRequirement(1, 187, 1, true));\n/* */ \n/* 2025 */ AdvancedCreationEntry cartSmall = createAdvancedEntry(10044, 22, 191, 186, false, false, 0.0F, true, true, CreationCategories.CARTS);\n/* */ \n/* 2027 */ cartSmall.addRequirement(new CreationRequirement(1, 22, 5, true));\n/* 2028 */ cartSmall.addRequirement(new CreationRequirement(2, 23, 2, true));\n/* 2029 */ cartSmall.addRequirement(new CreationRequirement(3, 218, 2, true));\n/* */ \n/* 2031 */ AdvancedCreationEntry cartLarge = createAdvancedEntry(10044, 22, 191, 539, false, false, 0.0F, true, true, CreationCategories.CARTS);\n/* */ \n/* 2033 */ cartLarge.addRequirement(new CreationRequirement(1, 22, 15, true));\n/* 2034 */ cartLarge.addRequirement(new CreationRequirement(2, 23, 2, true));\n/* 2035 */ cartLarge.addRequirement(new CreationRequirement(3, 218, 4, true));\n/* 2036 */ cartLarge.addRequirement(new CreationRequirement(4, 632, 1, true));\n/* */ \n/* 2038 */ AdvancedCreationEntry catapultSmall = createAdvancedEntry(10044, 23, 9, 445, false, false, 0.0F, true, true, CreationCategories.WARMACHINES);\n/* */ \n/* 2040 */ catapultSmall.addRequirement(new CreationRequirement(1, 319, 5, true));\n/* 2041 */ catapultSmall.addRequirement(new CreationRequirement(2, 191, 2, true));\n/* 2042 */ catapultSmall.addRequirement(new CreationRequirement(3, 9, 6, true));\n/* */ \n/* 2044 */ createSimpleEntry(10011, 64, 46, 1126, false, true, 10.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* */ \n/* 2047 */ AdvancedCreationEntry batteringRam = createAdvancedEntry(10044, 860, 217, 1125, false, false, 0.0F, true, true, CreationCategories.WARMACHINES);\n/* */ \n/* 2049 */ batteringRam.addRequirement(new CreationRequirement(1, 860, 9, true));\n/* 2050 */ batteringRam.addRequirement(new CreationRequirement(2, 217, 4, true));\n/* 2051 */ batteringRam.addRequirement(new CreationRequirement(3, 319, 2, true));\n/* 2052 */ batteringRam.addRequirement(new CreationRequirement(4, 191, 2, true));\n/* 2053 */ batteringRam.addRequirement(new CreationRequirement(5, 9, 3, true));\n/* 2054 */ batteringRam.addRequirement(new CreationRequirement(6, 1126, 1, true));\n/* */ \n/* 2056 */ AdvancedCreationEntry joist = createAdvancedEntry(1005, 23, 9, 429, false, false, 0.0F, true, true, CreationCategories.MINE_DOORS);\n/* */ \n/* 2058 */ joist.addRequirement(new CreationRequirement(1, 188, 2, true));\n/* 2059 */ joist.addRequirement(new CreationRequirement(2, 9, 1, true));\n/* 2060 */ joist.addRequirement(new CreationRequirement(3, 23, 3, true));\n/* */ \n/* 2062 */ AdvancedCreationEntry floor = createAdvancedEntry(1005, 217, 22, 495, false, false, 0.0F, true, true, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 2064 */ floor.addRequirement(new CreationRequirement(1, 22, 4, true));\n/* */ \n/* 2066 */ AdvancedCreationEntry minedoor = createAdvancedEntry(1005, 217, 22, 592, false, false, 0.0F, true, true, CreationCategories.MINE_DOORS);\n/* */ \n/* 2068 */ minedoor.addRequirement(new CreationRequirement(1, 22, 20, true));\n/* 2069 */ minedoor.addRequirement(new CreationRequirement(2, 217, 1, true));\n/* 2070 */ minedoor.addRequirement(new CreationRequirement(3, 167, 1, true));\n/* */ \n/* 2072 */ AdvancedCreationEntry minedoorst = createAdvancedEntry(10015, 167, 597, 596, false, false, 0.0F, true, true, CreationCategories.MINE_DOORS);\n/* */ \n/* 2074 */ minedoorst.addRequirement(new CreationRequirement(1, 597, 9, true));\n/* 2075 */ minedoorst.addRequirement(new CreationRequirement(2, 131, 50, true));\n/* */ \n/* 2077 */ AdvancedCreationEntry minedoors = createAdvancedEntry(10015, 167, 598, 595, false, false, 0.0F, true, true, CreationCategories.MINE_DOORS);\n/* */ \n/* 2079 */ minedoors.addRequirement(new CreationRequirement(1, 598, 11, true));\n/* 2080 */ minedoors.addRequirement(new CreationRequirement(2, 131, 50, true));\n/* */ \n/* 2082 */ AdvancedCreationEntry minedoorg = createAdvancedEntry(10015, 167, 599, 594, false, false, 0.0F, true, true, CreationCategories.MINE_DOORS);\n/* */ \n/* 2084 */ minedoorg.addRequirement(new CreationRequirement(1, 599, 11, true));\n/* 2085 */ minedoorg.addRequirement(new CreationRequirement(2, 131, 50, true));\n/* */ \n/* 2087 */ AdvancedCreationEntry cheeseDrill = createAdvancedEntry(10044, 309, 23, 65, false, false, 0.0F, true, false, CreationCategories.TOOLS);\n/* */ \n/* 2089 */ cheeseDrill.addRequirement(new CreationRequirement(1, 22, 5, true));\n/* 2090 */ cheeseDrill.addRequirement(new CreationRequirement(2, 266, 2, true));\n/* 2091 */ cheeseDrill.addRequirement(new CreationRequirement(3, 218, 1, true));\n/* */ \n/* 2093 */ AdvancedCreationEntry fruitPress = createAdvancedEntry(10044, 23, 22, 413, false, false, 0.0F, true, false, CreationCategories.TOOLS);\n/* */ \n/* 2095 */ fruitPress.addRequirement(new CreationRequirement(1, 22, 3, true));\n/* 2096 */ fruitPress.addRequirement(new CreationRequirement(2, 266, 2, true));\n/* 2097 */ fruitPress.addRequirement(new CreationRequirement(3, 218, 1, true));\n/* */ \n/* 2099 */ AdvancedCreationEntry papyrusPress = createAdvancedEntry(10044, 23, 22, 747, false, false, 0.0F, true, false, CreationCategories.TOOLS);\n/* */ \n/* 2101 */ papyrusPress.addRequirement(new CreationRequirement(1, 22, 3, true));\n/* 2102 */ papyrusPress.addRequirement(new CreationRequirement(2, 188, 2, true));\n/* 2103 */ papyrusPress.addRequirement(new CreationRequirement(3, 218, 2, true));\n/* */ \n/* 2105 */ AdvancedCreationEntry raftSmall = createAdvancedEntry(10082, 217, 22, 289, false, false, 0.0F, true, true, CreationCategories.SHIPBUILDING);\n/* */ \n/* 2107 */ raftSmall.addRequirement(new CreationRequirement(1, 22, 3, true));\n/* 2108 */ raftSmall.addRequirement(new CreationRequirement(2, 9, 4, true));\n/* 2109 */ raftSmall.addRequirement(new CreationRequirement(3, 217, 7, true));\n/* */ \n/* 2111 */ AdvancedCreationEntry archeryTarg = createAdvancedEntry(1005, 23, 23, 458, false, false, 0.0F, true, true, CreationCategories.COMBAT_TRAINING);\n/* */ \n/* 2113 */ archeryTarg.addRequirement(new CreationRequirement(1, 22, 4, true));\n/* 2114 */ archeryTarg.addRequirement(new CreationRequirement(2, 620, 4, true));\n/* 2115 */ archeryTarg.addRequirement(new CreationRequirement(3, 217, 7, true));\n/* 2116 */ archeryTarg.addRequirement(new CreationRequirement(4, 319, 1, true));\n/* */ \n/* 2118 */ AdvancedCreationEntry buildmarker = createAdvancedEntry(1005, 23, 23, 679, false, false, 0.0F, true, true, CreationCategories.DECORATION);\n/* */ \n/* 2120 */ buildmarker.addRequirement(new CreationRequirement(1, 22, 4, true));\n/* 2121 */ buildmarker.addRequirement(new CreationRequirement(2, 217, 1, true));\n/* */ \n/* 2123 */ AdvancedCreationEntry doll = createAdvancedEntry(1005, 217, 23, 321, false, false, 0.0F, true, false, CreationCategories.COMBAT_TRAINING);\n/* */ \n/* 2125 */ doll.addRequirement(new CreationRequirement(1, 22, 2, true));\n/* 2126 */ doll.addRequirement(new CreationRequirement(2, 23, 3, true));\n/* 2127 */ doll.addRequirement(new CreationRequirement(3, 33, 1, true));\n/* */ \n/* 2129 */ AdvancedCreationEntry barrell = createAdvancedEntry(10044, 188, 22, 190, false, false, 0.0F, true, true, CreationCategories.STORAGE);\n/* */ \n/* 2131 */ barrell.addRequirement(new CreationRequirement(1, 22, 4, true));\n/* 2132 */ barrell.addRequirement(new CreationRequirement(2, 188, 1, true));\n/* */ \n/* 2134 */ AdvancedCreationEntry hbarrell = createAdvancedEntry(10044, 188, 22, 576, false, false, 0.0F, true, true, CreationCategories.STORAGE);\n/* */ \n/* 2136 */ hbarrell.addRequirement(new CreationRequirement(1, 22, 24, true));\n/* 2137 */ hbarrell.addRequirement(new CreationRequirement(2, 188, 3, true));\n/* */ \n/* 2139 */ AdvancedCreationEntry oilbarrell = createAdvancedEntry(10044, 188, 22, 757, false, false, 0.0F, true, true, CreationCategories.STORAGE);\n/* */ \n/* 2141 */ oilbarrell.addRequirement(new CreationRequirement(1, 22, 24, true));\n/* 2142 */ oilbarrell.addRequirement(new CreationRequirement(2, 188, 3, true));\n/* */ \n/* 2144 */ AdvancedCreationEntry grains = createAdvancedEntry(1005, 188, 22, 661, false, false, 0.0F, true, true, CreationCategories.STORAGE);\n/* */ \n/* 2146 */ grains.addRequirement(new CreationRequirement(1, 22, 24, true));\n/* 2147 */ grains.addRequirement(new CreationRequirement(2, 217, 4, true));\n/* */ \n/* 2149 */ AdvancedCreationEntry bulks = createAdvancedEntry(1005, 188, 22, 662, false, false, 0.0F, true, true, CreationCategories.STORAGE);\n/* */ \n/* 2151 */ bulks.addRequirement(new CreationRequirement(1, 22, 24, true));\n/* 2152 */ bulks.addRequirement(new CreationRequirement(2, 217, 4, true));\n/* */ \n/* 2154 */ AdvancedCreationEntry trash = createAdvancedEntry(1005, 188, 22, 670, false, false, 0.0F, true, true, CreationCategories.STORAGE);\n/* */ \n/* 2156 */ trash.addRequirement(new CreationRequirement(1, 22, 10, true));\n/* 2157 */ trash.addRequirement(new CreationRequirement(2, 218, 2, true));\n/* */ \n/* 2159 */ AdvancedCreationEntry barrels = createAdvancedEntry(10044, 218, 22, 189, false, false, 0.0F, true, false, CreationCategories.STORAGE);\n/* */ \n/* 2161 */ barrels.addRequirement(new CreationRequirement(1, 22, 4, true));\n/* */ \n/* 2163 */ AdvancedCreationEntry wineBarrel = createAdvancedEntry(10044, 218, 22, 768, false, false, 0.0F, true, true, CreationCategories.STORAGE);\n/* */ \n/* 2165 */ wineBarrel.addRequirement(new CreationRequirement(1, 22, 4, true));\n/* 2166 */ wineBarrel.addRequirement(new CreationRequirement(2, 188, 1, true));\n/* */ \n/* 2168 */ AdvancedCreationEntry buckets = createAdvancedEntry(10044, 218, 22, 421, false, false, 0.0F, true, false, CreationCategories.STORAGE);\n/* */ \n/* 2170 */ buckets.addRequirement(new CreationRequirement(1, 22, 4, true));\n/* */ \n/* 2172 */ AdvancedCreationEntry dredge = createAdvancedEntry(10015, 213, 319, 581, false, false, 0.0F, true, false, CreationCategories.TOOLS);\n/* */ \n/* 2174 */ dredge.addRequirement(new CreationRequirement(1, 582, 4, true));\n/* */ \n/* 2176 */ AdvancedCreationEntry crows = createAdvancedEntry(10044, 188, 22, 583, false, false, 0.0F, true, true, CreationCategories.SHIPBUILDING);\n/* */ \n/* 2178 */ crows.addRequirement(new CreationRequirement(1, 22, 12, true));\n/* 2179 */ crows.addRequirement(new CreationRequirement(2, 188, 3, true));\n/* */ \n/* 2181 */ AdvancedCreationEntry chests = createAdvancedEntry(10044, 218, 22, 192, false, false, 0.0F, true, false, CreationCategories.STORAGE);\n/* */ \n/* 2183 */ chests.addRequirement(new CreationRequirement(1, 22, 3, true));\n/* */ \n/* 2185 */ AdvancedCreationEntry signp = createAdvancedEntry(10044, 218, 22, 208, false, false, 0.0F, true, false, CreationCategories.SIGNS);\n/* */ \n/* 2187 */ signp.addRequirement(new CreationRequirement(1, 23, 1, true));\n/* */ \n/* 2189 */ AdvancedCreationEntry signl = createAdvancedEntry(10044, 218, 22, 209, false, false, 0.0F, true, false, CreationCategories.SIGNS);\n/* */ \n/* 2191 */ signl.addRequirement(new CreationRequirement(1, 23, 1, true));\n/* 2192 */ signl.addRequirement(new CreationRequirement(2, 22, 1, true));\n/* */ \n/* 2194 */ AdvancedCreationEntry signshop = createAdvancedEntry(10044, 218, 22, 656, false, false, 0.0F, true, false, CreationCategories.SIGNS);\n/* */ \n/* 2196 */ signshop.addRequirement(new CreationRequirement(1, 23, 2, true));\n/* 2197 */ signshop.addRequirement(new CreationRequirement(2, 22, 2, true));\n/* */ \n/* 2199 */ AdvancedCreationEntry signs = createAdvancedEntry(10044, 218, 22, 210, false, false, 0.0F, true, false, CreationCategories.SIGNS);\n/* */ \n/* 2201 */ signs.addRequirement(new CreationRequirement(1, 23, 1, true));\n/* */ \n/* 2203 */ AdvancedCreationEntry dale = createAdvancedEntry(10036, 36, 9, 74, false, false, 0.0F, true, true, CreationCategories.PRODUCTION);\n/* */ \n/* 2205 */ dale.addRequirement(new CreationRequirement(1, 9, 20, true));\n/* 2206 */ dale.addRequirement(new CreationRequirement(2, 26, 2, true));\n/* */ \n/* 2208 */ AdvancedCreationEntry loom = createAdvancedEntry(10044, 218, 22, 226, false, false, 0.0F, true, true, CreationCategories.TOOLS);\n/* */ \n/* 2210 */ loom.addRequirement(new CreationRequirement(1, 23, 10, true));\n/* 2211 */ loom.addRequirement(new CreationRequirement(2, 214, 10, true));\n/* 2212 */ loom.addRequirement(new CreationRequirement(3, 22, 2, true));\n/* */ \n/* 2214 */ AdvancedCreationEntry marketstall = createAdvancedEntry(10044, 217, 22, 580, false, false, 0.0F, true, true, CreationCategories.DECORATION);\n/* */ \n/* 2216 */ marketstall.addRequirement(new CreationRequirement(1, 22, 20, true));\n/* 2217 */ marketstall.addRequirement(new CreationRequirement(2, 213, 4, true));\n/* 2218 */ marketstall.addRequirement(new CreationRequirement(3, 23, 4, true));\n/* */ \n/* 2220 */ AdvancedCreationEntry squareTable = createAdvancedEntry(10044, 23, 22, 262, false, false, 0.0F, true, true, CreationCategories.FURNITURE);\n/* */ \n/* 2222 */ squareTable.addRequirement(new CreationRequirement(1, 22, 3, true));\n/* 2223 */ squareTable.addRequirement(new CreationRequirement(2, 23, 3, true));\n/* */ \n/* 2225 */ AdvancedCreationEntry roundTable = createAdvancedEntry(10044, 23, 22, 260, false, false, 0.0F, true, true, CreationCategories.FURNITURE);\n/* */ \n/* 2227 */ roundTable.addRequirement(new CreationRequirement(1, 22, 3, true));\n/* 2228 */ roundTable.addRequirement(new CreationRequirement(2, 23, 3, true));\n/* */ \n/* 2230 */ AdvancedCreationEntry diningTable = createAdvancedEntry(10044, 23, 22, 264, false, false, 0.0F, true, true, CreationCategories.FURNITURE);\n/* */ \n/* 2232 */ diningTable.addRequirement(new CreationRequirement(1, 22, 6, true));\n/* 2233 */ diningTable.addRequirement(new CreationRequirement(2, 23, 3, true));\n/* */ \n/* 2235 */ AdvancedCreationEntry stoolRound = createAdvancedEntry(10044, 23, 22, 261, false, false, 0.0F, true, false, CreationCategories.FURNITURE);\n/* */ \n/* 2237 */ stoolRound.addRequirement(new CreationRequirement(1, 22, 1, true));\n/* 2238 */ stoolRound.addRequirement(new CreationRequirement(2, 23, 1, true));\n/* */ \n/* 2240 */ AdvancedCreationEntry chair = createAdvancedEntry(10044, 22, 23, 263, false, false, 0.0F, true, true, CreationCategories.FURNITURE);\n/* */ \n/* 2242 */ chair.addRequirement(new CreationRequirement(1, 22, 2, true));\n/* 2243 */ chair.addRequirement(new CreationRequirement(2, 23, 2, true));\n/* */ \n/* 2245 */ AdvancedCreationEntry armchair = createAdvancedEntry(10044, 23, 22, 265, false, false, 0.0F, true, true, CreationCategories.FURNITURE);\n/* */ \n/* 2247 */ armchair.addRequirement(new CreationRequirement(1, 22, 2, true));\n/* 2248 */ armchair.addRequirement(new CreationRequirement(2, 23, 2, true));\n/* 2249 */ armchair.addRequirement(new CreationRequirement(3, 213, 1, true));\n/* */ \n/* 2251 */ AdvancedCreationEntry bed = createAdvancedEntry(10044, 482, 483, 484, false, false, 0.0F, true, true, CreationCategories.FURNITURE);\n/* */ \n/* 2253 */ bed.addRequirement(new CreationRequirement(1, 485, 1, true));\n/* 2254 */ bed.addRequirement(new CreationRequirement(2, 486, 2, true));\n/* 2255 */ bed.addRequirement(new CreationRequirement(3, 302, 3, true));\n/* 2256 */ AdvancedCreationEntry tentExplorer = createAdvancedEntry(10044, 23, 213, 863, false, false, 0.0F, true, true, CreationCategories.TENTS);\n/* */ \n/* 2258 */ tentExplorer.addRequirement(new CreationRequirement(1, 23, 8, true));\n/* 2259 */ tentExplorer.addRequirement(new CreationRequirement(2, 213, 8, true));\n/* 2260 */ tentExplorer.addRequirement(new CreationRequirement(3, 559, 6, true));\n/* 2261 */ tentExplorer.addRequirement(new CreationRequirement(4, 561, 6, true));\n/* */ \n/* 2263 */ AdvancedCreationEntry tentMilitary = createAdvancedEntry(10044, 23, 213, 864, false, false, 0.0F, true, true, CreationCategories.TENTS);\n/* */ \n/* 2265 */ tentMilitary.addRequirement(new CreationRequirement(1, 23, 10, true));\n/* 2266 */ tentMilitary.addRequirement(new CreationRequirement(2, 213, 12, true));\n/* 2267 */ tentMilitary.addRequirement(new CreationRequirement(3, 559, 10, true));\n/* 2268 */ tentMilitary.addRequirement(new CreationRequirement(4, 561, 10, true));\n/* */ \n/* 2270 */ AdvancedCreationEntry pavilion = createAdvancedEntry(10044, 23, 213, 865, false, false, 0.0F, true, true, CreationCategories.TENTS);\n/* */ \n/* 2272 */ pavilion.addRequirement(new CreationRequirement(1, 23, 10, true));\n/* 2273 */ pavilion.addRequirement(new CreationRequirement(2, 213, 6, true));\n/* 2274 */ pavilion.addRequirement(new CreationRequirement(3, 559, 10, true));\n/* 2275 */ pavilion.addRequirement(new CreationRequirement(4, 561, 10, true));\n/* */ \n/* 2277 */ AdvancedCreationEntry bedframe = createAdvancedEntry(10044, 217, 22, 483, false, false, 0.0F, true, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 2279 */ bedframe.addRequirement(new CreationRequirement(1, 22, 9, true));\n/* */ \n/* 2281 */ AdvancedCreationEntry bedheadboard = createAdvancedEntry(10044, 218, 22, 482, false, false, 0.0F, true, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 2283 */ bedheadboard.addRequirement(new CreationRequirement(1, 22, 2, true));\n/* 2284 */ bedheadboard.addRequirement(new CreationRequirement(2, 23, 2, true));\n/* */ \n/* 2286 */ AdvancedCreationEntry bedfootboard = createAdvancedEntry(10044, 218, 22, 485, false, false, 0.0F, true, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* 2288 */ bedfootboard.addRequirement(new CreationRequirement(1, 22, 1, true));\n/* 2289 */ bedfootboard.addRequirement(new CreationRequirement(2, 23, 2, true));\n/* */ \n/* 2291 */ AdvancedCreationEntry altarwood = createAdvancedEntry(10044, 218, 22, 322, false, false, 0.0F, true, true, CreationCategories.ALTAR);\n/* */ \n/* 2293 */ altarwood.addRequirement(new CreationRequirement(1, 22, 8, true));\n/* 2294 */ altarwood.addRequirement(new CreationRequirement(2, 213, 2, true));\n/* 2295 */ altarwood.addRequirement(new CreationRequirement(3, 326, 1, true));\n/* */ \n/* 2297 */ AdvancedCreationEntry altarStone = createAdvancedEntry(1013, 130, 132, 323, false, false, 0.0F, true, true, CreationCategories.ALTAR);\n/* */ \n/* 2299 */ altarStone.addRequirement(new CreationRequirement(1, 132, 10, true));\n/* 2300 */ altarStone.addRequirement(new CreationRequirement(2, 130, 10, true));\n/* 2301 */ altarStone.addRequirement(new CreationRequirement(3, 326, 1, true));\n/* */ \n/* 2303 */ AdvancedCreationEntry chestl = createAdvancedEntry(10044, 188, 22, 184, false, false, 0.0F, true, true, CreationCategories.STORAGE);\n/* */ \n/* 2305 */ chestl.addRequirement(new CreationRequirement(1, 22, 4, true));\n/* 2306 */ chestl.addRequirement(new CreationRequirement(2, 188, 2, true));\n/* 2307 */ chestl.addRequirement(new CreationRequirement(3, 218, 1, true));\n/* */ \n/* 2309 */ AdvancedCreationEntry shieldsm = createAdvancedEntry(10014, 218, 22, 82, false, false, 0.0F, true, false, CreationCategories.SHIELDS);\n/* */ \n/* 2311 */ shieldsm.addRequirement(new CreationRequirement(1, 188, 1, true));\n/* */ \n/* 2313 */ AdvancedCreationEntry shieldTurtle = createAdvancedEntry(10014, 218, 898, 899, false, false, 0.0F, true, false, CreationCategories.SHIELDS);\n/* */ \n/* 2315 */ shieldTurtle.addRequirement(new CreationRequirement(1, 100, 2, true));\n/* */ \n/* 2317 */ AdvancedCreationEntry shieldmed = createAdvancedEntry(10014, 218, 22, 84, false, false, 0.0F, true, false, CreationCategories.SHIELDS);\n/* */ \n/* 2319 */ shieldmed.addRequirement(new CreationRequirement(1, 22, 1, true));\n/* 2320 */ shieldmed.addRequirement(new CreationRequirement(2, 188, 1, true));\n/* */ \n/* 2322 */ AdvancedCreationEntry shieldla = createAdvancedEntry(10014, 218, 22, 85, false, false, 0.0F, true, false, CreationCategories.SHIELDS);\n/* */ \n/* 2324 */ shieldla.addRequirement(new CreationRequirement(1, 22, 2, true));\n/* 2325 */ shieldla.addRequirement(new CreationRequirement(2, 188, 1, true));\n/* */ \n/* 2327 */ AdvancedCreationEntry towerStone = createAdvancedEntry(1013, 132, 130, 384, false, false, 0.0F, true, true, CreationCategories.TOWERS);\n/* */ \n/* 2329 */ towerStone.addRequirement(new CreationRequirement(1, 132, 500, true));\n/* 2330 */ towerStone.addRequirement(new CreationRequirement(2, 130, 500, true));\n/* 2331 */ towerStone.addRequirement(new CreationRequirement(3, 22, 100, true));\n/* */ \n/* 2333 */ AdvancedCreationEntry compass = createAdvancedEntry(1020, 418, 76, 480, false, false, 0.0F, true, false, CreationCategories.TOOLS);\n/* */ \n/* 2335 */ compass.addRequirement(new CreationRequirement(1, 215, 1, true));\n/* */ \n/* 2337 */ AdvancedCreationEntry puppetFo = createAdvancedEntry(10051, 215, 214, 640, false, true, 0.0F, false, false, CreationCategories.TOYS);\n/* */ \n/* 2339 */ puppetFo.addRequirement(new CreationRequirement(1, 213, 1, true));\n/* 2340 */ puppetFo.addRequirement(new CreationRequirement(2, 436, 1, true));\n/* 2341 */ puppetFo.addRequirement(new CreationRequirement(3, 23, 1, true));\n/* */ \n/* 2343 */ AdvancedCreationEntry puppetVynora = createAdvancedEntry(10051, 215, 214, 642, false, true, 0.0F, false, false, CreationCategories.TOYS);\n/* */ \n/* 2345 */ puppetVynora.addRequirement(new CreationRequirement(1, 213, 1, true));\n/* 2346 */ puppetVynora.addRequirement(new CreationRequirement(2, 364, 1, true));\n/* 2347 */ puppetVynora.addRequirement(new CreationRequirement(3, 23, 1, true));\n/* */ \n/* 2349 */ AdvancedCreationEntry puppetLibila = createAdvancedEntry(10051, 215, 214, 643, false, true, 0.0F, false, false, CreationCategories.TOYS);\n/* */ \n/* 2351 */ puppetLibila.addRequirement(new CreationRequirement(1, 213, 1, true));\n/* 2352 */ puppetLibila.addRequirement(new CreationRequirement(2, 204, 1, true));\n/* 2353 */ puppetLibila.addRequirement(new CreationRequirement(3, 23, 1, true));\n/* */ \n/* 2355 */ AdvancedCreationEntry puppetMagranon = createAdvancedEntry(10051, 215, 214, 641, false, true, 0.0F, false, false, CreationCategories.TOYS);\n/* */ \n/* 2357 */ puppetMagranon.addRequirement(new CreationRequirement(1, 213, 1, true));\n/* 2358 */ puppetMagranon.addRequirement(new CreationRequirement(2, 439, 1, true));\n/* 2359 */ puppetMagranon.addRequirement(new CreationRequirement(3, 23, 1, true));\n/* */ \n/* 2361 */ AdvancedCreationEntry epicPortal = createAdvancedEntry(1013, 9, 132, 732, false, false, 0.0F, true, true, CreationCategories.EPIC);\n/* */ \n/* 2363 */ epicPortal.addRequirement(new CreationRequirement(1, 132, 10, true));\n/* 2364 */ epicPortal.addRequirement(new CreationRequirement(2, 9, 3, true));\n/* */ \n/* 2366 */ AdvancedCreationEntry mailboxStone = createAdvancedEntry(1013, 132, 130, 511, false, false, 0.0F, true, true, CreationCategories.MAILBOXES);\n/* */ \n/* 2368 */ mailboxStone.addRequirement(new CreationRequirement(1, 132, 10, true));\n/* 2369 */ mailboxStone.addRequirement(new CreationRequirement(2, 130, 10, true));\n/* */ \n/* 2371 */ AdvancedCreationEntry mailboxStone2 = createAdvancedEntry(1013, 132, 130, 513, false, false, 0.0F, true, true, CreationCategories.MAILBOXES);\n/* */ \n/* 2373 */ mailboxStone2.addRequirement(new CreationRequirement(1, 132, 10, true));\n/* 2374 */ mailboxStone2.addRequirement(new CreationRequirement(2, 130, 10, true));\n/* 2375 */ mailboxStone2.addRequirement(new CreationRequirement(3, 213, 2, true));\n/* */ \n/* 2377 */ AdvancedCreationEntry mailboxWood = createAdvancedEntry(10044, 218, 22, 510, false, false, 0.0F, true, true, CreationCategories.MAILBOXES);\n/* */ \n/* 2379 */ mailboxWood.addRequirement(new CreationRequirement(1, 22, 8, true));\n/* 2380 */ mailboxWood.addRequirement(new CreationRequirement(2, 218, 2, true));\n/* */ \n/* 2382 */ AdvancedCreationEntry mailboxWood2 = createAdvancedEntry(10044, 218, 22, 512, false, false, 0.0F, true, true, CreationCategories.MAILBOXES);\n/* */ \n/* 2384 */ mailboxWood2.addRequirement(new CreationRequirement(1, 22, 8, true));\n/* 2385 */ mailboxWood2.addRequirement(new CreationRequirement(2, 218, 2, true));\n/* 2386 */ mailboxWood2.addRequirement(new CreationRequirement(3, 213, 2, true));\n/* */ \n/* 2388 */ AdvancedCreationEntry toolbelt = createAdvancedEntry(10017, 517, 102, 516, false, false, 0.0F, true, false, CreationCategories.CLOTHES);\n/* */ \n/* 2390 */ toolbelt.addRequirement(new CreationRequirement(1, 72, 1, true));\n/* 2391 */ toolbelt.addRequirement(new CreationRequirement(2, 213, 1, true));\n/* */ \n/* 2393 */ AdvancedCreationEntry trapSticks = createAdvancedEntry(1005, 217, 22, 610, false, false, 0.0F, true, false, CreationCategories.TRAPS);\n/* */ \n/* 2395 */ trapSticks.addRequirement(new CreationRequirement(1, 99, 10, true));\n/* 2396 */ trapSticks.addRequirement(new CreationRequirement(2, 22, 4, true));\n/* */ \n/* 2398 */ AdvancedCreationEntry trapPole = createAdvancedEntry(1005, 217, 22, 611, false, false, 0.0F, true, false, CreationCategories.TRAPS);\n/* */ \n/* 2400 */ trapPole.addRequirement(new CreationRequirement(1, 9, 1, true));\n/* 2401 */ trapPole.addRequirement(new CreationRequirement(2, 22, 4, true));\n/* 2402 */ trapPole.addRequirement(new CreationRequirement(3, 319, 1, true));\n/* */ \n/* 2404 */ AdvancedCreationEntry trapCorrosion = createAdvancedEntry(1011, 217, 22, 612, false, false, 0.0F, true, false, CreationCategories.TRAPS);\n/* */ \n/* 2406 */ trapCorrosion.addRequirement(new CreationRequirement(1, 78, 10, true));\n/* 2407 */ trapCorrosion.addRequirement(new CreationRequirement(2, 73, 4, true));\n/* 2408 */ trapCorrosion.addRequirement(new CreationRequirement(3, 457, 1, true));\n/* */ \n/* 2410 */ AdvancedCreationEntry trapAxe = createAdvancedEntry(1005, 217, 22, 613, false, false, 0.0F, true, false, CreationCategories.TRAPS);\n/* */ \n/* 2412 */ trapAxe.addRequirement(new CreationRequirement(1, 90, 1, true));\n/* 2413 */ trapAxe.addRequirement(new CreationRequirement(2, 22, 4, true));\n/* 2414 */ trapAxe.addRequirement(new CreationRequirement(3, 457, 1, true));\n/* 2415 */ trapAxe.addRequirement(new CreationRequirement(4, 609, 1, true));\n/* */ \n/* 2417 */ AdvancedCreationEntry trapDagger = createAdvancedEntry(1005, 217, 22, 614, false, false, 0.0F, true, false, CreationCategories.TRAPS);\n/* */ \n/* 2419 */ trapDagger.addRequirement(new CreationRequirement(1, 126, 10, true));\n/* 2420 */ trapDagger.addRequirement(new CreationRequirement(2, 22, 4, true));\n/* */ \n/* 2422 */ AdvancedCreationEntry trapNet = createAdvancedEntry(1014, 319, 319, 615, false, false, 0.0F, true, false, CreationCategories.TRAPS);\n/* */ \n/* 2424 */ trapNet.addRequirement(new CreationRequirement(1, 559, 5, true));\n/* 2425 */ trapNet.addRequirement(new CreationRequirement(2, 23, 1, true));\n/* */ \n/* 2427 */ AdvancedCreationEntry trapScythe = createAdvancedEntry(1013, 132, 130, 616, false, false, 0.0F, true, false, CreationCategories.TRAPS);\n/* */ \n/* 2429 */ trapScythe.addRequirement(new CreationRequirement(1, 132, 10, true));\n/* 2430 */ trapScythe.addRequirement(new CreationRequirement(2, 130, 10, true));\n/* 2431 */ trapScythe.addRequirement(new CreationRequirement(3, 270, 1, true));\n/* 2432 */ trapScythe.addRequirement(new CreationRequirement(4, 609, 1, true));\n/* */ \n/* 2434 */ AdvancedCreationEntry trapMan = createAdvancedEntry(10015, 582, 582, 617, false, false, 0.0F, true, false, CreationCategories.TRAPS);\n/* */ \n/* 2436 */ trapMan.addRequirement(new CreationRequirement(1, 609, 1, true));\n/* */ \n/* 2438 */ AdvancedCreationEntry trapBow = createAdvancedEntry(1005, 217, 22, 618, false, false, 0.0F, true, false, CreationCategories.TRAPS);\n/* */ \n/* 2440 */ trapBow.addRequirement(new CreationRequirement(1, 22, 1, true));\n/* 2441 */ trapBow.addRequirement(new CreationRequirement(2, 447, 1, true));\n/* 2442 */ trapBow.addRequirement(new CreationRequirement(3, 457, 1, true));\n/* 2443 */ trapBow.addRequirement(new CreationRequirement(4, 456, 1, true));\n/* */ \n/* 2445 */ AdvancedCreationEntry trapRope = createAdvancedEntry(1014, 319, 559, 619, false, false, 0.0F, true, false, CreationCategories.TRAPS);\n/* */ \n/* 2447 */ trapRope.addRequirement(new CreationRequirement(1, 23, 1, true));\n/* 2448 */ trapRope.addRequirement(new CreationRequirement(2, 457, 1, true));\n/* */ \n/* 2450 */ AdvancedCreationEntry villageBoard = createAdvancedEntry(1005, 23, 22, 835, false, false, 0.0F, true, true, CreationCategories.SIGNS);\n/* */ \n/* 2452 */ villageBoard.addRequirement(new CreationRequirement(1, 22, 2, true));\n/* 2453 */ villageBoard.addRequirement(new CreationRequirement(2, 23, 1, true));\n/* 2454 */ villageBoard.addRequirement(new CreationRequirement(3, 218, 3, true));\n/* */ \n/* 2456 */ AdvancedCreationEntry copperBrazier = createAdvancedEntry(10015, 838, 839, 841, false, false, 0.0F, true, true, 20, 30.0D, CreationCategories.LIGHTS_AND_LAMPS);\n/* */ \n/* */ \n/* 2459 */ copperBrazier.addRequirement(new CreationRequirement(1, 838, 2, true));\n/* */ \n/* 2461 */ AdvancedCreationEntry marbleBrazierPillar = createAdvancedEntry(1013, 786, 492, 842, false, false, 0.0F, true, true, 20, 30.0D, CreationCategories.LIGHTS_AND_LAMPS);\n/* */ \n/* */ \n/* 2464 */ marbleBrazierPillar.addRequirement(new CreationRequirement(1, 786, 49, true));\n/* 2465 */ marbleBrazierPillar.addRequirement(new CreationRequirement(2, 492, 49, true));\n/* 2466 */ marbleBrazierPillar.addRequirement(new CreationRequirement(3, 840, 1, true));\n/* */ \n/* 2468 */ AdvancedCreationEntry wagon = createAdvancedEntry(10044, 22, 191, 850, false, false, 0.0F, true, true, 0, 40.0D, CreationCategories.CARTS);\n/* */ \n/* 2470 */ wagon.addRequirement(new CreationRequirement(1, 191, 1, true));\n/* 2471 */ wagon.addRequirement(new CreationRequirement(2, 22, 20, true));\n/* 2472 */ wagon.addRequirement(new CreationRequirement(3, 23, 4, true));\n/* 2473 */ wagon.addRequirement(new CreationRequirement(4, 218, 10, true));\n/* 2474 */ wagon.addRequirement(new CreationRequirement(5, 632, 2, true));\n/* 2475 */ wagon.addRequirement(new CreationRequirement(6, 486, 2, true));\n/* 2476 */ wagon.setIsEpicBuildMissionTarget(false);\n/* */ \n/* 2478 */ AdvancedCreationEntry smallCrate = createAdvancedEntry(1005, 22, 217, 851, false, false, 0.0F, true, true, 0, 10.0D, CreationCategories.STORAGE);\n/* */ \n/* 2480 */ smallCrate.addRequirement(new CreationRequirement(1, 22, 10, true));\n/* */ \n/* 2482 */ AdvancedCreationEntry largeCrate = createAdvancedEntry(1005, 22, 217, 852, false, false, 0.0F, true, true, 0, 60.0D, CreationCategories.STORAGE);\n/* */ \n/* 2484 */ largeCrate.addRequirement(new CreationRequirement(1, 22, 15, true));\n/* */ \n/* 2486 */ AdvancedCreationEntry shipCarrier = createAdvancedEntry(10044, 22, 191, 853, false, false, 0.0F, true, true, 0, 15.0D, CreationCategories.CARTS);\n/* */ \n/* 2488 */ shipCarrier.addRequirement(new CreationRequirement(1, 191, 1, true));\n/* 2489 */ shipCarrier.addRequirement(new CreationRequirement(2, 22, 9, true));\n/* 2490 */ shipCarrier.addRequirement(new CreationRequirement(3, 23, 4, true));\n/* 2491 */ shipCarrier.addRequirement(new CreationRequirement(4, 218, 4, true));\n/* 2492 */ shipCarrier.addRequirement(new CreationRequirement(5, 632, 1, true));\n/* 2493 */ shipCarrier.addRequirement(new CreationRequirement(6, 9, 2, true));\n/* */ \n/* 2495 */ AdvancedCreationEntry creatureCarrier = createAdvancedEntry(10044, 22, 191, 1410, false, false, 0.0F, true, true, 0, 25.0D, CreationCategories.CARTS);\n/* */ \n/* 2497 */ creatureCarrier.addRequirement(new CreationRequirement(1, 191, 1, true));\n/* 2498 */ creatureCarrier.addRequirement(new CreationRequirement(2, 22, 9, true));\n/* 2499 */ creatureCarrier.addRequirement(new CreationRequirement(3, 23, 4, true));\n/* 2500 */ creatureCarrier.addRequirement(new CreationRequirement(4, 218, 4, true));\n/* 2501 */ creatureCarrier.addRequirement(new CreationRequirement(5, 632, 1, true));\n/* 2502 */ creatureCarrier.addRequirement(new CreationRequirement(6, 9, 2, true));\n/* */ \n/* 2504 */ AdvancedCreationEntry colossusOfVynora = createAdvancedEntry(1013, 519, 130, 869, false, false, 0.0F, true, true, CreationCategories.STATUES);\n/* */ \n/* */ \n/* 2507 */ colossusOfVynora.setDeityRestriction(3);\n/* 2508 */ colossusOfVynora.addRequirement(new CreationRequirement(1, 519, 1999, true));\n/* 2509 */ colossusOfVynora.addRequirement(new CreationRequirement(2, 130, 1999, true));\n/* 2510 */ colossusOfVynora.addRequirement(new CreationRequirement(3, 599, 10, true));\n/* 2511 */ colossusOfVynora.setIsEpicBuildMissionTarget(false);\n/* */ \n/* 2513 */ AdvancedCreationEntry colossusOfMagranon = createAdvancedEntry(1013, 519, 130, 870, false, false, 0.0F, true, true, CreationCategories.STATUES);\n/* */ \n/* */ \n/* 2516 */ colossusOfMagranon.setDeityRestriction(2);\n/* 2517 */ colossusOfMagranon.addRequirement(new CreationRequirement(1, 519, 1999, true));\n/* 2518 */ colossusOfMagranon.addRequirement(new CreationRequirement(2, 130, 1999, true));\n/* 2519 */ colossusOfMagranon.addRequirement(new CreationRequirement(3, 598, 10, true));\n/* 2520 */ colossusOfMagranon.setIsEpicBuildMissionTarget(false);\n/* */ \n/* 2522 */ AdvancedCreationEntry bedsideTable = createAdvancedEntry(10044, 23, 22, 885, false, false, 0.0F, true, true, 0, 25.0D, CreationCategories.FURNITURE);\n/* */ \n/* */ \n/* 2525 */ bedsideTable.addRequirement(new CreationRequirement(1, 22, 3, true));\n/* 2526 */ bedsideTable.addRequirement(new CreationRequirement(2, 23, 3, true));\n/* 2527 */ bedsideTable.addRequirement(new CreationRequirement(3, 218, 1, true));\n/* */ \n/* 2529 */ AdvancedCreationEntry colossusOfFo = createAdvancedEntry(1013, 519, 130, 907, false, false, 0.0F, true, true, CreationCategories.STATUES);\n/* */ \n/* */ \n/* 2532 */ colossusOfFo.setDeityRestriction(1);\n/* 2533 */ colossusOfFo.addRequirement(new CreationRequirement(1, 519, 1999, true));\n/* 2534 */ colossusOfFo.addRequirement(new CreationRequirement(2, 130, 1999, true));\n/* 2535 */ colossusOfFo.addRequirement(new CreationRequirement(3, 598, 10, true));\n/* 2536 */ colossusOfFo.setIsEpicBuildMissionTarget(false);\n/* */ \n/* 2538 */ AdvancedCreationEntry colossusOfLibila = createAdvancedEntry(1013, 519, 130, 916, false, false, 0.0F, true, true, CreationCategories.STATUES);\n/* */ \n/* */ \n/* 2541 */ colossusOfLibila.setDeityRestriction(4);\n/* 2542 */ colossusOfLibila.addRequirement(new CreationRequirement(1, 519, 1999, true));\n/* 2543 */ colossusOfLibila.addRequirement(new CreationRequirement(2, 130, 1999, true));\n/* 2544 */ colossusOfLibila.addRequirement(new CreationRequirement(3, 772, 10, true));\n/* 2545 */ colossusOfLibila.setIsEpicBuildMissionTarget(false);\n/* */ \n/* 2547 */ createSimpleEntry(10015, 185, 221, 897, false, true, 0.0F, false, false, CreationCategories.CONSTRUCTION_MATERIAL);\n/* */ \n/* */ \n/* 2550 */ AdvancedCreationEntry openFireplace = createAdvancedEntry(1013, 492, 132, 889, false, false, 0.0F, true, true, 0, 35.0D, CreationCategories.FIRE);\n/* */ \n/* */ \n/* 2553 */ openFireplace.addRequirement(new CreationRequirement(1, 132, 9, true));\n/* 2554 */ openFireplace.addRequirement(new CreationRequirement(2, 492, 9, true));\n/* 2555 */ openFireplace.addRequirement(new CreationRequirement(3, 22, 2, true));\n/* */ \n/* 2557 */ AdvancedCreationEntry canopyBed = createAdvancedEntry(10044, 482, 483, 890, false, false, 0.0F, true, true, 0, 65.0D, CreationCategories.FURNITURE);\n/* */ \n/* */ \n/* 2560 */ canopyBed.addRequirement(new CreationRequirement(1, 485, 1, true));\n/* 2561 */ canopyBed.addRequirement(new CreationRequirement(2, 22, 10, true));\n/* 2562 */ canopyBed.addRequirement(new CreationRequirement(3, 486, 8, true));\n/* 2563 */ canopyBed.addRequirement(new CreationRequirement(4, 302, 8, true));\n/* 2564 */ canopyBed.addRequirement(new CreationRequirement(5, 217, 2, true));\n/* 2565 */ canopyBed.addRequirement(new CreationRequirement(6, 218, 2, true));\n/* */ \n/* 2567 */ AdvancedCreationEntry woodenBench = createAdvancedEntry(10044, 218, 22, 891, false, false, 0.0F, true, true, 0, 35.0D, CreationCategories.FURNITURE);\n/* */ \n/* */ \n/* 2570 */ woodenBench.addRequirement(new CreationRequirement(1, 22, 7, true));\n/* 2571 */ woodenBench.addRequirement(new CreationRequirement(2, 218, 3, true));\n/* 2572 */ woodenBench.addRequirement(new CreationRequirement(3, 23, 4, true));\n/* 2573 */ woodenBench.addRequirement(new CreationRequirement(4, 188, 2, true));\n/* */ \n/* 2575 */ AdvancedCreationEntry wardrobe = createAdvancedEntry(10044, 217, 22, 892, false, false, 0.0F, true, true, 0, 55.0D, CreationCategories.FURNITURE);\n/* */ \n/* */ \n/* 2578 */ wardrobe.addRequirement(new CreationRequirement(1, 22, 11, true));\n/* 2579 */ wardrobe.addRequirement(new CreationRequirement(2, 23, 4, true));\n/* 2580 */ wardrobe.addRequirement(new CreationRequirement(3, 217, 3, true));\n/* 2581 */ wardrobe.addRequirement(new CreationRequirement(4, 218, 2, true));\n/* */ \n/* 2583 */ AdvancedCreationEntry woodenCoffer = createAdvancedEntry(10044, 218, 22, 893, false, false, 0.0F, true, true, 0, 24.0D, CreationCategories.FURNITURE);\n/* */ \n/* */ \n/* 2586 */ woodenCoffer.addRequirement(new CreationRequirement(1, 22, 5, true));\n/* 2587 */ woodenCoffer.addRequirement(new CreationRequirement(2, 218, 2, true));\n/* */ \n/* 2589 */ AdvancedCreationEntry royalThrone = createAdvancedEntry(10044, 217, 22, 894, false, false, 0.0F, true, true, 0, 70.0D, CreationCategories.FURNITURE);\n/* */ \n/* */ \n/* 2592 */ royalThrone.addRequirement(new CreationRequirement(1, 22, 7, true));\n/* 2593 */ royalThrone.addRequirement(new CreationRequirement(2, 23, 2, true));\n/* 2594 */ royalThrone.addRequirement(new CreationRequirement(3, 217, 3, true));\n/* 2595 */ royalThrone.addRequirement(new CreationRequirement(4, 218, 6, true));\n/* */ \n/* 2597 */ AdvancedCreationEntry washingBowl = createAdvancedEntry(10015, 64, 221, 895, false, true, 0.0F, false, true, 0, 30.0D, CreationCategories.FURNITURE);\n/* */ \n/* */ \n/* 2600 */ washingBowl.setDepleteFromTarget(1500);\n/* 2601 */ washingBowl.addRequirement(new CreationRequirement(1, 897, 3, true));\n/* 2602 */ washingBowl.addRequirement(new CreationRequirement(2, 77, 1, true));\n/* */ \n/* 2604 */ AdvancedCreationEntry tripodTableSmall = createAdvancedEntry(10044, 22, 23, 896, false, false, 0.0F, true, true, 0, 30.0D, CreationCategories.FURNITURE);\n/* */ \n/* */ \n/* 2607 */ tripodTableSmall.addRequirement(new CreationRequirement(1, 22, 1, true));\n/* 2608 */ tripodTableSmall.addRequirement(new CreationRequirement(2, 23, 1, true));\n/* 2609 */ tripodTableSmall.addRequirement(new CreationRequirement(3, 218, 2, true));\n/* */ \n/* 2611 */ AdvancedCreationEntry highBookshelf = createAdvancedEntry(10044, 217, 22, 911, false, false, 0.0F, true, true, 0, 35.0D, CreationCategories.FURNITURE);\n/* */ \n/* */ \n/* 2614 */ highBookshelf.addRequirement(new CreationRequirement(1, 22, 7, true));\n/* 2615 */ highBookshelf.addRequirement(new CreationRequirement(2, 23, 2, true));\n/* 2616 */ highBookshelf.addRequirement(new CreationRequirement(3, 217, 3, true));\n/* */ \n/* 2618 */ AdvancedCreationEntry lowBookshelf = createAdvancedEntry(10044, 217, 22, 912, false, false, 0.0F, true, true, 0, 25.0D, CreationCategories.FURNITURE);\n/* */ \n/* */ \n/* 2621 */ lowBookshelf.addRequirement(new CreationRequirement(1, 22, 3, true));\n/* 2622 */ lowBookshelf.addRequirement(new CreationRequirement(2, 23, 1, true));\n/* 2623 */ lowBookshelf.addRequirement(new CreationRequirement(3, 217, 1, true));\n/* */ \n/* 2625 */ AdvancedCreationEntry emptyHighBookshelf = createAdvancedEntry(10044, 217, 22, 1401, false, false, 0.0F, true, true, 0, 35.0D, CreationCategories.FURNITURE);\n/* */ \n/* */ \n/* 2628 */ emptyHighBookshelf.addRequirement(new CreationRequirement(1, 22, 7, true));\n/* 2629 */ emptyHighBookshelf.addRequirement(new CreationRequirement(2, 23, 2, true));\n/* 2630 */ emptyHighBookshelf.addRequirement(new CreationRequirement(3, 217, 3, true));\n/* */ \n/* 2632 */ AdvancedCreationEntry emptyLowBookshelf = createAdvancedEntry(10044, 217, 22, 1400, false, false, 0.0F, true, true, 0, 25.0D, CreationCategories.FURNITURE);\n/* */ \n/* */ \n/* 2635 */ emptyLowBookshelf.addRequirement(new CreationRequirement(1, 22, 3, true));\n/* 2636 */ emptyLowBookshelf.addRequirement(new CreationRequirement(2, 23, 1, true));\n/* 2637 */ emptyLowBookshelf.addRequirement(new CreationRequirement(3, 217, 1, true));\n/* */ \n/* 2639 */ AdvancedCreationEntry barTable = createAdvancedEntry(10044, 218, 22, 1402, false, false, 0.0F, true, true, 0, 25.0D, CreationCategories.FURNITURE);\n/* */ \n/* */ \n/* 2642 */ barTable.addRequirement(new CreationRequirement(1, 22, 14, true));\n/* 2643 */ barTable.addRequirement(new CreationRequirement(2, 188, 2, true));\n/* 2644 */ barTable.addRequirement(new CreationRequirement(3, 218, 4, true));\n/* */ \n/* 2646 */ AdvancedCreationEntry fineHighChair = createAdvancedEntry(10044, 218, 22, 913, false, false, 0.0F, true, true, 0, 60.0D, CreationCategories.FURNITURE);\n/* */ \n/* */ \n/* 2649 */ fineHighChair.addRequirement(new CreationRequirement(1, 22, 2, true));\n/* 2650 */ fineHighChair.addRequirement(new CreationRequirement(2, 213, 2, true));\n/* 2651 */ fineHighChair.addRequirement(new CreationRequirement(3, 218, 1, true));\n/* */ \n/* 2653 */ AdvancedCreationEntry highChair = createAdvancedEntry(10044, 218, 22, 914, false, false, 0.0F, true, true, 0, 50.0D, CreationCategories.FURNITURE);\n/* */ \n/* */ \n/* 2656 */ highChair.addRequirement(new CreationRequirement(1, 22, 2, true));\n/* 2657 */ highChair.addRequirement(new CreationRequirement(2, 188, 2, true));\n/* 2658 */ highChair.addRequirement(new CreationRequirement(3, 218, 1, true));\n/* */ \n/* 2660 */ AdvancedCreationEntry pauperHighChair = createAdvancedEntry(10044, 218, 22, 915, false, false, 0.0F, true, true, 0, 40.0D, CreationCategories.FURNITURE);\n/* */ \n/* */ \n/* 2663 */ pauperHighChair.addRequirement(new CreationRequirement(1, 22, 1, true));\n/* 2664 */ pauperHighChair.addRequirement(new CreationRequirement(2, 23, 3, true));\n/* 2665 */ pauperHighChair.addRequirement(new CreationRequirement(3, 218, 1, true));\n/* */ \n/* 2667 */ if (Features.Feature.AMPHORA.isEnabled()) {\n/* */ \n/* 2669 */ AdvancedCreationEntry kiln = createAdvancedEntry(1013, 132, 132, 1023, false, false, 0.0F, true, true, CreationCategories.FIRE);\n/* */ \n/* 2671 */ kiln.addRequirement(new CreationRequirement(1, 132, 18, true));\n/* 2672 */ kiln.addRequirement(new CreationRequirement(2, 130, 20, true));\n/* 2673 */ kiln.addRequirement(new CreationRequirement(3, 26, 2, true));\n/* */ } \n/* */ \n/* 2676 */ AdvancedCreationEntry smelter = createAdvancedEntry(1013, 132, 132, 1028, false, false, 0.0F, true, true, 0, 50.0D, CreationCategories.FIRE);\n/* */ \n/* 2678 */ smelter.addRequirement(new CreationRequirement(1, 132, 48, true));\n/* 2679 */ smelter.addRequirement(new CreationRequirement(2, 130, 50, true));\n/* 2680 */ smelter.addRequirement(new CreationRequirement(3, 298, 5, true));\n/* */ \n/* 2682 */ AdvancedCreationEntry simpleDioptra = createAdvancedEntry(10015, 902, 904, 903, false, false, 0.0F, true, false, CreationCategories.TOOLS);\n/* */ \n/* 2684 */ simpleDioptra.addRequirement(new CreationRequirement(1, 480, 1, true));\n/* 2685 */ simpleDioptra.addRequirement(new CreationRequirement(2, 23, 3, true));\n/* */ \n/* 2687 */ AdvancedCreationEntry rangePole = createAdvancedEntry(1005, 711, 213, 901, false, false, 0.0F, true, false, CreationCategories.TOOLS);\n/* */ \n/* 2689 */ rangePole.addRequirement(new CreationRequirement(1, 213, 3, true));\n/* 2690 */ rangePole.addRequirement(new CreationRequirement(2, 439, 8, true));\n/* */ \n/* 2692 */ AdvancedCreationEntry pewpewdie = createAdvancedEntry(10044, 217, 22, 934, false, false, 0.0F, true, true, 0, 40.0D, CreationCategories.WARMACHINES);\n/* */ \n/* */ \n/* 2695 */ pewpewdie.addRequirement(new CreationRequirement(1, 22, 4, true));\n/* 2696 */ pewpewdie.addRequirement(new CreationRequirement(2, 9, 1, true));\n/* 2697 */ pewpewdie.addRequirement(new CreationRequirement(3, 859, 3, true));\n/* 2698 */ pewpewdie.addRequirement(new CreationRequirement(4, 188, 2, true));\n/* */ \n/* 2700 */ AdvancedCreationEntry siegeShield = createAdvancedEntry(1005, 217, 22, 931, false, false, 0.0F, true, true, 0, 10.0D, CreationCategories.WARMACHINES);\n/* */ \n/* */ \n/* 2703 */ siegeShield.addRequirement(new CreationRequirement(1, 22, 20, true));\n/* 2704 */ siegeShield.addRequirement(new CreationRequirement(2, 9, 2, true));\n/* */ \n/* 2706 */ AdvancedCreationEntry ballistaMount = createAdvancedEntry(10044, 217, 9, 933, false, false, 0.0F, true, true, 0, 60.0D, CreationCategories.WARMACHINES);\n/* */ \n/* */ \n/* 2709 */ ballistaMount.addRequirement(new CreationRequirement(1, 22, 8, true));\n/* */ \n/* 2711 */ AdvancedCreationEntry barrier = createAdvancedEntry(1005, 217, 9, 938, false, false, 0.0F, true, true, 0, 5.0D, CreationCategories.WARMACHINES);\n/* */ \n/* */ \n/* 2714 */ barrier.addRequirement(new CreationRequirement(1, 23, 21, true));\n/* */ \n/* 2716 */ createSimpleEntry(1032, 935, 23, 932, true, true, 0.0F, false, false, CreationCategories.FLETCHING);\n/* */ \n/* 2718 */ if (Features.Feature.METALLIC_ITEMS.isEnabled()) {\n/* */ \n/* 2720 */ createMetallicEntries(10011, 64, 698, 935, false, true, 10.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 2722 */ createMetallicEntries(10015, 185, 205, 1115, false, true, 0.0F, false, false, CreationCategories.TOOLS);\n/* */ \n/* */ }\n/* */ else {\n/* */ \n/* 2727 */ createSimpleEntry(10011, 64, 698, 935, false, true, 10.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 2729 */ createSimpleEntry(10011, 64, 694, 935, false, true, 10.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 2731 */ createSimpleEntry(10011, 64, 837, 935, false, true, 10.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 2733 */ createSimpleEntry(10011, 64, 205, 935, false, true, 10.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 2735 */ createSimpleEntry(10011, 64, 47, 935, false, true, 10.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 2737 */ createSimpleEntry(10011, 64, 45, 935, false, true, 10.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 2739 */ createSimpleEntry(10011, 64, 44, 935, false, true, 10.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 2741 */ createSimpleEntry(10011, 64, 223, 935, false, true, 10.0F, false, false, CreationCategories.WEAPON_HEADS);\n/* */ \n/* 2743 */ createSimpleEntry(10015, 185, 205, 1115, false, true, 0.0F, false, false, CreationCategories.TOOLS);\n/* */ } \n/* */ \n/* */ \n/* 2747 */ AdvancedCreationEntry ballista = createAdvancedEntry(10044, 933, 22, 936, false, false, 0.0F, true, true, 0, 60.0D, CreationCategories.WARMACHINES);\n/* */ \n/* 2749 */ ballista.addRequirement(new CreationRequirement(1, 559, 4, true));\n/* 2750 */ ballista.addRequirement(new CreationRequirement(2, 897, 2, true));\n/* 2751 */ ballista.addRequirement(new CreationRequirement(3, 22, 4, true));\n/* 2752 */ ballista.addRequirement(new CreationRequirement(4, 218, 1, true));\n/* 2753 */ ballista.addRequirement(new CreationRequirement(5, 23, 1, true));\n/* */ \n/* 2755 */ AdvancedCreationEntry trebuchet = createAdvancedEntry(10044, 9, 9, 937, false, false, 0.0F, true, true, 0, 80.0D, CreationCategories.WARMACHINES);\n/* */ \n/* 2757 */ trebuchet.addRequirement(new CreationRequirement(1, 9, 20, true));\n/* 2758 */ trebuchet.addRequirement(new CreationRequirement(2, 319, 5, true));\n/* 2759 */ trebuchet.addRequirement(new CreationRequirement(3, 191, 2, true));\n/* 2760 */ trebuchet.addRequirement(new CreationRequirement(4, 22, 40, true));\n/* */ \n/* 2762 */ AdvancedCreationEntry archeryTower = createAdvancedEntry(10044, 217, 22, 939, false, false, 0.0F, true, true, 0, 40.0D, CreationCategories.WARMACHINES);\n/* */ \n/* */ \n/* 2765 */ archeryTower.addRequirement(new CreationRequirement(1, 22, 200, true));\n/* 2766 */ archeryTower.addRequirement(new CreationRequirement(2, 9, 20, true));\n/* 2767 */ archeryTower.addRequirement(new CreationRequirement(3, 860, 20, true));\n/* 2768 */ archeryTower.addRequirement(new CreationRequirement(4, 217, 6, true));\n/* */ \n/* 2770 */ AdvancedCreationEntry spinningWheel = createAdvancedEntry(10044, 187, 23, 922, false, false, 0.0F, true, true, 0, 30.0D, CreationCategories.TOOLS);\n/* */ \n/* */ \n/* 2773 */ spinningWheel.addRequirement(new CreationRequirement(1, 23, 1, true));\n/* 2774 */ spinningWheel.addRequirement(new CreationRequirement(2, 22, 3, true));\n/* 2775 */ spinningWheel.addRequirement(new CreationRequirement(3, 218, 2, true));\n/* 2776 */ spinningWheel.addRequirement(new CreationRequirement(4, 153, 2, true));\n/* */ \n/* 2778 */ AdvancedCreationEntry loungeChair = createAdvancedEntry(10044, 22, 23, 923, false, false, 0.0F, true, true, 0, 40.0D, CreationCategories.FURNITURE);\n/* */ \n/* */ \n/* 2781 */ loungeChair.addRequirement(new CreationRequirement(1, 22, 5, true));\n/* 2782 */ loungeChair.addRequirement(new CreationRequirement(2, 23, 3, true));\n/* 2783 */ loungeChair.addRequirement(new CreationRequirement(3, 218, 2, true));\n/* 2784 */ loungeChair.addRequirement(new CreationRequirement(4, 153, 4, true));\n/* */ \n/* 2786 */ AdvancedCreationEntry royalLoungeChaise = createAdvancedEntry(10044, 22, 23, 924, false, false, 0.0F, true, true, 0, 70.0D, CreationCategories.FURNITURE);\n/* */ \n/* */ \n/* 2789 */ royalLoungeChaise.addRequirement(new CreationRequirement(1, 22, 4, true));\n/* 2790 */ royalLoungeChaise.addRequirement(new CreationRequirement(2, 23, 1, true));\n/* 2791 */ royalLoungeChaise.addRequirement(new CreationRequirement(3, 218, 6, true));\n/* 2792 */ royalLoungeChaise.addRequirement(new CreationRequirement(4, 926, 10, true));\n/* 2793 */ royalLoungeChaise.addRequirement(new CreationRequirement(5, 925, 4, true));\n/* */ \n/* 2795 */ AdvancedCreationEntry woodCupboard = createAdvancedEntry(10044, 218, 22, 927, false, false, 0.0F, true, true, 0, 40.0D, CreationCategories.FURNITURE);\n/* */ \n/* */ \n/* 2798 */ woodCupboard.addRequirement(new CreationRequirement(1, 22, 4, true));\n/* 2799 */ woodCupboard.addRequirement(new CreationRequirement(2, 218, 2, true));\n/* 2800 */ woodCupboard.addRequirement(new CreationRequirement(3, 23, 2, true));\n/* 2801 */ woodCupboard.addRequirement(new CreationRequirement(4, 153, 2, true));\n/* */ \n/* 2803 */ AdvancedCreationEntry alchemyCupboard = createAdvancedEntry(10044, 218, 22, 1117, false, false, 0.0F, true, true, 0, 20.0D, CreationCategories.FURNITURE);\n/* */ \n/* */ \n/* 2806 */ alchemyCupboard.addRequirement(new CreationRequirement(1, 22, 5, true));\n/* 2807 */ alchemyCupboard.addRequirement(new CreationRequirement(2, 218, 2, true));\n/* 2808 */ alchemyCupboard.addRequirement(new CreationRequirement(3, 23, 2, true));\n/* 2809 */ alchemyCupboard.addRequirement(new CreationRequirement(4, 1254, 5, true));\n/* 2810 */ alchemyCupboard.addRequirement(new CreationRequirement(5, 76, 10, true));\n/* */ \n/* 2812 */ AdvancedCreationEntry storageUnit = createAdvancedEntry(1005, 217, 22, 1119, false, false, 0.0F, true, true, 0, 30.0D, CreationCategories.STORAGE);\n/* */ \n/* */ \n/* 2815 */ storageUnit.addRequirement(new CreationRequirement(1, 22, 14, true));\n/* 2816 */ storageUnit.addRequirement(new CreationRequirement(2, 217, 3, true));\n/* 2817 */ storageUnit.addRequirement(new CreationRequirement(3, 188, 4, true));\n/* 2818 */ storageUnit.addRequirement(new CreationRequirement(4, 561, 10, true));\n/* 2819 */ storageUnit.addRequirement(new CreationRequirement(5, 289, 3, true));\n/* */ \n/* 2821 */ AdvancedCreationEntry roundMarbleTable = createAdvancedEntry(10074, 787, 130, 928, false, false, 0.0F, true, true, 0, 60.0D, CreationCategories.FURNITURE);\n/* */ \n/* */ \n/* 2824 */ roundMarbleTable.addRequirement(new CreationRequirement(1, 787, 1, true));\n/* 2825 */ roundMarbleTable.addRequirement(new CreationRequirement(2, 130, 3, true));\n/* */ \n/* 2827 */ AdvancedCreationEntry rectagularMarbleTable = createAdvancedEntry(10074, 787, 130, 929, false, false, 0.0F, true, true, 0, 50.0D, CreationCategories.FURNITURE);\n/* */ \n/* */ \n/* 2830 */ rectagularMarbleTable.addRequirement(new CreationRequirement(1, 787, 1, true));\n/* 2831 */ rectagularMarbleTable.addRequirement(new CreationRequirement(2, 130, 4, true));\n/* */ \n/* 2833 */ AdvancedCreationEntry yellowWoolCap = createAdvancedEntry(10016, 128, 943, 944, true, false, 0.0F, true, false, 0, 20.0D, CreationCategories.CLOTHES);\n/* */ \n/* */ \n/* 2836 */ yellowWoolCap.setUseTemplateWeight(true);\n/* 2837 */ yellowWoolCap.setColouringCreation(true);\n/* 2838 */ yellowWoolCap.addRequirement(new CreationRequirement(1, 47, 1, true));\n/* 2839 */ yellowWoolCap.addRequirement(new CreationRequirement(2, 128, 1, true));\n/* 2840 */ yellowWoolCap.addRequirement(new CreationRequirement(3, 439, 3, true));\n/* */ \n/* 2842 */ AdvancedCreationEntry greenWoolCap = createAdvancedEntry(10016, 128, 943, 945, true, false, 0.0F, true, false, 0, 20.0D, CreationCategories.CLOTHES);\n/* */ \n/* */ \n/* 2845 */ greenWoolCap.setUseTemplateWeight(true);\n/* 2846 */ greenWoolCap.setColouringCreation(true);\n/* 2847 */ greenWoolCap.addRequirement(new CreationRequirement(1, 47, 1, true));\n/* */ \n/* 2849 */ AdvancedCreationEntry redWoolCap = createAdvancedEntry(10016, 128, 943, 946, true, false, 0.0F, true, false, 0, 20.0D, CreationCategories.CLOTHES);\n/* */ \n/* */ \n/* 2852 */ redWoolCap.setUseTemplateWeight(true);\n/* 2853 */ redWoolCap.setColouringCreation(true);\n/* 2854 */ redWoolCap.addRequirement(new CreationRequirement(1, 439, 2, true));\n/* */ \n/* 2856 */ AdvancedCreationEntry blueWoolCap = createAdvancedEntry(10016, 128, 943, 947, true, false, 0.0F, true, false, 0, 20.0D, CreationCategories.CLOTHES);\n/* */ \n/* */ \n/* 2859 */ blueWoolCap.setUseTemplateWeight(true);\n/* 2860 */ blueWoolCap.setColouringCreation(true);\n/* 2861 */ blueWoolCap.addRequirement(new CreationRequirement(1, 440, 2, true));\n/* */ \n/* 2863 */ AdvancedCreationEntry NIcoomonWoolHat = createAdvancedEntry(10016, 215, 926, 948, true, false, 5.0F, false, false, 0, 5.0D, CreationCategories.CLOTHES);\n/* */ \n/* */ \n/* 2866 */ NIcoomonWoolHat.depleteSource = false;\n/* 2867 */ NIcoomonWoolHat.setDepleteFromTarget(200);\n/* 2868 */ NIcoomonWoolHat.addRequirement(new CreationRequirement(1, 925, 1, true));\n/* */ \n/* 2870 */ AdvancedCreationEntry CIcoomonWoolHat = createAdvancedEntry(10016, 216, 926, 948, true, false, 5.0F, false, false, 0, 5.0D, CreationCategories.CLOTHES);\n/* */ \n/* */ \n/* 2873 */ CIcoomonWoolHat.depleteSource = false;\n/* 2874 */ CIcoomonWoolHat.setDepleteFromTarget(200);\n/* 2875 */ CIcoomonWoolHat.addRequirement(new CreationRequirement(1, 925, 1, true));\n/* */ \n/* 2877 */ AdvancedCreationEntry coomonWoolHatDark = createAdvancedEntry(10016, 128, 948, 949, true, false, 0.0F, true, false, 0, 20.0D, CreationCategories.CLOTHES);\n/* */ \n/* */ \n/* 2880 */ coomonWoolHatDark.setUseTemplateWeight(true);\n/* 2881 */ coomonWoolHatDark.setColouringCreation(true);\n/* 2882 */ coomonWoolHatDark.addRequirement(new CreationRequirement(1, 46, 1, true));\n/* 2883 */ coomonWoolHatDark.addRequirement(new CreationRequirement(2, 437, 1, true));\n/* */ \n/* 2885 */ AdvancedCreationEntry coomonWoolHatBrown = createAdvancedEntry(10016, 128, 948, 950, true, false, 0.0F, true, false, 0, 20.0D, CreationCategories.CLOTHES);\n/* */ \n/* */ \n/* 2888 */ coomonWoolHatBrown.setUseTemplateWeight(true);\n/* 2889 */ coomonWoolHatBrown.setColouringCreation(true);\n/* 2890 */ coomonWoolHatBrown.addRequirement(new CreationRequirement(1, 439, 3, true));\n/* 2891 */ coomonWoolHatBrown.addRequirement(new CreationRequirement(2, 47, 2, true));\n/* 2892 */ coomonWoolHatBrown.addRequirement(new CreationRequirement(3, 440, 1, true));\n/* 2893 */ coomonWoolHatBrown.addRequirement(new CreationRequirement(4, 128, 2, true));\n/* */ \n/* 2895 */ AdvancedCreationEntry coomonWoolHatGreen = createAdvancedEntry(10016, 128, 948, 951, true, false, 0.0F, true, false, 0, 20.0D, CreationCategories.CLOTHES);\n/* */ \n/* */ \n/* 2898 */ coomonWoolHatGreen.setUseTemplateWeight(true);\n/* 2899 */ coomonWoolHatGreen.setColouringCreation(true);\n/* 2900 */ coomonWoolHatGreen.addRequirement(new CreationRequirement(1, 47, 1, true));\n/* 2901 */ coomonWoolHatGreen.addRequirement(new CreationRequirement(2, 128, 1, true));\n/* */ \n/* 2903 */ AdvancedCreationEntry coomonWoolHatRed = createAdvancedEntry(10016, 128, 948, 952, true, false, 0.0F, true, false, 0, 20.0D, CreationCategories.CLOTHES);\n/* */ \n/* */ \n/* 2906 */ coomonWoolHatRed.setUseTemplateWeight(true);\n/* 2907 */ coomonWoolHatRed.setColouringCreation(true);\n/* 2908 */ coomonWoolHatRed.addRequirement(new CreationRequirement(1, 439, 2, true));\n/* 2909 */ coomonWoolHatRed.addRequirement(new CreationRequirement(2, 128, 2, true));\n/* */ \n/* 2911 */ AdvancedCreationEntry coomonWoolHatBlue = createAdvancedEntry(10016, 128, 948, 953, true, false, 0.0F, true, false, 0, 20.0D, CreationCategories.CLOTHES);\n/* */ \n/* */ \n/* 2914 */ coomonWoolHatBlue.setUseTemplateWeight(true);\n/* 2915 */ coomonWoolHatBlue.setColouringCreation(true);\n/* 2916 */ coomonWoolHatBlue.addRequirement(new CreationRequirement(1, 440, 2, true));\n/* 2917 */ coomonWoolHatBlue.addRequirement(new CreationRequirement(2, 128, 2, true));\n/* */ \n/* 2919 */ AdvancedCreationEntry foresterWoolHatGreen = createAdvancedEntry(10016, 128, 954, 955, true, false, 0.0F, true, false, 0, 10.0D, CreationCategories.CLOTHES);\n/* */ \n/* */ \n/* 2922 */ foresterWoolHatGreen.setUseTemplateWeight(true);\n/* 2923 */ foresterWoolHatGreen.setColouringCreation(true);\n/* 2924 */ foresterWoolHatGreen.addRequirement(new CreationRequirement(1, 47, 1, true));\n/* */ \n/* 2926 */ AdvancedCreationEntry foresterWoolHatDark = createAdvancedEntry(10016, 128, 954, 956, true, false, 0.0F, true, false, 0, 10.0D, CreationCategories.CLOTHES);\n/* */ \n/* */ \n/* 2929 */ foresterWoolHatDark.setUseTemplateWeight(true);\n/* 2930 */ foresterWoolHatDark.setColouringCreation(true);\n/* 2931 */ foresterWoolHatDark.addRequirement(new CreationRequirement(1, 46, 1, true));\n/* 2932 */ foresterWoolHatDark.addRequirement(new CreationRequirement(2, 437, 1, true));\n/* */ \n/* 2934 */ AdvancedCreationEntry foresterWoolHatBlue = createAdvancedEntry(10016, 128, 954, 957, true, false, 0.0F, true, false, 0, 10.0D, CreationCategories.CLOTHES);\n/* */ \n/* */ \n/* 2937 */ foresterWoolHatBlue.setUseTemplateWeight(true);\n/* 2938 */ foresterWoolHatBlue.setColouringCreation(true);\n/* 2939 */ foresterWoolHatBlue.addRequirement(new CreationRequirement(1, 440, 2, true));\n/* */ \n/* 2941 */ AdvancedCreationEntry foresterWoolHatRed = createAdvancedEntry(10016, 128, 954, 958, true, false, 0.0F, true, false, 0, 10.0D, CreationCategories.CLOTHES);\n/* */ \n/* */ \n/* 2944 */ foresterWoolHatRed.setUseTemplateWeight(true);\n/* 2945 */ foresterWoolHatRed.setColouringCreation(true);\n/* 2946 */ foresterWoolHatRed.addRequirement(new CreationRequirement(1, 439, 2, true));\n/* */ \n/* 2948 */ AdvancedCreationEntry squireWoolCapGreen = createAdvancedEntry(10016, 128, 961, 962, true, false, 0.0F, true, false, 0, 25.0D, CreationCategories.CLOTHES);\n/* */ \n/* */ \n/* 2951 */ squireWoolCapGreen.setUseTemplateWeight(true);\n/* 2952 */ squireWoolCapGreen.setColouringCreation(true);\n/* 2953 */ squireWoolCapGreen.addRequirement(new CreationRequirement(1, 47, 1, true));\n/* */ \n/* 2955 */ AdvancedCreationEntry squireWoolCapBlue = createAdvancedEntry(10016, 128, 961, 963, true, false, 0.0F, true, false, 0, 25.0D, CreationCategories.CLOTHES);\n/* */ \n/* */ \n/* 2958 */ squireWoolCapBlue.setUseTemplateWeight(true);\n/* 2959 */ squireWoolCapBlue.setColouringCreation(true);\n/* 2960 */ squireWoolCapBlue.addRequirement(new CreationRequirement(1, 440, 2, true));\n/* */ \n/* 2962 */ AdvancedCreationEntry squireWoolCapBlack = createAdvancedEntry(10016, 128, 961, 964, true, false, 0.0F, true, false, 0, 25.0D, CreationCategories.CLOTHES);\n/* */ \n/* */ \n/* 2965 */ squireWoolCapBlack.setUseTemplateWeight(true);\n/* 2966 */ squireWoolCapBlack.setColouringCreation(true);\n/* 2967 */ squireWoolCapBlack.addRequirement(new CreationRequirement(1, 46, 1, true));\n/* 2968 */ squireWoolCapBlack.addRequirement(new CreationRequirement(2, 437, 1, true));\n/* */ \n/* 2970 */ AdvancedCreationEntry squireWoolCapRed = createAdvancedEntry(10016, 128, 961, 965, true, false, 0.0F, true, false, 0, 25.0D, CreationCategories.CLOTHES);\n/* */ \n/* */ \n/* 2973 */ squireWoolCapRed.setUseTemplateWeight(true);\n/* 2974 */ squireWoolCapRed.setColouringCreation(true);\n/* 2975 */ squireWoolCapRed.addRequirement(new CreationRequirement(1, 439, 2, true));\n/* */ \n/* 2977 */ AdvancedCreationEntry squireWoolCapYellow = createAdvancedEntry(10016, 128, 961, 966, true, false, 0.0F, true, false, 0, 25.0D, CreationCategories.CLOTHES);\n/* */ \n/* */ \n/* 2980 */ squireWoolCapYellow.setUseTemplateWeight(true);\n/* 2981 */ squireWoolCapYellow.setColouringCreation(true);\n/* 2982 */ squireWoolCapYellow.addRequirement(new CreationRequirement(1, 47, 1, true));\n/* 2983 */ squireWoolCapYellow.addRequirement(new CreationRequirement(2, 128, 1, true));\n/* 2984 */ squireWoolCapYellow.addRequirement(new CreationRequirement(3, 439, 2, true));\n/* */ \n/* 2986 */ AdvancedCreationEntry grapeTrellis = createAdvancedEntry(10045, 918, 23, 920, false, false, 0.0F, true, true, 0, 10.0D, CreationCategories.DECORATION);\n/* */ \n/* */ \n/* 2989 */ grapeTrellis.addRequirement(new CreationRequirement(1, 23, 5, true));\n/* 2990 */ grapeTrellis.addRequirement(new CreationRequirement(2, 218, 1, true));\n/* */ \n/* 2992 */ AdvancedCreationEntry grapeTrellis1 = createAdvancedEntry(10045, 266, 23, 920, false, false, 0.0F, true, true, 0, 10.0D, CreationCategories.DECORATION);\n/* */ \n/* */ \n/* 2995 */ grapeTrellis1.setObjectSourceMaterial((byte)49);\n/* 2996 */ grapeTrellis1.addRequirement(new CreationRequirement(1, 23, 5, true));\n/* 2997 */ grapeTrellis1.addRequirement(new CreationRequirement(2, 218, 1, true));\n/* */ \n/* 2999 */ AdvancedCreationEntry ivyTrellis = createAdvancedEntry(10045, 917, 23, 919, false, false, 0.0F, true, true, 0, 10.0D, CreationCategories.DECORATION);\n/* */ \n/* */ \n/* 3002 */ ivyTrellis.addRequirement(new CreationRequirement(1, 23, 5, true));\n/* 3003 */ ivyTrellis.addRequirement(new CreationRequirement(2, 218, 1, true));\n/* */ \n/* 3005 */ AdvancedCreationEntry roseTrellis = createAdvancedEntry(10045, 1017, 23, 1018, false, false, 0.0F, true, true, 0, 10.0D, CreationCategories.DECORATION);\n/* */ \n/* */ \n/* 3008 */ roseTrellis.addRequirement(new CreationRequirement(1, 23, 5, true));\n/* 3009 */ roseTrellis.addRequirement(new CreationRequirement(2, 218, 1, true));\n/* */ \n/* 3011 */ AdvancedCreationEntry roseTrellis1 = createAdvancedEntry(10045, 266, 23, 1018, false, false, 0.0F, true, true, 0, 10.0D, CreationCategories.DECORATION);\n/* */ \n/* */ \n/* 3014 */ roseTrellis1.setObjectSourceMaterial((byte)47);\n/* 3015 */ roseTrellis1.addRequirement(new CreationRequirement(1, 23, 5, true));\n/* 3016 */ roseTrellis1.addRequirement(new CreationRequirement(2, 218, 1, true));\n/* */ \n/* 3018 */ AdvancedCreationEntry hopsTrellis = createAdvancedEntry(10045, 1275, 23, 1274, false, false, 0.0F, true, true, 0, 10.0D, CreationCategories.DECORATION);\n/* */ \n/* */ \n/* 3021 */ hopsTrellis.addRequirement(new CreationRequirement(1, 23, 5, true));\n/* 3022 */ hopsTrellis.addRequirement(new CreationRequirement(2, 218, 1, true));\n/* */ \n/* 3024 */ AdvancedCreationEntry tapestryStand = createAdvancedEntry(10044, 22, 23, 987, false, false, 0.0F, true, true, CreationCategories.RESOURCES);\n/* */ \n/* 3026 */ tapestryStand.addRequirement(new CreationRequirement(1, 23, 3, true));\n/* 3027 */ tapestryStand.addRequirement(new CreationRequirement(2, 218, 2, true));\n/* */ \n/* 3029 */ AdvancedCreationEntry tapestryP1 = createAdvancedEntry(10016, 926, 987, 988, false, false, 0.0F, true, true, CreationCategories.DECORATION);\n/* */ \n/* 3031 */ tapestryP1.addRequirement(new CreationRequirement(1, 926, 7, true));\n/* 3032 */ tapestryP1.addRequirement(new CreationRequirement(2, 925, 2, true));\n/* */ \n/* 3034 */ AdvancedCreationEntry tapestryP2 = createAdvancedEntry(10016, 926, 987, 989, false, false, 0.0F, true, true, CreationCategories.DECORATION);\n/* */ \n/* 3036 */ tapestryP2.addRequirement(new CreationRequirement(1, 926, 7, true));\n/* 3037 */ tapestryP2.addRequirement(new CreationRequirement(2, 925, 2, true));\n/* */ \n/* 3039 */ AdvancedCreationEntry tapestryP3 = createAdvancedEntry(10016, 926, 987, 990, false, false, 0.0F, true, true, CreationCategories.DECORATION);\n/* */ \n/* 3041 */ tapestryP3.addRequirement(new CreationRequirement(1, 926, 7, true));\n/* 3042 */ tapestryP3.addRequirement(new CreationRequirement(2, 925, 2, true));\n/* */ \n/* 3044 */ AdvancedCreationEntry tapestryM1 = createAdvancedEntry(10016, 926, 987, 991, false, false, 0.0F, true, true, CreationCategories.DECORATION);\n/* */ \n/* 3046 */ tapestryM1.addRequirement(new CreationRequirement(1, 926, 7, true));\n/* 3047 */ tapestryM1.addRequirement(new CreationRequirement(2, 925, 6, true));\n/* */ \n/* 3049 */ AdvancedCreationEntry tapestryM2 = createAdvancedEntry(10016, 926, 987, 992, false, false, 0.0F, true, true, CreationCategories.DECORATION);\n/* */ \n/* */ \n/* 3052 */ tapestryM2.addRequirement(new CreationRequirement(1, 926, 7, true));\n/* 3053 */ tapestryM2.addRequirement(new CreationRequirement(2, 925, 6, true));\n/* */ \n/* 3055 */ AdvancedCreationEntry tapestryM3 = createAdvancedEntry(10016, 926, 987, 993, false, false, 0.0F, true, true, CreationCategories.DECORATION);\n/* */ \n/* */ \n/* 3058 */ tapestryM3.addRequirement(new CreationRequirement(1, 926, 7, true));\n/* 3059 */ tapestryM3.addRequirement(new CreationRequirement(2, 925, 6, true));\n/* */ \n/* 3061 */ AdvancedCreationEntry tapestryFaeldray = createAdvancedEntry(10016, 926, 987, 994, false, false, 0.0F, true, true, CreationCategories.DECORATION);\n/* */ \n/* */ \n/* 3064 */ tapestryFaeldray.addRequirement(new CreationRequirement(1, 926, 7, true));\n/* 3065 */ tapestryFaeldray.addRequirement(new CreationRequirement(2, 925, 6, true));\n/* */ \n/* */ \n/* 3068 */ AdvancedCreationEntry swordDisplay = createAdvancedEntry(10044, 987, 21, 1030, false, false, 0.0F, true, true, CreationCategories.DECORATION);\n/* */ \n/* */ \n/* 3071 */ swordDisplay.addRequirement(new CreationRequirement(1, 21, 1, true));\n/* 3072 */ swordDisplay.addRequirement(new CreationRequirement(2, 86, 1, true));\n/* */ \n/* 3074 */ AdvancedCreationEntry axeDisplay = createAdvancedEntry(10044, 987, 90, 1031, false, false, 0.0F, true, true, CreationCategories.DECORATION);\n/* */ \n/* */ \n/* 3077 */ axeDisplay.addRequirement(new CreationRequirement(1, 90, 1, true));\n/* 3078 */ axeDisplay.addRequirement(new CreationRequirement(2, 86, 1, true));\n/* */ \n/* 3080 */ AdvancedCreationEntry marblePlanter = createAdvancedEntry(10074, 786, 786, 1001, false, false, 0.0F, true, true, CreationCategories.DECORATION);\n/* */ \n/* */ \n/* 3083 */ marblePlanter.addRequirement(new CreationRequirement(1, 786, 4, true));\n/* */ \n/* 3085 */ AdvancedCreationEntry bunchOfRopes = createAdvancedEntry(1014, 319, 319, 1029, false, false, 0.0F, true, false, CreationCategories.ROPES);\n/* */ \n/* 3087 */ bunchOfRopes.addRequirement(new CreationRequirement(1, 319, 2, true));\n/* */ \n/* 3089 */ createSimpleEntry(10016, 216, 926, 1071, false, true, 0.0F, false, false, CreationCategories.CLOTHES);\n/* */ \n/* 3091 */ createSimpleEntry(10016, 215, 926, 1071, false, true, 0.0F, false, false, CreationCategories.CLOTHES);\n/* */ \n/* 3093 */ createSimpleEntry(10016, 216, 213, 1107, false, true, 0.0F, false, false, CreationCategories.CLOTHES);\n/* */ \n/* 3095 */ createSimpleEntry(10016, 215, 213, 1107, false, true, 0.0F, false, false, CreationCategories.CLOTHES);\n/* */ \n/* 3097 */ createSimpleEntry(10016, 216, 213, 1106, false, true, 0.0F, false, false, CreationCategories.CLOTHES);\n/* */ \n/* 3099 */ createSimpleEntry(10016, 215, 213, 1106, false, true, 0.0F, false, false, CreationCategories.CLOTHES);\n/* */ \n/* */ \n/* 3102 */ createNewClothing(1067, 110, 128, new int[] { 47, 439, 102 });\n/* 3103 */ createNewClothing(1068, 110, 128, new int[] { 46, 437, 102 });\n/* 3104 */ createNewClothing(1069, 110, 128, new int[] { 439, 100, 102 });\n/* 3105 */ createNewClothing(1070, 1107, 128, new int[] { 439, 47, 440 });\n/* 3106 */ createNewClothing(1072, 1107, 128, new int[] { 46, 437 });\n/* 3107 */ createNewClothing(1073, 1107, 128, new int[] { 47 });\n/* 3108 */ createNewClothing(1074, 1106, 128, new int[] { 47, 439, 100 });\n/* 3109 */ createNewClothing(1105, 1106, 128, new int[] { 46, 437, 100 });\n/* 3110 */ createNewClothing(1075, 1106, 128, new int[] { 439, 100 });\n/* 3111 */ createNewClothing(779, 1425, 128, new int[] { 440 });\n/* 3112 */ createNewClothing(111, 1426, 128, new int[] { 439 });\n/* 3113 */ createNewClothing(112, 1427, 128, new int[] { 439 });\n/* */ \n/* */ \n/* 3116 */ AdvancedCreationEntry beeSmoker = createAdvancedEntry(10015, 188, 46, 1243, false, false, 0.0F, true, false, 0, 30.0D, CreationCategories.TOOLS);\n/* */ \n/* */ \n/* */ \n/* 3120 */ beeSmoker.addRequirement(new CreationRequirement(1, 188, 1, true));\n/* 3121 */ beeSmoker.addRequirement(new CreationRequirement(2, 72, 1, true));\n/* */ \n/* 3123 */ AdvancedCreationEntry hive = createAdvancedEntry(10044, 23, 22, 1175, false, false, 0.0F, true, true, 0, 25.0D, CreationCategories.TOOLS);\n/* */ \n/* */ \n/* 3126 */ hive.addRequirement(new CreationRequirement(1, 22, 10, true));\n/* 3127 */ hive.addRequirement(new CreationRequirement(2, 23, 3, true));\n/* 3128 */ hive.addRequirement(new CreationRequirement(3, 218, 1, true));\n/* */ \n/* 3130 */ AdvancedCreationEntry waxkit = createAdvancedEntry(10091, 213, 1254, 1255, false, false, 0.0F, true, false, 0, 21.0D, CreationCategories.COOKING_UTENSILS);\n/* */ \n/* */ \n/* 3133 */ waxkit.addRequirement(new CreationRequirement(1, 1269, 1, true));\n/* 3134 */ waxkit.addRequirement(new CreationRequirement(2, 214, 1, true));\n/* */ \n/* 3136 */ AdvancedCreationEntry skullMug = createAdvancedEntry(1012, 390, 1250, 1253, false, true, 0.0F, false, false, 0, 25.0D, CreationCategories.COOKING_UTENSILS);\n/* */ \n/* */ \n/* 3139 */ skullMug.addRequirement(new CreationRequirement(1, 444, 2, true));\n/* 3140 */ skullMug.addRequirement(new CreationRequirement(2, 1254, 2, true));\n/* 3141 */ skullMug.setIsEpicBuildMissionTarget(false);\n/* */ \n/* 3143 */ AdvancedCreationEntry messageBoard = createAdvancedEntry(1005, 23, 22, 1271, false, false, 0.0F, true, true, CreationCategories.SIGNS);\n/* */ \n/* 3145 */ messageBoard.addRequirement(new CreationRequirement(1, 22, 5, true));\n/* 3146 */ messageBoard.addRequirement(new CreationRequirement(2, 23, 1, true));\n/* 3147 */ messageBoard.addRequirement(new CreationRequirement(3, 218, 3, true));\n/* */ \n/* 3149 */ AdvancedCreationEntry still = createAdvancedEntry(10015, 772, 772, 1178, false, false, 0.0F, true, true, CreationCategories.TOOLS);\n/* */ \n/* */ \n/* 3152 */ still.addRequirement(new CreationRequirement(1, 772, 5, true));\n/* 3153 */ still.addRequirement(new CreationRequirement(2, 131, 25, true));\n/* 3154 */ still.addRequirement(new CreationRequirement(3, 22, 1, true));\n/* 3155 */ still.addRequirement(new CreationRequirement(4, 188, 2, true));\n/* */ \n/* 3157 */ AdvancedCreationEntry larder = createAdvancedEntry(10044, 22, 23, 1277, false, false, 0.0F, true, true, CreationCategories.CONTAINER);\n/* */ \n/* 3159 */ larder.addRequirement(new CreationRequirement(1, 22, 19, true));\n/* 3160 */ larder.addRequirement(new CreationRequirement(2, 218, 3, true));\n/* 3161 */ larder.addRequirement(new CreationRequirement(3, 49, 5, true));\n/* 3162 */ larder.addRequirement(new CreationRequirement(4, 188, 2, true));\n/* 3163 */ larder.addRequirement(new CreationRequirement(5, 23, 3, true));\n/* */ \n/* 3165 */ createAdvancedEntry(10015, 1298, 1299, 1296, false, false, 0.0F, true, false, CreationCategories.CONTAINER)\n/* */ \n/* 3167 */ .addRequirement(new CreationRequirement(1, 76, 1, true))\n/* 3168 */ .addRequirement(new CreationRequirement(2, 131, 6, true))\n/* 3169 */ .addRequirement(new CreationRequirement(3, 444, 1, true))\n/* 3170 */ .addRequirement(new CreationRequirement(4, 100, 2, true))\n/* 3171 */ .addRequirement(new CreationRequirement(5, 1298, 2, true));\n/* */ \n/* 3173 */ AdvancedCreationEntry weaponsRackS = createAdvancedEntry(10044, 218, 22, 724, false, false, 0.0F, true, true, CreationCategories.STORAGE);\n/* */ \n/* 3175 */ weaponsRackS.addRequirement(new CreationRequirement(1, 561, 7, true));\n/* 3176 */ weaponsRackS.addRequirement(new CreationRequirement(2, 22, 9, true));\n/* */ \n/* 3178 */ AdvancedCreationEntry weaponsRackP = createAdvancedEntry(10044, 218, 22, 725, false, false, 0.0F, true, true, CreationCategories.STORAGE);\n/* */ \n/* 3180 */ weaponsRackP.addRequirement(new CreationRequirement(1, 561, 7, true));\n/* 3181 */ weaponsRackP.addRequirement(new CreationRequirement(2, 22, 9, true));\n/* */ \n/* 3183 */ AdvancedCreationEntry armourStand = createAdvancedEntry(10044, 218, 22, 759, false, false, 0.0F, true, true, CreationCategories.STORAGE);\n/* */ \n/* 3185 */ armourStand.addRequirement(new CreationRequirement(1, 561, 7, true));\n/* 3186 */ armourStand.addRequirement(new CreationRequirement(2, 22, 12, true));\n/* 3187 */ armourStand.addRequirement(new CreationRequirement(3, 23, 6, true));\n/* */ \n/* 3189 */ AdvancedCreationEntry weaponsRackB = createAdvancedEntry(10044, 218, 22, 758, false, false, 0.0F, true, true, CreationCategories.STORAGE);\n/* */ \n/* 3191 */ weaponsRackB.addRequirement(new CreationRequirement(1, 561, 7, true));\n/* 3192 */ weaponsRackB.addRequirement(new CreationRequirement(2, 22, 9, true));\n/* */ \n/* 3194 */ AdvancedCreationEntry thatchingTool = createAdvancedEntry(10044, 217, 22, 774, false, false, 0.0F, true, false, CreationCategories.TOOLS);\n/* */ \n/* 3196 */ thatchingTool.addRequirement(new CreationRequirement(1, 217, 6, true));\n/* 3197 */ thatchingTool.addRequirement(new CreationRequirement(2, 23, 1, true));\n/* */ \n/* 3199 */ AdvancedCreationEntry wineBarrelRack = createAdvancedEntry(1005, 217, 860, 1108, false, false, 0.0F, true, true, CreationCategories.CONTAINER);\n/* */ \n/* */ \n/* 3202 */ wineBarrelRack.addRequirement(new CreationRequirement(1, 860, 1, true));\n/* */ \n/* 3204 */ AdvancedCreationEntry smallBarrelRack = createAdvancedEntry(1005, 217, 860, 1109, false, false, 0.0F, true, true, CreationCategories.CONTAINER);\n/* */ \n/* */ \n/* 3207 */ smallBarrelRack.addRequirement(new CreationRequirement(1, 860, 1, true));\n/* */ \n/* 3209 */ AdvancedCreationEntry planterRack = createAdvancedEntry(1005, 217, 860, 1110, false, false, 0.0F, true, true, CreationCategories.CONTAINER);\n/* */ \n/* */ \n/* 3212 */ planterRack.addRequirement(new CreationRequirement(1, 22, 4, true));\n/* */ \n/* 3214 */ AdvancedCreationEntry amphoraRack = createAdvancedEntry(1005, 217, 860, 1111, false, false, 0.0F, true, true, CreationCategories.CONTAINER);\n/* */ \n/* */ \n/* 3217 */ amphoraRack.addRequirement(new CreationRequirement(1, 22, 4, true));\n/* */ \n/* 3219 */ AdvancedCreationEntry emptyShelf = createAdvancedEntry(1005, 217, 860, 1412, false, false, 0.0F, true, true, CreationCategories.DECORATION);\n/* */ \n/* */ \n/* 3222 */ emptyShelf.addRequirement(new CreationRequirement(1, 22, 4, true));\n/* */ \n/* 3224 */ createSimpleEntry(10091, 394, 748, 1269, false, true, 0.0F, false, false, CreationCategories.WRITING);\n/* */ \n/* */ \n/* 3227 */ createSimpleEntry(10091, 394, 1272, 1269, false, true, 0.0F, false, false, CreationCategories.WRITING);\n/* */ \n/* */ \n/* */ \n/* 3231 */ if (Features.Feature.HIGHWAYS.isEnabled()) {\n/* */ \n/* 3233 */ createSimpleEntry(10031, 97, 146, 1113, false, true, 10.0F, false, false, CreationCategories.HIGHWAY);\n/* */ \n/* 3235 */ createSimpleEntry(10031, 308, 1113, 1114, true, true, 0.0F, false, false, CreationCategories.HIGHWAY);\n/* */ \n/* */ \n/* 3238 */ AdvancedCreationEntry waystone = createAdvancedEntry(10031, 97, 146, 1112, false, false, 10.0F, false, false, 0, 21.0D, CreationCategories.HIGHWAY);\n/* */ \n/* 3240 */ waystone.setDepleteFromTarget(5000);\n/* 3241 */ waystone.addRequirement(new CreationRequirement(1, 23, 1, true));\n/* 3242 */ waystone.addRequirement(new CreationRequirement(2, 480, 1, true));\n/* */ } \n/* */ \n/* 3245 */ createSimpleEntry(10091, 748, 214, 1409, true, true, 0.0F, false, false, CreationCategories.WRITING);\n/* */ \n/* 3247 */ createSimpleEntry(10091, 1272, 214, 1409, true, true, 0.0F, false, false, CreationCategories.WRITING);\n/* */ \n/* */ \n/* 3250 */ AdvancedCreationEntry archJournal = createAdvancedEntry(10017, 1409, 100, 1404, false, false, 0.0F, true, false, CreationCategories.WRITING);\n/* */ \n/* 3252 */ archJournal.addRequirement(new CreationRequirement(1, 100, 2, true));\n/* 3253 */ AdvancedCreationEntry almanac = createAdvancedEntry(10017, 1409, 100, 1127, false, false, 0.0F, true, false, CreationCategories.WRITING);\n/* */ \n/* 3255 */ almanac.addRequirement(new CreationRequirement(1, 100, 2, true));\n/* */ \n/* 3257 */ if (Features.Feature.WAGONER.isEnabled()) {\n/* */ \n/* 3259 */ AdvancedCreationEntry wagonerContainer = createAdvancedEntry(1005, 217, 860, 1309, false, false, 0.0F, true, true, CreationCategories.CONTAINER);\n/* */ \n/* 3261 */ wagonerContainer.addRequirement(new CreationRequirement(1, 860, 1, true));\n/* */ } \n/* */ \n/* 3264 */ AdvancedCreationEntry crateRack = createAdvancedEntry(1005, 217, 860, 1312, false, false, 0.0F, true, true, CreationCategories.CONTAINER);\n/* */ \n/* 3266 */ crateRack.addRequirement(new CreationRequirement(1, 860, 1, true));\n/* 3267 */ crateRack.addRequirement(new CreationRequirement(2, 22, 6, true));\n/* */ \n/* 3269 */ AdvancedCreationEntry bsbRack = createAdvancedEntry(1005, 217, 860, 1315, false, false, 0.0F, true, true, CreationCategories.CONTAINER);\n/* */ \n/* 3271 */ bsbRack.addRequirement(new CreationRequirement(1, 860, 1, true));\n/* 3272 */ bsbRack.addRequirement(new CreationRequirement(2, 22, 6, true));\n/* */ \n/* 3274 */ AdvancedCreationEntry bcu = createAdvancedEntry(10044, 217, 860, 1316, false, false, 0.0F, true, true, 35, 50.0D, CreationCategories.CONTAINER);\n/* */ \n/* 3276 */ bcu.addRequirement(new CreationRequirement(1, 860, 2, true));\n/* 3277 */ bcu.addRequirement(new CreationRequirement(2, 22, 6, true));\n/* 3278 */ bcu.addRequirement(new CreationRequirement(3, 662, 4, true));\n/* */ \n/* */ \n/* 3281 */ if (Features.Feature.TRANSPORTABLE_CREATURES.isEnabled()) {\n/* */ \n/* 3283 */ AdvancedCreationEntry creatureCrate = createAdvancedEntry(1005, 22, 217, 1311, false, false, 0.0F, true, true, 0, 60.0D, CreationCategories.STORAGE);\n/* */ \n/* 3285 */ creatureCrate.addRequirement(new CreationRequirement(1, 22, 24, true));\n/* 3286 */ creatureCrate.addRequirement(new CreationRequirement(2, 681, 6, true));\n/* 3287 */ creatureCrate.addRequirement(new CreationRequirement(3, 217, 16, true));\n/* */ } \n/* */ \n/* */ \n/* */ \n/* 3292 */ AdvancedCreationEntry tapestryEvening = createAdvancedEntry(10016, 926, 987, 1318, false, false, 0.0F, true, true, CreationCategories.DECORATION);\n/* */ \n/* */ \n/* 3295 */ tapestryEvening.addRequirement(new CreationRequirement(1, 926, 7, true));\n/* 3296 */ tapestryEvening.addRequirement(new CreationRequirement(2, 925, 6, true));\n/* */ \n/* 3298 */ AdvancedCreationEntry tapestryMclavin = createAdvancedEntry(10016, 926, 987, 1319, false, false, 0.0F, true, true, CreationCategories.DECORATION);\n/* */ \n/* */ \n/* 3301 */ tapestryMclavin.addRequirement(new CreationRequirement(1, 926, 7, true));\n/* 3302 */ tapestryMclavin.addRequirement(new CreationRequirement(2, 925, 6, true));\n/* */ \n/* 3304 */ AdvancedCreationEntry tapestryEhizellbob = createAdvancedEntry(10016, 926, 987, 1320, false, false, 0.0F, true, true, CreationCategories.DECORATION);\n/* */ \n/* */ \n/* 3307 */ tapestryEhizellbob.addRequirement(new CreationRequirement(1, 926, 7, true));\n/* 3308 */ tapestryEhizellbob.addRequirement(new CreationRequirement(2, 925, 6, true));\n/* */ \n/* */ \n/* 3311 */ createAdvancedMetalicEntry(10015, 64, 220, 1341, false, true, 0.0F, false, false, CreationCategories.TOOLS, new CreationRequirement[] { new CreationRequirement(1, 790, 3, true), new CreationRequirement(2, 100, 1, true) });\n/* */ \n/* */ \n/* */ \n/* */ \n/* 3316 */ AdvancedCreationEntry keepNet = createAdvancedEntry(1014, 188, 319, 1342, false, false, 0.0F, true, false, CreationCategories.TOOLS);\n/* */ \n/* 3318 */ keepNet.addRequirement(new CreationRequirement(1, 188, 1, true));\n/* 3319 */ keepNet.addRequirement(new CreationRequirement(2, 214, 2, true));\n/* 3320 */ keepNet.addRequirement(new CreationRequirement(3, 23, 2, true));\n/* */ \n/* 3322 */ AdvancedCreationEntry fishingNet = createAdvancedEntry(10016, 214, 214, 1343, false, false, 0.0F, true, false, CreationCategories.TOOLS);\n/* */ \n/* */ \n/* 3325 */ fishingNet.addRequirement(new CreationRequirement(1, 23, 1, true));\n/* 3326 */ fishingNet.addRequirement(new CreationRequirement(2, 319, 1, true));\n/* */ \n/* 3328 */ createSimpleEntry(1005, 8, 23, 1344, false, true, 0.0F, false, false, CreationCategories.TOOLS);\n/* */ \n/* */ \n/* 3331 */ createSimpleEntry(1005, 685, 23, 1344, false, true, 0.0F, false, false, CreationCategories.TOOLS);\n/* */ \n/* */ \n/* 3334 */ createMetallicEntries(10043, 64, 46, 1345, false, true, 0.0F, false, false, CreationCategories.TOOLS);\n/* */ \n/* */ \n/* 3337 */ AdvancedCreationEntry fishingRod = createAdvancedEntry(10044, 1344, 23, 1346, false, false, 0.0F, true, false, CreationCategories.TOOLS);\n/* */ \n/* */ \n/* 3340 */ fishingRod.addRequirement(new CreationRequirement(1, 1345, 3, true));\n/* */ \n/* 3342 */ createSimpleEntry(10016, 14, 214, 1347, false, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* */ \n/* 3345 */ createSimpleEntry(10016, 922, 1347, 1348, false, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* */ \n/* 3348 */ createSimpleEntry(1014, 320, 1348, 1349, false, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* */ \n/* 3351 */ createSimpleEntry(10016, 922, 1349, 1350, false, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* */ \n/* 3354 */ createSimpleEntry(1014, 320, 1350, 1351, false, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* */ \n/* 3357 */ createSimpleEntry(1005, 8, 9, 1356, false, true, 10.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* */ \n/* 3360 */ createSimpleEntry(1005, 685, 9, 1356, false, true, 10.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* */ \n/* 3363 */ createMetallicEntries(10015, 64, 46, 1357, false, true, 1000.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* */ \n/* 3366 */ createSimpleEntry(1020, 8, 1250, 1358, false, true, 900.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* */ \n/* 3369 */ createSimpleEntry(10044, 8, 23, 1367, false, true, 10.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* */ \n/* 3372 */ createMetallicEntries(10043, 64, 46, 1368, false, true, 10.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* */ \n/* 3375 */ createSimpleEntry(10043, 64, 205, 1369, false, true, 10.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* */ \n/* 3378 */ createSimpleEntry(10043, 64, 837, 1369, false, true, 10.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* */ \n/* 3381 */ createSimpleEntry(10043, 64, 694, 1369, false, true, 10.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* */ \n/* 3384 */ createSimpleEntry(10043, 64, 698, 1369, false, true, 10.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* */ \n/* 3387 */ createSimpleEntry(10015, 101, 444, 1370, true, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* */ \n/* 3390 */ createSimpleEntry(10016, 1370, 213, 1371, true, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* */ \n/* 3393 */ createSimpleEntry(10016, 1370, 926, 1371, true, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* */ \n/* 3396 */ createSimpleEntry(1005, 99, 1367, 1372, true, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* */ \n/* 3399 */ createSimpleEntry(10044, 101, 1367, 1373, true, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* */ \n/* 3402 */ createSimpleEntry(10015, 1370, 1368, 1374, true, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* */ \n/* 3405 */ createSimpleEntry(10043, 1371, 1369, 1375, true, true, 0.0F, false, false, CreationCategories.TOOL_PARTS);\n/* */ \n/* */ \n/* 3408 */ AdvancedCreationEntry rackRods = createAdvancedEntry(1005, 218, 22, 1393, false, false, 0.0F, true, true, CreationCategories.STORAGE);\n/* */ \n/* 3410 */ rackRods.addRequirement(new CreationRequirement(1, 561, 7, true));\n/* 3411 */ rackRods.addRequirement(new CreationRequirement(2, 22, 9, true));\n/* */ \n/* */ \n/* */ \n/* */ \n/* 3416 */ AdvancedCreationEntry bouy = createAdvancedEntry(1005, 189, 565, 1396, false, false, 0.0F, true, true, CreationCategories.DECORATION);\n/* */ \n/* 3418 */ bouy.addRequirement(new CreationRequirement(1, 23, 1, true));\n/* 3419 */ bouy.addRequirement(new CreationRequirement(2, 497, 1, true));\n/* */ \n/* 3421 */ AdvancedCreationEntry pearlNecklace = createAdvancedEntry(10043, 214, 1397, 1399, false, false, 0.0F, true, false, CreationCategories.DECORATION);\n/* */ \n/* 3423 */ pearlNecklace.addRequirement(new CreationRequirement(1, 1397, 9, true));\n/* 3424 */ pearlNecklace.addRequirement(new CreationRequirement(2, 1398, 1, true));\n/* */ \n/* 3426 */ if (Features.Feature.CHICKEN_COOPS.isEnabled()) {\n/* */ \n/* 3428 */ AdvancedCreationEntry chickenCoop = createAdvancedEntry(10044, 22, 217, 1432, false, false, 0.0F, true, true, 0, 50.0D, CreationCategories.STORAGE);\n/* */ \n/* */ \n/* */ \n/* 3432 */ chickenCoop.addRequirement(new CreationRequirement(1, 217, 4, true));\n/* 3433 */ chickenCoop.addRequirement(new CreationRequirement(2, 22, 24, true));\n/* 3434 */ chickenCoop.addRequirement(new CreationRequirement(3, 23, 8, true));\n/* */ \n/* 3436 */ chickenCoop.addRequirement(new CreationRequirement(4, 189, 1, true));\n/* */ } \n/* */ \n/* 3439 */ logger.info(\"Initialising the CreationEntries took \" + ((float)(System.nanoTime() - start) / 1000000.0F) + \" millis.\");\n/* */ }",
"@Override\r\n public void init() {\n \tHouse house = ((Room)getCharacterLocation()).getHouse();\r\n \tboolean freekitchen=false;\r\n \tboolean freestage=false;\r\n \tboolean freearena=false;\r\n \tboolean freebath=false;\r\n \tint chance=0;\r\n\r\n \tfor(Room room: house.getRooms()){\r\n \t\tif(room.getAmountPeople()==0){\r\n \t\t\tif(room.getRoomType()==RoomType.STAGE){freestage=true;}\r\n \t\t\tif(room.getRoomType()==RoomType.KITCHEN){freekitchen=true;}\r\n \t\t\tif(room.getRoomType()==RoomType.ARENA){freearena=true;}\r\n \t\t\tif(room.getRoomType()==RoomType.SPAAREA){freebath=true;}\r\n \t\t}\r\n \t}\r\n \t\r\n \t//List what the character can do\r\n\t\tfinal Map<Occupation, Integer> characterCanDo=new HashMap<Occupation, Integer>();\r\n\t\t\r\n\t\tCharakter character = getCharacters().get(0);\r\n\t\t\r\n\t\t\r\n\t\tfor (Occupation attendType: Occupation.values()) {\r\n\t\t\tcharacterCanDo.put(attendType, 0); \r\n\t\t}\r\n\t\t\r\n\t\tif(character.getFinalValue(EssentialAttributes.ENERGY)<=80){\r\n\t\t\tchance=Util.getInt(1,100);\r\n\t\t\t \r\n\t\t\tcharacterCanDo.put(Occupation.REST, chance);\r\n\t\t}\r\n\t\telse{\r\n\t\t\tcharacterCanDo.put(Occupation.REST, 0);\r\n\t\t}\r\n\t\tif(character.getFinalValue(SpecializationAttribute.CLEANING)>=1 && house.getDirt()>30){\r\n\t\t\tchance=Util.getInt(1,100);\r\n\t\t\t \r\n\t\t\tcharacterCanDo.put(Occupation.CLEAN, chance);\r\n\t\t}\r\n\t\telse{\r\n\t\t\tcharacterCanDo.put(Occupation.CLEAN, 0);\r\n\t\t}\r\n\t\tif(character.getFinalValue(SpecializationAttribute.SEDUCTION)>=1){\r\n\t\t\tchance=Util.getInt(1,100);\r\n\t\t\t \r\n\t\t\tcharacterCanDo.put(Occupation.WHORE, chance);\r\n\t\t\tappeal=character.getFinalValue(SpecializationAttribute.SEDUCTION)/10;\r\n\t\t\tmaxCust=1;\r\n\t\t}\r\n\t\telse{\r\n\t\t\tcharacterCanDo.put(Occupation.WHORE, 0);\r\n\t\t}\r\n\t\tif(character.getFinalValue(SpecializationAttribute.STRIP)>=1 && freestage==true){\r\n\t\t\tchance=Util.getInt(1,100);\r\n\t\t\t \r\n\t\t\tcharacterCanDo.put(Occupation.DANCE, chance);\r\n\t\t\tappeal=character.getFinalValue(SpecializationAttribute.STRIP)/10;\r\n\t\t\tmaxCust=15;\r\n\t\t}\r\n\t\telse{\r\n\t\t\tcharacterCanDo.put(Occupation.DANCE, 0);\r\n\t\t}\r\n\t\tif(character.getFinalValue(SpecializationAttribute.COOKING)>=1 && freekitchen==true){\t\t\r\n\t\t\tchance=Util.getInt(1,100);\r\n\t\t\t \r\n\t\t\tcharacterCanDo.put(Occupation.COOK, chance);\r\n\t\t}\r\n\t\telse{\r\n\t\t\tcharacterCanDo.put(Occupation.COOK, 0);\r\n\t\t}\r\n\t\tif(character.getFinalValue(SpecializationAttribute.WELLNESS)>=1 && freebath==true){\r\n\t\t\tchance=Util.getInt(1,100);\r\n\t\t\t \r\n\t\t\tcharacterCanDo.put(Occupation.BATHATTENDANT, chance);\r\n\t\t\tappeal=character.getFinalValue(SpecializationAttribute.WELLNESS)/10;\r\n\t\t\tmaxCust=15;\r\n\t\t}\r\n\t\telse{\r\n\t\t\tcharacterCanDo.put(Occupation.BATHATTENDANT, 0);\r\n\t\t}\r\n\t\tif(freebath==true){\r\n\t\t\tchance=Util.getInt(1,100);\r\n\t\t\t \r\n\t\t\tcharacterCanDo.put(Occupation.BATHE, chance);\r\n\t\t}\r\n\t\telse{\r\n\t\t\tcharacterCanDo.put(Occupation.BATHE, 0);\r\n\t\t}\r\n\t\tif(character.getFinalValue(Sextype.FOREPLAY)>50 && character.getFinalValue(EssentialAttributes.ENERGY)>80){\r\n\t\t\tchance=Util.getInt(1,100);\r\n\t\t\t \r\n\t\t\tcharacterCanDo.put(Occupation.MASTURBATE, chance);\r\n\t\t}\r\n\t\telse{\r\n\t\t\tcharacterCanDo.put(Occupation.MASTURBATE, 0);\r\n\t\t}\r\n\t\tif(character.getFinalValue(SpecializationAttribute.VETERAN)>=1 && freearena==true){\r\n\t\t\tchance=Util.getInt(1,100);\r\n\t\t\t \r\n\t\t\tcharacterCanDo.put(Occupation.TRAIN, chance);\r\n\t\t}\r\n\t\telse{\r\n\t\t\tcharacterCanDo.put(Occupation.TRAIN, 0);\r\n\t\t}\r\n\t\tif(character.getFinalValue(EssentialAttributes.ENERGY)>80){\r\n\t\t\tchance=Util.getInt(1,100);\r\n\t\t\tcharacterCanDo.put(Occupation.ERRAND, chance);\r\n\t\t\tchance=Util.getInt(1,100);\r\n\t\t\tcharacterCanDo.put(Occupation.BEACH, chance);\r\n\t\t}\r\n\t\telse{\r\n\t\t\tcharacterCanDo.put(Occupation.ERRAND, 0);\r\n\t\t\tcharacterCanDo.put(Occupation.BEACH, 0);\r\n\t\t}\r\n\r\n\t\tint previous=0;\r\n\t\tint actual=0;\r\n\t\tfor (Occupation occupation: Occupation.values()) {\r\n\t\t\tactual=characterCanDo.get(occupation);\r\n\t\t\tif(actual>previous && actual!=0){\r\n\t\t\t\tprevious=actual;\r\n\t\t\t\tcharacterOccupationMap.put(character, occupation);\r\n\t\t\t}\r\n\r\n\t\t}\r\n }",
"protected List<FloorDef> genEntities() {\n List<FloorDef> list = new ArrayList<>();\n\n // MUST ADD THE WORK IDS AFTER\n\n list.add(new FloorDef(1, 10, 7001));\n list.add(new FloorDef(2, 3, 7002));\n list.add(new FloorDef(3, 10, 7003));\n list.add(new FloorDef(4, 0, 7004));\n\n //int[] workIDs = new int[]{};\n\n //for (int i = 0; i < workIDs.length)\n\n return list;\n }",
"public static void main(String[] args) {\n City city = new City(60, 200);\n\n City city2 = new City(180, 200);\n\n City city3 = new City(80, 180);\n City city4 = new City(140, 180);\n\n City city5 = new City(20, 160);\n\n City city6 = new City(100, 160);\n\n City city7 = new City(200, 160);\n\n City city8 = new City(140, 140);\n\n City city9 = new City(40, 120);\n\n City city10 = new City(100, 120);\n\n City city11 = new City(180, 100);\n\n City city12 = new City(60, 80);\n\n City city13 = new City(120, 80);\n City city14 = new City(180, 60);\n City city15 = new City(20, 40);\n\n City city16 = new City(100, 40);\n\n City city17 = new City(200, 40);\n City city18 = new City(20, 20);\n\n City city19 = new City(60, 20);\n City city20 = new City(160, 20);\n List<City> list=new ArrayList<City>();\n list.add(city);list.add(city2);\n list.add(city3);\n list.add(city4);\n list.add(city5);\n list.add(city6);\n list.add(city7);\n list.add(city8);\n list.add(city9);\n list.add(city10);\n list.add(city11);\n list.add(city12);\n list.add(city13);\n list.add(city14);\n list.add(city15);\n list.add(city16);\n list.add(city17);\n list.add(city18);\n list.add(city19);\n list.add(city20);\n\n // Initialize population\n Population pop = new Population(100, true,list);\n System.out.println(\"Initial distance: \" + pop.getBestTour().getDistance());\n\n // Evolve population for 100 generations\n pop = Ga.evolvePopulation(pop);\n for (int i = 0; i < 500; i++) {\n pop = Ga.evolvePopulation(pop);\n System.out.println(\"第\"+i+\"代\"+pop.getBestTour().getDistance());\n }\n\n // Print final results\n System.out.println(\"Finished\");\n System.out.println(\"Final distance: \" + pop.getBestTour().getDistance());\n System.out.println(\"Solution:\");\n System.out.println(pop.getBestTour());\n }",
"@Override\r\n public Food createFood(List<Coordinate> obstacles) {\r\n Random random = new Random();\r\n double num = random.nextDouble();\r\n\r\n if (num <= MushroomPowerUp.rarity) {\r\n return new MushroomPowerUp(randomCoordinates(obstacles));\r\n }\r\n if (num <= DoubleScorePowerUp.rarity + MushroomPowerUp.rarity) {\r\n return new DoubleScorePowerUp(randomCoordinates(obstacles));\r\n }\r\n return new AppleFactory().createFood();\r\n }"
] | [
"0.55847096",
"0.5577133",
"0.54625577",
"0.5456797",
"0.53865784",
"0.532134",
"0.52915186",
"0.52905864",
"0.5285032",
"0.5282964",
"0.52362806",
"0.5234286",
"0.522634",
"0.52216905",
"0.5207942",
"0.51671994",
"0.516579",
"0.5157977",
"0.51423967",
"0.5116391",
"0.5108619",
"0.51025796",
"0.5102236",
"0.5083677",
"0.5068002",
"0.50629",
"0.5056388",
"0.5055712",
"0.5050197",
"0.504073",
"0.5034574",
"0.5031346",
"0.5030302",
"0.5029629",
"0.5018012",
"0.50171775",
"0.5010048",
"0.49972034",
"0.49935648",
"0.49912626",
"0.4991245",
"0.4988948",
"0.49871254",
"0.4979429",
"0.4976647",
"0.4956978",
"0.49418485",
"0.49317566",
"0.49315083",
"0.4929894",
"0.49294794",
"0.49225473",
"0.49204788",
"0.49204448",
"0.49178255",
"0.49157646",
"0.49129927",
"0.49118197",
"0.49105227",
"0.49076656",
"0.49061054",
"0.49011117",
"0.48963737",
"0.48943627",
"0.48943594",
"0.4890848",
"0.48881993",
"0.4884095",
"0.48823196",
"0.4879426",
"0.48587024",
"0.4852474",
"0.48502678",
"0.4847864",
"0.4846798",
"0.48360074",
"0.48245245",
"0.48228973",
"0.4820423",
"0.48165977",
"0.48150906",
"0.4812425",
"0.48101014",
"0.4809733",
"0.48078686",
"0.48053038",
"0.48039755",
"0.48007786",
"0.48007548",
"0.47967094",
"0.47952783",
"0.47933722",
"0.47906363",
"0.47886196",
"0.47865197",
"0.4778791",
"0.47741842",
"0.47730517",
"0.4771041",
"0.4761547",
"0.47603744"
] | 0.0 | -1 |
METHODS DEALING WITH COLOUR GROUPS | public ColorGroup getColorGroup()
{
return colorGroup;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract int getColour();",
"@Override\n\t\t\tpublic void onRgb() {\n\t\t\t\t((ExpandableListView) parent).collapseGroup(groupPosition);\n\t\t\t\ttextMode.setText(\"RGB\");\n\t\t\t\tgroupLayLeft.setBackgroundResource(R.drawable.list_group_item_corner);\n\t\t\t\tgroupLayRight.setBackgroundResource(R.drawable.list_group_item_corner);\n\t\t\t}",
"@Override\n public Object getGroup(int groupPosition) {\n return mFloors.get(groupPosition);\n }",
"public static String getColorGroup(String colorName){\n\t\treturn COLOR_MAP.get(colorName);// this is used to Ball Pro supplier\r\n\t}",
"private void colorByGroup(Pixel[] pixels, int image) {\n for(int i = 0; i < pixels.length; i++) {\n Pixel recolor = pixels[i];\n Pixel head = recolor.findHead();\n // if(head != lastHead) {\n // System.out.println(head);\n // lastHead = head;\n // }\n if(head.roundAssignedColor != 1) {\n head.randomRGB(1);\n }\n int color = head.groupRGB;\n setRGB(recolor.x, recolor.y, color, image);\n }\n }",
"@Override\n\tpublic List<Mercostsheetgroupcolor> getAll(\n\t\t\tMercostsheetgroupsetting mercostsheetgroupsetting) {\n\t\treturn this.mercostsheetgroupcolorDao.getAll(mercostsheetgroupsetting);\n\t}",
"public abstract Collection getGroups();",
"public abstract BossColor getColor();",
"private ArrayList<Colours> setColour(){\n\t\tArrayList<Colours> list = new ArrayList<Colours>();\n\t\tlist.add(Colours.RED);\n\t\tlist.add(Colours.BLUE);\n\t\tlist.add(Colours.YELLOW);\n\t\tlist.add(Colours.PINK);\n\t\tlist.add(Colours.GREEN);\n\t\tlist.add(Colours.PURPLE);\n\t\treturn list;\n\t}",
"int getColour();",
"public HashMap<String, List<ColorId>> checkRocketJumpColors ()\n {\n Map<Square, List<Player>> mapRocket = checkRocketJump();\n HashMap<String, List<ColorId>> hashMapToReturn = new HashMap<>();\n List<ColorId> colorIdList ;\n\n for (Square squareIterate : mapRocket.keySet())\n {\n colorIdList = new ArrayList<>();\n\n for (Player playerIterate : mapRocket.get(squareIterate))\n {\n colorIdList.add(playerIterate.getColor());\n }\n\n hashMapToReturn.put(squareIterate.toStringCoordinates(), colorIdList);\n }\n\n return hashMapToReturn;\n\n }",
"private static Collection<Piece> getCorrectBluePieces() {\n\t\tfinal Collection<Piece> pieces = new ArrayList<Piece>();\n\t\tpieces.add(new Piece(PieceType.SERGEANT, PlayerColor.BLUE));\n\t\tpieces.add(new Piece(PieceType.SERGEANT, PlayerColor.BLUE));\n\t\tpieces.add(new Piece(PieceType.SERGEANT, PlayerColor.BLUE));\n\t\tpieces.add(new Piece(PieceType.LIEUTENANT, PlayerColor.BLUE));\n\t\tpieces.add(new Piece(PieceType.LIEUTENANT, PlayerColor.BLUE));\n\t\tpieces.add(new Piece(PieceType.LIEUTENANT, PlayerColor.BLUE));\n\t\tpieces.add(new Piece(PieceType.CAPTAIN, PlayerColor.BLUE));\n\t\tpieces.add(new Piece(PieceType.CAPTAIN, PlayerColor.BLUE));\n\t\tpieces.add(new Piece(PieceType.COLONEL, PlayerColor.BLUE));\n\t\tpieces.add(new Piece(PieceType.COLONEL, PlayerColor.BLUE));\n\t\tpieces.add(new Piece(PieceType.MARSHAL, PlayerColor.BLUE));\n\t\tpieces.add(new Piece(PieceType.FLAG, PlayerColor.BLUE));\n\t\treturn pieces;\n\t}",
"private void initPieceColors(){\n\t\tfor(Piece p : this.pieces)\n\t\t\tpieceColors.put(p, Utils.randomColor());\n\t}",
"@Test\n public void test56() throws Throwable {\n CombinedRangeCategoryPlot combinedRangeCategoryPlot0 = new CombinedRangeCategoryPlot();\n Color color0 = (Color)combinedRangeCategoryPlot0.getRangeGridlinePaint();\n }",
"public abstract void colorChecker(Color c);",
"String getColour();",
"private Color[] getCircleColors()\n {\n return getColorsForState(this.iconPartStates[3]);\n }",
"private Color getPlayerColor(int player){\n\t\tColor pColor;\n\t\tswitch (this.groups[player]){ // adjust color based on what group of balls they're hitting\n\t\t\tcase Ball.TYPE_RED: pColor = new Color(200, 7, 23); break;\n\t\t\tcase Ball.TYPE_BLUE: pColor = new Color(10, 7, 200); break;\n\t\t\tcase 3: pColor = new Color(230, 210, 0); break; // color/type for winner (TODO: enum for player group?)\n\t\t\tdefault: pColor = Color.black; break;\n\t\t}\n\t\t// change color based on if they're allowed to place/hit the ball at the moment\n\t\tpColor = (this.turn==player && !this.table.moving) ? pColor : new Color(pColor.getRed(), pColor.getGreen(), pColor.getBlue(), (int)(0.4*255)); \n\t\treturn pColor;\n\t}",
"public void randomizeColor() {\r\n\t\tArrayList<Integer> possibleColors = new ArrayList<Integer>();\r\n\t\tfor(int i = 1; i<=4; i++) {\r\n\t\t\tif(i!=colorType) { \r\n\t\t\t\tpossibleColors.add(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tcolorType = possibleColors.get((int) (Math.random()*3));\r\n\t\t\r\n\t}",
"protected abstract void updateShapeColor(Color color);",
"@Test\n public void getColor() {\n // Testing for Color Rectangle that mutates its Color and see the Color matches.\n assertEquals(defaultColor1, defaultShape1.getColor());\n Color newRectangleColor = new Color(33, 33, 33);\n defaultShape1 = new Rectangle(newRectangleColor, defaultPosition1, defaultSize1);\n assertEquals(newRectangleColor, defaultShape1.getColor());\n assertNotEquals(defaultColor1, defaultShape1.getColor());\n // Testing for OvalShape that mutates and see it matches.\n assertEquals(defaultColor2, defaultShape2.getColor());\n Color newOvalColor = new Color(15, 15, 15);\n defaultShape2 = new Oval(newOvalColor, defaultPosition2, defaultSize2);\n assertEquals(newOvalColor, defaultShape2.getColor());\n assertNotEquals(defaultColor2, defaultShape2.getColor());\n }",
"public boolean setLightForGroupingToGroup(LinkedList<Light> group) {\n Log.i(tag, \"setLightForGroupingToGroup\");\n if (group.contains(this.lightForGrouping)) {\n Log.i(tag, \"dropped into its own group, dont do anything\");\n } else {\n if ((this.lightForGrouping instanceof DreamScreen) && ((Light) group.get(0)).getGroupNumber() != 0) {\n Iterator it = group.iterator();\n while (true) {\n if (it.hasNext()) {\n if (((Light) it.next()) instanceof DreamScreen) {\n Toast.makeText(this, \"Warning, multiple DreamScreens in the same group may cause unexpected behavior.\", 1).show();\n break;\n }\n } else {\n break;\n }\n }\n }\n Iterator it2 = this.groups.iterator();\n while (it2.hasNext()) {\n ((LinkedList) it2.next()).remove(this.lightForGrouping);\n }\n this.lightForGrouping.setGroupName(((Light) group.get(0)).getGroupName(), false);\n this.lightForGrouping.setGroupNumber(((Light) group.get(0)).getGroupNumber(), false);\n if (this.lightForGrouping instanceof DreamScreen) {\n group.addFirst(this.lightForGrouping);\n } else {\n group.add(this.lightForGrouping);\n }\n if (this.currentLight == this.lightForGrouping && this.broadcastingToGroup) {\n setToolbarTitle();\n }\n for (int i = 0; i < this.groups.size(); i++) {\n if (i != 0 && ((LinkedList) this.groups.get(i)).isEmpty()) {\n this.groups.remove(i);\n Log.i(tag, \"removed group\");\n }\n }\n redrawDrawerLinearLayout();\n highlightDrawerSelection();\n if ((this.currentLight instanceof SideKick) || (this.currentLight instanceof Connect)) {\n Fragment currentFragment = getSupportFragmentManager().findFragmentById(R.id.frameLayout);\n if (currentFragment instanceof DreamScreenFragment) {\n Log.i(tag, \"redrawing currentLight sidekick dreamscreenfragment\");\n ((DreamScreenFragment) currentFragment).redrawFragment();\n }\n }\n }\n return true;\n }",
"private void shadeCountries() {\n \n for(Marker marker: countryMarkers) {\n String countryId = marker.getId();\n \n if(lifeExpMap.containsKey(countryId)) {\n float lifeExp = lifeExpMap.get(countryId);\n int colorLevel = (int) map(lifeExp, 40, 90, 10, 255);\n marker.setColor(color(255 - colorLevel, 100, colorLevel));\n } else {\n marker.setColor(color(150, 150, 150));\n }\n }\n }",
"public void fillColours() {\n this.colours = new String[4];\n this.colours[0] = \"diamonds\";\n this.colours[1] = \"hearts\";\n this.colours[2] = \"spades\";\n this.colours[3] = \"clubs\";\n }",
"public void onColorFetched(int[] colors, long albumId) {\n }",
"@Override\n public Object getGroup(int groupPosition) {\n return Grade[groupPosition];\n }",
"public Set<Colour> getWinningPlayers();",
"public Colour getColour();",
"@Override\n public Map<String,String> getMapGloablCommunityColor(){\n return icommunityColors.getMapGloablCommunityColor();\n }",
"Color userColorChoose();",
"private String decideFillColor(XmlTag group, XmlTag self) {\n String result = Configuration.getDefaultTint();\n\n XmlAttribute groupFill;\n if ((groupFill = group.getAttribute(\"fill\")) != null) {\n result = StdColorUtil.formatColor(groupFill.getValue());\n }\n\n XmlAttribute selfFill;\n if ((selfFill = self.getAttribute(\"fill\")) != null) {\n result = StdColorUtil.formatColor(selfFill.getValue());\n }\n\n XmlAttribute id = self.getAttribute(\"class\");\n String colorFromStyle;\n if (id != null && id.getValue() != null && (colorFromStyle = styleParser.getFillColor(id.getValue())) != null) {\n result = colorFromStyle;\n }\n\n return result;\n }",
"Object getGroupID(String groupName) throws Exception;",
"static void findGroups() {\n G2 = 0;\n while (group2()) {\n }\n\n // find group of size 3\n G3 = 0;\n while (group3()) {\n }\n }",
"private void manageGreenTargets(){\n int randGreenTarget = generator.nextInt(100);\n \n while(labelArray[randGreenTarget].getIcon()!=iconSet.getGrayIcon()){\n randGreenTarget = generator.nextInt(100);\n } \n labelArray[randGreenTarget].setIcon(iconSet.getGreenTargetIcon());\n\n if (greenTargetCounter<ACTIVE_GREEN_TARGET_TOTAL){\n activeGreenTarget[greenTargetCounter] = randGreenTarget;\n }\n\n if (greenTargetCounter>=ACTIVE_GREEN_TARGET_TOTAL){\n if(labelArray[activeGreenTarget[0]].getIcon()!=iconSet.getGrayIcon()){\n labelArray[activeGreenTarget[0]].setIcon(iconSet.getGrayIcon());\n }\n for(int i = 0; i < activeGreenTarget.length-1; i++){\n activeGreenTarget[i] = activeGreenTarget[i+1];\n }\n activeGreenTarget[ACTIVE_GREEN_TARGET_TOTAL-1] = randGreenTarget;\n }\n \n greenTargetCounter++;\n }",
"public static List<Color> getColorList(){\n EnumSet<Color> allColor = EnumSet.allOf(Color.class);\n //create a List from the Collection \n return new ArrayList<Color>(allColor);\n //the ArrayList takes a Collection as an argument\n }",
"public void initColors() {\n\n int i;\n float j;\n\n int start;\n int numShades = 5;\n float shadeInc = 1 / (float) numShades;\n\n\n aColors = new Color[glb.MAXCOLORS]; /* set array size */\n\n\n /* White to Black */\n start = 0;\n for (i = start, j = 1; i < start + 6; j -= shadeInc, i++) {\n aColors[i] = new Color(j, j, j);\n }\n\n start = 6;\n /* Red to almost Magenta */\n for (i = start, j = 0; i < start + 5; j += shadeInc, i++) {\n aColors[i] = new Color((float) 1, (float) 0, j);\n }\n\n\n /* Magenta to almost Blue */\n start += 5;\n for (i = start, j = 1; i < start + 5; j -= shadeInc, i++) {\n aColors[i] = new Color(j, (float) 0, (float) 1);\n }\n\n\n /* Blue to almost Cyan */\n start += 5;\n for (i = start, j = 0; i < start + 5; j += shadeInc, i++) {\n aColors[i] = new Color((float) 0, j, (float) 1);\n }\n\n /* Cyan to almost Green */\n start += 5;\n for (i = start, j = 1; i < start + 5; j -= shadeInc, i++) {\n aColors[i] = new Color((float) 0, (float) 1, j);\n }\n\n\n\n /* Green to almost Yellow */\n start += 5;\n for (i = start, j = 0; i < start + 5; j += shadeInc, i++) {\n aColors[i] = new Color(j, (float) 1, (float) 0);\n }\n\n /* Yellow to almost Red */\n start += 5;\n for (i = start, j = 1; i < start + 5; j -= shadeInc, i++) {\n aColors[i] = new Color((float) 1, j, (float) 0);\n }\n\n }",
"int getContactColor();",
"private void green(){\n\t\tthis.arretes_fG();\n\t\tthis.coins_fG();\n\t\tthis.coins_a1G();\n\t\tthis.coins_a2G();\n\t\tthis.aretes_aG();\n\t\tthis.cube[31] = \"G\";\n\t}",
"public List<ColorId> checkPlayersBasicMode ()\n {\n List<ColorId> players = new ArrayList<>();\n\n for (Player playerIterate : player.playerThatSee(player.getSquare().getGameBoard()))\n {\n if (playerIterate.getSquare() != player.getSquare())\n players.add(playerIterate.getColor());\n }\n return players;\n }",
"private static Set<Colour> players(Colour... colours) {\r\n\t\treturn new HashSet<>(asList(colours));\r\n\t}",
"public GameColor getColor();",
"public static void main(String[] args) {\n\t\t//Setting up some objects to test.\n\t\tColour[] four = new Colour[4];\n\t\tColour[] five = new Colour[5];\n\t\tColour[] six = new Colour[6];\n\t\t\n\t\tColour white = new Colour(\"#FFFFFF\");\n\t\tfour[0] = white;\n\t\tfive[0] = white;\n\t\tsix[0] = white;\n\t\tColour black = new Colour(\"#000000\");\n\t\tfour[1] = black;\n\t\tfive[1] = black;\n\t\tsix[1] = black;\n\t\tColour red = new Colour(\"#FF0000\");\n\t\tfour[2] = red;\n\t\tfive[2] = red;\n\t\tsix[2] = red;\n\t\tColour green = new Colour(\"#00FF00\");\n\t\tfour[3] = green;\n\t\tfive[3] = green;\n\t\tsix[3] = green;\n\t\tColour blue = new Colour(\"#0000FF\");\n\t\tfive[4] = blue;\n\t\tsix[4] = blue;\n\t\tColour bluegreen = new Colour(\"#00FFFF\");\n\t\tsix[5] = bluegreen;\n\t\t\n\t\t//Test that <5 objects can be added.\n\t\tCustomColourMap fourcolours = new CustomColourMap(four, \"Four\");\n\t\tSystem.out.println(\"Expected: No output.\");\n\t\tSystem.out.println();\n\t\t\n\t\t//Test that =5 objects can be added.\n\t\tCustomColourMap fivecolours = new CustomColourMap(five, \"Five\");\n\t\tSystem.out.println(\"Expected: No output.\");\n\t\tSystem.out.println();\n\t\t\n\t\t//Test that if >5 objects are added, it is acceptable.\n\t\tCustomColourMap sixcolours = new CustomColourMap(six, \"Six\");\n\t\tSystem.out.println(\"Expected: No output.\");\n\t\tSystem.out.println();\n\t\t\n\t\t//Test the getColour method.\n\t\tfor (int i=0; i<fivecolours.getMapSize(); i++) {\n\t\t\tSystem.out.print(fivecolours.GetColour(i).GetHex() + \" \");\n\t\t}\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Expected: #FFFFFF #000000 #FF0000 #00FF00 #0000FF\");\n\t\tSystem.out.println();\n\t\t\n\t\tfor (int i=0; i<sixcolours.GetMapSize(); i++) {\n\t\t\tSystem.out.print(sixcolours.GetColour(i).GetHex() + \" \");\n\t\t}\n\t\tSystem.out.println();\n\t\tSystem.out.println(\n\t\t\t\"Expected: #FFFFFF #000000 #FF0000 #00FF00 #0000FF #00FFFF\");\n\t\tSystem.out.println();\n\t\t\n\t\t//Test the setColour method.\n\t\tfor (int i=0; i<fivecolours.getMapSize(); i++) {\n\t\t\tfivecolours.SetColour(i, new Colour(\"#FFFFFF\"));\n\t\t}\n\t\tfor (int i=0; i<fivecolours.getMapSize(); i++) {\n\t\t\tSystem.out.print(fivecolours.GetColour(i).GetHex() + \" \");\n\t\t}\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Expected: #FFFFFF #FFFFFF #FFFFFF #FFFFFF #FFFFFF \");\n\t\tSystem.out.println();\n\t\t\n\t\t//Test the getMapSize method.\n\t\tSystem.out.println(fivecolours.getMapSize());\n\t\tSystem.out.println(\"Expected: Five\");\n\t\tSystem.out.println();\n\t\t\n\t\tSystem.out.println(sixcolours.GetMapSize());\n\t\tSystem.out.println(\"Expected: Six\");\n\t\tSystem.out.println();\n\t\t\n\t\t//Test the getNumber method.\n\t\tSystem.out.println(fivecolours.GetNumber());\n\t\tSystem.out.println(\"Expected: Five\");\n\t\tSystem.out.println();\n\t\t\n\t\tSystem.out.println(sixcolours.GetNumber());\n\t\tSystem.out.println(\"Expected: Six\");\n\t\tSystem.out.println();\n\t\n\t\n\t}",
"String getColour(int winningNumber);",
"Object getGroup(int groupPosition);",
"protected void groupBoardArea(){\n for (int i = 0; i < norseCityArea.getComponents().length; i++){\n if (norseCityArea.getComponent(i) instanceof JLabel){\n norseCity.add((JLabel)norseCityArea.getComponent(i));\n }\n }\n for (int i = 0; i < greekCityArea.getComponents().length; i++){\n if (greekCityArea.getComponent(i) instanceof JLabel){\n greekCity.add((JLabel)greekCityArea.getComponent(i));\n }\n }\n for (int i = 0; i < egyptCityArea.getComponents().length; i++){\n if (egyptCityArea.getComponent(i) instanceof JLabel){\n egyptCity.add((JLabel)egyptCityArea.getComponent(i));\n }\n }\n for (int i = 0; i < norseProductArea.getComponents().length; i++){\n if (norseProductArea.getComponent(i) instanceof JLabel){\n norseProduction.add((JLabel)norseProductArea.getComponent(i));\n }\n }\n for (int i = 0; i < greekProductArea.getComponents().length; i++){\n if (greekProductArea.getComponent(i) instanceof JLabel){\n greekProduction.add((JLabel)greekProductArea.getComponent(i));\n }\n }\n for (int i = 0; i < egyptProductArea.getComponents().length; i++){\n if (egyptProductArea.getComponent(i) instanceof JLabel){\n egyptProduction.add((JLabel)egyptProductArea.getComponent(i));\n }\n }\n }",
"private static Collection<Piece> getCorrectRedPieces() {\n\t\tfinal Collection<Piece> pieces = new ArrayList<Piece>();\n\t\tpieces.add(new Piece(PieceType.SERGEANT, PlayerColor.RED));\n\t\tpieces.add(new Piece(PieceType.SERGEANT, PlayerColor.RED));\n\t\tpieces.add(new Piece(PieceType.SERGEANT, PlayerColor.RED));\n\t\tpieces.add(new Piece(PieceType.LIEUTENANT, PlayerColor.RED));\n\t\tpieces.add(new Piece(PieceType.LIEUTENANT, PlayerColor.RED));\n\t\tpieces.add(new Piece(PieceType.LIEUTENANT, PlayerColor.RED));\n\t\tpieces.add(new Piece(PieceType.CAPTAIN, PlayerColor.RED));\n\t\tpieces.add(new Piece(PieceType.CAPTAIN, PlayerColor.RED));\n\t\tpieces.add(new Piece(PieceType.COLONEL, PlayerColor.RED));\n\t\tpieces.add(new Piece(PieceType.COLONEL, PlayerColor.RED));\n\t\tpieces.add(new Piece(PieceType.MARSHAL, PlayerColor.RED));\n\t\tpieces.add(new Piece(PieceType.FLAG, PlayerColor.RED));\n\t\treturn pieces;\n\t}",
"public String _setcirclecolor(int _nonvaluecolor,int _innercolor) throws Exception{\n_mcirclenonvaluecolor = _nonvaluecolor;\n //BA.debugLineNum = 61;BA.debugLine=\"mCircleFillColor = InnerColor\";\n_mcirclefillcolor = _innercolor;\n //BA.debugLineNum = 62;BA.debugLine=\"Draw\";\n_draw();\n //BA.debugLineNum = 63;BA.debugLine=\"End Sub\";\nreturn \"\";\n}",
"private void updateFamilyColorList(LinkedList<Integer> clonedList, int color) {\n\t\tupdateColorList(clonedList, color);\n\n\t\t// Update Color List in next\n\t\tif (this.getNextColorList().contains(color)) {\n\t\t\tif (this.getNext() != null) {\n\t\t\t\tthis.getNext().updateFamilyColorList(clonedList, color);\n\t\t\t}\n\t\t\tthis.setNextColorlist(this.getNext().getCopyOfNextColorList());\n\t\t\tif (!this.getNextColorList().contains(\n\t\t\t\t\tthis.getNext().getColor())) {\n\t\t\t\tthis.getNextColorList().add(this.getNext().getColor());\n\t\t\t}\n\t\t}\n\t}",
"public abstract void tellColorList(ArrayList<String> colors);",
"@Override\n public int hashCode() {\n return Objects.hash(color,id);\n }",
"public void refreshColorPanel() {\n if (quickPaintAnnotationButton != null) {\r\n quickPaintAnnotationButton.refreshColorPanel();\r\n }\r\n\r\n colorFilterMenuItem.removeAll();\r\n // build colour submenu based on colour labels\r\n ButtonGroup filterColorMenuGroup = new ButtonGroup();\r\n JCheckBoxMenuItem filterColorAllMenuItem = new JCheckBoxMenuItem();\r\n filterColorAllMenuItem.setAction(new FilterColorAction(\r\n messageBundle.getString(\"viewer.utilityPane.markupAnnotation.toolbar.filter.option.byColor.all.label\"),\r\n null));\r\n colorFilterMenuItem.add(filterColorAllMenuItem);\r\n filterColorMenuGroup.add(filterColorAllMenuItem);\r\n ArrayList<DragDropColorList.ColorLabel> colorLabels = DragDropColorList.retrieveColorLabels();\r\n int defaultColor = preferences.getInt(ViewerPropertiesManager.PROPERTY_ANNOTATION_FILTER_COLOR_COLUMN, -1);\r\n JCheckBoxMenuItem filterColorMenuItem;\r\n if (colorLabels.size() > 0) {\r\n for (DragDropColorList.ColorLabel colorLabel : colorLabels) {\r\n filterColorMenuItem = new JCheckBoxMenuItem();\r\n FilterColorAction sortAction = new FilterColorAction(\r\n colorLabel.getLabel(),\r\n colorLabel.getColor());\r\n filterColorMenuItem.setAction(sortAction);\r\n colorFilterMenuItem.add(filterColorMenuItem);\r\n filterColorMenuGroup.add(filterColorMenuItem);\r\n if (defaultColor != -1 && defaultColor == sortAction.getColorRGB()) {\r\n filterColorMenuItem.setSelected(true);\r\n filterColorAction = sortAction;\r\n }\r\n }\r\n }\r\n if (defaultColor == -1) {\r\n filterColorAllMenuItem.setSelected(true);\r\n filterColorAction = filterColorAllMenuItem.getAction();\r\n }\r\n }",
"public Piece.color getColor() { return color; }",
"public List<Colour> getPlayerList();",
"private List<Group> groupsFromIdsOrRefs(String siteId, Collection<String> groups, Function<Group, String> accessor)\n\t{\n\t\ttry\n\t\t{\n\t\t\treturn siteService.getSite(siteId).getGroups().stream().filter(g -> groups.contains(accessor.apply(g))).collect(Collectors.toList());\n\t\t}\n\t\tcatch (IdUnusedException e)\n\t\t{\n\t\t\tlog.error(\"Group lookup failed. Unable to find site for id {}\", siteId);\n\t\t\treturn Collections.emptyList();\n\t\t}\n\t}",
"public abstract Color getRegionColor(double[] offset, double[] size);",
"abstract String getColor();",
"@Override\n\tpublic void setColour(float r, float g, float b) {\n\n\t}",
"private Color getBrickColour(int brickColor){\n switch (brickColor) {\n case 0 -> { // I piece\n return Color.rgb(89,185,215);\n }\n case 1 -> { // O piece\n return Color.rgb(232,224,105);\n }\n case 2 -> { // T piece\n return Color.rgb(130,120,210);\n }\n case 3 -> { // S piece\n return Color.rgb(59,206,156);\n }\n case 4 -> { // Z piece\n return Color.rgb(227,38,54);\n }\n case 5 -> { // J piece\n return Color.rgb(34,68,145);\n }\n case 6 -> { // L piece\n return Color.rgb(255,183,51);\n }\n default -> {\n return Color.BLACK;\n }\n }\n }",
"private void handleFindByColor(String[] args) {\n if (args.length < 3) {\n String requiredArgs = \"<color>\";\n Messages.badNumberOfArgsMessage(args.length, FIND_BY_COLOR_OPERATION, requiredArgs);\n System.exit(1);\n }\n\n Color color = null;\n String stringColor = args[2];\n try {\n color = Color.parseColor(stringColor);\n } catch (IllegalArgumentException e) {\n // in case of unsupported color, print all supported colors and end here\n Messages.printAllColors();\n System.exit(1);\n }\n\n\n Client client = ClientBuilder.newBuilder().build();\n WebTarget webTarget = client.target(\"http://localhost:8080/pa165/rest/bricks\").queryParam(\"color\", color.getColorString());\n webTarget.register(auth);\n Invocation.Builder invocationBuilder = webTarget.request(MediaType.APPLICATION_JSON);\n invocationBuilder.header(\"accept\", MediaType.APPLICATION_JSON);\n\n\n Response response = invocationBuilder.get();\n\n\n if (response.getStatus() == Response.Status.OK.getStatusCode()) {\n List<BrickDto> brickDtoList = response.readEntity(new GenericType<List<BrickDto>>() {\n });\n\n System.out.println(\"Number of bricks returned: \" + brickDtoList.size());\n for (BrickDto b : brickDtoList) {\n System.out.println(b);\n }\n } else {\n System.out.println(\"Server error - Error code: \" + response.getStatus());\n }\n }",
"public void RGB_Mix(View view) {\r\n int [] color= {0,0,0};\r\n\r\n adb= new AlertDialog.Builder(this);\r\n adb.setCancelable(false);\r\n adb.setTitle(\"Core Colors Mix\");\r\n adb.setMultiChoiceItems(colors, null, new DialogInterface.OnMultiChoiceClickListener() {\r\n @Override\r\n public void onClick(DialogInterface dialog, int which, boolean isChecked) {\r\n if(isChecked) color[which]=255;\r\n else if(color[which]==255) color[which]=0;\r\n }\r\n });\r\n adb.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\r\n @Override\r\n public void onClick(DialogInterface dialog, int which) {\r\n lL.setBackgroundColor(Color.rgb(color[0],color[1],color[2]));\r\n\r\n }\r\n });\r\n adb.setNegativeButton(\"Exit\", new DialogInterface.OnClickListener() {\r\n @Override\r\n public void onClick(DialogInterface dialog, int which) {\r\n\r\n }\r\n });\r\n AlertDialog ad=adb.create();\r\n ad.show();\r\n }",
"private int checkGreenColorProduct() {\r\n if (product == null) {\r\n return -1;\r\n } else {\r\n if (!product.isSafeFood()) {\r\n return Color.RED;\r\n }\r\n if (userHalal && !product.isHalal() || userKashir && !product.isKashir() ||\r\n userVegetarian && !product.isVegetarian() || userVegan && !product.isVegan()) {\r\n return Color.RED;\r\n }\r\n if (userSoy && product.isSoy() || userFish && product.isFish() ||\r\n userEggs && product.isEggs() || userGluten && product.isGluten() ||\r\n userLactose && product.isLactose() || userNuts && product.isNuts()) {\r\n return Color.RED;\r\n }\r\n return Color.GREEN;\r\n }\r\n }",
"boolean changeColor(Color newColor){\n boolean change=false;\r\n\r\n if (fShapes.size() > 0) {\r\n Iterator iter = fShapes.iterator();\r\n\r\n while (iter.hasNext()) {\r\n TShape theShape = (TShape) iter.next();\r\n\r\n if (theShape.getSelected()) {\r\n theShape.setColor(newColor);\r\n change = true;\r\n }\r\n }\r\n }\r\n\r\n if (!change){\r\n TShape prototype=fPalette.getPrototype();\r\n\r\n if (prototype!=null)\r\n prototype.setColor(newColor);\r\n fPalette.repaint(); // no listeners for change in the palette\r\n }\r\n\r\n return\r\n change; // to drawing itself\r\n }",
"protected void fillGroup(Group cdmparent, DapGroup dapparent, NetcdfFile ncfile) throws DapException {\n for (DapDimension dim : dapparent.getDimensions()) {\n if (!dim.isShared())\n continue; // anonymous\n createDimension(dim, cdmparent);\n }\n\n // Create enums in this group\n for (DapEnumeration dapenum : dapparent.getEnums()) {\n DapType basetype = dapenum.getBaseType();\n DataType cdmbasetype = CDMTypeFcns.enumTypeFor(basetype);\n Map<Integer, String> map = new HashMap<Integer, String>();\n List<String> ecnames = dapenum.getNames();\n for (String ecname : ecnames) {\n DapEnumConst value = dapenum.lookup(ecname);\n map.put(value.getIntValue(), ecname);\n }\n\n EnumTypedef cdmenum = new EnumTypedef(dapenum.getShortName(), map, cdmbasetype);\n this.nodemap.put(cdmenum, dapenum);\n cdmparent.addEnumeration(cdmenum);\n }\n\n // Create variables\n for (DapVariable var : dapparent.getVariables()) {\n createVar(var, ncfile, cdmparent, null);\n }\n\n // Create subgroups\n for (DapGroup subgroup : dapparent.getGroups()) {\n createGroup(subgroup, cdmparent, ncfile);\n }\n\n // Create group level attributes\n for (Map.Entry<String, DapAttribute> entry : dapparent.getAttributes().entrySet()) {\n DapAttribute attr = entry.getValue();\n Attribute cdmattr = createAttribute(attr);\n cdmparent.addAttribute(cdmattr);\n }\n }",
"public void randomizeCategory() {\n this.group = (int) (3*Math.random()+1);\n }",
"@Test\r\n public void testTrivialReplacement(){\r\n List<Tone> palette = Arrays.asList(new Tone(new Color(200,10,10)),\r\n new Tone(new Color(10,200,10)),\r\n new Tone(new Color(10,10,200)));\r\n\r\n BufferedImage image = ImageFileUtils.loadImageResource(\"/sampleImages/geometric/redBlueQuarter.png\");\r\n\r\n PaletteReplacer replacer = new PaletteReplacer();\r\n\r\n BufferedImage result = replacer.replace(image, palette);\r\n\r\n PaletteDistribution analysis = new Palettester().analyseAllColors(result);\r\n\r\n assertEquals(2, analysis.byCount().size());\r\n assertEquals(palette.get(0), analysis.byCount().get(0).getTone());\r\n assertEquals(palette.get(2), analysis.byCount().get(1).getTone());\r\n }",
"void setColorSelection() {\r\n for (int i = 0; i < chooser.length; i++) {\r\n\r\n if (mainclass.getGraphTyp()\r\n == AbstractGraph.GRAPHTYP_RESIDUAL) {\r\n\r\n switch (i) {\r\n case COLOR_EDGE_ONE:\r\n chooser[i].setColorSelected(colors[COLOR_EDGE_FLOW]);\r\n break;\r\n case COLOR_EDGE_TWO:\r\n chooser[i].setColorSelected(colors[COLOR_EDGE_CAP]);\r\n break;\r\n case COLOR_EDGE_TOP:\r\n chooser[i].setColorSelected(colors[COLOR_EDGE_RTOP]);\r\n break;\r\n default:\r\n chooser[i].setColorSelected(colors[i]);\r\n }\r\n } else {\r\n chooser[i].setColorSelected(colors[i]);\r\n }\r\n }\r\n }",
"boolean groupSupports(Object groupID, int groupConstant) throws Exception;",
"Map<String, String> styles(String group);",
"public void setSeasonGroups(final SessionContext ctx, final Set<SeasonGroup> value)\r\n\t{\r\n\t\tsetLinkedItems( \r\n\t\t\tctx,\r\n\t\t\ttrue,\r\n\t\t\tSslCoreConstants.Relations.DBS2SEASONGROUPRELATION,\r\n\t\t\tnull,\r\n\t\t\tvalue,\r\n\t\t\tfalse,\r\n\t\t\tfalse,\r\n\t\t\tUtilities.getMarkModifiedOverride(DBS2SEASONGROUPRELATION_MARKMODIFIED)\r\n\t\t);\r\n\t}",
"public void config(Group[] group) {\n\n }",
"public static List<KirolakObject> listByGroup(Group group)\n\t{\n\t\tSession session = HibernateUtil.getSessionFactory().getCurrentSession();\n\t\tList<KirolakObject> items = session.createQuery(\"from Round r where r.compositeId.group = :group\").setParameter(\"group\", group).list();\n\t\tIterator<KirolakObject> iterator = items.iterator();\n\t\twhile(iterator.hasNext())\n\t\t{\n\t\t\tRound round = (Round)iterator.next();\t\t\t\t\n\t\t\tround.setMatches(MatchDAO.listByRound(round));\n\t\t}\n\t\treturn items;\n\t}",
"abstract public String getColor();",
"abstract public String getColor();",
"protected HashMap<String,Color> addColors() {\n\t\tHashMap<String,Color> colorChoices = new HashMap<String,Color>();\n\t\tcolorChoices.put(\"RED\", Color.RED);\n\t\tcolorChoices.put(\"BLUE\", Color.BLUE);\n\t\tcolorChoices.put(\"BLACK\", Color.BLACK);\n\t\treturn colorChoices;\n\t}",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }",
"public Group getGroup() { return cGroup; }"
] | [
"0.5540466",
"0.5509721",
"0.5465501",
"0.5420886",
"0.53967434",
"0.53845835",
"0.5370263",
"0.53118813",
"0.5288479",
"0.52687645",
"0.52222764",
"0.518197",
"0.51771253",
"0.5156046",
"0.51400805",
"0.5135833",
"0.51313436",
"0.5124815",
"0.5110362",
"0.51103175",
"0.50894433",
"0.50843614",
"0.50820696",
"0.50788033",
"0.50732255",
"0.50666356",
"0.50635004",
"0.5063271",
"0.50573",
"0.5050102",
"0.50457674",
"0.5037357",
"0.5034692",
"0.50202733",
"0.5014063",
"0.5012015",
"0.50043726",
"0.5003364",
"0.5002202",
"0.49942452",
"0.49901393",
"0.49769074",
"0.4976165",
"0.49643376",
"0.49583012",
"0.49564382",
"0.49495435",
"0.49494514",
"0.49445418",
"0.4931796",
"0.49205872",
"0.49141496",
"0.49001557",
"0.48999497",
"0.489202",
"0.48912746",
"0.48828986",
"0.4877579",
"0.4875005",
"0.48658833",
"0.4859535",
"0.48563454",
"0.4850426",
"0.48464555",
"0.48451594",
"0.48419157",
"0.48389348",
"0.48312065",
"0.482748",
"0.48267594",
"0.4823711",
"0.48205122",
"0.48205122",
"0.4820294",
"0.48193148",
"0.48193148",
"0.48193148",
"0.48193148",
"0.48193148",
"0.48193148",
"0.48193148",
"0.48193148",
"0.48193148",
"0.48193148",
"0.48193148",
"0.48193148",
"0.48193148",
"0.48193148",
"0.48193148",
"0.48193148",
"0.48193148",
"0.48193148",
"0.48193148",
"0.48193148",
"0.48193148",
"0.48193148",
"0.48193148",
"0.48193148",
"0.48193148",
"0.48193148"
] | 0.53948945 | 5 |
METHODS DEALING WITH RENT | public int getRent()
{
int rent;
if(numBuildings == 0 && super.getOwner().isGroupOwner(this))
{
rent = rentTable[0];
}
else if(numBuildings == 0 && super.getOwner().isGroupOwner(this))
{
rent = 2*rentTable[0];
}
else
{
rent = rentTable[numBuildings];
}
return rent;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void recount();",
"public int rent() {\n\t\treturn 0;\n\t}",
"public void rentDVD()\n\t{\n\t\tif (avail >0 )\n\t\t{\n\t\t\tavail--;\n\t\t\trented++;\n\t\t}\n\t\t\t\n\t\t\n\t}",
"public abstract int getCntRod();",
"int getReaultCount();",
"public abstract void setCntRod(int cntRod);",
"@Override\n\tpublic void rent() {\n\t\tcontactLandlord();\n\t\tli.rent();\n\t\tchargeAgency();\n\t}",
"@Override\n\tpublic int religioncount() throws Exception {\n\t\treturn dao.religioncount();\n\t}",
"public int checkNoOfRapelPlayerHolds () { return noOfRapels; }",
"protected BigDecimal reword(){\n\t\tif(getNowAct() == 0){\n\t\t\treturn(rewordBuy());\n\t\t}\n\t\t//keep\n\t\telse if(getNowAct() == 1){\n\t\t\treturn(rewordWait());\n\t\t}\n\t\t//sell\n\t\telse if(getNowAct() == 2){\n\t\t\treturn(rewordSell());\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"getNowAct : \" + getNowAct() + \"\\nerror occur.\");\n\t\t\tSystem.exit(2);\n\t\t\treturn(null);\n\t\t}\n\t}",
"public abstract int selfExplodingKittenDrawn();",
"public abstract int getCntPrepaid();",
"int getRepeatCount();",
"public abstract int preN();",
"public void increaseRepDegree() {\r\n\t\tactualRepDegree++;\r\n\r\n\t}",
"public void decrementRechargeTimes();",
"public int rodCount ();",
"private void increaseAttempts() {\n attempts++;\n }",
"@Override\r\n\tpublic int getRent() {\n\t\tint rent = 0;\r\n\t\tif (owner != null) {// if the instance is owned, the rent is calculated.\r\n\t\t\trent = cup.roll() * baseRent * owner.ownedTypes(this);// Gets a roll\r\n\t\t}\r\n\t\treturn rent;\r\n\t}",
"void sendRetryMessage(int retryNo);",
"void doRetry();",
"@Test\n public void testCanRetry() {\n assertEquals(0, rc.getAttempts());\n assertTrue(rc.attempt());\n assertEquals(1, rc.getAttempts());\n assertTrue(rc.attempt());\n assertEquals(2, rc.getAttempts());\n assertTrue(rc.attempt());\n assertEquals(3, rc.getAttempts());\n assertFalse(rc.attempt());\n assertEquals(3, rc.getAttempts());\n assertFalse(rc.attempt());\n assertEquals(3, rc.getAttempts());\n assertFalse(rc.attempt());\n assertEquals(3, rc.getAttempts());\n }",
"@Override \n\tpublic int modifyRentPort(RentPort rentPort) {\n\t\treturn 0;\n\t}",
"@Override\n public void onRetry ( int retryNo){\n }",
"@Override\n public void onRetry ( int retryNo){\n }",
"@Override\n public void onRetry ( int retryNo){\n }",
"public int retry() {\r\n\t\treturn ++retryCount;\r\n\t}",
"int getTries();",
"int getRealtorNumCnt(RealtorDTO realtorDTO);",
"public void incrementRetryCount() {\n this.retryCount++;\n }",
"public int getRemaining(){\n\t\treturn count+1;\n\t}",
"static void perform_rnc(String passed){\n\t\tint type = type_of_rnc(passed);\n\t\tswitch(type){\n\t\tcase 1:\n\t\t\treturn_not_carry(passed);\n\t\t\tbreak;\n\t\t}\n\t}",
"@Override\r\n\tpublic void iterateCount() {\n\t\t\r\n\t}",
"public void increseReplyCount() {\n\r\n\t}",
"public void recuperarNumReg() throws BaseDeDatosExcepcion, ConexionExcepcion {\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(\"recuperarNumReg() - start\");\n\t\t}\n\n\t\tnumRegistro--;\n\t\tMediadorBD.actualizarRegistroCaja(numRegistro);\n\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(\"recuperarNumReg() - end\");\n\t\t}\n\t}",
"public int setInactiveForNoRebill();",
"int getRetries();",
"private int rankMethod()\r\n {\r\n\treturn spinTheWheel();\r\n }",
"@Override\n\tpublic void msgRentIsDue(Lord l, double rent) {\n\t\t\n\t}",
"public int getTotRuptures();",
"protected Reaction() {/* intentionally empty block */}",
"@Override\n public void onRetry(int retryNo) {\n }",
"@Override\n public void onRetry(int retryNo) {\n }",
"@Override\n public void onRetry(int retryNo) {\n }",
"@Override\n public void onRetry(int retryNo) {\n }",
"@Override\n public void onRetry(int retryNo) {\n }",
"@Override\n public void onRetry(int retryNo) {\n }",
"@Override\n public void onRetry(int retryNo) {\n }",
"@Override\n public void onRetry(int retryNo) {\n }",
"@Override\n public void onRetry(int retryNo) {\n }",
"@Override\n protected int getNumRepetitions() {\n return 1;\n }",
"public void restarAlInventario(int cantidad) {\n\t\tint aux=this.cantidad - cantidad;\n\t\tif(aux>=0) {\n\t\t\tthis.cantidad = aux;\n\t\t}else {\n\t\t\tthis.cantidad = 0;\n\t\t}\n\t}",
"protected int getRecyleCount()\r\n {\r\n return this.recycleCnt;\r\n }",
"@Override\n\tpublic void count() {\n\t\t\n\t}",
"private int cantFantasmasRestantes() {\n // TODO implement here\n return 0;\n }",
"@Override\n public void onRetry(int retryNo) {\n super.onRetry(retryNo);\n // 返回重试次数\n }",
"protected long miss() {\n return numMisses.incrementAndGet();\n }",
"@Override\r\n public void onRetry(int retryNo) {\n }",
"@Override\r\n public void onRetry(int retryNo) {\n }",
"@Override\r\n public void onRetry(int retryNo) {\n }",
"public int GetResends() { return resends; }",
"Status setWornCount();",
"public int getNumberOfRestraunts(){\n \n return numberOfRestraunts; \n }",
"@Override\r\n public void onRetry(int retryNo) {\n }",
"public void decRetryCount() {\n\t\tint cont = getRetryCount(); \n\t\tif (cont > 0) cont--;\n\t\tsetRetryCount(cont);\n\t}",
"public void incCount() { }",
"public int getSubstanceLotNumberReps() {\r\n \treturn this.getReps(15);\r\n }",
"@Override\n public void onRetry(int retryNo) {\n }",
"public int check(){\r\n\r\n\treturn count ++;\r\n\t\r\n}",
"void incrementCount();",
"public abstract int getSelfCount();",
"int reps() {\n\tint b[] = new int[64];\n\tint c = 0; /*\n\t* count of squares that are different from the current\n\t* position\n\t*/\n\tint r = 0; /* number of repetitions */\n\n\t/* is a repetition impossible? */\n\tif (fifty <= 3)\n\treturn 0;\n\n\t/* loop through the reversible moves */\n\tfor (int i = hply - 1; i >= hply - fifty - 1; --i) {\n\tif (++b[histDat[i].m.getFrom()] == 0)\n\t--c;\n\telse\n\t++c;\n\tif (--b[histDat[i].m.getTo()] == 0)\n\t--c;\n\telse\n\t++c;\n\tif (c == 0)\n\t++r;\n\t}\n\n\treturn r;\n\t}",
"public void checkRecorders(PropFinder finder, SensorCrum scrum) {\n\tthrow new SubclassResponsibilityException();\n/*\nudanax-top.st:9576:OrglRoot methodsFor: 'backfollow'!\n{void} checkRecorders: finder {PropFinder} \n\twith: scrum {SensorCrum | NULL}\n\t\"check any recorders that might be triggered by a change in the stamp\"\n\t\n\tself subclassResponsibility!\n*/\n}",
"protected void restockItem(int x){\r\n this.level += x;\r\n }",
"public void resetMissedCallsCount();",
"@Override\r\n public void onRetry(int retryNo) {\n }",
"public void reinforce(int numTroops){\n inGameInvariant();\n this.troops += numTroops;\n inGameInvariant();\n }",
"int remains();",
"public abstract void rebalance();",
"Integer totalRetryAttempts();",
"protected void subirDeNivel(int n) //A cada 100 de xp, sobe de nivel\n {\n this.nivel = nivel + n;\n }",
"public abstract int getCntOther();",
"public void countdown(Topology tp, Node node)\n {\n index[x] = node.getID();\n x++;\n if (x > 1)\n {\n rmlink(tp);\n }\n }",
"private int incrementarNumReg() throws BaseDeDatosExcepcion, ConexionExcepcion {\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(\"incrementarNumReg() - start\");\n\t\t}\n\n\t\tnumRegistro++;\n\t\tMediadorBD.actualizarRegistroCaja(numRegistro);\n\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(\"incrementarNumReg() - end\");\n\t\t}\n\t\treturn numRegistro;\n\t}",
"static void perform_rp(String passed){\n\t\tint type = type_of_rp(passed);\n\t\tswitch(type){\n\t\tcase 1:\n\t\t\treturn_not_sign(passed);\n\t\t\tbreak;\n\t\t}\n\t}",
"@Test\n public void testResetAndCanRetry() {\n assertTrue(rc.attempt());\n assertTrue(rc.attempt());\n assertTrue(rc.attempt());\n rc.reset();\n\n assertTrue(rc.attempt());\n assertTrue(rc.attempt());\n assertTrue(rc.attempt());\n assertFalse(rc.attempt());\n assertFalse(rc.attempt());\n assertFalse(rc.attempt());\n }",
"private void toRent() {\n }",
"@Override\npublic boolean retry(ITestResult result) {\n\tif(minretryCount<=maxretryCount){\n\t\t\n\t\tSystem.out.println(\"Following test is failing====\"+result.getName());\n\t\t\n\t\tSystem.out.println(\"Retrying the test Count is=== \"+ (minretryCount+1));\n\t\t\n\t\t//increment counter each time by 1 \n\t\tminretryCount++;\n\n\t\treturn true;\n\t}\n\treturn false;\n}",
"protected int incModCount() {\n\n if (LOG.isDebugEnabled()) {\n\n Throwable trace = new Throwable(\"Stack Trace\");\n StackTraceElement elements[] = trace.getStackTrace();\n\n Logging.logCheckedDebug(LOG,\"Modification #\" + (getModCount() + 1) + \" to PeerAdv@\" + Integer.toHexString(System.identityHashCode(this))\n + \" caused by : \" + \"\\n\\t\" + elements[1] + \"\\n\\t\" + elements[2]);\n\n }\n\n return modCount.incrementAndGet();\n }",
"public int restarCantidadPastillas(){\n\t\treturn cantidadPastillas--;\n\t}",
"public void incrementRefusals() {\n\t}",
"private void incrNegativeCount(){\n m_NegativeCount++;\n }",
"private Double redo(Double N) {\n return (Math.rint(N * 100) / 100);\n }",
"@Override\n\t\tpublic boolean isRetry() { return true; }",
"public RXR insertRXR(int rep) throws HL7Exception { \r\n return (RXR)super.insertRepetition(\"RXR\", rep);\r\n }",
"@Override\n public int getRent() {\n int total = 0;\n for (Property P : this.owner.getProperties()) {\n if (P.group_color.equals(this.group_color)) {\n total++;\n }\n }\n if (total == 2) {\n return RENT * 2;\n }\n else if (total == 3) {\n return RENT * 3;\n }\n else if (total == 4) {\n return RENT * 4;\n }\n else {\n return RENT;\n }\n }",
"int readRepetitionCount();",
"public void incrementAmount() { amount++; }",
"public void rollbackNumTransaccion() {\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(\"rollbackNumTransaccion() - start\");\n\t\t}\n\n\t\tnumTrBloqueado = false;\n\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(\"rollbackNumTransaccion() - end\");\n\t\t}\n\t}",
"@Override\n\tpublic boolean isRented() {\n\t\treturn false;\n\t}",
"public static void rendezvous (String condition, int N) {\n BValue cond;\n IValue iv;\n String name = \"RV_\"+condition;\n\n /* get the condition */\n\n synchronized (conditions) {\n cond = (BValue)conditions.get (name);\n if (cond == null) {\n /* we are first caller */\n if (N < 2) {\n throw new RuntimeException (\"rendezvous must be called with N >= 2\");\n }\n cond = new BValue ();\n conditions.put (name, cond);\n iv = new IValue (N-1);\n rv.put (name, iv);\n } else {\n /* already initialised, just decrement the counter */\n iv = (IValue) rv.get (name);\n iv.v --;\n }\n }\n\n if (iv.v > 0) {\n waitForCondition (name);\n } else {\n setCondition (name);\n synchronized (conditions) {\n clearCondition (name);\n rv.remove (name);\n }\n }\n }"
] | [
"0.657789",
"0.6380826",
"0.6214366",
"0.6200482",
"0.6097476",
"0.593292",
"0.5782775",
"0.5717361",
"0.56137884",
"0.5603909",
"0.5573094",
"0.55293006",
"0.5517813",
"0.54864365",
"0.54815876",
"0.54758316",
"0.54746133",
"0.5467462",
"0.54608804",
"0.5452809",
"0.54240775",
"0.5417243",
"0.54040885",
"0.53987163",
"0.53987163",
"0.53987163",
"0.53960454",
"0.5382429",
"0.537499",
"0.53726506",
"0.5359884",
"0.5342327",
"0.5337512",
"0.53332496",
"0.5309963",
"0.53095245",
"0.5307653",
"0.5286715",
"0.52680176",
"0.526572",
"0.5245467",
"0.52409226",
"0.52409226",
"0.52409226",
"0.52409226",
"0.52409226",
"0.52409226",
"0.52409226",
"0.52409226",
"0.52409226",
"0.5240712",
"0.52391326",
"0.5238773",
"0.5238202",
"0.52373487",
"0.52289206",
"0.52247024",
"0.52220774",
"0.52220774",
"0.52220774",
"0.5220271",
"0.521865",
"0.52095085",
"0.52047944",
"0.52038777",
"0.5203605",
"0.52004135",
"0.52001786",
"0.52000797",
"0.51977",
"0.5183506",
"0.5180795",
"0.51801026",
"0.51767075",
"0.51712507",
"0.51712096",
"0.5167786",
"0.51611316",
"0.51600504",
"0.5143776",
"0.51390254",
"0.5137881",
"0.51298463",
"0.5125239",
"0.51229286",
"0.51180375",
"0.51149684",
"0.5105494",
"0.51043826",
"0.5100381",
"0.5096658",
"0.50864565",
"0.50820744",
"0.5075258",
"0.5071842",
"0.50717956",
"0.50706536",
"0.506841",
"0.5064095",
"0.5062266",
"0.50617427"
] | 0.0 | -1 |
Construct a Temporal object. | protected Temporal(final Node n) throws RIFCSException {
super(n, Constants.ELEMENT_TEMPORAL);
initStructures();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Geotemporal() {\n }",
"public Timestamp() {\n makeNow();\n }",
"public static UsuarioTemporal getUsuarioTemporal(){\n UsuarioTemporal usuarioTemporal = new UsuarioTemporal();\n usuarioTemporal.setCorreo(\"[email protected]\");\n usuarioTemporal.setNombre(\"Gerente\");\n usuarioTemporal.setApellido1(\"Apellido1\");\n usuarioTemporal.setApellido2(\"Apellido2\");\n usuarioTemporal.setTelefono(\"11111111\");\n usuarioTemporal.setContrasena(\"$2a$10$gJ0hUnsEvTp5zyBVo19IHe.GoYKkL3Wy268wGJxG5.k.tUFhSUify\");\n usuarioTemporal.setFoto(\"foto\");\n usuarioTemporal.setIdGrupo(\"Cliente\");\n return usuarioTemporal;\n }",
"public Timestamp() {}",
"public TimeStamp(){\n\t\tdateTime = LocalDateTime.now();\n\t}",
"public CtRecord() {\n fill(0, MODES.CHRONO, false, false, false, false, null, null, TIME_DEFAULT_VALUE, TIME_DEFAULT_VALUE, TIME_DEFAULT_VALUE, TIME_DEFAULT_VALUE, TIME_DEFAULT_VALUE, getMidnightTimeMillis());\n }",
"public PeriodicityBean() {\n\t\twhen = from = to = null;\n\t\tperiodicity = \"\";\n\t}",
"public Timestamp() {\n crtime = System.currentTimeMillis() ;\n }",
"public DateTime() {\n this((BusinessObject) null);\n }",
"LogicExpression getTemporal();",
"public TTau() {}",
"private Moment() {}",
"public DateTime() {\n setCharacteristic(null);\n setYear(1582);\n setMonth(0);\n setDay(1);\n setHours(0);\n setMinutes(0);\n setSeconds(0);\n }",
"protected abstract T create(final double idealStartTime);",
"@NonNull\n Tomato newTomato(long startTime, long endTime);",
"public TimeConstraint() {\n\t\t// Start of user code constructor for TimeConstraint)\n\t\tsuper();\n\t\t// End of user code\n\t}",
"public CmsPeriodicalTVORowImpl() {\n }",
"public TemporalStateNode(){ \n\t\t\tchilds=new HashMap<String,TemporalStateNode>();\n\t\t\t//transitions=new HashMap<StateNode,Transition>();\n\t\t\t//transitions=new HashSet<Transition>();\n\t\t\tstates=new ArrayList<TemporalState>();\n\t\t\t//state=new State();\n\t\t\t//state=null;\n\t\t}",
"TT createTT();",
"public static AbsTime factory(AbsTime t)\n {\n // The value to return.\n AbsTime result;\n\n if (t.isASAP() || t.isNEVER()) {\n // No need to make a new object.\n result = t;\n } else {\n // Not a special case. Make a new object.\n result = new AbsTime(t);\n }\n\n return result;\n }",
"protected Time() {\n\t}",
"private Person()\r\n\t{\r\n\t\tsuper();\r\n\t\t//created = LocalDateTime.now();\r\n\t\tcreated = Calendar.getInstance().getTime();\r\n\t}",
"private TimeUtil() {}",
"public TransactionTimestamp() {\n\t\tlatestTimestamp = new AtomicLong(0);\n\t}",
"public TimeSeriesTally() {\n\tsuper();\n\tfPrevTime = 0.0;\n }",
"public PeriodFactoryImpl() {\n\t\tsuper();\n\t}",
"TimerType createTimerType();",
"InstantDt createHistoryToTimestamp() {\n\t\treturn InstantDt.withCurrentTime();\n\t}",
"void create(T t);",
"public ToUseTimeLineFactoryImpl() {\n\t\tsuper();\n\t}",
"TimeConstant createTimeConstant();",
"public LocalDateTime getTempoInit() {\n return tempoInit;\n }",
"public static AbsTime factory() throws Time.Ex_TimeNotAvailable\n {\n return new AbsTime();\n }",
"private TimestampUtils(){}",
"public CampLease( ) {}",
"CompositionBuilder<T> setTempo(int tempo);",
"public DateTime(\n int year,\n int month,\n int day,\n int hours,\n int minutes,\n int seconds,\n BluetoothGattCharacteristic characteristic) {\n setCharacteristic(characteristic);\n setYear(year);\n setMonth(month);\n setDay(day);\n setHours(hours);\n setMinutes(minutes);\n setSeconds(seconds);\n }",
"public Time() {\n this(System.currentTimeMillis());\n }",
"public Trabajo(Trabajador t, Servicio s, Oficio o, Instant fi) {\n\t\tthis.trabajador = t;\n\t\tthis.servicio = s;\n\t\tthis.oficio = o;\n\t\tthis.fechaInicio = fi;\n\t\tthis.fechaFinal = null;\n\t}",
"public TimeTravel() {\r\n\t\t}",
"Udt createUdt();",
"AtomicData createAtomicData();",
"public DateTime(\n int year,\n int month,\n int day,\n int hours,\n int minutes,\n int seconds) {\n setCharacteristic(null);\n setYear(year);\n setMonth(month);\n setDay(day);\n setHours(hours);\n setMinutes(minutes);\n setSeconds(seconds);\n }",
"T create();",
"T create();",
"public Coursetime() {\n\t}",
"public void testCreateInstance() throws ParseException {\n DateFormat df = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss.SSS\");\n Date date = df.parse(\"2008-08-08 12:34:56.789\");\n \n AbstractTemporalLiteral d = AbstractTemporalLiteral.createInstance(TemporalType.DATE, date);\n assertTrue(d instanceof DateLiteral);\n d = AbstractTemporalLiteral.createInstance(TemporalType.TIME, date);\n assertTrue(d instanceof TimeLiteral);\n d = AbstractTemporalLiteral.createInstance(TemporalType.TIMESTAMP, date);\n assertTrue(d instanceof TimestampLiteral);\n \n Calendar cal = Calendar.getInstance();\n cal.setTime(date);\n \n d = AbstractTemporalLiteral.createInstance(TemporalType.DATE, cal);\n assertTrue(d instanceof DateLiteral);\n d = AbstractTemporalLiteral.createInstance(TemporalType.TIME, cal);\n assertTrue(d instanceof TimeLiteral);\n d = AbstractTemporalLiteral.createInstance(TemporalType.TIMESTAMP, cal);\n assertTrue(d instanceof TimestampLiteral);\n }",
"public Calendar() {\n\t\tthis(() -> LocalDateTime.now());\n\t}",
"public void setTempoInit(LocalDateTime tempoInit) {\n this.tempoInit = tempoInit;\n }",
"private SegmentTmTuv createTuv(SegmentTmTu p_tu, Element p_root)\n throws Exception\n {\n SegmentTmTuv result = new SegmentTmTuv();\n result.setOrgSegment(p_root.asXML());\n \n // need to set backpointer to tuv, or SegmentTmTuv.equals() fails.\n result.setTu(p_tu);\n\n // language of the TUV \"EN-US\", case insensitive\n String lang = p_root.attributeValue(Tmx.LANG);\n\n try\n {\n String locale = ImportUtil.normalizeLocale(lang);\n result.setLocale(ImportUtil.getLocaleByName(locale));\n }\n catch (Throwable ex)\n {\n throw new Exception(\"unknown locale \" + lang + \",you can create it in system then retry.\");\n }\n\n // Creation user - always set to a known value\n String user = p_root.attributeValue(Tmx.CREATIONID);\n if (user == null)\n {\n user = p_root.getParent().attributeValue(Tmx.CREATIONID);\n }\n\n result.setCreationUser(user != null ? user : Tmx.DEFAULT_USER);\n\n // Modification user - only set if known\n user = p_root.attributeValue(Tmx.CHANGEID);\n if (user == null)\n {\n user = p_root.getParent().attributeValue(Tmx.CHANGEID);\n }\n\n if (user != null)\n {\n result.setModifyUser(user);\n }\n\n // Timestamps (should be expressed using java.util.Date).\n // In TMX, timestamps use the short form: yyyymmddThhmmssZ,\n // so prepare for both short and long form.\n Date now = new Date();\n Date date;\n\n // Creation date - always set to a known value\n String ts = p_root.attributeValue(Tmx.CREATIONDATE);\n if (ts == null)\n {\n ts = p_root.getParent().attributeValue(Tmx.CREATIONDATE);\n }\n\n if (ts != null)\n {\n date = UTC.parseNoSeparators(ts);\n if (date == null)\n {\n date = UTC.parse(ts);\n }\n result.setCreationDate(new Timestamp(date.getTime()));\n }\n else\n {\n result.setCreationDate(new Timestamp(now.getTime()));\n }\n\n // Modification date - only set if known (note: currently\n // AbstractTmTuv sets the modification date to NOW)\n ts = p_root.attributeValue(Tmx.CHANGEDATE);\n if (ts == null)\n {\n ts = p_root.getParent().attributeValue(Tmx.CHANGEDATE);\n }\n\n if (ts != null)\n {\n date = UTC.parseNoSeparators(ts);\n if (date == null)\n {\n date = UTC.parse(ts);\n }\n result.setModifyDate(new Timestamp(date.getTime()));\n }\n else\n {\n // If no \"changedate\", set it same as \"creationdate\".\n result.setModifyDate(result.getCreationDate());\n }\n\n\t\tts = p_root.attributeValue(Tmx.LASTUSAGEDATE);\n\t\tif (ts == null)\n\t\t{\n\t\t\tts = p_root.getParent().attributeValue(Tmx.LASTUSAGEDATE);\n\t\t}\n\t\tif (ts != null)\n\t\t{\n\t\t\tdate = UTC.parseNoSeparators(ts);\n\t\t\tif (date == null)\n\t\t\t{\n\t\t\t\tdate = UTC.parse(ts);\n\t\t\t}\n\t\t\tresult.setLastUsageDate(new Timestamp(date.getTime()));\n\t\t}\n\n\t\tList tuvPropNodes = p_root.elements(\"prop\");\n\t\tfor (int i = 0; i < tuvPropNodes.size(); i++)\n\t\t{\n\t\t\tElement elem = (Element) tuvPropNodes.get(i);\n\t\t\tString type = elem.attributeValue(\"type\");\n\t\t\tString value = elem.getText();\n\t\t\tif (Tmx.PROP_PREVIOUS_HASH.equalsIgnoreCase(type))\n\t\t\t{\n\t\t\t\tresult.setPreviousHash(Long.parseLong(value));\n\t\t\t}\n\t\t\telse if (Tmx.PROP_NEXT_HASH.equalsIgnoreCase(type))\n\t\t\t{\n\t\t\t\tresult.setNextHash(Long.parseLong(value));\n\t\t\t}\n\t\t\telse if (Tmx.PROP_JOB_ID.equalsIgnoreCase(type))\n\t\t\t{\n\t\t\t\tresult.setJobId(Long.parseLong(value));\n\t\t\t}\n\t\t\telse if (Tmx.PROP_JOB_NAME.equalsIgnoreCase(type))\n\t\t\t{\n\t\t\t\tresult.setJobName(value);\n\t\t\t}\n\t\t\telse if (Tmx.PROP_CREATION_PROJECT.equalsIgnoreCase(type))\n\t\t\t{\n\t\t\t\tresult.setUpdatedProject(value);\n\t\t\t}\n\t\t}\n // Segment text: need to produce root elements <translatable>\n // and <localizable> depending on TU type.\n StringBuffer segment = new StringBuffer();\n\n if (p_tu.isTranslatable())\n {\n segment.append(\"<segment>\");\n }\n else\n {\n segment.append(\"<localizable>\");\n }\n\n segment.append(getSegmentValue(p_root));\n\n if (p_tu.isTranslatable())\n {\n segment.append(\"</segment>\");\n }\n else\n {\n segment.append(\"</localizable>\");\n }\n\n result.setSid(p_tu.getSID());\n //End of Added\n result.setSegment(segment.toString());\n\n return result;\n }",
"public Date() {\r\n }",
"public FreeTime() {}",
"public UnitObject(TimeInterval _interval, T _value) {\r\n this.interval = _interval;\r\n // this.value = _value;\r\n fun = new ConstantFunction<T>(_value);\r\n }",
"public static TimePickerBuilder create() {\n\t\treturn new TimePickerBuilder();\n\t}",
"public static TimeTakenLogEntry create() {\n return builder().build();\n }",
"public TimeField() {\n\t\tsuper('t', \"0 0\");\n\t}",
"private Time(int end) {\r\n\t\tcurrentTime = 0;\r\n\t\tendOfTime = end;\r\n\t\tobservers = new ArrayList<TimeObserver>();\r\n\t}",
"public TimeBasedRollingPolicy() {\r\n super();\r\n }",
"public TimedEvent() {\n this(DEFAULT_LABEL + nextTaskID, DEFAULT_DATE, DEFAULT_TIME); // assigning default values\n }",
"public TimeUnit() {\n localTime = LocalDateTime.now();\n }",
"public CTime() {\n\t\n}",
"public Transaction() {\n this(0, 0, null);\n }",
"TimeStamp getT();",
"public static TimeInstant now() {\n return new TimeInstant();\n }",
"public Calendar() {\n }",
"public DefaultTimestampFieldComponentFactory() {\r\n\t\tsuper();\r\n\t}",
"private ModelImpl(int tempo) {\n if (tempo < 50000 || tempo > 250000) {\n throw new IllegalArgumentException(\"Invalid tempo.\");\n }\n this.tempo = tempo;\n this.currentMeasure = DEFAULT_START;\n this.status = Status.Playing;\n this.low = new Note(1, 8, 0, Note.Pitches.C, true, 0, 1);\n this.high = new Note(1, 0, 0, Note.Pitches.A, true, 0, 1);\n this.sheet = new ArrayList<Set<Note>>();\n }",
"public User(){\n registerDate = new LocalDateTime();\n }",
"public static AbsTime factory(long t)\n {\n // The value to return.\n AbsTime result;\n\n // Check for ASAP and NEVER.\n if (t == ASAP_CODE) {\n // No need to make a new object.\n result = ASAP;\n } else if (t == NEVER_CODE) {\n // No need to make a new object.\n result = NEVER;\n } else {\n // Not a special case. Make a new object.\n result = new AbsTime(t);\n }\n\n return result;\n }",
"@Override\n\t\tTruerandomness newInstance() {\n\t\t\treturn null;\n\t\t}",
"private AbsTime(AbsTime t)\n {\n // Copy the value.\n itsValue = t.itsValue;\n }",
"public Event() {\n // Unique random UID number for each event\n UID = UUID.randomUUID().toString().toUpperCase();\n TimeZone tz = TimeZone.getTimeZone(\"UTC\");\n Calendar cal = Calendar.getInstance(tz);\n\n /* get time stamp */\n int hour = cal.get(Calendar.HOUR);\n int minute = cal.get(Calendar.MINUTE);\n int second = cal.get(Calendar.SECOND);\n\n /* check current time */\n currentTime = \"\";\n if (hour < 10) {\n currentTime += \"0\" + hour;\n }\n else {\n currentTime += \"\" + hour;\n }\n if (minute < 10) {\n currentTime += \"0\" + minute;\n }\n else {\n currentTime += \"\" + minute;\n }\n if (second < 10) {\n currentTime += \"0\" + second;\n }\n else {\n currentTime += \"\" + second;\n }\n\n /* get date stamp */\n int year = cal.get(Calendar.YEAR);\n int month = cal.get(Calendar.MONTH);\n int day = cal.get(Calendar.DAY_OF_MONTH);\n\n /* check date */\n currentDate = \"\";\n if (year < 10) {\n currentDate += \"0\" + year;\n }\n else {\n currentDate += \"\" + year;\n }\n\n if (month < 10) {\n currentDate += \"0\" + month;\n }\n else {\n currentDate += \"\" + month;\n }\n if (day < 10) {\n currentDate += \"0\" + day;\n }\n else {\n currentDate += \"\" + day;\n }\n }",
"public TutorIndustrial() {}",
"public Translation() {\n\n this(0, 0, 0);\n }",
"public DayPeriod() {\n\t}",
"TIAssignment createTIAssignment();",
"public Calendar() {\n dateAndTimeables = new HashMap<>();\n }",
"public SimpleSandTimer(final TemporalAmount duration) {\n this(duration, Instant::now);\n }",
"public SimpleSandTimer(final TemporalAmount duration, final Supplier<Instant> now) {\n this(now.get().plus(duration), now);\n }",
"TAttribute createTAttribute();",
"public final Statistic newInstance() {\n Statistic s = new Statistic();\n s.myNumMissing = myNumMissing;\n s.firstx = firstx;\n s.max = max;\n s.min = min;\n s.myConfidenceLevel = myConfidenceLevel;\n s.myJsum = myJsum;\n s.myValue = myValue;\n s.setName(getName());\n s.num = num;\n s.sumxx = sumxx;\n s.moments = Arrays.copyOf(moments, moments.length);\n if (getSaveOption()) {\n s.save(getSavedData());\n s.setSaveOption(true);\n }\n return (s);\n }",
"public ThingTimeTriple(String english, Entity t, long from, long to)\r\n/* 390: */ {\r\n/* 391:344 */ this.english = english;\r\n/* 392:345 */ this.t = t;\r\n/* 393:346 */ this.from = from;\r\n/* 394:347 */ this.to = to;\r\n/* 395: */ }",
"Data() {\n\t\t// dia = 01;\n\t\t// mes = 01;\n\t\t// ano = 1970;\n\t\tthis(1, 1, 1970); // usar um construtor dentro de outro\n\t}",
"public ArmorTemplate() {\n\t}",
"public Time4() \r\n { \r\n this.setTime( 0, 0, 0 ); \r\n }",
"private Calendar createCalendar() {\n Calendar cal = Calendar.getInstance();\n\n // clear all aspects of the time that are not used\n cal.set(Calendar.MILLISECOND, 0);\n\n return cal;\n }",
"public DateUtil ()\n {\n\n }",
"public TimedStateMachineFactoryImpl() {\n\t\tsuper();\n\t}",
"public abstract DataType<T> newInstance();",
"public CinemaDate() {\n }",
"TimerSchedule createTimerSchedule();",
"public TimeInterval create(TimeInterval ti) {\r\n\t\tDefaultTimeInterval nti = new DefaultTimeInterval();\r\n\t\tfor (int i = 0; i < _numberOfIntervals.length; i++)\r\n\t\t\tnti._numberOfIntervals[i] = this._numberOfIntervals[i];\r\n\t\treturn nti;\r\n\t}",
"public Trade() {\n\t}",
"@Override // java.time.chrono.Chronology\n public ChronoLocalDateTime<MinguoDate> localDateTime(TemporalAccessor temporal) {\n return super.localDateTime(temporal);\n }",
"public Timeslot() {\n }",
"public DateUtil (int ordinal)\n {\n // save ordinal field and compute Gregorian equivalent\n set(ordinal);\n }",
"public GenericTcalRecord() {\n this(-1);\n }",
"io.opencannabis.schema.temporal.TemporalInstant.Instant getInstant();",
"public static StartAt.Now now() {\n return new Now();\n }",
"public ActividadTest()\n {\n prueba = new Actividad(\"Rumbear\",\"Salir a tomar y bailar con unos amigos\",2018,5,5,6,\n 15,8,30,30,new GregorianCalendar(2018,5,2,3,0),new GregorianCalendar(2018,5,7,8,0));\n }"
] | [
"0.65155625",
"0.6096946",
"0.597435",
"0.579322",
"0.57928413",
"0.57814354",
"0.5674988",
"0.5673134",
"0.56427646",
"0.5569574",
"0.55669093",
"0.5564049",
"0.5557161",
"0.5551168",
"0.55484724",
"0.5525106",
"0.5523869",
"0.54922545",
"0.5415534",
"0.5398973",
"0.5363511",
"0.53586525",
"0.53561217",
"0.53323054",
"0.53203195",
"0.52927387",
"0.52892816",
"0.52774066",
"0.5252713",
"0.5232352",
"0.5230849",
"0.52272743",
"0.5212781",
"0.5179125",
"0.5172764",
"0.51475996",
"0.5141551",
"0.5109512",
"0.510362",
"0.5099028",
"0.50969124",
"0.5077664",
"0.50503117",
"0.504305",
"0.504305",
"0.5041841",
"0.50376725",
"0.50245863",
"0.50231576",
"0.50092506",
"0.50042564",
"0.4993821",
"0.49845126",
"0.49770123",
"0.49615467",
"0.49614805",
"0.49602228",
"0.49545604",
"0.49473584",
"0.49465764",
"0.4926973",
"0.4922901",
"0.49188715",
"0.49167055",
"0.4914848",
"0.49118584",
"0.49034223",
"0.4899193",
"0.4891724",
"0.48820588",
"0.48749593",
"0.4871226",
"0.48499972",
"0.4838605",
"0.48346466",
"0.48325607",
"0.4829313",
"0.4827863",
"0.4822235",
"0.48197004",
"0.4817986",
"0.48170817",
"0.48156926",
"0.48133555",
"0.48132765",
"0.4807812",
"0.47965258",
"0.47901562",
"0.47883978",
"0.4785067",
"0.47816384",
"0.47787508",
"0.47707763",
"0.4767749",
"0.47560418",
"0.47509953",
"0.4748451",
"0.47430253",
"0.47364008",
"0.4734087"
] | 0.6465878 | 1 |
Create and return an empty DateWithTypeDateFormat object. The returned object has no properties or content and is not part of the RIFCS document, it is essentially a constructor of an object owned by the RIFCS document. The returned object needs to be "filled out" (e.g. with properties, additional subelements, etc) before being added to the RIFCS document. | public final DateWithTypeDateFormat newDate() throws RIFCSException {
return new DateWithTypeDateFormat(this.newElement(
Constants.ELEMENT_DATE));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static final DataType<Date> createDate(final String format) {\r\n return new ARXDate(format);\r\n }",
"private ARXDate() {\r\n this(\"Default\");\r\n }",
"public SimpleDateFormat() {\n\t\tthis(getDefaultPattern(), null, null, null, null, true, null);\n\t}",
"protected abstract DateFormat getDateFormat();",
"private ARXDate(final String formatString) {\r\n if (formatString == null || formatString.equals(\"Default\")) {\r\n this.string = \"dd.MM.yyyy\";\r\n this.format = new SimpleDateFormat(string);\r\n this.locale = null;\r\n } else {\r\n this.format = new SimpleDateFormat(formatString);\r\n this.string = formatString;\r\n this.locale = null;\r\n }\r\n }",
"public SimpleDateFormat getDateFormat(int displayType, Language language, String pattern) {\n\t\treturn null;\n\t}",
"public Date(String dateType, int year, int month, int day)\r\n\t\t\tthrows BogusDataException\r\n\t{\r\n\t\tsuper(dateType, \"\");\r\n\r\n\t\tthis.year = year;\r\n\t\tthis.month = month;\r\n\t\tthis.day = day;\r\n\t\tthis.hour = this.minute = this.second = 0;\r\n\t\tthis.dateOnly = true;\r\n\r\n\t\tString yearStr, monthStr, dayStr;\r\n\r\n\t\tyearStr = \"\" + year;\r\n\t\tmonthStr = \"\" + month;\r\n\t\tdayStr = \"\" + day;\r\n\t\twhile (yearStr.length() < 4)\r\n\t\t\tyearStr = '0' + yearStr;\r\n\t\tif (monthStr.length() < 2)\r\n\t\t\tmonthStr = '0' + monthStr;\r\n\t\tif (dayStr.length() < 2)\r\n\t\t\tdayStr = '0' + dayStr;\r\n\t\tvalue = yearStr + monthStr + dayStr;\r\n\r\n\t\t// Add attribute that says date-only\r\n\t\taddAttribute(\"VALUE\", \"DATE\");\r\n\t}",
"private void initDates() throws RIFCSException {\n NodeList nl = super.getElements(Constants.ELEMENT_DATE);\n\n for (int i = 0; i < nl.getLength(); i++) {\n dates.add(new DateWithTypeDateFormat(nl.item(i)));\n }\n }",
"public DataFormat createDataFormat() {\n\t\treturn null;\n\t}",
"public DefaultImpl() {\n this(DEFAULT_DATE_FORMAT);\n }",
"@Test\n public void fieldDate() throws Exception {\n Document doc = new Document();\n DocumentBuilder builder = new DocumentBuilder(doc);\n\n // If we want the text in the document always to display the correct date, we can use a DATE field.\n // Below are three types of cultural calendars that a DATE field can use to display a date.\n // 1 - Islamic Lunar Calendar:\n FieldDate field = (FieldDate) builder.insertField(FieldType.FIELD_DATE, true);\n field.setUseLunarCalendar(true);\n Assert.assertEquals(\" DATE \\\\h\", field.getFieldCode());\n builder.writeln();\n\n // 2 - Umm al-Qura calendar:\n field = (FieldDate) builder.insertField(FieldType.FIELD_DATE, true);\n field.setUseUmAlQuraCalendar(true);\n Assert.assertEquals(\" DATE \\\\u\", field.getFieldCode());\n builder.writeln();\n\n // 3 - Indian National Calendar:\n field = (FieldDate) builder.insertField(FieldType.FIELD_DATE, true);\n field.setUseSakaEraCalendar(true);\n Assert.assertEquals(\" DATE \\\\s\", field.getFieldCode());\n builder.writeln();\n\n // Insert a DATE field and set its calendar type to the one last used by the host application.\n // In Microsoft Word, the type will be the most recently used in the Insert -> Text -> Date and Time dialog box.\n field = (FieldDate) builder.insertField(FieldType.FIELD_DATE, true);\n field.setUseLastFormat(true);\n Assert.assertEquals(\" DATE \\\\l\", field.getFieldCode());\n builder.writeln();\n\n doc.updateFields();\n doc.save(getArtifactsDir() + \"Field.DATE.docx\");\n //ExEnd\n\n doc = new Document(getArtifactsDir() + \"Field.DATE.docx\");\n\n field = (FieldDate) doc.getRange().getFields().get(0);\n\n Assert.assertEquals(FieldType.FIELD_DATE, field.getType());\n Assert.assertTrue(field.getUseLunarCalendar());\n Assert.assertEquals(\" DATE \\\\h\", field.getFieldCode());\n Assert.assertTrue(doc.getRange().getFields().get(0).getResult().matches(\"\\\\d{1,2}[/]\\\\d{1,2}[/]\\\\d{4}\"));\n\n field = (FieldDate) doc.getRange().getFields().get(1);\n\n TestUtil.verifyField(FieldType.FIELD_DATE, \" DATE \\\\u\", LocalDate.now().format(DateTimeFormatter.ofPattern(\"M/d/YYYY\")), field);\n Assert.assertTrue(field.getUseUmAlQuraCalendar());\n\n field = (FieldDate) doc.getRange().getFields().get(2);\n\n TestUtil.verifyField(FieldType.FIELD_DATE, \" DATE \\\\s\", LocalDate.now().format(DateTimeFormatter.ofPattern(\"M/d/YYYY\")), field);\n Assert.assertTrue(field.getUseSakaEraCalendar());\n\n field = (FieldDate) doc.getRange().getFields().get(3);\n\n TestUtil.verifyField(FieldType.FIELD_DATE, \" DATE \\\\l\", LocalDate.now().format(DateTimeFormatter.ofPattern(\"M/d/YYYY\")), field);\n Assert.assertTrue(field.getUseLastFormat());\n }",
"public Date() {\r\n }",
"public CustomDateSerializer() {\n this(null);\n }",
"public static Date getCurrentDate(String dateType)\r\n\t{\r\n\t\tDate d = null;\r\n\t\tCalendar c = Calendar.getInstance();\r\n\t\ttry\r\n\t\t{\r\n\t\t\td = new Date(dateType, c.get(Calendar.YEAR),\r\n\t\t\t\t\tc.get(Calendar.MONTH) + 1, c.get(Calendar.DAY_OF_MONTH));\r\n\t\t} catch (BogusDataException e2)\r\n\t\t{\r\n\t\t\t// This should never happen since we're setting the m/d/y\r\n\t\t\tSystem.err.println(e2.toString());\r\n\t\t\te2.printStackTrace();\r\n\t\t}\r\n\t\treturn d;\r\n\t}",
"public MyDate(){\n this.day = 0;\n this.month = 0;\n this.year = 0;\n }",
"public MyDate(){\t\n\t\tthis(\"00/00/0000\");\n\t}",
"public DateUtility () {\n dateFormat = new SimpleDateFormat(\"MM/dd/yyyy\");\n }",
"date initdate(date iDate)\n {\n iDate.updateElementValue(\"date\");\n return iDate;\n }",
"private static SimpleDateFormat getDateFormat() {\r\n\t\tif(dateFormat == null)\r\n\t\t\tdateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\r\n\t\treturn dateFormat;\r\n\t}",
"public FillDate() {\n }",
"DateLiteral createDateLiteral();",
"public Date(){\n\t\tyear=0;\n\t\tmonth=0;\n\t\tday=0;\n\t}",
"public DefaultImpl(final DateFormat dateFormat) {\n this.dateFormat = dateFormat;\n }",
"DateFormatPanel() {\r\n\t\tfDateFormat = DateFormat.getTimeInstance(DateFormat.DEFAULT);\r\n\t}",
"public Builder clearCreateDate() {\n createDate = null;\n fieldSetFlags()[2] = false;\n return this;\n }",
"public String getDateType() {\r\n return dateType;\r\n }",
"protected static SimpleDateFormat xsdDateFormat() {\n return new SimpleDateFormat(\"yyyy-MM-dd\");\n }",
"public static SimpleDateFormat createDateFormat() {\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss.SSS\");\n TimeZone myTimeZone = TimeZone.getTimeZone(ZoneId.of(\"UTC\"));\n dateFormat.setTimeZone(myTimeZone);\n dateFormat.setLenient(false);\n return dateFormat;\n }",
"public static Date getCurrentDateTime(String dateType)\r\n\t{\r\n\t\tDate d = null;\r\n\t\tCalendar c = Calendar.getInstance();\r\n\t\ttry\r\n\t\t{\r\n\t\t\td = new Date(dateType, c.get(Calendar.YEAR),\r\n\t\t\t\t\tc.get(Calendar.MONTH) + 1, c.get(Calendar.DAY_OF_MONTH));\r\n\t\t\td.setHour(c.get(Calendar.HOUR_OF_DAY));\r\n\t\t\td.setMinute(c.get(Calendar.MINUTE));\r\n\t\t\td.setSecond(c.get(Calendar.SECOND));\r\n\t\t\td.setDateOnly(false);\r\n\t\t} catch (BogusDataException e2)\r\n\t\t{\r\n\t\t\t// This should never happen since we're setting the m/d/y\r\n\t\t\tSystem.err.println(e2.toString());\r\n\t\t\te2.printStackTrace();\r\n\t\t}\r\n\t\treturn d;\r\n\t}",
"protected DateFieldMetadata() {\r\n\r\n\t}",
"public synchronized static DateFormat getDateFormat()\n\t{\n\t\treturn DATE_FORMAT;\n\t}",
"private String getDefaultDateFormat() {\n return getString(DATE_FORMAT_KEY, DEFAULT_DATE_FORMAT);\n }",
"public Date() {\r\n\t\tGregorianCalendar c = new GregorianCalendar();\r\n\t\tmonth = c.get(Calendar.MONTH) + 1; // our month starts from 1\r\n\t\tday = c.get(Calendar.DAY_OF_MONTH);\r\n\t\tyear = c.get(Calendar.YEAR);\r\n\t}",
"private Date init(InputStream ouiData) throws IOException {\n DataInputStream din = new DataInputStream(ouiData);\n Date result = new Date(din.readLong());\n while (din.available() > 0) {\n Oui oui = new Oui(din);\n _byHashCode.put(oui.hashCode(), oui);\n }\n return result;\n }",
"public Builder clearDate() {\n bitField0_ = (bitField0_ & ~0x00000002);\n date_ = 0L;\n onChanged();\n return this;\n }",
"public DateTime() {\n this((BusinessObject) null);\n }",
"private DateUtil() {\n\t}",
"private DateUtil() {\n\t}",
"public interface DatePropertySchema {\n /**\n * Returns source date format\n * @return Source date format\n */\n DateFormat getSourceDateFormat();\n\n /**\n * Returns display date format\n * @return Display date format\n */\n DateFormat getDisplayDateFormat();\n\n /**\n * Converts a string into a date with the source date format\n * @param date A string representing a date\n * @return Date\n */\n default Date fromSource(String date) {\n try {\n return getSourceDateFormat().parse(date);\n } catch (ParseException e) {\n throw new RuntimeException(String.format(\"couldn't parse date:{0} using:{1}\", date, getSourceDateFormat()));\n }\n }\n\n /**\n * Converts a string into a date with the display date format\n * @param date A string representing a date\n * @return Date\n */\n default Date fromDisplay(String date) {\n try {\n return getDisplayDateFormat().parse(date);\n } catch (ParseException e) {\n throw new RuntimeException(String.format(\"couldn't parse date:{0} using:{1}\", date, getDisplayDateFormat()));\n }\n }\n\n /**\n * Converts a date into a string with the display date format\n * @param date A date\n * @return A string representing a date\n */\n default String toDisplay(Date date) {\n return getDisplayDateFormat().format(date);\n }\n\n /**\n * Converts a date into a string with the source date format\n * @param date A date\n * @return A string representing a date\n */\n default String toSource(Date date) {\n return getSourceDateFormat().format(date);\n }\n}",
"public DateUtil ()\n {\n\n }",
"public String getDateFormatString() {\n return this.dateFormatString;\n }",
"private ARXDate(String formatString, Locale locale) {\r\n if (formatString == null || formatString.equals(\"Default\")) {\r\n this.string = \"dd.MM.yyyy\";\r\n this.format = new SimpleDateFormat(string, locale);\r\n this.locale = locale;\r\n } else {\r\n this.format = new SimpleDateFormat(formatString, locale);\r\n this.string = formatString;\r\n this.locale = locale;\r\n }\r\n }",
"public void addFormDate(Element parent, DateType type, boolean isDefaultNull, String dateKey, String timeKey,\r\n\t\t\tString label, String timezone, String date, String time) {\r\n\t\tElement dateItem = mDocument.createElement(\"IppDateField\");\r\n\t\tdateItem.setAttribute(\"Mode\", type.toString());\r\n\t\tdateItem.setAttribute(\"Default\", isDefaultNull ? \"NULL\" : \"MODE\");\r\n\t\tdateItem.setAttribute(\"DateKey\", dateKey);\r\n\t\tdateItem.setAttribute(\"TimeKey\", timeKey);\r\n\t\tparent.appendChild(dateItem);\r\n\r\n\t\taddTextNode(dateItem, \"Label\", label);\r\n\t\taddTextNode(dateItem, \"TimeZone\", timezone);\r\n\t\taddTextNode(dateItem, \"Date\", date);\r\n\t\taddTextNode(dateItem, \"Time\", time);\r\n\t}",
"public Builder clearCreationDate() {\n bitField0_ &= ~0x00000002;\n creationDate_ = 0L;\n onChanged();\n return this;\n }",
"public final void addDate(final String date,\n final String type, final String dateFormat) throws RIFCSException {\n DateWithTypeDateFormat de = this.newDate();\n de.setType(type);\n de.setDateFormat(dateFormat);\n de.setValue(date);\n this.getElement().appendChild(de.getElement());\n this.dates.add((DateWithTypeDateFormat) de);\n }",
"protected static SimpleDateFormat dateFormat() {\n return dateFormat(true, false);\n }",
"@Override\n protected SimpleDateFormat getDateFormat() {\n return dateFormat;\n }",
"private DateFormatterManager()\r\n\t{\r\n\r\n\t}",
"public Builder clearCreationTime() {\n bitField0_ = (bitField0_ & ~0x00000001);\n creationTime_ = 0L;\n onChanged();\n return this;\n }",
"public static final DataType<Date> createDate(final String format, final Locale locale) {\r\n return new ARXDate(format, locale);\r\n }",
"public DateFormat getDateFormat() {\r\n return this.dateFormat;\r\n }",
"public DefaultFormat() {\n }",
"@Override\n public DateFormat getDateFormat(Integer optionalDateStyle, Integer optionalTimeStyle, Locale locale, boolean currentUserTimezone) {\n return null;\n }",
"@Test\n public void fieldPrintDate() throws Exception {\n Document doc = new Document(getMyDir() + \"Field sample - PRINTDATE.docx\");\n\n // When a document is printed by a printer or printed as a PDF (but not exported to PDF),\n // PRINTDATE fields will display the print operation's date/time.\n // If no printing has taken place, these fields will display \"0/0/0000\".\n FieldPrintDate field = (FieldPrintDate) doc.getRange().getFields().get(0);\n\n Assert.assertEquals(\"3/25/2020 12:00:00 AM\", field.getResult());\n Assert.assertEquals(\" PRINTDATE \", field.getFieldCode());\n\n // Below are three different calendar types according to which the PRINTDATE field\n // can display the date and time of the last printing operation.\n // 1 - Islamic Lunar Calendar:\n field = (FieldPrintDate) doc.getRange().getFields().get(1);\n\n Assert.assertTrue(field.getUseLunarCalendar());\n Assert.assertEquals(\"8/1/1441 12:00:00 AM\", field.getResult());\n Assert.assertEquals(\" PRINTDATE \\\\h\", field.getFieldCode());\n\n field = (FieldPrintDate) doc.getRange().getFields().get(2);\n\n // 2 - Umm al-Qura calendar:\n Assert.assertTrue(field.getUseUmAlQuraCalendar());\n Assert.assertEquals(\"8/1/1441 12:00:00 AM\", field.getResult());\n Assert.assertEquals(\" PRINTDATE \\\\u\", field.getFieldCode());\n\n field = (FieldPrintDate) doc.getRange().getFields().get(3);\n\n // 3 - Indian National Calendar:\n Assert.assertTrue(field.getUseSakaEraCalendar());\n Assert.assertEquals(\"1/5/1942 12:00:00 AM\", field.getResult());\n Assert.assertEquals(\" PRINTDATE \\\\s\", field.getFieldCode());\n //ExEnd\n }",
"@Override\n\tpublic void initDate() {\n\n\t}",
"@org.jetbrains.annotations.NotNull()\n public static final java.lang.String getFormattedDate(@org.jetbrains.annotations.NotNull()\n java.util.Calendar $this$getFormattedDate, @org.jetbrains.annotations.NotNull()\n java.lang.String format) {\n return null;\n }",
"public DateFormat getDateFormat(){\n\treturn dateFormat;\n }",
"public DateCheckTag() { }",
"public DateGraphFormat(){\n }",
"public com.vodafone.global.er.decoupling.binding.request.DateTimeTierFullType createDateTimeTierFullType()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.DateTimeTierFullTypeImpl();\n }",
"@Override\n public Class<Date> getElementType() {\n return Date.class;\n }",
"public CpFldValidDate() { super(10018, 1); }",
"protected GeometricObject() \n\t{\n\t\tdateCreated = new java.util.Date();\n\t}",
"private CreateDateUtils()\r\n\t{\r\n\t}",
"abstract Date getDefault();",
"public void testCreateInstance() throws ParseException {\n DateFormat df = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss.SSS\");\n Date date = df.parse(\"2008-08-08 12:34:56.789\");\n \n AbstractTemporalLiteral d = AbstractTemporalLiteral.createInstance(TemporalType.DATE, date);\n assertTrue(d instanceof DateLiteral);\n d = AbstractTemporalLiteral.createInstance(TemporalType.TIME, date);\n assertTrue(d instanceof TimeLiteral);\n d = AbstractTemporalLiteral.createInstance(TemporalType.TIMESTAMP, date);\n assertTrue(d instanceof TimestampLiteral);\n \n Calendar cal = Calendar.getInstance();\n cal.setTime(date);\n \n d = AbstractTemporalLiteral.createInstance(TemporalType.DATE, cal);\n assertTrue(d instanceof DateLiteral);\n d = AbstractTemporalLiteral.createInstance(TemporalType.TIME, cal);\n assertTrue(d instanceof TimeLiteral);\n d = AbstractTemporalLiteral.createInstance(TemporalType.TIMESTAMP, cal);\n assertTrue(d instanceof TimestampLiteral);\n }",
"public void setDateType(String dateType) {\r\n this.dateType = dateType == null ? null : dateType.trim();\r\n }",
"public static SimpleDateFormat getSimpleDateFormatByMode(int mode) {\n SimpleDateFormat simpleDateFormat = null;\n if (CalendarMode.DAY == mode) {\n simpleDateFormat = new SimpleDateFormat(\"EEE dd\");\n } else if (CalendarMode.WEEK == mode) {\n simpleDateFormat = new SimpleDateFormat(\"dd/MM\");\n } else {\n simpleDateFormat = new SimpleDateFormat(\"MMM yyyy\");\n }\n return simpleDateFormat;\n }",
"public Date getDate(Date defaultVal) {\n return get(ContentType.DateType, defaultVal);\n }",
"@Override\n public LocalDate getDate() {\n return null;\n }",
"public DateFormat getDateFormat() {\n\t\treturn dateFormat;\n\t}",
"public DateGraphFormat(DateFormat dateFormatIn){\n\tif(dateFormatIn != null){\n\t dateFormat = dateFormatIn;\n\t} \n }",
"public DefaultTimestampFieldComponentFactory() {\r\n\t\tsuper();\r\n\t}",
"public FlexData(Type type) {\n entryCollectionList = null;\n entryCollectionMap = null;\n this.type = type;\t\t\n standardDateFormat = \"yyyy-MM-dd\"; // DB2-Datum\n\t}",
"public ReocType() \r\n {\r\n super();\r\n }",
"FieldType createFieldType();",
"public Builder clearCreateDate() {\n \n createDate_ = getDefaultInstance().getCreateDate();\n onChanged();\n return this;\n }",
"public Object clone() {\r\n return new DateTimeFormat(dateFormat);\r\n }",
"DateFormat getDisplayDateFormat();",
"EmptyType createEmptyType();",
"public static native JsDate create() /*-{\n return new Date();\n }-*/;",
"public com.luisjrz96.streaming.birthsgenerator.models.BirthInfo.Builder clearDate() {\n fieldSetFlags()[5] = false;\n return this;\n }",
"public DateAxis() { this(null); }",
"public Date getDateObject(){\n \n Date date = new Date(this.getAnio(), this.getMes(), this.getDia());\n return date;\n }",
"public Date(String dateType, int year, int month, int day, int hour,\r\n\t\t\tint min, int sec, int ehour, int emin, int esec)\r\n\t\t\tthrows BogusDataException\r\n\t{\r\n\t\tsuper(dateType, \"\");\r\n\r\n\t\tthis.dateType = dateType;\r\n\t\tthis.year = year;\r\n\t\tthis.month = month;\r\n\t\tthis.day = day;\r\n\t\tthis.hour = hour;\r\n\t\tthis.minute = min;\r\n\t\tthis.second = sec;\r\n\t\tthis.ehour = ehour;\r\n\t\tthis.eminute = emin;\r\n\t\tthis.esecond = esec;\r\n\t\tthis.dateOnly = false;\r\n\r\n\t\tString yearStr, monthStr, dayStr, hourStr, minStr, secStr, ehourStr, eminStr, esecStr;\r\n\r\n\t\tyearStr = \"\" + year;\r\n\t\tmonthStr = \"\" + month;\r\n\t\tdayStr = \"\" + day;\r\n\t\thourStr = \"\" + hour;\r\n\t\tminStr = \"\" + min;\r\n\t\tsecStr = \"\" + sec;\r\n\t\tehourStr = \"\" + ehour;\r\n\t\teminStr = \"\" + emin;\r\n\t\tesecStr = \"\" + esec;\r\n\r\n\t\twhile (yearStr.length() < 4)\r\n\t\t\tyearStr = '0' + yearStr;\r\n\t\tif (monthStr.length() < 2)\r\n\t\t\tmonthStr = '0' + monthStr;\r\n\t\tif (dayStr.length() < 2)\r\n\t\t\tdayStr = '0' + dayStr;\r\n\t\tif (hourStr.length() < 2)\r\n\t\t\thourStr = '0' + hourStr;\r\n\t\tif (minStr.length() < 2)\r\n\t\t\tminStr = '0' + minStr;\r\n\t\tif (secStr.length() < 2)\r\n\t\t\tsecStr = '0' + secStr;\r\n\t\tif (ehourStr.length() < 2)\r\n\t\t\tehourStr = '0' + ehourStr;\r\n\t\tif (eminStr.length() < 2)\r\n\t\t\teminStr = '0' + eminStr;\r\n\t\tif (esecStr.length() < 2)\r\n\t\t\tesecStr = '0' + esecStr;\r\n\r\n\t\t// TODO: use StringBuffer to speed this up\r\n\t\t// TODO: validate values\r\n\t\tvalue = yearStr + monthStr + dayStr + 'T' + hourStr + minStr + secStr\r\n\t\t\t\t+ ehourStr + eminStr + esecStr;\r\n\r\n\t\t// Add attribute that says date has a time\r\n\t\taddAttribute(\"VALUE\", \"DATE-TIME\");\r\n\t}",
"@Test\n public void getFieldFromDocument() throws Exception {\n Document doc = new Document();\n DocumentBuilder builder = new DocumentBuilder(doc);\n\n FieldDate field = (FieldDate) builder.insertField(FieldType.FIELD_DATE, true);\n field.getFormat().setDateTimeFormat(\"dddd, MMMM dd, yyyy\");\n field.update();\n\n FieldChar fieldStart = field.getStart();\n\n Assert.assertEquals(FieldType.FIELD_DATE, fieldStart.getFieldType());\n Assert.assertEquals(false, fieldStart.isDirty());\n Assert.assertEquals(false, fieldStart.isLocked());\n\n // Retrieve the facade object which represents the field in the document.\n field = (FieldDate) fieldStart.getField();\n\n Assert.assertEquals(false, field.isLocked());\n Assert.assertEquals(\" DATE \\\\@ \\\"dddd, MMMM dd, yyyy\\\"\", field.getFieldCode());\n\n // Update the field to show the current date.\n field.update();\n //ExEnd\n\n doc = DocumentHelper.saveOpen(doc);\n\n TestUtil.verifyField(FieldType.FIELD_DATE, \" DATE \\\\@ \\\"dddd, MMMM dd, yyyy\\\"\", new SimpleDateFormat(\"EEEEE, MMMM dd, yyyy\").format(new Date()), doc.getRange().getFields().get(0));\n }",
"private void initDateFromJD(double jd, boolean calType) {\n\t\tthis.jd = jd;\n\t\tthis.calType = calType;\n\t\tIDate dt = swe_revjul(jd, calType);\n\t\tthis.year = dt.year;\n\t\tthis.month = dt.month;\n\t\tthis.day = dt.day;\n\t\tthis.hour = dt.hour;\n\t}",
"public Date getDate()\n\t{\n\t\tif (m_nType == AT_DATE)\n\t\t\treturn (Date)m_oData;\n\t\telse\n\t\t\treturn null;\n\t}",
"@Test\n public void testXMLGregorianCalendar() {\n Date date = new Date();\n XMLGregorianCalendar xmlDate = null;\n GregorianCalendar gc = new GregorianCalendar();\n gc.setTime(date);\n\n try {\n xmlDate = DatatypeFactory.newInstance().newXMLGregorianCalendar(gc);\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n System.out.println(\"XMLGregorianCalendar :- \" + xmlDate);\n }",
"Dates() {\n clear();\n }",
"public Date(String dateType, int year, int month, int day, int hour,\r\n\t\t\tint min, int sec) throws BogusDataException\r\n\t{\r\n\t\tsuper(dateType, \"\");\r\n\t\t// code below by Jeremy//\r\n\t\tthis.dateType = dateType;\r\n\t\t// code above by Jeremy//\r\n\t\tthis.year = year;\r\n\t\tthis.month = month;\r\n\t\tthis.day = day;\r\n\t\tthis.hour = hour;\r\n\t\tthis.minute = min;\r\n\t\tthis.second = sec;\r\n\t\tthis.dateOnly = false;\r\n\r\n\t\tString yearStr, monthStr, dayStr, hourStr, minStr, secStr;\r\n\r\n\t\tyearStr = \"\" + year;\r\n\t\tmonthStr = \"\" + month;\r\n\t\tdayStr = \"\" + day;\r\n\t\thourStr = \"\" + hour;\r\n\t\tminStr = \"\" + min;\r\n\t\tsecStr = \"\" + sec;\r\n\r\n\t\twhile (yearStr.length() < 4)\r\n\t\t\tyearStr = '0' + yearStr;\r\n\t\tif (monthStr.length() < 2)\r\n\t\t\tmonthStr = '0' + monthStr;\r\n\t\tif (dayStr.length() < 2)\r\n\t\t\tdayStr = '0' + dayStr;\r\n\t\tif (hourStr.length() < 2)\r\n\t\t\thourStr = '0' + hourStr;\r\n\t\tif (minStr.length() < 2)\r\n\t\t\tminStr = '0' + minStr;\r\n\t\tif (secStr.length() < 2)\r\n\t\t\tsecStr = '0' + secStr;\r\n\r\n\t\t// TODO: use StringBuffer to speed this up\r\n\t\t// TODO: validate values\r\n\t\tvalue = yearStr + monthStr + dayStr + 'T' + hourStr + minStr + secStr;\r\n\r\n\t\t// Add attribute that says date has a time\r\n\t\taddAttribute(\"VALUE\", \"DATE-TIME\");\r\n\t}",
"public DateFormat getDateFormat() {\n\t\treturn this.dateFormat;\n\t}",
"public SweDate(int year, int month, int day, double hour, boolean calType) {\n\t\tsetFields(year, month, day, hour, calType);\n\t}",
"UdtType createUdtType();",
"public GeometricObject() {\n dateCreated = new java.util.Date();\n }",
"FieldsType createFieldsType();",
"DOMType() {\n // Constructs an empty type node\n }",
"public void testDateConversion() throws Exception {\n Calendar calendar = Calendar.getInstance();\n TimeDetails details = new TimeDetails(\n calendar.get(Calendar.HOUR_OF_DAY), calendar.get(Calendar.MINUTE), calendar.get(Calendar.SECOND));\n DateMetadataDefinition def = new DateMetadataDefinition(\"date\", \"\",\n calendar.get(Calendar.YEAR),\n calendar.get(Calendar.MONTH),\n calendar.get(Calendar.DAY_OF_MONTH),\n details,\n false);\n List<AbstractMetadataDefinition> list = new LinkedList<AbstractMetadataDefinition>();\n list.add(def);\n PluginImpl.getInstance().setDefinitions(list);\n FreeStyleProject freeStyleProject = createFreeStyleProject();\n configRoundtrip(freeStyleProject);\n MetadataJobProperty property = freeStyleProject.getProperty(MetadataJobProperty.class);\n assertNotNull(\"No MetadataJobProperty\", property);\n DateMetadataValue dateValue = (DateMetadataValue)TreeStructureUtil.getLeaf(property, \"date\");\n assertNotNull(dateValue);\n assertEquals(def.getHour(), dateValue.getHour());\n assertEquals(def.getMinute(), dateValue.getMinute());\n assertEquals(def.getSecond(), dateValue.getSecond());\n assertEquals(def.getDay(), dateValue.getDay());\n assertEquals(def.getMonth(), dateValue.getMonth());\n assertEquals(def.getYear(), dateValue.getYear());\n }",
"public CustomDate getDate() {\n return new CustomDate(date.getTime());\n }",
"public static ToUseTimeLineFactory init() {\n\t\ttry {\n\t\t\tToUseTimeLineFactory theToUseTimeLineFactory = (ToUseTimeLineFactory)EPackage.Registry.INSTANCE.getEFactory(ToUseTimeLinePackage.eNS_URI);\n\t\t\tif (theToUseTimeLineFactory != null) {\n\t\t\t\treturn theToUseTimeLineFactory;\n\t\t\t}\n\t\t}\n\t\tcatch (Exception exception) {\n\t\t\tEcorePlugin.INSTANCE.log(exception);\n\t\t}\n\t\treturn new ToUseTimeLineFactoryImpl();\n\t}"
] | [
"0.619133",
"0.5843718",
"0.5804819",
"0.5745644",
"0.5615626",
"0.560739",
"0.5598037",
"0.5573397",
"0.55673516",
"0.5560855",
"0.554457",
"0.54785836",
"0.54683304",
"0.5406159",
"0.5377139",
"0.53039503",
"0.5300389",
"0.52998304",
"0.526868",
"0.5261767",
"0.523417",
"0.52221274",
"0.52212703",
"0.52020776",
"0.5183834",
"0.5153897",
"0.5138408",
"0.50904727",
"0.506911",
"0.5057962",
"0.5035439",
"0.501927",
"0.5018782",
"0.5017401",
"0.5007072",
"0.5006963",
"0.49766284",
"0.49766284",
"0.49729854",
"0.49657863",
"0.4962613",
"0.49484387",
"0.49432564",
"0.49401155",
"0.49303904",
"0.49292102",
"0.4914092",
"0.4904959",
"0.4902264",
"0.48999187",
"0.4899065",
"0.4897125",
"0.48944536",
"0.48776227",
"0.48749676",
"0.48721293",
"0.48708355",
"0.48664358",
"0.48432863",
"0.48334813",
"0.48210773",
"0.48174366",
"0.48143625",
"0.4807203",
"0.47975922",
"0.47974032",
"0.47957185",
"0.4789733",
"0.47884086",
"0.47845957",
"0.47817785",
"0.4781401",
"0.47786474",
"0.47745228",
"0.47729304",
"0.47716072",
"0.47695443",
"0.47640145",
"0.47555983",
"0.47541443",
"0.4750814",
"0.47506076",
"0.4749652",
"0.4747047",
"0.4745395",
"0.47445595",
"0.4743384",
"0.47428373",
"0.47403646",
"0.47334924",
"0.47230342",
"0.4715366",
"0.4699609",
"0.46860492",
"0.4676527",
"0.46721712",
"0.46659848",
"0.46613026",
"0.4654954",
"0.46448243"
] | 0.7194216 | 0 |
Obtain the date information for this temporal coverage. | public final List<DateWithTypeDateFormat> getDates() {
return this.dates;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public DateInfo getDate() {\r\n\t\treturn new DateInfo(super.getDate());\r\n\t\t//return new DateInfo(maturityDate);\r\n\t}",
"public DateInfo getDateInfo() {\n return dateInfo;\n }",
"public String getIncidentDate(){\n\t\treturn this.incidentDate;\n\t}",
"public String getCostsDate() {\n return costsDate;\n }",
"@Override\n\tpublic Calendar getDate(){\n\t\treturn date;\n\t}",
"public String Get_date() \n {\n \n return date;\n }",
"public String getDate()\r\n\t{\r\n\t\treturn date;\r\n\t}",
"public String getDate()\r\n\t{\r\n\t\treturn date;\r\n\t}",
"public String getEventDate() {\n\t\treturn date;\n\t}",
"public String getDate() {\r\n\t\treturn this.date;\r\n\t}",
"public String getDate()\n\t\t{\n\t\t\treturn date;\n\t\t}",
"public String getDate(){\n\t\t\n\t\treturn this.date;\n\t}",
"public String getDate() {\r\n return date;\r\n }",
"public String getDate() {\n return this.date;\n }",
"public String getDate() {\n return this.date;\n }",
"public String getDate() {\r\n\t\treturn date;\r\n\t}",
"public Date getCtDate() {\n return ctDate;\n }",
"public String getDate() {\n\t\treturn this.date;\n\t}",
"public String getDate() {\n\t\treturn date;\n\t}",
"public String getDate() {\n\t\treturn date;\n\t}",
"@Override\n public Date getDate() {\n return date;\n }",
"@Override\n\tpublic java.util.Date getCreateDate() {\n\t\treturn _dictData.getCreateDate();\n\t}",
"public Calendar getDate() {\r\n\t\treturn date;\r\n\t}",
"public String getDate() {\n return date;\n }",
"public String getDate() {\n return date;\n }",
"public String getDate() {\n return date;\n }",
"public String getDate() {\n return date;\n }",
"public String getDate() {\n return date;\n }",
"public Calendar getDate() {\n\t\treturn date;\n\t}",
"public Date getDate()\n\t{\n\t\treturn date;\n\t}",
"public String getDate() {\n return date;\n }",
"public Date getdate() {\n\t\treturn new Date(date.getTime());\n\t}",
"public Date getCateCreated() {\n return cateCreated;\n }",
"public Date getDate() {\n return dateTime;\n }",
"public Date getDate(){\n\t\treturn date;\n\t}",
"public java.util.Calendar getDate() {\n return date;\n }",
"public java.util.Calendar getDate() {\n return date;\n }",
"public Date getDate()\n {\n return this.date;\n }",
"public String getdate() {\n\t\treturn date;\n\t}",
"public Calendar getDate()\n {\n return date;\n }",
"public Calendar getDate() {\n\treturn date;\n }",
"public Date getDate() {\r\n return date;\r\n }",
"public Date getDate() {\r\n return date;\r\n }",
"public Date getDate() {\r\n return date;\r\n }",
"public String getDate(){\n\t\treturn toString();\n\t}",
"public Date getDate() {\n\t\treturn _date;\n\t}",
"public Date getDate() {\r\n\t\treturn this.date;\r\n\t}",
"public Date getDate() {\r\n\t\treturn date;\r\n\t}",
"public Date getDate() {\r\n\t\treturn date;\r\n\t}",
"public Date getDate() {\n return this.date;\n }",
"public String getDate() {\n\t\treturn this.mDate;\n\t}",
"public java.lang.String getDate() {\n return date;\n }",
"public Date getFechaInclusion()\r\n/* 150: */ {\r\n/* 151:170 */ return this.fechaInclusion;\r\n/* 152: */ }",
"public Calendar getDate() {\n\n\t\treturn _date;\n\t}",
"public static String getDate() {\n return annotation != null ? annotation.date() : \"Unknown\";\n }",
"public String getDate(){\n\n return this.date;\n }",
"public Date getDate() {\n\t\treturn date;\n\t}",
"public Date getDate() {\n\t\treturn date;\n\t}",
"public Date getDate()\n {\n return date;\n }",
"public Date date()\n\t{\n\t\treturn this.date;\n\t}",
"public int getDate() {\n return date;\n }",
"public int getDate() {\n return date;\n }",
"public Date getDate() {\n return date;\n }",
"public Date getDate() {\n return date;\n }",
"public Date getDate() {\n return date;\n }",
"public Date getDate() {\n return date;\n }",
"public Date getDate() {\n return date;\n }",
"public Date getDate() {\n return date;\n }",
"public Date getDate() {\n return date;\n }",
"public Date getDate() {\n return date;\n }",
"public Date getDate() {\n return date;\n }",
"public Date getDate() {\n return date;\n }",
"public Date getDate() {\n return date;\n }",
"public Date getDate() {\n return date;\n }",
"public Date getDate() {\n return date;\n }",
"public Date getDate() {\n return date;\n }",
"final public synchronized Date getDate() {\n return new Date(crtime) ;\n }",
"public Date getDate() {\n\t\n\t\treturn date;\n\t\n\t}",
"public Date getDate() {\n\t\treturn date_;\n\t}",
"public String getDate() {\t\n\t\treturn mDate;\n\t}",
"@Override\n\tpublic Date getDate() {\n\t\treturn this.description.getDate();\n\t}",
"public Date getAccessionDateDate() {\n\t\tString t = doc.get(\"collaccessiondate\");\n\n\t\tif (t == null)\n\t\t\treturn null;\n\n\t\ttry {\n\t\t\t// Stored in the form 20090207080305\n\t\t\treturn new Date(DateFieldTools.stringToTime(t));\n\t\t} catch (Throwable e) {\n\t\t\treturn null;\n\t\t}\n\t}",
"public Date getcDt() {\r\n\t\treturn cDt;\r\n\t}",
"public Record getCoverageContiguousEffectiveDate(Record record);",
"public String getDate() {\n\t\treturn mDate;\n\t}",
"@Override\n\tpublic java.util.Date getCreatedDate() {\n\t\treturn _locMstLocation.getCreatedDate();\n\t}",
"public Date getDate() {\n return date;\n }",
"public String getDate()\n {\n return day + \"/\" + month + \"/\" + year;\n }",
"public int getDate() {\n\t\treturn date;\n\t}",
"public Date getAgcProCertiObtDate() {\n\t\treturn agcProCertiObtDate;\n\t}",
"public java.util.Date getCivDate () {\n\t\treturn civDate;\n\t}",
"@HippoEssentialsGenerated(internalName = \"katharsisexampleshippo:date\")\n public Calendar getDate() {\n return getProperty(DATE);\n }",
"@Override\n public final Date getDocumentDate() {\n return this.manufacture.getItsDate();\n }",
"public int getDate() {\n return date ;\n }",
"public Calendar getDate()\n {\n return this.dateOfCreation;\n }",
"public Date date (){\r\n\t\t\treturn _date;\r\n\t\t}",
"public String getDsdate() {\n return dsdate;\n }",
"public long getDate() {\n return date_;\n }",
"public Date getDate() {\n return mDate;\n }",
"public String getAccessionDeaccessionToDate() {\n return accessionDeaccessionToDate;\n }",
"public CustomDate getDate() {\n return new CustomDate(date.getTime());\n }"
] | [
"0.6996338",
"0.69080067",
"0.64800435",
"0.64723",
"0.64637053",
"0.64575064",
"0.6413319",
"0.6413319",
"0.6388661",
"0.6381614",
"0.63808906",
"0.63759667",
"0.637343",
"0.6372942",
"0.6372942",
"0.6357778",
"0.6352931",
"0.6337108",
"0.6333565",
"0.6333565",
"0.6332645",
"0.6321238",
"0.63199294",
"0.63149726",
"0.63149726",
"0.63149726",
"0.63149726",
"0.63149726",
"0.63022864",
"0.6288308",
"0.62871075",
"0.6286315",
"0.62767994",
"0.62616944",
"0.62491584",
"0.62474465",
"0.62474465",
"0.6246848",
"0.6245637",
"0.6237547",
"0.6236066",
"0.6233543",
"0.6233543",
"0.6233543",
"0.62330955",
"0.6228486",
"0.6224447",
"0.6223372",
"0.6223372",
"0.6221339",
"0.62211716",
"0.6218187",
"0.62130934",
"0.62120765",
"0.6212053",
"0.61961955",
"0.6193465",
"0.6193465",
"0.6192123",
"0.617902",
"0.6177961",
"0.6177961",
"0.6177948",
"0.6177948",
"0.6177948",
"0.6177948",
"0.6177948",
"0.6177948",
"0.6177948",
"0.6177948",
"0.6177948",
"0.6177948",
"0.6177948",
"0.6177948",
"0.6177948",
"0.6177948",
"0.6175062",
"0.6169034",
"0.61683106",
"0.61563945",
"0.6154771",
"0.61445665",
"0.6143157",
"0.613718",
"0.6133263",
"0.6132752",
"0.61326283",
"0.6128482",
"0.6124847",
"0.61135364",
"0.6108547",
"0.6106186",
"0.6105716",
"0.6104611",
"0.60979545",
"0.6096556",
"0.6091185",
"0.60870886",
"0.6083847",
"0.60833216",
"0.60656816"
] | 0.0 | -1 |
Obtain the text information for this temporal coverage. | public final List<String> getText() {
ArrayList<String> al = new ArrayList<String>();
for (Iterator<Element> i = texts.iterator(); i.hasNext();) {
al.add(i.next().getTextContent());
}
return al;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getInfoText();",
"public String getText() {\n if (text == null) {\n return \"NO TEXT IN MEMORY.\";\n }\n return text.getTextPart();\n }",
"@Override\r\n\t\t\tpublic String getText() {\n\t\t\t\treturn text;\r\n\t\t\t}",
"public String getText()\n\t{\n\t\treturn text;\n\t}",
"public String getText()\n\t{\n\t\treturn text;\n\t}",
"public String getText()\n\t{\n\t\treturn text;\n\t}",
"public String getText() {\n return (getFieldValue(fields[0]) + \".\" + getFieldValue(fields[1]) + \".\" + getFieldValue(fields[2]) + \".\" + getFieldValue(fields[3]));\n }",
"public java.lang.String getCoverage()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(COVERAGE$4);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }",
"public String getText(){\r\n\t\treturn text;\r\n\t}",
"public String getText() {\n StringBuffer textBuffer = new StringBuffer();\n Object obj;\n int segment;\n for (segment = 0; segment < this.TOTALSEGMENTS; segment++) {\n obj = null;\n Method getter = this.getTextGetter(segment);\n try {\n obj = getter.invoke(this, new Object[] {});\n } catch (IllegalAccessException e) {\n throw new RuntimeException(\"That segment doesn't exist.\");\n } catch (InvocationTargetException e) { \n throw new RuntimeException(\"Unable to invoke that method..\");\n }\n \n if (obj != null ) {\n String stringToAppend = (String) obj;\n textBuffer.append (stringToAppend);\n // logger.debug (\"Appending a string of length \" + stringToAppend.length());\n }\n }\n // logger.debug(\"getText returned \" + textBuffer.length() + \"chars.\" );\n return textBuffer.toString();\n }",
"public String getTextAsString () {\n\t\tString val = null;\n\t\tif(text!=null) {\n\t\t\tText t = text.getText();\n\t\t\tTextLine[] lines = t.getLines();\n\t\t\t\n\t\t\tif(lines.length >0) {\n\t\t\t\tint endline = lines.length - 1;\n\t\t\t\tTextLine lastline = lines[endline];\n\t\t\t\tif(lastline!= null) {\n\t\t\t\t\tint endOffset = lastline.getLength();\n\t\t\t\t\tTextRange tr = new TextRange(new TextLocation(0,0), new TextLocation(endline,endOffset));\n\t\t\t\t\tval = t.getText(tr);\n\t\t\t\t} \n\t\t\t}\n\t\t}\n\t\treturn val;\n\t}",
"public final String getText() {\n\t\treturn text;\n\t}",
"public String getText() {\n\t\treturn text;\n\t}",
"public String getText() {\n\t\treturn text;\n\t}",
"public String getText() {\n\t\treturn text;\n\t}",
"public String getText() {\n\t\treturn text;\n\t}",
"public String getText() {\n\t\treturn text;\n\t}",
"public String getText() {\n\t\treturn text;\n\t}",
"public String getText() {\n\t\t\treturn text.get();\n\t\t}",
"public String getText() {\r\n\t\treturn text;\r\n\t}",
"public String getText() {\r\n\t\treturn text;\r\n\t}",
"@Override\n public String[] getExtraText(DataTime time) {\n VizRadarRecord record = getRadarRecord(time);\n if (record == null) {\n return null;\n }\n String[] result = upperTextMap.get(time);\n if (result == null && !upperTextMap.containsKey(time)) {\n if (record.getStoredDataAsync() == null) {\n return null;\n }\n List<IRadarTextContributor> lines = UpperTextSet\n .getContributors(record.getProductCode());\n if (lines != null) {\n result = new String[lines.size()];\n for (int i = 0; i < result.length; i++) {\n result[i] = lines.get(i).contributeText(record);\n }\n // Remove blank lines from the end.\n while (result[result.length - 1].isEmpty()) {\n result = Arrays.copyOfRange(result, 0, result.length - 1);\n }\n }\n upperTextMap.put(time, result);\n }\n return result;\n }",
"protected Text getText() {\n \t\treturn text;\n \t}",
"public final String getText() {\n return text;\n }",
"public String getText() {\n\t\tif (isAdjacentTo!=null) {\r\n\t\t\treturn isAdjacentTo.getText();\r\n\t\t} else {\r\n\t\t\tint commentStartIndex = start-offsetToStartOfCommentTextInFile+taskTag.length();\r\n\t\t\tint commentEndIndex = end-offsetToStartOfCommentTextInFile+1;\r\n\t\t\treturn commentText.substring(commentStartIndex,commentEndIndex).trim();\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic String toString() {\r\n\t\treturn text.toString();\r\n\t}",
"public String getInformation() {\n \treturn \"This is a Maths Assessment\" +\n \t\t\t \"\\nNumber of questions: \" + Integer.toString(numQuestions) + \n \t\t\t \"\\nClosing Date: \" + closingDate;\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\r\n return text;\r\n }",
"public String getText() {\r\n return text;\r\n }",
"public String getCoverage() {\n/* 98 */ return getValue(\"coverage\");\n/* */ }",
"public String getText() {\r\n return text;\r\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\n return text;\n }",
"public String getText() {\n return text;\n }",
"public P getText() {\n return this.slp.getProduction(text);\n }",
"public String getText() {\n return mTextContainer.getText();\n }",
"public String getText() {\n\t\treturn this.text;\n\t}",
"public String getText() {\n\t\treturn this.text;\n\t}",
"public java.lang.String getText() {\n \t\treturn text;\n \t}",
"public java.lang.String getReportText(){\n return localReportText;\n }",
"public CharSequence obtainTextToMeasure() {\n return this.textView.getText();\n }",
"public String getText() {\n return text.getText();\n }",
"public String getText()\r\n {\r\n return this.text;\r\n }",
"public String getText()\n {\n return (this.text);\n }",
"public String getText() {\n if (!this.a_text.isEnabled())\n return null;\n\n return this.a_text.getText();\n }",
"protected Text getText()\r\n\t{\r\n\t\treturn text;\r\n\t}",
"public String text() { return text; }",
"public synchronized String getText() {\n\t\treturn text;\n\t}",
"@Override\n public String toString() {\n return text;\n }",
"public String toString() {\n return getText();\n }",
"public String text() {\n\t\treturn text;\n\t}",
"public String getText() {\n if (Language.isEnglish()) {\n return textEn;\n } else {\n return textFr;\n }\n }",
"public CharSequence getText() {\r\n return text;\r\n }",
"public String getText() {\n return this.text;\n }",
"public String getText() {\n return this.text;\n }",
"public String getText() {\n return this.text;\n }",
"public String getText() {\n return this.text;\n }",
"public String getText() {\n return this.text;\n }",
"public String getText() {\n return this.text;\n }",
"public String getText() {\n return myText;\n }",
"public String getText() {\n return mText;\n }",
"public final String zzb() {\n return this.secondaryText;\n }",
"String getToText();",
"public String getText() {\r\n return this.text;\r\n }",
"public String getText() {\n\t\treturn null;\n\t}",
"@Nullable\n final public String getText() {\n return mText;\n }",
"public String text() {\r\n return mText;\r\n }",
"@Override\n\tpublic String getText(Object object)\n\t{\n\t\tCadence cadence = (Cadence)object;\n\t\treturn getString(\"_UI_Cadence_type\") + \" \" + cadence.getFrequency();\n\t}",
"public String getCopyText(){\n // build text string (don't start with a blank as cursor is on\n // first date field\n StringBuilder sb = new StringBuilder();\n \n // add date\n sb.append(new SimpleDateFormat(\"dd MM yy\").format(this.getStartTime().getTime()));\n \n // 4 spaces between date and hours\n sb.append(\" \");\n \n // hours\n sb.append(Integer.toString(this.getHours()));\n \n // 3 spaces between hours and mins\n sb.append(\" \");\n \n // mins\n sb.append(this.getMinutesStr());\n\n // 2 spaces between hours and mins\n sb.append(\" \"); \n \n // add job number\n sb.append(this.getJobNoStr());\n \n // end of line\n sb.append(\"\\n\");\n \n // 15 spaces at start of second line\n sb.append(\" \");\n \n // description\n sb.append(this.getDescription());\n \n // end of line\n sb.append(\"\\n\");\n \n return sb.toString();\n }",
"public String getText() {\n return mBuilder.toString();\n }",
"public java.lang.String getText() {\n return text_;\n }",
"@Exported(visibility = 999)\n public String getText() {\n return text;\n }",
"@Override\n public String toString() {\n return this.text;\n }",
"@Override\n public String toString() {\n return this.text;\n }",
"public String getTextAccumulatorLabel() {\r\n\t\tString str = safeGetText(vehicleName.replace(\"Vehicle Name\", \"Accumulater\"), SHORTWAIT);\r\n\t\treturn str;\r\n\t}",
"public String getText() {\n\t\treturn loadingInfo.getInnerText();\n\t}",
"public String getText(){\n return this.sOut.toString();\n }",
"public String getText(){\r\n return text;\r\n }",
"public String getText(int index) {\r\n\t ChartDataHistogramDouble thCartData = ((ChartDataHistogramDouble) chartData);\r\n\t\tif (index < 0 || index >= this.getNumOfData()) return \"\";\r\n\t\telse return thCartData.getObservedString(index);\r\n\t}",
"@Nullable\n public String getText() {\n return mText;\n }",
"java.lang.String getExperienceText();",
"public String getCopyRightText() {\r\n\t\tfooterCopyright = driver.findElement(footerCopyrightSelector);\r\n\t\treturn footerCopyright.getText();\r\n\t\t\r\n\t}",
"public String getInfoString();",
"java.lang.String getHotelText();",
"public java.lang.String getText() {\n return this.text;\n }",
"public String getTextContent() {\n\t\treturn ((TextTypeImpl)_text).getStringValue();\n\t}"
] | [
"0.66442347",
"0.6173888",
"0.6150021",
"0.61199045",
"0.61199045",
"0.61199045",
"0.6107438",
"0.6075178",
"0.6074306",
"0.6068045",
"0.6063963",
"0.60587543",
"0.604781",
"0.604781",
"0.604781",
"0.604781",
"0.604781",
"0.604781",
"0.60466486",
"0.60381556",
"0.60381556",
"0.6019242",
"0.601681",
"0.5999561",
"0.59942114",
"0.59928083",
"0.5986144",
"0.5985688",
"0.5985688",
"0.5985688",
"0.5985688",
"0.5985688",
"0.5985688",
"0.5985688",
"0.5985688",
"0.5985688",
"0.5985688",
"0.5985688",
"0.5985688",
"0.5985688",
"0.59809005",
"0.59809005",
"0.5956139",
"0.59466743",
"0.5943663",
"0.5943663",
"0.5943663",
"0.5943663",
"0.5943663",
"0.594128",
"0.5936017",
"0.5928005",
"0.5928005",
"0.59195244",
"0.59158987",
"0.5914506",
"0.5906844",
"0.5903979",
"0.5893371",
"0.5888767",
"0.58844453",
"0.5879704",
"0.5878301",
"0.5868999",
"0.5863735",
"0.58635944",
"0.58632237",
"0.5855954",
"0.5846488",
"0.5846488",
"0.5846488",
"0.5846488",
"0.5846488",
"0.5846488",
"0.5831167",
"0.58216757",
"0.58132595",
"0.5808709",
"0.58005404",
"0.57921755",
"0.578108",
"0.57792115",
"0.577891",
"0.5768254",
"0.57657593",
"0.57644737",
"0.5763131",
"0.576235",
"0.576235",
"0.57528365",
"0.5741289",
"0.57396704",
"0.5738594",
"0.57345855",
"0.5679504",
"0.5674149",
"0.56727844",
"0.5672352",
"0.5672129",
"0.5665613",
"0.565058"
] | 0.0 | -1 |
Add text information to the temporal object. | public final void addText(final String text) {
Element e = this.newElement(Constants.ELEMENT_TEXT);
e.setTextContent(text);
this.getElement().appendChild(e);
this.texts.add((Element) e);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\t\tpublic void addText(String txt) {\n\t\t\t\n\t\t}",
"public void addText(String text) {\n\t\tthis.text = text;\n\t}",
"public void insertStaticText(String text){\n if(lastText != null){\n lastText.clear();\n }\n lastText = new TextBuilder(text);\n lastText.build();\n }",
"public void addText(Text text)\n {\n texts.add(text);\n }",
"public void addText(String text) {\n\t\tNodeList frameList = maNoteElement.getElementsByTagNameNS(OdfDocumentNamespace.DRAW.getUri(), \"frame\");\n\t\tif (frameList.getLength() > 0) {\n\t\t\tDrawFrameElement frame = (DrawFrameElement) frameList.item(0);\n\t\t\tNodeList textBoxList = frame.getElementsByTagNameNS(OdfDocumentNamespace.DRAW.getUri(), \"text-box\");\n\t\t\tif (textBoxList.getLength() > 0) {\n\t\t\t\tDrawTextBoxElement textBox = (DrawTextBoxElement) textBoxList.item(0);\n\t\t\t\tTextPElement newPara = textBox.newTextPElement();\n\t\t\t\tnewPara.setTextContent(text);\n\t\t\t}\n\t\t}\n\t}",
"public void addText(String text) {\n this.historyTextLog.append(text);\n }",
"public void addText(String text) {\n resultsText.append(text);\n }",
"void addHadithText(Object newHadithText);",
"public TextBuilder addStaticText(String text){\n if(lastText != null){\n lastText.clear();\n }\n lastText = new TextBuilder(text);\n return lastText;\n }",
"public void setInfoText(String infoText);",
"public void addText(SalesOrderText... entity) {\r\n if (toText == null) {\r\n toText = Lists.newArrayList();\r\n }\r\n toText.addAll(Lists.newArrayList(entity));\r\n }",
"public void setInfoText(String text) {\n/*Generated! Do not modify!*/ replyDTO.getVariablesToSet().add(\"overviewSmall_info_propertyText\");\n/*Generated! Do not modify!*/ if (text == null) {\n/*Generated! Do not modify!*/ replyDTO.getVariableValues().remove(\"overviewSmall_info_propertyText\");\n/*Generated! Do not modify!*/ } else {\n/*Generated! Do not modify!*/ replyDTO.getVariableValues().put(\"overviewSmall_info_propertyText\", text);\n/*Generated! Do not modify!*/ }\n/*Generated! Do not modify!*/ if (recordMode){\n/*Generated! Do not modify!*/ addRecordedAction(\"setInfoText(\" + escapeString(text) + \");\");\n/*Generated! Do not modify!*/ }\n/*Generated! Do not modify!*/ }",
"public void setText(String text) {\n this.textData = text;\n }",
"public void appendModelEvent(String text) {\n try {\n DateFormat dateFormat = new java.text.SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\");\n Date date = new Date();\n StyledDocument doc = screenTP.getStyledDocument();\n doc.insertString(doc.getLength(), formatForPrint(dateFormat.format(date) + \" - \" + text), doc.getStyle(\"modelEvent\"));\n screenTP.setCaretPosition(doc.getLength());\n } catch (BadLocationException ex) {\n AdaptationSuperviser.logger.error(\"Error while trying to append incoming message in the \" + this.getName(), ex);\n }\n }",
"void antsInfo(String text);",
"private void setText(Text text) {\n \t\tthis.text = text;\n \t}",
"public final void addText(final String textContent) {\n\t\tthis.text = textContent.trim();\n\t\tif (this.text.length() == 0) {\n\t\t\tthis.text = null;\n\t\t}\n\t}",
"public void updateText( String text ) {\n\t\tthis.text = text;\n\t}",
"Builder addText(Text value);",
"public void addText(String newText) {\n lb.setText(newText + \"\\n\" + lb.getText());\n instance.setVvalue(0);\n }",
"Builder addText(String value);",
"public void setText(String text){\n this.roomText = text;\n this.hasText = true;\n }",
"public void addText(IText text) {\n var name = \"Text\"; // TODO should texts have a name? E.g. the filename etc.?\n var textIndividual = ontologyConnector.addIndividualToClass(name, textClass);\n var uuid = ontologyConnector.getLocalName(textIndividual);\n ontologyConnector.addPropertyToIndividual(textIndividual, uuidProperty, uuid);\n\n ImmutableList<IWord> words = text.getWords();\n\n // first add all word individuals\n var wordIndividuals = new ArrayList<Individual>();\n var wordsToIndividuals = new HashMap<IWord, Individual>();\n for (var word : words) {\n var wordIndividual = addWord(word);\n wordIndividuals.add(wordIndividual);\n wordsToIndividuals.put(word, wordIndividual);\n }\n\n // add dependencies to words.\n // We only add outgoing dependencies as ingoing are the same (but viewed from another perspective)\n for (var word : words) {\n var wordIndividual = wordsToIndividuals.get(word);\n for (var dependencyType : DependencyTag.values()) {\n var outDependencies = word.getWordsThatAreDependencyOfThis(dependencyType);\n for (var outDep : outDependencies) {\n var outWordIndividual = wordsToIndividuals.get(outDep);\n addDependencyBetweenWords(wordIndividual, dependencyType, outWordIndividual);\n }\n }\n }\n\n // create the list that is used for the words property\n var olo = ontologyConnector.addList(\"WordsOf\" + name, wordIndividuals);\n var listIndividual = olo.getListIndividual();\n ontologyConnector.addPropertyToIndividual(textIndividual, wordsProperty, listIndividual);\n\n // add coref stuff\n var corefClusters = text.getCorefClusters();\n for (var corefCluster : corefClusters) {\n var representativeMention = corefCluster.getRepresentativeMention();\n var corefClusterIndividual = ontologyConnector.addIndividualToClass(representativeMention, corefClusterClass);\n ontologyConnector.addPropertyToIndividual(corefClusterIndividual, uuidProperty, \"\" + corefCluster.getId());\n ontologyConnector.addPropertyToIndividual(corefClusterIndividual, representativeMentionProperty, representativeMention);\n ontologyConnector.addPropertyToIndividual(textIndividual, hasCorefClusterProperty, corefClusterIndividual);\n\n var counter = 0;\n for (var mention : corefCluster.getMentions()) {\n var id = corefCluster.getId() + \"_\" + counter;\n counter += 1;\n var label = ICorefCluster.getTextForMention(mention);\n\n var mentionIndividual = ontologyConnector.addIndividualToClass(label, corefMentionClass);\n ontologyConnector.addPropertyToIndividual(mentionIndividual, uuidProperty, id);\n ontologyConnector.addPropertyToIndividual(corefClusterIndividual, mentionProperty, mentionIndividual);\n\n var mentionWordsIndividuals = getMentionWordIndividuals(mention, wordsToIndividuals);\n var mentionOlo = ontologyConnector.addList(\"WordsOf Mention \" + id, mentionWordsIndividuals);\n ontologyConnector.addPropertyToIndividual(mentionIndividual, wordsProperty, mentionOlo.getListIndividual());\n }\n }\n\n }",
"private void appendText(String text) {\n textArea.appendText(text);\n }",
"public TextLine(String text) {\n\t\tthis.text = text.toString();\n\t}",
"public void storeNote(String text) {\r\n\t\tTextNote note = new TextNote();\r\n\t\tnote.setText(text);\r\n\t\tthis.TextNoteList.add(note);\r\n\t}",
"public void addText(String texto) {\n\t\tthis.texto = texto == null ? \"\" : texto.trim();\n\t}",
"@Override\r\n\tpublic void setText(String text) {\n\t\tsuper.setText(foundedRecords + \" : \" +text);\r\n\t}",
"public void saveText() {\n\t\t\tapp.saveStrings(\"./data/exports/ID_Order.txt\", saveIDOrder);\n\t\t\t//Saving the new name text\n\t\t\tapp.saveStrings(\"./data/exports/Name_Order.txt\", saveNameOrder);\n\t\t\t//Saving the new breed text\n\t\t\tapp.saveStrings(\"./data/exports/Breed_Order.txt\", saveBreedOrder);\n\t\t\t//Saving the new date text\n\t\t\tapp.saveStrings(\"./data/exports/Date_Order.txt\", saveDateOrder);\n\t\t\n\t}",
"public Text(String text)\n {\n super(text);\n initialize();\n }",
"public void appendText(String text) {\n\t\ttry {\n\t\t\tDocument doc = getDocument();\n\n\t\t\t// Move the insertion point to the end\n\t\t\tsetCaretPosition(doc.getLength());\n\n\t\t\t// Insert the text\n\t\t\treplaceSelection(text);\n\n\t\t\t// Convert the new end location\n\t\t\t// to view co-ordinates\n\t\t\tRectangle r = modelToView(doc.getLength());\n\n\t\t\t// Finally, scroll so that the new text is visible\n\t\t\tif (r != null) {\n\t\t\t\tscrollRectToVisible(r);\n\t\t\t}\n\t\t} catch (BadLocationException e) {\n\t\t\tSystem.out.println(\"Failed to append text: \" + e);\n\t\t}\n\t}",
"private void postInfo(String text) {\r\n\t\tLabel hLabel = new Label(labelInfo.getText());\r\n\t\thLabel.addStyleName(Styles.battle_info);\r\n\t\t//add the old info to the history\r\n\t\tvPanelInfoHistory.insert(hLabel, 0);\r\n\t\tlabelInfo.setText(SafeHtmlUtils.htmlEscape(text));\r\n\t}",
"public void setTextSettings(){\n\n ArrayList<Text> headlines = new ArrayList<>();\n //Add any text element here\n //headlines.add(this.newText);\n\n Color textColorHeadlines = new Color(0.8,0.8,0.8,1);\n\n for ( Text text : headlines ){\n text.setFont(Font.font(\"verdana\", FontWeight.BOLD, FontPosture.REGULAR, 20));\n text.setFill(textColorHeadlines);\n text.setEffect(new DropShadow(30, Color.BLACK));\n\n }\n\n }",
"public Text(double x, double y, String text)\n {\n super(x, y, text);\n initialize();\n }",
"Text createText();",
"public Hologram addText(String text) {\n this.text.add(text);\n return this;\n }",
"public void appendSystem(String text) {\n try {\n StyledDocument doc = screenTP.getStyledDocument();\n doc.insertString(doc.getLength(), formatForPrint(text), doc.getStyle(\"system\"));\n } catch (BadLocationException ex) {\n// ex.printStackTrace();\n AdaptationSuperviser.logger.error(\"Error while trying to append system message in the \" + this.getName(), ex);\n }\n }",
"private void addText(Context context,Global global,String text)\n {\n if(_currentTableRow!=null && _currentTableCell==null) {\n closeParagraph(context,global);\n _currentTableCell=new TableSection.Cell();\n int width=_cellWidths.get(_currentTableRow.getCells().size());\n _currentTableRow.getCells().add(_currentTableCell);\n _currentParagraphList=_currentTableCell.getContent();\n _currentTableCell.setWidth(width/20.0);\n }\n \n if(_currentParagraph==null)\n newParagraph(context,global);\n \n if(_currentSection==null||!(_currentSection instanceof TextSection))\n {\n _currentSection=new TextSection();\n _currentParagraph.getSections().add(_currentSection);\n TextSection ts=(TextSection)_currentSection;\n ts.setStyle(context.getTextStyle().clone());\n }\n \n TextSection ts=(TextSection)_currentSection;\n if(!ts.getStyle().equals(context.getTextStyle()))\n {\n _currentSection=new TextSection();\n _currentParagraph.getSections().add(_currentSection);\n ts=(TextSection)_currentSection;\n ts.setStyle(context.getTextStyle().clone());\n }\n \n int listId=context.getListId();\n if(listId!=0)\n {\n int level=context.getLevel()+1;\n int id=global.getListOverrides().get(listId);\n NumberedList nl=global.getNumberedListWithPred(id,level);\n ParagraphStyle st=global.getLists().get(id).get(level-1);\n context.getParagraphStyle().setBulletStyle(st.getBulletStyle());\n if(st.getBulletStyle()!=ParagraphStyle.BulletStyle.BULLET)\n {\n context.getParagraphStyle().setBulletTextStyle(context.getTextStyle());\n context.getParagraphStyle().setBulletText(st.getBulletText());\n }\n context.getParagraphStyle().setList(nl);\n }\n \n ts.setText(ts.getText()+text);\n }",
"public void addText(String text){\n try{\n FXMLLoader battleLogEntryLoader = new FXMLLoader(getClass().getClassLoader().getResource(\"FXML/BattleLogEntry.fxml\"));\n Label battleLogEntryLabel = battleLogEntryLoader.load();\n battleLogEntryLabel.setText(text);\n if(count % 2 == 0){\n battleLogEntryLabel.setBackground(new Background(new BackgroundFill(Color.LIGHTGRAY, CornerRadii.EMPTY, Insets.EMPTY)));\n } else{\n battleLogEntryLabel.setBackground(new Background(new BackgroundFill(Color.TRANSPARENT, CornerRadii.EMPTY, Insets.EMPTY)));\n }\n textSpace.getChildren().add(battleLogEntryLabel);\n count++;\n } catch(Exception e) {\n\n }\n }",
"public void setText(String text) {\n\t\tif (measureType != null) {\n\t\t\tsuper.setText(text + \" \" + measureType);\n\t\t} else {\n\t\t\tsuper.setText(text);\n\t\t}\n\t}",
"private void updateText(){\n\t\tif(propertiesObj == null)\n\t\t\treturn;\n\n\t\tif(propertiesObj instanceof QuestionDef)\n\t\t\t((QuestionDef)propertiesObj).setText(txtText.getText());\n\t\telse if(propertiesObj instanceof OptionDef)\n\t\t\t((OptionDef)propertiesObj).setText(txtText.getText());\n\t\telse if(propertiesObj instanceof PageDef)\n\t\t\t((PageDef)propertiesObj).setName(txtText.getText());\n\t\telse if(propertiesObj instanceof FormDef)\n\t\t\t((FormDef)propertiesObj).setName(txtText.getText());\n\n\t\tformChangeListener.onFormItemChanged(propertiesObj);\n\t}",
"public void getText(){\n\t\tnoteText.setText(note.getText());\n\t}",
"public void setTxt(String txt) {\n this.txt = txt;\n }",
"public void Addtxt (String txt) {\n clearZero();\n lastNumber = true;\n displayResult.setText(displayResult.getText()+txt);\n }",
"public void addText(User user, String text, User dst) {\n try {\n DefaultStyledDocument doc = dst.getDoc();\n if (jic.isTimeStamping())\n doc.insertString(doc.getLength(), Util.getTimeStamp(jic.getTimeStampFormat()) + \" \", doc.getStyle(\"timestamp\"));\n doc.insertString(doc.getLength(), user.getUsername(), doc.getStyle(\"color_\" + user.toString()));\n doc.insertString(doc.getLength(), \": \", doc.getStyle(\"regular\"));\n addSmiledString(text, doc);\n doc.insertString(doc.getLength(), \"\\n\", doc.getStyle(\"regular\"));\n // Notify\n if (currentUser != dst) {\n dst.setNotifying(true);\n updateUserList();\n }\n if (((getExtendedState() & JFrame.ICONIFIED) != 0) || !isActive())\n setTrayBlink();\n } catch (BadLocationException e) {\n // TODO\n // This can not occur at all\n }\n }",
"public void setText(String t) {\n\t\t\ttext.set(t);\n\t\t}",
"public void setTextFechaInsercionEd(String text) { doSetText(this.$element_FechaInsercionEd, text); }",
"public void setText(String text) {\r\n this.text = text;\r\n }",
"public void setText(String text)\n {\n this.text = text;\n }",
"public void setText(String text) {\n this.text = text;\n }",
"public void setText(String text) {\n this.text = text;\n }",
"public void setText(String text) {\n this.text = text;\n }",
"public void setText(String text) {\n this.text = text;\n }",
"public void setText(String text) {\n this.text = text;\n }",
"public void setText(String text) {\n this.text = text;\n }",
"public void setText(String text) {\n this.text = text;\n }",
"public void appendToText(String text) {\n if(this.text == null)\n this.text = new StringBuilder();\n if(StringUtils.hasLength(text))\n this.text.append(text);\n }",
"public void setText(String text) {\r\n\t\tthis.text = text;\r\n\t}",
"public void setText(String text) {\r\n\t\tthis.text= text;\r\n\t}",
"public TextLog(long completedTime, String behaviorText)\n {\n super(completedTime);\n this.behaviorText = behaviorText;\n }",
"public Element addText(String text) {\n Assert.isTrue(text != null, \"Text is null\");\n element.appendChild(element.getOwnerDocument().createTextNode(text));\n\n return this;\n }",
"private void addTextObject(GraphicObject g_obj, int x, int y) {\n Color stroke = new Color(0, 0, 0, 0);\n\n g_obj.setFillColor(this.currentFillColor);\n g_obj.setStroke(stroke, 0);\n\n\t\tthis.canvas.add(g_obj, x, y);\n\t}",
"public void setText(String text) {\n\t\tthis.text = text;\n\t}",
"public void setText(String text) {\n\t\tthis.text = text;\n\t}",
"public void setText(String text) {\n\t\tthis.text = text;\n\t}",
"public void setCustomText(String text) {\n\t\tthis.text = text;\n\t\tcustomUpdateView();\n\t}",
"@Override\r\n\tpublic void setText() {\n\t\t\r\n\t}",
"void writeText(FsPath path, String text);",
"public void setText(String text)\n\t{\n\t\tthis.text = text;\n\t}",
"public void setText(String text)\n\t{\n\t\tthis.text = text;\n\t}",
"public void addTextAfterHelp(String _text){\r\n\t\tthis.afterTextHelp=_text;\r\n\t}",
"private void makeTweet(String text) {\n\t\tassertNotNull(activity.findViewById(ca.ualberta.cs.lonelytwitter.R.id.save));\n\t\ttextInput.setText(text);\n\t\t((Button) activity.findViewById(ca.ualberta.cs.lonelytwitter.R.id.save)).performClick();\n\t}",
"protected void writeLog(String text){\n File logFile = new File(logFilePath);\n try {\n FileWriter fr = new FileWriter(logFile, true);\n fr.write(String.format(\"%s:\\t%s\\n\", getCurrentDate(), text));\n fr.close();\n } catch (IOException e){\n e.printStackTrace();\n }\n }",
"public void addText(String str) {\r\n\t\tdialog.setText(dialog.getText()+str);\r\n\t}",
"public static void WriteTime(Date init, String text) {\n\t\tDate after = new Date();\n\t\tlong diffInMs = after.getTime() - init.getTime();\n\t\tif(Constants.DEBUG) Log.i(Constants.TAG, text + diffInMs);\n\t}",
"private void createText() {\n Texture texture = new Texture(Gdx.files.internal(\"Text/item.png\"));\n texture.setFilter(Texture.TextureFilter.Linear, Texture.TextureFilter.Linear);\n TextureRegion region = new TextureRegion(texture);\n display = new BitmapFont(Gdx.files.internal(\"Text/item.fnt\"), region, false);\n display.setUseIntegerPositions(false);\n display.setColor(Color.BLACK);\n }",
"public void setCustomText(String trn) {\n\t\t\n\t}",
"public void setText(String text) {\n\t\t\n\t}",
"public void renderText(TextRenderInfo renderInfo) {\n \tsuper.renderText(renderInfo);\n\t\tpage.setText(getResultantText());\n \twriteText();\n }",
"public final TText addText(final String text, final int x, final int y,\n final int width, final int height) {\n\n return new TText(this, text, x, y, width, height, \"ttext\");\n }",
"@Override\n\tpublic void draw3dText(Vector3f location, String textString) {\n\n\t}",
"public void setText(String text) {\r\n\r\n\t}",
"public void textLogger(String text) {\n loggerTextarea.append(text + \"\\n\");\n }",
"public void add(String text){\n\t\thead = add(text, head ,0);\n\t}",
"public abstract void setText(String txt);",
"public Journal(String name, String text)\n {\n this.name = name;\n this.text = text;\n this.date = currentDate;\n this.time = currentTime;\n this.uneditedName = name;\n }",
"public static String createUpdatedText(String oldText, String newText) {\n\n\t\tStringBuilder fullText = new StringBuilder(oldText);\n\n\t\tDateFormat dateFormat = new SimpleDateFormat(DATETIME_FORMAT);\n\t\tDate date = Calendar.getInstance().getTime();\n\t\tString formatDate = dateFormat.format(date);\n\t\tfullText.append(EDIT_INFO.replace(PLACEHOLDER, formatDate));\n\n\t\tfullText.append(newText);\n\n\t\treturn fullText.toString();\n\n\t}",
"private void setText() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }",
"public void setText(String text) {\n this.text = text;\n setChanged();\n notifyObservers();\n }",
"public XmlProtoElementBuilder addChildText(String text) {\n element.addChild(XmlNode.newBuilder().setText(text));\n return this;\n }",
"private void appendText()\n\t{\n\t\tString fieldText = \"\";\n\t\tString newText = \"\";\n\t\tfieldText = entry.getText();\n\t\t\n\t\tif(fieldText.equals (\"0\"))\n\t\t{\n\t\t\tnewText += append;\n\t\t\tfieldText = newText;\n\t\t\tentry.setText (fieldText);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfieldText += append;\n\t\t\tentry.setText (fieldText);\n\t\t}\n\t\t\n\t\tentry.grabFocus ( );\n\t\t\n\t}",
"public void setText(String text) {\n mText = text;\n }",
"private void IsiTabel(String text) {\n IsiTabel = new TextView(getActivity());\n IsiTabel.setText(text);\n IsiTabel.setTextColor(getResources().getColor(R.color.fontTabel));\n IsiTabel.setLayoutParams(new TableRow.LayoutParams(TableRow.LayoutParams.MATCH_PARENT, TableRow.LayoutParams.WRAP_CONTENT));\n IsiTabel.setBackground(getResources().getDrawable(R.drawable.background_tabel));\n TR.addView(IsiTabel);\n }",
"public void setExtraText(String string) {\n\t\t\n\t}",
"public void setText(java.lang.String newText) {\n \t\ttext = newText;\n \t}",
"public AnnotationTextEdit(GraphAnnotationNote _annotationNote,\n String _oldText, String _newText) {\n annotationNote = _annotationNote;\n oldText = _oldText;\n newText = _newText;\n }",
"public TextConstruct(String name)\n\t{\n super(name);\n this.type = ContentType.TEXT;\n\t}",
"public void setText(String text) {\n this.text.setText(text);\n }",
"private void txt() {\n\n\t}",
"void baInfo(String text);"
] | [
"0.731248",
"0.70561975",
"0.67344165",
"0.67320263",
"0.6694785",
"0.65806943",
"0.6528926",
"0.6504011",
"0.6407461",
"0.6375882",
"0.6280745",
"0.62789625",
"0.62785304",
"0.6222055",
"0.61487097",
"0.61213136",
"0.61132264",
"0.6015889",
"0.60015464",
"0.599229",
"0.59766865",
"0.5967797",
"0.5960847",
"0.5951414",
"0.5948636",
"0.5941345",
"0.5940415",
"0.58878493",
"0.5886414",
"0.5876726",
"0.5873678",
"0.5871906",
"0.586733",
"0.5856732",
"0.5846383",
"0.5846175",
"0.58369",
"0.5831622",
"0.58254546",
"0.57860893",
"0.57587945",
"0.57475334",
"0.5743126",
"0.57332313",
"0.5713694",
"0.569853",
"0.5674008",
"0.5664595",
"0.5663046",
"0.5654159",
"0.5654159",
"0.5654159",
"0.5654159",
"0.5654159",
"0.5654159",
"0.5654159",
"0.56375927",
"0.5618298",
"0.561456",
"0.56054944",
"0.5603412",
"0.5596355",
"0.5595392",
"0.5595392",
"0.5595392",
"0.5591235",
"0.55822515",
"0.5562584",
"0.55600643",
"0.55600643",
"0.5558134",
"0.55575645",
"0.55530715",
"0.55443203",
"0.554267",
"0.5535492",
"0.55304503",
"0.5522668",
"0.55220324",
"0.55138916",
"0.5513081",
"0.55122244",
"0.55005795",
"0.5498421",
"0.54972273",
"0.5496122",
"0.54959667",
"0.5495949",
"0.54841083",
"0.5483728",
"0.5468496",
"0.54581994",
"0.54482013",
"0.5435013",
"0.5431928",
"0.54176027",
"0.541347",
"0.5411904",
"0.5410089",
"0.54089344"
] | 0.6031346 | 17 |
Add temporal date to the coverage object. A convenience method creating a single temporal element with a date element. | public final void addDate(final String date, final String type)
throws RIFCSException {
this.addDate(date, type, "W3C");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public DataResourceBuilder _temporalCoverage_(TemporalEntity _temporalCoverage_) {\n this.dataResourceImpl.getTemporalCoverage().add(_temporalCoverage_);\n return this;\n }",
"Builder addDateCreated(Date value);",
"void addDate(long t) {\n\tif (act != null) {\n\t long date = act.getDate() + t;\n\t act.setLocation(act.getMap(), act.getX(), act.getY(), date);\n\t}\n }",
"public static void AddDateTimeAttribute( DataSet DS, Date date )\n {\n if( date == null )\n date = new Date( System.currentTimeMillis( ));\n \n java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat();\n \n sdf.applyPattern( \"dd-MMM-yy\" );\n \n DS.setAttribute( new StringAttribute( Attribute.END_DATE , sdf\n .format( date ) ) );\n \n sdf.applyPattern( \"HH:mm:ss\" );\n \n DS.setAttribute( new StringAttribute( Attribute.END_TIME , sdf\n .format( date ) ) );\n }",
"public void addDate(Date value) {\n/* 132 */ addDateToSeq(\"date\", value);\n/* */ }",
"Builder addDateCreated(DateTime value);",
"public void addDate( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(this.model, this.getResource(), DATE, value);\r\n\t}",
"public final void addDate(final Date date,\n final String type) throws RIFCSException {\n DateFormat df = new SimpleDateFormat(TEMPORAL_DATE_FORMAT);\n String text = df.format(date);\n String result = text.substring(0, TEMPORAL_DATE_FORMAT_LENGTH)\n + \":\" + text.substring(TEMPORAL_DATE_FORMAT_LENGTH);\n this.addDate(result, type);\n }",
"org.hl7.fhir.DateTime addNewAppliesDateTime();",
"public static void AddDateTimeAttribute( DataSet DS, long date)\n {\n if( date <= 0 )\n date = System.currentTimeMillis( );\n \n Util.AddDateTimeAttribute( DS, new Date( date ));\n }",
"public abstract void add(Date212 date);",
"Builder addDatePublished(Date value);",
"public void addDate(java.util.Calendar value) {\r\n\t\tBase.add(this.model, this.getResource(), DATE, value);\r\n\t}",
"public DataResourceBuilder _temporalCoverage_(List<TemporalEntity> _temporalCoverage_) {\n this.dataResourceImpl.setTemporalCoverage(_temporalCoverage_);\n return this;\n }",
"public void setDate(DateTime \n date) {\n this.date = date;\n }",
"public void setDate(LocalDateTime date) {\n this.date = date;\n }",
"protected void addDay(Date date) throws Exception {\n Calendar cal = DateHelper.newCalendarUTC();\n cal.setTime(date);\n String datecode = cal.get(Calendar.YEAR) + \"-\" + (cal.get(Calendar.MONTH) + 1) + \"-\" + cal.get(Calendar.DAY_OF_MONTH);\n affectedDays.put(datecode, date);\n Date rDate = DateHelper.roundDownLocal(date);\n datesTodo.add(rDate);\n }",
"@Override\n public void appendRecurringDate(TaskOccurrence componentToBeAdded) {\n assert !recurringType.equals(RecurringType.NONE) : \"You cannot append new dates to non recurring tasks\";\n recurringDates.add(componentToBeAdded);\n recurringDates.get(recurringDates.size() - INDEX_OFFSET).setTaskReferrence(this);\n }",
"public DateTime(LocalDate date, Optional<LocalTime> optionalTime) {\n this.date = date;\n this.optionalTime = optionalTime;\n }",
"public void setDate(java.util.Date param){\n \n this.localDate=param;\n \n\n }",
"private static Date add(final Date date, final int units, final int field) {\n if (date == null) {\n throw new NullPointerException(\"date\");\n }\n\n final Calendar calendar = Calendar.getInstance();\n calendar.clear();\n calendar.setTime(date);\n calendar.setTimeZone(Dates.TIMEZONE_UTC);\n calendar.add(field, units);\n return calendar.getTime();\n }",
"public void setDate(Date date) {\r\n this.date = date;\r\n }",
"void setCreateDate(Date date);",
"public void setDate(Date date) {\n this.date = date;\n }",
"public void setDate(Date date) {\n this.date = date;\n }",
"public void setDate(Date date) {\n this.date = date;\n }",
"public void setDate(Date date) {\n this.date = date;\n }",
"public void setDate(Date date) {\n this.date = date;\n }",
"public void setDate(Date date) {\n this.date = date;\n }",
"public void setDate(Date date) {\n this.date = date;\n }",
"public void setDate(Date date) {\n this.date = date;\n }",
"public void setDate(Date date) {\n this.date = date;\n }",
"public void setDateAdded(Date dateAdded);",
"public static void addDate( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(model, instanceResource, DATE, value);\r\n\t}",
"public void setRegisterDateTime(Date dateTime) { this.registerDateTime = dateTime; }",
"Builder addDateCreated(String value);",
"public void addInterestedPartyTypeToDate(ExtentTest extentReport, boolean Screenshot) throws Exception {\n\t\ttry {\n\t\t\tWaitUtils.waitForelementToBeClickable(driver, addInterestpartytypeTodate, \"unable to enter To date\");\n\t\t\tString oneyrlater = \"\";\n\t\t\tDate date = new Date();\n\t\t\tCalendar cal = Calendar.getInstance();\n\t\t\tcal.setTime(date);\n\t\t\tcal.add(Calendar.DAY_OF_YEAR, +360);\n\t\t\tDate oneyr = cal.getTime();\n\t\t\tSimpleDateFormat formatter = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\t\toneyrlater = formatter.format(oneyr);\n\t\t\tLog.message(\"Date entered:\" + oneyrlater, extentReport);\n\t\t\taddInterestpartytypeTodate.sendKeys(oneyrlater);\n\n\t\t} catch (Exception e) {\n\t\t\tthrow new Exception(\"Unable to click select contact\" + e);\n\t\t}\n\n\t}",
"public Event(String name, LocalDateTime date) {\n super(name);\n this.date = date;\n }",
"@Override // java.time.chrono.Chronology\n public ChronoLocalDateTime<MinguoDate> localDateTime(TemporalAccessor temporal) {\n return super.localDateTime(temporal);\n }",
"void setDate(Date data);",
"public void setDate(Date date) {\r\n \t\tthis.startDate = date;\r\n \t}",
"public void SetDate(Date date);",
"public DateTime(Date date) {\r\n\t\tthis.timeString = YYYY_MMT_DD_T_HH_MM_SS_FORMATTER.format(date);\r\n\t}",
"public void setTrxDate(Date trxDate) {\r\n this.trxDate = trxDate;\r\n }",
"public void setDate() {\n this.date = new Date();\n }",
"public Series setDateTime( Date theDate, TemporalPrecisionEnum thePrecision) {\n\t\tmyDateTime = new DateTimeDt(theDate, thePrecision); \n\t\treturn this; \n\t}",
"public TimeEntry dateUtc(OffsetDateTime dateUtc) {\n this.dateUtc = dateUtc;\n return this;\n }",
"public static void addDate(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, java.util.Calendar value) {\r\n\t\tBase.add(model, instanceResource, DATE, value);\r\n\t}",
"public void setDataGatheringDateTime(Date dateTime) { this.dataGatheringDateTime = dateTime; }",
"public void setDateAcct (Timestamp DateAcct);",
"public void setDateAcct (Timestamp DateAcct);",
"public void add(DiaryCalendarEvent event){\n this.dates.add(new CalendarDay(event.getYear(),event.getMonth(),event.getDay()));\n }",
"public void setCreateDate(Date createDate) { this.createDate = createDate; }",
"public void setCtDate(Date ctDate) {\n this.ctDate = ctDate;\n }",
"public void setDate(LocalDate date) {\n this.date = date;\n }",
"public void setIncidentDate(String incidentDate){\n\t\tthis.incidentDate = \"\";\n\t\tthis.incidentDate += incidentDate;\n\t}",
"public void setDate(Calendar date)\n {\n this.date = date;\n }",
"@Override\n public void add(LocalDateTime date, List<Gadget> list) {\n orders.put(date, list);\n }",
"public void addDateField(Date date) {\n\t\tput(\"BIRTHDAY\", Constants.TIME_FMT.format(date));\n\t}",
"public void setDate(Date date) {\r\n\t\tthis.date = date;\r\n\t}",
"public void setDate(Date date) {\r\n\t\tthis.date = date;\r\n\t}",
"public void setDate(Date date) {\r\n\t\tthis.date = date;\r\n\t}",
"public void setDate(final Date date) {\n this.date = date;\n }",
"public void setCreDate(Date creDate) {\n this.creDate = creDate;\n }",
"public void setCreateDate(Date createDate);",
"public void setCreateDate(Date createDate);",
"public void setCreateDate(Date createDate);",
"public void setDate(String date){\n this.date = date;\n }",
"public void setEntityAddDate(String entityAddDate);",
"public void setEffectiveDate(java.util.Date value);",
"void setCreatedDate(Date createdDate);",
"public ShortDate(final Date date) {\n super(date.getTime());\n }",
"public void setDate(String date){\n this.date = date;\n }",
"public void addTime(LocalDate date, String hour) {\n spr.addTime(date, hour);\n }",
"public void Add_date(String d)\n {\n\n date = new String(d);\t\n }",
"public void setCreationDateLocal(Date date) {\r\n\t\toCreationDate = date ;\r\n\t}",
"public DataResourceBuilder _spatialCoverage_(Location _spatialCoverage_) {\n this.dataResourceImpl.getSpatialCoverage().add(_spatialCoverage_);\n return this;\n }",
"public void setDate(Date date) {\n\t\tthis.date = date;\n\t}",
"public void setDate(Date date) {\n\t\tthis.date = date;\n\t}",
"public void setDate(Date date) {\n\t\tthis.date = date;\n\t}",
"public void setDate(String date) {\r\n this.date = date;\r\n }",
"public void setDate(String date) {\n this.date = date;\n }",
"public void setDate(String date) {\n this.date = date;\n }",
"public void setDate(String date) {\n this.date = date;\n }",
"public void setDate(String date) {\n this.date = date;\n }",
"public void setDate(String date) {\n this.date = date;\n }",
"void setInvoicedDate(Date invoicedDate);",
"public void setDate(Date date) {\n\t\n\t\tthis.date = date;\n\t\n\t}",
"public void setDateTime(Date date)\n\t{\n\t\tint nHour, nMin;\n\n\t\tCalendar cal = Calendar.getInstance(); //Get calender\n\t\tcal.setTime(date); //Set given date\n\t\tnHour = cal.get(Calendar.HOUR_OF_DAY);\n\t\tnMin = cal.get(Calendar.MINUTE);\n\n\t\tsetDateTime(nHour, nMin, date);\n\t}",
"public void setCreatedDate(Date createdDate);",
"Builder addDateModified(Date value);",
"@Override\n\tpublic void addDateHeader(String name, long date) {\n\t}",
"@Override\n\tpublic void setCreateDate(Date createDate);",
"@Override\n\tpublic void setCreateDate(Date createDate);",
"public void setDateOfExamination(java.util.Date param){\n \n this.localDateOfExamination=param;\n \n\n }",
"public void setDate(Calendar date) {\n\tthis.date = date;\n }",
"public void setCreatedDate(Date value) {\n this.createdDate = value;\n }",
"public void setCreatedDate(Date value) {\n this.createdDate = value;\n }",
"public void setDate(Date date) {\n mDate = date;\n }",
"public void settCgthdate(Date tCgthdate) {\n this.tCgthdate = tCgthdate;\n }"
] | [
"0.6420493",
"0.5835625",
"0.5740138",
"0.57090026",
"0.5705518",
"0.56996554",
"0.56077737",
"0.5586584",
"0.55809206",
"0.55646276",
"0.5527802",
"0.54305124",
"0.5372749",
"0.53191906",
"0.530823",
"0.529019",
"0.5289281",
"0.5223182",
"0.5159189",
"0.5117777",
"0.5051863",
"0.50470203",
"0.50263566",
"0.50232786",
"0.50232786",
"0.50232786",
"0.50232786",
"0.50232786",
"0.50232786",
"0.50232786",
"0.50232786",
"0.50232786",
"0.50218534",
"0.5019699",
"0.50035566",
"0.5002898",
"0.4995839",
"0.49931517",
"0.4990875",
"0.49793527",
"0.49792176",
"0.49650183",
"0.49489242",
"0.4944798",
"0.49413997",
"0.49405855",
"0.49373284",
"0.4936726",
"0.49294367",
"0.49289054",
"0.49289054",
"0.49262238",
"0.49059966",
"0.48934448",
"0.48853004",
"0.48825225",
"0.48819777",
"0.4881359",
"0.4872099",
"0.48596096",
"0.48596096",
"0.48596096",
"0.48565227",
"0.48538423",
"0.48511806",
"0.48511806",
"0.48511806",
"0.4849933",
"0.48337528",
"0.48333314",
"0.4819832",
"0.4816293",
"0.4815787",
"0.48153478",
"0.4814654",
"0.48103774",
"0.48004827",
"0.47921458",
"0.47921458",
"0.47921458",
"0.47892138",
"0.47836557",
"0.47836557",
"0.47836557",
"0.47836557",
"0.47836557",
"0.47799107",
"0.47748223",
"0.47678885",
"0.47677195",
"0.4766879",
"0.47641808",
"0.4760311",
"0.4760311",
"0.47411737",
"0.4736106",
"0.47293484",
"0.47293484",
"0.47290304",
"0.47279912"
] | 0.52222896 | 18 |
Add temporal date to the coverage object. A convenience method creating a single temporal element with a date element. | public final void addDate(final String date,
final String type, final String dateFormat) throws RIFCSException {
DateWithTypeDateFormat de = this.newDate();
de.setType(type);
de.setDateFormat(dateFormat);
de.setValue(date);
this.getElement().appendChild(de.getElement());
this.dates.add((DateWithTypeDateFormat) de);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public DataResourceBuilder _temporalCoverage_(TemporalEntity _temporalCoverage_) {\n this.dataResourceImpl.getTemporalCoverage().add(_temporalCoverage_);\n return this;\n }",
"Builder addDateCreated(Date value);",
"void addDate(long t) {\n\tif (act != null) {\n\t long date = act.getDate() + t;\n\t act.setLocation(act.getMap(), act.getX(), act.getY(), date);\n\t}\n }",
"public static void AddDateTimeAttribute( DataSet DS, Date date )\n {\n if( date == null )\n date = new Date( System.currentTimeMillis( ));\n \n java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat();\n \n sdf.applyPattern( \"dd-MMM-yy\" );\n \n DS.setAttribute( new StringAttribute( Attribute.END_DATE , sdf\n .format( date ) ) );\n \n sdf.applyPattern( \"HH:mm:ss\" );\n \n DS.setAttribute( new StringAttribute( Attribute.END_TIME , sdf\n .format( date ) ) );\n }",
"public void addDate(Date value) {\n/* 132 */ addDateToSeq(\"date\", value);\n/* */ }",
"Builder addDateCreated(DateTime value);",
"public void addDate( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(this.model, this.getResource(), DATE, value);\r\n\t}",
"public final void addDate(final Date date,\n final String type) throws RIFCSException {\n DateFormat df = new SimpleDateFormat(TEMPORAL_DATE_FORMAT);\n String text = df.format(date);\n String result = text.substring(0, TEMPORAL_DATE_FORMAT_LENGTH)\n + \":\" + text.substring(TEMPORAL_DATE_FORMAT_LENGTH);\n this.addDate(result, type);\n }",
"org.hl7.fhir.DateTime addNewAppliesDateTime();",
"public static void AddDateTimeAttribute( DataSet DS, long date)\n {\n if( date <= 0 )\n date = System.currentTimeMillis( );\n \n Util.AddDateTimeAttribute( DS, new Date( date ));\n }",
"public abstract void add(Date212 date);",
"Builder addDatePublished(Date value);",
"public void addDate(java.util.Calendar value) {\r\n\t\tBase.add(this.model, this.getResource(), DATE, value);\r\n\t}",
"public DataResourceBuilder _temporalCoverage_(List<TemporalEntity> _temporalCoverage_) {\n this.dataResourceImpl.setTemporalCoverage(_temporalCoverage_);\n return this;\n }",
"public void setDate(DateTime \n date) {\n this.date = date;\n }",
"public void setDate(LocalDateTime date) {\n this.date = date;\n }",
"protected void addDay(Date date) throws Exception {\n Calendar cal = DateHelper.newCalendarUTC();\n cal.setTime(date);\n String datecode = cal.get(Calendar.YEAR) + \"-\" + (cal.get(Calendar.MONTH) + 1) + \"-\" + cal.get(Calendar.DAY_OF_MONTH);\n affectedDays.put(datecode, date);\n Date rDate = DateHelper.roundDownLocal(date);\n datesTodo.add(rDate);\n }",
"@Override\n public void appendRecurringDate(TaskOccurrence componentToBeAdded) {\n assert !recurringType.equals(RecurringType.NONE) : \"You cannot append new dates to non recurring tasks\";\n recurringDates.add(componentToBeAdded);\n recurringDates.get(recurringDates.size() - INDEX_OFFSET).setTaskReferrence(this);\n }",
"public final void addDate(final String date, final String type)\n throws RIFCSException {\n this.addDate(date, type, \"W3C\");\n }",
"public DateTime(LocalDate date, Optional<LocalTime> optionalTime) {\n this.date = date;\n this.optionalTime = optionalTime;\n }",
"public void setDate(java.util.Date param){\n \n this.localDate=param;\n \n\n }",
"private static Date add(final Date date, final int units, final int field) {\n if (date == null) {\n throw new NullPointerException(\"date\");\n }\n\n final Calendar calendar = Calendar.getInstance();\n calendar.clear();\n calendar.setTime(date);\n calendar.setTimeZone(Dates.TIMEZONE_UTC);\n calendar.add(field, units);\n return calendar.getTime();\n }",
"public void setDate(Date date) {\r\n this.date = date;\r\n }",
"void setCreateDate(Date date);",
"public void setDate(Date date) {\n this.date = date;\n }",
"public void setDate(Date date) {\n this.date = date;\n }",
"public void setDate(Date date) {\n this.date = date;\n }",
"public void setDate(Date date) {\n this.date = date;\n }",
"public void setDate(Date date) {\n this.date = date;\n }",
"public void setDate(Date date) {\n this.date = date;\n }",
"public void setDate(Date date) {\n this.date = date;\n }",
"public void setDate(Date date) {\n this.date = date;\n }",
"public void setDate(Date date) {\n this.date = date;\n }",
"public void setDateAdded(Date dateAdded);",
"public static void addDate( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(model, instanceResource, DATE, value);\r\n\t}",
"public void setRegisterDateTime(Date dateTime) { this.registerDateTime = dateTime; }",
"Builder addDateCreated(String value);",
"public void addInterestedPartyTypeToDate(ExtentTest extentReport, boolean Screenshot) throws Exception {\n\t\ttry {\n\t\t\tWaitUtils.waitForelementToBeClickable(driver, addInterestpartytypeTodate, \"unable to enter To date\");\n\t\t\tString oneyrlater = \"\";\n\t\t\tDate date = new Date();\n\t\t\tCalendar cal = Calendar.getInstance();\n\t\t\tcal.setTime(date);\n\t\t\tcal.add(Calendar.DAY_OF_YEAR, +360);\n\t\t\tDate oneyr = cal.getTime();\n\t\t\tSimpleDateFormat formatter = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\t\toneyrlater = formatter.format(oneyr);\n\t\t\tLog.message(\"Date entered:\" + oneyrlater, extentReport);\n\t\t\taddInterestpartytypeTodate.sendKeys(oneyrlater);\n\n\t\t} catch (Exception e) {\n\t\t\tthrow new Exception(\"Unable to click select contact\" + e);\n\t\t}\n\n\t}",
"public Event(String name, LocalDateTime date) {\n super(name);\n this.date = date;\n }",
"@Override // java.time.chrono.Chronology\n public ChronoLocalDateTime<MinguoDate> localDateTime(TemporalAccessor temporal) {\n return super.localDateTime(temporal);\n }",
"void setDate(Date data);",
"public void setDate(Date date) {\r\n \t\tthis.startDate = date;\r\n \t}",
"public void SetDate(Date date);",
"public DateTime(Date date) {\r\n\t\tthis.timeString = YYYY_MMT_DD_T_HH_MM_SS_FORMATTER.format(date);\r\n\t}",
"public void setTrxDate(Date trxDate) {\r\n this.trxDate = trxDate;\r\n }",
"public void setDate() {\n this.date = new Date();\n }",
"public Series setDateTime( Date theDate, TemporalPrecisionEnum thePrecision) {\n\t\tmyDateTime = new DateTimeDt(theDate, thePrecision); \n\t\treturn this; \n\t}",
"public TimeEntry dateUtc(OffsetDateTime dateUtc) {\n this.dateUtc = dateUtc;\n return this;\n }",
"public static void addDate(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, java.util.Calendar value) {\r\n\t\tBase.add(model, instanceResource, DATE, value);\r\n\t}",
"public void setDataGatheringDateTime(Date dateTime) { this.dataGatheringDateTime = dateTime; }",
"public void setDateAcct (Timestamp DateAcct);",
"public void setDateAcct (Timestamp DateAcct);",
"public void add(DiaryCalendarEvent event){\n this.dates.add(new CalendarDay(event.getYear(),event.getMonth(),event.getDay()));\n }",
"public void setCreateDate(Date createDate) { this.createDate = createDate; }",
"public void setCtDate(Date ctDate) {\n this.ctDate = ctDate;\n }",
"public void setDate(LocalDate date) {\n this.date = date;\n }",
"public void setIncidentDate(String incidentDate){\n\t\tthis.incidentDate = \"\";\n\t\tthis.incidentDate += incidentDate;\n\t}",
"public void setDate(Calendar date)\n {\n this.date = date;\n }",
"@Override\n public void add(LocalDateTime date, List<Gadget> list) {\n orders.put(date, list);\n }",
"public void addDateField(Date date) {\n\t\tput(\"BIRTHDAY\", Constants.TIME_FMT.format(date));\n\t}",
"public void setDate(Date date) {\r\n\t\tthis.date = date;\r\n\t}",
"public void setDate(Date date) {\r\n\t\tthis.date = date;\r\n\t}",
"public void setDate(Date date) {\r\n\t\tthis.date = date;\r\n\t}",
"public void setDate(final Date date) {\n this.date = date;\n }",
"public void setCreDate(Date creDate) {\n this.creDate = creDate;\n }",
"public void setCreateDate(Date createDate);",
"public void setCreateDate(Date createDate);",
"public void setCreateDate(Date createDate);",
"public void setDate(String date){\n this.date = date;\n }",
"public void setEntityAddDate(String entityAddDate);",
"public void setEffectiveDate(java.util.Date value);",
"void setCreatedDate(Date createdDate);",
"public ShortDate(final Date date) {\n super(date.getTime());\n }",
"public void setDate(String date){\n this.date = date;\n }",
"public void addTime(LocalDate date, String hour) {\n spr.addTime(date, hour);\n }",
"public void Add_date(String d)\n {\n\n date = new String(d);\t\n }",
"public void setCreationDateLocal(Date date) {\r\n\t\toCreationDate = date ;\r\n\t}",
"public DataResourceBuilder _spatialCoverage_(Location _spatialCoverage_) {\n this.dataResourceImpl.getSpatialCoverage().add(_spatialCoverage_);\n return this;\n }",
"public void setDate(Date date) {\n\t\tthis.date = date;\n\t}",
"public void setDate(Date date) {\n\t\tthis.date = date;\n\t}",
"public void setDate(Date date) {\n\t\tthis.date = date;\n\t}",
"public void setDate(String date) {\r\n this.date = date;\r\n }",
"public void setDate(String date) {\n this.date = date;\n }",
"public void setDate(String date) {\n this.date = date;\n }",
"public void setDate(String date) {\n this.date = date;\n }",
"public void setDate(String date) {\n this.date = date;\n }",
"public void setDate(String date) {\n this.date = date;\n }",
"void setInvoicedDate(Date invoicedDate);",
"public void setDate(Date date) {\n\t\n\t\tthis.date = date;\n\t\n\t}",
"public void setDateTime(Date date)\n\t{\n\t\tint nHour, nMin;\n\n\t\tCalendar cal = Calendar.getInstance(); //Get calender\n\t\tcal.setTime(date); //Set given date\n\t\tnHour = cal.get(Calendar.HOUR_OF_DAY);\n\t\tnMin = cal.get(Calendar.MINUTE);\n\n\t\tsetDateTime(nHour, nMin, date);\n\t}",
"public void setCreatedDate(Date createdDate);",
"Builder addDateModified(Date value);",
"@Override\n\tpublic void addDateHeader(String name, long date) {\n\t}",
"@Override\n\tpublic void setCreateDate(Date createDate);",
"@Override\n\tpublic void setCreateDate(Date createDate);",
"public void setDateOfExamination(java.util.Date param){\n \n this.localDateOfExamination=param;\n \n\n }",
"public void setDate(Calendar date) {\n\tthis.date = date;\n }",
"public void setCreatedDate(Date value) {\n this.createdDate = value;\n }",
"public void setCreatedDate(Date value) {\n this.createdDate = value;\n }",
"public void setDate(Date date) {\n mDate = date;\n }",
"public void settCgthdate(Date tCgthdate) {\n this.tCgthdate = tCgthdate;\n }"
] | [
"0.6420493",
"0.5835625",
"0.5740138",
"0.57090026",
"0.5705518",
"0.56996554",
"0.56077737",
"0.5586584",
"0.55809206",
"0.55646276",
"0.5527802",
"0.54305124",
"0.5372749",
"0.53191906",
"0.530823",
"0.529019",
"0.5289281",
"0.5223182",
"0.52222896",
"0.5159189",
"0.5117777",
"0.5051863",
"0.50470203",
"0.50263566",
"0.50232786",
"0.50232786",
"0.50232786",
"0.50232786",
"0.50232786",
"0.50232786",
"0.50232786",
"0.50232786",
"0.50232786",
"0.50218534",
"0.5019699",
"0.50035566",
"0.5002898",
"0.4995839",
"0.49931517",
"0.4990875",
"0.49793527",
"0.49792176",
"0.49650183",
"0.49489242",
"0.4944798",
"0.49413997",
"0.49405855",
"0.49373284",
"0.4936726",
"0.49294367",
"0.49289054",
"0.49289054",
"0.49262238",
"0.49059966",
"0.48934448",
"0.48853004",
"0.48825225",
"0.48819777",
"0.4881359",
"0.4872099",
"0.48596096",
"0.48596096",
"0.48596096",
"0.48565227",
"0.48538423",
"0.48511806",
"0.48511806",
"0.48511806",
"0.4849933",
"0.48337528",
"0.48333314",
"0.4819832",
"0.4816293",
"0.4815787",
"0.48153478",
"0.4814654",
"0.48103774",
"0.48004827",
"0.47921458",
"0.47921458",
"0.47921458",
"0.47892138",
"0.47836557",
"0.47836557",
"0.47836557",
"0.47836557",
"0.47836557",
"0.47799107",
"0.47748223",
"0.47678885",
"0.47677195",
"0.4766879",
"0.47641808",
"0.4760311",
"0.4760311",
"0.47411737",
"0.4736106",
"0.47293484",
"0.47293484",
"0.47290304",
"0.47279912"
] | 0.0 | -1 |
Add temporal date to the coverage object. A convenience method creating a single temporal element with a date element. | public final void addDate(final Date date,
final String type) throws RIFCSException {
DateFormat df = new SimpleDateFormat(TEMPORAL_DATE_FORMAT);
String text = df.format(date);
String result = text.substring(0, TEMPORAL_DATE_FORMAT_LENGTH)
+ ":" + text.substring(TEMPORAL_DATE_FORMAT_LENGTH);
this.addDate(result, type);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public DataResourceBuilder _temporalCoverage_(TemporalEntity _temporalCoverage_) {\n this.dataResourceImpl.getTemporalCoverage().add(_temporalCoverage_);\n return this;\n }",
"Builder addDateCreated(Date value);",
"void addDate(long t) {\n\tif (act != null) {\n\t long date = act.getDate() + t;\n\t act.setLocation(act.getMap(), act.getX(), act.getY(), date);\n\t}\n }",
"public static void AddDateTimeAttribute( DataSet DS, Date date )\n {\n if( date == null )\n date = new Date( System.currentTimeMillis( ));\n \n java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat();\n \n sdf.applyPattern( \"dd-MMM-yy\" );\n \n DS.setAttribute( new StringAttribute( Attribute.END_DATE , sdf\n .format( date ) ) );\n \n sdf.applyPattern( \"HH:mm:ss\" );\n \n DS.setAttribute( new StringAttribute( Attribute.END_TIME , sdf\n .format( date ) ) );\n }",
"public void addDate(Date value) {\n/* 132 */ addDateToSeq(\"date\", value);\n/* */ }",
"Builder addDateCreated(DateTime value);",
"public void addDate( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(this.model, this.getResource(), DATE, value);\r\n\t}",
"org.hl7.fhir.DateTime addNewAppliesDateTime();",
"public static void AddDateTimeAttribute( DataSet DS, long date)\n {\n if( date <= 0 )\n date = System.currentTimeMillis( );\n \n Util.AddDateTimeAttribute( DS, new Date( date ));\n }",
"public abstract void add(Date212 date);",
"Builder addDatePublished(Date value);",
"public void addDate(java.util.Calendar value) {\r\n\t\tBase.add(this.model, this.getResource(), DATE, value);\r\n\t}",
"public DataResourceBuilder _temporalCoverage_(List<TemporalEntity> _temporalCoverage_) {\n this.dataResourceImpl.setTemporalCoverage(_temporalCoverage_);\n return this;\n }",
"public void setDate(DateTime \n date) {\n this.date = date;\n }",
"protected void addDay(Date date) throws Exception {\n Calendar cal = DateHelper.newCalendarUTC();\n cal.setTime(date);\n String datecode = cal.get(Calendar.YEAR) + \"-\" + (cal.get(Calendar.MONTH) + 1) + \"-\" + cal.get(Calendar.DAY_OF_MONTH);\n affectedDays.put(datecode, date);\n Date rDate = DateHelper.roundDownLocal(date);\n datesTodo.add(rDate);\n }",
"public void setDate(LocalDateTime date) {\n this.date = date;\n }",
"@Override\n public void appendRecurringDate(TaskOccurrence componentToBeAdded) {\n assert !recurringType.equals(RecurringType.NONE) : \"You cannot append new dates to non recurring tasks\";\n recurringDates.add(componentToBeAdded);\n recurringDates.get(recurringDates.size() - INDEX_OFFSET).setTaskReferrence(this);\n }",
"public final void addDate(final String date, final String type)\n throws RIFCSException {\n this.addDate(date, type, \"W3C\");\n }",
"public DateTime(LocalDate date, Optional<LocalTime> optionalTime) {\n this.date = date;\n this.optionalTime = optionalTime;\n }",
"public void setDate(java.util.Date param){\n \n this.localDate=param;\n \n\n }",
"private static Date add(final Date date, final int units, final int field) {\n if (date == null) {\n throw new NullPointerException(\"date\");\n }\n\n final Calendar calendar = Calendar.getInstance();\n calendar.clear();\n calendar.setTime(date);\n calendar.setTimeZone(Dates.TIMEZONE_UTC);\n calendar.add(field, units);\n return calendar.getTime();\n }",
"public void setDate(Date date) {\r\n this.date = date;\r\n }",
"void setCreateDate(Date date);",
"public void setDateAdded(Date dateAdded);",
"public void setDate(Date date) {\n this.date = date;\n }",
"public void setDate(Date date) {\n this.date = date;\n }",
"public void setDate(Date date) {\n this.date = date;\n }",
"public void setDate(Date date) {\n this.date = date;\n }",
"public void setDate(Date date) {\n this.date = date;\n }",
"public void setDate(Date date) {\n this.date = date;\n }",
"public void setDate(Date date) {\n this.date = date;\n }",
"public void setDate(Date date) {\n this.date = date;\n }",
"public void setDate(Date date) {\n this.date = date;\n }",
"public static void addDate( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(model, instanceResource, DATE, value);\r\n\t}",
"Builder addDateCreated(String value);",
"public void setRegisterDateTime(Date dateTime) { this.registerDateTime = dateTime; }",
"public void addInterestedPartyTypeToDate(ExtentTest extentReport, boolean Screenshot) throws Exception {\n\t\ttry {\n\t\t\tWaitUtils.waitForelementToBeClickable(driver, addInterestpartytypeTodate, \"unable to enter To date\");\n\t\t\tString oneyrlater = \"\";\n\t\t\tDate date = new Date();\n\t\t\tCalendar cal = Calendar.getInstance();\n\t\t\tcal.setTime(date);\n\t\t\tcal.add(Calendar.DAY_OF_YEAR, +360);\n\t\t\tDate oneyr = cal.getTime();\n\t\t\tSimpleDateFormat formatter = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\t\toneyrlater = formatter.format(oneyr);\n\t\t\tLog.message(\"Date entered:\" + oneyrlater, extentReport);\n\t\t\taddInterestpartytypeTodate.sendKeys(oneyrlater);\n\n\t\t} catch (Exception e) {\n\t\t\tthrow new Exception(\"Unable to click select contact\" + e);\n\t\t}\n\n\t}",
"@Override // java.time.chrono.Chronology\n public ChronoLocalDateTime<MinguoDate> localDateTime(TemporalAccessor temporal) {\n return super.localDateTime(temporal);\n }",
"public Event(String name, LocalDateTime date) {\n super(name);\n this.date = date;\n }",
"void setDate(Date data);",
"public void setDate(Date date) {\r\n \t\tthis.startDate = date;\r\n \t}",
"public void SetDate(Date date);",
"public DateTime(Date date) {\r\n\t\tthis.timeString = YYYY_MMT_DD_T_HH_MM_SS_FORMATTER.format(date);\r\n\t}",
"public void setTrxDate(Date trxDate) {\r\n this.trxDate = trxDate;\r\n }",
"public void setDate() {\n this.date = new Date();\n }",
"public Series setDateTime( Date theDate, TemporalPrecisionEnum thePrecision) {\n\t\tmyDateTime = new DateTimeDt(theDate, thePrecision); \n\t\treturn this; \n\t}",
"public static void addDate(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, java.util.Calendar value) {\r\n\t\tBase.add(model, instanceResource, DATE, value);\r\n\t}",
"public TimeEntry dateUtc(OffsetDateTime dateUtc) {\n this.dateUtc = dateUtc;\n return this;\n }",
"public void setDateAcct (Timestamp DateAcct);",
"public void setDateAcct (Timestamp DateAcct);",
"public void setDataGatheringDateTime(Date dateTime) { this.dataGatheringDateTime = dateTime; }",
"public void add(DiaryCalendarEvent event){\n this.dates.add(new CalendarDay(event.getYear(),event.getMonth(),event.getDay()));\n }",
"public void setCreateDate(Date createDate) { this.createDate = createDate; }",
"public void setCtDate(Date ctDate) {\n this.ctDate = ctDate;\n }",
"public void setDate(LocalDate date) {\n this.date = date;\n }",
"public void setIncidentDate(String incidentDate){\n\t\tthis.incidentDate = \"\";\n\t\tthis.incidentDate += incidentDate;\n\t}",
"@Override\n public void add(LocalDateTime date, List<Gadget> list) {\n orders.put(date, list);\n }",
"public void setDate(Calendar date)\n {\n this.date = date;\n }",
"public void addDateField(Date date) {\n\t\tput(\"BIRTHDAY\", Constants.TIME_FMT.format(date));\n\t}",
"public void setDate(Date date) {\r\n\t\tthis.date = date;\r\n\t}",
"public void setDate(Date date) {\r\n\t\tthis.date = date;\r\n\t}",
"public void setDate(Date date) {\r\n\t\tthis.date = date;\r\n\t}",
"public void setDate(final Date date) {\n this.date = date;\n }",
"public void setCreDate(Date creDate) {\n this.creDate = creDate;\n }",
"public void setCreateDate(Date createDate);",
"public void setCreateDate(Date createDate);",
"public void setCreateDate(Date createDate);",
"public void setDate(String date){\n this.date = date;\n }",
"public void setEntityAddDate(String entityAddDate);",
"public void setEffectiveDate(java.util.Date value);",
"void setCreatedDate(Date createdDate);",
"public void Add_date(String d)\n {\n\n date = new String(d);\t\n }",
"public void addTime(LocalDate date, String hour) {\n spr.addTime(date, hour);\n }",
"public void setDate(String date){\n this.date = date;\n }",
"public ShortDate(final Date date) {\n super(date.getTime());\n }",
"public void setCreationDateLocal(Date date) {\r\n\t\toCreationDate = date ;\r\n\t}",
"public DataResourceBuilder _spatialCoverage_(Location _spatialCoverage_) {\n this.dataResourceImpl.getSpatialCoverage().add(_spatialCoverage_);\n return this;\n }",
"public void setDate(Date date) {\n\t\tthis.date = date;\n\t}",
"public void setDate(Date date) {\n\t\tthis.date = date;\n\t}",
"public void setDate(Date date) {\n\t\tthis.date = date;\n\t}",
"public void setDate(String date) {\r\n this.date = date;\r\n }",
"public void setDate(String date) {\n this.date = date;\n }",
"public void setDate(String date) {\n this.date = date;\n }",
"public void setDate(String date) {\n this.date = date;\n }",
"public void setDate(String date) {\n this.date = date;\n }",
"public void setDate(String date) {\n this.date = date;\n }",
"void setInvoicedDate(Date invoicedDate);",
"public void setDate(Date date) {\n\t\n\t\tthis.date = date;\n\t\n\t}",
"Builder addDateModified(Date value);",
"public void setCreatedDate(Date createdDate);",
"public void setDateTime(Date date)\n\t{\n\t\tint nHour, nMin;\n\n\t\tCalendar cal = Calendar.getInstance(); //Get calender\n\t\tcal.setTime(date); //Set given date\n\t\tnHour = cal.get(Calendar.HOUR_OF_DAY);\n\t\tnMin = cal.get(Calendar.MINUTE);\n\n\t\tsetDateTime(nHour, nMin, date);\n\t}",
"@Override\n\tpublic void addDateHeader(String name, long date) {\n\t}",
"@Override\n\tpublic void setCreateDate(Date createDate);",
"@Override\n\tpublic void setCreateDate(Date createDate);",
"public void setDateOfExamination(java.util.Date param){\n \n this.localDateOfExamination=param;\n \n\n }",
"public void setDate(Calendar date) {\n\tthis.date = date;\n }",
"public void setCreatedDate(Date value) {\n this.createdDate = value;\n }",
"public void setCreatedDate(Date value) {\n this.createdDate = value;\n }",
"public void settCgthdate(Date tCgthdate) {\n this.tCgthdate = tCgthdate;\n }",
"public void setDate(Date date) {\n mDate = date;\n }"
] | [
"0.6419902",
"0.58360165",
"0.5742953",
"0.5709113",
"0.5706385",
"0.5700489",
"0.5608386",
"0.5582985",
"0.55647784",
"0.5529843",
"0.5431379",
"0.5373513",
"0.5317756",
"0.5307269",
"0.5289809",
"0.5288656",
"0.52250123",
"0.5223682",
"0.5158886",
"0.5117086",
"0.50523597",
"0.50450754",
"0.5025121",
"0.50218534",
"0.5021286",
"0.5021286",
"0.5021286",
"0.5021286",
"0.5021286",
"0.5021286",
"0.5021286",
"0.5021286",
"0.5021286",
"0.5020232",
"0.50038505",
"0.5002785",
"0.4995269",
"0.49925196",
"0.49906603",
"0.49787414",
"0.4976489",
"0.4964028",
"0.49477667",
"0.49429816",
"0.4939943",
"0.49390256",
"0.4937302",
"0.49367076",
"0.49292353",
"0.49292353",
"0.49284267",
"0.4927488",
"0.49045104",
"0.4892674",
"0.48834944",
"0.48816407",
"0.48810002",
"0.4880703",
"0.48719367",
"0.48574945",
"0.48574945",
"0.48574945",
"0.48542374",
"0.4852919",
"0.4850031",
"0.4850031",
"0.4850031",
"0.4848412",
"0.48353565",
"0.48331076",
"0.48190552",
"0.48156205",
"0.48151648",
"0.4814142",
"0.48139888",
"0.48098415",
"0.4799228",
"0.4789948",
"0.4789948",
"0.4789948",
"0.4787297",
"0.47816995",
"0.47816995",
"0.47816995",
"0.47816995",
"0.47816995",
"0.47790372",
"0.47728235",
"0.47676387",
"0.4767017",
"0.47661832",
"0.47651893",
"0.47587386",
"0.47587386",
"0.47403297",
"0.47346967",
"0.4727882",
"0.4727882",
"0.47276664",
"0.47272456"
] | 0.5588023 | 7 |
Initialisation code for existing documents. A wrapper that invokes initTexts() and initDates() in turn. | private void initStructures() throws RIFCSException {
initTexts();
initDates();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void init() { \n\t\ttry { \n\t\t\tDocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); \n\t\t\tDocumentBuilder builder = factory.newDocumentBuilder(); \n\t\t\tthis.document = builder.newDocument(); \n\t\t\tlogger.info(\"initilize the document success.\");\n\t\t} catch (ParserConfigurationException e) { \n\t\t\t\n\t\t\tlogger.error(e.getMessage());\n\t\t} \n\t}",
"private void init() {\n configureInsertMode(SMART_INSERT, false);\n setDocumentProvider(new SimpleDocumentProvider());\n }",
"void init(Document doc) {\n mDoc = doc;\n mDoc.getDocumentElement().normalize();\n load();\n }",
"public void fireDocumentInit() {\n\t\tsuper.fireDocumentInit();\n\t\ttheStructures.fireDocumentInit();\n\t}",
"private void init() {\n\t\tinitDesign();\n\t\tinitHandlers();\n\t}",
"public void initialise(Document doc)\n\t{\n\t\t//Loads the colors\n\t\tNodeList vdxColors = doc.getElementsByTagName(mxVdxConstants.COLORS);\n\n\t\tif (vdxColors.getLength() > 0)\n\t\t{\n\t\t\tElement colors = (Element) vdxColors.item(0);\n\t\t\tNodeList colorList = colors\n\t\t\t\t\t.getElementsByTagName(mxVdxConstants.COLOR_ENTRY);\n\t\t\tint colorLength = colorList.getLength();\n\n\t\t\tfor (int i = 0; i < colorLength; i++)\n\t\t\t{\n\t\t\t\tElement color = (Element) colorList.item(i);\n\t\t\t\tString colorId = color.getAttribute(mxVdxConstants.INDEX);\n\t\t\t\tString colorValue = color.getAttribute(mxVdxConstants.RGB);\n\t\t\t\tcolorElementMap.put(colorId, colorValue);\n\t\t\t}\n\t\t}\n\n\t\t//Loads the fonts\n\t\tNodeList vdxFonts = doc.getElementsByTagName(mxVdxConstants.FACE_NAMES);\n\n\t\tif (vdxFonts.getLength() > 0)\n\t\t{\n\t\t\tElement fonts = (Element) vdxFonts.item(0);\n\t\t\tNodeList fontList = fonts\n\t\t\t\t\t.getElementsByTagName(mxVdxConstants.FACE_NAME);\n\t\t\tint fontLength = fontList.getLength();\n\n\t\t\tfor (int i = 0; i < fontLength; i++)\n\t\t\t{\n\t\t\t\tElement font = (Element) fontList.item(i);\n\t\t\t\tString fontId = font.getAttribute(mxVdxConstants.ID);\n\t\t\t\tString fontValue = font.getAttribute(mxVdxConstants.FONT_NAME);\n\t\t\t\tfontElementMap.put(fontId, fontValue);\n\t\t\t}\n\t\t}\n\n\t\t//Loads the defaults documents styles.\n\t\tNodeList vdxDocumentStyle = doc\n\t\t\t\t.getElementsByTagName(mxVdxConstants.DOCUMENT_SHEET);\n\t\tif (vdxDocumentStyle.getLength() > 0)\n\t\t{\n\t\t\tElement defaultStyle = (Element) vdxDocumentStyle.item(0);\n\t\t\tString lineId = defaultStyle\n\t\t\t\t\t.getAttribute(mxVdxConstants.LINE_STYLE);\n\t\t\tString fillId = defaultStyle\n\t\t\t\t\t.getAttribute(mxVdxConstants.FILL_STYLE);\n\t\t\tString textId = defaultStyle\n\t\t\t\t\t.getAttribute(mxVdxConstants.TEXT_STYLE);\n\t\t\tmxStyleSheetManager ssm = mxStyleSheetManager.getInstance();\n\t\t\tlineStyle = ssm.getSheet(lineId);\n\t\t\tfillStyle = ssm.getSheet(fillId);\n\t\t\ttextStyle = ssm.getSheet(textId);\n\t\t}\n\n\t}",
"public DocumentUtil() {\n // Because this class can be instantiated by other classes many times, we only\n // want to call the initialize() function\n // if we will be using the getProblemType() function below.\n }",
"public void init()\n throws SignedDocException;",
"public void consolidatedDocumentInit(Document doc){ \n setSubject(doc.getSubject()); \n }",
"public Document()\n {\n index = 0;\n words = 0;\n sentences = 0;\n syllables = 0;\n }",
"public MyDocument() {\r\n }",
"protected Document() {/* intentionally empty block */}",
"public ModDocument() {\r\n\t\tsuper();\r\n\t}",
"public void init(RtfDocument p_document)\n {\n m_doc = p_document;\n m_stylesheet = null;\n\n // m_defaultParaProperties = null;\n\n m_paragraph = null;\n m_paraProperties = null;\n\n m_charProperties = null;\n m_charPropertiesStack = new RtfTextPropertiesStack();\n\n m_container = null;\n m_containerStack = new RtfCompoundObjectStack();\n }",
"public void initialise() \n\t{\n\t\tthis.docids = scoresMap.keys();\n\t\tthis.scores = scoresMap.getValues();\n\t\tthis.occurrences = occurrencesMap.getValues();\t\t\n\t\tresultSize = this.docids.length;\n\t\texactResultSize = this.docids.length;\n\n\t\tscoresMap.clear();\n\t\toccurrencesMap.clear();\n\t\tthis.arraysInitialised = true;\n\t}",
"public RichDocument()\n {\n setMeta(new DocumentMeta());\n _paragraphs=new ArrayList<Paragraph>();\n }",
"public DocumentManipulator(Document document) {\n\t\tthis.document = document;\n\t\tinit();\n\t}",
"public void init() {\r\n\t\t// to override\r\n\t}",
"public JCYDocument() {}",
"public void fireDocumentInit(BaseDocument source) {\n\t\tif (source == this)\n\t\t\tfireDocumentInit();\n\t\telse\n\t\t\tsuper.fireDocumentInit(source);\n\t}",
"protected void init() {\n // to override and use this method\n }",
"@Override\n\tpublic void startDocument() {\n\t\t\n\t}",
"private void init() {\n long epochTime = System.currentTimeMillis();\n String\n dateString = DatetimeUtils.getDateString(epochTime),\n timeString = DatetimeUtils.getTimeString(epochTime);\n mTextDate.setText(dateString);\n mTextClock.setText(timeString);\n\n // Setup click handlers for editing date/time.\n mTextDate.setOnClickListener(this);\n mTextClock.setOnClickListener(this);\n }",
"@Override\r\n\tprotected void init() {\r\n\t\tsuper.init();\r\n\t\tauthorize();\r\n\t\tgetDebugSettings().setOutputComponentPath(true);\r\n\t\tgetDebugSettings().setAjaxDebugModeEnabled(false);\r\n\t\t// enable logger\r\n\t\tApplication.get().getRequestLoggerSettings()\r\n\t\t\t\t.setRequestLoggerEnabled(true);\r\n\r\n\t\t// mount pages\r\n\t\tmountPages();\r\n\r\n\t\ttry {\r\n\t\t\tnew com.aspose.cells.License().setLicense(getClass()\r\n\t\t\t\t\t.getClassLoader().getResourceAsStream(\r\n\t\t\t\t\t\t\t\"Aspose.Total.Java.lic\"));\r\n\t\t} catch (Exception e) {\r\n\t\t\t// logger.error(\"Aspose load error.\", e);\r\n\t\t}\r\n\r\n\t}",
"public void buildDocument() {\n/* 310 */ setDocument(getDocumentLoader().getDocument(getClass()), \"text/html\", \"ISO-8859-1\");\n/* */ \n/* 312 */ syncAccessMethods();\n/* */ }",
"public SimpleDocReader() { }",
"@BeforeEach\n public void init() throws Exception {\n this.uri1 = new URI(\"http://edu.yu.cs/com1320/project/doc1\");\n this.b1 = new byte[1];\n this.s1 = \"pizza pious\";\n\n //init possible values for doc2\n this.uri2 = new URI(\"http://edu.yu.cs/com1320/project/doc2\");\n this.b2 = new byte[2];\n this.s2 = \"Party times\";\n\n //init possible values for doc3\n this.uri3 = new URI(\"http://edu.yu.cs/com1320/project/doc3\");\n this.b3 = new byte[3];\n this.s3 = \"nothi mucho\";\n\n this.uri4 = new URI(\"http://edu.yu.cs/com1320/project/doc4\");\n this.b4 = new byte[4];\n this.s4 = \"not goingss\";\n\n this.uri5 = new URI(\"http://edu.yu.cs/com1320/project/doc5\");\n this.b5 = new byte[5];\n this.s5 = \"p like fizz\";\n\n this.uri6 = new URI(\"http://edu.yu.cs/com1320/project/doc6\");\n this.b6 = new byte[33];\n this.s6 = \"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\";\n\n docBin1 = new DocumentImpl(this.uri1, this.b1);\n docBin2 = new DocumentImpl(this.uri2, this.b2);\n docBin3 = new DocumentImpl(this.uri3, this.b3);\n docBin4 = new DocumentImpl(this.uri4, this.b4);\n docBin5 = new DocumentImpl(this.uri5, this.b5);\n docBin6 = new DocumentImpl(this.uri6, this.b6);\n\n docTxt1 = new DocumentImpl(this.uri1, this.s1);\n docTxt2 = new DocumentImpl(this.uri2, this.s2);\n docTxt3 = new DocumentImpl(this.uri3, this.s3);\n docTxt4 = new DocumentImpl(this.uri4, this.s4);\n docTxt5 = new DocumentImpl(this.uri5, this.s5);\n docTxt6 = new DocumentImpl(this.uri6, this.s6);\n }",
"public void init() {\n\t\tdropViewCollections();\n\t\tbuildViewCollections();\n\t\tthis.populateViewCollections();\n\t}",
"public void buildDocument() {\n/* 248 */ setDocument(getDocumentLoader().getDocument(getClass()), \"text/html\", \"ISO-8859-1\");\n/* */ \n/* 250 */ syncAccessMethods();\n/* */ }",
"@Override public void init()\n\t\t{\n\t\t}",
"public void prepareForRun(OpenDefinitionsDocument doc) { }",
"protected void init() {\n\t}",
"protected void init() {\n\t}",
"public void buildDocument() {\n/* 220 */ setDocument(getDocumentLoader().getDocument(getClass()), \"text/html\", \"ISO-8859-1\");\n/* */ \n/* 222 */ syncAccessMethods();\n/* */ }",
"public void init() {\n\t\t}",
"public void initializeDefault() {\n\t\tthis.numAuthorsAtStart = 5;\n\t\tthis.numPublicationsAtStart = 20;\n\t\tthis.numCreationAuthors = 0;\n\t\tthis.numCreationYears = 10;\n\n\t\tyearInformation = new DefaultYearInformation();\n\t\tyearInformation.initializeDefault();\n\t\tpublicationParameters = new DefaultPublicationParameters();\n\t\tpublicationParameters.initializeDefault();\n\t\tpublicationParameters.setYearInformation(yearInformation);\n\t\tauthorParameters = new DefaultAuthorParameters();\n\t\tauthorParameters.initializeDefault();\n\t\ttopicParameters = new DefaultTopicParameters();\n\t\ttopicParameters.initializeDefault();\n\t}",
"public Document() {\n }",
"protected void init() {\n }",
"@Override\n public void init() {\n super.init();\n\n setTheme(\"xtreemfs\");\n\n initLayout();\n initTable();\n initFileDetails();\n initButtons();\n initFilteringControls();\n initUploadState();\n }",
"public void setupBaseConvenienceObjects(MaintenanceDocument document);",
"protected void init()\n {\n Timestamp now = new Timestamp(System.currentTimeMillis());\n timestampCreated = now;\n timestampModified = now;\n createdByAgent = AppContextMgr.getInstance() == null? null : (AppContextMgr.getInstance().hasContext() ? Agent.getUserAgent() : null);\n modifiedByAgent = null;\n }",
"public void newDocument();",
"protected void init() {\n setUUIDString();\n setNoteCreatedAt();\n setNoteUpdatedAt();\n setCreator(ParseUser.getCurrentUser());\n addAuthor(ParseUser.getCurrentUser());\n setACL(new ParseACL(ParseUser.getCurrentUser()));\n }",
"private void init() {\n\n\t}",
"protected void init() {\n init(null);\n }",
"@Override\r\n\tpublic final void init() {\r\n\r\n\t}",
"@Override\n\t\tpublic void init() {\n\t\t}",
"public void init() {\r\n\r\n\t}",
"public DocumentManipulator() {\n\t\ttry {\n\t\t\tthis.document = XMLUtils.buildDocument();\n\t\t} catch (UnsupportedEncodingException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (SAXException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (ParserConfigurationException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t//-- Init Xpath\n\t\tinit();\n\t}",
"private void init() {\n }",
"private void init() {\n }",
"private void init() {\n }",
"private void init() {\n }",
"public void initialize(){\n titleBox.setTextFormatter( new TextFormatter<>(c -> {\n if(c.getControlNewText().length() > 30 ) return null;\n boolean error=false;\n char[] chars = c.getText().toCharArray();\n for (char aChar : chars)\n if (aChar == '\\n' ) {\n error = true;\n break;\n }\n if (error) return null;\n else return c;\n }));\n //default settings\n resultBox.setEditable(false);\n formatter.applyPattern(\"dd/MM/yyyy\");\n datePick.getEditor().setText(formatter.format(date));\n //arrayList to store each diaryPage and every words in dictionary\n book= new ArrayList<>();\n dictionary = new ArrayList<>();\n //read from txt file for existing diary pages and dictionary\n try {\n BufferedReader reader = new BufferedReader(new FileReader(new File(\"src/diary/content.txt\")));\n String line= reader.readLine();\n while (line != null){\n String date,title,content=\"\";\n int lineCount;\n date = line;\n title = reader.readLine();\n lineCount = Integer.parseInt(reader.readLine());\n for(int i=0;i<lineCount;i++){\n line = reader.readLine();\n //noinspection StringConcatenationInLoop\n content = content + line + System.lineSeparator();\n }\n book.add(new DiaryPage(date,title,content,lineCount));\n line = reader.readLine();\n }\n reader.close();\n reader = new BufferedReader(new FileReader(new File(\"src/extra/words.txt\")));\n line= reader.readLine();\n while (line != null){\n dictionary.add(line);\n line = reader.readLine();\n }\n reader.close();\n\n } catch (java.io.IOException e) {\n e.printStackTrace();\n }\n //save new diary into txt file after user exit the application\n Main.window.setOnHiding(event -> saveFile());\n }",
"private void init() {\n }",
"public void init() {\n\n\t}",
"public void init() {\n\n\t}",
"public void init() {\n\n\t}",
"public static void initXMLdoc() throws Exception {\n\tDocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n DocumentBuilder builder = factory.newDocumentBuilder();\n DOMImplementation impl = builder.getDOMImplementation();\n\n\tdoc = impl.createDocument(null,null,null);\n }",
"public void init() {\n\t\n\t}",
"protected abstract void init();",
"protected abstract void init();",
"protected abstract void init();",
"protected abstract void init();",
"protected abstract void init();",
"protected abstract void init();",
"protected abstract void init();",
"protected abstract void init();",
"protected abstract void init();",
"protected abstract void init();",
"protected abstract void init();",
"public void init() {}",
"public void init() {}",
"private void _init() {\n }",
"private void initialize() {\n this.docTypeList = new ArrayList<>();\n this.problemTypeList = new ArrayList<>();\n\n // The add() function should be called in the order specified since together\n // they form a mapping mechanism,\n // for example 'ENCAPSULATED' before 'POSTSCRIPT' and 'RICH' before 'TEXT'.\n\n this.docTypeList.add(\"ENCAPSULATED\");\n this.problemTypeList.add(ProblemType.NON_ENCAPSULATED_POSTSCRIPT_FILE);\n\n this.docTypeList.add(\"EXCEL\");\n this.problemTypeList.add(ProblemType.NON_MSEXCEL_FILE);\n\n this.docTypeList.add(\"GIF\");\n this.problemTypeList.add(ProblemType.NON_GIF_FILE);\n\n this.docTypeList.add(\"HTML\");\n this.problemTypeList.add(ProblemType.NON_HTML_FILE);\n\n this.docTypeList.add(\"LATEX\");\n this.problemTypeList.add(ProblemType.NON_LATEX_FILE);\n\n this.docTypeList.add(\"MPEG\");\n this.problemTypeList.add(ProblemType.NON_MP4_FILE);\n\n this.docTypeList.add(\"POSTSCRIPT\");\n this.problemTypeList.add(ProblemType.NON_POSTSCRIPT_FILE);\n\n this.docTypeList.add(\"TIFF\");\n this.problemTypeList.add(ProblemType.NON_TIFF_FILE);\n\n this.docTypeList.add(\"WORD\");\n this.problemTypeList.add(ProblemType.NON_MSWORD_FILE);\n\n this.classInitialized = true;\n\n LOG.debug(\"initialize:this.docTypeList.size {}\", this.docTypeList.size());\n LOG.debug(\"initialize:this.problemTypeList.size {}\", this.problemTypeList.size());\n }",
"protected void _init(){}",
"public void init() { }",
"public void init() { }",
"public void performInitialisation() {\n \t\t// subclasses can override the behaviour for this method\n \t}",
"@Override\n\tpublic void init() {\n Objects.requireNonNull(mtbw, \"Freetext indexer failed to initialize temporal index, setMultiTableBatchWriter() was not set.\");\n Objects.requireNonNull(conf, \"Freetext indexer failed to initialize temporal index, setConf() was not set.\");\n try {\n\t\t\tdocTableBw = mtbw.getBatchWriter(getFreeTextDocTablename(conf));\n\t\t\ttermTableBw = mtbw.getBatchWriter(getFreeTextTermTablename(conf));\n\t\t} catch (AccumuloException | AccumuloSecurityException | TableNotFoundException e) {\n\t\t\tlogger.error(\"Unable to initialize index. Throwing Runtime Exception. \", e);\n throw new RuntimeException(e);\t\t\n }\n\t}",
"private SolrIndexer()\n {\n fieldMap = new HashMap<String, String[]>();\n transMapMap = new HashMap<String, Map<String, String>>();\n customMethodMap = new HashMap<String, Method>();\n customMixinMap = new HashMap<String, SolrIndexerMixin>();\n indexDate = new Date();\n }",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"public Doc() {\n\n }",
"public void init() {\n\t}",
"public void init() {\n\t}",
"public void init() {\n\t}",
"public CouchDoc() {\n super();\n docType = getClass().getSimpleName();\n }",
"String prepareLegalDocuments();",
"public static void init() {\n\t\t\n\t}",
"void init() {\n\t\tinitTypes();\n\t\tinitGlobalFunctions();\n\t\tinitFunctions();\n\t\tinitClasses();\n\t}",
"@objid (\"4bb3363c-38e1-48f1-9894-6dceea1f8d66\")\n public void init() {\n }",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"public void init() {\n \n }",
"public void init() {\n\t\t\n\t}",
"public static void init() {\n }",
"public static void init() {\n }",
"private void init() {\n FieldWrapper id = new FieldWrapper();\n id.fieldDescription = new HashMap<String, Object>();\n id.fieldDescription.put(\"fullName\", \"Id\");\n id.fieldDescription.put(\"type\", \"Text\");\n\n FieldWrapper name = new FieldWrapper();\n name.fieldDescription = new HashMap<String, Object>();\n name.fieldDescription.put(\"fullName\", \"Name\");\n\n FieldWrapper createdBy = new FieldWrapper();\n createdBy.fieldDescription = new HashMap<String, Object>();\n createdBy.fieldDescription.put(\"fullName\", \"CreatedBy\");\n createdBy.fieldDescription.put(\"type\", \"Lookup\");\n\n FieldWrapper lastModifiedBy = new FieldWrapper();\n lastModifiedBy.fieldDescription = new HashMap<String, Object>();\n lastModifiedBy.fieldDescription.put(\"fullName\", \"LastModifiedBy\");\n lastModifiedBy.fieldDescription.put(\"type\", \"Lookup\");\n\n FieldWrapper owner = new FieldWrapper();\n owner.fieldDescription = new HashMap<String, Object>();\n owner.fieldDescription.put(\"fullName\", \"Owner\");\n owner.fieldDescription.put(\"type\", \"Lookup\");\n\n fieldDescribe = new HashMap<String, FieldWrapper>();\n\n fieldDescribe.put((String) id.fieldDescription.get(\"fullName\"), id);\n fieldDescribe.put((String) name.fieldDescription.get(\"fullName\"), name);\n fieldDescribe.put((String) createdBy.fieldDescription.get(\"fullName\"), createdBy);\n fieldDescribe.put((String) lastModifiedBy.fieldDescription.get(\"fullName\"), lastModifiedBy);\n fieldDescribe.put((String) owner.fieldDescription.get(\"fullName\"), owner);\n }",
"protected void init(){\n }",
"public manageDoc() {\r\r\r\n\r\r\r\n }"
] | [
"0.717823",
"0.6671725",
"0.65641326",
"0.65049964",
"0.6479924",
"0.64785177",
"0.6470157",
"0.63722223",
"0.63703454",
"0.6310181",
"0.62853473",
"0.6231915",
"0.62050563",
"0.6158315",
"0.5980415",
"0.5966572",
"0.5958346",
"0.5911463",
"0.59019756",
"0.5901361",
"0.58995235",
"0.58979183",
"0.58869344",
"0.58825445",
"0.5878141",
"0.58614504",
"0.58591884",
"0.58569294",
"0.5847809",
"0.58466643",
"0.58417046",
"0.58374614",
"0.58374614",
"0.58353513",
"0.5827814",
"0.5821529",
"0.5815722",
"0.5812726",
"0.5800919",
"0.5800833",
"0.57969326",
"0.57894784",
"0.5787679",
"0.57849526",
"0.5772691",
"0.5765962",
"0.57644224",
"0.57588255",
"0.5757425",
"0.57560134",
"0.57560134",
"0.57560134",
"0.57560134",
"0.5754737",
"0.57318145",
"0.57074046",
"0.57074046",
"0.57074046",
"0.5706557",
"0.5700823",
"0.56956595",
"0.56956595",
"0.56956595",
"0.56956595",
"0.56956595",
"0.56956595",
"0.56956595",
"0.56956595",
"0.56956595",
"0.56956595",
"0.56956595",
"0.5694549",
"0.5694549",
"0.56848603",
"0.5683482",
"0.5674775",
"0.56738704",
"0.56738704",
"0.56702495",
"0.5662928",
"0.5658255",
"0.5655053",
"0.5653928",
"0.5653744",
"0.5653744",
"0.5653744",
"0.56500584",
"0.56462395",
"0.5641643",
"0.5638657",
"0.56360537",
"0.5635387",
"0.5635387",
"0.5635387",
"0.5634194",
"0.5630268",
"0.5620047",
"0.5620047",
"0.5618847",
"0.56156665",
"0.56095576"
] | 0.0 | -1 |
Initialisation code for element elements. | private void initTexts() throws RIFCSException {
NodeList nl = super.getElements(Constants.ELEMENT_TEXT);
for (int i = 0; i < nl.getLength(); i++) {
texts.add((Element) nl.item(i));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Element() {\n\t}",
"public void initElements() {\n\n emptyStateElement = driver.findElement(By.id(\"com.fiverr.fiverr:id/empty_state_title\"));\n postRequestButton = driver.findElement(By.id(\"com.fiverr.fiverr:id/empty_list_button\"));\n }",
"public ElementoInicial() {\r\n\t\tsuper();\r\n\t}",
"public GenericElement() {\n\t}",
"public BasicElementList() {\n\t}",
"@SuppressWarnings(\"unchecked\")\n private void initElements() {\n\n try {\n\n Elements marker = null;\n\n for (Annotation annotation : this.getClass().getDeclaredAnnotations()) {\n if(annotation instanceof Elements) {\n marker = (Elements) annotation;\n }\n }\n\n if(marker == null) {\n String msg = \"Expected @Elements annotation on Screen class\";\n log.error(msg);\n throw new FrameworkException(msg);\n }\n\n PlatformType platform = DriverWrapper.getActivePlatform();\n Validate.notNull(platform);\n\n Class<? extends BaseElements> elementsClass = null;\n\n if(marker.elements().equals(BaseElements.class)) {\n // do we have individual iOS or Android elements?\n if(PlatformType.ANDROID == platform) {\n elementsClass = marker.androidElements();\n\n } else if(PlatformType.IOS == platform) {\n elementsClass = marker.iosElements();\n } else {\n throw new IllegalArgumentException(\"Un-supported platform\");\n }\n\n } else {\n // just take combined merged elements\n elementsClass = marker.elements();\n }\n\n if(marker.elements().equals(BaseElements.class)) {\n throw new IllegalArgumentException(\"Expected that you provide an elements class\");\n }\n\n Constructor<? extends BaseElements> constructor = elementsClass.getConstructor();\n this.elements = constructor.newInstance();\n\n PageFactory.initElements(new AppiumFieldDecorator(driver), elements);\n\n this.elements.init(driver);\n\n } catch(Exception e) {\n\n log.error(\"Failed to initialize page elements\", e);\n throw new FrameworkException(e);\n }\n }",
"protected void init() {\n PageFactory.initElements(webDriver, this);\n }",
"@Override\n\t\tpublic void init() {\n\t\t}",
"public void init() {\r\n\t\t// to override\r\n\t}",
"@objid (\"4bb3363c-38e1-48f1-9894-6dceea1f8d66\")\n public void init() {\n }",
"public void initializeWebElement(){\n\t\tPageFactory.initElements(driver, this);\n\t}",
"public BaseElement() {\n }",
"public AbstractElement() {\n }",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"protected void initTag()\n {\n }",
"private Node() {\n // Start empty.\n element = null;\n }",
"public void init() { \r\n\t\t// TODO Auto-generated method\r\n\t }",
"@Override\n\t\tprotected void initialise() {\n\n\t\t}",
"public Layer_ElementsCollection()\n\t{\n\t\tthis.elements = new ArrayList<GIS_element>();\n\t}",
"public abstract void setUpElementsWithData();",
"@Override public void init()\n\t\t{\n\t\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void init()\n\t{\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"public void init() {\r\n resources = new Vector<ResourcesElement>();\r\n informations = new Vector<InformationElement>();\r\n output = null;\r\n spec = DEFAULT_SPEC;\r\n version = null;\r\n codeBase = null;\r\n href = null;\r\n allPermissions = false;\r\n j2eePermissions = false;\r\n isComponent = false;\r\n applicationDesc = null;\r\n appletDesc = null;\r\n installerDesc = null;\r\n }",
"public void init() {\n\t\t}",
"ProductUnit() {\n _elements = new Element[0];\n }",
"public WebElement() {}",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"public XmlElement() {\n }",
"@Override\r\n\tpublic final void init() {\r\n\r\n\t}",
"@Override\n\tprotected void initialise() {\n\t}",
"@Override\n\tpublic void init() {\n\t}",
"public Element() {\r\n\t\tx = 0;\r\n\t\ty = 0;\r\n\t\tcolor = Color.gray;\r\n\t\thilite = true;\r\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"public ChemicalElement()\r\n\t{\r\n\t\tnameOfElement = \" \";\r\n\t\tchemicalSymbol = \" \";\r\n\t\tatomicNumber = 0;\r\n numOfElements++;\r\n\t}",
"@Override void init(Element element) {\n String name = element.getTagName();\n if (name.equals(\"published\")) {\n this.published = element.getTextContent().trim();\n }\n else if (name.equals(\"content\")) {\n this.content = parseContent(element);\n }\n else {\n super.init(element);\n }\n }",
"public void init() {\r\n\r\n\t}",
"public OpticalElements() {\n }",
"private void initElements() {\n uploadingProgressBar = (ProgressBar) findViewById(R.id.scanning_result_uploading_bar);\n scanningBlurScoreProgressBarContainer = (RelativeLayout) findViewById(R.id.scanning_blur_score_progress_container);\n resultImgAndLoadingLayout = (RelativeLayout) findViewById(R.id.scaning_result_img_and_loading);\n fpResultImg = (ImageView) resultImgAndLoadingLayout.findViewById(R.id.scanning_result_img);\n scanningThumb = (ImageView) findViewById(R.id.scanning_progressbar_thumb);\n jumpMsg = (TextView) findViewById(R.id.scanning_status_msg);\n }",
"public void init() {\n\n\t}",
"public void init() {\n\n\t}",
"public void init() {\n\n\t}",
"public void init() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {}",
"public void init() {\n \n }",
"public void init() {\n\t\n\t}",
"public void addDefaultElements() {\n addAllCustomElements();\n }",
"private DOMs() {\n }",
"public void init() {\n\t}",
"public void init() {\n\t}",
"public void init() {\n\t}",
"@Override\n public void init() {\n }",
"public AttributeSet() {\n\n elements = new Hashtable();\n }",
"public ElementServiceImpl() {\n\t\tsuper();\n\t}",
"protected void init() {\n // to override and use this method\n }",
"private void init() {\n\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public static ElementInit elementInit(Method method, Expression[] expressions) { throw Extensions.todo(); }",
"@Override\r\n\tpublic void init() {\n\t\tsuper.init();\r\n\t}",
"protected void init() {\n\t}",
"protected void init() {\n\t}",
"public ListElement()\n\t{\n\t\tthis(null, null, null); //invokes constructor with 3 arguments\n\t}",
"protected void init() {\n super.init();\n uriExpr = null;\n uri = null;\n nameExpr = null;\n name = null;\n qname = null;\n attrExpr = null;\n attr = null;\n emptyExpr = null;\n empty = false;\n }",
"public SiacTCronopElem() {\n\t}",
"public static void init()\n {\n\n addShapeless();\n\n addShaped();\n }",
"public void init() {\n\r\n\t}",
"public void init() {\n\r\n\t}",
"private void init() {\n }",
"private void init() {\n }",
"private void init() {\n }",
"private void init() {\n }",
"@Override\n protected void init() {\n }",
"public static ElementInit elementInit(Method method, Iterable<Expression> expressions) { throw Extensions.todo(); }",
"private void init() {\n\t\thead = -1;\n\t\tnumElements = 0;\n\t}",
"public void init() {\n }",
"public void init() {\n }",
"public void init() {\n }",
"public void init() {\n }",
"protected void init() {\n }",
"private void initSubNodes()\n {\n children = createSubNodes(false);\n attributes = createSubNodes(true);\n }",
"private void initializeElements() {\n textViewIntroduceEmail = findViewById(R.id.textViewIntroduceEmail);\n textViewIntroduceCode = findViewById(R.id.textViewIntroduceCode);\n editTextChangePasswordEmail = findViewById(R.id.editTextChangePasswordEmail);\n editTextChangePasswordCode = findViewById(R.id.editTextChangePasswordCode);\n buttonEmailNext = findViewById(R.id.buttonEmailNext);\n buttonCodeNext = findViewById(R.id.buttonCodeNext);\n\n buttonEmailNext.setOnClickListener(this);\n buttonCodeNext.setOnClickListener(this);\n }",
"public void performInitialisation() {\n \t\t// subclasses can override the behaviour for this method\n \t}",
"public void init()\n {\n }",
"private void init() {\n }",
"public ElementObject(WebElement element) {\n // check null value\n super(0); //0 : Element is THERE\n this.element = element;\n this._originalStyle = element.getAttribute(\"style\");\n }",
"private void init() {\n\t\tinitDesign();\n\t\tinitHandlers();\n\t}",
"private void initialize() {\n\tif (setup == false) {\n\t elementList.add(new GUISlider());\n\t elementList.add(new GUIChart());\n\t elementList.add(new GUIStatsDisplay());\n\t elementList.add(new GUIPID());\n\t elementList.add(new GUITimer());\n\t elementList.add(new GUINumericUpDown());\n\t setup = true;\n\t}\n }",
"public void init() { }",
"public void init() { }",
"public static void initialisations() {\n\t\tit = 0;\r\n\t\tbc = 1;\r\n\r\n\t\t// pile des reprises pour compilation des branchements en avant\r\n\t\tpileRep = new TPileRep(); \r\n\t\t// programme objet = code Mapile de l'unite en cours de compilation\r\n\t\tpo = new ProgObjet();\r\n\t\t// COMPILATION SEPAREE: desripteur de l'unite en cours de compilation\r\n\t\tdesc = new Descripteur();\r\n\r\n\t\t// initialisation necessaire aux attributs lexicaux\r\n\t\tUtilLex.initialisation();\r\n\r\n\t\t// initialisation du type de l'expression courante\r\n\t\ttCour = NEUTRE;\r\n\r\n\t\t//Initialisation de la variable qui compte le nombre de param�tres de chaque proc�dure \r\n\t\tnbParamProc = 0;\r\n\r\n\t\t//Initialisation de la variable qui compte le nombre de variables d�clar�es\r\n\t\tnbVar++;\r\n\r\n\t\t//Initialisation vTmp\r\n\t\tvTmp = 0;\r\n\t\t\r\n\t\tdesc.setUnite(\"programme\");\r\n\t\t\r\n\t}"
] | [
"0.74268794",
"0.70805305",
"0.7051139",
"0.6955315",
"0.6919315",
"0.6838032",
"0.6790424",
"0.6681921",
"0.6669961",
"0.6663679",
"0.6661693",
"0.66545856",
"0.66257733",
"0.66233194",
"0.6621414",
"0.6607046",
"0.65975034",
"0.6592468",
"0.65529007",
"0.6548523",
"0.65420806",
"0.6530333",
"0.6530333",
"0.6530333",
"0.65130895",
"0.6475895",
"0.6475895",
"0.6475895",
"0.6462205",
"0.64590573",
"0.6450889",
"0.644948",
"0.64462787",
"0.64384544",
"0.6424634",
"0.64220005",
"0.641558",
"0.6414588",
"0.6410971",
"0.6410971",
"0.6410971",
"0.6410971",
"0.6410971",
"0.64041734",
"0.6402017",
"0.6398913",
"0.6369654",
"0.6368669",
"0.6357118",
"0.6357118",
"0.6357118",
"0.6356876",
"0.6348459",
"0.63250446",
"0.63216865",
"0.6321349",
"0.6313403",
"0.63100946",
"0.63100946",
"0.63100946",
"0.6286742",
"0.62817216",
"0.62770796",
"0.627072",
"0.62706524",
"0.6263495",
"0.6263495",
"0.6263495",
"0.6261572",
"0.6244972",
"0.62381333",
"0.62381333",
"0.62326807",
"0.62148136",
"0.61897737",
"0.6175023",
"0.616934",
"0.616934",
"0.6168216",
"0.6168216",
"0.6168216",
"0.6168216",
"0.61640817",
"0.6160368",
"0.6157468",
"0.61469096",
"0.61469096",
"0.61469096",
"0.61469096",
"0.61429864",
"0.6138242",
"0.61309105",
"0.6125465",
"0.61252606",
"0.6110807",
"0.6109884",
"0.6106108",
"0.6103478",
"0.6101726",
"0.6101726",
"0.6092766"
] | 0.0 | -1 |
Initialisation code for date elements. | private void initDates() throws RIFCSException {
NodeList nl = super.getElements(Constants.ELEMENT_DATE);
for (int i = 0; i < nl.getLength(); i++) {
dates.add(new DateWithTypeDateFormat(nl.item(i)));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void initDate() {\n\n\t}",
"date initdate(date iDate)\n {\n iDate.updateElementValue(\"date\");\n return iDate;\n }",
"private ARXDate() {\r\n this(\"Default\");\r\n }",
"private void initializeDate() {\n\t\tfinal Calendar c = Calendar.getInstance();\n\t\tmYear = c.get(Calendar.YEAR);\n\t\tmMonth = c.get(Calendar.MONTH);\n\t\tmDay = c.get(Calendar.DAY_OF_MONTH);\n\t\t\n\t\texpense.setDate(c.getTime());\n\n\t\t// display the current date\n\t\tupdateDateDisplay();\n\t}",
"public DateUtil ()\n {\n\n }",
"public MyDate(){\n this.day = 0;\n this.month = 0;\n this.year = 0;\n }",
"private DateUtil() {\n\t}",
"private DateUtil() {\n\t}",
"private void initDate(View view) {\n\n\t}",
"public DateCheckTag() { }",
"protected DateFieldMetadata() {\r\n\r\n\t}",
"public FillDate() {\n }",
"public Date(){\n\t\tyear=0;\n\t\tmonth=0;\n\t\tday=0;\n\t}",
"public Date() {\r\n }",
"public CpFldValidDate() { super(10018, 1); }",
"private void initDate(){\n\n owa = findViewById(R.id.OWA);\n sda = findViewById(R.id.SWA);\n fida = findViewById(R.id.FIDA);\n fda = findViewById(R.id.FDA);\n trda = findViewById(R.id.TRDA);\n tda = findViewById(R.id.TDA);\n hier = findViewById(R.id.HIER);\n\n dateList.add(hier);\n dateList.add(tda);\n dateList.add(trda);\n dateList.add(fda);\n dateList.add(fida);\n dateList.add(sda);\n dateList.add(owa);\n\n }",
"@Override\n\tprotected void setDate() {\n\n\t}",
"public DateList() {\n DateNode ln = new DateNode(null);\n first = ln;\n last = ln;\n }",
"@SuppressWarnings(\"static-access\")\n\tprivate void initData() {\n\t\tstartDate = startDate.now();\n\t\tendDate = endDate.now();\n\t}",
"private CreateDateUtils()\r\n\t{\r\n\t}",
"public LocalDateAdapter() {\r\n\t\tsuper();\r\n\t}",
"public DateUtil (int yyyy, int mm, int dd)\n {\n set(yyyy, mm, dd, CHECK);\n }",
"@Override\n public void date_()\n {\n }",
"public ExceptionDate(){\n\t\tsuper();\n\t}",
"public MyDate(int inYear, int inDay, int inMonth)\n {\n year = inYear;\n day = inDay;\n month = inMonth;\n }",
"public ADateDemo() {\n\n\n initComponents();\n\n\n }",
"Dates() {\n clear();\n }",
"private BusinessDateUtility() {\n\t}",
"public DateColumn() {\n\t\t// default constructor.\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.set(Calendar.HOUR_OF_DAY,0);\n\t\tcal.set(Calendar.MINUTE,0);\n\t\tcal.set(Calendar.SECOND,0);\n\t\tcal.set(Calendar.MILLISECOND,0);\n\t\tint dayOfTheWeek = cal.get(Calendar.DAY_OF_WEEK);\n\n\t displayStr = ScheduleManager.dayNames[dayOfTheWeek-1];\n\t}",
"private DateUtil(){\n\n }",
"private DateFormatterManager()\r\n\t{\r\n\r\n\t}",
"public DateCustom(int __day, int __month, int __year) {\n this._day = __day;\n this._month = __month;\n this._year = __year;\n }",
"public MyDate(){\t\n\t\tthis(\"00/00/0000\");\n\t}",
"private void setDate() {\n\t\tthis.date = Integer.parseInt(this.year + String.format(\"%02d\", this.calenderWeek));\n\n\t}",
"private void init() {\n setMinutes(new int[] {});\n setHours(new int[] {});\n setDaysOfMonth(new int[] {});\n setMonths(new int[] {});\n setDaysOfWeek(new int[] {});\n }",
"public CinemaDate() {\n }",
"@Test\r\n\tpublic void testSetDate() {\n\t\tfail(\"Not yet implemented\");\r\n\t}",
"@Override\n\tpublic void setInitialDate(Calendar initialDate) {\n\n\t}",
"private DateTimeAdjusters() {\n\n }",
"public Date() {\r\n\t\tGregorianCalendar c = new GregorianCalendar();\r\n\t\tmonth = c.get(Calendar.MONTH) + 1; // our month starts from 1\r\n\t\tday = c.get(Calendar.DAY_OF_MONTH);\r\n\t\tyear = c.get(Calendar.YEAR);\r\n\t}",
"@Test public void Year_0__month__day()\t\t\t\t\t\t\t{tst_date_(\"2001-03-31\"\t\t\t\t, \"2001-03-31\");}",
"public DateUtility () {\n dateFormat = new SimpleDateFormat(\"MM/dd/yyyy\");\n }",
"public void setDate() {\n this.date = new Date();\n }",
"public JCalendar() {\r\n init();\r\n resetToDefaults();\r\n }",
"public void initializeDate() {\n //Get current date elements from Calendar object\n day = cal.get(Calendar.DAY_OF_MONTH);\n month = cal.get(Calendar.MONTH); //Note months are indexed starting at zero (Jan -> 0)\n year = cal.get(Calendar.YEAR);\n\n //Pair EditText to local variable and set input type\n date = (EditText) findViewById(R.id.textSetDate);\n date.setInputType(InputType.TYPE_NULL);\n\n //Set EditText text to be current time\n date.setText((month + 1) + \"/\" + day + \"/\" + year);\n\n //Create onClick listener on date variable\n date.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n datePicker = new DatePickerDialog(ControlCenterActivity.this, new DatePickerDialog.OnDateSetListener() {\n @Override\n public void onDateSet(DatePicker datePicker, int year, int month, int dayOfMonth) {\n date.setText((month + 1) + \"/\" + dayOfMonth + \"/\" + year);\n }\n }, year, month, day);\n\n datePicker.show();\n }\n });\n }",
"public Date(int day, Month month, int year){\n\tif (day > 0 && day <= month.nbJours(year)){\n\t this.day = day;\n\t}\t\n\tthis.month = month;\n\tif (year > 0){\n\t this.year = year;\n\t}\n }",
"abstract Date getDefault();",
"public DefaultImpl() {\n this(DEFAULT_DATE_FORMAT);\n }",
"public pay_date() {\n initComponents();\n }",
"public Date (final Integer d, final Integer m, final Integer y) throws CGException {\n\n try {\n setSentinel();\n }\n catch (Exception e){\n\n e.printStackTrace(System.out);\n System.out.println(e.getMessage());\n }\n if (!this.pre_Date(d, m, y).booleanValue()) \n UTIL.RunTime(\"Run-Time Error:Precondition failure in Date\");\n {\n\n day = UTIL.NumberToInt(UTIL.clone(d));\n month = UTIL.NumberToInt(UTIL.clone(m));\n year = UTIL.NumberToInt(UTIL.clone(y));\n }\n }",
"public CustomDateSerializer() {\n this(null);\n }",
"public Date(String dateType, int year, int month, int day)\r\n\t\t\tthrows BogusDataException\r\n\t{\r\n\t\tsuper(dateType, \"\");\r\n\r\n\t\tthis.year = year;\r\n\t\tthis.month = month;\r\n\t\tthis.day = day;\r\n\t\tthis.hour = this.minute = this.second = 0;\r\n\t\tthis.dateOnly = true;\r\n\r\n\t\tString yearStr, monthStr, dayStr;\r\n\r\n\t\tyearStr = \"\" + year;\r\n\t\tmonthStr = \"\" + month;\r\n\t\tdayStr = \"\" + day;\r\n\t\twhile (yearStr.length() < 4)\r\n\t\t\tyearStr = '0' + yearStr;\r\n\t\tif (monthStr.length() < 2)\r\n\t\t\tmonthStr = '0' + monthStr;\r\n\t\tif (dayStr.length() < 2)\r\n\t\t\tdayStr = '0' + dayStr;\r\n\t\tvalue = yearStr + monthStr + dayStr;\r\n\r\n\t\t// Add attribute that says date-only\r\n\t\taddAttribute(\"VALUE\", \"DATE\");\r\n\t}",
"public Date212 (String s){ //initial constructor\n full_Date = s;\n // System.out.println(full_Date + \"jdjdj\");\n if (!isValidDate(full_Date)) throw new IllegalArgumentException(\"Invalid Date Format!\"); \n //If it is not true that the date is valid then throw a error.\n /* \n The substring methods to pull out the Year, Month, and Day.\n */\n Year = Integer.parseInt(full_Date.substring(0,3)); \n Month = Integer.parseInt(full_Date.substring(4,5));\n Day = Integer.parseInt(full_Date.substring(6,7));\n count++; \n addArray(this); //Calling the function \"addArray\" with 'this isntance of date212'\n // System.out.println(myDates[i]);\n\n }",
"public DateAxis() { this(null); }",
"private void init() {\n long epochTime = System.currentTimeMillis();\n String\n dateString = DatetimeUtils.getDateString(epochTime),\n timeString = DatetimeUtils.getTimeString(epochTime);\n mTextDate.setText(dateString);\n mTextClock.setText(timeString);\n\n // Setup click handlers for editing date/time.\n mTextDate.setOnClickListener(this);\n mTextClock.setOnClickListener(this);\n }",
"public MyDate(int month, int day, int year) {\n\t\tsetDate(month, day, year);\n\t}",
"public void setStartDate(Date s);",
"public Date(int month, int day) {\r\n this.month = month;\r\n this.day = day;\r\n }",
"public void setDate(Date date) {\r\n \t\tthis.startDate = date;\r\n \t}",
"public int MagicDate(){\n return month = day = year = 1;\n \n }",
"public Date(int day, int month, int year) {\r\n this.day = day;\r\n this.month = month;\r\n this.year = year;\r\n\r\n }",
"public void init( Object date,\n Object time)\n {\n leftOperand = (ValueNode) date;\n rightOperand = (ValueNode) time;\n operator = \"timestamp\";\n methodName = \"getTimestamp\";\n }",
"public void makeValidDate() {\n\t\tdouble jd = swe_julday(this.year, this.month, this.day, this.hour, SE_GREG_CAL);\n\t\tIDate dt = swe_revjul(jd, SE_GREG_CAL);\n\t\tthis.year = dt.year;\n\t\tthis.month = dt.month;\n\t\tthis.day = dt.day;\n\t\tthis.hour = dt.hour;\n\t}",
"public MyDate(String date){\n \t\tStringTokenizer st;\n\n \t\tst = new StringTokenizer(date,\"/\");\t//tokenizer will always result in 3 tokens \n\n\t\tthis.day = Integer.parseInt(st.nextToken());\n\t\tthis.month = Integer.parseInt(st.nextToken());\n\t\tthis.year = Integer.parseInt(st.nextToken());\t\n\t}",
"private void initList(LocalDate cal) {\n\t\tdays.add(\"Mo\");\n\t\tdays.add(\"Tu\");\n\t\tdays.add(\"We\");\n\t\tdays.add(\"Th\");\n\t\tdays.add(\"Fr\");\n\t\tdays.add(\"Sa\");\n\t\tdays.add(\"Su\");\n\t}",
"RollingCalendar()\r\n\t{\r\n\t\tsuper();\r\n\t}",
"public Watch(){ //Watch Constuctor\r\n super(); //Values passed in from the super class\r\n month = 1; //Initialize month to 1\r\n day = 1; //Initialize day to 1\r\n year = 1980; //Initialize year to 1980\r\n}",
"private RentSettings() throws DateFormatException {\r\n \tthis.rentDate = \"\";\r\n \tthis.dueDate = \"\";\r\n }",
"public DateUtil (int ordinal)\n {\n // save ordinal field and compute Gregorian equivalent\n set(ordinal);\n }",
"public EventsCalendarYear() {\n initYear();\n }",
"Data() {\n\t\t// dia = 01;\n\t\t// mes = 01;\n\t\t// ano = 1970;\n\t\tthis(1, 1, 1970); // usar um construtor dentro de outro\n\t}",
"public void setupCalendar() { \n\t\tcal = whenIsIt();\n\t\tLocale here = Locale.US;\n\t\tthisMonth = cal.getDisplayName(2, Calendar.LONG_STANDALONE, here);\n\t\tdate = cal.get(5); //lesson learned: if it's a number do this\n\t\t//ADD CODE FOR ORDINALS HERE\n\t\tyear = cal.get(1);\n\t\tthisHour = cal.get(10);\n\t\tthisMinute = cal.get(12);\n\t\tthisSecond = cal.get(13);\n\t\tamPm = cal.getDisplayName(9, Calendar.SHORT, here);\n\t\tthisDay = thisMonth +\" \"+ addOrdinal(date) + \", \" + year;\n\t\tcurrentTime = fix.format(thisHour) + \":\" + fix.format(thisMinute) + \":\" + fix.format(thisSecond) + \" \" + amPm;\n\t}",
"@Override\n\tpublic void visit(DateValue arg0) {\n\t\t\n\t}",
"private QaCalendar() {\n }",
"public void setDate(int dt) {\n date = dt;\n }",
"@Override\n public Class<Date> getElementType() {\n return Date.class;\n }",
"public Calendar() {\n dateAndTimeables = new HashMap<>();\n }",
"public Rates() {\n }",
"public PubDateFilter() {\r\n this(System.currentTimeMillis());\r\n }",
"@Override\n\tpublic void visit(DateValue arg0) {\n\n\t}",
"public Date(String icalStr) throws ParseException, BogusDataException\r\n\t{\r\n\t\tsuper(icalStr);\r\n\r\n\t\tyear = month = day = 0;\r\n\t\thour = minute = second = 0;\r\n\r\n\t\tfor (int i = 0; i < attributeList.size(); i++)\r\n\t\t{\r\n\t\t\tAttribute a = attributeAt(i);\r\n\t\t\tString aname = a.name.toUpperCase(Locale.ENGLISH);\r\n\t\t\tString aval = a.value.toUpperCase(Locale.ENGLISH);\r\n\t\t\t// TODO: not sure if any attributes are allowed here...\r\n\t\t\t// Look for VALUE=DATE or VALUE=DATE-TIME\r\n\t\t\t// DATE means untimed for the event\r\n\t\t\tif (aname.equals(\"VALUE\"))\r\n\t\t\t{\r\n\t\t\t\tif (aval.equals(\"DATE\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tdateOnly = true;\r\n\t\t\t\t} else if (aval.equals(\"DATE-TIME\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tdateOnly = false;\r\n\t\t\t\t}\r\n\t\t\t} else if (aname.equals(\"TZID\"))\r\n\t\t\t{\r\n\t\t\t\ttzid = a.value;\r\n\t\t\t} else\r\n\t\t\t{\r\n\t\t\t\t// TODO: anything else allowed here?\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tString inDate = value;\r\n\r\n\t\tif (inDate.length() < 8)\r\n\t\t{\r\n\t\t\t// Invalid format\r\n\t\t\tthrow new ParseException(\"Invalid date format '\" + inDate + \"'\",\r\n\t\t\t\t\tinDate);\r\n\t\t}\r\n\r\n\t\t// Make sure all parts of the year are numeric.\r\n\t\tfor (int i = 0; i < 8; i++)\r\n\t\t{\r\n\t\t\tchar ch = inDate.charAt(i);\r\n\t\t\tif (ch < '0' || ch > '9')\r\n\t\t\t{\r\n\t\t\t\tthrow new ParseException(\r\n\t\t\t\t\t\t\"Invalid date format '\" + inDate + \"'\", inDate);\r\n\t\t\t}\r\n\t\t}\r\n\t\tyear = Integer.parseInt(inDate.substring(0, 4));\r\n\t\tmonth = Integer.parseInt(inDate.substring(4, 6));\r\n\t\tday = Integer.parseInt(inDate.substring(6, 8));\r\n\t\tif (day < 1 || day > 31 || month < 1 || month > 12)\r\n\t\t\tthrow new BogusDataException(\"Invalid date '\" + inDate + \"'\",\r\n\t\t\t\t\tinDate);\r\n\t\t// Make sure day of month is valid for specified month\r\n\t\tif (year % 4 == 0)\r\n\t\t{\r\n\t\t\t// leap year\r\n\t\t\tif (day > leapMonthDays[month - 1])\r\n\t\t\t{\r\n\t\t\t\tthrow new BogusDataException(\"Invalid day of month '\" + inDate\r\n\t\t\t\t\t\t+ \"'\", inDate);\r\n\t\t\t}\r\n\t\t} else\r\n\t\t{\r\n\t\t\tif (day > monthDays[month - 1])\r\n\t\t\t{\r\n\t\t\t\tthrow new BogusDataException(\"Invalid day of month '\" + inDate\r\n\t\t\t\t\t\t+ \"'\", inDate);\r\n\t\t\t}\r\n\t\t}\r\n\t\t// TODO: parse time, handle localtime, handle timezone\r\n\t\tif (inDate.length() > 8)\r\n\t\t{\r\n\t\t\t// TODO make sure dateOnly == false\r\n\t\t\tif (inDate.charAt(8) == 'T')\r\n\t\t\t{\r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\thour = Integer.parseInt(inDate.substring(9, 11));\r\n\t\t\t\t\tminute = Integer.parseInt(inDate.substring(11, 13));\r\n\t\t\t\t\tsecond = Integer.parseInt(inDate.substring(13, 15));\r\n\t\t\t\t\tif (hour > 23 || minute > 59 || second > 59)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tthrow new BogusDataException(\r\n\t\t\t\t\t\t\t\t\"Invalid time in date string '\" + inDate + \"'\",\r\n\t\t\t\t\t\t\t\tinDate);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (inDate.length() > 15)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tisUTC = inDate.charAt(15) == 'Z';\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (NumberFormatException nef)\r\n\t\t\t\t{\r\n\t\t\t\t\tthrow new BogusDataException(\r\n\t\t\t\t\t\t\t\"Invalid time in date string '\" + inDate + \"' - \"\r\n\t\t\t\t\t\t\t\t\t+ nef, inDate);\r\n\t\t\t\t}\r\n\t\t\t} else\r\n\t\t\t{\r\n\t\t\t\t// Invalid format\r\n\t\t\t\tthrow new ParseException(\r\n\t\t\t\t\t\t\"Invalid date format '\" + inDate + \"'\", inDate);\r\n\t\t\t}\r\n\t\t} else\r\n\t\t{\r\n\t\t\t// Just date, no time\r\n\t\t\tdateOnly = true;\r\n\t\t}\r\n\r\n\t\tif (isUTC && !dateOnly)\r\n\t\t{\r\n\t\t\t// Use Joda Time to convert UTC to localtime\r\n\t\t\tDateTime utcDateTime = new DateTime(DateTimeZone.UTC);\r\n\t\t\tutcDateTime = utcDateTime.withDate(year, month, day).withTime(hour,\r\n\t\t\t\t\tminute, second, 0);\r\n\t\t\tDateTime localDateTime = utcDateTime.withZone(DateTimeZone\r\n\t\t\t\t\t.getDefault());\r\n\t\t\tyear = localDateTime.getYear();\r\n\t\t\tmonth = localDateTime.getMonthOfYear();\r\n\t\t\tday = localDateTime.getDayOfMonth();\r\n\t\t\thour = localDateTime.getHourOfDay();\r\n\t\t\tminute = localDateTime.getMinuteOfHour();\r\n\t\t\tsecond = localDateTime.getSecondOfMinute();\r\n\t\t} else if (tzid != null)\r\n\t\t{\r\n\t\t\tDateTimeZone tz = DateTimeZone.forID(tzid);\r\n\t\t\tif (tz != null)\r\n\t\t\t{\r\n\t\t\t\t// Convert to localtime\r\n\t\t\t\tDateTime utcDateTime = new DateTime(tz);\r\n\t\t\t\tutcDateTime = utcDateTime.withDate(year, month, day).withTime(\r\n\t\t\t\t\t\thour, minute, second, 0);\r\n\t\t\t\tDateTime localDateTime = utcDateTime.withZone(DateTimeZone\r\n\t\t\t\t\t\t.getDefault());\r\n\t\t\t\tyear = localDateTime.getYear();\r\n\t\t\t\tmonth = localDateTime.getMonthOfYear();\r\n\t\t\t\tday = localDateTime.getDayOfMonth();\r\n\t\t\t\thour = localDateTime.getHourOfDay();\r\n\t\t\t\tminute = localDateTime.getMinuteOfHour();\r\n\t\t\t\tsecond = localDateTime.getSecondOfMinute();\r\n\t\t\t\t// Since we have converted to localtime, remove the TZID\r\n\t\t\t\t// attribute\r\n\t\t\t\tthis.removeNamedAttribute(\"TZID\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tisUTC = false;\r\n\r\n\t\t// Add attribute that says date-only or date with time\r\n\t\tif (dateOnly)\r\n\t\t\taddAttribute(\"VALUE\", \"DATE\");\r\n\t\telse\r\n\t\t\taddAttribute(\"VALUE\", \"DATE-TIME\");\r\n\r\n\t}",
"public DayPeriod() {\n\t}",
"public DateIn(int day, int month, int year){\n\tthis.day = day;\n\tthis.month = month;\n\tthis.year = year;\n\t}",
"public Entry(Calendar date){\n this.date = date; \n }",
"private Date init(InputStream ouiData) throws IOException {\n DataInputStream din = new DataInputStream(ouiData);\n Date result = new Date(din.readLong());\n while (din.available() > 0) {\n Oui oui = new Oui(din);\n _byHashCode.put(oui.hashCode(), oui);\n }\n return result;\n }",
"public DateUtil ( DateUtil b)\n {\n this.ordinal = b.ordinal;\n this.yyyy = b.yyyy;\n this.mm = b.mm;\n this.dd = b.dd;\n }",
"public Date(int y) {\r\n\r\n\t\tmonth = LAST_MONTH;\r\n\t\tday = DAYS[LAST_MONTH];\r\n\t\tyear = y;\r\n\t}",
"public CalendarBasi()\n {\n dia = new DisplayDosDigitos(31);\n mes = new DisplayDosDigitos(13);\n anio = new DisplayDosDigitos(100);\n }",
"public Calendar() {\n }",
"public void setDate(int date){\n this.date = date;\n }",
"public SIPDate() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e6 in method: gov.nist.javax.sip.header.SIPDate.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: gov.nist.javax.sip.header.SIPDate.<init>():void\");\n }",
"DateLiteral createDateLiteral();",
"public Calendar() {\n initComponents();\n }",
"public Datum() {\n this.tag = 1;\n this.monat = 1;\n this.jahr = 1;\n }",
"public void setDate(int day,int month,int year){\n this.day=day;\n this.month=month;\n this.year=year;\n }",
"@Test public void Day_1__month__year()\t\t\t\t\t\t\t{tst_date_(\"03-31-02\"\t\t\t\t, \"2002-03-31\");}",
"void init() {\n txtMaKM.setText(random().toUpperCase());\n dccThoiHan.setDateFormatString(\"dd/MM/yyyy\");\n dccThoiHan.setDate(new Date());\n checkHSD();\n load();\n }",
"private ARXDate(final String formatString) {\r\n if (formatString == null || formatString.equals(\"Default\")) {\r\n this.string = \"dd.MM.yyyy\";\r\n this.format = new SimpleDateFormat(string);\r\n this.locale = null;\r\n } else {\r\n this.format = new SimpleDateFormat(formatString);\r\n this.string = formatString;\r\n this.locale = null;\r\n }\r\n }",
"public DateGraphFormat(){\n }",
"void setDate(Date data);"
] | [
"0.8133444",
"0.7676158",
"0.7535146",
"0.7124669",
"0.70511127",
"0.70299995",
"0.7023384",
"0.7023384",
"0.69563776",
"0.69045305",
"0.69000995",
"0.68720126",
"0.68171906",
"0.67805237",
"0.6690306",
"0.66889167",
"0.66622007",
"0.6660674",
"0.6650819",
"0.661316",
"0.65913576",
"0.6579737",
"0.657161",
"0.6543246",
"0.65333265",
"0.65288126",
"0.6467001",
"0.6422634",
"0.6380074",
"0.6374899",
"0.63746554",
"0.6364185",
"0.63588816",
"0.63429147",
"0.6342074",
"0.6339829",
"0.63311666",
"0.6318326",
"0.63139105",
"0.6310896",
"0.6302338",
"0.6256293",
"0.62495816",
"0.6239874",
"0.623607",
"0.622482",
"0.621895",
"0.6217822",
"0.62008506",
"0.6175266",
"0.6159598",
"0.6155875",
"0.6151402",
"0.6139475",
"0.6138325",
"0.61350536",
"0.6134476",
"0.61338836",
"0.6129228",
"0.6106886",
"0.6102663",
"0.6095176",
"0.6087387",
"0.6063508",
"0.60607845",
"0.6047112",
"0.60447866",
"0.6038828",
"0.6023449",
"0.60232013",
"0.6018377",
"0.6005507",
"0.60030913",
"0.599837",
"0.5994434",
"0.5988103",
"0.5987471",
"0.5985433",
"0.59709007",
"0.5965176",
"0.59575516",
"0.5953935",
"0.5953502",
"0.59371203",
"0.5934028",
"0.5926829",
"0.5925441",
"0.5918282",
"0.5898",
"0.58890426",
"0.58878005",
"0.58843184",
"0.5881397",
"0.58736104",
"0.58558196",
"0.5854776",
"0.58429265",
"0.5841231",
"0.5839473",
"0.583621"
] | 0.7739176 | 1 |
ProductionBuffer.java TODO consider renaming this class to MachineBuffer | public interface ProductionBuffer {
public int getMaxBufferSize();
public int getCurrentBufferSize();
public boolean isFull();
public boolean isEmpty();
//Add to the back of the buffer
public boolean add(BufferSlot bs);
//Remove from the front of the buffer
public BufferSlot remove();
//empties the buffer
public void clear();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract public Buffer createBuffer();",
"public IBuffer newBuffer();",
"abstract public ByteString getBlocksBuffer();",
"@Override\n protected void releaseBuffer() {\n }",
"byte [] getBuffer ();",
"@Override\n\tpublic void parse(Buffer b) {\n\t\t\n\t}",
"protected CoarseMeBuffer(CoarseMeScalars scalars) {\n\t\tsuper(scalars.getKernel());\n\t\tstream.suppressOffsetVectorWarnings();\n\n\t\tm_scalars = scalars;\n\t\tm_addressType = dfeUInt(MathUtils.bitsToAddress(scalars.bufferDepth));\n\n\t\tCoarseMeBufferControl buffCtrl = new CoarseMeBufferControl(scalars);\n\t\tm_outputEnable = buffCtrl.getOutputEnable();\n\n\t\tDFEVectorType<DFEVar> type = new DFEVectorType<DFEVar>(dfeUInt(16), scalars.numPipes);\n\t\tDFEVector<DFEVar> reference = io.input(\"reference\", type, buffCtrl.getReferenceInputEnable());\n\n\t\tDFEVar[] writeAddress = getWriteAddress(buffCtrl.getReferenceInputEnable());\n\n\t\tDFEVar[] readAddress1 = getReadAddresses(buffCtrl.getReadEnableBuffer1(), 0);\n\t\tDFEVar[] readAddress2 = getReadAddresses(buffCtrl.getReadEnableBuffer2(), 1);\n\n\t\tint cyclesToReadAhead = MathUtils.ceilDivide(scalars.blockSize + scalars.numPipes - 1, scalars.numPipes);\n\n\t\tDFEVar[][] bufferOutput = createBuffer(reference, buffCtrl.getReferenceInputEnable(),\n\t\t\t\t writeAddress, readAddress1, readAddress2,\n\t\t\t\t buffCtrl.getWhichBuffer(), cyclesToReadAhead);\n\n\t\tDFEVar rotate = buffCtrl.getWhichBuffer() ? stream.offset(readAddress2[scalars.blockSize], -cyclesToReadAhead)\n : stream.offset(readAddress1[scalars.blockSize], -cyclesToReadAhead);\n\n\t\tm_bufferOutput = rotateBlock(bufferOutput, rotate);\n\n\n\t}",
"@Override\r\n\tpublic void PushToBuffer(ByteBuffer buffer)\r\n\t{\r\n\t\r\n\t}",
"public interface Buffer {\r\n\tpublic void add(String s);\r\n\tpublic String retrieve();\r\n}",
"@Override\n public void resetBuffer() {\n\n }",
"public Producer(Buffer buff) {\n buffer = buff;\n }",
"public abstract int process(Buffer input, Buffer output);",
"public ByteBuffer buffer() { return bb; }",
"public TestBuffer() {\n }",
"protected ByteBuffer getBuffer() {\n return buffer;\n }",
"Buffer copy();",
"void writeCurrentBuffer();",
"private interface OutputBuffer {\n String getName();\n\n String getOutput();\n\n PrintWriter getPrintWriter();\n }",
"@Override\n public void onBufferReceived(byte[] buffer) {\n }",
"abstract public Buffer createBufferFromString(String data);",
"public abstract void outputBmp(FastStringBuffer buf);",
"private void decodeBuffer(boolean flushBuffer) throws IOException {\n if (!flushBuffer && bb.position() < PROCESS_THRESHOLD) {\n return;\n }\n bb.flip();\n cd.reset();\n if (bb.hasRemaining()) {\n CoderResult cr = cd.decode(bb, cb, true);\n cd.flush(cb);\n if (cr.isMalformed()) {\n // Move the tail bytes to the head\n int tailLength = bb.remaining();\n if (tailLength >= MALFORMED_INPUT_MAX_LENGTH) {\n // We only expect the bytes of one character to be broken\n throw new MalformedInputException(tailLength);\n }\n }\n bb.compact();\n } else {\n bb.clear();\n }\n }",
"public TransformationBuff() {}",
"List<TrackerPayload> getBuffer();",
"@Override\n\tpublic void resetBuffer() {\n\t}",
"public TextBuffer constructTextBuffer()\n/* */ {\n/* 137 */ return new TextBuffer(this._bufferRecycler);\n/* */ }",
"public byte[] getVideoBuffer()\n {\n return this.videocard.vgaMemory;\n }",
"public abstract void inClassOutputBmp(FastStringBuffer buf);",
"public interface BeamBufferListener\n\n{\n \n /**\n * handle new beam when it arrives\n */\n \n public void handleBeamBuffer(ByteBuffer beamBuf);\n\n}",
"public EntityBuffer(int bufferCapacity) {\n\t\tbuffer = new DataPostbox<EntityContainer>(bufferCapacity);\n\t}",
"public void handleBeamBuffer(ByteBuffer beamBuf);",
"public ByteBuffer getBuffer() {\n return _buf;\n }",
"@Override\r\n\tpublic Buffer setBuffer(int pos, Buffer b) {\n\t\treturn null;\r\n\t}",
"public byte[] getInstrumentedClassBuffer() {\n\t\tbyte[] byteCode = new byte[instrumentedClassBuffer.capacity()];\n\t\tinstrumentedClassBuffer.get(byteCode);\n\t\treturn byteCode;\n\t}",
"public interface IEnergyBuffer extends IElectric {\n \n public int getMaxStored();\n \n public int getStored();\n \n public void setBuffer(int energy);\n \n}",
"public interface BufferUsageStrategy\n{\n ByteBuffer onTermAdded(final String destination,\n final long sessionId,\n final long channelId,\n final long termId,\n boolean isSender) throws Exception;\n}",
"static com.qiyukf.nimlib.p470f.p471a.C5826a m23369a(android.os.Parcel r4) {\n /*\n com.qiyukf.nimlib.f.a.a r0 = new com.qiyukf.nimlib.f.a.a\n r1 = 0\n r0.m50001init(r1)\n int r2 = r4.readInt()\n r0.f18499a = r2\n int r2 = r4.readInt()\n if (r2 <= 0) goto L_0x001d\n byte[] r2 = r4.createByteArray()\n java.nio.ByteBuffer r2 = java.nio.ByteBuffer.wrap(r2)\n r0.f18501c = r2\n L_0x001d:\n int r2 = r4.readInt()\n r0.f18500b = r2\n int r2 = r4.readInt()\n if (r2 <= 0) goto L_0x0061\n byte[] r4 = r4.createByteArray()\n int r3 = r0.f18500b\n if (r3 <= 0) goto L_0x005c\n int r1 = r0.f18500b\n if (r1 != r2) goto L_0x0049\n java.nio.ByteBuffer r4 = java.nio.ByteBuffer.wrap(r4)\n r0.f18502d = r4\n java.nio.ByteBuffer r4 = r0.f18502d\n r4.position(r2)\n goto L_0x0068\n L_0x0049:\n int r1 = r0.f18500b\n java.nio.ByteBuffer r1 = java.nio.ByteBuffer.allocate(r1)\n r0.f18502d = r1\n java.nio.ByteBuffer r1 = r0.f18502d\n r1.put(r4)\n goto L_0x0068\n L_0x005c:\n java.nio.ByteBuffer r4 = java.nio.ByteBuffer.wrap(r4, r1, r2)\n goto L_0x0065\n L_0x0061:\n java.nio.ByteBuffer r4 = java.nio.ByteBuffer.allocate(r1)\n L_0x0065:\n r0.f18502d = r4\n L_0x0068:\n boolean r4 = m23372b(r0)\n if (r4 == 0) goto L_0x006f\n return r0\n L_0x006f:\n int r4 = r0.f18500b\n if (r4 <= 0) goto L_0x007d\n android.util.SparseArray<com.qiyukf.nimlib.f.a.a> r4 = f18504a\n int r1 = r0.f18499a\n r4.put(r1, r0)\n goto L_0x00a2\n L_0x007d:\n android.util.SparseArray<com.qiyukf.nimlib.f.a.a> r4 = f18504a\n int r1 = r0.f18499a\n java.lang.Object r4 = r4.get(r1)\n com.qiyukf.nimlib.f.a.a r4 = (com.qiyukf.nimlib.p470f.p471a.C5826a) r4\n if (r4 == 0) goto L_0x00a2\n java.nio.ByteBuffer r1 = r4.f18502d\n java.nio.ByteBuffer r0 = r0.f18502d\n r1.put(r0)\n boolean r0 = m23372b(r4)\n if (r0 == 0) goto L_0x00a2\n android.util.SparseArray<com.qiyukf.nimlib.f.a.a> r0 = f18504a\n int r1 = r4.f18499a\n r0.remove(r1)\n return r4\n L_0x00a2:\n r4 = 0\n return r4\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.qiyukf.nimlib.p470f.p471a.C5826a.C5829b.m23369a(android.os.Parcel):com.qiyukf.nimlib.f.a.a\");\n }",
"public interface Decoder<InBuffer> {\n\n Class<?> getDefaultClass();\n\n Object decode(Context context, Type type, Short typeLength, Integer typeModifier, InBuffer buffer, Class<?> targetClass, Object targetContext) throws IOException;\n\n }",
"private void extractProcessMessagesFromBufferIntoQueue(ByteBuffer byteBuffer){\n // when this function is called, byte buffer is ready for being read\n // i.e. position should point to the last byte written\n ProcessMessage procMsg;\n while((procMsg = extractProcessMessageFromByteBuffer(byteBuffer)) != null){\n // put procMsg into queue\n receivedMessagesQueue.add(procMsg);\n }\n\n // compact buffer for further reading new data\n byteBuffer.compact();\n\n }",
"public abstract int getBufferMode();",
"public void doPack() {\n if (this._sendData == null) {\n this._sendData = new byte[13];\n }\n this._sendData[0] = 0;\n if (this.isMenu) {\n byte[] bArr = this._sendData;\n bArr[0] = (byte) (bArr[0] | 1);\n }\n if (this.isPlayback) {\n byte[] bArr2 = this._sendData;\n bArr2[0] = (byte) (bArr2[0] | 2);\n }\n if (this.isRecord) {\n byte[] bArr3 = this._sendData;\n bArr3[0] = (byte) (bArr3[0] | 4);\n }\n BytesUtil.arraycopy(generateChannelByte(), this._sendData, 1);\n this._sendData[11] = 0;\n if (this.isButton) {\n byte[] bArr4 = this._sendData;\n bArr4[11] = (byte) (bArr4[11] | 1);\n }\n byte[] bArr5 = this._sendData;\n bArr5[11] = (byte) (bArr5[11] | (this.buttonData << 1));\n byte[] bArr6 = this._sendData;\n bArr6[11] = (byte) (bArr6[11] | (this.symbol << 6));\n byte[] bArr7 = this._sendData;\n bArr7[11] = (byte) (bArr7[11] | (this.change << 7));\n byte[] bArr8 = this._sendData;\n bArr8[12] = (byte) (bArr8[12] | this.shutter);\n byte[] bArr9 = this._sendData;\n bArr9[12] = (byte) (bArr9[12] | (this.focus << 1));\n byte[] bArr10 = this._sendData;\n bArr10[12] = (byte) (bArr10[12] | (this.mode_sw << 2));\n byte[] bArr11 = this._sendData;\n bArr11[12] = (byte) (bArr11[12] | (this.transform_sw << 4));\n byte[] bArr12 = this._sendData;\n bArr12[12] = (byte) (bArr12[12] | (this.gohome << 6));\n }",
"long[] getBuffer() {\n\t\treturn buffer;\n\t}",
"@Override\n\tpublic void interpretBytes() {\n\t\t\n\t}",
"public Buffer getBuffer() {\n return buffer.getCopy();\n }",
"public void fromBuffer(ByteBufWrapper paramhd)\r\n/* 18: */ {\r\n/* 19:35 */ this.b = ((np)a.fromJson(paramhd.c(32767), np.class));\r\n/* 20: */ }",
"private ByteBuffer passTwo() {\r\n\t\t// int hiAddress = ((((instructionCounter.getCurrentLocation() - 1) / SIXTEEN) + 2) * SIXTEEN) - 1;\r\n\t\tint hiAddress = (instructionCounter.getCurrentLocation() - 1) | 0X0F;\r\n\t\tByteBuffer memoryImage = ByteBuffer.allocate(hiAddress + 1);\r\n\r\n\t\tint lowestLocationSet = instructionCounter.getLowestLocationSet();\r\n\t\tinstructionCounter.reset(lowestLocationSet);\r\n\t\tinstructionCounter.setCurrentLocation(lowestLocationSet);\r\n\t\tint currentLocation;\r\n\t\tString instructionImage;\r\n\t\tSourceLineParts sourceLineParts;\r\n\r\n\t\twhile (!allLineParts.isEmpty()) {\r\n\t\t\tinstructionImage = EMPTY_STRING;\r\n\r\n\t\t\tcurrentLocation = instructionCounter.getCurrentLocation();\r\n\t\t\tsourceLineParts = allLineParts.poll();\r\n\r\n\t\t\tif (sourceLineParts.hasInstruction()) {\r\n\t\t\t\tinstructionImage = setMemoryBytesForInstruction(sourceLineParts);\r\n\t\t\t} else if (sourceLineParts.hasDirective()) {\r\n\t\t\t\tinstructionImage = setMemoryBytesForDirective(sourceLineParts);\r\n\t\t\t} // if\r\n\t\t\tmakeListing(currentLocation, instructionImage, sourceLineParts);\r\n\t\t\tif (!instructionImage.equals(EMPTY_STRING)) {\r\n\t\t\t\tbuildMemoryImage(currentLocation, instructionImage, memoryImage);\r\n\t\t\t} // if\r\n\t\t} // while\r\n\r\n\t\ttpListing.setCaretPosition(0);\r\n\t\tmakeXrefListing();\r\n\t\t// makeMemoryFile(memoryImage);\r\n\t\treturn memoryImage;\r\n\t}",
"public Object getContent() {\n/* 112 */ return this.buf;\n/* */ }",
"@Override\n public byte[] getBuffer() {\n return EMPTY_RESULT;\n }",
"public void toBuffer(ByteBufWrapper paramhd)\r\n/* 48: */ {\r\n/* 49:55 */ paramhd.b(this.a);\r\n/* 50:56 */ paramhd.writeInt(this.b);\r\n/* 51:57 */ paramhd.writeInt(this.c);\r\n/* 52:58 */ paramhd.writeInt(this.d);\r\n/* 53:59 */ paramhd.writeByte(this.e);\r\n/* 54:60 */ paramhd.writeByte(this.f);\r\n/* 55:61 */ paramhd.writeBoolean(this.g);\r\n/* 56: */ }",
"abstract void allocateBuffers();",
"public abstract void outputComplementBmp(FastStringBuffer buf);",
"public char[] getResultBuffer() { return b; }",
"public OutputBufferMap () {\n }",
"public void toBuffer(ByteBufWrapper paramhd)\r\n/* 23: */ {\r\n/* 24:40 */ paramhd.a(a.toJson(this.b));\r\n/* 25: */ }",
"@Override\n\tpublic void builder(ByteBuffer buffer) {\n\t\tsetV(buffer);\n\t\tsetO(buffer);\n\t\tsetT(buffer);\n\t\tsetLen(buffer);\n\t\tsetContents(buffer);\n\t\tsetTotalByteLength();\n\t}",
"public ByteBuffer getBuffer() {\n return buffer;\n }",
"protected abstract Buffer doCreateBuffer(byte[] data)\n throws BadParameterException, NoSuccessException;",
"private void get_buffer(Vector2 p0, Vector2 p1, Vector2 p2, Vector2 p3,\r\n\t\t\tint bufferCount) {\r\n\r\n\t\tbuffList.clear();\r\n\t\tdouble steps = 0;\r\n\t\tdouble step = 0.0;\r\n\t\tdouble t = 0.0;\r\n\t\tdouble tt = 0.0;\r\n\t\tdouble ttt = 0.0;\r\n\t\tdouble p0x = p0.x;\r\n\t\tdouble p1x = p1.x;\r\n\t\tdouble p2x = p2.x;\r\n\t\tdouble p3x = p3.x;\r\n\t\tdouble p0y = p0.y;\r\n\t\tdouble p1y = p1.y;\r\n\t\tdouble p2y = p2.y;\r\n\t\tdouble p3y = p3.y;\r\n\r\n\t\tint ipps = bufferCount;\r\n\r\n\t\tint i = 0;\r\n\t\tsteps = ipps - 1;\r\n\t\tif (steps > 0) {\r\n\t\t\tstep = 1.0 / steps;\r\n\t\t\tbuffList.add(new Vector2(p1.x, p1.y));\r\n\r\n\t\t\tfor (i = 1; i < steps; ++i) {\r\n\t\t\t\tt += step;\r\n\t\t\t\ttt = t * t;\r\n\t\t\t\tttt = tt * t;\r\n\t\t\t\tbuffList.add(new Vector2(0.5 * ((2 * p1x) + (-p0x + p2x) * t\r\n\t\t\t\t\t\t+ (2 * p0x - 5 * p1x + 4 * p2x - p3x) * tt + (-p0x + 3\r\n\t\t\t\t\t\t* p1x - 3 * p2x + p3x)\r\n\t\t\t\t\t\t* ttt), 0.5 * ((2 * p1y) + (-p0y + p2y) * t\r\n\t\t\t\t\t\t+ (2 * p0y - 5 * p1y + 4 * p2y - p3y) * tt + (-p0y + 3\r\n\t\t\t\t\t\t* p1y - 3 * p2y + p3y)\r\n\t\t\t\t\t\t* ttt)));\r\n\t\t\t}\r\n\t\t\tbuffList.add(new Vector2(p2.x, p2.y));\r\n\t\t}\r\n\t}",
"public ConsumptionStatus consumeBuffer() {\n\t\tif (status == ConsumptionStatus.BUFFERED){\n\t\t\tString buffered = newBuffer;\n\t\t\tnewBuffer = null;\n\t\t\tstatus = ConsumptionStatus.EMPTY;\n\t\t\tconsumeLine(buffered);\n\t\t\treturn status;\n\t\t}else {\n\t\t\tthrow new IllegalStateException(\"There is no buffer to consume.\");\n\t\t}\n\t}",
"interface WorldmapBuffer2 {\n final static byte[] image2 = {\n -125, 47, -3, 77, 51, 29, -45, -103, -120, 119, 76, -122, -82, -22, -106, 61, 113, 4, -59, 124, -116, 59, 115, -26, -44,\n 56, -115, 34, 106, -124, 98, 83, -115, 70, 9, -67, -116, 99, 92, -127, 89, -23, -68, -11, -41, 72, -15, -68, -48, 4,\n 29, 85, -30, 4, -79, -56, -20, 126, 69, 119, -119, -115, -116, 60, -37, -53, -107, 68, 90, -45, 79, -99, 108, 109, 45,\n 84, -65, -93, -44, -79, -23, -40, 23, -40, -48, 98, -92, -50, 125, -104, -52, -58, 50, -97, -119, 13, -78, -81, 82, -86,\n 15, -71, -92, 77, -115, -48, 48, 77, -88, 6, 61, 104, -117, -51, 103, -90, 5, -71, -52, 42, 76, -68, 113, 79, -7,\n 43, -42, -84, 38, -56, -100, 93, -44, 34, 71, -113, 100, -116, 64, 42, 88, -40, 94, 93, -83, -118, -115, 99, -32, -27,\n 72, -26, 43, -104, 35, 7, 37, 101, 12, -66, 107, -104, -128, -106, -116, 54, -93, -83, -119, -50, 23, -47, -117, 39, 89,\n 6, -9, 41, 47, 10, -37, -124, -2, 115, -40, -55, -67, -37, -118, -118, 92, 108, 24, -41, 35, -43, -61, 45, 44, 118,\n 87, 92, 70, -14, 108, -37, -22, -106, -41, -127, 124, -92, -70, -99, -42, 22, -38, 106, 43, -8, -84, -97, -99, -39, -48,\n -6, -62, 78, -10, -98, -38, 109, -98, -23, -87, -45, 112, -67, 73, 42, 21, 99, -25, 109, -40, -21, 10, 120, -88, -110,\n -99, 105, -37, -97, 68, -70, -112, 15, 54, -99, 111, 77, 37, 108, 52, -33, 113, 93, 59, -33, 56, -78, 124, -85, 42,\n 107, -3, -54, -94, 29, -37, 97, -53, -54, -24, 8, -113, -18, 45, 108, 61, 122, -124, 19, 102, 118, -65, -14, -31, 32,\n 30, -30, -8, 35, -40, 102, -106, -109, -33, -115, -58, -27, 38, -37, 43, 88, 106, -11, -104, -51, -16, 11, -39, 116, 24,\n -123, -48, -6, 107, 73, -39, -31, -107, 109, -98, 85, -36, 39, 115, 61, -37, -33, 53, -61, -49, 103, -119, -73, 84, -35,\n -64, -6, 97, -72, -85, -98, -94, 58, -33, 127, 77, -34, 96, 90, -127, 58, -22, -118, -61, -83, 58, 96, 59, 95, 27,\n 11, -29, -123, 76, 79, -108, 11, -48, -35, -100, -40, 82, 4, 97, 57, -18, -36, -63, -94, -28, -105, -87, -76, -57, -84,\n 122, -13, -40, -60, -37, -6, -28, -105, -42, -34, -105, 76, 61, 59, -2, -27, -103, -125, -76, 111, 39, -39, 118, -88, -119,\n 56, 43, 116, 50, 22, -87, 44, 43, -91, 63, -21, -51, -2, -14, -26, -38, -76, 36, -26, -52, -122, -26, 100, -61, -75,\n -108, 7, 24, -24, 92, -37, -28, -116, -51, 52, 126, -33, -103, -102, 114, -27, 77, -24, -124, 87, 68, -13, -119, -28, 99,\n -71, -33, 25, 88, -49, 120, 41, -24, -125, -82, -62, 102, -25, -49, -119, 25, -82, 111, 38, 63, -52, 76, 26, 81, 71,\n 118, -115, 39, 125, -58, -94, -26, 29, -109, -25, -4, -92, -80, 43, -42, -83, -108, -66, -86, -65, 43, -25, 19, 70, -23,\n -80, -68, -54, -72, -3, -43, 32, -117, -93, 102, -93, 27, -29, -77, 56, -70, -38, -34, 27, -67, -94, 52, -75, -119, -73,\n -5, -45, 58, 120, -48, 107, 125, -112, 109, -84, -25, 40, 78, -21, -8, 69, -27, -117, -36, 108, 57, 93, -114, 52, 120,\n -32, 100, 68, -48, -51, 65, -35, -42, 78, 82, 58, -88, 96, -121, 126, -39, 104, 34, -123, -6, 9, 66, -35, 40, 107,\n 66, -120, -65, 127, -125, -19, -75, 6, 122, -30, -21, -74, 42, 126, -121, 2, 3, -19, 22, 20, 53, 85, 89, 61, -21,\n -25, -95, 94, 18, -18, -35, 70, -101, 33, 10, -80, 18, 35, 94, 99, -98, -18, 40, -66, 87, 54, -18, -23, -36, 107,\n -24, 8, 47, -28, -113, -61, -87, -20, -98, -19, -71, 45, -35, -128, -82, -80, -23, -121, -38, 99, -117, -70, 7, 104, -20,\n 52, 122, -18, 76, -115, -40, 36, -6, -16, 88, -59, -72, 127, -58, -111, 59, 126, -2, 82, -17, -68, -49, -18, -63, -118,\n 111, -109, -33, 120, -118, -50, -52, 52, -29, -121, -2, -62, 126, 26, -124, -46, -18, -112, -115, 92, -65, 117, 125, -16, -74,\n 74, 90, -9, 27, -61, 0, 111, 110, 2, -72, -125, -102, 30, 22, 42, -33, 115, 23, -6, -24, 124, -102, -57, -16, 78,\n -62, 76, -119, 91, -48, -87, -65, -71, 126, -118, -123, -89, -18, -31, -92, -13, -95, -68, -35, -63, -100, 55, 88, -68, -47,\n -69, 55, -12, 99, 33, -16, -34, -22, -63, 66, 78, -11, -93, 78, 66, 17, 12, -75, -115, 6, -109, 34, 9, 114, -108,\n -72, -103, 8, -76, 112, 58, 126, -16, -74, -34, 102, 29, -56, -64, 88, 103, 123, -91, 100, 55, 61, -55, -50, 59, -33,\n -22, 90, 55, -90, -106, -3, -20, -79, -35, 53, -112, -2, -47, 49, -114, -23, 30, 95, -16, 25, 70, -17, 75, 53, -9,\n -38, 73, 109, 53, 38, -10, 106, -102, 55, -17, -31, 76, -26, -6, -128, -110, -1, -44, 25, 7, -56, 86, -56, -9, -6,\n 9, -10, -57, -66, -20, 5, 125, -8, 106, -83, -8, -1, -89, -13, -114, 31, -97, -88, -120, 75, -21, 42, -22, -19, -111,\n 101, -117, 107, -30, -71, 121, -11, -99, 23, 88, -68, -8, -88, -85, 25, -128, 72, 47, -95, -122, -125, -87, 50, -82, 50,\n -14, -34, -92, 112, 102, -29, -87, -113, -106, -64, -18, 108, 26, 107, 32, 69, -37, 120, 10, -113, 118, -20, -2, 38, -46,\n 93, -116, -63, 23, 126, -19, 25, -55, -113, -95, -99, 121, -55, 106, -122, 29, 72, -32, 117, 103, -106, 86, -52, 104, -37,\n 15, -14, -122, -27, -33, 77, 79, 96, 4, 27, 34, -87, -6, 69, -69, -69, -93, 113, 3, -49, 69, -75, 56, 101, 106,\n 78, 57, 62, -15, -16, 92, -8, -63, -114, -48, -59, -82, 95, 52, 116, 108, 104, 11, -69, 78, 6, 16, 1, 4, 14,\n 36, 88, -48, -32, 65, -124, 9, 21, 46, 100, 56, 80, 0, 0, 1, 7, 35, 10, -96, 8, 49, 98, -61, -126, 15,\n 1, 108, -28, -40, -47, -29, 71, -112, 33, 69, -114, 36, 89, -46, -28, 73, -108, 41, 47, 98, 76, -88, 113, 100, -59,\n -115, 43, 9, -62, -20, 72, 49, -128, 77, -121, 11, 93, -106, -92, 72, 83, -92, -52, -101, 61, 29, -6, -12, -120, 51,\n -88, -48, -116, 10, -127, 74, 100, 57, 115, 105, 83, -88, 45, -97, 10, -20, 57, 53, 42, 84, -93, 59, 85, 62, 20,\n -86, 53, -27, 87, -80, 97, -59, -114, 37, 91, -42, 108, 88, -85, 87, -43, -82, 101, -120, 52, -93, 70, -93, 87, -67,\n -98, -91, 91, -41, -82, -39, -86, 108, -25, 22, -35, 25, 119, -24, -57, -117, 50, -105, 86, 37, 10, 56, 110, -31, -102,\n 84, -111, 30, -2, -23, 23, -95, 85, -57, 65, 115, 98, -115, -52, 118, 109, 86, -73, -106, -43, 10, 30, -37, -109, 35,\n -30, -69, -2, -95, 69, -113, 38, 93, 58, 100, 90, -51, -87, 85, 27, -52, -85, 23, -76, 105, -40, -79, -47, 14, 69,\n -51, 122, 47, 95, -61, -84, 1, 83, 117, 74, -8, -90, 83, -117, 46, 43, 7, -83, 73, 24, -13, -17, -103, -89, 99,\n 54, -100, -24, -72, -7, 98, -29, -61, 21, -41, 94, -51, 50, 115, 117, -21, -103, 111, -13, -12, 44, -37, -5, 119, -16,\n -31, 65, 82, -57, 94, -34, -68, -50, -18, -30, -43, -81, 79, 60, 25, -29, -21, -94, 55, 79, -21, 110, -1, -5, -16,\n 68, -38, -48, -87, -73, 126, 59, 84, -30, 120, -72, -104, -29, -115, 53, -34, -116, -21, -17, 49, -14, -50, 83, -80, 41,\n -56, -2, -21, 108, 34, -10, 34, -108, 112, 66, -80, 18, 92, -16, -62, -43, -46, -93, 112, 67, -39, 4, -77, 78, 37,\n -86, 78, 3, -118, -90, -107, 112, 10, 44, -90, -86, -118, -77, -112, -71, 18, 31, -37, 77, -70, -57, -108, -102, 46, 58,\n 4, 49, -76, -47, -75, -89, 42, -37, -114, 39, -30, 56, -12, -15, 71, 9, 87, -68, 113, 72, -84, -128, 52, 114, 52,\n 15, -33, -5, -22, -60, -58, 104, 91, 14, 57, -59, -28, -5, -52, 64, 5, 3, 67, 48, -66, -53, 90, -126, 18, 61,\n 24, -119, -12, 50, -71, 39, -35, 123, -85, -84, 18, -113, 52, -13, 76, -46, -124, -4, 114, 77, 7, -47, 116, -77, -77,\n -103, 62, 4, 81, -54, -105, 66, -2, -124, 9, 63, -121, 32, -30, 107, -56, -25, -24, -29, 75, -51, 40, 9, -108, -18,\n 58, 54, 11, 5, 46, -52, -93, 108, -61, 11, -52, 55, 27, 117, 116, 73, 67, 35, 109, -53, -90, 29, 31, -75, 52,\n -52, 4, 43, 125, -47, 36, 38, -21, -53, 19, 75, 27, -97, -93, -76, 83, 80, 47, 27, 49, 63, 26, 37, 85, -107,\n -50, 39, 73, 100, -108, -52, 87, 47, -107, 117, 86, 64, 87, 93, -112, 43, -8, 102, -75, -76, 69, 37, -105, -52, -75,\n -43, -15, 14, 45, -11, -42, 1, 41, 101, 117, 79, -53, -4, 66, -83, 86, 91, 85, 35, -86, -71, 97, 53, -27, 49,\n 68, 93, -85, -107, -107, -39, 102, -85, -85, 8, 66, 107, -83, 53, -111, 65, -76, 78, -30, 118, -73, -93, -126, -67, 49,\n 48, -63, -74, -61, -42, 63, 49, 109, 91, 55, -37, -88, -26, 42, 108, -80, -77, -54, -20, -10, -34, 55, -33, -123, 87,\n -77, -82, -16, -11, 118, 75, -99, 68, 51, -18, 37, 19, -5, -22, -46, -39, -106, -22, -20, 109, -77, 1, -37, 117, 120,\n -33, 42, 81, 26, 76, -38, -97, 62, -11, -9, -30, 35, -7, -125, -40, 75, 13, 49, -34, 21, -32, -124, -21, -30, -17,\n -41, -32, -114, -123, -24, 92, -91, 42, 30, 89, -56, -26, -100, -118, 113, -29, 80, -59, 45, -40, 100, 72, -87, -11, -8,\n 102, 31, -11, -123, -103, 50, -118, 113, -34, -48, 74, -26, -2, 66, 51, -111, 83, 81, -55, 13, 85, 42, 17, -91, 34,\n 15, -49, -55, -46, -43, 121, -25, -128, -125, 123, -115, -79, 37, 17, -19, -39, 103, -84, -45, -124, -102, -29, -85, -77, -114,\n -80, -27, -74, -46, 36, -103, -44, -8, 8, -115, 55, 58, -115, 37, -14, -86, 54, -77, 103, 76, 21, 74, -96, -73, -66,\n 80, -39, -67, 56, -37, 74, 89, -81, -13, 86, -17, 105, -71, 83, -42, -37, -51, 59, -89, -22, -72, 49, -76, 83, 28,\n 79, 102, -102, -91, 62, 85, 109, -76, -109, 114, 92, 41, -31, 14, -114, 44, -45, -103, -5, 38, 114, -22, -116, 36, 6,\n 57, -15, -65, 59, 23, -38, 114, 12, -69, -10, -4, 107, 116, 65, 43, -4, 101, -50, 125, 37, -102, -72, -126, -17, -44,\n -119, 41, 22, 87, 84, -106, 103, 116, 65, -97, 123, -57, 17, 53, 119, 113, 116, -34, -111, -76, -3, -68, -63, 123, -49,\n -8, -74, -74, -75, -76, -7, 59, -83, -26, 125, 29, 118, -32, -29, -52, -82, 70, -105, 127, -41, 107, -38, -52, -87, -9,\n 83, 120, -20, -21, -107, 30, -8, -20, -49, 36, 12, 89, -84, 98, 37, 51, 120, -18, -124, 91, -98, -7, -14, -66, 101,\n 16, 61, -55, 54, -33, 62, 108, -21, -113, 87, 88, -47, -18, -21, 39, -117, 111, -23, 73, -74, 95, -68, 17, -45, 94,\n 95, -4, 7, 125, -81, 124, -84, 74, 75, 1, -101, -41, -66, -1, 65, -18, 113, -2, -17, -21, 21, 73, 114, 7, 32,\n -33, 108, -55, 112, -5, -93, -96, -18, 24, -104, -84, 10, 2, 73, 112, 122, 1, 96, 120, -58, -123, 40, 2, 25, 47,\n 125, 28, -20, -115, -1, -16, -73, 49, 105, -107, 14, 64, 74, -109, -110, -24, 50, 88, -65, -30, 93, 48, 106, 47, -4,\n -103, 8, -49, 102, -79, 32, -127, -49, 54, 54, -44, 22, 9, -99, -57, 67, 25, -50, -112, 96, 117, 43, -99, 91, -32,\n 66, 67, 36, 110, 37, -120, -17, 113, 97, 18, 5, 38, -93, 120, 9, 43, 103, 13, 99, 23, 16, 17, 38, 23, -25,\n 64, 113, -119, 65, -69, -33, 4, -115, -24, 68, 48, 90, 112, -117, 109, 10, -29, 122, 96, 4, -88, -2, -3, -120, 105,\n -127, 58, 31, 118, -48, -120, 58, -12, -115, -47, 111, 104, 73, 79, 119, -56, 87, 70, 60, 126, 70, -114, -41, -53, 35,\n 120, -10, -109, -91, -73, 52, -15, 46, -38, -79, -48, -63, -62, 119, -74, 28, 105, 113, -113, 33, -85, -48, -119, -122, -90,\n -89, 62, 70, -46, 92, 123, -44, -97, 36, 69, -74, 52, 64, -70, 103, -126, 14, 20, 100, -46, 2, 37, 59, 55, -54,\n 69, -127, 112, 92, 36, 25, 37, 118, 50, -55, 84, -46, -110, 97, 124, -37, -5, 58, -71, -54, -102, 89, 39, -109, -101,\n -53, -107, 10, -75, -89, 49, -106, -123, -14, -112, -118, -100, 78, 41, -123, 40, 46, 84, 114, 5, -106, -61, -2, 4, 85,\n -23, -74, -9, 74, 98, -118, 107, 82, -2, -5, 95, 1, 43, 22, -56, -15, 49, -82, -112, -70, 124, 30, 47, -87, -24,\n -53, 64, -118, -114, 108, -55, 36, -90, 49, -39, -120, -86, 19, -14, -117, -101, -90, 97, 91, 15, -35, 39, 63, 79, 101,\n 115, -120, 125, -111, -32, 125, 100, -103, -95, -3, 116, 105, -125, -40, 68, -112, 42, -127, 53, 78, 110, 50, -55, 105, -124,\n 10, -25, 101, -16, 89, -102, 114, 102, -24, -100, 127, 25, 86, 8, 55, -103, 21, 20, -127, -19, -102, -67, 108, -29, 21,\n -95, 39, 32, 82, -46, -77, -125, -100, -76, -25, 63, -111, -88, -49, 4, -50, -115, -117, 22, -3, 28, -5, -32, -55, 68,\n -72, 24, -48, 93, -3, 3, 90, -110, 30, 26, 71, 126, 89, -77, 45, -11, -108, 40, -3, 56, -6, -46, 105, 5, 40,\n -93, -38, 58, -35, -18, 96, 42, -78, 81, -102, -109, 65, 1, -35, -52, 96, 60, -54, 56, -121, -94, -76, -95, -46, -108,\n 104, 69, 111, -118, -49, 113, -127, -110, 123, -122, -71, 14, 50, -113, 42, 56, 67, 70, -47, 60, -52, -102, -35, 74, -43,\n 6, 66, 44, 102, 83, -87, -25, 99, -90, 12, 7, 118, 84, -80, 98, -55, 124, 9, -116, 33, 56, 35, 88, 41, -124,\n -122, -11, 126, 59, 36, -42, 84, 119, -7, -55, -91, -111, 52, -99, 88, -20, 42, 68, -83, 122, 32, -41, 64, -52, -87,\n 106, -59, -2, 99, 29, 17, -7, -80, -22, -119, 40, -123, 56, -28, 43, -30, -94, -89, 81, -73, -18, 114, 84, -120, -52,\n 11, 59, 125, -8, 88, -107, 2, -106, 69, 3, 53, -44, 94, 11, 91, 70, 87, 37, 11, 114, 56, 69, -25, 101, -97,\n -7, -61, -48, 29, 112, -89, 11, -107, -86, 98, -26, 90, 90, -122, 49, -47, -118, 92, 2, -19, -86, 44, -21, 89, 86,\n -114, 21, -78, -90, -75, -117, -35, 96, -21, -55, 5, -74, 53, -79, -76, -101, -22, 105, -33, -6, -37, -55, 10, -107, -95,\n 8, 92, -104, -83, 94, 123, 91, 26, 62, 18, -107, -77, -20, -47, 32, 39, 10, -37, 8, -110, 86, -76, 35, -116, -105,\n 69, 122, -21, -37, -103, 114, -87, 86, -109, 107, -36, 112, 89, 42, -87, -29, 34, 55, -125, -117, -63, -18, 123, -98, -69,\n -42, -13, -14, -107, -92, 101, 21, -24, 116, -63, -75, 92, 109, -23, 16, -75, 67, 53, 85, -125, 22, 39, -62, 126, 54,\n 80, -68, 96, -91, 84, 121, -19, 26, 94, -85, -19, 87, -113, 44, 68, -20, 110, -85, 11, -33, 12, -27, 102, 70, -26,\n -67, 43, 77, 103, 87, -94, -74, 25, 49, 82, 0, 22, -16, 11, 63, -120, 45, -27, 58, -105, -80, -73, 21, 41, 101,\n 83, -22, -34, -9, 34, 56, 53, 68, 116, 108, 100, 67, 88, -91, -82, -12, 73, 42, 39, 94, 19, -123, 43, 108, 97,\n 2, -14, -53, -88, -54, 76, 93, -2, 97, 33, 76, 37, -23, 6, -107, -102, 114, 25, 112, 124, -43, 37, 98, 22, -45,\n 119, -86, 107, -116, 104, -114, 67, -9, -30, -53, -6, 68, 95, 20, -34, 38, 116, 91, -85, -74, 42, 69, -39, -97, 64,\n -106, 113, 99, 18, 90, -28, -43, 38, 118, 89, -62, 61, 23, -110, 109, 76, -89, 119, -71, 56, 56, 21, 54, -87, -112,\n 71, 12, -30, 16, -29, -49, 116, -57, -117, -18, -115, 35, -52, 39, -17, 2, 54, -65, -65, -12, -14, 83, 109, -74, 46,\n 49, 35, -7, -66, -11, -116, 42, 112, 117, 124, 96, 42, -69, 6, -126, -60, -5, -22, 105, -25, -20, 48, -19, 112, 57,\n 102, 9, -83, 51, 76, -19, 21, -24, -115, 54, 90, -61, 79, 94, 96, -97, -33, -71, 99, 30, -9, -40, 89, 107, 67,\n -50, -116, -105, 27, -35, 2, -117, 105, -98, 45, 30, 112, -98, 37, -35, 59, 82, 89, 122, -61, -89, 94, 84, 110, -125,\n -20, 97, 81, 98, 58, -45, 88, 77, 22, -114, 33, 44, 22, 34, -93, -84, -75, -119, 84, 117, -83, 19, 99, 106, 86,\n -13, -82, -65, -2, -75, 105, -80, 91, 125, -40, 34, -97, 16, -44, -20, 125, 53, -96, 105, -51, 92, 68, -29, -102, 77,\n -89, -118, 91, 127, 14, 77, -48, 82, 27, -5, -91, -54, 115, -10, 32, 55, -23, -39, 61, -81, -74, -41, 39, 61, 10,\n -124, -77, -37, 109, -66, -31, -46, -108, -70, 27, 119, -84, -2, -93, -73, -27, -97, -10, -44, 92, -64, -42, -10, -24, -28,\n -43, -19, 122, -47, -51, -55, -82, 86, 116, -104, 121, 105, 72, -86, 126, 16, -46, 56, 18, 92, 0, 57, -106, 31, 88,\n 67, -75, 118, -17, -124, -113, -64, -21, 109, -25, 16, -25, -69, -36, 99, -6, 50, -65, -5, -67, 93, 120, -29, 53, -53,\n 13, 46, 49, -102, 59, -53, 41, -74, 74, 57, 64, -110, 115, -77, -94, -109, -13, 43, 79, 63, 92, -110, -78, -69, 100,\n -32, 8, -87, -42, 68, -38, 117, -29, 51, -49, -15, -96, 10, 119, 115, -25, 104, -38, -29, 77, -28, 76, 63, 83, -68,\n -100, 66, -30, 9, -86, 124, -82, -102, -54, -43, 91, 36, -94, 21, -70, 124, -24, -30, 47, -86, 24, 28, -17, 6, -101,\n -8, -101, -108, -34, -116, -50, 13, -68, -22, 57, 109, 107, -87, -49, -54, -22, 64, -47, 102, -12, 122, -77, 28, -28, -127,\n 85, 98, 115, 45, 10, -22, 75, 71, -99, -36, 102, -82, -94, 100, -99, 61, 103, 122, -31, 69, -74, -15, -3, 108, -38,\n -35, 103, 48, -80, -121, 125, -42, 117, -1, 56, -115, -51, -114, -44, -39, 74, 29, -42, -51, 14, -7, -32, 35, -99, -33,\n -72, 79, -102, -18, 124, -49, 41, -78, 77, 70, -17, -68, 3, 6, -77, 123, -97, 15, -39, 99, 41, -64, 127, 110, -105,\n 50, 80, 118, -9, 50, -37, 77, -58, -49, -1, -37, 119, 110, 28, -5, 40, 71, -2, 45, -81, -56, -17, 45, -27, 127,\n 83, -109, -70, -42, 45, -79, -114, 21, 14, -106, -102, 71, -19, -25, -73, -102, -32, -126, 18, -36, -14, -100, -59, 125, -4,\n 52, 14, -78, 71, -85, 8, -14, -87, 63, -39, -22, -11, 102, 105, -41, -13, -111, 46, -58, -62, 118, 31, 105, -49, -40,\n 15, -37, 125, -60, 70, -21, 105, -15, 0, -84, 51, 85, 54, 40, -73, -63, -49, 54, -15, -3, -24, -4, -96, 79, 50,\n -67, -72, 110, -22, -16, -15, -11, -4, -50, -89, -10, -36, 24, -92, 62, 72, 115, 45, -59, -114, -78, 63, -106, -108, -10,\n -23, -29, 29, -82, 58, -17, -13, 55, -24, 56, -98, -114, -73, -65, 117, -48, 111, -125, 49, -11, 75, 63, 2, 84, -69,\n -23, -53, -67, 21, -77, -72, 60, -61, 48, -98, 107, 54, 115, 75, -91, -61, -127, 21, -29, -53, 63, 48, 10, -67, 68,\n -103, 64, -63, 34, -94, -66, -126, -74, -11, -21, 64, -102, -85, 58, 4, 36, -68, 28, -119, 13, -86, -126, -107, 87, 3,\n -101, -1, -117, 63, -13, -93, 64, 97, 107, -67, 20, 124, 56, -86, -30, 64, 63, 99, -69, -22, 107, 63, 44, 3, 24,\n 12, -12, 61, 57, 65, -81, -100, -104, 24, -125, -86, -79, 10, 25, 63, 22, -20, -90, 92, -94, 45, -67, 11, -68, -89,\n -109, 65, -63, 43, 45, 78, 91, 48, -73, -77, -113, 28, 44, -67, -99, -46, 30, 118, -7, 35, 35, 92, -2, 62, 33,\n 28, 66, 34, -52, -88, 21, -76, 36, 111, -14, 64, 26, 52, 64, 49, -52, 36, 78, 115, 39, -54, -118, 66, 49, -46,\n 47, 19, 108, -95, -63, -77, -110, -67, -78, 45, 45, 12, -85, -5, -96, -101, -32, -61, 60, 61, -53, -118, 25, -108, -71,\n -7, -110, 62, -51, -38, 48, 94, -93, 51, -17, 8, -65, 75, 2, 51, 35, -45, 36, 32, -12, -69, 46, -116, 67, -20,\n 57, -88, -121, 73, -101, 68, 20, -64, -57, 57, -93, 1, -36, 67, -43, 106, 47, 63, -28, -68, 57, -30, 31, 53, 20,\n -103, -10, -64, -92, 78, -93, -62, 67, 84, 68, 57, 92, 40, 103, 122, -79, 13, 42, -94, -18, 114, -65, 62, -52, 67,\n 104, 75, 30, -109, 67, -61, -39, -128, 31, 114, 50, 60, 94, 65, -90, -5, 19, 69, 14, -117, -71, -111, 34, -77, 37,\n 116, -65, 37, 43, -64, -24, -117, -107, 112, -21, 13, 10, -39, -113, 14, -15, 68, -14, 90, -108, 71, -60, -59, 10, -86,\n 42, -68, 90, -58, -3, -47, -66, -68, 122, -102, 94, 83, -74, 98, 27, -58, -65, -101, 16, -74, 57, 70, -91, 57, -85,\n -66, -125, -108, 59, 98, 70, 27, 51, -106, -61, -40, 61, 14, -21, -59, -121, -62, 62, 92, 1, -61, 73, -92, -72, -2,\n 113, 18, 13, -110, -59, 89, -44, 69, -40, 113, -86, -42, -127, 70, 113, -20, 30, 3, -55, 57, 83, -76, -75, -82, -93,\n 58, -10, -2, 74, -58, 76, -71, -70, -1, 48, -73, 0, -100, 34, 64, 124, -94, 106, 19, 41, 91, -60, -107, 97, -53,\n 71, 61, 43, 54, -15, -22, -86, -96, 75, 64, 77, -62, 37, -68, 25, 72, -126, 44, 72, 59, -12, -98, -124, 124, 34,\n 40, -84, -74, 19, 107, -56, -104, -80, 8, -120, -84, -77, 17, -108, -69, 97, -62, 57, -24, -24, 69, -95, -29, 51, -117,\n 28, 67, 36, 100, -100, 107, -55, 68, -40, -128, -106, 86, -63, -81, 124, 43, -118, -109, 68, 73, -27, -13, -107, 22, 90,\n -91, -38, -15, -63, 14, 123, 29, -37, -101, 38, -99, 90, 38, -40, -29, -112, 82, -20, 16, 54, -45, -111, 44, -28, -92,\n -98, 100, -75, -60, 107, -92, 79, -127, 69, -42, -29, 21, 44, -117, -89, 39, 52, 74, 62, 84, -62, -85, -94, -88, 91,\n 52, 35, 70, 34, 65, 116, -14, -63, -88, -92, -88, -87, -108, -76, 7, 2, -54, -65, 120, -56, 72, 82, -88, -83, 28,\n 41, 34, -93, 61, -92, 60, 51, -43, 34, 49, 115, 100, 15, -56, 64, -98, 108, -124, -81, 52, -70, -97, 78, 92, -53,\n 70, 83, 58, -65, -93, 13, 0, -6, 58, 124, 100, -54, -89, -61, -56, 22, -87, 63, 38, 100, -57, 36, 52, 47, -105,\n 43, 56, -124, -4, 73, -128, -86, 27, 81, 123, -91, 103, 17, 38, -62, -116, -56, -88, -100, 24, -47, -60, 72, 20, 105,\n 70, 1, -63, 67, 68, -61, -58, -2, 36, -116, 43, -68, 84, -84, 109, -68, -52, -67, 20, 27, -62, 73, 75, 17, -111,\n 60, -84, -4, 76, 47, 76, -85, -61, -76, -113, -127, -109, -90, -15, -6, 61, -32, 83, -97, 30, -92, 58, -114, 99, 27,\n -111, 4, 70, -103, -116, -51, -81, 113, -87, 99, 116, -96, 43, -124, 19, 121, 73, 30, -36, 20, -80, -126, -103, 18, 110,\n -117, 19, -82, -112, -73, -33, 108, 31, -43, 76, 20, -20, 36, -50, -27, -111, 28, -16, -100, -52, -81, 124, 61, 109, 4,\n -114, -37, -100, 15, -41, -13, -52, -15, -87, -51, 41, -103, 78, 50, -13, 38, 47, 26, -55, -23, -79, -80, 50, 59, -61,\n -92, -72, -49, -43, -20, 70, -62, 43, -49, 101, -6, -56, -13, 36, 68, 96, 107, -78, -30, 88, 62, 7, -22, 62, -8,\n -100, 72, -6, 72, 17, 122, -84, -81, -59, 100, -52, 3, -111, 68, -115, 107, 61, -128, -124, 58, -55, -44, -82, -86, 84,\n -93, 24, 27, 80, -84, 43, -55, 122, -31, -114, 79, 75, 80, -22, -84, 67, -30, 26, -49, -25, 121, -48, 26, 26, 78,\n 15, -13, 41, -83, -108, 62, -76, 12, 67, -109, -93, -85, 111, 44, 70, -79, 50, -53, 25, 117, 74, 9, 18, -47, -8,\n 60, -106, -116, -101, 37, 20, 13, -48, 78, 43, 81, -108, 122, -55, 61, 44, -94, 11, 109, 59, 75, -4, 81, 101, 26,\n 80, 2, -11, -53, -74, -44, -47, -3, -46, 16, -29, -116, -2, -63, 14, 109, -63, 78, 123, 63, -6, 11, -46, 25, 108,\n 55, -106, -95, -58, 42, 53, -109, 38, -3, -100, -12, 76, -70, 79, 83, 82, 40, -75, 31, -54, -23, 41, -38, -52, 26,\n -56, -100, 75, 44, -91, -53, 27, 36, 79, 61, 36, 67, 90, -71, -47, -38, 58, 72, 3, -3, -119, 30, 27, -45, 51,\n 21, 74, -38, -111, -89, -108, -116, -58, -18, -68, -69, 84, -20, -49, -82, 76, -50, 56, 77, 59, 51, -107, -103, -31, -61,\n 15, -84, -84, 36, 8, 89, -44, 62, 93, -60, -103, 4, -56, 112, -12, -100, 114, -116, 40, -52, 49, -44, 67, 69, -44,\n 24, 109, 35, 73, -27, 20, -43, 11, 83, -85, -4, 75, 0, -103, -44, 83, 67, 63, 43, -38, 39, 24, 58, -50, -51,\n 116, 78, 78, 53, 60, 79, -75, -72, -55, 12, 85, 51, -38, 84, 59, -35, 77, 83, -27, 73, 84, 45, 76, -80, 68,\n 76, 57, -29, -45, 70, 33, 36, -33, -48, -97, 116, -103, 83, -57, -29, -77, -37, -85, -90, 47, 21, -98, -25, 104, 63,\n -50, -124, -86, 94, -115, -68, 55, -126, 28, -83, -100, 39, 97, -51, -105, -125, -20, 25, -90, -77, 46, 33, 91, 56, -73,\n -95, 67, -49, 83, 69, -52, -124, -95, 75, 108, 86, 78, 10, -53, 105, -51, -69, 106, 37, 48, -72, 121, -103, 108, 5,\n -100, 109, -51, -70, -112, 18, 67, 112, 45, -73, -14, -101, -46, -72, -102, -100, -117, -2, 58, -41, 92, 109, 18, -26, 92,\n 87, -107, 107, 87, -89, 115, 28, 105, 12, -59, 60, -70, -50, -71, 68, -72, 74, 44, 88, 39, 116, 88, -13, -116, 70,\n -62, -126, -61, 32, 68, 69, -127, -91, -42, 86, -76, 33, 122, 28, 75, -64, 11, -49, -70, -6, 83, -55, -14, 70, -101,\n 76, -82, -26, -93, 88, 49, -30, -66, -117, -123, -63, -116, 37, 37, -56, 36, -43, 124, 90, 41, -3, -28, 64, -115, -108,\n -56, 36, -78, 45, -109, -27, -114, 74, 75, 89, -93, -93, 82, 5, 116, -75, 107, 109, -70, -88, -13, 82, 90, 29, 90,\n 91, -115, 71, -117, -55, 48, -100, -35, 62, -99, 29, -40, -22, 19, -51, 56, 114, 51, -68, -71, -87, -101, 3, -83, 116,\n -5, -44, -66, -116, 75, 97, -31, 88, 27, 4, -66, -50, 88, 90, -104, -5, 43, 82, 60, 61, -76, 43, -41, -105, -107,\n -96, 11, 52, -47, 115, -13, 68, -78, 117, -94, -64, -68, 84, -83, 19, 65, 81, -27, 85, -81, -107, 90, 10, 125, -73,\n 101, 81, -75, -94, -83, -106, -123, 124, -64, 66, -12, 51, -75, 93, 83, 10, -102, 24, 15, 37, -100, 23, 13, 44, 59,\n -20, -52, -68, -99, -37, 107, 113, 85, -6, -78, -64, -78, -28, 40, 19, 74, -44, -76, 117, -47, 110, -94, 89, 114, 41,\n 84, 104, 90, -81, 50, 84, -36, -77, 27, 90, 119, -71, -100, -89, 58, 88, -76, -83, -43, -88, 122, -46, -2, -39, 115,\n 23, 88, -115, 56, -100, 99, 42, -50, -51, 60, 56, 69, -57, -34, 115, 52, -47, -19, -37, 75, -13, 43, -103, 75, -36,\n 124, -79, 92, 98, -13, 19, -83, 45, -48, -42, 29, -89, -69, -123, -35, 3, -108, -38, -58, 77, 82, -7, 66, 29, -36,\n 29, -42, -120, -75, -70, 76, -20, 93, -21, -124, -96, -33, 77, 88, 40, 42, -54, 35, -5, -109, -28, 5, -45, -30, 61,\n 51, 70, 100, -80, -21, 85, 94, -27, 124, 54, 83, -46, -89, 112, 76, -98, 91, -117, -34, 10, -44, -94, -39, -67, -107,\n 82, -119, 87, -84, -95, 94, 89, 101, -97, -92, 18, 82, -90, -24, 94, -17, -3, -34, 76, 17, 43, 60, 5, 88, -84,\n 99, 95, -13, 69, -109, -94, 28, -75, 80, 25, -37, 93, 101, 37, 40, 27, 84, -87, -30, -106, -104, 93, -37, -107, 92,\n -34, -91, 89, 95, -98, -93, -40, -22, -20, -33, 69, -52, -111, -47, 28, -35, 17, 19, 78, 5, 102, 91, -125, 77, 96,\n -122, -7, -71, 119, 124, 92, -56, 101, -32, 72, 3, 76, -71, -109, -46, -128, -107, 96, 76, 77, -42, -111, -46, -85, -114,\n 36, -32, -102, -93, -87, 2, -71, 59, -35, 117, -35, -120, 21, -32, -57, -117, 18, -118, -23, -52, -109, -125, -116, 25, -93,\n 95, 20, -74, -102, -47, -38, 26, -61, 36, 89, 25, -42, 37, -82, 4, -36, -107, -101, 97, 61, -46, -114, -53, 117, 94,\n -91, 43, -2, 41, -104, -67, 84, -61, -8, -31, -113, -95, 93, 96, -75, 29, 31, -10, -93, 115, 82, 51, 89, -67, -39,\n 109, 83, -30, -46, 68, -111, -65, 68, -63, -69, 89, -30, -103, 125, 78, 16, -91, 98, 121, -19, 84, 36, -75, 28, -2,\n -83, -55, 15, -36, -68, -51, -53, -30, 58, -51, 96, -55, 83, -49, -30, 35, 19, 49, 54, -64, 28, 54, 73, 53, -58,\n 94, -26, 107, 88, 87, -46, -32, -62, -77, 68, 124, 27, -59, -17, -83, -40, -30, 123, -61, 65, 1, -29, -46, 124, -29,\n 63, -66, 60, -42, 92, 34, 41, 118, 86, -2, -109, -75, 29, 76, 50, 47, -122, -50, -63, -11, -74, 27, 36, -76, -2,\n -94, 99, -50, 93, -42, 45, -126, 100, 109, -43, -75, 67, -82, 56, -124, 101, 84, 18, 108, 83, -44, -107, 26, 36, -114,\n 100, -65, 60, -46, -33, 17, 101, -128, -126, -40, 77, -93, 60, -24, 26, 98, -63, -60, -47, 67, 117, -71, 127, -107, -27,\n -27, -108, -45, 82, 78, -82, -90, 114, -93, -42, 51, -59, 18, -86, -28, 32, -119, 85, 30, -75, -27, -2, -75, 66, 108,\n -126, 102, -112, 124, 90, 102, -61, -60, 76, 86, 80, 107, 13, 85, 3, 94, 101, 97, 54, 90, 24, -67, 32, 106, -82,\n -26, 74, -77, 96, 21, -106, -57, -119, 52, 70, -28, 73, -61, -41, -4, -26, 58, -114, 99, 113, 38, -30, 122, -20, 102,\n 108, -34, -60, 116, -74, 62, 102, -2, -18, 34, 70, 125, -78, 47, 114, 103, 93, 113, 95, 74, -22, -41, -104, 100, -29,\n 115, 6, -48, 123, 94, -74, 20, 93, -116, -84, -19, 86, 127, -66, 20, -128, 30, -93, 113, 38, 103, -1, -28, 60, -28,\n -37, 89, 0, -52, 95, -42, -19, -94, -56, 65, -39, 16, 109, -24, 42, -42, 84, -120, -82, 89, 74, 4, 42, -32, 28,\n 89, 106, 77, -95, 22, 94, 62, -14, -39, 100, -113, -50, 24, -45, 107, 100, 55, 38, -28, 11, 29, 14, 102, -117, 104,\n -74, 101, -24, -67, -127, -65, -106, -58, 94, -113, 82, -72, -104, -106, -23, -119, 110, 99, 21, 69, 103, 113, -60, -55, 32,\n 73, -58, -99, -10, 95, 23, 101, -36, 125, -79, -23, 91, -98, -23, 2, 2, -44, -75, 92, 84, -116, 78, -22, 98, -52,\n -114, -59, 50, -25, 66, 113, -22, -89, 102, -72, 8, -117, -22, -88, -10, -26, 81, -74, -22, -117, -23, -46, 79, 5, -81,\n 13, -36, 41, 55, 44, 92, 69, -39, 39, -114, -18, -45, 124, -58, 13, -78, -10, 23, 82, -98, 58, 120, -31, 106, -83,\n -15, 33, 35, -126, 74, -121, -44, -111, -117, -75, 88, -112, -61, -21, -99, 46, -62, 122, 54, 46, -23, -99, -83, 76, -51,\n -49, -34, -20, 26, -63, 14, 92, -25, 104, 56, 116, -99, -21, -36, 101, 69, -7, -83, 44, -25, 91, -59, 64, -94, 37,\n -7, 104, 103, -103, -55, -57, -78, 74, 62, -79, -106, 108, -2, -105, 14, 106, -69, -98, -74, -53, 102, -84, 51, -86, -65,\n -20, 52, -23, 58, 105, -20, -20, 81, -25, -49, 114, -19, -122, -66, -53, -32, -78, -20, -61, -90, -20, -1, 90, -106, 57,\n 9, -19, 35, 52, -24, -73, 22, 109, -121, 38, 109, -83, -66, -82, -55, 67, 78, -84, -10, 78, 71, -82, 15, -39, 102,\n 83, -82, 27, 97, -22, 91, 110, 119, 62, 99, 98, -26, -109, -37, -58, 109, -104, 116, 27, 16, -98, 31, -24, -58, -103,\n -14, -19, -51, 26, 11, 76, -32, -42, 91, -98, -94, 101, -30, 118, -31, -111, 110, -68, 31, -78, -52, -92, 13, 102, -97,\n -36, 97, -40, -82, 60, -118, 11, -17, 127, 14, 107, -21, -114, -104, -76, 54, -18, 79, -106, 51, 41, 68, -29, -34, 118,\n 30, -110, 99, 60, -10, -106, 111, 35, -111, 86, -62, -2, -110, -19, -58, -62, 118, -60, -48, 31, 92, -34, -110, 57, -31,\n -2, 38, -24, -3, -51, 110, 1, 127, 20, -88, 68, 109, -114, -87, -18, -6, -50, -41, -90, 97, -32, -85, 29, -40, 6,\n -33, -76, -83, 13, -16, 9, 7, -25, -31, -10, -36, -12, -71, 111, -4, 22, -22, 118, 114, -16, -14, 58, -16, 110, 105,\n 25, 53, 11, 65, 23, -9, -25, -60, -2, -43, 19, -57, 44, -52, 69, -17, -110, -90, -38, 68, -42, 109, -90, 117, 92,\n -101, -14, -15, 17, -9, 22, -71, -76, -15, -59, 59, 95, 105, 26, 91, 37, 71, -2, 86, 59, 21, -14, 35, 68, -68,\n -43, -106, -16, 33, 15, 110, 127, -93, 110, 20, -9, -68, -77, -78, 97, -72, -35, -17, 68, 110, -17, -93, 49, -24, 41,\n -9, 94, 60, -77, -14, 43, 23, 100, 12, 70, -42, 28, 102, -19, 84, -67, -21, 48, -1, -105, -9, 61, -21, -31, 45,\n -13, 49, -92, 109, -2, -98, 31, 59, -26, 69, 54, 111, -13, 127, -122, -16, -58, 34, 115, 12, 103, 114, 43, -58, -63,\n 88, -68, 115, 60, -65, -21, 25, -113, -18, 78, 37, 36, 63, -1, 115, 26, -4, 91, 23, 82, -17, 96, -69, -26, -83,\n 62, 116, 97, 102, 106, 126, -69, 54, 17, 55, 87, 118, -108, -26, 71, -105, -14, 40, -3, -40, 60, -41, 115, 71, -79,\n 116, 57, -21, 50, 63, 13, -22, -15, -18, -12, -28, 30, 71, 76, 47, 111, 81, 7, 28, -38, 5, 96, -11, 61, -11,\n -23, 30, 79, -106, 6, -16, 76, 119, 52, -81, 122, -11, -6, 109, 81, -30, 60, 52, 74, 87, -68, 112, -114, -36, 46,\n -105, -15, 59, 12, -94, 96, 87, -29, 90, -28, -50, 55, 69, 110, 87, 79, -30, -1, -28, -103, 104, -37, 109, 6, -105,\n 67, -17, -2, 105, 94, -9, -56, 98, -87, -62, 35, 38, -67, 100, 26, -17, 102, -30, 87, 106, 47, -10, -48, -107, -93,\n -72, -50, 118, 45, -66, 98, 42, -110, -89, 11, -82, 106, 70, 55, -15, 66, 14, -44, 52, -116, 108, -120, -2, 11, 104,\n 116, 39, -15, -66, 5, 119, -54, -48, -11, 112, 110, -60, 85, 103, 94, -34, -18, -40, 82, 74, 118, -13, 117, -27, -75,\n 43, 104, 48, 95, -32, 126, -81, 112, 66, -89, 50, -126, -65, 106, 95, 122, -8, -33, -3, -32, -38, -122, -13, 58, 23,\n -8, 56, 126, 104, -58, 110, -8, 47, -98, -26, 123, -65, -52, 106, -124, -25, -128, -57, 90, -105, 12, 90, 109, -30, -8,\n 16, -90, 39, -119, 87, 92, 95, 15, 98, 120, 31, -32, -50, -43, 113, 120, -65, -11, -44, 53, 101, 72, -12, -8, -113,\n 111, 102, 8, 63, 65, -25, 6, -38, -127, -66, 100, -29, 49, 62, -25, 85, 101, -100, -49, 121, -78, -36, 121, -97, 61,\n 35, 112, -13, -54, 64, 87, -20, 60, 61, -10, -94, 50, 122, -66, 44, 113, 68, 43, -60, -107, 79, 119, 45, 105, -7,\n -55, -70, 122, -113, 105, 118, 74, -106, -6, -93, 111, 122, -98, 63, -61, 125, -117, 17, 80, 55, 123, -101, -105, -61, 86,\n -97, 48, -80, -49, 105, -79, 95, -31, 119, -11, 116, -30, 21, -7, -96, -9, -20, -106, 26, -7, -74, -105, -74, -73, 39,\n 48, 39, 39, 122, 103, -74, -25, 56, 92, 123, -74, -49, -5, 64, 68, 122, 64, -89, -9, -104, -73, -8, -124, -49, 63,\n -63, -33, 106, -62, 47, -4, -67, -9, 84, -82, -41, 68, -125, -97, 50, -69, -113, -6, -57, -73, -47, 55, -105, 124, -22,\n 52, -37, -2, 27, 34, 119, -17, 107, 124, -45, -50, -4, -101, -116, 124, -105, -60, -13, -77, -81, 71, -48, 15, 125, -52,\n 39, -3, -89, -82, -38, -98, 47, 123, -11, -93, 121, 45, 20, 125, 3, 119, -3, 89, -36, -4, -116, 7, -51, 1, 68,\n 90, -120, -76, -3, 11, -57, -3, -68, -58, -66, -54, 70, 124, 68, 22, -91, 126, 38, 76, -32, 95, 116, -31, -81, 45,\n -35, 71, 94, -71, -105, -3, 34, -59, -51, -27, 55, -11, -26, 23, -45, -92, -124, 116, -34, 23, -89, -23, -84, -2, -22,\n -67, 126, -25, 34, -2, -33, -101, 124, 8, -27, -2, -18, 31, 50, 73, 127, 118, -16, -65, 37, 67, 78, -17, 72, 55,\n -1, -13, -105, -79, 111, 75, -3, 35, 95, 127, -100, 18, 127, -125, 122, 127, 65, 19, -47, -128, -53, -31, -54, 7, -120,\n 0, 2, 7, 18, 44, 104, 112, -96, 0, 0, 10, 23, 50, 108, -24, -16, 33, -60, -120, 18, 39, 82, -84, 104, -15,\n 34, -58, -116, 26, 55, 114, -20, -24, -15, 35, -56, -123, 2, 4, -114, 60, 104, -14, 100, -128, -110, 7, 71, 38, 12,\n -23, -14, 37, -52, -104, 27, 85, -94, 60, -39, 82, 38, -50, -100, 58, 119, -30, -92, 89, -45, -96, -128, -101, 24, 125,\n 6, -3, 105, 20, 40, -49, -92, 74, -105, 50, 109, -22, 84, 105, 73, -97, 71, -127, -94, 12, -6, -12, 42, -42, -105,\n 82, -89, 10, -51, -22, -11, 43, -2, 88, -122, 91, 127, 90, -19, 72, -77, -24, -44, -93, 93, -61, -78, 109, -21, -10,\n -19, 85, -107, 99, -45, -90, -84, 10, -9, 46, -40, -71, 85, -41, -30, -19, -21, 87, -93, -34, -96, -126, 7, -125, -108,\n 11, 64, 47, 93, -110, 127, 23, 51, 110, -36, 88, 110, -30, -107, 104, 11, -14, 117, 108, 57, 36, 98, -54, -107, 47,\n 115, -10, 59, -103, -14, -50, -88, -103, 19, 111, -18, 108, -6, 52, 106, -114, 103, 35, 35, 61, 44, 88, 113, -22, -40,\n 67, 7, -45, -82, 93, 90, 54, 110, -84, -97, -53, -22, 20, 124, -72, 46, -21, -107, 95, 121, -25, 46, 110, -4, 35,\n -28, -32, -96, -59, -34, 62, -18, -4, 57, 116, -73, 69, -101, 107, 117, 61, 90, 109, 88, -33, -47, -73, 115, -1, -115,\n 80, -7, -14, -18, -30, -57, -109, 127, 74, 61, -26, -21, -49, -84, -49, -13, -116, 90, -2, 125, -22, -43, -32, 9, -78,\n -121, 111, -1, 62, -2, -20, 9, -81, -37, -51, -98, 50, 63, -128, -98, 81, 54, 31, 125, 1, 26, 120, 32, -126, -70,\n -127, 87, 95, 123, 12, 38, -8, 32, 122, -12, 17, 24, 30, -124, 21, 90, 120, -31, 80, 11, 74, -73, 31, -122, 29,\n -54, 68, -44, -124, 5, 122, 56, 34, -119, 24, -14, -41, 90, 91, -124, -107, -72, -30, 76, 3, -122, -8, 31, -117, 49,\n -54, 120, -33, -119, 20, -78, 53, -35, -116, 57, 70, 4, -2, 98, -120, 14, -22, -8, 35, -112, -114, -115, 53, -105, 118,\n -46, -111, 68, 91, -112, 51, -14, 56, -95, -113, 73, 58, -7, 100, -118, 72, -99, 85, 36, 92, 91, 53, 9, 37, -115,\n 18, 46, -88, 34, -106, 93, 122, -23, 25, 90, 55, -79, 116, 37, 83, 86, 126, 57, -94, 124, 116, 33, 121, 38, -101,\n 109, -34, 69, -100, 107, -116, -103, -23, -90, -123, 105, -90, 69, 38, -99, 121, -22, 25, -38, 98, 86, -30, -71, -25, 113,\n 75, -34, 9, 40, -95, -123, -42, -87, -103, -95, 7, 10, -54, 85, -94, -115, 58, -118, -33, 89, -113, 2, -72, 40, 118,\n -110, 90, 122, 41, 116, -122, 97, 106, 31, -91, -110, -123, -71, 41, -88, -95, 50, 39, -26, -97, -24, 53, -28, -98, -88,\n -28, 117, -118, 34, -107, -87, -70, -22, -88, 104, 44, 25, -39, 82, 122, -81, -114, 87, 91, -91, -74, -22, 42, -23, -100,\n -2, -91, 52, 38, -100, -69, 58, 71, 106, -91, -91, 10, 123, -84, -116, 82, 25, 91, 24, -118, -56, 102, -86, 16, 75,\n -40, 5, -21, 44, -75, 94, 42, 123, 35, 125, -53, 86, 91, 37, -83, -64, -111, -43, -22, -74, -31, 62, 25, -87, -81,\n -80, -119, 27, 104, -73, -4, 77, 123, 46, -69, 57, 106, 58, 28, -71, -19, 26, -105, 110, -82, -14, -38, -85, 35, -72,\n 113, 53, 123, 47, 110, -55, -43, -92, 45, -65, 1, -17, -87, -34, -111, 2, -9, -2, -5, 29, 89, 6, 43, -84, -85,\n -97, 11, -53, -26, -81, 77, 14, 75, 28, -22, -112, 19, -57, 22, 109, -62, 22, 107, 12, -85, 73, 0, 111, -36, 84,\n 84, -33, 126, 60, 50, -95, 21, -109, 124, 89, -56, 54, 121, 124, 50, -53, -121, 10, -41, -14, 95, 86, 65, 108, 35,\n -52, 53, -113, -37, -80, -51, 111, 30, -119, 112, -57, 57, -5, 124, -77, 104, 63, -65, -7, 26, -49, 61, 11, 125, -12,\n -113, -21, 34, -99, -105, -117, -3, 45, -3, 52, -44, -37, -38, -23, 116, -44, 85, 91, -3, 106, -104, 70, -83, 124, 53,\n -41, 93, 39, 61, -104, -42, 94, -117, 61, -74, -95, -109, -115, -74, 53, -39, 105, -85, -99, -96, -39, 25, -81, -3, 54,\n -36, 73, -18, -25, 109, -60, 113, -37, 125, 119, -78, -45, -3, -117, 55, -33, 125, -93, 73, 55, 85, 104, -5, 61, 56,\n -31, -90, 17, -35, -79, -32, -123, 43, -66, -72, -100, -121, 35, -60, 56, -28, -111, -33, 90, -76, -71, -110, 91, 126, 121,\n 110, -47, 18, 53, -45, -102, -104, 123, -2, -71, 110, 41, 87, 126, -111, -52, -7, -126, 126, 58, -22, -24, 77, 71, 52,\n -125, -76, 38, -98, 58, -20, -96, 59, -2, -85, -46, -79, -37, 126, 59, 84, -23, 117, -114, 59, -17, -67, -73, 71, -69,\n 92, -81, -5, 62, 124, -22, -91, 3, -1, 43, -15, -55, 43, 111, 86, -23, -34, -115, -71, 60, -12, -47, 59, 83, -124,\n -85, -73, -75, 75, 127, 61, -15, -70, 3, 110, 61, -10, -35, -13, -98, 30, 66, 92, 122, 63, -66, -14, -69, -109, 127,\n 126, -10, -74, -95, -65, 126, -7, -36, -77, -1, 62, -4, -15, -53, 63, 63, -3, -11, -37, 127, 63, -2, -7, -21, -65,\n 63, -1, -3, -81, 24, 16, 0, 0, 59\n };\n}",
"public ByteBuf touch()\r\n/* 947: */ {\r\n/* 948:952 */ this.leak.record();\r\n/* 949:953 */ return this;\r\n/* 950: */ }",
"public void m7211c() {\n /*\n r34 = this;\n r16 = 0;\n r15 = 0;\n r5 = 0;\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"MINOR_TYPE\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r3 = -1;\n r4 = r2.hashCode();\n switch(r4) {\n case -1172269795: goto L_0x002e;\n case 2157948: goto L_0x0038;\n case 2571565: goto L_0x0024;\n default: goto L_0x0018;\n };\n L_0x0018:\n r2 = r3;\n L_0x0019:\n switch(r2) {\n case 0: goto L_0x0042;\n case 1: goto L_0x0162;\n case 2: goto L_0x01a9;\n default: goto L_0x001c;\n };\n L_0x001c:\n r2 = \"Undefined type\";\n r0 = r34;\n mobi.mmdt.componentsutils.p079a.p080a.C1104b.m6366b(r0, r2);\n L_0x0023:\n return;\n L_0x0024:\n r4 = \"TEXT\";\n r2 = r2.equals(r4);\n if (r2 == 0) goto L_0x0018;\n L_0x002c:\n r2 = 0;\n goto L_0x0019;\n L_0x002e:\n r4 = \"STICKER\";\n r2 = r2.equals(r4);\n if (r2 == 0) goto L_0x0018;\n L_0x0036:\n r2 = 1;\n goto L_0x0019;\n L_0x0038:\n r4 = \"FILE\";\n r2 = r2.equals(r4);\n if (r2 == 0) goto L_0x0018;\n L_0x0040:\n r2 = 2;\n goto L_0x0019;\n L_0x0042:\n r4 = mobi.mmdt.ott.provider.p169c.C1594n.TEXT;\n r33 = r5;\n L_0x0046:\n r8 = mobi.mmdt.componentsutils.p079a.p084e.C1113a.m6421a();\n r10 = mobi.mmdt.ott.provider.p169c.C1592l.IN;\n r0 = r34;\n r2 = r0.f4758b;\n r0 = r34;\n r3 = r0.f4757a;\n r3 = mobi.mmdt.ott.p109d.p111b.C1309a.m6934a(r3);\n r3 = r3.m6942b();\n r2 = r2.equals(r3);\n if (r2 == 0) goto L_0x0064;\n L_0x0062:\n r10 = mobi.mmdt.ott.provider.p169c.C1592l.OUT;\n L_0x0064:\n r0 = r34;\n r2 = r0.f4757a;\n r0 = r34;\n r3 = r0.f4761e;\n r2 = mobi.mmdt.ott.provider.p169c.C1583c.m7972a(r2, r3, r10);\n if (r2 != 0) goto L_0x0023;\n L_0x0072:\n r2 = mobi.mmdt.ott.MyApplication.m6445a();\n r2 = r2.f4177h;\n if (r2 == 0) goto L_0x008a;\n L_0x007a:\n r2 = mobi.mmdt.ott.MyApplication.m6445a();\n r2 = r2.f4177h;\n r0 = r34;\n r3 = r0.f4759c;\n r2 = r2.equals(r3);\n if (r2 != 0) goto L_0x024e;\n L_0x008a:\n r17 = 0;\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"REPLY_ON_MESSAGE_ID\";\n r2 = r2.get(r3);\n if (r2 == 0) goto L_0x00b8;\n L_0x0098:\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"REPLY_ON_MESSAGE_ID\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r2 = r2.isEmpty();\n if (r2 != 0) goto L_0x00b8;\n L_0x00aa:\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"REPLY_ON_MESSAGE_ID\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r17 = r2;\n L_0x00b8:\n r2 = new mobi.mmdt.ott.d.a.b;\n r0 = r34;\n r3 = r0.f4761e;\n r0 = r34;\n r5 = r0.f4760d;\n r0 = r34;\n r6 = r0.f4762f;\n r7 = \"SEND_TIME_IN_GMT\";\n r6 = r6.get(r7);\n r6 = (java.lang.String) r6;\n r6 = java.lang.Long.parseLong(r6);\n r11 = mobi.mmdt.ott.provider.p169c.C1593m.NOT_READ;\n r0 = r34;\n r12 = r0.f4759c;\n r13 = mobi.mmdt.ott.provider.p169c.C1595o.GROUP;\n r0 = r34;\n r14 = r0.f4758b;\n r2.<init>(r3, r4, r5, r6, r8, r10, r11, r12, r13, r14, r15, r16, r17);\n r0 = r34;\n r3 = r0.f4757a;\n r3 = mobi.mmdt.ott.logic.p157e.C1509a.m7621a(r3);\n r0 = r34;\n r4 = r0.f4762f;\n r0 = r33;\n r3.m7626a(r2, r0, r4);\n L_0x00f2:\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"REPLY_ON_MESSAGE_ID\";\n r2 = r2.get(r3);\n if (r2 == 0) goto L_0x013c;\n L_0x00fe:\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"REPLY_ON_MESSAGE_ID\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r2 = r2.isEmpty();\n if (r2 != 0) goto L_0x013c;\n L_0x0110:\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"REPLY_ON_MESSAGE_ID\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r0 = r34;\n r3 = r0.f4757a;\n r0 = r34;\n r4 = r0.f4761e;\n mobi.mmdt.ott.provider.p169c.C1583c.m7976b(r3, r4, r2);\n r0 = r34;\n r3 = r0.f4757a;\n r2 = mobi.mmdt.ott.provider.p169c.C1583c.m8003n(r3, r2);\n r0 = r34;\n r3 = r0.f4757a;\n r0 = r34;\n r4 = r0.f4761e;\n r5 = mobi.mmdt.ott.provider.p169c.C1595o.SINGLE;\n mobi.mmdt.ott.logic.p112a.p120c.p121a.p123b.C1387u.m7218a(r3, r4, r2, r5);\n L_0x013c:\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"MINOR_TYPE\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r3 = \"TEXT\";\n r2 = r2.equals(r3);\n if (r2 != 0) goto L_0x0023;\n L_0x0150:\n r2 = new mobi.mmdt.ott.logic.a.c.a.b.b;\n r0 = r34;\n r3 = r0.f4757a;\n r0 = r34;\n r4 = r0.f4762f;\n r2.<init>(r3, r15, r4);\n mobi.mmdt.ott.logic.C1494c.m7541c(r2);\n goto L_0x0023;\n L_0x0162:\n r6 = mobi.mmdt.ott.provider.p169c.C1594n.STICKER;\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"STICKER_ID\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r0 = r34;\n r3 = r0.f4762f;\n r4 = \"STICKER_PACKAGE_ID\";\n r3 = r3.get(r4);\n r3 = (java.lang.String) r3;\n r0 = r34;\n r4 = r0.f4762f;\n r7 = \"STICKER_VERSION\";\n r4 = r4.get(r7);\n r4 = (java.lang.String) r4;\n if (r4 == 0) goto L_0x02c9;\n L_0x018a:\n if (r2 == 0) goto L_0x02c9;\n L_0x018c:\n if (r3 == 0) goto L_0x02c9;\n L_0x018e:\n r7 = r4.isEmpty();\n if (r7 != 0) goto L_0x02c9;\n L_0x0194:\n r7 = r2.isEmpty();\n if (r7 != 0) goto L_0x02c9;\n L_0x019a:\n r7 = r3.isEmpty();\n if (r7 != 0) goto L_0x02c9;\n L_0x01a0:\n r16 = mobi.mmdt.ott.provider.p174h.C1629b.m8295a(r4, r3, r2);\n r33 = r5;\n r4 = r6;\n goto L_0x0046;\n L_0x01a9:\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"FILE_TYPE\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r3 = -1;\n r4 = r2.hashCode();\n switch(r4) {\n case 327328941: goto L_0x01de;\n case 796404377: goto L_0x01ca;\n case 802160718: goto L_0x01e8;\n case 808293817: goto L_0x01d4;\n default: goto L_0x01bd;\n };\n L_0x01bd:\n r2 = r3;\n L_0x01be:\n switch(r2) {\n case 0: goto L_0x01f2;\n case 1: goto L_0x020c;\n case 2: goto L_0x0222;\n case 3: goto L_0x0238;\n default: goto L_0x01c1;\n };\n L_0x01c1:\n r2 = \"Undefined file type\";\n r0 = r34;\n mobi.mmdt.componentsutils.p079a.p080a.C1104b.m6366b(r0, r2);\n goto L_0x0023;\n L_0x01ca:\n r4 = \"FILE_TYPE_IMAGE\";\n r2 = r2.equals(r4);\n if (r2 == 0) goto L_0x01bd;\n L_0x01d2:\n r2 = 0;\n goto L_0x01be;\n L_0x01d4:\n r4 = \"FILE_TYPE_VIDEO\";\n r2 = r2.equals(r4);\n if (r2 == 0) goto L_0x01bd;\n L_0x01dc:\n r2 = 1;\n goto L_0x01be;\n L_0x01de:\n r4 = \"FILE_TYPE_PUSH_TO_TALK\";\n r2 = r2.equals(r4);\n if (r2 == 0) goto L_0x01bd;\n L_0x01e6:\n r2 = 2;\n goto L_0x01be;\n L_0x01e8:\n r4 = \"FILE_TYPE_OTHER\";\n r2 = r2.equals(r4);\n if (r2 == 0) goto L_0x01bd;\n L_0x01f0:\n r2 = 3;\n goto L_0x01be;\n L_0x01f2:\n r3 = mobi.mmdt.ott.provider.p169c.C1594n.IMAGE;\n r2 = new mobi.mmdt.ott.logic.a.c.a.b.h;\n r0 = r34;\n r4 = r0.f4757a;\n r0 = r34;\n r5 = r0.f4762f;\n r6 = mobi.mmdt.ott.provider.p170d.C1605j.IMAGE;\n r2.<init>(r4, r5, r6);\n r2 = r2.m7152a();\n L_0x0207:\n r33 = r2;\n r4 = r3;\n goto L_0x0046;\n L_0x020c:\n r3 = mobi.mmdt.ott.provider.p169c.C1594n.VIDEO;\n r2 = new mobi.mmdt.ott.logic.a.c.a.b.h;\n r0 = r34;\n r4 = r0.f4757a;\n r0 = r34;\n r5 = r0.f4762f;\n r6 = mobi.mmdt.ott.provider.p170d.C1605j.VIDEO;\n r2.<init>(r4, r5, r6);\n r2 = r2.m7152a();\n goto L_0x0207;\n L_0x0222:\n r3 = mobi.mmdt.ott.provider.p169c.C1594n.PUSH_TO_TALK;\n r2 = new mobi.mmdt.ott.logic.a.c.a.b.h;\n r0 = r34;\n r4 = r0.f4757a;\n r0 = r34;\n r5 = r0.f4762f;\n r6 = mobi.mmdt.ott.provider.p170d.C1605j.PUSH_TO_TALK;\n r2.<init>(r4, r5, r6);\n r2 = r2.m7152a();\n goto L_0x0207;\n L_0x0238:\n r3 = mobi.mmdt.ott.provider.p169c.C1594n.FILE;\n r2 = new mobi.mmdt.ott.logic.a.c.a.b.h;\n r0 = r34;\n r4 = r0.f4757a;\n r0 = r34;\n r5 = r0.f4762f;\n r6 = mobi.mmdt.ott.provider.p170d.C1605j.OTHER;\n r2.<init>(r4, r5, r6);\n r2 = r2.m7152a();\n goto L_0x0207;\n L_0x024e:\n if (r33 == 0) goto L_0x029c;\n L_0x0250:\n r0 = r34;\n r0 = r0.f4757a;\n r18 = r0;\n r19 = r33.m8082n();\n r20 = r33.m8069a();\n r21 = r33.m8079k();\n r22 = r33.m8073e();\n r23 = r33.m8078j();\n r24 = r33.m8077i();\n r26 = 0;\n r27 = r33.m8081m();\n r28 = r33.m8080l();\n r29 = r33.m8075g();\n r30 = r33.m8071c();\n r31 = r33.m8072d();\n r32 = r33.m8070b();\n r33 = r33.m8074f();\n r2 = mobi.mmdt.ott.provider.p170d.C1598c.m8100a(r18, r19, r20, r21, r22, r23, r24, r26, r27, r28, r29, r30, r31, r32, r33);\n r2 = r2.getLastPathSegment();\n r2 = java.lang.Long.parseLong(r2);\n r15 = java.lang.Long.valueOf(r2);\n L_0x029c:\n r0 = r34;\n r2 = r0.f4757a;\n r0 = r34;\n r3 = r0.f4761e;\n r0 = r34;\n r5 = r0.f4760d;\n r0 = r34;\n r6 = r0.f4762f;\n r7 = \"SEND_TIME_IN_GMT\";\n r6 = r6.get(r7);\n r6 = (java.lang.String) r6;\n r6 = java.lang.Long.parseLong(r6);\n r11 = mobi.mmdt.ott.provider.p169c.C1593m.READ;\n r0 = r34;\n r12 = r0.f4759c;\n r13 = mobi.mmdt.ott.provider.p169c.C1595o.GROUP;\n r0 = r34;\n r14 = r0.f4758b;\n mobi.mmdt.ott.provider.p169c.C1583c.m7966a(r2, r3, r4, r5, r6, r8, r10, r11, r12, r13, r14, r15, r16);\n goto L_0x00f2;\n L_0x02c9:\n r33 = r5;\n r4 = r6;\n goto L_0x0046;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: mobi.mmdt.ott.logic.a.c.a.b.s.c():void\");\n }",
"CharArrayBuffer getBuffer()\n ;",
"public RingBuffer(int capacity){\n structure = new LinkedList<E>();\n this.capacity = capacity;\n }",
"public ParseBuffer(byte[] newBuffer) {\r\n\t\tthis(newBuffer, 0, newBuffer.length);\r\n\t}",
"abstract public Buffer createBufferFromData(byte[] data, int size);",
"@Override\r\n\tpublic Buffer copy() {\n\t\t\r\n\t\treturn null;\r\n\t}",
"private void m152578e(ByteBuffer byteBuffer) {\n if (f113303b) {\n PrintStream printStream = System.out;\n StringBuilder sb = new StringBuilder();\n sb.append(\"write(\");\n sb.append(byteBuffer.remaining());\n sb.append(\"): {\");\n sb.append(byteBuffer.remaining() > 1000 ? \"too big to display\" : new String(byteBuffer.array()));\n sb.append('}');\n printStream.println(sb.toString());\n }\n this.f113305c.add(byteBuffer);\n this.f113309h.onWriteDemand(this);\n }",
"public pam_message(Pointer src) {\n useMemory(src);\n read();\n }",
"public final ByteBuffer getBuffer() {\n return buf;\n }",
"public void mo133087a(ByteBuffer byteBuffer) {\n if (f113304g || byteBuffer.hasRemaining()) {\n if (f113303b) {\n PrintStream printStream = System.out;\n StringBuilder sb = new StringBuilder();\n sb.append(\"process(\");\n sb.append(byteBuffer.remaining());\n sb.append(\"): {\");\n sb.append(byteBuffer.remaining() > 1000 ? \"too big to display\" : new String(byteBuffer.array(), byteBuffer.position(), byteBuffer.remaining()));\n sb.append('}');\n printStream.println(sb.toString());\n }\n if (mo133105i() != AbstractC32931b.EnumC32932a.NOT_YET_CONNECTED) {\n if (mo133105i() == AbstractC32931b.EnumC32932a.OPEN) {\n m152577d(byteBuffer);\n }\n } else if (m152576c(byteBuffer) && !mo133101f() && !mo133103h()) {\n if (!f113304g && this.f113315n.hasRemaining() == byteBuffer.hasRemaining() && byteBuffer.hasRemaining()) {\n throw new AssertionError();\n } else if (byteBuffer.hasRemaining()) {\n m152577d(byteBuffer);\n } else if (this.f113315n.hasRemaining()) {\n m152577d(this.f113315n);\n }\n }\n if (!f113304g && !mo133101f() && !mo133102g() && byteBuffer.hasRemaining()) {\n throw new AssertionError();\n }\n return;\n }\n throw new AssertionError();\n }",
"private void resetBuffer() {\n baos.reset();\n }",
"public void run() {\n /*\n r6 = this;\n com.android.camera.imageprocessor.FrameProcessor r0 = com.android.camera.imageprocessor.FrameProcessor.this\n java.lang.Object r0 = r0.mAllocationLock\n monitor-enter(r0)\n com.android.camera.imageprocessor.FrameProcessor r1 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ all -> 0x0077 }\n boolean r1 = r1.mIsActive // Catch:{ all -> 0x0077 }\n if (r1 != 0) goto L_0x0011\n monitor-exit(r0) // Catch:{ all -> 0x0077 }\n return\n L_0x0011:\n com.android.camera.imageprocessor.FrameProcessor r1 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ all -> 0x0077 }\n android.renderscript.Allocation r1 = r1.mInputAllocation // Catch:{ all -> 0x0077 }\n if (r1 != 0) goto L_0x0027\n com.android.camera.imageprocessor.FrameProcessor r1 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ all -> 0x0077 }\n int r2 = r6.stride // Catch:{ all -> 0x0077 }\n int r3 = r6.height // Catch:{ all -> 0x0077 }\n int r4 = r6.stride // Catch:{ all -> 0x0077 }\n int r5 = r6.width // Catch:{ all -> 0x0077 }\n int r4 = r4 - r5\n r1.createAllocation(r2, r3, r4) // Catch:{ all -> 0x0077 }\n L_0x0027:\n com.android.camera.imageprocessor.FrameProcessor r1 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ all -> 0x0077 }\n android.renderscript.Allocation r1 = r1.mInputAllocation // Catch:{ all -> 0x0077 }\n byte[] r2 = r6.yvuBytes // Catch:{ all -> 0x0077 }\n r1.copyFrom(r2) // Catch:{ all -> 0x0077 }\n com.android.camera.imageprocessor.FrameProcessor r1 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ all -> 0x0077 }\n com.android.camera.imageprocessor.ScriptC_rotator r1 = r1.mRsRotator // Catch:{ all -> 0x0077 }\n com.android.camera.imageprocessor.FrameProcessor r2 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ all -> 0x0077 }\n android.renderscript.Allocation r2 = r2.mInputAllocation // Catch:{ all -> 0x0077 }\n r1.forEach_rotate90andMerge(r2) // Catch:{ all -> 0x0077 }\n com.android.camera.imageprocessor.FrameProcessor r1 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ all -> 0x0077 }\n com.android.camera.imageprocessor.ScriptC_YuvToRgb r1 = r1.mRsYuvToRGB // Catch:{ all -> 0x0077 }\n com.android.camera.imageprocessor.FrameProcessor r2 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ all -> 0x0077 }\n android.renderscript.Allocation r2 = r2.mOutputAllocation // Catch:{ all -> 0x0077 }\n r1.forEach_nv21ToRgb(r2) // Catch:{ all -> 0x0077 }\n com.android.camera.imageprocessor.FrameProcessor r1 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ all -> 0x0077 }\n android.renderscript.Allocation r1 = r1.mOutputAllocation // Catch:{ all -> 0x0077 }\n r1.ioSend() // Catch:{ all -> 0x0077 }\n com.android.camera.imageprocessor.FrameProcessor r1 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ all -> 0x0077 }\n android.renderscript.Allocation r1 = r1.mVideoOutputAllocation // Catch:{ all -> 0x0077 }\n if (r1 == 0) goto L_0x0075\n com.android.camera.imageprocessor.FrameProcessor r1 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ all -> 0x0077 }\n android.renderscript.Allocation r1 = r1.mVideoOutputAllocation // Catch:{ all -> 0x0077 }\n com.android.camera.imageprocessor.FrameProcessor r2 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ all -> 0x0077 }\n android.renderscript.Allocation r2 = r2.mOutputAllocation // Catch:{ all -> 0x0077 }\n r1.copyFrom(r2) // Catch:{ all -> 0x0077 }\n com.android.camera.imageprocessor.FrameProcessor r6 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ all -> 0x0077 }\n android.renderscript.Allocation r6 = r6.mVideoOutputAllocation // Catch:{ all -> 0x0077 }\n r6.ioSend() // Catch:{ all -> 0x0077 }\n L_0x0075:\n monitor-exit(r0) // Catch:{ all -> 0x0077 }\n return\n L_0x0077:\n r6 = move-exception\n monitor-exit(r0) // Catch:{ all -> 0x0077 }\n throw r6\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.camera.imageprocessor.FrameProcessor.ProcessingTask.run():void\");\n }",
"@Test\n public void encode_whenMessageCantBeParsed_dontWriteToBuffer() throws Exception {\n when(parser.encode(any(StartCommunicationMessage.class))).thenReturn(null);\n\n ByteBuf out = Unpooled.buffer();\n messageFrameEncoder.encode(ctx, new StartCommunicationMessage(), out);\n\n assertFalse(new String(out.array()).contains(\"\\r\\n\"));\n }",
"private final com.google.android.p306h.p307a.p308a.C5685v m26927b(com.google.protobuf.nano.a r7) {\n /*\n r6 = this;\n L_0x0000:\n r0 = r7.a();\n switch(r0) {\n case 0: goto L_0x000d;\n case 8: goto L_0x000e;\n case 18: goto L_0x0043;\n case 24: goto L_0x0054;\n case 32: goto L_0x005f;\n case 42: goto L_0x006a;\n default: goto L_0x0007;\n };\n L_0x0007:\n r0 = super.m4918a(r7, r0);\n if (r0 != 0) goto L_0x0000;\n L_0x000d:\n return r6;\n L_0x000e:\n r1 = r7.o();\n r2 = r7.i();\t Catch:{ IllegalArgumentException -> 0x0034 }\n switch(r2) {\n case 0: goto L_0x003c;\n case 1: goto L_0x003c;\n case 2: goto L_0x003c;\n case 3: goto L_0x003c;\n case 4: goto L_0x003c;\n case 5: goto L_0x003c;\n case 101: goto L_0x003c;\n case 102: goto L_0x003c;\n case 103: goto L_0x003c;\n case 104: goto L_0x003c;\n case 105: goto L_0x003c;\n case 106: goto L_0x003c;\n case 107: goto L_0x003c;\n case 108: goto L_0x003c;\n case 201: goto L_0x003c;\n case 202: goto L_0x003c;\n case 203: goto L_0x003c;\n case 204: goto L_0x003c;\n case 205: goto L_0x003c;\n case 206: goto L_0x003c;\n case 207: goto L_0x003c;\n case 208: goto L_0x003c;\n case 209: goto L_0x003c;\n case 301: goto L_0x003c;\n case 302: goto L_0x003c;\n case 303: goto L_0x003c;\n case 304: goto L_0x003c;\n case 305: goto L_0x003c;\n case 306: goto L_0x003c;\n case 307: goto L_0x003c;\n case 401: goto L_0x003c;\n case 402: goto L_0x003c;\n case 403: goto L_0x003c;\n case 404: goto L_0x003c;\n case 501: goto L_0x003c;\n case 502: goto L_0x003c;\n case 503: goto L_0x003c;\n case 504: goto L_0x003c;\n case 601: goto L_0x003c;\n case 602: goto L_0x003c;\n case 603: goto L_0x003c;\n case 604: goto L_0x003c;\n case 605: goto L_0x003c;\n case 606: goto L_0x003c;\n case 607: goto L_0x003c;\n case 608: goto L_0x003c;\n case 609: goto L_0x003c;\n case 610: goto L_0x003c;\n case 611: goto L_0x003c;\n case 612: goto L_0x003c;\n case 613: goto L_0x003c;\n case 614: goto L_0x003c;\n case 615: goto L_0x003c;\n case 616: goto L_0x003c;\n case 617: goto L_0x003c;\n case 618: goto L_0x003c;\n case 619: goto L_0x003c;\n case 620: goto L_0x003c;\n case 621: goto L_0x003c;\n case 622: goto L_0x003c;\n case 623: goto L_0x003c;\n case 624: goto L_0x003c;\n case 625: goto L_0x003c;\n case 626: goto L_0x003c;\n case 627: goto L_0x003c;\n case 628: goto L_0x003c;\n case 629: goto L_0x003c;\n case 630: goto L_0x003c;\n case 631: goto L_0x003c;\n case 632: goto L_0x003c;\n case 633: goto L_0x003c;\n case 634: goto L_0x003c;\n case 635: goto L_0x003c;\n case 636: goto L_0x003c;\n case 637: goto L_0x003c;\n case 638: goto L_0x003c;\n case 639: goto L_0x003c;\n case 640: goto L_0x003c;\n case 641: goto L_0x003c;\n case 701: goto L_0x003c;\n case 702: goto L_0x003c;\n case 703: goto L_0x003c;\n case 704: goto L_0x003c;\n case 705: goto L_0x003c;\n case 706: goto L_0x003c;\n case 707: goto L_0x003c;\n case 708: goto L_0x003c;\n case 709: goto L_0x003c;\n case 710: goto L_0x003c;\n case 711: goto L_0x003c;\n case 712: goto L_0x003c;\n case 713: goto L_0x003c;\n case 714: goto L_0x003c;\n case 715: goto L_0x003c;\n case 716: goto L_0x003c;\n case 717: goto L_0x003c;\n case 718: goto L_0x003c;\n case 719: goto L_0x003c;\n case 720: goto L_0x003c;\n case 721: goto L_0x003c;\n case 722: goto L_0x003c;\n case 801: goto L_0x003c;\n case 802: goto L_0x003c;\n case 803: goto L_0x003c;\n case 901: goto L_0x003c;\n case 902: goto L_0x003c;\n case 903: goto L_0x003c;\n case 904: goto L_0x003c;\n case 905: goto L_0x003c;\n case 906: goto L_0x003c;\n case 907: goto L_0x003c;\n case 908: goto L_0x003c;\n case 909: goto L_0x003c;\n case 910: goto L_0x003c;\n case 911: goto L_0x003c;\n case 912: goto L_0x003c;\n case 1001: goto L_0x003c;\n case 1002: goto L_0x003c;\n case 1003: goto L_0x003c;\n case 1004: goto L_0x003c;\n case 1005: goto L_0x003c;\n case 1006: goto L_0x003c;\n case 1101: goto L_0x003c;\n case 1102: goto L_0x003c;\n case 1201: goto L_0x003c;\n case 1301: goto L_0x003c;\n case 1302: goto L_0x003c;\n case 1303: goto L_0x003c;\n case 1304: goto L_0x003c;\n case 1305: goto L_0x003c;\n case 1306: goto L_0x003c;\n case 1307: goto L_0x003c;\n case 1308: goto L_0x003c;\n case 1309: goto L_0x003c;\n case 1310: goto L_0x003c;\n case 1311: goto L_0x003c;\n case 1312: goto L_0x003c;\n case 1313: goto L_0x003c;\n case 1314: goto L_0x003c;\n case 1315: goto L_0x003c;\n case 1316: goto L_0x003c;\n case 1317: goto L_0x003c;\n case 1318: goto L_0x003c;\n case 1319: goto L_0x003c;\n case 1320: goto L_0x003c;\n case 1321: goto L_0x003c;\n case 1322: goto L_0x003c;\n case 1323: goto L_0x003c;\n case 1324: goto L_0x003c;\n case 1325: goto L_0x003c;\n case 1326: goto L_0x003c;\n case 1327: goto L_0x003c;\n case 1328: goto L_0x003c;\n case 1329: goto L_0x003c;\n case 1330: goto L_0x003c;\n case 1331: goto L_0x003c;\n case 1332: goto L_0x003c;\n case 1333: goto L_0x003c;\n case 1334: goto L_0x003c;\n case 1335: goto L_0x003c;\n case 1336: goto L_0x003c;\n case 1337: goto L_0x003c;\n case 1338: goto L_0x003c;\n case 1339: goto L_0x003c;\n case 1340: goto L_0x003c;\n case 1341: goto L_0x003c;\n case 1342: goto L_0x003c;\n case 1343: goto L_0x003c;\n case 1344: goto L_0x003c;\n case 1345: goto L_0x003c;\n case 1346: goto L_0x003c;\n case 1347: goto L_0x003c;\n case 1401: goto L_0x003c;\n case 1402: goto L_0x003c;\n case 1403: goto L_0x003c;\n case 1404: goto L_0x003c;\n case 1405: goto L_0x003c;\n case 1406: goto L_0x003c;\n case 1407: goto L_0x003c;\n case 1408: goto L_0x003c;\n case 1409: goto L_0x003c;\n case 1410: goto L_0x003c;\n case 1411: goto L_0x003c;\n case 1412: goto L_0x003c;\n case 1413: goto L_0x003c;\n case 1414: goto L_0x003c;\n case 1415: goto L_0x003c;\n case 1416: goto L_0x003c;\n case 1417: goto L_0x003c;\n case 1418: goto L_0x003c;\n case 1419: goto L_0x003c;\n case 1420: goto L_0x003c;\n case 1421: goto L_0x003c;\n case 1422: goto L_0x003c;\n case 1423: goto L_0x003c;\n case 1424: goto L_0x003c;\n case 1425: goto L_0x003c;\n case 1426: goto L_0x003c;\n case 1427: goto L_0x003c;\n case 1601: goto L_0x003c;\n case 1602: goto L_0x003c;\n case 1603: goto L_0x003c;\n case 1604: goto L_0x003c;\n case 1605: goto L_0x003c;\n case 1606: goto L_0x003c;\n case 1607: goto L_0x003c;\n case 1608: goto L_0x003c;\n case 1609: goto L_0x003c;\n case 1610: goto L_0x003c;\n case 1611: goto L_0x003c;\n case 1612: goto L_0x003c;\n case 1613: goto L_0x003c;\n case 1614: goto L_0x003c;\n case 1615: goto L_0x003c;\n case 1616: goto L_0x003c;\n case 1617: goto L_0x003c;\n case 1618: goto L_0x003c;\n case 1619: goto L_0x003c;\n case 1620: goto L_0x003c;\n case 1621: goto L_0x003c;\n case 1622: goto L_0x003c;\n case 1623: goto L_0x003c;\n case 1624: goto L_0x003c;\n case 1625: goto L_0x003c;\n case 1626: goto L_0x003c;\n case 1627: goto L_0x003c;\n case 1628: goto L_0x003c;\n case 1629: goto L_0x003c;\n case 1630: goto L_0x003c;\n case 1631: goto L_0x003c;\n case 1632: goto L_0x003c;\n case 1633: goto L_0x003c;\n case 1634: goto L_0x003c;\n case 1635: goto L_0x003c;\n case 1636: goto L_0x003c;\n case 1637: goto L_0x003c;\n case 1638: goto L_0x003c;\n case 1639: goto L_0x003c;\n case 1640: goto L_0x003c;\n case 1641: goto L_0x003c;\n case 1642: goto L_0x003c;\n case 1643: goto L_0x003c;\n case 1644: goto L_0x003c;\n case 1645: goto L_0x003c;\n case 1646: goto L_0x003c;\n case 1647: goto L_0x003c;\n case 1648: goto L_0x003c;\n case 1649: goto L_0x003c;\n case 1650: goto L_0x003c;\n case 1651: goto L_0x003c;\n case 1652: goto L_0x003c;\n case 1653: goto L_0x003c;\n case 1654: goto L_0x003c;\n case 1655: goto L_0x003c;\n case 1656: goto L_0x003c;\n case 1657: goto L_0x003c;\n case 1658: goto L_0x003c;\n case 1659: goto L_0x003c;\n case 1660: goto L_0x003c;\n case 1801: goto L_0x003c;\n case 1802: goto L_0x003c;\n case 1803: goto L_0x003c;\n case 1804: goto L_0x003c;\n case 1805: goto L_0x003c;\n case 1806: goto L_0x003c;\n case 1807: goto L_0x003c;\n case 1808: goto L_0x003c;\n case 1809: goto L_0x003c;\n case 1810: goto L_0x003c;\n case 1811: goto L_0x003c;\n case 1812: goto L_0x003c;\n case 1813: goto L_0x003c;\n case 1814: goto L_0x003c;\n case 1815: goto L_0x003c;\n case 1816: goto L_0x003c;\n case 1817: goto L_0x003c;\n case 1901: goto L_0x003c;\n case 1902: goto L_0x003c;\n case 1903: goto L_0x003c;\n case 1904: goto L_0x003c;\n case 1905: goto L_0x003c;\n case 1906: goto L_0x003c;\n case 1907: goto L_0x003c;\n case 1908: goto L_0x003c;\n case 1909: goto L_0x003c;\n case 2001: goto L_0x003c;\n case 2101: goto L_0x003c;\n case 2102: goto L_0x003c;\n case 2103: goto L_0x003c;\n case 2104: goto L_0x003c;\n case 2105: goto L_0x003c;\n case 2106: goto L_0x003c;\n case 2107: goto L_0x003c;\n case 2108: goto L_0x003c;\n case 2109: goto L_0x003c;\n case 2110: goto L_0x003c;\n case 2111: goto L_0x003c;\n case 2112: goto L_0x003c;\n case 2113: goto L_0x003c;\n case 2114: goto L_0x003c;\n case 2115: goto L_0x003c;\n case 2116: goto L_0x003c;\n case 2117: goto L_0x003c;\n case 2118: goto L_0x003c;\n case 2119: goto L_0x003c;\n case 2120: goto L_0x003c;\n case 2121: goto L_0x003c;\n case 2122: goto L_0x003c;\n case 2123: goto L_0x003c;\n case 2124: goto L_0x003c;\n case 2201: goto L_0x003c;\n case 2202: goto L_0x003c;\n case 2203: goto L_0x003c;\n case 2204: goto L_0x003c;\n case 2205: goto L_0x003c;\n case 2206: goto L_0x003c;\n case 2207: goto L_0x003c;\n case 2208: goto L_0x003c;\n case 2209: goto L_0x003c;\n case 2210: goto L_0x003c;\n case 2211: goto L_0x003c;\n case 2212: goto L_0x003c;\n case 2213: goto L_0x003c;\n case 2214: goto L_0x003c;\n case 2215: goto L_0x003c;\n case 2301: goto L_0x003c;\n case 2302: goto L_0x003c;\n case 2303: goto L_0x003c;\n case 2304: goto L_0x003c;\n case 2401: goto L_0x003c;\n case 2402: goto L_0x003c;\n case 2501: goto L_0x003c;\n case 2502: goto L_0x003c;\n case 2503: goto L_0x003c;\n case 2504: goto L_0x003c;\n case 2505: goto L_0x003c;\n case 2506: goto L_0x003c;\n case 2507: goto L_0x003c;\n case 2508: goto L_0x003c;\n case 2509: goto L_0x003c;\n case 2510: goto L_0x003c;\n case 2511: goto L_0x003c;\n case 2512: goto L_0x003c;\n case 2513: goto L_0x003c;\n case 2514: goto L_0x003c;\n case 2515: goto L_0x003c;\n case 2516: goto L_0x003c;\n case 2517: goto L_0x003c;\n case 2518: goto L_0x003c;\n case 2519: goto L_0x003c;\n case 2601: goto L_0x003c;\n case 2602: goto L_0x003c;\n case 2701: goto L_0x003c;\n case 2702: goto L_0x003c;\n case 2703: goto L_0x003c;\n case 2704: goto L_0x003c;\n case 2705: goto L_0x003c;\n case 2706: goto L_0x003c;\n case 2707: goto L_0x003c;\n case 2801: goto L_0x003c;\n case 2802: goto L_0x003c;\n case 2803: goto L_0x003c;\n case 2804: goto L_0x003c;\n case 2805: goto L_0x003c;\n case 2806: goto L_0x003c;\n case 2807: goto L_0x003c;\n case 2808: goto L_0x003c;\n case 2809: goto L_0x003c;\n case 2810: goto L_0x003c;\n case 2811: goto L_0x003c;\n case 2812: goto L_0x003c;\n case 2813: goto L_0x003c;\n case 2814: goto L_0x003c;\n case 2815: goto L_0x003c;\n case 2816: goto L_0x003c;\n case 2817: goto L_0x003c;\n case 2818: goto L_0x003c;\n case 2819: goto L_0x003c;\n case 2820: goto L_0x003c;\n case 2821: goto L_0x003c;\n case 2822: goto L_0x003c;\n case 2823: goto L_0x003c;\n case 2824: goto L_0x003c;\n case 2825: goto L_0x003c;\n case 2826: goto L_0x003c;\n case 2901: goto L_0x003c;\n case 2902: goto L_0x003c;\n case 2903: goto L_0x003c;\n case 2904: goto L_0x003c;\n case 2905: goto L_0x003c;\n case 2906: goto L_0x003c;\n case 2907: goto L_0x003c;\n case 3001: goto L_0x003c;\n case 3002: goto L_0x003c;\n case 3003: goto L_0x003c;\n case 3004: goto L_0x003c;\n case 3005: goto L_0x003c;\n default: goto L_0x0019;\n };\t Catch:{ IllegalArgumentException -> 0x0034 }\n L_0x0019:\n r3 = new java.lang.IllegalArgumentException;\t Catch:{ IllegalArgumentException -> 0x0034 }\n r4 = 41;\n r5 = new java.lang.StringBuilder;\t Catch:{ IllegalArgumentException -> 0x0034 }\n r5.<init>(r4);\t Catch:{ IllegalArgumentException -> 0x0034 }\n r2 = r5.append(r2);\t Catch:{ IllegalArgumentException -> 0x0034 }\n r4 = \" is not a valid enum EventType\";\n r2 = r2.append(r4);\t Catch:{ IllegalArgumentException -> 0x0034 }\n r2 = r2.toString();\t Catch:{ IllegalArgumentException -> 0x0034 }\n r3.<init>(r2);\t Catch:{ IllegalArgumentException -> 0x0034 }\n throw r3;\t Catch:{ IllegalArgumentException -> 0x0034 }\n L_0x0034:\n r2 = move-exception;\n r7.e(r1);\n r6.m4918a(r7, r0);\n goto L_0x0000;\n L_0x003c:\n r2 = java.lang.Integer.valueOf(r2);\t Catch:{ IllegalArgumentException -> 0x0034 }\n r6.f28837a = r2;\t Catch:{ IllegalArgumentException -> 0x0034 }\n goto L_0x0000;\n L_0x0043:\n r0 = r6.f28838b;\n if (r0 != 0) goto L_0x004e;\n L_0x0047:\n r0 = new com.google.android.h.a.a.u;\n r0.<init>();\n r6.f28838b = r0;\n L_0x004e:\n r0 = r6.f28838b;\n r7.a(r0);\n goto L_0x0000;\n L_0x0054:\n r0 = r7.j();\n r0 = java.lang.Long.valueOf(r0);\n r6.f28839c = r0;\n goto L_0x0000;\n L_0x005f:\n r0 = r7.j();\n r0 = java.lang.Long.valueOf(r0);\n r6.f28840d = r0;\n goto L_0x0000;\n L_0x006a:\n r0 = r6.f28841e;\n if (r0 != 0) goto L_0x0075;\n L_0x006e:\n r0 = new com.google.android.h.a.a.o;\n r0.<init>();\n r6.f28841e = r0;\n L_0x0075:\n r0 = r6.f28841e;\n r7.a(r0);\n goto L_0x0000;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.h.a.a.v.b(com.google.protobuf.nano.a):com.google.android.h.a.a.v\");\n }",
"void Receive (int boardID, short addr, ByteBuffer buffer, long cnt, int Termination);",
"public MyMemory(){\n super();\n this.instruction = new Instruction(); //Only the IR register will use this attribute\n }",
"@Override\n\tprotected IoBuffer packBody(IoBuffer buffer) {\n\t\treturn null;\n\t}",
"@Override\n\tpublic PhyphoxBuffer clone() {\n\t\treturn new PhyphoxBuffer(this, 0);\n\t}",
"protected int populateBuffer()\n {\n interlock.beginReading();\n // System.out.println(\"populateBuffer: 2\");\n return byteBuffer.limit();\n }",
"ComplicationOverlayWireFormat() {}",
"private static void convertToBuffers(ArrayList<DecompressedLine> lines, float _l0, float _b0, PfssDecompressed _frame)\n\t{\n\t\tint stoSize = 0;\n\t\tint stsSize = 0;\n\t\tint otsSize = 0;\n\t\tint totalSize = 0;\n\t\tfor (int i = 0; i < lines.size(); i++)\n\t\t{\n\t\t\tDecompressedLine currentLine = lines.get(i);\n\n\t\t\tDecompressedLine subsampledLine = new DecompressedLine(currentLine.points, currentLine.getType());\n\t\t\tlines.set(i, subsampledLine);\n\t\t\tswitch (subsampledLine.getType())\n\t\t\t{\n\t\t\t\tcase OUTSIDE_TO_SUN:\n\t\t\t\t\totsSize += subsampledLine.getSize() - 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase SUN_TO_OUTSIDE:\n\t\t\t\t\tstoSize += subsampledLine.getSize() - 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase SUN_TO_SUN:\n\t\t\t\t\tstsSize += subsampledLine.getSize() - 1;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\ttotalSize += subsampledLine.getSize();\n\t\t}\n\n\t\t// copy to buffers\n\t\tFloatBuffer vertices = Buffers.newDirectFloatBuffer(totalSize * 3);\n\t\tIntBuffer indicesSunToOutside = Buffers.newDirectIntBuffer(stoSize * 2);\n\t\tIntBuffer indicesSunToSun = Buffers.newDirectIntBuffer(stsSize * 2);\n\t\tIntBuffer indicesOutsideToSun = Buffers.newDirectIntBuffer(otsSize * 2);\n\n\t\tint vertexIndex = 0;\n\t\tfor (DecompressedLine line : lines)\n\t\t{\n\t\t\tIntBuffer indexBuffer = getLineType(line.getType(), indicesSunToOutside, indicesSunToSun, indicesOutsideToSun);\n\n\t\t\tint pointIndex = 0;\n\t\t\twhile (pointIndex + 1 < line.getSize())\n\t\t\t{\n\t\t\t\tDecompressedPoint point = line.getPoint(pointIndex);\n\t\t\t\tvertices.put(point.getX());\n\t\t\t\tvertices.put(point.getY());\n\t\t\t\tvertices.put(point.getZ());\n\t\t\t\tindexBuffer.put(vertexIndex);\n\t\t\t\tindexBuffer.put(vertexIndex + 1);\n\t\t\t\tvertexIndex++;\n\t\t\t\tpointIndex++;\n\t\t\t}\n\t\t\tDecompressedPoint point = line.getPoint(pointIndex);\n\t\t\tvertices.put(point.getX());\n\t\t\tvertices.put(point.getY());\n\t\t\tvertices.put(point.getZ());\n\t\t\tvertexIndex++;\n\t\t}\n\n\t\tvertices.flip();\n\t\tindicesSunToOutside.flip();\n\t\tindicesOutsideToSun.flip();\n\t\tindicesSunToSun.flip();\n\t\t_frame.setLoadedData(vertices, indicesSunToOutside, indicesSunToSun, indicesOutsideToSun, _l0, _b0);\n\t}",
"@Override\r\n\tpublic Buffer setBuffer(int pos, Buffer b, int offset, int len) {\n\t\treturn null;\r\n\t}",
"public void bufferingState(){\n\t\twhile ( buffer.isBufferUnderRun() ){\n\t\t\t/** Do not leave the while loop with nothing, it will increase the CPU usage 25% */\n\t\t\ttry {Thread.sleep(1);\n\t\t\t} catch (InterruptedException ex) {}\n\t\t} \n\t}",
"public interface MarshalBuffer\n{\n /**\n * @param key\n * key\n * @return DBRowColumnTypeReader\n * @see java.util.Map#containsKey(java.lang.Object)\n */\n boolean containsKey(Object key);\n\n /**\n * @return value\n */\n byte get();\n\n /**\n * @param dst\n * dst\n * @return value\n */\n ByteBuffer get(byte[] dst);\n\n /**\n * @param key\n * key\n * @return map\n * @see java.util.Map#get(java.lang.Object)\n */\n DBRowMapPair get(Object key);\n\n /**\n * @return value\n */\n boolean getBoolean(); // NOPMD\n\n /**\n * @return value\n */\n double getDouble();\n\n /**\n * @return value\n */\n int getInt();\n\n /**\n * @return value\n */\n long getLong();\n\n /**\n * @return value\n */\n int getNextSharedIndex();\n\n /**\n * @param index\n * index\n * @return value\n */\n PyBase getShared(int index);\n\n /**\n * @return value\n */\n short getShort(); // NOPMD\n\n /**\n * @throws IllegalOpCodeException\n * on wrong stream format\n */\n void initialize() throws IllegalOpCodeException;\n\n /**\n * @return value\n */\n int parentPosition();\n\n /**\n * @return value\n */\n byte peekByte();\n\n /**\n * @return value\n */\n int position();\n\n /**\n * @return value\n */\n boolean processed();\n\n /**\n * @param key\n * key\n * @param value\n * value\n * @return value\n * @see java.util.Map#put(java.lang.Object, java.lang.Object)\n */\n DBRowMapPair put(PyDBRowDescriptor key, DBRowMapPair value);\n\n /**\n * @param size\n * size\n * @return value\n */\n byte[] readBytes(int size);\n\n /**\n * @param index\n * index\n * @param pyBase\n * pyBase\n * @return value\n */\n PyBase setShared(int index, PyBase pyBase);\n}",
"void setBuffer(byte[] b)\n {\n buffer = b;\n }",
"public byte [] getBuf() {\r\n return bop.getBuf();\r\n }",
"public interface ControlSequenceExpression /*extends ControlSequence*/ {\n byte[] interpret();\n}",
"public MemoryInfo(com.google.appinventor.components.runtime.ComponentContainer r7) {\n /*\n r6 = this;\n r1 = r6\n r2 = r7\n r3 = r1\n r4 = r2\n com.google.appinventor.components.runtime.Form r4 = r4.$form()\n r3.<init>(r4)\n r3 = r1\n r4 = 1048576(0x100000, double:5.180654E-318)\n r3.hxYOFxFjLpN1maJuWNxUV40nExCGxsxkDPOTgtzMu4zlZCQb3bPlKsXo1SYJg6ME = r4\n r3 = r1\n r4 = r2\n android.app.Activity r4 = r4.$context()\n r3.context = r4\n r3 = r1\n r4 = r2\n r3.container = r4\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.appinventor.components.runtime.MemoryInfo.<init>(com.google.appinventor.components.runtime.ComponentContainer):void\");\n }",
"@Override\r\n public void parse(ByteBuffer buffer) {\r\n for (int i = 0; i < 24; i++) {\r\n experience[i] = ((double) buffer.getInt() / 10D);\r\n dynamicLevels[i] = buffer.get() & 0xFF;\r\n if (i == HITPOINTS) {\r\n lifepoints = dynamicLevels[i];\r\n } else if (i == PRAYER) {\r\n prayerPoints = dynamicLevels[i];\r\n }\r\n staticLevels[i] = buffer.get() & 0xFF;\r\n }\r\n experienceGained = buffer.getInt();\r\n }",
"private final com.google.android.play.p179a.p352a.C6210u m28673b(com.google.protobuf.nano.a r7) {\n /*\n r6 = this;\n L_0x0000:\n r0 = r7.a();\n switch(r0) {\n case 0: goto L_0x000d;\n case 10: goto L_0x000e;\n case 16: goto L_0x001b;\n case 26: goto L_0x0058;\n case 34: goto L_0x0065;\n case 42: goto L_0x0072;\n default: goto L_0x0007;\n };\n L_0x0007:\n r0 = super.m4918a(r7, r0);\n if (r0 != 0) goto L_0x0000;\n L_0x000d:\n return r6;\n L_0x000e:\n r0 = r7.f();\n r6.f31049b = r0;\n r0 = r6.f31048a;\n r0 = r0 | 1;\n r6.f31048a = r0;\n goto L_0x0000;\n L_0x001b:\n r1 = r6.f31048a;\n r1 = r1 | 2;\n r6.f31048a = r1;\n r1 = r7.o();\n r2 = r7.i();\t Catch:{ IllegalArgumentException -> 0x0047 }\n switch(r2) {\n case 0: goto L_0x004f;\n case 1: goto L_0x004f;\n case 2: goto L_0x004f;\n case 3: goto L_0x004f;\n case 4: goto L_0x004f;\n case 5: goto L_0x004f;\n case 6: goto L_0x004f;\n default: goto L_0x002c;\n };\t Catch:{ IllegalArgumentException -> 0x0047 }\n L_0x002c:\n r3 = new java.lang.IllegalArgumentException;\t Catch:{ IllegalArgumentException -> 0x0047 }\n r4 = 38;\n r5 = new java.lang.StringBuilder;\t Catch:{ IllegalArgumentException -> 0x0047 }\n r5.<init>(r4);\t Catch:{ IllegalArgumentException -> 0x0047 }\n r2 = r5.append(r2);\t Catch:{ IllegalArgumentException -> 0x0047 }\n r4 = \" is not a valid enum OsType\";\n r2 = r2.append(r4);\t Catch:{ IllegalArgumentException -> 0x0047 }\n r2 = r2.toString();\t Catch:{ IllegalArgumentException -> 0x0047 }\n r3.<init>(r2);\t Catch:{ IllegalArgumentException -> 0x0047 }\n throw r3;\t Catch:{ IllegalArgumentException -> 0x0047 }\n L_0x0047:\n r2 = move-exception;\n r7.e(r1);\n r6.m4918a(r7, r0);\n goto L_0x0000;\n L_0x004f:\n r6.f31050c = r2;\t Catch:{ IllegalArgumentException -> 0x0047 }\n r2 = r6.f31048a;\t Catch:{ IllegalArgumentException -> 0x0047 }\n r2 = r2 | 2;\n r6.f31048a = r2;\t Catch:{ IllegalArgumentException -> 0x0047 }\n goto L_0x0000;\n L_0x0058:\n r0 = r7.f();\n r6.f31051d = r0;\n r0 = r6.f31048a;\n r0 = r0 | 4;\n r6.f31048a = r0;\n goto L_0x0000;\n L_0x0065:\n r0 = r7.f();\n r6.f31052e = r0;\n r0 = r6.f31048a;\n r0 = r0 | 8;\n r6.f31048a = r0;\n goto L_0x0000;\n L_0x0072:\n r0 = r7.f();\n r6.f31053f = r0;\n r0 = r6.f31048a;\n r0 = r0 | 16;\n r6.f31048a = r0;\n goto L_0x0000;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.play.a.a.u.b(com.google.protobuf.nano.a):com.google.android.play.a.a.u\");\n }",
"@Override\n public void serialize(ByteBuffer buf) {\n }",
"public Map createBuffer() {\n // Get the available processors, processors==threads is probably best?\n Runtime runtime = Runtime.getRuntime();\n int nProcessors = runtime.availableProcessors();\n int nThreads = 1; // nProcessors/2;\n compute();\n return serviceArea;\n }",
"PortMixer(PortMixerProvider.PortMixerInfo paramPortMixerInfo) {\n/* 70 */ super(paramPortMixerInfo, null, null, null);\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 77 */ int i = 0;\n/* 78 */ int j = 0;\n/* 79 */ int k = 0;\n/* */ \n/* */ try {\n/* */ try {\n/* 83 */ this.id = nOpen(getMixerIndex());\n/* 84 */ if (this.id != 0L) {\n/* 85 */ i = nGetPortCount(this.id);\n/* 86 */ if (i < 0)\n/* */ {\n/* 88 */ i = 0;\n/* */ }\n/* */ } \n/* 91 */ } catch (Exception exception) {}\n/* */ \n/* 93 */ this.portInfos = new Port.Info[i];\n/* */ \n/* 95 */ for (byte b1 = 0; b1 < i; b1++) {\n/* 96 */ int m = nGetPortType(this.id, b1);\n/* 97 */ j += ((m & 0xFF) != 0) ? 1 : 0;\n/* 98 */ k += ((m & 0xFF00) != 0) ? 1 : 0;\n/* 99 */ this.portInfos[b1] = getPortInfo(b1, m);\n/* */ } \n/* */ } finally {\n/* 102 */ if (this.id != 0L) {\n/* 103 */ nClose(this.id);\n/* */ }\n/* 105 */ this.id = 0L;\n/* */ } \n/* */ \n/* */ \n/* 109 */ this.sourceLineInfo = (Line.Info[])new Port.Info[j];\n/* 110 */ this.targetLineInfo = (Line.Info[])new Port.Info[k];\n/* */ \n/* 112 */ j = 0; k = 0;\n/* 113 */ for (byte b = 0; b < i; b++) {\n/* 114 */ if (this.portInfos[b].isSource()) {\n/* 115 */ this.sourceLineInfo[j++] = this.portInfos[b];\n/* */ } else {\n/* 117 */ this.targetLineInfo[k++] = this.portInfos[b];\n/* */ } \n/* */ } \n/* */ }",
"public void resetBuffer() {\n\n\t}",
"public interface Packet {\n /**\n * Read body from byte buffer\n * @param bb \n * @throws java.lang.Exception \n */\n void readBody(ByteBuf bb, TranscoderContext context) throws Exception;\n \n /**\n * Write body to byte buffer\n * @param bb \n * @param context \n * @throws java.lang.Exception \n */\n void writeBody(ByteBuf bb, TranscoderContext context) throws Exception;\n \n /**\n * Calculate and return body size in bytes\n * @param context\n * @return \n */\n int calculateBodyLength(TranscoderContext context);\n \n /**\n * Calculate and set field with body length\n * @param context\n */\n void calculateAndSetBodyLength(TranscoderContext context);\n \n /**\n * Get body length from field\n * @return \n */\n int getBodyLength();\n\n /**\n * Get sequence number field value\n * @return \n */\n int getSequenceNumber();\n \n /**\n * Set sequence number field value\n * @param sequenceNumber \n */\n void setSequenceNumber(int sequenceNumber); \n}",
"public abstract Parts getRAM();",
"private final com.google.android.finsky.verifier.p259a.p260a.C4709m m21920b(com.google.protobuf.nano.a r7) {\n /*\n r6 = this;\n L_0x0000:\n r0 = r7.a();\n switch(r0) {\n case 0: goto L_0x000d;\n case 10: goto L_0x000e;\n case 16: goto L_0x0015;\n case 26: goto L_0x0046;\n case 34: goto L_0x0053;\n default: goto L_0x0007;\n };\n L_0x0007:\n r0 = super.m4918a(r7, r0);\n if (r0 != 0) goto L_0x0000;\n L_0x000d:\n return r6;\n L_0x000e:\n r0 = r7.f();\n r6.f24221c = r0;\n goto L_0x0000;\n L_0x0015:\n r1 = r7.o();\n r2 = r7.i();\t Catch:{ IllegalArgumentException -> 0x003b }\n switch(r2) {\n case 0: goto L_0x0043;\n case 1: goto L_0x0020;\n case 2: goto L_0x0043;\n default: goto L_0x0020;\n };\t Catch:{ IllegalArgumentException -> 0x003b }\n L_0x0020:\n r3 = new java.lang.IllegalArgumentException;\t Catch:{ IllegalArgumentException -> 0x003b }\n r4 = 44;\n r5 = new java.lang.StringBuilder;\t Catch:{ IllegalArgumentException -> 0x003b }\n r5.<init>(r4);\t Catch:{ IllegalArgumentException -> 0x003b }\n r2 = r5.append(r2);\t Catch:{ IllegalArgumentException -> 0x003b }\n r4 = \" is not a valid enum ResourceType\";\n r2 = r2.append(r4);\t Catch:{ IllegalArgumentException -> 0x003b }\n r2 = r2.toString();\t Catch:{ IllegalArgumentException -> 0x003b }\n r3.<init>(r2);\t Catch:{ IllegalArgumentException -> 0x003b }\n throw r3;\t Catch:{ IllegalArgumentException -> 0x003b }\n L_0x003b:\n r2 = move-exception;\n r7.e(r1);\n r6.m4918a(r7, r0);\n goto L_0x0000;\n L_0x0043:\n r6.f24222d = r2;\t Catch:{ IllegalArgumentException -> 0x003b }\n goto L_0x0000;\n L_0x0046:\n r0 = r7.g();\n r6.f24223e = r0;\n r0 = r6.f24220b;\n r0 = r0 | 1;\n r6.f24220b = r0;\n goto L_0x0000;\n L_0x0053:\n r0 = r7.f();\n r6.f24224f = r0;\n r0 = r6.f24220b;\n r0 = r0 | 2;\n r6.f24220b = r0;\n goto L_0x0000;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.finsky.verifier.a.a.m.b(com.google.protobuf.nano.a):com.google.android.finsky.verifier.a.a.m\");\n }",
"private void compose() {\n \tnumSamples = duration * sampleRate;\n \tsample = new double[numSamples];\n \tgeneratedSnd = new byte[2 * numSamples];\n\t}",
"Memory() {}"
] | [
"0.62312365",
"0.6062591",
"0.59443885",
"0.57076776",
"0.56274253",
"0.5462765",
"0.54467225",
"0.5443969",
"0.5443643",
"0.5439477",
"0.5417931",
"0.5415862",
"0.540283",
"0.53984046",
"0.53838915",
"0.53791153",
"0.53675854",
"0.53622866",
"0.536111",
"0.53338975",
"0.5316663",
"0.53067994",
"0.53015316",
"0.5300947",
"0.52806014",
"0.5252209",
"0.5204622",
"0.5201001",
"0.51938426",
"0.519288",
"0.51915056",
"0.5188671",
"0.51816976",
"0.51684296",
"0.5161586",
"0.51579094",
"0.5157005",
"0.5155215",
"0.515292",
"0.5144948",
"0.5144235",
"0.513192",
"0.51301974",
"0.5122882",
"0.51087046",
"0.51054096",
"0.5104641",
"0.5103851",
"0.5100999",
"0.5099271",
"0.50956345",
"0.50925803",
"0.5084781",
"0.5081123",
"0.5077652",
"0.5077433",
"0.5072041",
"0.505904",
"0.5058814",
"0.50353867",
"0.50240415",
"0.5021479",
"0.501966",
"0.5002676",
"0.49993464",
"0.49991828",
"0.4994319",
"0.49891964",
"0.4986437",
"0.49850988",
"0.49792895",
"0.4976149",
"0.49604258",
"0.49591443",
"0.49583977",
"0.49522606",
"0.49458665",
"0.4938484",
"0.49379924",
"0.493468",
"0.49329033",
"0.49322528",
"0.49307323",
"0.49289602",
"0.4927357",
"0.49242723",
"0.492035",
"0.4904394",
"0.49001452",
"0.48938337",
"0.48926958",
"0.4889218",
"0.48817974",
"0.48754424",
"0.4870136",
"0.4868777",
"0.48660758",
"0.48655996",
"0.48589092",
"0.48549315"
] | 0.7107634 | 0 |
Add to the back of the buffer | public boolean add(BufferSlot bs); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private final void buffer_push_back(byte d)\n\t{\n\t\tif (buffer_size_ >= buffer_.length) {\n int newsize = buffer_size_ * 2 + 10;\n byte[] newbuffer = new byte[newsize];\n\n for (int i = 0; i < buffer_size_; ++i)\n {\n newbuffer[i] = buffer_[i];\n }\n buffer_ = newbuffer;\n\t\t}\n\t\tbuffer_[buffer_size_] = d;\n\t\tbuffer_size_ = buffer_size_ + 1;\n\t}",
"private void pushBack() {\n\t\tbufferLocal.insertarEnCabeza(listaTokens.get(listaTokens.size()-1));\n\t}",
"public void append(IoBuffer buffer) {\n data.offerLast(buffer);\n updateBufferList();\n }",
"public void pushBack (final byte [] buf, final int start, final int length)\n {\n this.buf = buf;\n this.bufStart = start;\n this.bufEnd = length + start;\n }",
"@Override\r\n\tpublic void PushToBuffer(ByteBuffer buffer)\r\n\t{\r\n\t\r\n\t}",
"private int addBuffer( FloatBuffer directBuffer, FloatBuffer newBuffer ) {\n int oldPosition = directBuffer.position();\n if ( ( directBuffer.capacity() - oldPosition ) >= newBuffer.capacity() ) {\n directBuffer.put( newBuffer );\n } else {\n oldPosition = -1;\n }\n return oldPosition;\n }",
"void pushBack() throws IOException {\n iis.seek(iis.getStreamPosition()-bufAvail);\n bufAvail = 0;\n bufPtr = 0;\n }",
"public void pushBack(IClause c) {\n back++;\n if (back >= tab.length)\n back = 0;\n tab[back] = c;\n\n if (back + 1 == front || (front == 0 && back == tab.length - 1))\n throw new BufferOverflowException();\n }",
"@Override\r\n public void addBack(T b) {\r\n head = head.addBack(b);\r\n }",
"public void newBufLine() {\n this.buffer.add(new ArrayList<Integer>());\n this.columnT = 0;\n this.lineT++;\n }",
"public void add(byte b) {\n\t\tif (pointer == size)\n\t\t\twriteToFile();\n\t\tstream.set(pointer++, b);\n\t\twrittenBytes++;\n\t}",
"private void pushRemainingToBody(ByteBuffer buffer, DynamicByteBuffer body, int size) {\n\t\t// If buffer is empty or there is no clength then skip this\n\t\tif (size == 0 || !buffer.hasRemaining()) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (body.position() + buffer.remaining() > size) {\n\t\t\tbody.put(buffer.array(), buffer.position(), size - body.position());\n\t\t} else {\n\t\t\tbody.put(buffer.array(), buffer.position(), buffer.remaining());\n\t\t}\n\t}",
"public void addBytes( final ByteBuffer _buffer ) {\n\n // sanity checks...\n if( isNull( _buffer ) )\n throw new IllegalArgumentException( \"Missing buffer to append from\" );\n if( _buffer.remaining() <= 0)\n throw new IllegalArgumentException( \"Specified buffer has no bytes to append\" );\n\n // figure out how many bytes we can append, and configure the source buffer accordingly...\n int appendCount = Math.min( buffer.capacity() - buffer.limit(), _buffer.remaining() );\n int specifiedBufferLimit = _buffer.limit();\n _buffer.limit( _buffer.position() + appendCount );\n\n // remember our old position, so we can put it back later...\n int pos = buffer.position();\n\n // setup to copy our bytes to the right place...\n buffer.position( buffer.limit() );\n buffer.limit( buffer.capacity() );\n\n // copy our bytes...\n buffer.put( _buffer );\n\n // get the specified buffer's limit back to its original state...\n _buffer.limit( specifiedBufferLimit );\n\n // get our position and limit to the right place...\n buffer.limit( buffer.position() );\n buffer.position( pos );\n }",
"void writeCurrentBuffer();",
"public void append(byte b)\n throws IndexOutOfBoundsException {\n if ( le != -1 ) // there exists already an le in byte buffer\n throw new IndexOutOfBoundsException(\"An le value exists in APDU buffer, therefore no append is possible\"); // so appending bytes makes no sense\n super.append(b);\n lc++;\n }",
"private void push(int b) {\n\n\t\tmemory[--sp] = b;\n\t}",
"public void addLast(Item item) {\n deck[bBack--] = item;\n }",
"public void addToBuffer(byte[] value, boolean isClient) {\n byte[] buffer;\n\n if (isClient) {\n buffer = mClientBuffer;\n } else {\n buffer = mServerBuffer;\n }\n\n if (buffer == null) {\n buffer = new byte[0];\n }\n byte[] tmp = new byte[buffer.length + value.length];\n System.arraycopy(buffer, 0, tmp, 0, buffer.length);\n System.arraycopy(value, 0, tmp, buffer.length, value.length);\n\n if (isClient) {\n mClientBuffer = tmp;\n } else {\n mServerBuffer = tmp;\n }\n }",
"@Override\n public void addLast(E e) throws IllegalStateException {\n checkSize();\n data[size] = e;\n size++;\n }",
"public void add(byte[] arrby) {\n ByteBuffer byteBuffer;\n ByteBuffer byteBuffer2 = byteBuffer = Blob.this.getByteBuffer();\n synchronized (byteBuffer2) {\n byteBuffer.position(Blob.this.getByteBufferPosition() + this.offset() + this.mCurrentDataSize);\n byteBuffer.put(arrby);\n this.mCurrentDataSize += arrby.length;\n return;\n }\n }",
"private ByteBuffer grow(int length) {\n if (!mBuffers.isEmpty()) {\n ByteBuffer b = mBuffers.peekLast();\n if (b.limit() + length < b.capacity()) {\n b.mark();\n b.position(b.limit());\n b.limit(b.limit() + length);\n remaining += length;\n return b.order(order);\n }\n }\n\n ByteBuffer ret = obtain(length);\n ret.mark();\n ret.limit(length);\n add(ret);\n\n return ret.order(order);\n }",
"@Override\r\n\tpublic void addToBuffer(byte[] buff, int len) {\r\n\t\tbios.write(buff, 0, len);\r\n\t}",
"private void addMessageToQueue( byte[] buffer ){\n \tsynchronized (this.messages) {\n byte message[] = new byte[buffer.length\n - Constants.MESSAGE_ID_LEN - 1];\n for (int i = Constants.MESSAGE_ID_LEN + 1; i < buffer.length; i++) {\n message[i - Constants.MESSAGE_ID_LEN - 1] = buffer[i];\n }\n messages.add(message);\n }\n }",
"protected final void push(final byte data) {\r\n this.memory[(this.sp-- & 0xff) | 0x100] = data;\r\n }",
"@Override\r\n\tpublic Buffer setBuffer(int pos, Buffer b) {\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic Buffer appendBytes(byte[] bytes) {\n\t\tthis.buffer.put( bytes );\r\n\t\treturn this;\r\n\t}",
"void moveBack()\n\t{\n\t\tif (length != 0) \n\t\t{\n\t\t\tcursor = back; \n\t\t\tindex = length - 1; //cursor will be at the back\n\t\t\t\n\t\t}\n\t}",
"@Override\n public void insertBack(Item x) {\n if (size == items.length) {\n //dynamic array\n //resize array\n resize(size * RFACTOR);\n }\n items[size] = x;\n size += 1;\n }",
"@Override\n public void enqueue(E e) {\n array.addLast(e);\n }",
"public void pushFront(IClause c) {\n tab[front--] = c;\n if (front < 0)\n front = tab.length - 1;\n\n if (back + 1 == front || (front == 0 && back == tab.length - 1))\n throw new BufferOverflowException();\n }",
"public void addToBack(UnitOfWork workUnit) {\n synchronized (addedBackWork) {\n addedBackWork.addLast(workUnit);\n }\n }",
"void flushBuffer();",
"Position<T> addLast(T data);",
"void add(byte[] data, int offset, int length);",
"private synchronized void popBuffer() {\n IoBuffer buf = data.removeFirst();\n if(marked) {\n resetCache.push(buf);\n if(!data.isEmpty()) {\n data.getFirst().mark();\n }\n } else {\n buf.free();\n }\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n input.backup(number);\n //zzMarkedPos -= number;\n }",
"protected void add(ByteBuffer data) throws Exception {\n\tLog.d(TAG, \"add data: \"+data);\n\n\tint dataLength = data!=null ? data.capacity() : 0; ///Util.chunkLength(data); ///data.length;\n\tif (dataLength == 0) return;\n\tif (this.expectBuffer == null) {\n\t\tthis.overflow.add(data);\n\t\treturn;\n\t}\n\t\n\tLog.d(TAG, \"add data: ... 2\");\n\t\n\tint toRead = Math.min(dataLength, this.expectBuffer.capacity() - this.expectOffset);\n\tBufferUtil.fastCopy(toRead, data, this.expectBuffer, this.expectOffset);\n\t\n\tLog.d(TAG, \"add data: ... 3\");\n\n\tthis.expectOffset += toRead;\n\tif (toRead < dataLength) {\n\t\tthis.overflow.add((ByteBuffer) Util.chunkSlice(data, toRead, data.capacity())/*data.slice(toRead)*/);\n\t}\n\t\n\tLog.d(TAG, \"add data: ... 5\");\n\n\twhile (this.expectBuffer!=null && this.expectOffset == this.expectBuffer.capacity()) {\n\t\tByteBuffer bufferForHandler = this.expectBuffer;\n\t\tthis.expectBuffer = null;\n\t\tthis.expectOffset = 0;\n\t\t///this.expectHandler.call(this, bufferForHandler);\n\t\tthis.expectHandler.onPacket(bufferForHandler);\n\t}\n\t\n\tLog.d(TAG, \"add data: ... 6\");\n\n}",
"public void addToBack(T data) {\n if (data == null) {\n throw new IllegalArgumentException(\"You can't insert null\"\n + \" data in the structure.\");\n }\n if (size == 0) {\n head = new DoublyLinkedListNode<>(data);\n tail = head;\n size += 1;\n } else {\n DoublyLinkedListNode<T> newnode =\n new DoublyLinkedListNode<>(data);\n tail.setNext(newnode);\n newnode.setPrevious(tail);\n tail = newnode;\n size += 1;\n\n }\n }",
"Buffer copy();",
"public synchronized void addBytes(ByteBuffer bytes) {\n\t _buffers.add(bytes);\n \n }",
"public void append(byte[] bytes)\n throws IndexOutOfBoundsException {\n if ( le != -1 ) // there exists already an le in byte buffer\n throw new IndexOutOfBoundsException(\"An le value exists in APDU buffer, therefore no append is possible\"); // so appending bytes makes no sense\n super.append(bytes);\n lc += bytes.length;\n }",
"@Override\n public void resetBuffer() {\n\n }",
"public void addLast(T item) {\n if (size == 0) {\n array[rear] = item;\n size++;\n return;\n }\n\n this.checkReSizeUp();\n rear++;\n this.updatePointer();\n array[rear] = item;\n size++;\n }",
"public void updateBuffer(final int input) {\n\n // Check for null pointers on buffer line\n if(this.buffer.get(lineT).isEmpty() || this.lineT == this.buffer.get(lineT).size()) \n this.buffer.get(lineT).add(input);\n \n else { \n if(this.inputMode) // Insert mode\n this.buffer.get(lineT).add(columnT, input);\n else // Overwrite mode\n this.buffer.get(lineT).set(columnT, input);\n }\n this.columnT++; // Increase one unit column target position\n }",
"public void push(T e) {\n\t\tif(size == data.length){\n\t\t\tresize(size * 2);\n\t\t}\n\t\tthis.data[size++] = e;\n\t}",
"@Override\n public void addLast(E value) {\n if (value == null) {\n throw new NullPointerException(\"Value can not be null\");\n }\n if (isEmpty()) {\n head = tail = 0;\n dequeue[tail] = value;\n size++;\n return;\n }\n tail = ++tail % dequeue.length;\n dequeue[tail] = value;\n size++;\n if (size == dequeue.length) {\n widen();\n }\n }",
"@Override\r\n\tpublic Buffer setBuffer(int pos, Buffer b, int offset, int len) {\n\t\treturn null;\r\n\t}",
"public void add(BitData bitData) {\n mHistory.add(bitData);\n while (mHistory.size() > mMaxSize) {\n mHistory.removeFirst();\n }\n }",
"public void uncheckedPushBack(IClause c) {\n back++;\n if (back >= tab.length)\n back = 0;\n tab[back] = c;\n\n assert back + 1 != front\n && (front != 0 || back != tab.length - 1) : \"Deque is full !\";\n }",
"private void yypushback(int number) {\n if ( number > yylength() )\n yy_ScanError(YY_PUSHBACK_2BIG);\n\n yy_markedPos -= number;\n }",
"private void yypushback(int number) {\n if ( number > yylength() )\n yy_ScanError(YY_PUSHBACK_2BIG);\n\n yy_markedPos -= number;\n }",
"public GlBuffer commit(){\n return commit(true);\n }",
"public void queueMessage(ByteBuffer bb) {\n queue.add(bb);\n processOut();\n updateInterestOps();\n }",
"public void redo() {\n firePropertyChange(ARRAY_STRING, null, NOT_EMPTY_STRING);\n myDrawingArray.add(myUndoStack.pop());\n if (myUndoStack.isEmpty()) {\n firePropertyChange(\"emptystack\", null, EMPTY_STRING);\n }\n repaint();\n }",
"@Override\n public void addLast(T item) {\n if (size >= array.length) {\n resize(size * 2);\n array[nextLast] = item;\n nextLast = plusOne(nextLast);\n } else {\n array[nextLast] = item;\n nextLast = plusOne(nextLast);\n }\n size += 1;\n }",
"public void addBack(E data) {\r\n\t\tNode<E> node = new Node<E>(data);\r\n\t\tif(isEmpty())\r\n\t\t\tfirst = last = node;\r\n\t\telse {\r\n\t\t\tlast = last.next = node;//the last node's next node will be the new node - at the end\r\n\t\t}\r\n\t}",
"public void yypushback(int number) {\r\n if ( number > yylength() )\r\n zzScanError(ZZ_PUSHBACK_2BIG);\r\n\r\n zzMarkedPos -= number;\r\n }",
"public void yypushback(int number) {\r\n if ( number > yylength() )\r\n zzScanError(ZZ_PUSHBACK_2BIG);\r\n\r\n zzMarkedPos -= number;\r\n }",
"public void yypushback(int number) {\r\n if ( number > yylength() )\r\n zzScanError(ZZ_PUSHBACK_2BIG);\r\n\r\n zzMarkedPos -= number;\r\n }",
"public void yypushback(int number) {\r\n if ( number > yylength() )\r\n zzScanError(ZZ_PUSHBACK_2BIG);\r\n\r\n zzMarkedPos -= number;\r\n }",
"public void yypushback(int number) {\r\n if ( number > yylength() )\r\n zzScanError(ZZ_PUSHBACK_2BIG);\r\n\r\n zzMarkedPos -= number;\r\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"@Override\n\tpublic void backspace()\n\t{\n\t\tif (!isAtStart()) left.pop();\n\t}",
"public void queueMessage(ByteBuffer bb) {\n\t\tqueue.add(bb);\n\t\tprocessOut();\n\t\tupdateInterestOps();\n\t}",
"@Override\n public void append( ByteBuffer rtnBuffer) {\n \n //Add the parent\n super.append(rtnBuffer);\n \n //Add the file id\n rtnBuffer.put( handlerId );\n \n //Add the file byte value\n rtnBuffer.put(socksBytes );\n \n }"
] | [
"0.72977877",
"0.6778472",
"0.66879696",
"0.66584677",
"0.66447604",
"0.6560154",
"0.65445626",
"0.6252307",
"0.6134446",
"0.60653615",
"0.60461473",
"0.59599555",
"0.59445965",
"0.59378445",
"0.5931498",
"0.5876787",
"0.5850639",
"0.58130544",
"0.5812311",
"0.57798135",
"0.57750624",
"0.57499087",
"0.57300675",
"0.5718517",
"0.57052195",
"0.5674229",
"0.56691813",
"0.5633413",
"0.56231856",
"0.5622954",
"0.5618788",
"0.5618492",
"0.56169444",
"0.55912817",
"0.5588566",
"0.5570444",
"0.55421543",
"0.55412936",
"0.5538521",
"0.5533511",
"0.55275023",
"0.55222434",
"0.5514222",
"0.54944295",
"0.5486016",
"0.5484189",
"0.54835343",
"0.5457069",
"0.54449946",
"0.5439683",
"0.5439683",
"0.5434499",
"0.5414582",
"0.54017085",
"0.5396493",
"0.5394751",
"0.5387204",
"0.5387204",
"0.5387204",
"0.5387204",
"0.5387204",
"0.53709674",
"0.53709674",
"0.53709674",
"0.53709674",
"0.53709674",
"0.53709674",
"0.53709674",
"0.53709674",
"0.53709674",
"0.53709674",
"0.53709674",
"0.53709674",
"0.53709674",
"0.53709674",
"0.53709674",
"0.53709674",
"0.53709674",
"0.53709674",
"0.53709674",
"0.53709674",
"0.53709674",
"0.53709674",
"0.53709674",
"0.53709674",
"0.53709674",
"0.53709674",
"0.53709674",
"0.53709674",
"0.53709674",
"0.53709674",
"0.53709674",
"0.53709674",
"0.53709674",
"0.53709674",
"0.53709674",
"0.53709674",
"0.5358123",
"0.5349196",
"0.53465533"
] | 0.5827207 | 17 |
Remove from the front of the buffer | public BufferSlot remove(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private synchronized void popBuffer() {\n IoBuffer buf = data.removeFirst();\n if(marked) {\n resetCache.push(buf);\n if(!data.isEmpty()) {\n data.getFirst().mark();\n }\n } else {\n buf.free();\n }\n }",
"@Override\n\tpublic void removeFromBeginning() {\n\t}",
"public void clear() {\n\t\tbufferLast = 0;\n\t\tbufferIndex = 0;\n\t}",
"public void removeAtFront(){\r\n\t head = head.getLink();\r\n\t cursor = head; \r\n\t precursor = null; \r\n\t \r\n\t manyNodes--;\r\n }",
"private void clearBuffer(ByteBuffer buffer) {\n while (numberLeftInBuffer > 0) {\n readbit(buffer);\n }\n }",
"public synchronized Integer remove() {\r\n while (true) {\r\n if (buffer.size() == 0) {\r\n try {\r\n wait();\r\n } catch (InterruptedException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n Integer back = buffer.removeFirst();\r\n notifyAll();\r\n return back;\r\n }\r\n }",
"public void remove() {\n\t\tprocess temp = queue.removeFirst();\n\t}",
"public T removeFirst(){\n\tT ret = _front.getCargo();\n\t_front = _front.getPrev();\n\t_front.setNext(null);\n\t_size--;\n\treturn ret;\n }",
"@Override\n public Item removeFirst() {\n nextFirst = moveForward(nextFirst, 1);\n Item output = items[nextFirst];\n items[nextFirst] = null;\n size -= 1;\n return output;\n }",
"private E remove(){\n E tmp = array[0];\n swap(0,--lastPosition);\n array[lastPosition] = null;\n trickleDown(0);\n array = Arrays.copyOfRange(array,0,array.length);\n return tmp;\n }",
"public T removeFirst();",
"Object removeFirst();",
"protected T removeBeginning() {\r\n\t\tif (!this.isEmpty()) {\r\n\t\t\tSNode<T> startNode = this.getHead().getPrev();\r\n\t\t\tthis.getHead().setPrev(startNode.getPrev());\r\n\t\t\tsize--;\r\n\t\t\treturn startNode.getValue();\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"T removeFromTail() {\n return this.prev.remove();\n }",
"public T removeFirst() {\n if (size == 0) {\n return null;\n }\n if (size == 1) {\n size--;\n return array[front];\n }\n this.checkReSizeDown();\n size--;\n front++;\n this.updatePointer();\n return array[Math.floorMod(front - 1, array.length)];\n }",
"public void removeAtCursor() {\n lines.remove(cursor);\n if(cursor !=0 && cursor==lines.size())\n cursor--;\n }",
"private void clearBuffer() {\n\t\tfor (int i = 0; i < buffer.length; i++) {\n\t\t\tbuffer[i] = 0x0;\n\t\t}\n\t}",
"public IClause popFront() {\n if (back==front)\n \tthrow new BufferUnderflowException();\n\n front++;\n if (front >= tab.length)\n front = 0;\n return tab[front];\n }",
"@Override\n public void removeFromFront(){\n if(getSize() < 1) {\n throw new IndexOutOfBoundException(\"Cannot remove Node from Empty List\");\n }\n Node<T> temp = this.head.getNext();\n\n this.head.setNext(temp.getNext());\n temp.setData(null);\n temp.setNext(null);\n }",
"private final void fastRemove(final int index) {\r\n\t\tfinal int numMoved = this.size - index - 1;\r\n\t\tif (numMoved > 0) {\r\n\t\t\tSystem.arraycopy( this.elementData, index + 1, this.elementData, index, numMoved );\r\n\t\t}\r\n\t\tthis.elementData[--this.size] = null; // Let gc do its work\r\n\t}",
"public synchronized Object removeFirstElement() {\n return _queue.remove(0);\n }",
"T removeFromHead() {\n return this.next.remove();\n }",
"public Integer remove() {\n while (true) {\n\n if (buffer.isEmpty()) {\n System.out.println(\"List is empty! Waiting..\");\n try {\n Thread.sleep(500);\n } catch (InterruptedException e) {\n System.out.println(e.getMessage());\n }\n } else {\n full.waiting();\n mutex.waiting();\n int back = buffer.removeFirst();\n mutex.signal();\n empty.signal();\n return back;\n\n }\n }\n\n\n }",
"void remove (int offset, int size);",
"public void removeHead() {\n\t\t\tif (length != 0)\n\t\t\t{ \n\t\t ElementDPtr save = head.getNext();\n\t\t head = head.getNext();\n\t\t\thead.setPrev(null);\n\t\t\thead.setNext(save.getNext());\n\t\t\tlength -= 1;\n\t\t\tSystem.out.println(tail.getPrev().getValue() + \" removeB \" + length);\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}",
"void unsetBegin();",
"public void resetBuffer() {\n\n\t}",
"public void clearBuffer(){\n System.out.println(\"Clearning beffer\");\n //Deletes the buffer file\n File bufferFile = new File(\"data/buffer.ser\");\n bufferFile.delete();\n }",
"private void flushBuffer(Runnable paramRunnable) {\n/* 149 */ int i = this.buf.position();\n/* 150 */ if (i > 0 || paramRunnable != null)\n/* */ {\n/* 152 */ flushBuffer(this.buf.getAddress(), i, paramRunnable);\n/* */ }\n/* */ \n/* 155 */ this.buf.clear();\n/* */ \n/* 157 */ this.refSet.clear();\n/* */ }",
"T pop() {\n return contents.removeFromHead();\n }",
"public E removeFirst();",
"public T removeFirst() {\n return remove(sentinel.next);\n }",
"public void clear() {\n this.init(buffer.length);\n }",
"T dequeue() {\n return contents.removeFromTail();\n }",
"@Override\n public void resetBuffer() {\n\n }",
"public synchronized void unpin(Buffer buff) {\n //=====================================CS4432-Project1=====================\n buff.unpin();\n if (!buff.isPinned()) {\n //if the buffer is now unpinned, we should re-add the buffer to the least recently\n //used linked list so that we can use it if need be\n if (replacementPolicy.equalsIgnoreCase(\"LRU\")){\n leastRecentlyUsedArray.add(buff.getFrameNumber());\n }\n //increment the number of available\n numAvailable++;\n }\n }",
"T removeFromTail() {\n if (this.size() == 0) {\n throw new RuntimeException(\"Cannot remove from an empty list\");\n }\n return header.removeFromTail();\n }",
"public void remove( int index ) {\n\tif (index > _lastPos)\n\t System.out.println(\"No meaningful value at index\");\n\telse {for (int i= index; i < _lastPos; i++){\n\t\t_data[i]= _data[i+1];\n\t }\n\t _size--;\n\t _lastPos--;\n\t}\n }",
"public T removeFront() {\n\t\tT found = start.value;\n\t\tstart = start.next;\n\t\treturn found;\n\t}",
"@Override\n\tpublic void resetBuffer() {\n\t}",
"@Override\n\tpublic void backspace()\n\t{\n\t\tif (!isAtStart()) left.pop();\n\t}",
"public void removeFirst() {\n\t\t\thead = head.next;\n\t\t}",
"public T removeFirst( ){\r\n\t\t//calls remove onfirst\r\n\t\tT toRemove = getFirst();\r\n\t\treturn remove(toRemove);\r\n\t}",
"public void dequeue() {\r\n saf.remove(0);\r\n }",
"public void clearBuffer() {\r\n\t\t_tb = new TreeBuffer();\r\n\t}",
"void unsetBeginPosition();",
"public void pop() {\n queue.remove(0);\n }",
"public final void removeFirst() {\n this.size--;\n setFirst((Node) ((Node) get()).get());\n }",
"public long remove(){\n\t\t\r\n\t\t\tlong temp = queueArray[front]; //retrieves and stores the front element\r\n\t\t\tfront++;\r\n\t\t\tif(front == maxSize){ //To set front = 0 and use it again\r\n\t\t\t\tfront = 0;\r\n\t\t\t}\r\n\t\t\tnItems--;\r\n\t\t\treturn temp;\r\n\t\t}",
"public U removeFirst(){\r\n\t \tif (getArraySize()==0)\r\n\t \t\tthrow new IndexOutOfBoundsException();\r\n\t \t//calls remove on first\r\n\t \treturn remove(0);\r\n\t }",
"public E removeFirst() {\n return pop();\n }",
"public char removeCharFromFront(){\n\t\t\n\t\tchar c = head.getC();\n\t\tif(head.getNext()!=null){\n\t\t\thead=head.getNext();\n\t\t\thead.setPrev(null);\n\t\t}\n\t\telse{\n\t\t\thead=null;\n\t\t\ttail=null;\n\t\t}\n\t\treturn c;\n\t}",
"public E removeFirst() {\n if(isEmpty()){\n return null;\n }else{\n return remove(header.getNext());\n }\n }",
"@Override\n\tprotected void clearBuffer() {\n\t\tsynchronized (listLock) {\n\t\t\tif (deleteList != null && deleteList.size() > 0) {\n\t\t\t\tdeleteList.clear();\n\t\t\t}\n\t\t}\n\n\t}",
"synchronized void unpin(ExerciseBuffer buff) {\n buff.unpin();\n if (!buff.isPinned() && (unpinnedBufferList.size() < bufferpool.length)){ // unpinnedBufferList length should not exceed the bufferpool length \n numAvailable++;\n unpinnedBufferList.add(buff); // adding to the tail\n \n }\n }",
"public void trimToSize() {\n if (size() != this.buffer.length) {\n this.buffer = toArray();\n }\n }",
"public void remove() {\n btRemove().push();\n }",
"public void remove() {\n btRemove().push();\n }",
"T removeFromHead() {\n if (this.size() == 0) {\n throw new RuntimeException(\"Cannot remove from an empty list\");\n }\n return header.removeFromHead();\n }",
"public void remove() {\r\n // rather than going through replace(), just reinitialize the StyledText,\r\n // letting the old data structures fall on the floor\r\n fCharBuffer = new CharBuffer();\r\n fStyleBuffer = new StyleBuffer(this, AttributeMap.EMPTY_ATTRIBUTE_MAP);\r\n fParagraphBuffer = new ParagraphBuffer(fCharBuffer);\r\n fTimeStamp += 1;\r\n fDamagedRange[0] = fDamagedRange[1] = 0;\r\n }",
"public Object dequeue(){\r\n return super.remove(size()-1);\r\n }",
"public Item removeFirst() {\n Item val = deck[fFront];\n deck[fFront++] = null;\n return val;\n }",
"protected final void resetBuffer() {\n buffer.reset();\n }",
"@Override\n public T removeFirst() {\n if (size == 0) {\n return null;\n }\n\n int position = plusOne(nextFirst);\n T itemToReturn = array[position];\n array[position] = null;\n nextFirst = position;\n size -= 1;\n\n if ((double)size / array.length < 0.25 && array.length >= 16) {\n resize(array.length / 2);\n }\n return itemToReturn;\n }",
"private void resetBuffer() {\n baos.reset();\n }",
"public void dequeue()\n\t{\n\t\tq.removeFirst();\n\t}",
"private void deleteFromTail() {\n if (size == 0)\n return;\n else {\n tail = tail.pre;\n tail.next = null;\n size--;\n }\n }",
"public void erase()\n {\n this.top = null;\n }",
"public void discard();",
"void deleteFront()\n\t{\n\t\tif (length == 0) \n\t\t{\n\t\t\tthrow new RuntimeException(\"List Error: cannot call deleteFront() on empty List\");\n\t\t}\n\t\tif (cursor == front) \n\t\t{\n\t\t\tcursor = null;\n\t\t\tindex = -1; //added because i was failing the test scripts because i wasn't managing the indicies\n\t\t}\n \n\t\tfront = front.next; //front element becomes the next element in the list\n\t\tlength--;\n index --; //added because i was failing the test scripts because i wasn't managing the indicies\n\t\t\n\t}",
"public void popToPointer() {\n while (this.size() > undoPointer + 1) {\n super.pop();\n }\n }",
"@Override\n public E removeFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"No elements in dequeue\");\n }\n E value = dequeue[head];\n dequeue[head] = null;\n head = ++head % dequeue.length;\n size--;\n if (size < dequeue.length / 2) {\n reduce();\n }\n return value;\n }",
"public void trim(long position);",
"@Override\n public void remove() {\n Entry<T> prev = ((Entry<T>) cursor).prev;\n super.remove();\n if(cursor!=tail){\n ((Entry<T>) cursor.next).prev = prev;\n }\n }",
"public void pop() {\n queue.remove();\n }",
"public L removeFromFront(){\n\t\tif(isEmpty())//throw exception if List is empty\n\t\tthrow new IllegalStateException(\"List \" + name + \" is empty\");\n\n\t\tL removedItem = (L) firstNode.data; //retrieve data being removed\n\n\t\t//update references firstNode and lastNode\n\t\tif(firstNode == lastNode)\n\t\tfirstNode = lastNode = null;\n\t\telse\n\t\tfirstNode = firstNode.getNext();\n\n\t\treturn removedItem; //return removed node data\n\t}",
"public void clear() {\n history.clear();\n position = -1;\n }",
"public void remove()\n {\n if( current > 0 )\n {\n set(-- current);\n }\n }",
"public Object popFront(){\n\t\tObject data = head.data;\n\t\thead = head.nextNode; \n\t\t--size; \n\t\t\n\t\treturn data; \n\t}",
"void deleteFromFront()\n {\n // check whether Deque is empty or not \n if (isEmpty())\n {\n return;\n }\n // Only one element left\n if (front == end)\n {\n front = end = -1;\n }\n else {\n // back to initial\n front = (front == size -1) ? 0 : front+1;\n }\n }",
"@Override\n public void removeCurrent() {\n if (!isCurrent()) { throw new IllegalStateException(\"There is no current element\"); }\n\n if (prev == null) { // The current element is referenced by the head\n head = head.getNext();\n cursor = head;\n } else if (cursor.getNext() == null) { // The current element is the final element\n prev = null;\n cursor = null;\n tail = null;\n } else {\n cursor = cursor.getNext();\n }\n\n size--;\n }",
"public E uncons() throws IndexOutOfBoundsException {\n return remove(0);\n }",
"@Override\n public T remove() {\n if(numItems == 0)\n return null;\n return this.arr[--numItems];\n }",
"public Object removeFirst() {\r\n Object first = header.next.element;\r\n remove(header.next);\r\n return first;\r\n }",
"public void removeFirst() \r\n\t{\r\n\t\tint position = 1;\r\n\t\tif ( this.isEmpty() || position > numItems || position < 1 )\r\n\t\t{\r\n\t\t\tSystem.out.print(\"This delete can not be performed \"+ \"an element at position \" + position + \" does not exist \" );\r\n\t\t}\r\n\t\tfor (int i=position-1; i< numItems-1; i++)\r\n\t\t\tthis.bookArray[i] = this.bookArray[i+1];\r\n\t\t\tthis.bookArray[numItems-1] = null;\r\n\t\t\tnumItems--;\r\n\t\t\tSystem.out.println(\"DELETED first book from the Array \\n\");\r\n\t\t\r\n\t\t\treturn ;\r\n\t}",
"@Override\n\tpublic E deQueue() {\n\t\treturn list.removeFirst();\n\t}",
"private void trim() {\n read(0);\n }",
"public T removeFromFront() {\n DoublyLinkedListNode<T> temp = head;\n if (size == 0) {\n throw new NoSuchElementException(\"The list is empty, so there\"\n + \" is nothing to get.\");\n } else {\n if (head == tail) {\n head = tail;\n tail = null;\n return temp.getData();\n } else {\n head = head.getNext();\n head.setPrevious(null);\n size -= 1;\n return temp.getData();\n }\n }\n\n\n }",
"public void popFirst() {\n this.head = this.head.next;\n this.length--;\n }",
"public void remove_head(int data){\n\n }",
"@Override\n public T remove(int index) {\n if (index < 0 || index > size) {\n throw new IndexOutOfBoundsException(\"Index out of bounds exception.\");\n }\n\n T oldValue = (T) data[index];\n int move = index - size - 1;\n if (move > 0) {\n System.arraycopy(data, index + 1, data, index, move);\n }\n\n data[--size] = null;\n return oldValue;\n }",
"public void clear() {\n\t\tthis.sizeinbits = 0;\n\t\tthis.actualsizeinwords = 1;\n\t\tthis.rlw.position = 0;\n\t\t// buffer is not fully cleared but any new set operations should\n\t\t// overwrite stale data\n\t\tthis.buffer[0] = 0;\n\t}",
"public T removeLast() {\n return remove(sentinel.prev);\n }",
"public synchronized ListNode removeFromBegin() {\n\t\tListNode node = head;\n\t\tif (node != null) {\n\t\t\thead = node.getNext();\n\t\t\tnode.setNext(null);\n\t\t}\n\t\treturn node;\n\t}",
"@Override\n public T dequeue() {\n T frontChar = myQ[0];\n\n for(int i = 1; i < myLength; i++) {\n myQ[i - 1] = myQ[i];\n }\n myLength--;\n return frontChar;\n }",
"public void discard() {\r\n\t\tif(this.markedStack.isEmpty()) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis.markedStack.removeLast();\r\n\t}",
"public T removeLast();",
"public final void clear()\n {\n\t\tcmr_queue_.removeAllElements();\n buffer_size_ = 0;\n }",
"public String[] getBufferAndFlush() {\r\n\t\tString[] answer = new String[this.BUFFER.getSize()];\r\n\r\n\t\tfor (int i = 0; i < answer.length; i++)\r\n\t\t\tanswer[i] = this.BUFFER.remove();\r\n\r\n\t\treturn answer;\r\n\t}",
"public void flush(){\r\n mBufferData.clear();\r\n }"
] | [
"0.7089044",
"0.66689515",
"0.6532518",
"0.65039885",
"0.64648473",
"0.6417288",
"0.62164366",
"0.6203998",
"0.6184992",
"0.6134754",
"0.6105143",
"0.60935163",
"0.60567075",
"0.6055824",
"0.60474867",
"0.60461414",
"0.6028973",
"0.60099083",
"0.5993744",
"0.59703845",
"0.59454465",
"0.5935253",
"0.59337574",
"0.590278",
"0.59005415",
"0.58838475",
"0.58789235",
"0.5872262",
"0.5870088",
"0.58510405",
"0.5844459",
"0.58409417",
"0.5838861",
"0.58327407",
"0.5823557",
"0.5817556",
"0.5813105",
"0.5810665",
"0.5809359",
"0.58074415",
"0.58059114",
"0.57814306",
"0.5775143",
"0.57579297",
"0.57472306",
"0.57418007",
"0.57188135",
"0.5709668",
"0.57082325",
"0.5707811",
"0.5706837",
"0.57043105",
"0.5701694",
"0.56954515",
"0.56906176",
"0.56884545",
"0.5683782",
"0.5683782",
"0.5655067",
"0.5650613",
"0.56429297",
"0.5642703",
"0.56394535",
"0.5633754",
"0.5633643",
"0.56311566",
"0.5630573",
"0.5628427",
"0.56235546",
"0.5620965",
"0.56196105",
"0.5609041",
"0.56041044",
"0.55975693",
"0.5596652",
"0.55950975",
"0.55767137",
"0.5574308",
"0.5566668",
"0.55641764",
"0.55596054",
"0.55579203",
"0.55536693",
"0.5553105",
"0.5553093",
"0.55518806",
"0.5548571",
"0.55440444",
"0.55308247",
"0.5526764",
"0.55230653",
"0.55214655",
"0.5518331",
"0.55165833",
"0.5512632",
"0.55081975",
"0.55033326",
"0.55005425",
"0.55000657",
"0.54986835"
] | 0.70126796 | 1 |
/ MMddHHmmss MMdd hhmmss / GMT+0 GMT+7 | public static String getDateTimeGMT(String format, String timeZone) throws Exception {
SimpleDateFormat dateFormatGmt = new SimpleDateFormat(format);
dateFormatGmt.setTimeZone(TimeZone.getTimeZone(timeZone));
return dateFormatGmt.format(new Date());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static String getYYYYMMDDHHMMSS()\r\n/* 56: */ {\r\n/* 57: 68 */ String nowTime = \"\";\r\n/* 58: 69 */ Date now = new Date();\r\n/* 59: 70 */ SimpleDateFormat formatter = new SimpleDateFormat(\"yyyyMMddHHmmss\");\r\n/* 60: 71 */ nowTime = formatter.format(now);\r\n/* 61: 72 */ return nowTime;\r\n/* 62: */ }",
"public static String m128354a(String str) {\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"yyyy-MM-dd-HHmmssSSS\", Locale.US);\n Calendar instance = Calendar.getInstance(TimeZone.getTimeZone(\"GMT+8\"));\n C7573i.m23582a((Object) instance, \"calendar\");\n Date time = instance.getTime();\n StringBuilder sb = new StringBuilder();\n sb.append(simpleDateFormat.format(time));\n sb.append(str);\n return sb.toString();\n }",
"private String TimeConversion() {\n\n int hours, minutes, seconds, dayOfWeek, date, month, year;\n\n seconds = ((raw[27] & 0xF0) >> 4) + ((raw[28] & 0x03) << 4);\n minutes = ((raw[28] & 0xFC) >> 2);\n hours = (raw[29] & 0x1F);\n dayOfWeek = ((raw[29] & 0xE0) >> 5);\n date = (raw[30]) & 0x1F;\n month = ((raw[30] & 0xE0) >> 5) + ((raw[31] & 0x01) << 3);\n year = (((raw[31] & 0xFE) >> 1) & 255) + 2000;\n\n\n\n return hR(month) + \"/\" + hR(date) + \"/\" + year + \" \" + hR(hours) + \":\" + hR(minutes) + \":\" + hR(seconds) + \":00\";\n }",
"private String formatDateForVSS(Date d) {\n SimpleDateFormat sdf = new SimpleDateFormat(this.dateFormat + \";hh:mma\");\n \t\tString vssFormattedDate = sdf.format(d);\n \t\treturn vssFormattedDate.substring(0, vssFormattedDate.length() - 1);\n \t}",
"private static String getStamp() {\n\t\t\t return new SimpleDateFormat(\"yyyyMMddHHmmss\").format(new Date());\r\n\t\t}",
"private static void m1() {\n\n String d = \"2019/03/22 10:00-11:00\";\n DateFormat df = new SimpleDateFormat(\"yyyy/MM/dd HH:mm-HH:mm\");\n try {\n Date parse = df.parse(d);\n System.out.println(df.format(parse));\n } catch (ParseException e) {\n e.printStackTrace();\n }\n }",
"public String getTimestamp() \n{\n Calendar now = Calendar.getInstance();\n return String.format(\"20%1$ty-%1$tm-%1$td_%1$tHh%1$tMm%1$tSs\", now);\n}",
"private String timeConversion() {\n Calendar local = Calendar.getInstance();\n Calendar GMT = Calendar.getInstance(TimeZone.getTimeZone(\"GMT\"));\n\n //Time from the PINPoint\n int hours, minutes, seconds, day, month, year;\n hours = (record[10] & 0xF8) >> 3;\n minutes = ((record[10] & 0x07) << 3) + ((record[11] & 0xE0) >> 5);\n seconds = ((record[11] & 0x1F) << 1) + ((record[12] & 0x80) >> 7);\n seconds += (record[12] & 0x7F) / 100;\n day = (record[13] & 0xF8) >> 3;\n month = ((record[13] & 0x07) << 1) + ((record[14] & 0x80) >> 7);\n year = (record[14] & 0x7F) + 2000;\n \n month--; //Months in java are 0-11, PINPoint = 1-12;\n\n //Set GMTs time to be the time from the PINPoint\n GMT.set(Calendar.DAY_OF_MONTH, day);\n GMT.set(Calendar.MONTH, month);\n GMT.set(Calendar.YEAR, year);\n GMT.set(Calendar.HOUR_OF_DAY, hours);\n GMT.set(Calendar.MINUTE, minutes);\n GMT.set(Calendar.SECOND, seconds);\n\n //Local is set to GMTs time but with the correct timezone\n local.setTimeInMillis(GMT.getTimeInMillis());\n\n //Set Local time to be the time converted from GMT\n int lHours, lMinutes, lSeconds, lDay, lMonth, lYear;\n lHours = local.get(Calendar.HOUR_OF_DAY);\n lMinutes = local.get(Calendar.MINUTE);\n lSeconds = local.get(Calendar.SECOND);\n lDay = local.get(Calendar.DAY_OF_MONTH);\n lMonth = local.get(Calendar.MONTH);\n\n lMonth++; //Months in java are 0-11, humans read 1-12\n\n lYear = local.get(Calendar.YEAR);\n\n return hR(lMonth) + \"/\" + hR(lDay) + \"/\" + lYear + \" \" + hR(lHours) + \":\" + hR(lMinutes) + \":\" + hR(lSeconds);\n }",
"public static void main(String[] args) {\n\t\t long ms = 671684;\r\n\t\t long ms1 = 607222 ;\r\n\t\t SimpleDateFormat formatter = new SimpleDateFormat(\"HH:mm:ss\");\r\n\t formatter.setTimeZone(TimeZone.getTimeZone(\"GMT+00:00\"));\r\n\t String hms = formatter.format(416970);\r\n\t String hms1 = formatter.format(710036);\r\n\t System.out.println(hms);\r\n\t System.out.println(hms1);\r\n\t //��ʦ���������ExecutorService������һ��\r\n\t}",
"static String timeConversion1(String s) {\n String[] timeSplit = s.split(\":\");\n String hours = timeSplit[0];\n String minutes = timeSplit[1];\n String seconds = timeSplit[2].substring(0, 2);\n String ampm = timeSplit[2].substring(2);\n\n int hour = Integer.parseInt(hours);\n\n int differential = 0;\n if (\"PM\".equals(ampm) && hour != 12) {\n differential = 12;\n }\n\n\n hour += differential;\n hour = hour % 24;\n\n hours = String.format(\"%02d\", hour);\n\n return hours + \":\" + minutes + \":\" + seconds;\n\n }",
"private String m36904a(long timeStamp) {\n if (timeStamp == -1) {\n return null;\n }\n return new SimpleDateFormat(\"M/d/yy hh:mm:ss a z\", Locale.US).format(new Date(timeStamp));\n }",
"private String getFormattedDate(Integer format) {\n Date date = new Date(format * 1000L);\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss.SSS\");\n dateFormat.setTimeZone(TimeZone.getTimeZone(\"Etc/UTC\"));\n Log.e(\"time\",dateFormat.format(date));\n return dateFormat.format(date);\n }",
"static String timeConversion(String s) {\n if(s.indexOf('P') >= 0 && s.substring(0, 2).equals(\"12\")){\n }\n else if(s.indexOf('P') >= 0){\n Integer n = Integer.parseInt(s.substring(0, 2));\n s = removeHour(s);\n n += 12;\n String hour = Integer.toString(n);\n s = hour + s;\n }\n else if (s.indexOf('A') >= 0 && s.substring(0, 2).equals(\"12\")){\n s = \"00\" + s.substring(2);\n }\n return removeHourFormat(s);\n }",
"public static String getYYYYMMDD()\r\n/* 65: */ {\r\n/* 66: 81 */ String nowTime = \"\";\r\n/* 67: 82 */ Date now = new Date();\r\n/* 68: 83 */ SimpleDateFormat formatter = new SimpleDateFormat(\"yyyyMMdd\");\r\n/* 69: 84 */ nowTime = formatter.format(now);\r\n/* 70: 85 */ return nowTime;\r\n/* 71: */ }",
"public String getYYYYMMDDhhmmssTime(Long time) {\n\t\tString result = \"\";\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"YYYYMMDDhhmmss\");\n\t\tresult = sdf.format(new Date(time));\n\t\treturn result;\n\t}",
"public static String longToYYYYMMDDHHMM(long longTime)\r\n/* 157: */ {\r\n/* 158:232 */ SimpleDateFormat formatter = new SimpleDateFormat(\"yyyyMMdd HH:mm\");\r\n/* 159:233 */ Date strtodate = new Date(longTime);\r\n/* 160:234 */ return formatter.format(strtodate);\r\n/* 161: */ }",
"public static String fromDate(String s){\n \t\t\n \t\tString[] date = s.split(\"T\");\n \t\tString time = date[1].substring(0,5);\n \t\tString[] dates = date[0].split(\"-\"); \n \t\tString month = dates[1];\n \t\tString day = dates[2];\n \t\t\n \t\treturn day + \"/\" + month + \", kl: \" + time;\n \t}",
"private String formatTimeToICS(LocalDateTime date) {\n return DateTimeFormatter.ofPattern(\"YYYYMMddTHHmmss\").format(date);\n }",
"static String timeConversion(String s) {\n String[] sTime = s.split(\":\");\n\n int x = 0;\n\n // if PM and hours >12, add additional 12 to hours\n // for AM and hour = 12, set hour to 00\n if(sTime[sTime.length - 1].contains(\"PM\") && !sTime[0].equals(\"12\"))\n x = 12;\n\n String val1 = \"\";\n if(x == 12)\n val1 = (Integer.parseInt(sTime[0]) + x) + \"\";\n else {\n if(sTime[0].equals(\"12\") && sTime[sTime.length - 1].contains(\"AM\"))\n val1 = \"00\";\n else\n val1 = sTime[0];\n }\n\n // merge the string and return the result\n String result = val1 + \":\" + sTime[1] + \":\" + sTime[2].substring(0,2);\n return result;\n }",
"public static void main(String[] args) {\r\n\t\tDate now = new Date();\r\n\t\tSimpleDateFormat sdf = \r\n\t\tnew SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\r\n\tString str = sdf.format(now);\r\n\tSystem.out.println(str);\r\n\tlong time = now.getTime();\r\n\ttime += 48954644;\r\n\tnow.setTime(time);\r\n\tSystem.out.println(sdf.format(now));\r\n\tDate dat = null;\r\n\ttry {\r\n\t\tdat = sdf.parse(str);\r\n\t} catch (ParseException e) {\r\n\t\t// TODO Auto-generated catch block\r\n\t\te.printStackTrace();\r\n\t}\r\n\tSystem.out.println(dat);\r\n\t\r\n\r\n}",
"private static String buildSequence() {\n\t\tSimpleDateFormat dateFormatGMT = new SimpleDateFormat(\"yyyyMMddHHmmssSSS\");\n\t\tdateFormatGMT.setTimeZone(TimeZone.getTimeZone(\"GMT\")); // set to Greenwich mean time.\n\t\treturn dateFormatGMT.format(new Date());\n\t}",
"OffsetDateTime creationTime();",
"private String syncTimeStamp(String timestamp){\r\n StringBuilder dateBuilder = new StringBuilder(timestamp);\r\n String time = dateBuilder.toString().split(\"T\")[1].substring(0, 8);\r\n String[] timeArr = time.split(\":\");\r\n String seconds = timeArr[2];\r\n String dd = dateBuilder.toString().split(\"T\")[0].split(\"-\")[2];\r\n String mm = dateBuilder.toString().split(\"T\")[0].split(\"-\")[1];\r\n String yyyy = dateBuilder.toString().split(\"T\")[0].split(\"-\")[0];\r\n int hour = Integer.parseInt(timeArr[0]);\r\n int minutes = Integer.parseInt(timeArr[1]);\r\n minutes += 30;\r\n hour+=5;\r\n if (minutes>=60){\r\n hour += 1;\r\n minutes -= 60;\r\n }\r\n if (hour >= 24){\r\n hour -= 24;\r\n dd = Integer.toString(Integer.parseInt(dd) + 1);\r\n if (Integer.parseInt(dd) < 10)\r\n dd = \"0\" + dd;\r\n }\r\n String minutesString;\r\n if (minutes < 10)\r\n minutesString = \"0\" + Integer.toString(minutes);\r\n else\r\n minutesString = Integer.toString(minutes);\r\n\r\n String hoursString;\r\n if (hour < 10)\r\n hoursString = \"0\" + Integer.toString(hour);\r\n else\r\n hoursString = Integer.toString(hour);\r\n String finalTime = hoursString + \":\" + minutesString + \":\" + seconds;\r\n String finalDate = dd + \"-\" + mm + \"-\" + yyyy;\r\n\r\n return (finalDate + \" \" + finalTime);\r\n }",
"public String convertCalendarMillisecondsAsLongToDateTimeHourMinSec(long fingerprint) {\n\t\t\t\tDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\t\t\tDate date = new Date(fingerprint);\n\t\t\t\treturn format.format(date);\n\t\t\t}",
"private static String zuluFormat(String beginTimestamp) {\n\t\tStringBuffer buf = new StringBuffer(beginTimestamp);\n\t\tbuf.insert(4, '-');\n\t\tbuf.insert(7, '-');\n\t\tbuf.insert(10, 'T');\n\t\tbuf.insert(13, ':');\n\t\tbuf.insert(16, ':');\n\t\tbuf.append('Z');\n\t\treturn buf.toString();\n\t}",
"public static String timeConversion(String s) {\n // Write your code here\n String end = s.substring(2, s.length() - 2);\n String ans = s.substring(0, s.length() - 2);\n if (s.charAt(8) == 'A') {\n return s.startsWith(\"12\") ? \"00\" + end : ans;\n }\n\n return s.startsWith(\"12\") ? ans : (Integer.parseInt(s.substring(0, 2)) + 12) + end;\n }",
"void get_timestamp (int reversed)\n{\n BytePtr str = new BytePtr(20);\n int i;\n\n if (timestamp != 0) return;\n str.at(19, (byte)0);\n if (reversed != 0)\n for (i=19; i-- != 0; ) str.at(i, (byte)CTOJ.fgetc(ifp));\n else\n CTOJ.fread (str, 19, 1, ifp);\n\n int year = ( str.at(0) - '0')*1000 + (str.at(1) - '0')*100 + (str.at(2) - '0' )*10 + str.at(3) - '0';\n int mon = (str.at(5) - '0')*10 + str.at(6)-'0';\n int day = (str.at(8) - '0')*10 + str.at(9)-'0';\n int hour = (str.at(11) - '0')*10 + str.at(12)-'0';\n int min = (str.at(14) - '0')*10 + str.at(15)-'0';\n int sec = (str.at(17) - '0')*10 + str.at(18)-'0';\n \n Calendar cal = new GregorianCalendar();\n cal.set(year,mon-1,day,hour,min,sec);\n timestamp = cal.getTimeInMillis();\n}",
"public static String convertDateToSend(String gotdate){\n Calendar calendar = Calendar.getInstance();\n calendar.setTimeInMillis(Long.parseLong(gotdate));\n SimpleDateFormat inputFormat = new SimpleDateFormat(\"yyyyMMddHHmmss\");\n SimpleDateFormat outputFormat = new SimpleDateFormat(\"dd MMM yyyy\");\n /*Date parsedDate = null;\n try {\n parsedDate = inputFormat.parse(gotdate);\n } catch (ParseException e) {\n e.printStackTrace();\n }*/\n String formattedDate = outputFormat.format(calendar.getTime());\n return formattedDate;\n }",
"public HiResDate getTime();",
"public static String getHHMM()\r\n/* 74: */ {\r\n/* 75: 94 */ String nowTime = \"\";\r\n/* 76: 95 */ Date now = new Date();\r\n/* 77: 96 */ SimpleDateFormat formatter = new SimpleDateFormat(\"HH:mm\");\r\n/* 78: 97 */ nowTime = formatter.format(now);\r\n/* 79: 98 */ return nowTime;\r\n/* 80: */ }",
"public String convertCalendarMillisecondsAsLongToDateTimeHourMin(long fingerprint) {\n\t\t\t\tDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd HH:mm\"); // not \"yyyy-MM-dd HH:mm:ss\"\n\t\t\t\tDate date = new Date(fingerprint);\n\t\t\t\treturn format.format(date);\n\t\t\t}",
"private String prettyTime() {\n String[] dt = time.split(\"T\");\n String[] ymd = dt[0].split(\"-\");\n String[] hms = dt[1].split(\":\");\n\n int hour = Integer.parseInt(hms[0]);\n\n String date = getMonth(Integer.parseInt(ymd[1])) + \" \" + ymd[2] + \", \" + ymd[0];\n String time = (hour > 12 ? hour - 12 : hour) + \":\" + hms[1] + \":\" + hms[2].substring(0, hms[2].indexOf(\".\"));\n return date + \" at \" + time;\n }",
"private static String getDate() {\n return new SimpleDateFormat(\"yyyyMMddHHmmss\").format\n (new Date(System.currentTimeMillis()));\n }",
"private static long getDateInMillis(String formattedDate) {\n SimpleDateFormat simpleDateFormat =\n new SimpleDateFormat(\"MMM d, yyyy h:mm a\");\n long dateInMillis;\n Date dateObject;\n try {\n dateObject = simpleDateFormat.parse(formattedDate);\n dateInMillis = dateObject.getTime();\n return dateInMillis;\n } catch (ParseException e) {\n Log.e(\"Problem parsing date\", e.getMessage());\n e.printStackTrace();\n }\n return 0;\n }",
"private String YYYYMMDD(String str) {\n\t\tString[] s = str.split(\"/\");\n\t\treturn s[0] + parseToTwoInteger(Integer.parseInt(s[1].trim())) + parseToTwoInteger(Integer.parseInt(s[2].trim()));\n\t}",
"static String timeConversion(String s) {\n\n\t\tStringBuilder sb = new StringBuilder();\n\t\tboolean isAm = s.contains(\"AM\");\n\t\t\n\t\ts = s.replace(\"AM\", \"\");\n\t\ts = s.replace(\"PM\", \"\");\n\t\t\n\t\tString str[] = s.split(\":\");\n\t\tint time = Integer.parseInt(str[0]);\n\t\t\n\t\t\n\t\tif(time < 12 && !isAm) {\n\t\t\ttime = time + 12;\n\t\t\tsb.append(time).append(\":\");\n\t\t}else if(time == 12 && isAm) {\n\t\t\tsb.append(\"00:\");\n\t\t}else {\n\t\t\tif (time < 10) sb.append(\"0\").append(time).append(\":\");\n\t\t\telse sb.append(time).append(\":\");\n\t\t}\n\n\t\tsb.append(str[1]).append(\":\").append(str[2]);\n\t\treturn sb.toString();\n\t}",
"public static long fourBytesToTime(byte[] b) {\n\t\treturn ((((((long)uByte(b[0])<<8)+uByte(b[1]))<<8)+uByte(b[2]))<<8)+uByte(b[3]);\n\t}",
"private static Date getFormattedDate(String date){\n\t\tString dateStr = null;\n\t\tif(date.length()<11){\n\t\t\tdateStr = date+\" 00:00:00.0\";\n\t\t}else{\n\t\t\tdateStr = date;\n\t\t}\n\t\tDate formattedDate = null;\n\t\ttry {\n\t\t\tformattedDate = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss.S\").parse(dateStr);\n\t\t} catch (ParseException e) {\n\t\t\tCommonUtilities.createErrorLogFile(e);\n\t\t}\n\t\treturn formattedDate;\n\n\t}",
"@SuppressWarnings(\"deprecation\")\r\n\tpublic String format(Date date,boolean time){\n\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyyMMdd\");\r\n\tString timestamp=dateFormat.format(date)+\"T\";\r\n\tif(time){\r\n\t\tdateFormat = new SimpleDateFormat(\"HH:mm:ssZ\");\r\n\t\ttimestamp+=dateFormat.format(date);\r\n\t}\r\n else{\r\n \tdate.setHours(12);\r\n \tdate.setMinutes(0);\r\n \tdate.setSeconds(0);\r\n \tdateFormat = new SimpleDateFormat(\"HH:mm:ss\");\r\n \ttimestamp+=dateFormat.format(date);\r\n \ttimestamp+=\"+0000\";\r\n }\r\n\treturn timestamp;\r\n }",
"private void getTimestamps() {\n \t\tCalendar calendar = new GregorianCalendar(2007,Calendar.JANUARY,1);\n \t\tcalendar.set(2000 + yy, mm - 1, dd, HH, MM);\n \t\tString[] tempstr = new String[6];\n \n \t\tfor(int i = 0; i < r.length; i++) {\n \t\t\tif(calendar.get(Calendar.YEAR) < 10) {\n \t\t\t\ttempstr[0] = \"0\" + str(calendar.get(Calendar.YEAR));\n \t\t\t}\n \t\t\telse {\n \t\t\t\ttempstr[0] = str(calendar.get(Calendar.YEAR));\n \t\t\t}\n \t\t\tif(calendar.get(Calendar.MONTH) < 9) {\n \t\t\t\ttempstr[1] = \"0\" + str(calendar.get(Calendar.MONTH) + 1);\n \t\t\t}\n \t\t\telse {\n \t\t\t\ttempstr[1] = str(calendar.get(Calendar.MONTH) + 1);\n \t\t\t}\n \t\t\tif(calendar.get(Calendar.DATE) < 10) {\n \t\t\t\ttempstr[2] = \"0\" + str(calendar.get(Calendar.DATE));\n \t\t\t}\n \t\t\telse {\n \t\t\t\ttempstr[2] = str(calendar.get(Calendar.DATE));\n \t\t\t}\n \t\t\tif(calendar.get(Calendar.HOUR) < 12) {\n \t\t\t\tif(calendar.get(Calendar.AM_PM) == 1) {\n \t\t\t\t\ttempstr[3] = str(calendar.get(Calendar.HOUR) + 12);\n \t\t\t\t}\n \t\t\t\telse if(calendar.get(Calendar.HOUR) < 10) {\n \t\t\t\t\ttempstr[3] = \"0\" + str(calendar.get(Calendar.HOUR));\n \t\t\t\t}\n \t\t\t\telse {\n \t\t\t\t\ttempstr[3] = str(calendar.get(Calendar.HOUR));\n \t\t\t\t}\n \t\t\t}\n \t\t\telse {\n \t\t\t\ttempstr[3] = str(calendar.get(Calendar.HOUR));\n \t\t\t}\n \t\t\tif(calendar.get(Calendar.MINUTE) < 10) {\n \t\t\t\ttempstr[4] = \"0\" + str(calendar.get(Calendar.MINUTE));\n \t\t\t}\n \t\t\telse {\n \t\t\t\ttempstr[4] = str(calendar.get(Calendar.MINUTE));\n \t\t\t}\n \t\t\tif(calendar.get(Calendar.SECOND) < 10) {\n \t\t\t\ttempstr[5] = \"0\" + str(calendar.get(Calendar.SECOND));\n \t\t\t}\n \t\t\telse {\n \t\t\t\ttempstr[5] = str(calendar.get(Calendar.SECOND));\n \t\t\t}\n \t\t\t\n \t\t\t//LightMaskClient.appendMainText(\"\\nGettings time\");\n \t\t\t//matTime[i] = calendar.getTimeInMillis();\n \t\t\t//LightMaskClient.appendMainText(\"\\nGot time\" + matTime[i]);\n \n \t\t\t//timestamps[i] = tempstr[3] + \":\" + tempstr[4] + \":\" + tempstr[5] + \" \" + tempstr[1] + \"/\" + tempstr[2] + \"/\" + tempstr[0];\n \t\t\ttimestamps[i] = tempstr[1] + \"/\" + tempstr[2] + \"/\" + tempstr[0] + \" \" + tempstr[3] + \":\" + tempstr[4] + \":\" + tempstr[5];\n \t\t\t//LightMaskClient.appendMainText(\"\\n\" + timestamps[i]);\n \t\t\tcalendar.add(Calendar.SECOND, period);\n \t\t}\n \t}",
"private String unixToHHMMSS(String unixTime){\r\n\t\tlong unixSeconds = Long.parseLong(unixTime);\r\n\t\tDate date = new Date(unixSeconds*1000L); // convert seconds to milliseconds\r\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"HH:mm:ss\"); // date format\r\n\r\n\t\tString formattedDate = sdf.format(date);\r\n\t\treturn formattedDate;\r\n\t}",
"static String timeConversion(String s) {\n /*\n * Write your code here.\n */\n String res = \"\";\n String hrs = s.substring(0, 2);\n String min = s.substring(3, 5);\n String sec = s.substring(6, 8);\n String ampm = s.substring(8);\n int hr = Integer.parseInt(hrs);\n if((ampm.equalsIgnoreCase(\"PM\")) && (hr != 12)) {\n hr += 12;\n if(hr >= 24) {\n hr = 24 - hr;\n }\n }\n else if(ampm.equalsIgnoreCase(\"AM\")) {\n if(hr == 12) {\n hr = 0;\n }\n }\n if(hr < 10) {\n res = res + \"0\" + Integer.toString(hr);\n }\n else {\n res += Integer.toString(hr);\n }\n res = res +\":\" +min +\":\" + sec;\n return res;\n }",
"public String getGUIDateFormat();",
"public static Date fotmatDate21(String myDate) {\n\t\tDate dDate = new SimpleDateFormat(\"HH:mm:ss\").parse(myDate,\r\n\t\t\t\tnew ParsePosition(0));\r\n\t\treturn dDate;\r\n\t}",
"public static long dateToTime(String s) {\n\t\tSimpleDateFormat simpledateformat = new SimpleDateFormat(\"yyyyMMddHHmmss\");\n\t\tlong l;\n\t\ttry {\n\t\t\tl = simpledateformat.parse(s).getTime();\n\t\t} catch (ParseException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tl = System.currentTimeMillis();\n\t\t}\n\n\t\treturn l;\n\n\t}",
"String timeStamp() {\n\n\t\tCalendar now = Calendar.getInstance();\n\n\t\t String y = String.valueOf(now.get(now.YEAR));\n\t\t String mo = String.valueOf(now.get(now.MONTH)+1);\n\t\t String d = String.valueOf(now.get(now.DAY_OF_MONTH));\n\t\t String h = String.valueOf(now.get(now.HOUR_OF_DAY));\n\t\t String m = String.valueOf(now.get(now.MINUTE));\n\t\t String s = String.valueOf(now.get(now.SECOND));\n\t\t String ms = String.valueOf(now.get(now.MILLISECOND));\n\n\n\t return h + m + s + ms;\n\n\n\n }",
"@Test public void Time_len_6()\t\t\t\t\t\t\t\t\t{tst_time_(\"041526\"\t\t\t\t\t, \"04:15:26.000\");}",
"protected static String expandTimeString(String time) {\n StringBuilder expandedTime = new StringBuilder(13);\n\n expandedTime.append(\"000000\");\n\n switch (time.length()) {\n case 4:\n expandedTime.insert(0, '2').append(time).append(\"00\");\n break;\n case 5:\n expandedTime.insert(0, time.substring(0, 1)).append(time.substring(1)).append(\"00\");\n break;\n case 6:\n expandedTime.insert(0, '2').append(time);\n break;\n case 7:\n expandedTime.insert(0, time.substring(0, 1)).append(time.substring(1));\n break;\n default:\n throw new IllegalArgumentException(\"Given VDEW encoded Time-String must have between 4 to 7 characters, but we got \" + time.length() + \" characters being '\" + time + \"'\");\n }\n\n return expandDateTimeString(expandedTime.toString());\n }",
"java.lang.String getServerTime();",
"Date getLastTime();",
"long getCreationTimeUtc(String path) throws IOException;",
"public static String longToHHMM(long longTime)\r\n/* 150: */ {\r\n/* 151:219 */ SimpleDateFormat formatter = new SimpleDateFormat(\"HH:mm\");\r\n/* 152:220 */ Date strtodate = new Date(longTime);\r\n/* 153:221 */ return formatter.format(strtodate);\r\n/* 154: */ }",
"OffsetDateTime timeCreated();",
"long getDate();",
"private static String formatTime(String time) {\n\t\treturn String.format(\"%s:%s\", time.substring(0, 2), time.substring(2));\n\t}",
"private String dateFormat(String date) {\n SimpleDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'\", Locale.ENGLISH);\n df.setTimeZone(TimeZone.getTimeZone(\"UTC\"));\n Date serverDate = null;\n String formattedDate = null;\n try {\n serverDate = df.parse(date);\n SimpleDateFormat outputFormat = new SimpleDateFormat(\"MMM dd yyyy, hh:mm\");\n\n outputFormat.setTimeZone(TimeZone.getDefault());\n\n formattedDate = outputFormat.format(serverDate);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n return formattedDate;\n }",
"public static String formatDateTime(String date) {\n\t\tif(date == null) return \"\";\n\t\tdate = date.trim();\n\t\tif(date.equals(\" \")) return \"\";\n\t\tif (date.length() == 0 || date.length() != 14) return date;\n\t\tdate = date.substring(0,4) + \"/\" + date.substring(4,6) \n\t\t\t\t+ \"/\" + date.substring(6,8)\n\t\t\t\t+\" \"+date.substring(8,10)\n\t\t\t\t+\":\"+date.substring(10,12)\n\t\t\t\t+\":\"+date.substring(12,14);\n\t\treturn date;\n\t}",
"java.lang.String getTime();",
"private static String timeFor(Date date)\n\t{\n\t\tDateFormat df = new InternetDateFormat();\n\t\tString theTime = df.format(date);\n\t\treturn theTime;\n\t}",
"public static String getSystemDate()\n {\n\t DateFormat dateFormat= new SimpleDateFormat(\"_ddMMyyyy_HHmmss\");\n\t Date date = new Date();\n\t return dateFormat.format(date);\n }",
"private String generateWindowsFriendlyDate(String date) {\n\t\t\n\t\treturn date.replaceAll(\"(\\\\:)+\", \"-\");\n\t\t\n\t}",
"public static String formatTime(String userTime, String date) {\r\n\r\n\t\t\tint n = Integer.parseInt(userTime.substring(0, 2)) + 5;\r\n\r\n\t\t\tswitch (n) {\r\n\r\n\t\t\tcase 24:\r\n\t\t\t\tn = 0;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 25:\r\n\t\t\t\tn = 1;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 26:\r\n\t\t\t\tn = 2;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 27:\r\n\t\t\t\tn = 3;\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t}\r\n\r\n\t\t\t// extracting hour\r\n\t\t\tString hourChange = String.valueOf(n);\r\n\r\n\t\t\tStringBuilder time = new StringBuilder(userTime);\r\n\r\n\t\t\tif (hourChange.length() == 1) {\r\n\r\n\t\t\t\ttime.replace(0, 2, \"0\" + hourChange);\r\n\r\n\t\t\t} else {\r\n\r\n\t\t\t\ttime.replace(0, 2, hourChange);\r\n\r\n\t\t\t}\r\n\r\n\t\t\tString formattedString = date + \" \" + time + \":00\";\r\n\r\n\t\t\treturn formattedString;\r\n\r\n\t\t}",
"public static void main(String[] args)\r\n/* 96: */ {\r\n/* 97:104 */ SimpleDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n/* 98:105 */ String qiandaotime = df.format(new Date());\r\n/* 99:106 */ System.out.println(qiandaotime);\r\n/* 100: */ }",
"long getTime();",
"long getTime();",
"long getTime();",
"long getTime();",
"long getTime();",
"long getTime();",
"long getTime();",
"long getTime();",
"long getTime();",
"long getTime();",
"long getTime();",
"long getTime();",
"private String getDate() {\n\t\tSimpleDateFormat parseFormat = new SimpleDateFormat(\"hh:mm a\");\n\t\tDate date = new Date();\n\t\tString s = parseFormat.format(date);\n\t\treturn s;\n\t}",
"public String convertCalendarMillisecondsAsLongToDate(long fingerprint) {\n\t\t\t\tDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd\"); // not \"yyyy-MM-dd HH:mm:ss\"\n\t\t\t\tDate date = new Date(fingerprint);\n\t\t\t\treturn format.format(date);\n\t\t\t}",
"long getCreateTime();",
"long getCreateTime();",
"private static String formatDate(long date) {\n Date systemDate = new java.util.Date(date * 1000L);\n // the format of your date\n SimpleDateFormat sdf = new java.text.SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n // give a timezone reference for formatting (see comment at the bottom)\n sdf.setTimeZone(java.util.TimeZone.getTimeZone(\"GMT-4\"));\n String formattedDate = sdf.format(systemDate);\n return formattedDate;\n }",
"static String timeConversion(String s) {\n String[] timeSplit = s.split(\":\");\n String hours = timeSplit[0];\n String minutes = timeSplit[1];\n String seconds = timeSplit[2].substring(0, 2);\n String ampm = timeSplit[2].substring(2, 4);\n\n String newHours;\n if (ampm.equals(\"AM\")) {\n newHours = hours.equals(\"12\") ? \"00\" : hours;\n\n } else {\n newHours = hours.equals(\"12\") ? hours : String.valueOf(Integer.parseInt(hours) + 12);\n }\n\n return newHours + \":\" + minutes + \":\" + seconds;\n\n }",
"static String timeConversion(String s) {\n /*\n * Write your code here.\n */\n String conversion = \"\";\n String time = s.substring(s.length()-2,s.length());\n String hour = s.substring(0,2);\n if(time.equals(\"AM\")){\n if(Integer.parseInt(hour)==12){\n conversion = \"00\"+s.substring(2,s.length()-2);\n }\n else{\n conversion = s.substring(0,s.length()-2);\n }\n }else{\n if(Integer.parseInt(hour)==12){\n conversion = \"12\"+s.substring(2,s.length()-2);\n }\n else{\n conversion = (Integer.parseInt(hour)+12) + s.substring(2,s.length()-2);\n }\n }\n\n return conversion;\n }",
"private static String adjDate(String date) {\n TimeZone tz = TimeZone.getDefault();\n long dt = Long.valueOf(date) - tz.getRawOffset();\n return Long.toString(dt);\n }",
"private static String getTimeStamp()\r\n\t{\r\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd_HH.mm.ss\");\r\n\t\tDate date = new Date();\r\n\t\treturn dateFormat.format(date);\r\n\t}",
"private void normalGmtStringToMinutes() {\n int i = Integer.parseInt(gmtString.substring(4, 6));\n offsetMinutes = i * 60;\n i = Integer.parseInt(gmtString.substring(7));\n offsetMinutes += i;\n if (gmtString.charAt(3) == MINUS) {\n offsetMinutes *= -1;\n }\n }",
"int getCreateTime();",
"Date getAccessTime();",
"public static String Milisec2DDMMYYYY(long ts) {\n\t\tif (ts == 0) {\n\t\t\treturn \"\";\n\t\t} else {\n\t\t\tjava.util.Calendar calendar = java.util.Calendar.getInstance();\n\t\t\tcalendar.setTime(new java.util.Date(ts));\n\n\t\t\tString strTemp = Integer.toString(calendar\n\t\t\t\t\t.get(calendar.DAY_OF_MONTH));\n\t\t\tif (calendar.get(calendar.DAY_OF_MONTH) < 10) {\n\t\t\t\tstrTemp = \"0\" + strTemp;\n\t\t\t}\n\t\t\tif (calendar.get(calendar.MONTH) + 1 < 10) {\n\t\t\t\treturn strTemp + \"/0\" + (calendar.get(calendar.MONTH) + 1)\n\t\t\t\t\t\t+ \"/\" + calendar.get(calendar.YEAR);\n\t\t\t} else {\n\t\t\t\treturn strTemp + \"/\" + (calendar.get(calendar.MONTH) + 1) + \"/\"\n\t\t\t\t\t\t+ calendar.get(calendar.YEAR);\n\t\t\t}\n\t\t}\n\t}",
"String getTime(){\n\t\tCalendar c = Calendar.getInstance();\n int mseconds = c.get(Calendar.MILLISECOND);\n String currentDateandTime = mDateFormat.format(new Date()) + String.format(\"-%04d\", mseconds);\n \n return currentDateandTime;\n\t}",
"public String getLastAccessTime(String pattern) {\n\t\treturn new SimpleDateFormat(pattern).format(this.lastAccesTime);\n\t}",
"public static String TimeFormate() {\n\t\tString time;\n\t\tSimpleDateFormat dateFormat1 = new SimpleDateFormat();\n\t dateFormat1.setTimeZone(TimeZone.getTimeZone(\"US/Eastern\"));\n\t Calendar cal = Calendar.getInstance();\n\t cal.add(Calendar.MINUTE, 3);\n String n=dateFormat1.format(cal.getTime());\n //n=\"03/09/20 8:30 AM\";\n System.out.println(\"Full Date = \" +n);\n int colonindex=n.indexOf(\":\");\n //System.out.println(\": placed= \" +colonindex);\n //String tt =n.substring(colonindex, n.length());\n //System.out.println(\"tt= \" +tt);\n String tt1 =n.substring(colonindex-2,colonindex-1);\n System.out.println(\"tt1= \" +tt1);\n if(tt1.equals(\"1\")) {\n \t time=n.substring(colonindex-2, n.length());\n \t System.out.println(\"Time with two digits in hours= \" +time);\n }\n else {\n \t time=n.substring(colonindex-1, n.length());\n \t System.out.println(\"Time with one digit in hours= \" +time);\n }\n return time;\n\t}",
"public static Date convert_string_time_into_original_time(String hhmmaa) {\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"HH:mm aa\");\n Date convertedDate = new Date();\n try {\n convertedDate = dateFormat.parse(hhmmaa);\n } catch (ParseException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n return convertedDate;\n }",
"Date getLastAccessDate();",
"private static String getTime() {\n\t\tDate getDate = new Date();\n\t\tString timeFormat = \"M/d/yy hh:mma\";\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(timeFormat);\n\t\treturn \"[\" + sdf.format(getDate) + \"]\\t\";\n\t}",
"String getDate();",
"String getDate();",
"private String getDateTime() {\n SimpleDateFormat sdf = new SimpleDateFormat(\"[yyyy/MM/dd - HH:mm:ss]\");\n return sdf.format(new Date());\n }",
"private String getDateTime() {\n SimpleDateFormat sdf = new SimpleDateFormat(\"[yyyy/MM/dd - HH:mm:ss]\");\n return sdf.format(new Date());\n }",
"public static void main(String[] args) {\n\n\t\t SimpleDateFormat sf = new SimpleDateFormat(\"yyyyMMddHHmmssSSS\");\n\t\t// for(int i=0; i<100; i++) {\n\t\t// String strDT = sf.format(new Date(System.currentTimeMillis()));\n\t\t// System.out.println(strDT);\n\t\t// }\n\n\t\t\n\t\tDate oldDate = new Date();\n\t\tCalendar gcal = new GregorianCalendar();\n\t\tgcal.setTime(oldDate);\n\t\tgcal.add(Calendar.SECOND, -4468);\n\t\tDate newDate = gcal.getTime();\n\t\tSystem.out.println(sf.format(oldDate));\n\t\tSystem.out.println(sf.format(newDate));\n\t}",
"public long getDate()\r\n/* 204: */ {\r\n/* 205:309 */ return getFirstDate(\"Date\");\r\n/* 206: */ }",
"int getTime();"
] | [
"0.62637734",
"0.61141455",
"0.60237485",
"0.59653777",
"0.5816725",
"0.5798482",
"0.5793589",
"0.57262295",
"0.5720181",
"0.5717072",
"0.5661619",
"0.56386393",
"0.5586041",
"0.5585001",
"0.5581864",
"0.5573301",
"0.55695146",
"0.55570847",
"0.5520643",
"0.55187595",
"0.549297",
"0.5489735",
"0.54785216",
"0.54599386",
"0.5455758",
"0.5421935",
"0.53983754",
"0.537105",
"0.53697044",
"0.53677523",
"0.5355177",
"0.53463656",
"0.534481",
"0.5325556",
"0.526432",
"0.5261653",
"0.525934",
"0.5247506",
"0.5243072",
"0.52298844",
"0.5229366",
"0.52187616",
"0.5218236",
"0.5211364",
"0.5210265",
"0.52097774",
"0.5178014",
"0.5172798",
"0.5170049",
"0.5162763",
"0.51618886",
"0.51611966",
"0.5156094",
"0.51548296",
"0.5154354",
"0.5153588",
"0.5142979",
"0.51410073",
"0.513071",
"0.5130401",
"0.5124347",
"0.5123878",
"0.51211137",
"0.51199293",
"0.51199293",
"0.51199293",
"0.51199293",
"0.51199293",
"0.51199293",
"0.51199293",
"0.51199293",
"0.51199293",
"0.51199293",
"0.51199293",
"0.51199293",
"0.5119443",
"0.5117388",
"0.5117244",
"0.5117244",
"0.5113368",
"0.50978655",
"0.5097093",
"0.50945735",
"0.509298",
"0.50917935",
"0.5085648",
"0.5069125",
"0.5065408",
"0.50627327",
"0.5059606",
"0.50581664",
"0.50558907",
"0.5050689",
"0.5041845",
"0.5038524",
"0.5038524",
"0.5030601",
"0.5030601",
"0.5019015",
"0.50186133",
"0.5006543"
] | 0.0 | -1 |
Creates a target for a thread given its name and its sleep time | public ThreadNameWithRunnable(String name, int n) {
// Give a name to the thread
t = new Thread(this, name);
// sleepTime
sleepTime = n;
// Start the thread
t.start();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n protected Thread createThread(final Runnable runnable, final String name) {\n return new Thread(runnable, Thread.currentThread().getName() + \"-exec\");\n }",
"private VirtualThread createThread(String threadName) {\n\t\tJavaObjectReference threadObj = new JavaObjectReference(new LazyClassfile(\"java/lang/Thread\"));\n\t\t\n\t\t// TODO: We should invoke constructors here...\n\t\tthreadObj.setValueOfField(\"priority\", new JavaInteger(1));\n\t\tthreadObj.setValueOfField(\"name\", JavaArray.str2char(vm,threadName));\n\t\tthreadObj.setValueOfField(\"group\", new JavaObjectReference(bcl.load(\"java/lang/ThreadGroup\")));\n\t\t\n\t\tmainThread = new VirtualThread(vm, rda, threadName, threadObj);\n\t\tthreadAreas.add(mainThread);\n\t\treturn mainThread;\n\t}",
"NewThread (String threadname) {\r\n name = threadname;\r\n t = new Thread(this, name); // Constructor de un nuevo thread\r\n System.out.println(\"Nuevo hilo: \" +t);\r\n t.start(); // Aquí comienza el hilo\r\n }",
"private Thread createThreadFor(Agent ag) {\n ProcessData data = getDataFor(ag);\n\n data.thread = new Thread(threadGroup, ag);\n data.thread.setPriority(THREAD_PRIORITY);\n\n return data.thread;\n }",
"@Override\n\t\t\tpublic Thread newThread(final Runnable r) {\n\t\t\t\tint id = threadNumber.getAndIncrement();\n\t\t\t\tString threadName = leftPad(String.valueOf(id), 2, \"0\");\n\t\t\t\tThread th = new Thread(r);\n\t\t\t\tth.setName(threadName);\n\t\t\t\tth.setDaemon(false);\n\t\t\t\treturn th;\n\t\t\t}",
"ThreadStart createThreadStart();",
"public void createThread() {\n }",
"public Thread getThread(int type, String name, Runnable r);",
"@Override\n\tpublic Thread newThread(Runnable r) {\n\t\t\n\t\tThread th = new Thread(r,\" custum Thread\");\n\t\treturn th;\n\t}",
"public IThread createThread() throws IllegalWriteException, BBException;",
"public NamedThreadFactory(String name)\n {\n this(name, null);\n }",
"@Override\n // Thread creation\n // Run method from the Runnable class.\n public void run() {\n p.println(\"Current thread = \" + Thread.currentThread().getName());\n // Shows when a task is being executed concurrently with another thread,\n // then puts the thread to bed (I like saying that)\n try {\n p.println(\"Doing a task during : \" + name);\n Thread.currentThread().sleep(time);\n }\n // Exception for when a thread is interrupted.\n catch (InterruptedException e) {\n e.printStackTrace();\n }\n }",
"public JavaHandlerThread(String name) {\n mThread = new HandlerThread(name);\n }",
"public MetaAgent(String name)\n {\n this.name = name;\n Thread td = new Thread(new Runnable()\n {\n @Override\n public void run()\n {\n while (true)\n {\n try\n {\n msgHandler(take());\n } catch (InterruptedException e)\n {\n e.printStackTrace();\n System.out.println(\"Probably not possible to get this error.\");\n }\n }\n }\n });\n td.start();\n }",
"public TaskThread(ThreadPool threadPool, String tName) {\n super(threadPool.getThreadGroup(), \"Task: Idle\");\n this.threadPool = threadPool;\n this.threadName = tName;\n threadId = ThreadPool.getUniqueThreadId();\n\n System.out.println(\"threadId Created:\" + threadId);\n }",
"public Thread addPerson(int sourceFloor, int destinationFloor) {\r\n\r\n /**\r\n * Important to add code here to make a\r\n * new thread that runs your person-runnable\r\n * \r\n * Also return the Thread object for your person\r\n * so that it can be reaped in the testSuite\r\n * (you don't have to join() yourself)\r\n */\r\n\r\n Thread thread = new Thread(new Person(sourceFloor, destinationFloor));\r\n thread.start();\r\n\r\n incrementNumberOfPeopleWaitingAtFloor(sourceFloor);\r\n \r\n\r\n return thread;\r\n }",
"public static void runNewDaemon(String name, Runnable r) {\n\t\tThread t = new Thread(r);\n\t\tif(!name.isEmpty()) {\n\t\t\tt.setName(name);\n\t\t\tlog.debug(\"Launching Thread \\\"\" +name+ \"\\\"\");\n\t\t}\n\t\tt.setDaemon(true);\n\t\tt.start();\n\t}",
"@Override\r\n public Thread newThread(Runnable r) {\n Thread t = new Thread(r, \"example-runner\");\r\n t.setDaemon(true);\r\n return t;\r\n }",
"public Wait(WaitTarget target)\r\n\t{\r\n\t\tthis.target = target;\r\n\t}",
"public MummyThread(String name, int resId) {\r\n this.name = name;\r\n this.resId = resId;\r\n this.shutdown = false;\r\n }",
"public void createSession(final String targetName) throws Exception;",
"default CompletableFuture<ServerThreadChannel> createThread(ChannelType channelType, String name,\n AutoArchiveDuration autoArchiveDuration) {\n return createThread(channelType, name, autoArchiveDuration.asInt(), null);\n }",
"default CompletableFuture<ServerThreadChannel> createThread(ChannelType channelType, String name,\n Integer autoArchiveDuration) {\n return createThread(channelType, name, autoArchiveDuration, null);\n }",
"public static final SourceModel.Expr thread_sleep(SourceModel.Expr arg_1) {\n\t\t\treturn \n\t\t\t\tSourceModel.Expr.Application.make(\n\t\t\t\t\tnew SourceModel.Expr[] {SourceModel.Expr.Var.make(Functions.thread_sleep), arg_1});\n\t\t}",
"default CompletableFuture<ServerThreadChannel> createThread(ChannelType channelType, String name,\n AutoArchiveDuration autoArchiveDuration,\n Boolean inviteable) {\n return createThread(channelType, name, autoArchiveDuration.asInt(), inviteable);\n }",
"Target target();",
"private void YeWuMethod(String name) {\n\n for (int j = 0; j < 10; j++) {\n\n\n// Runnable task = new RunnableTask();\n// Runnable ttlRunnable = TtlRunnable.get(task);\n\n// executor.execute(ttlRunnable);\n\n executor.execute(() -> {\n System.out.println(\"==========\"+name+\"===\"+threadLocal.get());\n });\n }\n\n// for (int i = 0; i < 10; i++) {\n// new Thread(() -> {\n// System.out.println(name+\"===\"+threadLocal.get());\n// }, \"input thread name\").start();\n// }\n\n\n\n\n }",
"public static void main(String[] args) {\n Thread thread = new Thread(\"New Thread\") {\n public void run(){\n System.out.println(\"run by: \" + getName());\n }\n };\n\n thread.start();\n System.out.println(thread.getName());\n\n }",
"default CompletableFuture<ServerThreadChannel> createThread(ChannelType channelType, String name,\n Integer autoArchiveDuration,\n Boolean inviteable) {\n return new ServerThreadChannelBuilder(this, channelType, name)\n .setAutoArchiveDuration(autoArchiveDuration)\n .setInvitableFlag(inviteable).create();\n }",
"public ProducerThread(String name) {\n super(name);\n }",
"default CompletableFuture<ServerThreadChannel> createThreadForMessage(Message message, String name,\n Integer autoArchiveDuration) {\n return new ServerThreadChannelBuilder(message, name).setAutoArchiveDuration(autoArchiveDuration).create();\n }",
"public AgentThreadFactory(String agentName)\n {\n this.agentName = agentName;\n }",
"@Test\n @DisplayName(\"Plain Runnable\")\n void testRunnable() {\n Runnable task = this::printThreadName;\n\n task.run();\n\n Thread thread = new Thread(task);\n thread.start();\n\n System.out.println(\"Done!\");\n }",
"public Task(String name, int number) {\r\n this.name = name;\r\n this.id = number;\r\n this.timer = new Timer();\r\n }",
"public ThreadTest(String testName) {\n\n super(testName);\n\n logger = LogManager.getLogger(testName);//T1.class.getName()\n\n }",
"public static void main(String[] args) {\n CreateRunnable createRunnable = new CreateRunnable();\n Thread thread = new Thread(createRunnable);\n thread.start();\n }",
"public SimulatorThreadGroup(String name) {\n\t\tsuper(name);\n\t}",
"public static Thread newThread(String name, Runnable runnable, boolean daemon) {\n Thread thread = new Thread(runnable, name);\n thread.setDaemon(daemon);\n thread.setUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {\n public void uncaughtException(Thread t, Throwable e) {\n LOG.error(\"Uncaught exception in thread '\" + t.getName() + \"':\", e);\n }\n });\n return thread;\n }",
"default CompletableFuture<ServerThreadChannel> createThreadForMessage(Message message, String name,\n AutoArchiveDuration autoArchiveDuration) {\n return createThreadForMessage(message, name, autoArchiveDuration.asInt());\n }",
"public void setThreadName(String name) {\n threadName = name;\n }",
"public void randomSleep(String name, String surname) throws InterruptedException {\n\t\tlong randomSleepDuration = (long) (500 + Math.random() * 700);\r\n\t\tSystem.out.printf(name+\" Sleeping for %d ms ..\\n\", randomSleepDuration);\r\n\t\tThread.sleep(randomSleepDuration);\r\n\t\t}",
"private TargetElement getAsTarget(String name) {\n TargetElement element = mock(TargetElement.class);\n when(element.getName()).thenReturn(name);\n return element;\n }",
"public Task(String name) {\n\t\tthis.name=name;\n\t}",
"private static void createThreadUsingAnonymousInnerClass() {\n\t\tRunnable rn = new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tSystem.out.println(\"My Anonymous Inner Class thread is executed.\");\n\t\t\t}\n\t\t};\n\n\t\tThread th = new Thread(rn);\n\t\tth.start();\n\t}",
"public void addTarget(Target target) {\n SocketChannel socketChannel = null;\n try {\n socketChannel = SocketChannel.open();\n socketChannel.configureBlocking(false);\n socketChannel.connect(target.address);\n target.socketChannel = socketChannel;\n target.connectStart = System.currentTimeMillis();\n synchronized (targets) {\n targets.add(target);\n }\n selector.wakeup();\n } catch (IOException e) {\n// e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.\n if (socketChannel != null) {\n try {\n socketChannel.close();\n } catch (IOException e1) {\n e1.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.\n }\n }\n target.failure = e;\n addFinishedTarget(target);\n }\n\n }",
"private static void ThreadCreationOldWay() {\r\n\t\tThread t1 = new Thread(new Runnable() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\tSystem.out.println(\"This is a runnable method done in old fashion < 1.8\");\r\n\t\t\t}\r\n\t\t});\r\n\t\tt1.start();\r\n\t}",
"public static UUID createForGivenTimeAndRand(long targetTimeTenthOfMicros,\n Random rand) {\n long nodeAndClock = createRandNodeAndClock(rand);\n return new UUID(createTime(targetTimeTenthOfMicros), nodeAndClock);\n }",
"public SimulatorThreadGroup(ThreadGroup parent, String name) {\n\t\tsuper(parent, name);\n\t}",
"public Task(String name) {\r\n this(name, false);\r\n }",
"public static void main(String[] args) {\n\t\tMyThread mt = new MyThread();\n\t\t// We can assign a name\n\t\tmt.setName(\"Thread 1\");\n\t\tmt.start();\n\t\t\n\t\tMyThreads2 mt2 = new MyThreads2();\n\t\tThread t = new Thread(mt2);\n\t\t\n\t\t//New Thread\n\t\tThread t2 = new Thread(mt2);\n\t\tThread t3 = new Thread(mt2); \n\t\tt.setName(\"Thread 2\");\n\t\tt2.setName(\"Thread 3\");\n\t\tt3.setName(\"Thread 4\");\n\t\tt.start();\n\t\tt2.start();\n\t\tt3.start();\n\t\t\n\t}",
"TargetChain createTargetChain();",
"private Target findTargetByName(String targetName, String environment) {\n if (targetName == null || targetName.isEmpty()) {\n return NO_TARGET;\n }\n\n Target target = environmentRepository.getAndValidateServer(targetName, environment);\n\n Optional<NetworkDescription> networkDescription = currentNetworkDescription.findCurrent();\n if (networkDescription.isPresent() && networkDescription.get().localAgent().isPresent()) {\n final Agent localAgent = networkDescription.get().localAgent().get();\n List<Agent> agents = localAgent.findFellowAgentForReaching(target.id);\n return Target.builder()\n .copyOf(target)\n .withAgents(agents.stream().map(a -> a.agentInfo).collect(Collectors.toList()))\n .build();\n }\n return target;\n }",
"public Task(String name) {\n this.name = name;\n this.isDone = false;\n }",
"public Builder setTargetName(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n targetName_ = value;\n onChanged();\n return this;\n }",
"public void addTestMs(String name, Throwing.Runnable toTest) {\n\t\taddTest(name, toTest, LapTimer.createMs());\n\t}",
"@Returns(\"targetId\")\n String createTarget(\n @ParamName(\"url\") String url,\n @Optional @ParamName(\"width\") Integer width,\n @Optional @ParamName(\"height\") Integer height,\n @Optional @ParamName(\"browserContextId\") String browserContextId,\n @Experimental @Optional @ParamName(\"enableBeginFrameControl\") Boolean enableBeginFrameControl,\n @Optional @ParamName(\"newWindow\") Boolean newWindow,\n @Optional @ParamName(\"background\") Boolean background);",
"public BusyThread(String name, double load, long duration) {\n\t\tsuper(name);\n\t\tthis.load = load;\n\t\tthis.duration = duration;\n\t}",
"public Task makeTask() {\n Task new_task = new Task();\n new_task.setAction(this);\n new_task.setDeadline(\n new Date(System.currentTimeMillis() + deadlineSeconds() * 1000L));\n\n return new_task;\n }",
"TestTarget createTestTarget();",
"public void setTargetName(String targetName) {\r\n this.targetName = targetName;\r\n }",
"@Returns(\"targetId\")\n String createTarget(@ParamName(\"url\") String url);",
"private static Target getTarget(final Context context, final String url, final String title){\n Target target = new Target(){\n\n @Override\n public void onBitmapLoaded(final Bitmap bitmap, Picasso.LoadedFrom from) {\n new Thread(new Runnable() {\n\n @Override\n public void run() {\n\n String path = \"TigerSpike Gallery/\";\n File dir = new File(Environment.getExternalStorageDirectory(),path);\n\n if(!dir.exists()){\n dir.mkdir();\n }\n\n File file = new File(dir,title+\".jpg\");\n\n try {\n file.createNewFile();\n FileOutputStream oStream = new FileOutputStream(file);\n bitmap.compress(Bitmap.CompressFormat.JPEG, 100, oStream);\n oStream.flush();\n oStream.close();\n galleryAddPic(file, context);\n\n if(checkEmail){\n sendImageViaEmail(context,file);\n }\n\n } catch (IOException e) {\n Log.e(\"IOException\", e.getLocalizedMessage());\n }\n }\n }).start();\n\n }\n\n @Override\n public void onBitmapFailed(Drawable errorDrawable) {\n\n }\n\n @Override\n public void onPrepareLoad(Drawable placeHolderDrawable) {\n\n }\n };\n return target;\n }",
"public Sleep() {\n\n\t}",
"private Thread startTestThread(Runnable runnable) {\n Thread t = new Thread(runnable);\n t.setDaemon(true);\n return t;\n }",
"public SleepTest()\n {\n getLogger().debug(whoAmI() + \"\\tConstruct\");\n }",
"public TaskThread(ThreadPool threadPool) {\n super(threadPool.getThreadGroup(), \"Task: Idle\");\n this.threadPool = threadPool;\n threadId = ThreadPool.getUniqueThreadId();\n System.out.println(\"threadId Created:\" + threadId);\n }",
"public static ThreadPoolTaskScheduler createThreadPoolTaskScheduler(\r\n\t\t\tint poolSize, \r\n\t\t\tFrequency frequency, String name){\r\n\t\treturn new ThreadPoolTaskScheduler(poolSize, frequency, name, null);\r\n\t}",
"Task createTask();",
"Task createTask();",
"Task createTask();",
"protected EventExecutor newChild(ThreadFactory threadFactory, Object... args) throws Exception {\n/* 57 */ return (EventExecutor)new LocalEventLoop(this, threadFactory);\n/* */ }",
"public void setTargetName(String targetName) {\n this.targetName = targetName;\n }",
"public static void main(String[] args) {\n\t\tThread t1 = Thread.currentThread();\n\t\t\n\t\t// Get the thread group of the main thread \n\t\tThreadGroup tg1 = t1.getThreadGroup();\n\t\t\n\t\tSystem.out.println(\"Current thread's name: \" + t1.getName());\n\t\tSystem.out.println(\"Current thread's group name: \" + tg1.getName());\n\t\t\n\t\t// Creates a new thread. Its thread group is the same that of the main thread.\n\t\tThread t2 = new Thread(\"my new thread\");\n\n\t\tThreadGroup tg2 = t2.getThreadGroup();\n\t\tSystem.out.println(\"New thread's name: \" + t2.getName());\n\t\tSystem.out.println(\"New thread's group name: \" + tg2.getName());\n\t}",
"RakudoObject instance_of(ThreadContext tc, RakudoObject what);",
"NetThread(){}",
"Task(String name) {\n this.name = name;\n }",
"public static Action spawn(final Class<?> e) {\n return new Action() {\n @Override\n protected void perform(ActiveActor a) {\n if(a.isFacingValidLocation() && a.getFacing() == null) {\n if(a.energy >= getCost()) {\n try {\n Actor b = (Actor) e.newInstance();\n b.putSelfInGrid(a.getGrid(), a.getLocation().getAdjacentLocation(a.getDirection()));\n } catch(InstantiationException r) {\n r.printStackTrace();\n } catch(IllegalAccessException r) {\n r.printStackTrace();\n }\n a.energy = a.energy - 400;\n }\n }\n }\n\n @Override\n public int getCost() {\n return 400;\n }\n\n @Override\n public boolean isExclusive() {\n return true;\n }\n\n @Override\n public Object getData() {\n return e;\n }\n\n @Override\n public String toString() {\n return \"Spawn(\" + (e != null ? e.toString() : \"null\") + \")\";\n }\n };\n }",
"void start() {\n\tsleepThread = new Thread(this);\n\tsleepThread.start();\n }",
"public static void main(String[] args) {\n Thread t = Thread.currentThread();\n\n // getting name of Main thread\n System.out.println(\"Current thread: \" + t.getName());\n\n // changing the name of Main thread\n t.setName(\"Geeks\");\n System.out.println(\"After name change: \" + t.getName());\n\n // getting priority of Main thread\n System.out.println(\"Main thread priority: \" + t.getPriority());\n\n // setting priority of Main thread to MAX(10)\n t.setPriority(MAX_PRIORITY);\n\n System.out.println(\"Main thread new priority: \" + t.getPriority());\n\n\n for (int i = 0; i < 5; i++) {\n System.out.println(\"Main thread\");\n }\n\n // Main thread creating a child thread\n ChildThread ct = new ChildThread();\n\n // getting priority of child thread\n // which will be inherited from Main thread\n // as it is created by Main thread\n System.out.println(\"Child thread priority: \" + ct.getPriority());\n\n // setting priority of Main thread to MIN(1)\n ct.setPriority(MIN_PRIORITY);\n\n System.out.println(\"Child thread new priority: \" + ct.getPriority());\n\n // starting child thread\n ct.start();\n }",
"private void startSleeper() {\n if (fSleeper == null)\n fSleeper = new SleeperThread(this);\n fSleeper.start();\n }",
"@Override\r\n\tpublic Thread newThread(Runnable arg0) {\n\t\treturn null;\r\n\t}",
"private void sleepFor(long t) {\n\t\ttry {\n\t\t\tThread.sleep(t);\n\t\t} catch (InterruptedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"static final Object createAttachedThread0X(Object groupObj, String name,\n Object vmdata, int daemon)\n throws ClassCastException\n {\n if (mainVMThread == null || ThreadGroup.root == null) /* hack */\n throw new InternalError(\"VMThread class not initialized\");\n Thread thread = new Thread((VMThread) null, name, Thread.NORM_PRIORITY,\n daemon != 0);\n (thread.group = groupObj != null ? (ThreadGroup) groupObj :\n ThreadGroup.root).addThread(thread);\n VMThread vt = new VMThread(thread);\n vt.vmdata = vmdata;\n vt.threadStatus = STATE_RUNNABLE;\n vt.attachInner();\n return thread;\n }",
"public static void main(String[] args) throws Exception {\n\r\n\t\tThread t1=new Thread(new Hii());\r\n\t\tThread t2=new Thread(new Helloo());\r\n\t\t\r\n\t\tSystem.out.println(Thread.currentThread().getName());\r\n\t\tSystem.out.println(t1.getName());\r\n\t\tSystem.out.println(t2.getName());\r\n\t\t\r\n\t\tSystem.out.println(\"----------------------------\");\r\n\t\t\r\n\t\tt1.setName(\"Hii Thread\");\r\n\t\tt2.setName(\"Helloo Thread\");\r\n\t\t\r\n\t\tSystem.out.println(Thread.currentThread().getName());\r\n\t\tSystem.out.println(t1.getName());\r\n\t\tSystem.out.println(t2.getName());\r\n\t\t\r\n\t\tSystem.out.println(\"----------------------------\");\r\n\t\t\r\n\t\tt1.start();\r\n\t\ttry {\r\n\t\t\tThread.currentThread().sleep(10);\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tt2.start();\r\n\t\t\r\n\t\tSystem.out.println(\"t1 is alive ? \"+ t1.isAlive());\r\n\t\tt1.join();\r\n\t\tt2.join();\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(\"t1 is alive ? \"+ t1.isAlive());\r\n\t\tSystem.out.println(\"Bye ....\");\r\n\t}",
"public static void main(String[] args) {\n\t\tMyThread thread = new MyThread();\r\n\t\tthread.setName(\"MyThread\");\r\n\t\tThread t1 = new Thread(thread);\r\n\t\tSystem.out.println(\"begin=\" + System.currentTimeMillis());\r\n\t\tt1.setName(\"T1\");\r\n\t\tt1.start();\r\n\t\tSystem.out.println(\"end=\" + System.currentTimeMillis());\r\n\t}",
"public void setThread(Thread t);",
"public ThreadPoolExecutor create_blocking_thread_pool( String name, int threads, int queue_size )\n {\n NamedThreadPoolExecutor ret = new NamedThreadPoolExecutor( name, queue_size, threads, threads, 60, TimeUnit.MINUTES);\n \n pool_list.add( ret );\n\n return ret;\n }",
"public Thread getThread();",
"public Task(String name, String color){\n this.name = name;\n this.color = color;\n }",
"public Task(DateTime deadline, String name, int priority) {\r\n\t\tthis.deadline = deadline;\r\n\t\tthis.name = name;\r\n\t\tthis.priority = priority;\r\n\t\tstart = new DateTime();\r\n\t}",
"@Test\n @DisplayName(\"Scheduled Future\")\n void testScheduledFuture() throws InterruptedException {\n ScheduledExecutorService executor = Executors.newScheduledThreadPool(1);\n ScheduledFuture<String> future = executor.schedule(this::getThreadName, 3, TimeUnit.SECONDS);\n\n TimeUnit.MILLISECONDS.sleep(1337);\n long remainingTime = future.getDelay(TimeUnit.MILLISECONDS);\n\n assertThat(remainingTime).isBetween(1650L, 1670L);\n }",
"void setTarget(java.lang.String target);",
"private Sleep(Duration duration) {\n this.duration = duration;\n }",
"protected Thread createPlayerThread()\n\t{\n\t\treturn new Thread(this, \"Audio player thread\");\t\n\t}",
"private void createThreadUdp(){\n System.out.println(\"dirport: \"+serverDirPort);\n System.out.println(\"udpPort: \"+myUdpPort);\n System.out.println(\"tcpPort: \"+myTcpPort);\n threadHeartbeat=new ThSendHeartBeat(myAddress,serverDirPort,myHeartServer);\n threadHeartbeat.start();\n\n }",
"@Override\n public String getName() {\n return \"sspawn:spawn\";\n }",
"public BusyThread(String name, double load, long duration) {\n super(name);\n this.load = load;\n this.duration = duration;\n }",
"public Living getTarget();",
"public static void main(String[] args) {\n Thread thread=new Thread(new MyRunnable(),\"firstThread\");\n thread.start();\n System.out.println(thread.getName());\n }",
"public ThreadGroup(String name, DpmAppTopFrame topFrame) {\n this.name = name;\n this.topFrame = topFrame;\n threads = new Vector();\n }"
] | [
"0.6281257",
"0.6014651",
"0.5814492",
"0.5734867",
"0.5722612",
"0.5713693",
"0.570776",
"0.56959176",
"0.54628205",
"0.54390186",
"0.5435339",
"0.5374558",
"0.5335899",
"0.5297692",
"0.52785856",
"0.5256358",
"0.52264243",
"0.5201224",
"0.5187926",
"0.5186067",
"0.51840955",
"0.5176218",
"0.5156123",
"0.5135282",
"0.5061407",
"0.5059708",
"0.50478256",
"0.50460064",
"0.5001636",
"0.499928",
"0.49922174",
"0.49775296",
"0.49774283",
"0.49589834",
"0.49435544",
"0.49342978",
"0.49185583",
"0.49069133",
"0.4893981",
"0.48915526",
"0.4878379",
"0.48685434",
"0.48685354",
"0.48645148",
"0.48247933",
"0.4800729",
"0.47922212",
"0.47844532",
"0.478046",
"0.477591",
"0.47584322",
"0.47553617",
"0.47516823",
"0.4745408",
"0.4742805",
"0.47421262",
"0.47183084",
"0.47172937",
"0.47053528",
"0.46985337",
"0.46978632",
"0.46867618",
"0.4684592",
"0.4684018",
"0.4681234",
"0.46656466",
"0.46614763",
"0.46507984",
"0.46507984",
"0.46507984",
"0.4645258",
"0.4641985",
"0.46297473",
"0.46275666",
"0.46256024",
"0.46201012",
"0.4618981",
"0.4618252",
"0.46004188",
"0.45886648",
"0.4588321",
"0.45865947",
"0.45800084",
"0.4579261",
"0.4576836",
"0.45762804",
"0.45750964",
"0.45702523",
"0.4559325",
"0.45519137",
"0.45382145",
"0.4537055",
"0.4533657",
"0.45259842",
"0.45232984",
"0.45213345",
"0.45156586",
"0.451474",
"0.45088875",
"0.4506924"
] | 0.6459578 | 0 |
Prints the thread name several times. Stops for a while at every iteration. | public void run() {
for (int i = 0; i < 10; i++) {
// print the name of the thread
System.out.println(t.getName() + " " + i);
// The thread can be awakened while sleeping
// use a try block to handle the possibility
try {
Thread.sleep(sleepTime);
} catch (InterruptedException e) {
System.out.println(t.getName() + " is awake");
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void run() {\n\t\tfor (int i = 6; i <= 10; i++) {\r\n System.out.println(Thread.currentThread().getName() + \": \" + i); \t\r\n\r\n}\r\n\t}",
"@Override\n public void run(){\n for(int i = 1; i<=count; i++) {\n System.out.printf(\"Threat: %s %d%n\",threadName,i);\n }\n }",
"public void run()\r\n\t{\r\n\ttry\r\n\t{\r\n\r\n\t\tfor(int i=1;i<=5;i++)\r\n\t\t{\r\n\t\tThread t=Thread.currentThread();\r\n\t\tString s=t.getName();\r\n\t\tSystem.out.println(s+\" \"+i);\r\n\t\tThread.sleep(1000); //throw InterruptedException(); \r\n\t\t}\r\n\t}\r\n\r\n\t\t\r\n\t\tcatch(InterruptedException ie)\r\n\t\t{ie.printStackTrace();}\r\n\t}",
"@Override\n\tpublic void run() {\n\t\tfor(int i = 0 ; i < 5; i++) {\n\t\t\tSystem.out.println(getName());\n\t\t\t//currentThread(); //Thread 객체 참조를 리턴\n\t\t\t\n\t\t}\n\t}",
"@Override\r\n\tpublic void run() {\n\t\tfor (int i=1; i<0;i++) {\r\n\t\t\ttry {\r\n\t\t\t\tcurrentThread();\r\n\t\t\t\tThread.sleep(1000);\r\n\t\t\t\tSystem.out.println(currentThread());\r\n\t\t\t}catch(Exception e) {}\r\n\t\t}\r\n\t}",
"public void run() {\n\t\tfor(int i=0;i<2;i++){\n\t\t\tSystem.out.println(Thread.currentThread().getName()+\":\"+i);\n\t\t}\n\t}",
"public void run() {\r\n System.out.println(\"run() method of the \" + this.getName() + \" thread is called\" );\r\n \r\n for (int i = 0; i < 10; i++) {\r\n System.out.print(this.getName());\r\n }\r\n }",
"public synchronized void print(String name) {\n try {\n System.out.println(\"Thread \" + name + \".print(): Starting\" );\n Thread.sleep(3000);\n System.out.println(\"Thread \" + name + \".foo(): ending\");\n } catch (InterruptedException e) {\n e.printStackTrace();\n System.out.println(\"Thread \" + name + \": interrupted\");\n }\n\n }",
"public void run() {\nfor (int i = 0; i < times ; i++) {\n System.out.print(ToPrint + \"-\");\n }\n }",
"@Override\n\tpublic void run() {\n\n\t\tfor (int i = 0; i < 10; i++) {\n\n\t\t\tCounter.incrementCount();\n\n\t\t\tif (Thread.currentThread().getName().equals(\"one\")) {\n\n\t\t\t\tSystem.out.println(Thread.currentThread().getName() + \" \"\n\t\t\t\t\t\t+ Counter.count);\n\n\t\t\t} else {\n\t\t\t\tSystem.out.println(Thread.currentThread().getName() + \" \"\n\t\t\t\t\t\t+ Counter.count);\n\t\t\t}\n\n\t\t}\n\n\t}",
"@Override\n\tpublic void run() {\n\t\tfor(int x = 0; x< 10; x++){\n\t\t\tSystem.out.println(Thread.currentThread().getName()+\" -> \"+(int)(Math.random()*10));\n\t\t}\n\t\t\n\t}",
"public String toString()\n\t{\n\t\treturn threadName;\n\t}",
"public void run(){\n for(;;)\r\n System.out.println(\"Hello\" + name);\r\n }",
"@Override\r\n\t\t\tpublic void run() {\n\t\t\t\tSystem.out.println(Thread.currentThread().getName()+new Date().toLocaleString());\r\n\t\t\t}",
"public void run(){\n String threadName = Thread.currentThread().getName();\n System.out.println(\"Hello \" + threadName);\n }",
"@Override\r\n\tpublic void run() {\n\t\tSystem.out.println(Thread.currentThread().getName());\r\n\t\tSystem.out.println(\"ThreadTest\");\r\n\t\t\r\n\t\tfor (int i = 0; i < 10; i++) {\r\n\t\t\tSystem.out.println(\"i \" +i);\r\n\t\t\ttry {\r\n\t\t\t\tThread.sleep(1000);\r\n\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\r\n\t}",
"@Override\n\tpublic void run() {\n\t\tSystem.out.println(\" \"+Thread.currentThread().getName());\n\t}",
"@Override\n\tpublic void run() {\n\t\twhile(true) {\n\t\t\ttry {\n\t\t\t\tThread.sleep(1000);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tThread.currentThread().getName();\n\t\t\tSystem.out.println(Thread.currentThread().getName() + \" : \" + i++);\n\t\t\tif(i == 20) break;\n\t\t}\n\t}",
"@Override\r\n\tpublic void run() {\n\r\n\t\tfor (int i = 0; i < 20; i++) {\r\n\t\t\ttry {\r\n\t\t\t\tsleep(1000);\r\n\t\t\t\tSystem.out.println(\"TTT\"+i);\r\n\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void run() {\n\t\tint count=10;\n\t\twhile(count>0)\n\t\t{\n\t\t\tsynchronized(prev)\n\t\t\t{\n\t\t\t\tsynchronized(self)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(name);\n\t\t\t\t\tcount--;\n\t\t\t\t\tself.notify();//唤醒此对象上的线程\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tprev.wait();//在此对象上等待,直到被唤醒才继续循环,以此类推\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public void run(){\n System.out.println(\"Running thread name: \"+Thread.currentThread().getName());\n }",
"@Override\r\n\tpublic void run() {\n\t\tfor(int i =1; i<=lastNum;i++)\r\n\t\t{\r\n\t\t\tSystem.out.print(\" \"+i);\r\n\t\t}\r\n\t}",
"@Override\r\n\t\t\t\tpublic void run() {\n\t\t\t\t\tfor(int j=0;j<5;j++) {\r\n\t\t\t\t\t\tSystem.out.println(t.get());\r\n\t\t\t\t\t}\r\n\t\t\t\t}",
"public void run() {\n for( ; ; ) {\r\n System.out.println(\"Hello \" + name);\r\n }\r\n }",
"public void run() {\r\n\t\t\ttry {\r\n\t\t\t\tevenOdd.printEven(1);\r\n\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tSystem.out.println(Thread.currentThread().getName());\r\n\t\t}",
"public void run(){\n\t\tlong count=0;\n\t\t\n\t\twhile(running){\n\t\t\tSystem.out.println(this.getName()+\" hello\");\n\t\t\tcount++;\n\t\t\ttry {\n\t\t\t\tThread.sleep(1000);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tSystem.out.println(this.getName()+ \" thread end\"+count);\n\t}",
"public static void main(String[] args) throws InterruptedException {\n\t\tnew Thread() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\tfor(int i = 0; i<10; i++) {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tThread.sleep(1000);\r\n\t\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tSystem.out.println(getName() + \" : aaaaa\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}.start();\r\n\t\t\r\n//\t\tnew thread\r\n\t\tnew Thread() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\tfor(int i = 0; i<10; i++) {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tThread.sleep(1000);\r\n\t\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tSystem.out.println(getName() + \" : bbbbbbbb\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}.start();\r\n\r\n\t}",
"@Override\r\n\tpublic void run() {\n\t\tfor (int i = 1; i <= 200000000; i++) {\r\n\t\t\tString str = \"a\";\r\n\t\t\tstr += \"b\";\r\n\t\t\tstr += \"c\";\r\n\t\t}\r\n\t\tSystem.out.println(getName() + \"종료\");\r\n\t}",
"@Override\r\n\tpublic void run() {\n\t\tfor (int i=0; i<10; i++){\r\n\t\t\tSystem.out.println(\"Другой поток....\" + mName + \"i=\" +i);\r\n\t\t\t\tif(isInterrupted()){\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\ttry {\r\n\t\t\t\tThread.sleep(5000);\r\n\t\t\t} catch (InterruptedException ex) {\r\n\t\t\t\tSystem.out.println(\"Ошибка во сне\");\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\r\n\t\t\t}\r\n\t}",
"public void run() {\n\t\tSystem.out.println(Thread.currentThread().getName());\n\t}",
"public void run() {\n for(int i = 0; i <= 25; i++) {\n try {\n //cada hilo imprime el numero de iteracion y su nombre\n System.out.println(i + \": Hola, soy el hilo \" + getName());\n \n //se \"duerme\" durante unos segundos aleatorios \n Thread.sleep((long) ((Math.random() * (5000 - 100))));\n } catch (InterruptedException ex) {\n Logger.getLogger(Ejercicio1y2_6487.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }",
"@Override\r\n\tpublic void run() {\r\n\t\tfor ( int i = 0; i < 10; i++ ) {\r\n\t\t\tSystem.out.println(i);\r\n\t\t\ttry {\r\n\t\t\t\tThread.sleep(900);\r\n\t\t\t}catch (InterruptedException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void run() {\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\ttry {\n\t\t\t\tThread.sleep(1000);\n\t\t\t\tSystem.out.println(\"uzay \" + i);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"@Test\n public void TestUCharactersGetName() throws InterruptedException {\n List threads = new LinkedList();\n for(int t=0; t<20; t++) {\n int codePoint = 47 + t;\n String correctName = UCharacter.getName(codePoint);\n GetNameThread thread = new GetNameThread(codePoint, correctName);\n thread.start();\n threads.add(thread);\n }\n ListIterator i = threads.listIterator();\n while (i.hasNext()) {\n GetNameThread thread = (GetNameThread)i.next();\n thread.join();\n if (!thread.correctName.equals(thread.actualName)) {\n errln(\"FAIL, expected \\\"\" + thread.correctName + \"\\\", got \\\"\" + thread.actualName + \"\\\"\");\n }\n }\n }",
"public void output(String name) {\n// lock.lock();\n// try {\n for(int i=0; i<name.length(); i++) {\n System.out.print(name.charAt(i));\n }\n System.out.println();\n// }finally {\n// lock.unlock();\n// }\n }",
"@Override\r\n\t\t\tpublic void run() {\n\t\t\t\tint i = 0;\r\n\t\t\t\twhile (i < 50) {\r\n\t\t\t\t\tString job = Thread.currentThread().getName() + \"---\" + new Random(99999L).toString();\r\n\t\t\t\t\tprinter.addJob(job);\r\n\t\t\t\t\tSystem.out.println(\"Added \" + job + \" to Printer Queue\");\r\n\t\t\t\t\ti++;\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tThread.sleep(15);\r\n\t\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}",
"public void run(){\n System.out.println(\"Thread class extends \" + getName());\n }",
"@Override\r\n\tpublic void run() {\n\t\tsynchronized(t){\r\n\t\tfor (int i = 1; i < 10; i++) {\r\n\t\t\tSystem.out.println(this.threadName + \" executing \"+ i + \" iteration \" );\r\n\t\t}\r\n\t\tSystem.out.println(\" Exiting \"+ t.getName());\r\n\t\t}\r\n\t}",
"public static void main(String [] args)\n\t{\n\t\t\n\t\tThread printA = new Thread(new multiThread(\"a\"));\n\t\tThread printB = new Thread(new multiThread(\"b\"));\n\t\tThread printC = new Thread(new multiThread(\"c\"));\n\t\t\n\t\tnames[0] = printA.getName();\n\t\tnames[1] = printB.getName();\n\t\tnames[2] = printC.getName();\n\t\t\n\t\tfor(int i = 0; ; i++)\n\t\t{\t\n\t\t\tprintA.run();\t\n\t\t\tprintB.run();\t\n\t\t\tprintC.run();\n\t\t} \n\t}",
"@Override\r\n\tpublic void run() {\n\t\tfor(int i =0; i < times; i++) {\r\n\t\t\tSystem.out.print(charToPrint);\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic void run() {\n\t\tfor(int i=0;i<10;i++){\r\n\t\t\ttry {\r\n\t\t\t\tThread.sleep(1000);\r\n\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"Inside thread : \"+Thread.currentThread().getName()+\" : \"+i);\r\n\t\t}\r\n\t\t\r\n\t}",
"public void run() { // main method\r\n \r\n for(int i=1; i <= 50; i++){ // create loop to run through 1 to 50 \r\n \t if( i % 2 == 0){ // identify if number if even\r\n System.out.print(\"Thread Name: \" + this.getName() + \" Even Number: \" + i + \"\\n\"); // display thread name and even number\r\n\t \tThread.yield(); // yield for other thread\r\n\t }\r\n } \r\n\t}",
"@Override\n public void run() {\n threadLocalTest.setName(Thread.currentThread().getName());\n System.out.println(Thread.currentThread().getName() + \":\" + threadLocalTest.getName());\n }",
"public void setThreadName(String name) {\n threadName = name;\n }",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t\tfor(int i=0;i<=4;i++)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Helloo ....\");\r\n\t\t\ttry {\r\n\t\t\t\tThread.currentThread().sleep(1000);\r\n\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void run() {\n\t\twhile(true) {\n\t\t\ttry {\n\t\t\t\tThread.sleep(1000);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(Thread.currentThread().getName() + \" : \" + i++);\n\t\t\tif(i == 20) break;\n\t\t}\n\t}",
"public static void main(String[] args) {\n Thread thread = new Thread(\"New Thread\") {\n public void run(){\n System.out.println(\"run by: \" + getName());\n }\n };\n\n thread.start();\n System.out.println(thread.getName());\n\n }",
"public void run() {\n\t\tsynchronized (s1) {\n\t\t\ts1.out(threadname);\n\t\t}\n\n//\t\ts1.out(threadname);\n\t\tSystem.out.println(threadname + \" exiting..\");\n\t}",
"static void threadMessage(String message) {\r\n\t\tString threadName = Thread.currentThread().getName();\r\n\t\tSystem.out.format(\"%s: %s%n\", threadName, message);\r\n\t}",
"public void run() {\n\t\t\t\t\tfor (int i = 0; i < times; i++) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tlogger.info(String.format(\"线程-%s:总数%d,第%d次\", name, times, i));\n\t\t\t\t\t\t\tThread.sleep(divide);\n\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t\tint i=0; \r\n\t\twhile(true) {\r\n\t\t\t System.out.print(i);\r\n\t\t\tSystem.out.print(\"rahul\");\r\n\t\t\t try {\r\n\t\t\t\tThread.sleep(1000);\r\n\t\t\t\r\n\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\t if(i==10) {\r\n\t\t\t\t i=0;\r\n\t\t\t }\r\n\t\t\t i++;\r\n\t\t }\r\n\t\t\r\n\t}",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t\tfor(int i=0;i<=4;i++)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Hii ....\");\r\n\t\t\ttry {\r\n\t\t\t\tThread.currentThread().sleep(1000);\r\n\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\n\tpublic synchronized void run() {\n\t\tfor (int i =1; i <= 10; i++) {\n\t\t\t\n\t\t\tsynchronized (this) {\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\ttry {\n\t\t\t\tThread.sleep(1000);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tif(Thread.currentThread().getName().equals(\"one\"))\n\t\t\t{\n\t\t\t\tSystem.out.println(\" one: \"+3*i);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println(\" two: \"+5*i);\n\t\t\t}\n\t\t} \n\t\t\n\t}",
"public void run() {\n\t\twhile(true){\n\t\t\tif (Thread.interrupted()) \n\t {\n\t\t\t\tSystem.out.println(\"I am intrupted \"+ Thread.interrupted());\n\t break;\n\t\t\t\t\n\t }\n\t\t\t\n\t\t\ttry {\n\t\t\t\tThread.sleep(1000);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\tThread.currentThread().interrupt();\n\t\t\t}\n\t\t\tfor(int i=0; i<10; i++){\n\t\t\t\tSystem.out.println(\"thread name : \"+Thread.currentThread().getName()+ \"count \"+i);\n\t\t\t}\n\t\t}\n\t}",
"private static String m62902a(Thread thread) {\n StringBuffer stringBuffer = new StringBuffer();\n stringBuffer.append(\"Thread: \");\n stringBuffer.append(thread.getName());\n return stringBuffer.toString();\n }",
"@Override\n\tpublic void run() {\n\t\tfor(char i = 'A'; i <= 'J'; i++){\n\t\t\tSystem.out.println(i+\" \");\n\t\t\ttry {\n\t\t\t\tThread.sleep(200);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"public static void main(String[] args) throws InterruptedException {\n\t\tMyThread t1 = new MyThread();\r\n\t\tt1.setName(\"ram\");\r\n\t\t\r\n\t\tMyThread t2 = new MyThread();\r\n\t\tt2.setName(\"tom\");\r\n\t\t\r\n\t\tt1.start();\r\n\t\tt1.join();\r\n\t\tt2.start();\r\n\t\tt2.join();\r\n\t\tfor(int i=1; i<=200;++i){\r\n\t\t\tSystem.out.println(Thread.currentThread().getName() \r\n\t\t\t\t\t+ \" \" + (i * 5));\r\n\t\t}\r\n\t\tSystem.out.println(\"main thread complete....\");\r\n\t}",
"@Override\n\tpublic void run() {\n\t\t// runs in its own separate thread\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tSystem.out.println(\"Hello \"+i);\n\t\t\t\n\t\t\t// class (static) method pauses the program\n\t\t\t// for number of msecs.\n\t\t\ttry {\n\t\t\t\tThread.sleep(100); \n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t}\n\t}",
"public String getThreadName() {\n return threadName;\n }",
"static void loop() {\r\n\r\n\t\tfor (int i =1; i<=10; i++) { \r\n\t\t\tSystem.out.println(i);\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void run() {\n\t\t\n\t\tfor(int i = 0 ;i<10;i++){\n\t\t\tSystem.out.println(\"Runner \"+i);\n\t\t}\n\t}",
"private String increment() {\n while (count < max) {\n try {\n Thread.sleep(sleepTime);\n count++;\n } catch (InterruptedException e) {\n break;\n }\n }\n return Thread.currentThread().getName() + \" \" + count;\n }",
"@Override\n\tpublic void run() {\n\t\ttry {\n\t\t\tlk.lock();\n\t\t\tfor(int j=0; j<100;j++) {\n\t\t\t\ttry {\n\t\t\t\t\tThread.currentThread().sleep(10);\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tSystem.out.println(Thread.currentThread().getName()+\":\"+ i++);\n\t\t\t}\n\t\t}finally {\n\t\t\tlk.unlock();\n\t\t}\n\t}",
"public void printName()\n\t{\n\t\tArrayList<Robot> ar=new ArrayList<Robot>();\n\t\tIterator<Robot> it;\n\t\tint i=1;//started index\n\t\t\n\t\tar.addAll(robotHM.values());//adding all\n\t\tCollections.sort(ar);//sort by names\n\t\tit=ar.iterator();\n\t\twhile (it.hasNext())\n\t\t{\n\t\t\tSystem.out.println(i+\". \"+it.next().getName());\n\t\t\ti++;\n\t\t}\n\t}",
"@Test\n @DisplayName(\"Plain Runnable\")\n void testRunnable() {\n Runnable task = this::printThreadName;\n\n task.run();\n\n Thread thread = new Thread(task);\n thread.start();\n\n System.out.println(\"Done!\");\n }",
"@Override\r\n\t\t\tpublic void run() {\n\t\t\t\r\n\t\t\t\tfor(int i=0;i<15;i++){\r\n\t\t\t\t\tSystem.out.println(\"inside the run method of thread\"+\r\n\t\t\t\t\t\t\tThread.currentThread().getName() +\",i is\"+i);\r\n\r\n\t\t\t\t\ttry{\r\n\t\t\t\t\tThread.sleep(100);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcatch(InterruptedException e){\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void run() {\n\t\t\t\r\n\t\t\t\tfor(int i=0;i<15;i++){\r\n\t\t\t\t\tSystem.out.println(\"inside the run method of thread\"+\r\n\t\t\t\t\t\t\tThread.currentThread().getName() +\",i is\"+i);\r\n\r\n\t\t\t\t\ttry{\r\n\t\t\t\t\tThread.sleep(100);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcatch(InterruptedException e){\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void run() {\n\t\t\t\r\n\t\t\t\tfor(int i=0;i<15;i++){\r\n\t\t\t\t\tSystem.out.println(\"inside the run method of thread\"+\r\n\t\t\t\t\t\t\tThread.currentThread().getName() +\",i is\"+i);\r\n\r\n\t\t\t\t\ttry{\r\n\t\t\t\t\tThread.sleep(100);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcatch(InterruptedException e){\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t}",
"@Override\n\tpublic void run() {\n\t\tSystem.out.println(\"Starting \"+Thread.currentThread().getName());\n\t\tfor(int i=1;i<=10;i++)\n\t\t{\n\t\t\tSystem.out.println(multiple +\" * \"+\" : \"+multiple*i);\n\t\t\ttry\n\t\t\t{\n\t\t\t\tThread.sleep(1000);\n\t\t\t}catch(InterruptedException e)\n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"Stopping \"+Thread.currentThread().getName());\n\t\t\n\t}",
"public static void iterate() {\n\t\tif( !threadQueue.isEmpty() ) {\n\t\t\temptyReported = false;\n\t\t\tLogger.debug(\"Threads in queue: \" + threadQueue.size(), true);\n\t\t\ttry {\n\t\t\t\tthreadQueue.remove(0).start();\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\telse if( !emptyReported ) {\n\t\t\tLogger.debug(\"Thread queue empty.\", true);\n\t\t\temptyReported = true;\n\t\t}\n\t}",
"public void printThreadStack(String threadName) {\n\t\tthis.toSlave.println(MasterProcessInterface.THREAD_STACK_COMMAND + ((threadName == null) ? \"\" : (\":\" + threadName)));\n\t}",
"public static void main(String[] args) {\n\t\tfor(int i = 1;i<100;i++){\n\t\t\tMyThread mt = new MyThread(\"Thread\"+i);\n\t\t\tThread t = new Thread(mt);\n\t\t\tt.start();\n\t\t}\n\n\t}",
"private static void println(String message) {// metodo imprimir\r\n\t\tString threadName = Thread.currentThread().getName();\r\n\t\tSystem.out.println(threadName + \": \" + message);\r\n\t}",
"public void run(){\r\nfor(int i=0; i<10; i++){\r\nSystem.out.println(\"Child Thread\");\r\n}\r\n}",
"public void run(){\r\nfor(int i=0; i<10; i++){\r\nSystem.out.println(\"Child Thread\");\r\n}\r\n}",
"public void run() \n {\n System.out.println(Thread.currentThread().getName().hashCode()); \n }",
"@Override\n\tpublic void run() {\n\t\ttry {\n\t\t\tfor(int i=1; i<10; i++) {\n\t\t\t\tSystem.out.print(\".\");\n\t\t\t\tThread.sleep(50);\n\t\t\t\tsynchronized (this) {\n\t\t\t\t\twhile(suspended) {\n\t\t\t\t\t\twait();\n\t\t\t\t\t\tif(stopped) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}catch (InterruptedException e) {\n\t\t\tSystem.out.println(thd.getName() + \" interrupted.\");\n\t\t}\n\t\tSystem.out.println(\"\\n\" + thd.getName() + \" exiting.\");\n\t}",
"public void run(){\n String tName = Thread.currentThread().getName();\n while(!list.isEmpty()){\n System.out.println(tName + \" removed \" + list.remove(0));\n }\n }",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\tfor (int i = 0; i < 10; i++) {\n\t\t\t\t\tconditionThreadCommunication.printA();\n\t\t\t\t}\n\t\t\t}",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\tfor (int i = 0; i < 10; i++) {\n\t\t\t\t\tconditionThreadCommunication.printC();\n\t\t\t\t}\n\t\t\t}",
"@Override\n public void run() {\n char[] symbol;\n count = 0;\n int i = 0;\n symbol = text.getText().toCharArray();\n while(i < symbol.length) {\n if(!Thread.interrupted()) {\n if (name.equals(\"space\")) {\n if (symbol[i] == ' ') {\n count++;\n showThread();\n }\n } else if (name.equals(\"word\")) {\n if (symbol[i] == ' ' || (i + 1) >= text.getText().length()) {\n count++;\n showThread();\n }\n }\n i++;\n }\n else {\n System.out.println(name + \" поток прерван \");\n show();\n return;\n }\n try {\n Thread.sleep(100);\n } catch (InterruptedException e) {\n System.out.println(name + \" поток прерван \");\n show();\n return;\n }\n }\n show();\n }",
"public void run() {\r\n try {\r\n mt.join();\r\n } catch (InterruptedException e) {\r\n }\r\n for (int i = 0; i < 5; i++) {\r\n System.out.println(\"Child Thread\");\r\n }\r\n }",
"@Override\n public void run(){\n System.out.println(\"we are in thread : \" + this.getName());\n }",
"public void run() {\n\t\tfor (int i = 1; i <= 10; i++) {\r\n\t\t\ttry {\r\n\t\t\t\tThread.sleep(10000);\r\n\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"Am from child thread:\" + i);\r\n\t\t}\r\n\t}",
"public static void main(String[] args) throws InterruptedException {\r\n\r\n\t\tfor (int counter = 10; counter >=1; counter--) //loops until counter reaches 1\r\n\t\t{\r\n\t\t\tSystem.out.println(counter);\r\n\t\t\tThread.sleep(1000); //creates a 1 second gap between print statements\r\n\r\n\t\t\tif (counter == 1)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Blast off!\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\tint a = 0;\n\t\t\t\twhile(true) {\n\t\t\t\t\tv.write(file, \"my name is \"+ a++);\n\t\t\t\t}\n\t\t\t}",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\tIterator it = list.iterator();\n\t\t\t\twhile(it.hasNext()){\n\t\t\t\t\tString curElement = (String) it.next();\n\t\t\t\t\tSystem.out.println(curElement);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tTimeUnit.SECONDS.sleep(1);\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}",
"@Override\n // Thread creation\n // Run method from the Runnable class.\n public void run() {\n p.println(\"Current thread = \" + Thread.currentThread().getName());\n // Shows when a task is being executed concurrently with another thread,\n // then puts the thread to bed (I like saying that)\n try {\n p.println(\"Doing a task during : \" + name);\n Thread.currentThread().sleep(time);\n }\n // Exception for when a thread is interrupted.\n catch (InterruptedException e) {\n e.printStackTrace();\n }\n }",
"public static void print() {\n System.out.println(threadLocal.get().toString());\n }",
"private void YeWuMethod(String name) {\n\n for (int j = 0; j < 10; j++) {\n\n\n// Runnable task = new RunnableTask();\n// Runnable ttlRunnable = TtlRunnable.get(task);\n\n// executor.execute(ttlRunnable);\n\n executor.execute(() -> {\n System.out.println(\"==========\"+name+\"===\"+threadLocal.get());\n });\n }\n\n// for (int i = 0; i < 10; i++) {\n// new Thread(() -> {\n// System.out.println(name+\"===\"+threadLocal.get());\n// }, \"input thread name\").start();\n// }\n\n\n\n\n }",
"public static void main(String[] args) {\n Runnable run = new Runnable() {\n private int origin = 0;\n @Override\n public void run() {\n for (int i=0;i<2;i++) {\n int value = ++(origin);\n try {\n TimeUnit.SECONDS.sleep(2);\n }catch (InterruptedException e){\n e.printStackTrace();\n }\n System.out.print(Thread.currentThread().getId()+\":\"+value+\"\\n\");\n }\n }\n };\n for(int i=0;i<100;i++){\n new Thread(run).start();\n }\n }",
"public static void main(String[] args) {\n\t\tThreadMXBean threadMXBean = ManagementFactory.\n\t\t\t\tgetThreadMXBean();\n\t\tThreadInfo[] infos = threadMXBean.dumpAllThreads(false, false);\n\t\tfor(ThreadInfo info:infos) {\n\t\t\tSystem.out.println(\"[\"+info.getThreadId()+\"]\"+info.getThreadName());\n\t\t}\n\t}",
"@Override\r\n\t\t\tpublic void run() {\n\t\t\t\t\r\n\t\t\t\tfor (int i = 0; i < 50; i++) {\r\n\t\t\t\t\tSystem.out.println(\"你好\");\r\n\t\t\t\t}\r\n\t\t\t}",
"public String getThreadName() {\n return null;\n }",
"@Override\n\tpublic void run() {\n\t\tfor(int i=0;i<10;i++)\n\t\t\tSystem.out.println(\"Thread A running \"+i);\n\t}",
"@Override\n public void run() {\n while (!Thread.currentThread().isInterrupted()) {\n System.out.println(new Date());\n }\n System.out.println(\"Done\");\n }",
"@Override\n\tpublic String call() throws Exception {\n\t\t\n\t\tString name = Thread.currentThread().getName();\n\t\tSystem.out.println(name + \" is running...\");\n\t\tlong s = getRandomSleep();\n\t\tSystem.out.println(name + \" will sleep \" + s);\n\t\tThread.sleep(s);\n\t\treturn name + \" \"+runtimeFmt();\n\t}",
"public synchronized void doTask4() throws Exception\n\t{\n//\t\tlock.tryLock();\n\t\tfor( int i = 0 ; i < 5; i++ )\n\t\t{\n\t\t\t\n\t\t\tSystem.out.println(\"**********************\"+i+\" : \"+Thread.currentThread().getName()+\"**********************\");\n\t\t\tSystem.out.println(\"Thread Name :::\"+Thread.currentThread().getName());\n\t\t\ttry \n\t\t\t{\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"Thread Name Before Sleep:::\"+Thread.currentThread().getName());\n\t\t\t\tTimeUnit.SECONDS.sleep(1);\n\t\t\t\tSystem.out.println(\"Thread Name After Sleep:::\"+Thread.currentThread().getName());\n\t\t\t}\n\t\t\tcatch (InterruptedException e)\n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tSystem.out.println(\"Thread Name After Try-Catch:::\"+Thread.currentThread().getName());\n\t\t}\n//\t\tlock.unlock();\n\t}",
"@Override\n\tpublic void run() {\n\t\t\n\t\tThread currentThread = Thread.currentThread();\n\t\tif(currentThread.getName().equals(\"PING\")) {\n\t\t\tfor(int i=0;i<20;i++) {\n\t\t\t\tSystem.out.println(\"PING\");\n\t\t\t\ttry {\n\t\t\t\t\tThread.sleep(500);\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if(currentThread.getName().equals(\"PONG\")) {\n\t\t\tfor(int i=0;i<20;i++) {\n\t\t\t\tSystem.out.println(\"\\tPONG\");\n\t\t\t\ttry {\n\t\t\t\t\tThread.sleep(300);\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public void run() {\n String name = currentThread().getName();\n System.out.println(ANSI_BLUE + \"Hello from \" + name + \".\");\n\n // Let the main thread exit and continue outputting to console.\n if (currentThread().getName().equals(\"main\")) {\n return;\n }\n\n try {\n Thread.sleep(3000);\n } catch (InterruptedException e) {\n System.out.println(ANSI_BLUE + name + \" was prematurely woken up.\");\n return; // Sine it doesn't make sense to output the next message if it's already woken up.\n }\n\n // Not guaranteed to run after three seconds since another thread might wake this thread up,\n // and because the timing is operating system / JVM dependant.\n System.out.println(ANSI_BLUE + \"Three seconds have passed and \" + name + \" is awake.\");\n }"
] | [
"0.71100533",
"0.70317614",
"0.69154704",
"0.6868544",
"0.68386185",
"0.6706481",
"0.6693803",
"0.6682241",
"0.66767395",
"0.6627052",
"0.65613955",
"0.6524547",
"0.64528686",
"0.64310485",
"0.64267844",
"0.6369361",
"0.63569",
"0.6354818",
"0.63275594",
"0.63177055",
"0.6276799",
"0.62698704",
"0.6248017",
"0.62122434",
"0.6198799",
"0.61985236",
"0.6187436",
"0.61837995",
"0.61804366",
"0.6167896",
"0.6148745",
"0.61230063",
"0.6098124",
"0.60884416",
"0.6086932",
"0.6083264",
"0.6081615",
"0.6059426",
"0.60572404",
"0.6044909",
"0.60285944",
"0.6026766",
"0.6005314",
"0.60017",
"0.5991466",
"0.5988355",
"0.5983944",
"0.5977322",
"0.59748375",
"0.59717846",
"0.5970598",
"0.5943095",
"0.5939375",
"0.59154344",
"0.59101653",
"0.590017",
"0.5876842",
"0.58429915",
"0.5837982",
"0.58333594",
"0.58261085",
"0.58157873",
"0.5804559",
"0.58029735",
"0.58018965",
"0.5792178",
"0.5792178",
"0.5792178",
"0.5780506",
"0.5775197",
"0.5770114",
"0.5748743",
"0.5745548",
"0.5742256",
"0.5742256",
"0.5740544",
"0.57297444",
"0.57216364",
"0.5720102",
"0.5692981",
"0.5688075",
"0.5685989",
"0.5683972",
"0.5669387",
"0.56665343",
"0.5646916",
"0.5637077",
"0.5636608",
"0.5635433",
"0.56300884",
"0.5623017",
"0.5622545",
"0.5617967",
"0.5603822",
"0.5593755",
"0.557805",
"0.55749077",
"0.5571816",
"0.55627674",
"0.5561968"
] | 0.61927104 | 26 |
Creates 3 threads (2 + the main thread) and run them | public static void main(String[] args) {
// Create 2 threads
ThreadNameWithRunnable p = new ThreadNameWithRunnable("One", 700);
ThreadNameWithRunnable q = new ThreadNameWithRunnable("Two", 600);
// Display also the thread that is used for main
for (int i = 0; i < 10; i++) {
System.out.println(Thread.currentThread().getName() + " " + i);
try {
Thread.sleep(1200);
} catch (InterruptedException e) {
System.out.println(Thread.currentThread().getName()
+ " is awake");
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main(String[] args) {\n\t\tThread thread1 = new Thread(new ThreadOne());\n\t\tthread1.start();\n\t\t\n\t\tThread thread2 = new Thread(new ThreadOne());\n\t\tthread2.start();\n\t\t\n\t\tThread thread3 = new Thread(new ThreadOne());\n\t\tthread3.start();\n\t\t\n//\t\tThreadOne thread2 = new ThreadOne();\n//\t\tthread2.run();\n//\t\t\n//\t\tThreadOne thread3 = new ThreadOne();\n//\t\tthread3.run();\n\t}",
"public static void main(String[] args) {\n\t\tExecutorService pool = Executors.newFixedThreadPool(3);\n\t\t//ExecutorService pool = Executors.newSingleThreadExecutor();\n\t\t\n\t\tExecutorService pool2 = Executors.newCachedThreadPool();\n\t\t//this pool2 will add more thread into pool(when no other thread running), the new thread do not need to wait.\n\t\t//pool2 will delete un runing thread(unrun for 60 secs)\n\t\tThread t1 = new MyThread();\n\t\tThread t2 = new MyThread();\n\t\tThread t3 = new MyThread();\n\n\t\tpool.execute(t1);\n\t\tpool.execute(t2);\n\t\tpool.execute(t3);\n\t\tpool.shutdown();\n\t\t\n\t}",
"private void startThreads() throws Exception {\n if (myGameThread == null) {\n myGameThread = new GameThread(myCanvas);\n myGameThread.start();\n } else {\n myGameThread.resumeGame();\n }\n if (myTumbleweedThread == null) {\n myTumbleweedThread = new TumbleweedThread(myCanvas);\n myTumbleweedThread.start();\n } else {\n myTumbleweedThread.resumeGame();\n }\n if (myMusicMaker == null) {\n myMusicMaker = new ToneControlMusicMaker();\n //myMusicMaker = new MusicMaker();\n myMusicMaker.start();\n } else {\n myMusicMaker.resumeGame();\n }\n }",
"public static void main( String[] args ) throws Exception\n {\n PrintTask task1 = new PrintTask( \"thread1\" );\n PrintTask task2 = new PrintTask( \"thread2\" );\n PrintTask task3 = new PrintTask( \"thread3\" );\n \n System.out.println( \"Starting threads\" );\n \n // create ExecutorService to manage threads \n ExecutorService threadExecutor = Executors.newFixedThreadPool( 3 );\n \n // start threads and place in runnable state \n threadExecutor.execute( task1 ); // start task1\n threadExecutor.execute( task2 ); // start task2\n threadExecutor.execute( task3 ); // start task3\n \n threadExecutor.shutdown(); // shutdown worker threads\n threadExecutor.awaitTermination(10, TimeUnit.SECONDS); \n System.out.println( \"Threads started, main ends\\n\" );\n }",
"public static void main(String[] args) {\n \r\n\t\t Thread_run th=new Thread_run();\r\n\t\t Thread_runnable th2=new Thread_runnable();\r\n\t\t Thread_run[] m=new Thread_run[10];\r\n\t\t Thread_runnable[] n=new Thread_runnable[10];\r\n\t\t th.start();\r\n\t\t th2.run();\r\n\t\t for(int i=0;i<10;i++) {\r\n\t\t\t m[i]=new Thread_run();\r\n\t\t\t n[i]=new Thread_runnable();\r\n\t\t\t m[i].start();\r\n\t\t\t n[i].run();\r\n\t\t }\r\n\t\t \r\n\t\t try {\r\n\t\t\tth.join();\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t for(int i=0;i < 10;i++) {\r\n\t\t\t\tSystem.out.println(\"mainから出力 : \"+i);\r\n\t\t\t}\r\n\t}",
"public void startThreads() {\n\n //Start a new sender thread\n new Thread(new ClientSenderThread(sequenceNumber, eventQueue, socketsForBroadcast, incomingQueue, curTimeStamp, waitToResendQueue)).start();\n //Start a new listener thread\n //new Thread(new ClientListenerThread(socketsForBroadcast, clientTable,receivedQueue,displayQueue, incomingQueue,actionHoldingCount)).start();\n new ConfirmationBroadcast(sequenceNumber, confirmationQueue, socketsForBroadcast, waitToResendQueue, (BlockingQueue) incomingQueue).start();\n new ResendThread(150, timeout, waitToResendQueue, socketsForBroadcast).start();\n\n new IncomingMessageHandleThread(incomingQueue, receivedQueue, waitToResendQueue, confirmationQueue,\n actionHoldingCount, socketsForBroadcast, curTimeStamp, avoidRepeatenceHelper, numberOfPlayers, playerName, sequenceNumber, this).start();\n new ReceivedThread(receivedQueue, displayQueue, waitToResendQueue, incomingQueue, curTimeStamp, socketsForBroadcast,\n localPlayers, actionHoldingCount, playerName, sequenceNumber, numberOfPlayers).start();\n new DisplayThread(displayQueue, clientTable).start();\n new BulletSender(eventQueue).start();\n\n\n }",
"public static void main(String[] args) {\n\t\tThread numThread = new MultiThread();\r\n\t\tThread numThread2 = new MultiThread();\r\n\r\n\t\t// Named the thread\r\n\t\tnumThread.setName(\"Thread 1\");\r\n\t\tnumThread2.setName(\"Thread 2\");\r\n\t\t\r\n\t\t// Execute threads\r\n\t\tnumThread.start();\r\n\t\tnumThread2.start();\r\n\r\n\t}",
"public static void main(String args[]) {\n\t\t (new Thread(new Threads_and_Executors())).start();\r\n}",
"private void startThreads() {\n Listener listener = new Listener();\n Thread listenerThread = new Thread(listener);\n\n listenerThread.start();\n }",
"public static void main(String[] args) {\n\t\tMultiThreading a1= new MultiThreading();\n\t\tMultiThreading2 a2= new MultiThreading2();\n\t\ta1.setName(\"Bhains\");// hamesa start se pahle likha hota hai \n\t\ta2.setName(\"Hero\");\n\t\ta1.start();// agar yaha run ko call kia to multi thread nahi hai\n\t\t\n\t\ta2.start();\n\t//\tThread.sleep(10000);// ek thread pe ek hi baar \n\t\tMultiThreading b1=new MultiThreading();\n\t\t\n\t\t\n\t\t//a1.start();// ek baar start hui use fir nahi initialize nahi kar sakte Run time pe aaega error\n\t\tb1.start();\n\t\t\n\t\t\t//a1.m1();\n\t\t\t//a2.m2();\t\t\t\n\t}",
"public static void main(String args[]) throws Exception\n {\n ImplementsRunnable rc = new ImplementsRunnable();\n Thread t1 = new Thread(rc);\n t1.start();\n Thread.sleep(1000); // Waiting for 1 second before starting next thread\n Thread t2 = new Thread(rc);\n t2.start();\n Thread.sleep(1000); // Waiting for 1 second before starting next thread\n Thread t3 = new Thread(rc);\n t3.start();\n \n // Modification done here. Only one object is shered by multiple threads\n // here also.\n ExtendsThread extendsThread = new ExtendsThread();\n Thread thread11 = new Thread(extendsThread);\n thread11.start();\n Thread.sleep(1000);\n Thread thread12 = new Thread(extendsThread);\n thread12.start();\n Thread.sleep(1000);\n Thread thread13 = new Thread(extendsThread);\n thread13.start();\n Thread.sleep(1000);\n }",
"private void runThreads() {\n\t\tinsertionSort = new InsertionSortDemo(insertionData);\n\t\tquickSort = new QuickSortDemo(quickData);\n\t\t// add change listener\n\t\tinsertionSort.addPropertyChangeListener(this);\n\t\tquickSort.addPropertyChangeListener(this);\n\t\t//start the thread\n\t\tinsertionSort.execute();\n\t\tquickSort.execute();\n\t}",
"public static void main(String[] args)\n\t\t\t{\n\t\t\t\t\n\t\t\t\tThread t1 = new Thread(new MyThread1_RunnableInterface(1,\"Hello from Thread1\"));\n\t\t\t\tThread t2 = new Thread(new MyThread1_RunnableInterface(2,\"Hello from Thread2\"));\n\t\t\t\tThread t3 = new Thread(new MyThread1_RunnableInterface(3,\"Hello from Thread3\"));\n\t\t\t\t\n t1.start();\n t2.start();\n t3.start();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t}",
"public static void main(String[] args) {\n\t\tRunnable r1 = new ThreadSingleton();\r\n\t\tRunnable r2 = new ThreadSingleton();\r\n\t\t\r\n\t\tnew Thread(r1).start();\r\n\t\tnew Thread(r2).start();\r\n\t}",
"public static void main(String[] args) throws Exception {\n\t\tThread t1 = new Thread(\"t1\") {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tlog.debug(\"this is t1\");\n\t\t\t}\n\t\t};\n\t\tt1.start();\n\t\t\n\t\t\n\t\t//create by runnable\n\t\tThread t2 = new Thread(()->log.debug(\"this is t2\"),\"t2\");\n\t\tt2.start();\n\t\t\n\t\t//create by futuretask, futureTask is created by callable\n\t\tFutureTask<Integer> futureTask = new FutureTask<>(() -> {\n\t\t\tlog.debug(\"this is t3\");\n\t\t\treturn 100;\n\t\t});\n\t\tnew Thread(futureTask,\"t3\").start();\n\t\tlog.debug(\"{}\",futureTask.get());\n\t\t\n\t\tRunnable t4 = ()->{log.debug(\"test\");};\n\t\tt4.run();\n\t\t\n\n\t}",
"public static void main(String[] args) {\r\n Restoran resto = new Restoran();\r\n int i = 0;\r\n for ( i = 0; i < 6; i++) {\r\n new Thread(new Cliente(resto,\"Cliente \" + i), \"Cliente \" + i).start();\r\n }\r\n new Thread(new Mozo(resto)).start();\r\n new Thread(new Cocinero(resto)).start();\r\n }",
"public static void main(String [] args)\n\t{\n\t\t\n\t\tThread printA = new Thread(new multiThread(\"a\"));\n\t\tThread printB = new Thread(new multiThread(\"b\"));\n\t\tThread printC = new Thread(new multiThread(\"c\"));\n\t\t\n\t\tnames[0] = printA.getName();\n\t\tnames[1] = printB.getName();\n\t\tnames[2] = printC.getName();\n\t\t\n\t\tfor(int i = 0; ; i++)\n\t\t{\t\n\t\t\tprintA.run();\t\n\t\t\tprintB.run();\t\n\t\t\tprintC.run();\n\t\t} \n\t}",
"public static void main(String[] args) {\n Runnable runnable = new Runnable() {\n @Override\n public void run() {\n for(int i =0; i<10000; i++){\n System.out.println(\n Thread.currentThread().getId() + \":\" + i\n );\n }\n }\n };\n\n // using functions, a bit cleaner\n Runnable runnable2 = () -> {\n for(int i =0; i<10000; i++){\n System.out.println(\n Thread.currentThread().getId() + \":\" + i\n );\n }\n };\n\n Thread thread = new Thread(runnable);\n thread.start();\n\n Thread thread2 = new Thread(runnable);\n thread2.start();\n\n Thread thread3 = new Thread(runnable);\n thread3.start();\n\n }",
"public static void main(String[] args) {\n\t\t\n\t\tnew ThreadExemplo1().start();\n\t\t\n\t\tnew ThreadExemplo2().start();\n\n\t}",
"public static void main(String[] args) {\n\t\tThreadSynchronization ts = new ThreadSynchronization();\n\t\tThread1 v1=new Thread1(ts);\n\t\tThread2 v2=new Thread2(ts);\n\t\tv1.run();\n\t\tv2.run();\n\n\t}",
"public static void main(String args[]) {\n\t \tSystem.out.println(\"main :start\");\n\t \n\t\t\tRunnable r3 = new Runnable() {\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tSystem.out.println(\"running thread \");\n\t\t\t\t}\n\t\t\t};\n\t\t\t\n\t\t\tThread th3 = new Thread(r3);\n\t\t\t\n\t\t\tth3.start();\n\t\t \n\t\t\tSystem.out.println(\"main :end\");\n\t\t \n\t\t}",
"public static void main(String[] args) {\n\t\tMythread t1 = new Mythread(\"First\");\n\t\tMythread t2 = new Mythread(\"Second\");\n\t\tt1.start();\n\t\tt2.start();\n\n\t}",
"public static void main(String[] args) {\n\t\tRunnable threadObj = new Runnable() {\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tSystem.out.println(\"Thread working\");\n\t\t\t}\n\t\t};\n\t\tThread t1 = new Thread(threadObj);\n\t\tt1.start();\n\t\n\t\tThread t2 = new Thread(new Runnable() {\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tSystem.out.println(\"Thread2 working\");\n\t\t\t}\n\t\t});\n\t\tt2.start();\n\t}",
"public static void main(String[] args) {\n classA a = new classA();\n classB b = new classB();\n //classC c = new classC();\n Thread t1 = new Thread(a);\n Thread t2 = new Thread(b);\n //Thread t3 = new Thread(c);\n Thread t3 = new Thread(new classC());\n t1.start();\n t2.start();\n t3.start();\n }",
"public static void main(String[] args) {\n Runnable myRunnable = new TestThread();\n Thread t1 = new Thread(myRunnable,\"t1\");\n Thread t2 = new Thread(myRunnable,\"t2\");\n t1.start();\n t2.start();\n }",
"public static void main(String[] args) {\n SomeRunnable obj1 = new SomeRunnable();\n SomeRunnable obj2 = new SomeRunnable();\n SomeRunnable obj3 = new SomeRunnable();\n \n System.out.println(\"obj1 = \"+obj1);\n System.out.println(\"obj2 = \"+obj2);\n System.out.println(\"obj3 = \"+obj3);\n \n //Create fixed Thread pool, here pool of 2 thread will created\n ExecutorService pool = Executors.newFixedThreadPool(3);\n ExecutorService pool2 = Executors.newFixedThreadPool(2);\n pool.execute(obj1);\n pool.execute(obj2);\n pool2.execute(obj3);\n \n pool.shutdown();\n pool2.shutdown();\n }",
"public void secondaryThreadCalls(){\n secondThread = new secondaryThread(getHolder(), this);\n effect = new ArrayList<>();\n enemy = new ArrayList<>();\n newEnemy = new ArrayList<>();\n thirdEnemy = new ArrayList<>();\n enemyStart = System.nanoTime();\n topborder = new ArrayList<>();\n botborder = new ArrayList<>();\n secondThread = new secondaryThread(getHolder(), this);\n secondThread.setRunning(true);\n secondThread.start();\n }",
"public static void main(final String args[]){\n\t\tCyclicBarrier barrier = new CyclicBarrier(2);\n\t\tRunAThread t1 = new RunAThread(1, barrier);\n\t\tRunAThread t2 = new RunAThread(2, barrier);\n\n\t\t// EXAMPLE WITH NEW JAVA PACKAGE\n\t\tCyclicBarrierNew barrierNew = new CyclicBarrierNew(2);\n\t\tRunAThreadNew t3 = new RunAThreadNew(3,barrierNew);\n\t\tRunAThreadNew t4 = new RunAThreadNew(4,barrierNew);\n\t\ttry{\n\t\t\t// t1.start();\n\t\t\t// t2.start();\n\t\t\tt3.start();\n\t\t\tt4.start();\n\t\t} catch (Exception e ){\n\n\t\t}\n\t\t//System.out.println(\"I can continue!\");\n\t}",
"public static void main(String[] args) {\n Table table = new Table();\n MyThread1 t1 = new MyThread1(table);\n MyThread1 t2 = new MyThread1(table);\n MyThread1 t3 = new MyThread1(table);\n MyThread1 t4 = new MyThread1(table);\n\n t1.start();\n t2.start();\n t3.start();\n t4.start();\n\n }",
"public static void main(String[] args) throws InterruptedException {\n\t\tMyThread t1 = new MyThread();\r\n\t\tt1.setName(\"ram\");\r\n\t\t\r\n\t\tMyThread t2 = new MyThread();\r\n\t\tt2.setName(\"tom\");\r\n\t\t\r\n\t\tt1.start();\r\n\t\tt1.join();\r\n\t\tt2.start();\r\n\t\tt2.join();\r\n\t\tfor(int i=1; i<=200;++i){\r\n\t\t\tSystem.out.println(Thread.currentThread().getName() \r\n\t\t\t\t\t+ \" \" + (i * 5));\r\n\t\t}\r\n\t\tSystem.out.println(\"main thread complete....\");\r\n\t}",
"public static void main(String[] args) {\n\t\tfinal Counter counter = new Counter(new ReentrantLock());\n\t\t// Task to be executed by threads\n\t\tRunnable r = new Runnable() {\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\n\t\t\t\tSystem.out.printf(\"Count at thread %s is %d %n\",\n\t\t\t\t\t\tThread.currentThread().getName(), counter.getCount());\n\t\t\t}\n\n\t\t};\n\t\t// creating three threads\n\t\tThread t1 = new Thread(r, \"T1\");\n\t\tThread t2 = new Thread(r, \"T2\");\n\t\tThread t3 = new Thread(r, \"T3\");\n\n\t\tt1.start();\n\t\tt2.start();\n\t\tt3.start();\n\t}",
"@Override\n public void run() {\n //start the threads\n t1.start();\n t2.start();\n\n LOGGER.log(Level.FINE, \"Starting Server...\");\n\n //wait for the threads to exit.\n try {\n t1.join();\n t2.join();\n } catch (InterruptedException ex) {\n }\n\n //halt (clean up resources).\n halt();\n }",
"public static void main(String[] args) {\n\t\t\n\t\tRunnable r1 = () -> {\n\t\t\tSystem.out.println(\"I am running in \" + Thread.currentThread().getName());\n\t\t\t//singleton.getInstance();\n\t\t\tnostatic ns = new nostatic();\n\t\t\t\n\t\t\t\n\t\t\tns.incrementNum();\n\t\t};\n\t\t\n\t\tThread[] tarray = new Thread[100];\n\t\t\n\t\tfor( int i =0 ;i < 10 ; i++)\n\t\t{\n\t\t\ttarray[i] = new Thread(r1); \n\t\t\ttarray[i].start();\t\n\t\t}\n\t\t\t\t\n\t\t//System.out.println(\" end\" + t1.getName() + \" 2nd thread name \" + t2.getName());\n\t}",
"public static void main(String[] args) throws Exception {\n\n for(int i = 0 ; i < 100 ; i++) {\n new Thread(new SynAddRunnable(1, 2)).start();\n new Thread(new SynAddRunnable(2, 1)).start();\n }\n }",
"public void startThread() \n { \n ExecutorService taskList = \n Executors.newFixedThreadPool(2); \n for (int i = 0; i < 5; i++) \n { \n // Makes tasks available for execution. \n // At the appropriate time, calls run \n // method of runnable interface \n taskList.execute(new Counter(this, i + 1, \n \"task \" + (i + 1))); \n } \n \n // Shuts the thread that's watching to see if \n // you have added new tasks. \n taskList.shutdown(); \n }",
"public static void main(String[] args) {\n SequenceGenerator generator = new SequenceGenerator();\r\n // init generator consumers\r\n MyThread thread1 = new MyThread(\"th1\", generator);\r\n MyThread thread2 = new MyThread(\"th2\", generator);\r\n MyThread thread3 = new MyThread(\"th3\", generator);\r\n // Start a race for ints from generator\r\n thread1.start();\r\n thread2.start();\r\n thread3.start();\r\n // At last the generated number must be stable\r\n // 3 * MyThread.SEQ_SIZE = 30000\r\n\r\n }",
"public static void main(String[] args) throws InterruptedException {\n Thread wt1 = new JoinThread(\"JoinThread_1\");\n Thread wt2 = new JoinThread(\"JoinThread_2\");\n Thread wt3 = new JoinThread(\"JoinThread_3\");\n\n wt1.start();\n\n// wt1.join();\n\n// System.out.println(\"Current Thread name is: \"+ Thread.currentThread().getName()+ \" has state is : \"+Thread.currentThread().getState().name());\n wt2.start();\n// try {\n// wt2.join();\n// } catch (InterruptedException e) {\n// e.printStackTrace();\n// }\n wt3.start();\n// try {\n// wt3.join();\n// } catch (InterruptedException e) {\n// e.printStackTrace();\n// }\n System.out.println(\"main thread\");\n\n //// Test Case 2\n// wt1.start();\n// wt2.start();\n// wt3.start();\n\n\n }",
"static void doThread() throws InterruptedException {\r\n\t\tthreadMessage(\"Starting MessageLoop thread\");\r\n\t\tlong startTime = System.currentTimeMillis();\r\n\t\t// int nthreads=2;\r\n\t\tint nthreads = numnodes;\r\n\t\tThread[] tList;\r\n\r\n\t\ttList = new Thread[nthreads];\r\n\t\tString driver = null;\r\n\t\tString host = null;\r\n\t\tString user = null;\r\n\t\tString pass = null;\r\n\r\n\t\t// for (int i = 0; i < nthreads; i++) {\r\n\t\tfor (int i = 0; (i < nthreads) && (i < nodeAL.size()); i++) {\r\n\t\t\tdriver = (nodeAL.get(i)).getDriver();\r\n\t\t\thost = (nodeAL.get(i)).getHostName();\r\n\t\t\tuser = (nodeAL.get(i)).getUserName();\r\n\t\t\tpass = (nodeAL.get(i)).getPassword();\r\n\t\t\t// tList[i]= new Thread( new MessageLoop() );\r\n\t\t\t// System.out.println(\"HN is: \" + host + i);\r\n\t\t\ttList[i] = new Thread(new MessageLoop(driver, host, user, pass));\r\n\t\t\ttList[i].start();\r\n\t\t}\r\n\r\n\t\tthreadMessage(\"Waiting for all MessageLoop threads to finish\");\r\n\r\n\t\t// for (int i = 0; i < nthreads; i++) {\r\n\t\tfor (int i = 0; (i < nthreads) && (i < nodeAL.size()); i++) {\r\n\t\t\ttList[i].join();\r\n\t\t}\r\n\r\n\t\tthreadMessage(\"Finally all done!\");\r\n\r\n\t}",
"public static void main(String[] args) {\n Demo03Lock run = new Demo03Lock();\n Thread t0 = new Thread(run);\n Thread t1 = new Thread(run);\n Thread t2 = new Thread(run);\n t0.start();\n t1.start();\n t2.start();\n }",
"public static void main(String[] args) {\n\t\t\n\t\tTicket t = new Ticket();\n\t\tThread t1 = new Thread(t);\n\t\tThread t2 = new Thread(t);\n\t\tThread t3 = new Thread(t);\n\t\tThread t4 = new Thread(t);\n\t\t\n\t\tt1.start();\n\t\tt2.start();\n\t\tt3.start();\n\t\tt4.start();\n\t\t\n\t\t/*\n\t\tTicket t1 = new Ticket();\n\t\tTicket t2 = new Ticket();\n\t\tTicket t3 = new Ticket();\n\t\tTicket t4 = new Ticket();\n\t\t\n\t\tt1.start();\n\t\tt2.start();\n\t\tt3.start();\n\t\tt4.start();\n\t\t*/\n\t\t\n\t}",
"public static void main(String[] args) {\r\n\t\tMyThread thread = new MyThread();\r\n\t\tfixedExecutorService.execute(thread);\r\n\t\tfixedExecutorService.execute(thread);\r\n\t\tfixedExecutorService.execute(thread);\r\n\t\tfixedExecutorService.execute(thread);\r\n\t\tfixedExecutorService.execute(thread);\r\n\t\tfixedExecutorService.execute(thread);\r\n\t\tfixedExecutorService.execute(thread);\r\n\t}",
"public static void main(String[] args) {\n LockClass butdo = new LockClass();\n OtherLockClass butxanh = new OtherLockClass();\n Thread Dieu = new Thread(new RunableClass(butdo, butxanh), \"Runable-Thread-Dieu\");\n Thread DinhDung = new Thread(new RunableClass(butdo,butdo), \"Runable-Thread-DinhDung\");\n// Thread Tuan = new Thread(new RunableClass(new LockClass(),otherLockClass), \"Runable-Thread-Tuan\");\n Thread Ly = new Thread(new RunableClass(butdo,butxanh), \"Runable-Thread-Ly\");\n Dieu.start();\n DinhDung.start();\n// Tuan.start();\n Ly.start();\n }",
"public static void runThreads(int threadCount) {\n\n\t\tThread[] t = new Thread[threadCount];\n\t\tSystem.out.println(\"Concurrent Client #\" + threadCount);\n\t\tfor (int i = 0; i < t.length; i++) {\n\t\t\tSystem.out.println(\"Thread #\" + (i + 1));\n\t\t\tt[i] = new Client(hostname, port, menuSelect);\n\t\t\tt[i].run();\n\t\t}\n\t}",
"private static void multiThreading(){\n\t\tSystem.out.println(\"\\nCreating new two separate instances of Singleton using Multi threading\");\n\t\tExecutorService service = Executors.newFixedThreadPool(2);\n\t\tservice.submit(TestSingleton::useSingleton);\n\t\tservice.submit(TestSingleton::useSingleton);\n\t\tservice.shutdown();\n\t}",
"public static void main(String[] args) {\n\t\tprocess Processes[] = new process[6];\r\n\t\tfor (int i = 0; i < 6; i++)\r\n\t\t{\r\n\t\t\tProcesses[i] = new process(i, r1, r2); //creates new thread\r\n\t\t\tProcesses[i].start(); //executes the thread\r\n\t\t\tSystem.out.println(\"===== Thread for process_\" + i + \" created\");\r\n\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void run() {\n\t\t\n\t\ttry {\n\t\t\tsemaphore.acquire(); // 3 thread at a time\n\t\t} catch (InterruptedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tSystem.out.println(\"Slow servie\"); //50 times concurrently\n\t\t\n\t\tsemaphore.release();\n\t\t//rst of service\n\t\t\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\tTestThread_1 t = new TestThread_1();\n\t\tnew Thread(t).start();\n\t\tnew Thread(t).start();\n\t\tnew Thread(t).start();\n\t\tnew Thread(t).start();\n\n\t}",
"public static void main(String [] args) {\n\t\tExecutorService executor= Executors.newFixedThreadPool(2);\n\t\t\n\t\t//add the tasks that the threadpook executor should run\n\t\tfor(int i=0;i<5;i++) {\n\t\t\texecutor.submit(new Processor(i));\n\t\t}\n\t\t\n\t\t//shutdown after all have started\n\t\texecutor.shutdown();\n\t\t\n\t\tSystem.out.println(\"all submitted\");\n\t\t\n\t\t//wait 1 day till al the threads are finished \n\t\ttry {\n\t\t\texecutor.awaitTermination(1, TimeUnit.DAYS);\n\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tSystem.out.println(\"all completed\");\n\t\t\n\t}",
"public static void startAndJoin(Thread[] threads) \r\n\t { \r\n\t for (int ithread = 0; ithread < threads.length; ++ithread) \r\n\t { \r\n\t threads[ithread].setPriority(Thread.NORM_PRIORITY); \r\n\t threads[ithread].start(); \r\n\t } \r\n\t \r\n\t try \r\n\t { \r\n\t for (int ithread = 0; ithread < threads.length; ++ithread) \r\n\t threads[ithread].join(); \r\n\t } catch (InterruptedException ie) \r\n\t { \r\n\t throw new RuntimeException(ie); \r\n\t } \r\n\t }",
"public static void main(String[] args) throws InterruptedException,\n ExecutionException {\n ExecutorService executor = Executors\n .newFixedThreadPool(THREAD_POOL_SIZE);\n\n Future future1 = executor.submit(new Counter());\n Future future2 = executor.submit(new Counter());\n\n System.out.println(Thread.currentThread().getName() + \" executing ...\");\n\n //asynchronously get from the worker threads\n System.out.println(future1.get());\n System.out.println(future2.get());\n\n }",
"public static void main( String[] args ) {\n Runnable task1 = new TaskPrintC();\n Runnable task2 = new TaskPrintD();\n Runnable task3 = new TaskPrintP();\n\n Thread thread1 = new Thread( task1 );\n Thread thread2 = new Thread( task2 );\n Thread thread3 = new Thread( task3 );\n\n thread1.start();\n thread2.start();\n thread3.start();\n\n // Let them run for 500ms\n try {\n\t\t\tThread.sleep(500);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n \n // put up the stop sign\n runFlag=false;\n \n thread3.interrupt();\n thread2.interrupt();\n thread1.interrupt();\n \n }",
"public static void main(String[] args) {\n\t\tnew firstTh().start();\n\t\tnew Thread(new secondTh()).start();\n\n\t}",
"public static void main(String[] args) {\n\t\tthreadClass1 tobj = new threadClass1();\n\t\tThread t1 = new Thread(tobj);\n\t\tt1.setName(\"thread1\");\n\t\tt1.setPriority(Thread.MAX_PRIORITY);\n\t\tt1.start();\n\t\t\n\t\tThread t2= new Thread(tobj);\n\t\tt2.setName(\"Thread 2\");\n\t\tt2.setPriority(7);\n\t\tt2.start();\n\t\t\n\t\tThread t3= new Thread(tobj);\n\t\tt3.setName(\"Thread 3\");\n\t\tt3.setPriority(5);\n\t\tt3.start();\n\t\t\n\t\tThread t4= new Thread(tobj);\n\t\tt4.setName(\"Thread 4\");\n\t\tt4.setPriority(3);\n\t\tt4.start();\n\t\t\n\t\t\n//\t\ttry {\n//\t\t\tt1.join();\n//\t\t} catch (InterruptedException e) {\n//\t\t\t// TODO Auto-generated catch block\n//\t\t\te.printStackTrace();\n//\t\t}\n\t\t\n\t\tt1.yield();\n//\t\tThreadClass2 t3 = new ThreadClass2();\n//\t\tt3.setName(\"Thread 3\");\n//\t\t\n//// if we call run() directly - it acts as normal method and not as a THREAD\n////\t\tt3.run();\n//\t\t\n////\t\tThus we need to call start() in order to call run();\n//\t\tt3.start();\n//\t\t\n//\t\t\n//\t\tThreadClass2 t4 = new ThreadClass2();\n//\t\tt4.setName(\"Thread 4\");\n//\t\t\n//\t\tt4.start();\n\n\n\t}",
"public static void main(String[] args) {\n\t\tLockHolder holder = new LockHolder();\r\n\t\tnew Thread(new Task1(holder)).start();\r\n\t\tnew Thread(new Task2(holder)).start();\r\n\t}",
"public static void main(String[] args) {\n\t\tList<Thread> threads = new ArrayList<Thread>();\n\t\t// We will create 500 threads\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\tRunnable task = new MyRunnable(10000000L + i);\n\t\t\tThread worker = new Thread(task);\n\t\t\t// We can set the name of the thread\n\t\t\tworker.setName(String.valueOf(i));\n\t\t\t// Start the thread, never call method run() direct\n\t\t\tworker.start();\n\t\t\t// Remember the thread for later usage\n\t\t\tthreads.add(worker);\n\t\t}\n\t\tint running = 0;\n\t\tdo {\n\t\t\trunning = 0;\n\t\t\tfor (Thread thread : threads) {\n\t\t\t\tif (thread.isAlive()) {\n\t\t\t\t\trunning++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"We have \" + running + \" running threads. \");\n\t\t} while (running > 0);\n\n\t}",
"@SuppressWarnings({ \"rawtypes\", \"unchecked\" })\r\n\tpublic static void main(String[] args) throws InterruptedException, ExecutionException{\n\t\tExecutorService e = Executors.newFixedThreadPool(2);\r\n//\t\tList<Future> list = new ArrayList<Future>();\r\n\t\tfor(int i=0;i<10;i++){\r\n\t\t\tCallable c = new JavaTestThread(i);\r\n\t\t\tFuture f = e.submit(c);\r\n\t\t\tSystem.out.println(\"-------\"+ f.get().toString());\r\n\t\t}\r\n\t\t\r\n\t\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\n MyTheads threads = new MyTheads();\n threads.exec();\n }",
"public static void spawnThreads(String type) {\n\t\tThread[] threads = new Thread[threadCount];\n\n\t\tfor (int i = 0; i < threadCount; i++) {\n\t\t\tthreads[i] = new Thread(new TestCoarseList(i, type));\n\t\t\tthreads[i].start();\n\t\t}\n\n\t\tfor (Thread t : threads) {\n\t\t\ttry {\n\t\t\t\tt.join();\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"public static void main(String[] args){\r\n\t\tMythread2 mt = new Mythread2(); /* main thread created the child thread*/\r\n\t\t\tmt.start();\r\n\t\tfor(int i=0; i<10; i++){\r\n\t\t\t\tSystem.out.print(\"Main Thread\");\r\n\t\t\t\t\t}\r\n}",
"public static void main(String[] args) {\n\t\tMyThread mt = new MyThread();\n\t\t// We can assign a name\n\t\tmt.setName(\"Thread 1\");\n\t\tmt.start();\n\t\t\n\t\tMyThreads2 mt2 = new MyThreads2();\n\t\tThread t = new Thread(mt2);\n\t\t\n\t\t//New Thread\n\t\tThread t2 = new Thread(mt2);\n\t\tThread t3 = new Thread(mt2); \n\t\tt.setName(\"Thread 2\");\n\t\tt2.setName(\"Thread 3\");\n\t\tt3.setName(\"Thread 4\");\n\t\tt.start();\n\t\tt2.start();\n\t\tt3.start();\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\tMythread t = new Mythread();\n\t\tt.start();\n\n\t\ttry {\n\t\t\tt.join(); \n\t }catch(Exception e) {}\n\t\t\n\t\tSystem.out.println(t.total);\n\t\t\n\t\t\n\t\tMythread2 t2 = new Mythread2();\n\t\tsynchronized (t2) {\n\t\t\tt2.start();\n\n\t\t\ttry {\n\t\t\t\tt2.wait(); \n\t\t }catch(Exception e) {}\n\t\t\t\n\t\t\n\t\t\tSystem.out.println(t2.total);\n\n\t\t\t\n\t\t}\n\n\n\t}",
"public static void main(String[] args) {\n\n\t\tmulticastsThread.start();\n\t\tsnapshotsThread.start();\n\t}",
"public static void main(String[] args) throws InterruptedException {\n\t\t\n\t\tList<Thread> threads = new ArrayList<>();\n\t\t\n//\t\tthreads.add(e)\n\t\tint result = add(4,5);\n\t\tSystem.out.println(result);\n\t\t\n\t\tfor(int i=0;i<5;i++){\n\t\t\tThread t = new Thread(new MyRunnable());\n\t\t\t\n\t\t\tt.start();\n//\t\t\tt.join();\n\t\t\tthreads.add(t);\n\t\t}\n\t\t\n\t\tfor(Thread t : threads){\n\t\t\tt.join();\n\t\t}\n\t\t\n//\t\tt.join()\n\t\t\n\t\t\n\t\tSystem.out.println(\"New Thread: \" + Thread.currentThread().getName());\n\t\t\n\t\t\n\t\t\n\t}",
"public static void startThreads(ConwayController controller, Integer n){\r\n\t\tArrayList<Thread> threads = new ArrayList<>();\r\n for(int i = 0; i < n; i++)\r\n for(int j = 0; j < n; j++){\r\n threads.add(new CellThread(i, j, controller));\r\n }\r\n for (Thread thread : threads)\r\n thread.start();\t\t\r\n\t}",
"@Test\n public void testThread() {\n\n Thread thread1 = new Thread(() -> {\n //i++;\n for (int j = 0; j < 2000000; j++) {\n (this.i)++;\n }\n });\n\n Thread thread2 = new Thread(() -> {\n //System.out.println(\"i = \" + i);\n for (int j = 0; j < 2000000; j++) {\n System.out.println(\"i = \" + this.i);\n }\n });\n\n thread1.start();\n thread2.start();\n /*for (int j = 0; j < 20; j++) {\n thread1.start();\n thread2.start();\n }*/\n\n\n /* ValueTask valueTask = new ValueTask();\n PrintTask printTask = new PrintTask();*/\n\n /*for (int i = 0; i < 20; i++) {\n Worker1 worker1 = new Worker1(valueTask);\n Worker2 worker2 = new Worker2(printTask);\n\n worker1.start();\n worker2.start();\n }*/\n\n }",
"public static void main(String[] args) {\n\t\tGThread g = new GThread();\n\t\tCThread c = new CThread();\n\t\t\n\t\tThread t1 = new Thread(g);\n\t\tThread t2 = new Thread(c);\n\t\t\n\t\tt1.start();\n\t\tt2.start();\n\t}",
"public static void main(String... args) throws InterruptedException {\n\n\t\tint counter = 0;\n\n\t\tArrayList<MyThread> myThread = new ArrayList<MyThread>();\n\n\t\twhile (counter < 10) {\n\t\t\tmyThread.add(new MyThread());\n\t\t\tcounter++;\n\t\t}\n\n\t\tIterator<MyThread> iterator = myThread.iterator();\n\n\t\twhile (iterator.hasNext()) {\n\t\t\tMyThread myThread2 = (MyThread) iterator.next();\n\t\t\tmyThread2.start();\n\n\t\t}\n\n\t}",
"public static void main(String[] args) throws InterruptedException \n { \n Barrier BR = new Barrier(); \n Thread t1 = new Thread(new Lect4.MyThread1(BR)); \n Thread t2 = new Thread(new Lect4.MyThread2(BR)); \n t1.start(); \n t2.start(); \n t1.join(); \n t2.join(); \n }",
"public static void main(String[] args) {\n\t\tfor(int i=0; i<5; i++)\n\t\t{\n\t\t\tnew Thread(new DaytimeClientMulti(args)).start();\n\t\t}\n\n\t}",
"public static void main(String[] args) {\n\t\tint num;\n\t\tArrayList<Thread> numbersThreads = new ArrayList<Thread>();\n\t\t\n\t\tnum = 0;\n\t\tScanner number = new Scanner(System.in);\n\t\tfor(int i = 0; i < 4; i++)\n\t\t{\n\t\t\tSystem.out.println(\"Put number \" + i + \": \");\n\t\t\tnum = number.nextInt();\n\t\t\tPrimeCalculator numRunnable = new PrimeCalculator(num);\n\t\t\tThread t1 = new Thread(numRunnable);\n\t\t\tnumbersThreads.add(t1);\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < numbersThreads.size(); i++)\n\t\t\tnumbersThreads.get(i).start();\n\t\tnumber.close();\n\t}",
"public static void main(String[] args) {\r\n\t\tRobot one = new Robot(100,100);\r\n\t\tRobot two = new Robot(300,100);\r\n\t\tRobot three = new Robot(500,100);\r\n\t\tRobot four = new Robot(200,300);\r\n\t\tRobot five = new Robot(400,300);\r\n\t\tThread t1 = new Thread(()->{one.penDown();\r\n\t\tone.setPenColor(Color.blue);\r\n\t\tone.setSpeed(10);\r\n\t\tfor(int i = 0; i < 360; i ++) {\r\n\t\tone.move(2);\r\n\t\tone.turn(1);}\r\n\t\tone.hide();});\r\n\t\tThread t2 = new Thread(()->{two.penDown();\r\n\t\ttwo.setPenColor(Color.black);\r\n\t\ttwo.setSpeed(10);\r\n\t\tfor(int i = 0; i < 360; i ++) {\r\n\t\ttwo.move(2);\r\n\t\ttwo.turn(1);}\r\n\t\ttwo.hide();});\r\n\t\tThread t3 = new Thread(()->{three.penDown();\r\n\t\tthree.setPenColor(Color.red);\r\n\t\tthree.setSpeed(10);\r\n\t\tfor(int i = 0; i < 360; i ++) {\r\n\t\tthree.move(2);\r\n\t\tthree.turn(1);}\r\n\t\tthree.hide();});\r\n\t\tThread t4 = new Thread(()->{four.penDown();\r\n\t\tfour.setPenColor(Color.yellow);\r\n\t\tfour.setSpeed(10);\r\n\t\tfor(int i = 0; i < 360; i ++) {\r\n\t\tfour.move(2);\r\n\t\tfour.turn(1);}\r\n\t\tfour.hide();});\r\n\t\tThread t5 = new Thread(()->{five.penDown();\r\n\t\tfive.setPenColor(Color.green);\r\n\t\tfive.setSpeed(10);\r\n\t\tfor(int i = 0; i < 360; i ++) {five.move(2);\r\n\t\tfive.turn(1);}\r\n\t\tfive.hide();});\r\n\t\tt1.start();\r\n\t\tt2.start();\r\n\t\tt3.start();\r\n\t\tt4.start();\r\n\t\tt5.start();\r\n\t}",
"static void test3() {\n\n System.out.println( \"Begin test3. ===============================\\n\" );\n\n Thread init = Thread.currentThread(); // init spawns the Mogwais\n\n System.out.println( \"TODO: write another, more involved test here.\" );\n System.out.println( \"\\n=============================== End test3.\" );\n }",
"public static void main(String[] args) throws InterruptedException {\nfor(int i=0;i<5;i++){\n\t\tThread unsafe = new Thread(new ThreadSafe());\n\t\tunsafe.start();\n\t\tTimeUnit.SECONDS.sleep(2);\n}\n\t}",
"public static void main(String[] args) {\n\t\tFriend f1 = new Friend(\"aaa\");\r\n\t\tFriend f2 = new Friend(\"bbb\");\r\n\t\tnew Thread1(f1, f2).start();\r\n\t\tnew Thread1(f2, f1).start();\r\n\t}",
"public static void main(String[] args) throws InterruptedException, ExecutionException {\n\t\tExecutorService executor = Executors.newFixedThreadPool(5);\n for (int i = 0; i < 10; i++) {\n \tCallable worker = new WorkerThread1(\"\" + i);\n \tFuture future = executor.submit(worker);\n \tSystem.out.println(\"Results\"+future.get());\n //executor.execute(worker);\n }\n executor.shutdown();\n while (!executor.isTerminated()) {\n }\n System.out.println(\"Finished all threads\");\n }",
"public static void main(String[] args) {\n\t\t\n\t\tPrintNumbersThread t1 = new PrintNumbersThread(\"thread 1\");\n\t\t\n\t\tPrintNumbersThread t2 = new PrintNumbersThread(\"thread 2\");\n\t\t\n\t\tt1.start();\n\t\tt2.start();\n\t}",
"public static void main(String[] args) {\n GreetingPrinting g1=new GreetingPrinting(\"Hello,Java\");\n GreetingPrinting g2=new GreetingPrinting(\"Test Automation\");\n GreetingPrinting g3=new GreetingPrinting(\"Selenium is Fun\");\n GreetingPrinting g4=new GreetingPrinting(\"SDET trainig\");\n //define Thread\n Thread t1=new Thread(g1);\n Thread t2=new Thread(g2);\n Thread t3=new Thread(g3);\n Thread t4=new Thread(g4);\n //start the thread\n t1.start();\n t2.start();\n t3.start();\n t4.start();\n\n }",
"public static void main(String[] args) \r\n\t{\n\r\n\tReadThread r=new ReadThread(); //reation\r\n\tr.start();// geting to runnable and it will call automitacly it will run\r\n\t\r\n\tWriteThread wr=new WriteThread(); //reation\r\n\twr.start();// geting to runnable and it will call automitacly it will run\r\n\t\r\n\ttry\r\n\t{\r\n\t\tThread.sleep(1000);\r\n\tr.join();// not allwed to over Thread\r\n\t}catch(InterruptedException ie)\r\n\t{\r\n\t\t\r\n\t}\r\n\t\r\n\t\r\n\t// read thread to complete its 5 times iteration and\r\n\t//the give the actvity to writer thread\r\n\t\r\n\t/*try\r\n\t{\r\n\t\tThread.sleep(1000);\r\n\twr.join();\r\n\t}catch(InterruptedException ie)\r\n\t{\r\n\t\t\r\n\t\t\r\n\t}\r\n\t*/\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t}",
"public static void main(String[] args) throws InterruptedException {\n\n Builder builder = new Builder();\n MyThread myThread = new MyThread(builder);\n MyThread myThread2 = new MyThread(builder);\n\n myThread.start();\n myThread2.start();\n\n myThread.join();\n myThread2.join();\n\n System.out.println(\"finished\");\n\n\n }",
"public static void main(String[] args) {\n\n for (int i = 0; i < 5; i++) {\n new Thread(() -> {\n MySingleton instance1 = MySingleton.getInstance();\n System.out.println(Thread.currentThread().getName() + \" \" + instance1);\n }, \"thread\" + i).start();\n }\n }",
"public static void main(String[] args) {\n\t\tfor(int i = 1;i<100;i++){\n\t\t\tMyThread mt = new MyThread(\"Thread\"+i);\n\t\t\tThread t = new Thread(mt);\n\t\t\tt.start();\n\t\t}\n\n\t}",
"public static void main(String[] args) {\n\t\tTestThread thread1 = new TestThread();\n\t\tTestThread thread2 = new TestThread();\n\t\tthread2.setData(20);\n\t\tthread1.start();\n\t\tthread2.start();\n\t\t\n\t}",
"public static void main(String[] args) {\n\n ArrayList<String> lstNames = null;\n try {\n\n lstNames = readFromFile_getNamesList();\n } catch (IOException e) {\n\n e.printStackTrace();\n }\n\n\n CountDownLatch latch = new CountDownLatch(1);\n MyThread threads[] = new MyThread[1000];\n for(int i = 0; i<threads.length; i++){\n\n threads[i] = new MyThread(latch, lstNames);\n }\n for(int i = 0; i<threads.length; i++){\n threads[i].start();\n }\n latch.countDown();\n for(int i = 0; i<threads.length; i++){\n try {\n threads[i].join();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n\n try {\n System.out.println(\"Sleeeeeeeping....\");\n Thread.sleep(10000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n latch = new CountDownLatch(1);\n MyThread threads2[] = new MyThread[1000];\n for(int i = 0; i<threads2.length; i++){\n threads2[i] = new MyThread(latch, lstNames);\n }\n for(int i = 0; i<threads2.length; i++){\n threads2[i].start();\n }\n latch.countDown();\n }",
"public void startPopulateWorkers(){\r\n\t\tArrayList<Thread> threads = new ArrayList<Thread>();\r\n\t\t\r\n\t\t//Create threads\r\n\t\tfor(int i = 0; i < pts.length; i++){\r\n\t\t\tthreads.add(new Thread(pts[i]));\r\n\t\t\tthreads.get(i).start();\r\n\t\t}\r\n\t\t\r\n\t\t//Wait for threads to finish\r\n\t\tfor(int i = 0; i < pts.length; i++){\r\n\t\t\ttry {\r\n\t\t\t\tthreads.get(i).join();\r\n\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\tthrow new RuntimeException(e.getMessage());\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public static void main(String[] args) {\n\t\tRunnable r1=PlayMethodReference ::m1;\n\t\tThread t1=new Thread(r1);\n\t\tt1.start();\n\t\tfor(int i=0;i<10;i++) {\n\t\t\tSystem.out.println(\"these is child thread\");\n\t\t}\n\t}",
"public static void main (String[] args) {\n logger.info (\"Creating a executor...\");\n ExecutorService executorService = Executors.newFixedThreadPool (3);\n\n\n\n /*\n * Create a lock counter class.\n * */\n logger.info (\"Creating a lock counter class...\");\n ReadWriteCounter counter = new ReadWriteCounter ();\n\n\n\n /*\n * Submit a thread.\n * */\n logger.info (\"Create a read thread...\");\n Runnable readTask = () -> logger.debug (Thread.currentThread ().getName () +\n \" Read Task : \" + counter.getCount ());\n\n\n\n /*\n * Submit a thread.\n * */\n logger.info (\"Create a write thread...\");\n Runnable writeTask = () -> logger.debug (Thread.currentThread().getName() +\n \" Write Task : \" + counter.incrementAndGetCount ());\n\n\n\n /*\n * Submit a threads.\n * */\n logger.info (\"Submit a read threads...\");\n executorService.submit (readTask);\n executorService.submit (readTask);\n\n /*\n * Submit a thread.\n * */\n logger.info (\"Submit a write thread...\");\n executorService.submit (writeTask);\n\n /*\n * Submit a threads.\n * */\n logger.info (\"Submit a read threads...\");\n executorService.submit (readTask);\n executorService.submit (readTask);\n\n\n\n /*\n * Shutdown executor.\n * */\n logger.info (\"Shutdown the executor...\");\n executorService.shutdown ();\n }",
"private void startThreads(int threadNum,\n boolean secondary) {\n for (int i = 0; i < threadNum; i++) {\n Thread thread = new ReplicaReadingThread(repEnvInfo[1].getEnv(), \n secondary);\n thread.start();\n }\n }",
"public static void main(String[] args) {\n\t\tSystem.out.println(\"main thread start\");\r\n\t\t\r\n\t\tThread t1 = new runner(\"남동현\");\r\n\t\tThread t2 = new runner(\"북동현\");\r\n\t\r\n\t\tt1.start();\r\n\t\tt2.start();\r\n\t\t\r\n\t\tSystem.out.println(\"main thread end\");\r\n\t}",
"public static void main(String[] args) throws InterruptedException {\n\t\tResourcesExploiter resource = new ResourcesExploiter(0);\n\t\tThreadedWorkerWithoutSync worker1= new ThreadedWorkerWithoutSync(resource);\n\t\tThreadedWorkerWithoutSync worker2= new ThreadedWorkerWithoutSync(resource);\n\t\tThreadedWorkerWithoutSync worker3= new ThreadedWorkerWithoutSync(resource);\n\t\t\n\t\tworker1.start();\n\t\tworker2.start();\n\t\tworker3.start();\n\t\tworker1.join();\n\t\tworker2.join();\n\t\tworker3.join();\n\t\t\n\t\tSystem.out.println(resource.getRsc());\n\t}",
"public static void main(String[] args) {\n\t\tRunnableObject runn = new RunnableObject();\n\t\tThread t1 = new Thread(runn);\n\t\tThread t2 = new Thread(runn);\n\t\tt1.start();\n\t\tt2.start();\n\t}",
"public static void main(String[] args) throws Exception {\n\t\tCounter c=new Counter();\n\t\tThread t1=new Thread(new Runnable() \n\t\t\t\t{\n\t\t\tpublic void run()\n\t\t\t{\n\t\t\t\tfor(int i=1;i<=5;i++)\n\t\t\t\t{\n\t\t\t\t\tc.increment();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tThread t2=new Thread(new Runnable() \n\t\t{\n\tpublic void run()\n\t{\n\t\tfor(int i=1;i<=5;i++)\n\t\t{\n\t\t\tc.increment();\n\t\t}\n\t}\n});\n\t\tt1.start();\n\t\tt2.start();\n\t\tt1.join();\n\t\tt2.join();\n\t\tSystem.out.println(\"count\"+c.count);\n\n\n\t}",
"public void thread() {\n\t\tnew Thread(first).start();\n\t\trest.thread();\n\t}",
"public static void main(String[] args) {\n\t\tnew Thread(new Digit()).start();\n\t\tnew Thread(new Lettre()).start();\n\t}",
"public static void main(String[] args) {\n\n CountDown countDown = new CountDown();\n\n\n CountDownThread t1 = new CountDownThread(countDown);\n t1.setName(\"Thread 1\");\n\n CountDownThread t2 = new CountDownThread(countDown);\n t2.setName(\"Thread 2\");\n\n t1.start();\n t2.start();\n\n\n }",
"public static void main(String[] argv) {\n\t\ttry {\n\t\t\t// Some initial stats...\n\t\t\tSystem.out.println(\"Main thread starts executing.\");\n\t\t\tSystem.out.println(\"Initial value of top = \" + soStack.getTop() + \".\");\n\t\t\tSystem.out.println(\"Initial value of stack top = \" + soStack.pick() + \".\");\n\t\t\tSystem.out.println(\"Main thread will now fork several threads.\");\n\n\t\t\t/*\n\t\t\t * The birth of threads\n\t\t\t */\n\t\t\tAcquireBlock ab1 = new AcquireBlock();\n\t\t\tAcquireBlock ab2 = new AcquireBlock();\n\t\t\tAcquireBlock ab3 = new AcquireBlock();\n\n\t\t\tSystem.out.println(\"main(): Three AcquireBlock threads have been created.\");\n\n\t\t\tReleaseBlock rb1 = new ReleaseBlock();\n\t\t\tReleaseBlock rb2 = new ReleaseBlock();\n\t\t\tReleaseBlock rb3 = new ReleaseBlock();\n\n\t\t\tSystem.out.println(\"main(): Three ReleaseBlock threads have been created.\");\n\n\t\t\t// Create an array object first\n\t\t\tCharStackProber aStackProbers[] = new CharStackProber[NUM_PROBERS];\n\n\t\t\t// Then the CharStackProber objects\n\t\t\tfor (int i = 0; i < NUM_PROBERS; i++)\n\t\t\t\taStackProbers[i] = new CharStackProber();\n\n\t\t\tSystem.out.println(\"main(): CharStackProber threads have been created: \" + NUM_PROBERS);\n\n\t\t\t/*\n\t\t\t * Twist 'em all\n\t\t\t */\n\t\t\tab1.start();\n\t\t\taStackProbers[0].start();\n\t\t\trb1.start();\n\t\t\taStackProbers[1].start();\n\t\t\tab2.start();\n\t\t\taStackProbers[2].start();\n\t\t\trb2.start();\n\t\t\tab3.start();\n\t\t\taStackProbers[3].start();\n\t\t\trb3.start();\n\n\t\t\tSystem.out.println(\"main(): All the threads are ready.\");\n\n\t\t\t/*\n\t\t\t * Wait by here for all forked threads to die\n\t\t\t */\n\t\t\tab1.join();\n\t\t\tab2.join();\n\t\t\tab3.join();\n\n\t\t\trb1.join();\n\t\t\trb2.join();\n\t\t\trb3.join();\n\n\t\t\tfor (int i = 0; i < NUM_PROBERS; i++)\n\t\t\t\taStackProbers[i].join();\n\n\t\t\t// Some final stats after all the child threads terminated...\n\t\t\tSystem.out.println(\"System terminates normally.\");\n\t\t\tSystem.out.println(\"Final value of top = \" + soStack.getTop() + \".\");\n\t\t\tSystem.out.println(\"Final value of stack top = \" + soStack.pick() + \".\");\n\t\t\tSystem.out.println(\"Final value of stack top-1 = \" + soStack.getAt(soStack.getTop() - 1) + \".\");\n\t\t\tSystem.out.println(\"Stack access count = \" + soStack.getAccessCounter());\n\n\t\t\tSystem.exit(0);\n\t\t} catch (InterruptedException e) {\n\t\t\tSystem.err.println(\"Caught InterruptedException (internal error): \" + e.getMessage());\n\t\t\te.printStackTrace(System.err);\n\t\t} catch (EmptyStackException e) {\n\t\t\treportException(e);\n\t\t} catch (OutOfStackBoundException e) {\n\t\t\treportException(e);\n\t\t} catch (Exception e) {\n\t\t\treportException(e);\n\t\t} finally {\n\t\t\tSystem.exit(1);\n\t\t}\n\t}",
"public static void main(String[] args) {\n\t\tExecutorService executor = Executors.newFixedThreadPool(3);\n\t\t\n\t\t// Submit runnable tasks to the executor\n\t\texecutor.execute(new PrintChar('a', 100));\n\t\texecutor.execute(new PrintChar('b', 100));\n\t\texecutor.execute(new PrintNum(100));\n\t\t\n\t\t// Shut down the executor\n\t\texecutor.shutdown();\n\t}",
"public static void main(String[] args) {\n\t\tTestThread5 th5 = new TestThread5();\n\t\tth5.start();\n\t\tTestThread55 th55 = new TestThread55();\n\t\tth55.start();\n\t}",
"public static void main(String[] args) throws InterruptedException {\n\t\tList<Character> list = new ArrayList<>();\n\n Thread thread1 = new StringThread(list, \"HELLO\");\n thread1.start();\n\n Thread thread2 = new StringThread(list, \"WORLD\");\n thread2.start();\n\n thread1.join();\n thread2.join();\n\t}",
"public static void main(String[] args) {\n\t\tSystem.out.print(\"\\nTask1 Kicked Off\");\r\n Task1 task1 = new Task1();\r\n task1.start(); //task1.run()\r\n \r\n System.out.print(\"\\nTask2 Kicked Off\");\r\n\t\t//Task2\r\n\t\tTask2 task2 = new Task2();\r\n\t\tThread task2Thread = new Thread(task2);\r\n\t\ttask2Thread.start();\r\n \r\n\t\tSystem.out.print(\"\\nTask1 Kicked Off\");\r\n\t\t//Task3\r\n\t\tfor(int i = 301; i<=399; i++) {\r\n\t\t\tSystem.out.print(i + \" \");\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.print(\"\\n Task3 Done\");\r\n\t\t\r\n\t\tSystem.out.print(\"Main Done\");\r\n\r\n\t}",
"private static void startMoverThreads(GameObject simpleGameObject, GameObject activeGameObject,\n List<Thread> moverThreads) {\n for (int i = 0; i < MOVER_THREADS_PER_GAMEOBJECT; i++) {\n Vec3f amount = new Vec3f(1, 0, 0);\n moverThreads.add(startMoverThread(String.format(\"SimpleMoverThread %d\", i), simpleGameObject,\n amount));\n moverThreads.add(startMoverThread(String.format(\"ActiveMoverThread %d\", i), activeGameObject,\n amount));\n }\n }"
] | [
"0.7247884",
"0.6997619",
"0.69505787",
"0.6935769",
"0.6914712",
"0.6889525",
"0.68852127",
"0.6873201",
"0.68717",
"0.68255556",
"0.67494714",
"0.67332375",
"0.6683133",
"0.66563046",
"0.6653719",
"0.6647054",
"0.6636956",
"0.65935904",
"0.6563733",
"0.6538011",
"0.6533421",
"0.6528784",
"0.6525913",
"0.65117145",
"0.6483978",
"0.6478232",
"0.6452949",
"0.6452785",
"0.6443902",
"0.6434489",
"0.6432371",
"0.6427856",
"0.6383202",
"0.6373727",
"0.6365377",
"0.6350243",
"0.6349612",
"0.63490146",
"0.63327354",
"0.63251024",
"0.6322841",
"0.63183737",
"0.63064986",
"0.63058937",
"0.6290554",
"0.6269137",
"0.62652117",
"0.62603366",
"0.6255581",
"0.6254986",
"0.6251342",
"0.6247204",
"0.624545",
"0.62416464",
"0.62343675",
"0.6229988",
"0.6227322",
"0.62149584",
"0.6214157",
"0.62114686",
"0.6188297",
"0.6187826",
"0.6180627",
"0.6168932",
"0.61666626",
"0.6160863",
"0.61549234",
"0.61535573",
"0.61524034",
"0.61520165",
"0.6144692",
"0.61407447",
"0.6130035",
"0.6125613",
"0.6121578",
"0.61184114",
"0.6118309",
"0.61069953",
"0.61028093",
"0.6101659",
"0.6100734",
"0.60995793",
"0.6096117",
"0.60958564",
"0.609181",
"0.60885036",
"0.60875815",
"0.6087139",
"0.6077949",
"0.6064286",
"0.60640997",
"0.60640067",
"0.60619175",
"0.6060174",
"0.6059052",
"0.60580045",
"0.6053459",
"0.6052938",
"0.60470504",
"0.6042187"
] | 0.6050041 | 98 |
there is only 1 inode table per block group This method gets the block offset using the inode offset passed to it. It checks to see if the inode offset is greater than the total number of inodes, if so it will return 0 because this is a corrupt call beacuse the provided inode offset it greater than the total number inodes. If the offset is less then the method will get the inode block group, then get the position of that block group and use that index to address the inode table pointer array to access the correct inode table, then will use that to calculate the correct block and return it as an integer. | public int getBlockNumber(int inodeOffset, Volume v){
int blockNumber = 0;
if(inodeOffset > v.getSuperBlock().getTotalInodes()){
new Ext2Error("the inode offset is invalid as it is greater than the total number of inodes found in the superblock").print();
}else if(inodeOffset < v.getSuperBlock().getTotalInodes()){
double inodeBlockGroup = getInodeBlockGroup(inodeOffset, v.getSuperBlock().getNumberOfInodesPerGroup()); //this is the block group that the inode is inside of
int blockGroupPosition = getInodeIndex(inodeOffset, v.getSuperBlock().getNumberOfInodesPerGroup()); //gets the index of the inode in the group descriptors inode table
int inodeTablePointer = v.getGroupDescriptor().getInodeTablePointers()[blockGroupPosition]; //the inode table inodeBlockGroup of the block group of the block group (1,2 or 3 in this instance)
double block = calculateContainingBlock(inodeBlockGroup, v.getSuperBlock().getInodeSize(), inodeTablePointer);
blockNumber = (int) block;
}
return blockNumber;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int inodeTablePointer(int groupDescriptorNo) throws IOException\n {\n \tByteBuffer buf_groupDescriptor = ByteBuffer.allocate(1024);\n \tbuf_groupDescriptor.order(ByteOrder.LITTLE_ENDIAN);\n \tbyte[] bytes = new byte[1024];\n f.seek(2048);\n \tf.read(bytes);\n \n \tbuf_groupDescriptor.put(bytes);\n inodeTablePointer = buf_groupDescriptor.getInt((groupDescriptorNo*32)+8);\n //System.out.println(\"inodeTablePointer \"+groupDescriptorNo +\" : \"+ inodeTablePointer);\n return inodeTablePointer;\n }",
"private double calculateContainingBlock(double inodeBlockGroup, int inodeSize, int inodeTablePointer){\n return ((inodeBlockGroup * inodeSize / Ext2StaticConstants.START_POSITION) + inodeTablePointer) * Ext2StaticConstants.START_POSITION;\n }",
"private int getInodeIndex(int inodeNumber, int inodesPerGroup){\n //gets the index of the inode from the group descriptors inode table\n return (inodeNumber/inodesPerGroup);\n }",
"private int getEntBlock(FileTableEntry ftEnt)\n\t{\n\t\tint block = ftEnt.seekPtr / Disk.blockSize;\n\t\t//get actual block number\n\t\tif (block < Inode.directSize)\n\t\t{\n\t\t\treturn (int)ftEnt.inode.direct[block];\n\t\t}\n\n\t\tbyte[] temp = new byte[Disk.blockSize];\n\t\tSysLib.rawread((int)ftEnt.inode.indirect, temp);\n\t\treturn (int)SysLib.bytes2short(temp, (block - Inode.directSize) * 2);\n\t}",
"private double getInodeBlockGroup(int inodeNumber, int inodesPerGroup){\n\n inodeNumber--;\n return (inodeNumber % inodesPerGroup);\n }",
"protected final long getUInt(int offset)\n {\n final byte[] tableData = tables.getTablesData();\n return Bytes.getUInt(tableData, cursor+offset);\n }",
"public int getALocationToPlaceBlock(){\n int lruIndex=-1,lruVal=-1;\n for(int i=0;i<this.localCache.length;i++){\n if(!this.localCache[i].isOccupied)// checks if the block is occupied\n return i;\n \n if(lruVal<this.localCache[i].lastUsed){// checks the last used of each block\n lruIndex=i;\n lruVal=this.localCache[i].lastUsed;\n }\n }\n \n return lruIndex;\n }",
"public int getBlockIndex(int block){\n for(int i=0;i<localCache.length;i++){\n if(localCache[i].isOccupied && localCache[i].blockID==block)\n return i;\n }\n return -1;\n }",
"protected final int getInt(int offset)\n {\n final byte[] tableData = tables.getTablesData();\n return Bytes.getInt(tableData, cursor+offset);\n }",
"protected final long getLong(int offset)\n {\n final byte[] tableData = tables.getTablesData();\n return Bytes.getLong(tableData, cursor+offset);\n }",
"public static int offset_addr() {\n return (0 / 8);\n }",
"public int getIndex(double offset)\n {\n double length = 0;\n int index = 0;\n while (index < _totalPoints)\n {\n length += getUnitWidth(index);\n // At slice boundary, return the next index\n if (isEqual(length, offset, Ring.DELTA))\n {\n return (index + 1) % _totalPoints;\n }\n else if (length > offset)\n {\n return index;\n }\n index++;\n }\n return 0;\n }",
"public static int offset_nodeid() {\n return (0 / 8);\n }",
"public static int offset_group() {\n return (24 / 8);\n }",
"protected static long relativeIndexForOffset(long bufferAddress, int messageSize, long offset) {\n return (offset - bufferAddress) / messageSize;\n }",
"public Integer getOffset();",
"public static int offset_counter() {\n return (8 / 8);\n }",
"int getOffset();",
"int getOffset();",
"int getOffset();",
"@Generated\n @Selector(\"fetchOffset\")\n @NUInt\n public native long fetchOffset();",
"protected final int indexFromOffset(final int offset) {\n\t\tassert isValidRange(offset) : \" offset=\" + offset;\n\t\treturn head + offset;\n\t}",
"int getLineOfOffset(int offset) throws BadLocationException;",
"public long getFileOffset();",
"public long getOffset() throws IOException {\n\t\treturn offset;\n\t}",
"public static int offset_max() {\n return (64 / 8);\n }",
"public static int offset_parentId() {\n return (64 / 8);\n }",
"long getFileOffset();",
"public static DataType findPointerRelativeInner(DataType base, int offset) {\n\t\tif (base instanceof TypeDef) {\n\t\t\tbase = ((TypeDef) base).getBaseDataType();\n\t\t}\n\t\twhile (base instanceof Structure) {\n\t\t\tDataTypeComponent component = ((Structure) base).getComponentContaining(offset);\n\t\t\tif (component == null) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tbase = component.getDataType();\n\t\t\toffset -= component.getOffset();\n\t\t\tif (offset == 0) {\n\t\t\t\treturn base;\n\t\t\t}\n\t\t}\n\t\treturn Undefined1DataType.dataType;\n\t}",
"public java.lang.Integer getOffset() {\n return offset;\n }",
"public int getOffset() {\n\t\treturn OFFSET_MASK & dataOffset;\n\t}",
"public abstract int getNextBlock(int block) throws IOException;",
"private int readBlock() throws IOException {\n\t\t\tif (getSource().offset() == getSource().length()) return -1;\n\t\t\tgetMetadata().setBlockSize(getSource().read() & 0xff);\n\t\t\tint n = 0;\n\t\t\tint count;\n\n\t\t\tif (getMetadata().getBlockSize() > 0) {\n\t\t\t\ttry {\n\t\t\t\t\twhile (n < getMetadata().getBlockSize()) {\n\t\t\t\t\t\tcount = getSource().read(getMetadata().getdBlock(), n, getMetadata()\n\t\t\t\t\t\t\t.getBlockSize() - n);\n\t\t\t\t\t\tif (count == -1) break;\n\t\t\t\t\t\tn += count;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (final IOException e) {\n\t\t\t\t\tlog().trace(\"Truncated block\", e);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn n;\n\t\t}",
"public static int offsetBits_group() {\n return 24;\n }",
"public java.lang.Integer getOffset() {\n return offset;\n }",
"private int getChunk(byte [] buffer, int offset, String chunk) {\r\n\t\ttry {\r\n\t\t\tfor (;;) {\r\n\t\t\t\tint dataLenght = getInt(buffer, offset);\r\n\t\t\t\tif (compareBytes(buffer, offset+4, chunk)) {\r\n\t\t\t\t\treturn offset;\r\n\t\t\t\t} else {\r\n\t\t\t\t\toffset += 4 + 4 + dataLenght + 4;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {};\r\n\t\treturn -1;\r\n\t}",
"@Nonnegative\n @CheckReturnValue\n public int getOffset() {\n return offset;\n }",
"public long getCurrentOffset() {\n return (long)current_chunk * (long)chunksize;\n }",
"public int getOffset() \n {\n return offset;\n }",
"IndexMap(ByteBlockSet blockSet, int bytesPerLine, int blockOffset) {\n\n\t\tthis.blockSet = blockSet;\n\t\tByteBlock[] blocks = blockSet.getBlocks();\n\t\tthis.bytesInLine = BigInteger.valueOf(bytesPerLine);\n\n\t\tBigInteger nextStart = BigInteger.ZERO;\n\t\tfor (int i = 0; i < blocks.length; i++) {\n\t\t\tint blockPadding =\n\t\t\t\t((blocks[i].getAlignment(bytesPerLine) + blockOffset) % bytesPerLine);\n\t\t\tBigInteger blockStart = nextStart.add(BigInteger.valueOf(blockPadding));\n\t\t\tBigInteger blockEnd = blockStart.add(blocks[i].getLength());\n\t\t\tint remainder = blockEnd.remainder(bytesInLine).intValue();\n\t\t\tBigInteger endIndex =\n\t\t\t\tremainder == 0 ? blockEnd : blockEnd.add(BigInteger.valueOf(bytesPerLine -\n\t\t\t\t\tremainder));\n\t\t\tBigInteger endLayoutIndex = endIndex.divide(bytesInLine);\n\t\t\tBlockInfo info = new BlockInfo(blocks[i], nextStart, blockStart, blockEnd, endIndex);\n\t\t\tblockInfoMap.put(endLayoutIndex, info);\n\t\t\tnextStart = endIndex.add(bytesInLine);\n\t\t}\n\t\tnumIndexes = nextStart.divide(bytesInLine).subtract(BigInteger.ONE);\n\t\tif (nextStart.equals(BigInteger.ZERO)) {\n\t\t\tnumIndexes = BigInteger.ZERO;\n\t\t}\n\n\t}",
"public int getOffset() {\r\n return offset;\r\n }",
"public int getOffset(long date) { throw new RuntimeException(\"Stub!\"); }",
"public abstract long getStartOffset();",
"FieldLocation getFieldLocation(ByteBlock block, BigInteger offset, FieldFactory[] factorys) {\n\t\tfor (BlockInfo blockInfo : blockInfoMap.values()) {\n\t\t\tif (blockInfo.block == block) {\n\t\t\t\tBigInteger byteIndex = blockInfo.blockStart.add(offset);\n\t\t\t\tBigInteger index = byteIndex.divide(bytesInLine);\n\t\t\t\tint lineOffset = byteIndex.remainder(bytesInLine).intValue();\n\n\t\t\t\t//int fieldOffset = lineOffset / fields.length;\n\t\t\t\tint nbytesPerField = bytesInLine.intValue() / factorys.length;\n\t\t\t\tint fieldOffset = (lineOffset / nbytesPerField) * nbytesPerField;\n\n\t\t\t\tint byteOffset = lineOffset % nbytesPerField;\n\n\t\t\t\tint fieldNum = getFieldNum(index, fieldOffset, factorys);\n\t\t\t\tint col = factorys[fieldNum].getColumnPosition(block, byteOffset);\n\t\t\t\treturn new FieldLocation(index, fieldNum, 0, col);\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public static void getItemsPerLevelUpTo64New(long[] I0, long[] IStar,byte[] offsets, int bucketId)\n\t{\n\t\toffsets[0] = (byte) Long.bitCount(I0[bucketId]);\n\n\n\t\tbyte offset = 0;\n\t\tint i =1;\n\t\twhile(true)\n\t\t{ \n\t\t\tlong tempMask = (1l<<(offsets[0]+offset))-1;\n\t\t\tbyte nextOffset = (byte) Long.bitCount(IStar[bucketId]&tempMask);\n\t\t\t\t\t\n\t\t\t\t\t//Long.bitCount(IStar&((1l<<(offsets[0]+offset)-1));\n\t\t\t\t\t\n//\t\t\t\t\trank(IStar,offsets[0]+offset);\n\t\t\toffsets[i] = (byte) (nextOffset-offset);\n\t\t\tif ( offsets[i++]<=0)\n\t\t\t\tbreak;\n//\t\t\tif(nextOffset == offset)\n//\t\t\t\tbreak;\n\t\t\toffset= nextOffset;\n\t\t}\n\t\treturn ;\n\n\n\t}",
"public long offset() {\n return offset;\n }",
"alluxio.proto.journal.File.InodeFileEntry getInodeFile();",
"public static int offset_reading() {\n return (32 / 8);\n }",
"public int indexOf(MemoryBlock block) {\n\t\tfor (int i = 1; i < size - 1; i++){\n\t\t\tif ( block.equals( getBlock( i ) ) )\n\t\t\t\treturn i;\n\t\t}\n \treturn (-1);\n\t}",
"public long getFreeBlockPosn(byte fileId) {\n\t\treturn freeBlocksMgrMap.get(fileId).getFreePosn();\n\t}",
"public Integer getOffset() {\n return offset;\n }",
"public Integer getBlockID() {\n this.next_id++;\n return this.next_id;\n }",
"int getTotalBlockNum();",
"int getBlockNumber();",
"int getBlockNumber();",
"public static int offset_infos_seq_num() {\n return (64 / 8);\n }",
"public int read(long addr) {\n\t\treturn findBlock(addr);\n\t}",
"public int getOffset() {\r\n\t\treturn offset;\r\n\t}",
"public int getOffset() {\n return offset;\n }",
"public int getOffset() {\n return offset;\n }",
"private int requestBlock() throws InodeNotEnoughDiskSpaceExcepcion{\n\t\t\n\t\tint blockAddr;\n\t\t\n\t\tif((blockAddr = DiskFreeSpaceManager.getInstance().firstFreeBlock()) == -1){\n\t\t\tthrow new InodeNotEnoughDiskSpaceExcepcion(\"Not enough disk space.\");\n\t\t}\n\t\t\n\t\treturn blockAddr;\n\t}",
"public long getOffset () {\n\treturn offset;\n }",
"public java.lang.Long getOffset() {\n return offset;\n }",
"public final int getOffset(int r5) {\n /*\n r4 = this;\n r0 = -1\n if (r5 >= 0) goto L_0x0004\n return r0\n L_0x0004:\n androidx.recyclerview.widget.ChildHelper$Callback r1 = r4.mCallback\n androidx.recyclerview.widget.RecyclerView$5 r1 = (androidx.recyclerview.widget.RecyclerView.AnonymousClass5) r1\n int r1 = r1.getChildCount()\n r2 = r5\n L_0x000d:\n if (r2 >= r1) goto L_0x0029\n androidx.recyclerview.widget.ChildHelper$Bucket r3 = r4.mBucket\n int r3 = r3.countOnesBefore(r2)\n int r3 = r2 - r3\n int r3 = r5 - r3\n if (r3 != 0) goto L_0x0027\n L_0x001b:\n androidx.recyclerview.widget.ChildHelper$Bucket r5 = r4.mBucket\n boolean r5 = r5.get(r2)\n if (r5 == 0) goto L_0x0026\n int r2 = r2 + 1\n goto L_0x001b\n L_0x0026:\n return r2\n L_0x0027:\n int r2 = r2 + r3\n goto L_0x000d\n L_0x0029:\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: androidx.recyclerview.widget.ChildHelper.getOffset(int):int\");\n }",
"alluxio.proto.journal.File.UpdateInodeEntry getUpdateInode();",
"public static int offset_offset_cmp() {\n return (168 / 8);\n }",
"public static int offset_min() {\n return (56 / 8);\n }",
"public abstract int getRawOffset();",
"public abstract int getRawOffset();",
"public int getOffset() {\n return offset;\n }",
"public static int size_offset_cmp() {\n return (32 / 8);\n }",
"public static int offset_parent() {\n return (40 / 8);\n }",
"public java.lang.Long getOffset() {\n return offset;\n }",
"private static long slotOffset(int i) {\n return ((long) i << qShift) + qBase;\n }",
"private int getEntryFieldInt(int item, OFFSET offset) {\n switch (offset) {\n case KEY_LENGTH:\n // return two low bytes of the key length index int\n return (entries[item + offset.value] & KEY_LENGTH_MASK);\n case KEY_BLOCK:\n // offset must be OFFSET_KEY_BLOCK, return 2 high bytes of the int inside key length\n // right-shift force, fill empty with zeroes\n return (entries[item + offset.value] >>> KEY_BLOCK_SHIFT);\n case VALUE_LENGTH:\n return (entries[item + offset.value] & VALUE_LENGTH_MASK);\n case VALUE_BLOCK:\n return (entries[item + offset.value] >>> VALUE_BLOCK_SHIFT);\n default:\n return entries[item + offset.value];\n }\n }",
"public int getOffset() {\n return offset_;\n }",
"public int arrayOffset()\r\n/* 133: */ {\r\n/* 134:162 */ return 0;\r\n/* 135: */ }",
"@Override\r\n\tpublic Nationals getOffset(MeDataSource meDataSource, long offset) {\n\t\treturn null;\r\n\t}",
"public static int getChainAndUpdateOffsets(FingerPrintAux fpaux,\n\t\t\tlong[] I0, long[] IStar, byte[] offsets, byte[] chain, int chainId)\n\t{\n\t\t//\t\tList<Integer> itemIdx = new ArrayList<Integer>(3);\n\t\tgetItemsPerLevelUpTo64New(I0,IStar,offsets,fpaux.bucketId);\n\t\t// read first item\n\t\tint firstItem = getNextChainIndex(chainId,I0[fpaux.bucketId],0);\n\t\tchain[0]= (byte) firstItem;\n\t\t//\t\titemIdx.add(firstItem);\n\t\tif(firstItem<0) // removed from comment by Yaron\n\t\t\treturn 0; //removed from comment by Yaron\n\t\t\n\t\tint offset =0;\n\t\tint i =0;\n\t\twhile(true)\n\t\t{\n\t\t\tfirstItem = getNextChainIndex(firstItem,IStar[fpaux.bucketId],offset);\n\t\t\tif(firstItem<0){\n\t\t\t\tchain[++i]=-1;\n\t\t\t\treturn i;// changed to i by Yaron return i-1; \n\t\t\t}\n\t\t\toffset += offsets[i];\n\t\t\tchain[++i]=(byte) (offset+firstItem);\n\t\t}\n\n\t}",
"@Override\n public long getFilePosition(int tileIndex) {\n int row = tileIndex / nColsOfTiles;\n int col = tileIndex - row * nColsOfTiles;\n if (nCols == 0 || row < row0 || col < col0 || row > row1 || col > col1) {\n return 0;\n }\n\n // for files larger than 16 GB, the offset value may be negative.\n // so a mask is applied to convert it to a positive value.\n return offsets[row - row0][col - col0];\n }",
"public int getOffset() {\n return offset_;\n }",
"public static int offsetBits_addr() {\n return 0;\n }",
"public int getOffset() {\r\n return this.offset;\r\n }",
"public int getFreeBlock(){\n \n if(freeList == -1){\n return -1;\n }\n\n //Retrieve the free block \n byte[] data = new byte[512];\n SysLib.rawread(freeList, data);\n\n \n //Update the freelist\n int freeBlock = freeList;\n freeList = SysLib.bytes2int(data, 0);\n SysLib.int2bytes(0,data,0);\n SysLib.rawwrite(freeBlock,data);\n\n return freeBlock;\n }",
"public static int offset_length() {\n return (32 / 8);\n }",
"public static int offsetBits_parentId() {\n return 64;\n }",
"public int getNumpoly() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn __io__block.readInt(__io__address + 152);\n\t\t} else {\n\t\t\treturn __io__block.readInt(__io__address + 120);\n\t\t}\n\t}",
"public Integer getOffset() {\n return this.offset;\n }",
"public Integer getOffset() {\n return this.offset;\n }",
"ByteBlockInfo getBlockInfo(BigInteger index, int fieldOffset) {\n\t\tSortedMap<BigInteger, BlockInfo> tailMap = blockInfoMap.tailMap(index);\n\t\tif (tailMap.isEmpty()) {\n\t\t\treturn null;\n\t\t}\n\t\tBlockInfo blockInfo = tailMap.get(tailMap.firstKey());\n\t\tBigInteger byteIndex = index.multiply(bytesInLine).add(BigInteger.valueOf(fieldOffset));\n\t\tif ((byteIndex.compareTo(blockInfo.blockStart) >= 0) &&\n\t\t\t(byteIndex.compareTo(blockInfo.blockEnd) < 0)) {\n\t\t\treturn new ByteBlockInfo(blockInfo.block, byteIndex.subtract(blockInfo.blockStart));\n\t\t}\n\t\treturn null;\n\t}",
"public static int getLineOffset(BaseDocument doc, int offset)\n throws BadLocationException {\n \n checkOffsetValid(doc, offset);\n\n Element lineRoot = doc.getParagraphElement(0).getParentElement();\n return lineRoot.getElementIndex(offset);\n }",
"public int getFreeBlock()\n {\n int freeBlock = this.freeList; // Set freeBlock to the head of the freeList\n if(freeBlock != -1) // Check to see if the freeBlock is in use\n {\n byte[] block = new byte[512];\n SysLib.rawread(freeBlock, block); // Read data from freeBlock\n this.freeList = SysLib.bytes2int(block, 0); // Move the head of the freeList to the next block\n SysLib.int2bytes(0, block, 0);\n SysLib.rawwrite(freeBlock, block);\n }\n\n return freeBlock;\n }",
"public long getOffset() {\n return offset;\n }",
"int locationOffset(Location location);",
"alluxio.proto.journal.File.InodeDirectoryEntry getInodeDirectory();",
"public Long getPosition(long offset) {\n if (segmentSearchIndex >= getRangesAsList().size() || offset < accumulatedOffset) {\n resetOffsetCache();\n }\n offset -= accumulatedOffset;\n while (segmentSearchIndex < getRangesAsList().size() && offset >= getRangesAsList().get(segmentSearchIndex).size()) {\n offset -= getRangesAsList().get(segmentSearchIndex).size();\n accumulatedOffset += getRangesAsList().get(segmentSearchIndex).size();\n segmentSearchIndex++;\n }\n if (segmentSearchIndex < getRangesAsList().size()) {\n // range found at index\n return getRangesAsList().get(segmentSearchIndex).getMin() + offset;\n } else {\n return getRangesAsList().get(getRangesAsList().size() - 1).getMax();\n }\n }",
"int getBlockNumber(int x, int y);",
"public int getOffset() {\r\n\t\treturn this.offset;\r\n\t}",
"public static int offset_sum_e() {\n return (104 / 8);\n }",
"private long nextArrayOffset(long mask)\r\n/* 195: */ {\r\n/* 196:446 */ return LinkedArrayQueueUtil.modifiedCalcElementOffset(mask + 2L, 9223372036854775807L);\r\n/* 197: */ }"
] | [
"0.6926845",
"0.6831399",
"0.625436",
"0.6240003",
"0.59504527",
"0.58436763",
"0.5808003",
"0.57280403",
"0.57180756",
"0.56636465",
"0.56224996",
"0.55912274",
"0.556032",
"0.55444896",
"0.5471316",
"0.5456273",
"0.54483706",
"0.5418346",
"0.5418346",
"0.5418346",
"0.53973633",
"0.5352758",
"0.5335933",
"0.53357834",
"0.53299856",
"0.53223",
"0.53146863",
"0.5300083",
"0.52840984",
"0.52828324",
"0.527841",
"0.52763313",
"0.5267108",
"0.52321094",
"0.5225476",
"0.52237236",
"0.52192354",
"0.52106595",
"0.51779175",
"0.5177317",
"0.51759565",
"0.51724404",
"0.51712763",
"0.51656175",
"0.51626635",
"0.5156098",
"0.5155185",
"0.51546276",
"0.5143758",
"0.51317006",
"0.512995",
"0.5111489",
"0.5110924",
"0.5110406",
"0.5110406",
"0.5107366",
"0.51062965",
"0.51028925",
"0.51028824",
"0.51028824",
"0.5100736",
"0.5083278",
"0.5079028",
"0.5073723",
"0.5071388",
"0.50702333",
"0.5065773",
"0.5064635",
"0.5064635",
"0.50642616",
"0.50437254",
"0.5041129",
"0.50330114",
"0.50298727",
"0.5029193",
"0.50285774",
"0.5026523",
"0.5022688",
"0.5006552",
"0.5005253",
"0.49990135",
"0.4991211",
"0.4984786",
"0.4982445",
"0.49821517",
"0.49797022",
"0.4975928",
"0.49741116",
"0.49741116",
"0.49695787",
"0.4968537",
"0.49683",
"0.49645805",
"0.49630007",
"0.49606457",
"0.4959659",
"0.49593496",
"0.4958755",
"0.49562785",
"0.4952433"
] | 0.7056363 | 0 |
this method calculates the block group using the inode offset and the number of inodes per group in the filesystem, it decrements the offset by 1 because inodes count from the number 1 and arrays start from 0 so decrementing provides the correct offset. Modulo is then used to divide and get the remainder | private double getInodeBlockGroup(int inodeNumber, int inodesPerGroup){
inodeNumber--;
return (inodeNumber % inodesPerGroup);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static int offset_group() {\n return (24 / 8);\n }",
"public int getNumberOfBlockGroups(int blocks, int blocksPerGroup){\n int blockGroups = blocks / blocksPerGroup; //get number of block groups\n return (blockGroups % blocksPerGroup) == 0 ? blockGroups : blockGroups+1; //inline if statemnt to check if the modulo value of block groups and blocks per group is 0\n }",
"public static int offsetBits_group() {\n return 24;\n }",
"public static int size_group() {\n return (8 / 8);\n }",
"public int getInodesPerGroup()\n {\n return inodesPerGroup;\n }",
"int doComputeGroups( long start_id )\n {\n long cid = mApp.mCID;\n // Log.v(\"DistoX\", \"Compute CID \" + cid + \" from gid \" + start_id );\n if ( cid < 0 ) return -2;\n float thr = TDMath.cosd( TDSetting.mGroupDistance );\n List<CalibCBlock> list = mApp_mDData.selectAllGMs( cid, 0 );\n if ( list.size() < 4 ) {\n return -1;\n }\n long group = 0;\n int cnt = 0;\n float b = 0.0f;\n float c = 0.0f;\n if ( start_id >= 0 ) {\n for ( CalibCBlock item : list ) {\n if ( item.mId == start_id ) {\n group = item.mGroup;\n cnt = 1;\n b = item.mBearing;\n c = item.mClino;\n break;\n }\n }\n } else {\n if ( TDSetting.mGroupBy != TDSetting.GROUP_BY_DISTANCE ) {\n group = 1;\n }\n }\n switch ( TDSetting.mGroupBy ) {\n case TDSetting.GROUP_BY_DISTANCE:\n for ( CalibCBlock item : list ) {\n if ( start_id >= 0 && item.mId <= start_id ) continue;\n if ( group == 0 || item.isFarFrom( b, c, thr ) ) {\n ++ group;\n b = item.mBearing;\n c = item.mClino;\n }\n item.setGroup( group );\n mApp_mDData.updateGMName( item.mId, item.mCalibId, Long.toString( item.mGroup ) );\n // N.B. item.calibId == cid\n }\n break;\n case TDSetting.GROUP_BY_FOUR:\n // TDLog.Log( TDLog.LOG_CALIB, \"group by four\");\n for ( CalibCBlock item : list ) {\n if ( start_id >= 0 && item.mId <= start_id ) continue;\n item.setGroupIfNonZero( group );\n mApp_mDData.updateGMName( item.mId, item.mCalibId, Long.toString( item.mGroup ) );\n ++ cnt;\n if ( (cnt%4) == 0 ) {\n ++group;\n // TDLog.Log( TDLog.LOG_CALIB, \"cnt \" + cnt + \" new group \" + group );\n }\n }\n break;\n case TDSetting.GROUP_BY_ONLY_16:\n for ( CalibCBlock item : list ) {\n if ( start_id >= 0 && item.mId <= start_id ) continue;\n item.setGroupIfNonZero( group );\n mApp_mDData.updateGMName( item.mId, item.mCalibId, Long.toString( item.mGroup ) );\n ++ cnt;\n if ( (cnt%4) == 0 || cnt >= 16 ) ++group;\n }\n break;\n }\n return (int)group-1;\n }",
"private double calculateContainingBlock(double inodeBlockGroup, int inodeSize, int inodeTablePointer){\n return ((inodeBlockGroup * inodeSize / Ext2StaticConstants.START_POSITION) + inodeTablePointer) * Ext2StaticConstants.START_POSITION;\n }",
"private int getInodeIndex(int inodeNumber, int inodesPerGroup){\n //gets the index of the inode from the group descriptors inode table\n return (inodeNumber/inodesPerGroup);\n }",
"public int getBlockNumber(int inodeOffset, Volume v){\n\n int blockNumber = 0;\n if(inodeOffset > v.getSuperBlock().getTotalInodes()){\n\n new Ext2Error(\"the inode offset is invalid as it is greater than the total number of inodes found in the superblock\").print();\n\n }else if(inodeOffset < v.getSuperBlock().getTotalInodes()){\n double inodeBlockGroup = getInodeBlockGroup(inodeOffset, v.getSuperBlock().getNumberOfInodesPerGroup()); //this is the block group that the inode is inside of\n int blockGroupPosition = getInodeIndex(inodeOffset, v.getSuperBlock().getNumberOfInodesPerGroup()); //gets the index of the inode in the group descriptors inode table\n int inodeTablePointer = v.getGroupDescriptor().getInodeTablePointers()[blockGroupPosition]; //the inode table inodeBlockGroup of the block group of the block group (1,2 or 3 in this instance)\n double block = calculateContainingBlock(inodeBlockGroup, v.getSuperBlock().getInodeSize(), inodeTablePointer);\n blockNumber = (int) block;\n }\n return blockNumber;\n }",
"public void superBlock() throws FileNotFoundException, IOException\n {\n \tByteBuffer buf = ByteBuffer.allocate(1024);\n \tbuf.order(ByteOrder.LITTLE_ENDIAN);\n \tbyte[] bytes = new byte[1024];\n f.seek(1024);\n \tf.read(bytes);\n \tbuf.put(bytes);\n\n \tmagicNum = buf.getShort(56);\n \ttotalInodes = buf.getInt(0);\n \ttotalBlocks = buf.getInt(4);\n \tblocksPerGroup = buf.getInt(32);\n \tinodesPerGroup = buf.getInt(40);\n \tsizeOfInode = buf.getInt(88);\n\n \tbyte[] stringLabel = new byte[16];\n \tbuf.position(120);\n buf.get(stringLabel);\n \tvolumeLabel = new String(stringLabel);\n\n System.out.println(\"Magic Number : \"+String.format(\"0x%04X\",magicNum));\n System.out.println(\"Total Inodes: \"+totalInodes);\n System.out.println(\"Total Blocks: \"+totalBlocks);\n System.out.println(\"Blocks per Group: \"+blocksPerGroup);\n System.out.println(\"Inodes per Group: \"+inodesPerGroup);\n System.out.println(\"Size Of each Inode in bytes: \"+sizeOfInode);\n System.out.println(\"Volume Label: \"+ volumeLabel+ \"\\n\");\n }",
"public void setGroupingSize(int newValue) {\n groupingSize = (byte) newValue;\n }",
"public static int group(int group) {\n group = GROUP_MAX & group;\n\n return ((group & 0b10) << 7) | ((group & 1) << 4);\n }",
"public long getFileGroupId();",
"@Override\r\n public long getGroupId(int groupPosition) {\n return groupPosition;\r\n }",
"public static void splitFile() throws IOException{\n\t\tPath currentRelativePath = Paths.get(\"\");\n\t\tFile file = new File(currentRelativePath.toAbsolutePath().toString()+\"/\"+fileName);\n\n\t\t//fileChunks are of size windowSize\n\t\tint num = fileSize; \n\t\tint lastByteRead = 0;\n\t\tint start =0;\n\t\tint i= 0; //where we are in bitfield map\n\t\tbyte[] fileChunkArray = new byte[windowSize];\n\t\t//read in the file\n\t\ttry{\n\t\t\tFileInputStream fileInputStream = new FileInputStream(file);\n\t\t\twhile(num > 0){\n\t\t\t\tif (num <= 5){\n\t\t\t\t\twindowSize = num;\n\t\t\t\t}\n\t\t\t\t// byte[] fileChunkArray = new byte[windowSize];\n\t\t\t\t\n\t\t\t\tlastByteRead = fileInputStream.read(fileChunkArray,0,windowSize);\n\t\t\t\t\n\t\t\t\t// start = start +windowSize;\n\t\t\t\t\n\t\t\t\t// String s1 = new String(fileChunkArray);\n\t\t\t\tSystem.out.print(\"the chunkarray length is :\" + fileChunkArray.length);\n\t\t\t\tSystem.out.print(\"the lastbyte read is :\"+ lastByteRead);\n\t\t\t\t// System.out.print(\"the fileChunk array is :\"+ s1);\n\t\t\t\tbitfieldMap.put(lastByteRead,fileChunkArray);\n\t\t\t\ti++;\n\t\t\t\tdynamicName = fileName+ i;\n\t\t\t\tworkingDirectory = System.getProperty(\"user.dir\");\n\t\t\t\tabsoluteFilePath = workingDirectory + File.separator + dynamicName;\n\t\t\t\tnum = num - windowSize; \n\t\t\t\tFileOutputStream newFile = new FileOutputStream(absoluteFilePath);\n\t\t\t\tnewFile.write(fileChunkArray);\n\t\t\t\tnewFile.flush();\n\t\t\t\tnewFile.close();\n\n\t\t\t}\n\t\t\tfileInputStream.close();\t\n\t\t}catch(IOException ioe){\n\t\t\tSystem.out.println(\"Could not split file: \" + ioe);\n\t\t}\n\t}",
"public long getGroup()\r\n { return group; }",
"@Override\n\tpublic long getGroupId(int sectionPosition) {\n\t\treturn sectionPosition;\n\t}",
"protected int getChunkInRegion() {\n\t\treturn (rnd.nextInt(structurePosRange) + rnd.nextInt(structurePosRange)) / 2;\n\t}",
"public int getCol_groups() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn __io__block.readInt(__io__address + 8);\n\t\t} else {\n\t\t\treturn __io__block.readInt(__io__address + 8);\n\t\t}\n\t}",
"@Override\n \t\tpublic long getGroupId(int groupPosition) {\n \t\t\treturn groupPosition;\n \t\t}",
"@Override\n public long getGroupId(int groupPosition)\n {\n return groupPosition;\n }",
"public int inodeTablePointer(int groupDescriptorNo) throws IOException\n {\n \tByteBuffer buf_groupDescriptor = ByteBuffer.allocate(1024);\n \tbuf_groupDescriptor.order(ByteOrder.LITTLE_ENDIAN);\n \tbyte[] bytes = new byte[1024];\n f.seek(2048);\n \tf.read(bytes);\n \n \tbuf_groupDescriptor.put(bytes);\n inodeTablePointer = buf_groupDescriptor.getInt((groupDescriptorNo*32)+8);\n //System.out.println(\"inodeTablePointer \"+groupDescriptorNo +\" : \"+ inodeTablePointer);\n return inodeTablePointer;\n }",
"private int chunk(long timestamp) {\n int chunkid;\n \n if (timestamp >= 0) {\n chunkid = (int) ((timestamp / chunklen) % chunkcount);\n } else {\n chunkid = chunkcount + (int) ((((timestamp + 1) / chunklen) % chunkcount) - 1);\n //chunkid = chunkcount - (int) ((- (timestamp + 1) / chunklen) % chunkcount);\n }\n \n return chunkid;\n }",
"@Override\n public long getGroupId(int groupPosition) {\n return groupPosition;\n }",
"@Override\n public long getGroupId(int groupPosition) {\n return groupPosition;\n }",
"@Override\n public long getGroupId(int groupPosition) {\n return groupPosition;\n }",
"@Override\n public long getGroupId(int groupPosition) {\n return groupPosition;\n }",
"int getTotalBlockNum();",
"public abstract int getNextBlock(int block) throws IOException;",
"IndexMap(ByteBlockSet blockSet, int bytesPerLine, int blockOffset) {\n\n\t\tthis.blockSet = blockSet;\n\t\tByteBlock[] blocks = blockSet.getBlocks();\n\t\tthis.bytesInLine = BigInteger.valueOf(bytesPerLine);\n\n\t\tBigInteger nextStart = BigInteger.ZERO;\n\t\tfor (int i = 0; i < blocks.length; i++) {\n\t\t\tint blockPadding =\n\t\t\t\t((blocks[i].getAlignment(bytesPerLine) + blockOffset) % bytesPerLine);\n\t\t\tBigInteger blockStart = nextStart.add(BigInteger.valueOf(blockPadding));\n\t\t\tBigInteger blockEnd = blockStart.add(blocks[i].getLength());\n\t\t\tint remainder = blockEnd.remainder(bytesInLine).intValue();\n\t\t\tBigInteger endIndex =\n\t\t\t\tremainder == 0 ? blockEnd : blockEnd.add(BigInteger.valueOf(bytesPerLine -\n\t\t\t\t\tremainder));\n\t\t\tBigInteger endLayoutIndex = endIndex.divide(bytesInLine);\n\t\t\tBlockInfo info = new BlockInfo(blocks[i], nextStart, blockStart, blockEnd, endIndex);\n\t\t\tblockInfoMap.put(endLayoutIndex, info);\n\t\t\tnextStart = endIndex.add(bytesInLine);\n\t\t}\n\t\tnumIndexes = nextStart.divide(bytesInLine).subtract(BigInteger.ONE);\n\t\tif (nextStart.equals(BigInteger.ZERO)) {\n\t\t\tnumIndexes = BigInteger.ZERO;\n\t\t}\n\n\t}",
"@Override\n\t\tpublic long getGroupId(int groupPosition) {\n\t\t\treturn groupPosition;\n\t\t}",
"@Override\n\t\tpublic long getGroupId(int groupPosition) {\n\t\t\treturn groupPosition;\n\t\t}",
"private void setGroupIndex(int value) {\n bitField0_ |= 0x00000001;\n groupIndex_ = value;\n }",
"public PageReadStore readNextRowGroup() throws IOException {\n if (currentBlock == blocks.size()) {\n return null;\n }\n BlockMetaData block = blocks.get(currentBlock);\n if (block.getRowCount() == 0) {\n throw new RuntimeException(\"Illegal row group of 0 rows\");\n }\n this.currentRowGroup = new ColumnChunkPageReadStore(block.getRowCount());\n // prepare the list of consecutive chunks to read them in one scan\n List<ParquetStreamReader.ConsecutiveChunkList> allChunks = new ArrayList<>();\n ParquetStreamReader.ConsecutiveChunkList currentChunks = null;\n for (ColumnChunkMetaData mc : block.getColumns()) {\n ColumnPath pathKey = mc.getPath();\n BenchmarkCounter.incrementTotalBytes(mc.getTotalSize());\n ColumnDescriptor columnDescriptor = paths.get(pathKey);\n if (columnDescriptor != null) {\n long startingPos = mc.getStartingPos();\n // first chunk or not consecutive => new list\n if (currentChunks == null || currentChunks.endPos() != startingPos) {\n currentChunks = new ParquetStreamReader.ConsecutiveChunkList(startingPos);\n allChunks.add(currentChunks);\n }\n currentChunks.addChunk(new ParquetStreamReader.ChunkDescriptor(columnDescriptor, mc, startingPos, (int)mc.getTotalSize()));\n }\n }\n // actually read all the chunks\n for (ParquetStreamReader.ConsecutiveChunkList consecutiveChunks : allChunks) {\n final List<ParquetStreamReader.Chunk> chunks = consecutiveChunks.readAll(f);\n for (ParquetStreamReader.Chunk chunk : chunks) {\n currentRowGroup.addColumn(chunk.descriptor.col, chunk.readAllPages());\n }\n }\n\n // avoid re-reading bytes the dictionary reader is used after this call\n if (nextDictionaryReader != null) {\n nextDictionaryReader.setRowGroup(currentRowGroup);\n }\n\n advanceToNextBlock();\n\n return currentRowGroup;\n }",
"private long calcEffectiveBlockGroupLen(BlockData[] blockGroup,\n int replicaCount) {\n Preconditions.checkState(blockGroup.length == replicaCount);\n\n long blockGroupLen = Long.MAX_VALUE;\n\n for (int i = 0; i < replicaCount; i++) {\n if (blockGroup[i] == null) {\n continue;\n }\n\n long putBlockLen = getBlockDataLength(blockGroup[i]);\n // Use safe length is the minimum of the lengths recorded across the\n // stripe\n blockGroupLen = Math.min(putBlockLen, blockGroupLen);\n }\n return blockGroupLen == Long.MAX_VALUE ? 0 : blockGroupLen;\n }",
"@Override\n\tpublic long getGroupId(int groupPosition) {\n\t\treturn groupPosition;\n\t}",
"@Override\n\tpublic long getGroupId(int groupPosition) {\n\t\treturn groupPosition;\n\t}",
"@Override\r\n\tpublic long getGroupId(int groupPosition) {\n\t\treturn groupPosition;\r\n\t}",
"@Override\r\n\tpublic long getGroupId(int groupPosition) {\n\t\treturn groupPosition;\r\n\t}",
"int getGroupingSize() {\n return groupingSize;\n }",
"public interface BlockFileSystem {\n\n \n /**\n * The size of a block in bytes.\n */\n int BLOCK_SIZE = 512;\n\n\n /**\n * Returns the root entry of the file system. Subfiles and directories\n * can be found by searching the returned entry.\n * \n * @return the root entry\n * @throws IOException if an IO error occurs\n */\n public abstract Entry getRoot() throws IOException;\n\n \n /**\n * Returns the number of the block that follows the given block.\n * The internal block allocation tables are consulted to determine the\n * next block. A return value that is less than zero indicates that\n * there is no next block.\n * \n * @param block the number of block whose successor to return\n * @return the successor of that block\n * @throws IOException if an IO error occurs\n */\n public abstract int getNextBlock(int block) throws IOException;\n\n\n /**\n * Returns the raw input stream for this file system. \n * Typically this will be the random access file containing the .doc.\n * \n * @return the raw input stream for this file system\n */\n public abstract SeekInputStream getRawInput();\n\n}",
"Object getGroup(int groupPosition);",
"static void findGroups() {\n G2 = 0;\n while (group2()) {\n }\n\n // find group of size 3\n G3 = 0;\n while (group3()) {\n }\n }",
"alluxio.proto.journal.File.InodeDirectoryIdGeneratorEntry getInodeDirectoryIdGenerator();",
"public static void getItemsPerLevelUpTo64New(long[] I0, long[] IStar,byte[] offsets, int bucketId)\n\t{\n\t\toffsets[0] = (byte) Long.bitCount(I0[bucketId]);\n\n\n\t\tbyte offset = 0;\n\t\tint i =1;\n\t\twhile(true)\n\t\t{ \n\t\t\tlong tempMask = (1l<<(offsets[0]+offset))-1;\n\t\t\tbyte nextOffset = (byte) Long.bitCount(IStar[bucketId]&tempMask);\n\t\t\t\t\t\n\t\t\t\t\t//Long.bitCount(IStar&((1l<<(offsets[0]+offset)-1));\n\t\t\t\t\t\n//\t\t\t\t\trank(IStar,offsets[0]+offset);\n\t\t\toffsets[i] = (byte) (nextOffset-offset);\n\t\t\tif ( offsets[i++]<=0)\n\t\t\t\tbreak;\n//\t\t\tif(nextOffset == offset)\n//\t\t\t\tbreak;\n\t\t\toffset= nextOffset;\n\t\t}\n\t\treturn ;\n\n\n\t}",
"@Override\n\tpublic void calculateDeletedGroup(String groupId, String groupName)\n\t\t\tthrows Exception {\n\t\t\n\t}",
"private void createRpBlockConsistencyGroups() {\n DbClient dbClient = this.getDbClient();\n List<URI> protectionSetURIs = dbClient.queryByType(ProtectionSet.class, false);\n\n Iterator<ProtectionSet> protectionSets =\n dbClient.queryIterativeObjects(ProtectionSet.class, protectionSetURIs);\n\n while (protectionSets.hasNext()) {\n ProtectionSet ps = protectionSets.next();\n Project project = dbClient.queryObject(Project.class, ps.getProject());\n\n BlockConsistencyGroup cg = new BlockConsistencyGroup();\n cg.setId(URIUtil.createId(BlockConsistencyGroup.class));\n cg.setLabel(ps.getLabel());\n cg.setDeviceName(ps.getLabel());\n cg.setType(BlockConsistencyGroup.Types.RP.toString());\n cg.setProject(new NamedURI(project.getId(), project.getLabel()));\n cg.setTenant(project.getTenantOrg());\n\n dbClient.createObject(cg);\n\n log.debug(\"Created ConsistencyGroup (id={}) based on ProtectionSet (id={})\",\n cg.getId().toString(), ps.getId().toString());\n\n // Organize the volumes by replication set\n for (String protectionVolumeID : ps.getVolumes()) {\n URI uri = URI.create(protectionVolumeID);\n Volume protectionVolume = dbClient.queryObject(Volume.class, uri);\n protectionVolume.addConsistencyGroup(cg.getId().toString());\n\n dbClient.persistObject(protectionVolume);\n\n log.debug(\"Volume (id={}) added to ConsistencyGroup (id={})\",\n protectionVolume.getId().toString(), cg.getId().toString());\n }\n }\n }",
"public final void rule__Block__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2495:1: ( rule__Block__Group__1__Impl rule__Block__Group__2 )\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2496:2: rule__Block__Group__1__Impl rule__Block__Group__2\n {\n pushFollow(FOLLOW_rule__Block__Group__1__Impl_in_rule__Block__Group__15089);\n rule__Block__Group__1__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__Block__Group__2_in_rule__Block__Group__15092);\n rule__Block__Group__2();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public static int sizeBits_group() {\n return 8;\n }",
"int getGroupIndex(int position);",
"abstract public int getNumberOfBlocks();",
"@Override\r\n public long getChildId(int groupPosition, int childPosition) {\n return childPosition;\r\n }",
"public SolrSearchResult<Group> findGroups(SimpleQuery query, int skipBlocks, int blockSize) throws JsonProcessingException, IOException, NdexException{\n\t\tJsonNode postData = objectMapper.valueToTree(query);\n\t\treturn ndexRestClient.postSearchQuery(NdexApiVersion.v2 + \"/search/group?start=\" + skipBlocks + \"&size=\" + blockSize , postData, Group.class);\n\t}",
"public int getGroup() {\n return group;\n }",
"public void testFetchBlocks() throws IOException {\n\t\tLocalRawDataBlockList list = new LocalRawDataBlockList();\r\n\t\tbyte[] data = new byte[512];\r\n\t\tint offset = 0;\r\n\r\n\t\tLittleEndian.putInt(data, offset, -3); // for the BAT block itself\r\n\t\toffset += LittleEndianConsts.INT_SIZE;\r\n\r\n\t\t// document 1: is at end of file already; start block = -2\r\n\t\t// document 2: has only one block; start block = 1\r\n\t\tLittleEndian.putInt(data, offset, -2);\r\n\t\toffset += LittleEndianConsts.INT_SIZE;\r\n\r\n\t\t// document 3: has a loop in it; start block = 2\r\n\t\tLittleEndian.putInt(data, offset, 2);\r\n\t\toffset += LittleEndianConsts.INT_SIZE;\r\n\r\n\t\t// document 4: peeks into document 2's data; start block = 3\r\n\t\tLittleEndian.putInt(data, offset, 4);\r\n\t\toffset += LittleEndianConsts.INT_SIZE;\r\n\t\tLittleEndian.putInt(data, offset, 1);\r\n\t\toffset += LittleEndianConsts.INT_SIZE;\r\n\r\n\t\t// document 5: includes an unused block; start block = 5\r\n\t\tLittleEndian.putInt(data, offset, 6);\r\n\t\toffset += LittleEndianConsts.INT_SIZE;\r\n\t\tLittleEndian.putInt(data, offset, -1);\r\n\t\toffset += LittleEndianConsts.INT_SIZE;\r\n\r\n\t\t// document 6: includes a BAT block; start block = 7\r\n\t\tLittleEndian.putInt(data, offset, 8);\r\n\t\toffset += LittleEndianConsts.INT_SIZE;\r\n\t\tLittleEndian.putInt(data, offset, 0);\r\n\t\toffset += LittleEndianConsts.INT_SIZE;\r\n\r\n\t\t// document 7: includes an XBAT block; start block = 9\r\n\t\tLittleEndian.putInt(data, offset, 10);\r\n\t\toffset += LittleEndianConsts.INT_SIZE;\r\n\t\tLittleEndian.putInt(data, offset, -4);\r\n\t\toffset += LittleEndianConsts.INT_SIZE;\r\n\r\n\t\t// document 8: goes off into space; start block = 11;\r\n\t\tLittleEndian.putInt(data, offset, 1000);\r\n\t\toffset += LittleEndianConsts.INT_SIZE;\r\n\r\n\t\t// document 9: no screw ups; start block = 12;\r\n\t\tint index = 13;\r\n\r\n\t\tfor (; offset < 508; offset += LittleEndianConsts.INT_SIZE) {\r\n\t\t\tLittleEndian.putInt(data, offset, index++);\r\n\t\t}\r\n\t\tLittleEndian.putInt(data, offset, -2);\r\n\t\tlist.add(new RawDataBlock(new ByteArrayInputStream(data)));\r\n\t\tlist.fill(1);\r\n\t\tint[] blocks = { 0 };\r\n\t\tBlockAllocationTableReader table = new BlockAllocationTableReader(\r\n\t\t POIFSConstants.SMALLER_BIG_BLOCK_SIZE_DETAILS, 1, blocks, 0, -2, list);\r\n\t\tint[] start_blocks = { -2, 1, 2, 3, 5, 7, 9, 11, 12 };\r\n\t\tint[] expected_length = { 0, 1, -1, -1, -1, -1, -1, -1, 116 };\r\n\r\n\t\tfor (int j = 0; j < start_blocks.length; j++) {\r\n\t\t\ttry {\r\n\t\t\t\tListManagedBlock[] dataBlocks = table.fetchBlocks(start_blocks[j], -1, list);\r\n\r\n\t\t\t\tif (expected_length[j] == -1) {\r\n\t\t\t\t\tfail(\"document \" + j + \" should have failed, but found a length of \"\r\n\t\t\t\t\t\t\t+ dataBlocks.length);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tassertEquals(expected_length[j], dataBlocks.length);\r\n\t\t\t\t}\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\tif (expected_length[j] == -1) {\r\n\r\n\t\t\t\t\t// no problem, we expected a failure here\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthrow e;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void setGroupID(Long newGroupID)\n {\n this.groupID = newGroupID;\n }",
"@Override\r\n\tpublic View getGroupView(int groupPosition, boolean isExpanded, View convertView, ViewGroup parent) {\n\t\tGroupHolder grpHolder;\r\n\t\tString songHeader = ((SongHeader) getGroup(groupPosition)).getSongHeader();\r\n\t\tlong albumid = ((SongHeader) getGroup(groupPosition)).getAlbumid();\r\n if (convertView == null) {\r\n convertView = this.inflater.inflate(R.layout.player_group_list, null);\r\n grpHolder=new GroupHolder();\r\n grpHolder.groupText=(TextView) convertView.findViewById(R.id.groupMusicTitle);\r\n grpHolder.groupSongCount=(TextView) convertView.findViewById(R.id.groupSongCount);\r\n grpHolder.groupImage= (ImageView) convertView.findViewById(R.id.groupAlbumArt);\r\n grpHolder.dividerAbove=(View) convertView.findViewById(R.id.groupDividerAbove);\r\n //grpHolder.dividerBelow=(View) convertView.findViewById(R.id.groupDividerBelow);\r\n \r\n convertView.setTag(grpHolder);\r\n \r\n }\r\n else\r\n {\r\n \tgrpHolder=(GroupHolder)convertView.getTag();\r\n }\r\n \r\n if(groupPosition==0)\r\n {\r\n \tgrpHolder.dividerAbove.setVisibility(View.GONE);\r\n }\r\n else\r\n {\r\n \tgrpHolder.dividerAbove.setVisibility(View.VISIBLE);\r\n }\r\n \r\n grpHolder.groupText.setText(songHeader);\r\n int songCount=getChildrenCount(groupPosition)-1;\r\n grpHolder.groupSongCount.setText(songCount==1?songCount+\" song\":songCount+\" songs\");\r\n Log.d(TAG, \"album id \"+albumid);\r\n// if(albumid!=-1)\r\n// {\r\n \tgrpHolder.groupImage.setImageBitmap(MusicUtil.getArtworkQuick(this.context,albumid, 40, 40));\r\n \t\r\n // } \r\n \r\n return convertView; \r\n\t}",
"private int getChunk(byte [] buffer, int offset, String chunk) {\r\n\t\ttry {\r\n\t\t\tfor (;;) {\r\n\t\t\t\tint dataLenght = getInt(buffer, offset);\r\n\t\t\t\tif (compareBytes(buffer, offset+4, chunk)) {\r\n\t\t\t\t\treturn offset;\r\n\t\t\t\t} else {\r\n\t\t\t\t\toffset += 4 + 4 + dataLenght + 4;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {};\r\n\t\treturn -1;\r\n\t}",
"private void loadGroup(IMemento group)\n\t{\n\t\tRegistersGroupData groupData = new RegistersGroupData();\n\n\t\t// get group name\n\t\tString groupName = group.getString(FIELD_NAME);\n\t\tif (groupName == null)\n\t\t\treturn;\n\n\t\t// get group size\n\t\tIMemento mem = group.getChild(ELEMENT_TOTAL);\n\t\tif (mem == null)\n\t\t\treturn;\n\n\t\tInteger tempInt = mem.getInteger(FIELD_SIZE);\n\t\tif (tempInt == null)\n\t\t\treturn;\n\n\t\tgroupData.totalSize = tempInt.intValue();\n\n\t\t// check add total field\n\t\tgroupData.addTotalField = true;\n\t\tString tempStr = mem.getString(FIELD_ADD_TOTAL);\n\t\tif (tempStr != null && tempStr.equalsIgnoreCase(\"false\"))\n\t\t\tgroupData.addTotalField = false;\n\n\t\t// get sub-division\n\t\tIMemento[] mems = group.getChildren(ELEMENT_SUB);\n\t\tgroupData.indicies = new int[mems.length];\n\t\tgroupData.sizes = new int[mems.length];\n\t\tgroupData.names = new String[mems.length];\n\n\t\tfor (int ind=0; ind < mems.length; ind++)\n\t\t{\n\t\t\ttempInt = mems[ind].getInteger(FIELD_INDEX);\n\t\t\tif (tempInt == null)\n\t\t\t\treturn;\n\t\t\tgroupData.indicies[ind] = tempInt.intValue();\n\n\t\t\ttempInt = mems[ind].getInteger(FIELD_SIZE);\n\t\t\tif (tempInt == null)\n\t\t\t\treturn;\n\t\t\tgroupData.sizes[ind] = tempInt.intValue();\n\n\t\t\tgroupData.names[ind] = mems[ind].getString(FIELD_NAME);\n\t\t\tif (groupData.names[ind] == null)\n\t\t\t\treturn;\n\t\t}\n\n\t\t// add group data\n\t\tmapper.addGroup(groupName/*, groupData*/);\n\n\t\tmems = group.getChildren(ELEMENT_REGISTER);\n\t\tString[] register = new String[mems.length];\n\n\t\tfor (int ind=0; ind < mems.length; ind++)\n\t\t\tregister[ind] = mems[ind].getString(FIELD_NAME);\n\n\t\t// add registers\n\t\tmapper.addRegisters(groupName, register);\n\t}",
"alluxio.proto.journal.Block.BlockContainerIdGeneratorEntry getBlockContainerIdGenerator();",
"private int findDividingFactor(List<EventProducer> groupOfEP) {\n\t\tint dividingFactor = 0;\n\n\t\t// Try the first 10000 integer\n\t\tfor (int i = 1; i <= 10000; i++) {\n\t\t\tif (Math.pow(i, maxHierarchyDepth) > groupOfEP.size()) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tdividingFactor++;\n\t\t}\n\n\t\t// If we only found 1 as solution try to see if with the value 2, we\n\t\t// can find a working solution with a smaller hierarchy depth (which\n\t\t// means we will not necessarily reach the wanted maxdepth for this\n\t\t// group\n\t\tif (dividingFactor == 1) {\n\t\t\t// Try the first 10000 integer\n\t\t\tfor (int i = maxHierarchyDepth; i > 1; i--) {\n\t\t\t\tif (Math.pow(2, i) < groupOfEP.size()) {\n\t\t\t\t\tdividingFactor = 2;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn dividingFactor;\n\t}",
"public int getStorageGroupNum(PartialPath pathPattern, boolean isPrefixMatch)\n throws MetadataException {\n try (DatabaseCounter counter = new DatabaseCounter(root, pathPattern, store, isPrefixMatch)) {\n return (int) counter.count();\n }\n }",
"@Override\n public long getChildId(int groupPosition, int childPosition)\n {\n return childPosition;\n }",
"@Override\n public long getChildId(int groupPosition, int childPosition) {\n return childPosition;\n }",
"@Override\n public long getChildId(int groupPosition, int childPosition) {\n return childPosition;\n }",
"@Override\n public long getChildId(int groupPosition, int childPosition) {\n return childPosition;\n }",
"public final void rule__UpdateDivision__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:7720:1: ( ( ( rule__UpdateDivision__Group_1__0 )* ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:7721:1: ( ( rule__UpdateDivision__Group_1__0 )* )\n {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:7721:1: ( ( rule__UpdateDivision__Group_1__0 )* )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:7722:1: ( rule__UpdateDivision__Group_1__0 )*\n {\n before(grammarAccess.getUpdateDivisionAccess().getGroup_1()); \n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:7723:1: ( rule__UpdateDivision__Group_1__0 )*\n loop42:\n do {\n int alt42=2;\n int LA42_0 = input.LA(1);\n\n if ( (LA42_0==31) ) {\n alt42=1;\n }\n\n\n switch (alt42) {\n \tcase 1 :\n \t // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:7723:2: rule__UpdateDivision__Group_1__0\n \t {\n \t pushFollow(FOLLOW_rule__UpdateDivision__Group_1__0_in_rule__UpdateDivision__Group__1__Impl15142);\n \t rule__UpdateDivision__Group_1__0();\n\n \t state._fsp--;\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop42;\n }\n } while (true);\n\n after(grammarAccess.getUpdateDivisionAccess().getGroup_1()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"BigInteger getReportGroup();",
"protected int createGroup() {\n\t\tint id = _motherGroupID + 1;\n\t\twhile (_soundNodes.containsKey(id)) { id++; }\n\t\tcreateGroup(id);\n\t\treturn id;\n\t}",
"@java.lang.Override\n public int getGroupIndex() {\n return groupIndex_;\n }",
"void setGroupInfo(String groupName, int groupNumber, char insertionCode,\n\t\t\tString groupType, int atomCount, int bondCount, char singleLetterCode, \n\t\t\tint sequenceIndex, int secondaryStructureType);",
"public void format(int nodeCount)\n {\n this.inodeBlocks = nodeCount;\n Inode node = new Inode();\n byte[] block;\n\n for(int i = 0; i < inodeBlocks; i++)\n {\n node.flag = 0;\n node.toDisk((short) i);\n }\n\n freeList = (inodeBlocks / 16) + 2;\n for(int i = this.freeList; i < this.totalBlocks; i++)\n {\n block = new byte[Disk.blockSize];\n for(int j = 0; j < Disk.blockSize; j++)\n {\n block[j] = 0;\n }\n\n SysLib.int2bytes(i + 1, block, 0);\n SysLib.rawwrite(i, block);\n }\n\n this.sync();\n }",
"public final void rule__Block__Group__4() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2584:1: ( rule__Block__Group__4__Impl )\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2585:2: rule__Block__Group__4__Impl\n {\n pushFollow(FOLLOW_rule__Block__Group__4__Impl_in_rule__Block__Group__45272);\n rule__Block__Group__4__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public int getNumberOfBlocks(ImagePlus img, int m, int n);",
"public final void rule__Block__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2464:1: ( rule__Block__Group__0__Impl rule__Block__Group__1 )\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2465:2: rule__Block__Group__0__Impl rule__Block__Group__1\n {\n pushFollow(FOLLOW_rule__Block__Group__0__Impl_in_rule__Block__Group__05027);\n rule__Block__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__Block__Group__1_in_rule__Block__Group__05030);\n rule__Block__Group__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__PredicateDivision__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4530:1: ( rule__PredicateDivision__Group__1__Impl )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4531:2: rule__PredicateDivision__Group__1__Impl\n {\n pushFollow(FOLLOW_rule__PredicateDivision__Group__1__Impl_in_rule__PredicateDivision__Group__18902);\n rule__PredicateDivision__Group__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"abstract E createSplit(RandomAccessFile raf, long length) throws IOException;",
"public int getGroup() throws StandardException;",
"public final void rule__Partition__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMLRegression.g:1735:1: ( rule__Partition__Group__0__Impl rule__Partition__Group__1 )\n // InternalMLRegression.g:1736:2: rule__Partition__Group__0__Impl rule__Partition__Group__1\n {\n pushFollow(FOLLOW_4);\n rule__Partition__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__Partition__Group__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"@Override\n public long getChildId(int groupPosition, int childPosition) {\n return childPosition;\n }",
"public Chunks chunkDivide(List<Integer> S, int c) {\n\t\tdouble chunks = Math.ceil(c/2.0);\n\t\tList<Integer> S1 = new ArrayList<Integer>();\n\t\tList<Integer> S2 = new ArrayList<Integer>();\n\t\tint j = 0;\n\t\twhile(j < chunks) {\t\n\t\t\twhile(comps(S.get(0), S.get(1)) && S.size() > 1 && (S.get(0) < S.get(1))){\t\t//comparisons\n\t\t\t\tS1.add(S.remove(0));\n\t\t\t}\n\t\t\tS1.add(S.remove(0));\n\t\t\tj++;\n\t\t} \n\t\twhile(S.size() != 0) {\n\t\t\tS2.add(S.remove(0));\n\t\t}\t\n\t\tChunks p = new Chunks(S1, S2);\n\t\treturn p;\n\t}",
"public final void rule__PredicateDivision__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4501:1: ( rule__PredicateDivision__Group__0__Impl rule__PredicateDivision__Group__1 )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4502:2: rule__PredicateDivision__Group__0__Impl rule__PredicateDivision__Group__1\n {\n pushFollow(FOLLOW_rule__PredicateDivision__Group__0__Impl_in_rule__PredicateDivision__Group__08843);\n rule__PredicateDivision__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__PredicateDivision__Group__1_in_rule__PredicateDivision__Group__08846);\n rule__PredicateDivision__Group__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"@Override\n public void generateKeysForBlock(ValueBlock valueBlock, int[] groupKeys) {\n for (int i = 0; i < _numGroupByExpressions; i++) {\n BlockValSet blockValueSet = valueBlock.getBlockValueSet(_groupByExpressions[i]);\n _singleValueDictIds[i] = blockValueSet.getDictionaryIdsSV();\n }\n _rawKeyHolder.processSingleValue(valueBlock.getNumDocs(), groupKeys);\n }",
"protected void decodeChunk(byte[] block, int start, final int end)\r\n {\n long st = this.bitstream.readBits(64);\r\n final long mask = (1L << this.logRange) - 1;\r\n\r\n for (int i=start; i<end; i++)\r\n {\r\n final int idx = (int) (st & mask);\r\n final int symbol = this.f2s[idx];\r\n block[i] = (byte) symbol;\r\n\r\n // Compute next ANS state\r\n // D(x) = (s, q_s (x/M) + mod(x,M) - b_s) where s is such b_s <= x mod M < b_{s+1}\r\n st = (this.freqs[symbol] * (st >>> this.logRange)) + idx - this.cumFreqs[symbol];\r\n\r\n // Normalize\r\n while (st < ANS_TOP)\r\n st = (st << 32) | this.bitstream.readBits(32);\r\n }\r\n }",
"public final void rule__PredicateDivision__Group_1__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4624:1: ( rule__PredicateDivision__Group_1__2__Impl )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4625:2: rule__PredicateDivision__Group_1__2__Impl\n {\n pushFollow(FOLLOW_rule__PredicateDivision__Group_1__2__Impl_in_rule__PredicateDivision__Group_1__29087);\n rule__PredicateDivision__Group_1__2__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public int getBlockIncrement(int param1Int) {\n/* 783 */ JViewport jViewport = JScrollPane.this.getViewport();\n/* 784 */ if (this.blockIncrementSet || jViewport == null) {\n/* 785 */ return super.getBlockIncrement(param1Int);\n/* */ }\n/* 787 */ if (jViewport.getView() instanceof Scrollable) {\n/* 788 */ Scrollable scrollable = (Scrollable)jViewport.getView();\n/* 789 */ Rectangle rectangle = jViewport.getViewRect();\n/* 790 */ return scrollable.getScrollableBlockIncrement(rectangle, getOrientation(), param1Int);\n/* */ } \n/* 792 */ if (getOrientation() == 1) {\n/* 793 */ return (jViewport.getExtentSize()).height;\n/* */ }\n/* */ \n/* 796 */ return (jViewport.getExtentSize()).width;\n/* */ }",
"@Override\n public void generateKeysForBlock(ValueBlock valueBlock, int[][] groupKeys) {\n for (int i = 0; i < _numGroupByExpressions; i++) {\n BlockValSet blockValueSet = valueBlock.getBlockValueSet(_groupByExpressions[i]);\n if (_isSingleValueColumn[i]) {\n _singleValueDictIds[i] = blockValueSet.getDictionaryIdsSV();\n } else {\n _multiValueDictIds[i] = blockValueSet.getDictionaryIdsMV();\n }\n }\n _rawKeyHolder.processMultiValue(valueBlock.getNumDocs(), groupKeys);\n }",
"@Override\r\n\tpublic long getChildId(int groupPosition, int childPosition) {\n\t\treturn 0;\r\n\t}",
"private int getEntBlock(FileTableEntry ftEnt)\n\t{\n\t\tint block = ftEnt.seekPtr / Disk.blockSize;\n\t\t//get actual block number\n\t\tif (block < Inode.directSize)\n\t\t{\n\t\t\treturn (int)ftEnt.inode.direct[block];\n\t\t}\n\n\t\tbyte[] temp = new byte[Disk.blockSize];\n\t\tSysLib.rawread((int)ftEnt.inode.indirect, temp);\n\t\treturn (int)SysLib.bytes2short(temp, (block - Inode.directSize) * 2);\n\t}",
"public CArrayFacade<Byte> getDefgrp_name() throws IOException\n\t{\n\t\tClass<?>[] __dna__targetTypes = new Class[]{Byte.class};\n\t\tint[] __dna__dimensions = new int[]{\n\t\t\t64\n\t\t};\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn new CArrayFacade<Byte>(__io__address + 128, __dna__targetTypes, __dna__dimensions, __io__block, __io__blockTable);\n\t\t} else {\n\t\t\treturn new CArrayFacade<Byte>(__io__address + 108, __dna__targetTypes, __dna__dimensions, __io__block, __io__blockTable);\n\t\t}\n\t}",
"Object getGroupID(String groupName) throws Exception;",
"public final void rule__PredicateDivision__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4541:1: ( ( ( rule__PredicateDivision__Group_1__0 )* ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4542:1: ( ( rule__PredicateDivision__Group_1__0 )* )\n {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4542:1: ( ( rule__PredicateDivision__Group_1__0 )* )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4543:1: ( rule__PredicateDivision__Group_1__0 )*\n {\n before(grammarAccess.getPredicateDivisionAccess().getGroup_1()); \n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4544:1: ( rule__PredicateDivision__Group_1__0 )*\n loop28:\n do {\n int alt28=2;\n int LA28_0 = input.LA(1);\n\n if ( (LA28_0==31) ) {\n alt28=1;\n }\n\n\n switch (alt28) {\n \tcase 1 :\n \t // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4544:2: rule__PredicateDivision__Group_1__0\n \t {\n \t pushFollow(FOLLOW_rule__PredicateDivision__Group_1__0_in_rule__PredicateDivision__Group__1__Impl8929);\n \t rule__PredicateDivision__Group_1__0();\n\n \t state._fsp--;\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop28;\n }\n } while (true);\n\n after(grammarAccess.getPredicateDivisionAccess().getGroup_1()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__UpdateDivision__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:7680:1: ( rule__UpdateDivision__Group__0__Impl rule__UpdateDivision__Group__1 )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:7681:2: rule__UpdateDivision__Group__0__Impl rule__UpdateDivision__Group__1\n {\n pushFollow(FOLLOW_rule__UpdateDivision__Group__0__Impl_in_rule__UpdateDivision__Group__015056);\n rule__UpdateDivision__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__UpdateDivision__Group__1_in_rule__UpdateDivision__Group__015059);\n rule__UpdateDivision__Group__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Partition__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMLRegression.g:1762:1: ( rule__Partition__Group__1__Impl rule__Partition__Group__2 )\n // InternalMLRegression.g:1763:2: rule__Partition__Group__1__Impl rule__Partition__Group__2\n {\n pushFollow(FOLLOW_16);\n rule__Partition__Group__1__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__Partition__Group__2();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"protected Version putChunks(long startByte,\n byte chunkPrefix[],\n Version metadataVersion)\n throws IOException {\n\n if (((chunkPrefix == null) != ((startByte % chunkSize) == 0))) {\n throw new IllegalStateException(\"start byte:\" + startByte +\n \" chunk size:\" + chunkSize +\n \" inconsistent with prefix chunk:\" +\n chunkPrefix);\n }\n\n if ((lobSize < 0) || (numChunks < 0)) {\n throw new IllegalStateException(\"lobSize:\" + lobSize +\n \" numChunks:\" + numChunks);\n }\n\n byte chunk[] = new byte[chunkSize];\n boolean initialReplacePut = false;\n\n int currentSize = 0;\n if (chunkPrefix != null) {\n currentSize = chunkPrefix.length;\n lobSize -= currentSize;\n /* Back up over the chunk, so we can overwrite it. */\n numChunks--;\n System.arraycopy(chunkPrefix, 0, chunk, 0, currentSize);\n initialReplacePut = true;\n }\n\n final ChunkKeysIterator chunkKeys =\n getChunkKeysByteRangeIterator(startByte, Long.MAX_VALUE);\n\n readLoop:\n while (true) {\n int readBytes = -1;\n\n /* Fill up a chunk. */\n while (currentSize < chunkSize) {\n readBytes = lobStream.read(chunk, currentSize,\n (chunkSize - currentSize));\n if (readBytes == -1) {\n if (currentSize > 0) {\n break;\n }\n break readLoop;\n }\n currentSize += readBytes;\n }\n\n final Key chunkKey = chunkKeys.next();\n\n /* Write it, vary the durability based upon the chunk. */\n final Durability chunkDurability = (readBytes == -1) ||\n (chunkKeys.getChunkId() == chunksPerPartition) ?\n lobDurability : CHUNK_DURABILITY;\n\n putChunk(chunkKey, chunk, currentSize,\n initialReplacePut, chunkDurability);\n numChunks++;\n if (chunkKeys.getChunkId() == 1) {\n metadataVersion =\n checkpointSuperChunkId(chunkKeys.getSuperChunkId(),\n metadataVersion);\n }\n lobSize += currentSize;\n currentSize = 0;\n initialReplacePut = false;\n }\n\n return metadataVersion;\n }",
"public int getPartition(Integer item) {\n return ((item % x) / y);\n }",
"public final void rule__PredicateDivision__Group_1__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4562:1: ( rule__PredicateDivision__Group_1__0__Impl rule__PredicateDivision__Group_1__1 )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4563:2: rule__PredicateDivision__Group_1__0__Impl rule__PredicateDivision__Group_1__1\n {\n pushFollow(FOLLOW_rule__PredicateDivision__Group_1__0__Impl_in_rule__PredicateDivision__Group_1__08964);\n rule__PredicateDivision__Group_1__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__PredicateDivision__Group_1__1_in_rule__PredicateDivision__Group_1__08967);\n rule__PredicateDivision__Group_1__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public int NextMbAddress(int n) {\n\t\tint PicSizeInMapUnits= (sps0.pic_width_in_mbs_minus_1+1)*(sps0.pic_height_in_map_units_minus_1+1);\n\t\t// int FrameHeightInMbs = (2-(sps0.frame_mbs_only_flag ? 1:0))*(sps0.pic_height_in_map_units_minus_1+1);\n \t\t// int PicHeightInMbs = FrameHeightInMbs / (1+(field_pic_flag ? 1:0));\n\n \t\tint PicSizeInMbs = (sps0.pic_width_in_mbs_minus_1+1) * (PicHeightInMbs);\n\t\t// (7-34)\n\t\tint MapUnitsInSliceGroup0 = Math.min(((pps0.slice_group_change_rate_minus1 + 1) * slice_group_change_cycle), \n\t\t\t(PicSizeInMapUnits));\n\t\t// System.out.println(MapUnitsInSliceGroup0);\n\t\tint sizeOfUpperLeftGroup;\n\t\tif(pps0.num_slice_groups_minus1==1&&(pps0.slice_group_map_type==4||pps0.slice_group_map_type==5)){\n\n\t\t\tsizeOfUpperLeftGroup=(pps0.slice_group_change_direction_flag ? (PicSizeInMapUnits - MapUnitsInSliceGroup0)\n\t\t\t\t: MapUnitsInSliceGroup0);\n\t\t}\n\t\tint [] mapUnitToSliceGroupMap=new int[PicSizeInMapUnits];\n\t\tif(pps0.num_slice_groups_minus1==0){\n\t\t\t// System.out.println(\"zero \");\n\t\t\tfor(int i=0;i<pps0.pic_size_in_map_units_minus1+1;i++){\n\t\t\t\tmapUnitToSliceGroupMap[i]=0;\n\t\t\t}\t\t\t\n\t\t}\n\n\t\telse if(pps0.num_slice_groups_minus1!=0){\n\t\t\tif(pps0.slice_group_map_type==0){\n\t\t\t\t// 8.2.2.1\n\t\t\t}\n\t\t\telse if(pps0.slice_group_map_type==1){\n\t\t\t\t// 8.2.2.2\n\t\t\t}else if(pps0.slice_group_map_type==2){\n\t\t\t\t// 8.2.2.3\n\t\t\t}else if(pps0.slice_group_map_type==3){\n\t\t\t\t// 8.2.2.4\n\t\t\t}else if(pps0.slice_group_map_type==4){\n\t\t\t\t// 8.2.2.5\n\t\t\t}\n\t\t\telse if(pps0.slice_group_map_type==5){\n\t\t\t\t// 8.2.2.6\n\t\t\t}\n\t\t\telse if(pps0.slice_group_map_type==6){\n\t\t\t\t// 8.2.2.7\n\t\t\t}\n\t\t}\n\n\n\t\t\t\t\t\t\t\t\t/* 8.2.2.8 */\n \t\tint[] MbToSliceGroupMap=new int[PicSizeInMbs];\n \t\tfor(int i=0;i<PicSizeInMbs;i++){\n \t\t\tif(sps0.frame_mbs_only_flag==true||field_pic_flag==true){\n \t\t\t\t// System.out.println(PicSizeInMbs+\" \"+PicSizeInMapUnits);\n \t\t\t\tMbToSliceGroupMap[i]=mapUnitToSliceGroupMap[i];\n \t\t\t} else if(MbaffFrameFlag){\n \t\t\t\tMbToSliceGroupMap[i]=mapUnitToSliceGroupMap[(int)i/2];\n\n \t\t\t}else if(sps0.frame_mbs_only_flag==false&&sps0.mb_adaptive_frame_field_flag==false&&field_pic_flag==false){\n \t\t\t\tMbToSliceGroupMap[i]=mapUnitToSliceGroupMap[(int)(i/(2*sps0.pic_width_in_mbs_minus_1+1))\n \t\t\t\t*sps0.pic_width_in_mbs_minus_1+1+(i%sps0.pic_width_in_mbs_minus_1+1)];\n \t\t\t}\n\n \t\t}\n\t\t// i = n + 1 \n\t\t// while( i < PicSizeInMbs && MbToSliceGroupMap[ i ] != MbToSliceGroupMap[ n ] )\n\t\t // i++; \n\t\t// nextMbAddress = i\n\t\tint i = n + 1;\n\t\t// int nextMbAddress = i;\n\n\t\twhile(i<PicSizeInMbs &&( MbToSliceGroupMap[i]!=MbToSliceGroupMap[n])) {\n\t\t\ti++;\n\t\t\t// System.out.println(\"here mb address\");\n\t\t\t// nextMbAddress = i;\n\t\t}\n\t\t// System.out.println(\"nextMbAddress \"+i);\n\t\treturn i;\n\t}",
"int getChunkId();",
"int getChunkId();"
] | [
"0.6041416",
"0.59619606",
"0.56081045",
"0.5494493",
"0.5483256",
"0.54710495",
"0.54404694",
"0.5388753",
"0.53580827",
"0.52225417",
"0.50546676",
"0.50050926",
"0.49702355",
"0.49492335",
"0.49432147",
"0.4933865",
"0.49241203",
"0.4923733",
"0.49106303",
"0.49032998",
"0.48861465",
"0.48788375",
"0.48638648",
"0.4855107",
"0.4855107",
"0.4855107",
"0.48447958",
"0.48181772",
"0.48133984",
"0.47311515",
"0.47274005",
"0.47274005",
"0.47262877",
"0.47191346",
"0.47165865",
"0.46982142",
"0.46982142",
"0.46927822",
"0.46927822",
"0.4689011",
"0.46880975",
"0.46646243",
"0.4616464",
"0.4613929",
"0.45972252",
"0.45954502",
"0.45587736",
"0.45502317",
"0.4546847",
"0.45359027",
"0.45338058",
"0.45265013",
"0.45188636",
"0.4507337",
"0.45007583",
"0.4491356",
"0.44757667",
"0.44749668",
"0.44683847",
"0.44681525",
"0.4465227",
"0.44649932",
"0.44579235",
"0.44524124",
"0.44524124",
"0.44524124",
"0.44472653",
"0.44393393",
"0.44390765",
"0.44336995",
"0.44252405",
"0.442424",
"0.44239587",
"0.44184354",
"0.44089732",
"0.44042054",
"0.440324",
"0.4401049",
"0.4394689",
"0.43898457",
"0.43882826",
"0.43866968",
"0.43866283",
"0.43863085",
"0.43827447",
"0.43795335",
"0.43795076",
"0.43777117",
"0.43768713",
"0.4372808",
"0.43694925",
"0.43682832",
"0.436446",
"0.43591273",
"0.4354543",
"0.43436772",
"0.43431184",
"0.43384755",
"0.43376616",
"0.43376616"
] | 0.7460544 | 0 |
this method gets the inodes index in the group descriptors inode table by dividing the two values and returns an integer | private int getInodeIndex(int inodeNumber, int inodesPerGroup){
//gets the index of the inode from the group descriptors inode table
return (inodeNumber/inodesPerGroup);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getInodesPerGroup()\n {\n return inodesPerGroup;\n }",
"public int inodeTablePointer(int groupDescriptorNo) throws IOException\n {\n \tByteBuffer buf_groupDescriptor = ByteBuffer.allocate(1024);\n \tbuf_groupDescriptor.order(ByteOrder.LITTLE_ENDIAN);\n \tbyte[] bytes = new byte[1024];\n f.seek(2048);\n \tf.read(bytes);\n \n \tbuf_groupDescriptor.put(bytes);\n inodeTablePointer = buf_groupDescriptor.getInt((groupDescriptorNo*32)+8);\n //System.out.println(\"inodeTablePointer \"+groupDescriptorNo +\" : \"+ inodeTablePointer);\n return inodeTablePointer;\n }",
"private double getInodeBlockGroup(int inodeNumber, int inodesPerGroup){\n\n inodeNumber--;\n return (inodeNumber % inodesPerGroup);\n }",
"private int getIndex2(int val){\n return val/bucket;\n }",
"private int getIndex(int val){\n return val%bucket;\n }",
"Collection getIndexesInGroup(Object groupID) throws Exception;",
"private static short findIndexNode(String path, IndexNode inode)\n throws Exception {\n // start with the root file system, root inode\n FileSystem fileSystem = openFileSystems[ROOT_FILE_SYSTEM];\n IndexNode indexNode = getRootIndexNode();\n short indexNodeNumber = FileSystem.ROOT_INDEX_NODE_NUMBER;\n\n // parse the path until we get to the end\n StringTokenizer st = new StringTokenizer(path, \"/\");\n while (st.hasMoreTokens()) {\n String s = st.nextToken();\n if (!s.equals(\"\")) {\n // check to see if it is a directory\n if ((indexNode.getMode() & S_IFMT) != S_IFDIR) {\n // return (ENOTDIR) if a needed directory is not a directory\n process.errno = ENOTDIR;\n return -1;\n }\n\n // check to see if it is readable by the user\n // ??? tbd\n // return (EACCES) if a needed directory is not readable\n\n IndexNode nextIndexNode = new IndexNode();\n // get the next index node corresponding to the token\n indexNodeNumber = findNextIndexNode(\n fileSystem, indexNode, s, nextIndexNode);\n if (indexNodeNumber < 0) {\n // return ENOENT\n process.errno = ENOENT;\n return -1;\n }\n indexNode = nextIndexNode;\n }\n }\n // copy indexNode to inode\n indexNode.copy(inode);\n return indexNodeNumber;\n }",
"public int getBlockNumber(int inodeOffset, Volume v){\n\n int blockNumber = 0;\n if(inodeOffset > v.getSuperBlock().getTotalInodes()){\n\n new Ext2Error(\"the inode offset is invalid as it is greater than the total number of inodes found in the superblock\").print();\n\n }else if(inodeOffset < v.getSuperBlock().getTotalInodes()){\n double inodeBlockGroup = getInodeBlockGroup(inodeOffset, v.getSuperBlock().getNumberOfInodesPerGroup()); //this is the block group that the inode is inside of\n int blockGroupPosition = getInodeIndex(inodeOffset, v.getSuperBlock().getNumberOfInodesPerGroup()); //gets the index of the inode in the group descriptors inode table\n int inodeTablePointer = v.getGroupDescriptor().getInodeTablePointers()[blockGroupPosition]; //the inode table inodeBlockGroup of the block group of the block group (1,2 or 3 in this instance)\n double block = calculateContainingBlock(inodeBlockGroup, v.getSuperBlock().getInodeSize(), inodeTablePointer);\n blockNumber = (int) block;\n }\n return blockNumber;\n }",
"int getBlockNumbers(int index);",
"int getGroupIndex(int position);",
"public int getCol_groups() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn __io__block.readInt(__io__address + 8);\n\t\t} else {\n\t\t\treturn __io__block.readInt(__io__address + 8);\n\t\t}\n\t}",
"public long getNodeIndex();",
"int getDiskNum();",
"private int parentIndex(int i) {\n return i / 2;\n }",
"public int getGroup() throws StandardException;",
"private double calculateContainingBlock(double inodeBlockGroup, int inodeSize, int inodeTablePointer){\n return ((inodeBlockGroup * inodeSize / Ext2StaticConstants.START_POSITION) + inodeTablePointer) * Ext2StaticConstants.START_POSITION;\n }",
"private int getEntBlock(FileTableEntry ftEnt)\n\t{\n\t\tint block = ftEnt.seekPtr / Disk.blockSize;\n\t\t//get actual block number\n\t\tif (block < Inode.directSize)\n\t\t{\n\t\t\treturn (int)ftEnt.inode.direct[block];\n\t\t}\n\n\t\tbyte[] temp = new byte[Disk.blockSize];\n\t\tSysLib.rawread((int)ftEnt.inode.indirect, temp);\n\t\treturn (int)SysLib.bytes2short(temp, (block - Inode.directSize) * 2);\n\t}",
"private int findDividingFactor(List<EventProducer> groupOfEP) {\n\t\tint dividingFactor = 0;\n\n\t\t// Try the first 10000 integer\n\t\tfor (int i = 1; i <= 10000; i++) {\n\t\t\tif (Math.pow(i, maxHierarchyDepth) > groupOfEP.size()) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tdividingFactor++;\n\t\t}\n\n\t\t// If we only found 1 as solution try to see if with the value 2, we\n\t\t// can find a working solution with a smaller hierarchy depth (which\n\t\t// means we will not necessarily reach the wanted maxdepth for this\n\t\t// group\n\t\tif (dividingFactor == 1) {\n\t\t\t// Try the first 10000 integer\n\t\t\tfor (int i = maxHierarchyDepth; i > 1; i--) {\n\t\t\t\tif (Math.pow(2, i) < groupOfEP.size()) {\n\t\t\t\t\tdividingFactor = 2;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn dividingFactor;\n\t}",
"public int index(AdapterNode child) {\n int count = childCount();\n\n for (int i = 0; i < count; i++) {\n AdapterNode n = this.child(i);\n\n if (child == n) {\n return i;\n }\n }\n\n return -1; // Should never get here.\n }",
"public int getPartition(Integer item) {\n return ((item % x) / y);\n }",
"public abstract int getNumIndexes();",
"public void getAccessionNumber(int seqid, String tag, String gid);",
"long getIds(int index);",
"private int indexForKey(final long key, final int i) {\n keyArr[0] = key;\n return columns * i + (((int) (MurmurHash3.hash(keyArr, i)[0])) >>> 1) % columns;\n }",
"public alluxio.proto.journal.File.InodeDirectoryIdGeneratorEntry getInodeDirectoryIdGenerator() {\n return inodeDirectoryIdGenerator_;\n }",
"int getSplitIndex();",
"public native int kbAreaGroupGetIDByPosition(vector position);",
"public int getFileIndexToInsert()\r\n\t{\r\n\t\tif(n1<n2 || algo==1)\r\n\t\t\treturn 0;\r\n\t\telse \r\n\t\t\treturn 1;\r\n\t}",
"protected abstract int getBucketIndex(int freeSpace);",
"public static int size_group() {\n return (8 / 8);\n }",
"short getKeyIx();",
"alluxio.proto.journal.File.InodeDirectoryIdGeneratorEntry getInodeDirectoryIdGenerator();",
"alluxio.proto.journal.File.InodeDirectoryEntry getInodeDirectory();",
"int getOtherIds(int index);",
"@SuppressWarnings(\"unchecked\")\n private static int getCurrentIndexFrom(SimpleNetworkWrapper networkWrapper){\n try {\n FMLIndexedMessageToMessageCodec c = (FMLIndexedMessageToMessageCodec) codec.get(networkWrapper);\n byte[] ids = ((TByteObjectHashMap) discriminators.get(c)).keys();\n int ret = 0;\n for (byte b : ids){\n ret = Math.max(ret, b);\n }\n return ret;\n } catch (Exception e){\n throw new RuntimeException(e);\n }\n }",
"private int getAdapterIndexNumber(int i)\n\t{\n\t\tif (mAdapter != null)\n\t\t{\n\t\t\tif (mCircleScrolling)\n\t\t\t{\n\t\t\t\tint result = i % mAdapter.getCount();\n\t\t\t\treturn result<0?result + mAdapter.getCount():result;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn i;\n\t\t\t\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}",
"private int getNIdx() {\n return this.colStartOffset + 7;\n }",
"public int hIndexV2(int[] citations) {\n int n = citations.length;\n int lo = 0;\n int hi = n;\n while (lo < hi) {\n int mid = lo + (hi - lo) / 2;\n if (citations[mid] < n - mid) {\n lo = mid + 1;\n } else {\n hi = mid;\n }\n }\n return n - lo;\n }",
"private int getIndex(int key) {\n\t\treturn key % MAX_LEN;\n\t}",
"private int parent(int i) {\n double d = (double) i;\n d = Math.floor((d - 1) / 2);\n return (int) d;\n\n }",
"int getChunkIndex();",
"int getChunkIndex();",
"private int indexFor(K key) {\n int hash = hash(key.hashCode());\n return hash % this.container.length;\n }",
"public int getNomRangeBits(int i) {\n/* 344 */ switch (this.h) {\n/* */ case 1:\n/* */ case 2:\n/* 347 */ return this.i[i];\n/* */ case 0:\n/* 349 */ return this.e.getNomRangeBits(i);\n/* */ } \n/* 351 */ throw new IllegalArgumentException(\"Non JPEG 2000 part I component transformation\");\n/* */ }",
"public static int offset_group() {\n return (24 / 8);\n }",
"int getIndexesCount();",
"public alluxio.proto.journal.File.InodeDirectoryIdGeneratorEntry getInodeDirectoryIdGenerator() {\n if (inodeDirectoryIdGeneratorBuilder_ == null) {\n return inodeDirectoryIdGenerator_;\n } else {\n return inodeDirectoryIdGeneratorBuilder_.getMessage();\n }\n }",
"BigInteger getNumRegistro();",
"private int getChildIndex(long descendent) {\n long destinationChild = ZQuad.getChildThatsAncestorOf(this.quad, descendent);\n // What is the descendancy of that child relative to this one?\n long descendancy = ZQuad.getDescendancy(destinationChild, 1);\n // The scalar component is what we're looking for.\n return (int) ZQuad.quadToScalar(descendancy, 1);\n }",
"private static int open(FileDescriptor fileDescriptor) {\n // scan the kernel open file list for a slot \n // and add our new file descriptor\n int kfd = -1;\n for (int i = 0; i < MAX_OPEN_FILES; i++)\n if (openFiles[i] == null) {\n kfd = i;\n openFiles[kfd] = fileDescriptor;\n break;\n }\n if (kfd == -1) {\n // return (ENFILE) if there are already too many open files\n process.errno = ENFILE;\n return -1;\n }\n\n // scan the list of open files for a slot \n // and add our new file descriptor\n int fd = -1;\n for (int i = 0; i < ProcessContext.MAX_OPEN_FILES; i++)\n if (process.openFiles[i] == null) {\n fd = i;\n process.openFiles[fd] = fileDescriptor;\n break;\n }\n if (fd == -1) {\n // remove the file from the kernel list\n openFiles[kfd] = null;\n // return (EMFILE) if there isn't room left\n process.errno = EMFILE;\n return -1;\n }\n\n // return the index of the file descriptor for now open file\n return fd;\n }",
"@Override\n public int indeksTil(T verdi) {\n int indeks=0;\n Node<T> curr= hode;\n for (; curr!=null; curr= curr.neste, indeks++){\n if (curr.verdi.equals(verdi)){\n return indeks;\n\n }// end if\n\n }// end for\n return -1;\n }",
"@java.lang.Override\n public int getGroupIndex() {\n return instance.getGroupIndex();\n }",
"public int getIfIndex()\r\n { return ifindex; }",
"private int get_parent(int index){\r\n return (index-1)/2;\r\n }",
"private static int getDividingIndex(String fullPath) {\n int baseEnd = fullPath.lastIndexOf(\"/\");\n if (fullPath.substring(0, baseEnd).endsWith(COMMAND_PATH)) {\n baseEnd = fullPath.substring(0, baseEnd).lastIndexOf(\"/\");\n }\n return baseEnd;\n }",
"protected int parent(int i) { return (i - 1) / 2; }",
"public synchronized int getiNumber(String fileName, boolean fCreate)\n {\n int iNumber = -1;\n int firstEmpty = -1;\n\n // Bad parameter\n if (fileName == null)\n {\n return -1;\n }\n\n // Return an error if the filename is too long\n if (fileName.length() > maxChars)\n {\n return -1;\n }\n\n // Must provide at least one character\n if (fileName.length() < 1)\n {\n return -1;\n }\n \n // Search the vector for the filename, \n // keeping track of the first empty element\n for (int i = 0; i < files.size(); i++)\n {\n if (files.get(i).equals(fileName))\n {\n iNumber = i;\n break;\n }\n else if (files.get(i).equals(\"\") && firstEmpty < 0)\n { \n // Confirm that the Inode is not being used.\n // (Inodes with count > 0 that aren't in the\n // directory are probably marked for deletion)\n Inode inode = new Inode(i);\n\n if (inode.getCount() < 1)\n {\n firstEmpty = i;\n }\n }\n }\n\n // If the file cannot be found, create a new one \n // at the first empty element.\n if (iNumber < 0 && fCreate)\n {\n // Out of directory space\n if (firstEmpty < 0)\n {\n return -1;\n }\n \n // Add the listing\n iNumber = firstEmpty;\n files.removeElementAt(iNumber);\n files.add(iNumber, fileName);\n flush();\n }\n\n return iNumber;\n }",
"alluxio.proto.journal.File.InodeFileEntry getInodeFile();",
"int getBlockNums(int index);",
"int getBlockNums(int index);",
"int getNumXTiles(Long id) throws RemoteException;",
"public int gradoEntrada(int i) {\n \tint grado = 0;\n \tfor(int j = 0; j < numV; j++) {\n \t\tif(existeArista(j, i)) grado ++;\n \t}\n \treturn grado; //el grado es el valor del grado de entrada de i\n }",
"public int getChildDrawingOrder(int i, int i2) {\n if (this.mDrawingOrder == 2) {\n i2 = (i - 1) - i2;\n }\n return ((LayoutParams) this.mDrawingOrderedChildren.get(i2).getLayoutParams()).childIndex;\n }",
"public abstract int getCntGrnd();",
"private int parent(int i){return (i-1)/2;}",
"private int getBinI(Location l)\r\n {\r\n return (int)((l.getX()-bl.getX())/di);\r\n }",
"@Override\n public Map<Chunk.Id<?>, Storage.Index> getIndices(final Address start, final Address end) throws IOException, InterruptedException {\n Map<Chunk.Id<?>, Storage.Index> indices = this.cache.getIndices(start, end);\n // System.out.println(\"hit \" + this.hit + \" miss \" + this.miss);\n if (indices != null) {\n // this.hit++;\n return indices;\n } else {\n // this.miss++;\n indices = this.base.getIndices(start, end);\n this.cache.add(start, end, new HashMap<>(indices)); // 防御的複製。\n return indices;\n }\n }",
"private static int getIndexInBitSetFor(final long value) {\n return (int) (value & DIVISOR);\n }",
"public String getINodeId(String resource_id, String inode_id)\n {\n String node_id = null;\n OrientGraph graph = null;\n try\n {\n graph = factory.getTx();\n\n Iterable<Vertex> resultIterator = graph.command(new OCommandSQL(\"SELECT rid FROM INDEX:iNode.nodePath WHERE key = [\\\"\" + resource_id + \"\\\",\\\"\" + inode_id + \"\\\"]\")).execute();\n\n Iterator<Vertex> iter = resultIterator.iterator();\n if(iter.hasNext())\n {\n Vertex v = iter.next();\n node_id = v.getProperty(\"rid\").toString();\n }\n if(node_id != null)\n {\n node_id = node_id.substring(node_id.indexOf(\"[\") + 1, node_id.indexOf(\"]\"));\n }\n }\n catch(Exception ex)\n {\n System.out.println(\"GraphDBEngine : getINodeID : Error \" + ex.toString());\n }\n finally\n {\n if(graph != null)\n {\n graph.shutdown();\n }\n }\n return node_id;\n }",
"private int getIndex(int u) {\n int ind = -1;\n for (int i = 0; i < getGraphRep().size(); i++) {\n ArrayList subList = getGraphRep().get(i);\n String temp = (String) subList.get(0);\n int vert = Integer.parseInt(temp);\n if (vert == u) {\n ind = i;\n }\n }\n return ind;\n }",
"public static int ID(Long[] iD2, long id) {\n\t\t for(int i=0 ; i<30 ; i++) {\n\t\t\t if(iD2[i]==id) {\n\t\t\t\t return i;\n\t\t\t } \n\t\t }\n\t\treturn -1;\n\t }",
"protected static int parent(int i){\n return (i-1)/2;\n }",
"protected abstract int applyGetIndex(CControlManager mgr, CDasherNode node);",
"int getNumberOfInfantry();",
"public alluxio.proto.journal.File.InodeDirectoryEntry getInodeDirectory() {\n return inodeDirectory_;\n }",
"int getBlockNumbersCount();",
"Integer getIPos();",
"public int getIndice() {\n\t\treturn this.indice;\n\t}",
"public int getStorageGroupNum(PartialPath pathPattern, boolean isPrefixMatch)\n throws MetadataException {\n try (DatabaseCounter counter = new DatabaseCounter(root, pathPattern, store, isPrefixMatch)) {\n return (int) counter.count();\n }\n }",
"public int toInt(String entity) { return ent_2_i.get(entity); }",
"protected final int getFileIdForIndex(int index) {\n return getChildIds().get(index);\n }",
"protected int index(int hashvalue) {\r\n\t\tint hash=hashvalue& 0x7fffffff;\r\n\t\tint index = this.hashFunc1(hash) * FREE.length;////获取一个整型数值(正整数),用来定位一条数据存储\r\n\t\t// int stepSize = hashFunc2(hash);\r\n\t\tbyte[] cur = new byte[4];\r\n\t\tkeys.position(index);\r\n\t\tkeys.get(cur);\r\n\t\tint storehash=(cur[0] << 24)+ ((cur[1] & 0xFF) << 16)+ ((cur[2] & 0xFF) << 8)+ (cur[3] & 0xFF);\r\n\t\tif (storehash==hash) {\r\n\t\t\treturn index;\r\n\t\t}\r\n\t\tif (Arrays.equals(cur, FREE)) {\r\n\t\t\treturn -1;\r\n\t\t}\r\n\r\n\t\t// NOTE: here it has to be REMOVED or FULL (some user-given value)\r\n\t\tif (Arrays.equals(cur, REMOVED) || storehash!=hash) {\r\n\t\t\t// see Knuth, p. 529\r\n\t\t\tfinal int probe = (1 + (hash % (size - 2))) * FREE.length;\r\n\t\t\tint z = 0;\r\n\t\t\tdo {\r\n\t\t\t\tz++;\r\n\t\t\t\tindex += (probe); // add the step\r\n\t\t\t\tindex %= (size * FREE.length); // for wraparound\r\n\t\t\t\tcur = new byte[FREE.length];\r\n\t\t\t\tkeys.position(index);\r\n\t\t\t\tkeys.get(cur);\r\n\t\t\t\tif (z > size) {\r\n\t\t\t\t\tSDFSLogger.getLog().info(\r\n\t\t\t\t\t\t\t\"entries exhaused size=\" + this.size + \" entries=\"\r\n\t\t\t\t\t\t\t\t\t+ this.entries);\r\n\t\t\t\t\treturn -1;\r\n\t\t\t\t}\r\n\t\t\t} while (!Arrays.equals(cur, FREE)\r\n\t\t\t\t\t&& (Arrays.equals(cur, REMOVED) || storehash!=hash));\r\n\t\t}\r\n\r\n\t\treturn storehash!=hash ? -1 : index;\r\n\t}",
"int getGroupCount();",
"public alluxio.proto.journal.File.InodeDirectoryIdGeneratorEntryOrBuilder getInodeDirectoryIdGeneratorOrBuilder() {\n return inodeDirectoryIdGenerator_;\n }",
"private int getIndex(K key){\n int hashcode=key.hashCode();\n int index=hashcode%maxBuckets;\n return index;\n }",
"public int getNodeToInsert(Instance inst) {\r\n\r\n int max_index = -1;\r\n int max_dimension = -1;\r\n\r\n for (int i = 0; i < numar_noduri; i++) {\r\n\r\n Nod nod = noduri.get(i);\r\n if (!nod.containsInstance(inst)\r\n && max_dimension < nod.dimensiune\r\n && nod.capacitate > nod.dimensiune) {\r\n\r\n max_dimension = nod.dimensiune;\r\n max_index = i;\r\n }\r\n }\r\n return max_index;\r\n }",
"int getRadix(Object elementID) throws Exception;",
"public alluxio.proto.journal.File.InodeDirectoryEntry getInodeDirectory() {\n if (inodeDirectoryBuilder_ == null) {\n return inodeDirectory_;\n } else {\n return inodeDirectoryBuilder_.getMessage();\n }\n }",
"public long getFileGroupId();",
"public static Set<Integer> getAllInterfaceIndexes(String deviceIp) throws IOException {\n\n Set<Integer> interfaceIndexes = new HashSet<>();\n\n try(SnmpService snmpService = new SnmpService()) {\n\n List<TreeEvent> treeEvents = snmpService.walk(deviceIp, DeviceOid.Tabular.IF_INDEX.value);\n if (Objects.isNull(treeEvents))\n throw new AccessTimeOutException(\"Access time out! Device ip: \" + \"'\" + deviceIp + \"'\");\n if (treeEvents.isEmpty())\n throw new UnexpectedErrorException(\"IfIndex table was not found. Device ip: \" + \"'\" + deviceIp + \"'\");\n\n for(TreeEvent treeEvent: treeEvents) {\n VariableBinding[] variableBindings = treeEvent.getVariableBindings();\n if(Objects.isNull(variableBindings))\n throw new AccessTimeOutException(\"Access time out! Device ip: \" + \"'\" + deviceIp + \"'\");\n\n for (VariableBinding variableBinding: variableBindings)\n interfaceIndexes.add(variableBinding.getVariable().toInt());\n }\n\n\n }\n\n return interfaceIndexes;\n }",
"@Override\n public int getG2HashTableNumberOfEntries() throws G2AccessException {\n java.lang.Object retnValue = getAttributeValue (SystemAttributeSymbols.G2_HASH_TABLE_NUMBER_OF_ENTRIES_);\n return ((Integer)retnValue).intValue ();\n }",
"public abstract int getNeighboursNumber(int index);",
"@java.lang.Override\n public int getGroupIndex() {\n return groupIndex_;\n }",
"static int parent(int i)\n {\n return (i-1)/2;\n }",
"protected HashMap<String, BPTree<Double, FoodItem>> getIndexes(){\n \treturn this.indexes;\n }",
"private int findIndexKey(BTreeNode<T> currentNode, I id) {\n for (int i = 0; i < 5; i++) {\n T tempKey = currentNode.getKey(i);\n if (tempKey != null) {\n if (comparator.compare(tempKey, id) == 0) {\n return i;\n }\n }\n }\n return -1;\n }",
"private int calcIndex(K key) {\n\t\treturn Math.abs(key.hashCode() % capacity);\n\t}",
"public int hIndex(int[] citations) {\n int n = citations.length;\n int lo = 0;\n int hi = n - 1;\n while (lo < hi) {\n int mid = lo + (hi - lo) / 2;\n if (citations[mid] < n - mid) {\n lo = mid + 1;\n } else {\n hi = mid;\n }\n }\n return citations[n - 1] == 0 ? 0 : n - lo;\n }",
"public int getSideIndex(Tile adjacent){\r\n for(int i = 0; i < adjTiles.length; i++){\r\n if(adjTiles[i] == adjacent) return i;\r\n }\r\n return -1;\r\n }",
"public alluxio.proto.journal.File.InodeDirectoryIdGeneratorEntryOrBuilder getInodeDirectoryIdGeneratorOrBuilder() {\n if (inodeDirectoryIdGeneratorBuilder_ != null) {\n return inodeDirectoryIdGeneratorBuilder_.getMessageOrBuilder();\n } else {\n return inodeDirectoryIdGenerator_;\n }\n }"
] | [
"0.6492743",
"0.62362665",
"0.61846304",
"0.5510175",
"0.5428231",
"0.54165405",
"0.52263296",
"0.5218296",
"0.5186723",
"0.5183268",
"0.51611626",
"0.51553184",
"0.50915474",
"0.5037485",
"0.5034939",
"0.50345606",
"0.50155485",
"0.50050664",
"0.49949548",
"0.49887305",
"0.4983073",
"0.49672306",
"0.49659696",
"0.4954137",
"0.49437287",
"0.4911374",
"0.49112827",
"0.4899171",
"0.48902956",
"0.48824868",
"0.48712987",
"0.48656732",
"0.48643512",
"0.48571777",
"0.48510554",
"0.48490325",
"0.4844874",
"0.48375726",
"0.48195785",
"0.48193827",
"0.48159036",
"0.48159036",
"0.4792477",
"0.4791848",
"0.47865894",
"0.47857565",
"0.4781887",
"0.4779811",
"0.47733644",
"0.47716627",
"0.4771031",
"0.47668976",
"0.47584122",
"0.47566834",
"0.47538114",
"0.47425488",
"0.4737307",
"0.47328225",
"0.47283408",
"0.47283408",
"0.47242388",
"0.4720218",
"0.471446",
"0.4713818",
"0.47080466",
"0.47073993",
"0.4698576",
"0.469248",
"0.46913186",
"0.46855393",
"0.4685407",
"0.46845946",
"0.46679237",
"0.46677396",
"0.46675897",
"0.46653226",
"0.46623814",
"0.46513477",
"0.46450725",
"0.46430236",
"0.46410787",
"0.46401793",
"0.46378356",
"0.46352407",
"0.46343592",
"0.4633366",
"0.46173573",
"0.46154156",
"0.4609058",
"0.46063533",
"0.46058276",
"0.46055388",
"0.4605253",
"0.460385",
"0.4601942",
"0.45969194",
"0.45843428",
"0.4577889",
"0.4571648",
"0.45706835"
] | 0.7514146 | 0 |
this method calculates the block that contains the inode by multiplying the block group number by the size of the inode, then dividing by the starting position of data at byte 1024, then it adds that to the value of the inoide table pointer and then the whole value is multiplied by 1024 and this takes us to the inode | private double calculateContainingBlock(double inodeBlockGroup, int inodeSize, int inodeTablePointer){
return ((inodeBlockGroup * inodeSize / Ext2StaticConstants.START_POSITION) + inodeTablePointer) * Ext2StaticConstants.START_POSITION;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private double getInodeBlockGroup(int inodeNumber, int inodesPerGroup){\n\n inodeNumber--;\n return (inodeNumber % inodesPerGroup);\n }",
"public void superBlock() throws FileNotFoundException, IOException\n {\n \tByteBuffer buf = ByteBuffer.allocate(1024);\n \tbuf.order(ByteOrder.LITTLE_ENDIAN);\n \tbyte[] bytes = new byte[1024];\n f.seek(1024);\n \tf.read(bytes);\n \tbuf.put(bytes);\n\n \tmagicNum = buf.getShort(56);\n \ttotalInodes = buf.getInt(0);\n \ttotalBlocks = buf.getInt(4);\n \tblocksPerGroup = buf.getInt(32);\n \tinodesPerGroup = buf.getInt(40);\n \tsizeOfInode = buf.getInt(88);\n\n \tbyte[] stringLabel = new byte[16];\n \tbuf.position(120);\n buf.get(stringLabel);\n \tvolumeLabel = new String(stringLabel);\n\n System.out.println(\"Magic Number : \"+String.format(\"0x%04X\",magicNum));\n System.out.println(\"Total Inodes: \"+totalInodes);\n System.out.println(\"Total Blocks: \"+totalBlocks);\n System.out.println(\"Blocks per Group: \"+blocksPerGroup);\n System.out.println(\"Inodes per Group: \"+inodesPerGroup);\n System.out.println(\"Size Of each Inode in bytes: \"+sizeOfInode);\n System.out.println(\"Volume Label: \"+ volumeLabel+ \"\\n\");\n }",
"public int inodeTablePointer(int groupDescriptorNo) throws IOException\n {\n \tByteBuffer buf_groupDescriptor = ByteBuffer.allocate(1024);\n \tbuf_groupDescriptor.order(ByteOrder.LITTLE_ENDIAN);\n \tbyte[] bytes = new byte[1024];\n f.seek(2048);\n \tf.read(bytes);\n \n \tbuf_groupDescriptor.put(bytes);\n inodeTablePointer = buf_groupDescriptor.getInt((groupDescriptorNo*32)+8);\n //System.out.println(\"inodeTablePointer \"+groupDescriptorNo +\" : \"+ inodeTablePointer);\n return inodeTablePointer;\n }",
"private int getEntBlock(FileTableEntry ftEnt)\n\t{\n\t\tint block = ftEnt.seekPtr / Disk.blockSize;\n\t\t//get actual block number\n\t\tif (block < Inode.directSize)\n\t\t{\n\t\t\treturn (int)ftEnt.inode.direct[block];\n\t\t}\n\n\t\tbyte[] temp = new byte[Disk.blockSize];\n\t\tSysLib.rawread((int)ftEnt.inode.indirect, temp);\n\t\treturn (int)SysLib.bytes2short(temp, (block - Inode.directSize) * 2);\n\t}",
"public int getBlockNumber(int inodeOffset, Volume v){\n\n int blockNumber = 0;\n if(inodeOffset > v.getSuperBlock().getTotalInodes()){\n\n new Ext2Error(\"the inode offset is invalid as it is greater than the total number of inodes found in the superblock\").print();\n\n }else if(inodeOffset < v.getSuperBlock().getTotalInodes()){\n double inodeBlockGroup = getInodeBlockGroup(inodeOffset, v.getSuperBlock().getNumberOfInodesPerGroup()); //this is the block group that the inode is inside of\n int blockGroupPosition = getInodeIndex(inodeOffset, v.getSuperBlock().getNumberOfInodesPerGroup()); //gets the index of the inode in the group descriptors inode table\n int inodeTablePointer = v.getGroupDescriptor().getInodeTablePointers()[blockGroupPosition]; //the inode table inodeBlockGroup of the block group of the block group (1,2 or 3 in this instance)\n double block = calculateContainingBlock(inodeBlockGroup, v.getSuperBlock().getInodeSize(), inodeTablePointer);\n blockNumber = (int) block;\n }\n return blockNumber;\n }",
"public abstract int getNextBlock(int block) throws IOException;",
"private Data getNextBlock() {\n Connection con = null;\n PreparedStatement pstmt = null;\n ResultSet rs = null;\n\n try {\n con = DbConnectionManager.getConnection();\n // Get the current ID from the database.\n pstmt = con.prepareStatement(LOAD_ID);\n pstmt.setInt(1, type);\n rs = pstmt.executeQuery();\n\n long currentID = 1;\n if (rs.next()) {\n currentID = rs.getLong(1);\n }\n else {\n createNewID(con, type);\n }\n DbConnectionManager.fastcloseStmt(rs, pstmt);\n\n // Increment the id to define our block.\n long newID = currentID + blockSize;\n // The WHERE clause includes the last value of the id. This ensures\n // that an update will occur only if nobody else has performed an\n // update first.\n pstmt = con.prepareStatement(UPDATE_ID);\n pstmt.setLong(1, newID);\n pstmt.setInt(2, type);\n pstmt.setLong(3, currentID);\n // Check to see if the row was affected. If not, some other process\n // already changed the original id that we read. This code should be\n // called under a lock, so this is not supposed to happen. Throw a\n // very verbose error if it does.\n if (pstmt.executeUpdate() == 1) {\n final Data result = new Data(currentID, newID);\n sequenceBlocks.put(type, result);\n return result;\n } else {\n throw new IllegalStateException(\"Failed at attempt to obtain an ID, aborting...\");\n }\n }\n catch (SQLException e) {\n Log.error(\"An exception occurred while trying to obtain new sequence values from the database for type {}\", type, e);\n throw new IllegalStateException(\"Failed at attempt to obtain an ID, aborting...\", e);\n }\n finally {\n DbConnectionManager.closeConnection(rs, pstmt, con);\n }\n }",
"public int processBlock(byte[] in, int inOff, byte[] out, int outOff) {\n\t}",
"byte getBlockData();",
"int getTotalBlockNum();",
"private void readSuperblock() {\n byte blockInfo[] = new byte[Disk.blockSize];\n\n // read in all of the block info into blockInfo buffer\n SysLib.rawread(0, blockInfo);\n\n // read the number of disk blocks from blockInfo\n this.totalBlocks = SysLib.bytes2int(blockInfo, 0);\n this.totalINodes = SysLib.bytes2int(blockInfo, 4);\n this.freeListTail = SysLib.bytes2int(blockInfo, 8);\n this.freeListTail = SysLib.bytes2int(blockInfo, 12);\n }",
"public int getUnitSize() {\n\t\n\treturn 254; // A d64 block is 254 bytes (256 - pointer to the next sector).\n }",
"private int getInodeIndex(int inodeNumber, int inodesPerGroup){\n //gets the index of the inode from the group descriptors inode table\n return (inodeNumber/inodesPerGroup);\n }",
"void allocate(ApexFile parent_file, int link_factor){\n assert this.used == false;\n\n //delete the block from parent file\n\n // CHECK THAT IF THE PARENT FILE IS NULL THEN DO NOT DO THE DELETE BLOCK STEP\n if(this.parentFile != null){\n this.parentFile.deleteBlock(this);\n }\n\n this.parentFile = parent_file;\n this.used = true;\n this.hf = 1;//reset\n this.uf = 1;//reset\n this.lf = link_factor;//binaries or non binaries\n }",
"private void readBlock(DataInputStream in, byte op) throws IOException {\n //\n // Read in the header\n //\n Block b = new Block();\n b.readFields(in);\n\n long toSkip = 0;\n long endOffset = -1;\n if (op == OP_READSKIP_BLOCK) {\n toSkip = in.readLong();\n } else if (op == OP_READ_RANGE_BLOCK) {\n toSkip = in.readLong();\n endOffset = in.readLong();\n }\n\n //\n // Open reply stream\n //\n DataOutputStream out = new DataOutputStream(new BufferedOutputStream(s.getOutputStream()));\n try {\n //\n // Write filelen of -1 if error\n //\n if (! data.isValidBlock(b)) {\n out.writeLong(-1);\n } else {\n //\n // Get blockdata from disk\n //\n long len = data.getLength(b);\n if (endOffset < 0) { endOffset = len; }\n DataInputStream in2 = new DataInputStream(data.getBlockData(b));\n out.writeLong(len);\n\n long amtSkipped = 0;\n if ((op == OP_READSKIP_BLOCK) || (op == OP_READ_RANGE_BLOCK)) {\n if (toSkip > len) {\n toSkip = len;\n }\n try {\n amtSkipped = in2.skip(toSkip);\n } catch (IOException iex) {\n shutdown();\n throw iex;\n }\n out.writeLong(amtSkipped);\n }\n if (op == OP_READ_RANGE_BLOCK) {\n if (endOffset > len) {\n endOffset = len;\n }\n out.writeLong(endOffset);\n }\n\n byte buf[] = new byte[BUFFER_SIZE];\n try {\n int toRead = (int) (endOffset - amtSkipped + 1);\n int bytesRead = 0;\n try {\n bytesRead = in2.read(buf, 0, Math.min(BUFFER_SIZE, toRead));\n myMetrics.readBytes(bytesRead);\n } catch (IOException iex) {\n shutdown();\n throw iex;\n }\n while (toRead > 0 && bytesRead >= 0) {\n out.write(buf, 0, bytesRead);\n toRead -= bytesRead;\n if (toRead > 0) {\n try {\n bytesRead = in2.read(buf, 0, Math.min(BUFFER_SIZE, toRead));\n myMetrics.readBytes(bytesRead);\n } catch (IOException iex) {\n shutdown();\n throw iex;\n }\n }\n }\n } catch (SocketException se) {\n // This might be because the reader\n // closed the stream early\n } finally {\n try {\n in2.close();\n } catch (IOException iex) {\n shutdown();\n throw iex;\n }\n }\n }\n myMetrics.readBlocks(1);\n LOG.info(\"Served block \" + b + \" to \" + s.getInetAddress());\n } finally {\n out.close();\n }\n }",
"public int getBlockSize()\n/* */ {\n/* 43 */ return this.blockSize;\n/* */ }",
"private boolean changeSize(Inode inode, int bytesBefore, int bytesAfter) {\t\t\n\t\tif (bytesAfter > MAX_FILE_SIZE) {\n\t\t\treturn false;\n\t\t}\n\t\tint blocksBefore = neededBlocks(bytesBefore);\n\t\tint blocksAfter = neededBlocks(bytesAfter);\n\t\t\n\t\tif (blocksBefore == blocksAfter) {\n\t\t\tinode.length = bytesAfter;\n\t\t\treturn true;\n\t\t}\n\t\tbyte[] buffer = null;\n\t\t\n\t\tif (blocksBefore > blocksAfter) {\n\t\t\tif (blocksBefore > DIRECT) {\n\t\t\t\t// Only do a read if we care about the indirect block\n\t\t\t\tbuffer = new byte[BLOCK_SIZE];\t\t\t\t\n\t\t\t\tSysLib.rawread(inode.indirect, buffer);\t\t\t\t\n\t\t\t}\n\t\t\tfor (int i = blocksAfter + 1; i <= blocksBefore; i++) {\n\t\t\t\tdeallocateBlock(inode, i, buffer);\n\t\t\t}\n\t\t\tif (blocksAfter < DIRECT && blocksBefore > DIRECT) {\n\t\t\t\tsuperblock.returnBlock((short)inode.indirect);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tassert (blocksAfter > blocksBefore);\n\t\t\tif (blocksBefore <= DIRECT && blocksAfter > DIRECT) {\n\t\t\t\tinode.indirect = (short)(superblock.getBlock());\n\t\t\t}\n\t\t\tif (blocksBefore > DIRECT || blocksAfter > DIRECT) {\n\t\t\t\t// Only do a read if we care about the indirect block\n\t\t\t\tbuffer = new byte[BLOCK_SIZE];\n\t\t\t\tSysLib.rawread(inode.indirect, buffer);\t\t\t\t\n\t\t\t}\n\t\t\tfor (int i = blocksBefore; i < blocksAfter; i++) {\n\t\t\t\tallocateBlock(inode, i, buffer);\n\t\t\t}\n\t\t\tif (blocksAfter > DIRECT) {\n\t\t\t\tSysLib.rawwrite(inode.indirect, buffer);\n\t\t\t}\n\n\t\t}\n\t\tinode.length = bytesAfter;\n\t\tif(blocksAfter != 0)\n\t\t\tgetBlockNumber(inode, blocksAfter-1, buffer);\n\t\treturn true;\n\t}",
"public void sync(){\n byte[] block = new byte[512];\n SysLib.int2bytes(totalBlocks, block, 0);\n SysLib.int2bytes(totalInodes, block, 4);\n SysLib.int2bytes(freeList, block, 8);\n SysLib.rawwrite(0, block);\n }",
"void accessBlock(final long blockId) throws IOException;",
"public int getInternalBlockLength()\r\n/* 40: */ {\r\n/* 41: 95 */ return 32;\r\n/* 42: */ }",
"public void format(int nodeCount)\n {\n this.inodeBlocks = nodeCount;\n Inode node = new Inode();\n byte[] block;\n\n for(int i = 0; i < inodeBlocks; i++)\n {\n node.flag = 0;\n node.toDisk((short) i);\n }\n\n freeList = (inodeBlocks / 16) + 2;\n for(int i = this.freeList; i < this.totalBlocks; i++)\n {\n block = new byte[Disk.blockSize];\n for(int j = 0; j < Disk.blockSize; j++)\n {\n block[j] = 0;\n }\n\n SysLib.int2bytes(i + 1, block, 0);\n SysLib.rawwrite(i, block);\n }\n\n this.sync();\n }",
"public Integer getBlockID() {\n this.next_id++;\n return this.next_id;\n }",
"private int requestBlock() throws InodeNotEnoughDiskSpaceExcepcion{\n\t\t\n\t\tint blockAddr;\n\t\t\n\t\tif((blockAddr = DiskFreeSpaceManager.getInstance().firstFreeBlock()) == -1){\n\t\t\tthrow new InodeNotEnoughDiskSpaceExcepcion(\"Not enough disk space.\");\n\t\t}\n\t\t\n\t\treturn blockAddr;\n\t}",
"public interface BlockFileSystem {\n\n \n /**\n * The size of a block in bytes.\n */\n int BLOCK_SIZE = 512;\n\n\n /**\n * Returns the root entry of the file system. Subfiles and directories\n * can be found by searching the returned entry.\n * \n * @return the root entry\n * @throws IOException if an IO error occurs\n */\n public abstract Entry getRoot() throws IOException;\n\n \n /**\n * Returns the number of the block that follows the given block.\n * The internal block allocation tables are consulted to determine the\n * next block. A return value that is less than zero indicates that\n * there is no next block.\n * \n * @param block the number of block whose successor to return\n * @return the successor of that block\n * @throws IOException if an IO error occurs\n */\n public abstract int getNextBlock(int block) throws IOException;\n\n\n /**\n * Returns the raw input stream for this file system. \n * Typically this will be the random access file containing the .doc.\n * \n * @return the raw input stream for this file system\n */\n public abstract SeekInputStream getRawInput();\n\n}",
"public void get64bitesBlock() {\r\n this.sixtyFourBitesBlock.clear();\r\n\r\n if(this.allBitesFromFile.size() >= 64) {\r\n for(int i = 0; i < 64; i++)\r\n this.sixtyFourBitesBlock.add(this.allBitesFromFile.get(i));\r\n\r\n this.deleteBitesFromallBitesFromFile(64);\r\n }\r\n else {\r\n for(int i = 0; i < this.allBitesFromFile.size(); i++)\r\n this.sixtyFourBitesBlock.add(this.allBitesFromFile.get(i));\r\n\r\n this.addedBites = 64 - this.allBitesFromFile.size();\r\n\r\n for(int i = 0; i < this.addedBites; i++)\r\n this.sixtyFourBitesBlock.add(1);\r\n\r\n this.deleteBitesFromallBitesFromFile(this.allBitesFromFile.size());\r\n }\r\n }",
"public long getBlockSize ( ) {\r\n\t\tif (current_block >= getBlockCount())\r\n\t\t\treturn 0;\r\n\r\n\t\tif (current_block == getBlockCount() -1)\r\n\t\t\treturn 3670;\r\n\r\n\t\treturn 10000;\r\n\t}",
"abstract public int getNumberOfBlocks();",
"int getBlockSize();",
"alluxio.proto.journal.Block.BlockInfoEntry getBlockInfo();",
"public int getBlockSize() { return (int)Math.sqrt(this.size); }",
"protected abstract void allocateBlocks(int numBlocks);",
"public int getSizeOfBlock() {\n return sizeOfBlock;\n }",
"int getBlockNumber();",
"int getBlockNumber();",
"public void calcJobPageNum() {\r\n int codeSize = 0;\r\n for (int i = 0; i < jobInstructionNum; i++) {\r\n // traverse job's all instructions\r\n this.data[i] = instructions.get(i).getData();\r\n codeSize += this.instructions.get(i).getSize();\r\n }\r\n this.codeSegPages = codeSize / SysConst.PAGE_FRAME_SIZE + 1;\r\n int dataLength = 0;\r\n if (data != null) {\r\n dataLength = data.length;\r\n }\r\n this.dataSegPages = dataLength / SysConst.PAGE_FRAME_SIZE + 1;\r\n this.stackSegPages = 1;\r\n int jcbMetaPages = 1;\r\n this.codeSegStart = 1 + this.dataSegPages;\r\n this.jobPagesNum = this.codeSegPages + this.dataSegPages + this.stackSegPages + jcbMetaPages;\r\n blocks = new ArrayList<>(jobPagesNum);\r\n this.diskBlockNo = new int[jobPagesNum];\r\n Arrays.fill(diskBlockNo, -1);\r\n }",
"public int getALocationToPlaceBlock(){\n int lruIndex=-1,lruVal=-1;\n for(int i=0;i<this.localCache.length;i++){\n if(!this.localCache[i].isOccupied)// checks if the block is occupied\n return i;\n \n if(lruVal<this.localCache[i].lastUsed){// checks the last used of each block\n lruIndex=i;\n lruVal=this.localCache[i].lastUsed;\n }\n }\n \n return lruIndex;\n }",
"public long getBlockCount ( ) {\r\n\t\treturn 436;\r\n\t}",
"public void insertOneKeyPointer(byte[] new_key, int pointer_id){\n int total_number = prior_key_number + key_number + next_key_number;\n\n if (total_number == key_number){\n\n //node in one block\n if(total_number == M){\n //split\n byte[] old_biggest = getBiggestKey();\n int mid = (int) Math.ceil((double)M/2) - 1;\n BTreeInternalNode split_node;\n //add split node to parent node\n if(M % 2 == 1){\n if(compare2key(keys.get(mid),new_key) == Util.G)\n split_node = splitAt(mid-1);\n else\n split_node = splitAt(mid);\n }else{\n split_node = splitAt(mid);\n }\n if(parent_id != 0){\n //insert to left node\n BTreeInternalNode parent_node = (BTreeInternalNode)buffer.getNode(parent_id,DB_name,table_name,index_attrs);\n parent_node.insertOneKeyPointer(split_node.getBiggestKey(),split_node.node_id);\n }\n if(compare2key(keys.get(mid),new_key) == Util.G){\n insertOneKeyPointer(new_key,pointer_id);\n }else{\n split_node.insertOneKeyPointer(new_key,pointer_id);\n }\n for (int i = 0; i < split_node.key_number; i ++){\n buffer.getNode(split_node.getPointer(i),DB_name,table_name,index_attrs).updateParent(split_node.node_id);\n }\n }else{\n if(key_number == 0){\n insertKeyPointer(0,new_key,pointer_id);\n return;\n }\n int insert_index = BinarySearch(new_key,0,key_number - 1);\n if (free_space >= 2 + key_length){\n insertKeyPointer(insert_index,new_key,pointer_id);\n }else{\n BTreeInternalNode new_node = new BTreeInternalNode(M,buffer.getFreeId(DB_name,table_name,index_attrs),parent_id,left_bro_id,right_bro_id,\n node_id,0,prior_key_number + key_number,0,buffer,index_attrs,DB_name,table_name);\n byte[] biggest_key = keys.get(key_number - 1);\n short pt = getPointer(key_number - 1);\n updateNextBro(new_node.node_id);\n buffer.addNewNode(new_node);\n deleteKeyPointer(key_number - 1);\n new_node.insertOneKeyPointer(biggest_key,pt);\n insertOneKeyPointer(new_key,pointer_id);\n }\n }\n }else{\n //node in many blocks\n if (total_number == M){\n int mid = (int) Math.ceil((double)M/2) - 1;\n BTreeInternalNode split_node;\n if (mid >= key_number + prior_key_number){\n //this node do not split\n BTreeInternalNode next_node = (BTreeInternalNode) buffer.getNode(next_id,DB_name,table_name,index_attrs);\n next_node.insertOneKeyPointer(new_key,pointer_id);\n return;\n }else if (mid < prior_key_number) {\n BTreeInternalNode prior_node = (BTreeInternalNode) buffer.getNode(prior_id,DB_name,table_name,index_attrs);\n prior_node.insertOneKeyPointer(new_key,pointer_id);\n }else{\n byte[] old_biggest = getBiggestKey();\n int old_next_id = next_id;\n if(M % 2 == 1){\n if(compare2key(keys.get(mid),new_key) == Util.G){\n if (mid == prior_key_number){\n //special case - split\n BTreeInternalNode prior_node = (BTreeInternalNode) buffer.getNode(prior_id,DB_name,table_name,index_attrs);\n prior_node.updateNextBro(0);\n prior_node.updateNextKeyNumber(0);\n prior_node.updateNumberToLeft();\n //bro\n BTreeInternalNode head_node = (BTreeInternalNode) prior_node.getHeadNode();\n BTreeInternalNode origin_right_node = (BTreeInternalNode) buffer.getNode(prior_node.right_bro_id,DB_name,table_name,index_attrs);\n origin_right_node.updateLeftBro(node_id);\n prior_node.updateRightBro(node_id);\n\n updatePriorBro(0);\n updatePriorKeyNumber(0);\n updateNumberToRight();\n updateLeftBro(head_node.node_id);\n\n prior_node.insertOneKeyPointer(new_key,pointer_id);\n if(parent_id !=0) {\n BTreeInternalNode parent_node = (BTreeInternalNode)buffer.getNode(parent_id,DB_name,table_name,index_attrs);\n parent_node.insertOneKeyPointer(prior_node.getBiggestKey(), head_node.node_id);\n parent_node.updateKeyPointer(getBiggestKey(), null, node_id);\n }else{\n createRootNode(prior_node,this);\n }\n return;\n }\n split_node = splitAt(mid- prior_key_number - 1);\n }\n else\n split_node = splitAt(mid - prior_key_number);\n }else{\n split_node = splitAt(mid - prior_key_number);\n }\n if(parent_id != 0){\n BTreeInternalNode parent_node = (BTreeInternalNode)buffer.getNode(parent_id,DB_name,table_name,index_attrs);\n if(old_next_id != 0)\n parent_node.updateKeyPointer(old_biggest,getBiggestKey(),getHeadNode().node_id);\n parent_node.insertOneKeyPointer(split_node.getBiggestKey(),split_node.node_id);\n }\n if(compare2key(keys.get(mid - prior_key_number),new_key) == Util.G){\n insertOneKeyPointer(new_key,pointer_id);\n }else{\n split_node.insertOneKeyPointer(new_key,pointer_id);\n }\n for (int i = 0; i < split_node.key_number; i ++){\n buffer.getNode(split_node.getPointer(i),DB_name,table_name,index_attrs).updateParent(split_node.node_id);\n }\n }\n }else{\n if(next_id != 0){\n BTreeInternalNode next_node = (BTreeInternalNode) buffer.getNode(next_id,DB_name,table_name,index_attrs);\n if(compare2key(next_node.keys.get(0),new_key) != Util.G) {\n next_node.insertOneKeyPointer(new_key, pointer_id);\n return;\n }\n }\n if(prior_id != 0){\n BTreeInternalNode prior_node = (BTreeInternalNode) buffer.getNode(prior_id,DB_name,table_name,index_attrs);\n if(compare2key(prior_node.keys.get(prior_node.key_number - 1),new_key) != Util.L){\n prior_node.insertOneKeyPointer(new_key,pointer_id);\n return;\n }\n }\n int insert_index = BinarySearch(new_key,0,key_number - 1);\n if (free_space >= 2 + key_length){\n insertKeyPointer(insert_index,new_key,pointer_id);\n }else{\n BTreeInternalNode new_node;\n Boolean create_new_node = false;\n if(next_id != 0){\n new_node =(BTreeInternalNode) buffer.getNode(next_id,DB_name,table_name,index_attrs);\n if(new_node.free_space < key_length + 2){\n new_node = new BTreeInternalNode(M,buffer.getFreeId(DB_name,table_name,index_attrs),parent_id,left_bro_id,right_bro_id, node_id,0,prior_key_number + key_number,0,buffer,index_attrs,DB_name,table_name);\n buffer.addNewNode(new_node);\n create_new_node = true;\n }\n }else{\n new_node = new BTreeInternalNode(M,buffer.getFreeId(DB_name,table_name,index_attrs),parent_id,left_bro_id,right_bro_id, node_id,0,prior_key_number + key_number,0,buffer,index_attrs,DB_name,table_name);\n buffer.addNewNode(new_node);\n create_new_node = true;\n }\n if(create_new_node && next_id != 0){\n BTreeNode origin_next_node = buffer.getNode(next_id,DB_name,table_name,index_attrs);\n origin_next_node.updatePriorBro(new_node.node_id);\n new_node.updateNextBro(origin_next_node.node_id);\n new_node.updateNextKeyNumber(origin_next_node.key_number + origin_next_node.next_key_number);\n }\n updateNextBro(new_node.node_id);\n byte[] biggest_key = keys.get(key_number - 1);\n short pt = getPointer(key_number - 1);\n deleteKeyPointer(key_number - 1);\n new_node.insertOneKeyPointer(biggest_key,pt);\n insertOneKeyPointer(new_key,pointer_id);\n }\n }\n }\n }",
"protected void processBlock() {\n\t\t// expand 16 word block into 64 word blocks.\n\t\t//\n\t\tfor (int t = 16; t <= 63; t++) {\n\t\t\tX[t] = Theta1(X[t - 2]) + X[t - 7] + Theta0(X[t - 15]) + X[t - 16];\n\t\t}\n\n\t\t//\n\t\t// set up working variables.\n\t\t//\n\t\tint a = H1;\n\t\tint b = H2;\n\t\tint c = H3;\n\t\tint d = H4;\n\t\tint e = H5;\n\t\tint f = H6;\n\t\tint g = H7;\n\t\tint h = H8;\n\n\t\tint t = 0;\n\t\tfor (int i = 0; i < 8; i++) {\n\t\t\t// t = 8 * i\n\t\t\th += Sum1(e) + Ch(e, f, g) + K[t] + X[t];\n\t\t\td += h;\n\t\t\th += Sum0(a) + Maj(a, b, c);\n\t\t\t++t;\n\n\t\t\t// t = 8 * i + 1\n\t\t\tg += Sum1(d) + Ch(d, e, f) + K[t] + X[t];\n\t\t\tc += g;\n\t\t\tg += Sum0(h) + Maj(h, a, b);\n\t\t\t++t;\n\n\t\t\t// t = 8 * i + 2\n\t\t\tf += Sum1(c) + Ch(c, d, e) + K[t] + X[t];\n\t\t\tb += f;\n\t\t\tf += Sum0(g) + Maj(g, h, a);\n\t\t\t++t;\n\n\t\t\t// t = 8 * i + 3\n\t\t\te += Sum1(b) + Ch(b, c, d) + K[t] + X[t];\n\t\t\ta += e;\n\t\t\te += Sum0(f) + Maj(f, g, h);\n\t\t\t++t;\n\n\t\t\t// t = 8 * i + 4\n\t\t\td += Sum1(a) + Ch(a, b, c) + K[t] + X[t];\n\t\t\th += d;\n\t\t\td += Sum0(e) + Maj(e, f, g);\n\t\t\t++t;\n\n\t\t\t// t = 8 * i + 5\n\t\t\tc += Sum1(h) + Ch(h, a, b) + K[t] + X[t];\n\t\t\tg += c;\n\t\t\tc += Sum0(d) + Maj(d, e, f);\n\t\t\t++t;\n\n\t\t\t// t = 8 * i + 6\n\t\t\tb += Sum1(g) + Ch(g, h, a) + K[t] + X[t];\n\t\t\tf += b;\n\t\t\tb += Sum0(c) + Maj(c, d, e);\n\t\t\t++t;\n\n\t\t\t// t = 8 * i + 7\n\t\t\ta += Sum1(f) + Ch(f, g, h) + K[t] + X[t];\n\t\t\te += a;\n\t\t\ta += Sum0(b) + Maj(b, c, d);\n\t\t\t++t;\n\t\t}\n\n\t\tH1 += a;\n\t\tH2 += b;\n\t\tH3 += c;\n\t\tH4 += d;\n\t\tH5 += e;\n\t\tH6 += f;\n\t\tH7 += g;\n\t\tH8 += h;\n\n\t\t//\n\t\t// reset the offset and clean out the word buffer.\n\t\t//\n\t\txOff = 0;\n\t\tfor (int i = 0; i < 16; i++) {\n\t\t\tX[i] = 0;\n\t\t}\n\t}",
"public int getFreeBlock()\n {\n int freeBlock = this.freeList; // Set freeBlock to the head of the freeList\n if(freeBlock != -1) // Check to see if the freeBlock is in use\n {\n byte[] block = new byte[512];\n SysLib.rawread(freeBlock, block); // Read data from freeBlock\n this.freeList = SysLib.bytes2int(block, 0); // Move the head of the freeList to the next block\n SysLib.int2bytes(0, block, 0);\n SysLib.rawwrite(freeBlock, block);\n }\n\n return freeBlock;\n }",
"public int getFreeBlock(){\n \n if(freeList == -1){\n return -1;\n }\n\n //Retrieve the free block \n byte[] data = new byte[512];\n SysLib.rawread(freeList, data);\n\n \n //Update the freelist\n int freeBlock = freeList;\n freeList = SysLib.bytes2int(data, 0);\n SysLib.int2bytes(0,data,0);\n SysLib.rawwrite(freeBlock,data);\n\n return freeBlock;\n }",
"void setBlock(byte[][] result, int x, int y, int z, byte blkid) {\n\t\tif (result[y >> 4] == null) {\n\t\t\t// Initialize the chunk part\n\t\t\tresult[y >> 4] = new byte[4096];\n\t\t}\n\t\t// set the block (look above, how this is done)\n\t\tresult[y >> 4][((y & 0xF) << 8) | (z << 4) | x] = blkid;\n\n\t}",
"private void writeBlock(DataInputStream in) throws IOException {\n //\n // Read in the header\n //\n DataOutputStream reply = \n new DataOutputStream(new BufferedOutputStream(s.getOutputStream()));\n try {\n boolean shouldReportBlock = in.readBoolean();\n Block b = new Block();\n b.readFields(in);\n int numTargets = in.readInt();\n if (numTargets <= 0) {\n throw new IOException(\"Mislabelled incoming datastream.\");\n }\n DatanodeInfo targets[] = new DatanodeInfo[numTargets];\n for (int i = 0; i < targets.length; i++) {\n DatanodeInfo tmp = new DatanodeInfo();\n tmp.readFields(in);\n targets[i] = tmp;\n }\n byte encodingType = (byte) in.read();\n long len = in.readLong();\n \n //\n // Make sure curTarget is equal to this machine\n //\n DatanodeInfo curTarget = targets[0];\n \n //\n // Track all the places we've successfully written the block\n //\n Vector mirrors = new Vector();\n \n //\n // Open local disk out\n //\n DataOutputStream out = new DataOutputStream(new BufferedOutputStream(data.writeToBlock(b)));\n InetSocketAddress mirrorTarget = null;\n String mirrorNode = null;\n try {\n //\n // Open network conn to backup machine, if \n // appropriate\n //\n DataInputStream in2 = null;\n DataOutputStream out2 = null;\n if (targets.length > 1) {\n // Connect to backup machine\n mirrorNode = targets[1].getName();\n mirrorTarget = createSocketAddr(mirrorNode);\n try {\n Socket s2 = new Socket();\n s2.connect(mirrorTarget, READ_TIMEOUT);\n s2.setSoTimeout(READ_TIMEOUT);\n out2 = new DataOutputStream(new BufferedOutputStream(s2.getOutputStream()));\n in2 = new DataInputStream(new BufferedInputStream(s2.getInputStream()));\n \n // Write connection header\n out2.write(OP_WRITE_BLOCK);\n out2.writeBoolean(shouldReportBlock);\n b.write(out2);\n out2.writeInt(targets.length - 1);\n for (int i = 1; i < targets.length; i++) {\n targets[i].write(out2);\n }\n out2.write(encodingType);\n out2.writeLong(len);\n myMetrics.replicatedBlocks(1);\n } catch (IOException ie) {\n if (out2 != null) {\n LOG.info(\"Exception connecting to mirror \" + mirrorNode \n + \"\\n\" + StringUtils.stringifyException(ie));\n try {\n out2.close();\n in2.close();\n } catch (IOException out2close) {\n } finally {\n out2 = null;\n in2 = null;\n }\n }\n }\n }\n \n //\n // Process incoming data, copy to disk and\n // maybe to network.\n //\n boolean anotherChunk = len != 0;\n byte buf[] = new byte[BUFFER_SIZE];\n \n while (anotherChunk) {\n while (len > 0) {\n int bytesRead = in.read(buf, 0, (int)Math.min(buf.length, len));\n if (bytesRead < 0) {\n throw new EOFException(\"EOF reading from \"+s.toString());\n }\n if (bytesRead > 0) {\n try {\n out.write(buf, 0, bytesRead);\n myMetrics.wroteBytes(bytesRead);\n } catch (IOException iex) {\n if (iex.getMessage().startsWith(\"No space left on device\")) {\n \t throw new DiskOutOfSpaceException(\"No space left on device\");\n } else {\n shutdown();\n throw iex;\n }\n }\n if (out2 != null) {\n try {\n out2.write(buf, 0, bytesRead);\n } catch (IOException out2e) {\n LOG.info(\"Exception writing to mirror \" + mirrorNode \n + \"\\n\" + StringUtils.stringifyException(out2e));\n //\n // If stream-copy fails, continue \n // writing to disk. We shouldn't \n // interrupt client write.\n //\n try {\n out2.close();\n in2.close();\n } catch (IOException out2close) {\n } finally {\n out2 = null;\n in2 = null;\n }\n }\n }\n len -= bytesRead;\n }\n }\n \n if (encodingType == RUNLENGTH_ENCODING) {\n anotherChunk = false;\n } else if (encodingType == CHUNKED_ENCODING) {\n len = in.readLong();\n if (out2 != null) {\n try {\n out2.writeLong(len);\n } catch (IOException ie) {\n LOG.info(\"Exception writing to mirror \" + mirrorNode \n + \"\\n\" + StringUtils.stringifyException(ie));\n try {\n out2.close();\n in2.close();\n } catch (IOException ie2) {\n // NOTHING\n } finally {\n out2 = null;\n in2 = null;\n }\n }\n }\n if (len == 0) {\n anotherChunk = false;\n }\n }\n }\n \n if (out2 != null) {\n try {\n out2.flush();\n long complete = in2.readLong();\n if (complete != WRITE_COMPLETE) {\n LOG.info(\"Conflicting value for WRITE_COMPLETE: \" + complete);\n }\n LocatedBlock newLB = new LocatedBlock();\n newLB.readFields(in2);\n in2.close();\n out2.close();\n DatanodeInfo mirrorsSoFar[] = newLB.getLocations();\n for (int k = 0; k < mirrorsSoFar.length; k++) {\n mirrors.add(mirrorsSoFar[k]);\n }\n } catch (IOException ie) {\n LOG.info(\"Exception writing to mirror \" + mirrorNode \n + \"\\n\" + StringUtils.stringifyException(ie));\n try {\n out2.close();\n in2.close();\n } catch (IOException ie2) {\n // NOTHING\n } finally {\n out2 = null;\n in2 = null;\n }\n }\n }\n if (out2 == null) {\n LOG.info(\"Received block \" + b + \" from \" + \n s.getInetAddress());\n } else {\n LOG.info(\"Received block \" + b + \" from \" + \n s.getInetAddress() + \n \" and mirrored to \" + mirrorTarget);\n }\n } finally {\n try {\n out.close();\n } catch (IOException iex) {\n shutdown();\n throw iex;\n }\n }\n data.finalizeBlock(b);\n myMetrics.wroteBlocks(1);\n \n // \n // Tell the namenode that we've received this block \n // in full, if we've been asked to. This is done\n // during NameNode-directed block transfers, but not\n // client writes.\n //\n if (shouldReportBlock) {\n synchronized (receivedBlockList) {\n receivedBlockList.add(b);\n receivedBlockList.notifyAll();\n }\n }\n \n //\n // Tell client job is done, and reply with\n // the new LocatedBlock.\n //\n reply.writeLong(WRITE_COMPLETE);\n mirrors.add(curTarget);\n LocatedBlock newLB = new LocatedBlock(b, (DatanodeInfo[]) mirrors.toArray(new DatanodeInfo[mirrors.size()]));\n newLB.write(reply);\n } finally {\n reply.close();\n }\n }",
"public void sync()\n {\n byte[] blockData = new byte[Disk.blockSize];\n SysLib.int2bytes(totalBlocks, blockData, 0);\n SysLib.int2bytes(inodeBlocks, blockData, 4);\n SysLib.int2bytes(freeList, blockData, 8);\n SysLib.rawwrite(0, blockData);\n }",
"@Override\n\tpublic long getFreeBlocks() {\n\t\treturn 0;\n\t}",
"alluxio.proto.journal.File.InodeFileEntry getInodeFile();",
"public static long m136429b() {\n StatFs statFs;\n try {\n statFs = new StatFs(Environment.getExternalStorageDirectory().getPath());\n } catch (IllegalArgumentException unused) {\n statFs = null;\n }\n long j = 0;\n if (statFs != null) {\n if (VERSION.SDK_INT >= 18) {\n j = statFs.getBlockSizeLong() * statFs.getBlockCountLong();\n } else {\n j = ((long) statFs.getBlockSize()) * ((long) statFs.getBlockCount());\n }\n }\n return (j / 1024) / 1024;\n }",
"void truncate(INode i, int size) throws IOException {\n\t\tint dir_e;\n\t\tint indir_e;\n\t\tint sec_indir_e, sec_indir_le = 0;\n\n\t\tint old_dir_e;\n\t\tint old_indir_e;\n\t\tint old_sec_indir_e, old_sec_indir_le = 0;\n\n\t\tint old_size;\n\t\tint allocated;\n\t\tint needed;\n\n\t\tPInt pt = new PInt();\n\n\t\told_size = i.size;\n\t\tallocated = (old_size + BLOCK_SIZE - 1) / BLOCK_SIZE;\n\t\tneeded = (size + BLOCK_SIZE - 1) / BLOCK_SIZE;\n\n\t\tif (needed <= 7) {\n\t\t\tdir_e = needed;\n\t\t\tindir_e = 0;\n\t\t\tsec_indir_e = 0;\n\t\t} else if ((needed -= 7) != 0 && needed <= INDICES_PER_BLOCK) {\n\t\t\tdir_e = 7;\n\t\t\tindir_e = needed;\n\t\t\tsec_indir_e = 0;\n\t\t} else if ((needed -= INDICES_PER_BLOCK) != 0\n\t\t\t\t&& needed <= INDICES_PER_BLOCK * INDICES_PER_BLOCK) {\n\t\t\tdir_e = 7;\n\t\t\tindir_e = BLOCK_SIZE / 4;\n\t\t\tsec_indir_e = (needed + INDICES_PER_BLOCK - 1) / INDICES_PER_BLOCK;\n\t\t\tsec_indir_le = needed % INDICES_PER_BLOCK;\n\t\t} else\n\t\t\tthrow new IllegalArgumentException(\"file too large\");\n\n\t\t/* now check allocated */\n\t\tif (allocated <= 7) {\n\t\t\told_dir_e = allocated;\n\t\t\told_indir_e = 0;\n\t\t\told_sec_indir_e = 0;\n\t\t} else if ((allocated -= 7) != 0 && allocated <= INDICES_PER_BLOCK) {\n\t\t\told_dir_e = 7;\n\t\t\told_indir_e = allocated;\n\t\t\told_sec_indir_e = 0;\n\t\t} else if ((allocated -= INDICES_PER_BLOCK) != 0\n\t\t\t\t&& allocated <= INDICES_PER_BLOCK * INDICES_PER_BLOCK) {\n\t\t\told_dir_e = 7;\n\t\t\told_indir_e = INDICES_PER_BLOCK;\n\t\t\told_sec_indir_e = (allocated + INDICES_PER_BLOCK - 1)\n\t\t\t\t\t/ INDICES_PER_BLOCK;\n\t\t\told_sec_indir_le = allocated % INDICES_PER_BLOCK;\n\t\t} else\n\t\t\tthrow new Error();\n\n\t\t/* now start working */\n\t\tacquire_release_range(i.blocks, old_dir_e, dir_e);\n\t\tpt.val = i.indir_block;\n\t\tacquire_release_range_indirect(pt, old_indir_e, indir_e);\n\t\ti.indir_block = pt.val;\n\t\tpt.val = i.second_level_indir_block;\n\t\tacquire_release_range_indirect2(pt, old_sec_indir_e, old_sec_indir_le,\n\t\t\t\tsec_indir_e, sec_indir_le);\n\t\ti.second_level_indir_block = pt.val;\n\n\t\t/* update size */\n\t\ti.size = size;\n\t}",
"public int getBlockSize() {\n\t}",
"public long getBlockSize() {\n return blockSize;\n }",
"public int getBlockSize() {\n return blockSize;\n }",
"public int NextMbAddress(int n) {\n\t\tint PicSizeInMapUnits= (sps0.pic_width_in_mbs_minus_1+1)*(sps0.pic_height_in_map_units_minus_1+1);\n\t\t// int FrameHeightInMbs = (2-(sps0.frame_mbs_only_flag ? 1:0))*(sps0.pic_height_in_map_units_minus_1+1);\n \t\t// int PicHeightInMbs = FrameHeightInMbs / (1+(field_pic_flag ? 1:0));\n\n \t\tint PicSizeInMbs = (sps0.pic_width_in_mbs_minus_1+1) * (PicHeightInMbs);\n\t\t// (7-34)\n\t\tint MapUnitsInSliceGroup0 = Math.min(((pps0.slice_group_change_rate_minus1 + 1) * slice_group_change_cycle), \n\t\t\t(PicSizeInMapUnits));\n\t\t// System.out.println(MapUnitsInSliceGroup0);\n\t\tint sizeOfUpperLeftGroup;\n\t\tif(pps0.num_slice_groups_minus1==1&&(pps0.slice_group_map_type==4||pps0.slice_group_map_type==5)){\n\n\t\t\tsizeOfUpperLeftGroup=(pps0.slice_group_change_direction_flag ? (PicSizeInMapUnits - MapUnitsInSliceGroup0)\n\t\t\t\t: MapUnitsInSliceGroup0);\n\t\t}\n\t\tint [] mapUnitToSliceGroupMap=new int[PicSizeInMapUnits];\n\t\tif(pps0.num_slice_groups_minus1==0){\n\t\t\t// System.out.println(\"zero \");\n\t\t\tfor(int i=0;i<pps0.pic_size_in_map_units_minus1+1;i++){\n\t\t\t\tmapUnitToSliceGroupMap[i]=0;\n\t\t\t}\t\t\t\n\t\t}\n\n\t\telse if(pps0.num_slice_groups_minus1!=0){\n\t\t\tif(pps0.slice_group_map_type==0){\n\t\t\t\t// 8.2.2.1\n\t\t\t}\n\t\t\telse if(pps0.slice_group_map_type==1){\n\t\t\t\t// 8.2.2.2\n\t\t\t}else if(pps0.slice_group_map_type==2){\n\t\t\t\t// 8.2.2.3\n\t\t\t}else if(pps0.slice_group_map_type==3){\n\t\t\t\t// 8.2.2.4\n\t\t\t}else if(pps0.slice_group_map_type==4){\n\t\t\t\t// 8.2.2.5\n\t\t\t}\n\t\t\telse if(pps0.slice_group_map_type==5){\n\t\t\t\t// 8.2.2.6\n\t\t\t}\n\t\t\telse if(pps0.slice_group_map_type==6){\n\t\t\t\t// 8.2.2.7\n\t\t\t}\n\t\t}\n\n\n\t\t\t\t\t\t\t\t\t/* 8.2.2.8 */\n \t\tint[] MbToSliceGroupMap=new int[PicSizeInMbs];\n \t\tfor(int i=0;i<PicSizeInMbs;i++){\n \t\t\tif(sps0.frame_mbs_only_flag==true||field_pic_flag==true){\n \t\t\t\t// System.out.println(PicSizeInMbs+\" \"+PicSizeInMapUnits);\n \t\t\t\tMbToSliceGroupMap[i]=mapUnitToSliceGroupMap[i];\n \t\t\t} else if(MbaffFrameFlag){\n \t\t\t\tMbToSliceGroupMap[i]=mapUnitToSliceGroupMap[(int)i/2];\n\n \t\t\t}else if(sps0.frame_mbs_only_flag==false&&sps0.mb_adaptive_frame_field_flag==false&&field_pic_flag==false){\n \t\t\t\tMbToSliceGroupMap[i]=mapUnitToSliceGroupMap[(int)(i/(2*sps0.pic_width_in_mbs_minus_1+1))\n \t\t\t\t*sps0.pic_width_in_mbs_minus_1+1+(i%sps0.pic_width_in_mbs_minus_1+1)];\n \t\t\t}\n\n \t\t}\n\t\t// i = n + 1 \n\t\t// while( i < PicSizeInMbs && MbToSliceGroupMap[ i ] != MbToSliceGroupMap[ n ] )\n\t\t // i++; \n\t\t// nextMbAddress = i\n\t\tint i = n + 1;\n\t\t// int nextMbAddress = i;\n\n\t\twhile(i<PicSizeInMbs &&( MbToSliceGroupMap[i]!=MbToSliceGroupMap[n])) {\n\t\t\ti++;\n\t\t\t// System.out.println(\"here mb address\");\n\t\t\t// nextMbAddress = i;\n\t\t}\n\t\t// System.out.println(\"nextMbAddress \"+i);\n\t\treturn i;\n\t}",
"public int blockSize () {\n\t\treturn blockSize;\n\t}",
"public synchronized FileTableEntry falloc(String filename, String mode) {\n\t\tshort iNumber = -1; //inode number\n\t\tInode inode = null;//set null for inode\n\t\t\n\t\twhile (true) {\n\t\t\t//get iNumber from file name\n\t\t\tiNumber = (filename.equals(\"/\")) ? (short) 0 : dir.namei(filename);\n\t\t\t\n\t\t\t//if the iNumber is greater or equal 0, exist the inode\n\t\t\tif (iNumber >= 0) {\n\t\t\t\tinode = new Inode(iNumber);\n\t\t\t\t\n\t\t\t\t//if the file request for read, and flag is read or used or unused\n\t\t\t\tif (mode.equals(\"r\")) {\n\t\t\t\t\tif (inode.flag == READ || inode.flag == USED || inode.flag == UNUSED) {\n\t\t\t\t\t\tinode.flag = READ;//set the flag for read\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t//if the file can write, wait until finish\n\t\t\t\t\t} else if (inode.flag == WRITE) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\twait();\n\t\t\t\t\t\t} catch (InterruptedException e) {}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// I want to write, but no one is reading it\n\t\t\t\t\tif (inode.flag == USED || inode.flag == UNUSED) {\n\t\t\t\t\t\tinode.flag = WRITE;//set the flag for write\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else { // I want to write, but someone is reading it\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\twait();//if flag can read or write, wait until they finish\n\t\t\t\t\t\t} catch (InterruptedException e) {}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//if the node can exist, return null\n\t\t\t} else if (mode.equals(\"r\")) {\n\t\t\t\treturn null;\n\t\t\t} else {\n\t\t\t\t//if the node cannot exist, create a new node and use directory to get iNumber\n\t\t\t\tif (!mode.equals(\"r\")) {\n\t\t\t\t\tiNumber = dir.ialloc(filename);\n\t\t\t\t\tinode = new Inode(iNumber);\n\t\t\t\t\tinode.flag = WRITE;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tinode.count++;//increstment for count the users number\n\t\tinode.toDisk(iNumber);\n\t\t//create a new file table entry \n\t\tFileTableEntry entry = new FileTableEntry(inode, iNumber, mode);\n\t\ttable.addElement(entry);//add data in the file table\n\t\treturn entry;\n\t}",
"@Override\n public int blockSize() {\n return ciper.blockSize();\n }",
"private void updateStatusInternal(){\n\t\tFile dataPath = Environment.getDataDirectory();\n\t\tStatFs stat = new StatFs(dataPath.getPath());\n\t\tlong blockSize = stat.getBlockSize();\n\t\tlong availableBlocks = stat.getAvailableBlocks();\n\t\t//show the space of internal storage\n\t\tmExternalTotalSpace=formatSize(availableBlocks * blockSize);\n\t}",
"public void testFetchBlocks() throws IOException {\n\t\tLocalRawDataBlockList list = new LocalRawDataBlockList();\r\n\t\tbyte[] data = new byte[512];\r\n\t\tint offset = 0;\r\n\r\n\t\tLittleEndian.putInt(data, offset, -3); // for the BAT block itself\r\n\t\toffset += LittleEndianConsts.INT_SIZE;\r\n\r\n\t\t// document 1: is at end of file already; start block = -2\r\n\t\t// document 2: has only one block; start block = 1\r\n\t\tLittleEndian.putInt(data, offset, -2);\r\n\t\toffset += LittleEndianConsts.INT_SIZE;\r\n\r\n\t\t// document 3: has a loop in it; start block = 2\r\n\t\tLittleEndian.putInt(data, offset, 2);\r\n\t\toffset += LittleEndianConsts.INT_SIZE;\r\n\r\n\t\t// document 4: peeks into document 2's data; start block = 3\r\n\t\tLittleEndian.putInt(data, offset, 4);\r\n\t\toffset += LittleEndianConsts.INT_SIZE;\r\n\t\tLittleEndian.putInt(data, offset, 1);\r\n\t\toffset += LittleEndianConsts.INT_SIZE;\r\n\r\n\t\t// document 5: includes an unused block; start block = 5\r\n\t\tLittleEndian.putInt(data, offset, 6);\r\n\t\toffset += LittleEndianConsts.INT_SIZE;\r\n\t\tLittleEndian.putInt(data, offset, -1);\r\n\t\toffset += LittleEndianConsts.INT_SIZE;\r\n\r\n\t\t// document 6: includes a BAT block; start block = 7\r\n\t\tLittleEndian.putInt(data, offset, 8);\r\n\t\toffset += LittleEndianConsts.INT_SIZE;\r\n\t\tLittleEndian.putInt(data, offset, 0);\r\n\t\toffset += LittleEndianConsts.INT_SIZE;\r\n\r\n\t\t// document 7: includes an XBAT block; start block = 9\r\n\t\tLittleEndian.putInt(data, offset, 10);\r\n\t\toffset += LittleEndianConsts.INT_SIZE;\r\n\t\tLittleEndian.putInt(data, offset, -4);\r\n\t\toffset += LittleEndianConsts.INT_SIZE;\r\n\r\n\t\t// document 8: goes off into space; start block = 11;\r\n\t\tLittleEndian.putInt(data, offset, 1000);\r\n\t\toffset += LittleEndianConsts.INT_SIZE;\r\n\r\n\t\t// document 9: no screw ups; start block = 12;\r\n\t\tint index = 13;\r\n\r\n\t\tfor (; offset < 508; offset += LittleEndianConsts.INT_SIZE) {\r\n\t\t\tLittleEndian.putInt(data, offset, index++);\r\n\t\t}\r\n\t\tLittleEndian.putInt(data, offset, -2);\r\n\t\tlist.add(new RawDataBlock(new ByteArrayInputStream(data)));\r\n\t\tlist.fill(1);\r\n\t\tint[] blocks = { 0 };\r\n\t\tBlockAllocationTableReader table = new BlockAllocationTableReader(\r\n\t\t POIFSConstants.SMALLER_BIG_BLOCK_SIZE_DETAILS, 1, blocks, 0, -2, list);\r\n\t\tint[] start_blocks = { -2, 1, 2, 3, 5, 7, 9, 11, 12 };\r\n\t\tint[] expected_length = { 0, 1, -1, -1, -1, -1, -1, -1, 116 };\r\n\r\n\t\tfor (int j = 0; j < start_blocks.length; j++) {\r\n\t\t\ttry {\r\n\t\t\t\tListManagedBlock[] dataBlocks = table.fetchBlocks(start_blocks[j], -1, list);\r\n\r\n\t\t\t\tif (expected_length[j] == -1) {\r\n\t\t\t\t\tfail(\"document \" + j + \" should have failed, but found a length of \"\r\n\t\t\t\t\t\t\t+ dataBlocks.length);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tassertEquals(expected_length[j], dataBlocks.length);\r\n\t\t\t\t}\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\tif (expected_length[j] == -1) {\r\n\r\n\t\t\t\t\t// no problem, we expected a failure here\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthrow e;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"void readBlock(int blockId, byte[] buffer, int offset) throws IOException;",
"public int engineBlockSize () { return BLOCK_SIZE; }",
"public long getNextBlock(long address){\n int marker = readMarkerLowerBits(address - 1);\n int blocksize;\n if(marker == 0){\n blocksize = readLengthField(address, 1);\n return address + blocksize + 1;\n } else if(marker == 15){\n return address + 1;\n } else {\n if (isBlockUsed(address)) marker -= 8;\n blocksize = readLengthField(address, marker);\n if (isBlockUsed(address)) {\n return address + blocksize + 2 * (marker - 8) + 1;\n }\n return address + blocksize + 1;\n }\n }",
"public static void getItemsPerLevelUpTo64New(long[] I0, long[] IStar,byte[] offsets, int bucketId)\n\t{\n\t\toffsets[0] = (byte) Long.bitCount(I0[bucketId]);\n\n\n\t\tbyte offset = 0;\n\t\tint i =1;\n\t\twhile(true)\n\t\t{ \n\t\t\tlong tempMask = (1l<<(offsets[0]+offset))-1;\n\t\t\tbyte nextOffset = (byte) Long.bitCount(IStar[bucketId]&tempMask);\n\t\t\t\t\t\n\t\t\t\t\t//Long.bitCount(IStar&((1l<<(offsets[0]+offset)-1));\n\t\t\t\t\t\n//\t\t\t\t\trank(IStar,offsets[0]+offset);\n\t\t\toffsets[i] = (byte) (nextOffset-offset);\n\t\t\tif ( offsets[i++]<=0)\n\t\t\t\tbreak;\n//\t\t\tif(nextOffset == offset)\n//\t\t\t\tbreak;\n\t\t\toffset= nextOffset;\n\t\t}\n\t\treturn ;\n\n\n\t}",
"public int getBlockID()\r\n/* 57: */ {\r\n/* 58: 46 */ return RedPowerMachine.blockFrame.cm;\r\n/* 59: */ }",
"private static long slotOffset(int i) {\n return ((long) i << qShift) + qBase;\n }",
"void readBlock(int blockId, byte[] buffer) throws IOException;",
"private c a(c blk, int i) {\n/* 450 */ int w = blk.g;\n/* 451 */ int h = blk.h;\n/* */ \n/* */ \n/* */ \n/* 455 */ if (i >= 0 && i <= 2) {\n/* */ int j;\n/* 457 */ if (blk.a() != 3) {\n/* 458 */ if (this.j == null || this.j.a() != 3) {\n/* 459 */ this.j = (c)new e();\n/* */ }\n/* 461 */ this.j.g = w;\n/* 462 */ this.j.h = h;\n/* 463 */ this.j.e = blk.e;\n/* 464 */ this.j.f = blk.f;\n/* 465 */ blk = this.j;\n/* */ } \n/* */ \n/* */ \n/* 469 */ int[] outdata = (int[])blk.b();\n/* */ \n/* */ \n/* 472 */ if (outdata == null || outdata.length < h * w) {\n/* 473 */ outdata = new int[h * w];\n/* 474 */ blk.a(outdata);\n/* */ } \n/* */ \n/* */ \n/* */ \n/* */ \n/* 480 */ if (this.m == null)\n/* 481 */ this.m = new e(); \n/* 482 */ if (this.n == null)\n/* 483 */ this.n = new e(); \n/* 484 */ if (this.o == null)\n/* 485 */ this.o = new e(); \n/* 486 */ this.o.g = blk.g;\n/* 487 */ this.o.h = blk.h;\n/* 488 */ this.o.e = blk.e;\n/* 489 */ this.o.f = blk.f;\n/* */ \n/* */ \n/* */ \n/* 493 */ this.m = (e)this.e.getInternCompData((c)this.m, 0);\n/* 494 */ int[] data0 = (int[])this.m.b();\n/* 495 */ this.n = (e)this.e.getInternCompData((c)this.n, 1);\n/* 496 */ int[] data1 = (int[])this.n.b();\n/* 497 */ this.o = (e)this.e.getInternCompData((c)this.o, 2);\n/* 498 */ int[] bdata = (int[])this.o.b();\n/* */ \n/* */ \n/* 501 */ blk.k = (this.m.k || this.n.k || this.o.k);\n/* */ \n/* 503 */ blk.i = 0;\n/* 504 */ blk.j = w;\n/* */ \n/* */ \n/* */ \n/* */ \n/* 509 */ int k = w * h - 1;\n/* 510 */ int k0 = this.m.i + (h - 1) * this.m.j + w - 1;\n/* 511 */ int k1 = this.n.i + (h - 1) * this.n.j + w - 1;\n/* 512 */ int k2 = this.o.i + (h - 1) * this.o.j + w - 1;\n/* */ \n/* 514 */ switch (i) {\n/* */ case 0:\n/* 516 */ for (j = h - 1; j >= 0; j--) {\n/* 517 */ for (int mink = k - w; k > mink; k--, k0--, k1--, k2--)\n/* */ {\n/* */ \n/* 520 */ outdata[k] = data0[k] + 2 * data1[k] + bdata[k] >> 2;\n/* */ }\n/* */ \n/* */ \n/* */ \n/* 525 */ k0 -= this.m.j - w;\n/* 526 */ k1 -= this.n.j - w;\n/* 527 */ k2 -= this.o.j - w;\n/* */ } \n/* */ break;\n/* */ \n/* */ case 1:\n/* 532 */ for (j = h - 1; j >= 0; j--) {\n/* 533 */ for (int mink = k - w; k > mink; k--, k1--, k2--)\n/* */ {\n/* */ \n/* 536 */ outdata[k] = bdata[k2] - data1[k1];\n/* */ }\n/* */ \n/* 539 */ k1 -= this.n.j - w;\n/* 540 */ k2 -= this.o.j - w;\n/* */ } \n/* */ break;\n/* */ \n/* */ case 2:\n/* 545 */ for (j = h - 1; j >= 0; j--) {\n/* 546 */ for (int mink = k - w; k > mink; k--, k0--, k1--)\n/* */ {\n/* */ \n/* 549 */ outdata[k] = data0[k0] - data1[k1];\n/* */ }\n/* */ \n/* 552 */ k0 -= this.m.j - w;\n/* 553 */ k1 -= this.n.j - w;\n/* */ } \n/* */ break;\n/* */ } \n/* */ \n/* */ } else {\n/* 559 */ if (i >= 3)\n/* */ {\n/* */ \n/* 562 */ return this.e.getInternCompData(blk, i);\n/* */ }\n/* */ \n/* */ \n/* 566 */ throw new IllegalArgumentException();\n/* */ } \n/* 568 */ return blk;\n/* */ }",
"@Override\n\tpublic int getBlockNum() {\n\t\treturn 0;\n\t}",
"public void setBlockSize(long value) {\n this.blockSize = value;\n }",
"protected int engineBlockSize () { return BLOCK_SIZE; }",
"public synchronized FileTableEntry falloc(String fileName, String mode) {\n Inode myNode = null;\n short blockID;\n while(true) \n {\n if(fileName.equals(\"/\")) {\n blockID = 0;\n } else {\n blockID = dir.namei(fileName); \n }\n\n if(blockID >= 0) { //Not superblock\n myNode = new Inode(blockID);\n break;\n }\n\n if(mode.compareTo(\"r\") == 0) {\n return null;\n }\n blockID = dir.ialloc(fileName);\n myNode = new Inode();\n break;\n }\n\n myNode.count++;\n myNode.toDisk(blockID);\n FileTableEntry toAdd = new FileTableEntry(myNode, blockID, mode);\n table.addElement(toAdd);\n return toAdd;\n }",
"public static long getTotalInternalMemorySize() {\r\n File path = Environment.getDataDirectory();\r\n StatFs stat = new StatFs(path.getPath());\r\n long blockSize = stat.getBlockSize();\r\n long totalBlocks = stat.getBlockCount();\r\n return totalBlocks * blockSize;\r\n }",
"public byte getMass_unit() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn __io__block.readByte(__io__address + 9);\n\t\t} else {\n\t\t\treturn __io__block.readByte(__io__address + 9);\n\t\t}\n\t}",
"public static long m136421a() {\n StatFs statFs;\n long j;\n try {\n statFs = new StatFs(Environment.getExternalStorageDirectory().getAbsolutePath());\n } catch (IllegalArgumentException unused) {\n statFs = null;\n }\n if (statFs == null) {\n j = 0;\n } else if (VERSION.SDK_INT >= 18) {\n j = statFs.getBlockSizeLong() * statFs.getAvailableBlocksLong();\n } else {\n j = ((long) statFs.getBlockSize()) * ((long) statFs.getAvailableBlocks());\n }\n return (j / 1024) / 1024;\n }",
"synchronized ExerciseBuffer pin(Block blk) {\n\t ExerciseBuffer buff = findExistingBuffer(blk);\n if (buff == null) {\n buff = chooseUnpinnedBuffer();\n if (buff == null)\n return null;\n buff.assignToBlock(blk);\n \n \n }\n if (!buff.isPinned()) numAvailable--;\n \n buff.pin(); // \n \n if(bufferHashTable.containsValue(buff)){ //if value (buffer) is already exist then remove that old key (blk) \n bufferHashTable.remove(blk); \n \n }\n bufferHashTable.put(blk, buff); // adding new key (blk) to HashTable\n \n \n return buff;\n }",
"abstract public long[] getBlockListAsLongs();",
"public static long getAllSize1(){\n\t\tFile path = Environment.getExternalStorageDirectory(); \n\t\t\n\t\tlong size = 0;\n\t\tStatFs stat = new StatFs(path.getPath()); \n\t\tlong blockSize = stat.getBlockSize(); \n\t\tlong availableBlocks = stat.getBlockCount();\n\t\tsize = availableBlocks * blockSize; \n\t\treturn size;\n\t}",
"public int getMemoryUsedForBlocks() {\r\n return memoryUsedForBlocks;\r\n }",
"public abstract long getMemoryBytes(MemoryType memoryType, int minibatchSize, MemoryUseMode memoryUseMode,\n CacheMode cacheMode, DataType dataType);",
"public static int offset_infos_size_data() {\n return (80 / 8);\n }",
"public long getCurrentOffset() {\n return (long)current_chunk * (long)chunksize;\n }",
"alluxio.proto.journal.File.UpdateInodeEntry getUpdateInode();",
"@Test\n public void testmagicNumbersForBigDataset() {\n try (FileInputStream inImage = new FileInputStream(INPUT_IMAGE_PATH);\n FileInputStream inLabel = new FileInputStream(INPUT_LABEL_PATH)) {\n\n //==========================================================================================================\n // it reads the next byte of data (8 bits) then put them to left side of an int\n // so the int is 32 bit is fully filled at the end of logic\n // and it moves the cursor to a position after first 32 bits (4 bytes)\n System.out.println(\"Available bytes before read: \" + inImage.available());//47040016\n int magicNumberImages = (inImage.read() << 24) | (inImage.read() << 16) | (inImage.read() << 8) | (inImage.read());\n int numberOfImages = (inImage.read() << 24) | (inImage.read() << 16) | (inImage.read() << 8) | (inImage.read());\n int numberOfRows = (inImage.read() << 24) | (inImage.read() << 16) | (inImage.read() << 8) | (inImage.read());\n int numberOfColumns = (inImage.read() << 24) | (inImage.read() << 16) | (inImage.read() << 8) | (inImage.read());\n\n assertTrue(magicNumberImages == 2051);\n assertTrue(numberOfImages == 60000);\n assertTrue(numberOfRows == 28);\n assertTrue(numberOfColumns == 28);\n\n //the same as inImage.skip(16);\n System.out.println(\"Available bytes after read: \" + inImage.available());//47040000\n\n //==========================================================================================================\n // it reads the next byte of data (8 bits) then put them to left side of an int\n // so the int is 32 bit is fully filled at the end of logic\n // and it moves the cursor to a position after first 32 bits (4 bytes)\n System.out.println(\"Available bytes before read: \" + inLabel.available()); //60008\n int magicNumberLabels = (inLabel.read() << 24) | (inLabel.read() << 16) | (inLabel.read() << 8) | (inLabel.read());\n int numberOfLabels = (inLabel.read() << 24) | (inLabel.read() << 16) | (inLabel.read() << 8) | (inLabel.read());\n assertTrue(magicNumberLabels == 2049);\n assertTrue(numberOfLabels == 60000);\n\n System.out.println(\"Available bytes after read: \" + inLabel.available()); //60000\n //the same as inLabel.skip(8);\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"Block (int start, int size)\n {\n this.start = start;\n this.size = size;\n }",
"private int readBlock() throws IOException {\n\t\t\tif (getSource().offset() == getSource().length()) return -1;\n\t\t\tgetMetadata().setBlockSize(getSource().read() & 0xff);\n\t\t\tint n = 0;\n\t\t\tint count;\n\n\t\t\tif (getMetadata().getBlockSize() > 0) {\n\t\t\t\ttry {\n\t\t\t\t\twhile (n < getMetadata().getBlockSize()) {\n\t\t\t\t\t\tcount = getSource().read(getMetadata().getdBlock(), n, getMetadata()\n\t\t\t\t\t\t\t.getBlockSize() - n);\n\t\t\t\t\t\tif (count == -1) break;\n\t\t\t\t\t\tn += count;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (final IOException e) {\n\t\t\t\t\tlog().trace(\"Truncated block\", e);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn n;\n\t\t}",
"public abstract void updateBlockRecord();",
"void writeBlock(int blockId, byte[] buffer, int offset) throws IOException;",
"Block getBlockByNumber(long number);",
"protected abstract int getBucketIndex(int freeSpace);",
"public int processBlock(byte[] in, int inOff, byte[] out, int outOff) throws IllegalStateException;",
"public Block accessBlock(int i){\n\t\treturn blocks[i]; \n\t}",
"private void createFiOrDi(Directory root, String type, int freeBlock) {\n\t\tif(Constants.DIRECTORY_FILE.equals(type)) {\n\t\t\tsector.put(freeBlock, new Directory());\n\t\t} else {\n\t\t\tsector.put(freeBlock, new Data());\n\t\t}\n\t}",
"public alluxio.proto.journal.File.InodeFileEntry getInodeFile() {\n return inodeFile_;\n }",
"public synchronized FileTableEntry falloc( String filename, String mode ) {\n short iNum = -1;\n Inode inode = null;\n\n // if not directory assign to the inumber corresponding to the file\n if (filename.equals(\"/\") == false){\n iNum = directory.namei(filename);\n }else{\n // if its the directory assign iNum to 0\n iNum = 0;\n }\n\n // file not found\n if (iNum == -1){\n // checks to see if file mode is equal to \"r\"\n if(mode.compareTo(\"r\") == 0) {\n // return null since you cannot create a file in read mode\n return null;\n // file not in read mode, therefore create a new file\n } else {\n // allocate a new file (structure) table entry for this file name\n iNum = directory.ialloc(filename);\n\n //unable to create file return\n if(iNum == -1) {\n return null;\n }\n // assign iNodes array by iNum to inode\n inode = new Inode();\n iNodes[iNum] = inode;\n }\n // file was found\n }else {\n inode = iNodes[iNum];\n }\n\n // in read mode\n if (mode.compareTo(\"r\") == 0) {\n // wait until the flag is in write mode\n while (inode.flag > 1) {\n try {\n wait();\n } catch (InterruptedException e) {}\n }\n //set flag to read\n inode.flag = 1;\n inode.count++;\n }else{\n while (inode.flag > 0) {\n try {\n wait();\n } catch (InterruptedException e) {}\n }\n inode.flag = 2;\n // increment this inode's count\n inode.count++;\n }\n\n // immediately write back this inode to the disk\n inode.toDisk(iNum);\n // make new file table entry\n FileTableEntry ftEnt = new FileTableEntry(inode, iNum, mode);\n // add the new entry to the table\n table.addElement(ftEnt);\n\n // return a reference to this file (structure) table entry\n return ftEnt;\n\n }",
"boolean requestSpace(final long blockId, final long requestBytes) throws IOException;",
"public c getCompData(c blk, int i) {\n/* 399 */ if (i >= 3 || this.h == 0) {\n/* 400 */ return this.e.getCompData(blk, i);\n/* */ }\n/* */ \n/* 403 */ return getInternCompData(blk, i);\n/* */ }",
"public static int size_group() {\n return (8 / 8);\n }",
"alluxio.proto.journal.File.UpdateInodeFileEntry getUpdateInodeFile();",
"public int getInodesPerGroup()\n {\n return inodesPerGroup;\n }",
"public int getFreeBlock()\n\t{\n\t\t// Store the current free block temporarily.\n\t\tint currentFreeBlock = freeList;\n\n\t\tif(currentFreeBlock != NULL_PTR)\n\t\t{\n\t\t\tbyte[] buffer = new byte[Disk.blockSize];\n\n\t\t\t// Read the current free block into the buffer.\n\t\t\tSysLib.rawread(currentFreeBlock, buffer);\n\n\t\t\t// Update the pointer to the next free block.\n\t\t\tfreeList = SysLib.bytes2short(buffer, 0);\n\n\t\t\tif(freeList == NULL_PTR)\n\t\t\t\tlastFreeBlock = NULL_PTR;\n\n\t\t\t// Update the current free block's pointer.\n\t\t\tSysLib.short2bytes(NULL_PTR, buffer, 0);\n\n\t\t\t// Write the current free block back to the disk.\n\t\t\tSysLib.rawwrite(currentFreeBlock, buffer);\n\t\t}\n\n\t\treturn currentFreeBlock;\n\t}",
"public long getBlockCount() {\n \t\tint coords[] = getCoords();\n \t\treturn \n \t\t(coords[3]-coords[0]+1)*\n \t\t(coords[4]-coords[1]+1)*\n \t\t(coords[5]-coords[2]+1);\n \t}",
"public static int totalSize_data() {\n return (480 / 8);\n }"
] | [
"0.6675964",
"0.63399327",
"0.63211817",
"0.59013695",
"0.58015364",
"0.5545781",
"0.54477686",
"0.5423684",
"0.53968316",
"0.53927076",
"0.53855526",
"0.53829557",
"0.53591174",
"0.53544736",
"0.5331276",
"0.5290426",
"0.526353",
"0.5242588",
"0.5236386",
"0.5231838",
"0.52293026",
"0.52288234",
"0.5217694",
"0.5216752",
"0.52116746",
"0.5105726",
"0.5091169",
"0.5077988",
"0.50555295",
"0.5034924",
"0.49995518",
"0.49982685",
"0.49800456",
"0.49800456",
"0.4977799",
"0.49728215",
"0.49501008",
"0.4948889",
"0.49440283",
"0.49391988",
"0.493647",
"0.4905198",
"0.49032912",
"0.49003452",
"0.4894149",
"0.4880685",
"0.4877244",
"0.48751375",
"0.48740762",
"0.4855631",
"0.48517844",
"0.48506108",
"0.48473752",
"0.48433736",
"0.48237854",
"0.48202774",
"0.48155084",
"0.481521",
"0.48101893",
"0.4808695",
"0.48068175",
"0.48062283",
"0.47996023",
"0.47916523",
"0.47870108",
"0.47807083",
"0.47776872",
"0.47760615",
"0.4773556",
"0.47691393",
"0.47654796",
"0.47651976",
"0.47629744",
"0.475983",
"0.47580376",
"0.47352508",
"0.473372",
"0.47333282",
"0.47297302",
"0.4729166",
"0.47208387",
"0.47109452",
"0.47071236",
"0.4701686",
"0.469095",
"0.46843615",
"0.4676571",
"0.46686038",
"0.46643645",
"0.46601364",
"0.46575463",
"0.46528453",
"0.46457604",
"0.4644565",
"0.46438113",
"0.46430174",
"0.46376473",
"0.46312606",
"0.46289036",
"0.46264902"
] | 0.73647875 | 0 |
this method calculates the number of block groups in the filesystem, it uses the number of blocks and divides that by the number blocks per group and then does a modulo calculation in an inline if statement to see if the value is 0 and if so it returns the actual value of the block groups and if the modulo is not 0 then it will add 1 to the blockGroups value and return that. | public int getNumberOfBlockGroups(int blocks, int blocksPerGroup){
int blockGroups = blocks / blocksPerGroup; //get number of block groups
return (blockGroups % blocksPerGroup) == 0 ? blockGroups : blockGroups+1; //inline if statemnt to check if the modulo value of block groups and blocks per group is 0
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private double getInodeBlockGroup(int inodeNumber, int inodesPerGroup){\n\n inodeNumber--;\n return (inodeNumber % inodesPerGroup);\n }",
"public static int size_group() {\n return (8 / 8);\n }",
"public int getInodesPerGroup()\n {\n return inodesPerGroup;\n }",
"public long getGroupsCount() {\r\n return groupsCount;\r\n }",
"int getGroupingSize() {\n return groupingSize;\n }",
"public int getGroupCount() {\n\t\treturn this.groups.size();\n\t}",
"abstract public int getNumberOfBlocks();",
"public int countGroups()\n/* 25: */ {\n/* 26:22 */ return this.members.size();\n/* 27: */ }",
"int getAndSequenceGroupsCount();",
"int getBlocksAmount();",
"int getTotalBlockNum();",
"public static int getNrGroups(Structure s){\n int nrGroups = 0;\n \n List<Chain> chains = s.getChains(0);\n Iterator<Chain> iter = chains.iterator();\n while (iter.hasNext()){\n Chain c = (Chain) iter.next();\n nrGroups += c.getAtomLength();\n }\n return nrGroups;\n }",
"int doComputeGroups( long start_id )\n {\n long cid = mApp.mCID;\n // Log.v(\"DistoX\", \"Compute CID \" + cid + \" from gid \" + start_id );\n if ( cid < 0 ) return -2;\n float thr = TDMath.cosd( TDSetting.mGroupDistance );\n List<CalibCBlock> list = mApp_mDData.selectAllGMs( cid, 0 );\n if ( list.size() < 4 ) {\n return -1;\n }\n long group = 0;\n int cnt = 0;\n float b = 0.0f;\n float c = 0.0f;\n if ( start_id >= 0 ) {\n for ( CalibCBlock item : list ) {\n if ( item.mId == start_id ) {\n group = item.mGroup;\n cnt = 1;\n b = item.mBearing;\n c = item.mClino;\n break;\n }\n }\n } else {\n if ( TDSetting.mGroupBy != TDSetting.GROUP_BY_DISTANCE ) {\n group = 1;\n }\n }\n switch ( TDSetting.mGroupBy ) {\n case TDSetting.GROUP_BY_DISTANCE:\n for ( CalibCBlock item : list ) {\n if ( start_id >= 0 && item.mId <= start_id ) continue;\n if ( group == 0 || item.isFarFrom( b, c, thr ) ) {\n ++ group;\n b = item.mBearing;\n c = item.mClino;\n }\n item.setGroup( group );\n mApp_mDData.updateGMName( item.mId, item.mCalibId, Long.toString( item.mGroup ) );\n // N.B. item.calibId == cid\n }\n break;\n case TDSetting.GROUP_BY_FOUR:\n // TDLog.Log( TDLog.LOG_CALIB, \"group by four\");\n for ( CalibCBlock item : list ) {\n if ( start_id >= 0 && item.mId <= start_id ) continue;\n item.setGroupIfNonZero( group );\n mApp_mDData.updateGMName( item.mId, item.mCalibId, Long.toString( item.mGroup ) );\n ++ cnt;\n if ( (cnt%4) == 0 ) {\n ++group;\n // TDLog.Log( TDLog.LOG_CALIB, \"cnt \" + cnt + \" new group \" + group );\n }\n }\n break;\n case TDSetting.GROUP_BY_ONLY_16:\n for ( CalibCBlock item : list ) {\n if ( start_id >= 0 && item.mId <= start_id ) continue;\n item.setGroupIfNonZero( group );\n mApp_mDData.updateGMName( item.mId, item.mCalibId, Long.toString( item.mGroup ) );\n ++ cnt;\n if ( (cnt%4) == 0 || cnt >= 16 ) ++group;\n }\n break;\n }\n return (int)group-1;\n }",
"public int numBlocks() throws IOException {\r\n int len = (int)((file.length()) / (blockSizeBytes));\r\n return len;\r\n }",
"private long calcEffectiveBlockGroupLen(BlockData[] blockGroup,\n int replicaCount) {\n Preconditions.checkState(blockGroup.length == replicaCount);\n\n long blockGroupLen = Long.MAX_VALUE;\n\n for (int i = 0; i < replicaCount; i++) {\n if (blockGroup[i] == null) {\n continue;\n }\n\n long putBlockLen = getBlockDataLength(blockGroup[i]);\n // Use safe length is the minimum of the lengths recorded across the\n // stripe\n blockGroupLen = Math.min(putBlockLen, blockGroupLen);\n }\n return blockGroupLen == Long.MAX_VALUE ? 0 : blockGroupLen;\n }",
"int getGroupCount();",
"public int getStorageGroupNum(PartialPath pathPattern, boolean isPrefixMatch)\n throws MetadataException {\n try (DatabaseCounter counter = new DatabaseCounter(root, pathPattern, store, isPrefixMatch)) {\n return (int) counter.count();\n }\n }",
"static void findGroups() {\n G2 = 0;\n while (group2()) {\n }\n\n // find group of size 3\n G3 = 0;\n while (group3()) {\n }\n }",
"int getBlockNumbersCount();",
"public int getBlockNumbersCount() {\n return blockNumbers_.size();\n }",
"@Override\n public int getGroupCount() {\n return mGroups.size();\n }",
"public int getBlockNumbersCount() {\n return blockNumbers_.size();\n }",
"int numOfBlocks() {\n return ni * nj * nk;\n }",
"int getChunksCount();",
"int getChunksCount();",
"public int getBlockNumsCount() {\n return blockNums_.size();\n }",
"public int getBlockNumsCount() {\n return blockNums_.size();\n }",
"public static int GetTotalBlocks()\n {\n return totalBlocks;\n }",
"public int getNumGroups() {\n return memberships.size();\n }",
"public int getCol_groups() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn __io__block.readInt(__io__address + 8);\n\t\t} else {\n\t\t\treturn __io__block.readInt(__io__address + 8);\n\t\t}\n\t}",
"@Override\n\tpublic int getGroupCount() {\n\t\treturn sections.size();\n\t}",
"public int getBlockNumsCount() {\n return blockNums_.size();\n }",
"public int getBlockNumsCount() {\n return blockNums_.size();\n }",
"public static int sizeBits_group() {\n return 8;\n }",
"int getBlockNumsCount();",
"int getBlockNumsCount();",
"public AVT getGroupingSize()\n {\n return m_groupingSize_avt;\n }",
"private long computeNumChunks() {\n Long storedLastSCId = lobProps.getLastSuperChunkId();\n\n if (storedLastSCId == null) {\n /* Failed between write of first chunk and metadata. */\n storedLastSCId = 1l;\n }\n\n /* Determine the last recorded saved super chunk. */\n long lastSCId = storedLastSCId + 1;\n long lastCId = findLastChunkInSuperChunk(lastSCId);\n if (lastCId == -1) {\n /* Look in the previous super chunk. */\n lastSCId--;\n lastCId = findLastChunkInSuperChunk(lastSCId);\n if (lastCId == -1) {\n if (lastSCId == 1) {\n /* At start, no chunks were written. */\n return 0;\n }\n final String msg = \"Expected at least one chunk for \" +\n lastSCId + \" Delete the LOB and retry.\";\n throw new IllegalStateException(msg);\n\n }\n }\n\n /* Have the last chunk. */\n return ((lastSCId - 1) * chunksPerPartition) + lastCId;\n }",
"int getChildrenCount(int groupPosition);",
"private static int neededBlocks(int bytes) {\n\t\tint ret = bytes / BLOCK_SIZE;\n\t\tif (bytes % BLOCK_SIZE != 0) {\n\t\t\tret++;\n\t\t}\n\t\treturn ret;\n\t}",
"private void createRpBlockConsistencyGroups() {\n DbClient dbClient = this.getDbClient();\n List<URI> protectionSetURIs = dbClient.queryByType(ProtectionSet.class, false);\n\n Iterator<ProtectionSet> protectionSets =\n dbClient.queryIterativeObjects(ProtectionSet.class, protectionSetURIs);\n\n while (protectionSets.hasNext()) {\n ProtectionSet ps = protectionSets.next();\n Project project = dbClient.queryObject(Project.class, ps.getProject());\n\n BlockConsistencyGroup cg = new BlockConsistencyGroup();\n cg.setId(URIUtil.createId(BlockConsistencyGroup.class));\n cg.setLabel(ps.getLabel());\n cg.setDeviceName(ps.getLabel());\n cg.setType(BlockConsistencyGroup.Types.RP.toString());\n cg.setProject(new NamedURI(project.getId(), project.getLabel()));\n cg.setTenant(project.getTenantOrg());\n\n dbClient.createObject(cg);\n\n log.debug(\"Created ConsistencyGroup (id={}) based on ProtectionSet (id={})\",\n cg.getId().toString(), ps.getId().toString());\n\n // Organize the volumes by replication set\n for (String protectionVolumeID : ps.getVolumes()) {\n URI uri = URI.create(protectionVolumeID);\n Volume protectionVolume = dbClient.queryObject(Volume.class, uri);\n protectionVolume.addConsistencyGroup(cg.getId().toString());\n\n dbClient.persistObject(protectionVolume);\n\n log.debug(\"Volume (id={}) added to ConsistencyGroup (id={})\",\n protectionVolume.getId().toString(), cg.getId().toString());\n }\n }\n }",
"public void setGroupsCount(long groupsCount) {\r\n this.groupsCount = groupsCount;\r\n }",
"int getChunksLocationCount();",
"private int getGroupSize(double positiveProbability)\n {\n if (positiveProbability < eightIndividualsGroupMaxProbability)\n return 8;\n\n if (positiveProbability < fourIndividualsGroupMaxProbability)\n return 4;\n\n if (positiveProbability < twoIndividualsGroupMaxProbability)\n return 2;\n\n return 1;\n }",
"@Override\n\t\tpublic int getGroupCount() {\n\t\t\treturn data.size();\n\t\t}",
"public void setGroupingSize(int newValue) {\n groupingSize = (byte) newValue;\n }",
"int getNumOfChunks();",
"public int Size() {\n return group_.Size();\n }",
"public long getBlockCount ( ) {\r\n\t\treturn 436;\r\n\t}",
"public long getBlockCount() {\n \t\tint coords[] = getCoords();\n \t\treturn \n \t\t(coords[3]-coords[0]+1)*\n \t\t(coords[4]-coords[1]+1)*\n \t\t(coords[5]-coords[2]+1);\n \t}",
"public SolrSearchResult<Group> findGroups(SimpleQuery query, int skipBlocks, int blockSize) throws JsonProcessingException, IOException, NdexException{\n\t\tJsonNode postData = objectMapper.valueToTree(query);\n\t\treturn ndexRestClient.postSearchQuery(NdexApiVersion.v2 + \"/search/group?start=\" + skipBlocks + \"&size=\" + blockSize , postData, Group.class);\n\t}",
"public int getNumberOfBlocks(ImagePlus img, int m, int n);",
"@Override\n public int getGroupCount() {\n return groups.length;\n }",
"public Group[] getGroups(){\n\t\ttry{\n\t\t\tFile file = new File(ApplicationConstants.GROUPS_FILE);\n\t\t\tFileReader reader = new FileReader(file);\n\t\t\tBufferedReader buff = new BufferedReader(reader);\n\n\t\t\tboolean eof = false;\t\t//stores whether the end of the file has been reached\n\n\t\t\tint numberOfGroups = 0;\n\n\t\t\twhile(!eof){\n\t\t\t\tString line = buff.readLine();\n\t\t\t\tif (line == null){\n\t\t\t\t\teof = true;\t\t//the end of the file has been reached\n\t\t\t\t} else {\n\t\t\t\t\tnumberOfGroups++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tGroup[] groups = new Group[numberOfGroups];\n\n\t\t\treader.close();\n\t\t\tbuff.close();\n\n\t\t\tFileReader reader2 = new FileReader(file);\n\t\t\tBufferedReader buff2 = new BufferedReader(reader2);\n\n\t\t\tfor (int i = 0;i<numberOfGroups;i++){\n\t\t\t\tString line = buff2.readLine();\n\t\t\t\tgroups[i] = readGroup(line);\n\t\t\t}\n\n\t\t\treturn groups;\n\n\t\t} catch(Exception e){\n\t\t\treturn null;\n\t\t}\n\t}",
"public int getNumOfChunks() {\n return numOfChunks_;\n }",
"int numOfRemainingBlocks() {\n return blocks.size();\n }",
"public int getChunksCount() {\n return chunksCount_;\n }",
"public int getChunksCount() {\n return chunksCount_;\n }",
"public int getNumOfChunks() {\n return numOfChunks_;\n }",
"public long getFileGroupId();",
"static int[] countBlock() throws java.io.IOException {\n\t\tScanner fileScanner = new Scanner(new FileReader(\"level.txt\")); // load the .txt file that contains the level\n\t\tint width = fileScanner.nextInt(); // initialize with width using the first integer of the first line...\n\t\tint height = fileScanner.nextInt(); // ... second integer of the first line\n\t\tString inputText = fileScanner.nextLine(); // read in all subsequent characters after the first line\n\n\t\tfor(int row = 0; row < height; row++){ // get the count of wall blocks\n\t\t\tinputText = fileScanner.nextLine(); \n\t\t\tfor (int column = 0; column < inputText.length(); column++){\n\t\t\t\tchar ch = inputText.charAt(column);\n\t\t\t\tswitch(ch){\n\t\t\t\t\tcase 'W':\n\t\t\t\t\t\tcountElements[0]++; // for every wall element, add 1 to the wall counter in the array\n\t\t\t\t\t\tbreak;\t\n\t\t\t\t\tcase 'D':\n\t\t\t\t\t\tcountElements[1]++; // for every dirt element, add 1 to the dirt counter in the array\n\t\t\t\t\t\tcountElements[3]++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tcountElements[2]++;\n\t\t\t\t\t\tcountElements[3]++;\n\t\t\t\t\t\tbreak; // if not either a wall or dirt, then just continue on\n\t\t\t\t}\n\t\t\t} \n\t\t}\n\t\tfileScanner.close();\n\t\treturn new int[] {countElements[0], countElements[1], countElements[2], countElements[3]}; // return the array elements after counting through the entire map\n\t}",
"public int getChildCount(int groupPosition) {\n if (groupPosition < mGroupDataList.size()) {\n return mChildDataList.get(groupPosition) == null ? 0 : mChildDataList.get(groupPosition).size();\n }\n return 0;\n }",
"public int getChunksCount() {\n if (chunksBuilder_ == null) {\n return chunks_.size();\n } else {\n return chunksBuilder_.getCount();\n }\n }",
"public int numberOfBlocksToRemove() {\r\n return 105;\r\n }",
"protected int getChunkInRegion() {\n\t\treturn (rnd.nextInt(structurePosRange) + rnd.nextInt(structurePosRange)) / 2;\n\t}",
"public int getMaxSpawnedInChunk()\n {\n return 1;\n }",
"public long getBlockCount() {\n return blockCount;\n }",
"int process(int maxBlocks);",
"int getDisksCount();",
"static public HDFSBlocksDistribution\n computeHDFSBlocksDistribution(HdfsDataInputStream inputStream) throws IOException {\n List<LocatedBlock> blocks = inputStream.getAllBlocks();\n HDFSBlocksDistribution blocksDistribution = new HDFSBlocksDistribution();\n for (LocatedBlock block : blocks) {\n String[] hosts = getHostsForLocations(block);\n long len = block.getBlockSize();\n StorageType[] storageTypes = block.getStorageTypes();\n blocksDistribution.addHostsAndBlockWeight(hosts, len, storageTypes);\n }\n return blocksDistribution;\n }",
"public long getBlockSize ( ) {\r\n\t\tif (current_block >= getBlockCount())\r\n\t\t\treturn 0;\r\n\r\n\t\tif (current_block == getBlockCount() -1)\r\n\t\t\treturn 3670;\r\n\r\n\t\treturn 10000;\r\n\t}",
"java.util.List<java.lang.Integer> getBlockNumsList();",
"java.util.List<java.lang.Integer> getBlockNumsList();",
"@Override\r\n public int getChildrenCount(int groupPosition) {\n return mDataList.get(\"\" + groupPosition).size();\r\n }",
"public int getImageCount(String id) throws FormatException, IOException {\n if (!id.equals(currentId)) initFile(id);\n return numBlocks;\n }",
"int getGroupCountByStructureId(Integer structureId);",
"public PageReadStore readNextRowGroup() throws IOException {\n if (currentBlock == blocks.size()) {\n return null;\n }\n BlockMetaData block = blocks.get(currentBlock);\n if (block.getRowCount() == 0) {\n throw new RuntimeException(\"Illegal row group of 0 rows\");\n }\n this.currentRowGroup = new ColumnChunkPageReadStore(block.getRowCount());\n // prepare the list of consecutive chunks to read them in one scan\n List<ParquetStreamReader.ConsecutiveChunkList> allChunks = new ArrayList<>();\n ParquetStreamReader.ConsecutiveChunkList currentChunks = null;\n for (ColumnChunkMetaData mc : block.getColumns()) {\n ColumnPath pathKey = mc.getPath();\n BenchmarkCounter.incrementTotalBytes(mc.getTotalSize());\n ColumnDescriptor columnDescriptor = paths.get(pathKey);\n if (columnDescriptor != null) {\n long startingPos = mc.getStartingPos();\n // first chunk or not consecutive => new list\n if (currentChunks == null || currentChunks.endPos() != startingPos) {\n currentChunks = new ParquetStreamReader.ConsecutiveChunkList(startingPos);\n allChunks.add(currentChunks);\n }\n currentChunks.addChunk(new ParquetStreamReader.ChunkDescriptor(columnDescriptor, mc, startingPos, (int)mc.getTotalSize()));\n }\n }\n // actually read all the chunks\n for (ParquetStreamReader.ConsecutiveChunkList consecutiveChunks : allChunks) {\n final List<ParquetStreamReader.Chunk> chunks = consecutiveChunks.readAll(f);\n for (ParquetStreamReader.Chunk chunk : chunks) {\n currentRowGroup.addColumn(chunk.descriptor.col, chunk.readAllPages());\n }\n }\n\n // avoid re-reading bytes the dictionary reader is used after this call\n if (nextDictionaryReader != null) {\n nextDictionaryReader.setRowGroup(currentRowGroup);\n }\n\n advanceToNextBlock();\n\n return currentRowGroup;\n }",
"public static String m578g() {\r\n long j = 0;\r\n try {\r\n if (\"mounted\".equals(Environment.getExternalStorageState())) {\r\n StatFs statFs = new StatFs(Environment.getExternalStorageDirectory().getPath());\r\n j = ((long) statFs.getBlockCount()) * ((long) statFs.getBlockSize());\r\n }\r\n } catch (Exception e) {\r\n }\r\n return String.valueOf(j);\r\n }",
"@Override\n public int getRemainingClaimBlocks() {\n int remainingBlocks = this.optionInitialClaimBlocks + this.getAccruedClaimBlocks() + this.getBonusClaimBlocks();\n for (Claim claim : this.claimList) {\n if (!claim.isAdminClaim() && !claim.isSubdivision() && claim.getData().requiresClaimBlocks()) {\n remainingBlocks -= claim.getArea();\n }\n }\n\n return remainingBlocks;\n }",
"public int getGroupId() {\n return folderACL.getGroupId();\n }",
"public long getFreeDiskSpace() {\n\n\t// Get the data of the BAM.\n\tbyte [] bamData = getSector( 18, 0).getDataBytes();\n\n\tlong result = 0L; // Buffer for the result.\n\n\t// Just count the set bits from 0x04 to 0x8f.\n\tfor( int currentByteIndex = 0x04; currentByteIndex <= 0x8f; ++currentByteIndex) {\n\t \n\t // Get the current byte from the BAM.\n\t byte currentBamByte = bamData[ currentByteIndex];\n\n\t // Count the set bits in the current byte.\n\t for( int currentBit = 1; currentBit <= 0x80; currentBit <<= 1) {\n\n\t\tif( ( currentBamByte & currentBit) != 0) { // Is this block available?\n\n\t\t // Yes => add this free sector to the result;\n\t\t result += getUnitSize();\n\t\t}\n\t }\n\t}\n\n\treturn result; // Return the result.\n }",
"public static long count(nitro_service service) throws Exception{\n\t\tclusternodegroup obj = new clusternodegroup();\n\t\toptions option = new options();\n\t\toption.set_count(true);\n\t\tclusternodegroup[] response = (clusternodegroup[])obj.get_resources(service, option);\n\t\tif (response != null) {\n\t\t\treturn response[0].__count;\n\t\t}\n\t\treturn 0;\n\t}",
"int getBlockLocationsCount();",
"public int getHeightInChunks() {\n return (int)Math.ceil((double)getHeight() / (double)getChunkHeight());\n }",
"@Override\n\tpublic long getGroupId(int sectionPosition) {\n\t\treturn sectionPosition;\n\t}",
"public int getChunkCount () {\n return (this.getTagCount()>>BITS_TO_SHIFT_FOR_CHUNK) + 1;\n }",
"@java.lang.Override\n public int getChunksCount() {\n return chunks_.size();\n }",
"@Override\n public int getGroupCount() {\n return mFloors.size();\n }",
"protected int createGroup() {\n\t\tint id = _motherGroupID + 1;\n\t\twhile (_soundNodes.containsKey(id)) { id++; }\n\t\tcreateGroup(id);\n\t\treturn id;\n\t}",
"public int blockSize () {\n\t\treturn blockSize;\n\t}",
"@Override\n\tpublic int getGroupCount() {\n\t\treturn list.size();\n\t}",
"@Override\r\n\tpublic int getGroupCount() {\n\t\treturn arrSongHeader.size();\r\n\t}",
"@Override\n public int getGroupCount() {\n return this._listDataHeader.size();\n }",
"public int getWorkGroupSize() {\r\n\t\treturn workGroupTable.size();\r\n\t}",
"private void computeStoneGroups() {\n stoneGroups = new ArrayList<>();\n for (Stone stone : getStones()) {\n if (!stoneGroups.contains(stone.getStoneGroup())) {\n stoneGroups.add(stone.getStoneGroup());\n }\n }\n }",
"public final void rule__Block__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2464:1: ( rule__Block__Group__0__Impl rule__Block__Group__1 )\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2465:2: rule__Block__Group__0__Impl rule__Block__Group__1\n {\n pushFollow(FOLLOW_rule__Block__Group__0__Impl_in_rule__Block__Group__05027);\n rule__Block__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__Block__Group__1_in_rule__Block__Group__05030);\n rule__Block__Group__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public int getGroupId(int rawKey, int groupIdUpperBound) {\n // NOTE: Key 0 is reserved as the null key. Use (rawKey + 1) as the internal key because rawKey can never be -1.\n int internalKey = rawKey + 1;\n int index = (HashCommon.mix(internalKey) << 1) & _mask;\n int key = _keyValueHolder[index];\n\n // Handle hash hit separately for better performance\n if (key == internalKey) {\n return _keyValueHolder[index + 1];\n }\n if (key == 0) {\n return _size < groupIdUpperBound ? addNewGroup(internalKey, index) : INVALID_ID;\n }\n\n // Hash collision\n while (true) {\n index = (index + 2) & _mask;\n key = _keyValueHolder[index];\n if (key == internalKey) {\n return _keyValueHolder[index + 1];\n }\n if (key == 0) {\n return _size < groupIdUpperBound ? addNewGroup(internalKey, index) : INVALID_ID;\n }\n }\n }",
"public static int offset_group() {\n return (24 / 8);\n }",
"public int getNumberOfSelfDivisibleNumbers() \r\n\t{\r\n\t\tList <Integer> numOfDiv = getSelfDivisibleNumbers();\r\n\t\tint rtnNum = numOfDiv.size();\r\n\t\treturn rtnNum;\r\n\t}",
"public Integer evaluate( String grouping) {\n\t\tSystem.out.println(\" GROUP COUNT GROUPING = \" + grouping + \" LAST GROUPING = \" + lastGrouping + \" LAST COUNT = \" + lastCount);\n\t\tif( lastGrouping == null) {\n\t\t\tlastGrouping = grouping;\n\t\t\tlastCount = 1;\n\t\t\treturn 0;\n\t\t}\n\t\tif( lastGrouping != null \n\t\t\t\t&& lastGrouping.equals( grouping)) {\n\t\t int retVal = lastCount;\n\t\t lastCount++;\n\t\t return retVal;\n\t\t} else {\n\t\t\tlastCount = 1;\n\t\t\tlastGrouping = grouping;\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t}"
] | [
"0.66835314",
"0.61660916",
"0.5945822",
"0.5922808",
"0.5673279",
"0.56532663",
"0.55959314",
"0.55789423",
"0.55647624",
"0.5562773",
"0.5542944",
"0.5504766",
"0.5501364",
"0.5476962",
"0.5416384",
"0.54110587",
"0.53965724",
"0.53939587",
"0.538906",
"0.5347946",
"0.5332589",
"0.5301821",
"0.5298033",
"0.5281186",
"0.5281186",
"0.5277148",
"0.5277148",
"0.52721053",
"0.5262147",
"0.52603704",
"0.52333885",
"0.52299505",
"0.52299505",
"0.5210964",
"0.52018136",
"0.52018136",
"0.51946247",
"0.5189113",
"0.51571",
"0.51539737",
"0.5147188",
"0.51468927",
"0.5117773",
"0.5107804",
"0.51024824",
"0.50931746",
"0.5059289",
"0.5053632",
"0.5042838",
"0.50357836",
"0.50323904",
"0.5023543",
"0.5007824",
"0.5000051",
"0.4992708",
"0.49863246",
"0.4981566",
"0.49510992",
"0.49507576",
"0.4945564",
"0.49258798",
"0.49206078",
"0.48946688",
"0.48849922",
"0.48744783",
"0.4871255",
"0.48708656",
"0.48350877",
"0.482789",
"0.4821278",
"0.48199862",
"0.47980344",
"0.47980344",
"0.47887295",
"0.47881475",
"0.47842097",
"0.47792032",
"0.47678027",
"0.4765455",
"0.47574386",
"0.47549462",
"0.4753958",
"0.47539544",
"0.4744023",
"0.47418687",
"0.4737761",
"0.47327644",
"0.47297743",
"0.47285894",
"0.4725786",
"0.4721906",
"0.47157082",
"0.46956232",
"0.4683339",
"0.4682152",
"0.46671435",
"0.46638086",
"0.4649908",
"0.46450812",
"0.46442124"
] | 0.75836134 | 0 |
Static method to parse the given file into the Document object | public static Document parse(String filename) throws ParserException {
if (filename == null) {
throw new ParserException();
}
File file = new File(filename);
if (!file.exists() || !file.isFile()) {
throw new ParserException();
}
File subDir = file.getParentFile();
if (!subDir.exists() || !subDir.isDirectory()) {
throw new ParserException();
}
// Document should be valid by here
Document doc = new Document();
FieldNames field = FieldNames.TITLE;
List<String> authors = new LinkedList<String>();
String content = new String();
boolean startContent = false;
doc.setField(FieldNames.FILEID, file.getName());
doc.setField(FieldNames.CATEGORY, subDir.getName());
try {
BufferedReader reader = new BufferedReader(new FileReader(file));
String line = reader.readLine();
while (line != null) {
if (!line.isEmpty()) {
switch (field) {
case TITLE:
doc.setField(field, line);
field = FieldNames.AUTHOR;
break;
case AUTHOR:
case AUTHORORG:
if (line.startsWith("<AUTHOR>") || !authors.isEmpty()) {
String[] seg = null;
String[] author = null;
line = line.replace("<AUTHOR>", "");
seg = line.split(",");
author = seg[0].split("and");
author[0] = author[0].replaceAll("BY|By|by", "");
// Refines author names
for (int i = 0; i < author.length; ++i) {
author[i] = author[i].trim();
}
author[author.length - 1] = author[author.length - 1]
.replace("</AUTHOR>", "").trim();
authors.addAll(Arrays.asList(author));
// Saves author organization
if (seg.length > 1) {
doc.setField(FieldNames.AUTHORORG, seg[1]
.replace("</AUTHOR>", "").trim());
}
if (line.endsWith("</AUTHOR>")) {
// Saves author
doc.setField(FieldNames.AUTHOR, authors
.toArray(new String[authors.size()]));
field = FieldNames.PLACE;
}
break;
} else {
// This should be a PLACE
field = FieldNames.PLACE;
}
case PLACE:
if (!line.contains("-")) {
field = FieldNames.CONTENT;
startContent = true;
} else {
String[] seg = line.split("-");
String[] meta = seg[0].split(",");
if (seg.length != 0 && !seg[0].isEmpty()) {
if (meta.length > 1) {
doc.setField(
FieldNames.PLACE,
seg[0].substring(0,
seg[0].lastIndexOf(","))
.trim());
doc.setField(FieldNames.NEWSDATE,
meta[meta.length - 1].trim());
} else {
meta[0] = meta[0].trim();
try {
new SimpleDateFormat("MMM d",
Locale.ENGLISH).parse(meta[0]);
// This is a news date
doc.setField(FieldNames.NEWSDATE,
meta[0]);
} catch (ParseException e) {
// This is a place
doc.setField(FieldNames.PLACE, meta[0]);
}
}
}
}
field = FieldNames.CONTENT;
case CONTENT:
if (!startContent) {
// First line of content
String[] cont = line.split("-");
if (cont.length > 1) {
for (int i = 1; i < cont.length; ++i) {
content += cont[i];
}
}
startContent = true;
} else {
content += " " + line;
}
default:
break;
}
}
line = reader.readLine();
}
doc.setField(FieldNames.CONTENT, content);
doc.setField(FieldNames.LENGTH, Integer.toString(content.trim().split("\\s+").length));
reader.close();
} catch (IOException e) {
throw new ParserException();
}
return doc;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Document parseFile() throws IOException {\n\tString contents = instream_to_contents();\n\tDocument doc = Jsoup.parse(contents);\n\treturn doc;\n }",
"public static final Document parse(final File f) {\r\n String uri = \"file:\" + f.getAbsolutePath();\r\n\r\n if (File.separatorChar == '\\\\') {\r\n uri = uri.replace('\\\\', '/');\r\n }\r\n\r\n return parse(new InputSource(uri));\r\n }",
"public Document parse(File aFile)\n\t\t\t\t throws org.xml.sax.SAXException, java.io.IOException {\n\t\t/**\n\t\t * @todo Fix/implement this later\n\t\t */\n\t\tthrow new SAXException(\"Not supported\");\n\t}",
"public static Document parse(String filename) throws ParserException {\n\n\t\tString FileID, Category, Title = null, Author = null, AuthorOrg = null, Place = null, NewsDate = null, Content = null, FileN;\n\t\tDocument d = new Document();\n\t\tif (filename == null || filename == \"\")\n\t\t\tthrow new ParserException();\n\t\tFileN = filename;\n\t\tHashMap<Integer, String> map = new HashMap<Integer, String>();\n\t\tBufferedReader r = null;\n\t\tFile file = new File(FileN);\n\t\tif (!file.exists())\n\t\t\tthrow new ParserException();\n\t\tFileID = file.getName();\n\t\tCategory = file.getParentFile().getName();\n\t\ttry {\n\t\t\tr = new BufferedReader(new FileReader(file));\n\t\t\tint i = 1, j = 3;\n\t\t\tBoolean isTitle = true, hasAuthor = false;\n\t\t\tString line;\n\t\t\twhile ((line = r.readLine()) != null) {\n\t\t\t\tline = line.trim();\n\t\t\t\tif (!line.equals(\"\")) {\n\t\t\t\t\tmap.put(i, line);\n\t\t\t\t\tif (isTitle) {\n\t\t\t\t\t\tTitle = line;\n\t\t\t\t\t\tisTitle = false;\n\t\t\t\t\t}\n\t\t\t\t\tif (hasAuthor == false && i == 2) {\n\t\t\t\t\t\tPattern pattern = Pattern\n\t\t\t\t\t\t\t\t.compile(\"<AUTHOR>(.+?)</AUTHOR>\");\n\t\t\t\t\t\tMatcher matcher = pattern.matcher(line);\n\t\t\t\t\t\tif (matcher.find()) {\n\t\t\t\t\t\t\tAuthor = matcher.group(1).replace(\"BY\", \"\");\n\t\t\t\t\t\t\tAuthorOrg = Author.substring(\n\t\t\t\t\t\t\t\t\tAuthor.lastIndexOf(\",\") + 1).trim();\n\t\t\t\t\t\t\tAuthor = Author.split(\",\")[0].trim();\n\t\t\t\t\t\t\thasAuthor = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (!hasAuthor && i == 2) {\n\t\t\t\t\t\tString[] str = checkPlace(line);\n\t\t\t\t\t\tContent = str[0];\n\t\t\t\t\t\tPlace = str[1];\n\t\t\t\t\t\tNewsDate = str[2];\n\t\t\t\t\t} else if (hasAuthor && i == 3) {\n\t\t\t\t\t\tString[] str = checkPlace(line);\n\t\t\t\t\t\tContent = str[0];\n\t\t\t\t\t\tPlace = str[1];\n\t\t\t\t\t\tNewsDate = str[2];\n\t\t\t\t\t\tj = 4;\n\t\t\t\t\t}\n\t\t\t\t\tif (i >= j) {\n\t\t\t\t\t\tContent = Content + map.get(i) + \"\\n\";\n\t\t\t\t\t}\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tr.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tif (Author != null) {\n\t\t\tAuthor = Author.replace(\"By\", \"\").trim();\n\t\t\td.setField(FieldNames.AUTHOR, Author);\n\t\t\td.setField(FieldNames.AUTHORORG, AuthorOrg);\n\t\t} \n\t\td.setField(FieldNames.FILEID, FileID);\n\t\td.setField(FieldNames.CATEGORY, Category);\n\t\td.setField(FieldNames.TITLE, Title);\n\t\td.setField(FieldNames.PLACE, Place);\n\t\td.setField(FieldNames.NEWSDATE, NewsDate);\n\t\td.setField(FieldNames.CONTENT, Content);\n\n\t\treturn d;\n\t}",
"public Document parse (String filePath) {\n Document document = null;\n try {\n /* DOM parser instance */\n DocumentBuilder builder = builderFactory.newDocumentBuilder();\n /* parse an XML file into a DOM tree */\n document = builder.parse(filePath);\n } catch (ParserConfigurationException e) {\n e.printStackTrace();\n } catch (SAXException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return document;\n }",
"public static Document parse(String filename) throws ParserException {\n\t\t// TODO YOU MUST IMPLEMENT THIS\n\t\t// girish - All the code below is mine\n\t\t\t\n\t\t// Creating the object for the new Document\n\t\t\n\t\t\n\t\tif (filename == null){\n\t\t\tthrow new ParserException();\n\t\t}\n\t\t\n\t\t// Variable indexPos to track the current pointer location in the String Array\n\t\tint indexPos = 0;\n\t\t\n\t\t// Creating an instance of the document class to store the parsed content\n\t\tDocument d = new Document();\n\t\t\n\t\t// to store the result sent from the regexAuthor method and regexPlaceDate method\n\t\tObject[] resultAuthor = {null, null, null};\n\t\tObject[] resultPlaceDate = {null, null, null};\n\t\tStringBuilder news = new StringBuilder();\n\t\t\n\t\t// Next 4 lines contains the code to get the fileID and Category metadata\n\t\tString[] fileCat = new String[2];\n\t\t\n\t\tfileCat = regexFileIDCat(\"/((?:[a-z]|-)+)/([0-9]{7})\", filename);\n\t\t// System.out.println(filename);\n\t\t// throw an exception if the file is blank, junk or null\n\t\tif (fileCat[0] == null){\n\t\t\tthrow new ParserException();\n\t\t}\n\t\td.setField(FieldNames.CATEGORY, fileCat[0]);\n\t\td.setField(FieldNames.FILEID, fileCat[1]);\n\t\t\n\t\t\n\t\t// Now , parsing the file\n\t\tFile fileConnection = new File(filename);\n\t\t\n\t\t// newscollated - it will store the parsed file content on a line by line basis\n\t\tArrayList<String> newscollated = new ArrayList<String>();\n\t\t\n\t\t// String that stores the content obtained from the . readline() operation\n\t\tString temp = null;\n\t\t\n\t\ttry\n\t\t{\n\t\t\t\n\t\t\tBufferedReader getInfo = new BufferedReader(new FileReader(fileConnection));\n\t\t\twhile ((temp = getInfo.readLine()) != null)\n\t\t\t{\n\t\t\t\tif(temp.equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\t\n\t\t\t\t\ttemp = temp + \" \";\n\t\t\t\t\tnewscollated.add(temp);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\tgetInfo.close();\n\t\t\t\n\t\t\t//-- deprecated (REMOVE THIS IF OTHER WORKS)\n\t\t\t// setting the title using the arraylist's 0th index element\n\t\t\t//d.setField(FieldNames.TITLE, newscollated.get(0));\n\t\t\t\n\t\t\t// Appending the lines into one big string using StringBuilder\n\t\t\t\n\t\t\tfor (String n: newscollated)\n\t\t\t{\n\t\t\t\tnews.append(n);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t// Obtaining the TITLE of the file\n\t\t\tObject[] titleInfo = new Object[2];\n\t\t\t\n\t\t\ttitleInfo = regexTITLE(\"([^a-z]+)\\\\s{2,}\", news.toString());\n\t\t\td.setField(FieldNames.TITLE, titleInfo[0].toString().trim());\n\t\t\tindexPos = (Integer) titleInfo[1];\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t// Getting the Author and Author Org\n\t\t\tresultAuthor = regexAuthor(\"<AUTHOR>(.*)</AUTHOR>\", news.toString());\n\t\t\t\n\t\t\tif (resultAuthor[0] != null)\n\t\t\t{\n\t\t\t\td.setField(FieldNames.AUTHOR, resultAuthor[0].toString());\n\t\t\t}\n\t\t\t\n\t\t\tif (resultAuthor[1] != null)\n\t\t\t{\n\t\t\t\td.setField(FieldNames.AUTHORORG, resultAuthor[1].toString());\n\t\t\t}\n\t\t \n\t\t \n\t\t \n\t\t if ((Integer) resultAuthor[2] != 0)\n\t\t {\n\t\t \tindexPos = (Integer) resultAuthor[2];\n\t\t }\n\t\t\t\n\t\t \n\t\t \n\t\t // Getting the Place and Date\n \t\t\tresultPlaceDate = regexPlaceDate(\"\\\\s{2,}(.+),\\\\s(?:([A-Z][a-z]+\\\\s[0-9]{1,})\\\\s{1,}-)\", news.toString());\n \t\t\t\n \t\t\tif (resultPlaceDate[0] != null)\n \t\t\t{\n \t\t\t\td.setField(FieldNames.PLACE, resultPlaceDate[0].toString().trim());\n \t\t\t}\n \t\t \n \t\t\tif (resultPlaceDate[1] != null)\n \t\t\t{\n \t\t\t\td.setField(FieldNames.NEWSDATE, resultPlaceDate[1].toString().trim());\n \t\t\t}\n \t\t\t\n \t\t // getting the content\n \t\t \n \t\t if ((Integer) resultPlaceDate[2] != 0)\n\t\t {\n\t\t \tindexPos = (Integer) resultPlaceDate[2];\n\t\t }\n \t\t \n \t\t \n \t\t d.setField(FieldNames.CONTENT, news.substring(indexPos + 1));\n \t\t \n \t\t return d;\n \t\t \n\t\t \n\t\t \n\t\t\t\n\t\t\t\n\t\t}\n\t\tcatch(FileNotFoundException e){\n\t\t\tthrow new ParserException();\n\t\t\t\n\t\t}\n\n\t\tcatch(IOException e){\n\t\t\tthrow new ParserException();\n\t\t}\n\t\t\n\t\tcatch(Exception e){\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t}\n\t\treturn d;\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}",
"public Document setUpDocumentToParse() throws ParserConfigurationException, SAXException, IOException{\n\t\tFile file = new File (dataFilePath);\n\t\tDocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();\n\t\tDocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();\n\t\tDocument document = documentBuilder.parse(file);\n\n\t\treturn document;\n\t}",
"public static Document parse(final File file) {\r\n\t\tDocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\r\n\t\tDocumentBuilder db;\r\n\t\tDocument dom = null;\r\n\t\ttry {\r\n\t\t\tdb = dbf.newDocumentBuilder();\r\n\t\t\tdom = db.parse(file);\r\n\t\t} catch (ParserConfigurationException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (SAXException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn dom;\r\n\t}",
"IDocument getDocument(File file);",
"private static Document read (File file) throws MalformedURLException, DocumentException {\r\n\t\tSAXReader reader = new SAXReader();\r\n\t\tDocument document = reader.read(file);\r\n\t\treturn document;\r\n\t}",
"@Override\n\tpublic Document loadDocument(String file) {\n\t\tDocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\n\t\tdbf.setNamespaceAware(true);\n\t\tDocumentBuilder db;\n\t\ttry {\n\t\t\tdb = dbf.newDocumentBuilder();\n\t\t\tDocument document = db.parse(new File(file));\n\t\t\treturn document;\n\t\t} catch (ParserConfigurationException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t} catch (SAXException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t} catch (FactoryConfigurationError e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\n\t}",
"public Document getDocFromFile(String filename)\r\n throws ParserConfigurationException{\r\n {\r\n DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\r\n DocumentBuilder db = dbf.newDocumentBuilder();\r\n Document doc = null;\r\n try{\r\n doc = db.parse(filename);\r\n }\r\n catch (Exception ex){\r\n System.out.println(\"XML parse failure\");\r\n ex.printStackTrace();\r\n }\r\n return doc;\r\n } \r\n }",
"public static Document parseXMLFile(final File file) throws IOException {\n\t\ttry {\t\t\t\n\t\t\tfinal DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance();\n\t\t\tfinal DocumentBuilder documentBuilder = builderFactory.newDocumentBuilder();\n\t\t\tfinal Document document = documentBuilder.parse(file);\n\t\t\t\n\t\t\treturn document;\n\t\t} catch (ParserConfigurationException | SAXException e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}",
"public String parse(File file);",
"public Document parseFile(String fileName) {\r\n log.debug(\"Parsing XML file... \" + fileName);\r\n DocumentBuilder docBuilder;\r\n Document doc = null;\r\n DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();\r\n docBuilderFactory.setIgnoringElementContentWhitespace(true);\r\n try {\r\n docBuilder = docBuilderFactory.newDocumentBuilder();\r\n }\r\n catch (ParserConfigurationException e) {\r\n log.debug(\"Wrong parser configuration: \" + e.getMessage());\r\n return null;\r\n }\r\n File sourceFile = new File(fileName);\r\n try {\r\n doc = docBuilder.parse(sourceFile);\r\n setDocument(doc);\r\n }\r\n catch (SAXException e) {\r\n log.debug(\"Wrong XML file structure: \" + e.getMessage());\r\n return null;\r\n }\r\n catch (IOException e) {\r\n log.debug(\"Could not read source file: \" + e.getMessage());\r\n }\r\n log.debug(\"XML file parsed\");\r\n return doc; \r\n }",
"private Document parse(String path) throws DocumentException, MalformedURLException {\n File file = new File(path);\r\n SAXReader saxReader = new SAXReader();\r\n return saxReader.read(file);\r\n }",
"public Document parseFile(InputStream inputStream) {\r\n \r\n try {\r\n setDocument(docBuilder.parse(inputStream));\r\n }\r\n catch (SAXException e) {\r\n log.debug(\"Wrong XML file structure: \" + e.getMessage());\r\n return null;\r\n }\r\n catch (IOException e) {\r\n \te.printStackTrace();\r\n log.debug(\"Could not read source file: \" + e.getMessage());\r\n }\r\n log.debug(\"XML file parsed\");\r\n return getDocument();\r\n }",
"public void parseDocument(String XMLFilePath) {\n\t \n\t SAXParserFactory spf = SAXParserFactory.newInstance();\n\t try {\n\t\tSAXParser sp = spf.newSAXParser();\n\t\tsp.parse(XMLFilePath, this);\n\t }catch(SAXException se) {\n\t\tse.printStackTrace();\n\t }catch(ParserConfigurationException pce) {\n\t\tpce.printStackTrace();\n\t }catch (IOException ie) {\n\t\tie.printStackTrace();\n\t }\n\t}",
"private static Document parseXmlFile(String in) {\n try {\n DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\n DocumentBuilder db = dbf.newDocumentBuilder();\n InputSource is = new InputSource(new StringReader(in));\n return db.parse(is);\n } catch (ParserConfigurationException e) {\n throw new RuntimeException(e);\n } catch (SAXException e) {\n throw new RuntimeException(e);\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }",
"private Document getDocumentInFileSys()throws Exception{\r\n\t\t\r\n\t\tDocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance();\r\n\t\tDocumentBuilder builder = builderFactory.newDocumentBuilder();\r\n\t\tFile file = new File(DIR,FILE_NAME);\r\n\t\tif(!file.exists())\r\n\t\t\treturn null;\r\n\t\t\r\n\t\tFileInputStream inStream =new FileInputStream(file);\r\n\t\ttry{\r\n\t\t\tDocument doc = builder.parse(inStream);\r\n\t\t\treturn doc;\r\n\t\t}finally{\r\n\t\t\tinStream.close();\r\n\t\t}\r\n\t}",
"public static Document getDoc(String file){\n Document doc = null;\n try{\n SAXBuilder builder = new SAXBuilder();\n File xml = new File(tempPath+file);\n\n doc = (Document) builder.build(xml);\n } catch (Exception e){\n System.out.println(e.getMessage());\n }\n \n return doc;\n }",
"public Document readDocument();",
"public void parseDocument(String fileLocation) {\n List<Object> objects = FileUtility.readObjectsFromFile(fileLocation);\n new File(FILE_DIRECTORY_NAME).mkdir();\n\n // TODO: Parellize the processing of html parsing for each html page\n\n objects.parallelStream().forEach((object) -> {\n HtmlPage htmlPage = (HtmlPage) object;\n String title = DocumentUtility.extractDocumentID(htmlPage.getURL());\n String parsedText = parseTitle(title) + NEWLINE + parseHtmlText(htmlPage);\n parsedHtmlPages.add(new ParsedHtmlPage(title, parsedText));\n });\n }",
"public static Document parseXML(File xmlFile) throws BaseException\r\n\t{\r\n\t\tDocument xmlDoc = null;\r\n\t\t// Ensure that the file is present and can be read.\r\n\t\tif (xmlFile != null && xmlFile.canRead())\r\n\t\t{\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\txmlDoc = parseXML(new FileInputStream(xmlFile));\r\n\t\t\t} catch (FileNotFoundException e)\r\n\t\t\t{\r\n\t\t\t\tthrow new BaseException(\"ERR_FILE_PARSE\", \"Unable to load file provided\", e);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn xmlDoc;\r\n\t}",
"public static Document parseXMLFile(final String fileName) throws IOException {\n\t\treturn parseXMLFile(new File(fileName));\n\t}",
"public void parse(String filename);",
"public static Document parse(InputStream in) throws ParserConfigurationException, SAXException, IOException {\n\t DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\n\t DocumentBuilder db = dbf.newDocumentBuilder();\n\t \n\n\t return db.parse(in);\n\t }",
"private Document initialize() {\r\n Document doc = null;\r\n try {\r\n File file = new File(\"./evidence.xml\");\r\n DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\r\n DocumentBuilder docBuilder = dbFactory.newDocumentBuilder();\r\n doc = docBuilder.parse(file);\r\n doc.getDocumentElement().normalize();\r\n } catch (ParserConfigurationException | IOException | SAXException e) {\r\n System.err.println(\"Parser failed parse file:\"+e.getMessage());\r\n }\r\n return doc;\r\n }",
"public Document load(final String filename) throws IOException, SAXException {\n final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n factory.setNamespaceAware(true);\n final DocumentBuilder builder;\n try {\n builder = factory.newDocumentBuilder();\n } catch (final ParserConfigurationException pce) {\n pce.printStackTrace();\n return null;\n }\n final InputStream inputStream = getClass().getResourceAsStream(filename);\n if (inputStream != null) {\n // for files found in JARs\n return builder.parse(inputStream);\n } else {\n // for files directly on the file system\n return builder.parse(new File(filename));\n }\n }",
"public void parseDocument(File XMLInputFile) throws FunctionException {\r\n\t\t\t\r\n\t\t\tLog.log(\"XMLParser -> parseDocument started\");\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\t//get a factory\r\n\t\t\t\tSAXParserFactory spf = SAXParserFactory.newInstance();\r\n\t\t\t\t//get a new instance of parser\r\n\t\t\t\tSAXParser sp = spf.newSAXParser();\r\n\t\t\t\t//parse the file and also register this class for call backs\r\n\t\t\t\tsp.parse(XMLInputFile, this);\r\n\t\t\t}catch(SAXException se) {\r\n\t\t\t\tthrow new FunctionException(\"SAXException had occurred.\\n\"+se.getMessage());\r\n\t\t\t}catch(ParserConfigurationException pce) {\r\n\t\t\t\tthrow new FunctionException(\"ParserConfigurationException had occurred.\\n\"+pce.getMessage());\r\n\t\t\t}catch (IOException ie) {\r\n\t\t\t\tthrow new FunctionException(\"IOException had occurred.\\n\"+ie.getMessage());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tLog.log(\"XMLParser -> parseDocument completed\");\r\n\t\t}",
"public static Document getDoc(File inputFile) throws ParserConfigurationException, IOException\r\n {\r\n Document parsedDocument = null;\r\n DocumentBuilderFactory f = null;\r\n try\r\n {\r\n //System.out.println(\"Validazione XML abilitata: \" + enableValidationFromGui);\r\n //System.out.println(\"Esclusione Spazi Bianchi Elementi XML Abilitata: \" + enableIgnoringWhitespaceFromGui);\r\n File xmlFile = inputFile;\r\n f = DocumentBuilderFactory.newInstance();\r\n f.setValidating(enableValidationFromGui); \r\n f.setIgnoringElementContentWhitespace(enableIgnoringWhitespaceFromGui);\r\n DocumentBuilder b = f.newDocumentBuilder();\r\n ErrorHandler h = new xmlValidationErrorHandler();\r\n b.setErrorHandler(h);\r\n parsedDocument = (Document) b.parse(xmlFile);\r\n }\r\n catch (ParserConfigurationException | SAXException | IOException e)\r\n {\r\n System.out.println(e.toString()); \r\n }\r\n if(f.isValidating() && enableValidationFromGui)\r\n return parsedDocument;\r\n else\r\n return parsedDocument; \r\n }",
"public void parse(String fileName) throws Exception;",
"public static Document loadXmlFile(File file) {\r\n try {\r\n Document doc = DocumentBuilderFactory.newInstance()\r\n .newDocumentBuilder().parse(file);\r\n\r\n return doc;\r\n } catch (Exception e) {\r\n logger.log(Level.SEVERE, \"exception\", e);\r\n }\r\n\r\n return null;\r\n }",
"public static Document getXMLDoc(String filename) throws ParserConfigurationException, IOException, SAXException {\n\n File xmlFile = new File(filename);\n\n // create instance of the document builder factory to get the builder\n DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\n\n // get the document builder from the factory\n DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();\n\n // parse the file into the doc\n Document doc = dBuilder.parse(xmlFile);\n\n // normalize doc\n doc.getDocumentElement().normalize();\n\n return doc;\n }",
"public abstract TextDocument getTextDocumentFromFile(String path) throws FileNotFoundException, IOException;",
"public static Document createDOMDocumentFromXmlFile(File file)\n throws ParserConfigurationException, IOException, SAXException {\n\n if (!file.exists()) {\n throw new RuntimeException(\"Could not find XML file: \" + file.getAbsolutePath());\n }\n\n DocumentBuilder documentBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();\n Document xmlDocument = documentBuilder.parse(file);\n\n return xmlDocument;\n }",
"private void indexDocument(File f) throws IOException {\n\n\t\tHashMap<String, StringBuilder> fm;\n\t\tif (!f.getName().equals(\".DS_Store\")) {\n\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(f));\n\n\t\t\tString s = \"\";\n\t\t\twhile ((s = br.readLine()) != null) {\n\n\t\t\t\tString temp = \"\";\n\n\t\t\t\tif (s.contains(\"<DOC>\")) {\n\n\t\t\t\t\ts = br.readLine();\n\n\t\t\t\t\twhile (!s.contains(\"</DOC>\")) {\n\n\t\t\t\t\t\ttemp += s + \" \";\n\n\t\t\t\t\t\ts = br.readLine();\n\t\t\t\t\t}\n\n\t\t\t\t\tfm = parseTags(temp);\n\t\t\t\t\tindexDocumentHelper(fm);\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tbr.close();\n\t\t}\n\n\t}",
"String readDocument(String path, Charset charset);",
"public static Document getDocument(File in) throws FileNotFoundException{\n\t\treturn XMLLoader.getDocument(new InputSource(new InputStreamReader(new FileInputStream(in))));\n\t}",
"public void parseXmlFile(String fileName){\n\t\t//get the factory\n\t\tDocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\n\t\t\n\t\ttry {\n\t\t\t//Using factory get an instance of document builder\n\t\t\tDocumentBuilder db = dbf.newDocumentBuilder();\n\t\t\t\n\t\t\t//parse using builder to get DOM representation of the XML file\n\t\t\tdoc = db.parse(fileName);\n\t\t} catch(ParserConfigurationException pce) {\n\t\t\tpce.printStackTrace();\n\t\t} catch(SAXException se) {\n\t\t\tSystem.err.println(\"Malformed XML: Make sure to provide a valid XML document.\");\n\t\t} catch(IOException ioe) {\n\t\t\tSystem.err.println(\"File not found: Path to a valid XML file has to be specified.\" );\n\t\t}\n\t}",
"private static Document parseXmlFile(String strXml) {\n // get the factory\n final DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\n\n try {\n // Using factory get an instance of document builder\n final DocumentBuilder db = dbf.newDocumentBuilder();\n final Document dom;\n File file;\n\n file = new File(strXml);\n if (!file.exists()) {\n strXml = \"data/\" + strXml;\n }\n\n // Parse using builder to get DOM representation of the XML file\n dom = db.parse(strXml);\n\n return dom;\n } catch (final Exception e) {\n Verbose.log(Level.SEVERE, e, \"Laoding Specifications\",\n e.getMessage());\n } // end try\n\n return null;\n }",
"protected abstract void parseFile(File f) throws IOException;",
"public GongDomObject(File file) throws ParserConfigurationException, InvalidTagException, SAXException, IOException {\r\n super(file);\r\n }",
"public DocReader(File f)\n\t{\n\t\tthis.inputFile = f;\n\t}",
"public static Document parse(InputStream is) throws IOException\n {\n return parse(is, false);\n }",
"public JSONDocument parse (File fl){\n JSONDocument temp = null;\n String data = \"\";\n if (fl != null){\n try (FileReader fr = new FileReader(fl)){\n int c;\n while((c = fr.read()) != -1) data += (char)c;\n temp = this.parseString(this.cleanString(data));\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }else throw new IllegalArgumentException(\"File cannot be null\");\n return temp;\n }",
"public static Document fileToSciXML(File f) throws Exception {\n\t\tString name = f.getName();\n\t\tif(name.endsWith(\".xml\")) {\n\t\t\tDocument doc = new Builder().build(f);\n\t\t\t/* is this an RSC document? */\n\t\t\tif(PubXMLToSciXML.isRSCDoc(doc)) {\n\t\t\t\tPubXMLToSciXML rtsx = new PubXMLToSciXML(doc);\n\t\t\t\tdoc = rtsx.getSciXML();\n\t\t\t}\n\t\t\treturn doc;\n\t\t} else if(name.endsWith(\".html\") || name.endsWith(\".htm\")) {\n\t\t\treturn TextToSciXML.textToSciXML(HtmlCleaner.cleanHTML(FileTools.readTextFile(f)));\n\t\t} else if(name.matches(\"source_file_\\\\d+_\\\\d+.src\")) {\n\t\t\treturn TextToSciXML.bioIEAbstractToXMLDoc(FileTools.readTextFile(f));\n\t\t} else {\n\t\t\t/* Assume plain text */\n\t\t\treturn TextToSciXML.textToSciXML(FileTools.readTextFile(f));\n\t\t}\n\t}",
"@Override\r\n public FirstElement documentBodyParse(String filePath) {\n return null;\r\n }",
"public Document loadDomFromFile(String fileName){\n\t\tSAXReader reader = new SAXReader();\n\t\tDocument doc = null;\n\t\ttry {\n\t\t\tInputStream inputStream = new FileInputStream(fileName);\n\t\t\tdoc = reader.read(inputStream);\n\t\t} catch (DocumentException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn doc;\n\t}",
"Object create(File file) throws IOException, SAXException, ParserConfigurationException;",
"public Parser(File file) {\n \t\t\ttry {\n \t\t\t\tload(new FileInputStream(file));\n \t\t\t} catch (Exception e) {\n \t\t\t\t// continue ... actual parsing will report errors\n \t\t\t}\n \t\t}",
"public PropertiesDocument(File xmlFile) throws ParserConfigurationException, SAXException, IOException {\n\t\tthis.documentBuilderFactory = DocumentBuilderFactory.newInstance();\n this.documentBuilder = documentBuilderFactory.newDocumentBuilder();\n\t\tthis.document = this.documentBuilder.parse(xmlFile);\n\t\tthis.properties = documentToProperties(this.document);\n\t}",
"public static Document getDocument(InputSource in){\t\t\n\t\ttry {\n\t\t\tDocumentBuilderFactory docbuilderf = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder docb = docbuilderf.newDocumentBuilder();\n\t\t\treturn docb.parse(in);\n\t\t} catch (SAXException e) {\n\t\t\t// TODO Parseprobleem... Invalide bestand.\n\t\t\tthrow new RuntimeException(e);\n\t\t} catch (IOException e) {\n\t\t\t// TODO IOException, bestand bestaat niet of doet iets anders.\n\t\t\te.printStackTrace();\n\t\t\tthrow new RuntimeException(e);\n\t\t} catch (ParserConfigurationException e) {\n\t\t\t// Configuratie zou moeten werken\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}",
"public static Document getDocument(File file, boolean namespaceAware) {\r\n Document document = null;\r\n try {\r\n // parse an XML document into a DOM tree\r\n DocumentBuilderFactory documentFactory = DocumentBuilderFactory\r\n .newInstance();\r\n documentFactory.setNamespaceAware(namespaceAware);\r\n // documentFactory.setAttribute(\"http://java.sun.com/xml/jaxp/properties/schemaLanguage\",\r\n // \"http://www.w3.org/2001/XMLSchema\");\r\n DocumentBuilder parser = documentFactory.newDocumentBuilder();\r\n\r\n document = parser.parse(file);\r\n } catch (Exception e) {\r\n log.error(\"getDocument error: \", e);\r\n }\r\n return document;\r\n }",
"public static final Document parse(final InputStream is) {\r\n final InputSource in = new InputSource(is);\r\n\r\n return parse(in);\r\n }",
"private static SimpleNode parse(String filename) throws ParseException {\n\t\tParser parser;\n\t\t// open file as input stream\n\t\ttry {\n\t\t\tparser = new Parser(new java.io.FileInputStream(filename));\n\t\t}\n\t\tcatch (java.io.FileNotFoundException e) {\n\t\t\tSystem.out.println(\"ERROR: file \" + filename + \" not found.\");\n\t\t\treturn null;\n\t\t}\n\t\t// parse and return root node\n\t\treturn parser.parse();\n\t}",
"private ArrayList<String> parseDocsFile(String file_name){\r\n // extract each <DOC> ... </DOC> from file AS string (corpus)\r\n ArrayList<String> list = new ArrayList<>();\r\n Scanner scanner = null;\r\n try{\r\n scanner = new Scanner(new BufferedReader(new FileReader(file_name)));\r\n scanner.useDelimiter(\"</DOC>\"); // END of Next()\r\n while (scanner.hasNext())\r\n {\r\n list.add(scanner.next()+\"</DOC>\");\r\n }\r\n list.remove(list.size()-1);\r\n }\r\n catch (Exception e ){ System.out.println(\"Error reading file -> \"+e.getMessage()); }\r\n finally {\r\n if(scanner != null ){scanner.close();} // close the file\r\n }\r\n return list;\r\n }",
"public static Document parse(String in) {\n try {\n DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\n DocumentBuilder db = dbf.newDocumentBuilder();\n InputSource is = new InputSource(new StringReader(in));\n return db.parse(is);\n } catch (ParserConfigurationException | SAXException | IOException e) {\n throw new RuntimeException(e);\n }\n }",
"void processElement(File documentPath) \n\t\t\tthrows XMLFormatException;",
"private static Document initializeXML(String filePath) throws Exception {\n\t\ttry {\n\t\t\tlogger.info(\"Initializing the xml file :\" + filePath);\n\t\t\txmlDocument = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new File(filePath));\n\t\t\txmlDocument.getDocumentElement().normalize();\n\t\t\treturn xmlDocument;\n\t\t} catch (Exception e) {\n\n\t\t\tlogger.error(\"Error while reading from XML. File Path : \" + filePath + \" \\n\" + e.getMessage());\n\t\t\tthrow (new Exception(e.getMessage()));\n\n\t\t}\n\t}",
"public static Document newDocument(final File file, boolean useNamespaces) throws IOException, XMLException {\n\t\tfinal InputStream in = new FileInputStream(file);\n\t\treturn XMLHelper.parse(in, useNamespaces);\n\t}",
"protected abstract void parseSource(final Document doc, final Resource.Builder resource);",
"@Override\r\n protected void parseDocuments()\r\n {\n\r\n }",
"private Document getDocument(String in) throws DocumentException, IOException {\n \t\tString path=getClass().getPackage().getName().replaceAll(\"\\\\.\",\"/\");\n \t\tInputStream stream=Thread.currentThread().getContextClassLoader().getResourceAsStream(path+\"/\"+in);\n \t\tSAXReader reader=new SAXReader();\n \t\tDocument doc=reader.read(stream);\n \t\tstream.close();\n \t\treturn doc;\n \t}",
"public Duc2002Document getParsedDocument(Document document) throws Exception {\n\t\tDuc2002Document ducDoc=new Duc2002Document();\n\t\t// iterate through child elements of root\n\t\tElement root = document.getRootElement();\n\t\tfor ( Iterator i = root.elementIterator(); i.hasNext(); ) {\n\t\t\tElement element = (Element) i.next();\n\t\t\tString elementName=element.getQualifiedName();\n\t\t\tif(elementName.equals(\"DOCNO\"))\n\t\t\t\tducDoc.setDocNo(element.getStringValue());\n\t\t\telse if(elementName.equals(\"HEAD\"))\n\t\t\t\tducDoc.setTopic(element.getStringValue());\n\t\t\telse if(elementName.equals(\"TEXT\"))\n\t\t\t{\n\t\t\t\tducDoc.setText(element.getStringValue());\n\t\t\t\tString[] sentences = new String[element.elements().size()];\n\t\t\t\tint[] sentenceWordCounts = new int[element.elements().size()];\n\t\t\t\tint no=0;\n\t\t\t\tfor(Iterator j=element.elementIterator(); j.hasNext();) {\n\t\t\t\t\tElement sentence = (Element) j.next();\n\t\t\t\t\tsentences[no]=sentence.getStringValue();\n\t\t\t\t\tfor(Iterator k=sentence.attributeIterator(); k.hasNext(); ) {\n\t\t\t\t\t\tAttribute attribute=(Attribute) k.next();\n\t\t\t\t\t\tif(attribute.getQualifiedName().equals(\"wdcount\"))\n\t\t\t\t\t\t\tsentenceWordCounts[no]=Integer.parseInt(attribute.getStringValue());\n\t\t\t\t\t}\n\t\t\t\t\tno++;\n\t\t\t\t}\n\t\t\t\tducDoc.setSentences(sentences);\n\t\t\t\tducDoc.setSentenceWordCounts(sentenceWordCounts);\n\t\t\t}\n\t\t}\n\t\treturn ducDoc;\n\t}",
"public interface Parser {\n\t\n\t/**\n\t * A method to parse the file\n\t * @param file the file\n\t * @return the content\n\t */\n\tpublic String parse(File file);\n\t\n}",
"public void open(){\n\t\ttry {\n\t\t\tdocFactory = DocumentBuilderFactory.newInstance();\n\t\t\tdocBuilder = docFactory.newDocumentBuilder();\n\t\t\tdoc = docBuilder.parse(ManipXML.class.getResourceAsStream(path));\n\t\t\t\n\t\t} catch (ParserConfigurationException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (SAXException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Override\n public void parse() {\n if (file == null)\n throw new IllegalStateException(\n \"File cannot be null. Call setFile() before calling parse()\");\n\n if (parseComplete)\n throw new IllegalStateException(\"File has alredy been parsed.\");\n\n FSDataInputStream fis = null;\n BufferedReader br = null;\n\n try {\n fis = fs.open(file);\n br = new BufferedReader(new InputStreamReader(fis));\n\n // Go to our offset. DFS should take care of opening a block local file\n fis.seek(readOffset);\n records = new LinkedList<T>();\n\n LineReader ln = new LineReader(fis);\n Text line = new Text();\n long read = readOffset;\n\n if (readOffset != 0)\n read += ln.readLine(line);\n\n while (read < readLength) {\n int r = ln.readLine(line);\n if (r == 0)\n break;\n\n try {\n T record = clazz.newInstance();\n record.fromString(line.toString());\n records.add(record);\n } catch (Exception ex) {\n LOG.warn(\"Unable to instantiate the updateable record type\", ex);\n }\n read += r;\n }\n\n } catch (IOException ex) {\n LOG.error(\"Encountered an error while reading from file \" + file, ex);\n } finally {\n try {\n if (br != null)\n br.close();\n\n if (fis != null)\n fis.close();\n } catch (IOException ex) {\n LOG.error(\"Can't close file\", ex);\n }\n }\n\n LOG.debug(\"Read \" + records.size() + \" records\");\n }",
"Object create(Document doc) throws IOException, SAXException, ParserConfigurationException;",
"public static Document getDocument(InputStream in){\t\t\n\t\ttry {\n\t\t\tDocumentBuilderFactory docbuilderf = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder docb = docbuilderf.newDocumentBuilder();\n\t\t\treturn docb.parse(in);\n\t\t} catch (SAXException e) {\n\t\t\t// TODO Parseprobleem... Invalide bestand.\n\t\t\tthrow new RuntimeException(e);\n\t\t} catch (IOException e) {\n\t\t\t// TODO IOException, bestand bestaat niet of doet iets anders.\n\t\t\te.printStackTrace();\n\t\t\tthrow new RuntimeException(e);\n\t\t} catch (ParserConfigurationException e) {\n\t\t\t// Configuratie zou moeten werken\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}",
"public static void parseXML(String filename) {\n SAXBuilder builder = new SAXBuilder();\n \n //reading XML document\n Document xml = null;\n try {\n xml = builder.build(new File(filename));\n } catch (JDOMException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n \n //getting root element from XML document\n Element root = xml.getRootElement();\n if (root != null)\n {\n\t Element queryNode = root.getChild(\"query\");\n\t if (queryNode != null)\n\t {\n\t\t Element rcNode = queryNode.getChild(\"recentchanges\");\n\t\t \n\t\t List<Element> rcList = rcNode.getChildren();\n\t\t \n\t\t \n\t\t \n\t\t //Iterating over all childs in XML\n\t\t Iterator<Element> itr = rcList.iterator();\n\t\t while(itr.hasNext()){\n\t\t \tElement rc = itr.next();\n\t\t \tString user = rc.getAttributeValue(\"user\");\n\t\t \tString userId = rc.getAttributeValue(\"userid\");\n\t\t \tString pageId = rc.getAttributeValue(\"pageid\");\n\t\t \tString title = rc.getAttributeValue(\"title\");\n\t\t \tString timestamp = rc.getAttributeValue(\"timestamp\");\n\t\t \tString comments = rc.getAttributeValue(\"comment\");\n\t\t \tString type = rc.getAttributeValue(\"type\");\n\t\t \tString oldRevId = rc.getAttributeValue(\"old_revid\");\n\t\t \tString newRevId = rc.getAttributeValue(\"revid\");\n\t\t \tString recentChangeId = rc.getAttributeValue(\"rcid\");\n\t\t \t\n\t\t// \t //reading attribute from Element using JDOM\n\t\t// System.out.println(\"User: \" + user + \" | User_ID: \" + userId + \" | Page_ID: \" + pageId + \n\t\t// \t\t\" | Title: \" + title + \" | Timestamp: \" + timestamp + \" | Recent_Change_ID: \" + recentChangeId + \" | Old_Rev_ID: \" + oldRevId + \n\t\t// \t\t\" | New_Rev_ID: \" + newRevId + \" | Type: \" + type); \n\t\t \t\n\t\t \ttry {\n\t\t\t\t\t\tcluster.writeWikiResults(user, userId, timestamp, pageId, title, recentChangeId, oldRevId, newRevId, type);\n\t\t\t\t\t\t System.out.println(count++);\n\t\t\t\t\t} catch (ParseException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t }\n\t }\n } \n }",
"void readAPFdocument (Document apfDoc, String fileText) {\n\t\tNodeList sourceFileElements = apfDoc.getElementsByTagName(\"source_file\");\n\t\tElement sourceFileElement = (Element) sourceFileElements.item(0);\n\t\tsourceFile = sourceFileElement.getAttribute(\"URI\");\n\t\tsourceType = sourceFileElement.getAttribute(\"SOURCE\");\n\n\t\tNodeList documentElements = apfDoc.getElementsByTagName(\"document\");\n\t\tElement documentElement = (Element) documentElements.item(0);\n\t\tdocID = documentElement.getAttribute(\"DOCID\");\n\n\t\tif (Ace.perfectMentions & !Ace.perfectEntities) {\n\t\t\treadPerfectMentions (apfDoc, fileText);\n\t\t\treturn;\n\t\t}\n\n\t\tNodeList entityElements = apfDoc.getElementsByTagName(\"entity\");\n\t\tfor (int i=0; i<entityElements.getLength(); i++) {\n\t\t\tElement entityElement = (Element) entityElements.item(i);\n\t\t\tAceEntity entity = new AceEntity (entityElement, fileText);\n\t\t\taddEntity(entity);\n\t\t}\n\t\tNodeList valueElements = apfDoc.getElementsByTagName(\"value\");\n\t\tfor (int i=0; i<valueElements.getLength(); i++) {\n\t\t\tElement valueElement = (Element) valueElements.item(i);\n\t\t\tAceValue value = new AceValue (valueElement, fileText);\n\t\t\taddValue(value);\n\t\t}\n\t\tNodeList timexElements = apfDoc.getElementsByTagName(\"timex2\");\n\t\tfor (int i=0; i<timexElements.getLength(); i++) {\n\t\t\tElement timexElement = (Element) timexElements.item(i);\n\t\t\tAceTimex timex = new AceTimex (timexElement, fileText);\n\t\t\taddTimeExpression(timex);\n\t\t}\n\t\tNodeList relationElements = apfDoc.getElementsByTagName(\"relation\");\n\t\tfor (int i=0; i<relationElements.getLength(); i++) {\n\t\t\tElement relationElement = (Element) relationElements.item(i);\n\t\t\tAceRelation relation = new AceRelation (relationElement, this, fileText);\n\t\t\taddRelation(relation);\n\t\t}\n\t\tNodeList eventElements = apfDoc.getElementsByTagName(\"event\");\n\t\tfor (int i=0; i<eventElements.getLength(); i++) {\n\t\t\tElement eventElement = (Element) eventElements.item(i);\n\t\t\tAceEvent event = new AceEvent (eventElement, this, fileText);\n\t\t\taddEvent(event);\n\t\t}\n\t}",
"@Test\n\tpublic void probandoConParser() {\n\t\tString dBoxUrl = \"/home/julio/Dropbox/julio_box/educacion/maestria_explotacion_datos_uba/materias/cuat_4_text_mining/material/tp3/\";\n\t\tString modelUrl = dBoxUrl + \"NER/models/es-ner-person.bin\";\n\t\tString filesUrl = dBoxUrl + \"NER/archivoPrueba\";\n\t\tString sampleFile = filesUrl + \"/viernes-23-05-14-alan-fitzpatrick-gala-cordoba.html\";\n\t\tList<String> docs = getMyDocsFromSomewhere(filesUrl);\n\n\t\ttry {\n\t\t\t// detecting the file type\n\t\t\tBodyContentHandler handler = new BodyContentHandler();\n\t\t\tMetadata metadata = new Metadata();\n\t\t\tFileInputStream inputstream = new FileInputStream(new File(sampleFile));\n\t\t\tParseContext pcontext = new ParseContext();\n\n\t\t\t// Html parser\n\t\t\tHtmlParser htmlparser = new HtmlParser();\n\t\t\thtmlparser.parse(inputstream, handler, metadata, pcontext);\n\t\t\tSystem.out.println(\"Contents of the document:\" + handler.toString());\n\t\t\tSystem.out.println(\"Metadata of the document:\");\n\t\t\tString[] metadataNames = metadata.names();\n\n\t\t\tfor (String name : metadataNames) {\n\t\t\t\tSystem.out.println(name + \": \" + metadata.get(name));\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tAssert.fail();\n\t\t}\n\n\t}",
"public void initParser(String file) {\n if (checkFileExists(file)) {\n parseXml(file);\n }\n }",
"public static Document getDocument(File xmlFile)\n {\n return XMLTools.getDocument(xmlFile, false);\n }",
"public Document parse(DocumentParser parser, InputStream InputStream) throws RedPenException {\n return parser.parse(InputStream, sentenceExtractor, configuration.getTokenizer());\n }",
"@Override\r\n\tpublic void handleFile(String inFilename, String outFilename) \r\n\t{\n\r\n\r\n\t\tString s = slurpFile(inFilename);\r\n\t\tDocument teiDocument = parsePlainText(s);\r\n\t\ttry \r\n\t\t{\r\n\t\t\tPrintStream pout = new PrintStream(new FileOutputStream(outFilename));\r\n\t\t\tpout.print(XML.documentToString(teiDocument));\r\n\t\t\tpout.close();\r\n\t\t} catch (FileNotFoundException e) \r\n\t\t{\r\n\t\t\te.printStackTrace\r\n\t\t\t();\r\n\r\n\t\t}\t\r\n\t}",
"public static Document loadXmlFile(String fname) {\r\n try {\r\n Document doc = DocumentBuilderFactory.newInstance()\r\n .newDocumentBuilder().parse(fname);\r\n return doc;\r\n } catch (Exception e) {\r\n logger.log(Level.SEVERE, \"exception\", e);\r\n }\r\n\r\n return null;\r\n }",
"public Parser( File inFile ) throws FileNotFoundException\r\n {\r\n if( inFile.isDirectory() )\r\n throw new FileNotFoundException( \"Excepted a file but found a directory\" );\r\n \r\n feed = new Scanner( inFile );\r\n lineNum = 1;\r\n }",
"public void parse(File file, DefaultHandler handler) throws SAXException,\n IOException {\n if (file == null) {\n throw new IllegalArgumentException(\"file must not be null\");\n }\n if (file.isDirectory()) {\n throw new IllegalArgumentException(\"file must not be a directory\");\n }\n InputSource source = new InputSource(\"file:\" + file.getAbsolutePath());\n parse(source, handler);\n }",
"public void parse(File file, HandlerBase handler) throws SAXException,\n IOException {\n if (file == null) {\n throw new IllegalArgumentException(\"file must not be null\");\n }\n if (file.isDirectory()) {\n throw new IllegalArgumentException(\"file must not be a directory\");\n }\n InputSource source = new InputSource(\"file:\" + file.getAbsolutePath());\n parse(source, handler);\n }",
"public abstract XMLDocument parse(URL url);",
"SingleDocumentModel loadDocument(Path path);",
"@VisibleForTesting\n\tDocument parseLocalFile(String url) throws IOException {\n\t\treturn Jsoup.parse(new File(url), \"UTF-8\", \"\");\n\t}",
"public void parse(){\n\n Integer childStart = this.findNewElement(0, this.document.length - 1);\n if(childStart == null){\n return;\n }\n\n this.root.removeData();\n this.copyTextToDocumentTree(this.root, 0, childStart - 1);\n\n DocumentSectionType childType = this.getType(childStart);\n\n do {\n Integer end = this.findNextSameLevelElement(childStart + 1, childType);\n //now we have boundaries of our new element, so let's grab it's index\n //we need appropriate matcher\n\n Matcher childMatcher = childType.getPattern().matcher(this.document[childStart]);\n childMatcher.find();\n DocumentTree child = new DocumentTree(childType, childMatcher.group(1), null);\n\n //now clear first line\n try{\n String group2 = childMatcher.group(2);\n this.document[childStart] = group2 != null ? group2 + \" \" : \"\";\n }catch(IndexOutOfBoundsException e){\n this.document[childStart] = \"\";\n }\n try {\n this.document[childStart] += childMatcher.group(3);\n }catch(IndexOutOfBoundsException e){\n this.document[childStart] += \"\";\n }\n //and copy it's text\n this.copyTextToDocumentTree(child, childStart, end - 1);\n root.addChild(child);\n //finally, parse it\n DocumentParser childParser = new DocumentParser(child, joinChapterWithChapterNames);\n childParser.parse();\n\n childStart = end;\n }while(childStart != this.document.length);\n\n if(this.root.getType() == DocumentSectionType.CHAPTER && this.joinChapterWithChapterNames){\n DocumentTree nameNode = (DocumentTree)this.root.getChildren().get(0);\n this.root.removeData();\n this.root.appendData(nameNode.getIndex());\n this.root.replaceChild(nameNode, nameNode.getChildren());\n }\n\n }",
"@Override\r\n\tpublic DocumentData read(File in) throws Exception {\r\n\t\tDocumentData doc = new DocumentData(in);\r\n\t\tBufferedReader reader = FileHandler.getBufferedReader(in);\r\n\t\tBufferedReader nested = null;\r\n\t\tString inpath = in.getAbsolutePath();\r\n\t\tFile nestin = new File (inpath.substring(0,inpath.length()-5)+SUBSUFFIX);\r\n\t\tif(nestin.exists())\r\n\t\t\tnested = FileHandler.getBufferedReader(nestin);\r\n\t\tint lcnt=0;\r\n\t\tint scnt=0;\r\n\t\tint start=-1;\r\n\t\tint nstart = -1;\r\n\t\tSentenceData sent = null;\r\n\t\twhile(true){\r\n\t\t\tString line = reader.readLine();\r\n\t\t\tString nline = null;\r\n\t\t\tif(nested!=null)\r\n\t\t\t\tnline = nested.readLine();\r\n\t\t\tif(line==null) {\r\n\t\t\t\tif(sent!=null){\r\n\t\t\t\t\tdoc.addSentenceData(sent);\r\n\t\t\t\t\tsent=null;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tline = line.trim();\r\n\t\t\tlcnt++;\r\n\t\t\tif(line.length()==0){\r\n\t\t\t\tif(sent!=null){\r\n\t\t\t\t\tdoc.addSentenceData(sent);\r\n\t\t\t\t\tsent=null;\r\n\t\t\t\t\tscnt=0;\r\n\t\t\t\t}else\r\n\t\t\t\t\tSystem.out.println(\"Skip empty line in line:\"+lcnt);\r\n\t\t\t}else if(line.startsWith(\"#\")){\r\n\t\t\t\tSystem.out.println(\"Skip comments in line:\"+lcnt+\"; \"+line);\r\n\t\t\t}else{\r\n\t\t\t\tif(sent==null)\r\n\t\t\t\t\tsent = new SentenceData();\r\n\t\t\t\tscnt++;\r\n\t\t\t\t\r\n\t\t\t\tString tmp[] = line.split(\"\\t\");\r\n\t\t\t\tsent.addTokens(tmp[0]);\r\n\t\t\t\tString mark = tmp[tmp.length-1];// last column is the markables;\r\n\t\t\t\tif(mark.equals(\"O\")){\r\n\t\t\t\t\tif(start>=0)\r\n\t\t\t\t\t\tsent.addMarkables(start, scnt-1);\r\n\t\t\t\t\tstart=-1;\r\n\t\t\t\t}else if(mark.startsWith(\"I-\")||mark.startsWith(\"B-\")){\r\n\t\t\t\t\tif(start<0)\r\n\t\t\t\t\t\tstart = scnt;//support both IOB1 and IOB2\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthrow new Exception(\"Please input only IOB or IOB2 scheme (main): \"+lcnt+\": \"+line);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(nline!=null){\r\n\t\t\t\t\tString ntmp[] = nline.split(\"\\t\");\r\n\t\t\t\t\tString nmark = ntmp[ntmp.length-1];\r\n\t\t\t\t\tif(nmark.equals(\"O\")){\r\n\t\t\t\t\t\tif(nstart>=0)\r\n\t\t\t\t\t\t\tsent.addMarkables(start, scnt-1);\r\n\t\t\t\t\t\tnstart=-1;\r\n\t\t\t\t\t}else if(nmark.startsWith(\"I-\")||nmark.startsWith(\"B-\")){\r\n\t\t\t\t\t\tif(nstart<0)\r\n\t\t\t\t\t\t\tnstart = scnt;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthrow new Exception(\"Please input only IOB or IOB2 scheme (nested): \"+lcnt+\": \"+nline);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn doc;\r\n\t}",
"public void parseFile(File file) throws IOException {\r\n if (file.isDirectory()) {\r\n for (File subFile : file.listFiles()) {\r\n if (subFile.isDirectory() || subFile.getName().endsWith(\".java\")) {\r\n parseFile(subFile);\r\n }\r\n }\r\n } else {\r\n parseSourceCode(new String(Files.readAllBytes(file.toPath()), StandardCharsets.UTF_8));\r\n }\r\n }",
"private static void staxReader(File file) throws XMLStreamException, FileNotFoundException, FactoryConfigurationError, IOException {\n\n FileInputStream fis = new FileInputStream(file);\n Page[] ns0pages = StaxPageParser.pagesFromFile(fis);\n\n// reporter(ns0pages);\n }",
"public DOECorpus loadFromHTML() {\n\t\tFile[] files = getFileList();\n\t\t\n\t\tSystem.out.println(\"Found \" + files.length + \" documents in \" + this.sourceDir);\n\t\tSystem.out.println(\"Parsing their contents...\");\n\t\tint totalLineCount = 0;\n\t\t\n\t\tDOECorpus corpus = new DOECorpus();\n\t\t\n\t\tfor(File file : files) {\n\t\t\ttry {\n\t\t\t\tDocument htmlDoc = Jsoup.parse(file, null);\n\t\t\t\tString originalLocation = htmlDoc.location();\n\t\t\t\tString shortTitle = htmlDoc.title();\n\t\t\t\tString shortShortTitle = \"\";\n\t\t\t\tString cameronNumber = \"\";\n\t\t\t\t\n\t\t\t\tDOECorpusDocument corpusDoc = new DOECorpusDocument(shortTitle, shortShortTitle, cameronNumber, originalLocation);\n\t\t\t\t\t\t\n\t\t\t\tElements paragraphElements = htmlDoc.select(\"p\");\n\t\t\t\tDOECorpusLine lineBefore = null;\n\t\t\t\t\n\t\t\t\tfor(Element p : paragraphElements) {\n\t\t\t\t\tString text = p.text();\n\t\t\t\t\t\n\t\t\t\t\tif(ignoreLine(text))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\n\t\t\t\t\telse if(text.startsWith(SHORT_SHORT_TITLE))\n\t\t\t\t\t\tshortShortTitle = text.replace(SHORT_SHORT_TITLE, \"\");\n\t\t\t\t\t\n\t\t\t\t\telse if(text.startsWith(CAMERON_NUMBER))\n\t\t\t\t\t\tcameronNumber = text.replace(CAMERON_NUMBER, \"\");\n\t\t\t\t\t\n\t\t\t\t\telse if(text.startsWith(\"[\")) {\n\t\t\t\t\t\tString lineID = \"\";\n\t\t\t\t\t\tString line = \"\";\n\t\t\t\t\t\tPattern linePattern = Pattern.compile(\"\\\\[([0-9]+\\\\s\\\\([0-9a-zA-Z\\\\.,\\\\s\\\\(\\\\)]+\\\\))\\\\]\\\\s(.*)\");\n\t\t\t\t\t\tMatcher m = linePattern.matcher(text);\n\t\t\t\t\t\tif (m.matches()) {\n\t\t\t\t\t\t lineID = m.group(1).trim();\n\t\t\t\t\t\t line = m.group(2).trim();\n\t\t\t\t\t\t \n\t\t\t\t\t\t DOECorpusLine newLine = new DOECorpusLine(lineID, line, shortTitle);\n\t\t\t\t\t\t newLine.setLineBefore(lineBefore);\n\t\t\t\t\t\t if(lineBefore != null)\n\t\t\t\t\t\t\t lineBefore.setLineAfter(newLine);\n\t\t\t\t\t\t corpusDoc.addLine(newLine);\n\t\t\t\t\t\t lineBefore = newLine;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if(!text.isEmpty())\t// This should be the full title\n\t\t\t\t\t\tcorpusDoc.setFullTitle(text);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttotalLineCount += corpusDoc.getLineCount();\n\t\t\t\tcorpus.addDocument(corpusDoc);\n\t\t\t\t\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"Parsing their contents...DONE\");\n\t\tSystem.out.println(\"Total number of lines: \" + totalLineCount);\n\t\t\n\t\tSystem.out.println(\"Splitting lines into sentences...\");\n\t\tcorpus.splitIntoSentences();\n\t\tSystem.out.println(\"Splitting lines into sentences...DONE\");\n\t\t\n\t\tSystem.out.println(\"Tokenizing sentences...\");\n\t\tcorpus.tokenize();\n\t\tSystem.out.println(\"Tokenizing sentences...DONE\");\n\t\tSystem.out.println(\"Total number of tokens: \" + corpus.getTokenCount());\n\t\tSystem.out.println(\"Total number of types: \" + corpus.getTypeCount());\n\t\tSystem.out.println(\"Total number of sentences: \" + corpus.getSentenceCount());\n\t\tSystem.out.println(\"Average sentence length: \" + corpus.getAvgSenLength());\n\t\tSystem.out.println(\"Minimum sentence length: \" + corpus.getMinSenLength());\n\t\tSystem.out.println(\"Maximum sentence length: \" + corpus.getMaxSenLength());\n\t\t\n\t\treturn corpus;\n\t}",
"public Map<String, Object> nextDocument() throws IOException {\n // 1. When called, this API processes one document from corpus, and returns its\n // doc number and content.\n // 2. When no document left, return null, and close the file.\n // 3. the HTML tags should be removed in document content.\n if (fileList.size() > 0) {\n Map<String, Object> r = new HashMap<>();\n File dataFile = fileList.pop();\n\n FileInputStream document = new FileInputStream(dataFile);\n byte[] context = new byte[(int) dataFile.length()];\n document.read(context);\n document.close();\n String text = new String(context, \"UTF-8\");\n char[] valueText = text.replaceAll(\"\\\\p{Cc}\", \"\")\n .replaceAll(\"<[^>]*>\", \" \").trim().toCharArray();\n r.put(dataFile.getPath(), valueText);\n return r;\n }\n\n return null;\n\n }",
"public XmlParser(String strFile) throws XmlException\n {\n File fXmlFile = new File(strFile);\n DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder dBuilder;\n try\n {\n dBuilder = dbFactory.newDocumentBuilder();\n doc = dBuilder.parse(fXmlFile);\n doc.getDocumentElement().normalize();\n }\n catch (ParserConfigurationException ex)\n {\n throw new XmlException(\"Unable to initialize XML parser for: \" + strFile);\n }\n catch (SAXException ex)\n {\n throw new XmlException(\"Incorrect XML format: \" + strFile);\n }\n catch (IOException ex)\n {\n throw new XmlException(\"Unable to open XML file: \" + strFile);\n }\n }",
"public Document parse(InputSource aXmlInstance)\n\t\t\t\t throws org.xml.sax.SAXException, java.io.IOException {\n\t\tif (aXmlInstance == null) {\n\t\t\tthrow new IllegalArgumentException(\"InputSource cannot be null\");\n\t\t}\n\n\t\tparserImpl.parse(aXmlInstance);\n\n\t\treturn parserImpl.getDocument();\n\t}",
"@Override\n\tprotected void parseDocument(Document doc, File file)\n\t{\n\t\tfinal StatsSet set = new StatsSet();\n\t\t\n\t\t// First element is never read.\n\t\tfinal Node n = doc.getFirstChild();\n\t\t\n\t\tfor (Node o = n.getFirstChild(); o != null; o = o.getNextSibling())\n\t\t{\n\t\t\tif (!\"castle\".equalsIgnoreCase(o.getNodeName()))\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\tNamedNodeMap attrs = o.getAttributes();\n\t\t\t\n\t\t\tfinal Castle castle = _castles.get(Integer.parseInt(attrs.getNamedItem(\"id\").getNodeValue()));\n\t\t\tif (castle == null)\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\tcastle.setCircletId(Integer.parseInt(attrs.getNamedItem(\"circletId\").getNodeValue()));\n\t\t\t\n\t\t\tfor (Node d = o.getFirstChild(); d != null; d = d.getNextSibling())\n\t\t\t{\n\t\t\t\tif (\"artifact\".equalsIgnoreCase(d.getNodeName()))\n\t\t\t\t\tcastle.setArtifacts(d.getAttributes().getNamedItem(\"val\").getNodeValue());\n\t\t\t\telse if (\"controlTowers\".equalsIgnoreCase(d.getNodeName()))\n\t\t\t\t{\n\t\t\t\t\tattrs = d.getAttributes();\n\t\t\t\t\tfor (Node e = d.getFirstChild(); e != null; e = e.getNextSibling())\n\t\t\t\t\t{\n\t\t\t\t\t\tif (!\"tower\".equalsIgnoreCase(e.getNodeName()))\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\n\t\t\t\t\t\tattrs = e.getAttributes();\n\t\t\t\t\t\t\n\t\t\t\t\t\tfinal String[] location = attrs.getNamedItem(\"loc\").getNodeValue().split(\",\");\n\t\t\t\t\t\t\n\t\t\t\t\t\tcastle.getControlTowers().add(new TowerSpawnLocation(13002, new SpawnLocation(Integer.parseInt(location[0]), Integer.parseInt(location[1]), Integer.parseInt(location[2]), -1)));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (\"flameTowers\".equalsIgnoreCase(d.getNodeName()))\n\t\t\t\t{\n\t\t\t\t\tattrs = d.getAttributes();\n\t\t\t\t\tfor (Node e = d.getFirstChild(); e != null; e = e.getNextSibling())\n\t\t\t\t\t{\n\t\t\t\t\t\tif (!\"tower\".equalsIgnoreCase(e.getNodeName()))\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\n\t\t\t\t\t\tattrs = e.getAttributes();\n\t\t\t\t\t\t\n\t\t\t\t\t\tfinal String[] location = attrs.getNamedItem(\"loc\").getNodeValue().split(\",\");\n\t\t\t\t\t\tfinal String[] zoneIds = attrs.getNamedItem(\"zones\").getNodeValue().split(\",\");\n\t\t\t\t\t\t\n\t\t\t\t\t\tcastle.getFlameTowers().add(new TowerSpawnLocation(13004, new SpawnLocation(Integer.parseInt(location[0]), Integer.parseInt(location[1]), Integer.parseInt(location[2]), -1), zoneIds));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (\"relatedNpcIds\".equalsIgnoreCase(d.getNodeName()))\n\t\t\t\t\tcastle.setRelatedNpcIds(d.getAttributes().getNamedItem(\"val\").getNodeValue());\n\t\t\t\telse if (\"tickets\".equalsIgnoreCase(d.getNodeName()))\n\t\t\t\t{\n\t\t\t\t\tattrs = d.getAttributes();\n\t\t\t\t\tfor (Node e = d.getFirstChild(); e != null; e = e.getNextSibling())\n\t\t\t\t\t{\n\t\t\t\t\t\tif (!\"ticket\".equalsIgnoreCase(e.getNodeName()))\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\n\t\t\t\t\t\tattrs = e.getAttributes();\n\t\t\t\t\t\t\n\t\t\t\t\t\tset.set(\"itemId\", Integer.valueOf(attrs.getNamedItem(\"itemId\").getNodeValue()));\n\t\t\t\t\t\tset.set(\"type\", attrs.getNamedItem(\"type\").getNodeValue());\n\t\t\t\t\t\tset.set(\"stationary\", Boolean.valueOf(attrs.getNamedItem(\"stationary\").getNodeValue()));\n\t\t\t\t\t\tset.set(\"npcId\", Integer.valueOf(attrs.getNamedItem(\"npcId\").getNodeValue()));\n\t\t\t\t\t\tset.set(\"maxAmount\", Integer.valueOf(attrs.getNamedItem(\"maxAmount\").getNodeValue()));\n\t\t\t\t\t\tset.set(\"ssq\", attrs.getNamedItem(\"ssq\").getNodeValue());\n\t\t\t\t\t\t\n\t\t\t\t\t\tcastle.getTickets().add(new MercenaryTicket(set));\n\t\t\t\t\t\tset.clear();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public interface DocumentReader\n {\n\t/**\n\t* Read a single Document from the specified file.\n\t* @returns The next Document if there are more, or null if there are not.\n\t*/\n public Document readDocument();\n }",
"public void parse(XmlDocument document, Reader in) throws Exception {\n\t\tURL url = document.getURL();\n\t\tparse(document, url, null, in, null, null);\n\t}",
"private void createDOCDocument(String from, File file) throws Exception {\n\t\tPOIFSFileSystem fs = new POIFSFileSystem(Thread.currentThread().getClass().getResourceAsStream(\"/poi/template.doc\"));\n\t\tHWPFDocument doc = new HWPFDocument(fs);\n\t\n\t\tRange range = doc.getRange();\n\t\tParagraph par1 = range.getParagraph(0);\n\t\n\t\tCharacterRun run1 = par1.insertBefore(from, new CharacterProperties());\n\t\trun1.setFontSize(11);\n\t\tdoc.write(new FileOutputStream(file));\n\t}",
"private void processXMLFile( File xmlFile ) throws SAXException, IOException, ParserConfigurationException {\r\n\t\t\r\n\t\t//parse the uploaded xml file\r\n\t\tDocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();\r\n\t\t\r\n\t\tdomFactory.setValidating(false);\r\n\t\tdomFactory.setIgnoringComments(true);\r\n\t\t\r\n\t\tDocumentBuilder docBuilder = domFactory.newDocumentBuilder();\r\n\t\t\t\r\n\t\tDocument doc = docBuilder.parse(xmlFile);\r\n\t\t\t\t\r\n\t\tElement employeesNode = doc.getDocumentElement();\r\n\t\t\r\n\t\tNodeList employees = employeesNode.getElementsByTagName(\"Employee\");\r\n\t\t\r\n\t\tLogger.debug(\"found \" + employees.getLength() + \" employees in xml document\");\r\n\t\t\r\n\t\tfor (int i=0; i<employees.getLength(); i++ ) {\r\n\t\t\t\r\n\t\t\tHashMap<String,String> contactObject = new HashMap<String,String>();\r\n\t\t\t\r\n\t\t\tElement employee = (Element) employees.item(i);\r\n\t\t\t\r\n\t\t\tcontactObject.put( \"id\", employee.getAttribute(\"id\") );\r\n\t\t\tcontactObject.put( \"givenname\", ContactsImport.getXmlChildNodeValue( employee, \"GivenName\") );\r\n\t\t\tcontactObject.put( \"sn\", ContactsImport.getXmlChildNodeValue( employee, \"SurName\") );\r\n\t\t\tcontactObject.put( \"title\", ContactsImport.getXmlChildNodeValue( employee, \"JobTitle\") );\r\n\t\t\tcontactObject.put( \"mail\", ContactsImport.getXmlChildNodeValue( employee, \"EmailAddress\") );\r\n\t\t\tcontactObject.put( \"telephonenumber\", ContactsImport.getXmlChildNodeValue( employee, \"PhoneNumber\") );\r\n\t\t\t\r\n\t\t\tcreateContact(contactObject);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t}",
"@Override\r\n\t\t\t\tpublic void run() {\n\t\t\t\t\tparseFile(\"english_file.txt\");\r\n\t\t\t\t}",
"private void parseFile(Project p, File f, ImportSettings settings, int pass)\n throws ImportException {\n\n\n try {\n BufferedInputStream bs = new BufferedInputStream(new FileInputStream(f));\n Lexer l = new Lexer(bs, f.getAbsolutePath());\n TokenCollection toks = l.lex();\n Parser px = new Parser();\n CompilationUnitNode cu = px.parse(toks, l.StringLiterals);\n parsedElements.add(cu);\n } catch (FeatureNotSupportedException e) {\n //throw new ImportException(\"Error parsing file: \" + f.getAbsolutePath() + \" due to: \"+e.getMessage());\n System.out.println(\"Error parsing file: \" + f.getAbsolutePath() + \" due to: \"+e.getMessage());\n } catch (Exception e) {\n// e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.\n// throw new ImportException(\"Error parsing file: \" + f.getAbsolutePath());\n System.out.println(\"Error parsing file: \" + f.getAbsolutePath());\n }\n\n }",
"public void parse(XmlDocument document, InputStream in) throws Exception {\n\t\tURL url = document.getURL();\n\t\tparse(document, url, null, null, in, null);\n\t}"
] | [
"0.7606913",
"0.7527742",
"0.75131404",
"0.7334565",
"0.72669286",
"0.7261963",
"0.7211659",
"0.71493894",
"0.7127767",
"0.7071565",
"0.7032952",
"0.69351107",
"0.69009364",
"0.67748135",
"0.6720692",
"0.6670902",
"0.66662705",
"0.6637063",
"0.66337067",
"0.6533024",
"0.6493806",
"0.6480403",
"0.6452484",
"0.6446753",
"0.6427388",
"0.6423066",
"0.6379516",
"0.63776344",
"0.6344142",
"0.6335917",
"0.63348",
"0.63302445",
"0.63272244",
"0.6323613",
"0.63208747",
"0.62333655",
"0.622672",
"0.62042654",
"0.61952984",
"0.6174023",
"0.61735684",
"0.6137971",
"0.6114325",
"0.60865563",
"0.6084729",
"0.6083727",
"0.6077364",
"0.6071686",
"0.60522836",
"0.60247487",
"0.6008645",
"0.6006603",
"0.59774345",
"0.5950256",
"0.593105",
"0.59268796",
"0.59198475",
"0.5881462",
"0.5879599",
"0.58769",
"0.5875207",
"0.58738583",
"0.58423233",
"0.58418196",
"0.58275443",
"0.58133143",
"0.58061326",
"0.5794915",
"0.5794825",
"0.5793224",
"0.5767989",
"0.5750021",
"0.57449764",
"0.57414067",
"0.5734641",
"0.5723767",
"0.57199097",
"0.57176805",
"0.57050145",
"0.56920487",
"0.5688801",
"0.5682025",
"0.56780505",
"0.5654506",
"0.5646722",
"0.5631316",
"0.56279564",
"0.56272084",
"0.5622558",
"0.5613775",
"0.5610275",
"0.5600756",
"0.5588485",
"0.5581658",
"0.55725795",
"0.5561981",
"0.55558676",
"0.5554851",
"0.5543932",
"0.55398095"
] | 0.7255605 | 6 |
/ mongoTemplate.upsert(new Query(where("id").is(accountId)), new Update(). set("transactions." + transactionId + ".status", status), AccountInfo.class); | public void updateTransactionStatus(String accountId, String transactionId, TransferState status) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void updateSingleRecord(){\n MongoCollection<Document> table = db.getCollection(\"user\");\n Document document = new Document();\n document.put(\"userType\", \"Free\");\n\n Document updateDocument=new Document(\"$set\", document);\n\n ObjectId id = null;\n\n try { id = new ObjectId(\"5ea41b16334a2657d0c26717\"); }\n catch (Exception e) { }\n\n\n table.updateOne(eq(\"_id\", id), updateDocument);\n }",
"int updateByPrimaryKey(AccountAccountTemplateEntity record);",
"public int addRow(String domain_name, String country_name, List<String> IP) {\n\n\n// Document result = collection.find(Filters.eq(\"domain_name\", domain_name)).first();\n//\n// if (result != null)\n// return -1;\n\n// Document document = new Document(\"domain_name\", domain_name)\n// .append(\"countries\", Arrays.asList(new Document(\"country\", country_name)\n// .append(\"IPs\", IP)));\n Bson updates = Updates.addToSet(\"countries\", new Document(\"country\", country_name)\n .append(\"IPs\", IP));\n Bson updates2 = Updates.set(\"dirty_bit\",\"1\");\n Bson updates3 = Updates.combine(updates,updates2);\n\n // Add country with IPs and if domain doesn't exist create new document.\n collection.updateOne(Filters.eq(\"domain_name\", domain_name),updates3,\n new UpdateOptions().upsert(true));\n\n\n\n //collection.insertOne(document);\n\n return 1;\n\n }",
"public void updateMultipleRecord(){\n MongoCollection<Document> table = db.getCollection(\"user\");\n Document document = new Document();\n document.put(\"userName\", \"FreeUser\");\n document.put(\"status\", true);\n\n Document updateDocument=new Document(\"$set\", document);\n\n\n table.updateMany(eq(\"userType\", \"Free\"), updateDocument);\n }",
"UpdateResponse upsert(UpdateRequest updateRequest) throws IOException;",
"private static CompletionStage<Void> update(ReactiveMongoCollection collection, Object entity) {\n BsonDocument document = getBsonDocument(collection, entity);\n\n //then we get its id field and create a new Document with only this one that will be our replace query\n BsonValue id = document.get(ID);\n BsonDocument query = new BsonDocument().append(ID, id);\n return collection.replaceOne(query, entity).thenApply(u -> null);\n }",
"private static CompletionStage<Void> persistOrUpdate(ReactiveMongoCollection collection, Object entity) {\n BsonDocument document = getBsonDocument(collection, entity);\n\n //then we get its id field and create a new Document with only this one that will be our replace query\n BsonValue id = document.get(ID);\n if (id == null) {\n //insert with autogenerated ID\n return collection.insertOne(entity);\n } else {\n //insert with user provided ID or update\n BsonDocument query = new BsonDocument().append(ID, id);\n return collection.replaceOne(query, entity, ReplaceOptions.createReplaceOptions(new UpdateOptions().upsert(true)))\n .thenApply(u -> null);\n }\n }",
"int updateByPrimaryKey(ShopAccount record);",
"public String updateSkill (String studentid,String skill,Double pknow){\n System.out.println(\"updating skill \"+skill+ \" student \"+studentid + \" pknow \"+pknow);\n String tnp = new String(\"\");\n Document query = new Document();\n query = new Document(\"_id\", new ObjectId(\n studentid)).append(\"skills.name\",skill);\n MongoCursor<Document> cursor = studentSkills.find(query).iterator();\n try {\n // SKill already exists\n if (cursor.hasNext()){\n Document c = cursor.next();\n c.put(\"skills.name\",skill);\n studentSkills.updateOne(c,new Document(\"$set\",new Document(\"skills.$.pknown\",pknow)));\n }\n // SKill is new for student\n else{\n System.out.println(\"Warning Skill does not exists, please add before !\");\n }\n } finally {\n cursor.close();\n }\n\n System.out.println(\"updating know of student\");\n return tnp;\n}",
"int updateByExample(CusBankAccount record, CusBankAccountExample example);",
"private static CompletionStage<Void> persistOrUpdate(ReactiveMongoCollection collection, List<Object> entities) {\n List<WriteModel> bulk = new ArrayList<>();\n for (Object entity : entities) {\n //we transform the entity as a document first\n BsonDocument document = getBsonDocument(collection, entity);\n\n //then we get its id field and create a new Document with only this one that will be our replace query\n BsonValue id = document.get(ID);\n if (id == null) {\n //insert with autogenerated ID\n bulk.add(new InsertOneModel(entity));\n } else {\n //insert with user provided ID or update\n BsonDocument query = new BsonDocument().append(ID, id);\n bulk.add(new ReplaceOneModel(query, entity,\n ReplaceOptions.createReplaceOptions(new UpdateOptions().upsert(true))));\n }\n }\n\n return collection.bulkWrite(bulk).thenApply(b -> null);\n }",
"public interface AccountTransactionRepository extends MongoRepository<AccountTransactionEnquiry, String> {\n List<AccountTransactionEnquiry> findAll();\n}",
"int upsert(UserShare5Min record);",
"int updateByPrimaryKeySelective(ShopAccount record);",
"int updateByPrimaryKey(Account record);",
"int updateByPrimaryKey(Account record);",
"Update withProperties(AccountProperties properties);",
"@Test\n public void update2()\n {\n int zzz = getJdbcTemplate().update(\"UPDATE account SET NAME =?,money=money-? WHERE id =?\", \"ros\", \"100\", 2);\n System.out.println(zzz);\n }",
"int updateByPrimaryKey(ResultDto record);",
"public void testUpdateUpsert() {\n String[] updateShardActions = new String[] { UpdateAction.NAME + \"[s]\", BulkAction.NAME + \"[s][p]\", BulkAction.NAME + \"[s][r]\" };\n interceptTransportActions(updateShardActions);\n\n String indexOrAlias = randomIndexOrAlias();\n UpdateRequest updateRequest = new UpdateRequest(indexOrAlias, \"id\").upsert(Requests.INDEX_CONTENT_TYPE, \"field\", \"value\")\n .doc(Requests.INDEX_CONTENT_TYPE, \"field1\", \"value1\");\n UpdateResponse updateResponse = internalCluster().coordOnlyNodeClient().update(updateRequest).actionGet();\n assertEquals(DocWriteResponse.Result.CREATED, updateResponse.getResult());\n\n clearInterceptedActions();\n assertSameIndices(updateRequest, updateShardActions);\n }",
"@Override\n\tpublic void updateOrSave(String collectionName, Map<String, CustmerCriteria> query, Map<String, Object> document)\n\t\t\tthrows Exception {\n\t\t\n\t}",
"int updateByPrimaryKey(CusBankAccount record);",
"public Account update(Account user);",
"int updateByPrimaryKeySelective(AccountAccountTemplateEntityWithBLOBs record);",
"int updateByExample(@Param(\"record\") ShopAccount record, @Param(\"example\") ShopAccountExample example);",
"public interface TransactionsRepository extends MongoRepository<Transactions, String> {\n}",
"int updateByPrimaryKeySelective(Account record);",
"@Override\n public void upsert(Novel novel) {\n cassandraTemplate.update(\n Query.query( Criteria.where(\"category\").is(novel.getCategory()))\n .and(Criteria.where(\"author\").is(novel.getAuthor()))\n .and(Criteria.where(\"genre\").is(novel.getGenre()))\n .and(Criteria.where(\"name\").is(novel.getName())),\n Update.empty().increment(\"sale_count\"), Novel.class);\n }",
"int updateByPrimaryKeyWithBLOBs(AccountAccountTemplateEntityWithBLOBs record);",
"@Update({\n \"update twshop_address\",\n \"set user_id = #{userId,jdbcType=VARCHAR},\",\n \"user_name = #{userName,jdbcType=VARCHAR},\",\n \"tel_number = #{telNumber,jdbcType=VARCHAR},\",\n \"postal_Code = #{postalCode,jdbcType=VARCHAR},\",\n \"national_Code = #{nationalCode,jdbcType=VARCHAR},\",\n \"province_Name = #{provinceName,jdbcType=VARCHAR},\",\n \"city_Name = #{cityName,jdbcType=VARCHAR},\",\n \"county_Name = #{countyName,jdbcType=VARCHAR},\",\n \"detail_Info = #{detailInfo,jdbcType=VARCHAR},\",\n \"is_default = #{isDefault,jdbcType=INTEGER}\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n int updateByPrimaryKey(Address record);",
"public void setStatus(String un, String status){\n MongoCollection<Document> collRU = db.getCollection(\"registeredUser\");\n // updating user database\n collRU.findOneAndUpdate(\n eq(\"username\", un),\n Updates.set(\"status\", status)\n );\n }",
"int updateByPrimaryKeySelective(ResultDto record);",
"Account.Update update();",
"public void updateOneWord(Pojo.OneWord e){ \n template.update(e); \n}",
"int updateByPrimaryKey(SsSocialSecurityAccount record);",
"int updateByPrimaryKey(UploadStateRegDTO record);",
"CustomerDto updateCustomer(CustomerDto customerDto);",
"Department createOrUpdate(Department department);",
"int updateByPrimaryKeySelective(CusBankAccount record);",
"@Update({\n \"update t_address\",\n \"set userid = #{userid,jdbcType=VARCHAR},\",\n \"province = #{province,jdbcType=VARCHAR},\",\n \"city = #{city,jdbcType=VARCHAR},\",\n \"region = #{region,jdbcType=VARCHAR},\",\n \"address = #{address,jdbcType=VARCHAR},\",\n \"postal = #{postal,jdbcType=VARCHAR},\",\n \"consignee = #{consignee,jdbcType=VARCHAR},\",\n \"phone = #{phone,jdbcType=VARCHAR},\",\n \"status = #{status,jdbcType=VARCHAR},\",\n \"createdate = #{createdate,jdbcType=TIMESTAMP}\",\n \"where addrid = #{addrid,jdbcType=VARCHAR}\"\n })\n int updateByPrimaryKey(Address record);",
"@Override\r\n\tpublic void update(snstatus sns) {\n\t\tsuper.getHibernateTemplate().update(sns); \r\n\t}",
"public interface RoomBookRepository extends Repository<RoomBookPo, Integer> {\n\n void save(RoomBookPo roomBookPo);\n\n RoomBookPo getById(Integer id);\n\n List<RoomBookPo> findByConsumerAndStatus(Integer consumer, Boolean status);\n\n List<RoomBookPo> findByConsumer(Integer consumer);\n\n @Modifying\n @Query(\"UPDATE RoomBookPo rb SET rb.status = true, rb.settlementPrice = ?1, rb.status = true WHERE rb.id = ?2\")\n void updateSettlementPrice(BigDecimal settlementPrice, Integer id);\n\n}",
"Update withIdentity(Identity identity);",
"int updateByExampleSelective(@Param(\"record\") ShopAccount record, @Param(\"example\") ShopAccountExample example);",
"@Override\n public void update(Person p) throws SQLException, ClassNotFoundException\n {\n\n BasicDBObject query = new BasicDBObject();\n query.put(\"Id\", p.getId()); // old data, find key Id\n\n BasicDBObject newDocument = new BasicDBObject();\n\n// newDocument.put(\"Id\", p.getId()); // new data\n newDocument.put(\"FName\", p.getFName()); // new data\n newDocument.put(\"LName\", p.getLName()); // new data\n newDocument.put(\"Age\", p.getAge()); // new data\n System.out.println(newDocument);\n\n BasicDBObject updateObj = new BasicDBObject();\n updateObj.put(\"$set\", newDocument);\n System.out.println(updateObj);\n\n table.update(query, updateObj);\n }",
"int updateByExampleSelective(CusBankAccount record, CusBankAccountExample example);",
"@Repository\npublic interface ApplyRepository extends JpaRepository<ApplyEntity,Integer> {\n @Modifying\n @Query(\"update ApplyEntity apply set apply.status = ?1 where apply.id= ?2\")\n void modifyStatuById(String status,int id);\n}",
"int updateByPrimaryKey(ResourcePojo record);",
"public interface BillInfoRepository extends MongoRepository<BillInfo, String>{\n\n BillInfo findByBillRefNo(String BillRefNo);\n\n}",
"void updateAccount(Account account);",
"@Repository\npublic interface PurchaseRepository extends MongoRepository<Purchase, UUID>\n{\n Collection<Purchase> findPurchaceByUserId(Integer userId);\n}",
"@Update({\n \"update PURCHASE\",\n \"set SDATE = #{sdate,jdbcType=TIMESTAMP},\",\n \"STYPE = #{stype,jdbcType=VARCHAR},\",\n \"SMONEY = #{smoney,jdbcType=DECIMAL},\",\n \"TOUCHING = #{touching,jdbcType=VARCHAR},\",\n \"ACCOUNT = #{account,jdbcType=VARCHAR},\",\n \"CHECKSTATUS = #{checkstatus,jdbcType=DECIMAL},\",\n \"DEMO1 = #{demo1,jdbcType=DECIMAL},\",\n \"DEMO2 = #{demo2,jdbcType=VARCHAR},\",\n \"DEMO3 = #{demo3,jdbcType=DECIMAL}\",\n \"where ID = #{id,jdbcType=DECIMAL}\"\n })\n int updateByPrimaryKey(Purchase record);",
"int updateByPrimaryKey(MVoucherDTO record);",
"int updateByPrimaryKey(CustomReport record);",
"@Override\npublic void update(Account account) {\n\taccountdao.update(account);\n}",
"int updateByPrimaryKey(FinanceAccount record);",
"public String addSkill (String studentid,String skill,String params){\n System.out.println(\"adding skill \"+skill+ \" student \"+studentid);\n String tnp = new String(\"\");\n Document query = new Document();\n query = new Document(\"_id\", new ObjectId(\n studentid)).append(\"skills.name\",skill);\n MongoCursor<Document> cursor = studentSkills.find(query).iterator();\n try {\n // SKill already exists\n if (cursor.hasNext()){\n System.out.println(\"Skill all ready exists !\");\n }\n // SKill is new for student\n else{\n System.out.println(\"query not working \");\n Document _skill = new Document();\n _skill.append(\"name\",skill);\n _skill.append(\"pknown\",0.3);\n _skill.append(\"subject\",\"math\");\n _skill.append(\"answer\",Arrays.asList());\n if (!params.equals(\"none\")){\n _skill.append(\"bktParams\",params);\n }\n // Insert to student skills\n Document std = new Document();\n std.append(\"_id\",new ObjectId(studentid));\n studentSkills.updateOne(std,new Document(\"$push\",new Document(\"skills\",_skill)));\n }\n } finally {\n cursor.close();\n }\n/* try {\n studentSkills.updateOne(query,new Document(\"$set\", new Document(\"pknown\", 0.3)));\n}\ncatch (Exception e){\n System.out.println(e);\n}*/\n System.out.println(\"updating know of student\");\n return tnp;\n}",
"public void saveOrUpdate(Account account) {\n accountRepository.save(account);\n }",
"@SneakyThrows\n public BulkResponse upsertDocByBulk(String index, List<Map<String, Object>> sources) {\n BulkRequest bulkRequest = new BulkRequest(index);\n for (Map<String, Object> source : sources) {\n UpdateRequest updateRequest = new UpdateRequest(index, (String) source.get(EsConstant.ID))\n .doc(source, XContentType.JSON)\n .upsert(source, XContentType.JSON);\n bulkRequest.add(updateRequest);\n }\n if (refreshPolicy != null) {\n bulkRequest.setRefreshPolicy(refreshPolicy);\n }\n return restHighLevelClient.bulk(bulkRequest, RequestOptions.DEFAULT);\n }",
"int updateByPrimaryKeySelective(SsSocialSecurityAccount record);",
"public interface SocketServerInfoRespository extends JpaRepository<SocketServerInfo,Long> {\n\n @Transactional\n @Modifying\n @Query(\"update SocketServerInfo set status = 1 where id = :id \")\n void update(@Param(\"id\") Integer id);\n}",
"int updateByPrimaryKey(Pet record);",
"int updateByPrimaryKey(ResPartnerBankEntity record);",
"public void testUpdateAccount(){\n\t\tint id = 10 ;\n\t\tAccount acc = this.bean.findAccountById(id ) ;\n\t\tacc.setDatetime(CommUtil.getNowDate()) ;\n\t\tint r = this.bean.updateAccount(acc) ;\n\t\tAssert.assertEquals(r, 1) ;\n\t}",
"int updateByPrimaryKey(CCustomer record);",
"int updateByPrimaryKey(BaseCountract record);",
"CustomerOrder update(CustomerOrder customerOrder);",
"int updateByPrimaryKey(QuestionOne record);",
"int insert(ShopAccount record);",
"int updateByPrimaryKey(TbFreightTemplate record);",
"void updateAccount(int id, double accountBalance, String account) {\n // Update only the required keys\n sql = \"UPDATE CashiiDB2 \" + \"SET \" + account + \" ='\" + accountBalance + \"' WHERE AccountNum in ('\" + id + \"')\";\n try {\n st.executeUpdate(sql);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }",
"int updateByPrimaryKeySelective(ResourcePojo record);",
"int updateByPrimaryKeySelective(MVoucherDTO record);",
"int updateByExample(County record, CountyExample example);",
"int updateByPrimaryKeySelective(Ltsprojectpo record);",
"int updateByPrimaryKey(Body record);",
"int updateByPrimaryKey(EtpBase record);",
"@PostMapping(\"/{id}\")\n\tpublic <T> void UpdateDocumentFields(@PathVariable ObjectId id, @RequestParam String updateKey, @RequestParam T updateValue) {\n\t\ttradeLedgerService.update(id, updateKey, updateValue);\n\t}",
"int updateByPrimaryKey(Ltsprojectpo record);",
"public void upsert(final T obj, OnSuccessListener<Void> successes, OnFailureListener failureListener){\n if (obj.getId()==null) {\n db.collection(COLLECTION_NAME)\n .document()\n .set(obj.marshal())\n .addOnSuccessListener(successes)\n .addOnFailureListener(failureListener);\n return;\n }\n db.collection(COLLECTION_NAME)\n .document(obj.getId())\n .set(obj.marshal())\n .addOnSuccessListener(successes)\n .addOnFailureListener(failureListener);\n }",
"int updateByPrimaryKeySelective(FinanceAccount record);",
"int updateByPrimaryKey(SysTeam record);",
"@Override\r\n\tpublic void update(Account account) throws ServiceException {\n\r\n\t}",
"@Update(\"UPDATE addresses SET city=#{city}, zip_code=#{zip}, street=#{street}, number=#{number} \" +\n \"WHERE id_address=#{addressId}\")\n void updatePatientAddress(Address address);",
"@Test\n public void updateAccount(){\n ApplicationContext ac = new AnnotationConfigApplicationContext(SpringConfiguration.class);\n\n AccountService as = ac.getBean(\"accountService\", AccountService.class);\n Account account = as.findAccountById(2);\n account.setMoney(123456f);\n as.updateAccount(account);\n\n }",
"int updateByPrimaryKey(IntegralExchange record);",
"int updateByPrimaryKeySelective(UploadStateRegDTO record);",
"int insert(TmpUserPayAccount record);",
"int updateByPrimaryKey(DepAcctDO record);",
"int updateByPrimaryKey(WayShopCateRoot record);",
"int updateByPrimaryKey(AccountPaymentMethodEntity record);",
"int updateByPrimaryKey(BusinessRepayment record);",
"public interface TravellerRepository extends CrudRepository<Traveller,Integer> {\n @Transactional\n @Modifying\n @Query(\"update TRAVELLER set WALLET_AMOUNT=?1 where EMAIL= ?2\")\n public void updateByEmail(Double amount,String email);\n}",
"int updateByPrimaryKey(SysType record);",
"int updateByPrimaryKey(Dress record);",
"int updateByExample(TResearchTeach record, TResearchTeachExample example);",
"int updateByPrimaryKeySelective(CustomReport record);",
"int updateByPrimaryKey(HotelType record);",
"int updateByPrimaryKey(Addresses record);",
"int updateByPrimaryKey(BankUserInfo record);",
"int updateByPrimaryKey(BankUserInfo record);"
] | [
"0.64108086",
"0.6174391",
"0.5896885",
"0.58863235",
"0.5883136",
"0.57837063",
"0.56801367",
"0.56252223",
"0.5602891",
"0.558522",
"0.55832946",
"0.55600387",
"0.5539221",
"0.545885",
"0.54568005",
"0.54568005",
"0.54469633",
"0.54334545",
"0.5382423",
"0.5365258",
"0.5357606",
"0.53486186",
"0.5339191",
"0.532553",
"0.52884346",
"0.52585214",
"0.5253515",
"0.5237943",
"0.52317965",
"0.5223611",
"0.521149",
"0.520609",
"0.51941323",
"0.518419",
"0.5173421",
"0.51723546",
"0.5170953",
"0.5168847",
"0.51685625",
"0.5159897",
"0.51511234",
"0.5148978",
"0.5146449",
"0.51386225",
"0.513766",
"0.5125903",
"0.5125116",
"0.51249045",
"0.5124714",
"0.51239014",
"0.5102323",
"0.5090757",
"0.50826496",
"0.50802755",
"0.50734395",
"0.5057746",
"0.50569123",
"0.50555694",
"0.5036301",
"0.502981",
"0.5026733",
"0.50224245",
"0.50209564",
"0.50111413",
"0.5004371",
"0.50010294",
"0.5000449",
"0.49933794",
"0.49918947",
"0.49918848",
"0.49837184",
"0.4982588",
"0.4979356",
"0.49780378",
"0.49749523",
"0.49740228",
"0.49629536",
"0.49556276",
"0.49548244",
"0.4954749",
"0.49481964",
"0.49455988",
"0.49448204",
"0.49413395",
"0.493425",
"0.49328548",
"0.49272564",
"0.4926963",
"0.49246743",
"0.49233395",
"0.49231848",
"0.4920913",
"0.49209103",
"0.4916767",
"0.4912254",
"0.49110803",
"0.49109805",
"0.49099728",
"0.4908671",
"0.49031973",
"0.49031973"
] | 0.0 | -1 |
inOrder traversal of Binary Tree recursive approach | public void inOrderTraversal(TreeNode<T> root) {
if (null == root) {
return;
} else {
inOrderTraversal(root.getLeftChild());
System.out.println(root);
inOrderTraversal(root.getRightChild());
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void inOrderTraverseRecursive();",
"public void inorder()\r\n {\r\n inorder(root);\r\n }",
"public void inorder()\n {\n inorderRec(root);\n }",
"private List<Integer> inOrderTraversal(Tree tree, List<Integer> arr){\n if(tree==null){\n return null;\n }\n\n if(tree.left!=null){\n inOrderTraversal(tree.left, arr);\n }\n arr.add(tree.data);\n\n if(tree.right!=null){\n inOrderTraversal(tree.right,arr);\n }\n return arr;\n\n}",
"public void inorder()\n {\n inorder(root);\n }",
"public void inorder()\n {\n inorder(root);\n }",
"private void inorder() {\n inorder(root);\n }",
"private void inorder() {\r\n\t\t\tinorder(root);\r\n\t\t}",
"public void inorderTraverse(){\n\t\tinorderHelper(root);\n\t\tSystem.out.println();\n\t}",
"public void inorder()\r\n\t{\r\n\t\tif(root==null)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"tree is empty\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t// find the leftmost node of the tree\r\n\t\tNode p =root;\r\n\t\twhile(p.leftThread==false)\r\n\t\t\tp=p.left;\r\n\t\twhile(p!=null)//loop until we reach the right most node whose right link(rightThread) is null\r\n\t\t{\r\n\t\t\tSystem.out.print(p.info + \" \");\r\n\t\t\tif(p.rightThread==true) // if 'right' is pointing to the inorder successor\r\n\t\t\t\tp = p.right;\r\n\t\t\telse // find the inorder successor i.e the left most node in the right sub tree\r\n\t\t\t{\r\n\t\t\t\tp = p.right;\r\n\t\t\t\twhile(p.leftThread==false)\r\n\t\t\t\t\tp = p.left;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t}",
"public void inOrder(){\n inOrder(root);\n }",
"public void inorderTraversal() {\n inorderThroughRoot(root);\n System.out.println();\n }",
"public void inOrder() {\r\n \r\n // call the private inOrder method with the root\r\n inOrder(root);\r\n }",
"public void inOrderTraversal(){\n System.out.println(\"inOrderTraversal\");\n\n Stack<Node> stack = new ArrayStack<Node>();\n\n for(Node node = root; node!= null; node=node.getLeft()){\n stack.push(node);\n }\n while(!stack.isEmpty()){\n Node node = stack.pop();\n System.out.print(node.getData() + \" \");\n\n for(node=node.getRight(); node!= null; node = node.getLeft()){\n stack.push(node);\n }\n }\n\n System.out.println();\n }",
"public static void inOrderTraverse(Node root) {\n\t\tStack<Node> stack = new Stack<Node>();\n\t\tNode node = root;\n\t\twhile (node!=null || !stack.empty()) {\n if(node!=null){\n \t stack.push(node);\n \t node = node.lchild;\n }else{\n \t node = stack.pop();\n \t node.visit();\n \t node = node.rchild;\n }\n\t\t}\n\t}",
"static void inorderTraversal(Node root) {\n if (root == null) {\n return;\n }\n inorderTraversal(root.left);\n System.out.print(root.data + \" \");\n inorderTraversal(root.right);\n }",
"private void inorderTraverse(Node node) {\n\t\tif (node == null)\n\t\t\treturn;\n\n\t\tinorderTraverse(node.left); // walk trough left sub-tree\n\t\tthis.child.add(node);\n\t\tinorderTraverse(node.right); // walk trough right sub-tree\n\t}",
"void inOrder(TreeNode node) \n { \n if (node == null) \n return; \n \n inOrder(node.left); \n System.out.print(node.val + \" \"); \n \n inOrder(node.right); \n }",
"public void inOrder(Node myNode){\n \n if (myNode != null){ //If my node is not null, excute the following\n \n inOrder(myNode.left); //Recurse with left nodes\n System.out.println(myNode.name); //Print node name \n inOrder(myNode.right); //Recurse with right nodes\n \n }\n }",
"void inorder(Node root){\n if(root!=null){\n // checking if the tree is not empty\n inorder(root.left);\n System.out.print(root.data+\" \");\n inorder(root.right);\n }\n\n }",
"void getInorderIteratively(Node node) {\n Stack<Node> stack = new Stack<Tree.Node>();\n if (node == null)\n return;\n Node current = node;\n while (!stack.isEmpty() || current != null) {\n // While the sub tree is not empty keep on adding them\n while (current != null) {\n stack.push(current);\n current = current.left;\n }\n // No more left sub tree\n Node temp = stack.pop();\n System.out.println(temp.data);\n // We now have to move to the right sub tree of the just popped out node\n current = temp.right;\n }\n\n }",
"public void inOrder() {\n inOrder(root);\n }",
"void inorderTraversal(Node node) {\n\t\tif (node != null) {\n\t\t\tinorderTraversal(node.left);\n\t\t\tSystem.out.print(node.data + \" \");\n\t\t\tinorderTraversal(node.right);\n\t\t}\n\t}",
"public void traverseInOrder() {\n\t System.out.println(\"============= BTREE NODES ===============\");\n\t\tinOrder(root);\n System.out.println(\"=========================================\");\n\t}",
"public void inorderTraversal(Node root) {\r\n\t\tif(root != null) {\r\n\t\t\tinorderTraversal(root.leftChild);\r\n\t\t\tSystem.out.print(root.data + \" \");\r\n\t\t\tinorderTraversal(root.rightChild);\r\n\t\t}\r\n\t}",
"private void inorder(TreeNode<E> root) {\n if (root == null) {\n return;\n }\n inorder(root.left);\n list.add(root.element);\n inorder(root.right);\n }",
"private void inorder(TreeNode<E> root) {\r\n\t\t\tif (root == null)\r\n\t\t\t\treturn;\r\n\t\t\tinorder(root.left);\r\n\t\t\tlist.add(root.element);\r\n\t\t\tinorder(root.right);\r\n\t\t}",
"public static void main(String[] args) {\n\n\n TreeNode root = new TreeNode(1);\n TreeNode left1 = new TreeNode(2);\n TreeNode left2 = new TreeNode(3);\n TreeNode left3 = new TreeNode(4);\n TreeNode left4 = new TreeNode(5);\n TreeNode right1 = new TreeNode(6);\n TreeNode right2 = new TreeNode(7);\n TreeNode right3 = new TreeNode(8);\n TreeNode right4 = new TreeNode(9);\n TreeNode right5 = new TreeNode(10);\n root.left = left1;\n root.right = right1;\n left1.left = left2;\n left1.right = left3;\n left3.right = left4;\n right1.left = right2;\n right1.right = right3;\n right2.right = right4;\n right3.left = right5;\n //[3, 2, 4, 5, 1, 7, 9, 6, 10, 8]\n List<Integer> list = inorderTraversalN(root);\n System.err.println(list);\n }",
"public List<Integer> inorderTraversal2(TreeNode root) {\n List<Integer> result = new ArrayList<>();\n if (root == null) {\n return result;\n }\n TreeNode curr = root; // not necessary\n Deque<TreeNode> stack = new ArrayDeque<>();\n\n while (true) {\n // inorder: left, root, right\n // add all left nodes into stack\n while (curr != null) {\n stack.push(curr);\n curr = curr.left;\n } // curr == null\n // if stack is empty, then finished\n if (stack.isEmpty()) {\n break;\n }\n // all left nodes in stack\n // if right node empty, pop, else add right\n curr = stack.pop();\n // add left and root\n result.add(curr.val);\n // if right is null, then next round pop stack\n // else next round add right.left first ...\n curr = curr.right;\n }\n // stack is empty\n return result;\n }",
"void inOrderTraversal(OO8BinaryTreeNode node) {\n\t\tif(node==null)\n\t\t\treturn;\n\t\tinOrderTraversal(node.getLeftNode());\n\t\tSystem.out.print(node.getValue() + \" \");\n\t\tinOrderTraversal(node.getRightNode());\n\t}",
"void inOrderTraversal(Node node){\r\n\t\tif( node == null ) {\r\n\t\t\treturn ;\r\n\t\t}\r\n\t\tinOrderTraversal( node.left );\r\n\t\tSystem.out.print( node.value + \" \");\r\n\t\tinOrderTraversal( node.right );\r\n\t}",
"public static void main(String[] args) {\n\t\tTreeNode root = new TreeNode(1);\n\t\troot.right = new TreeNode(2);\n\t\t//root.left.left = new TreeNode(3);\n\t\t//root.left.right = new TreeNode(3);\n\t\troot.right.left = new TreeNode(3);\n\t\t//root.right.right = new TreeNode(3);\n\t\t\n\t\tSystem.out.println(inorderTraversal(root));\n\t}",
"public void inOrderTraversal(Node node)\n\t{\n\t\tif(node!=null){\n\t\t\t\n\t\t\tinOrderTraversal(node.leftChild);\n\t\t\tarr.add(node.data);\n\t\t\tinOrderTraversal(node.rightChild);\n\t\t}\n\t}",
"public void inOrder(){\n inOrder(root);\n System.out.println();\n }",
"public List<Integer> inorderTraversal(TreeNode root) {\n List<Integer> result = new ArrayList<>();\n Stack<TreeNode> stack = new Stack<>();\n TreeNode node = root;\n while (node != null || !stack.empty()) {\n // push left nodes into stack\n while (node != null) {\n stack.push(node);\n node = node.left;\n }\n node = stack.pop();\n result.add(node.val);\n // ! key step: invoke recursive call on node's right child\n node = node.right;\n }\n return result;\n }",
"private static boolean inOrderTraversal(Node current) {\n //Break if the node is null\n if(current == null) {\n return false;\n }\n //Recursively check the left child, then the current node, then finally the right child\n else {\n inOrderTraversal(current.getLeftChild());\n inorder.add(current);\n inOrderTraversal(current.getRightChild());\n }\n return true;\n }",
"static void inorderTraversal(Node tmp)\n {\n if(tmp!=null) {\n inorderTraversal(tmp.left);\n System.out.print(tmp.val+\" \");\n inorderTraversal(tmp.right);\n }\n \n \n \n }",
"static void inOrderWithoutRecursion(Node root) {\n if (root == null) {\n return;\n }\n Stack<Node> stack = new Stack<>();\n Node curr = root;\n while (curr != null || !stack.isEmpty()) {\n while (curr != null) {\n stack.push(curr);\n curr = curr.left;\n }\n curr = stack.pop();\n System.out.print(curr.data + \" \");\n curr = curr.right;\n }\n\n }",
"public static List<Node> inOrderTraversal(BinarySearchTree BST) {\n inorder = new LinkedList<Node>();\n inOrderTraversal(BST.getRoot());\n return inorder;\n }",
"public void inorder(Node source) {\n inorderRec(source);\n }",
"protected void inorder(TreeNode<E> root) {\n if (root == null) {\n return;\n }\n inorder(root.left);\n System.out.print(root.element + \" \");\n inorder(root.right);\n }",
"private void recInOrderTraversal(BSTNode<T> node) {\n\t\tif (node != null) {\n\t\t\trecInOrderTraversal(node.getLeft());\n\t\t\ta.add(node.getData());\n\t\t\trecInOrderTraversal(node.getRight());\n\t\t}\n\t}",
"public void visitInorder(Visitor<T> visitor) { if (root != null) root.visitInorder(visitor); }",
"static void inorder(Node root) {\n if (root != null) {\n inorder(root.left);\n System.out.print(root.key + \" \");\n inorder(root.right);\n }\n }",
"public void inorderTraversal() \n { \n inorderTraversal(header.rightChild); \n }",
"private void inorderHelper(Node<E> root){\n\t\tif(root != null){\n\t\t\tinorderHelper(root.left);\n\t\t\tSystem.out.print(root.item.toString() + \" \");\n\t\t\tinorderHelper(root.right);\n\t\t}\n\t}",
"public static void inorder(Node root){\n\n\t\tif(root != null){\n\t\t\tinorder(root.getLeft());\n\t\t\tSystem.out.println(root.toString());\n\t\t\tinorder(root.getRight());\n\t\t}\n\n\t}",
"public static <T> void inorderIterative(TreeNode<T> root)\n {\n // create an empty stack\n Stack<TreeNode> stack = new Stack();\n\n // start from root node (set current node to root node)\n TreeNode curr = root;\n\n // if current node is null and stack is also empty, we're done\n while (!stack.empty() || curr != null)\n {\n // if current node is not null, push it to the stack (defer it)\n // and move to its left child\n if (curr != null)\n {\n stack.push(curr);\n curr = curr.left;\n }\n else\n {\n // else if current node is null, we pop an element from stack,\n // print it and finally set current node to its right child\n curr = stack.pop();\n System.out.print(curr.value + \" \");\n\n curr = curr.right;\n }\n }\n }",
"public void inOrderRecursive(TreeNode root){\n if(root == null) return;\n inOrderRecursive(root.left);\n System.out.print(root.data + \" \");\n inOrderRecursive(root.right);\n }",
"@Override\r\n\tpublic List<Node<T>> getInOrderTraversal() {\r\n\t\tList<Node<T>> lista = new LinkedList<Node<T>>();// Lista para el\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// recursivo\r\n\t\tlista = auxiliarRecorridoIn(raiz, lista, raiz);\r\n\t\treturn lista;\r\n\t}",
"public List<Integer> inorderTraversalRecursive(TreeNode root) {\n if(root == null){\n return rst;\n }\n inorderTraversalRecursive(root.left);\n rst.add(root.val);\n inorderTraversalRecursive(root.right);\n return rst;\n }",
"private void inOrder(BSTNode node) {\r\n \r\n // if the node is NOT null, execute the if statement\r\n if (node != null) {\r\n \r\n // go to the left node\r\n inOrder(node.getLeft());\r\n \r\n // visit the node (increment the less than or equal counter)\r\n node.incrementLessThan();\r\n \r\n // go to the right node\r\n inOrder(node.getRight());\r\n }\r\n }",
"public List < Integer > inorderTraversal(TreeNode root) {\n List < Integer > res = new ArrayList < > ();\n TreeNode curr = root;\n TreeNode pre;\n while (curr != null) {\n if (curr.left == null) {\n res.add(curr.val);\n curr = curr.right; // move to next right node\n } else { // has a left subtree\n pre = curr.left;\n while (pre.right != null) { // find rightmost\n pre = pre.right;\n }\n pre.right = curr; // put cur after the pre node\n TreeNode temp = curr; // store cur node\n curr = curr.left; // move cur to the top of the new tree\n temp.left = null; // original cur left be null, avoid infinite loops\n }\n }\n return res;\n }",
"private void inorder_traversal(Node n, int depth) {\n if (n != null) {\n inorder_traversal(n.left, depth + 1); //add 1 to depth (y coordinate) \n n.xpos = totalNodes++; //x coord is node number in inorder traversal\n n.ypos = depth; // mark y coord as depth\n inorder_traversal(n.right, depth + 1);\n }\n }",
"protected void inorder(TreeNode<E> root) {\r\n\t\tif (root == null)\r\n\t\t\treturn;\r\n\t\tinorder(root.left);\r\n\t\tSystem.out.print(root.element + \" \");\r\n\t\tinorder(root.right);\r\n\t}",
"public void inOrderTraverseTree(Node focusNode) {\n if(focusNode != null) { // recursively traverse left child nodes first than right\n inOrderTraverseTree(focusNode.leftChild);\n\n System.out.println(focusNode); // print recursively inorder node (or return!)\n\n inOrderTraverseTree(focusNode.rightChild);\n\n }\n }",
"void inorder(Node root) {\n\t\tboolean leftdone = false;\n\n\t\t// Start traversal from root\n\t\twhile (root != null) {\n\t\t\t// If left child is not traversed, find the\n\t\t\t// leftmost child\n\t\t\tif (!leftdone) {\n\t\t\t\twhile (root.left != null) {\n\t\t\t\t\troot = root.left;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Print root's data\n\t\t\tSystem.out.print(root.data + \" \");\n\n\t\t\t// Mark left as done\n\t\t\tleftdone = true;\n\n\t\t\t// If right child exists\n\t\t\tif (root.right != null) {\n\t\t\t\tleftdone = false;\n\t\t\t\troot = root.right;\n\t\t\t}\n\n\t\t\t// If right child doesn't exist, move to parent\n\t\t\telse if (root.parent != null) {\n\t\t\t\t// If this node is right child of its parent,\n\t\t\t\t// visit parent's parent first\n\t\t\t\twhile (root.parent != null && root == root.parent.right)\n\t\t\t\t\troot = root.parent;\n\n\t\t\t\tif (root.parent == null)\n\t\t\t\t\tbreak;\n\t\t\t\troot = root.parent;\n\t\t\t} else\n\t\t\t\tbreak;\n\t\t}\n\t}",
"public void inOrder() {\r\n\t\tSystem.out.print(\"IN: \");\r\n\t\tinOrder(root);\r\n\t\tSystem.out.println();\r\n\t}",
"public void inOrderTraversal() {\n beginAnimation();\n treeInOrderTraversal(root);\n stopAnimation();\n\n }",
"public static void inorder(BSTNode root) {\n\t\tif (root == null) {\n\t\t\treturn;\n\t\t} else {\n\t\t\tinorder(root.left);\n\t\t\tSystem.out.print(root.data + \" \");\n\t\t\tinorder(root.right);\n\t\t}\n\t}",
"public static void main(String[] args) {\n\t\ttn=new TreeNode(null,null,null,1);\n\t\tTreeNode tleft=new TreeNode(tn,null,null,2);\n\t\tTreeNode tright=new TreeNode(tn,null,null,3);\n\t\ttn.left=tleft;\n\t\ttn.right=tright;\n\t\t\n\t\tTreeNode tleft1=new TreeNode(tleft,null,null,4);\n\t\tTreeNode tright1=new TreeNode(tleft,null,null,5);\n\t\ttleft.left=tleft1;\n\t\ttleft.right=tright1;\n\t\t\n\t\tTreeNode tleft2=new TreeNode(tright,null,null,6);\n\t\tTreeNode tright2=new TreeNode(tright,null,null,7);\n\t\ttright.left=tleft2;\n\t\ttright.right=tright2;\n\t\t\n\t\tTreeNode tleft3=new TreeNode(tleft1,null,null,8);\n\t\tTreeNode tright3=new TreeNode(tleft1,null,null,9);\n\t\ttleft1.left=tleft3;\n\t\ttleft1.right=tright3;\n\t\t\n\t\tTreeNode tleft4=new TreeNode(tright1,null,null,10);\n\t\tTreeNode tright4=new TreeNode(tright1,null,null,11);\n\t\ttright1.left=tleft4;\n\t\ttright1.right=tright4;\n\t\t\n\t\tSystem.out.println(inorderTraversal2(tn));\n\t}",
"public void inOrderTraverseIterative();",
"private void inorderHelper(TreeNode<T> node){\n if(node == null)\n return;\n\n inorderHelper(node.leftNode);\n System.out.printf(\"%s \", node.data);\n inorderHelper(node.rightNode);\n }",
"private void levelOrderTraversal() {\n\t\tif(root==null) {\n\t\t\tSystem.out.println(\"\\nBinary node is empty.\");\n\t\t\treturn;\n\t\t}\n\t\tQueue<OO8BinaryTreeNode> queue = new LinkedList<OO8BinaryTreeNode>();\n\t\tqueue.add(root);\n\t\tOO8BinaryTreeNode currentNode = null;\n\t\twhile(!queue.isEmpty()) {\n\t\t\tcurrentNode=queue.remove();\n\t\t\tSystem.out.print(currentNode.getValue() + \" \");\n\t\t\tif(currentNode.getLeftNode()!=null)\n\t\t\t\tqueue.add(currentNode.getLeftNode());\n\t\t\tif(currentNode.getRightNode()!=null)\n\t\t\t\tqueue.add(currentNode.getRightNode());\n\t\t}\n\t\tSystem.out.println();\n\t}",
"void traverseInOrder(Node node){\n if (node != null) {\n traversePreOrder(node.left); // fokus left sampai dihabiskan, lalu right (berbasis sub-tree)\n System.out.println(\" \" + node.data);\n traversePreOrder(node.right);\n }\n }",
"public static void main(String[] args) {\n Node root = new Node(50);\n root.left =new Node(30);\n root.left.left =new Node(10);\n root.left.right =new Node(40);\n root.left.left.right =new Node(20);\n root.right =new Node(80);\n root.right.right =new Node(90); \n root.right.left =new Node(70);\n root.right.left.left=new Node(60);\n traversal(root);\n display(root);\n System.out.println();\n inorder(root);\n System.out.println();\n }",
"private void inOrderTraversal(int index) {\n // go through the graph as long as has values\n if (array[index] == null) {\n return;\n }\n //call recursively the method on left child\n inOrderTraversal(2 * index + 1);\n // print the node\n System.out.print(array[index] + \", \");\n //call recursively the method on right child\n inOrderTraversal(2 * index + 2);\n }",
"public String inOrderTraverse(){\r\n\r\n\t\t//Stack that keeps track of where we go\r\n\t\tStack<BinarySearchTree> traverseStack = new Stack<BinarySearchTree>();\r\n\t\t\r\n\t\t//This is where we want to start\r\n\t\tBinarySearchTree curr = this;\r\n\t\t\r\n\t\t//When true, the string is returned\r\n\t\tBoolean done = false;\r\n\t\t\r\n\t\t//The string to return\r\n\t\tString treeAsString = \"\";\r\n\t\t\r\n\t\t//INORDER: LEFT > ROOT > RIGHT\r\n\r\n\t\twhile(!done){\r\n\t\t\tif(curr != null){\r\n\t\t\t\t\r\n\t\t\t\t//We need to get left first push it onto the stack\r\n\t\t\t\ttraverseStack.push(curr);\r\n\r\n\t\t\t\t//Getting the left first\r\n\t\t\t\tcurr = curr.getLeftChild();\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t\r\n\t\t\t\t//curr is null. We checked left.\r\n\t\t\t\tif(!traverseStack.isEmpty()){\r\n\t\t\t\t\t\r\n\t\t\t\t\t//pop the stack to get the item\r\n\t\t\t\t\tcurr = traverseStack.pop();\r\n\r\n\t\t\t\t\t//append the item\r\n\t\t\t\t\ttreeAsString += curr.toString() + \" \";\r\n\r\n\t\t\t\t\t//Check the right\r\n\t\t\t\t\tcurr = curr.getRightChild();\r\n\t\t\t\t}\r\n\t\t\t\t//curr was null, the stack was empty, we visited all\r\n\t\t\t\t//of the 'nodes'\r\n\t\t\t\telse{\r\n\t\t\t\t\tdone = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn treeAsString;\r\n\t}",
"public static void inorder(TreapNode root)\n {\n if (root != null)\n {\n inorder(root.left);\n System.out.println(\"key: \" + root.key + \" priority: \" + root.priority);\n if (root.left != null){\n System.out.println(\"left child: \" + root.left.key);\n }\n if (root.right != null){\n System.out.println(\"right child: \" + root.right.key);\n }\n inorder(root.right);\n }\n }",
"static void inorder(TreeNode root, List<Integer> output) {\n if (root == null) {\n return;\n }\n inorder(root.left, output);\n output.add(root.val);\n inorder(root.right, output);\n }",
"public ArrayList<K> inOrdorTraverseBST(){\n BSTNode<K> currentNode = this.rootNode;\n LinkedList<BSTNode<K>> nodeStack = new LinkedList<BSTNode<K>>();\n ArrayList<K> result = new ArrayList<K>();\n \n if (currentNode == null)\n return null;\n \n while (currentNode != null || nodeStack.size() > 0) {\n while (currentNode != null) {\n nodeStack.add(currentNode);\n currentNode = currentNode.getLeftChild();\n }\n currentNode = nodeStack.pollLast();\n result.add(currentNode.getId());\n currentNode = currentNode.getRightChild();\n }\n \n return result;\n }",
"private void inOrder(Node root) {\r\n\t\t// inOrderCount++;\r\n\t\t// System.out.println(\" Count: \" + inOrderCount);\r\n\t\tif (root == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// System.out.println(\" Count: \" + inOrderCount);\r\n\t\tinOrder(root.getlChild());\r\n\t\tif (inOrderCount < 20) {\r\n\t\t\tSystem.out.print(\"< \" + root.getData() + \" > \");\r\n\t\t\tinOrderCount++;\r\n\t\t\t//System.out.println(\" Count: \" + inOrderCount);\r\n\t\t}\r\n\t\tinOrder(root.getrChild());\r\n\r\n\t}",
"public Iterator<T> inorderIterator() { return new InorderIterator(root); }",
"public void inorderRec(Node root)\n {\n //If condition to check root is not null .\n if(root!= null) {\n inorderRec(root.left);\n System.out.print(root.key + \" \");\n inorderRec(root.right);\n }\n }",
"private void traverseInOrder(BinaryNode<AnyType> curr) {\n\t\tif (curr.left != null) {\n\t\t\ttraverseInOrder(curr.left);\n\t\t}\n\t\tSystem.out.println(curr.element);\n\n\t\t// checking for duplicates\n\n\t\tfor (int i = 0; i < curr.duplicate.size(); i++) {\n\t\t\tSystem.out.println(curr.duplicate.get(i).element);\n\t\t}\n\n\t\tif (curr.right != null) {\n\t\t\ttraverseInOrder(curr.right);\n\t\t}\n\t}",
"public void inOrder(Node root) {\n if(root!=null) {\n inOrder(root.left);\n System.out.print(root.data + \" \");\n inOrder(root.right);\n }\n }",
"public static void inOrder(TreeNode root) \r\n { \r\n if (root != null) { \r\n inOrder(root.left); \r\n System.out.print(root.val + \" \"); \r\n inOrder(root.right); \r\n } else {\r\n //System.out.print(null + \" \"); \r\n }\r\n }",
"public static void inOrder(TreeNode root) \r\n { \r\n if (root != null) { \r\n inOrder(root.left); \r\n System.out.print(root.val + \" \"); \r\n inOrder(root.right); \r\n } else {\r\n //System.out.print(null + \" \"); \r\n }\r\n }",
"public static void inOrder(Node root) {\n if (root == null)\n return;\n inOrder(root.left);\n System.out.print(root.data + \" \");\n inOrder(root.right);\n\n }",
"public List<Integer> inorderTraversal(TreeNode root) {\n List<Integer> result = new ArrayList<>();\n if (root == null) {\n return result;\n }\n inorderRec(root, result);\n return result;\n }",
"private E[] geInOrderRightSubTree(E[] inOrderTraversal,\n\t\t\tE[] preOrderTraversal) {\n\t\treturn null;\n\t}",
"public void inOrderDepthFirstTraversal(NodeVisitor action){\n\t\tif(this.getElement()==null)\n\t\t\treturn;\n\t\t\n\t\tthis.left.inOrderDepthFirstTraversal(action);\n\t\taction.visit(this.getElement());\n\t\tthis.right.inOrderDepthFirstTraversal(action);\n\t}",
"private void inOrderTraversal(StringBuilder sb) {\n if (left != null) {\n left.inOrderTraversal(sb);\n }\n\n sb.append(data + \" \");\n\n\n if (right != null) {\n right.inOrderTraversal(sb);\n }\n }",
"private void inOrder(Node x) {\n if (x == null) {\n return;\n }\n inOrder(x.left);\n System.out.println(x.key);\n inOrder(x.right);\n }",
"static <T> List<T> implementAPostorderTraversalWithoutRecursion(BinaryTreeNode<T> tree) {\n List<T> result = new ArrayList<>();\n Deque<BinaryTreeNode<T>> stack = new ArrayDeque<>();\n BinaryTreeNode<T> previous = tree;\n\n stack.push(tree);\n\n while (!stack.isEmpty()) {\n BinaryTreeNode<T> node = stack.peek();\n\n if ((node.left == null) && (node.right == null)) { // leaf\n result.add(stack.pop().data);\n } else {\n if ((node.right != null) && (previous == node.right)) { // returning from right child\n result.add(stack.pop().data);\n } else if ((node.right == null) && (previous == node.left)) { // returning from left when right is null\n result.add(stack.pop().data);\n } else {\n if (node.right != null) stack.push(node.right);\n if (node.left != null) stack.push(node.left);\n }\n }\n\n previous = node;\n }\n\n return result;\n }",
"public void inOrderIterative(TreeNode root)\r\n\t{\r\n\t\tif(root == null)\r\n\t\t{\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tStack<TreeNode> stack = new Stack<>();\r\n\t\tTreeNode temp=root;\r\n\t\twhile(!stack.isEmpty() || temp!=null)\r\n\t\t{\r\n\t\t\tif(temp!=null)\r\n\t\t\t{\r\n\t\t\t\tstack.push(temp);\r\n\t\t\t\ttemp=temp.left;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\ttemp=stack.pop();\r\n\t\t\t\tSystem.out.print(temp.data+\" \");\r\n\t\t\t\ttemp=temp.right;\r\n\t\t\t}\r\n\t\t\r\n\t\t}\r\n\t}",
"private E[] getPreOrderLeftSubTree(E[] inOrderTraversal,E[] preOrderTraversal) {\n\t\treturn null;\n\t}",
"public void inOrderTravel(Node node) {\n\t\tif(node != null) {\r\n\t\t\tinOrderTravel(node.leftChild);\r\n\t\t\tSystem.out.println(node);\r\n\t\t\tinOrderTravel(node.rightChild);\r\n\t\t}\r\n\t}",
"public static void main(String[] args) {\n\t\tBinary_Tree_Inorder_Traversal_94 b=new Binary_Tree_Inorder_Traversal_94();\n\t\tTreeNode root=new TreeNode(1);\n\t\troot.right=new TreeNode(2);\n\t\troot.right.left=new TreeNode(3);\n\t\tList<Integer> list=b.inorderTraversal(root);\n\t\tfor(Integer i:list){\n\t\t\tSystem.out.print(i+\" \");\n\t\t}\n\t}",
"private List<T> inOrder(Node<T> curr, List<T> list) { //Time Complexity: O(n)\n if (curr == null) {\n return list;\n }\n inOrder(curr.left, list);\n list.add(curr.data);\n inOrder(curr.right, list);\n return list;\n }",
"private List<Node<T>> nodeInOrder (Node<T> curr, List<Node<T>> list) {\n if (curr == null) {\n return list;\n }\n nodeInOrder(curr.left, list);\n list.add(curr);\n nodeInOrder(curr.right, list);\n return list;\n }",
"public static void inOrder(TreeNode node) {\n\t\tif(node == null) return;\n\t\t\t\n\t\tinOrder(node.left);\n\t\tSystem.out.print(node.value + \" \");\n\t\tinOrder(node.right);\t\n\t}",
"public void preorderTraverse(){\n\t\tpreorderHelper(root);\n\t\tSystem.out.println();\n\t}",
"private E[] getInOrderLeftSubTree(E[] inOrderTraversal,\n\t\t\tE[] preOrderTraversal) {\n\t\treturn null;\n\t}",
"public void inOrder(MyBinNode<Type> r){\n if(r != null){\n this.inOrder(r.left);\n System.out.print(r.value.toString() + \" \");\n this.inOrder(r.right);\n }\n }",
"public static void main(String[] args) {\n\r\n\t\t\r\n\t\troot=new Node10(5);\r\n\t\troot.left=new Node10(6);\r\n\t\troot.left.left=new Node10(3);\r\n\t\troot.right=new Node10(2);\r\n\t\t\r\n\t\tInorder(root);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}",
"public void InOrder() {\n\t\tInOrder(root);\n\t}",
"private void inOrder(Node<T> node){\n if(node != null){\n inOrder(node.left);\n System.out.print(node.data + \" ,\");\n inOrder(node.right);\n }\n }",
"public void inOrder(Node root) {\n if (root != null) {\n inOrder(root.getLeftChild());\n System.out.print(root.getData() + \" \");\n inOrder(root.getRightChild());\n }\n }",
"public static void main(String[] args){\n Node root = null;\n BinarySearchTree bst = new BinarySearchTree();\n root = bst.insert(root, 15);\n root = bst.insert(root, 10);\n root = bst.insert(root, 20);\n root = bst.insert(root, 25);\n root = bst.insert(root, 8);\n root = bst.insert(root, 12);\n // System.out.println(\"search result: \" + bst.is_exists(root, 12));\n // System.out.println(\"min value: \" + bst.findMinValue(root));\n // System.out.println(\"max value: \" + bst.findMaxValue(root));\n // System.out.println(\"level order traversal: \");\n // bst.levelOrderTraversal(root);\n // System.out.println(\"preorder traversal : \");\n // bst.preorderTraversal(root);\n // System.out.println(\"inorder traversal : \");\n // bst.inorderTraversal(root);\n // System.out.println(\"postorder traversal : \");\n // bst.postorderTraversal(root);\n // System.out.println(bst.isBinarySearchTree(root));\n // root = bst.deleteNode(root, 10);\n // bst.inorderTraversal(root); // result should be: 8 12 15 20 25\n System.out.println(bst.inorderSuccessor(root, 8)); // result should be: 10\n System.out.println(bst.inorderSuccessor(root, 15)); // result should be: 20\n System.out.println(bst.inorderSuccessor(root, 20)); // result should be: 25\n System.out.println(bst.inorderSuccessor(root, 25)); // result should be: null\n }"
] | [
"0.83395964",
"0.80642176",
"0.79498",
"0.78512114",
"0.7842935",
"0.7842935",
"0.78095114",
"0.7776397",
"0.7707234",
"0.7665646",
"0.7563022",
"0.7476753",
"0.74196076",
"0.7416264",
"0.73950875",
"0.73267853",
"0.7325268",
"0.7290719",
"0.7273109",
"0.72719723",
"0.7268373",
"0.7264943",
"0.723919",
"0.72359926",
"0.7207363",
"0.7200012",
"0.7197181",
"0.71924126",
"0.71783966",
"0.7156865",
"0.7156545",
"0.71379",
"0.7091779",
"0.70813555",
"0.7069662",
"0.70532405",
"0.7047719",
"0.7042717",
"0.7039235",
"0.701987",
"0.7002276",
"0.7002227",
"0.6995052",
"0.6994291",
"0.6967848",
"0.69653267",
"0.69618464",
"0.6958524",
"0.69559216",
"0.69554704",
"0.69452494",
"0.69298905",
"0.6922117",
"0.69189286",
"0.6902679",
"0.689998",
"0.6895978",
"0.6888447",
"0.688699",
"0.68846434",
"0.68660575",
"0.6857549",
"0.6851897",
"0.6824467",
"0.6798531",
"0.6781918",
"0.6755221",
"0.67540646",
"0.67530185",
"0.67497754",
"0.67359036",
"0.6720792",
"0.67156297",
"0.67149246",
"0.670954",
"0.6705761",
"0.6698477",
"0.6698477",
"0.6692077",
"0.66919893",
"0.6686798",
"0.6607296",
"0.66046613",
"0.6596993",
"0.65795076",
"0.65716",
"0.65693897",
"0.65684915",
"0.6566131",
"0.6554759",
"0.6553778",
"0.6551749",
"0.65497696",
"0.654572",
"0.65438795",
"0.6535706",
"0.6530707",
"0.65011257",
"0.64979327",
"0.64934695"
] | 0.7232446 | 24 |
preOrder traversal of Binary Tree recursive approach | public void preOrderTraversal(TreeNode<T> root) {
if (null == root) {
return;
} else {
System.out.println(root);
preOrderTraversal(root.getLeftChild());
preOrderTraversal(root.getRightChild());
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void preorder()\r\n {\r\n preorder(root);\r\n }",
"public void preorder()\n {\n preorder(root);\n }",
"public void preorder()\n {\n preorder(root);\n }",
"public void preorder() {\n\t\tpreorder(root);\n\t}",
"public void preOrder(BinarySearchTreeNode<T> node)\r\n {\r\n if(node==null)\r\n {\r\n return;\r\n }\r\n System.out.println(node.getElement());\r\n preOrder(node.getLeft());\r\n preOrder(node.getRight());\r\n }",
"public void preorderTraverse(){\n\t\tpreorderHelper(root);\n\t\tSystem.out.println();\n\t}",
"private E[] getPreOrderLeftSubTree(E[] inOrderTraversal,E[] preOrderTraversal) {\n\t\treturn null;\n\t}",
"public void preOrderTraversal(){\n System.out.println(\"preOrderTraversal\");\n\n Stack<Node> stack = new ArrayStack();\n\n if(root!=null){\n stack.push(root);\n }\n while(!stack.isEmpty()) {\n Node node = stack.pop();\n System.out.print(node.getData() + \" \");\n\n if (node.getRight() != null) {\n stack.push(node.getRight());\n }\n if (node.getLeft() != null) {\n stack.push(node.getLeft());\n }\n }\n System.out.println();\n }",
"public void preorder() {\n root.preorder();\n System.out.println(\"\");\n }",
"void preOrder(Node node) \n { \n if (node != null) \n { \n System.out.print(node.key + \" \"); \n preOrder(node.left); \n preOrder(node.right); \n } \n }",
"void preOrderTraversal(OO8BinaryTreeNode node) {\n\t\tif(node==null)\n\t\t\treturn;\n\t\tSystem.out.print(node.getValue() + \" \");\n\t\tpreOrderTraversal(node.getLeftNode());\n\t\tpreOrderTraversal(node.getRightNode());\n\t}",
"static void preOrderWithoutRecursion(Node root) {\n Stack<Node> stack = new Stack<>();\n stack.push(root);\n while (!stack.isEmpty()) {\n Node node = stack.peek();\n System.out.print(node.data + \" \");\n stack.pop();\n\n if (node.right != null) {\n stack.push(node.right);\n }\n if (node.left != null) {\n stack.push(node.left);\n }\n }\n }",
"@Override\r\n\tpublic List<Node<T>> getPreOrderTraversal() {\r\n\t\tList<Node<T>> lista = new LinkedList<Node<T>>();// La lista para el\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// recursivo\r\n\t\treturn auxiliarRecorridoPre(raiz, lista);\r\n\t}",
"void preorder(Node root){\n if(root!=null){\n System.out.print(root.data+\" \");\n preorder(root.left);\n preorder(root.right);\n }\n\n }",
"private static <N> void preOrderTraversal(TreeNode<N> node, TreeNodeVisitor<N> visitor) throws TreeNodeVisitException {\r\n\t\t\r\n\t\tvisitor.visitNode(node);\r\n\t\r\n\t\tif(node.hasChildren()){\r\n\t\t\tfor(TreeNode<N> childNode : node.getChildren()){\r\n\t\t\t\tpreOrderTraversal(childNode, visitor);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}",
"public void preOrder() {\n preOrder(root);\n }",
"public static void preorder(Node root){\n\t\tif(root != null){\n\t\t\tSystem.out.println(root.toString());\n\t\t\tinorder(root.getLeft());\n\t\t\tinorder(root.getRight());\n\t\t}\n\t}",
"public static void preorderTraversal(Node root)\r\n {\r\n if (root == null) {\r\n return;\r\n }\r\n \r\n System.out.print(root.data + \" \");\r\n preorderTraversal(root.left);\r\n preorderTraversal(root.right);\r\n }",
"public void PreOrder() {\n\t\tPreOrder(root);\n\t}",
"private void preOrdertraverse(Node root){\n System.out.println(root.value);\n for(var child : root.getChildren())\n preOrdertraverse(child); //recursively travels other childrens in current child\n }",
"public void preOrder(){\n preOrder(root);\n System.out.println();\n }",
"public void traversePreOrder() {\n\t\tpreOrder(this);\n\t}",
"private void preOrder(Node node) {\n\t\tif(null == node) return;\n\t\t\n\t\t//Print node\n\t\tSystem.out.println(node.data);\n\t\t\n\t\t//Go to left child node\n\t\tpreOrder(node.left);\n\t\t\n\t\t//Go to right child node\n\t\tpreOrder(node.right);\n\t}",
"public void preOrder(TreeNode root){\n\t\t//Change place of temp\n\t\tSystem.out.println(root.toString());\n\t\tif(root.getLeft()!= null){\n\t\t\tpreOrder(root.getLeft());\n\t\t}\n\t\tif(root.getMiddle()!=null){\n\t\t\tpreOrder(root.getMiddle());\n\t\t}\n\t\tif(root.getRight()!= null){\n\t\t\tpreOrder(root.getRight());\n\t\t}\n\t}",
"public void preOrder (Node root)\n\t{\n\t \n\t if(root == null)\n\t {\n\t\t return;\n\t }\n\t \n\t addValToPreorder(root);\n\t \n\t //get all of the left nodes\n\t preOrder(root.leftNode());\n\t //get all of the right nodes\n\t preOrder(root.rightNode()); \n\t \n\t}",
"public void preOrderTraverseTree(Node focusNode) {\n if (focusNode != null) { // recursively traverse left child nodes first than right\n\n System.out.println(focusNode); // print recursively pre-order traversal (or return!)\n\n preOrderTraverseTree(focusNode.leftChild);\n\n preOrderTraverseTree(focusNode.rightChild);\n\n }\n }",
"static void preOrderTraversal(Node root) {\n if (root == null) {\n return;\n }\n System.out.print(root.data + \" \");\n preOrderTraversal(root.left);\n preOrderTraversal(root.right);\n }",
"private E[] getInOrderLeftSubTree(E[] inOrderTraversal,\n\t\t\tE[] preOrderTraversal) {\n\t\treturn null;\n\t}",
"public void preTraverse() {\n // ensure not an empty tree\n while (root != null) {\n \n }\n }",
"public void preOrder() {\r\n\t\tSystem.out.print(\"PRE: \");\r\n\r\n\t\tpreOrder(root);\r\n\t\tSystem.out.println();\r\n\r\n\t}",
"public static void main(String[] args) {\n TreeNode root = new TreeNode(3);\n root.left = new TreeNode(9);\n root.right = new TreeNode(20);\n root.right.left = new TreeNode(15);\n root.right.right = new TreeNode(7);\n System.out.println(new Solution().preorderTraversal(null));\n }",
"public void visitPreorder(Visitor<T> visitor) { if (root != null) root.visitPreorder(visitor); }",
"public void preorderTraversal() \n { \n preorderTraversal(header.rightChild); \n }",
"public void preOrderTraversal() {\n beginAnimation();\n treePreOrderTraversal(root);\n stopAnimation();\n\n }",
"public static List<Node> preOrderTraversal(BinarySearchTree BST) {\n preorder = new LinkedList<Node>();\n preOrderTraversal(BST.getRoot());\n return preorder;\n }",
"private static boolean preOrderTraversal(Node current) {\n //Break if the node is null\n if(current == null) {\n return false;\n }\n //Recursively check the current node, then the left child, then finally the right child\n else {\n preorder.add(current);\n preOrderTraversal(current.getLeftChild());\n preOrderTraversal(current.getRightChild());\n }\n return true;\n }",
"protected void preorder(TreeNode<E> root) {\r\n\t\tif (root == null)\r\n\t\t\treturn;\r\n\t\tSystem.out.print(root.element + \" \");\r\n\t\tpreorder(root.left);\r\n\t\tpreorder(root.right);\r\n\t}",
"private String traversePreOrder(BinaryNode<T> root) {\n preOrderTrav += root.getData() + \" -> \";\n if (root.getLeftNode() != null) { // traverse left\n traversePreOrder(root.getLeftNode());\n }\n if (root.getRightNode() != null) { // traverse right\n traversePreOrder(root.getRightNode());\n }\n return preOrderTrav;\n }",
"public String preorderTraverse(){\r\n\t\t\r\n\t\t//the recursive call to the private method\r\n\t\t//StringBuffer is used because it is passed by reference\r\n\t\t//StringBuffer can be changed in recursive calls\r\n\t\treturn preorderTraverse(this, new StringBuffer(\"\"));\r\n\t}",
"private void preorderHelper(Node<E> root){\n\t\tif(root != null){\n\t\t\tSystem.out.print(root.item.toString() + \" \");\n\t\t\tpreorderHelper(root.left);\n\t\t\tpreorderHelper(root.right);\n\t\t}\n\t}",
"public void preOrderTraversal() {\n preOrderThroughRoot(root);\n System.out.println();\n }",
"protected void preorder(TreeNode<E> root) {\n if (root == null) {\n return;\n }\n System.out.print(root.element + \" \");\n preorder(root.left);\n preorder(root.right);\n }",
"private static void preOrder(Node root) {\n\t\tif (root == null)\n\t\t\treturn;\n\t\tSystem.out.print(root.data + \" \");\n\t\tpreOrder(root.left);\n\t\tpreOrder(root.right);\n\t}",
"public void preOrderDepthFirstTraversal(NodeVisitor action){\n\t\tif(this.getElement()==null)\n\t\t\treturn;\n\n\t\taction.visit(this.getElement());\n\t\tthis.left.preOrderDepthFirstTraversal(action);\n\t\tthis.right.preOrderDepthFirstTraversal(action);\n\t}",
"public static void preOrder(TreeNode node) {\n\t\tif(node == null) return;\n\t\t\n\t\tSystem.out.print(node.value + \" \");\n\t\tpreOrder(node.left);\n\t\tpreOrder(node.right);\t\n\t}",
"protected void preorder(node root){\n if(root == null)\n return;\n\n System.out.print(root.data + \" \");\n preorder(root.left);\n preorder(root.right);\n }",
"private void preOrder(Node root) {\r\n\r\n\t\tif (root == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (preOrderCount < 20) {\r\n\r\n\t\t\tSystem.out.print(\"< \" + root.getData() + \" > \");\r\n\t\t\t//System.out.println(\" Count: \" + preOrderCount);\r\n\t\t\tpreOrderCount++;\r\n\t\t\tpreOrder(root.getlChild());\r\n\t\t\tpreOrder(root.getrChild());\r\n\t\t}\r\n\r\n\t}",
"public static void preOrder(TreeNode node) {\n if (node == null) {\n return;\n }\n System.out.print(node.data + \" \");\n preOrder(node.left);\n preOrder(node.right);\n }",
"public static void preOrder(Node root) {\n if (root == null)\n return;\n System.out.print(root.data + \" \");\n preOrder(root.left);\n preOrder(root.right);\n\n }",
"public void inOrderTraverseRecursive();",
"private void preOrderTraversalRec(final Node root){\n if(root == null){\n return;\n }\n System.out.print(root.getData() + \" \");\n preOrderTraversalRec(root.getLeft());\n preOrderTraversalRec(root.getRight());\n }",
"public void preOrder(Node root) {\n if (root != null) {\n System.out.print(root.getData() + \" \");\n preOrder(root.getLeftChild());\n preOrder(root.getRightChild());\n }\n }",
"public void inorder()\n {\n inorderRec(root);\n }",
"private static BinaryTreeNode<String> reconstructPreorderSubtree(\n List<String> inOrder,boolean left) {\n String subtreeKey=null;\n if(left && leftsubtreeldx>0) {\n subtreeKey = inOrder.get(leftsubtreeldx);\n --leftsubtreeldx;\n }\n if(!left && rightsubtreeldx<inOrder.size()){\n subtreeKey = inOrder.get(rightsubtreeldx);\n rightsubtreeldx++;\n }\n if (subtreeKey == null) {\n return null;\n }\n\n BinaryTreeNode<String> leftSubtree = reconstructPreorderSubtree(inOrder,true);\n BinaryTreeNode<String> rightSubtree = reconstructPreorderSubtree(inOrder,false);\n BinaryTreeNode bn=new BinaryTreeNode(subtreeKey, leftSubtree, rightSubtree);\n return bn;\n }",
"public void traversePreOrder(Node node) {\n\t\tif (node != null) {\n\t\t\tSystem.out.print(\" \" + node.value);\n\t\t\ttraversePreOrder(node.left);\n\t\t\ttraversePreOrder(node.right);\n\t\t}\n\t}",
"public List<Integer> preorderTraversalRecursive(TreeNode root) {\n if(root == null){\n return rst;\n }\n\n rst.add(root.val);\n preorderTraversalRecursive(root.left);\n preorderTraversalRecursive(root.right);\n return rst;\n }",
"private void preOrderTraversal(int index) {\n if (array[index] == null) {\n return;\n }\n // print the node\n System.out.print(array[index] + \", \");\n //call recursively the method on left child\n preOrderTraversal(2 * index + 1);\n //call recursively the method on right child\n preOrderTraversal(2 * index + 2);\n }",
"private void preorderHelper(TreeNode<T> node){\n if(node == null)\n return;\n\n System.out.printf(\"%s \" , node.data);\n preorderHelper(node.leftNode);\n preorderHelper(node.rightNode);\n }",
"private String preorderTraverse(BinarySearchTree curr, StringBuffer treeAsString){\r\n\t\t\r\n\t\t//Get node\r\n\t\ttreeAsString.append(curr.getRoot().toString() + \" \");\r\n\t\t\r\n\t\t//Get leftChild\r\n\t\tif(curr.getLeftChild() != null){\r\n\t\t\tpreorderTraverse(curr.getLeftChild(), treeAsString);\r\n\t\t}\r\n\t\t\r\n\t\t//get rightChild\r\n\t\tif(curr.getRightChild() != null){\r\n\t\t\tpreorderTraverse(curr.getRightChild(), treeAsString);\r\n\t\t}\r\n\t\t\r\n\t\t//return\r\n\t\treturn treeAsString.toString();\r\n\t}",
"public void preOrder(Node root) {\n if(root!=null) {\n System.out.print(root.data + \" \");\n preOrder(root.left);\n preOrder(root.right);\n }\n }",
"public static void preOrder(Node n) {\n\t\tif (n == null)\n\t\t\treturn;\n\t\tSystem.out.println(n.getData());\n\t\tpreOrder(n.getLeft());\n\t\tpreOrder(n.getRight());\n\t}",
"public void visitPreorder(Visitor<T> visitor) {\n visitor.visit(value);\n if (left != null) left.visitPreorder(visitor);\n if (right != null) right.visitPreorder(visitor);\n }",
"public static void preorderBinaryTree(BinaryTreeNode t) {\n p = t;\r\n top = -1;\r\n i = 0;\r\n\r\n while (p != null || top != -1) {\r\n if (p != null) {\r\n visitBinTreeNode(p);\r\n\r\n s[++top] = p; //push(p,s)\r\n if (p.getLeftTree() != null) {\r\n p = p.getLeftTree();\r\n } else {\r\n System.out.print(\")\");\r\n i++;\r\n p = p.getRightTree();\r\n }\r\n } else {\r\n do {\r\n q = s[top];\r\n top--;\r\n if (top != -1) {//is s is not empty\r\n BinaryTreeNode newTop = s[top];\r\n rtptr = newTop.getRightTree();\r\n } else {\r\n rtptr = null;\r\n }\r\n } while (top != -1 && q == rtptr);\r\n\r\n p = rtptr;\r\n\r\n if (i < n) {\r\n i++;\r\n System.out.print(\")\");\r\n }\r\n }\r\n }\r\n }",
"private void preorderLeftOnly(Node root) {\r\n if (this != null && !ifLeaf(root))\r\n System.out.print(root.value + \">\");\r\n if (root.left != null)\r\n preorderLeftOnly(root.left);\r\n }",
"private void preOrder(HomogeneusNode root) {\n\n if (root != null) {\n System.out.printf(\"%d\", root.getData());\n preOrder(root.getLeft());\n preOrder(root.getRight());\n }\n }",
"public static void preOrder(Node node) {\n if (node == null) {\n return;\n }\n System.out.print(node.data + \" \");\n preOrder(node.left);\n preOrder(node.right);\n }",
"private void preOrderTraversal(StringBuilder sb) {\n sb.append(data + \" \");\n\n if (left != null) {\n left.preOrderTraversal(sb);\n }\n\n if (right != null) {\n right.preOrderTraversal(sb);\n }\n }",
"private void traversePreOrder(BinaryNode<AnyType> curr, int indent) {\n\t\tfor(int i = 0; i < indent; i++) {\n\t\t\tSystem.out.print(\"\\t\");\n\t\t}\n\t\tSystem.out.println(curr.element);\n\t\tfor (int i = 0; i < curr.duplicate.size(); i++) {\n\t\t\tSystem.out.println(curr.duplicate.get(i).element);\n\t\t}\n\t\tif (curr.left != null) {\n\t\t\ttraversePreOrder(curr.left, indent + 1);\n\t\t}\n\n\t\tif (curr.right != null) {\n\t\t\ttraversePreOrder(curr.right, indent + 1);\n\t\t}\n\t}",
"public void inorder()\r\n {\r\n inorder(root);\r\n }",
"private void treePreOrderTraversal(final Node currNode) {\n int numChildren = getNumChildren();\n\n // Returns if currNode is null.\n if (currNode == null) return;\n\n // Adds this Node to the stack.\n queueStackAddAnimation(currNode, \"Exploring \" + currNode.key,\n AnimationParameters.ANIM_TIME);\n\n // Highlights the current Node.\n queueNodeSelectAnimation(currNode, \"Current Node \" + currNode.key,\n AnimationParameters.ANIM_TIME);\n\n // Explores left subtree.\n for (int i = 0; i < numChildren / 2; ++i)\n treePreOrderTraversal(currNode.children[i]);\n\n // Explores right subtree.\n for (int i = numChildren / 2; i < numChildren; ++i)\n treePreOrderTraversal(currNode.children[i]);\n\n // Removes this Node from the stack.\n queueListPopAnimation(\"Finished exploring \" + currNode.key,\n AnimationParameters.ANIM_TIME);\n\n }",
"public void preorderTraverseTree(Node focusNode) {\n\n\t\tif (focusNode != null) {\n\n\t\t\tSystem.out.print(focusNode.data + \" \");\n\n\t\t\tpreorderTraverseTree(focusNode.left);\n\t\t\tpreorderTraverseTree(focusNode.right);\n\n\t\t}\n\n\t}",
"public List<Integer> preorderTraversal(TreeNode root) {\n ArrayList<Integer> returnList = new ArrayList<Integer>();\n LinkedList<TreeNode> stack = new LinkedList<TreeNode>();\n \n while(root !=null || !stack.isEmpty()){\n if(root != null){\n stack.push(root);\n returnList.add(root.val);\n root = root.left;\n }else{\n root = stack.pop();\n root = root.right;\n }\n }\n return returnList;\n }",
"public void preorder(Node node){\n\t\tif(node == nil){\n\t\t\treturn;\n\t\t}\n\t\tSystem.out.println(\" ID: \" + node.id + \" Colour: \" + node.colour + \" Count: \" + node.count);\n\t\tpreorder(node.left);\n\t\tpreorder(node.right);\n\t}",
"private List<Integer> inOrderTraversal(Tree tree, List<Integer> arr){\n if(tree==null){\n return null;\n }\n\n if(tree.left!=null){\n inOrderTraversal(tree.left, arr);\n }\n arr.add(tree.data);\n\n if(tree.right!=null){\n inOrderTraversal(tree.right,arr);\n }\n return arr;\n\n}",
"void printPreorder(Node node) {\n if (node == null)\n return;\n\n /* first print data of node */\n System.out.print(node.key + \" \");\n\n /* then recur on left sutree */\n printPreorder(node.left);\n\n /* now recur on right subtree */\n printPreorder(node.right);\n }",
"static void preOrderTraversalStackOptimised(Node root) {\n Stack<Node> stack = new Stack<>();\n Node curr = root;\n while (curr != null || !stack.isEmpty()) {\n\n while (curr != null) {\n System.out.print(curr.data + \" \");\n if (curr.right != null) {\n stack.push(curr.right);\n }\n curr = curr.left;\n }\n\n if (!stack.isEmpty()) {\n curr = stack.pop();\n }\n }\n }",
"void traverseInOrder(Node node){\n if (node != null) {\n traversePreOrder(node.left); // fokus left sampai dihabiskan, lalu right (berbasis sub-tree)\n System.out.println(\" \" + node.data);\n traversePreOrder(node.right);\n }\n }",
"public TreeNode inorderSuccessor(TreeNode root, TreeNode p) {\n if (root == null) return null;\n if (root.val > p.val) {\n TreeNode left = inorderSuccessor(root.left, p);\n return left == null ? root : left;\n } else return inorderSuccessor(root.right, p);\n}",
"public static void preOrderInterative(TreeNode root) {\n\t\tif(root == null) return;\n\t\tDeque<TreeNode> stack = new LinkedList<TreeNode>();\n\t\tTreeNode curr = root;\n\t\twhile(curr != null || !stack.isEmpty()) {\n\t\t\t\n\t\t\tif(curr != null) {\n\t\t\t\tSystem.out.print(curr.value + \" \");\n\t\t\t\tif(curr.right != null) stack.push(curr.right);\n\t\t\t\tcurr = curr.left;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcurr = stack.pop();\n\t\t\t}\t\t\t\n\t\t}\t\t\t\n\t}",
"private E[] getPreOrderRightSubTree(E[] inOrderTraversal,\n\t\t\tE[] preOrderTraversal) {\n\t\treturn null;\n\t}",
"public void preOrder(MyBinNode<Type> r){\n if(r != null){\n System.out.print(r.value.toString() + \" \");\n this.preOrder(r.left);\n this.preOrder(r.right);\n }\n }",
"public void preorder(TreeNode root) {\n\n\t\tTreeNode current = root;\n\n\t\twhile (current != null) {\n\n\t\t\t// no elements on the left that are less than the current; add it to result.\n\t\t\tif (current.left == null) {\n\t\t\t\tcurrent = current.right;\n\t\t\t}\n\n\t\t\t// start processing the left subtree.\n\t\t\telse {\n\n\t\t\t\tTreeNode predecessor = current.left;\n\n\t\t\t\t// find rightmost value of current's left subtree.\n\t\t\t\twhile (predecessor.right != null && predecessor.right != current.right) {\n\t\t\t\t\tpredecessor = predecessor.right;\n\t\t\t\t}\n\n\t\t\t\t// if no thread between current and its predecessor, add it and add current\n\t\t\t\t// val to the result.\n\t\t\t\tif (predecessor.right == null) {\n\t\t\t\t\tpredecessor.right = current.right;\n\t\t\t\t\tcurrent.right = current.left;\n\t\t\t\t\tcurrent.left = null;\n\t\t\t\t\tcurrent = current.right;\n\t\t\t\t}\n\t\t\t\t// current's left subtree has been processed; remove the thread.\n\t\t\t\telse {\n\t\t\t\t\tcurrent = current.right;\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t}",
"public void printTreePreOrder(Node node)\n {\n if (node == null)\n {\n return;\n }\n\n System.out.print(node.item + \" \");\n printTreePreOrder(node.left);\n printTreePreOrder(node.right);\n\n }",
"void preOrder(Node Node) {\n if (Node != null) {\n System.out.print(Node.key + \" \");\n preOrder(Node.left);\n preOrder(Node.right);\n }\n }",
"public static void main(String[] args) {\n\n\t\tTreeNode node1 = new TreeNode(1);\n TreeNode node2 = new TreeNode(2);\n TreeNode node3 = new TreeNode(3);\n TreeNode node4 = new TreeNode(4);\n TreeNode node5 = new TreeNode(5);\n TreeNode node6 = new TreeNode(6);\n TreeNode node7 = new TreeNode(7);\n node1.left = node2;\n node1.right = node3;\n node2.left = node4;\n node2.right = node5;\n node3.left = node6;\n node4.left = node7;\n \n System.out.println(preorderTraversalIterative(node1));\n System.out.println(preorderTraversalRecursive(node1));\n \n\t\t\n\t\t\n\t\t\n\t}",
"public void printPreorder() {\n if (myRoot == null) {\n System.out.println(\"(empty tree)\");\n } else {\n myRoot.printPreorder();\n System.out.println();\n }\n }",
"public void printPreorder() {\n if (myRoot == null) {\n System.out.println(\"(empty tree)\");\n } else {\n myRoot.printPreorder();\n System.out.println();\n }\n }",
"private void inorder() {\n inorder(root);\n }",
"public void inorder()\r\n\t{\r\n\t\tif(root==null)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"tree is empty\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t// find the leftmost node of the tree\r\n\t\tNode p =root;\r\n\t\twhile(p.leftThread==false)\r\n\t\t\tp=p.left;\r\n\t\twhile(p!=null)//loop until we reach the right most node whose right link(rightThread) is null\r\n\t\t{\r\n\t\t\tSystem.out.print(p.info + \" \");\r\n\t\t\tif(p.rightThread==true) // if 'right' is pointing to the inorder successor\r\n\t\t\t\tp = p.right;\r\n\t\t\telse // find the inorder successor i.e the left most node in the right sub tree\r\n\t\t\t{\r\n\t\t\t\tp = p.right;\r\n\t\t\t\twhile(p.leftThread==false)\r\n\t\t\t\t\tp = p.left;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t}",
"public static List<TreeNode> preOrderIterative(TreeNode rootNode) {\n\t\tList<TreeNode> output = new ArrayList<>();\n\t\tStack<TreeNode> stack = new Stack<TreeNode>();\n\t\tif (rootNode == null) {\n\t\t\treturn output;\n\t\t}\n\t\tstack.push(rootNode);\n\t\twhile (!stack.empty()) {\n\t\t\tTreeNode node = stack.pop();\n\t\t\toutput.add(node);\n\t\t\tif (node.right != null)\n\t\t\t\tstack.push(node.right);\n\t\t\tif (node.right != null)\n\t\t\t\tstack.push(node.left);\n\t\t}\n\t\treturn output;\n\t}",
"public void treeOrder ()\n {\n treeOrder (root, 0);\n }",
"private void preOrder(BSTNode<K,V> node, List<Entry<K,V>> list) throws NullPointerException {\n\t\tif (root == null) {\n\t\t\tthrow new NullPointerException();\n\t\t}\n\t\tif (root != null) {\n\t\t\tlist.add(new Entry<K,V>(node.key, node.value));\n\t\t\t\n\t\t\tif (node.left != null) {\n\t\t\t\tpreOrder(node.left, list);\n\t\t\t}\n\t\t\t\n\t\t\tif (node.right != null) {\n\t\t\t\tpreOrder(node.right, list);\n\t\t\t}\n\t\t}\n\t}",
"public List<Integer> traversePreOrderIterative(TreeNode root) {\n if (root == null) {\n return Collections.emptyList();\n }\n\n List<Integer> result = new ArrayList<>();\n\n Deque<TreeNode> stack = new ArrayDeque<>();\n stack.add(root);\n\n while (!stack.isEmpty()) {\n TreeNode node = stack.pop();\n result.add(node.val);\n\n if (node.right != null) {\n stack.push(node.right);\n }\n\n if (node.left != null) {\n stack.push(node.left);\n }\n }\n\n return result;\n }",
"private void preorderTraverseForToString(Node node) {\n\t\tif (node == null)\n\t\t\treturn;\n\n\t\tthis.order += node + \"\\n\";\n\n\t\t// walk trough left sub-tree\n\t\tpreorderTraverseForToString(node.left);\n\t\t// walk trough right sub-tree\n\t\tpreorderTraverseForToString(node.right);\n\t}",
"private void preOrderTraverse(Node<String> node, int depth,StringBuilder sb) {\n\t\t\t\tif(node!=null){\n\t\t\t\t\t\tsb.append(\" \"+node.toString());\n\t\t\t\t\tpreOrderTraverse(node.left, depth + 1, sb);\n\t\t\t\t\n\t\t\t\t\tpreOrderTraverse(node.right, depth + 1, sb);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t}",
"public void preOrder(Node localRoot)\r\n\t{\r\n\t\tif(localRoot != null)\r\n\t\t{\r\n\t\t\tSystem.out.print(localRoot.data+\" \");\r\n\t\t\tpreOrder(localRoot.leftChild);\r\n\t\t\tpreOrder(localRoot.rightChild);\r\n\t\t}\r\n\t}",
"public Iterator<T> preorderIterator() { return new PreorderIterator(root); }",
"private void inorder() {\r\n\t\t\tinorder(root);\r\n\t\t}",
"public ArrayList<Integer> preorderTraversal(TreeNode root) {\n ArrayList<Integer> list = new ArrayList<>();\n Stack<TreeNode> stack = new Stack<>();\n\n if (root == null)\n return list;\n\n stack.push(root);\n list.add(root.val);\n while (!stack.empty()) {\n TreeNode current = stack.peek();\n if (current.left == null && current.right == null) {\n stack.pop();\n }\n\n if (current.left != null) {\n stack.push(current.left);\n list.add(current.left.val);\n current.left = null;\n } else if (current.right != null) {\n stack.push(current.right);\n list.add(current.right.val);\n current.right = null;\n }\n }\n\n return list;\n }",
"public static void inOrderTraverse(Node root) {\n\t\tStack<Node> stack = new Stack<Node>();\n\t\tNode node = root;\n\t\twhile (node!=null || !stack.empty()) {\n if(node!=null){\n \t stack.push(node);\n \t node = node.lchild;\n }else{\n \t node = stack.pop();\n \t node.visit();\n \t node = node.rchild;\n }\n\t\t}\n\t}"
] | [
"0.82567376",
"0.7985059",
"0.7985059",
"0.7821266",
"0.7781381",
"0.7653656",
"0.762063",
"0.759836",
"0.7538095",
"0.7533842",
"0.7517155",
"0.74899685",
"0.7488407",
"0.7483122",
"0.74802226",
"0.7464093",
"0.74565977",
"0.7431751",
"0.7407838",
"0.74058765",
"0.7376828",
"0.7374464",
"0.73694235",
"0.73692274",
"0.73428935",
"0.73386526",
"0.7306423",
"0.729403",
"0.7289867",
"0.7288896",
"0.7271404",
"0.72645885",
"0.7255206",
"0.72383606",
"0.7233095",
"0.7224593",
"0.71991026",
"0.71983355",
"0.7196372",
"0.71921724",
"0.7191609",
"0.7166194",
"0.7150484",
"0.71074843",
"0.71056306",
"0.70981634",
"0.70928556",
"0.70829546",
"0.7051398",
"0.7049771",
"0.7044695",
"0.704201",
"0.70403737",
"0.7031724",
"0.7012584",
"0.7002606",
"0.69969475",
"0.6992848",
"0.69836086",
"0.69803935",
"0.6968442",
"0.6966218",
"0.6961912",
"0.6938947",
"0.6935366",
"0.6934283",
"0.6928029",
"0.6921149",
"0.69117564",
"0.6905451",
"0.6897766",
"0.6868646",
"0.6861749",
"0.68290174",
"0.6827632",
"0.68195826",
"0.68187743",
"0.68170685",
"0.6814281",
"0.6811098",
"0.67974454",
"0.6788628",
"0.6783328",
"0.67785305",
"0.67707956",
"0.67615527",
"0.67615527",
"0.67533696",
"0.67447436",
"0.6743905",
"0.67215395",
"0.6719586",
"0.6718006",
"0.6714882",
"0.67132014",
"0.67051417",
"0.6658361",
"0.66583455",
"0.66539824",
"0.6653971"
] | 0.74716324 | 15 |
postOrder traversal of Binary Tree recursive approach | public void postOrderTraversal(TreeNode<T> root) {
if (null == root) {
return;
} else {
postOrderTraversal(root.getLeftChild());
postOrderTraversal(root.getRightChild());
System.out.println(root);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void postorder()\r\n {\r\n postorder(root);\r\n }",
"void postOrderTraversal(OO8BinaryTreeNode node) {\n\t\tif(node==null)\n\t\t\treturn;\n\t\tpostOrderTraversal(node.getLeftNode());\n\t\tpostOrderTraversal(node.getRightNode());\n\t\tSystem.out.print(node.getValue() + \" \");\n\t}",
"public void postorderTraverse(){\n\t\tpostorderHelper(root);\n\t\tSystem.out.println();\n\t}",
"public void postorder()\n {\n postorder(root);\n }",
"public void postorder()\n {\n postorder(root);\n }",
"public void postOrder(BinarySearchTreeNode<T> node)\r\n {\r\n if(node==null)\r\n {\r\n return;\r\n }\r\n postOrder(node.getLeft());\r\n postOrder(node.getRight());\r\n System.out.println(node.getElement());\r\n\r\n }",
"public static void postOrderTraverse2(TreeNode head){\n if(head == null) return;\n Stack<TreeNode> stack = new Stack<>();\n stack.push(head);\n TreeNode node;\n while (!stack.isEmpty()){\n while (( node = stack.peek()) != null){\n if(node.lChild != null && node.lChild.visited == true){\n stack.push(null);\n break;\n }\n stack.push(node.lChild);\n }\n stack.pop(); //空指针出栈\n if(!stack.isEmpty()){\n node = stack.peek();\n if(node.rChild == null || node.rChild.visited == true){\n System.out.print(node.val + \" \");\n node.visited = true;\n stack.pop();\n }else {\n stack.push(node.rChild);\n }\n }\n }\n }",
"private static <N> void postOrderTraversal(TreeNode<N> node, TreeNodeVisitor<N> visitor) throws TreeNodeVisitException {\r\n\t\tif(node.hasChildren()){\r\n\t\t\tfor(TreeNode<N> childNode : node.getChildren()){\r\n\t\t\t\tpostOrderTraversal(childNode, visitor);\r\n\t\t\t}\r\n\t\t\tvisitor.visitNode(node);\r\n\t\t}else{\r\n\t\t\tvisitor.visitNode(node);\r\n\t\t}\r\n\t}",
"public void postOrder2(BinaryTreeNode root) {\n\t\tBinaryTreeNode cur = root;\n\t\tBinaryTreeNode pre = root;\n\t\tStack<BinaryTreeNode> s = new Stack<BinaryTreeNode>();\n\n\t\tif (root != null)\n\t\t\ts.push(root);\n\n\t\twhile (!s.isEmpty()) {\n\t\t\tcur = s.peek();\n\t\t\t// traversing down the tree\n\t\t\tif (cur == pre || cur == pre.getLeft() || cur == pre.getRight()) {\n\t\t\t\tif (cur.getLeft() != null) {\n\t\t\t\t\ts.push(cur.getLeft());\n\t\t\t\t} else if (cur.getRight() != null) {\n\t\t\t\t\ts.push(cur.getRight());\n\t\t\t\t}\n\t\t\t\tif (cur.getLeft() == null && cur.getRight() == null) {\n\t\t\t\t\tSystem.out.print(s.pop().getData() + \" \");\n\t\t\t\t}\n\t\t\t}\n\t\t\t// traversing up the tree from the left\n\t\t\telse if (pre == cur.getLeft()) {\n\t\t\t\tif (cur.getRight() != null) {\n\t\t\t\t\ts.push(cur.getRight());\n\t\t\t\t} else if (cur.getRight() == null) {\n\t\t\t\t\tSystem.out.print(s.pop().getData() + \" \");\n\t\t\t\t}\n\t\t\t}\n\t\t\t// we are traversing up the tree from the right\n\t\t\telse if (pre == cur.getRight()) {\n\t\t\t\tSystem.out.print(s.pop().getData() + \" \");\n\t\t\t}\n\t\t\tpre = cur;\n\t\t}\n\t}",
"@Override\r\n\tpublic List<Node<T>> getPostOrderTraversal() {\r\n\t\tList<Node<T>> lista = new LinkedList<Node<T>>();// Lista para el\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// recursivo\r\n\t\treturn auxiliarRecorridoPost(raiz, lista);\r\n\t}",
"public void postOrder(Node node) {\n\n if (node == null) {\n System.out.println(\"Tree is empty\");\n return;\n }\n\n Stack<Node> stack1 = new Stack<>();\n Stack<Node> stack2 = new Stack<>();\n\n stack1.push(node);\n\n while (!stack1.empty()) {\n\n node = stack1.pop();\n\n stack2.push(node);\n\n if (node.left != null) {\n stack1.push(node.left);\n }\n\n if (node.right != null) {\n stack1.push(node.right);\n }\n }\n\n while (!stack2.empty()) {\n node = stack2.pop();\n System.out.print(node.value + \" \");\n }\n }",
"public static void main(String[] args) {\n TreeNode one = new TreeNode(1);\n TreeNode three = new TreeNode(3);\n three.right = one;\n TreeNode two = new TreeNode(2);\n two.right = three;\n new BinaryTreePostorderTraversal_145().postorderTraversal(two);\n }",
"void postorder(Node root){\n if(root!=null){\n postorder(root.left);\n postorder(root.right);\n System.out.print(root.data+\" \");\n }\n\n }",
"static void postOrderIterative(BinaryTreeNode root)\n {\n // Create two stacks\n Stack<BinaryTreeNode> s1 = new Stack<BinaryTreeNode>();\n Stack<BinaryTreeNode> s2 = new Stack<BinaryTreeNode>();\n\n // push root to first stack\n s1.push(root);\n BinaryTreeNode node;\n\n // Run while first stack is not empty\n while(!s1.isEmpty()){\n // Pop an item from s1 and push it to s2\n node = s1.pop();\n s2.push(node);\n\n // Push left and right children of removed item to s1\n if(node.getLeft()!=null){\n s1.push(node.getLeft());\n }\n if(node.getRight() != null){\n s1.push(node.getRight());\n }\n }\n\n\n // Print all elements of second stack\n while (!s2.isEmpty()) {\n node = s2.pop();\n System.out.print(node.getData() + \"->\");\n }\n }",
"public void postOrderTraversal(Node<T> aRoot, List<T> postOrder)\n\t{\n\t\tif (aRoot != null)\n\t\t{\n\t\t\tpostOrderTraversal(aRoot.left, postOrder);\n\t\t\tpostOrderTraversal(aRoot.right, postOrder);\n\t\t\tpostOrder.add(aRoot.X);\n\t\t}\n\t}",
"public List<Integer> postorderTraversal1(TreeNode root) {\n List<Integer> traversal = new ArrayList<>();\n Deque<TreeNode> stack = new ArrayDeque<>();\n\n TreeNode current = root;\n\n while (current != null || !stack.isEmpty()) {\n\n // visit until the leaf\n while (current != null) {\n stack.push(current);\n\n // visit left right, then right, as in post-order\n if (current.left != null) {\n current = current.left;\n } else {\n current = current.right;\n // check in the end is to sure right is always visited\n }\n }\n\n // node as parent, its left and right child are both null\n TreeNode node = stack.pop();\n traversal.add(node.val); // node is added after both its children are visited\n\n // visit node's right sibling if it exists\n // stack.peek()\n // / \\\n // node to be visited\n if (!stack.isEmpty() && stack.peek().left == node) {\n current = stack.peek().right;\n }\n }\n\n return traversal;\n }",
"static void postOrderTraversal(Node root) {\n if (root == null) {\n return;\n }\n postOrderTraversal(root.left);\n postOrderTraversal(root.right);\n System.out.print(root.data + \" \");\n }",
"public void visitPostorder(Visitor<T> visitor) {\n if (left != null) left.visitPostorder(visitor);\n if (right != null) right.visitPostorder(visitor);\n visitor.visit(root.value);\n }",
"private static boolean postOrderTraversal(Node current) {\n //Break if the node is null\n if(current == null) {\n return false;\n }\n //Recursively check the left child, then the right child, then finally the current node\n else{\n postOrderTraversal(current.getLeftChild());\n postOrderTraversal(current.getRightChild());\n postorder.add(current);\n }\n return true;\n }",
"private void postOrderTraversal(int index) {\n if (array[index] == null) {\n return;\n }\n //call recursively the method on left child\n postOrderTraversal(2 * index + 1);\n //call recursively the method on right child\n postOrderTraversal(2 * index + 2);\n // print the node\n System.out.print(array[index] + \", \");\n }",
"public void postorder() {\n\t\tpostorder(root);\n\t}",
"public static void postorder(Node root){\n\t\tif(root != null){\n\t\t\tinorder(root.getLeft());\n\t\t\tinorder(root.getRight());\n\t\t\tSystem.out.println(root.toString());\n\n\t\t}\n\t}",
"public void postOrderTraversal() {\n postOrderThroughRoot(root);\n System.out.println();\n }",
"public static List<Node> postOrderTraversal(BinarySearchTree BST) {\n postorder = new LinkedList<Node>();\n postOrderTraversal(BST.getRoot());\n return postorder;\n }",
"public void postorderTraversal() \n { \n postorderTraversal(header.rightChild); \n }",
"public void postOrder(){\n postOrder(root);\n System.out.println();\n }",
"public void postOrderTravel(Node node) {\n\t\tif(node != null) {\r\n\t\t\tpostOrderTravel(node.leftChild);\r\n\t\t\tpostOrderTravel(node.rightChild);\r\n\t\t\tSystem.out.println(node);\r\n\t\t}\r\n\t}",
"private void postOrdertraverse(Node root){\n for(var child : root.getChildren())\n postOrdertraverse(child); //recursively travels other childrens in current child\n\n //finally visit root\n System.out.println(root.value);\n\n }",
"private void postOrderTraversalRec(final Node root){\n if(root == null){\n return;\n }\n postOrderTraversalRec(root.getLeft());\n postOrderTraversalRec(root.getRight());\n System.out.print(root.getData() + \" \");\n }",
"public void postOrderTraverseTree(Node focusNode) {\n if (focusNode != null) { // recursively traverse left child nodes first than right\n\n postOrderTraverseTree(focusNode.leftChild);\n postOrderTraverseTree(focusNode.rightChild);\n\n System.out.println(focusNode); // print recursively pre-order traversal (or return!)\n\n }\n }",
"public void postOrderTraversal(){\n System.out.println(\"postOrderTraversal\");\n //TODO: incomplete\n\n }",
"private void traversePostOrder(BSTNode<T> node, LinkedList<T> list) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tif(node!= null) {\r\n\t\t\t//left\r\n\t\t\tthis.traversePostOrder(node.left, list);\r\n\t\t\t//right\r\n\t\t\tthis.traversePostOrder(node.right, list);\r\n\t\t\t//visit node\r\n\t\t\tlist.add(node.data);\r\n\t\t}\r\n\t}",
"private void postOrderTraversal(StringBuilder sb) {\n if (left != null) {\n left.postOrderTraversal(sb);\n }\n\n if (right != null) {\n right.postOrderTraversal(sb);\n }\n\n sb.append(data + \" \");\n }",
"public void visitPostorder(Visitor<T> visitor) { if (root != null) root.visitPostorder(visitor); }",
"public void postOrderDepthFirstTraversal(NodeVisitor action){\n\t\tif(this.getElement()==null)\n\t\t\treturn;\n\t\t\n\t\tthis.left.postOrderDepthFirstTraversal(action);\n\t\tthis.right.postOrderDepthFirstTraversal(action);\n\t\taction.visit(this.getElement());\t\t\t\n\t}",
"public static void main(String[] args) {\n\t\tNode root = new Node(30);\n\t\troot.right = new Node(40);\n\t\troot.left = new Node(20);\n\t\troot.left.right=new Node(25);\n\t\troot.left.left = new Node(10);\n\t\troot.right.left = new Node(35);\n\t\troot.right.right = new Node(45);\n\t\t\n\t\tpostOrderTraversal(root);\n\t\t\n\t\tSystem.out.println();\n\t\t\n\t\tpostOrderRecursion(root);\n\t}",
"public void traversePostOrder(Node node) {\n\t\tif (node != null) {\n\t\t\ttraversePostOrder(node.left);\n\t\t\ttraversePostOrder(node.right);\n\t\t\tSystem.out.print(\" \" + node.value);\n\t\t}\n\t}",
"public String postorderTraverse(){\r\n\t\t\r\n\t\t//the recursive call to the private method\r\n\t\t//StringBuffer is used because it is passed by reference\r\n\t\t//StringBuffer can be changed in recursive calls\r\n\t\treturn postorderTraverse(this, new StringBuffer(\"\"));\r\n\t}",
"protected void postorder(TreeNode<E> root) {\r\n\t\tif (root == null)\r\n\t\t\treturn;\r\n\t\tpostorder(root.left);\r\n\t\tpostorder(root.right);\r\n\t\tSystem.out.print(root.element + \" \");\r\n\t}",
"private void postorderHelper(Node<E> root){\n\t\tif(root != null){\n\t\t\tpostorderHelper(root.left);\n\t\t\tpostorderHelper(root.right);\n\t\t\tSystem.out.print(root.item.toString() + \" \");\n\t\t}\n\t}",
"private void postOrder(Node<T> node){\n if(node != null){\n postOrder(node.left);\n postOrder(node.right);\n System.out.print(node.data + \" ,\");\n }\n }",
"protected void postorder(TreeNode<E> root) {\n if (root == null) {\n return;\n }\n postorder(root.left);\n postorder(root.right);\n System.out.print(root.element + \" \");\n }",
"private void postorderHelper(TreeNode<T> node){\n\n if (node == null)\n return;\n\n postorderHelper(node.leftNode);\n postorderHelper(node.rightNode);\n System.out.printf(\"%s \", node.data);\n }",
"public static void postOrder(TreeNode node) {\n\t\tif(node == null) return;\n\t\t\n\t\tpostOrder(node.left);\n\t\tpostOrder(node.right);\n\t\tSystem.out.print(node.value + \" \");\t\n\t}",
"public List<Integer> postOrder(TreeNode root) {\n\n List<Integer> ans = new ArrayList<>();\n\n if(root==null){\n return ans;\n }\n\n Deque<TreeNode> stack = new LinkedList<>();\n stack.push(root);\n TreeNode pre = new TreeNode(0);\n\n while(!stack.isEmpty()) {\n\n if (stack.peek().left != null && stack.peek().left != pre && stack.peek().right != pre) {\n stack.push(stack.peek().left);\n continue;\n }\n\n if (stack.peek().right != null && stack.peek().right != pre) {\n stack.push(stack.peek().right);\n continue;\n }\n pre = stack.poll();\n ans.add(pre.key);\n }\n\n return ans;\n\n }",
"static <T> List<T> implementAPostorderTraversalWithoutRecursion(BinaryTreeNode<T> tree) {\n List<T> result = new ArrayList<>();\n Deque<BinaryTreeNode<T>> stack = new ArrayDeque<>();\n BinaryTreeNode<T> previous = tree;\n\n stack.push(tree);\n\n while (!stack.isEmpty()) {\n BinaryTreeNode<T> node = stack.peek();\n\n if ((node.left == null) && (node.right == null)) { // leaf\n result.add(stack.pop().data);\n } else {\n if ((node.right != null) && (previous == node.right)) { // returning from right child\n result.add(stack.pop().data);\n } else if ((node.right == null) && (previous == node.left)) { // returning from left when right is null\n result.add(stack.pop().data);\n } else {\n if (node.right != null) stack.push(node.right);\n if (node.left != null) stack.push(node.left);\n }\n }\n\n previous = node;\n }\n\n return result;\n }",
"public static void main(String[] args) {\n\n TreeNode<Integer> node = new TreeNode<>(7);\n node.left = new TreeNode<>(2);\n node.left.left = new TreeNode<>(1);\n node.left.right = new TreeNode<>(3);\n node.right = new TreeNode<>(5);\n node.right.left = new TreeNode<>(4);\n node.right.right = new TreeNode<>(8);\n node.right.left.left = new TreeNode<>(0);\n\n List<TreeNode<Integer>> list = TreeNode.linearize_postOrder_1(node);\n for (TreeNode<Integer> n : list) {\n System.out.printf(\"%d, \", n.value);\n }\n System.out.printf(\"\\n\");\n\n list = TreeNode.linearize_postOrder_2(node);\n for (TreeNode<Integer> n : list) {\n System.out.printf(\"%d, \", n.value);\n }\n System.out.printf(\"\\n\");\n\n Map<Integer, Deque<Integer>> adjacencyList = new HashMap<>();\n Deque<Integer> children = new ArrayDeque<>();\n children.add(2); children.add(5);\n adjacencyList.put(7, children);\n children = new ArrayDeque<>();\n children.add(1); children.add(3);\n adjacencyList.put(2, children);\n children = new ArrayDeque<>();\n children.add(4); children.add(8);\n adjacencyList.put(5, children);\n //adjacencyList.put(1, new ArrayDeque<>());\n //adjacencyList.put(3, new ArrayDeque<>());\n children = new ArrayDeque<>();\n children.add(0);\n adjacencyList.put(4, children);\n //adjacencyList.put(0, new ArrayDeque<>());\n //adjacencyList.put(8, new ArrayDeque<>());\n GraphUtils.postOrderTraverse(adjacencyList, new Consumer<Integer>() {\n @Override\n public void accept(Integer integer) {\n System.out.printf(\"%d, \", integer);\n }\n });\n System.out.printf(\"\\n\");\n }",
"public List<Integer> postorderTraversal(TreeNode root) {\n LinkedList<Integer> res = new LinkedList<>();\n Stack<TreeNode> stack = new Stack<>();\n\n while (root != null || !stack.empty()) {\n if (root != null) {\n res.addFirst(root.val);\n stack.push(root);\n root = root.right;\n }\n else {\n root = stack.pop().left;\n }\n }\n return res;\n }",
"public ArrayList<E> postorderNoRecursion()\n {\n ArrayList<E> nonRecursivePostorder= new ArrayList<>();\n\n /**\n * TODO: INSERT YOUR CODE HERE\n * FIND THE POST ORDER TRAVERSAL OF THE TREE WITHOUT USING RECURSION AND RETURN THE RESULT TRAVEL SEQUENCE IN ARRAYLIST nonRecursivePostorder\n */\n\n return nonRecursivePostorder;\n }",
"public void postOrder() {\r\n\t\tSystem.out.print(\"POST: \");\r\n\t\tpostOrder(root);\r\n\t\tSystem.out.println();\r\n\t}",
"void printPostorder(Node node) {\n\t\t//base case\n\t\tif(node == null)\n\t\t\treturn;\n\t\t// first recur on left subtree\n\t\tprintPostorder(node.left);\n\t\t\t\t\n\t\t// then recur on right subtree\n\t\tprintPostorder(node.right);\n\t\t\t\t\n\t\t// now deal with the node\n\t\tSystem.out.print(node.data + \" \");\n\t}",
"public void postOrderTraversal() {\n beginAnimation();\n treePostOrderTraversal(root);\n stopAnimation();\n\n }",
"public List<Integer> postorderTraversalRecursive(TreeNode root) {\n if (root == null) {\n return rst;\n }\n postorderTraversalRecursive(root.left);\n postorderTraversalRecursive(root.right);\n rst.add(root.val);\n return rst;\n }",
"public void postOrder(Node root) {\n if(root!=null) {\n postOrder(root.left);\n postOrder(root.right);\n System.out.print(root.data + \" \");\n }\n }",
"public static void main(String args[]){\n BinaryTreeNode root = new BinaryTreeNode();\n root.setData(1);\n\n BinaryTreeNode left = new BinaryTreeNode();\n left.setData(2);\n\n BinaryTreeNode right = new BinaryTreeNode();\n right.setData(3);\n\n BinaryTreeNode leftleft = new BinaryTreeNode();\n leftleft.setData(4);\n\n BinaryTreeNode leftright = new BinaryTreeNode();\n leftright.setData(5);\n\n root.setLeft(left);\n root.setRight(right);\n left.setLeft(leftleft);\n left.setRight(leftright);\n\n\n postOrderIterative(root);\n\n }",
"public void postOrder() {\n postOrder(root);\n }",
"public void postOrder(Node root) {\n if (root != null) {\n postOrder(root.getLeftChild());\n postOrder(root.getRightChild());\n System.out.print(root.getData() + \" \");\n }\n }",
"private void postOrder(Node root) {\r\n\t\tif (root == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tpostOrder(root.getlChild());\r\n\t\tpostOrder(root.getrChild());\r\n\t\tif (postOrderCount < 20) {\r\n\t\t\tpostOrderCount++;\r\n\t\t\tSystem.out.print(\"< \" + root.getData() + \" > \");\r\n\t\t\t//System.out.println(\" Count: \" + postOrderCount);\r\n\r\n\t\t}\r\n\r\n\t}",
"public void printIterativePostOrderTraversal() {\r\n\t\tprintIterativePostOrderTraversal(rootNode);\r\n\t}",
"public static void postOrder(Node node) {\n if (node == null) {\n return;\n }\n postOrder(node.left);\n postOrder(node.right);\n System.out.print(node.data + \" \");\n }",
"public void postOrder(MyBinNode<Type> r){\n if(r != null){\n this.postOrder(r.right);\n this.postOrder(r.left);\n System.out.print(r.value.toString() + \" \");\n }\n }",
"private void postOrderTraverse(Node<String> node,StringBuilder sb) {\n\n\t\t\t\tif (node != null) {\t\n\t\t\t\t\tpostOrderTraverse(node.left, sb);\n\t\t\t\t\tpostOrderTraverse(node.right,sb);\n\t\t\t\t\tsb.append(node.toString());\n\t\t\t\t\tsb.append(\" \");\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t}",
"private void treePostOrderTraversal(Node currNode) {\n int numChildren = getNumChildren();\n\n // Returns if currNode is null.\n if (currNode == null) return;\n\n // Adds this Node to the stack.\n queueStackAddAnimation(currNode, \"Exploring \" + currNode.key,\n AnimationParameters.ANIM_TIME);\n\n // Explores left subtree.\n for (int i = 0; i < numChildren / 2; ++i)\n treePostOrderTraversal(currNode.children[i]);\n\n // Explores right subtree.\n for (int i = numChildren / 2; i < numChildren; ++i)\n treePostOrderTraversal(currNode.children[i]);\n\n // Highlights the current Node.\n queueNodeSelectAnimation(currNode, \"Current Node \" + currNode.key,\n AnimationParameters.ANIM_TIME);\n\n // Removes this Node from the stack.\n queueListPopAnimation(\"Finished exploring \" + currNode.key,\n AnimationParameters.ANIM_TIME);\n\n }",
"void printPostorder(Node node) {\n if (node == null)\n return;\n\n // first recur on left subtree\n printPostorder(node.left);\n\n // then recur on right subtree\n printPostorder(node.right);\n\n // now deal with the node\n System.out.print(node.key + \" \");\n }",
"public static List<TreeNode> postOrderIterative(TreeNode rootNode) {\n\t\tList<TreeNode> output = new ArrayList<>();\n\n\t\tif (rootNode == null)\n\t\t\treturn output;\n\n\t\tStack<TreeNode> s = new Stack<TreeNode>();\n\t\tTreeNode current = rootNode;\n\n\t\twhile (true) {\n\n\t\t\tif (current != null) {\n\t\t\t\tif (current.right != null)\n\t\t\t\t\ts.push(current.right);\n\t\t\t\ts.push(current);\n\t\t\t\tcurrent = current.left;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (s.isEmpty())\n\t\t\t\treturn output;\n\t\t\tcurrent = s.pop();\n\n\t\t\tif (current.right != null && !s.isEmpty() && current.right == s.peek()) {\n\t\t\t\ts.pop();\n\t\t\t\ts.push(current);\n\t\t\t\tcurrent = current.right;\n\t\t\t} else {\n\t\t\t\toutput.add(current);\n\t\t\t\tcurrent = null;\n\t\t\t}\n\t\t}\n\n\t}",
"private String postorderTraverse(BinarySearchTree curr, StringBuffer treeAsString){\r\n\t\t\r\n\t\t//get left\r\n\t\tif(curr.getLeftChild() != null){\r\n\t\t\tpostorderTraverse(curr.getLeftChild(), treeAsString);\r\n\t\t}\r\n\t\t\r\n\t\t//get right\r\n\t\tif(curr.getRightChild() != null){\r\n\t\t\tpostorderTraverse(curr.getRightChild(), treeAsString);\r\n\t\t}\r\n\t\t\r\n\t\t//get item\r\n\t\ttreeAsString.append(curr.getRoot().toString() + \" \");\r\n\t\t\r\n\t\t//return\r\n\t\treturn treeAsString.toString();\r\n\t}",
"public static void postOrder(Node root) {\n if (root == null)\n return;\n postOrder(root.left);\n postOrder(root.right);\n System.out.print(root.data + \" \");\n }",
"private TreeNode helper(int[] inorder, int[] inIdx, int[] postorder, int[] postIdx, TreeNode finish) {\n if (postIdx[0] < 0 || (finish != null && inorder[inIdx[0]] == finish.val)) {\n return null;\n }\n\n TreeNode root = new TreeNode(postorder[postIdx[0]--]);\n\n root.right = helper(inorder, inIdx, postorder, postIdx, root);\n\n inIdx[0]--;\n\n root.left = helper(inorder, inIdx, postorder, postIdx, finish);\n\n return root;\n }",
"public void postOrderPrint(BinaryTreeNode<T> root) {\n if (root != null) {\n postOrderPrint(root.left);\n postOrderPrint(root.right);\n System.out.println(root.value);\n }\n }",
"public void printTreePostOrder(TreeNode root){\r\n if(root==null) return;\r\n printTreeInOrder(root.left);\r\n printTreeInOrder(root.right);\r\n System.out.print(root.value + \" -> \");\r\n }",
"void printPostorder() { \n\t\tprintPostorder(root);\n\t}",
"private void postorderRightOnly(Node root) {\r\n if (root.right != null)\r\n postorderRightOnly(root.right);\r\n if (this != null && !ifLeaf(root))\r\n System.out.print(root.value + \">\");\r\n }",
"private void postOrder(HomogeneusNode root) {\n if (root != null) {\n postOrder(root.getLeft());\n postOrder(root.getRight());\n System.out.printf(\"%d\", root.getData());\n }\n }",
"public TreeNode buildTree(int[] inorder, int[] postorder) {\n if(inorder.length == 0){\n return null;\n }\n TreeNode result = getRoot(inorder,postorder,0,inorder.length - 1,inorder.length-1);\n return result;\n }",
"private void postOrder(BSTNode<K,V> node, List<Entry<K,V>> list) throws NullPointerException {\n\t\tif (root == null) {\n\t\t\tthrow new NullPointerException();\n\t\t}\n\t\tif (root != null) {\n\t\t\t\n\t\t\tif (node.left != null) {\n\t\t\t\tpostOrder(node.left, list);\n\t\t\t}\n\t\t\t\n\t\t\tif (node.right != null) {\n\t\t\t\tpostOrder(node.right, list);\n\t\t\t}\n\t\t\t\n\t\t\tlist.add(new Entry<K,V>(node.key, node.value));\n\t\t}\n\t}",
"public void printTreePostOrder(Node node)\n {\n if (node == null)\n {\n return;\n }\n\n printTreePostOrder(node.left);\n printTreePostOrder(node.right);\n\n System.out.print(node.item + \" \");\n }",
"static void preOrderWithoutRecursion(Node root) {\n Stack<Node> stack = new Stack<>();\n stack.push(root);\n while (!stack.isEmpty()) {\n Node node = stack.peek();\n System.out.print(node.data + \" \");\n stack.pop();\n\n if (node.right != null) {\n stack.push(node.right);\n }\n if (node.left != null) {\n stack.push(node.left);\n }\n }\n }",
"public void postOrder(Node localRoot)\r\n\t{\r\n\t\tif(localRoot != null)\r\n\t\t{\r\n\t\t\tpostOrder(localRoot.leftChild);\r\n\t\t\tpostOrder(localRoot.rightChild);\r\n\t\t\tSystem.out.print(localRoot.data+ \" \");\r\n\t\t}\r\n\t}",
"public ArrayList<Integer> postorderTraversal(TreeNode root) {\n ArrayList<Integer> list = new ArrayList<>();\n Stack<TreeNode> stack = new Stack<>();\n\n if (root == null)\n return list;\n\n stack.push(root);\n while (!stack.empty()) {\n TreeNode current = stack.pop();\n if (current.left != null) {\n stack.push(current.left);\n list.add(current.left.val);\n current.left = null;\n } else if (current.right != null) {\n stack.push(current.right);\n list.add(current.right.val);\n current.right = null;\n } else {\n stack.pop();\n list.add(current.val);\n }\n }\n return list;\n }",
"public void preorder()\r\n {\r\n preorder(root);\r\n }",
"public void inOrderTraverseRecursive();",
"static void postOrderTwoStacks(Node root) {\n Stack<Node> stack = new Stack<>();\n Stack<Node> stack2 = new Stack<>();\n if (root == null) {\n return;\n } else {\n stack.push(root);\n while (!stack.isEmpty()) {\n Node temp = stack.pop();\n stack2.push(temp);\n if (temp.left != null) {\n stack.push(temp.left);\n }\n if (temp.right != null) {\n stack.push(temp.right);\n }\n }\n while (!stack2.isEmpty()) {\n Node temp = stack2.pop();\n System.out.print(temp.data + \" \");\n }\n }\n }",
"private void recInOrderTraversal(BSTNode<T> node) {\n\t\tif (node != null) {\n\t\t\trecInOrderTraversal(node.getLeft());\n\t\t\ta.add(node.getData());\n\t\t\trecInOrderTraversal(node.getRight());\n\t\t}\n\t}",
"private <E> void postOrder(Node root,Action<Integer,E> action) {\n\t\tif(root==null)\n\t\t\treturn;\n\t\t\n\t\t\n\t\tpostOrder(root.left,action);\n\t\t\n\t\tpostOrder(root.right,action);\n\t\t//System.out.println(root.value,action);\n\t\taction.execute(root.value);\n\t\t\n\t}",
"public void reverseLevelOrderTraversel(TreeNode root)\r\n\t{\r\n\t\tif(root == null)\r\n\t\t{\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tQueue<TreeNode> que = new LinkedList<>();\r\n\t\tStack<TreeNode> stack = new Stack<TreeNode>();\r\n\t\t\r\n\t\tque.add(root);\r\n\t\twhile(que.size()>0)\r\n\t\t{\r\n\t\t\tTreeNode element=que.remove();\r\n\t\t\tif(element.right!=null)\r\n\t\t\t{\r\n\t\t\t\tque.add(element.right);\r\n\t\t\t}\r\n\t\t\tif(element.left!=null)\r\n\t\t\t{\r\n\t\t\t\tque.add(element.left);\r\n\t\t\t}\r\n\t\t\tstack.push(element);\r\n\t\t}\r\n\t\twhile(stack.size()>0)\r\n\t\t{\r\n\t\t\tSystem.out.print(stack.pop().data+\" \");\r\n\t\t}\r\n\t\t\t\r\n\t}",
"private E[] geInOrderRightSubTree(E[] inOrderTraversal,\n\t\t\tE[] preOrderTraversal) {\n\t\treturn null;\n\t}",
"@Test\n public void test(){\n BinarySearchTree tree = new BinarySearchTree(new Node(35));\n\n tree.addNode(4);\n tree.addNode(15);\n tree.addNode(3);\n tree.addNode(1);\n tree.addNode(20);\n tree.addNode(8);\n tree.addNode(50);\n tree.addNode(40);\n tree.addNode(30);\n tree.addNode(80);\n tree.addNode(70);\n\n tree.addNode(90);\n\n tree.deleteNode(50);\n System.out.println(\"=====中序遍历 递归法=====\");\n TreeUtil.traverseInOrder(tree.getRoot());\n\n System.out.println(\"\");\n System.out.println(\"=====中序遍历 迭代法=====\");\n TreeUtil.traverseInOrderByIteration(tree.getRoot());\n\n System.out.println(\"\");\n System.out.println(\"=====前序遍历=====\");\n TreeUtil.traversePreOrder(tree.getRoot());\n\n System.out.println(\"\");\n System.out.println(\"=====中序遍历 迭代法=====\");\n TreeUtil.traversePreOrderByIteration(tree.getRoot());\n\n System.out.println(\"\");\n System.out.println(\"=====后序遍历=====\");\n TreeUtil.traversePostOrder(tree.getRoot());\n\n System.out.println(\"\");\n System.out.println(\"=====后序遍历 迭代法=====\");\n TreeUtil.traversePostOrderByIteration(tree.getRoot());\n\n System.out.println(\"\");\n System.out.println(\"=====层次遍历=====\");\n TreeUtil.traverseLevelOrder(tree.getRoot());\n\n int height = TreeUtil.getChildDepth(tree.getRoot());\n System.out.println(\"\");\n System.out.println(\"树高:\"+height);\n }",
"public void postOrderTraverseTree(Node focusNode) {\n\n\t\tif (focusNode != null) {\n\n\t\t\tpreorderTraverseTree(focusNode.left);\n\t\t\tpreorderTraverseTree(focusNode.right);\n\n\t\t\tSystem.out.print(focusNode.data + \" \");\n\n\t\t}\n\n\t}",
"static void postOrderOneStack(Node root) {\n Stack<Node> stack = new Stack<>();\n while (true) {\n while (root != null) {\n stack.push(root);\n stack.push(root);\n root = root.left;\n }\n if (stack.isEmpty()) {\n return;\n }\n root = stack.pop();\n if (!stack.isEmpty() && stack.peek() == root) {\n root = root.right;\n } else {\n System.out.print(root.data + \" \");\n root = null;\n }\n }\n }",
"public TreeNode buildTree(int[] inorder, int[] postorder) {\n if(inorder.length==0 || postorder.length==0)\n return null;\n return build(inorder, postorder, 0, inorder.length-1, 0, postorder.length-1);\n }",
"public void printPostorder() {\n System.out.print(\"postorder:\");\n printPostorder(overallRoot);\n System.out.println();\n }",
"public List<Integer> postorderTraversal(TreeNode root) {\n List<Integer> traversal = new ArrayList<>();\n\n visit(root, traversal);\n\n return traversal;\n }",
"public String postorder() {\n \tresult = \"\";\n \ttraversal(root);\n return result;\n }",
"private void postOrder(OpTree t, ArrayList<String> rlist)\n\t{\n\t\tif (t == null) return;\n\t\tpostOrder(t.left, rlist);\n\t\tpostOrder(t.right, rlist);\n\t\trlist.add(rlist.size(),(t.op != null? t.op : t.dval.toString()));\n\t}",
"static void postorderPrint(TreeNode node) {\n if (node == null)\n return;\n\n Iterator iter = node.getChildren().iterator();\n while (iter.hasNext()) {\n postorderPrint((TreeNode) iter.next());\n }\n System.out.print(\" \" + node.data);\n }",
"List<Integer> traversePostOrder(List<Integer> oList) \n\t{\n\t\tif(this.left != null)\n\t\t{\n\t\t\tthis.left.traversePostOrder(oList);\n\t\t}\n\t\n\t\tif(this.right != null)\n\t\t{\n\t\t\tthis.right.traversePostOrder(oList);\n\t\t}\n\t\t\n\t\toList.add(this.key);\n\t\t\n\t\treturn oList;\n\t}",
"public Iterator<T> postorderIterator() { return new PostorderIterator(root); }",
"static void inOrderWithoutRecursion(Node root) {\n if (root == null) {\n return;\n }\n Stack<Node> stack = new Stack<>();\n Node curr = root;\n while (curr != null || !stack.isEmpty()) {\n while (curr != null) {\n stack.push(curr);\n curr = curr.left;\n }\n curr = stack.pop();\n System.out.print(curr.data + \" \");\n curr = curr.right;\n }\n\n }",
"public static ArrayList<String> postOrder(Node treeRoot) {\r\n\t\tArrayList<String> traversal = new ArrayList<String>(0);\r\n\t\t\r\n\t\tif (treeRoot == null) {\r\n\t\t\treturn new ArrayList<String>(0);\r\n\t\t}\r\n\t\t\r\n\t\ttraversal.addAll(postOrder(treeRoot.left));\r\n\t\ttraversal.addAll(postOrder(treeRoot.right));\r\n\t\ttraversal.add(treeRoot.root);\r\n\t\t\r\n\t\treturn traversal;\r\n\t}",
"private E[] getPreOrderRightSubTree(E[] inOrderTraversal,\n\t\t\tE[] preOrderTraversal) {\n\t\treturn null;\n\t}"
] | [
"0.7738294",
"0.7470129",
"0.7453061",
"0.74231976",
"0.74231976",
"0.73617285",
"0.73520577",
"0.734676",
"0.7225567",
"0.7210293",
"0.71633923",
"0.71540076",
"0.71362174",
"0.7125231",
"0.7118647",
"0.710024",
"0.7095888",
"0.705792",
"0.70187736",
"0.7013278",
"0.701165",
"0.700762",
"0.7000087",
"0.6996708",
"0.6994171",
"0.6991002",
"0.6974015",
"0.69677603",
"0.6956344",
"0.6952026",
"0.6951694",
"0.6940738",
"0.69046795",
"0.69025224",
"0.68933785",
"0.6885431",
"0.687492",
"0.6854046",
"0.6843634",
"0.68376654",
"0.68281",
"0.68009245",
"0.67796755",
"0.67773193",
"0.67736125",
"0.6745657",
"0.6729324",
"0.6721726",
"0.67195505",
"0.6698526",
"0.6688034",
"0.6667594",
"0.66635555",
"0.6635048",
"0.6614485",
"0.66137284",
"0.66123044",
"0.66071343",
"0.6602478",
"0.65995413",
"0.65848184",
"0.6571897",
"0.65525746",
"0.65453094",
"0.65399337",
"0.65372735",
"0.6486432",
"0.6470172",
"0.64644057",
"0.6408529",
"0.6398564",
"0.63858",
"0.63824415",
"0.6350895",
"0.6340082",
"0.6332168",
"0.6331053",
"0.63305944",
"0.6314451",
"0.6312169",
"0.6307244",
"0.62602663",
"0.62581295",
"0.62467605",
"0.6229399",
"0.6222834",
"0.62103677",
"0.62023824",
"0.6179189",
"0.61779886",
"0.6161853",
"0.61604327",
"0.6154441",
"0.6144712",
"0.6134385",
"0.61081105",
"0.6106108",
"0.61005765",
"0.6093982",
"0.60938656"
] | 0.7296731 | 8 |
public method to insert node in Binary Search Tree | public TreeNode<T> insert(TreeNode<T> root, TreeNode<T> node) {
if (null == node || ( null != node && null == node.getInfo())) {
return root;
} else if (root == null) { /*First node case*/
return node;
} else {
insertNode(root, node);
return root;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void insert(HuffmanTree node);",
"private void insertNodeIntoTree(Node node) {\n\t\troot = insert(root,node);\t\n\t}",
"public void insert(Node n);",
"private void insert(RBNode<T> node) {\r\n RBNode<T> current = this.root;\r\n //need to save the information of parentNode\r\n //because need the parentNode to connect the new node to the tree\r\n RBNode<T> parentNode = null;\r\n\r\n //1. find the insert position\r\n while(current != null) {\r\n parentNode = current;//store the parent of current, because current is going to move\r\n int cmp = node.key.compareTo(current.key);\r\n if(cmp < 0)//if insert data is smaller than current data, then go into left subtree\r\n current = current.left;\r\n else//if insert data is bigger than or equal to current data, then go into right subtree\r\n current = current.right;\r\n }\r\n\r\n //find the position, let parentNode as the parent of newNode\r\n node.parent = parentNode;\r\n\r\n //2. connect newNode to parentNode\r\n if(parentNode != null) {\r\n int cmp = node.key.compareTo(parentNode.key);\r\n if(cmp < 0)\r\n parentNode.left = node;\r\n else\r\n parentNode.right = node;\r\n } else {\r\n //if parentNode is null, means tree was empty, let root = newNode\r\n this.root = node;\r\n }\r\n\r\n //3. fix the current tree to be a RBTree again\r\n insertFixUp(node);\r\n }",
"private BinaryNode<E> _insert(BinaryNode<E> node, E e) {\n\n\t\tif (node == null) {\n\t\t\treturn new BinaryNode<E>(e);\n\t\t} else if (comparator.compare(e, node.getData()) < 0) { // <, so go left\n\t\t\tnode.setLeftChild(_insert(node.getLeftChild(), e));// recursive call\n\t\t} else { // >, so go right\n\t\t\tnode.setRightChild(_insert(node.getRightChild(), e));// recursive call\n\t\t}\n\t\treturn node;\n\t}",
"public void insertNode(int d){\n if(root == null){\n root = new TreeNode(d);\n }\n else{\n root.insert(d);\n }\n }",
"public static TreeNode insertIntoBST(TreeNode root, int val)\n{\n TreeNode droot = root;\n TreeNode par = find(droot, val, null);\n if(par==null)\n return par;\n if(par.val < val)\n par.right = new TreeNode(val);\n else\n par.left = new TreeNode(val);\n return root;\n}",
"public void insert(T insertValue){\n // insert in left subtree\n if(insertValue.compareTo(data) < 0){\n // insert new TreeNode\n if(leftNode == null)\n leftNode = new TreeNode<T>(insertValue);\n else\n leftNode.insert(insertValue);\n }\n\n // insert in right subtree\n else if (insertValue.compareTo(data) > 0){\n // insert new treeNode\n if(rightNode == null)\n rightNode = new TreeNode<T>(insertValue);\n else // continue traversing right subtree\n rightNode.insert(insertValue);\n }\n }",
"public void insertNode(T d) {\n /* Functions to insert data */\n TreeNode newNode = new TreeNode(d);\n nodesToInsertAt.add(newNode);\n size++;\n if(root == null){\n root = newNode;\n return;\n }\n TreeNode current; \n current = nodesToInsertAt.get(0);\n if(current.left == null){\n current.left = newNode;\n return;\n }\n if(current.right == null){\n current.right = newNode;\n nodesToInsertAt.remove(0);\n }\n }",
"static TreeNode insert(TreeNode node, int key) \n\t{ \n\t // if tree is empty return new node \n\t if (node == null) \n\t return newNode(key); \n\t \n\t // if key is less then or grater then \n\t // node value then recur down the tree \n\t if (key < node.key) \n\t node.left = insert(node.left, key); \n\t else if (key > node.key) \n\t node.right = insert(node.right, key); \n\t \n\t // return the (unchanged) node pointer \n\t return node; \n\t}",
"public void insert(int key){\n\t\tBSTNode currentNode = root;\n\t\tBSTNode parent = null;\n\t\twhile (currentNode != null){\n\t\t\tif (currentNode.getKey() == key){\n\t\t\t\tSystem.out.println(\"This value already exists in the tree!\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tparent = currentNode;\n\t\t\tif (key < currentNode.getKey()){\n\t\t\t\tcurrentNode = currentNode.getLeft();\n\t\t\t}else{\n\t\t\t\tcurrentNode = currentNode.getRight();\n\t\t\t}\n\t\t}\n\t\t// once we reached the bottom of the tree, we insert the new node.\n\t\t// to do that we need to know the leaf node which is stored in the BSTNode parent\n\t\t// by comparing with its value, we know which side to insert the new node.\n\t\tif (key < parent.getKey()){\n\t\t\tparent.setLeft(new BSTNode(key, null, null));\n\t\t}else{\n\t\t\tparent.setRight(new BSTNode(key, null, null));\n\t\t}\n\t\tsize++;\n\t}",
"public void add(Comparable obj)\n { \n \t //TODO\n \t //add code\n \t Node n = new Node(); \n \t n.data = obj;\n \t // \tn.left = null;\n \t // \tn.right = null;\n\n \t Node y = null;\n \t // \tNode x = root;\n \t Node current = root;\n \t while(current != null)\n \t {\n \t\t y = current;\n \t\t if(n.data.compareTo(root.data) < 0)\n \t\t\t current = current.left;\n \t\t else\n \t\t\t current = current.right;\n \t }\n\n\n \t n.parent = y;\n \t if(y == null)\n \t\t root = n;\n \t else\n \t\t if(n.data.compareTo(y.data) < 0)\n \t\t\t y.left = n;\n \t\t else\n \t\t\t y.right = n;\n \t n.left = null;\n \t n.right = null;\n \t n.color = RED;\n \t // \troot = new Node();\n \t // \troot.data = \"k\";\n \t // \tNode test = new Node();\n \t // \ttest.data = \"g\";\n \t // \troot.left= test;\n// \t System.out.println(\"the insertion looks like:\");\n// \t System.out.println(BTreePrinter.printNode(root));\n\n \t fixup(root,n);\n \t /*\n \tThe insert() method places a data item into the tree.\n\n \tInsertions\n \tpseudocode for\n \tRB-Insert(T,z)\n \ty = nil[T]\n \tx = root[T]\n \twhile x != nil[T]\n \ty = x\n \tif key[z] < key[x] then\n \tx = left[x]\n \telse\n \tx = right[x]\n \tp[z] = y\n \tif y = nil[T]\n \troot[T] = z\n \telse\n \tif key[z] < key[y] then\n \tleft[y] = z\n \telse\n \tright[y] = z\n \tleft[z] = nil[T]\n \tright[z] = nil[T]\n \tcolor[z] = RED\n \tRB-Insert-fixup(T,z)\n \t */\n }",
"public void insert(int key) {\n // Implement insert() using the non-recursive version\n // This function should call findClosestLeaf()\n\n if(root!=null){ // มี node ใน tree\n Node n = findClosestLeaf(key); //หา Leaf n ที่ใกล้ค่าที่ใส่มากที่สุด โดย call findClosestLeaf()\n\n\n if(n.key!= key){ // ค่าที่จะใส่ต้องไม่มีใน tree\n if(key > n.key){ // ค่าที่จะใส่มากกว่า Leaf n ให้ใส่เป็นลูฏของ Leaf ด้านขวา\n n.right = new Node(key);\n n.right.parent = n;\n }\n\n else { // ค่าที่จะใส่น้อยกว่า Leaf n ให้ใส่เป็นลูฏของ Leaf ด้านซ้าย\n n.left = new Node(key);\n n.left.parent = n;\n }\n }\n else\n {\n return;\n }\n\n }else{ // ไม่มี node ใน tree ดังนั้นค่าที่ใส่เข้ามาจะกลายเป็ฯ root\n root = new Node(key);\n }\n }",
"public void insertNode(T insertValue){\n if(root == null)\n root = new TreeNode<T>(insertValue);\n else\n root.insert(insertValue);\n }",
"protected Node<T> insert(Node<T> node, Comparable<T> item)\r\n {\r\n // if current root has not been previously instantiated\r\n // instantiate a new Node with item added as the data\r\n if (node == null) {\r\n return new Node<T>(item); // when your node is null, insert at leaf\r\n }\r\n if (item.compareTo((T) node.data) < 0) {\r\n node.left = insert(node.left,item);\r\n }\r\n else {\r\n node.right = insert(node.right,item);\r\n }\r\n return node; // re-link the nodes\r\n }",
"private BTNode insert(BTNode node, T data)\r\n {\r\n if (node == null)\r\n node = new BTNode(data);\r\n else\r\n {\r\n if (node.getLeft() == null)\r\n node.left = insert(node.left, data);\r\n else\r\n node.right = insert(node.right, data); \r\n }\r\n return node;\r\n }",
"public Node insertBST(Node node, Node add ){\n\t\tif(node==nil){\n\t\t\t//inserting the node at the correct position\n\t\t\treturn add;\n\t\t}\n\t\tif(add.id <node.id){\n\t\t\t//going to the left if the node to be inserted is smaller than the current node\n\t\t\tnode.left = insertBST(node.left,add);\n\t\t\t//pointing the node just inserted to its parent\n\t\t\tnode.left.parent = node;\n\t\t}else{\n\t\t\t//going right in case the node is equal or bigger\n\t\t\tnode.right = insertBST(node.right,add);\n\t\t\t//attaching the parent\n\t\t\tnode.right.parent = node;\n\t\t}\n\t\t\n\t\treturn node;\n\t}",
"public void insert(int key){\n\t\tif(this.root == null){\n\t\t\tNode r = new Node(key);\n\t\t\tthis.root = r;\t\n\t\t}else{\n\t\t\t//if not recursively insert the node\n\t\t\trecInsert(this.root, key);\n\t\t}\n\t\treturn;\n\t}",
"private static void treeInsert(String newItem) {\n if (root == null) {\n // The tree is empty. Set root to point to a new node containing\n // the new item. This becomes the only node in the tree.\n root = new TreeNode(newItem);\n return;\n }\n TreeNode runner; // Runs down the tree to find a place for newItem.\n runner = root; // Start at the root.\n while (true) {\n if (newItem.compareTo(runner.item) < 0) {\n // Since the new item is less than the item in runner,\n // it belongs in the left subtree of runner. If there\n // is an open space at runner.left, add a new node there.\n // Otherwise, advance runner down one level to the left.\n if (runner.left == null) {\n runner.left = new TreeNode(newItem);\n return; // New item has been added to the tree.\n } else\n runner = runner.left;\n } else {\n // Since the new item is greater than or equal to the item in\n // runner it belongs in the right subtree of runner. If there\n // is an open space at runner.right, add a new node there.\n // Otherwise, advance runner down one level to the right.\n if (runner.right == null) {\n runner.right = new TreeNode(newItem);\n return; // New item has been added to the tree.\n } else\n runner = runner.right;\n }\n } // end while\n }",
"static void insert(Node nd, int key)\n\t{\n\t\tif (nd == null) {\n\t\t\troot = new Node(key);\n\t\t\treturn;\n\t\t}\n\t\tQueue<Node> q = new LinkedList<Node>();\n\t\tq.add(nd);\n\n\t\t// Do level order traversal until we find an empty place\n\t\twhile (!q.isEmpty()) {\n\t\t\tnd = q.remove();\n\n\t\t\tif (nd.left == null) {\n\t\t\t\tnd.left = new Node(key);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse\n\t\t\t\tq.add(nd.left);\n\n\t\t\tif (nd.right == null) {\n\t\t\t\tnd.right = new Node(key);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse\n\t\t\t\tq.add(nd.right);\n\t\t}\n\t}",
"public void insertnode ()\n\t// insert an empty node\n\t{\n\t\tif (Pos.haschildren() && !GF.askInsert()) return;\n\t\tNode n = new Node(Pos.node().number());\n\t\tPos.insertchild(new TreeNode(n));\n\t\tn.main(Pos);\n\t\tgetinformation();\n\t\tPos = Pos.lastChild();\n\t\tsetlast();\n\t\tshowinformation();\n\t\tcopy();\n\t}",
"public void insert(T data) {\n\t\tBSTNode<T> add = new BSTNode<T>(data);\n\t\tBSTNode<T> tmp = root;\n\t\tBSTNode<T> parent = null;\n\t\tint c = 0;\n\t\twhile (tmp!=null) {\n\t\t\tc = tmp.data.compareTo(data);\n\t\t\tparent = tmp;\n\t\t\ttmp = c < 0 ? tmp.left: tmp.right;\n\t\t}\n\t\tif (c < 0) \tparent.left = add;\n\t\telse \t\tparent.right = add;\n\t\t\n\n\t\n\t}",
"private BTNode<T> insert(T data, BTNode<T> node){\n\t\t// if the node does not exist, create it\n\t\tinsertCount++;\n\t\tif(node == null) return new BTNode<T>(data, null, null);\n\n\t\t//left placement\n\t\tinsertCount++;\n\t\tif(data.compareTo(node.getData()) <= 0) node.setLeft(insert(data, node.getLeft()));\n\n\t\telse node.setRight(insert(data, node.getRight()));\n\n\t\t//balance the tree after insertion\n\t\treturn balance(node);\n\t}",
"public void insert(T data)\r\n {\r\n root = insert(root, data);\r\n }",
"static Node insert(Node node, int key) {\n\n // If the tree is empty, return a new node\n if (node == null)\n return newNode(key);\n\n // Otherwise, recur down the tree\n if (key < node.key)\n node.left = insert(node.left, key);\n else\n node.right = insert(node.right, key);\n\n // Return the (unchanged) node pointer\n return node;\n }",
"public void insertNode(int data){\r\n\t\troot = insert(data, root);\r\n\t}",
"public void insert(TreeNode insertNode) {\n\t\tif(root == null) {\n\t\t\troot = insertNode; \n\t\t\tlength++;\n\t\t\treturn;\n\t\t}\n\n\t\tTreeNode currentNode = root; \n\n\t\twhile(true) {\n\t\t\tif(insertNode.getData() >= currentNode.getData()) {\n\t\t\t\tif(currentNode.getRightChild() == null) {\n\t\t\t\t\tcurrentNode.setRightChild(insertNode);\n\t\t\t\t\tlength++;\n\t\t\t\t\treturn;\n\t\t\t\t} else {\n\t\t\t\t\tcurrentNode = currentNode.getRightChild();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif(currentNode.getLeftChild() == null) {\n\t\t\t\t\tcurrentNode.setLeftChild(insertNode);\n\t\t\t\t\tlength++;\n\t\t\t\t\treturn;\n\t\t\t\t} else {\n\t\t\t\t\tcurrentNode = currentNode.getLeftChild();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public boolean Insert(int newInt) {\r\n\t\t//initialize the parent node\r\n\t\tTreeNodeWrapper p = new TreeNodeWrapper();\r\n\t\t//initialize the child node\r\n\t\tTreeNodeWrapper c = new TreeNodeWrapper();\r\n\t\t//initialize a new TreeNode\r\n\t\tTreeNode n = new TreeNode();\r\n\t\t//set value of TreeNode as integer passed in method\r\n\t\tn.Data = newInt;\r\n\t\t//initialize left node as null\r\n\t\tn.Left = null;\r\n\t\t//initialize right node as null\r\n\t\tn.Right = null;\r\n\t\t//will be inserted as a leaf so its balanceFactor will be zero\r\n\t\tn.balanceFactor = 0;\r\n\t\t//if tree is empty set a root node\r\n\t\tif(Root == null)\r\n\t\t{ \r\n\t\t\tRoot = n;\r\n\t\t} else\r\n\t\t//determine which node is parent node using FindNode Method\r\n\t\t{ FindNode(newInt, p, c);\r\n\t\t//if new value is less than parent node then set as left node\r\n\t\t if(newInt < p.Get().Data )\r\n\t\t { \r\n\t\t\tp.Get().Left = n;\r\n\t\t }\r\n\t\t else\r\n\t\t//else new value is more than parent node and set as right node\r\n\t\t { p.Get().Right = n; }\r\n\t\t}\r\n\t\t//insert successful \r\n\t\treturn true;\r\n\t}",
"private void insert(BSTNode<T> node, T element) {\n\t\tif(node.isEmpty()) {\n\t\t\tnode.setData(element);\n\t\t\tnode.setLeft(new BSTNode<T>());\n\t\t\tnode.setRight(new BSTNode<T>());\n\t\t\tnode.getLeft().setParent(node);\n\t\t\tnode.getRight().setParent(node);\n\t\t}else {\n\t\t\tif (node.getData().compareTo(element) > 0)\n\t\t\t\tinsert((BSTNode<T>) node.getLeft(), element);\n\t\t\telse\n\t\t\t\tinsert((BSTNode<T>) node.getRight(), element);\n\t\t}\n\t\t\n\t}",
"@Override\n\tpublic BSTNode insert(int key, Object value) throws OperationNotPermitted {\n\n\t\tBSTNode p = searchByKey(key);\n\t\tBSTNode n;\n\n\t\tif (p == null) {\n\t\t\t// tree is empty, create new root\n\n\t\t\tn = createNode(key, value);\n\t\t\t_root = n;\n\t\t} else if (p.key == key) {\n\t\t\t// key exists, update payload\n\n\t\t\tn = p;\n\t\t\tn.value = value;\n\t\t} else {\n\t\t\t// key does not exist\n\n\t\t\tn = createNode(key, value);\n\t\t\tn.parent = p;\n\n\t\t\tif (p != null) {\n\t\t\t\tif (key < p.key) {\n\t\t\t\t\tp.left = n;\n\t\t\t\t} else {\n\t\t\t\t\tp.right = n;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tupdateSubtreeSizePath(n.parent);\n\t\t}\n\n\t\treturn n;\n\t}",
"@Override\n\tpublic void insert(T value) \n\t{\n\t\tif(root==null)\n\t\t{\n\t\t\t//Add the new node to the root\n\t\t\troot = new TreeNode<T>(value);\n\t\t}\n\t\t//if the value compared to the root is less than zero (it's smaller than the root)\n\t\telse if(value.compareTo(value())<0)\n\t\t{\n\t\t\t//move to the left node, try insert again\n\t\t\troot.left().insert(value);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//move to the right node, try insert again\n\t\t\troot.right().insert(value);\n\t\t}\n\t}",
"public static void insert(TreeNode root, TreeNode node){\n\t\t \n\t\t if(node.val < root.val){\n\t\t\t if(root.left == null){\n\t\t\t\t root.left = node;\n\t\t\t }\n\t\t\t else{\n\t\t\t\t insert(root.left, node);\n\t\t\t }\n\t\t }\n\t\t else{\n\t\t\t if(root.right == null){\n\t\t\t\t root.right = node;\n\t\t\t }\n\t\t\t else{\n\t\t\t\t insert(root.right,node);\n\t\t\t }\n\t\t }\n\t }",
"private BSTNode insert(BSTNode node, int data) {\r\n \r\n // if the node is null, create a new node\r\n if (node == null) {\r\n \r\n // create new BSTNode node\r\n node = new BSTNode(data);\r\n }\r\n \r\n // if the node is not null, execute\r\n else {\r\n \r\n // if the data < parent, traverse left\r\n if (data < node.getData()) {\r\n \r\n // call the insert method on the left node\r\n node.left = insert(node.left, data); \r\n }\r\n \r\n // if data > parent, traverse right\r\n else if (data > node.getData()) {\r\n \r\n // call the insert method on the right node\r\n node.right = insert(node.right, data);\r\n }\r\n \r\n // if the data == parent, increment intensity count\r\n else {\r\n \r\n // call method to increment the node's intensity count\r\n node.incrementIntensityCount();\r\n }\r\n }\r\n \r\n // return the node\r\n return node;\r\n }",
"private Node _insert(Node node, T value) {\n if (node == null) {\n node = new Node(null, null, value);\n }\n /**\n * If the value is less than the current node's value, choose left.\n */\n else if (value.compareTo(node.element) < 0) {\n node.left = _insert(node.left, value);\n }\n /**\n * If the value is greater than the current node's value, choose right.\n */\n else if (value.compareTo(node.element) > 0) {\n node.right = _insert(node.right, value);\n }\n /** \n * A new node is created, or\n * a node with this value already exists in the tree.\n * return this node\n * */\n return node;\n\n }",
"public void insertBST(Object o) {\n ObjectTreeNode p, q;\n \n ObjectTreeNode r = new ObjectTreeNode(o);\n if (root == null)\n root = r;\n else {\n p = root;\n q = root;\n while (q != null) {\n p = q;\n if (((TreeComparable)(r.getInfo())).compareTo((TreeComparable)(p.getInfo())) < 0 )\n q = p.getLeft();\n else\n q = p.getRight();\n }\n if (((TreeComparable)(r.getInfo())).compareTo((TreeComparable)(p.getInfo())) < 0)\n setLeftChild(p, r);\n else\n setRightChild(p, r);\n }\n }",
"public void insert(T data){\n\t\troot = insert(data, root);\n\t}",
"public Node insert(Node node, int key) {\n\t\tif (node == null)\n\t\t\treturn new Node(key);\n\n\t\t/* Otherwise, recur down the tree */\n\t\tif (key < node.data) {\n\t\t\tnode.left = insert(node.left, key);\n\t\t\tnode.left.parent = node;\n\t\t} else if (key > node.data) {\n\t\t\tnode.right = insert(node.right, key);\n\t\t\tnode.right.parent = node;\n\t\t}\n\n\t\t/* return the (unchanged) node pointer */\n\t\treturn node;\n\t}",
"public void bstInsert(E x) {\n\n root = bstInsert(x, root, null);\n }",
"private void insert(Node node) {\n//\t\t//A*\n\t\topen.add(node);\n\t\tCollections.sort(open);\n//\t\t\n//\t\t//dfs\n//\t\topen.add(0, node);\n\t\t\n\t\t//bfs\n//\t\topen.add(node);\n\t}",
"public void insert(double key, Double value){\n\tif(search(key)!=null){\r\n\t\tLeaf Leaf = (Leaf)Search(root, key);\r\n\t\t\r\n\t\tfor(int i=0; i<Leaf.keyvalues.size(); i++) {\r\n\t\t\tif(key==Leaf.getKeyValue(i).getKey()) {\r\n\t\t\t\t\tLeaf.getKeyValue(i).values.add(value);\r\n\t\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}\r\n\t\r\n\tLeaf newleaf = new Leaf(key, value);\r\n\t\r\n\tPair<Double,Node> entry=new Pair<Double, Node>(key,newleaf);\r\n\r\n\tif(root == null ) {\r\n\t\troot = entry.getValue();\r\n\t}\r\n\t\r\n\r\n\tPair<Double, Node> newChildEntry = getChildEntry(root, entry, null);\r\n\t\r\n\tif(newChildEntry == null) {\r\n\t\treturn;\r\n\t} else {\r\n\t\tIntrnlNode newRoot = new IntrnlNode(newChildEntry.getKey(), root, newChildEntry.getValue());\r\n\t\troot = newRoot;\r\n\t\treturn;\r\n\t}\r\n}",
"void insert(int data) { \n root = insertRec(root, data); \n }",
"public void InsertNode(int key){\n boolean isRightChild = false;\n boolean isDuplicate = false;\n if(root == null){\n root = new Node(key);\n return;\n }\n Node temp = root;\n while(true){\n if(temp.value == key){\n isDuplicate = true ;\n break;\n }\n if(temp.value > key){\n if(temp.left == null){\n break;\n }\n temp = temp.left ;\n }\n if(temp.value < key){\n if(temp.right == null){\n isRightChild = true;\n break;\n }\n temp = temp.right ;\n }\n }\n if( !isDuplicate && isRightChild)\n temp.right = new Node(key);\n else if(!isDuplicate && !isRightChild)\n temp.left = new Node(key);\n else\n temp.count = temp.count + 1;\n }",
"static void treeInsert(double x) {\n if ( root == null ) {\n // If the tree is empty set root to point to a new node \n // containing the new item.\n root = new TreeNode( x );\n return;\n }\n TreeNode runner; // Runs down the tree to find a place for newItem.\n runner = root; // Start at the root.\n while (true) {\n if ( x < runner.item ) {\n // Since the new item is less than the item in runner,\n // it belongs in the left subtree of runner. If there\n // is an open space at runner.left, add a node there.\n // Otherwise, advance runner down one level to the left.\n if ( runner.left == null ) {\n runner.left = new TreeNode( x );\n return; // New item has been added to the tree.\n }\n else\n runner = runner.left;\n }\n else {\n // Since the new item is greater than or equal to the \n // item in runner, it belongs in the right subtree of\n // runner. If there is an open space at runner.right, \n // add a new node there. Otherwise, advance runner\n // down one level to the right.\n if ( runner.right == null ) {\n runner.right = new TreeNode( x );\n return; // New item has been added to the tree.\n }\n else\n runner = runner.right;\n }\n } // end while\n }",
"public void insertNode(Node newNode) {\r\n\t\thFlag = 0;\r\n\t\tif( newNode == null ) {\r\n\t\t\tthrow new NullPointerException(\"Inserted node is null\");\r\n\t\t}\r\n\t\t//if tree is empty, make this node the root\r\n\t\tif( size == 0 ) {\r\n\t\t\troot = newNode;\r\n\t\t\tnewNode.parent = nilNode;\r\n\t\t\tnewNode.left = nilNode;\r\n\t\t\tnewNode.right = nilNode;\r\n\t\t\tnewNode.color = 1;\r\n\t\t\theight = 1;\r\n\t\t} else {\r\n\t\t\t//otherwise, start at root and climb down tree until a spot is found\r\n\t\t\tNode y = nilNode;\r\n\t\t\tNode x = root;\r\n\t\t\tint count = 1;\r\n\r\n\t\t\twhile(x != nilNode) {\r\n\t\t\t\ty = x;\r\n\t\t\t\tif(newNode.key < x.key || (newNode.key == x.key && newNode.p == 1) )\r\n\t\t\t\t\tx = x.left;\r\n\t\t\t\telse\r\n\t\t\t\t\tx = x.right;\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t\tif(height < count) {\r\n\t\t\t\theight = count;\r\n\t\t\t\thFlag = 1;\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\tnewNode.parent = y;\r\n\t\t\tif(newNode.key < y.key || (newNode.key == y.key && newNode.p == 1) )\r\n\t\t\t\ty.left = newNode;\r\n\t\t\telse\r\n\t\t\t\ty.right = newNode;\r\n\t\t\tnewNode.left = nilNode;\r\n\t\t\tnewNode.right = nilNode;\r\n\t\t\tnewNode.color = 0;\r\n\r\n\t\t\t//fix up tree\r\n\t\t\tRBFixup(newNode);\r\n\t\t\t\r\n\t\t\t//Time to update the vaules in each node in O(h) time\r\n\t\t\t//after the fix up, newNode may have children who need to be updated,so\r\n\t\t\t//if newNode has nonNil children, start updating from either child\r\n\t\t\tif( !newNode.right.isNil || !newNode.left.isNil ) {\r\n\t\t\t\t//start from newNode's left child (right would work too)\r\n\t\t\t\trecUpdateNode(newNode.left);\r\n\t\t\t} else {\r\n\t\t\t\t//start from newNode\r\n\t\t\t\trecUpdateNode(newNode);\r\n\t\t\t}\n\t\t}\r\n\t\tsize++;\r\n\t}",
"void insert(K key, V value) {\r\n // binary search\r\n int correct_place = Collections.binarySearch(keys, key);\r\n int indexing;\r\n if (correct_place >= 0) {\r\n indexing = correct_place;\r\n } else {\r\n indexing = -correct_place - 1;\r\n }\r\n\r\n if (correct_place >= 0) {\r\n keys.add(indexing, key);\r\n values.add(indexing, value);\r\n } else {\r\n keys.add(indexing, key);\r\n values.add(indexing, value);\r\n }\r\n\r\n // to check if the node is overloaded then split\r\n if (root.isOverflow()) {\r\n Node sibling = split();\r\n InternalNode newRoot = new InternalNode();\r\n newRoot.keys.add(sibling.getFirstLeafKey());\r\n newRoot.children.add(this);\r\n newRoot.children.add(sibling);\r\n root = newRoot;\r\n }\r\n }",
"private boolean bstInsert(Node newNode, Node currentNode) {\n if (mRoot == null) {\n // case 1\n mRoot = newNode;\n return true;\n }\n else{\n int compare = currentNode.mKey.compareTo(newNode.mKey);\n if (compare < 0) {\n // newNode is larger; go right.\n if (currentNode.mRight != NIL_NODE)\n return bstInsert(newNode, currentNode.mRight);\n else {\n currentNode.mRight = newNode;\n newNode.mParent = currentNode;\n mCount++;\n return true;\n }\n }\n else if (compare > 0) {\n if (currentNode.mLeft != NIL_NODE)\n return bstInsert(newNode, currentNode.mLeft);\n else {\n currentNode.mLeft = newNode;\n newNode.mParent = currentNode;\n mCount++;\n return true;\n }\n }\n else {\n // found a node with the given key; update value.\n currentNode.mValue = newNode.mValue;\n return false; // did NOT insert a new node.\n }\n }\n }",
"public void insert(BinaryNode target, BinaryNode node){\n\t\tif(target == null){\n\t\t\ttarget = node;\n\t\t\treturn;\n\t\t}\n\t\telse if(target.getData() == node.getData())\n\t\t{\n\t\t\tSystem.out.println(\"The node is already present\");\n\t\t\treturn;\n\t\t}\n\t\telse if(target.getData() < node.getData())\n\t\t{\n\t\t\tif(target.getRight() != null){\n\t\t\t\tinsert(target.getRight(), node);\n\t\t\t}\n\t\t\telse{\n\t\t\t\ttarget.setRight(node);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(target.getLeft() != null){\n\t\t\t\tinsert(target.getLeft(), node);\n\t\t\t}\n\t\t\telse{\n\t\t\t\ttarget.setLeft(node);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}",
"public TreeNode insert(Data newData)\r\n\t\t{\r\n\t\t\t\r\n\t\t\t//parent is full so we need to split and return the split\r\n\t\t\tif (isFull())\r\n\t\t\t{\r\n\t\t\t\tthis.split();\r\n\t\t\t\treturn this; //if split return myself to my caller to be added\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//hit a leaf that is not full so simply add the data\r\n\t\t\tif (isLeaf() && !isFull())\r\n\t\t\t{\r\n\t\t\t\t//System.out.println(\"leaf inserting: \" + newData.getWord());\r\n\t\t\t\tthis.insertData(newData);\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\r\n\t\t\t//hit a leaf that is full so we need to split and return the split leaf\r\n\t\t\tif (isLeaf() && isFull())\r\n\t\t\t{\r\n\t\t\t\t//System.out.println(\"full inserting: \" + newData.getWord());\r\n\t\t\t\tthis.insertData(newData);\r\n\t\t\t\tthis.split();\r\n\t\t\t\treturn this; //if split return myself to my caller to be added\r\n\t\t\t}\r\n\t\t\tTreeNode result = null;\r\n\t\t\tTreeNode previousTreeNode = null;\r\n\t\t\tTreeNode currentTreeNode = null;\r\n\r\n\t\t\tData currentData = head;\r\n\t\t\twhile (currentData != null) //traverse the current data\r\n\t\t\t{\r\n\t\t\t\t/*\r\n\t\t\t\tif we find the newData in currentData\r\n\t\t\t\tadd the location of the newData to the current one \r\n\t\t\t\t */\r\n\t\t\t\tif (currentData.getWord().equals(newData.getWord()))\r\n\t\t\t\t{\r\n\t\t\t\t\tcurrentData.addPoint((Point) newData.getLocations().get(0));\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//if the newData is less than the currentData then insert there\r\n\t\t\t\tif (newData.getWord().compareTo(currentData.getWord()) < 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tcurrentTreeNode = currentData.getLT();\r\n\t\t\t\t\tif (currentTreeNode != previousTreeNode)\r\n\t\t\t\t\t\tresult = currentTreeNode.insert(newData); //return the result of the insertion\r\n\t\t\t\t\tpreviousTreeNode = currentTreeNode;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//if the newData is greater than the currentData then insert there\r\n\t\t\t\tif ((newData.getWord().compareTo(currentData.getWord()) > 0) && (currentData.nextData() == null))\r\n\t\t\t\t{\r\n\t\t\t\t\tcurrentTreeNode = currentData.getGT();\r\n\t\t\t\t\tif (currentTreeNode != previousTreeNode)\r\n\t\t\t\t\t\tresult = currentTreeNode.insert(newData); //return the result of the insertion\r\n\t\t\t\t\tpreviousTreeNode = currentTreeNode;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tcurrentData = currentData.nextData();\r\n\t\t\t}\r\n\r\n\t\t\t//if the result is a TreeNode then insert it into myself\r\n\t\t\tif (result != null)\r\n\t\t\t{\r\n\t\t\t\t//parent is not full so simply add the data\r\n\t\t\t\tif (!isFull())\r\n\t\t\t\t{\r\n\t\t\t\t\tthis.insertData(result.popData());\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn null;\r\n\t\t}",
"public static <E extends Comparable> TreeNode<E> insertNode(TreeNode<E> root, TreeNode<E> node) {\r\n TreeNode<E> newRoot = TreeNode.copy(root);\r\n \r\n TreeNode<E> parent = newRoot;\r\n \r\n while(true) {\r\n if(node.getValue().compareTo(parent.getValue()) < 0) {\r\n if(parent.getLeft() == null) {\r\n parent.setLeft(node);\r\n break;\r\n } else {\r\n parent.setLeft(TreeNode.copy(parent.getLeft()));\r\n parent = parent.getLeft();\r\n }\r\n } else {\r\n if(parent.getRight() == null) {\r\n parent.setRight(node);\r\n break;\r\n } else {\r\n parent.setRight(TreeNode.copy(parent.getRight()));\r\n parent = parent.getRight();\r\n }\r\n }\r\n }\r\n \r\n return newRoot; \r\n }",
"private Node insert(Node root, T element) {\n\t\tif (root == null)\n\t\t\troot = new Node(element);\n\t\t// left side\n\t\telse if (element.compareTo(root.element) < 0) {\n\t\t\troot.left = insert(root.left, element);\n\t\t\troot.left.parent = root;\n\t\t\t// right side\n\t\t} else if (element.compareTo(root.element) >= 0) {\n\t\t\troot.right = insert(root.right, element);\n\t\t\troot.right.parent = root;\n\t\t}\n\n\t\treturn root;\n\t}",
"private BinarySearchTree insert(BinarySearchTree currentNode, KeyedItem newItem){\r\n\t\t\r\n\t\t//create the object to return\r\n\t\tBinarySearchTree item = null;\r\n\t\t\r\n\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\t//If curretnNode is null, just add the item\r\n\t\t\tif(currentNode == null){\r\n\t\t\t\titem = new BinarySearchTree(newItem,null,null);\r\n\t\t\t\tcurrentNode = item;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//this > newItem\r\n\t\t\telse if( newItem.getKey().compareTo( currentNode.getRoot().getKey() ) < 0)\r\n\t\t\t{\r\n\t\t\t\tif (currentNode.getLeftChild() == null )\r\n\t\t\t\t{\r\n\t\t\t\t\tcurrentNode.attachLeftSubtree(new BinarySearchTree(newItem,null,null));\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tinsert(currentNode.getLeftChild(), newItem);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//this < newItem\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tif (currentNode.getRightChild() == null )\r\n\t\t\t\t{\r\n\t\t\t\t\tcurrentNode.attachRightSubtree(new BinarySearchTree(newItem,null,null));\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tinsert(currentNode.getRightChild(), newItem);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t//this exception will be thrown when we try to insert in a\r\n\t\t//blank tree. We wont be able to call getRoot() on a null\r\n\t\t//reference\r\n\t\t} catch (TreeException e) {\r\n\t\t\tcurrentNode.setRootItem(newItem);\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\t\r\n\t\treturn item;\r\n\t}",
"private BSTNode<T> insertHelper(BSTNode<T> node, T newData){\n\t\tif (node == null) {\n\t\t\tBSTNode<T> newNode = new BSTNode<T>(newData);\n\t\t\treturn newNode;\n\t\t} else if (newData.compareTo(node.getData()) < 0) {\n\t\t\tnode.setLeft(insertHelper(node.getLeft(), newData));\n\t\t} else {\n\t\t\tnode.setRight(insertHelper(node.getRight(), newData));\n\t\t}\n\t\treturn node;\n\t}",
"@Override\n\tpublic void insert(Node node) {\n\t\tchildren.add(node);\n\t}",
"public void insert(Comparable<T> item)\r\n {\r\n root = insert(root, item);\r\n }",
"public Node insert(Key key, Value value) { \r\n // inserting into an empty tree results in a single value leaf node\r\n return new LeafNode(key,value);\r\n }",
"public static void insert(TreeNode root, int key) {\n\t\tcounter++;\r\n\r\n\t\t// key less than the value of root.\r\n\t\tif (key < root.item) {\r\n\t\t\tif (root.left == null) {\r\n\t\t\t\tTreeNode node = new TreeNode(null, key, null);\r\n\t\t\t\troot.left = node;\r\n\t\t\t} else {\r\n\t\t\t\tinsert(root.left, key);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (root.right == null) {\r\n\t\t\t\tTreeNode node = new TreeNode(null, key, null);\r\n\t\t\t\troot.right = node;\r\n\t\t\t} else {\r\n\t\t\t\tinsert(root.right, key);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void insert(TKey key, TValue data) {\n Node n = new Node(key, data, true); // nodes start red\n // normal BST insert; n will be placed into its initial position.\n // returns false if an existing node was updated (no rebalancing needed)\n boolean insertedNew = bstInsert(n, mRoot); \n if (!insertedNew) return;\n // check cases 1-5 for balance violations.\n checkBalance(n);\n }",
"public void insert(int data) { \n\t\troot = insert(root, data);\t\n\t}",
"public void insert(Integer key){\r\n\t\tint start=this.root;\r\n\t\tint currentPos=avail;\r\n\t\tint temp=-1;\r\n\t\twhile(increaseCompares() && start!=-1) {\r\n\t\t\ttemp=start;\r\n\t\t\tcompares++;\r\n\t\t\tif(increaseCompares() && key<getKey(start)) {\r\n\t\t\t\tstart=getLeft(start);\r\n\t\t\t\tcompares++;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tstart=getRight(start);\r\n\t\t\t\tcompares++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//Tree is empty. New Node is now root of tree\r\n\t\tif(increaseCompares() && temp==-1) {\r\n\t\t\tsetRoot(0);\r\n\t\t\tcompares++;\r\n\t\t\tsetKey(avail, key);\r\n\t\t\tcompares++;\r\n\t\t\tavail=getRight(currentPos);\r\n\t\t\tcompares++;\r\n\t\t\tsetRight(currentPos,-1);\r\n\t\t\tcompares++;\r\n\t\t}\r\n\t\t//Compare values and place newNode either left or right of previous Node\r\n\t\telse if(increaseCompares() && key<getKey(temp)) {\r\n\t\t\t//Set previous (parent) Node of new inserted Node\r\n\t\t\tsetLeft(temp, currentPos);\r\n\t\t\tcompares++;\r\n\t\t\t//Initialize line of new Node\r\n\t\t\tsetKey(currentPos,key);\r\n\t\t\tcompares++;\r\n\t\t\tavail=getRight(currentPos);\r\n\t\t\tcompares++;\r\n\t\t\tsetRight(currentPos,-1);\r\n\t\t\tcompares++;\r\n\t\t}\r\n\t\telse {\r\n\t\t\t//Set previous (parent) Node of new inserted Node\r\n\t\t\tsetRight(temp, currentPos);\r\n\t\t\tcompares++;\r\n\t\t\t//Initialize line of new Node\r\n\t\t\tsetKey(currentPos,key);\r\n\t\t\tcompares++;\r\n\t\t\tavail=getRight(currentPos);\r\n\t\t\tcompares++;\r\n\t\t\tsetRight(currentPos,-1);\r\n\t\t\tcompares++;\r\n\t\t}\r\n\t}",
"public TreeNode insert(TreeNode root, int key) {\n if (root == null) {\n root = new TreeNode(key);\n return root;\n }\n TreeNode cur = root, par = root;\n while (cur != null) {\n par = cur;\n if (cur.key == key) {\n return root;\n }\n if (key < cur.key) {\n cur = cur.left;\n } else {\n cur = cur.right;\n }\n }\n // this is when cur is null (out of the while)\n if (key < par.key) {\n par.left = new TreeNode(key);\n } else {\n par.right = new TreeNode(key);\n }\n \n return root;\n }",
"static Node BSTInsert(Node tmp,int key)\n {\n //if the tree is empty it will insert the new node as root\n \n if(tmp==null)\n {\n tmp=new Node(key);\n \n return tmp;\n }\n \n else\n \n rBSTInsert(tmp,key);\n \n \n return tmp;\n }",
"public void insert (T value) {\n if (left == null) {\n left = new BinaryTreeNode<>(value);\n return;\n }\n\n if (right == null) {\n right = new BinaryTreeNode<>(value);\n return;\n }\n\n if (getHeight(left) <= getHeight(right)) {\n left.insert(value);\n } else {\n right.insert(value);\n }\n }",
"void insert(K key, V value) {\r\n\r\n\r\n Node child = getChild(key);\r\n child.insert(key, value);\r\n // to check if the child is overloaded\r\n if (child.isOverflow()) {\r\n Node sibling = child.split();\r\n insertChild(sibling.getFirstLeafKey(), sibling);\r\n }\r\n\r\n // if the node is full then it requires to split\r\n if (root.isOverflow()) {\r\n Node sibling = split();\r\n InternalNode newRoot = new InternalNode();\r\n newRoot.keys.add(sibling.getFirstLeafKey());\r\n newRoot.children.add(this);\r\n newRoot.children.add(sibling);\r\n root = newRoot;\r\n }\r\n\r\n }",
"@Override\r\n public void insert(K key, V value) {\r\n // call insert of the root\r\n root.insert(key, value);\r\n }",
"TreeNode addChild(TreeNode node);",
"public void insert(T value) {\n\n // Assigns the new node as the root if root is empty.\n if (root == null) root = new Node<>(value);\n\n // Otherwise, traverses the tree until an appropriate empty branch is found.\n else insertRecursively(root, value);\n }",
"public void insert(T x) {\n\t\tif (data == null) {\n\t\t\t// root = new MyTreeNode<T>();\n\t\t\tdata = x;\n\t\t\treturn;\n\t\t}\n\n\t\tMyTreeNode<T> node = new MyTreeNode<T>();\n\t\tnode.data = x;\n\n\t\tif (x.compareTo(data) < 0) {\n\t\t\tif (leftChild == null) {\n\t\t\t\tleftChild = node;\n\t\t\t} else {\n\t\t\t\tleftChild.insert(x);\n\t\t\t}\n//\t\t\t\t\t\t\tpointerNode = pointerNode.leftChild;\n\n//\t\t\t\t\t\t\tif (pointerNode == null) {\n//\n//\t\t\t\t\t\t\t\tparent.leftChild = insert;\n//\n//\t\t\t\t\t\t\t\treturn;\n//\n//\t\t\t\t\t\t\t}\n\t\t} else if (x.compareTo(data) > 0) {\n\t\t\tif (rightChild == null) {\n\t\t\t\trightChild = node;\n\t\t\t} else {\n\t\t\t\trightChild.insert(x);\n\t\t\t}\n\t\t} else {\n\n\t\t\tif (leftChild == null) {\n\t\t\t\tleftChild = node;\n\t\t\t} else {\n\t\t\t\tleftChild.insert(x);\n\t\t\t}\n\n\t\t\tif (rightChild == null) {\n\t\t\t\trightChild = node;\n\t\t\t} else {\n\t\t\t\trightChild.insert(x);\n\t\t\t}\n\n\t\t}\n\n\t}",
"private static void leftRightInsert() {\n System.out.println(\"LeftRight Tree Insert Case\");\n AVLTree<Integer> tree1 = new AVLTree<Integer>();\n System.out.println(\"Before insert nodes, tree is empty: \"+tree1.isEmpty());\n \n Integer[] numbers = {50, 60, 30, 10, 40, 35};\n for (int i=0; i<numbers.length; i++) {\n tree1.insert(numbers[i]);\n }\n \n System.out.println(\"After insert nodes, tree is empty: \"+tree1.isEmpty());\n System.out.println(\"Tree looks like: \");\n tree1.printTree();\n tree1.print();\n System.out.println(\"Tree is balanced: \"+tree1.checkForBalancedTree());\n System.out.println(\"Tree is a BST: \"+tree1.checkForBinarySearchTree()+\"\\n\");\n }",
"public void insert(Node given){\n\t\tlength++;\n\t\tString retVar = \"\";\n\t\tNode curNode = root;\n\t\twhile (!curNode.isLeaf()){\n\t\t\tif (curNode.getData() > given.getData()){\n\t\t\t\tcurNode = curNode.getLeft();\n\t\t\t}\n\t\t\telse{\n\t\t\t\tcurNode = curNode.getRight();\n\t\t\t}\n\t\t}\n\t\tif (curNode.getData() > given.getData()){ \n\t\t\tcurNode.setLeft(given);\n\t\t}\n\t\telse{\n\t\t\tcurNode.setRight(given);\n\t\t}\n\t\tmyLazySearchFunction = curNode;\n\t}",
"@Override\r\n\tpublic void insert(T element) {\r\n\r\n\t\tif (element != null) {\r\n\t\t\tBSTNode<T> nilParent = new BSTNode<>(); //Para o caso de estarmos inserindo a raiz (que tem parent NIL)\r\n\t\t\tinsert(this.root, element, nilParent);\r\n\t\t}\r\n\r\n\t}",
"private BinaryNode<E> bstInsert(E x, BinaryNode<E> t, BinaryNode<E> parent) {\n\n if (t == null)\n return new BinaryNode<>(x, null, null, parent);\n\n int compareResult = x.compareTo(t.element);\n\n if (compareResult < 0) {\n t.left = bstInsert(x, t.left, t);\n } else {\n t.right = bstInsert(x, t.right, t);\n }\n return t;\n }",
"public void insert(int key)\n\t{\n\t\tTreeHeapNode newNode = new TreeHeapNode();\n\t\tnewNode.setKey(key);\n\t\tif(numNodes == 0) root = newNode;\n\t\telse\n\t\t{\n\t\t\t//find place to put newNode\n\t\t\tTreeHeapNode current = root;\n\t\t\tint n = numNodes+1;\n\t\t\tint k;\n\t\t\tint[] path = new int[n];\n\t\t\tint j = 0;\n\t\t\twhile(n >= 1)\n\t\t\t{\n\t\t\t\tpath[j] = n % 2;\n\t\t\t\tn /= 2;\n\t\t\t\tj++;\n\t\t\t}\n\t\t\t//find parent of new child\n\t\t\tfor(k = j-2; k > 0; k--)\n\t\t\t{\n\t\t\t\tif(path[k] == 1)\n\t\t\t\t\tcurrent = current.rightChild;\n\t\t\t\telse\n\t\t\t\t\tcurrent = current.leftChild;\n\t\t\t}\n\t\t\t//find which child new node should go into\n\t\t\t\n\t\t\tif(current.leftChild != null)\n\t\t\t{\n\t\t\t\tcurrent.rightChild = newNode;\n\t\t\t\tnewNode.isLeftChild = false;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcurrent.leftChild = newNode;\n\t\t\t\tnewNode.isLeftChild = true;\n\t\t\t}\n\t\t\tnewNode.parent = current;\n\t\t\t\n\t\t\ttrickleUp(newNode);\n\t\t}\n\t\tnumNodes++;\n\t}",
"private TreeNode<K, V> put(TreeNode<K, V> node, K key, V value){\r\n \r\n // If the node is null, create a new node with the information\r\n // passed into the function\r\n if(node == null){\r\n return new TreeNode<>(key, value);\r\n }\r\n \r\n // Compare the keys recursively to find the correct spot to insert\r\n // the new node or if the key already exists\r\n if(node.getKey().compareTo(key) > 0){\r\n // If the current node has a value greater than our key, go left\r\n node.left = put(node.left, key, value);\r\n }\r\n else if(node.getKey().compareTo(key) < 0){\r\n // If the current node has a value less than our key, go right\r\n node.right = put(node.right, key, value);\r\n }\r\n else{\r\n // If the keys are equal, only update the value\r\n node.setValue(value);\r\n }\r\n \r\n // Return the updated or newly inserted node\r\n return node;\r\n }",
"private btNode insert(btNode node, int data)\r\n {\r\n if (node == null)\r\n node = new btNode(data);\r\n else\r\n {\r\n if (data <= node.getData())\r\n node.left = insert(node.left, data);\r\n else\r\n node.right = insert(node.right, data);\r\n }\r\n return node;\r\n }",
"static void rBSTInsert(Node tmp,int key)\n {\n // if the new value is greater than root then it will be inserted to the right subtree\n if(tmp.val<key)\n {\n if(tmp.right==null)\n {\n tmp.right=new Node(key);\n \n \n return;\n }\n \n else rBSTInsert(tmp.right,key);\n \n \n }\n // otherwise the new value will be inserted to the left subtree\n else\n {\n if(tmp.left==null)\n {\n tmp.left=new Node(key);\n \n return;\n }\n \n rBSTInsert(tmp.left,key);\n }\n return;\n }",
"public Node insertBefore(Node node);",
"public void insert(int key)\n {\n root = insertRec(root,key);\n }",
"private Node insert(Node curr, Node node) {\n\t\tif(curr==null){\n\t\t\tcurr = node;\n\t\t\treturn curr;\n\t\t}\n\t\telse if(curr.getId() > node.getId()){\n\t\t\t curr.setLeft(insert(curr.getLeft(),node));\n\t\t}\n\t\telse if(curr.getId() < node.getId()){\n\t\t\t curr.setRight(insert(curr.getRight(),node));\n\t\t}\n\t\treturn curr;\n\t}",
"Node insertBinary(Node node, int key) {\n // BST rotation\n if (node == null) {\n return (new Node(key));\n }\n if (key < node.key) {\n node.left = insertBinary(node.left, key);\n } else if (key > node.key) {\n node.right = insertBinary(node.right, key);\n } else\n {\n return node;\n }\n\n // Update height of descendant node\n node.height = 1 + maxInt(heightBST(node.left),\n heightBST(node.right));\n int balance = getBalance(node); \n \n // If this node becomes unbalanced, then there \n // are 4 cases Left Left Case \n if (balance > 1 && key < node.left.key) \n return rightRotate(node); \n \n // Right Right Case \n if (balance < -1 && key > node.right.key) \n return leftRotate(node); \n \n // Left Right Case \n if (balance > 1 && key > node.left.key) { \n node.left = leftRotate(node.left); \n return rightRotate(node); \n } \n \n // Right Left Case \n if (balance < -1 && key < node.right.key) { \n node.right = rightRotate(node.right); \n return leftRotate(node); \n } \n \n /* return the (unchanged) node pointer */\n return node; \n }",
"public void insert(SplayNode n) {\n\t\t\t SplayNode y = null;\n\t\t\t SplayNode temp = this.root;\n\t\t while(temp != null) {\n\t\t y = temp;\n\t\t if(n.data < temp.data)\n\t\t temp = temp.left;\n\t\t else\n\t\t temp = temp.right;\n\t\t }\n\t\t n.parent = y;\n\n\t\t if(y == null) //newly added node is root\n\t\t this.root = n;\n\t\t else if(n.data < y.data)\n\t\t y.left = n;\n\t\t else\n\t\t y.right = n;\n\n\t\t this.splay(n);\n\t\t }",
"public boolean insertItem(BPTreeNodeItem item);",
"public void insert(T key, U data){\n\t\t\n\t\tAVLNode<T, U> parent = null;\n\t\tAVLNode<T, U> node = this.root;\n\t\tAVLNode<T, U> newNode = new AVLNode<T, U>(key, data);\n\t\t\n\t\tthis.amountOfNodes++;\n\t\t\n\t\twhile(node != null){\n\t\t\tparent = node;\n\t\t\tif(newNode.getKey().compareTo(node.getKey()) < 0){\n\t\t\t\tnode = node.getLeft();\n\t\t\t}else{\n\t\t\t\tnode = node.getRight();\n\t\t\t}\n\t\t}\n\t\t\n\t\tnewNode.setParent(parent);\n\t\t\n\t\tif(parent == null){ //It is the first element of the tree.\n\t\t\tthis.root = newNode;\n\t\t}else if(newNode.getKey().compareTo(parent.getKey()) < 0){\n\t\t\tparent.setLeft(newNode);\n\t\t}else{\n\t\t\tparent.setRight(newNode);\n\t\t}\n\t\tcomputeHeights(newNode);\n\t\tthis.balanceTree(parent);\n\t}",
"public void testInsert01() {\r\n\t\tBTree<String, Integer> bt = new BTree<String, Integer>(4);\r\n\r\n\t\t// Growing the leaf\r\n\t\tbt.set(\"010\", 1);\r\n\t\tbt.set(\"020\", 2);\r\n\t\tbt.set(\"030\", 3);\r\n\t\tbt.set(\"040\", 4);\r\n\t\tassertEquals(bt.root.dump(), \"[010=1, 020=2, 030=3, 040=4]\");\r\n\r\n\t\t// Leaf split (middle) and new root created\r\n\t\tbt.set(\"025\", 5);\r\n\t\tassertEquals(bt.root.dump(), \"[[010=1, 020=2], [025=5, 030=3, 040=4]]\");\r\n\r\n\t\t// Growing the right of the right side of the tree\r\n\t\t// Leaf split (last) and new child added to root\r\n\t\tbt.set(\"050\", 6);\r\n\t\tbt.set(\"060\", 7);\r\n\t\tassertEquals(bt.root.dump(), \"[[010=1, 020=2], [025=5, 030=3], [040=4, 050=6, 060=7]]\");\r\n\r\n\t\t// Growing the left of the right side of the tree\r\n\t\t// Leaf split (first) and new child added to root\r\n\t\tbt.set(\"035\", 8);\r\n\t\tbt.set(\"034\", 9);\r\n\t\tassertEquals(bt.root.dump(),\r\n\t\t\t\t\"[[010=1, 020=2], [025=5, 030=3], [034=9, 035=8, 040=4], [050=6, 060=7]]\");\r\n\r\n\t\t// Growing the right of the right side of the tree\r\n\t\t// Node split (last) and new root created\r\n\t\tbt.set(\"070\", 10);\r\n\t\tassertEquals(bt.root.dump(),\r\n\t\t\t\t\"[[[010=1, 020=2], [025=5, 030=3]], [[034=9, 035=8, 040=4], [050=6, 060=7, 070=10]]]\");\r\n\r\n\t\t// Testing key update\r\n\t\tbt.set(\"010\", -1);\r\n\r\n\t\tassertEquals(bt.get(\"010\"), Integer.valueOf(-1));\r\n\t\tassertEquals(bt.get(\"020\"), Integer.valueOf(2));\r\n\t\tassertEquals(bt.get(\"030\"), Integer.valueOf(3));\r\n\t\tassertEquals(bt.get(\"040\"), Integer.valueOf(4));\r\n\t\tassertEquals(bt.get(\"025\"), Integer.valueOf(5));\r\n\t\tassertEquals(bt.get(\"050\"), Integer.valueOf(6));\r\n\t\tassertEquals(bt.get(\"060\"), Integer.valueOf(7));\r\n\t\tassertEquals(bt.get(\"035\"), Integer.valueOf(8));\r\n\t\tassertEquals(bt.get(\"034\"), Integer.valueOf(9));\r\n\t\tassertEquals(bt.get(\"070\"), Integer.valueOf(10));\r\n\t\tassertEquals(bt.get(\"xyz\"), null);\r\n\t}",
"public Node insertNode(K key, V value) {\n\t\tNode newNode = new Node(key, value);// first we need to create the new\n\t\t\t\t\t\t\t\t\t\t\t// node\n\t\tNode currentNode = this.getRoot();// then we move to the root ot the\n\t\t\t\t\t\t\t\t\t\t\t// tree that has called the method\n\t\tNode currentNodeParent = mSentinel;// the parent of the root is of\n\t\t\t\t\t\t\t\t\t\t\t// course sentinel\n\t\twhile (currentNode != mSentinel) {// and while the current node(starting\n\t\t\t\t\t\t\t\t\t\t\t// from the root) is not a sentinel\n\t\t\tcurrentNodeParent = currentNode;// then remember this node as a\n\t\t\t\t\t\t\t\t\t\t\t// parent\n\t\t\tif (key.compareTo(currentNode.getKey()) < 0) {// and appropriate its\n\t\t\t\tcurrentNode = currentNode.getLeftChild();// left\n\t\t\t} else {// or\n\t\t\t\tcurrentNode = currentNode.getrightChild();// right child as the\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// next current node\n\t\t\t}\n\t\t}\n\t\t// we iterate through the described loop in order to get to the\n\t\t// appropriate place(in respect to the given key) where the new node\n\t\t// should be put\n\t\tnewNode.setParent(currentNodeParent);// we make the new node's parent\n\t\t\t\t\t\t\t\t\t\t\t\t// the last non empty node that\n\t\t\t\t\t\t\t\t\t\t\t\t// we've reached\n\t\tif (currentNodeParent == mSentinel) {\n\t\t\tmRoot = newNode;// if there is no such node then the tree is empty\n\t\t\t\t\t\t\t// and our node is actually going to be the root\n\t\t} else {\n\t\t\tif (key.compareTo(currentNodeParent.getKey()) < 0) {// otherwise we\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// put our new\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// node\n\t\t\t\tcurrentNodeParent.setLeftChild(newNode);// as a left\n\t\t\t} else { // or\n\t\t\t\tcurrentNodeParent.setrightChild(newNode);// right child of the\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// last node we've\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// reached\n\t\t\t}\n\t\t}\n\t\treturn newNode;\n\t}",
"private static void rightLeftInsert() {\n System.out.println(\"RightLeft Tree Insert Case\");\n AVLTree<Integer> tree1 = new AVLTree<Integer>();\n System.out.println(\"Before insert nodes, tree is empty: \"+tree1.isEmpty());\n \n Integer[] numbers = {50, 60, 30, 70, 55, 57};\n for (int i=0; i<numbers.length; i++) {\n tree1.insert(numbers[i]);\n }\n \n System.out.println(\"After insert nodes, tree is empty: \"+tree1.isEmpty());\n System.out.println(\"Tree looks like: \");\n tree1.printTree();\n tree1.print();\n System.out.println(\"Tree is balanced: \"+tree1.checkForBalancedTree());\n System.out.println(\"Tree is a BST: \"+tree1.checkForBinarySearchTree()+\"\\n\");\n }",
"public static Node insert(Node root,int data) {\r\n\t\t/* If the tree is empty, return a new node */\r\n if (root == null) { \r\n root = new Node(data); \r\n return root; \r\n } \r\n \r\n /* Otherwise, recur down the tree */\r\n if (data < root.data) \r\n root.left = insert(root.left, data); \r\n else if (data > root.data) \r\n root.right = insert(root.right, data); \r\n \r\n /* return the (unchanged) node pointer */\r\n return root; \r\n }",
"@Override\n public void insert(K key) {\n try {\n this.rootNode = insertNode(this.rootNode, key);\n } catch (DuplicateKeyException e) {\n System.out.println(e.getMessage());\n } catch (IllegalArgumentException e) {\n System.out.println(e.getMessage());\n }\n }",
"private AVLTreeNode<E> insert(E value) {\n int cmp = this.getValue().compareTo(value);\n AVLTreeNode<E> result;\n if(cmp == 0){\n result = null;\n } else if(cmp < 0){\n result = this.getRight() != null ? this.getRight().insert(value) : createTreeNode(value);\n if(result != null){\n this.setRight(result);\n }\n } else {\n result = this.getLeft() != null ? this.getLeft().insert(value) : createTreeNode(value);\n if(result != null){\n this.setLeft(result);\n }\n }\n return result == null ? result : balancing(this);\n }",
"protected int insert(int toAdd){\n\n tnode object = new tnode();\n\n return object.insert(toAdd);\n\n }",
"public static void treeInsert(Node root, int newData) {\r\n if (newData <= root.value) {\r\n if (root.left != null)\r\n treeInsert(root.left, newData);\r\n else\r\n root.left = new Node(newData);\r\n } else {\r\n if (root.right != null)\r\n treeInsert(root.right, newData);\r\n else\r\n root.right = new Node(newData);\r\n }\r\n }",
"@Override\r\n\tpublic int insert(T element) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tthis.size++;\r\n\t\tBSTNode<T> z = new BSTNode();\r\n\t\tz.data = element;\r\n\t\tz.parent = null;\r\n\t\tz.left = null;\r\n\t\tz.right = null;\r\n\t\t\r\n\t\t\r\n\t\tBSTNode<T> x = this.root;\r\n\t\tBSTNode<T> y = null;//trailing\r\n\t\t\r\n\t\tint traversals = 0;\r\n\t\twhile(x!= null) {\r\n\t\t\ttraversals++;\r\n\t\t\ty=x;\r\n\t\t\tif(z.data.compareTo(x.data)<0) {\r\n\t\t\t\tx = x.left;\r\n\t\t\t}else {\r\n\t\t\t\tx = x.right;\r\n\t\t\t}\r\n\t\t}\r\n\t\tz.parent = y;\r\n\t\tif(y==null) {\r\n\t\t\tthis.root=z;\r\n\t\t}else if(z.data.compareTo(y.data)<0) {\r\n\t\t\ty.left=z;\r\n\t\t}else {\r\n\t\t\ty.right=z;\r\n\t\t}\r\n\t\t\r\n\t\treturn traversals;\r\n\t}",
"void insert(int val){\n\t\tthis.root = insertHelper(root, val);\n\t}",
"public void insert(T e) {\n if (e == null) return;\n root = insert(root, e);\n }",
"@Override\n public boolean insert(E e) {\n \tif(size() == 0) {\n \t\troot = new TreeNode<E>(e);\n \t\tsize++;\n \t\treturn true;\n \t}\n \tTreeNode<E> parent = findInsertPoint(e, root, null);\n \tif(e.compareTo(parent.element) < 0) {\n \t\tparent.left = new TreeNode<E>(e);\n \t\tsize++;\n \t\treturn true;\n \t} else if(e.compareTo(parent.element) > 0){\n \t\tparent.right = new TreeNode<E>(e);\n \t\tsize++;\n \t\treturn true;\n \t}\n \tthrow new IllegalArgumentException(\"Invalid Entry\");\n \n }",
"public void insert(int newData) {\n\t\t\n\t\t//check if newdata less than current data\n\t\tif(newData < data) {\n\t\t\t\n\t\t\t// if left equal null\n\t\t\tif(left == null) {\n\t\t\t\tleft = new BinaryTreeNode(newData);\n\t\t\t} else { // left != null\n\t\t\t\tleft.insert(newData);\n\t\t\t}\n\t\t\t\n\t\t\t// check data\n\t\t} else if(newData > data) {\n\t\t\t\n\t\t\t// if right equal null\n\t\t\tif(right == null) {\n\t\t\t\tright = new BinaryTreeNode(newData);\n\t\t\t} else { // right != null\n\t\t\t\tright.insert(newData);\n\t\t\t} //end of if else \n\t\t} else {\n\t\t\tSystem.out.println(\"Duplicate - not adding\" + newData);\n\t\t} // end of if else \n\t}",
"public void insert(int data)\r\n {\r\n root = insert(root, data);\r\n }",
"public void insert(Key key, Value value){\n this.root = this.insertHelper(key, value, root);\n }",
"public void insert(Point2D p) {\n if (this.n ==0) {\n this.root = new Node(p, true, new RectHV(0,0,1,1));\n this.n++;\n } else {\n if (insert1(root, p)) this.n++;\n }\n }",
"public void insert(Point p) {\n if (p == null) {\n System.out.println(\"Illegal point argument\");\n }\n if (head == null || !search(p)) { //if root is empty or when the point isn't in the tree we insert it\n size++;\n head = insert(head, p, true);\n }\n }",
"public void treeInsert(TernaryTreeNode root, int newData) {\n if (newData<=root.data)\n {\n if (root.left!=null) \n treeInsert(root.left, newData);\n else \n root.left = new TernaryTreeNode(newData);\n }\n else \n {\n if (root.right!=null) \n treeInsert(root.right, newData);\n else\n root.right = new TernaryTreeNode(newData);\n }\n }"
] | [
"0.801497",
"0.7969684",
"0.7937543",
"0.7770442",
"0.75258595",
"0.7465819",
"0.7447335",
"0.7435744",
"0.738449",
"0.73796844",
"0.7349243",
"0.7320422",
"0.73120177",
"0.7311722",
"0.72944427",
"0.7280758",
"0.7252483",
"0.7248236",
"0.72392905",
"0.72368914",
"0.72186637",
"0.7205025",
"0.7192829",
"0.7176152",
"0.7162992",
"0.71578187",
"0.7140551",
"0.7116772",
"0.7113683",
"0.710055",
"0.70812106",
"0.70657635",
"0.7053681",
"0.7048358",
"0.7045104",
"0.704401",
"0.70386374",
"0.70237494",
"0.70183635",
"0.7012259",
"0.7008049",
"0.69869125",
"0.6982398",
"0.6980393",
"0.69796085",
"0.696173",
"0.6960538",
"0.69589305",
"0.6957955",
"0.6956144",
"0.69441134",
"0.6937073",
"0.692266",
"0.6920005",
"0.69163734",
"0.6906578",
"0.69041264",
"0.6897867",
"0.68974876",
"0.689402",
"0.68929",
"0.6888851",
"0.6873874",
"0.68702114",
"0.6868074",
"0.6860079",
"0.68534845",
"0.6852648",
"0.68370014",
"0.6824187",
"0.6821825",
"0.680609",
"0.6802953",
"0.68028",
"0.67891127",
"0.6783522",
"0.678258",
"0.67813534",
"0.67709655",
"0.6770477",
"0.6765954",
"0.676347",
"0.6758703",
"0.6749948",
"0.6738437",
"0.67372423",
"0.6734364",
"0.6732546",
"0.67320263",
"0.67286634",
"0.6722321",
"0.67220116",
"0.67135644",
"0.67019635",
"0.6700049",
"0.6698527",
"0.6697567",
"0.6691075",
"0.6690677",
"0.66868114"
] | 0.6972788 | 45 |
levelOrder traversal of Binary Tree nonrecursive approach | public void levelOrderTraversal(TreeNode<T> root) {
if(null == root) {
return;
} else {
LinkedList<TreeNode<T>> list = new LinkedList<TreeNode<T>>();
list.add(root);
while(!list.isEmpty()) {
TreeNode<T> tempNode = list.removeFirst();
System.out.println(tempNode);
if(null != tempNode.getLeftChild()) {
list.addLast(tempNode.getLeftChild());
}
if(null != tempNode.getRightChild()) {
list.addLast(tempNode.getRightChild());
}
tempNode = null;
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void levelOrderTraversal() {\n\t\tif(root==null) {\n\t\t\tSystem.out.println(\"\\nBinary node is empty.\");\n\t\t\treturn;\n\t\t}\n\t\tQueue<OO8BinaryTreeNode> queue = new LinkedList<OO8BinaryTreeNode>();\n\t\tqueue.add(root);\n\t\tOO8BinaryTreeNode currentNode = null;\n\t\twhile(!queue.isEmpty()) {\n\t\t\tcurrentNode=queue.remove();\n\t\t\tSystem.out.print(currentNode.getValue() + \" \");\n\t\t\tif(currentNode.getLeftNode()!=null)\n\t\t\t\tqueue.add(currentNode.getLeftNode());\n\t\t\tif(currentNode.getRightNode()!=null)\n\t\t\t\tqueue.add(currentNode.getRightNode());\n\t\t}\n\t\tSystem.out.println();\n\t}",
"public void traverseLevelOrder() {\n\t\tif (root == null) {\n\t\t\treturn;\n\t\t}\n\n\t\tLinkedList<Node> ls = new LinkedList<>();\n\t\tls.add(root);\n\t\twhile (!ls.isEmpty()) {\n\t\t\tNode node = ls.remove();\n\t\t\tSystem.out.print(\" \" + node.value);\n\t\t\tif (node.left != null) {\n\t\t\t\tls.add(node.left);\n\t\t\t}\n\t\t\tif (node.right != null) {\n\t\t\t\tls.add(node.right);\n\t\t\t}\n\t\t}\n\t}",
"public void levelOrderTraversal() {\n LinkedList<Node> queue = new LinkedList<>();\n queue.add(root);\n\n while (!queue.isEmpty()) {\n Node removed = queue.removeFirst();\n System.out.print(removed.data + \" \");\n if (removed.left != null) queue.add(removed.left);\n if (removed.right != null) queue.add(removed.right);\n }\n\n System.out.println();\n }",
"public static void main(String[] args){\n TreeNode root = new TreeNode(1);\n root.left = new TreeNode(2);\n root.right = new TreeNode(2);\n root.left.left = new TreeNode(6);\n root.left.right = new TreeNode(4);\n root.right.left = new TreeNode(4);\n root.right.right = new TreeNode(6);\n \n System.out.println(levelOrder(root)); // output: [[1], [2, 2], [6, 4, 4, 6]]\n }",
"public void levelOrderTraversal(){\n System.out.println(\"levelOrderTraversal\");\n\n Queue<Node> queue = new ArrayCircularQueue<>();\n\n if(root!=null){\n queue.insert(root);\n }\n\n while(!queue.isEmpty()){\n Node node = queue.delete();\n System.out.print(node.getData() + \" \");\n if(node.getLeft()!=null){\n queue.insert(node.getLeft());\n }\n if(node.getRight()!=null){\n queue.insert(node.getRight());\n }\n }\n System.out.println();\n }",
"public static List<List<Integer>> levelOrder(TreeNode root) {\n // Queue for implementing BFS\n Queue<TreeNode> nodeQueue = new LinkedList<TreeNode>();\n // Final list of list of nodes at each level\n List<List<Integer>> levelOrderTraversal = new LinkedList<List<Integer>>();\n\n // If root is null, no nodes in the tree, return the empty list of list of nodes for level-order traversal\n if(root == null) {\n return levelOrderTraversal;\n }\n\n // Enqueue initial node (root)\n nodeQueue.offer(root);\n while(!nodeQueue.isEmpty()) {\n // Get the fixed(!, important) size of the queue, which returns the node count in the current level.\n // Do not use queue.size() in the for loop later, as the size of queue will change.\n int nodeCountInLevel = nodeQueue.size(); // Number of nodes in the queue is fixed at this point, for the current level\n\n // Create Empty list of nodes for the current level\n List<Integer> nodesInLevel = new LinkedList<Integer>();\n\n // Iterate over all nodes in the current level, add them to nodesInLevel list, add their children to queue,\n // dequeue the node itself from the queue.\n for(int i=0; i < nodeCountInLevel; i++){\n // Get current node\n TreeNode currentNode = nodeQueue.peek();\n // Add left / right children of current node, if they are not null\n if(currentNode.left != null){\n nodeQueue.offer(currentNode.left);\n }\n if(currentNode.right != null){\n nodeQueue.offer(currentNode.right);\n }\n // Remove the current node from queue, and add it to final nodesInLevel list\n nodesInLevel.add(nodeQueue.poll().val);\n }\n // Add nodes in current level to final list of list of nodes\n levelOrderTraversal.add(nodesInLevel);\n }\n return levelOrderTraversal;\n }",
"static void levelOrder(Node root) {\n // create a node queue\n Queue<Node> queue = new LinkedList<>();\n queue.add(root);\n while (!queue.isEmpty()) {\n Node node = queue.remove();\n // if node print value\n System.out.printf(\"%d \", node.data);\n // if left node not null add child node to the queue\n if (node.left != null)\n queue.add(node.left);\n // if right node not null add child node to the queue\n if (node.right != null)\n queue.add(node.right);\n }\n }",
"public void reverseLevelOrderTraversel(TreeNode root)\r\n\t{\r\n\t\tif(root == null)\r\n\t\t{\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tQueue<TreeNode> que = new LinkedList<>();\r\n\t\tStack<TreeNode> stack = new Stack<TreeNode>();\r\n\t\t\r\n\t\tque.add(root);\r\n\t\twhile(que.size()>0)\r\n\t\t{\r\n\t\t\tTreeNode element=que.remove();\r\n\t\t\tif(element.right!=null)\r\n\t\t\t{\r\n\t\t\t\tque.add(element.right);\r\n\t\t\t}\r\n\t\t\tif(element.left!=null)\r\n\t\t\t{\r\n\t\t\t\tque.add(element.left);\r\n\t\t\t}\r\n\t\t\tstack.push(element);\r\n\t\t}\r\n\t\twhile(stack.size()>0)\r\n\t\t{\r\n\t\t\tSystem.out.print(stack.pop().data+\" \");\r\n\t\t}\r\n\t\t\t\r\n\t}",
"@Test\n public void levelOrder() throws Exception {\n Node node = new Node(150);\n node.setLeft(new Node(120));\n node.setRight(new Node(40));\n Node root = new Node(110);\n root.setLeft(new Node(80));\n root.setRight(node);\n\n Queue<Integer> expected = new LinkedList<Integer>();\n expected.add(110);\n expected.add(80);\n expected.add(150);\n expected.add(120);\n expected.add(40);\n BinarySearchTree.levelOrder(root);\n assertEquals(expected, BinarySearchTree.printQ);\n }",
"public static void main(String[] args) {\n Node root = new Node(1);\n\n Node left = new Node(2);\n left.left = new Node(4);\n left.right = new Node(3);\n\n Node right = new Node(5);\n right.left = new Node(6);\n right.right = new Node(7);\n\n root.left = left;\n root.right = right;\n\n Traversal traversal = new Traversal();\n traversal.preOrder(root);\n System.out.println();\n traversal.postOrder(root);\n System.out.println();\n traversal.inOrder(root);\n System.out.println();\n traversal.levelOrder(root);\n //System.out.println(checkBST(root));\n }",
"public void inOrderTraverseRecursive();",
"public void traverseLevelOrder() {\n\t\tlevelOrder(this);\n\t}",
"static void levelOrder(BFNode root){\n\t Queue q = new LinkedList();\n\t q.add(root);\n\t BFNode aNode = null;\n\t while(!q.isEmpty()) {\n\t \t \taNode = (BFNode)q.remove();\n\t \t \tSystem.out.print(aNode.data);\n\t \t \tif (aNode.left!=null) q.add(aNode.left);\n\t if (aNode.right!=null) q.add(aNode.right);\n\t }\n\t \n\t }",
"public void printLevelOrder() {\r\n\t\tif (isEmpty()) {\r\n\t\t\tSystem.out.println(\"Empty Tree\");\r\n\t\t} else {\r\n\t\t\tQueueLi<BinaryNode<AnyType>> q = new QueueLi<>();\r\n\t\t\tBinaryNode<AnyType> currentNode;\r\n\t\t\tq.enqueue(root);\r\n\t\t\twhile (!q.isEmpty()) {\r\n\t\t\t\tcurrentNode = q.dequeue();\r\n\t\t\t\tif (currentNode.left != null) {\r\n\t\t\t\t\tq.enqueue(currentNode.left);\r\n\t\t\t\t} // if\r\n\t\t\t\tif (currentNode.right != null) {\r\n\t\t\t\t\tq.enqueue(currentNode.right);\r\n\t\t\t\t} // if\r\n\t\t\t\tSystem.out.print(currentNode.element + \" \");\r\n\t\t\t} // while\r\n\t\t} // else\r\n\t}",
"@Test\r\n\tpublic void test(){\r\n\t\tTreeNode root = new TreeNode(1); \r\n TreeNode r2 = new TreeNode(2); \r\n TreeNode r3 = new TreeNode(3); \r\n TreeNode r4 = new TreeNode(4); \r\n TreeNode r5 = new TreeNode(5); \r\n TreeNode r6 = new TreeNode(6); \r\n root.left = r2; \r\n root.right = r3; \r\n r2.left = r4; \r\n r2.right = r5; \r\n r3.right = r6;\r\n System.out.println(getNodeNumRec(root));\r\n System.out.println(getNodeNum(root));\r\n System.out.println(getDepthRec(root));\r\n System.out.println(getDepth(root));\r\n System.out.println(\"前序遍历\");\r\n preorderTraversalRec(root);\r\n System.out.println(\"\");\r\n preorderTraversal(root);\r\n System.out.println(\"\");\r\n System.out.println(\"中序遍历\");\r\n inorderTraversalRec(root);\r\n System.out.println(\"\");\r\n inorderTraversal(root);\r\n System.out.println(\"\");\r\n System.out.println(\"后序遍历\");\r\n postorderTraversalRec(root);\r\n System.out.println(\"\");\r\n postorderTraversal(root);\r\n System.out.println(\"分层遍历\");\r\n levelTraversal(root);\r\n System.out.println(\"\");\r\n levelTraversalRec(root);\r\n\t}",
"public String breadthFirstTraversal(BinaryNode<T> root, int level){\n String levelTrav = \"\";\n if(root == null){\n return levelTrav;\n }\n if(level == 0){\n levelTrav = root.getData().toString() + \"->\";\n }else{\n levelTrav = breadthFirstTraversal(root.getLeftNode(), level-1)+breadthFirstTraversal(root.getRightNode(), level-1);\n// if(root.getLeftNode() != null){return ;};\n// if(root.getRightNode() != null){return };\n }\n return levelTrav;\n }",
"public void levelOrderTraversal(TreeNode root){\n int height = height(root);\n for(int i = 0; i <=height; i++){\n System.out.println();\n printNodesInLevel(root,i);\n }\n }",
"public static List<TreeNode> levelOrdertraversal(TreeNode node) {\n\t\tList<TreeNode> result = new ArrayList<TreeNode>();\n\t\tQueue<TreeNode> queue = new LinkedList<TreeNode>();\n\n\t\tif (node == null)\n\t\t\treturn result;\n\t\tqueue.add(node);\n\t\twhile (!queue.isEmpty()) {\n\t\t\tTreeNode currentNode = queue.poll();\n\t\t\tresult.add(currentNode);\n\t\t\tif (currentNode.left != null)\n\t\t\t\tqueue.add(currentNode.left);\n\t\t\tif (currentNode.right != null)\n\t\t\t\tqueue.add(currentNode.right);\n\t\t}\n\n\t\treturn result;\n\t}",
"static void levelOrder(Node root){\n Queue<Node> queue = new LinkedList<Node>();\r\n \r\n queue.add(root);\r\n while (!queue.isEmpty()) {\r\n Node head = queue.remove();\r\n\r\n if (head == null) {\r\n continue;\r\n }\r\n\r\n System.out.print(head.data + \" \");\r\n\r\n queue.add(head.left);\r\n queue.add(head.right);\r\n }\r\n System.out.println();\r\n \r\n }",
"public static List<List<Integer>> levelOrderTraversal(TreeNode root)\n\t{\n\t\tList<List<Integer>> res=new ArrayList<List<Integer>>();\n if(root==null) return res;\n Queue<TreeNode> q=new LinkedList<TreeNode>();\n q.add(root);\n int cur=1;//to track current level and next level\n int next=0;\n res.add(new ArrayList<Integer>());\n while(!q.isEmpty()){\n TreeNode temp=q.poll();\n cur--;//since polling so decrement\n res.get(res.size()-1).add(temp.data);//res.get(0).add,res.get(1).add\n if(temp.left!=null){\n q.add(temp.left);\n next++;//next level incrementing\n }\n if(temp.right!=null){\n q.add(temp.right);\n next++;\n }\n if(cur==0){//entering into next level so create new list\n cur=next;\n if(next!=0)//if next level nodes all are null no need to create new list\n res.add(new ArrayList<Integer>());\n next=0;\n }\n }\n return res;\n\t}",
"public static List<List<TreeNode>> p402GetTreeNodesByLevel(TreeNode root){\n\t\tList<List<TreeNode>> result=new LinkedList<List<TreeNode>>();\n\t\tQueue<TreeNode> queue=new LinkedList<TreeNode>();\n\t\t\n\t\tqueue.offer(root);\n\t\t\n\t\tTreeNode node;\n\t\tboolean foundLevelStart=true;\n\t\tTreeNode levelStartNode=root;\n\t\tLinkedList<TreeNode> levelList = null;\n\t\twhile((node=queue.poll())!=null){\n\t\t\tif(node.equals(levelStartNode)){\n\t\t\t\tlevelList=new LinkedList<TreeNode>();\n\t\t\t\tresult.add(levelList);\n\t\t\t\t\n\t\t\t\t//since this node is start of this level, its child will be start of next level\n\t\t\t\tif(node.getLeftNode()!=null){\n\t\t\t\t\tlevelStartNode=node.getLeftNode();\n\t\t\t\t\tfoundLevelStart=true;\n\t\t\t\t}else if(node.getRightNode()!=null){\n\t\t\t\t\tlevelStartNode=node.getRightNode();\n\t\t\t\t\tfoundLevelStart=true;\n\t\t\t\t}else{\n\t\t\t\t\t//if the start node of current level has no child, \n\t\t\t\t\t//then set flag and let its siblings to find start of next level\n\t\t\t\t\tfoundLevelStart=false;\n\t\t\t\t}\n\t\t\t}else if(!foundLevelStart){\n\t\t\t\t//when the start node has no child, non-start node will try to find start node of next level\n\t\t\t\t\n\t\t\t\tif(node.getLeftNode()!=null){\n\t\t\t\t\tlevelStartNode=node.getLeftNode();\n\t\t\t\t\tfoundLevelStart=true;\n\t\t\t\t}else if(node.getRightNode()!=null){\n\t\t\t\t\tlevelStartNode=node.getRightNode();\n\t\t\t\t\tfoundLevelStart=true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tlevelList.add(node);\n\t\t\t\n\t\t\tif(node.getLeftNode()!=null){\n\t\t\t\tqueue.offer(node.getLeftNode());\n\t\t\t}\n\t\t\t\n\t\t\tif(node.getRightNode()!=null){\n\t\t\t\tqueue.offer(node.getRightNode());\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn result;\n\t\t\n\t}",
"private void levelOrder(Node node) {\n\t\t// If input node / tree is null just return and end the program\n\t\tif (null == node)\n\t\t\treturn;\n\n\t\t// Queue to keep the Nodes in one level\n\t\tQueue<Node> toVisit = new LinkedList<Node>();\n\t\ttoVisit.add(node); // Adding the first Root node as passed\n\n\t\t// Pop and display Node data and add its children to the Queue till it is Empty\n\t\twhile (!toVisit.isEmpty()) {\n\t\t\tNode current = toVisit.remove();\n\t\t\tSystem.out.println(current.data);\n\n\t\t\t// Add child nodes to the queue if exists for current node\n\t\t\tif (null != current.left) {\n\t\t\t\ttoVisit.add(current.left);\n\t\t\t}\n\t\t\tif (null != current.right) {\n\t\t\t\ttoVisit.add(current.right);\n\t\t\t}\n\t\t}\n\n\t}",
"public void levelOrder(){\n if(root == null)\n return;\n\n // Take a queue and enqueue root and null\n // every level ending is signified by null\n // since there is just one node at root we enqueue root as well as null\n Queue<Node<T>> queue = new LinkedList<>();\n queue.add(root);\n queue.add(null);\n\n \n while(queue.size() != 0){\n \n Node<T> node = queue.remove();\n // If the node is not null print it and enqueue its left and right child \n // if they exist\n if(node != null){\n System.out.print(node.data + \" ,\");\n if(node.left != null)\n queue.add(node.left);\n if(node.right != null)\n queue.add(node.right);\n }else{\n // We have reached a new level \n // Check is queue is empty, if yes then we are done \n // otherwise print a new line and enqueue a new null for next level\n System.out.println();\n if(queue.size() == 0)\n break;\n queue.add(null);\n }\n }\n }",
"@Override\r\n\tpublic Iterator<T> iteratorLevelOrder() {\r\n\t\tLinkedList<T> list = new LinkedList<T>();\r\n\t\tQueue<BSTNode<T>> work = new ArrayDeque<BSTNode<T>>();\r\n\t\twork.add(this.root);//start at the root\r\n\r\n\t\twhile(!work.isEmpty()) {\r\n\t\t\tBSTNode<T> node = work.remove();//pop the first\r\n\t\t\tlist.add(node.data);\r\n\t\t\t\r\n\t\t\tif(node.left!= null) {\r\n\t\t\t\twork.add(node.left);\r\n\t\t\t}\r\n\t\t\tif(node.right!= null) {\r\n\t\t\t\twork.add(node.right);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn list.iterator();\r\n\t}",
"private List<Integer> inOrderTraversal(Tree tree, List<Integer> arr){\n if(tree==null){\n return null;\n }\n\n if(tree.left!=null){\n inOrderTraversal(tree.left, arr);\n }\n arr.add(tree.data);\n\n if(tree.right!=null){\n inOrderTraversal(tree.right,arr);\n }\n return arr;\n\n}",
"public void levelOrderTraversalBruteForce(){\n System.out.println(\"levelOrderTraversalBruteForce\");\n\n for(int level = 1; level <=height(); level++){\n printLevel(level);\n }\n System.out.println();\n }",
"public void levelOrder(Node node) {\n\n if (node == null) {\n System.out.println(\"Tree is empty\");\n return;\n }\n\n Queue<Node> queue = new LinkedList<>();\n queue.add(node);\n\n do {\n\n node = queue.poll();\n\n System.out.print(node.value + \" \");\n\n if (node.left != null) {\n queue.add(node.left);\n }\n\n if (node.right != null) {\n queue.add(node.right);\n }\n\n } while (queue.peek() != null);\n }",
"public void levelOrder(){\n if(root == null)\n return;\n\n // Take a queue and enqueue root and null\n // every level ending is signified by null\n // since there is just one node at root we enqueue root as well as null\n Queue<Node> queue = new LinkedList<>();\n queue.add(root);\n queue.add(null);\n\n\n while(queue.size() != 0){\n\n Node node = queue.remove();\n // If the node is not null print it and enqueue its left and right child\n // if they exist\n if(node != null){\n System.out.print(node.data + \" ,\");\n if(node.left != null)\n queue.add(node.left);\n if(node.right != null)\n queue.add(node.right);\n }else{\n // We have reached a new level\n // Check is queue is empty, if yes then we are done\n // otherwise print a new line and enqueue a new null for next level\n System.out.println();\n if(queue.size() == 0)\n break;\n queue.add(null);\n }\n }\n }",
"public Iterable<Integer> levelOrder() {\n\t\tLinkedList<Integer> keys = new LinkedList<Integer>();\n\t\tLinkedList<Node> queue = new LinkedList<Node>();\n\t\tqueue.add(root);\n\t\twhile (!queue.isEmpty()) {\n\t\t\tNode n = queue.remove();\n\t\t\tif (n == null) continue;\n\t\t\tkeys.add(n.key);\n\t\t\tqueue.add(n.left);\n\t\t\tqueue.add(n.right);\n\t\t}\n\t\treturn keys;\n\t}",
"void traverseLevelOrder1() {\n\t\tint h = height(root);\n\t\tint i;\n\t\tfor (i = 1; i <= h; i++)\n\t\t\tprintGivenLevel(root, i);\n\t}",
"public static void inOrderTraverse(Node root) {\n\t\tStack<Node> stack = new Stack<Node>();\n\t\tNode node = root;\n\t\twhile (node!=null || !stack.empty()) {\n if(node!=null){\n \t stack.push(node);\n \t node = node.lchild;\n }else{\n \t node = stack.pop();\n \t node.visit();\n \t node = node.rchild;\n }\n\t\t}\n\t}",
"public static List<List<Integer>> levelOrder(TreeNode root) {\n Queue<TreeNode> queue = new LinkedList<>();\n Queue<TreeNode> visited = new LinkedList<>();\n queue.add(root);\n\n List<List<Integer>> result = new ArrayList<>();\n while (!queue.isEmpty()) {\n List<Integer> list = new ArrayList<>();\n while (!queue.isEmpty()) {\n TreeNode tn = queue.poll();\n list.add(tn.val);\n visited.add(tn);\n }\n int size = visited.size();\n\n while (size > 0){\n TreeNode treeNode = visited.poll();\n\n if (treeNode.left != null) {\n queue.add(treeNode.left);\n\n }\n if (treeNode.right != null) {\n queue.add(treeNode.right);\n }\n size--;\n }\n\n result.add(list);\n\n }\n\n return result;\n }",
"public Iterable<Integer> levelOrder() {\n Queue<Integer> keys = new Queue<Integer>();\n Queue<TreeNode> queue = new Queue<TreeNode>();\n queue.enqueue(root);\n while (!queue.isEmpty()) {\n TreeNode x = queue.dequeue();\n if (x == null) {\n\t\t\t\t/* -1 stands for null node. */\n\t\t\t\tkeys.enqueue(-1);\n\t\t\t\tcontinue;\n\t\t\t}\n keys.enqueue(x.val);\n queue.enqueue(x.left);\n queue.enqueue(x.right);\n }\n return keys;\n }",
"void printLevelOrder() {\n\t\tint h = height(root);\n\t\tint i;\n\t\tfor (i = h; i >= 1; i--)\n\t\t\tprintGivenLevel(root, i);\n\t}",
"void printLevelOrder() {\n TreeNode2 nextLevelRoot = this;\n while (nextLevelRoot != null) {\n TreeNode2 current = nextLevelRoot;\n nextLevelRoot = null;\n while (current != null) {\n System.out.print(current.val + \" \");\n if (nextLevelRoot == null) {\n if (current.left != null)\n nextLevelRoot = current.left;\n else if (current.right != null)\n nextLevelRoot = current.right;\n }\n current = current.next;\n }\n System.out.println();\n }\n }",
"public List<List<Integer>> levelOrder(Node root) {\n List<List<Integer>> res = new ArrayList<>();\n if (root == null) {\n return res;\n }\n Queue<Node> queue = new LinkedList<>();\n queue.offer(root);\n while (!queue.isEmpty()) {\n int size = queue.size();\n List<Integer> list = new ArrayList<>();\n for (int i = 0; i < size; ++i) {\n Node cur = queue.poll();\n if (cur.children.size() > 0) {\n for (Node node : cur.children) {\n queue.offer(node);\n }\n }\n list.add(cur.val);\n }\n res.add(list);\n }\n return res;\n }",
"void inOrder(TreeNode node) \n { \n if (node == null) \n return; \n \n inOrder(node.left); \n System.out.print(node.val + \" \"); \n \n inOrder(node.right); \n }",
"void printLevelOrder(Node root)\n {\n int h = height(root);\n int i;\n for (i=1; i<=h; i++)\n printGivenLevel(root, i);\n }",
"public List<List<Integer>> levelOrder(Node root) {\n List<List<Integer>> result = new LinkedList<>();\n if (root == null) {\n return result;\n }\n Queue<Node> inQueue = new LinkedList<>();\n Queue<Node> outQueue = new LinkedList<>();\n inQueue.add(root);\n while (!inQueue.isEmpty()) {\n List<Integer> tmp = new LinkedList<>();\n while (!inQueue.isEmpty()) {\n Node poll = inQueue.poll();\n if (poll.children != null) {\n outQueue.addAll(poll.children);\n }\n tmp.add(poll.val);\n }\n result.add(tmp);\n inQueue.addAll(outQueue);\n outQueue.clear();\n\n }\n return result;\n }",
"public Iterable<K> levelOrder() {\n Queue<K> keys = new Queue<>();\n Queue<Node> queue = new Queue<>();\n queue.enqueue(root);\n while (!queue.isEmpty()) {\n Node x = queue.dequeue();\n if (x == null) continue;\n keys.enqueue(x.key);\n queue.enqueue(x.left);\n queue.enqueue(x.right);\n }\n return keys;\n }",
"static ArrayList <Integer> levelOrder(Node root) \n {\n ArrayList<Integer> list=new ArrayList<>();\n Queue<Node> queue = new LinkedList<Node>(); \n queue.add(root); \n while (!queue.isEmpty()) \n { \n \n /* poll() removes the present head. \n For more information on poll() visit \n http://www.tutorialspoint.com/java/util/linkedlist_poll.htm */\n Node tempNode = queue.poll(); \n list.add(tempNode.data); \n \n /*Enqueue left child */\n if (tempNode.left != null) { \n queue.add(tempNode.left); \n } \n \n /*Enqueue right child */\n if (tempNode.right != null) { \n queue.add(tempNode.right); \n } \n }\n return list;\n }",
"public List<List<Integer>> levelOrder(Node root) {\n if (root == null) return new ArrayList<>();\n \n List<List<Integer>> ans = new ArrayList<>();\n Queue<Node> queue = new LinkedList<>();\n \n queue.add(root);\n \n while (!queue.isEmpty()) {\n List<Integer> list = new ArrayList<>();\n for (int i = queue.size(); i > 0; i--) {\n Node curr = queue.poll();\n list.add(curr.val);\n \n for (Node child : curr.children) queue.add(child);\n }\n ans.add(list);\n }\n \n return ans;\n }",
"public void levelOrderUsingRecurison(TreeNode root)\r\n\t{\r\n\t\tif(root == null)\r\n\t\t{\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tint height=heightOfTree(root);\r\n\t\tfor (int i=0;i<=height;i++)\r\n\t\t{\r\n\t\t\tprintNodesAtGivenLevel(root,i+1);\t\t\r\n\t\t}\r\n\t}",
"public static void main(String[] args) {\n\n\n TreeNode root = new TreeNode(1);\n TreeNode left1 = new TreeNode(2);\n TreeNode left2 = new TreeNode(3);\n TreeNode left3 = new TreeNode(4);\n TreeNode left4 = new TreeNode(5);\n TreeNode right1 = new TreeNode(6);\n TreeNode right2 = new TreeNode(7);\n TreeNode right3 = new TreeNode(8);\n TreeNode right4 = new TreeNode(9);\n TreeNode right5 = new TreeNode(10);\n root.left = left1;\n root.right = right1;\n left1.left = left2;\n left1.right = left3;\n left3.right = left4;\n right1.left = right2;\n right1.right = right3;\n right2.right = right4;\n right3.left = right5;\n //[3, 2, 4, 5, 1, 7, 9, 6, 10, 8]\n List<Integer> list = inorderTraversalN(root);\n System.err.println(list);\n }",
"public void inorderTraverse(){\n\t\tinorderHelper(root);\n\t\tSystem.out.println();\n\t}",
"@Test\n public void test(){\n BinarySearchTree tree = new BinarySearchTree(new Node(35));\n\n tree.addNode(4);\n tree.addNode(15);\n tree.addNode(3);\n tree.addNode(1);\n tree.addNode(20);\n tree.addNode(8);\n tree.addNode(50);\n tree.addNode(40);\n tree.addNode(30);\n tree.addNode(80);\n tree.addNode(70);\n\n tree.addNode(90);\n\n tree.deleteNode(50);\n System.out.println(\"=====中序遍历 递归法=====\");\n TreeUtil.traverseInOrder(tree.getRoot());\n\n System.out.println(\"\");\n System.out.println(\"=====中序遍历 迭代法=====\");\n TreeUtil.traverseInOrderByIteration(tree.getRoot());\n\n System.out.println(\"\");\n System.out.println(\"=====前序遍历=====\");\n TreeUtil.traversePreOrder(tree.getRoot());\n\n System.out.println(\"\");\n System.out.println(\"=====中序遍历 迭代法=====\");\n TreeUtil.traversePreOrderByIteration(tree.getRoot());\n\n System.out.println(\"\");\n System.out.println(\"=====后序遍历=====\");\n TreeUtil.traversePostOrder(tree.getRoot());\n\n System.out.println(\"\");\n System.out.println(\"=====后序遍历 迭代法=====\");\n TreeUtil.traversePostOrderByIteration(tree.getRoot());\n\n System.out.println(\"\");\n System.out.println(\"=====层次遍历=====\");\n TreeUtil.traverseLevelOrder(tree.getRoot());\n\n int height = TreeUtil.getChildDepth(tree.getRoot());\n System.out.println(\"\");\n System.out.println(\"树高:\"+height);\n }",
"public static void levelOrder(Node node){\r\n Queue<Node> qu = new ArrayDeque<>();\r\n qu.add(node);\r\n \r\n while(qu.size()>0){\r\n //1. get + remove\r\n Node rem = qu.remove();\r\n \r\n //2. Print \r\n System.out.print(rem.data + \" \");\r\n \r\n //3. Add children of node to Queue\r\n for(Node child : rem.children){\r\n qu.add(child);\r\n }\r\n }\r\n \r\n }",
"List<Integer> traverseLevelOrder(List<Integer> oList) \n\t{\n\t\tQueue<BSTMapNode> q = new LinkedList<BSTMapNode>();\n\t\tq.add(this);\n\t\t\n\t\twhile(!q.isEmpty())\n\t\t{\n\t\t\tBSTMapNode node = q.poll();\n\t\t\toList.add(node.getKey());\n\t\t\tif(node.left != null)\n\t\t\t{\n\t\t\t\tq.add(node.left);\n\t\t\t}\n\t\t\tif(node.right != null)\n\t\t\t{\n\t\t\t\tq.add(node.right);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn oList;\n\t}",
"public void treeOrder ()\n {\n treeOrder (root, 0);\n }",
"public static void main(String[] args) {\n\t\tBinary_Tree_Level_Order_Traversal_102 b=new Binary_Tree_Level_Order_Traversal_102();\n\t\tTreeNode root=new TreeNode(3);\n\t\troot.left=new TreeNode(9);\n\t\troot.right=new TreeNode(20);\n\t\troot.right.left=new TreeNode(15);\n\t\troot.right.right=new TreeNode(7);\n\t\tList<List<Integer>> res=b.levelOrder(root);\n\t\tfor(List<Integer> list:res){\n\t\t\tfor(Integer i:list){\n\t\t\t\tSystem.out.print(i+\" \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"public void inorder()\r\n\t{\r\n\t\tif(root==null)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"tree is empty\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t// find the leftmost node of the tree\r\n\t\tNode p =root;\r\n\t\twhile(p.leftThread==false)\r\n\t\t\tp=p.left;\r\n\t\twhile(p!=null)//loop until we reach the right most node whose right link(rightThread) is null\r\n\t\t{\r\n\t\t\tSystem.out.print(p.info + \" \");\r\n\t\t\tif(p.rightThread==true) // if 'right' is pointing to the inorder successor\r\n\t\t\t\tp = p.right;\r\n\t\t\telse // find the inorder successor i.e the left most node in the right sub tree\r\n\t\t\t{\r\n\t\t\t\tp = p.right;\r\n\t\t\t\twhile(p.leftThread==false)\r\n\t\t\t\t\tp = p.left;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t}",
"public ArrayList<ArrayList<Integer>> levelOrder(TreeNode root) {\n ArrayList<ArrayList<Integer>> res = new ArrayList<ArrayList<Integer>>();\n ArrayList<Integer> level = new ArrayList<Integer>();\n Queue<TreeNode> q = new LinkedList<TreeNode>();\n if(root == null) return res;\n q.add(root);\n int size = 1, cnt = 0;\n while(!q.isEmpty()){\n TreeNode x = q.poll();\n level.add(x.val);\n cnt++;\n if(x.left != null) q.add(x.left);\n if(x.right != null) q.add(x.right);\n if(cnt == size){\n size = q.size();\n cnt = 0;\n res.add(level);\n level = new ArrayList<Integer>();\n }\n }\n return res;\n }",
"public void inOrder(Node myNode){\n \n if (myNode != null){ //If my node is not null, excute the following\n \n inOrder(myNode.left); //Recurse with left nodes\n System.out.println(myNode.name); //Print node name \n inOrder(myNode.right); //Recurse with right nodes\n \n }\n }",
"public List<T> levelorder() {\n ArrayList<T> list = new ArrayList<T>();\n Queue<BSTNode<T>> queue = new LinkedList<>();\n if (root != null) {\n queue.add(root);\n levelorderHelper(list, queue);\n }\n return list;\n }",
"@Test\n void solvesTestCase() {\n TreeNode root = new TreeNode(3);\n root.left = new TreeNode(9);\n root.right = new TreeNode(20);\n root.right.left = new TreeNode(15);\n root.right.right = new TreeNode(7);\n\n List<List<Integer>> traversal = new ZigZagLevelOrder().zigzagLevelOrder(root);\n assertThat(traversal.size()).isEqualTo(3);\n assertThat(traversal.get(0)).containsExactly(3);\n assertThat(traversal.get(1)).containsExactly(20, 9);\n assertThat(traversal.get(2)).containsExactly(15, 7);\n }",
"public void inOrderTraversal(TreeNode<T> root) {\n\t\tif (null == root) {\n\t\t\treturn;\n\t\t} else {\n\t\t\tinOrderTraversal(root.getLeftChild());\n\t\t\tSystem.out.println(root);\n\t\t\tinOrderTraversal(root.getRightChild());\n\t\t}\n\t}",
"public ArrayList<ArrayList<Integer>> levelOrder(TreeNode root){\n ArrayList<ArrayList<Integer>> res = new ArrayList<ArrayList<Integer>>();\n ArrayList<Integer> level;\n Que<TreeNode> q = new Que<TreeNode>();\n \n if(root == null)\n return res;\n \n level = new ArrayList<Integer>();\n q.enque(root);\n level.add(root.val);\n res.add(level);\n int exp = 0;\n int cnt = 1;\n \n level = new ArrayList<Integer>();\n while(!q.isEmpty()){\n TreeNode x = q.deque();\n cnt--;\n \n if(x.left != null){\n q.enque(x.left);\n level.add(x.left.val);\n exp++;\n }\n \n if(x.right != null){\n q.enque(x.right);\n level.add(x.right.val);\n exp++;\n }\n \n if(cnt == 0){\n res.add(level);\n level = new ArrayList<Integer>();\n cnt = exp;\n exp = 0;\n }\n }\n \n res.remove(res.size()-1);\n \n return res;\n }",
"public static void levelOrderLinewise1(Node node){\r\n Queue<Node> mainq = new ArrayDeque<>();\r\n Queue<Node> childq = new ArrayDeque<>();\r\n \r\n //Adding root in mainq\r\n mainq.add(node);\r\n \r\n while(mainq.size()>0){\r\n //1. get + remove\r\n Node rem = mainq.remove();\r\n \r\n //2. Print \r\n System.out.print(rem.data + \" \");\r\n \r\n //3. Add children of node to Childq\r\n for(Node child : rem.children){\r\n childq.add(child);\r\n }\r\n \r\n //Check if size of mainq got 0 then print \"enter\" and swap the mainq and childq\r\n if(mainq.size()==0){\r\n System.out.println();\r\n Queue<Node> temp = new ArrayDeque<>();\r\n temp = mainq;\r\n mainq = childq;\r\n childq = temp;\r\n }\r\n }\r\n }",
"private void getLevelByLevel(Node root, int level, ArrayList<LinkedList<Node>> arrL) {\n\t\tif(root == null) {\n\t\t\treturn;\n\t\t}\n\t\tLinkedList<Node> n = null;\n\t\tif(arrL.size() == level) {\n\t\t\t n = new LinkedList<>();\n\t\t\tn.add(root);\n\t\t\tarrL.add(n);\n\t\t} else {\n\t\t\tn = arrL.get(level);\n\t\t\tn.add(root);\n\t\t}\n\t\tgetLevelByLevel(root.left, level+1, arrL);\n\t\tgetLevelByLevel(root.right, level+1, arrL);\n\t\t\n\t}",
"void getInorderIteratively(Node node) {\n Stack<Node> stack = new Stack<Tree.Node>();\n if (node == null)\n return;\n Node current = node;\n while (!stack.isEmpty() || current != null) {\n // While the sub tree is not empty keep on adding them\n while (current != null) {\n stack.push(current);\n current = current.left;\n }\n // No more left sub tree\n Node temp = stack.pop();\n System.out.println(temp.data);\n // We now have to move to the right sub tree of the just popped out node\n current = temp.right;\n }\n\n }",
"public void inorder()\r\n {\r\n inorder(root);\r\n }",
"public void printLevelOrder(Node tree){\n\t\tint h = height(tree);\n\t\tSystem.out.println(\"The height is \"+ h);\n\t\tfor(int i=1;i<=h;i++){\n\t\t\tprintGivenLevel(tree, i);\n\t\t}\n\t}",
"public static void main(String[] args) {\n TreeNode node = new TreeNode();\n node.value = 1;\n node.left = new TreeNode();\n node.left.value = 2;\n node.right = new TreeNode();\n node.right.value = 3;\n node.left.left = new TreeNode();\n node.left.left.value = 4;\n node.left.right = new TreeNode();\n node.left.right.value = 5;\n node.right.left = new TreeNode();\n node.right.left.value = 6;\n node.right.right = new TreeNode();\n node.right.right.value = 7;\n// System.out.println(mirro(node).value);\n// System.out.println(mirro(node).left.value);\n// System.out.println(Arrays.toString(LevelPrintTree.levelPrint(mirro(node))));\n\n recur(node);\n\n }",
"public void inorder()\n {\n inorderRec(root);\n }",
"private static void printTreeInLevel(Tree tree, int level, List<Integer> values){\n if(tree == null)\n return;\n\n if(level == 1){\n System.out.print(tree.data+\" \");\n values.add(tree.data);\n }\n\n else{\n printTreeInLevel(tree.left, level-1,values);\n printTreeInLevel(tree.right, level-1,values);\n }\n}",
"public static void main(String[] args){\n\t\tTreeNode node1 = new TreeNode(1);\n\t\tTreeNode node2 = new TreeNode(2);\n\t\tTreeNode node3 = new TreeNode(3);\n\t\tTreeNode node4 = new TreeNode(4);\n\t\tTreeNode node5 = new TreeNode(5);\n\t\tTreeNode node6 = new TreeNode(6);\n\t\tTreeNode node7 = new TreeNode(7);\n\t\tnode4.left = node2;\n\t\tnode4.right = node6;\n\t\tnode2.left = node1;\n\t\tnode2.right = node3;\n\t\tnode6.left = node5;\n\t\tnode6.right = node7;\n\t\t/*\n\t\t * 4\n\t\t * /\n\t\t * 5\n\t\t * \\\n\t\t * 6\n\t\t */\n\t\t/*node4.left = node5;\n\t\tnode5.right = node6;*/\n\t\t\n\t\ttreeTraversal2 tt = new treeTraversal2();\n\t\tSystem.out.print(\"Inorder Rcur: \");tt.inorderTraverse(node4);//1234567\n\t\tSystem.out.println();\t\t\n\t\tSystem.out.print(\"Inorder Iter: \");tt.stackInorder(node4);//1234567\n\t\tSystem.out.println();\n\t\tSystem.out.print(\"Preorder Rcur: \");tt.preorderTraverse(node4);//4213657\n\t\tSystem.out.println();\n\t\tSystem.out.print(\"Preorder Iter: \"); tt.stackPreorder(node4);//4213657\n\t\tSystem.out.println();\n\t\tSystem.out.print(\"Postorder Rcur: \");tt.postorderTraverse(node4);//1325764\n\t\tSystem.out.println();\t\t \n\t\tSystem.out.print(\"Postorder Iter: \");tt.stackPostorder(node4);//1325764\n\t\t//System.out.println();\n\t\t//System.out.print(\"Postorder Iter: \");tt.twoStackPostorder(node4);//1325764\n\t\tSystem.out.println();\n\t\tSystem.out.print(\"Level Iter: \");tt.levelTraverse(node4);//4261357\n\t}",
"public void levelOrder(Node node){\n\t\tArrayList<Node> queue = new ArrayList<Node>();\n\t\t\n\t\tif(node==nil){\n\t\t\treturn;\n\t\t}\n\t\tif(node != nil){\n\t\t\tqueue.add(node);\n\t\t}\n\t\t\n\t\twhile(!queue.isEmpty()){\n\t\t\tNode temp = (Node)queue.get(0);\n\t\t\tSystem.out.println(\" ID: \" + temp.id + \" Count: \" + temp.count + \" Colour: \" + temp.colour);\n\t\t\tqueue.remove(0);\n\t\t\tif(temp.left != nil){\n\t\t\t\tqueue.add(temp.left);\n\t\t\t}\n\t\t\tif(temp.right != nil){\n\t\t\t\tqueue.add(temp.right);\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"void inOrderTraversal(OO8BinaryTreeNode node) {\n\t\tif(node==null)\n\t\t\treturn;\n\t\tinOrderTraversal(node.getLeftNode());\n\t\tSystem.out.print(node.getValue() + \" \");\n\t\tinOrderTraversal(node.getRightNode());\n\t}",
"private E[] getPreOrderLeftSubTree(E[] inOrderTraversal,E[] preOrderTraversal) {\n\t\treturn null;\n\t}",
"public List<List<Integer>> levelOrderBottomII(TreeNode root) {\n List<List<Integer>> res = new ArrayList<>();\n if (root == null) {\n return res;\n }\n Stack<List<Integer>> buffer = new Stack<>();\n Queue<TreeNode> queue = new LinkedList<>();\n queue.offer(root);\n\n int size = 0;\n while (!queue.isEmpty()) {\n size = queue.size();\n List<Integer> level = new ArrayList<>();\n for (int i = 0; i < size; i++) {\n TreeNode node = queue.poll();\n level.add(node.val);\n if (node.left != null) {\n queue.offer(node.left);\n }\n if (node.right != null) {\n queue.offer(node.right);\n }\n }\n buffer.push(level);\n }\n while (!buffer.isEmpty()) {\n res.add(buffer.pop());\n }\n return res;\n }",
"void levelList(Node root, ArrayList< LinkedList< Node > > results, int level)\n{\n\tif(root == null) return; // base case: the outlet of the recursive\n\n\tLinkedList<Node> list = null; // initialize list with null, i.e. we did not create it yet\n\n\t//because we use the DFS therefore we must pass the level as one of the parameter\n\t//to pinpoint the level for the current position\n\tif(results.size() == level)\n\t\t//now we are visiting a new level we did not visit before\n\t{\n\t\tlist = new LinkedList<Node>();//now we create a new element which will be stored in results later\n\t\tresults.add(list);\n\t}else{\n\t\t//else we have already visited this level and all we need to do is get out of the level \n\t\t//to add the new node into it\n\t\tlist = results.get(level);\n\t}\n\n\t//ok. now is the kernel operation, i.e. after we locate the level we will add the node anyway\n\tlist.add(root);\n\n\t//now we can go to the next recursive condition\n\t//do not forget to increase the level as the new parameter for the next round\n\tlevellist(root.left, results, level+1);\n\tlevellist(root.right, results, level+1);\n}",
"public void inOrderTree(TernaryTreeNode root)\n {\n if(root==null) return;\n \n \n inOrderTree(root.left);\n inOrderTree(root.middle);\n inOrderTree(root.right);\n System.out.print(root.data+\" \");\n \n }",
"public void preorderTraverse(){\n\t\tpreorderHelper(root);\n\t\tSystem.out.println();\n\t}",
"public void inOrderTraversal(){\n System.out.println(\"inOrderTraversal\");\n\n Stack<Node> stack = new ArrayStack<Node>();\n\n for(Node node = root; node!= null; node=node.getLeft()){\n stack.push(node);\n }\n while(!stack.isEmpty()){\n Node node = stack.pop();\n System.out.print(node.getData() + \" \");\n\n for(node=node.getRight(); node!= null; node = node.getLeft()){\n stack.push(node);\n }\n }\n\n System.out.println();\n }",
"void inorder(Node root) {\n\t\tboolean leftdone = false;\n\n\t\t// Start traversal from root\n\t\twhile (root != null) {\n\t\t\t// If left child is not traversed, find the\n\t\t\t// leftmost child\n\t\t\tif (!leftdone) {\n\t\t\t\twhile (root.left != null) {\n\t\t\t\t\troot = root.left;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Print root's data\n\t\t\tSystem.out.print(root.data + \" \");\n\n\t\t\t// Mark left as done\n\t\t\tleftdone = true;\n\n\t\t\t// If right child exists\n\t\t\tif (root.right != null) {\n\t\t\t\tleftdone = false;\n\t\t\t\troot = root.right;\n\t\t\t}\n\n\t\t\t// If right child doesn't exist, move to parent\n\t\t\telse if (root.parent != null) {\n\t\t\t\t// If this node is right child of its parent,\n\t\t\t\t// visit parent's parent first\n\t\t\t\twhile (root.parent != null && root == root.parent.right)\n\t\t\t\t\troot = root.parent;\n\n\t\t\t\tif (root.parent == null)\n\t\t\t\t\tbreak;\n\t\t\t\troot = root.parent;\n\t\t\t} else\n\t\t\t\tbreak;\n\t\t}\n\t}",
"public static void main(String[] args) {\n\t\tTreeNode root = new TreeNode(1);\n\t\troot.right = new TreeNode(2);\n\t\t//root.left.left = new TreeNode(3);\n\t\t//root.left.right = new TreeNode(3);\n\t\troot.right.left = new TreeNode(3);\n\t\t//root.right.right = new TreeNode(3);\n\t\t\n\t\tSystem.out.println(inorderTraversal(root));\n\t}",
"public int level(Tree<K, V> t, int level, K key) {\n\t\tif (key.compareTo(this.key) == 0) {\n\t\t\treturn level;\n\t\t} else if (key.compareTo(this.key) < 0) {\n\t\t\treturn left.level(left, level + 1, key);\n\t\t} else {\n\t\t\treturn right.level(right, level + 1, key);\n\t\t}\n\t}",
"public List<Integer> inorderTraversal(TreeNode root) {\n List<Integer> result = new ArrayList<>();\n Stack<TreeNode> stack = new Stack<>();\n TreeNode node = root;\n while (node != null || !stack.empty()) {\n // push left nodes into stack\n while (node != null) {\n stack.push(node);\n node = node.left;\n }\n node = stack.pop();\n result.add(node.val);\n // ! key step: invoke recursive call on node's right child\n node = node.right;\n }\n return result;\n }",
"static void inorderTraversal(Node root) {\n if (root == null) {\n return;\n }\n inorderTraversal(root.left);\n System.out.print(root.data + \" \");\n inorderTraversal(root.right);\n }",
"void inorder(Node root){\n if(root!=null){\n // checking if the tree is not empty\n inorder(root.left);\n System.out.print(root.data+\" \");\n inorder(root.right);\n }\n\n }",
"private TraverseData traverseOneLevel(TraverseData data) {\n Node<T> currentNode = data.currentNode;\n Node<T> currentNewNode = data.currentNewNode;\n int nextBranch = data.index / data.base;\n\n currentNewNode.set(nextBranch, new Node<>(branchingFactor));\n for (int anotherBranch = 0; anotherBranch < branchingFactor; anotherBranch++) {\n if (anotherBranch == nextBranch) {\n continue;\n }\n currentNewNode.set(anotherBranch, currentNode.get(anotherBranch));\n }\n\n //down\n currentNode = currentNode.get(nextBranch);\n currentNewNode = currentNewNode.get(nextBranch);\n return new TraverseData(currentNode, currentNewNode, data.newRoot, data.index % data.base,\n data.base);\n }",
"public void inorderTraversal(Node root) {\r\n\t\tif(root != null) {\r\n\t\t\tinorderTraversal(root.leftChild);\r\n\t\t\tSystem.out.print(root.data + \" \");\r\n\t\t\tinorderTraversal(root.rightChild);\r\n\t\t}\r\n\t}",
"private void preOrdertraverse(Node root){\n System.out.println(root.value);\n for(var child : root.getChildren())\n preOrdertraverse(child); //recursively travels other childrens in current child\n }",
"public static void levelOrderLinewiseZZ(Node node){\r\n Stack<Node> mainS = new Stack<>();\r\n Stack<Node> childS = new Stack<>();\r\n \r\n //. Add node to Stack\r\n mainS.push(node);\r\n //Define level\r\n int lvl = 1;\r\n \r\n while(mainS.size() > 0){\r\n //1. Get + print\r\n Node rem = mainS.pop();\r\n System.out.print(rem.data + \" \");\r\n \r\n if(lvl % 2 == 1){\r\n //odd level = left->right additon of children is done\r\n for(int i=0; i<rem.children.size(); i++){\r\n Node child = rem.children.get(i);\r\n //Addition is done in child stack\r\n childS.push(child);\r\n }\r\n }\r\n else{\r\n //even level = right to left additon of children is done\r\n for(int i=rem.children.size()-1; i>=0; i--){\r\n Node child = rem.children.get(i);\r\n //Addition is done in child stack\r\n childS.push(child);\r\n }\r\n }\r\n \r\n if(mainS.size() == 0){\r\n //Print Enter\r\n System.out.println();\r\n \r\n //Increase the level\r\n lvl++;\r\n \r\n //Swap the stacks\r\n Stack<Node> temp = mainS;\r\n mainS = childS;\r\n childS = temp;\r\n }\r\n }\r\n }",
"void printGivenLevel (TreeNode root ,int level) \n { \n if (root == null) {\n System.out.print(\"null \");\n return; \n }\n if (level == 1) \n System.out.print(root.val + \" \"); \n else if (level > 1) \n { \n printGivenLevel(root.left, level-1); \n printGivenLevel(root.right, level-1); \n } \n }",
"public void inOrderRecursive(TreeNode root){\n if(root == null) return;\n inOrderRecursive(root.left);\n System.out.print(root.data + \" \");\n inOrderRecursive(root.right);\n }",
"public ArrayList<ArrayList<Integer>> levelOrder(TreeNode root) {\n ArrayList<ArrayList<Integer>> res = new ArrayList<ArrayList<Integer>>();\n ArrayList<Integer> tmp = new ArrayList<Integer>();\n \n if(root == null) return res;\n \n LinkedList<TreeNode> q = new LinkedList<TreeNode>();\n q.add(root);\n int cnt = 0;\n int sum = 1;\n while(!q.isEmpty()){\n TreeNode x = q.poll();\n tmp.add(x.val);\n cnt++;\n if(x.left != null) q.add(x.left);\n if(x.right != null) q.add(x.right);\n if(cnt == sum){\n res.add(tmp);\n tmp = new ArrayList<Integer>();\n sum = q.size();\n cnt = 0;\n }\n }\n \n return res;\n }",
"public void inOrderTraverseTree(Node focusNode) {\n if(focusNode != null) { // recursively traverse left child nodes first than right\n inOrderTraverseTree(focusNode.leftChild);\n\n System.out.println(focusNode); // print recursively inorder node (or return!)\n\n inOrderTraverseTree(focusNode.rightChild);\n\n }\n }",
"static void inOrderWithoutRecursion(Node root) {\n if (root == null) {\n return;\n }\n Stack<Node> stack = new Stack<>();\n Node curr = root;\n while (curr != null || !stack.isEmpty()) {\n while (curr != null) {\n stack.push(curr);\n curr = curr.left;\n }\n curr = stack.pop();\n System.out.print(curr.data + \" \");\n curr = curr.right;\n }\n\n }",
"void preOrderTraversal(OO8BinaryTreeNode node) {\n\t\tif(node==null)\n\t\t\treturn;\n\t\tSystem.out.print(node.getValue() + \" \");\n\t\tpreOrderTraversal(node.getLeftNode());\n\t\tpreOrderTraversal(node.getRightNode());\n\t}",
"public static void inOrder(TreeNode root) \r\n { \r\n if (root != null) { \r\n inOrder(root.left); \r\n System.out.print(root.val + \" \"); \r\n inOrder(root.right); \r\n } else {\r\n //System.out.print(null + \" \"); \r\n }\r\n }",
"public static void inOrder(TreeNode root) \r\n { \r\n if (root != null) { \r\n inOrder(root.left); \r\n System.out.print(root.val + \" \"); \r\n inOrder(root.right); \r\n } else {\r\n //System.out.print(null + \" \"); \r\n }\r\n }",
"public String inOrderTraverse(){\r\n\r\n\t\t//Stack that keeps track of where we go\r\n\t\tStack<BinarySearchTree> traverseStack = new Stack<BinarySearchTree>();\r\n\t\t\r\n\t\t//This is where we want to start\r\n\t\tBinarySearchTree curr = this;\r\n\t\t\r\n\t\t//When true, the string is returned\r\n\t\tBoolean done = false;\r\n\t\t\r\n\t\t//The string to return\r\n\t\tString treeAsString = \"\";\r\n\t\t\r\n\t\t//INORDER: LEFT > ROOT > RIGHT\r\n\r\n\t\twhile(!done){\r\n\t\t\tif(curr != null){\r\n\t\t\t\t\r\n\t\t\t\t//We need to get left first push it onto the stack\r\n\t\t\t\ttraverseStack.push(curr);\r\n\r\n\t\t\t\t//Getting the left first\r\n\t\t\t\tcurr = curr.getLeftChild();\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t\r\n\t\t\t\t//curr is null. We checked left.\r\n\t\t\t\tif(!traverseStack.isEmpty()){\r\n\t\t\t\t\t\r\n\t\t\t\t\t//pop the stack to get the item\r\n\t\t\t\t\tcurr = traverseStack.pop();\r\n\r\n\t\t\t\t\t//append the item\r\n\t\t\t\t\ttreeAsString += curr.toString() + \" \";\r\n\r\n\t\t\t\t\t//Check the right\r\n\t\t\t\t\tcurr = curr.getRightChild();\r\n\t\t\t\t}\r\n\t\t\t\t//curr was null, the stack was empty, we visited all\r\n\t\t\t\t//of the 'nodes'\r\n\t\t\t\telse{\r\n\t\t\t\t\tdone = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn treeAsString;\r\n\t}",
"private E[] geInOrderRightSubTree(E[] inOrderTraversal,\n\t\t\tE[] preOrderTraversal) {\n\t\treturn null;\n\t}",
"private void inorderLeafOnly(Node root) {// leaf not left, sorry it is LEAF\r\n if (this == null)\r\n return;\r\n if (root.left != null)\r\n inorderLeafOnly(root.left);\r\n // make sure it is leaf before printing\r\n if (root.left == null && root.right == null)\r\n System.out.print(root.value + \">\");\r\n if (root.right != null)\r\n inorderLeafOnly(root.right);\r\n }",
"public static void levelOrderLinewise3(Node node){\r\n Queue<Node> mainq = new ArrayDeque<>();\r\n \r\n //Adding root in mainq\r\n mainq.add(node);\r\n \r\n while(mainq.size()>0){\r\n \r\n //Size of queue is obtained and then we iterate it for size times, this will ensure for printing for same level\r\n int sz = mainq.size();\r\n \r\n while(sz > 0){\r\n //1. get + remove\r\n Node rem = mainq.remove();\r\n \r\n //2. Print \r\n System.out.print(rem.data + \" \");\r\n \r\n //3. Add children of node to mainq\r\n for(Node child : rem.children){\r\n mainq.add(child);\r\n }\r\n sz--;\r\n } \r\n //Above level completed so print \"Enter\"\r\n System.out.println();\r\n }\r\n }",
"void printZigZagTraversal() {\n\n\t\t// if null then return\n\t\tif (rootNode == null) {\n\t\t\treturn;\n\t\t}\n\n\t\t// declare two stacks\n\t\tStack<ZNode> currentLevel = new Stack<>();\n\t\tStack<ZNode> nextLevel = new Stack<>();\n\n\t\t// push the root\n\t\tcurrentLevel.push(rootNode);\n\t\tboolean leftToRight = true;\n\n\t\t// check if stack is empty\n\t\twhile (!currentLevel.isEmpty()) {\n\n\t\t\t// pop out of stack\n\t\t\tZNode node = currentLevel.pop();\n\n\t\t\t// print the data in it\n\t\t\tSystem.out.print(node.data + \" \");\n\n\t\t\t// store data according to current\n\t\t\t// order.\n\t\t\tif (leftToRight) {\n\t\t\t\tif (node.leftChild != null) {\n\t\t\t\t\tnextLevel.push(node.leftChild);\n\t\t\t\t}\n\n\t\t\t\tif (node.rightChild != null) {\n\t\t\t\t\tnextLevel.push(node.rightChild);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (node.rightChild != null) {\n\t\t\t\t\tnextLevel.push(node.rightChild);\n\t\t\t\t}\n\n\t\t\t\tif (node.leftChild != null) {\n\t\t\t\t\tnextLevel.push(node.leftChild);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (currentLevel.isEmpty()) {\n\t\t\t\tleftToRight = !leftToRight;\n\t\t\t\tStack<ZNode> temp = currentLevel;\n\t\t\t\tcurrentLevel = nextLevel;\n\t\t\t\tnextLevel = temp;\n\t\t\t}\n\t\t}\n\t}",
"public ArrayList<ArrayList<Integer>> zigzagLevelOrder(TreeNode root) {\n ArrayList<ArrayList<Integer>> list=new ArrayList<ArrayList<Integer>>(); \n if(root==null) return list; \n Stack<TreeNode> T=new Stack<TreeNode>(); \n Stack<TreeNode> S=new Stack<TreeNode>(); \n ArrayList<Integer> sub=new ArrayList<Integer>(); \n T.push(root);\n boolean reverse=false; \n while(!T.isEmpty())\n {\n TreeNode top=T.pop();\n sub.add(top.val);\n if(!reverse)\n {\n if(top.left!=null) S.push(top.left);\n if(top.right!=null) S.push(top.right);\n }else\n {\n if(top.right!=null) S.push(top.right);\n if(top.left!=null) S.push(top.left);\n }\n if(T.isEmpty())\n {\n list.add(sub);\n T=S;\n S=new Stack<TreeNode>();\n reverse=!reverse; \n sub=new ArrayList<Integer>(); \n }\n }\n return list; \n }",
"public List<Integer> inorderTraversal2(TreeNode root) {\n List<Integer> result = new ArrayList<>();\n if (root == null) {\n return result;\n }\n TreeNode curr = root; // not necessary\n Deque<TreeNode> stack = new ArrayDeque<>();\n\n while (true) {\n // inorder: left, root, right\n // add all left nodes into stack\n while (curr != null) {\n stack.push(curr);\n curr = curr.left;\n } // curr == null\n // if stack is empty, then finished\n if (stack.isEmpty()) {\n break;\n }\n // all left nodes in stack\n // if right node empty, pop, else add right\n curr = stack.pop();\n // add left and root\n result.add(curr.val);\n // if right is null, then next round pop stack\n // else next round add right.left first ...\n curr = curr.right;\n }\n // stack is empty\n return result;\n }",
"void inOrderTraversal(Node node){\r\n\t\tif( node == null ) {\r\n\t\t\treturn ;\r\n\t\t}\r\n\t\tinOrderTraversal( node.left );\r\n\t\tSystem.out.print( node.value + \" \");\r\n\t\tinOrderTraversal( node.right );\r\n\t}"
] | [
"0.8082709",
"0.7870346",
"0.7692143",
"0.7600541",
"0.7465964",
"0.7070046",
"0.7035674",
"0.70296377",
"0.6992522",
"0.69402087",
"0.6937486",
"0.6911546",
"0.69079",
"0.6906624",
"0.6906537",
"0.6904062",
"0.69028896",
"0.68607616",
"0.6848156",
"0.6847147",
"0.6836278",
"0.68320423",
"0.68252355",
"0.68205076",
"0.68081814",
"0.68056756",
"0.679396",
"0.6762251",
"0.67261064",
"0.67197996",
"0.67071056",
"0.66693413",
"0.6665521",
"0.66182286",
"0.6601996",
"0.6588499",
"0.6569303",
"0.656745",
"0.6565489",
"0.6554566",
"0.6529033",
"0.64971656",
"0.6491436",
"0.6473042",
"0.6463391",
"0.646247",
"0.64503974",
"0.64462423",
"0.64455587",
"0.64344287",
"0.6429549",
"0.6423593",
"0.64165694",
"0.6410295",
"0.64088374",
"0.64054114",
"0.63860196",
"0.6369495",
"0.6361228",
"0.63508683",
"0.63437694",
"0.6335789",
"0.6325584",
"0.6317814",
"0.63166654",
"0.62981313",
"0.6291662",
"0.62903243",
"0.628356",
"0.6278859",
"0.6277488",
"0.6276239",
"0.6263653",
"0.62622416",
"0.62550914",
"0.62520236",
"0.6242504",
"0.6238012",
"0.623215",
"0.6214087",
"0.6199643",
"0.6197373",
"0.6191835",
"0.6187629",
"0.6171908",
"0.61694866",
"0.61637604",
"0.6162555",
"0.614818",
"0.6142994",
"0.61317104",
"0.61317104",
"0.6128391",
"0.61281306",
"0.6127357",
"0.61205894",
"0.6111319",
"0.61072224",
"0.60993856",
"0.60982066"
] | 0.7295994 | 5 |
To search Node from BinarySearchTree | public TreeNode<T> searchNode(TreeNode<T> root, T info) {
if(null == root || null == info) {
return new TreeNode<T>(null);
} else {
if(0 == root.getInfo().compareTo(info)) {
return root;
} else if(root.getInfo().compareTo(info) > 0) {
return searchNode(root.getLeftChild(), info);
} else {
return searchNode(root.getRightChild(), info);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void searchNodesBST()\n {\n BinarySearchTree bst = new BinarySearchTree();\n No root = new No(6);\n bst.insert(root, root);\n bst.insert(root, new No(2));\n bst.insert(root, new No(9));\n No k = new No(1);\n bst.insert(root, k);\n bst.insert(root, new No(4));\n bst.insert(root, new No(8));\n assertEquals(k, bst.search(root, k));\n //bst.inOrder(root);\n }",
"private void BinarySearch(Node node, int index) {\n Node left, right;\n left = node.left;\n right = node.right;\n\n int leftIndex = (2 * index) + 1;\n int rightIndex = (2 * index) + 2;\n if (left != null) {\n ArrayTree[leftIndex] = left.key;\n BinarySearch(left, leftIndex);\n lastIndex = Math.max(leftIndex, lastIndex);\n } else {\n if (leftIndex < ArrayTree.length - 1) {\n ArrayTree[leftIndex] = 0;\n }\n }\n\n if (right != null) {\n ArrayTree[rightIndex] = right.key;\n BinarySearch(right, rightIndex);\n lastIndex = Math.max(rightIndex, lastIndex);\n } else {\n if (rightIndex < ArrayTree.length - 1) {\n ArrayTree[rightIndex] = 0;\n }\n }\n }",
"public BinaryNode<T> find(T v);",
"public RBNode<T> search(T key) {\r\n return search1(key);\r\n//\t\treturn search2(root, key); //recursive version\r\n }",
"public Node search(int key) {\n\t\t\t Node node=root;\n\t while (node!= nil){\n\t if(node.id==key){\n\t \treturn node;\n\t }\n\t else if(node.id<key){\n\t \tnode=node.right;\n\t }\n\t else{\n\t \tnode=node.left;\n\t } \n\t }\n\t //key not found in the tree\n\t return nil;\n\t }",
"public BTreeNode search(long key) {\n\t\treturn searcher(root, key);\n\t}",
"private Node searchNode(int id) {\n\t\tNode node = searchRec(root,id);\n\t\treturn node;\n\t}",
"private BTNode search(BTNode btNode, DataPair key) {\n int i =0;\n while (i < btNode.mCurrentKeyNum && key.compareTo(btNode.mKeys[i]) > 0)\n i++;\n\n if (i < btNode.mCurrentKeyNum && key.compareTo(btNode.mKeys[i])==0)\n return btNode;//btNode.mKeys[i];\n if (btNode.mIsLeaf)\n return null;\n return search(btNode.mChildren[i],key);\n }",
"public ObjectTreeNode searchBST(Object o) {\n ObjectTreeNode p;\n \n ObjectTreeNode r = new ObjectTreeNode(o);\n if(root != null) {\n p = root;\n while (p != null) {\n if (((TreeComparable)(r.getInfo())).compareTo((TreeComparable)(p.getInfo())) < 0)\n p = p.getLeft();\n else if (((TreeComparable)(r.getInfo())).compareTo((TreeComparable)(p.getInfo())) > 0)\n p = p.getRight();\n else \n return p;\n }\n }\n return null;\n }",
"public TreeNode find(Integer searchKey) {\n\t\treturn root.find(searchKey);\n\t}",
"public MyBinaryNode<K> search(K key) {\n\t\t\n\t\treturn searchRecursive(root, key);\n\t}",
"private Node search(String name)\r\n\t{\r\n\t\t// Check to see if the list is empty\r\n\t\tif(isEmpty())\r\n\t\t{\r\n\t\t\t// Return null which will be checked for by the method that called it\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t// Tree is not empty so use the recursive search method starting at the root reference \r\n\t\t// to find the correct Node containing the String name\r\n\t\treturn search(getRoot(), name);\r\n\t}",
"public Node nodeSearch(String s){\t \n\t int i=0;\n\t i++;\n\t if(this.children == null){\n\t\t//\t\tSystem.out.println(\"1\");\n\t\treturn null;\n\t }\n\t if(root.state.equals(s)){\n\t\t//System.out.println(\"2\");\n\t\treturn this;\n\t }\n\t Node v=null;\n\t for(String key:this.children.keySet()){\n\t\tNode nxt=this.children.get(key);\n\t\tif(key.equals(s)){\n\t\t // System.out.println(\"3\");\n\t\t return nxt;\n\t\t}\n\t\telse{\n\t\t v=nxt.nodeSearch(s);\n\t\t}\n\t }\n\n\t if(v!=null){\n\t\t//\t\tSystem.out.println(\"4\");\n\t\treturn v;\n\t }else{\n\t\t//System.out.println(\"5\");\t\t\n\t\treturn null;\n\t }\n\t}",
"public Node search(K key) {\n\t\tNode currentNode = this.mRoot;\n\t\t// start from the root of the tree that calls the method\n\t\twhile (currentNode != mSentinel && key.compareTo(currentNode.getKey()) != 0) {\n\t\t\t// if the current node is not empty and its key is not equal to the\n\t\t\t// search key\n\t\t\tif (key.compareTo(currentNode.getKey()) < 0) {\n\t\t\t\tcurrentNode = currentNode.getLeftChild();\n\t\t\t\t// go left if the search key is lower\n\t\t\t} else {\n\t\t\t\tcurrentNode = currentNode.getrightChild();\n\t\t\t\t// go right if the search key is higher\n\t\t\t}\n\t\t\t// break the loop if the search key matches the node key\n\t\t}\n\t\tif (currentNode == mSentinel) {\n\t\t\treturn null;\n\t\t\t// if there is not a match return nu;;\n\t\t} else {\n\t\t\treturn currentNode;\n\t\t\t// return the first node with the same key as the search key\n\t\t}\n\t}",
"@Test\n public void whenSearchTwoThenResultIndexOne() {\n tree.addChild(nodeOne, \"1\");\n nodeOne.addChild(nodeTwo, \"2\");\n nodeTwo.addChild(nodeThree, \"3\");\n assertThat(tree.searchByValue(\"4\"), is(\"Element not found\"));\n }",
"public boolean search(Node n){\n \n init(n);\n \n if (check()){\n \n return true;\n \n }else if(currentChildNodeLength == 0){\n \n return false;\n \n }else{\n \n return search(currentNode.getChildren());\n \n }\n \n }",
"public Node<E> search(E data){\n\tNode<E> tempNode = root; //becomes the root\n\twhile (tempNode != sentinel) {\n\t\tif (tempNode.getData().compareTo(data) == 0) {\n\t\t\treturn tempNode;\n\t\t} else if (tempNode.getData().compareTo(data) > 0) {\n\t\t\ttempNode = tempNode.getLeftChild();\n\t\t} else if (tempNode.getData().compareTo(data) < 0) {\n\t\t\ttempNode = tempNode.getRightChild();\n\t\t}\n\t}\n\treturn null;\n }",
"@Test\n\tpublic void testFind() {\n\t\tBinarySearchTree binarySearchTree=new BinarySearchTree();\n\t\tbinarySearchTree.insert(3);\n\t\tbinarySearchTree.insert(2);\n\t\tbinarySearchTree.insert(4);\n\t\tassertEquals(true, binarySearchTree.find(3));\n\t\tassertEquals(true, binarySearchTree.find(2));\n\t\tassertEquals(true, binarySearchTree.find(4));\n\t\tassertEquals(false, binarySearchTree.find(5));\n\t}",
"public TreeNode<T> Search(TreeNode<T> n, T s){\n if(n == null || n.elem.equals(s)) {return n;}\n else if(s.compareTo(n.elem) < 0) {return Search(n.left, s);}\n else {return Search(n.right, s);}\n\n }",
"private TFNode search(TFNode node, Object key) throws TFNodeException {\r\n\r\n // Check for empty node\r\n if (node.getNumItems() == 0) {\r\n throw new TFNodeException(\"Search discovered an empty node\");\r\n }\r\n\r\n int index = FFGTE(node, key);\r\n TFNode child = node.getChild(index);\r\n\r\n // If the node contains they key, return node\r\n if (index < node.getNumItems()) {\r\n if(treeComp.isEqual(node.getItem(index).key(), key)){\r\n return node;\r\n }\r\n }\r\n \r\n // If the node is a leaf, return node\r\n if (child == null) {\r\n return node;\r\n // If neither of the above, keep searching\r\n } else {\r\n return search(child, key);\r\n }\r\n \r\n }",
"public static Node find(Node node, int search_key){\n if(node!=null){ // node ที่รับมาต้องมีตัวตน\n if (search_key== node.key){ //ถ้าเจอ node ที่ตามหา ส่งค่าออกไป\n return node;\n }\n else if (search_key > node.key) { //ถ้า search_key มากกว่า node.key ตอนนี้ แสดงว่า อยู่ทางด้านขวา\n return find(node.right,search_key); // recursive โดยส่ง right-subtree\n }\n else{\n return find(node.left,search_key); // recursive โดยส่ง left-subtree\n }\n }\n else return null;\n\n }",
"public Node findNode(Node search, Node node) {\n\n if (search == null) {\n return null;\n }\n if (search.data == node.data) {\n return search;\n } else {\n\n Node returnNode = findNode(search.leftChild, node);\n\n if (returnNode == null) {\n\n returnNode = findNode(search.leftChild, node);\n }\n\n return returnNode;\n }\n\n\n }",
"public RBNode<T, E> searchAndRetrieve(T key) {\r\n\t\tRBNode<T, E> c = root;\r\n\t\tRBNode<T, E> p = nillLeaf;\r\n\t\twhile (c != nillLeaf) {\r\n\t\t\t// if when comparing if it hasnt found the key go to the left\r\n\t\t\tif (key.compareTo(c.uniqueKey) < 0) {\r\n\t\t\t\tp = c;\r\n\t\t\t\tc = c.leftChild;\r\n\t\t\t}\r\n\t\t\t// if when comparing if it hasnt found the key go to the right\r\n\t\t\telse if (key.compareTo(c.uniqueKey) > 0) {\r\n\t\t\t\tp = c;\r\n\t\t\t\tc = c.rightChild;\r\n\t\t\t}\r\n\t\t\t// they are equal\r\n\t\t\telse {\r\n\t\t\t\tp = c;\r\n\t\t\t\tc = c.leftChild;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn p;\r\n\t}",
"public BTNode<T> find ( T data ){\n\t\t//reset the find count\n\t\tfindCount = 0;\n\t\t \t\t\n\t\tif (root == null) \n\t\t\treturn null;\n \t\telse\n \t\treturn find (data, root);\n \t}",
"@Override\n public boolean search(E e) {\n \treturn search(e, root);\n\n }",
"public boolean search(RBNode<T, E> node) {\n\t\tRBNode<T, E> c = root;\r\n\t\twhile (c != nillLeaf) {\r\n\t\t\t// If Node is less than the current Node then go left.\r\n\t\t\tif (node.uniqueKey.compareTo(c.uniqueKey) < 0) {\r\n\t\t\t\t// we go left\r\n\t\t\t\tc = c.leftChild;\r\n\t\t\t}\r\n\t\t\t// If Node is bigger than the current Node then go right.\r\n\t\t\telse if (node.uniqueKey.compareTo(c.uniqueKey) > 0) {\r\n\t\t\t\t// we go right\r\n\t\t\t\tc = c.rightChild;\r\n\t\t\t}\r\n\t\t\t// Else they are equal\r\n\t\t\telse {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// OtherWise return false, it doesnt exist.\r\n\t\treturn false;\r\n\t}",
"private BinaryNode<E> _findNode(BinaryNode<E> node, E e) {\n\t\tif (node == null)\n\t\t\treturn null;\n\t\telse if (comparator.compare(e, node.getData()) < 0) // *****CHANGE THIS for HW#4*****\n\t\t\treturn _findNode(node.getLeftChild(), e);\n\t\telse if (comparator.compare(e, node.getData()) > 0) // *****CHANGE THIS for HW#4*****\n\t\t\treturn _findNode(node.getRightChild(), e);\n\t\telse // found it!\n\t\t\treturn node;\n\t}",
"public btNode search(int m){ \r\n \r\n System .out.println(\"We are searching for \" + m);\r\n btNode current = root; \r\n while(current.getData() != m) \r\n {\r\n if(m < current.getData()) \r\n current = current.getLeft();\r\n else \r\n current = current.getRight();\r\n if(current == null) \r\n return null; \r\n }\r\n return current; \r\n }",
"private boolean search(BTNode r, T val)\r\n {\r\n if (r.getData() == val)\r\n return true;\r\n if (r.getLeft() != null)\r\n if (search(r.getLeft(), val))\r\n return true;\r\n if (r.getRight() != null)\r\n if (search(r.getRight(), val))\r\n return true;\r\n return false; \r\n }",
"protected SearchNode<T> getSearchNode( Node<T> node ) {\n\t\treturn node == null ? null : searchNodes.get( node.getNodeId() );\n\t}",
"public boolean searchNode(int value) \n { \n return searchNode(header.rightChild, value); \n }",
"@Test\n public void whenSearchTwoThenResultLevelTwo() {\n tree.addChild(nodeOne, \"1\");\n nodeOne.addChild(nodeTwo, \"2\");\n assertThat(tree.searchByValue(\"2\"), is(\"Element founded on level 2\"));\n }",
"public Node<T> search(int id) {\n Node<T> res = root;\n res = search(res, id);\n if (res.getId() == id) return res;\n else return null;\n }",
"private BinaryTreeNode findNode(T item) {\n\t\tif (item.equals(root.data)) {\n\t\t\treturn root;\n\t\t}\n\n\t\telse return findNodeRecursive(item, root);\n\t}",
"private boolean FindNode(int num, TreeNodeWrapper parent, TreeNodeWrapper child) {\r\n\t\t//set parent node of TreeNodeWrapper as Root\r\n\t\tparent.Set(Root);\r\n\t\t//set child node as TreeNode Wrapper as Root\r\n\t\tchild.Set(Root);\r\n\t\t//if root is null, tree is empty\r\n\t\tif(Root == null) //tree is empty\r\n\t\t\treturn true;\r\n\t\t//while loop which searches tree until empty child node is found\r\n\t\twhile(child.Get() != null)\r\n\t\t{ if(child.Get().Data == num) // node found\r\n\t\t\treturn true;\r\n\t\t\t//if node not found use TreeNodeWrapper search remaining nodes\r\n\t\t else {\r\n\t\t\tparent.Set(child.Get());\r\n\t\t\tif(num < child.Get().Data)\r\n\t\t\t\tchild.Set(child.Get().Left);\r\n\t\t\telse\r\n\t\t\t\tchild.Set(child.Get().Right);\r\n\t\t }\t\r\n\t\t}\r\n\t\t//return false if node not found\r\n\t\treturn false;\r\n\t}",
"public TreeNode find(Integer searchKey) {\n\t\tif(searchKey.equals(data)) {\n\t\t\treturn this;\n\t\t} else if(searchKey > data) {\n\t\t\tif(rightChild == null) {\n\t\t\t\treturn null;\n\t\t\t} else {\n\t\t\t\treturn rightChild.find(searchKey);\n\t\t\t}\n\t\t} else {\n\t\t\tif(leftChild == null) {\n\t\t\t\treturn null;\n\t\t\t} else {\n\t\t\t\treturn leftChild.find(searchKey);\n\t\t\t}\n\t\t}\n\t}",
"private BTNode<T> find ( T data, BTNode<T> node ){\n \t\tfindCount++;\n\t\tif (data.compareTo (node.getData()) == 0){\n \t\treturn node;\n\t\t}else {\n\t\t//findCount++;\n\t\tif (data.compareTo (node.getData()) < 0){\n \t\treturn (node.getLeft() == null) ? null : find (data, node.getLeft());\n\t\t}else{\n \t\treturn (node.getRight() == null) ? null : find (data, node.getRight());\n\t\t}\n\t\t}\n }",
"public boolean search(T key) {\r\n\t\tRBNode<T, E> c = root;\r\n\t\twhile (c != nillLeaf) {\r\n\t\t\t// If Node is less than the current Node then go left.\r\n\t\t\tif (key.compareTo(c.uniqueKey) < 0) {\r\n\t\t\t\t// we go left\r\n\t\t\t\tc = c.leftChild;\r\n\t\t\t}\r\n\t\t\t// If Node is bigger than the current Node then go right.\r\n\t\t\telse if (key.compareTo(c.uniqueKey) > 0) {\r\n\t\t\t\t// we go right\r\n\t\t\t\tc = c.rightChild;\r\n\t\t\t}\r\n\t\t\t// Else they are equal\r\n\t\t\telse {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// OtherWise return false, it doesnt exist.\r\n\t\treturn false;\r\n\t}",
"static BinaryNode searchTree(BinaryNode root, int x) {\n\t\tBinaryNode xNode = new BinaryNode(x);\n\t\t//searchLast(xNode);\n\t\t\n\t\tBinaryNode n=root;\t//start from root\n\t\tBinaryNode lastLeft=null;\n\t\twhile(n!=null){\n\t\t\tif(n.val > xNode.val){\n\t\t\t\tn=n.left;\n\t\t\t\tif(n.left !=null) lastLeft=n.left;\n\t\t\t\t//else if n is x, there is no value smaller than x.\n\t\t\t}else if(n.val == xNode.val){\n\t\t\t\treturn lastLeft;\n\t\t\t}else{\t//then the x is on the right.(bigger)\n\t\t\t\t\n\t\t\t\tn=n.right;\n\t\t\t\tlastLeft=n;\n\t\t\t}\n\t\t}\n\t\t//if goes to this line, mean failed.\n\t\treturn null;\n }",
"public T search(T target) {\n\t\t\n\t\tBSTNode<T> tmp = root;\n\t\twhile(tmp != null) {\n\t\t\tint c = tmp.data.compareTo(target);\n\t\t\t\n\t\t\tif (c == 0) return tmp.data;\n\t\t\ttmp = c < 0 ? tmp.left: tmp.right;\n\t\t}\n\t\treturn null;\n\t}",
"public void run() \n\t{\n\t\tNode currentNode = this.tree.getRoot();\n\t\t\n\t\t//if the tree is empty and set the new node as the root node\n\t\tif (this.tree.getRoot() == null) \n\t\t{\n\t\t\tthis.tree.setRoot(this.node = new Node(this.node));\n\t\t\tthis.node.advanceToTheRoot();\n\t\t\ttree.getNote().setNote(\"Inserting a new root node [\" + node.getData()+\"].\");\n\t\t\twaitOnPause();\n\t\t} \n\t\telse \n\t\t{\n\t\t\t//otherwise go above the node and start to search\n\t\t\tthis.node.advanceToAboveTheRoot();\n\t\t\ttree.getNote().setNote(\"Starting to insert node [\"+this.value+\"].\");\n\t\t\twaitOnPause();\n\t\t\t\n\t\t\twhile (true) \n\t\t\t{\n\t\t\t\tint result = 0;\n\t\t\t\tboolean exit = false;\n\t\t\t\t\n\t\t\t\t//if the new node and the node which is being search are both numbers then \n\t\t\t\t//..convert their values into numbers and compare them.\n\t\t\t\tif(tree.isNumeric(currentNode.getData()) && tree.isNumeric(this.value))\n\t\t\t\t{\n\t\t\t\t\tint current = Integer.parseInt(currentNode.getData());\n\t\t\t\t\tint thisValue = Integer.parseInt(this.value);\n\t\t\t\t\t\n\t\t\t\t\tif (current == thisValue)\n\t\t\t\t\t\tresult = 1;\n\t\t\t\t\t\n\t\t\t\t\t// if the new node comes before the current node, go left\n\t\t\t\t\tif (thisValue < current) \n\t\t\t\t\t\tresult = 2;\n\t\t\t\t\telse if (thisValue > current) \n\t\t\t\t\t\tresult = 3;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//else the node which is being searched is a number so compare\n\t\t\t\t\t//..them both as words.\n\t\t\t\t\tif (currentNode.getData().compareTo(this.value) == 0) \n\t\t\t\t\t\tresult = 1;\n\t\t\t\t\t\n\t\t\t\t\t// if the new node comes before the current node, go left\n\t\t\t\t\tif (this.value.compareTo(currentNode.getData()) < 0) \n\t\t\t\t\t\tresult = 2;\n\t\t\t\t\telse if (this.value.compareTo(currentNode.getData()) > 0)\n\t\t\t\t\t\tresult = 3;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tswitch(result)\n\t\t\t\t{\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\t//if the node already exists in the tree then remove the 'Search' node\n\t\t\t\t\t\ttree.getNote().setNote(\"Node [\"+this.value+\"] already exists in the tree.\");\n\t\t\t\t\t\tif(!mf.getOpenF())\n\t\t\t\t\t\t\tthis.node.bgColor(node.getDeleteColor());\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tthis.node.setColor(node.getInvisibleColor(), node.getInvisibleColor());\n\t\t\t\t\t\twaitOnPause();\n\t\t\t\t\t\tthis.node.goDown();\n\t\t\t\t\t\ttree.getNote().setNote(\"\");\n\t\t\t\t\t\twaitOnPause();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\t//if the new node is less than the node which is being searched then go to its left\n\t\t\t\t\t\t//...child. If the left child is empty then set the new node as the left child and\n\t\t\t\t\t\t//...connect them both.\n\t\t\t\t\t\ttree.getNote().setNote(\"Checking left side since node [\" + this.value +\n\t\t\t\t\t\t\t\t\"] is less than node [\"+ currentNode.getData()+\"].\");\n\t\t\t\t\t\tif (currentNode.getLeft() != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcurrentNode = currentNode.getLeft();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcurrentNode.connectNode(this.node = new Node(this.node),\"left\");\n\t\t\t\t\t\t\ttree.getNote().setNote(\"Node [\"+this.value+\"] inserted since node [\"+currentNode.getData()+\n\t\t\t\t\t\t\t\t\t\"]'s left child is empty.\");\n\t\t\t\t\t\t\texit = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\tcase 3:\n\t\t\t\t\t\t//if the new node is greater than the node which is being searched then go to its right\n\t\t\t\t\t\t//...child. If the right child is empty then set the new node as the right child and\n\t\t\t\t\t\t//...connect them both.\n\t\t\t\t\t\ttree.getNote().setNote(\"Going to right side since node [\" + this.value +\n\t\t\t\t\t\t\t\t\"] is greater than node [\"+ currentNode.getData()+\"].\");\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (currentNode.getRight() != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcurrentNode = currentNode.getRight();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// create a new node\n\t\t\t\t\t\t\tthis.node = new Node(this.node);\n\t\t\t\t\t\t\tcurrentNode.connectNode(this.node,\"right\");\n\t\t\t\t\t\t\ttree.getNote().setNote(\"Node [\"+this.value+\"] inserted since node [\"+currentNode.getData()+\n\t\t\t\t\t\t\t\t\t\"]'s right child is empty.\");\n\t\t\t\t\t\t\texit = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(exit)\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t//go to above the next node which is being searched.\n\t\t\t\tthis.node.advanceToNode(currentNode);\n\t\t\t\twaitOnPause();\t\n\t\t\t}\n\t\t\t\n\t\t\tthis.node = (this.tree.node = null);\n\t\t\t\n\t\t\t//if the tree is not empty then reposition it.\n\t\t\tif(this.tree.getRoot() != null)\n\t\t\t\t\tthis.tree.getRoot().repositionTree();\n\t\t\t\n\t\t\twaitOnPause();\n\t\t\t\n\t\t\t//check if the tree is balanced.\n\t\t\tthis.tree.reBalanceNode(currentNode);\n\t\t}\n\t\ttree.getNote().setNote(\"Insertion Complete.\");\n\t\ttree.getMainFrame().getStack().push(\"i \"+this.value); //add the operation to the stack\n\t}",
"public Node search (String s){\n if(s.equals(word) ){ //if match is found\n return this;\n }\n\n if(s.compareTo(word) <= 0){ //left side\n if(left != null){\n return left.search (s); \n\n }else{\n return null; //value not in the tree\n }\n }else{ //right side\n if(right != null){\n return right.search (s);\n }else{\n return null;\n }\n }\n\n\n\n\n }",
"public TreeNode searchBST(TreeNode root, int val) {\n\n if (root.left == null && root.right == null){\n return new TreeNode();\n }\n\n // DFS\n return _help(root, val);\n }",
"public BSTNode search(int value){ //The value to search for.\n BSTNode current = root;\n \n // While we don't have a match\n while(current!=null){\n \n // If the value is less than current, go left.\n if(value < current.value){\n current = current.left;\n }\n \n // If the value is more than current, go right.\n else if(value > current.value){\n current = current.right;\n }\n \n // We have a match!\n else{\n break;\n }\n }\n return current;\n }",
"public Node find(int key) {\n Node current = root; // start at root\n while (current.iData != key) {\n // while no match\n if (key < current.iData)\n // go left\n current = current.leftChild;\n else\n current = current.rightChild;\n if (current == null) // if no child, didn't find it\n return null;\n }\n return current; // found it\n }",
"public abstract boolean isBinarySearchTree();",
"public static void main(String[] args){\n Node root = null;\n BinarySearchTree bst = new BinarySearchTree();\n root = bst.insert(root, 15);\n root = bst.insert(root, 10);\n root = bst.insert(root, 20);\n root = bst.insert(root, 25);\n root = bst.insert(root, 8);\n root = bst.insert(root, 12);\n // System.out.println(\"search result: \" + bst.is_exists(root, 12));\n // System.out.println(\"min value: \" + bst.findMinValue(root));\n // System.out.println(\"max value: \" + bst.findMaxValue(root));\n // System.out.println(\"level order traversal: \");\n // bst.levelOrderTraversal(root);\n // System.out.println(\"preorder traversal : \");\n // bst.preorderTraversal(root);\n // System.out.println(\"inorder traversal : \");\n // bst.inorderTraversal(root);\n // System.out.println(\"postorder traversal : \");\n // bst.postorderTraversal(root);\n // System.out.println(bst.isBinarySearchTree(root));\n // root = bst.deleteNode(root, 10);\n // bst.inorderTraversal(root); // result should be: 8 12 15 20 25\n System.out.println(bst.inorderSuccessor(root, 8)); // result should be: 10\n System.out.println(bst.inorderSuccessor(root, 15)); // result should be: 20\n System.out.println(bst.inorderSuccessor(root, 20)); // result should be: 25\n System.out.println(bst.inorderSuccessor(root, 25)); // result should be: null\n }",
"@Override\r\n public Object findElement(Object key) {\r\n\r\n // Search for node possibly containing key\r\n TFNode node = search(root(), key);\r\n \r\n // Note the index of where the key should be\r\n int index = FFGTE(node, key);\r\n\r\n // If the index is greater than the number of items in the node, the key is not in the node\r\n if (index < node.getNumItems()) {\r\n // Look for key in node\r\n if (treeComp.isEqual(node.getItem(index).key(), key)) {\r\n return node.getItem(index);\r\n }\r\n }\r\n\r\n // The search hit a leaf without finding the key\r\n return null;\r\n }",
"public TFNode findNode(Object key) {\r\n\r\n // Search for node possibly containing key\r\n TFNode node = search(root(), key);\r\n\r\n // Note the index of where the key should be\r\n int index = FFGTE(node, key);\r\n\r\n // If the index is greater than the number of items in the node, the key is not in the node\r\n if (index < node.getNumItems()) {\r\n // Look for key in node\r\n if (treeComp.isEqual(node.getItem(index).key(), key)) {\r\n return node;\r\n }\r\n }\r\n\r\n // The search hit a leaf without finding the key\r\n return null;\r\n }",
"@Override\n\tpublic boolean search(E e) {\n\t\tTreeNode<E> curr = root;\n\t\t\n\t\twhile (curr != null) {\n\t\t\tif(e.compareTo( curr.element) < 0) {\n\t\t\t\tcurr = curr.left;\n\t\t\t}\n\t\t\telse if(e.compareTo(curr.element) > 0) {\n\t\t\t\tcurr = curr.right;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"@Override\r\n\tpublic CacheTreeNode searchTreeNode(String key) {\n\t\tassert (StringUtils.isNotEmpty(key));\r\n\t\tCacheTreeNode node = (CacheTreeNode)this.getCacheData(SUPER_ROOT_KEY);\r\n\t\tif(node != null){\r\n\t\t\treturn node.search(key);\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public BinarySearchTree() {}",
"private static boolean search(Node root, int key) {\n\t\tif(root == null) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif(key == root.data) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse if(key < root.data ) {\r\n\t\t\t\treturn search(root.left,key);\r\n\t\t\t}\r\n\t\t\telse if(key > root.data) {\r\n\t\t\t\treturn search(root.right,key);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private static boolean search(BinaryTreeNode node, int i, int j) {\r\n\t\tif(node!=null) {\r\n\t\t\tif(node.data==i || node.data==j) return true;\r\n\t\t\telse return search(node.left,i,j) || search(node.right,i,j);\r\n\t\t}\r\n\t\treturn false;\r\n\t\t\t\r\n\t\t\r\n\t}",
"private MyBinaryNode<K> searchRecursive(MyBinaryNode<K> current, K key) {\n\t\tif (current == null) \n\t\treturn null;\n\t\telse if(current.key.compareTo(key) == 0) \n\t\t\treturn current;\n\t\telse if(current.key.compareTo(key) < 0) \n\t\t\treturn searchRecursive(current.right, key);\n\t\telse\n\t\t\treturn searchRecursive(current.left, key); \n\t}",
"public Reference search(int val) { // completely not sure\n\t\tReference ref = null;\n\t\t// This method will call findPtrIndex(val)\n\t\t// which returns the array index i, such that the ith pointer in the node points to the subtree containing val.\n\t\t// It will then call search() recursively on the node returned in the previous step.\n\t\tint ptrIndex = findPtrIndex(val);\n\t\tNode subNode = ptrs[ptrIndex];\n\t\tref = subNode.search(val); // return the reference pointing to a leaf node.\n\t\treturn ref;\n\t}",
"public TreeNode searchBST(TreeNode root, int x){\r\n if( root == null)\r\n return null;\r\n if( root.value == x)\r\n return root;\r\n else if( x< root.value)\r\n return searchBST(root.left, x);\r\n else\r\n return searchBST(root.right, x);\r\n }",
"private Node<T> searchRecursively(Node<T> node, T value) {\n\n // If the key is less than that of the current node, calls this method again with the current node's\n // left branch as the new node to compare keys with.\n if (value.compareTo(node.getValue()) == -1) {\n node = node.getLeft();\n return searchRecursively(node, value);\n }\n\n // Otherwise, calls the method again, comparing with the current node's right branch.\n else if (value.compareTo(node.getValue()) == 1) {\n node = node.getRight();\n return searchRecursively(node, value);\n }\n\n // If the current node contains the key, returns this node.\n return node;\n }",
"@Override\n public boolean search(K key) {\n if (rootNode == null)\n return false;\n try {\n return exist(key, rootNode);\n } catch (IllegalArgumentException e) {\n System.out.println(e.getMessage());\n return false;\n }\n }",
"public BinarySearchTree(){\n\t\tthis.root = null;\n\t}",
"public Node find(int key) // find node with given key\n\t{ // (assumes non-empty tree)\n\t\tNode current = root; // start at root\n\t\tif(current == null) {\n\t\t\treturn null;\n\t\t}\n\t\twhile(current.iData != key) // while no match,\n\t\t{\n\t\t\tif(key < current.iData) // go left?\n\t\t\t\tcurrent = current.leftChild;\n\t\t\telse // or go right?\n\t\t\t\tcurrent = current.rightChild;\n\t\t\tif(current == null) // if no child,\n\t\t\t\treturn null; // didn't find it\n\t\t}\n\t\treturn current; // found it\n\t}",
"public boolean search(String key){\n DataPair dp = getDataPair(key);\n BTNode out=null;\n if (dp != null)\n out = search(dp);\n return out != null;\n }",
"Node search(int reqNodeValue){\r\n\t\tNode reqNode = this.root ;\r\n\t\t \r\n\t\twhile(reqNode != null && reqNode.value != reqNodeValue) {\r\n\t\t\tif(reqNode.value < reqNodeValue) {\r\n\t\t\t\treqNode = reqNode.right ; \r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\treqNode = reqNode.left ;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(reqNode == null) {\r\n\t\t\tSystem.out.println(\"No such node exists in the tree\");\r\n\t\t}\r\n\t\treturn reqNode;\r\n\t}",
"private boolean search(BinaryNode<AnyType> curr, AnyType target) {\n\t\tif (curr != null) {\n\t\t\tif (curr.element.compareTo(target) < 0) {\n\t\t\t\treturn search(curr.right, target);\n\t\t\t} else if (curr.element.compareTo(target) > 0) {\n\t\t\t\treturn search(curr.left, target);\n\t\t\t} else {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\n\t}",
"public RBNode<T, E> searchRoot(RBNode<T, E> node) {\r\n\t\tRBNode<T, E> c = node;\r\n\t\tRBNode<T, E> p = node.parent;\r\n\t\t// While the parent of the current node is not null move up.\r\n\t\twhile (p != nillLeaf) {\r\n\t\t\tc = c.parent;\r\n\t\t}\r\n\t\t// c must be the root of the node being entered\r\n\t\t// return c which is the root.\r\n\t\treturn c;\r\n\t}",
"public boolean search(int data) {\n\t\t// Node search=root;\n\t\t// //System.out.println(\"Deni2\"+\" \"+root.data);\n\t\t// if(search==null)\n\t\t// return false;\n\t\t// while(search!=null) {\n\t\t// if(search.data==data) {\n\t\t// return true;\n\t\t// }\n\t\t// else if(data<search.data) {\n\t\t// search=search.left;\n\t\t// System.out.println(\"going to left\"+data+\" \"+root.data);\n\t\t// }\n\t\t// else if(data>search.data) {\n\t\t// search=search.right;\n\t\t// System.out.println(\"going to right\"+data+\" \"+root.data);\n\t\t// }\n\t\t//\n\t\t// }\n\t\treturn search(root, data);\n\t}",
"public void convertBinaryTreeToBinarySearchTree()\n\t{\n\t\tif(root==null)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t/*Inorder traversal to fill array*/\n\t\tinOrderTraversal(root);\n\t\t/*sorting the array*/\n\t\tCollections.sort(arr);\n\t\t/*Traverse tree using inorder traversal, and replace the node data with data in sorted array*/\n\t\treplaceNodeInInorderTraverse(root);\n\t\t\n\t}",
"private void valueSearch(int key, Node currNode) {\n int numChildren = getNumChildren();\n\n // Returns if currNode is null.\n if (currNode == null) {\n queueNodeSelectAnimation(null, \"Current Node null, desired Node not found\",\n AnimationParameters.ANIM_TIME);\n return;\n\n }\n\n // Finishes the traversal if the key has been found.\n if (currNode.key == key) {\n queueNodeSelectAnimation(currNode, key + \" == \"\n + currNode.key + \", desired Node found\",\n AnimationParameters.ANIM_TIME);\n\n }\n // Explores the left subtree.\n else if (key < currNode.key) {\n for (int i = 0; i < numChildren / 2; ++i) {\n queueNodeSelectAnimation(currNode.children[i],\n key + \" < \" + currNode.key +\n \", exploring left subtree\",\n AnimationParameters.ANIM_TIME);\n valueSearch(key, currNode.children[i]);\n\n }\n }\n // Explores the right subtree.\n else {\n for (int i = numChildren / 2; i < numChildren; ++i) {\n queueNodeSelectAnimation(currNode.children[i],\n key + \" > \" + currNode.key +\n \", exploring right subtree\",\n AnimationParameters.ANIM_TIME);\n valueSearch(key, currNode.children[i]);\n\n }\n }\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public static void main(String[] args) {\n\t\tNode a = new Node(10);\r\n\t\tNode b = new Node(-5);\r\n\t\tNode c = new Node(-10);\r\n\t\tNode d = new Node(5);\r\n\t\tNode e = new Node(25);\r\n\t\tNode f = new Node(36);\r\n\t\ta.left = b;\r\n\t\tb.left = c;\r\n\t\tb.right = d;\r\n\t\ta.right = e;\r\n\t\te.right = f;\r\n\t\tboolean found1 = search(a,22);\r\n\t\tboolean found2 = search(a,5);\r\n\t\tSystem.out.println(found1);\r\n\t\tSystem.out.println(found2);\r\n\t}",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }",
"public int Search(int v_key){\n\tboolean cont ;\n\tint ifound ;\n\tTree current_node;\n\tint key_aux ;\n\n\tcurrent_node = this ;\n\tcont = true ;\n\tifound = 0 ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux)\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse cont = false ;\n\t else \n\t\tif (key_aux < v_key)\n\t\t if (current_node.GetHas_Right())\n\t\t\tcurrent_node = current_node.GetRight() ;\n\t\t else cont = false ;\n\t\telse { \n\t\t ifound = 1 ;\n\t\t cont = false ;\n\t\t}\n\t}\n\treturn ifound ;\n }"
] | [
"0.7538466",
"0.7397809",
"0.73063046",
"0.7242068",
"0.71228623",
"0.70669436",
"0.69972813",
"0.6988333",
"0.6974685",
"0.6965577",
"0.6948582",
"0.6847666",
"0.6842209",
"0.6794426",
"0.67822385",
"0.6774109",
"0.6764885",
"0.6751921",
"0.67472434",
"0.6743536",
"0.67307633",
"0.6724943",
"0.67241454",
"0.67229617",
"0.6717245",
"0.66935176",
"0.6681164",
"0.66557187",
"0.6629589",
"0.6616944",
"0.6616445",
"0.6595838",
"0.65652645",
"0.6555337",
"0.6548416",
"0.65465367",
"0.6533323",
"0.6524409",
"0.6504028",
"0.65010816",
"0.6495145",
"0.6484635",
"0.64837533",
"0.64703286",
"0.6465781",
"0.6449",
"0.6443149",
"0.64404947",
"0.64303374",
"0.6413693",
"0.63925475",
"0.6376351",
"0.63650614",
"0.6347989",
"0.63406247",
"0.63373303",
"0.63284785",
"0.63255745",
"0.63176376",
"0.63072664",
"0.6298828",
"0.628946",
"0.628857",
"0.6285523",
"0.62775046",
"0.6258468",
"0.62332183",
"0.6233145",
"0.62221515",
"0.62221515",
"0.62221515",
"0.62221515",
"0.62221515",
"0.62221515",
"0.62221515",
"0.62221515",
"0.62221515",
"0.62221515",
"0.62221515",
"0.62221515",
"0.62221515",
"0.62221515",
"0.62221515",
"0.62221515",
"0.62221515",
"0.62221515",
"0.62221515",
"0.62221515",
"0.62221515",
"0.62221515",
"0.62221515",
"0.62221515",
"0.62221515",
"0.6221766",
"0.6219916",
"0.6219916",
"0.6219916",
"0.6219916",
"0.6219916",
"0.6219916"
] | 0.65950185 | 32 |
method to delete node from binary search tree | public TreeNode<T> delete(TreeNode<T> root, T info) {
if(null == root || info == null) {
return root;
} else {
return deleteNode(root, info);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private BinaryNode<E> _delete(BinaryNode<E> node, E e) {\n\t\tif (node == null) {\n\t\t\treturn null;\n\t\t}\n\t\tif (comparator.compare(e, node.getData()) < 0) // <, so go left\n\t\t\tnode.setLeftChild(_delete(node.getLeftChild(), e));// recursive call\n\t\telse if (comparator.compare(e, node.getData()) > 0) // >, so go right\n\t\t\tnode.setRightChild(_delete(node.getRightChild(), e));// recursive call\n\t\telse { // FOUND THE NODE\n\t\t\tfoundNode = true;\n\t\t\tnode = _deleteNode(node);\n\t\t}\n\t\treturn node;\n\t}",
"public void deleteNode(int key){\n\t\t//System.out.println(\" in delete Node \");\n\t\tNode delNode = search(key);\n\t\tif(delNode != nil){\n\t\t\t//System.out.println(\" del \" + delNode.id);\n\t\t\tdelete(delNode);\n\t\t}else{\n\t\t\tSystem.out.println(\" Node not in RB Tree\");\n\t\t}\n\t}",
"void deleteTree(TreeNode node) \n {\n root = null; \n }",
"public void deleteNode() {\n TreeNode pNode = this.getParentNode();\n int id = this.getSelfId();\n\n if (pNode != null) {\n pNode.deleteChildNode(id);\n }\n }",
"public boolean Delete(int num) {\r\n\t\t//initialize boolean field, set to true if value found in tree\r\n\t\tboolean found;\r\n\t\t//initialize the parent node using the TreeNodeWrapper\r\n\t\tTreeNodeWrapper p = new TreeNodeWrapper();\r\n\t\t//initialize the child node using the TreeNodeWrapper\r\n\t\tTreeNodeWrapper c = new TreeNodeWrapper();\r\n\t\t//initialize largest field to re-allocate parent/child nodes\r\n\t\tTreeNode largest;\r\n\t\t//initialize nextLargest field to re-allocate parent/child nodes\r\n\t\tTreeNode nextLargest;\r\n\t\t//found set to true if FindNode methods locates value in the tree\r\n\t\tfound = FindNode(num, p, c);\r\n\t\t//if node not found return false\r\n\t\tif(found == false)\r\n\t\t\treturn false;\r\n\t\telse //identify the case number\r\n\t\t{\r\n\t\t\t//case 1: deleted node has no children\r\n\t\t\t//if left and right child nodes of value are both null node has no children\r\n\t\t\tif(c.Get().Left == null && c.Get().Right == null)\r\n\t\t\t\t//if parent left node is equal to child node then deleted node is a left child\r\n\t\t\t\tif(p.Get().Left == c.Get())\r\n\t\t\t\t\tp.Get().Left = null;\r\n\t\t\t\telse //deleted node is a right child\r\n\t\t\t\t\tp.Get().Right = null;\r\n\t\t\t//case 2: deleted node has 1 child\r\n\t\t\t//if deleted node only has 1 child node\r\n\t\t\telse if(c.Get().Left == null || c.Get().Right == null)\r\n\t\t\t{\r\n\t\t\t\t//if parent left node is equal to child node then deleted node is a left child\r\n\t\t\t\tif(p.Get().Left == c.Get())\r\n\t\t\t\t{\r\n\t\t\t\t\t//if deleted node is a left child then set deleted node child node as child to parent node\r\n\t\t\t\t\tif(c.Get().Left != null) //deleted node has a left child\r\n\t\t\t\t\t\tp.Get().Left = c.Get().Left;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tp.Get().Left = c.Get().Right;\r\n\t\t\t\t}\r\n\t\t\t\telse //if deleted node is a right child then set deleted node child node as child to parent node\r\n\t\t\t\t{\r\n\t\t\t\t\tif(c.Get().Left != null) //deleted node has a left child\r\n\t\t\t\t\t\tp.Get().Right = c.Get().Left;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tp.Get().Right = c.Get().Right;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//case 3: deleted node has two children\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t//set the nextLargest as the left child of deleted node\r\n\t\t\t\tnextLargest = c.Get().Left;\r\n\t\t\t\t//set the largest as the right node of the nextLargest node\r\n\t\t\t\tlargest = nextLargest.Right;\r\n\t\t\t\t//if right node is not null then left child has a right subtree\r\n\t\t\t\tif(largest != null) \r\n\t\t\t\t{\r\n\t\t\t\t\t//while loop to move down the right subtree and re-allocate after node is deleted\r\n\t\t\t\t\twhile(largest.Right != null) //move down right subtree\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tnextLargest = largest;\r\n\t\t\t\t\t\tlargest = largest.Right;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//overwrite the deleted node\r\n\t\t\t\t\tc.Get().Data = largest.Data; \r\n\t\t\t\t\t// save the left subtree\r\n\t\t\t\t\tnextLargest.Right = largest.Left; \r\n\t\t\t\t}\r\n\t\t\t\telse //left child does not have a right subtree\r\n\t\t\t\t{\r\n\t\t\t\t\t//save the right subtree\r\n\t\t\t\t\tnextLargest.Right = c.Get().Right; \r\n\t\t\t\t\t//deleted node is a left child\r\n\t\t\t\t\tif(p.Get().Left == c.Get()) \r\n\t\t\t\t\t\t//jump around deleted node\r\n\t\t\t\t\t\tp.Get().Left = nextLargest; \r\n\t\t\t\t\telse //deleted node is a right child\r\n\t\t\t\t\t\tp.Get().Right = nextLargest; //jump around deleted node\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//return true is delete is successful\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}",
"public static void deleteNode(int nodeData){\n }",
"void deleteNode(ZVNode node);",
"public void deleteNode ()\n {\n ConfigTreeNode node = _tree.getSelectedNode();\n ConfigTreeNode parent = (ConfigTreeNode)node.getParent();\n int index = parent.getIndex(node);\n ((DefaultTreeModel)_tree.getModel()).removeNodeFromParent(node);\n int ccount = parent.getChildCount();\n node = (ccount > 0) ?\n (ConfigTreeNode)parent.getChildAt(Math.min(index, ccount - 1)) : parent;\n if (node != _tree.getModel().getRoot()) {\n _tree.setSelectionPath(new TreePath(node.getPath()));\n }\n DirtyGroupManager.setDirty(group, true);\n }",
"private BinarySearchTree deleteTree(BinarySearchTree tree, Comparable key){\r\n\t\t\r\n\t\t//If it is a leaf\r\n\t\tif(tree.getLeftChild() == null && tree.getRightChild() == null){\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t//Tree has only 1 leaf\r\n\t\telse if( (tree.getLeftChild() == null && tree.getRightChild() != null) ||\r\n\t\t\t\t (tree.getLeftChild() != null && tree.getRightChild() == null)){\r\n\t\t\t\r\n\t\t\t//Make a new tree out of the leaf and make it the new root\r\n\t\t\tif(tree.getLeftChild() != null){\r\n\t\t\t\treturn tree.getLeftChild();\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\treturn tree.getRightChild();\r\n\t\t\t}\r\n\t\t}\r\n\t\t//Has two leaves. This case is slightly more complicated\r\n\t\telse{\r\n\t\t\t//get the leftmost item in the right child subtree. This becomes the \r\n\t\t\t//new root. This allows the BinarySearchTree to stay a valid \r\n\t\t\t//BinarySearchTree\r\n\t\t\tKeyedItem replacementItem = findLeftMost(tree.getRightChild());\r\n\t\t\t\r\n\t\t\t//Delete the tree with that item so it can be moved to the new root\r\n\t\t\tBinarySearchTree replacementTree = deleteLeftMost(tree.getRightChild());\r\n\t\t\t\r\n\t\t\t//change the root to the new item\r\n\t\t\ttree.setRootItem(replacementItem);\r\n\t\t\t\r\n\t\t\t//Set the new roots right tree to the replacement tree\r\n\t\t\ttree.attachRightSubtree(replacementTree);\r\n\t\t\treturn tree;\r\n\t\t}\r\n\t}",
"@Override\n /*\n * Delete an element from the binary tree. Return true if the element is\n * deleted successfully Return false if the element is not in the tree\n */\n public boolean delete(E e) {\n TreeNode<E> parent = null;\n TreeNode<E> current = root;\n while (current != null) {\n if (e.compareTo(current.element) < 0) {\n parent = current;\n current = current.left;\n } else if (e.compareTo(current.element) > 0) {\n parent = current;\n current = current.right;\n } else {\n break; // Element is in the tree pointed at by current\n }\n }\n if (current == null) {\n return false; // Element is not in the tree\n }// Case 1: current has no left children\n if (current.left == null) {\n// Connect the parent with the right child of the current node\n if (parent == null) {\n root = current.right;\n } else {\n if (e.compareTo(parent.element) < 0) {\n parent.left = current.right;\n } else {\n parent.right = current.right;\n }\n }\n } else {\n// Case 2: The current node has a left child\n// Locate the rightmost node in the left subtree of\n// the current node and also its parent\n TreeNode<E> parentOfRightMost = current;\n TreeNode<E> rightMost = current.left;\n while (rightMost.right != null) {\n parentOfRightMost = rightMost;\n rightMost = rightMost.right; // Keep going to the right\n }\n// Replace the element in current by the element in rightMost\n current.element = rightMost.element;\n// Eliminate rightmost node\n if (parentOfRightMost.right == rightMost) {\n\n parentOfRightMost.right = rightMost.left;\n } else // Special case: parentOfRightMost == current\n {\n parentOfRightMost.left = rightMost.left;\n }\n }\n size--;\n return true; // Element inserted\n }",
"public void delete(int key) {\n\n\n // There should be 6 cases here\n // Non-root nodes should be forwarded to the static function\n if (root == null) System.out.println(\"Empty Tree!!!\"); // ไม่มี node ใน tree\n else {\n\n Node node = find(key);\n\n if (node == null) System.out.println(\"Key not found!!!\"); //ไม่เจอ node\n\n\n else if(node == root){ //ตัวที่ลบเป็น root\n if (root.left == null && root.right == null) { //ใน tree มีแค่ root ตัสเดียว ก็หายไปสิ จะรอไร\n root = null;\n }\n else if (root.left != null && root.right == null) { //่ root มีลูกฝั่งซ้าย เอาตัวลูกขึ้นมาแทน\n root.left.parent = null;\n root = root.left;\n }\n else { //่ root มีลูกฝั่งขวา เอาตัวลูกขึ้นมาแทน\n Node n = findMin(root.right);\n root.key = n.key;\n delete(n);\n }\n\n }\n\n\n else { //ตัวที่ลบไม่ใช่ root\n delete(node);\n }\n }\n }",
"public static void delete(Node node){\n // There should be 7 cases here\n if (node == null) return;\n\n if (node.left == null && node.right == null) { // sub-tree is empty case\n if (node.key < node.parent.key) { // node น้อยกว่าข้างบน\n node.parent.left = null;\n }\n else {\n node.parent.right = null;\n }\n\n return;\n }\n\n else if (node.left != null && node.right == null) { // right sub-tree is empty case\n if (node.left.key < node.parent.key) { // sub-tree อยู่ทางซ้ายของ parent\n node.left.parent = node.parent;\n node.parent.left = node.left;\n }\n else {\n node.left.parent = node.parent;\n node.parent.right = node.left;\n }\n return;\n }\n else if (node.right != null && node.left == null) { // left sub-tree is empty case\n if (node.right.key < node.parent.key) { // sub-tree อยู่ทางซ้ายของ parent\n node.right.parent = node.parent;\n node.parent.left = node.right;\n }\n else {\n node.right.parent = node.parent;\n node.parent.right = node.right;\n }\n return;\n }\n else { // full node case\n // หา min ของ right-subtree เอา key มาเขียนทับ key ของ node เลย\n Node n = findMin(node.right);\n node.key = n.key;\n delete(n);\n }\n }",
"public void delete(Integer data) {\n ArrayList<Node> parents = new ArrayList<>();\n Node nodeDel = this.root;\n Node parent = this.root;\n Node imBalance;\n Integer balanceFactor;\n boolean isLeftChild = false;\n if (nodeDel == null) {\n return;\n }\n while (nodeDel != null && !nodeDel.getData().equals(data)) {\n parent = nodeDel;\n if (data < nodeDel.getData()) {\n nodeDel = nodeDel.getLeftChild();\n isLeftChild = true;\n } else {\n nodeDel = nodeDel.getRightChild();\n isLeftChild = false;\n }\n parents.add(nodeDel);\n }\n\n if (nodeDel == null) {\n return;\n// delete a leaf node\n } else if (nodeDel.getLeftChild() == null && nodeDel.getRightChild() == null) {\n if (nodeDel == root) {\n root = null;\n } else {\n if (isLeftChild) {\n parent.setLeftChild(null);\n } else {\n parent.setRightChild(null);\n }\n }\n }\n// deleting a node with degree of one\n else if (nodeDel.getRightChild() == null) {\n if (nodeDel == root) {\n root = nodeDel.getLeftChild();\n } else if (isLeftChild) {\n parent.setLeftChild(nodeDel.getLeftChild());\n } else {\n parent.setRightChild(nodeDel.getLeftChild());\n }\n } else if (nodeDel.getLeftChild() == null) {\n if (nodeDel == root) {\n root = nodeDel.getRightChild();\n } else if (isLeftChild) {\n parent.setLeftChild(nodeDel.getRightChild());\n } else {\n parent.setRightChild(nodeDel.getRightChild());\n }\n }\n // deleting a node with degree of two\n else {\n Integer minimumData = minimumData(nodeDel.getRightChild());\n delete(minimumData);\n nodeDel.setData(minimumData);\n }\n parent.setHeight(maximum(height(parent.getLeftChild()), height(parent.getRightChild())));\n balanceFactor = getBalance(parent);\n if (balanceFactor <= 1 && balanceFactor >= -1) {\n for (int i = parents.size() - 1; i >= 0; i--) {\n imBalance = parents.get(i);\n balanceFactor = getBalance(imBalance);\n if (balanceFactor > 1 || balanceFactor < -1) {\n if (imBalance.getData() > parent.getData()) {\n parent.setRightChild(rotateCase(imBalance, data, balanceFactor));\n } else\n parent.setLeftChild(rotateCase(imBalance, data, balanceFactor));\n break;\n }\n }\n }\n }",
"public void delete() {\n this.root = null;\n }",
"public void deleteNode(BinaryTreeNode node) // Only leaf nodes and nodes with degree 1 can be deleted. If a degree 1 node is deleted, it is replaced by its subtree.\r\n {\n if(!node.hasRightChild() && !node.hasLeftChild()){\r\n if(node.mActualNode.mParent.mRightChild == node.mActualNode) {\r\n\r\n node.mActualNode.mParent.mRightChild = null;\r\n }\r\n else if(node.mActualNode.mParent.mLeftChild == node.mActualNode) {\r\n\r\n node.mActualNode.mParent.mLeftChild = null;\r\n }\r\n //node.mActualNode = null;\r\n\r\n }\r\n //if deleted node has degree 1 and has only left child\r\n else if(node.hasLeftChild() && !node.hasRightChild()){\r\n node.mActualNode.mLeftChild.mParent = node.mActualNode.mParent;\r\n //if deleted node is left child of his father\r\n if(node.mActualNode.mParent.mLeftChild == node.mActualNode)\r\n node.mActualNode.mParent.mLeftChild = node.mActualNode.mLeftChild;\r\n //if deleted node is right child of his father\r\n else {\r\n\r\n node.mActualNode.mParent.mRightChild = node.mActualNode.mLeftChild;\r\n }\r\n }\r\n // if deleted node has degree 1 and has only right child\r\n else if(node.hasRightChild() && !node.hasLeftChild()){\r\n node.mActualNode.mRightChild.mParent = node.mActualNode.mParent;\r\n\r\n //if node is left child of his father\r\n if(node.mActualNode.mParent.mLeftChild == node.mActualNode) {\r\n\r\n\r\n node.mActualNode.mParent.mLeftChild = node.mActualNode.mRightChild;\r\n\r\n }\r\n //if node is right child of his father\r\n else\r\n node.mActualNode.mParent.mRightChild = node.mActualNode.mRightChild;\r\n\r\n\r\n }\r\n else\r\n System.out.println(\"Error : node has two child\");\r\n\r\n }",
"private Node<T> delete(Node<T> node,Comparable<T> item) {\r\n if (node == null) { // this is the base case\r\n return null;\r\n }\r\n if (node.data.compareTo((T) item) < 0) {\r\n node.right = delete(node.right, item);\r\n return node;\r\n }\r\n else if (node.data.compareTo((T) item) > 0) {\r\n node.left = delete(node.left, item);\r\n return node;\r\n }\r\n else { // the item == node.data\r\n if (node.left == null) { // no left child\r\n return node.right;\r\n }\r\n else if (node.right == null) { // no right child\r\n return node.left;\r\n }\r\n else { // 2 children: find in-order successor\r\n if (node.right.left == null) { // if right child does not have a left child of its own\r\n node.data = node.right.data;\r\n node.right = node.right.right;\r\n }\r\n else {\r\n node.data = (Comparable<T>) removeSmallest(node.right); // if the right child has two children, or has a left subtree\r\n }\r\n return node;\r\n }\r\n }\r\n }",
"void deleteTreeRef(TreeNode nodeRef) \n { \n \tif(nodeRef == null) return;\n \t\n \t\n \tdeleteTreeRef(nodeRef.left);\n\n \tdeleteTreeRef(nodeRef.right);\n \t\n \t\n \t System.out.println(\"Deleting node:\" + nodeRef.val);\n \t deleteTree(nodeRef); \n \n nodeRef=null; \n }",
"public void delete(int key){\n\t\tBSTNode currentNode = root;\n\t\tBSTNode parent = null;\n\t\twhile (currentNode != null && currentNode.getKey() != key){\n\t\t\tparent = currentNode;\n\t\t\tif (key < currentNode.getKey()){\n\t\t\t\tcurrentNode = currentNode.getLeft();\n\t\t\t}else{\n\t\t\t\tcurrentNode = currentNode.getRight();\n\t\t\t}\n\t\t}\n\t\tif (currentNode == null){\n\t\t\tSystem.out.println(\"No such key is found in the tree\");\n\t\t\treturn;\n\t\t}\n\t\tif (currentNode.getLeft() == null && currentNode.getRight() == null){\n\t\t\t//Leaf Node\n\t\t\tif (currentNode.getKey() > parent.getKey()){\n\t\t\t\tparent.setRight(null);\n\t\t\t}else{\n\t\t\t\tparent.setLeft(null);\n\t\t\t}\n\t\t}else if (currentNode.getLeft() == null){\n\t\t\tif (currentNode.getKey() > parent.getKey()){\n\t\t\t\tparent.setRight(currentNode.getRight());\n\t\t\t}else{\n\t\t\t\tparent.setLeft(currentNode.getRight());\n\t\t\t}\n\t\t}else if(currentNode.getRight() == null){\n\t\t\tif (currentNode.getKey() > parent.getKey()){\n\t\t\t\tparent.setRight(currentNode.getLeft());\n\t\t\t}else{\n\t\t\t\tparent.setLeft(currentNode.getLeft());\n\t\t\t}\n\t\t}else{\n\t\t\t// this is case where this node has two children\n\t\t\tBSTNode node = currentNode.getLeft();\n\t\t\tBSTNode parentTemp = currentNode;\n\t\t\twhile (node.getRight() != null){\n\t\t\t\tparentTemp = node;\n\t\t\t\tnode = node.getRight();\n\t\t\t}\n\t\t\t// switch the value with the target node we are deleting.\n\t\t\tcurrentNode.setKey(node.getKey());\n\t\t\t// remove this node but don't forget about its left tree\n\t\t\tparentTemp.setRight(node.getLeft());\n\t\t}\n\t}",
"public void delete(K key)\r\n\t{\r\n\t\tif(search(key) == null) \r\n\t\t{\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif(root == null) \r\n\t\t{\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tBSTNode<E,K> node = root;\r\n\t\tBSTNode<E,K> child = null;\r\n\t\tBSTNode<E,K> parent1 = null;\r\n\t\tBSTNode<E,K> parent2 = null;;\r\n\t\tboolean Left = true;\r\n\t\tboolean Left2 = false;\r\n\t\tboolean found = false;\r\n\t\t\r\n\t\twhile(!found)\r\n\t\t{\r\n\t\t\tif(node.getKey().compareTo(key) == 0)\r\n\t\t\t{\r\n\t\t\t\tfound = true;\r\n\t\t\t}\r\n\t\t\telse if(key.compareTo(node.getKey())<=-1)\r\n\t\t\t{\r\n\t\t\t\tif(node.getLeft() != null)\r\n\t\t\t\t{\r\n\t\t\t\t\tparent1 = node;\r\n\t\t\t\t\tnode = node.getLeft();\r\n\t\t\t\t\tLeft = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if(key.compareTo(node.getKey()) >= 1)\r\n\t\t\t{\r\n\t\t\t\tif(node.getRight() != null)\r\n\t\t\t\t{\r\n\t\t\t\t\tparent1 = node;\r\n\t\t\t\t\tnode = node.getRight();\r\n\t\t\t\t\tLeft = false;\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(node.getLeft() != null && node.getRight() != null)\r\n\t\t{\r\n\t\t\tchild = node.getRight();\r\n\t\t\tparent2 = node;\r\n\t\t\twhile(child.getLeft() != null)\r\n\t\t\t{\r\n\t\t\t\tparent2 = child;\r\n\t\t\t\tchild = child.getLeft();\r\n\t\t\t\tLeft2 = true;\r\n\t\t\t}\r\n\t\t\tif(Left2)\r\n\t\t\t{\r\n\t\t\t\tparent2.setLeft(child.getLeft());\t\r\n\t\t\t}\r\n\t\t\telse \r\n\t\t\t{\r\n\t\t\t\tparent2.setRight(child.getLeft());\r\n\t\t\t}\r\n\t\t\tchild.setLeft(node.getLeft());\r\n\t\t\tchild.setRight(node.getRight());\r\n\t\t}\r\n\t\telse if(node.getLeft() == null && node.getRight() != null)\r\n\t\t{\r\n\t\t child = node.getRight();\r\n\t\t}\r\n\t\telse if(node.getLeft() != null && node.getRight() == null)\r\n\t\t{\r\n\t\t\tchild = node.getLeft();\r\n\t\t}\r\n\t\telse if(node.getLeft() == null && node.getRight() == null)\r\n\t\t{\r\n\t\t\tif(Left)\r\n\t\t\t{\r\n\t\t\t\tparent1.setLeft(null);\r\n\t\t\t} \r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tparent1.setRight(null);\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif(root == node)\r\n\t\t{\r\n\t\t\troot = child;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif(Left) \r\n\t\t{\r\n\t\t\tparent1.setLeft(child);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tparent1.setRight(child);\r\n\t\t}\r\n\t}",
"private NodeTest delete(NodeTest root, int data)\n\t{\n\t\t//if the root is null then there's no tree\n\t\tif (root == null)\n\t\t{\n\t\t\tSystem.out.println(\"There was no tree.\");\n\t\t\treturn null;\n\t\t}\n\t\t//if the data is less go to the left\n\t\telse if (data < root.data)\n\t\t{\n\t\t\troot.left = delete(root.left, data);\n\t\t}\n\t\t//otherwise go to the right\n\t\telse if (data > root.data)\n\t\t{\n\t\t\troot.right = delete(root.right, data);\n\t\t}\n\t\t//else, we have a hit, so find out how we are going to delete it\n\t\telse\n\t\t{\n\t\t\t//if there are no children then return null\n\t\t\t//because we can delete the NodeTest without worries\n\t\t\tif (root.left == null && root.right == null)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Delete, no children NodeTests\");\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t//if there is no right-child then return the left\n\t\t\t//\n\t\t\telse if (root.right == null)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Delete, no right-children NodeTests\");\n\t\t\t\treturn root.left;\n\t\t\t}\n\t\t\t//if there is no left child return the right\n\t\t\telse if (root.left == null)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Delete, no left-children NodeTests\");\n\t\t\t\treturn root.right;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//if it is a parent NodeTest, we need to find the max of the lowest so we can fix the BST\n\t\t\t\troot.data = findMax(root.left);\n\t\t\t\troot.left = delete(root.left, root.data);\n\t\t\t}\n\t\t}\n\n\t\treturn root;\n\t}",
"public Node deleteNode(Node root, int key) {\n if (root == null)\n return root;\n\n /* Otherwise, recur down the tree */\n if (key < root.data)\n root.left = deleteNode(root.left, key);\n else if (key > root.data)\n root.right = deleteNode(root.right, key);\n\n // if key is same as root's\n // key, then This is the\n // node to be deleted\n else {\n // node with only one child or no child\n if (root.left == null)\n return root.right;\n else if (root.right == null)\n return root.left;\n\n // node with two children: Get the inorder\n // successor (smallest in the right subtree)\n root.data = minValue(root.right);\n\n // Delete the inorder successor\n root.right = deleteNode(root.right, root.data);\n }\n\n return root;\n }",
"public boolean removeNode(Node n);",
"public void deleteNode (NodeId id) throws IOException\n\t{\n\t}",
"public int delete(int k)\r\n\t{\r\n\t\tIAVLNode node = searchFor(this.root, k);\r\n\t\tIAVLNode parent;\r\n\t\tif(node==root)\r\n\t\t\tparent=new AVLNode(null);\r\n\t\telse\r\n\t\t\tparent=node.getParent();\r\n\t\t\r\n\t\tIAVLNode startHieghtUpdate = parent; // this will be the node from which we'll start updating the nodes' hieghts\r\n\t\t\r\n\t\tif (!node.isRealNode())\r\n\t\t\treturn -1;\r\n\t\t\r\n\t\t//updating the maximum and minimum fields\r\n\t\tif (node == this.maximum)\r\n\t\t\tthis.maximum = findPredecessor(node);\r\n\t\telse\r\n\t\t\tif (node == this.minimum)\r\n\t\t\t\tthis.minimum = findSuccessor(node); \r\n\t\t\r\n\t\t//if the node we wish to delete is a leaf\r\n\t\tif (!node.getLeft().isRealNode()&&!node.getRight().isRealNode())\r\n\t\t{\r\n\t\t\tif (node == parent.getLeft())\r\n\t\t\t\tparent.setLeft(node.getRight());\r\n\t\t\telse\r\n\t\t\t\tparent.setRight(node.getRight());\r\n\t\t\tnode.getRight().setParent(parent);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t //if the node we wish to delete is unary:\r\n\t\t\tif (node.getLeft().isRealNode()&&!node.getRight().isRealNode()) //only left child\r\n\t\t\t{\r\n\t\t\t\tif (node == parent.getLeft())\r\n\t\t\t\t\tparent.setLeft(node.getLeft());\r\n\t\t\t\telse\r\n\t\t\t\t\tparent.setRight(node.getLeft());\r\n\t\t\t\tnode.getLeft().setParent(parent);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\tif (node.getRight().isRealNode()&&!node.getLeft().isRealNode()) //only right child\r\n\t\t\t\t\t{\r\n\t\t\t\t\tif (node == parent.getLeft())\r\n\t\t\t\t\t\tparent.setLeft(node.getRight());\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tparent.setRight(node.getRight());\r\n\t\t\t\t\tnode.getRight().setParent(parent);\r\n\t\t\t\t\t}\r\n\t\t\t\t//if the node we wish to delete is a father of two\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t\tIAVLNode suc = findSuccessor(node);\r\n\t\t\t\t\t\tIAVLNode sucsParent = suc.getParent();\r\n\t\t\t\t\t\t//deleting the successor of the node we wish to delete\r\n\t\t\t\t\t\tif (suc == sucsParent.getLeft())\r\n\t\t\t\t\t\t\tsucsParent.setLeft(suc.getRight());\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tsucsParent.setRight(suc.getRight());\r\n\t\t\t\t\t\tsuc.getRight().setParent(sucsParent);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//inserting the successor in it's new place (the previous place of the node we deleted)\r\n\t\t\t\t\t\tif (node == parent.getLeft())\r\n\t\t\t\t\t\t\tparent.setLeft(suc);\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tparent.setRight(suc);\r\n\t\t\t\t\t\tsuc.setParent(parent);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// node's children are now his scuccessor's children\r\n\t\t\t\t\t\tsuc.setRight(node.getRight());\r\n\t\t\t\t\t\tsuc.setLeft(node.getLeft());\r\n\t\t\t\t\t\tsuc.getRight().setParent(suc);\r\n\t\t\t\t\t\tsuc.getLeft().setParent(suc);\r\n\t\t\t\t\t\t//now we check if the successor of the node we wanted to delete was his son\r\n\t\t\t\t\t\tif (node != sucsParent) // the successor's parent was the deleted node (which is no longer part of the tree)\r\n\t\t\t\t\t\t\tstartHieghtUpdate = sucsParent;\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tstartHieghtUpdate = suc;\r\n\t\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//if we wish to delete the tree's root, then we need to update the tree's root to a new node\r\n\t\tif (node == this.root) \r\n\t\t{\r\n\t\t\tthis.root = parent.getRight();\r\n\t\t\tthis.root.setParent(null);\r\n\t\t}\r\n\t\t\r\n\t\tint moneRot = HieghtsUpdating(startHieghtUpdate);\r\n\t\treturn moneRot;\r\n\t}",
"@Override /**\r\n\t\t\t\t * Delete an element from the binary tree. Return true if the element is deleted\r\n\t\t\t\t * successfully Return false if the element is not in the tree\r\n\t\t\t\t */\r\n\tpublic boolean delete(E e) {\n\t\tTreeNode<E> parent = null;\r\n\t\tTreeNode<E> current = root;\r\n\t\twhile (current != null) {\r\n\t\t\tif (e.compareTo(current.element) < 0) {\r\n\t\t\t\tparent = current;\r\n\t\t\t\tcurrent = current.left;\r\n\t\t\t} else if (e.compareTo(current.element) > 0) {\r\n\t\t\t\tparent = current;\r\n\t\t\t\tcurrent = current.right;\r\n\t\t\t} else\r\n\t\t\t\tbreak; // Element is in the tree pointed at by current\r\n\t\t}\r\n\r\n\t\tif (current == null)\r\n\t\t\treturn false; // Element is not in the tree\r\n\r\n\t\t// Case 1: current has no left child\r\n\t\tif (current.left == null) {\r\n\t\t\t// Connect the parent with the right child of the current node\r\n\t\t\tif (parent == null) {\r\n\t\t\t\troot = current.right;\r\n\t\t\t} else {\r\n\t\t\t\tif (e.compareTo(parent.element) < 0)\r\n\t\t\t\t\tparent.left = current.right;\r\n\t\t\t\telse\r\n\t\t\t\t\tparent.right = current.right;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t// Case 2: The current node has a left child\r\n\t\t\t// Locate the rightmost node in the left subtree of\r\n\t\t\t// the current node and also its parent\r\n\t\t\tTreeNode<E> parentOfRightMost = current;\r\n\t\t\tTreeNode<E> rightMost = current.left;\r\n\r\n\t\t\twhile (rightMost.right != null) {\r\n\t\t\t\tparentOfRightMost = rightMost;\r\n\t\t\t\trightMost = rightMost.right; // Keep going to the right\r\n\t\t\t}\r\n\r\n\t\t\t// Replace the element in current by the element in rightMost\r\n\t\t\tcurrent.element = rightMost.element;\r\n\r\n\t\t\t// Eliminate rightmost node\r\n\t\t\tif (parentOfRightMost.right == rightMost)\r\n\t\t\t\tparentOfRightMost.right = rightMost.left;\r\n\t\t\telse\r\n\t\t\t\t// Special case: parentOfRightMost == current\r\n\t\t\t\tparentOfRightMost.left = rightMost.left;\r\n\t\t}\r\n\r\n\t\tsize--;\r\n\t\treturn true; // Element deleted successfully\r\n\t}",
"public void delete(E e) {\n\t\tNode node = getNode(root, e);\n\t\tif (node == null) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tNode parentOfLast = getNode(size >> 1);\n\t\tif (parentOfLast.right != null) {\n\t\t\tnode.data = parentOfLast.right.data;\n\t\t\tparentOfLast.right = null;\n\t\t}\n\t\telse {\n\t\t\tnode.data = parentOfLast.left.data;\n\t\t\tparentOfLast.left = null;\n\t\t}\n\t\tsize--;\n\t}",
"public boolean delete(String name)\r\n\t{\r\n\t\t// Find the location of the Node with the search method and assign it to current\r\n\t\tNode current = search(name);\r\n\t\t\r\n\t\t// Return False if the Node was not found\r\n\t\tif(current == null)\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t// Special case of deleting the root Node\r\n\t\tif(current == getRoot())\r\n\t\t{\r\n\t\t\t// Root has no children (aka is a leaf)\r\n\t\t\tif(getRoot().isLeaf())\r\n\t\t\t{\r\n\t\t\t\t// Deleting the Root (aka destroying the Binary Tree)\r\n\t\t\t\tdestroy();\r\n\t\t\t}\r\n\t\t\t// Root only has a left child\r\n\t\t\telse if(getRoot().getRightChild() == null)\r\n\t\t\t{\r\n\t\t\t\t// Make the left child of the deleted Root the new Root\r\n\t\t\t\tsetRoot(current.getLeftChild());\r\n\t\t\t\tcurrent.getLeftChild().setParent(null);\r\n\t\t\t\tdecrementCounter();\r\n\t\t\t}\r\n\t\t\t// Root only has a right child\r\n\t\t\telse if(getRoot().getLeftChild() == null)\r\n\t\t\t{\r\n\t\t\t\t// Make the right child of the deleted Root the new Root\r\n\t\t\t\tsetRoot(current.getRightChild());\r\n\t\t\t\tcurrent.getRightChild().setParent(null);\r\n\t\t\t\tdecrementCounter();\r\n\t\t\t}\r\n\t\t\t// Root has two children\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t// Find the minimum of the Right Subtree of the Node to delete to use as the replacement\r\n\t\t\t\tNode minimum = findMinimum(current.getRightChild());\r\n\t\t\t\t\r\n\t\t\t\t// Copy the String from the minimum Node to the original Node we were supposed to delete\r\n\t\t\t\tcurrent.setName(minimum.getName());\r\n\t\t\t\t\r\n\t\t\t\t// Delete what used to be the minimum from the Tree\r\n\t\t\t\t// The minimum is the right child of its parent\r\n\t\t\t\tif(minimum.getParent().getRightChild() == minimum)\r\n\t\t\t\t{\r\n\t\t\t\t\t// Minimum by definition cannot have a left child, however:\r\n\t\t\t\t\t// The minimum has no children\r\n\t\t\t\t\tif(minimum.getRightChild() == null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// Just delete the minimum\r\n\t\t\t\t\t\tminimum.getParent().setRightChild(null);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// The minimum has a right child\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// Delete the minimum but connect its child and its parent\r\n\t\t\t\t\t\tminimum.getParent().setRightChild(minimum.getRightChild());\r\n\t\t\t\t\t\tminimum.getRightChild().setParent(minimum.getParent());\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Node was deleted so adjust the counter accordingly\r\n\t\t\t\t\tdecrementCounter();\r\n\t\t\t\t}\r\n\t\t\t\t// The minimum is the left child of its parent\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t// Minimum by definition cannot have a left child, however:\r\n\t\t\t\t\t// The minimum has no children\r\n\t\t\t\t\tif(minimum.getRightChild() == null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// Just delete the minimum\r\n\t\t\t\t\t\tminimum.getParent().setLeftChild(null);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// The minimum has a right child\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// Delete the minimum but connect its child and its parent\r\n\t\t\t\t\t\tminimum.getParent().setLeftChild(minimum.getRightChild());\r\n\t\t\t\t\t\tminimum.getRightChild().setParent(minimum.getParent());\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Node was deleted so adjust the counter accordingly\r\n\t\t\t\t\tdecrementCounter();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}// END special root case\r\n\t\t// Deleting any other Node besides the root\r\n\t\telse\r\n\t\t{\r\n\t\t\t// Node to delete has no children (aka is a leaf)\r\n\t\t\tif(current.isLeaf())\r\n\t\t\t{\r\n\t\t\t\t// Delete the Node by finding out what type of child it is\r\n\t\t\t\t// Node is a left child\r\n\t\t\t\tif(current.getParent().getLeftChild() == current)\r\n\t\t\t\t{\r\n\t\t\t\t\tcurrent.getParent().setLeftChild(null);\r\n\t\t\t\t}\r\n\t\t\t\t// Node is a right child\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tcurrent.getParent().setRightChild(null);\r\n\t\t\t\t}\r\n\t\t\t\t// Node was deleted so adjust the counter accordingly\t\r\n\t\t\t\tdecrementCounter();\r\n\t\t\t}\r\n\t\t\t// Node to delete only has a left child\r\n\t\t\telse if(current.getRightChild() == null)\r\n\t\t\t{\r\n\t\t\t\t// Connect the Node to delete's parent and left child\r\n\t\t\t\t// Need to first find out what type of child the Node to delete is\r\n\t\t\t\t// Node is a left child\r\n\t\t\t\tif(current.getParent().getLeftChild() == current)\r\n\t\t\t\t{\r\n\t\t\t\t\tcurrent.getLeftChild().setParent(current.getParent());\r\n\t\t\t\t\tcurrent.getParent().setLeftChild(current.getLeftChild());\r\n\t\t\t\t}\r\n\t\t\t\t// Node is a right child\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tcurrent.getLeftChild().setParent(current.getParent());\r\n\t\t\t\t\tcurrent.getParent().setRightChild(current.getLeftChild());\r\n\t\t\t\t}\r\n\t\t\t\t\t// Node was deleted so adjust the counter accordingly\r\n\t\t\t\t\tdecrementCounter();\r\n\t\t\t}\r\n\t\t\t// Node to delete only has a right child\r\n\t\t\telse if(current.getLeftChild() == null)\r\n\t\t\t{\r\n\t\t\t\t// Connect the Node to delete's parent and right child\r\n\t\t\t\t// Need to first find out what type of child the Node to delete is\r\n\t\t\t\t// Node is a left child\r\n\t\t\t\tif(current.getParent().getLeftChild() == current)\r\n\t\t\t\t{\r\n\t\t\t\t\tcurrent.getRightChild().setParent(current.getParent());\r\n\t\t\t\t\tcurrent.getParent().setLeftChild(current.getRightChild());\r\n\t\t\t\t}\r\n\t\t\t\t// Node is a right child\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tcurrent.getRightChild().setParent(current.getParent());\r\n\t\t\t\t\tcurrent.getParent().setRightChild(current.getRightChild());\r\n\t\t\t\t}\r\n\t\t\t\t\t// Node was deleted so adjust the counter accordingly\r\n\t\t\t\t\tdecrementCounter();\r\n\t\t\t}\r\n\t\t\t// Node to delete has two children\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t// Find the minimum of the Right Subtree of the Node to delete to use as the replacement\r\n\t\t\t\tNode minimum = findMinimum(current.getRightChild());\r\n\t\t\t\t\r\n\t\t\t\t// Copy the String from the minimum Node to the Node we were supposed to delete\r\n\t\t\t\tcurrent.setName(minimum.getName());\r\n\t\t\t\t\r\n\t\t\t\t// Delete what used to be the minimum from the Tree\r\n\t\t\t\t// The minimum is the right child of its parent\r\n\t\t\t\tif(minimum.getParent().getRightChild() == minimum)\r\n\t\t\t\t{\r\n\t\t\t\t\t// Minimum by definition cannot have a left child, however:\r\n\t\t\t\t\t// The minimum has no children\r\n\t\t\t\t\tif(minimum.getRightChild() == null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// Just delete the minimum\r\n\t\t\t\t\t\tminimum.getParent().setRightChild(null);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// The minimum has a right child\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// Delete the minimum but connect its child and its parent\r\n\t\t\t\t\t\tminimum.getParent().setRightChild(minimum.getRightChild());\r\n\t\t\t\t\t\tminimum.getRightChild().setParent(minimum.getParent());\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Node was deleted so adjust the counter accordingly\r\n\t\t\t\t\tdecrementCounter();\r\n\t\t\t\t}\r\n\t\t\t\t// The minimum is the left child of its parent\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t// Minimum by definition cannot have a left child, however:\r\n\t\t\t\t\t// The minimum has no children\r\n\t\t\t\t\tif(minimum.getRightChild() == null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// Just delete the minimum\r\n\t\t\t\t\t\tminimum.getParent().setLeftChild(null);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// The minimum has a right child\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// Delete the minimum but connect its child and its parent\r\n\t\t\t\t\t\tminimum.getParent().setLeftChild(minimum.getRightChild());\r\n\t\t\t\t\t\tminimum.getRightChild().setParent(minimum.getParent());\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Node was deleted so adjust the counter accordingly\r\n\t\t\t\t\tdecrementCounter();\r\n\t\t\t\t}\r\n\t\t\t}\t\t\t\r\n\t\t}// END of deleting any case except for Root\r\n\t\t\r\n\t\t// Balance the tree only if necessary - the current depth of the tree is greater than what it should be based on \r\n\t\t// the total amount of Nodes in the tree\r\n\t\tif(depth() > howManyLevels())\r\n\t\t{\r\n\t\t\tbalance();\r\n\t\t}\r\n\t\t// A Node was deleted so return true\r\n\t\treturn true;\r\n\t}",
"public abstract void removeChild(Node node);",
"private static void leftRightDelete() {\n System.out.println(\"LeftRight Tree Delete Case\");\n AVLTree<Integer> tree1 = new AVLTree<Integer>();\n System.out.println(\"Before insert nodes, tree is empty: \"+tree1.isEmpty());\n \n Integer[] numbers = {50, 30, 60, 40, 10, 70, 35};\n for (int i=0; i<numbers.length; i++) {\n tree1.insert(numbers[i]);\n }\n \n System.out.println(\"After insert nodes, tree is empty: \"+tree1.isEmpty());\n System.out.println(\"Tree looks like: \");\n tree1.printTree();\n tree1.print();\n \n tree1.delete(70);\n System.out.println(\"After delete nodes 70, Tree looks like: \"); \n tree1.printTree();\n tree1.print();\n \n System.out.println(\"Tree is balanced: \"+tree1.checkForBalancedTree());\n System.out.println(\"Tree is a BST: \"+tree1.checkForBinarySearchTree()+\"\\n\");\n }",
"public int delete(int k) {\n\t\tif (this.empty()) {// empty tree, nothing to erase\n\t\t\treturn -1;\n\t\t}\n\t\tAVLNode root = (AVLNode) this.root;\n\t\tAVLNode node = (AVLNode) root.delFindNode(k);\n\t\tif (node == null) {// no node with key==k in this tree\n\t\t\treturn -1;\n\t\t}\n\t\tchar side = node.parentSide();\n\t\tboolean rootTerm = (node.getLeft().getKey() != -1 && node.getRight().getKey() != -1);\n\t\tif (side == 'N' && (rootTerm == false)) {\n\t\t\treturn this.deleteRoot(node);\n\t\t}\n\t\tif (side == 'L') {\n\t\t\tif (node.isLeaf()) {\n\t\t\t\tint leftEdge = node.parent.getHeight() - node.getHeight();\n\t\t\t\tint rightEdge = node.parent.getHeight() - node.parent.getRight().getHeight();\n\t\t\t\tAVLNode parent = (AVLNode) node.parent;\n\t\t\t\tif (leftEdge == 1 && rightEdge == 1) {// first case (\"easy one\", just delete)\n\t\t\t\t\tnode.parent.setLeft(new AVLNode());\n\t\t\t\t\tnode.setParent(null);\n\t\t\t\t\tparent.updateSize();\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t\tif (leftEdge == 1 && rightEdge == 2) {\n\t\t\t\t\tnode.parent.setLeft(new AVLNode());\n\t\t\t\t\tnode.setParent(null);\n\t\t\t\t\tparent.setHeight(parent.getHeight() - 1);\n\t\t\t\t\tparent.setSize();\n\t\t\t\t\treturn this.delRecTwos(parent);\n\t\t\t\t} else {// leftEdge==2&&rightEdge==1\n\t\t\t\t\tnode.parent.setLeft(new AVLNode());\n\t\t\t\t\tnode.setParent(null);\n\t\t\t\t\treturn this.delRecTriOne(parent, side);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ((node.left != null && node.right == null) || (node.left == null && node.right != null)) {// node is //\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// unary\n\t\t\t\tint leftEdge = node.parent.getHeight() - node.getHeight();\n\t\t\t\tint rightEdge = node.parent.getHeight() - node.parent.getRight().getHeight();\n\t\t\t\tif ((leftEdge == 1 && rightEdge == 1)) {\n\t\t\t\t\tif (node.left != null) {\n\t\t\t\t\t\tAVLNode parent = node.delUnaryLeft();\n\t\t\t\t\t\tparent.updateSize();\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t} else {// node.right!=null\n\t\t\t\t\t\tAVLNode parent = node.delUnaryRight();\n\t\t\t\t\t\tparent.updateSize();\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ((leftEdge == 1 && rightEdge == 2)) {\n\t\t\t\t\tif (node.left != null) {\n\t\t\t\t\t\treturn this.delRecTwos(node.delUnaryLeft());\n\t\t\t\t\t} else {// node.right!=null\n\t\t\t\t\t\treturn this.delRecTwos(node.delUnaryRight());\n\t\t\t\t\t}\n\t\t\t\t} else {// leftEdge==2&&rightEdge==1\n\t\t\t\t\tif (node.left != null) {\n\t\t\t\t\t\treturn this.delRecTriOne(node.delUnaryLeft(), side);\n\t\t\t\t\t} else {// node.right!=null\n\t\t\t\t\t\treturn this.delRecTriOne(node.delUnaryRight(), side);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\tif (side == 'R') {\n\t\t\tif (node.isLeaf()) {\n\t\t\t\tint rightEdge = node.parent.getHeight() - node.getHeight();\n\t\t\t\tint leftEdge = node.parent.getHeight() - node.parent.getLeft().getHeight();\n\t\t\t\tAVLNode parent = (AVLNode) node.parent;\n\t\t\t\tif (leftEdge == 1 && rightEdge == 1) {// first case (\"easy one\", just delete)\n\t\t\t\t\tnode.parent.setRight(new AVLNode());\n\t\t\t\t\tnode.setParent(null);\n\t\t\t\t\tparent.updateSize();\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t\tif (leftEdge == 2 && rightEdge == 1) {\n\t\t\t\t\tnode.parent.setRight(new AVLNode());\n\t\t\t\t\tnode.setParent(null);\n\t\t\t\t\tparent.setHeight(parent.getHeight() - 1);\n\t\t\t\t\tparent.setSize();\n\t\t\t\t\treturn this.delRecTwos(parent);\n\t\t\t\t} else {// leftEdge==1&&rightEdge==2\n\t\t\t\t\tnode.parent.setRight(new AVLNode());\n\t\t\t\t\tnode.setParent(null);\n\t\t\t\t\treturn this.delRecTriOne(parent, side);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ((node.getLeft().getHeight() != -1 && node.getRight().getHeight() == -1)\n\t\t\t\t\t|| (node.getLeft().getHeight() == -1 && node.getRight().getHeight() != -1)) {// node is unary\n\t\t\t\tint rightEdge = node.parent.getHeight() - node.getHeight();\n\t\t\t\tint leftEdge = node.parent.getHeight() - node.parent.getLeft().getHeight();\n\t\t\t\tif ((leftEdge == 1 && rightEdge == 1)) {\n\t\t\t\t\tif (node.left != null) {\n\t\t\t\t\t\tAVLNode parent = node.delUnaryLeft();\n\t\t\t\t\t\tparent.updateSize();\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t} else {// node.right!=null\n\t\t\t\t\t\tAVLNode parent = node.delUnaryRight();\n\t\t\t\t\t\tparent.updateSize();\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ((leftEdge == 2 && rightEdge == 1)) {\n\t\t\t\t\tif (node.left != null) {\n\t\t\t\t\t\treturn this.delRecTwos(node.delUnaryLeft());\n\t\t\t\t\t} else {// node.right!=null\n\t\t\t\t\t\treturn this.delRecTwos(node.delUnaryRight());\n\t\t\t\t\t}\n\t\t\t\t} else {// leftEdge==1&&rightEdge==2\n\t\t\t\t\tif (node.left != null) {\n\t\t\t\t\t\treturn this.delRecTriOne(node.delUnaryLeft(), side);\n\t\t\t\t\t} else {// node.right!=null\n\t\t\t\t\t\treturn this.delRecTriOne(node.delUnaryRight(), side);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\t// we get here only if node is binary, and thus not going through any other\n\t\t// submethod\n\t\tAVLNode successor = this.findSuccessor(node); // successor must be unary/leaf\n\t\tif (node.checkRoot()) {\n\t\t\tthis.root = successor;\n\t\t}\n\t\tint numOp = this.delete(successor.key);\n\t\tsuccessor.setHeight(node.getHeight());\n\t\tsuccessor.size = node.getSize();\n\t\tsuccessor.setRight(node.getRight());\n\t\tnode.right.setParent(successor);\n\t\tnode.setRight(null);\n\t\tsuccessor.setLeft(node.getLeft());\n\t\tnode.left.setParent(successor);\n\t\tnode.setLeft(null);\n\t\tsuccessor.setParent(node.getParent());\n\t\tif (node.parentSide() == 'L') {\n\t\t\tnode.parent.setLeft(successor);\n\t\t} else if (node.parentSide() == 'R') {// node.parentSide()=='R'\n\t\t\tnode.parent.setRight(successor);\n\t\t}\n\t\tnode.setParent(null);\n\t\treturn numOp;\n\n\t}",
"public static Node delete (BST bst, String name){\n\t\tNode bstRoot = bst.getRoot();\n\t\tNode deletedNode = findByName(bstRoot, name); // The node to be removed from the bst.\n\t\tNode substituteNode = floorOrCeiling(deletedNode); // The substitute node for the removed one.\n\t\t\n\t\t\n\t\tSystem.out.println(\"\\nThe node to be deleted:\");\n\t\tSystem.out.println(deletedNode);\n\n\t\tSystem.out.println(\"\\nThe substitute for the deleted node:\");\n\t\tSystem.out.println(substituteNode);\n\t\t\n\t\t/* If the node to be removed is an external node, which has no children nodes,\n\t\t then there is no need for the substitute node. Thus, we can simply set the nodes\n\t\t that point to the external nodes to null to remove the node.\n\t\t*/\n\t\tif ((deletedNode.getRight()==null)&&(deletedNode.getLeft()==null)){\n\t\t\tif(deletedNode.getName().compareTo(deletedNode.getParent().getName())<0)\n\t\t\t\tdeletedNode.getParent().setLeft(null);\t\t\t\n\t\t\telse\n\t\t\t\tdeletedNode.getParent().setRight(null);\n\t\t\t\n\t\t\tdeletedNode.setLeft(null);\n\t\t\tdeletedNode.setRight(null);\n\t\t\tdeletedNode.setParent(null);\n\t\t\t\n\t\t\treturn bstRoot;\n\t\t}\n\t\t\n\t\t/* If the node to be removed is not a root node, we'll apply the general approach.\n\t\t*/\n\t\tif (deletedNode.getParent()!=null){\n\n\t\t\t/* If the name of the parent node of the substitute node precedes the one of the substitute,\n\t\t\t * then, set the right child of the parent node to a null unless the substitute node is a child\n\t\t\t * of the deleted node.\n\t\t\t */\n\t\t\tif(substituteNode.getParent().getName().compareTo(substituteNode.getName())<0)\t\t\t\n\t\t\t\tif(substituteNode == deletedNode.getRight())\n\t\t\t\t\tsubstituteNode.getParent().setRight(substituteNode.getRight());\n\t\t\t\telse\t\n\t\t\t\tsubstituteNode.getParent().setRight(null);\n\t\t\t\n\t\t\t/* If the name of the parent node of the substitute node succeeds the one of the substitute,\n\t\t\t * then, set the left child of the parent node to a null unless the substitute node is a child\n\t\t\t * of the deleted node.\n\t\t\t */\n\t\t\telse\n\t\t\t\tif(substituteNode == deletedNode.getLeft())\n\t\t\t\t\tsubstituteNode.getParent().setLeft(substituteNode.getLeft());\n\t\t\t\telse\n\t\t\t\t\tsubstituteNode.getParent().setLeft(null);\n\t\t\t\n\t\t\t\n\t\t\t/* If the name of the parent node of the deleted node succeed the one of the substitute,\n\t\t\t * then, set substitute node as the left child of the parent node of the deleted node.\n\t\t\t * Otherwise, set the substitute to the right child.\n\t\t\t */\n\t\t\tif(deletedNode.getParent().getName().compareTo(substituteNode.getName())>0)\n\t\t\t\tdeletedNode.getParent().setLeft(substituteNode);\n\t\t\t\t\n\t\t\telse\n\t\t\t\tdeletedNode.getParent().setRight(substituteNode);\t\t\t\n\t\t\t\n\n\t\t\t/* Duplicates the binding that the deleted node previously had.\n\t\t\t */\n\t\t\tsubstituteNode.setLeft(deletedNode.getLeft());\n\t\t\tsubstituteNode.setRight(deletedNode.getRight());\n\t\t\tsubstituteNode.setParent(deletedNode.getParent());\n\t\t\t\n\t\t\t\n\t\t\t/* If the deleted node has any child, then set the substitute node as their parent node.\n\t\t\t */\n\t\t\tif (deletedNode.getRight()!=null)\n\t\t\t\tdeletedNode.getRight().setParent(substituteNode);\n\t\t\t\n\t\t\tif (deletedNode.getLeft()!=null)\n\t\t\tdeletedNode.getLeft().setParent(substituteNode);\n\t\t\t\n\t\t\tdeletedNode.setLeft(null);\n\t\t\tdeletedNode.setRight(null);\n\t\t\tdeletedNode.setParent(null);\n\t\t}\t\n\t\t/* If the node to be removed is a root node, we'll approach a bit differently.\n\t\t*/\t\t\t\n\t\telse{\n\t\t\t/* Sets the child node of the parent of the substitute one to null.\n\t\t\t*/\t\t\t\n\t\t\tif(substituteNode.getParent().getName().compareTo(substituteNode.getName())<0)\n\t\t\t\tsubstituteNode.getParent().setRight(null);\n\t\t\telse\n\t\t\t\tsubstituteNode.getParent().setLeft(null);\n\t\t\t\n\t\t\t/* Duplicates the binding that the deleted node previously had without setting the parent node.\n\t\t\t */\n\t\t\tsubstituteNode.setLeft(deletedNode.getLeft());\n\t\t\tsubstituteNode.setRight(deletedNode.getRight());\n\t\t\t\n\t\t\t\n\t\t\t/* If the deleted node has any child, then set the substitute node as their parent node.\n\t\t\t*/\t\t\t\n\t\t\tif (deletedNode.getRight()!=null)\n\t\t\t\tdeletedNode.getRight().setParent(substituteNode);\n\t\t\t\n\t\t\tif (deletedNode.getLeft()!=null)\n\t\t\tdeletedNode.getLeft().setParent(substituteNode);\t\n\t\t\t\n\t\t\t\n\t\t\tdeletedNode.setLeft(null);\n\t\t\tdeletedNode.setRight(null);\n\t\t\tdeletedNode.setParent(null);\n\t\t\t\n\t\t\tSystem.out.println(\"\\nThe node \" + deletedNode + \" is removed from the tree successfully\\n\");\n\t\t\t\n\t\t\treturn substituteNode;\n\t\t}\n\t\t\n\t\tSystem.out.println(\"\\nThe node \" + deletedNode + \" is removed from the tree successfully\\n\");\n\n\n\t\treturn bstRoot;\n\t\t\n\t}",
"private BSTNode<K> deleteNode(BSTNode<K> currentNode, K key) throws IllegalArgumentException{ \n // if key is null, throw an IllegalArgumentException\n if (key == null) {\n throw new IllegalArgumentException(\"Please input a valid key\");\n }\n // if currentNode is null, return null\n if (currentNode == null) \n return currentNode; \n // otherwise, keep searching through the tree until meet the node with value key\n switch(key.compareTo(currentNode.getId())){\n case -1:\n currentNode.setLeftChild(deleteNode(currentNode.getLeftChild(), key));\n break;\n case 1:\n currentNode.setRightChild(deleteNode(currentNode.getRightChild(), key));\n break;\n case 0:\n // build a temporary node when finding the node that need to be deleted\n BSTNode<K> tempNode = null;\n // when the node doesn't have two childNodes\n // has one childNode: currentNode = tempNode = a childNode\n // has no childNode: currentNode = null, tempNode = currentNode\n if ((currentNode.getLeftChild() == null) || (currentNode.getRightChild() == null)) {\n if (currentNode.getLeftChild() == null) \n tempNode = currentNode.getRightChild(); \n else \n tempNode = currentNode.getLeftChild(); \n \n if (tempNode == null) {\n //tempNode = currentNode; \n currentNode = null; \n }\n else\n currentNode = tempNode;\n }\n // when the node has two childNodes, \n // use in-order way to find the minimum node in its subrighttree, called rightMinNode\n // set tempNode = rightMinNode, and currentNode's ID = tempNode.ID\n // do recursion to update the subrighttree with currentNode's rightChild and tempNode's Id\n else {\n BSTNode<K> rightMinNode = currentNode.getRightChild();\n while (rightMinNode.getLeftChild() != null)\n rightMinNode = rightMinNode.getLeftChild();\n \n tempNode = rightMinNode;\n currentNode.setId(tempNode.getId());\n \n currentNode.setRightChild(deleteNode(currentNode.getRightChild(), tempNode.getId()));\n }\n }\n // since currentNode == null means currentNode has no childNode, return null to its ancestor\n if (currentNode == null) \n return currentNode; \n // since currentNode != null, we have to update its balance\n int balanceValue = getNodeBalance(currentNode);\n if (balanceValue < -1) { // balanceValue < -1 means sublefttree is longer than subrighttree\n if (getNodeBalance(currentNode.getLeftChild()) < 0) { // Left Left Case \n return rotateRight(currentNode);\n }\n else if (getNodeBalance(currentNode.getLeftChild()) >= 0) { // Left Right Case \n currentNode.setLeftChild(rotateLeft(currentNode.getLeftChild()));\n return rotateRight(currentNode);\n }\n }\n else if (balanceValue > 1) { // balanceValue < -1 means subrighttree is longer than sublefttree\n if ((getNodeBalance(currentNode.getRightChild()) > 0)) { // Right Right Case \n return rotateLeft(currentNode);\n }\n else if ((getNodeBalance(currentNode.getRightChild()) <= 0)) {// Right Left Case \n currentNode.setRightChild(rotateRight(currentNode.getRightChild()));\n return rotateLeft(currentNode);\n }\n }\n return currentNode;\n }",
"@Override\n public void delete(K key){\n try {\n this.rootNode = deleteNode(this.rootNode, key);\n } catch (IllegalArgumentException e) {\n System.out.println(e.getMessage());\n }\n }",
"Node deleteNode(Node root, int key) {\n if (root == null) {\n return root;\n }\n\n // If the key to be deleted is smaller than the root's key,\n // then it lies in left subtree\n if (key < root.key) {\n root.left = deleteNode(root.left, key);\n }\n\n // If the key to be deleted is greater than the root's key,\n // then it lies in right subtree\n else if (key > root.key) {\n root.right = deleteNode(root.right, key);\n }\n\n // if key is same as root's key, then this is the node\n // to be deleted\n else {\n\n // node with only one child or no child\n if ((root.left == null) || (root.right == null)) {\n Node temp = null;\n if (temp == root.left) {\n temp = root.right;\n } else {\n temp = root.left;\n }\n\n // No child case\n if (temp == null) {\n temp = root;\n root = null;\n } else // One child case\n {\n root = temp; // Copy the contents of the non-empty child\n }\n } else {\n\n // node with two children: Get the inorder successor (smallest\n // in the right subtree)\n Node temp = minValueNode(root.right);\n\n // Copy the inorder successor's data to this node\n root.key = temp.key;\n\n // Delete the inorder successor\n root.right = deleteNode(root.right, temp.key);\n }\n }\n\n // If the tree had only one node then return\n if (root == null) {\n return root;\n }\n\n // STEP 2: UPDATE HEIGHT OF THE CURRENT NODE\n root.height = max(height(root.left), height(root.right)) + 1;\n // STEP 3: GET THE BALANCE FACTOR OF THIS NODE (to check whether\n // this node became unbalanced)\n int balance = getBalance(root);\n\n // If this node becomes unbalanced, then there are 4 cases\n // Left Left Case\n if (balance > 1 && getBalance(root.left) >= 0) {\n return rightRotate(root);\n }\n\n // Left Right Case\n if (balance > 1 && getBalance(root.left) < 0) {\n root.left = leftRotate(root.left);\n return rightRotate(root);\n }\n\n // Right Right Case\n if (balance < -1 && getBalance(root.right) <= 0) {\n return leftRotate(root);\n }\n\n // Right Left Case\n if (balance < -1 && getBalance(root.right) > 0) {\n root.right = rightRotate(root.right);\n return leftRotate(root);\n }\n\n return root;\n }",
"private static void rightRightDelete() {\n System.out.println(\"LeftLeft Tree Delete Case\");\n AVLTree<Integer> tree1 = new AVLTree<Integer>();\n System.out.println(\"Before insert nodes, tree is empty: \"+tree1.isEmpty());\n \n Integer[] numbers = {50, 30, 60, 40, 70, 55, 65};\n for (int i=0; i<numbers.length; i++) {\n tree1.insert(numbers[i]);\n }\n \n System.out.println(\"After insert nodes, tree is empty: \"+tree1.isEmpty());\n System.out.println(\"Tree looks like: \");\n tree1.printTree();\n tree1.print();\n \n tree1.delete(40);\n System.out.println(\"After delete nodes 40, Tree looks like: \"); \n tree1.printTree();\n tree1.print();\n \n System.out.println(\"Tree is balanced: \"+tree1.checkForBalancedTree());\n System.out.println(\"Tree is a BST: \"+tree1.checkForBinarySearchTree()+\"\\n\");\n }",
"private Node<E> nodeDelete(Node<E> current, E toDelete) {\n\t\tif (current == null)\n\t\t\treturn null;\n\t\tif (toDelete == current.data)\n\t\t\treturn current;\n\t\tif (((Comparable<E>) toDelete).compareTo((E) current.data) >= 0)\n\t\t\treturn nodeDelete(current.rightChild, toDelete);\n\t\telse\n\t\t\treturn nodeDelete(current.leftChild, toDelete);\n\t}",
"public static TreeNode delete(TreeNode t, String target)\n {\n \n if(t == null)\n return null;\n \n else if(target.compareTo((String)t.getValue()) < 0)\n t.setLeft(delete(t.getLeft(), target));\n else if(target.compareTo((String)t.getValue()) > 0)\n t.setRight(delete(t.getRight(), target));\n else\n {\n //t.getValue() == v\n //ndoe thats leaf or one child\n if(t.getLeft() == null)\n return t.getRight();\n else if (t.getRight() == null)\n return t.getLeft();\n \n \n //if node has 2 children\n t.setValue(min(t.getRight()));\n \n //recursive call \n t.setRight(delete(t.getRight(), (String)t.getValue()));\n }\n return t;\n \n }",
"private Node<E> delete(E item, Node<E> root){\n\t\t/** the item to delete does not exist */\n\t\tif(root == null){\n\t\t\tdeleteReturn = null;\n\t\t\treturn root;\n\t\t}\n\t\t\n\t\tint comparison = item.compareTo(root.item);\n\t\t\n\t\t/** delete from the left subtree */\n\t\tif(comparison < 0){\n\t\t\troot.left = delete(item, root.left);\n\t\t\treturn root;\n\t\t}\n\t\t/** delete from the right subtree */\n\t\telse if(comparison > 0){\n\t\t\troot.right = delete(item, root.right);\n\t\t\treturn root;\n\t\t}\n\t\t/** the node to delete is found */\n\t\telse{\n\t\t\tdeleteReturn = root.item;\n\t\t\t\n\t\t\t/** the node is a leaf */\n\t\t\tif(root.left == null && root.right == null){\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t/** the node has one left child */\n\t\t\telse if(root.left != null && root.right == null){\n\t\t\t\treturn root.left;\n\t\t\t}\n\t\t\t/** the node has one right child */\n\t\t\telse if(root.left == null && root.right != null){\n\t\t\t\treturn root.right;\n\t\t\t}\n\t\t\t/** the node has two children */\n\t\t\telse{\n\t\t\t\t/**\n\t\t\t\t* the left child becomes the local root\n\t\t\t\t*/\n\t\t\t\tif(root.left.right == null){\n\t\t\t\t\troot.item = root.left.item;\n\t\t\t\t\troot.left = root.left.left;\n\t\t\t\t\treturn root;\n\t\t\t\t}\n\t\t\t\t/**\n\t\t\t\t* find the left-rightmost node and replace the local root's\n\t\t\t\t* item with that of left-rightmost node.\n\t\t\t\t*/\n\t\t\t\telse{\n\t\t\t\t\troot.item = findRightmost(root.left);\n\t\t\t\t\treturn root;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void delete(int index) {\n\t\tNode node = getNode(index+1);\n\t\tNode parentOfLast = getNode(size >> 1);\n\t\tnode.data = parentOfLast.right != null ? parentOfLast.right.data : parentOfLast.left.data;\n\t\tif (parentOfLast.right != null) {\n\t\t\tparentOfLast.right = null;\n\t\t}\n\t\telse {\n\t\t\tparentOfLast.left = null;\n\t\t}\n\t}",
"@Override\n public synchronized boolean deleteNode(Node n){\n if((n.getNodes().size() > 0)) {\n return false;\n }\n //delete all node-tags\n for(Tag t : n.getTags()){\n removeNodeTag(n,t);\n }\n boolean dbResult = dbHandler.deleteNode(n.getID());\n if(dbResult) {\n this.allNodes.remove(n);\n return true;\n }\n else {\n return false;\n }\n }",
"void removeNode(NodeKey key);",
"private static void rightLeftDelete() {\n System.out.println(\"RightLeft Tree Delete Case\");\n AVLTree<Integer> tree1 = new AVLTree<Integer>();\n System.out.println(\"Before insert nodes, tree is empty: \"+tree1.isEmpty());\n \n Integer[] numbers = {50, 30, 60, 40, 55, 70, 57};\n for (int i=0; i<numbers.length; i++) {\n tree1.insert(numbers[i]);\n }\n \n System.out.println(\"After insert nodes, tree is empty: \"+tree1.isEmpty());\n System.out.println(\"Tree looks like: \");\n tree1.printTree();\n tree1.print();\n \n tree1.delete(40);\n System.out.println(\"After delete nodes 40, Tree looks like: \"); \n tree1.printTree();\n tree1.print();\n System.out.println(\"Tree is balanced: \"+tree1.checkForBalancedTree());\n System.out.println(\"Tree is a BST: \"+tree1.checkForBinarySearchTree()+\"\\n\");\n \n System.out.println(\"Does 40 exist in tree? \"+tree1.search(40));\n System.out.println(\"Does 50 exist in tree? \"+tree1.search(50));\n System.out.print(\"Does null exist in tree? \");\n System.out.println(tree1.search(null));\n System.out.println(\"Try to insert 55 again: \");\n tree1.insert(55);\n System.out.println(\"Try to insert null: \");\n tree1.insert(null);\n System.out.println(\"Try to delete null: \");\n tree1.delete(null);\n System.out.println(\"Try to delete 100: nothing happen!\");\n tree1.delete(100);\n tree1.print();\n }",
"public boolean delete(Integer key){\n\n TreeNode parent=null;\n TreeNode curr=root;\n\n while (curr!=null && (Integer.compare(key,curr.data)!=0)){\n parent=curr;\n curr=Integer.compare(key,curr.data)>0?curr.right:curr.left;\n }\n\n if(curr==null){ // node does not exist\n\n return false;\n }\n\n TreeNode keyNode=curr;\n\n if(keyNode.right!=null){ //has right subtree\n\n // Find the minimum of Right Subtree\n\n TreeNode rKeyNode=keyNode.right;\n TreeNode rParent=keyNode;\n\n while (rKeyNode.left!=null){\n rParent=rKeyNode;\n rKeyNode=rKeyNode.left;\n }\n\n keyNode.data=rKeyNode.data;\n\n // Move Links to erase data\n\n if(rParent.left==rKeyNode){\n\n rParent.left=rKeyNode.right;\n }else{\n\n rParent.right=rKeyNode.right;\n }\n rKeyNode.right=null;\n\n }else{ // has only left subtree\n\n if(root==keyNode){ // if node to be deleted is root\n\n root=keyNode.left; // making new root\n keyNode.left=null; // unlinking initial root's left pointer\n }\n else{\n\n if(parent.left==keyNode){ // if nodes to be deleted is a left child of it's parent\n\n parent.left=keyNode.left;\n }else{ // // if nodes to be deleted is a right child of it's parent\n\n parent.right=keyNode.left;\n }\n\n }\n\n }\n return true;\n }",
"private void deleteNode(TSTNode<E> nodeToDelete) {\n if(nodeToDelete == null) return;\n nodeToDelete.data = null;\n \n while(nodeToDelete != null) {\n nodeToDelete = deleteNodeRecursion(nodeToDelete);\n }\n }",
"@Override\r\n public E delete(E target) {\r\n E node = find(target);\r\n if (node == null){\r\n return null;\r\n }\r\n return deleteHelper(root,target,0);\r\n }",
"public void deleteNode(String node) {\n nodeRepository.delete(new Node(node));\n }",
"static void deleteNode(Node node){\n\t\tif(node.next==null){\r\n\t\t\tnode=null;\r\n\t\t}\r\n\t\tnode.data=node.next.data;\r\n\t\tnode.next=node.next.next;\r\n\t}",
"public boolean delete(int m) {\r\n \r\n System.out.println(\"We are deleting \" + m);\r\n\tbtNode current = root;\r\n btNode parent = root;\r\n boolean LeftChild = true;\r\n\r\n while(current.getData() != m) \r\n {\r\n parent = current;\r\n if(m < current.getData()) \r\n {\r\n LeftChild = true;\r\n current = current.left;\r\n }\r\n else { \r\n LeftChild = false;\r\n current = current.right;\r\n }\r\n if(current == null) \r\n return false; \r\n } // end while\r\n // found node to delete\r\n\r\n // if no children, simply delete it\r\n if(current.left==null && current.right==null)\r\n {\r\n if(current == root) // if root,\r\n root = null; // tree is empty\r\n else if(LeftChild)\r\n parent.left = null; // disconnect\r\n else // from parent\r\n parent.right = null;\r\n }\r\n\r\n // if no right child, replace with left subtree\r\n else if(current.right==null)\r\n if(current == root)\r\n root = current.left;\r\n else if(LeftChild)\r\n parent.left = current.left;\r\n else\r\n parent.right = current.left;\r\n\r\n // if no left child, replace with right subtree\r\n else if(current.left==null)\r\n if(current == root)\r\n root = current.right;\r\n else if(LeftChild)\r\n parent.left = current.right;\r\n else\r\n parent.right = current.right;\r\n\r\n else // two children, so replace with inorder successor\r\n {\r\n // get successor of node to delete (current)\r\n btNode successor = getNext(current);\r\n\r\n // connect parent of current to successor instead\r\n if(current == root)\r\n root = successor;\r\n else if(LeftChild)\r\n parent.left = successor;\r\n else\r\n parent.right = successor;\r\n\r\n // connect successor to current's left child\r\n successor.left = current.left;\r\n } // end else two children\r\n // (successor cannot have a left child)\r\n return true; // success\r\n }",
"private BinaryNode<E> _deleteNode(BinaryNode<E> nodeToDelete) {\n\t\tif (nodeToDelete.isLeaf()) // node to delete has no children\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\tif (!nodeToDelete.hasLeftChild()) // node to delete has no LEFT child\n\t\t{\n\t\t\treturn nodeToDelete.getRightChild();\n\t\t}\n\t\tif (!nodeToDelete.hasRightChild()) // node to delete has no RIGHT child\n\t\t{\n\t\t\treturn nodeToDelete.getLeftChild();\n\t\t}\n\t\t// must have left and right children\n\t\t// Locate the rightmost node in the left subtree of\n\t\t// the node to delete and also its parent\n\t\tBinaryNode<E> parentOfRightMost = nodeToDelete;\n\t\tBinaryNode<E> rightMost = nodeToDelete.getLeftChild();\n\n\t\twhile (rightMost.getRightChild() != null) {\n\t\t\tparentOfRightMost = rightMost;\n\t\t\trightMost = rightMost.getRightChild(); // Keep going to the right\n\t\t}\n\n\t\t// Replace the element in nodeToDelete by the element in rightMost\n\t\tnodeToDelete.setData(rightMost.getData()); // don't really delete the node, just change the data\n\n\t\t// Eliminate rightmost node\n\t\tif (parentOfRightMost.getRightChild() == rightMost)\n\t\t\tparentOfRightMost.setRightChild(rightMost.getLeftChild());\n\t\telse\n\t\t\t// Special case: nodeToDelete's leftChild has no rightChild\n\t\t\tparentOfRightMost.setLeftChild(rightMost.getLeftChild());\n\n\t\treturn nodeToDelete;\n\t}",
"public void delete(Comparable<T> item)\r\n {\r\n root = delete(root,item);\r\n }",
"@Override\n public boolean delete(E e) {\n TreeNode<E> curr = root;\n while(curr!= null){\n if(e.compareTo(curr.element)<0){\n curr = curr.left;\n }else if (e.compareTo(curr.element)>0){\n curr = curr.right;\n }else{\n break; // we found the element to delete\n }\n }\n \n if(curr == null){\n return false; // we did not found the element\n }else{\n \n if(curr.left == null){\n transplant(curr, curr.right);\n }else if(curr.right == null){\n transplant(curr, curr.left);\n }else{\n TreeNode<E> min = minimum(curr);\n if(min.parent != curr){\n transplant(min, min.right);\n min.right = curr.right;\n min.right.parent = min;\n }\n transplant(curr, min);\n min.left = curr.left;\n min.left.parent = min;\n }\n return true;\n }\n }",
"public void delete(Node node){\n\t\t//System.out.println(\" in delete\");\n\t Node tempNode=node;\n\t Node other;\n\t String checkColour = tempNode.colour;\n\t if(node.left==nil){\n\t \tother=node.right;\n\t transferLink(node,node.right);\n\t }\n\t else if(node.right==nil){\n\t \tother=node.left;\n\t transferLink(node,node.left);\n\t }\n\t else{\n\t \ttempNode=node.right;\n\t while(tempNode.left!=nil)\n\t \ttempNode=tempNode.left;\n\t checkColour=tempNode.colour;\n\t other=tempNode.right;\n\t if(tempNode.parent==node)\n\t \tother.parent=tempNode;\n\t else{\n\t \ttransferLink(tempNode,tempNode.right);\n\t \ttempNode.right=node.right;\n\t \ttempNode.right.parent=tempNode;\n\t }\n\t transferLink(node,tempNode);\n\t tempNode.left=node.left;\n\t tempNode.left.parent=tempNode;\n\t tempNode.colour=node.colour;\n\t }\n\t //if the node to be deleted has back color we caused a violation and is needed to be fixed\n\t if(checkColour==\"Black\")\n\t \tfixViolationDelete(other);\n\t}",
"private BSTnode<K> actualDelete(BSTnode<K> n, K key) {\n\t\tif (n == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif (key.equals(n.getKey())) {\n\t\t\t// n is the node to be removed\n\t\t\tif (n.getLeft() == null && n.getRight() == null) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tif (n.getLeft() == null) {\n\t\t\t\treturn n.getRight();\n\t\t\t}\n\t\t\tif (n.getRight() == null) {\n\t\t\t\treturn n.getLeft();\n\t\t\t}\n\n\t\t\t// if we get here, then n has 2 children\n\t\t\tK smallVal = smallest(n.getRight());\n\t\t\tn.setKey(smallVal);\n\t\t\tn.setRight(actualDelete(n.getRight(), smallVal));\n\t\t\treturn n;\n\t\t}\n\n\t\telse if (key.compareTo(n.getKey()) < 0) {\n\t\t\tn.setLeft(actualDelete(n.getLeft(), key));\n\t\t\treturn n;\n\t\t}\n\n\t\telse {\n\t\t\tn.setRight(actualDelete(n.getRight(), key));\n\t\t\treturn n;\n\t\t}\n\t}",
"boolean removeNode(N node);",
"private Node<E> delete(Node<E> localRoot, E item) {\r\n\t\tif(localRoot == null) {\r\n\t\t\t// item is not in the tree.\r\n\t\t\tdeleteReturn = null;\r\n\t\t\treturn localRoot;\r\n\t\t}\t\r\n\t\t// Search for item to delete\r\n\t\tint compResult = item.compareTo(localRoot.data);\r\n\t\tif(compResult < 0) {\r\n\t\t\t// item is smaller than localRoot.data\r\n\t\t\tlocalRoot.left = delete(localRoot.left, item);\r\n\t\t\treturn localRoot;\r\n\t\t}\r\n\t\telse if(compResult > 0) {\r\n\t\t\t// item is larger than localRoot.data\r\n\t\t\tlocalRoot.right = delete(localRoot.right, item);\r\n\t\t\treturn localRoot;\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// item is at the local root\r\n\t\t\tdeleteReturn = localRoot.data;\r\n\t\t\tif(localRoot.left == null) {\r\n\t\t\t\t// if there is no left child, return the right child which can also be null\r\n\t\t\t\treturn localRoot.right;\r\n\t\t\t}\r\n\t\t\telse if(localRoot.right == null) {\r\n\t\t\t\t// if theres no right child, return the left child\r\n\t\t\t\treturn localRoot.left;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t//Node being deleted has two children, replace the data with inorder predecessor\r\n\t\t\t\tif(localRoot.left.right == null) {\r\n\t\t\t\t\t// the left child has no right child\r\n\t\t\t\t\t//replace the data with the data in the left child\r\n\t\t\t\t\tlocalRoot.data = localRoot.left.data;\r\n\t\t\t\t\t// replace the left child with its left child\r\n\t\t\t\t\tlocalRoot.left = localRoot.left.left;\r\n\t\t\t\t\treturn localRoot;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t//Search for in order predecessor(IP) and replace deleted nodes data with IP\r\n\t\t\t\t\tlocalRoot.data = findLargestChild(localRoot.left);\r\n\t\t\t\t\treturn localRoot;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private AvlNode deleteNode(AvlNode root, int value) {\n\r\n if (root == null)\r\n return root;\r\n\r\n // If the value to be deleted is smaller than the root's value,\r\n // then it lies in left subtree\r\n if ( value < root.key )\r\n root.left = deleteNode(root.left, value);\r\n\r\n // If the value to be deleted is greater than the root's value,\r\n // then it lies in right subtree\r\n else if( value > root.key )\r\n root.right = deleteNode(root.right, value);\r\n\r\n // if value is same as root's value, then This is the node\r\n // to be deleted\r\n else {\r\n // node with only one child or no child\r\n if( (root.left == null) || (root.right == null) ) {\r\n\r\n AvlNode temp;\r\n if (root.left != null)\r\n temp = root.left;\r\n else\r\n temp = root.right;\r\n\r\n // No child case\r\n if(temp == null) {\r\n temp = root;\r\n root = null;\r\n }\r\n else // One child case\r\n root = temp; // Copy the contents of the non-empty child\r\n\r\n temp = null;\r\n }\r\n else {\r\n // node with two children: Get the inorder successor (smallest\r\n // in the right subtree)\r\n AvlNode temp = minValueNode(root.right);\r\n\r\n // Copy the inorder successor's data to this node\r\n root.key = temp.key;\r\n\r\n // Delete the inorder successor\r\n root.right = deleteNode(root.right, temp.key);\r\n }\r\n }\r\n\r\n // If the tree had only one node then return\r\n if (root == null)\r\n return root;\r\n\r\n // STEP 2: UPDATE HEIGHT OF THE CURRENT NODE\r\n root.height = Math.max(height(root.left), height(root.right)) + 1;\r\n\r\n // STEP 3: GET THE BALANCE FACTOR OF THIS NODE (to check whether\r\n // this node became unbalanced)\r\n int balance = balance(root).key;\r\n\r\n // If this node becomes unbalanced, then there are 4 cases\r\n\r\n // Left Left Case\r\n if (balance > 1 && balance(root.left).key >= 0)\r\n return doRightRotation(root);\r\n\r\n // Left Right Case\r\n if (balance > 1 && balance(root.left).key < 0) {\r\n root.left = doLeftRotation(root.left);\r\n return doRightRotation(root);\r\n }\r\n\r\n // Right Right Case\r\n if (balance < -1 && balance(root.right).key <= 0)\r\n return doLeftRotation(root);\r\n\r\n // Right Left Case\r\n if (balance < -1 && balance(root.right).key > 0) {\r\n root.right = doRightRotation(root.right);\r\n return doLeftRotation(root);\r\n }\r\n\r\n return root;\r\n }",
"private void deleteNode(Cat valueToDelete, Node root){\n Node temp = findNode(valueToDelete, root);\n if(temp.getRight()==null){\n Node parent = temp.getParent();\n if(temp.getLeft()==null){\n temp.setParent(null);\n if(temp==parent.getRight()){\n parent.setRight(null);\n fixBalanceValues(parent,-1);\n }\n else{\n parent.setLeft(null);\n fixBalanceValues(parent,1);\n }\n \n }\n else{\n //copy value of leftchild into the node to deletes data and delete it's leftchild\n temp.setData(temp.getLeft().getData());\n temp.setLeft(null);\n fixBalanceValues(temp, 1);\n }\n }\n Node nodeToDelete = temp.getRight();\n if(nodeToDelete.getLeft()==null){\n temp.setData(nodeToDelete.getData());\n temp.setRight(null);\n nodeToDelete.setParent(null);\n fixBalanceValues(temp,-1);\n }\n else{\n while(nodeToDelete.getLeft()!=null){\n nodeToDelete=nodeToDelete.getLeft(); \n } \n temp.setData(nodeToDelete.getData());\n Node parent = nodeToDelete.getParent();\n parent.setLeft(null);\n nodeToDelete.setParent(null);\n fixBalanceValues(parent,1);\n }\n \n \n }",
"public void delete(E data){\n \t// Preform a regular delete\n \t// Check to make sure the tree remains an RBT tree\n\tNode<E> z = search(data);\n\tNode<E> x = sentinel;\n\tNode<E> y = z;\n\tCharacter y_original_color = y.getColor();\n\tif (z.getLeftChild() == sentinel) {\n\t\tx = z.getRightChild();\n\t\ttransplant(z, z.getRightChild());\n\t} else if (z.getRightChild() == sentinel) {\n\t\tx = z.getLeftChild();\n\t\ttransplant(z, z.getLeftChild());\n\t} else {\n\t\ty = getMin(z.getRightChild());\n\t\ty_original_color = y.getColor();\n\t\tx = y.getRightChild();\n\t\tif (y.getParent() == z) {\n\t\t\tx.setParent(y);\n\t\t} else {\n\t\t\ttransplant(y, y.getRightChild());\n\t\t\ty.setRightChild(z.getRightChild());\n\t\t\ty.getRightChild().setParent(y);\n\t\t}\n\t\t\n\t\ttransplant(z, y);\n\t\ty.setLeftChild(z.getLeftChild());\n\t\ty.getLeftChild().setParent(y);\n\t\ty.setColor(z.getColor());\n\t}\n\t\n\tif (y_original_color == 'B') {\n\t\tfixDelete(x);\n\t}\n\t\t\n \n }",
"Node deleteNode(Node root, int key) \n {\n if (root == null) \n return root; \n \n // If the key to be deleted is smaller than \n // the root's key, then it lies in left subtree \n if (key < root.key) \n root.left = deleteNode(root.left, key); \n \n // If the key to be deleted is greater than the \n // root's key, then it lies in right subtree \n else if (key > root.key) \n root.right = deleteNode(root.right, key); \n \n // if key is same as root's key, then this is the node \n // to be deleted \n else\n { \n // node with only one child or no child \n if ((root.left == null) || (root.right == null)) \n { \n Node temp = null; \n if (temp == root.left) \n temp = root.right; \n else\n temp = root.left; \n \n // No child case \n if (temp == null) \n { \n temp = root; \n root = null; \n } \n else // One child case \n root = temp; // Copy the contents of \n // the non-empty child \n } \n else\n { \n \n // node with two children: Get the inorder \n // successor (smallest in the right subtree) \n Node temp = minValueNode(root.right); \n \n // Copy the inorder successor's data to this node \n root.key = temp.key; \n \n // Delete the inorder successor \n root.right = deleteNode(root.right, temp.key); \n } \n } \n \n // If the tree had only one node then return \n if (root == null) \n return root; \n \n // STEP 2: UPDATE HEIGHT OF THE CURRENT NODE \n root.height = max(height(root.left), height(root.right)) + 1; \n \n // STEP 3: GET THE BALANCE FACTOR OF THIS NODE (to check whether \n // this node became unbalanced) \n int balance = getBalance(root); \n \n // If this node becomes unbalanced, then there are 4 cases \n // Left Left Case \n if (balance > 1 && getBalance(root.left) >= 0) \n return rightRotate(root); \n \n // Left Right Case \n if (balance > 1 && getBalance(root.left) < 0) \n { \n root.left = leftRotate(root.left); \n return rightRotate(root); \n } \n \n // Right Right Case \n if (balance < -1 && getBalance(root.right) <= 0) \n return leftRotate(root); \n \n // Right Left Case \n if (balance < -1 && getBalance(root.right) > 0) \n { \n root.right = rightRotate(root.right); \n return leftRotate(root); \n } \n \n return root; \n }",
"@Override\n\tpublic void deleteNode(String nodeId) {\n\t\tNode node = (Node) hibernatedao.queryData(nodeId, Node.class);\n\t\thibernatedao.delete(null, node);\n\t}",
"public BSTNode delete(int key) {\n BSTNode node = (BSTNode)search(key); \n if (node != null) { \n \tif (node.getLeft() != null && node.getRight() != null) {\n \t\tBSTNode left = (BSTNode)max(node.getLeft()), leftParent = left.getParent();\n \t\treplace(node, left);\n \t\tif (left.getColor() == Color.BLACK) {\n \t\t\tif (node.getColor() == Color.RED)\n \t\t\t\tleft.setColor(Color.RED);\n \t\t\tif (leftParent != node) {\n \t\t\t\tif (leftParent.getRight() != null)\n \t\t\t\t\tleftParent.getRight().setColor(Color.BLACK);\n \t\t\t\telse\n \t\t\t\t\tadjustColorsRemoval(leftParent, false);\n \t\t\t}\n \t\t\telse {\n \t\t\t\tif (left.getLeft() != null)\n \t\t\t\t\tleft.getLeft().setColor(Color.BLACK);\n \t\t\t\telse\n \t\t\t\t\tadjustColorsRemoval(left, true);\n \t\t\t}\n \t\t}\n \t\telse if (node.getColor() == Color.BLACK)\n \t\t\tleft.setColor(Color.BLACK);\n \t}\n \telse if (node.getLeft() == null && node.getRight() == null) {\n \tremove(node, null); \n \tif (root != null && node.getColor() == Color.BLACK)\n \t\tadjustColorsRemoval(node.getParent(), node.getKey() < node.getParent().getKey());\n }\n \telse if (node.getLeft() != null && node.getRight() == null) {\n \t\tremove(node, node.getLeft());\n \t\tnode.getLeft().setColor(Color.BLACK);\n \t}\n\t else {\n\t \tremove(node, node.getRight()); \n\t \tnode.getRight().setColor(Color.BLACK);\n\t }\n }\n return node;\n }",
"public void deleteNode(int val) {\n\n Node nodeToDelete = find(val);\n\n if (nodeToDelete != null) {\n\n if (nodeToDelete.leftChild == null && nodeToDelete.rightChild == null) {\n\n //case1 - node has no child\n deleteCase1(nodeToDelete);\n } else if (nodeToDelete.leftChild != null && nodeToDelete.rightChild != null) {\n // case 3- node has both left and right child\n deleteCase3(nodeToDelete);\n } else {\n // Case 2 - node has left or right child not both\n deleteCase2(nodeToDelete);\n }\n\n }\n\n\n }",
"private void delete(Node curr, int ID, AtomicReference<Node> rootRef) {\n\t\tif(curr == null || curr.isNull) {\n return;\n }\n if(curr.ID == ID) {\n if(curr.right.isNull || curr.left.isNull) {\n deleteDegreeOneChild(curr, rootRef);\n } else {\n Node n = findSmallest(curr.right);\n \tcurr.ID = n.ID;\n curr.count = n.count;\n delete(curr.right, n.ID, rootRef);\n }\n }\n if(curr.ID < ID) {\n delete(curr.right, ID, rootRef);\n } else {\n delete(curr.left, ID, rootRef);\n }\n\t}",
"public void deleteNode(TreePath path) {\n \t\tSpatial node = (Spatial) path.getLastPathComponent();\n \t\ttreeModel.deleteNode(node);\n \t\trepaint();\n \t}",
"AVLNode deleteNode(AVLNode root, int data){\r\n\t if (root == null){\r\n\t return root;\r\n\t }\r\n\t \r\n\t //Slightly different than the already implemented search for node function\r\n\t if ( data < root.data ){\r\n\t root.left = deleteNode(root.left, data);\r\n\t }\r\n\t else if( data > root.data ){\r\n\t root.right = deleteNode(root.right, data);\r\n\t }else{\r\n\t // node with only one child or no child\r\n\t if( (root.left == null) || (root.right == null) ){\r\n\t AVLNode temp = root.left!=null ? root.left : root.right;\r\n\t // No child case\r\n\t if(temp == null){\r\n\t temp = root;\r\n\t root = null;\r\n\t }else{ // One child case\r\n\t root = temp; \r\n\t }\r\n\t }else{\r\n\t // node with two children: Get the inorder successor (smallest\r\n\t // in the right subtree)\r\n\t \tAVLNode minNode = root.right;\r\n\t \twhile (minNode.left != null){\r\n\t minNode = minNode.left;\r\n\t \t}\r\n\t \tAVLNode temp = minNode;\r\n\t // Copy the inorder successor's data to this node\r\n\t root.data = temp.data;\r\n\t // Delete the inorder successor\r\n\t root.right = deleteNode(root.right, temp.data);\r\n\t }\r\n\t \r\n\t // If the tree had only one node then return\r\n\t if (root == null){\r\n\t return root;\r\n\t }\r\n\t balanceTree(root);\r\n\t }\r\n\t return root;\r\n\t}",
"void arbitraryRemove(Nodefh node){\n\t\n\t\tif(node.Parent.Child == node){\n\t\t\tif(node.Right != null && node.Right != node){\n\t\t\t\tnode.Parent.Child = node.Right;\n\t\t\t\tif(node.Left!=null && node.Left != node){\n\t\t\t\t\tnode.Left.Right = node.Right;\n\t\t\t\t\tnode.Right.Left = node.Left;\n\t\t\t\t\tnode.Parent = null;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tnode.Right.Left = node.Right;\n\t\t\t\t\tnode.Parent = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tnode.Parent.Child = null;\n\t\t\t\tnode.Parent = null;\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tif(node.Left != null && node.Left != node){\n\t\t\t\tnode.Left.Right = node.Right;\n\t\t\t\tnode.Right.Left = node.Left;\n\t\t\t}\n\t\t\tnode.Parent = null;\n\n\t\t}\n\t\tif(node.Child!=null){\n\t\t\tNodefh temp = node.Child;\n\t\t\tif(node.Child.Right!=null){\n\t\t\t\ttemp = node.Child.Right;\n\t\t\t}\n\t\t\tfhInsert(node.Child);\n\t\t\twhile(temp!=node.Child.Right){\n\t\t\t\tfhInsert(temp);\n\t\t\t\ttemp = temp.Right;\n\t\t\t}\n\n\t\t}\n\n\t}",
"public boolean delete(Integer searchKey) {\n\t\tif(root == null) {\n\t\t\t// Empty BST\n\t\t\treturn false; \n\t\t} else if(root.getData() == searchKey) {\t\t\t\t\t\t\t\t\t\t// the root is the item we are looking to delete\n\t\t\tif(root.getLeftChild() == null && root.getRightChild() == null) { \t\t\t// root has no children \n\t\t\t\troot = null;\n\t\t\t\tlength--;\n\t\t\t\treturn true;\n\t\t\t} else if(root.getLeftChild() == null) {\t\t\t\t\t\t\t\t\t// root jut has right child\n\t\t\t\troot = root.getRightChild();\n\t\t\t\tlength--;\n\t\t\t\treturn true;\n\t\t\t} else if(root.getRightChild() == null) { \t\t\t\t\t\t\t\t\t// root just has left child\n\t\t\t\troot = root.getLeftChild();\n\t\t\t\tlength--;\n\t\t\t\treturn true; \n\t\t\t} else { \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// has two children, replace root with its successor\n\t\t\t\tTreeNode successorParent = root.getRightChild();\n\t\t\t\tif(successorParent.getLeftChild() == null) { \t\t\t\t\t\t\t// the successor is the roots right child\n\t\t\t\t\tTreeNode successor = successorParent;\n\t\t\t\t\tsuccessor.setLeftChild(root.getLeftChild());\n\t\t\t\t\troot = successor;\n\t\t\t\t\tlength--;\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Go down the tree until we have located the successor and its parent\n\t\t\t\twhile(successorParent.getLeftChild().getLeftChild() != null) {\n\t\t\t\t\tsuccessorParent = successorParent.getLeftChild();\n\t\t\t\t}\n\t\t\t\tTreeNode successor = successorParent.getLeftChild();\n\t\t\t\t\n\t\t\t\tsuccessorParent.setLeftChild(successor.getRightChild());\t\t\t\t// make sure successors parent points to the correct place\n\n\t\t\t\t// Replace the current root with successor \n\t\t\t\tsuccessor.setLeftChild(root.getLeftChild());\n\t\t\t\tsuccessor.setRightChild(root.getRightChild());\n\t\t\t\troot = successor;\n\t\t\t\tlength--;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} else {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// the item we are looking to delete is not the root, it is somewhere else in the tree or it doesn't exist at all\n\t\t\tTreeNode current = root; \n\n\t\t\t// Find the parent of the child to delete, or potentially find out that data does not exist in the tree and return false\n\t\t\twhile((current.getLeftChild() == null || current.getLeftChild().getData() != searchKey) && (current.getRightChild() == null || current.getRightChild().getData() != searchKey)) {\n\t\t\t\tif(searchKey > current.getData()) {\n\t\t\t\t\tif(current.getRightChild() == null) {\n\t\t\t\t\t\treturn false; \n\t\t\t\t\t} else {\n\t\t\t\t\t\tcurrent = current.getRightChild();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif(current.getLeftChild() == null) {\n\t\t\t\t\t\treturn false; \n\t\t\t\t\t} else {\n\t\t\t\t\t\tcurrent = current.getLeftChild();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If the program has reached this point in the code, we know that either its left child or its right child must be \n\t\t\t// the node that we are looking to delete\n\t\t\tTreeNode parent = current;\n\t\t\tTreeNode child; \n\t\t\tboolean isRightChild; \n\t\t\t\n\t\t\t// Figure out if child is on the left or right\n\t\t\tif(searchKey > parent.getData()) {\n\t\t\t\tchild = parent.getRightChild();\n\t\t\t\tisRightChild = true; \n\t\t\t} else {\n\t\t\t\tchild = parent.getLeftChild();\n\t\t\t\tisRightChild = false; \n\t\t\t}\n\t\t\t\n\t\t\tif(child.getLeftChild() == null && child.getRightChild() == null) {\t\t\t// child has no children\n\t\t\t\treturn setChild(parent ,null ,isRightChild);\n\t\t\t} else if(child.getLeftChild() == null) {\t\t\t\t\t\t\t\t\t// child just has a right child \n\t\t\t\treturn setChild(parent, child.getRightChild(), isRightChild);\n\t\t\t} else if(child.getRightChild() == null) {\t\t\t\t\t\t\t\t\t// child just has a left child \n\t\t\t\treturn setChild(parent, child.getLeftChild(), isRightChild);\n\t\t\t} else {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// has two children, replace child with its successor\n\t\t\t\tTreeNode successorParent = child.getRightChild();\n\t\t\t\tif(successorParent.getLeftChild() == null) {\t\t\t\t\t\t\t// the successor is the roots right child\n\t\t\t\t\treturn setChild(parent, child.getRightChild(), isRightChild);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Go down the tree until we have located the successor and its parent\n\t\t\t\twhile(successorParent.getLeftChild().getLeftChild() != null) {\n\t\t\t\t\tsuccessorParent = successorParent.getLeftChild();\n\t\t\t\t}\n\t\t\t\tTreeNode successor = successorParent.getLeftChild();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tsuccessorParent.setLeftChild(successor.getRightChild());\t\t\t\t// make sure successors parent points to the correct place\n\n\t\t\t\tsuccessor.setLeftChild(child.getLeftChild());\n\t\t\t\tsuccessor.setRightChild(child.getRightChild());\n\t\t\t\treturn setChild(parent, successor, isRightChild);\n\t\t\t}\n\t\t}\n\t}",
"private Node<Integer, Integer> delete(Node<Integer, Integer> node, int value) {\n\t\tif (node.getKey() == value && !node.hasChildren()) {\n\t\t\treturn null;\n\t\t} else if (node.getKey() == value && node.hasChildren()) {\n\t\t\tif (node.getLeft() == null && node.getRight() != null) {\n\t\t\t\treturn node.getRight();\n\t\t\t} else if (node.getLeft() != null && node.getRight() == null) {\n\t\t\t\treturn node.getLeft();\n\t\t\t} else {\n\t\t\t\treturn deleteRotateRight(node);\n\t\t\t}\n\t\t} else {\n\t\t\tif (node.getKey() > value) {\n\t\t\t\tnode.left = delete(node.getLeft(), value);\n\t\t\t\treturn node;\n\t\t\t} else {\n\t\t\t\tnode.right = delete(node.getRight(), value);\n\t\t\t\treturn node;\n\t\t\t}\n\t\t}\n\t}",
"public void delete(int id) { \n\t\tint save = findPosition(id);\n\t\t\n\t\tif (save == numOfNode - 1) {\n\t\t\tnode [save] = null;\n\t\t\tnumOfNode--;\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// dich dan cac node vao\n\t\tfor (int i = save; i < numOfNode - 1; i++) {\n\t\t\tnode[i] = node[i + 1];\n\t\t}\n\t\t\n\t\tnode[numOfNode - 1] = null;\n\t\tnumOfNode--;\n\t}",
"private void delete(BTreeNode<T> currentNode, I id) {\n int indexKey = findIndexKey(currentNode, id);\n\n if (indexKey != -1) {\n if (currentNode.isLeaf()) {\n removeFromLeaf(currentNode, indexKey);\n } else {\n //TODO: Remover dato de nodo que no sea hoja\n removeFromNonLeaf(currentNode, indexKey);\n }\n\n if (currentNode != root && currentNode.getNumKeys() < 2) {\n checkMinKeys(currentNode);\n }\n } else {\n if (currentNode.isLeaf()) {\n System.out.println(\"No existe en el arbol\");\n } else {\n int indexChild = findChildOrIndex(currentNode, id);\n\n delete(currentNode.getChild(indexChild), id);\n }\n }\n }",
"public NodeBinaryTree deleteNode(NodeBinaryTree node, int value)\n {\n if(node == null)\n {\n return null;\n }\n\n if(value < node.data)\n {\n node.leftNode = deleteNode(node.leftNode, value);\n }\n else if(value > node.data)\n {\n node.rightNode = deleteNode(node.rightNode, value);\n }\n else\n {\n // it is the condition where the the ndoe value is itself\n if(node.leftNode == null)\n {\n return node.rightNode;\n }\n else if(node.rightNode == null)\n {\n return node.leftNode;\n }\n\n // we traverse right part of tree for minimum value\n node.data = minimumValueOfRight(node.rightNode);\n node.rightNode = deleteNode(node.rightNode, node.data);\n }\n return node;\n }",
"public BinaryNode removeNode(BinaryNode node){\n if(isLeaf(node)){//base case\n BinaryNode parent = (BinaryNode) node.getParent();\n if(parent == null){\n root = null;\n }\n else{\n parent.removeChild(node);\n }\n size--;\n return parent;\n }\n BinaryNode lower = descendant(node);\n promote(lower, node);\n return removeNode(lower);\n }",
"private Node delete(Order ord2) {\n\t\treturn null;\n\t}",
"private void delete(Node next) {\n\t\t\n\t}",
"public void delete(Node x) {\n if (!redoDone)\n redoStack.clear();\n else\n redoDone = false;\n BSTTrackingData log = new BSTTrackingData(x, x.left, x.right, x.parent, null, 'd');\n Boolean isRoot = x == root;\n Node toRemove = x;\n Node succ = null;\n if (x.left != null & x.right != null) { //if Case 3 - PartA change toRemove to the successor and remove it from the tree\n succ = successorForDelete(x); //use side function to get the successor (adjusted to improve retrack runtime)\n toRemove = succ;\n log.setSuccParent(succ.parent); //update log accordingly\n }\n stack.push(log);\n deleteUpToChild(toRemove); //function to handle removal of node with up to 1 child.\n if (succ != null) { //Case 3 part B - Place the successor in x's location in the tree.\n //update parent\n succ.parent = x.parent;\n if (isRoot) {\n root = succ;\n } else {\n if (x.parent.right == x) x.parent.right = succ;\n else x.parent.left = succ;\n }\n //update both children\n succ.right = x.right;\n if (x.right != null)\n x.right.parent = succ;\n succ.left = x.left;\n if (x.left != null)\n x.left.parent = succ;\n }\n\n }",
"public TreeNode deleteNode1(TreeNode root, int key) {\n if (root == null) {\n return root;\n }\n\n // delete current node if root is the target node\n if (root.val == key) {\n // replace root with root->right if root->left is null\n if (root.left == null) {\n return root.right;\n }\n\n // replace root with root->left if root->right is null\n if (root.right == null) {\n return root.left;\n }\n\n // replace root with its successor if root has two children\n TreeNode p = findSuccessor(root);\n root.val = p.val;\n root.right = deleteNode1(root.right, p.val);\n return root;\n }\n if (root.val < key) {\n // find target in right subtree if root->val < key\n root.right = deleteNode1(root.right, key);\n } else {\n // find target in left subtree if root->val > key\n root.left = deleteNode1(root.left, key);\n }\n return root;\n }",
"public Node<E> delete(E payload) {\n Node<E> parent = searchParent(payload);\n Node<E> current = search(payload);\n if (current != null)\n return delete(current, parent);\n else\n return null;\n }",
"public boolean delete(int key) {\n Node current = root;\n Node parent = root;\n boolean isLeftChild = true;\n while (current.iData != key) {\n parent = current;\n if (key < current.iData) {\n // go left\n isLeftChild = true;\n current = current.leftChild;\n } else {\n isLeftChild = false;\n current = current.rightChild;\n }\n if (current == null)\n // end of the line, didn't find it\n return false;\n } //end while\n\n // found node to delete\n\n if (current.leftChild == null && current.rightChild == null) {\n // if no children, simply delete it\n if (current == root)\n // if root, tree is empty\n root = null;\n else if (isLeftChild)\n parent.leftChild = null;\n else\n parent.rightChild = null;\n } else if (current.rightChild == null) {\n // if no right child, replace with left subtree\n if (current == root)\n root = current.leftChild;\n else if (isLeftChild)\n parent.leftChild = current.leftChild;\n else\n parent.rightChild = current.leftChild;\n } else if (current.leftChild == null) {\n // if no left child, replace with right subtree\n if (current == root)\n root = current.rightChild;\n else if (isLeftChild)\n parent.leftChild = current.rightChild;\n else\n parent.rightChild = current.rightChild;\n } else {\n // two children, so replace with inorder successor\n // get successor of node to delete\n Node successor = getSuccessor(current);\n\n // connect parent of current to successor instead\n if (current == root)\n root = successor;\n else if (isLeftChild)\n parent.leftChild = successor;\n else\n parent.rightChild = successor;\n\n // connect successor to current's left child\n successor.leftChild = current.leftChild;\n } // end else two children\n // succssor cannot have a left child\n return true;\n }",
"private Node deleteRec(T val, Node node, boolean[] deleted) {\n if (node == null) {\n return null;\n }\n\n int comp = val.compareTo(node.val);\n if (comp == 0) {\n // This is the node to delete\n deleted[0] = true;\n if (node.left == null) {\n // Just slide the right child up\n return node.right;\n } else if (node.right == null) {\n // Just slide the left child up\n return node.left;\n } else {\n // Find next inorder node and replace deleted node with it\n T nextInorder = minValue(node.right);\n node.val = nextInorder;\n node.right = deleteRec(nextInorder, node.right, deleted);\n }\n } else if (comp < 0) {\n node.left = deleteRec(val, node.left, deleted);\n } else {\n node.right = deleteRec(val, node.right, deleted);\n }\n\n return node;\n }",
"protected void deleteNode(INode node) {\n\n if (node != null) {\n\n this.ids.remove(node.getID());\n this.nodeMap.remove(node.getID());\n }\n }",
"static Node deleteBst(Node tmp,int v)\n { // if the tree is empty nothing to delete\n \n if(tmp==null)\n {\n System.out.println(\"Tree is empty\");\n return null;\n }\n // otherwise it will find out the node needs to be deleted\n \n if(tmp.val<v)\n tmp.right=deleteBst(tmp.right,v);\n else if(tmp.val>v)\n tmp.left=deleteBst(tmp.left,v);\n \n else {\n //deleting leaf node\n \n if(tmp.left==null && tmp.right==null)\n {tmp=null;\n return tmp;\n }\n // the target node has only one child\n \n else if(tmp.left!=null && tmp.right==null)\n return tmp.left;\n else if(tmp.left==null && tmp.right!=null)\n return tmp.right;\n \n else //the target node has two children replace the node value with it's predecessor //and then delete the predessor node\n {\n tmp.val=findpredecessor(tmp.left);\n tmp.left=deleteBst(tmp.left,tmp.val);\n }\n }\n return tmp;\n \n }",
"public boolean deleteNode(Type val){\n MyBinNode aux = this.root;\n MyBinNode parent = this.root;\n boolean left = true;\n \n while(aux.value.compareTo(val) != 0){\n parent = aux;\n if(aux.value.compareTo(val) > 0){\n left = true;\n aux = aux.left;\n }else{\n left = false;\n aux = aux.right;\n }\n if(aux == null){\n return false;\n }\n }\n \n if(aux.left==null && aux.right==null){\n if(aux == this.root){\n this.root = null;\n }else if(left){\n parent.left = null;\n }else{\n parent.right = null;\n }\n }else if(aux.right == null){\n if(aux == this.root){\n this.root = aux.left;\n }else if(left){\n parent.left = aux.left;\n }else{\n parent.right = aux.left;\n }\n }else if(aux.left == null){\n if(aux == this.root){\n this.root = aux.right;\n }else if(left){\n parent.left = aux.right;\n }else{\n parent.right = aux.right;\n }\n }else{\n MyBinNode replace = getToReplace(aux);\n if(aux == this.root){\n this.root = replace;\n }else if(left){\n parent.left = replace;\n }else{\n parent.right = replace;\n }\n replace.left = aux.left;\n }\n return true;\n }",
"@Override\n\tpublic TreeNode remove() {\n\t\treturn null;\n\t}",
"void deleteTreeRef(Node nodeRef) {\n\t\tSystem.out.println(\"\\nSize of given Tree before delete : \" + sizeOfTreeWithRecursion(nodeRef));\n\t\tdeleteTree(nodeRef);\n\t\tnodeRef = null;\n\n\t\tSystem.out.println(\"\\nSize of given Tree after delete : \" + sizeOfTreeWithRecursion(nodeRef));\n\t}",
"public int delete(int k){\n\t WAVLNode x = treePosForDel(this, k); // find the node to delete\r\n\t int cnt = 0; // rebalance operations counter\r\n\t if(x.key!=k) { // if a node with a key of k doesnt exist in the tree there is nothing to delete, return -1\r\n\t\t return -1;\r\n\t }\r\n\t if(this.root.key==x.key&&this.root.rank==0) {//root is a leaf\r\n\t\t this.root=EXT_NODE;// change the root pointer to EXT_NODE\r\n\t\t return 0;\r\n\t }\r\n\t else if(this.root.key==x.key&&(this.root.right==EXT_NODE||this.root.left==EXT_NODE)) {//root is onary\r\n\t\t if(x.left!=EXT_NODE) { // x is a root with a left child\r\n\t\t\t x.left.parent = null;\r\n\t\t\t this.root = x.left; // change the root pointer to the root's left child\r\n\t\t\t x.left.sizen=1;\r\n\t\t\t return 0;\r\n\t\t }\r\n\t\t x.right.parent = null; // x is a root with a right child \r\n\t\t x.right.sizen=1;\r\n\t\t this.root = x.right; // change the root pointer to the root's right child\r\n\t\t return 0;\r\n\t }\r\n\t WAVLNode z;\r\n\t if(isInnerNode(x)) {// x is an inner node, requires a call for successor and swap\r\n\t\t z = successorForDel(x); // find the successor of x\r\n\t\t x = swap(x,z); // put x's successor instead of x and delete successor \r\n\t }\r\n\t\t if(x.rank == 0) {//x is a leaf\r\n\t\t\t if(parentside(x.parent, x).equals(\"left\")) { // x is a left child of it's parent, requires change in pointers \r\n\t\t\t\t x.parent.left = EXT_NODE;\r\n\t\t\t\t z = x.parent;\r\n\t\t\t\t x = x.parent.left;\r\n\t\t\t }\r\n\t\t\telse { // x is a right child of it's parent, requires change in pointers \r\n\t\t\t\t x.parent.right = EXT_NODE;\r\n\t\t\t\t z = x.parent;\r\n\t\t\t\t x = x.parent.right; \r\n\t\t\t }\r\n\t\t }\r\n\t\t else {//x is onary\r\n\t\t\t boolean onaryside = onaryLeft(x); // check if x is onary with a left child\r\n\t\t\t WAVLNode x_child = EXT_NODE;\r\n\t\t\t if (onaryside) {\r\n\t\t\t\t x_child=x.left; // get a pointer for x child\r\n\t\t\t }\r\n\t\t\t else {\r\n\t\t\t\t x_child=x.right;\r\n\t\t\t }\r\n\t\t\t if(parentside(x.parent, x).equals(\"left\")) { // x is a left child of its parent, change pointers for delete and rebalance loop\r\n\t\t\t\t x.parent.left=x_child;\r\n\t\t\t\t x_child.parent=x.parent;\r\n\t\t\t\t z=x.parent;\r\n\t\t\t\t x=x_child;\r\n\t\t\t\t \r\n\t\t\t }\r\n\t\t\t else {// x is a left child of its parent, change pointers for delete and rebalance loop\r\n\t\t\t\t x.parent.right=x_child;\r\n\t\t\t\t x_child.parent=x.parent;\r\n\t\t\t\t z=x.parent;\r\n\t\t\t\t x=x_child;\r\n\t\t\t }\r\n\t\t }\r\n\t if (z.left.rank==-1&&z.right.rank==-1) {//special case, z becomes a leaf, change pointers and demote\r\n\t\t demote(z);\r\n\t\t x=z;\r\n\t\t z=z.parent;\r\n\t\t cnt++;\r\n\t }\r\n\t \r\n\t while(z!=null&&z.rank-x.rank==3) { // while the tree is not balanced continue to balance the tree\r\n\t\t if(parentside(z, x).equals(\"left\")) { // x is z's left son\r\n\t\t\t if(z.rank-z.right.rank==2) {//condition for demote\r\n\r\n\t\t\t\t demote(z);\r\n\r\n\t\t\t\t x=z;\r\n\t\t\t\t z=z.parent;\r\n\t\t\t\t cnt++;\r\n\t\t\t }\r\n\t\t\t else {\r\n\t\t\t\t if(z.right.rank-z.right.left.rank==2&&z.right.rank-z.right.right.rank==2) {//condition for doubledemote left\r\n\t\t\t\t\t doubleDemoteLeft(z);\r\n\t\t\t\t\t x=z;\r\n\t\t\t\t\t z=z.parent;\r\n\t\t\t\t\t cnt+=2;\r\n\t\t\t\t\t \r\n\t\t\t\t }\r\n\t\t\t\t else if((z.right.rank-z.right.left.rank==1||z.right.rank-z.right.left.rank==2)&&z.right.rank-z.right.right.rank==1) {// condition for rotate left for del\r\n\t\t\t\t\t rotateLeftDel(z);\r\n\t\t\t\t\t cnt+=3;\r\n\t\t\t\t\t break; // tree is balanced\r\n\t\t\t\t }\r\n\t\t\t\t else {//condition for doublerotate left for del\r\n\t\t\t\t\t doubleRotateLeftDel(z);\r\n\t\t\t\t\t \r\n\t\t\t\t\t cnt=cnt+5;\r\n\t\t\t\t\t break; // tree is balanced\r\n\t\t\t\t }\r\n\t\t\t }\r\n\t\t }\r\n\t\t else { // x is z's right son, conditions are symmetric to left side\r\n\t\t\t if(z.rank-z.left.rank==2) {\r\n\t\t\t\t demote(z);\r\n\t\t\t\t x=z;\r\n\t\t\t\t z=z.parent;\r\n\t\t\t\t cnt++;\r\n\t\t\t\t \r\n\t\t\t }\r\n\t\t\t else {\r\n\t\t\t\t if(z.left.rank-z.left.right.rank==2&&z.left.rank-z.left.left.rank==2) {\r\n\t\t\t\t\t doubleDemoteright(z);\r\n\t\t\t\t\t x=z;\r\n\t\t\t\t\t z=z.parent;\r\n\t\t\t\t\t cnt+=2;\r\n\t\t\t\t }\r\n\t\t\t\t else if((z.left.rank-z.left.right.rank==1||z.left.rank-z.left.right.rank==2)&&z.left.rank-z.left.left.rank==1) {\r\n\t\t\t\t\t rotateRightDel(z);\r\n\t\t\t\t\t cnt+=3;\r\n\t\t\t\t\t break;\r\n\t\t\t\t }\r\n\t\t\t\t else {\r\n\r\n\t\t\t\t\t doubleRotateRightDel(z);\r\n\t\t\t\t\t cnt+=5;\r\n\t\t\t\t\t break;\r\n\t\t\t\t }\r\n\t\t\t\t \r\n\t\t\t }\r\n\t\t }\r\n\t }\r\n\t return cnt;\r\n }",
"public void deleteNode(Node n){\n\t\tn.item = n.next.item;\n\t\tNode temp = n.next.next;\n\t\t//delete(n.next);\n\t\tn.next = temp;\n\t\t\n\t\t\n\t}",
"private void deleteTree(tnode root){\n if (root != null)\n root = null;\n }",
"public static TreapNode deleteNode(TreapNode root, int key)\n {\n // base case: the key is not found in the tree\n if (root == null) {\n return null;\n }\n\n // if the key is less than the root node, recur for the left subtree\n if (key < root.data) {\n root.left = deleteNode(root.left, key);\n }\n\n // if the key is more than the root node, recur for the right subtree\n else if (key > root.data) {\n root.right = deleteNode(root.right, key);\n }\n\n // if the key is found\n else {\n // Case 1: node to be deleted has no children (it is a leaf node)\n if (root.left == null && root.right == null)\n {\n // deallocate the memory and update root to null\n root = null;\n }\n\n // Case 2: node to be deleted has two children\n else if (root.left != null && root.right != null)\n {\n // if the left child has less priority than the right child\n if (root.left.priority < root.right.priority)\n {\n // call `rotateLeft()` on the root\n root = rotateLeft(root);\n\n // recursively delete the left child\n root.left = deleteNode(root.left, key);\n }\n else {\n // call `rotateRight()` on the root\n root = rotateRight(root);\n\n // recursively delete the right child\n root.right = deleteNode(root.right, key);\n }\n }\n\n // Case 3: node to be deleted has only one child\n else {\n // choose a child node\n TreapNode child = (root.left != null)? root.left: root.right;\n root = child;\n }\n }\n\n return root;\n }",
"AVLNode delete(AVLNode node, int key) {\n if (node == null) \n return node; \n \n // If the key to be deleted is smaller than \n // the root's key, then it lies in left subtree \n if (key < node.key) \n node.left = delete(node.left, key); \n \n // If the key to be deleted is greater than the \n // root's key, then it lies in right subtree \n else if (key > root.key) \n node.right = delete(node.right, key); \n \n // if key is same as root's key, then this is the node \n // to be deleted \n else\n { \n \n // node with only one child or no child \n if ((node.left == null) || (node.right == null)) \n { \n AVLNode temp = null; \n if (temp == node.left) \n temp = node.right; \n else\n temp = node.left; \n \n if (temp == null) \n { \n temp = node; \n node = null; \n } \n else \n node = temp; \n } \n else\n { \n AVLNode temp = getSucc(node.right); \n node.key = temp.key; \n node.right = delete(node.right, temp.key); \n } \n } \n \n if (node== null) \n return node; \n \n node.height = max(height(node.left), height(node.right)) + 1; \n \n int balance = getBF(node); \n \n if (balance > 1 && getBF(node.left) >= 0) \n return rightrot(node); \n \n if (balance > 1 && getBF(node.left) < 0) \n { \n node.left = leftrot(node.left); \n return rightrot(node); \n } \n \n if (balance < -1 && getBF(node.right) <= 0) \n return leftrot(node); \n\n if (balance < -1 && getBF(node.right) > 0) \n { \n node.right = rightrot(node.right); \n return leftrot(node); \n } \n return node;\n }",
"private void deleteNode(Node n) {\n n.next.pre = n.pre;\n n.pre.next = n.next;\n }",
"public static void delete(Nodelink node){\n\n Nodelink temp = node.next;\n node = null;\n\n node = temp;\n\n }",
"private void removeNode(AVLNode<T, U> node){\n\t\tAVLNode<T, U> newNode = null;\n\t\t\n\t\tif(node.getLeft() == null && node.getRight() == null){\n\t\t\t//If the node is a leaf, I delete it and I recompute \n\t\t\t//the heights and check the balance starting from its parent\n\t\t\tnewNode = node.getParent();\n\t\t\tthis.transplant(node, null);\n\t\t}else if(node.getLeft() == null){\n\t\t\tnewNode = node.getRight();\n\t\t\tthis.transplant(node, newNode);\n\t\t}else if(node.getRight() == null){\n\t\t\tnewNode = node.getLeft();\n\t\t\tthis.transplant(node, newNode);\n\t\t}else{\n\t\t\tnewNode = getMinimum(node.getRight());\n\t\t\tif(newNode.getParent() != node){\n\t\t\t\tthis.transplant(newNode, newNode.getRight());\n\t\t\t\tnewNode.setRight(node.getRight());\n\t\t\t\tnewNode.getRight().setParent(newNode);\n\t\t\t}\n\t\t\tthis.transplant(node, newNode);\n\t\t\tnewNode.setLeft(node.getLeft());\n\t\t\tnewNode.getLeft().setParent(newNode);\n\t\t}\n\t\tcomputeHeights(newNode);\n\t\tbalanceTree(newNode);\n\t}",
"public void deleteNode(int data) {\n\t\tNode currentNode = headNode;\n\t\tNode previousNode = headNode;\n\t\tif(currentNode.getData()==data) {\n\t\t\theadNode = currentNode.getNextNode(); \n\t\t\treturn;\n\t\t} else {\n\t\t\twhile(currentNode.getNextNode()!=null) {\n\t\t\t\tpreviousNode = currentNode;\n\t\t\t\tcurrentNode = currentNode.getNextNode();\n\t\t\t\t\n\t\t\t\tif(currentNode.getData()==data) {\n\t\t\t\t\tpreviousNode.setNextNode(currentNode.getNextNode());\n\t\t\t\t}\n\t\t\t}\n\t\t\t//if the last element is the element we are looking for \n\t\t\tif(currentNode.getData()==data) {\n\t\t\t\tcurrentNode = null;\n\t\t\t}\n\t\t}\n\t}",
"@Test\n public void remove_BST_1_CaseLeafRight()\n {\n BinarySearchTree bst = new BinarySearchTree();\n No root = new No(6);\n No leaf = new No(9);\n \n bst.insert(null, root);\n //bst.printTree();\n \n bst.insert(root, new No(2));\n //bst.printTree();\n \n bst.insert(root, leaf);\n //bst.printTree();\n //System.err.println(); // Print[ERR] Devido a prioridade do buffer de impressao (out, err)\n \n assertEquals(leaf, bst.remove(leaf));\n assertEquals(new Integer(2), bst.size());\n //bst.printTree();\n }",
"private void deleteNode(Node<K> p) {\n // If strictly internal, copy successor's element to p and then make p\n // point to successor.\n if (p.left != null && p.right != null) {\n Node<K> s = successor(p); // 节点有 2 个子节点时,找到实际删除的后继节点\n p.key = s.key; // 将后继节点的值复制到原来节点上,原来的节点只是值被删除,节点本身不删除\n p = s; // 将实际要删除的节点位置指向后继节点位置\n } // p has 2 children //\n // //////////////////////////////////////////////////////////////////\n // Start fixup at replacement node, if it exists. //\n Node<K> replacement = (p.left != null ? p.left : p.right); // 实际删除的节点最多只有一个子节点,并且一定是红色子节点\n if (replacement != null) { // 如果有一个红色子节点\n // Link replacement to parent //\n replacement.parent = p.parent; // 将此节点上移\n if (p.parent == null) //\n root = replacement; //\n else if (p == p.parent.left) // 实际被删除的节点 p 为左子\n p.parent.left = replacement; //\n else // 实际被删除的节点 p 为右子\n p.parent.right = replacement; //\n // //\n // Null out links so they are OK to use by fixAfterDeletion. //\n p.left = p.right = p.parent = null; //\n // //\n // Fix replacement //////////////////////////////////////////////////////////////////\n if (p.color == BLACK) // 删除情形 5. 因为 replacement 是红节点,所以这里 p 的颜色一定是黑色的\n fixAfterDeletion(replacement); // 修复只要将此红节点上移并置黑就完成了\n } else if (p.parent == null) { // return if we are the only node. //////////////////////////////////////////////////////////////////\n root = null; // 根节点被删除\n } else { // No children. Use self as phantom replacement and unlink. // 被删除的节点没有子节点时\n if (p.color == BLACK) // 如果是红色的节点,直接删除就完成\n fixAfterDeletion(p); // 如果被删除的是黑色节点,则会破坏红黑树性质 5,需要修复红黑树\n\n if (p.parent != null) {\n if (p == p.parent.left)\n p.parent.left = null;\n else if (p == p.parent.right)\n p.parent.right = null;\n p.parent = null;\n }\n }\n }",
"private static BstDeleteReturn deleteHelper(BinarySearchTreeNode<Integer> root, int x) {\n if (root == null) {\n return new BstDeleteReturn(null, false);\n }\n\n if (root.data < x) {\n BstDeleteReturn outputRight = deleteHelper(root.right, x);\n root.right = outputRight.root;\n outputRight.root = root;\n return outputRight;\n }\n\n if (root.data > x) {\n BstDeleteReturn outputLeft = deleteHelper(root.left, x);\n root.left = outputLeft.root;\n outputLeft.root = root;\n return outputLeft;\n }\n\n // 0 children\n if (root.left == null && root.right == null) {\n return new BstDeleteReturn(null, true);\n }\n\n // only left child\n if (root.left != null && root.right == null) {\n return new BstDeleteReturn(root.left, true);\n }\n\n // only right child\n if (root.right != null && root.left == null) {\n return new BstDeleteReturn(root.right, true);\n }\n\n // both children are present\n int minRight = minimum(root.right);\n root.data = minRight;\n BstDeleteReturn output = deleteHelper(root.right, minRight);\n root.right = output.root;\n return new BstDeleteReturn(root, true);\n }",
"@Test\n public void remove_BST_0_CaseRootLeafRight()\n {\n BinarySearchTree bst = new BinarySearchTree();\n No root = new No(2);\n No no = new No(3);\n \n bst.insert(root, root);\n //bst.printTree();\n \n bst.insert(root, no);\n //bst.printTree();\n //System.err.println(); // Print[ERR] Devido a prioridade do buffer de impressao (out, err)\n \n assertEquals(new Integer(2), bst.size());\n assertEquals(no, bst.remove(no));\n assertEquals(new Integer(1), bst.size());\n //bst.printTree();\n }",
"public void delete(Key key) {\n\troot = delete(root, key);\t\n}",
"public E delete(E item){\n\t\troot = delete(item, root);\n\t\treturn deleteReturn;\n\t}",
"private BinarySearchTree deleteLeftMost(BinarySearchTree tree){\r\n\t\t\r\n\t\tif(tree.getLeftChild() == null){\r\n\t\t\t//this is the node we want. No left child\r\n\t\t\t//Right child might exist\r\n\t\t\t\r\n\t\t\treturn tree.getRightChild();\r\n\t\t}\r\n\t\telse{\r\n\t\t\tBinarySearchTree replacement = deleteLeftMost(tree.getLeftChild());\r\n\t\t\ttree.attachRightSubtree(replacement);\r\n\t\t\treturn tree;\r\n\t\t}\r\n\t}"
] | [
"0.7809078",
"0.7728646",
"0.7618276",
"0.7386019",
"0.72872764",
"0.72439903",
"0.7182616",
"0.7173524",
"0.71717346",
"0.7145526",
"0.71429265",
"0.7109738",
"0.7102628",
"0.7102255",
"0.71005464",
"0.70942056",
"0.70938665",
"0.7022918",
"0.70129406",
"0.7006222",
"0.6998214",
"0.69958967",
"0.6993562",
"0.69933295",
"0.69900644",
"0.6986491",
"0.69777584",
"0.69769305",
"0.6941594",
"0.69406515",
"0.69342834",
"0.6922954",
"0.69223535",
"0.69078314",
"0.6891635",
"0.688615",
"0.6885189",
"0.6885075",
"0.68806773",
"0.6865791",
"0.68625766",
"0.6859702",
"0.6852845",
"0.68381923",
"0.68277186",
"0.6820538",
"0.6818057",
"0.6807186",
"0.6799599",
"0.6792128",
"0.6791923",
"0.67903805",
"0.6776198",
"0.67738134",
"0.67699945",
"0.6769446",
"0.6766277",
"0.67565495",
"0.6753447",
"0.67442346",
"0.67335725",
"0.6726717",
"0.6713699",
"0.67124027",
"0.6712207",
"0.67082787",
"0.66974914",
"0.6682532",
"0.6682232",
"0.66666335",
"0.66594994",
"0.66451705",
"0.6644227",
"0.6637714",
"0.663589",
"0.6635165",
"0.6632403",
"0.6631612",
"0.66131765",
"0.65855193",
"0.6584633",
"0.65782505",
"0.65696716",
"0.6568585",
"0.6557156",
"0.65530646",
"0.6546171",
"0.65426",
"0.653246",
"0.65197945",
"0.6495298",
"0.6479709",
"0.6476665",
"0.6475424",
"0.64705205",
"0.64696324",
"0.64633673",
"0.64628613",
"0.6446093",
"0.6445642"
] | 0.6566362 | 84 |
Bind the ViewHolder to the adapter | @Override
public void onBindViewHolder(@NonNull MyViewHolder holder, int position) {
holder.tv_name.setText(data.get(position).getName());
holder.tv_phone.setText(data.get(position).getPhone());
holder.img_photo.setImageResource(data.get(position).getPhoto());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public ViewHolder(View itemView) {\n super(itemView);\n ButterKnife.bind(this, itemView);\n\n }",
"public void bind() {\n\t\tview.setAdapter(adapter);\n\t}",
"private void bindData(ViewHolder vh, int position) {\n\n }",
"@Override\n // Replace the contents of a view (invoked by the layout manager)\n public void onBindViewHolder(@NonNull ViewHolder holder, int position) {\n holder.bind(getItem(position));\n }",
"public abstract void bindViewHolder(VH holder, Context context, Cursor cursor);",
"private void bindView() {\n mToolbar = (Toolbar) findViewById(R.id.tb_main);\n mMainLayout = (CoordinatorLayout) findViewById(R.id.crdl_main);\n mProgressDialog = (AVLoadingIndicatorView) findViewById(R.id.avi_progress_dialog);\n mPersonsView = (RecyclerView) findViewById(R.id.rv_persons);\n mPersonsView.setLayoutManager(new LinearLayoutManager(context));\n }",
"public OrderItemHolder(MyAdapter myAdapter) {\n super(myAdapter, R.layout.delivered_order_item);\n ButterKnife.bind(this, itemView);\n }",
"@Override\n public void onBindViewHolder(ArticleViewHolder holder, int position) {\n Article article = articles.get(position); // find article to bind\n holder.bind(article); // bind article to holder\n }",
"@Override\n public void onBindViewHolder(MyViewHolder myViewHolder, int position) {\n PlanningObject planning = list.get(position);\n myViewHolder.bind(planning);\n }",
"@Override\n public void onBindViewHolder(@NonNull BarHolder holder, int position) {\n holder.bind();\n }",
"@Override\n public void onBindViewHolder(@NonNull ViewHolder holder, int position) {\n Log.i(\"TweetsAdapter\", \"onBindViewHolder\");\n // Grabs data\n Tweet tweet = tweetList.get(position);\n // Binds tweet with view holder\n holder.bind(tweet);\n }",
"@Override\n public void onBindViewHolder(RecipeListViewHolder holder, int position) {\n RecipeBase recipeBase = mRecipeBaseList.get(position);\n holder.bind(recipeBase);\n }",
"@Override\n public void onBindViewHolder(LyricItemViewHolder holder, int position) {\n holder.bind(position, lyric.getList().get(position));\n\n }",
"public ViewHolder(View view) {\n ButterKnife.bind(this, view);\n }",
"@Override\n public void onBindViewHolder(@NonNull PostsAdapter.ViewHolder holder, int position) {\n Post post = posts.get(position);\n holder.bind(post);\n }",
"@Override\n public void onBindViewHolder(AlarmHolder alarmHolder, int position) {\n Alarm alarm = mAlarms.get(position);\n alarmHolder.bindAlarm(alarm);\n }",
"@Override\n public void onBindViewHolder(FlagViewHolder holder, int position) {\n holder.bindTo(this.getItem(position));\n }",
"@Override\n public void onBindViewHolder(@NonNull ViewHolder holder, int position) {\n // Get the data at position\n Tweet tweet = tweets.get(position);\n // Bind the tweet with the view holder\n holder.bind(tweet);\n }",
"@Override\n public void onBindViewHolder(@NonNull ViewHolder holder, int position) {\n Log.d(\"MovieAdapter\", \"onBindViewHolder\" + position);\n //get the movie at the position\n Movie movie = movies.get(position);\n //bind the movie data into view holder\n holder.bind(movie);\n }",
"@Override\n public void onBindViewHolder(@NonNull PostsAdapter.ViewHolder holder, int position) {\n Post post = posts.get(position);\n // Bind movie data into the view holder\n holder.bind(post);\n }",
"@Override\n public void onBindViewHolder(@NonNull ViewHolder holder, int position) {\n //Get the data at position\n NYT nyt = nyts.get(position);\n //Bind the tweet with view holder\n holder.bind(nyt);\n }",
"@Override\n public void onBindViewHolder(ViewHolder holder, int position) {\n holder.currentPosition = position;\n holder.bindData(mCaloriesEntryList.get(position));\n }",
"@Override\n public void onBindViewHolder(@NonNull MyViewHolder holder, int position) {\n // - get element from your dataset at this position\n DetailedResponse detailedResponse = getItem(position);\n\n // - replace the contents of the view with that element\n // holder.title.setText(sampleBook.getFkBookInfoModel());\n holder.bind(detailedResponse);\n\n }",
"@Override\n public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {\n if (holder instanceof AnimalViewHolder) {\n // Subtract 1 to cater for Header View\n final Animal movie = mAnimalList.get(position - 1);\n ((AnimalViewHolder) holder).bindTo(movie);\n } else if (holder instanceof AnimalHeaderViewHolder) {\n\n }\n }",
"protected void bindViews(){\n ButterKnife.bind(this);\n }",
"@Override\n public void onBindViewHolder(ViewHolder holder, int position) {\n PhoneInfoModel phoneInfo = mPhoneInfoModels.get(position);\n\n // bind the model to the holder\n holder.bindPhoneInfo(phoneInfo);\n }",
"@Override\n public void bindView(ViewHolder viewHolder, List payloads) {\n //call super so the selection is already handled for you\n super.bindView(viewHolder, payloads);\n\n //bind our data\n //set the text for the name\n //viewHolder.name.setText(name);\n //set the text for the description or hide\n //viewHolder.description.setText(description);\n Picasso.get().load(getUserProfile()).into(viewHolder.userProfile);\n viewHolder.userName.setText(getUserName());\n viewHolder.userLocation.setText(getUserlocation());\n viewHolder.userNumber.setText(getUserNumber());\n viewHolder.userBType.setText(getUserBloodType());\n\n\n }",
"@Override\n public void onBindViewHolder(GamesViewHolder holder, int position) {\n //Get the current sport\n Game currentGame = mGameData.get(position);\n\n //Bind the data to the views\n holder.bindTo(currentGame);\n }",
"@Override\n protected void onBindView(RecyclerView.ViewHolder holder, int position, Object data) {\n ((ViewHolder) holder).getBinding().setVariable(BR.click, new DetailWebItemHandler(context, list,position));\n /* ((ViewHolder) holder).getBinding().setVariable(BR.isSuccess, false);*/\n\n ((ViewHolder) holder).getBinding().setVariable(BR.dianzanClick, new DetailDianzanItemHandler(context, list, DetailVideoAdapter.this, position));\n ((ViewHolder) holder).getBinding().setVariable(BR.answerClick, new DetailAnswerItemHandler(activity, articleId, list.get(position)));\n\n ((ViewHolder) holder).getBinding().setVariable(BR.bean, ((CommentDetailBean.Data) data));\n ((ViewHolder) holder).getBinding().executePendingBindings();\n }",
"@Override\n public void onBindViewHolder(final ViewHolder holder, int position) {\n // Para el caso de Institucion, el layout contiene campos para el\n // id y el nombre corto\n holder.mIdView.setText(Long.toString(mValues.get(position).getIdInstitucion()));\n holder.mContentView.setText(mValues.get(position).getNombreCortoInstitucion());\n\n // Le asignamos como tag a este View el objeto Institucion correspondiente\n holder.itemView.setTag(mValues.get(position));\n // Le asignamos su manejador de eventos\n holder.itemView.setOnClickListener(mOnClickListener);\n }",
"@Override\n public void onBindViewHolder(ViewHolder holder, int position) {\n\n DummyData dummyData = dummyDataList.get(position);\n\n holder.imageView.setImageBitmap(dummyData.getSomeImage());\n holder.textView.setText(dummyData.getSomeText());\n\n //set onclick listener for the views in the holder\n holder.itemView.setOnClickListener(this);\n holder.textView.setOnClickListener(this);\n }",
"@Override\n public void onBindViewHolder(MyViewHolder holder, int position) {\n ChatContact contact =chatEngine.getChatContact(position);\n holder.name.setText(contact.getFirstName() + \" \" + contact.getLastName());\n holder.lastMsg.setText(contact.getLastMessage());\n holder.bind(contact,listener);\n\n }",
"@Override\n public void onBindViewHolder(MyHolder holder, int position) {\n\n }",
"@Override\n public void onBindViewHolder(@NonNull ViewHolder holder, int position) {\n Log.d(TAG, \"onBindViewHolder\" + position);\n // Get the movie at the position\n Post post = posts.get(position);\n //Bind the movie data into the view holder\n holder.bind(post);\n }",
"public ViewHolder(View itemView) {\n super(itemView);\n imageView = itemView.findViewById(R.id.ivSomeImage);\n textView = itemView.findViewById(R.id.tvSomeText);\n }",
"@Override\n public void onBindViewHolder(ViewHolder holder, int position) {\n\n }",
"@Override\n public void onBindViewHolder(ViewHolder holder, final int position) { //Cuando un elemento hace binding\n // - get element from your dataset at this position\n // - replace the contents of the view with that element\n final Track track = values.get(position); //RECUPERA ELEMENTO QUE QUIERES VISUALIZAR\n final ViewHolder vh = holder; //HEMOS TENIDO QUE CREARLA PORQUE ESTA ARRIBA EN LA CLASE Y EN EL REMOVE NO LA PODRIAMOS UTILIZAR\n holder.title.setText(track.getTitle());\n holder.id.setText(track.getSinger());\n holder.title.setOnClickListener(new View.OnClickListener(){\n @Override\n public void onClick(View v) {\n Intent trackview = new Intent(activity.getApplicationContext(), TrackDetailActivity.class);\n trackview.putExtra(\"id\",track.getId());\n trackview.putExtra(\"title\", track.getTitle());\n trackview.putExtra(\"singer\", track.getSinger());\n activity.startActivity(trackview);\n }\n });\n }",
"protected void bindAnimation(V holder) {\n int adapterPosition = holder.getAdapterPosition();\n if (!isFirstOnly || adapterPosition > mLastPosition) {\n for (Animator anim : mAnimations.getAnimators(holder.itemView)) {\n anim.setDuration(mDuration).start();\n anim.setInterpolator(mInterpolator);\n }\n mLastPosition = adapterPosition;\n } else {\n ViewHelper.clear(holder.itemView);\n }\n }",
"public ViewHolder(View view) {\n super(view);\n ButterKnife.bind(this, view);\n\n\n launchesButton.setOnClickListener(v -> {\n Intent launches = new Intent(activity, LauncherLaunchActivity.class);\n launches.putExtra(\"launcherId\", items.get(getAdapterPosition()).getId());\n launches.putExtra(\"launcherName\", items.get(getAdapterPosition()).getName());\n activity.startActivity(launches);\n });\n infoButton.setOnClickListener(v -> openCustomTab(activity, mContext, items.get(getAdapterPosition()).getInfoUrl()));\n wikiButton.setOnClickListener(v -> openCustomTab(activity, mContext, items.get(getAdapterPosition()).getWikiUrl()));\n vehicleImage.setOnClickListener(v -> {\n Intent animateIntent = new Intent(activity, FullscreenImageActivity.class);\n animateIntent.putExtra(\"imageURL\", items.get(getAdapterPosition()).getImageUrl());\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n activity.startActivity(animateIntent, ActivityOptions.makeSceneTransitionAnimation(activity, vehicleImage, \"imageCover\").toBundle());\n } else {\n activity.startActivity(animateIntent);\n }\n });\n }",
"@Override\n public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {\n final LeaveHistoryModel route = filteredList.get(position);\n route.AdapterPosition = position;\n\n try {\n ((MyViewHolder) holder).bind(route, listener);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n }",
"@Override\n public void onBindViewHolder(PrimeNrHolder holder, int position) {\n PrimeNr primeNr = primeNrs.get(position);\n holder.bind(primeNr);\n }",
"@Override\n public void onBindViewHolder(@NonNull final ViewHolder holder, int position) {\n\n }",
"@Override\n public void onBindViewHolder(rViewHolder holder, int position)\n {\n ExtendedNewController c = this.mData.get(position);\n holder.textviewname.setText(c.getName());\n holder.textviewhost.setText(c.getHostname());\n holder.imageviewstatus.setImageResource(R.drawable.unknown);\n recyclerViewItemClickListener listener = new recyclerViewItemClickListener(c);\n holder.itemView.setOnClickListener(listener);\n c.setHolder(holder);\n c.getControllerStatus(); // async\n }",
"public ViewHolder(View itemView) {\n super(itemView);\n\n listName = (TextView) itemView.findViewById(R.id.listName);\n remainingItems = (TextView) itemView.findViewById(R.id.remainingItems);\n listButtonLayout = (LinearLayout) itemView.findViewById(R.id.listButtonLayout);\n btnView = (Button) listButtonLayout.findViewById(R.id.btnEditList);\n btnDeleteList = (Button) listButtonLayout.findViewById(R.id.btnDeleteList);\n\n\n }",
"@Override\n public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {\n MyViewHolder myHolder = (MyViewHolder)holder;\n myHolder.bindCheckoutToView(checkouts.get(position));\n }",
"@Override\n public void onBindViewHolder(ItemAdapter.ViewHolder holder, int position) {\n // Grab the item at the position\n // Get the data model based on position\n String item = items.get(position);\n // Bind the item at the specified view holder\n holder.bind(item);\n holder.removeItem();\n holder.attachActivity();\n }",
"@Override\n public void onBindViewHolder(final ViewHolder holder, int position) {\n holder.mIdView.setText(mValues.get(position).getTitle());\n holder.mContentView.setText(mValues.get(position).getDate());\n holder.itemView.setTag(mValues.get(position));\n holder.itemView.setOnClickListener(mOnClickListener);\n }",
"public ViewHolder (HourlyListItemBinding hourlyListItemBinding){\n super(hourlyListItemBinding.getRoot());\n this.hourlyListItemBinding = hourlyListItemBinding;\n }",
"@Override\n public final void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {\n position = holder.getAdapterPosition();\n if (position == RecyclerView.NO_POSITION) {\n return;\n }\n // Logger.w(\"QuickRecycleViewAdapter\", \"onBindViewHolder\", \"position_2 = \" + position);\n if (mHeaderFooterHelper != null) {\n if (mHeaderFooterHelper.isInHeader(position)\n || mHeaderFooterHelper.isInFooter(position, mAdapterManager.getItemSize())) {\n /** let head/footer fullspan in StaggeredGridLayoutManager\n * added in 1.5\n */\n ViewGroup.LayoutParams layoutParams = holder.itemView.getLayoutParams();\n if (layoutParams instanceof StaggeredGridLayoutManager.LayoutParams) {\n ((StaggeredGridLayoutManager.LayoutParams) layoutParams).setFullSpan(true);\n }\n return;\n }\n position -= mHeaderFooterHelper.getHeaderViewSize();\n }\n if (!(holder instanceof IRecyclerViewHolder)) {\n throw new RuntimeException(\"all quick adapter's viewHolder must implement\" +\n \" the interface IRecyclerViewHolder\");\n }\n //notify bind ViewHolder\n getSelectHelper().onBindViewHolder(holder);\n\n //not in header or footer populate it\n final T item = getItem(position);\n final int layoutId = ((IRecyclerViewHolder) holder).getLayoutId();\n final ViewHelper helper = ((IRecyclerViewHolder) holder).getViewHelper();\n\n onBindDataImpl(holder, position, item);\n\n if (getAdapterManager().getPostRunnableCallbacks() != null) {\n final int pos = position;\n for (final AdapterManager.IPostRunnableCallback<T> callback : getAdapterManager()\n .getPostRunnableCallbacks()) {\n holder.itemView.post(new Runnable() {\n @Override\n public void run() {\n callback.onPostCallback(pos, item, layoutId, helper);\n }\n });\n }\n }\n }",
"public ViewHolder (View view){\n super(view);\n jView = view;\n //tvJoin = (TextView) view.findViewById(R.id.tvGroup);\n tvGroupTitle = view.findViewById(R.id.tvGroupTitle);\n }",
"@Override\n public void onBindViewHolder(ViewHolder holder, final int position) {\n\n ViewVideoCardBinding binding = holder.cardBinding;\n\n\n //binding.setAvm(new ArticleViewModel(mArticles.get(position), mContext));\n\n\n VideoItem vidItem = mDataset.get(position);\n\n if (lastPosition != -5) {\n Animation animation;\n animation = AnimationUtils.loadAnimation(context,\n (position < lastPosition) ? R.anim.slide_down : R.anim.slide_up);\n holder.setAnimation(animation);\n }\n lastPosition = position;\n holder.bind(vidItem, this.context);\n\n /*holder.mTextView.setText(mDataset[position]);\n holder.mCardView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n String currentValue = mDataset[position];\n Log.d(\"CardView\", \"CardView Clicked: \" + currentValue);\n }\n });*/\n }",
"@Override\n public void onBindViewHolder(WashIronRecyclerViewHolders holder, int position) {\n data.Detail.Item item=items.get(position);\n holder.bind(item);\n\n holder.dryitem.setText(items.get(position).getItemName());\n holder.drycount.setText(String.valueOf(items.get(position).getItemcount()));\n holder.dryamount.setText(String.valueOf(items.get(position).getTotal()));\n\n }",
"@Override\n public void onBindViewHolder(@NonNull @NotNull ViewHolder holder, int position) {\n\n }",
"@Override\n public void onBindViewHolder(PaperHolder holder, int position) {\n Paper paper = mPapers.get(position);\n holder.bindPaper(paper, position);\n }",
"@Override\n public void onBindViewHolder(ViewHolder holder, int position) {\n // - get element from your dataset at this position\n // - replace the contents of the view with that element\n holder.teamAbbreviation.setText(mDataset.get(position).getTeamAbbrevation());\n holder.numPlayers.setText(String.valueOf(mDataset.get(position).getNumPlayers()));\n holder.totalSalary.setText(String.valueOf(mDataset.get(position).getTotalSalary()));\n holder.itemView.setTag(mDataset.get(position).getPlayerList());\n }",
"@Override\n public void onBindViewHolder(final ViewHolder holder, final int position) {\n // - get element from data set at this position\n // - replace the contents of the view with that element\n\n final Food food = getFood(position);\n holder.name.setText(food.name);\n holder.info.setText(String.valueOf(food.info));\n holder.img.setImageResource(food.resId);\n holder.layout.setOnClickListener(new OnClickListener() {\n @Override\n public void onClick(View v) {\n img.setImageResource(food.resId);\n info.setText(food.info);\n\n // gets the recycler position\n currItem = holder.getAdapterPosition();\n\n // intent passes the value of currItem to the activities\n Intent intent = new Intent(\"pass-food\");\n intent.putExtra(\"food\",currItem);\n LocalBroadcastManager.getInstance(context).sendBroadcast(intent);\n }\n });\n }",
"public OnClickListener(ViewHolder holder){\t\t\t\n\t\t\tmViewHolder = holder;\n\t\t}",
"@Override\n\t\t\tpublic ViewHolder onCreateViewHolder(View itemView) {\n\t\t\t\treturn new MylisViewHoder(itemView);\n\t\t\t}",
"@Override\n public void onBindViewHolder(PlayerViewHolder holder, int position) {\n Player player = playerList.get(position);\n\n // Binding the data with the ViewHolder views\n holder.tvName.setText(player.getName());\n holder.tvAge.setText(player.getAge());\n holder.ivPhoto.setImageDrawable(context.getResources().getDrawable(player.getImage()));\n }",
"@Override\n public void onBindViewHolder(final ViewHolder holder, int position) {\n holder.mItem = mValues.get(position);\n holder.mIdView.setText(mValues.get(position).mHangoutID);\n holder.mContentView.setText(mValues.get(position).mPrice);\n }",
"@Override\n public void bindView(View view, Context context, Cursor cursor) {\n ViewHolder holder = (ViewHolder) view.getTag();\n\n /* Getting user details from cursor */\n String messageText = cursor.getString(holder.mTextIndex);\n Date dateSent = new Date(cursor.getInt(holder.mDateIndex));\n boolean isFromMember = cursor.getInt(holder.mIsFromMemberIndex) > 0;\n\n /* Setting user display name */\n holder.mTextView.setText(messageText);\n\n if (isFromMember) {\n ((LinearLayout) view).setGravity(Gravity.LEFT);\n holder.mImageView.setVisibility(View.VISIBLE);\n holder.mTextView.setBackgroundDrawable(context.getResources()\n .getDrawable(R.drawable.textview_chat_rounded_from));\n } else {\n ((LinearLayout) view).setGravity(Gravity.RIGHT);\n holder.mImageView.setVisibility(View.GONE);\n holder.mTextView.setBackgroundDrawable(context.getResources()\n .getDrawable(R.drawable.textview_chat_rounded_to));\n }\n\n /* Setting avatar */\n if (mMemberAvatar != null && isFromMember) {\n holder.mImageView.setImageBitmap(mMemberAvatar);\n }\n }",
"@Override\n public void onBindViewHolder(ViewHolder holder, int position) {\n //get the data according to mposition\n Tweet tweet=mTweets.get(position);\n\n //populate the views according to this data\n holder.tvUsername.setText(tweet.user.name);\n holder.tvBody.setText(tweet.body);\n\n }",
"@Override\n public void onBindViewHolder(MyViewHolder holder, int position) {\n // - get element from your dataset at this position\n // - replace the contents of the view with that element\n\n MyPlace place = mDataset.get(position);\n\n holder.bind(activity,place,itemClicked,position);\n //https://www.google.com/maps/place/?q=place_id:\n }",
"@Override\n public void onBindViewHolder(ViewHolder holder, final int position) {\n // - get element from your dataset at this position\n // - replace the contents of the view with that element\n\n Flat flat = mFlatListFiltered.get(position);\n holder.bind(flat);\n String minUrl=flat.getMinUrl();\n\n\n\n Glide\n .with(mContext)\n .load(minUrl)\n .into(holder.flatImage);\n\n }",
"public ViewHolder(View itemView) {\n super(itemView);\n tvNature = (TextView)itemView.findViewById(R.id.item_name);\n tvAmountNature = (TextView)itemView.findViewById(R.id.item_amount);\n }",
"@Override\n public void onBindViewHolder(ViewHolder holder, int position) {\n // - get element from your dataset at this position\n // - replace the contents of the view with that element\n\n // Individually handles each Contact in the contactList\n LeaderEntry currentEntry = leaderList.get(position);\n\n // Extracts the name of the Contact\n TextView name = holder.mTextViewName.findViewById(R.id.textView_Name);\n name.setText(currentEntry.getLeaderName());\n\n // Extracts the phone number of the Contact\n TextView number = holder.mTextViewName.findViewById(R.id.textView_Score);\n number.setText(currentEntry.getHighScore());\n\n }",
"@NonNull\n @Override\n public View getView(final int position, final View convertView, @NonNull final ViewGroup parent) {\n return mDataBinder.bind(position, getItem(position),\n convertView == null ? mViewInflater.inflate(parent): convertView);\n }",
"private void bindView() {\n\n\t\tfindViewById(R.id.issue_feedback_container).addOnLayoutChangeListener(\n\t\t\t\tnew OnLayoutChangeListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onLayoutChange(View v, int left, int top,\n\t\t\t\t\t\t\tint right, int bottom, int oldLeft, int oldTop,\n\t\t\t\t\t\t\tint oldRight, int oldBottom) {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\tint addItem = bottom - oldBottom;\n\t\t\t\t\t\tif (addItem > 0 && oldBottom > 0) {\n\t\t\t\t\t\t\tScrollView scrollView = (ScrollView) findViewById(R.id.container);\n\t\t\t\t\t\t\tLog.i(TAG, \"deltaHeight=\" + addItem + \";bottom=\"\n\t\t\t\t\t\t\t\t\t+ bottom + \";oldBottom=\" + oldBottom);\n\t\t\t\t\t\t\tscrollView.scrollBy(0, addItem);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\tissueDescView = (UserInputItemView) findViewById(R.id.issue_desc);\n\t\tissueTopic = (EditItemView) findViewById(R.id.issue_topic);\n\t\taddFile = (AddItemView) findViewById(R.id.issue_add_file);\n\t\tsolverMan = (ChooseItemView) findViewById(R.id.issue_choose_deliver);\n\t\tsolverMan.setContent(\"选择解决人\");\n\t\taddPerson = (AddItemView) findViewById(R.id.issue_add_person);\n\t\taddPerson.setVisibility(View.GONE);\n\t\tsolverMan.setChooseItemClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tgetDeliveryList(true, solverMan);\n\t\t\t}\n\t\t});\n\n\t\taddFile.setOnCreateItemViewListener(addfileListenr);\n\t\taddPerson.setOnCreateItemViewListener(addfoucsPersonCreateListenr);\n\n\t}",
"@Override\n public void onBindViewHolder(ItemViewHolder holder, int position)\n {\n Item item = itemList.get(position);\n holder.bindItem(item);\n }",
"public ViewHolder(View view) {\n super(view);\n mView = view;\n mIdView = (TextView) view.findViewById(R.id.item_number);\n mContentView = (TextView) view.findViewById(R.id.content);\n }",
"public ViewHolder(View itemView) {\n super(itemView);\n\n mView = itemView;\n mUsernameTv = (TextView) mView.findViewById(R.id.usernameTv);\n mEmailTv = (TextView) mView.findViewById(R.id.emailTv);\n mFriendIv = (ImageView) mView.findViewById(R.id.friendIv);\n mYouTv = (TextView) mView.findViewById(R.id.youTv);\n\n mIsFriend = false;\n }",
"@Override\n public void onBindViewHolder(ViewHolder itemViewHolder, int position) {\n }",
"@Override\n public void onBindViewHolder(AttractionViewHolder holder, int position) {\n // Get the current Attraction object by its position in the ArrayList\n Attraction currentAttraction = mAttractions.get(position);\n\n // Bind the custom onItemClickListener to the current Attraction object\n holder.bind(currentAttraction, mOnItemClickListener);\n }",
"@Override\n public void onBindViewHolder(Chat_ViewGroupSwipeAdapter.ViewHolder viewHolder, final int position)\n {\n\n\n }",
"public ViewHolder(View itemView) {\n // Stores the itemView in a public final member variable that can be used\n // to access the context from any ViewHolder instance.\n super(itemView);\n int position = getAdapterPosition();\n\n\n nameTextView = (TextView) itemView.findViewById(R.id.contact_name);\n messageButton = (Button) itemView.findViewById(R.id.message_button);\n messageButton.setOnClickListener(new ButtonClick(this));\n itemView.setOnClickListener(this);\n\n }",
"@Override\n public void bind(@NonNull ViewHolder viewHolder, int position) {\n TextView nomePosto = viewHolder.itemView.findViewById(R.id.vl_nomeParceiroItem);\n TextView endereco = viewHolder.itemView.findViewById(R.id.vl_enderecoDenunciaItem);\n TextView bairro = viewHolder.itemView.findViewById(R.id.vl_bairroDenunciaItem);\n TextView cidade = viewHolder.itemView.findViewById(R.id.vc_cidadeDenunciaItem);\n ImageView bandeiraIcone = viewHolder.itemView.findViewById(R.id.im_bandeiraDenunciaItem);\n TextView cnpj = viewHolder.itemView.findViewById(R.id.vl_cnpjDenunciaItem);\n TextView reclacamacoes = viewHolder.itemView.findViewById(R.id.vl_totalReclamacoes);\n\n\n //CARREGANDO IMAGEM DAS BANDEIRAS TESTANDO PARA CADA UM DOS POSTOS\n if (posto.getBandeira().equalsIgnoreCase(\"PETROBRAS\")) {\n Picasso.get()\n .load(\"https://firebasestorage.googleapis.com/v0/b/kartel-59019.appspot.com/o/images%2FbandeiraPetrobras.jpg?alt=media&token=d53b4fee-d299-4422-a9e7-43d034613ec5\")\n .into(bandeiraIcone);\n }\n if (posto.getBandeira().equalsIgnoreCase(\"IPIRANGA\")) {\n Picasso.get()\n .load(\"https://firebasestorage.googleapis.com/v0/b/kartel-59019.appspot.com/o/images%2FbandeiraIpiranga.jpg?alt=media&token=b0c55805-61cc-45f2-886f-51be07bb0fed\")\n .into(bandeiraIcone);\n }\n if (posto.getBandeira().equalsIgnoreCase(\"SHELL\")) {\n Picasso.get()\n .load(\"https://firebasestorage.googleapis.com/v0/b/kartel-59019.appspot.com/o/images%2FbandeiraShell.jpg?alt=media&token=4874b289-f988-4dce-aa09-7011f0e1db9e\")\n .into(bandeiraIcone);\n }\n if (posto.getBandeira().equalsIgnoreCase(\"MEGAPETRO\")) {\n Picasso.get()\n .load(\"https://firebasestorage.googleapis.com/v0/b/kartel-59019.appspot.com/o/images%2FbandeiraMegapetro.jpg?alt=media&token=71eed8b5-05f4-4e81-9a40-e4081bcf8de6\")\n .into(bandeiraIcone);\n }\n if (posto.getBandeira().equalsIgnoreCase(\"BRANCA\")) {\n Picasso.get()\n .load(\"https://firebasestorage.googleapis.com/v0/b/kartel-59019.appspot.com/o/images%2FbandeiraBranca.jpg?alt=media&token=bee27663-f1a9-48bc-9243-6856f95929f7\")\n .into(bandeiraIcone);\n }\n\n //POPULANDO DADOS DO ITEM COM O RESTANTE DOS ATRIBUTOS\n nomePosto.setText(posto.getNome());\n endereco.setText(posto.getEndereco());\n bairro.setText(posto.getBairro());\n cidade.setText(posto.getCidade());\n cnpj.setText(posto.getCnpj());\n reclacamacoes.setText(\"\" + count);\n\n }",
"@Override\n public void onBindViewHolder(NumberViewHolder viewHolder, int position) {\n Log.d(TAG, \"#\" + position);\n\n\n dir = dirItems.get(position);\n\n // COMPLETED (12) Set the text of viewHolderIndex to \"ViewHolder index: \" + viewHolderCount\n // viewHolder.viewHolderIndex.setText(\"ViewHolder index: \" + viewHolderCount);\n viewHolder.txtJuduk.setText(dir.getTitle());\n\n String caret = dir.getVote_average();\n\n if (dir.getRelease_date().length() >= 4) {\n caret += \" / \" + dir.getRelease_date().substring(0, 4);\n }\n\n viewHolder.txtCaret.setText(caret);\n\n String image = \"http://image.tmdb.org/t/p/w342\" + dir.getPoster_path();\n // Log.e(\"image\", image);\n Picasso.with(activity)\n .load(image)\n .placeholder(R.drawable.poster_placeholder)\n .error(R.drawable.poster_placeholder)\n .into(viewHolder.imgDir);\n viewHolder.bind(position);\n }",
"@Override\n public void onBindViewHolder(HomeMenuViewHolder holder, int position)\n {\n if (position >= getItemCount())\n return;\n\n //bind view\n onBind = true;\n\n //get object\n HomeMenu homeMenu = homeMenus.get(position);\n\n //attach data\n holder.Name.setText(homeMenu.Name);\n\n //cek bitmap\n if (homeMenu.Icon != null)\n holder.Icon.setImageBitmap(homeMenu.Icon);\n\n //show / hide badge\n if (homeMenu.BadgeCounter <= 0)\n {\n holder.badgeHolder.setVisibility(View.GONE);\n }\n else\n {\n holder.badgeHolder.setVisibility(View.VISIBLE);\n holder.badgeValue.setText(Integer.toString(homeMenu.BadgeCounter));\n }\n\n //release bind\n onBind = false;\n }",
"@Override\n public void onBindViewHolder(@NonNull ActivityHolder holder, int position) {\n Activity activity = getItem(position);\n\n if (activity != null) {\n\n //Calculates the distance between user's location and a single activity\n //and presents in the row UI\n SimplePlace actLoc = activity.getSimplePlace();\n SimplePlace userLoc = getCurrUser().getCurrLocation();\n if(userLoc != null) {\n double dist = LocationUtils.calcDistance(actLoc.getLatitude(), actLoc.getLongitude(), userLoc.getLatitude(), userLoc.getLongitude());\n holder.binding.setDistance(new DecimalFormat(\"###.#\").format(dist));\n }\n else\n {\n holder.binding.setDistance(\"--\");\n }\n holder.binding.setActivity(activity);\n\n //Creates a listener for each activity row to move to the detailed activity\n ActivityListFragmentDirections.ActListToDetails action = ActivityListFragmentDirections.actListToDetails(activity, currUser);\n holder.itemView.setOnClickListener(Navigation.createNavigateOnClickListener(action)); //{\n }\n else {\n holder.binding.setActivity(null);\n }\n }",
"@Override\n public void onBindViewHolder(ViewHolder holder, int position) {\n // - get element from your dataset at this position\n // - replace the contents of the view with that element\n Picasso.get().load(mDataset[position].getImgUrl()).into(holder.imageView);\n }",
"@Override\n public void onBindViewHolder(ViewHolder holder, int position) {\n Context context = holder.mImageView.getContext();\n DetailItem tag = mTags.get(position);\n // set image\n int id = context.getResources().getIdentifier(\"_item_\" + tag.getItemId(), \"drawable\", context.getPackageName());\n Glide.with(context).load(id).into(holder.mImageView);\n // set name\n holder.mTextNameView.setText(tag.getItemName());\n // set description\n holder.mTextDescriptionView.setText(tag.getItemDescription());\n // set if item is on wishlist\n holder.mButtonAdd.setText(tag.isAdded() ? \"Added to wishlist\" : \"Add to wishlist\");\n }",
"@Override\n public void onBindViewHolder(ViewHolder viewHolder, final int position) {\n Log.d(TAG, \"Element \" + position + \" set.\");\n\n // Get element from your dataset at this position and replace the contents of the view\n // with that element\n //viewHolder.getTextView().setText(mDataSet[position]);\n TextDrawable drawable = TextDrawable.builder().buildRound(\"AB\", Color.RED);\n viewHolder.getIconView().setImageDrawable(drawable);\n viewHolder.getNameView().setText(items.get(position).getName());\n viewHolder.getEmailView().setText(items.get(position).getEmail());\n viewHolder.getJobTitleView().setText(items.get(position).getJobTitle());\n viewHolder.getLocationView().setText(items.get(position).getLocation());\n viewHolder.getExtView().setText(items.get(position).getExt());\n }",
"@Override\n public final void onBindViewHolder(RecyclerView.ViewHolder viewHolder, int position) {\n if (!(viewHolder instanceof MoreViewHolder)) {\n adapter.onBindViewHolder(viewHolder, position);\n } else {\n MoreViewHolder moreViewHolder = (MoreViewHolder) viewHolder;\n moreViewHolder.setRealContext(context);\n onBindFooterViewHolder(moreViewHolder,position);\n }\n }",
"private void setAdapter(){\n ArrayList<Veranstaltung>ver = new ArrayList<>(studium.getLVS());\n recyclerView = findViewById(R.id.rc);\n LinearLayoutManager manager = new LinearLayoutManager(this);\n recyclerView.setLayoutManager(manager);\n recyclerView.setHasFixedSize(true);\n adapter = new StudiumDetailsRecylerAdapter(ver);\n recyclerView.setAdapter(adapter);\n }",
"@Override\n public void onBindViewHolder(ViewHolder holder, int position) {\n // - get element from your dataset at this position\n // - replace the contents of the view with that element\n holder.mTextViewSongName.setText(mDataset.get(position).trackName);\n holder.mTextViewAlbumName.setText(mDataset.get(position).albumName);\n Picasso.with(mContext).\n load(mDataset.get(position).imageURL).\n into(holder.mImageView);\n\n }",
"@Override\n public void onBindViewHolder(final NewsCardViewHolder holder, int position) {\n // - get element from your dataset at this position\n // - replace the contents of the view with that element\n final AlMaghribNewsModelContainer bannerModel = mDataset.get(position);\n\n switch (holder.getItemViewType()) {\n case TYPE_VIDEO:\n final VideoNewsCardViewHolder videoNewsHolder = (VideoNewsCardViewHolder) holder;\n // TODO: something for play button click\n\n break;\n case TYPE_ARTICLE:\n break;\n }\n\n holder.mBannerImageView.setDefaultImageResId(R.drawable.love_notes_card);\n holder.mBannerImageView.setImageUrl(bannerModel.getBannerUrl(), mImageLoader);\n holder.mJournalTitleTextView.setText(bannerModel.getTitle());\n final String transitionName = mActivity.getString(R.string.seminar_banner_name) + position;\n ViewCompat.setTransitionName(holder.mBannerImageView, transitionName);\n\n final View.OnClickListener openArticleListener = new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n addNextFragment(holder.mBannerImageView, bannerModel);\n }\n };\n // set on click listener on view so we still get ripple effect\n holder.itemView.setOnClickListener(openArticleListener);\n holder.mReadMoreButton.setOnClickListener(openArticleListener);\n }",
"@Override\n public void onBindViewHolder(ViewHolder holder, int position) {\n // get type\n int type = holder.getItemViewType();\n SeparatorQuestion item = list.get(position);\n\n //set content list question\n final Question_Info colorObject = (Question_Info) item;\n holder.answer1.setText(colorObject.answer1);\n holder.tag_answer = colorObject.tag_answer;\n\n\n holder.cly.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n addItemFromInternet(colorObject.tag_answer);\n }\n });\n\n }",
"@Override\n public void onBindViewHolder(final ViewHolder holder, int position) {\n holder.mItem = mValues.get(position);\n holder.mIdView.setText(mValues.get(position).getmGuideTitle());\n holder.mContentView.setText(\"By: \" + mValues.get(position).getmGuideAuthor());\n String heroIconName = mValues.get(position).getmGuideHero().toLowerCase();\n setIcon(holder, heroIconName);\n\n holder.mView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if (null != mListener) {\n // Notify the active callbacks interface (the activity, if the\n // fragment is attached to one) that an item has been selected.\n mListener.onListFragmentInteraction(holder.mItem);\n }\n }\n });\n }",
"@Override\n public void onBindViewHolder(ViewHolder viewHolder, final int position) {\n\n // Get element from your dataset at this position and replace the contents of the view\n // with that element\n /*try {*/\n //viewHolder.getImageView().setImageBitmap(friends[position].convertPicture());\n viewHolder.getTextView().setText(friends[position].getName());\n /*} catch (SQLException e){\n e.printStackTrace();\n }*/\n }",
"public ViewHolder(View itemView) {\n super(itemView);\n hospname= itemView.findViewById(R.id.hospname);\n address= itemView.findViewById(R.id.hospaddress);\n rrr= itemView.findViewById(R.id.rrrtext);\n hospimage= itemView.findViewById(R.id.hospital_image);\n callambulance= itemView.findViewById(R.id.bookambulancebutton);\n getroom= itemView.findViewById(R.id.bookroombutton);\n /*price= itemView.findViewById(R.id.bedprice);\n cat= itemView.findViewById(R.id.bedcat);\n bedimage= itemView.findViewById(R.id.bedimage);*/\n\n\n }",
"@Override\n public void onBindViewHolder(OutfitViewHolder viewHolder, final int position) { }",
"@Override\n public void onBindViewHolder(MovieViewHolder holder, int position) {\n MovieModel movie = movieModelList.get(position);\n //holder.title.setText(movie.getTitle());\n\n Picasso.with(mContext)\n .load(\"http://image.tmdb.org/t/p/w185/\"+movie.getPoster_path())\n .into(holder.img);\n\n //holder.genre.setText(movie.getGenre());\n //holder.year.setText(movie.getYear());\n //holder.bind(position);\n }",
"public ViewHolder(View itemView) {\n super(itemView);\n if (mFromSearch) {\n mNameView = (TextView) itemView.findViewById(R.id.single_search_title);\n mTickerView = (TextView) itemView.findViewById(R.id.single_search_ticker);\n } else {\n mNameView = (TextView) itemView.findViewById(R.id.tv_name);\n mPriceView = (TextView) itemView.findViewById(R.id.tv_price);\n }\n itemView.setOnClickListener(this);\n }",
"@Override\n public void onBindViewHolder(ListsAdapter.ViewHolder vh, int i) {\n TodoList currentViewData = data.get(i);\n vh.todo.setText(currentViewData.getTitle() + \" (\" + currentViewData.getSize() + \")\");\n\n // sets up the listeners within them\n vh.itemView.setOnClickListener(listener);\n vh.itemView.setOnLongClickListener(longlistener);\n }",
"@Override\n public void onBindViewHolder(@NonNull SandwichHolder holder, int position) {\n Log.d(TAG, \"onBindViewHolder called!\");\n holder.bind(sandwichNames.get(position));\n }",
"@Override\n public void onBindViewHolder(DetailAdapter.ViewHolder holder, int position) {\n // - get element from your dataset at this position\n // - replace the contents of the view with that element\n //holder.mTextView.setText(mDataset[position]);\n holder.informacion.setText(mDataset[position]); //informacion es el dato que nos entrega el arreglo\n }",
"@Override\n public void onBindViewHolder(@NonNull AttendanceViewHolder holder, int position) {\n int mStudentId = mStudents.get(holder.getAdapterPosition()).getStudentId();\n\n /* set the name of the student in the list */\n holder.nameView.setText(mStudents.get(position).getName());\n\n\n LinearLayoutManager manager = new LinearLayoutManager(\n mContext, LinearLayoutManager.HORIZONTAL, false);\n\n holder.buttonsView.setLayoutManager(manager);\n\n AttendanceButtonsAdapter adapter = new AttendanceButtonsAdapter(\n mContext, mPeriodType, mStudentId, mPeriodId, mWeek, showAttendance);\n\n holder.buttonsView.setAdapter(adapter);\n\n }",
"@Override\r\n\t\tpublic void bindView(View view, Context context, Cursor c) {\n\t\t\tSystem.out.println(\"View ForecastAdapter\");\r\n\t\t\tImageView icon = (ImageView) view.findViewById(R.id.dDetailImage);\r\n\t\t\tTextView day = (TextView) view.findViewById(R.id.ddDayText);\r\n\t\t\tTextView condition = (TextView) view.findViewById(R.id.ddConditionText);\r\n\t\t\tTextView temp = (TextView) view.findViewById(R.id.ddTempCText);\r\n\r\n\t\t\ticon.setImageResource(WeatherUtil.getDetailForecastIcon(c.getString(4)));\r\n\t\t\tday.setText(c.getString(1));\r\n\t\t\tcondition.setText(c.getString(5));\r\n\t\t\ttemp.setText(c.getInt(2) + \"íŠ/\" + c.getInt(3) + \"íŠ\");\r\n\t\t}",
"@Override\n public void onBindViewHolder(Review model) {\n binding.setModel(model);\n binding.seriesTitle.setTitle(model);\n binding.reviewVote.setModel(model, 0);\n binding.executePendingBindings();\n }",
"public HolidayHolder(@NonNull View itemView) {\n super(itemView);\n ButterKnife.bind(this,itemView);\n }",
"@Override\n public void onBindViewHolder(AcontecimientoViewHolder viewHolder, int position) {\n PersonMin person = items.get(position);\n viewHolder.AcontecimientoBind(person);\n }"
] | [
"0.7367058",
"0.73352724",
"0.7275435",
"0.7117727",
"0.7097626",
"0.7007905",
"0.69889235",
"0.6973988",
"0.6918856",
"0.6904257",
"0.68515635",
"0.6850256",
"0.68192494",
"0.68094414",
"0.68093956",
"0.6789161",
"0.67536867",
"0.6735639",
"0.67354655",
"0.67263126",
"0.6694503",
"0.6647859",
"0.66340494",
"0.6626255",
"0.66149306",
"0.6608664",
"0.6593607",
"0.65842015",
"0.6581916",
"0.65755415",
"0.65723807",
"0.65518224",
"0.6535909",
"0.6534578",
"0.65179557",
"0.6517593",
"0.6511804",
"0.64890933",
"0.64769965",
"0.6475722",
"0.64575607",
"0.6454755",
"0.64534247",
"0.64526147",
"0.64516985",
"0.64439493",
"0.6442596",
"0.6433677",
"0.64328265",
"0.64180523",
"0.6417462",
"0.64068425",
"0.6389945",
"0.6389125",
"0.6380947",
"0.6380684",
"0.6375459",
"0.6374066",
"0.6359558",
"0.6358993",
"0.6344357",
"0.63433903",
"0.6339554",
"0.6334047",
"0.6328927",
"0.6326308",
"0.630523",
"0.6297628",
"0.62842274",
"0.627899",
"0.62768376",
"0.62759143",
"0.6254879",
"0.62466955",
"0.6245565",
"0.62327975",
"0.62305105",
"0.62222433",
"0.62198055",
"0.62195987",
"0.6213266",
"0.62108094",
"0.6209826",
"0.62085867",
"0.6199073",
"0.61980367",
"0.6194189",
"0.6191823",
"0.61900586",
"0.6189425",
"0.6188207",
"0.6176608",
"0.61757857",
"0.61752963",
"0.61696434",
"0.61688083",
"0.61681163",
"0.6165753",
"0.6160621",
"0.61602795",
"0.6159204"
] | 0.0 | -1 |
Devuelve la lista de ServicesFacades que se van a inspeccionar en busca de servicio. | private static String[] getServiceFacades() {
String[] facadePropertiesList = null;
try {
facadePropertiesList = ATUIUtils.getDefault().getString(ATUI_SERVICES_FACADE_LIST).trim().split(COMMA);
} catch (Exception e) {
e.printStackTrace();
}
return facadePropertiesList;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Programmatic\n public List<Class<?>> allServiceClasses() {\n List<Class<?>> serviceClasses = Lists\n .transform(this.servicesInjector.getRegisteredServices(), new Function<Object, Class<?>>(){\n public Class<?> apply(Object o) {\n return o.getClass();\n }\n });\n // take a copy, to allow eg I18nFacetFactory to add in default implementations of missing services.\n return Collections.unmodifiableList(Lists.newArrayList(serviceClasses));\n }",
"List<Service> services();",
"ImmutableList<T> getServices();",
"public java.util.List<go.micro.runtime.RuntimeOuterClass.Service> getServicesList() {\n if (servicesBuilder_ == null) {\n return java.util.Collections.unmodifiableList(services_);\n } else {\n return servicesBuilder_.getMessageList();\n }\n }",
"public java.util.List<go.micro.runtime.RuntimeOuterClass.Service> getServicesList() {\n if (servicesBuilder_ == null) {\n return java.util.Collections.unmodifiableList(services_);\n } else {\n return servicesBuilder_.getMessageList();\n }\n }",
"protected ServiceBundler getServices() {\n return services;\n }",
"ISet<Class<?>> collectAllTypeWiredServices();",
"@Override\r\n\tpublic List<sn.ucad.master.assurance.bo.Service> findAllService() {\n\t\treturn serviceRepository.findAll();\r\n\t}",
"public List<String> getAllServices() {\n List<String> allServices = new ArrayList<>();\n for (ServiceDescription service : serviceList.values()) {\n allServices.add(service.getServiceName());\n }\n return allServices;\n }",
"java.util.List<go.micro.runtime.RuntimeOuterClass.Service> \n getServicesList();",
"java.util.List<go.micro.runtime.RuntimeOuterClass.Service> \n getServicesList();",
"public void fetchServices() {\n serviciosTotales.clear();\n for (String serviceId : serviceList) {\n databaseServiceReference.child(serviceId).addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n Servicio servicioTemp = dataSnapshot.getValue(Servicio.class);\n serviciosTotales.add(servicioTemp);\n servicesAdapter.notifyDataSetChanged();\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n }\n\n\n }",
"public List<String> getServices() throws IOException;",
"go.micro.runtime.RuntimeOuterClass.Service getServices(int index);",
"go.micro.runtime.RuntimeOuterClass.Service getServices(int index);",
"public java.util.List<go.micro.runtime.RuntimeOuterClass.Service> getServicesList() {\n return services_;\n }",
"public java.util.List<go.micro.runtime.RuntimeOuterClass.Service> getServicesList() {\n return services_;\n }",
"public List<Class<?>> getAllModelServices() {\n\t\treturn ModelClasses.findModelClassesWithInterface(IServiceType.class);\n\t}",
"public ServiceCombo getServices()\n {\n return services;\n }",
"public Collection<Service> createServices();",
"public Services() {\n this.indexes = new ArrayList<Integer>();\n// this.indexes.add(ServiceTypes.NOSERVICES.getValue());\n this.services = new ArrayList<String>();\n// this.services.add(ServiceTypes.NOSERVICES.getKey());\n }",
"public List<CatalogService> getService(String service);",
"public go.micro.runtime.RuntimeOuterClass.Service getServices(int index) {\n return services_.get(index);\n }",
"public go.micro.runtime.RuntimeOuterClass.Service getServices(int index) {\n return services_.get(index);\n }",
"public List<ServicioEntity> getServicios() {\r\n return servicios;\r\n }",
"private Iterable<Service> loadServiceData() {\n return services;\n }",
"public ArrayList<Consulta> recuperaAllServicios() {\r\n\t\treturn servicioConsulta.recuperaAllServicios();\r\n\t}",
"Collection<Service> getAllSubscribeService();",
"public List<ServiceProvider> services() throws ConsulException {\n try {\n final Self self = self();\n final List<ServiceProvider> providers = new ArrayList<>();\n final HttpResp resp = Http.get(consul().getUrl() + EndpointCategory.Agent.getUri() + \"services\");\n final JsonNode obj = checkResponse(resp);\n for (final Iterator<String> itr = obj.fieldNames(); itr.hasNext(); ) {\n final JsonNode service = obj.get(itr.next());\n final ServiceProvider provider = new ServiceProvider();\n provider.setId(service.get(\"ID\").asText());\n provider.setName(service.get(\"Service\").asText());\n provider.setPort(service.get(\"Port\").asInt());\n // Map tags\n String[] tags = null;\n if (service.has(\"Tags\") && service.get(\"Tags\").isArray()) {\n final ArrayNode arr = (ArrayNode)service.get(\"Tags\");\n tags = new String[arr.size()];\n for (int i = 0; i < arr.size(); i++) {\n tags[i] = arr.get(i).asText();\n }\n }\n provider.setTags(tags);\n provider.setAddress(self.getAddress());\n provider.setNode(self.getNode());\n providers.add(provider);\n }\n return providers;\n } catch (IOException e) {\n throw new ConsulException(e);\n }\n }",
"public Map<String, List<String>> getServices();",
"public Iterator getServices() {\r\n\t\treturn services == null ? EmptyStructures.EMPTY_ITERATOR : new ReadOnlyIterator(services.values());\r\n\t}",
"public List<String> getServices() {\n return runtimeClient.getServices();\n }",
"public ArrayList<Servicio> cargarServicios() throws CaException {\n try {\n String strSQL = \"SELECT k_idservicio, f_fycentrada, f_fycsalida, q_valorapagar, k_idvehiculo FROM servicio\";\n Connection conexion = ServiceLocator.getInstance().tomarConexion();\n PreparedStatement prepStmt = conexion.prepareStatement(strSQL);\n ResultSet rs = prepStmt.executeQuery();\n while (rs.next()) {\n Servicio servicio1 = new Servicio();\n servicio1.setK_idservicio(rs.getInt(1));\n servicio1.setF_fycentrada(rs.getString(2));\n servicio1.setF_fycsalida(rs.getString(3));\n servicio1.setQ_valorapagar(rs.getInt(4));\n servicio1.setK_idvehiculo(rs.getInt(5));\n\n servicios.add(servicio1);\n }\n } catch (SQLException e) {\n throw new CaException(\"ServicioDAO\", \"No pudo recuperar el servicio\" + e.getMessage());\n }finally {\n ServiceLocator.getInstance().liberarConexion();\n }\n return servicios;\n }",
"public java.util.List<? extends go.micro.runtime.RuntimeOuterClass.ServiceOrBuilder> \n getServicesOrBuilderList() {\n if (servicesBuilder_ != null) {\n return servicesBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(services_);\n }\n }",
"public java.util.List<? extends go.micro.runtime.RuntimeOuterClass.ServiceOrBuilder> \n getServicesOrBuilderList() {\n if (servicesBuilder_ != null) {\n return servicesBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(services_);\n }\n }",
"public List<Servicio> findAll();",
"public ServiceType[] getAllServices() throws LoadSupportedServicesException{\r\n\t\tthis.loadServices();\r\n\t\treturn this.services;\r\n\t}",
"public go.micro.runtime.RuntimeOuterClass.Service getServices(int index) {\n if (servicesBuilder_ == null) {\n return services_.get(index);\n } else {\n return servicesBuilder_.getMessage(index);\n }\n }",
"public go.micro.runtime.RuntimeOuterClass.Service getServices(int index) {\n if (servicesBuilder_ == null) {\n return services_.get(index);\n } else {\n return servicesBuilder_.getMessage(index);\n }\n }",
"public java.util.List<go.micro.runtime.RuntimeOuterClass.Service.Builder> \n getServicesBuilderList() {\n return getServicesFieldBuilder().getBuilderList();\n }",
"public java.util.List<go.micro.runtime.RuntimeOuterClass.Service.Builder> \n getServicesBuilderList() {\n return getServicesFieldBuilder().getBuilderList();\n }",
"public java.util.List<? extends go.micro.runtime.RuntimeOuterClass.ServiceOrBuilder> \n getServicesOrBuilderList() {\n return services_;\n }",
"public java.util.List<? extends go.micro.runtime.RuntimeOuterClass.ServiceOrBuilder> \n getServicesOrBuilderList() {\n return services_;\n }",
"java.util.List<? extends go.micro.runtime.RuntimeOuterClass.ServiceOrBuilder> \n getServicesOrBuilderList();",
"java.util.List<? extends go.micro.runtime.RuntimeOuterClass.ServiceOrBuilder> \n getServicesOrBuilderList();",
"private void loadComponentServices(ServiceVO service){\n\t\tfor(ComponentServiceVO compSrvc : service.getComponents()){\n\t\t\tif(\"Y\".equals(compSrvc.getEnabled())){\n\t\t\t\tif(\"Y\".equals(compSrvc.getEnabledUddi())){\n\t\t\t\t\t//get web services information from UDDI\n\t\t\t\t\tlogger.debug(\"Cargando información del Servicio {0} - {0} vía UDDI -> {0}\", service.getId(), service.getDescription(), \n\t\t\t\t\t\tgetWSInformationFromUDDI(compSrvc));\n\t\t\t\t}else if(\"N\".equals(compSrvc.getEnabledUddi())){\n\t\t\t\t\t//get web services information from WSDL\n\t\t\t\t\tMap<String, String> wsdlValues = getWSInformationFromWSDL(compSrvc.getUddiWsdl(), compSrvc.getPortTypeName(), compSrvc.getMethodName());\n\t\t\t\t\t//set all values to object\n\t\t\t\t\tsetWsdlValues(wsdlValues, compSrvc);\n\t\t\t\t\tlogger.debug(\"Cargando información del Servicio {0} - {0} vía WSDL -> {0}\", compSrvc.getId(), compSrvc.getDescription(),\n\t\t\t\t\t\t!wsdlValues.isEmpty());\n\t\t\t\t}else{\n\t\t\t\t\tlogger.error(\"Opción {0} de WSDL_UDDI no reconocida\", compSrvc.getEnabledUddi());\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tlogger.debug(\"El servicio (Salida) {0} está deshabilitado, no se ha cargado la configuración de WSDL y UDDI\");\n\t\t\t}\n\t\t}\n\t}",
"public void testServiceList()\n {\n ServiceList services = serviceSetup();\n\n ServiceIterator it = services.createServiceIterator();\n int i = 0;\n try\n {\n while (it.hasNext())\n {\n // Increment the service counter\n i++;\n // Get our next service\n ServiceExt service = (ServiceExt) it.nextService();\n log(\"******************************************************************\");\n log(\"* Services - Counter: (\" + i + \")\");\n dumpService(service);\n\n ServiceDetailsHandle[] handles = sidb.getServiceDetailsByService(service.getServiceHandle());\n\n ServiceDetailsExt[] details = new ServiceDetailsExt[handles.length];\n for (int j = 0; j < handles.length; j++)\n {\n details[j] = sidb.createServiceDetails(handles[j]);\n dumpServiceDetails(details[j]);\n assertEquals(\"ServiceDetails' Service does not match expected value\", service,\n details[j].getService());\n assertEquals(\"ServiceType does not match\", service.getServiceType(), details[j].getServiceType());\n }\n log(\"******************************************************************\");\n }\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n }",
"public void setServices(List<AService> services) {\n this.services = services;\n }",
"io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsServiceList getServiceList();",
"@Override\n public Collection<Class<? extends IFloodlightService>> getModuleServices() {\n \t Collection<Class<? extends IFloodlightService>> l = new ArrayList<Class<? extends IFloodlightService>>();\n l.add(IPktinHistoryService.class);\n return l;\n }",
"@GetMapping(\"/costo-servicios\")\n @Timed\n public List<CostoServicioDTO> getAllCostoServicios() {\n log.debug(\"REST request to get all CostoServicios\");\n return costoServicioService.findAll();\n }",
"public static List<String> getServiceNames(Definition definition) {\n Map map = definition.getAllServices();\n List<QName> serviceQnames = new ArrayList<QName>(map.keySet());\n List<String> serviceNames = new ArrayList<String>();\n for (QName qName : serviceQnames) {\n serviceNames.add(qName.getLocalPart());\n }\n return serviceNames;\n }",
"public Map<String,Cab2bService> getServices() throws Exception {\n \t\n Map<String,Cab2bService> services = new HashMap<String,Cab2bService>();\n \tDefaultHttpClient httpclient = new DefaultHttpClient();\n \n try {\n String queryURL = GSSProperties.getCab2b2QueryURL()+\"/services\";\n HttpGet httpget = new HttpGet(queryURL);\n ResponseHandler<String> responseHandler = new BasicResponseHandler();\n String result = httpclient.execute(httpget, responseHandler);\n JSONObject json = new JSONObject(result);\n \n \tfor(Iterator i = json.keys(); i.hasNext(); ) {\n \t\tString modelGroupName = (String)i.next();\n \t\tJSONArray urls = json.getJSONArray(modelGroupName);\n \t\tfor(int k=0; k<urls.length(); k++) {\n \t\t JSONObject jsonService = urls.getJSONObject(k);\n \t\t \n \t\t String serviceURL = jsonService.getString(\"url\");\n \t\t \n \t\t boolean searchDefault = false;\n \t\t if (jsonService.has(\"searchDefault\")) {\n \t\t searchDefault = \"true\".equals(jsonService.getString(\"searchDefault\"));\n \t\t }\n \t\t \n \t\t Cab2bService service = new Cab2bService(\n \t\t serviceURL, modelGroupName, searchDefault);\n \t\t \n \t\t services.put(serviceURL, service);\n \t\t}\n \t}\n }\n finally {\n \thttpclient.getConnectionManager().shutdown();\n }\n \n\t\tlog.info(\"Retrieved \" + services.size() + \" services from caB2B\");\n return services;\n }",
"public void getServicios() {\n\t\tjs.executeScript(\"arguments[0].click();\", cuadradito);\n\t\tinputSearch.sendKeys(\"Servicio\");\n\t\tjs.executeScript(\"arguments[0].click();\", servicios);\n\t}",
"public go.micro.runtime.RuntimeOuterClass.ServiceOrBuilder getServicesOrBuilder(\n int index) {\n return services_.get(index);\n }",
"public go.micro.runtime.RuntimeOuterClass.ServiceOrBuilder getServicesOrBuilder(\n int index) {\n return services_.get(index);\n }",
"public List<ServicioTicket> obtenerTodosLosServiciosDeTicket() {\n return this.servicioTicketFacade.findAll();\n }",
"public ServiceReference[] getRegisteredServices()\n {\n Object sm = System.getSecurityManager();\n\n if (sm != null)\n {\n ServiceReference[] refs = getFramework().getBundleRegisteredServices(this);\n\n if (refs == null)\n {\n return refs;\n }\n\n List result = new ArrayList();\n\n for (int i = 0; i < refs.length; i++)\n {\n try\n {\n ((SecurityManager) sm).checkPermission(new ServicePermission(\n refs[i], ServicePermission.GET));\n\n result.add(refs[i]);\n }\n catch (Exception ex)\n {\n // Silently ignore.\n }\n }\n\n if (result.isEmpty())\n {\n return null;\n }\n\n return (ServiceReference[]) result.toArray(new ServiceReference[result.size()]);\n }\n else\n {\n return getFramework().getBundleRegisteredServices(this);\n }\n }",
"public List<InfoServicio> getInfoServicios(){\n\t\treturn infoServicios;\n\t}",
"public List<ApiDAOFactory> getDSPluginService(String type) {\n /**\n * List of DAO service implementations of T class.\n */\n List<ApiDAOFactory> apiDAOFactories = new ArrayList<>();\n\n for (Map.Entry<String, ModuleLayer> layer : DemoPluginLifecycleListener.getModuleLayers().entrySet()) {\n ServiceLoader.load(layer.getValue(), ApiDAOFactory.class)\n .stream()\n .map(ServiceLoader.Provider::get)\n .filter(d -> d.getApiDAO().accept(type))\n .forEach(apiDAOFactories::add);\n }\n\n return apiDAOFactories;\n }",
"net.zyuiop.ovhapi.api.objects.services.Service getServiceNameServiceInfos(java.lang.String serviceName) throws java.io.IOException;",
"go.micro.runtime.RuntimeOuterClass.ServiceOrBuilder getServicesOrBuilder(\n int index);",
"go.micro.runtime.RuntimeOuterClass.ServiceOrBuilder getServicesOrBuilder(\n int index);",
"public List<ServiceInstance> lookupInstances(String serviceName);",
"@Nullable\n public List<BluetoothGattService> getServices() {\n BleMultiConnector bleMultiConnector = this.bleMultiConnector;\n if (bleMultiConnector == null) {\n return null;\n }\n if (address == null) {\n return null;\n }\n return bleMultiConnector.getServices(address);\n }",
"private static ArrayList<ServiceConnector> loadServiceConnectors(Config conf, boolean timingMode,\n\t\t\tboolean debugMode) {\n\t\tArrayList<ServiceConnector> connectors = new ArrayList<ServiceConnector>();\n\t\ttry {\n\t\t\tJSONArray apis = (JSONArray) conf.getParam(\"apis\");\n\t\t\tfor (Object api : apis) {\n\t\t\t\tif (api instanceof JSONObject && ((JSONObject) api).has(\"type\") && ((JSONObject) api).has(\"key\")) {\n\t\t\t\t\tString apiType = ((JSONObject) api).getString(\"type\");\n\t\t\t\t\tString apiKey = ((JSONObject) api).getString(\"key\");\n\t\t\t\t\tLOGGER.info(String.format(\"Loading connector type %s with API key %s\", apiType, apiKey));\n\t\t\t\t\tJSONObject params = null;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tparams = ((JSONObject) api).getJSONObject(\"params\");\n\t\t\t\t\t\tLOGGER.info(\"API has optional params: \" + params);\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tLOGGER.info(\"API has no optional params defined.\");\n\t\t\t\t\t}\n\t\t\t\t\tconnectors.add(\n\t\t\t\t\t\t\tServiceConnectorFactory.getServiceConnector(apiType, apiKey, timingMode, params, LOGGER));\n\t\t\t\t} else {\n\t\t\t\t\tLOGGER.warning(\"Invalid API specification: \" + api);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (ClassCastException e) {\n\t\t\tString errorMsg = \"Invalid configuration of APIs: \" + e.getMessage();\n\t\t\tprintError(errorMsg, null, 1, debugMode, e);\n\t\t}\n\t\treturn connectors;\n\t}",
"public Map listServices() throws IOException\n\t{\n\t\treturn request(GET, address(null, null));\n\t}",
"private void getServiceClasses(Class<?> service, Set<ProviderClass> sp) {\n LOGGER.log(Level.CONFIG, \"Searching for providers that implement: \" + service);\n Class<?>[] pca = ServiceFinder.find(service, true).toClassArray();\n for (Class pc : pca) {\n if (constrainedTo(pc)) {\n LOGGER.log(Level.CONFIG, \" Provider found: \" + pc);\n }\n }\n // Add service-defined providers to the set after application-defined\n for (Class pc : pca) {\n if (constrainedTo(pc)) {\n sp.add(new ProviderClass(pc, true));\n }\n }\n }",
"public ArrayList<String> DFGetServiceList() {\n return DFGetAllServicesProvidedBy(\"\");\n }",
"public static void loadServices(DAOFactory daoFactory, HttpServletRequest req) {\r\n ServiceDAO serviceDAO = daoFactory.getServiceDAO();\r\n ArrayList<Service> services = serviceDAO.getAllServices();\r\n req.getSession().setAttribute(Command.SERVICES, services);\r\n }",
"public List<Service> getService() {\n\t\treturn ServiceInfo.listService;\n\t}",
"public List/*WsCompileEditorSupport.ServiceSettings*/ getServices();",
"public void setServicios(List<ServicioEntity> servicios) {\r\n this.servicios = servicios;\r\n }",
"public void updateServiceNameList(){\n for(String key: serviceList.keySet()){\n serviceNameList.put(key, serviceList.get(key).getServiceName());\n }\n }",
"Set<ServiceProducer> getAllServiceProviders();",
"public ArrayList<FormularioServ> listaFServActivos(){\n\t\tArrayList<FormularioServ> listFServ = new ArrayList<FormularioServ>();\n\t\ttry{\n\t\t\tc = PoolConexion.getConnection();\n\t\t\tps = c.prepareStatement(\"select * from public.\\\"formularioServ\\\" where estado<>3\", ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE, ResultSet.HOLD_CURSORS_OVER_COMMIT);\n\t\t\trs = ps.executeQuery();\n\t\t\twhile(rs.next()){\n\t\t\t\tFormularioServ Fserv = new FormularioServ();\n\t\t\t\tFserv.setIdFormulario(rs.getInt(\"idFormulario\"));\n\t\t\t\tFserv.setIdServ(rs.getInt(\"idServ\"));\n\t\t\t\tFserv.setNombreUsuario(rs.getString(\"nombreUsuario\"));\n\t\t\t\tFserv.setEmail(rs.getString(\"email\"));\n\t\t\t\tFserv.setCuerpoEmail(rs.getString(\"cuerpoEmail\"));\n\t\t\t\tFserv.setNumerotelefono(rs.getString(\"numerotelefono\"));\n\t\t\t\tFserv.setfCreacion(rs.getTimestamp(\"fcreacion\"));\n\t\t\t\tFserv.setEstado(rs.getInt(\"estado\"));\n\t\t\t\t\n\t\t\t\tlistFServ.add(Fserv);\n\t\t\t}\n\t\t}\n\t\tcatch (Exception e){\n\t\t\tSystem.out.println(\"DATOS: ERROR EN LISTAR Formularios \"+ e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally{\n\t\t\ttry {\n\t\t\t\tif(rs != null){\n\t\t\t\t\trs.close();\n\t\t\t\t}\n\t\t\t\tif(ps != null){\n\t\t\t\t\tps.close();\n\t\t\t\t}\n\t\t\t\tif(c != null){\n\t\t\t\t\tPoolConexion.closeConnection(c);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn listFServ;\n\t}",
"@Override\n\tpublic List<ServiceFee> getAllServiceByStatus() {\n\t\treturn servicefeerepo.getAllServiceByStatus();\n\t}",
"@Override\n public List<ServiceEndpoint> listServiceEndpoints() {\n return new ArrayList<>(serviceEndpoints.values());\n }",
"public List<Service> findAll();",
"private List<ServiceDTO> getCustomizedConfigService() {\n String configServices = System.getProperty(\"apollo.configService\");\n if (Strings.isNullOrEmpty(configServices)) {\n // 2. Get from OS environment variable\n configServices = System.getenv(\"APOLLO_CONFIGSERVICE\");\n }\n if (Strings.isNullOrEmpty(configServices)) {\n // 3. Get from server.properties\n configServices = Foundation.server().getProperty(\"apollo.configService\", null);\n }\n\n if (Strings.isNullOrEmpty(configServices)) {\n return null;\n }\n\n logger.warn(\"Located config services from apollo.configService configuration: {}, will not refresh config services from remote meta service!\", configServices);\n\n // mock service dto list\n String[] configServiceUrls = configServices.split(\",\");\n List<ServiceDTO> serviceDTOS = Lists.newArrayList();\n\n for (String configServiceUrl : configServiceUrls) {\n configServiceUrl = configServiceUrl.trim();\n ServiceDTO serviceDTO = new ServiceDTO();\n serviceDTO.setHomepageUrl(configServiceUrl);\n serviceDTO.setAppName(ServiceNameConsts.APOLLO_CONFIGSERVICE);\n serviceDTO.setInstanceId(configServiceUrl);\n serviceDTOS.add(serviceDTO);\n }\n\n return serviceDTOS;\n }",
"public static void listImageIOServices() {\n\t\tIIORegistry registry = IIORegistry.getDefaultInstance();\n\t\tlogger.info(\"ImageIO services:\");\n\t\tIterator<Class<?>> cats = registry.getCategories();\n\t\twhile (cats.hasNext()) {\n\t\t\tClass<?> cat = cats.next();\n\t\t\tlogger.info(\"ImageIO category = \" + cat);\n\n\t\t\tIterator<?> providers = registry.getServiceProviders(cat, true);\n\t\t\twhile (providers.hasNext()) {\n\t\t\t\tObject o = providers.next();\n\t\t\t\tlogger.debug(\"ImageIO provider of type \" + o.getClass().getCanonicalName() + \" in \"\n\t\t\t\t\t\t+ o.getClass().getClassLoader());\n\t\t\t}\n\t\t}\n\t}",
"@GetMapping(value = {\"/getAllOfferedServices\", \"/getAllOfferedServices/\"})\n\tpublic List<OfferedServiceDto> getAllOfferedServices() {\n\t\tList<OfferedServiceDto> offeredServiceDtos = new ArrayList<>();\n\t\tfor (OfferedService offeredService: offeredServiceService.getAllOfferedServices()) {\n\t\t\tofferedServiceDtos.add(convertToDto(offeredService));\n\t\t}\n\t\treturn offeredServiceDtos;\n\t}",
"@Override\n public Set<Class<?>> getClasses() {\n HashSet h = new HashSet<Class<?>>();\n h.add(AffirmationService.class );\n return h;\n }",
"public Set<ServiceName> getSet() {\n return new HashSet<ServiceName>(set);\n }",
"@Override\n\tpublic Collection<Class<? extends IFloodlightService>> getModuleDependencies() {\n\t\tCollection<Class<? extends IFloodlightService>> l =\n\t\t new ArrayList<Class<? extends IFloodlightService>>();\n\t\t l.add(IFloodlightProviderService.class);\n\t\t l.add(ITopologyService.class);\n\t\t return l;\n\t}",
"public List<Service> list(){\r\n \tCriteria criteria = session.createCriteria(Service.class);\r\n \treturn criteria.list();\r\n }",
"private List getActiveServiceList(List servicesList) {\r\n\r\n\t\tList activeServiceList = new ArrayList();\r\n\t\t\r\n\t\tServiceVO activeService;\t\t\r\n\t\t\r\n\t\tif (servicesList != null) {\r\n\t\t\tfor (Iterator iterator = servicesList.iterator(); iterator.hasNext();) {\r\n\t\t\t\tactiveService = (ServiceVO) iterator.next();\r\n\t\t\t\tif (activeService.getStatus() != null) {\r\n\t\t\t\t\tif (activeService.getStatus().trim().equalsIgnoreCase(\"Ativado\")) {\r\n\t\t\t\t\t\tactiveServiceList.add(activeService);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\t\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn activeServiceList;\r\n\t\t\r\n\t}",
"public Services(ArrayList<ServiceTypes> serviceTypes) {\n this.indexes = new ArrayList<Integer>();\n this.services = new ArrayList<String>();\n for(int i = 0; i < serviceTypes.size(); i++) {\n this.indexes.add(serviceTypes.get(i).getValue()); // Retrieve the index of the Service\n this.services.add(serviceTypes.get(i).getKey()); // Retrieve the name of the Service\n }\n\n }",
"public List<ServerServices> listServerServices();",
"AGServiceDescription[] getServices()\n throws IOException, SoapException;",
"public List<ServiceRegistry> getServiceRegistrys() {\n\t\treturn (new ServiceRegistryDAO()).getCloneList();\r\n\t}",
"public com.hps.july.persistence.Service getServices() throws Exception {\n\tServiceAccessBean bean = constructServices();\n\tif (bean != null)\n\t return (Service)bean.getEJBRef();\n\telse\n\t return null;\n\n}",
"@Override\n public List<ServiceModel> queryAllServices() throws ApplicationException {\n try {\n // 1. Query basic information of service instance.\n List<ServiceModel> services = getMapper(ServiceModelMapper.class).queryAllServices();\n if(CollectionUtils.isEmpty(services)) {\n return null;\n }\n\n // 2. Query relation data.\n List<ServicePackageMapping> serviceMappings = getMapper(ServicePackageMapper.class).queryAllMappings();\n\n // 3. Compose data.\n return composeData(services, serviceMappings);\n\n } catch(Exception exception) {\n LOGGER.error(\"Fail to delete service instance. {}\", exception);\n throw new ApplicationException(HttpCode.INTERNAL_SERVER_ERROR, ErrorCode.OPER_DB_FAIL);\n }\n }",
"@Override\n\tpublic List<Servicio> listarServicioTQ() {\n\t\tservicioDao = new ServicioDaoImpl();\n\t\treturn servicioDao.listarServicioTQ();\n\t}",
"@Override\n\tpublic Collection<Class<? extends IFloodlightService>> getModuleDependencies() {\n\t\tCollection<Class<? extends IFloodlightService>> l =\n\t\t new ArrayList<Class<? extends IFloodlightService>>();\n\t\t l.add(IFloodlightProviderService.class);\n\t\t l.add(IStaticEntryPusherService.class);\n\t\t return l;\n\t}",
"default ImmutableSet<Class<? extends ManagedService>> getDependencies()\n\t{\n\t\treturn Sets.immutable.empty();\n\t}",
"public com.google.common.util.concurrent.ListenableFuture<\n com.google.cloud.servicedirectory.v1beta1.ListServicesResponse>\n listServices(com.google.cloud.servicedirectory.v1beta1.ListServicesRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getListServicesMethod(), getCallOptions()), request);\n }",
"@Override\n\t\tpublic Collection<Class<? extends IFloodlightService>> getModuleServices() {\n\t\t\treturn null;\n\t\t}",
"List<Oficios> buscarActivas();",
"public java.util.List<ServiceRegistry> getServiceRegistries() {\n if (serviceRegistries == null) {\n serviceRegistries = new com.amazonaws.internal.SdkInternalList<ServiceRegistry>();\n }\n return serviceRegistries;\n }"
] | [
"0.6924442",
"0.68448",
"0.6583247",
"0.64002365",
"0.64002365",
"0.63178265",
"0.6296364",
"0.62807375",
"0.6255248",
"0.62156135",
"0.62156135",
"0.61182433",
"0.60899675",
"0.608449",
"0.608449",
"0.60692906",
"0.60692906",
"0.6059393",
"0.60314476",
"0.6028609",
"0.6024841",
"0.5992414",
"0.5983389",
"0.5983389",
"0.59825605",
"0.59345996",
"0.593344",
"0.5911429",
"0.5911236",
"0.5895153",
"0.58895314",
"0.58663046",
"0.58370066",
"0.5832425",
"0.5832425",
"0.5825738",
"0.58161145",
"0.5801691",
"0.5801691",
"0.57673657",
"0.57673657",
"0.5757667",
"0.5757667",
"0.5749405",
"0.5749405",
"0.57488006",
"0.5738287",
"0.57376933",
"0.57103926",
"0.5700759",
"0.5685039",
"0.56735605",
"0.56632406",
"0.56583965",
"0.5656196",
"0.5656196",
"0.56504226",
"0.5640829",
"0.56321",
"0.56277776",
"0.5619122",
"0.56177974",
"0.56177974",
"0.5612041",
"0.55926734",
"0.5583428",
"0.55776006",
"0.5574315",
"0.5561894",
"0.55585766",
"0.554119",
"0.5537056",
"0.5517945",
"0.55080026",
"0.55063605",
"0.5501399",
"0.5497971",
"0.5483487",
"0.54760826",
"0.54730785",
"0.5459997",
"0.5457872",
"0.5434509",
"0.5433526",
"0.5432534",
"0.5427399",
"0.5420822",
"0.5413724",
"0.54102397",
"0.54089636",
"0.5406003",
"0.5404858",
"0.53919214",
"0.5389891",
"0.53231746",
"0.53120834",
"0.5308516",
"0.53072053",
"0.5304693",
"0.5293009"
] | 0.6587564 | 2 |
Devuelve una lista con el nombre de los servicios que no deben insertarse en la BBDD porque no deben aparecer en la vista ServicesExplorer. | private static String[] getExcludeServices() {
String[] excludeServicesList = null;
try {
excludeServicesList = ATUIUtils.getDefault().getString(ATUI_EXCLUDE_SERVICES_LIST).trim().split(COMMA);
} catch (Exception e) {
e.printStackTrace();
}
return excludeServicesList;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<String> getServices() throws IOException;",
"public static List<String> getServiceNames(Definition definition) {\n Map map = definition.getAllServices();\n List<QName> serviceQnames = new ArrayList<QName>(map.keySet());\n List<String> serviceNames = new ArrayList<String>();\n for (QName qName : serviceQnames) {\n serviceNames.add(qName.getLocalPart());\n }\n return serviceNames;\n }",
"List<Service> services();",
"java.util.List<go.micro.runtime.RuntimeOuterClass.Service> \n getServicesList();",
"java.util.List<go.micro.runtime.RuntimeOuterClass.Service> \n getServicesList();",
"net.zyuiop.ovhapi.api.objects.services.Service getServiceNameServiceInfos(java.lang.String serviceName) throws java.io.IOException;",
"public List<String> getAllServices() {\n List<String> allServices = new ArrayList<>();\n for (ServiceDescription service : serviceList.values()) {\n allServices.add(service.getServiceName());\n }\n return allServices;\n }",
"public void _getAvailableServiceNames() {\n services = oObj.getAvailableServiceNames();\n\n for (int i = 0; i < services.length; i++) {\n log.println(\"Service\" + i + \": \" + services[i]);\n }\n\n tRes.tested(\"getAvailableServiceNames()\", services != null);\n }",
"public void updateServiceNameList(){\n for(String key: serviceList.keySet()){\n serviceNameList.put(key, serviceList.get(key).getServiceName());\n }\n }",
"public List<ServerServices> listServerServices();",
"public void testServiceList()\n {\n ServiceList services = serviceSetup();\n\n ServiceIterator it = services.createServiceIterator();\n int i = 0;\n try\n {\n while (it.hasNext())\n {\n // Increment the service counter\n i++;\n // Get our next service\n ServiceExt service = (ServiceExt) it.nextService();\n log(\"******************************************************************\");\n log(\"* Services - Counter: (\" + i + \")\");\n dumpService(service);\n\n ServiceDetailsHandle[] handles = sidb.getServiceDetailsByService(service.getServiceHandle());\n\n ServiceDetailsExt[] details = new ServiceDetailsExt[handles.length];\n for (int j = 0; j < handles.length; j++)\n {\n details[j] = sidb.createServiceDetails(handles[j]);\n dumpServiceDetails(details[j]);\n assertEquals(\"ServiceDetails' Service does not match expected value\", service,\n details[j].getService());\n assertEquals(\"ServiceType does not match\", service.getServiceType(), details[j].getServiceType());\n }\n log(\"******************************************************************\");\n }\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n }",
"public ArrayList<String> DFGetServiceList() {\n return DFGetAllServicesProvidedBy(\"\");\n }",
"public Map<String, List<String>> getServices();",
"public Services() {\n this.indexes = new ArrayList<Integer>();\n// this.indexes.add(ServiceTypes.NOSERVICES.getValue());\n this.services = new ArrayList<String>();\n// this.services.add(ServiceTypes.NOSERVICES.getKey());\n }",
"ImmutableList<T> getServices();",
"public static String[] getServiceNames()\n {\n String[] sSupportedServiceNames = { __serviceName };\n return sSupportedServiceNames;\n }",
"public static List<String> getPrinterServiceNameList() {\n\n // get list of all print services\n PrintService[] services = PrinterJob.lookupPrintServices();\n List<String> list = new ArrayList<>();\n\n for (PrintService service : services) {\n list.add(service.getName());\n }\n return list;\n }",
"public java.util.List<go.micro.runtime.RuntimeOuterClass.Service> getServicesList() {\n if (servicesBuilder_ == null) {\n return java.util.Collections.unmodifiableList(services_);\n } else {\n return servicesBuilder_.getMessageList();\n }\n }",
"public java.util.List<go.micro.runtime.RuntimeOuterClass.Service> getServicesList() {\n if (servicesBuilder_ == null) {\n return java.util.Collections.unmodifiableList(services_);\n } else {\n return servicesBuilder_.getMessageList();\n }\n }",
"public void fetchServices() {\n serviciosTotales.clear();\n for (String serviceId : serviceList) {\n databaseServiceReference.child(serviceId).addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n Servicio servicioTemp = dataSnapshot.getValue(Servicio.class);\n serviciosTotales.add(servicioTemp);\n servicesAdapter.notifyDataSetChanged();\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n }\n\n\n }",
"public List<String> getServices() {\n return runtimeClient.getServices();\n }",
"public Collection<Service> createServices();",
"public ArrayList<Servicio> cargarServicios() throws CaException {\n try {\n String strSQL = \"SELECT k_idservicio, f_fycentrada, f_fycsalida, q_valorapagar, k_idvehiculo FROM servicio\";\n Connection conexion = ServiceLocator.getInstance().tomarConexion();\n PreparedStatement prepStmt = conexion.prepareStatement(strSQL);\n ResultSet rs = prepStmt.executeQuery();\n while (rs.next()) {\n Servicio servicio1 = new Servicio();\n servicio1.setK_idservicio(rs.getInt(1));\n servicio1.setF_fycentrada(rs.getString(2));\n servicio1.setF_fycsalida(rs.getString(3));\n servicio1.setQ_valorapagar(rs.getInt(4));\n servicio1.setK_idvehiculo(rs.getInt(5));\n\n servicios.add(servicio1);\n }\n } catch (SQLException e) {\n throw new CaException(\"ServicioDAO\", \"No pudo recuperar el servicio\" + e.getMessage());\n }finally {\n ServiceLocator.getInstance().liberarConexion();\n }\n return servicios;\n }",
"public void getServicios() {\n\t\tjs.executeScript(\"arguments[0].click();\", cuadradito);\n\t\tinputSearch.sendKeys(\"Servicio\");\n\t\tjs.executeScript(\"arguments[0].click();\", servicios);\n\t}",
"com.icare.eai.schema.om.evSORequest.ListOfServiceElementsComplexType getListOfServiceElements();",
"@Override\n\tpublic String listarClientes() throws MalformedURLException, RemoteException, NotBoundException {\n\t\tdatos = (ServicioDatosInterface) Naming.lookup(\"rmi://\"+ direccion + \":\" + puerto + \"/almacen\");\n \tString lista = datos.listaClientes();\n \treturn lista;\n \t\n\t}",
"java.util.List<? extends go.micro.runtime.RuntimeOuterClass.ServiceOrBuilder> \n getServicesOrBuilderList();",
"java.util.List<? extends go.micro.runtime.RuntimeOuterClass.ServiceOrBuilder> \n getServicesOrBuilderList();",
"public ServiceCombo getServices()\n {\n return services;\n }",
"private List getActiveServiceList(List servicesList) {\r\n\r\n\t\tList activeServiceList = new ArrayList();\r\n\t\t\r\n\t\tServiceVO activeService;\t\t\r\n\t\t\r\n\t\tif (servicesList != null) {\r\n\t\t\tfor (Iterator iterator = servicesList.iterator(); iterator.hasNext();) {\r\n\t\t\t\tactiveService = (ServiceVO) iterator.next();\r\n\t\t\t\tif (activeService.getStatus() != null) {\r\n\t\t\t\t\tif (activeService.getStatus().trim().equalsIgnoreCase(\"Ativado\")) {\r\n\t\t\t\t\t\tactiveServiceList.add(activeService);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\t\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn activeServiceList;\r\n\t\t\r\n\t}",
"public List/*WsCompileEditorSupport.ServiceSettings*/ getServices();",
"public List<CatalogService> getService(String service);",
"@Override\n\tpublic List<String> listarFicherosCliente(int idSesionCliente) throws RemoteException, MalformedURLException, NotBoundException {\t\t\n \tdatos = (ServicioDatosInterface) Naming.lookup(\"rmi://\"+ direccion + \":\" + puerto + \"/almacen\");\n \tInterfaz.imprime(\"La lista de ficheros de la sesion: \" + idSesionCliente + \" ha sido enviada\");\n return datos.listarFicherosCliente(idSesionCliente);\n \n\t}",
"public Vector getServiceNames(String serviceType) throws ServiceException {\n return namingService.getServiceNames(serviceType);\n }",
"com.icare.eai.schema.om.evSORequest.ListOfServiceElementsComplexType addNewListOfServiceElements();",
"public static List<ServiceName> getServiceNamesFromDeploymentUnit(final DeploymentUnit unit) {\n final List<ServiceName> endpointServiceNames = new ArrayList<ServiceName>();\n Deployment deployment = unit.getAttachment(WSAttachmentKeys.DEPLOYMENT_KEY);\n for (Endpoint ep : deployment.getService().getEndpoints()) {\n endpointServiceNames.add(EndpointService.getServiceName(unit, ep.getShortName()));\n }\n return endpointServiceNames;\n }",
"@Override\r\n\tpublic List<sn.ucad.master.assurance.bo.Service> findAllService() {\n\t\treturn serviceRepository.findAll();\r\n\t}",
"public java.util.List<go.micro.runtime.RuntimeOuterClass.Service> getServicesList() {\n return services_;\n }",
"public java.util.List<go.micro.runtime.RuntimeOuterClass.Service> getServicesList() {\n return services_;\n }",
"go.micro.runtime.RuntimeOuterClass.Service getServices(int index);",
"go.micro.runtime.RuntimeOuterClass.Service getServices(int index);",
"public String[] getSupportedServiceNames()\n {\n return getServiceNames();\n }",
"io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsServiceList getServiceList();",
"public String darServicios(){\n return servicios;\n }",
"public Vector getServiceIds() throws ServiceException {\n return namingService.getServiceIds();\n }",
"AGServiceDescription[] getServices()\n throws IOException, SoapException;",
"public List<InfoServicio> getInfoServicios(){\n\t\treturn infoServicios;\n\t}",
"public static List getAllNames() {\n List polovniautomobili = new ArrayList<>();\n try {\n CONNECTION = DriverManager.getConnection(URL, USERNAME, PASSWORD);\n String query = \"SELECT naziv FROM polovni\";\n try (PreparedStatement ps = CONNECTION.prepareStatement(query)) {\n ResultSet result = ps.executeQuery();\n while (result.next()) {\n String naziv = result.getString(\"naziv\");\n polovniautomobili.add(naziv);\n\n }\n\n ps.close();\n CONNECTION.close();\n }\n CONNECTION.close();\n } catch (SQLException ex) {\n Logger.getLogger(Register.class.getName()).log(Level.SEVERE, null, ex);\n }\n return polovniautomobili;\n }",
"private static String[] getServiceFacades() {\n\t\tString[] facadePropertiesList = null;\n\t\ttry {\n\t\t\tfacadePropertiesList = ATUIUtils.getDefault().getString(ATUI_SERVICES_FACADE_LIST).trim().split(COMMA);\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn facadePropertiesList;\n\t}",
"public List<ServicioEntity> getServicios() {\r\n return servicios;\r\n }",
"public ArrayList <String> ListDepartamentos() throws RemoteException;",
"public java.util.List<? extends go.micro.runtime.RuntimeOuterClass.ServiceOrBuilder> \n getServicesOrBuilderList() {\n if (servicesBuilder_ != null) {\n return servicesBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(services_);\n }\n }",
"public java.util.List<? extends go.micro.runtime.RuntimeOuterClass.ServiceOrBuilder> \n getServicesOrBuilderList() {\n if (servicesBuilder_ != null) {\n return servicesBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(services_);\n }\n }",
"public List<ServerServices> searchExternalService(int servId, String dataPort, String servicePort);",
"@ApiModelProperty(value = \"The services to which the deployment version has been activated. Any of \\\"interview\\\", \\\"webservice\\\", \\\"javaScriptSessions\\\", and \\\"mobile\\\".\")\n public List<String> getServices() {\n return services;\n }",
"private List<ServiceDTO> getCustomizedConfigService() {\n String configServices = System.getProperty(\"apollo.configService\");\n if (Strings.isNullOrEmpty(configServices)) {\n // 2. Get from OS environment variable\n configServices = System.getenv(\"APOLLO_CONFIGSERVICE\");\n }\n if (Strings.isNullOrEmpty(configServices)) {\n // 3. Get from server.properties\n configServices = Foundation.server().getProperty(\"apollo.configService\", null);\n }\n\n if (Strings.isNullOrEmpty(configServices)) {\n return null;\n }\n\n logger.warn(\"Located config services from apollo.configService configuration: {}, will not refresh config services from remote meta service!\", configServices);\n\n // mock service dto list\n String[] configServiceUrls = configServices.split(\",\");\n List<ServiceDTO> serviceDTOS = Lists.newArrayList();\n\n for (String configServiceUrl : configServiceUrls) {\n configServiceUrl = configServiceUrl.trim();\n ServiceDTO serviceDTO = new ServiceDTO();\n serviceDTO.setHomepageUrl(configServiceUrl);\n serviceDTO.setAppName(ServiceNameConsts.APOLLO_CONFIGSERVICE);\n serviceDTO.setInstanceId(configServiceUrl);\n serviceDTOS.add(serviceDTO);\n }\n\n return serviceDTOS;\n }",
"default void listServices(\n com.google.cloud.servicedirectory.v1beta1.ListServicesRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.ListServicesResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getListServicesMethod(), responseObserver);\n }",
"long[] getServiceNameTasks(java.lang.String serviceName) throws java.io.IOException;",
"java.lang.String[] getServiceNameOption(java.lang.String serviceName) throws java.io.IOException;",
"public void setServicios(List<ServicioEntity> servicios) {\r\n this.servicios = servicios;\r\n }",
"public ArrayList<Consulta> recuperaAllServicios() {\r\n\t\treturn servicioConsulta.recuperaAllServicios();\r\n\t}",
"public Set<String> getServiceNames() {\n return this.serviceNameSet;\n }",
"public String getAllRunningServices() {\n return \"\";\n }",
"org.apache.geronimo.corba.xbeans.csiv2.tss.TSSSasMechType.ServiceConfigurationList addNewServiceConfigurationList();",
"public java.util.List<? extends go.micro.runtime.RuntimeOuterClass.ServiceOrBuilder> \n getServicesOrBuilderList() {\n return services_;\n }",
"public java.util.List<? extends go.micro.runtime.RuntimeOuterClass.ServiceOrBuilder> \n getServicesOrBuilderList() {\n return services_;\n }",
"public Map<String,Cab2bService> getServices() throws Exception {\n \t\n Map<String,Cab2bService> services = new HashMap<String,Cab2bService>();\n \tDefaultHttpClient httpclient = new DefaultHttpClient();\n \n try {\n String queryURL = GSSProperties.getCab2b2QueryURL()+\"/services\";\n HttpGet httpget = new HttpGet(queryURL);\n ResponseHandler<String> responseHandler = new BasicResponseHandler();\n String result = httpclient.execute(httpget, responseHandler);\n JSONObject json = new JSONObject(result);\n \n \tfor(Iterator i = json.keys(); i.hasNext(); ) {\n \t\tString modelGroupName = (String)i.next();\n \t\tJSONArray urls = json.getJSONArray(modelGroupName);\n \t\tfor(int k=0; k<urls.length(); k++) {\n \t\t JSONObject jsonService = urls.getJSONObject(k);\n \t\t \n \t\t String serviceURL = jsonService.getString(\"url\");\n \t\t \n \t\t boolean searchDefault = false;\n \t\t if (jsonService.has(\"searchDefault\")) {\n \t\t searchDefault = \"true\".equals(jsonService.getString(\"searchDefault\"));\n \t\t }\n \t\t \n \t\t Cab2bService service = new Cab2bService(\n \t\t serviceURL, modelGroupName, searchDefault);\n \t\t \n \t\t services.put(serviceURL, service);\n \t\t}\n \t}\n }\n finally {\n \thttpclient.getConnectionManager().shutdown();\n }\n \n\t\tlog.info(\"Retrieved \" + services.size() + \" services from caB2B\");\n return services;\n }",
"@Programmatic\n public List<Class<?>> allServiceClasses() {\n List<Class<?>> serviceClasses = Lists\n .transform(this.servicesInjector.getRegisteredServices(), new Function<Object, Class<?>>(){\n public Class<?> apply(Object o) {\n return o.getClass();\n }\n });\n // take a copy, to allow eg I18nFacetFactory to add in default implementations of missing services.\n return Collections.unmodifiableList(Lists.newArrayList(serviceClasses));\n }",
"public ArrayList<FormularioServ> listaFServActivos(){\n\t\tArrayList<FormularioServ> listFServ = new ArrayList<FormularioServ>();\n\t\ttry{\n\t\t\tc = PoolConexion.getConnection();\n\t\t\tps = c.prepareStatement(\"select * from public.\\\"formularioServ\\\" where estado<>3\", ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE, ResultSet.HOLD_CURSORS_OVER_COMMIT);\n\t\t\trs = ps.executeQuery();\n\t\t\twhile(rs.next()){\n\t\t\t\tFormularioServ Fserv = new FormularioServ();\n\t\t\t\tFserv.setIdFormulario(rs.getInt(\"idFormulario\"));\n\t\t\t\tFserv.setIdServ(rs.getInt(\"idServ\"));\n\t\t\t\tFserv.setNombreUsuario(rs.getString(\"nombreUsuario\"));\n\t\t\t\tFserv.setEmail(rs.getString(\"email\"));\n\t\t\t\tFserv.setCuerpoEmail(rs.getString(\"cuerpoEmail\"));\n\t\t\t\tFserv.setNumerotelefono(rs.getString(\"numerotelefono\"));\n\t\t\t\tFserv.setfCreacion(rs.getTimestamp(\"fcreacion\"));\n\t\t\t\tFserv.setEstado(rs.getInt(\"estado\"));\n\t\t\t\t\n\t\t\t\tlistFServ.add(Fserv);\n\t\t\t}\n\t\t}\n\t\tcatch (Exception e){\n\t\t\tSystem.out.println(\"DATOS: ERROR EN LISTAR Formularios \"+ e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally{\n\t\t\ttry {\n\t\t\t\tif(rs != null){\n\t\t\t\t\trs.close();\n\t\t\t\t}\n\t\t\t\tif(ps != null){\n\t\t\t\t\tps.close();\n\t\t\t\t}\n\t\t\t\tif(c != null){\n\t\t\t\t\tPoolConexion.closeConnection(c);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn listFServ;\n\t}",
"public String[] getEssentialServiceNames() {\n return new String[]{\"SocialService\"};\n }",
"public List<ServiceInstance> lookupInstances(String serviceName);",
"private void showServices()\n {\n // Remove all of the items from the listField.\n _treeField.deleteAll();\n \n // Get a copy of the ServiceRouting class.\n ServiceRouting serviceRouting = ServiceRouting.getInstance();\n \n // Add in our new items by trolling through the ServiceBook API.\n ServiceBook sb = ServiceBook.getSB();\n ServiceRecord[] records = sb.getRecords();\n \n if( records == null ) \n {\n return;\n }\n \n int rootNode = _treeField.addChildNode( 0, \"Service Records\" );\n \n int numRecords = records.length;\n \n for( int i = 0; i < numRecords; i++ ) \n {\n String name = records[i].getName();\n String description = records[i].getDescription();\n \n if( description == null || description.length() == 0 ) \n {\n description = \"No description available\" ;\n }\n \n String uid = records[i].getUid();\n boolean serialBypass = serviceRouting.isSerialBypassActive( uid );\n\n int newParentNode = _treeField.addChildNode( rootNode, name );\n _treeField.addChildNode( newParentNode, description );\n _treeField.addChildNode( newParentNode, uid );\n _treeField.addChildNode( newParentNode, serialBypass ? \"Serial Bypass: Connected\" : \"Serial Bypass: Disconnected\");\n \n // Perform the check for the Desktop SerialRecord.\n if( name != null && name.equals( \"Desktop\" )) \n {\n _desktopUID = uid;\n }\n }\n \n _treeField.setCurrentNode( rootNode ); // Set the root as the starting point.\n }",
"@Override\n public Collection<Class<? extends IFloodlightService>> getModuleServices() {\n \t Collection<Class<? extends IFloodlightService>> l = new ArrayList<Class<? extends IFloodlightService>>();\n l.add(IPktinHistoryService.class);\n return l;\n }",
"org.apache.geronimo.corba.xbeans.csiv2.tss.TSSSasMechType.ServiceConfigurationList getServiceConfigurationList();",
"public void adicionarServicos() {\n int i;\n if (hospedesCadastrados.isEmpty()) {\n System.err.println(\"Não existem hospedes cadastrados!\\n\");\n } else {\n\n System.err.println(\"Digite o cpf do hospede que deseja adicionar servicos:\");\n listarHospedes();\n int cpf = verifica();\n for (i = 0; i < hospedesCadastrados.size(); i++) {\n if (hospedesCadastrados.get(i).getCpf() == cpf) {//pega o indice i do objeo pessoa, pega o id da pessoa e compara com o id da pessoa digitada\n if (hospedesCadastrados.get(i).getContrato().isSituacao()) {//verifica se a situaçao do contrato ainda está aberta para esse hospede\n\n System.err.println(\"O que deseja editar do contrato\\n\");\n //adicionar carro, trocar de quarto, adicionar conta de restaurante,\n //encerrar contrato\n\n System.err.println(\"Adicionar carro (1):\\nAdicionar restaurante (2):\\n\"\n + \"Adicionar horas de BabySitter (3):\\nAdicionar quarto(4):\\n\");\n int caso = verifica();\n switch (caso) {\n case 1://carro\n if (carrosCadastrados.isEmpty()) {\n System.err.println(\"Nao existem carros cadastrados!\\n\");\n } else {\n listarCarros();\n System.err.println(\"Digite o id do carro que deseja contratar:\\n\");\n int idCarro = verifica();\n\n for (int j = 0; j < carrosCadastrados.size(); j++) {\n if (carrosCadastrados.get(j).getId() == idCarro) {\n if (carrosCadastrados.get(j).isEstado()) {\n System.err.println(\"Esse carro já está cadastrado.\\n\");\n } else {\n hospedesCadastrados.get(i).getContrato().setCarros(carrosCadastrados.get(j));\n carrosCadastrados.get(j).setEstado(true);\n }\n }\n }\n }\n break;\n\n case 2://restaurante\n System.err.println(\"Digite o quanto deseja gastar no restaurente\\n\");\n double valorRestaurante = ler.nextDouble();\n// idd();\n// int idRestaurante = id;\n// Restaurante restaurante = new Restaurante(idRestaurante, valorRestaurante);\n hospedesCadastrados.get(i).getContrato().setValorRestaurante(valorRestaurante);\n break;\n case 3://babysitter\n System.err.println(\"Digite o tempo gasto no BabySytter em horas\\n\");\n double tempoBaby = ler.nextDouble();\n hospedesCadastrados.get(i).getContrato().setHorasBaby(tempoBaby);\n break;\n case 4://quartos\n\n if (quartosCadastrados.isEmpty()) {\n\n } else {\n System.err.println(\"Digite o numero do quarto que deseja contratar:\\n\");\n listarQuartos();\n int num = verifica();\n System.err.println(\"Digite a quantidade de dis que pretente alugar o quarto:\\n\");\n int dias = verifica();\n for (int j = 0; j < quartosCadastrados.size(); j++) {\n if (num == quartosCadastrados.get(j).getNumero()) {//verifica se o numero digitado é igual ao numero do quarto do laco\n if (quartosCadastrados.get(j).getEstado()) {//verifica se o estado do quarto está como true\n System.err.println(\"Este quarto já está cadastrado em um contrato\");\n } else {//se o estado tiver em true é porque o quarto ja está cadastrado\n\n hospedesCadastrados.get(i).getContrato().setQuartos(quartosCadastrados.get(j));\n hospedesCadastrados.get(i).getContrato().getQuartosCadastrados().get(j).setDias(dias);\n hospedesCadastrados.get(i).getContrato().getQuartosCadastrados().get(j).setEstado(true);//seta o estado do quarto como ocupado\n System.err.println(\"Quarto cadastrado!\\n\");\n }\n\n }\n\n }\n\n//remove all remove todas as pessoas com tal nome\t\n }\n break;\n\n }\n } else {\n System.err.println(\"O contrato deste Hospede encontra-se encerrado\");\n break;\n }\n }\n }\n }\n }",
"public Map listServices() throws IOException\n\t{\n\t\treturn request(GET, address(null, null));\n\t}",
"@JsonIgnore public Collection<String> getMealServices() {\n final Object current = myData.get(\"mealService\");\n if (current == null) return Collections.emptyList();\n if (current instanceof Collection) {\n return (Collection<String>) current;\n }\n return Arrays.asList((String) current);\n }",
"static Set getServiceNames(SSOToken token) throws SMSException,\n SSOException {\n // Get the service names from ServiceManager\n CachedSubEntries cse = CachedSubEntries.getInstance(token,\n DNMapper.serviceDN);\n return (cse.getSubEntries(token));\n }",
"public List<String> getAllProcessNamesFromDatabase() \r\n throws ServiceFailureException;",
"public List<ServiceInstance> getAllInstances(String serviceName);",
"private List getServicesHistory(String xmlResponse) {\r\n\r\n\t\tList serviceList = new ArrayList();\r\n\t\t\r\n\t\tServiceVO activeService;\r\n\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tElement root;\r\n\t\t\troot = DOMUtils.openDocument(new ByteArrayInputStream(xmlResponse.getBytes()));\r\n\t\t\tElement element = DOMUtils.getElement(root, \"data\", true);\r\n\t\t\telement = DOMUtils.getElement(element, \"contract\", true);\r\n\t\t\t\r\n\t\t\tNodeList serviceNodeList = DOMUtils.getElements(element, \"service\");\r\n\t\t\tElement subElement;\r\n\t\t\tfor (int i = 0; i < serviceNodeList.getLength(); i++) {\r\n\t\t\t\telement = (Element) serviceNodeList.item(i);\r\n\t\t\t\tactiveService = new ServiceVO();\r\n\t\t\t\t//sets the sncode\r\n\t\t\t\tsubElement = DOMUtils.getElement(element, \"code\", true);\r\n\t\t\t\tactiveService.setSnCode(DOMUtils.getText(subElement).toString());\r\n\t\t\t\t//sets the description\r\n\t\t\t\tsubElement = DOMUtils.getElement(element, \"desc\", true);\r\n\t\t\t\tactiveService.setDescription(DOMUtils.getText(subElement).toString());\r\n\t\t\t\t//sets the service history\r\n\t\t\t\tsubElement = DOMUtils.getElement(element, \"contract-svc\", true);\r\n\t\t\t\tsubElement = DOMUtils.getElement(subElement, \"status-hist\", true);\r\n\t\t\t\tactiveService.setServiceHistory(getServiceHistory(DOMUtils.getText(subElement).toString()));\r\n\t\t\t\t//sets the service activation\r\n\t\t\t\tactiveService.setServiceActivation(getActivationDate(DOMUtils.getText(subElement).toString()));\r\n\t\t\t\t//sets the service status\r\n\t\t\t\tactiveService.setStatus(getServiceCurrentStatus(DOMUtils.getText(subElement).toString()));\r\n\t\t\t\t\r\n\t\t\t\tserviceList.add(activeService);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} catch(Exception e) {\r\n\t\t\tlog.error(\"Erro encontrado no XML de resposta do Infobus.\", e);\r\n\t\t\tthrow new ErrorMessageException(\"Erro encontrado no XML de resposta do Infobus.\", e);\r\n\t\t}\r\n\t\t\r\n\t\treturn serviceList;\t\t\t\t\t\t\r\n\t\t\r\n\t}",
"public Set getAssignableServices() throws SMSException {\n // Get all service names, and remove the assigned services\n // Set containing service names that has organization schema\n Set orgSchemaServiceNames = new HashSet();\n try {\n for (Iterator names = getServiceNames(token).iterator(); names\n .hasNext();) {\n String serviceName = (String) names.next();\n ServiceSchemaManagerImpl ssmi = ServiceSchemaManagerImpl\n .getInstance(token, serviceName, \n ServiceManager.getVersion(serviceName));\n if (ssmi.getSchema(SchemaType.ORGANIZATION) != null) {\n // Need to check if the user has permission\n // to add/assign the service\n StringBuffer d = new StringBuffer(100);\n // Need to construct\n // \"ou=default,ou=organizationconfig,ou=1.0,ou=\"\n d.append(SMSEntry.PLACEHOLDER_RDN).append(SMSEntry.EQUALS)\n .append(SMSUtils.DEFAULT).append(SMSEntry.COMMA)\n .append(CreateServiceConfig.ORG_CONFIG_NODE)\n .append(SMSEntry.PLACEHOLDER_RDN).append(\n SMSEntry.EQUALS).append(\"1.0\").append(\n SMSEntry.COMMA).append(\n SMSEntry.PLACEHOLDER_RDN).append(\n SMSEntry.EQUALS);\n // Append service name, and org name\n d.append(serviceName);\n if (!orgDN.equalsIgnoreCase(DNMapper.serviceDN)) {\n d.append(SMSEntry.COMMA).append(SMSEntry.SERVICES_NODE);\n }\n d.append(SMSEntry.COMMA).append(orgDN);\n try {\n // The function will throw exception if\n // user does not have permissions\n SMSEntry.getDelegationPermission(token, d.toString(),\n SMSEntry.modifyActionSet);\n orgSchemaServiceNames.add(serviceName);\n } catch (SMSException smse) {\n if (smse.getExceptionCode() != \n SMSException.STATUS_NO_PERMISSION) \n {\n throw (smse);\n }\n }\n }\n }\n // Need to remove mandatory services\n // %%% TODO. Need to have SMS Service with this information\n // orgSchemaServiceNames.removeAll(getMandatoryServices());\n } catch (SSOException ssoe) {\n SMSEntry.debug.error(\"OrganizationConfigManager.\"\n + \"getAssignableServices(): SSOException\", ssoe);\n throw (new SMSException(SMSEntry.bundle\n .getString(\"sms-INVALID_SSO_TOKEN\"),\n \"sms-INVALID_SSO_TOKEN\"));\n }\n // Remove assigned services\n HashSet answer = new HashSet(orgSchemaServiceNames);\n answer.removeAll(getAssignedServices());\n return (answer);\n }",
"public java.util.List<go.micro.runtime.RuntimeOuterClass.Service.Builder> \n getServicesBuilderList() {\n return getServicesFieldBuilder().getBuilderList();\n }",
"public java.util.List<go.micro.runtime.RuntimeOuterClass.Service.Builder> \n getServicesBuilderList() {\n return getServicesFieldBuilder().getBuilderList();\n }",
"@Test\n\tpublic void testSuppServices() {\n\t\tList<SuppServices> suppServices = suppServicesService.selectList();\n\n\t\tfor (SuppServices supp : suppServices) {\n\n\t\t\tSystem.out.println(supp);\n\t\t}\n\t}",
"@ManagedAttribute(description = \"Retrieves the list of Registered Services in a slightly friendlier output.\")\n public final List<String> getRegisteredServicesAsStrings() {\n final List<String> services = new ArrayList<>();\n\n for (final RegisteredService r : this.servicesManager.getAllServices()) {\n services.add(new StringBuilder().append(\"id: \").append(r.getId())\n .append(\" name: \").append(r.getName())\n .append(\" serviceId: \").append(r.getServiceId())\n .toString());\n }\n\n return services;\n }",
"Collection<Service> getAllSubscribeService();",
"public static ArrayList<DeviceService> getServices (JSONArray jsonArray){\n ArrayList<DeviceService> services = new ArrayList<DeviceService>();\n\n for (int i = 0; i < jsonArray.length(); i++) {\n try {\n JSONObject o = jsonArray.getJSONObject(i);\n DeviceService serv = new DeviceService(o.getString(Utility.ServiceName), o.getString(Utility.ServiceType));\n\n try {\n JSONArray coms = o.getJSONArray(Utility.Commands);\n Log.w(\"Commands\", coms.toString());\n for (int j = 0; j < coms.length(); j++) {\n try {\n serv.addCommand(new Command(coms.getJSONObject(j).getString(Utility.CommandName),\n coms.getJSONObject(j).getString(Utility.CommandType)));\n }\n catch (JSONException e) {\n Log.w(\"Command\", \"Error adding command\");\n }\n }\n }\n catch (JSONException e) {\n Log.w(\"Service\", \"No Custom Commands Here\");\n }\n\n services.add(serv);\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n\n return services;\n }",
"public void addServicio(String nombre_servicio, List<String> parametros){\n\t\t\n\t\tboolean exists = false;\n\t\t//Se comprueba si ya estaba registrado dicho servicio\n\t\tfor(InfoServicio is: infoServicios){\n\t\t\tif(is.getNombre_servicio().equalsIgnoreCase(\"nombre_servicio\")){\n\t\t\t\texists = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(!exists){\n\t\t\t//Es un servicio nuevo, se registra.\n\t\t\tInfoServicio is = new InfoServicio(nombre_servicio,parametros);\n\t\t\tinfoServicios.add(is);\n\t\t}\n\t\telse{\n\t\t\t//Servicio ya registrado, no se hace nada.\n\t\t\tSystem.err.println(\"ERROR: Servicio \" + nombre_servicio + \" ya registrado para \" + this.getNombre_servidor());\n\t\t}\n\t\t\n\t}",
"@Override\n\tpublic List<Servicio> listarServicioTQ() {\n\t\tservicioDao = new ServicioDaoImpl();\n\t\treturn servicioDao.listarServicioTQ();\n\t}",
"public Vector getServiceTypes() throws ServiceException {\n return namingService.getServiceTypes();\n }",
"public List<String> retrieveServicesOfOrder(String orderID) {\r\n\t\tlogger.info(\"will retrieve ActiveServiceOfExternalPartners\" );\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tObject response = template.\r\n\t\t\t\t\trequestBody( CATALOG_GET_SERVICE_BY_ORDERID, orderID );\r\n\r\n\t\t\tlogger.debug(\"will retrieve ServicesOfOrder response: \" + response.getClass() );\r\n\t\t\tif ( !(response instanceof String)) {\r\n\t\t\t\tlogger.error(\"List object is wrong.\");\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\r\n\t\t\tString[] sor = toJsonObj( (String)response, String[].class ); \r\n\t\t\tlogger.debug(\"ServicesOfOrder response is: \" + response);\r\n\t\t\t\r\n\t\t\treturn Arrays.asList(sor);\r\n\t\t\t\r\n\t\t}catch (Exception e) {\r\n\t\t\tlogger.error(\"Cannot retrieve Listof ServicesOfOrder . \" + e.toString());\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public static void listImageIOServices() {\n\t\tIIORegistry registry = IIORegistry.getDefaultInstance();\n\t\tlogger.info(\"ImageIO services:\");\n\t\tIterator<Class<?>> cats = registry.getCategories();\n\t\twhile (cats.hasNext()) {\n\t\t\tClass<?> cat = cats.next();\n\t\t\tlogger.info(\"ImageIO category = \" + cat);\n\n\t\t\tIterator<?> providers = registry.getServiceProviders(cat, true);\n\t\t\twhile (providers.hasNext()) {\n\t\t\t\tObject o = providers.next();\n\t\t\t\tlogger.debug(\"ImageIO provider of type \" + o.getClass().getCanonicalName() + \" in \"\n\t\t\t\t\t\t+ o.getClass().getClassLoader());\n\t\t\t}\n\t\t}\n\t}",
"public int getServicesCount() {\n return services_.size();\n }",
"public int getServicesCount() {\n return services_.size();\n }",
"public List<BluetoothGattService> getIncludedServices() {\n/* 104 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"public ArrayList<EstacionServicio> getListadoEstacionServicio() throws Exception {\n\t\t\t\n\t\t\t\tConnection conn = ds.getConnection();\n\t\t\t\tArrayList<EstacionServicio> lista = new ArrayList<EstacionServicio>();\n\t\t\t\tPreparedStatement stmt = conn.prepareStatement(\"SELECT * FROM ESTACION_SERVICIO\");\n\t\t\t\tResultSet rs = stmt.executeQuery();\n\t\t\t\twhile(rs.next()){\n\t\t\t\t\tlista.add (new EstacionServicio(rs.getInt(1),rs.getString(2),rs.getDate(3),rs.getFloat(4),rs.getFloat(5),rs.getString(6)));\n\t\t\t\t}\n\t\t\t\tif (rs != null) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\trs.close();\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (stmt != null) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tstmt.close();\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\treturn lista;\n\t\t\t}",
"public java.util.List<String> getServiceArns() {\n return serviceArns;\n }",
"int getServicesCount();",
"int getServicesCount();"
] | [
"0.6924843",
"0.6697753",
"0.66705894",
"0.66423297",
"0.66423297",
"0.6568108",
"0.65647763",
"0.6515185",
"0.64829916",
"0.6394859",
"0.6313973",
"0.62782675",
"0.62552273",
"0.62352777",
"0.6233711",
"0.61888003",
"0.6167372",
"0.61640525",
"0.61640525",
"0.6161312",
"0.61583996",
"0.610014",
"0.604361",
"0.6038967",
"0.6032956",
"0.60309905",
"0.6022848",
"0.6022848",
"0.59979975",
"0.598713",
"0.5965906",
"0.59511226",
"0.5950941",
"0.5929161",
"0.59286594",
"0.58959085",
"0.58931875",
"0.58874416",
"0.58874416",
"0.58750564",
"0.58750564",
"0.58577096",
"0.585112",
"0.585073",
"0.58506095",
"0.58390033",
"0.58191615",
"0.5817209",
"0.58054376",
"0.5801346",
"0.5793077",
"0.5792332",
"0.5792332",
"0.5787141",
"0.5780582",
"0.57558113",
"0.575395",
"0.57451063",
"0.57437366",
"0.5741213",
"0.5740279",
"0.57378644",
"0.57371205",
"0.5719352",
"0.56918824",
"0.56918824",
"0.5688542",
"0.56746024",
"0.56736445",
"0.5673",
"0.56690174",
"0.565877",
"0.564572",
"0.5640545",
"0.56359553",
"0.5633647",
"0.5606467",
"0.56029403",
"0.56014735",
"0.559949",
"0.5590571",
"0.5589013",
"0.55852395",
"0.55852395",
"0.55825806",
"0.5572537",
"0.5562467",
"0.5548682",
"0.5538627",
"0.5537475",
"0.55364335",
"0.5529243",
"0.5528814",
"0.5527123",
"0.5527123",
"0.55266345",
"0.5525623",
"0.5520075",
"0.55193293",
"0.55193293"
] | 0.570448 | 64 |
Devuelve "true" si el nombre del servicio que se pasa por parametro coincide con alguno de los servicios excluidos. | private static boolean isExcludeService(String[] excludeServicesList, String serviceName) {
boolean isExcludeService = false;
// Se itera por la lista buscando coincidencias.
for (String excludeService : excludeServicesList) {
if (excludeService.trim().toLowerCase().equals(serviceName.trim().toLowerCase())) {
isExcludeService = true;
break;
}
}
return isExcludeService;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean delete(Service servico){\n for (Service servicoLista : Database.servico) {\n if(idSaoIguais(servicoLista,servico)){\n Database.servico.remove(servicoLista);\n return true;\n }\n }\n return false;\n }",
"private boolean CheckEmptyServices(List<Services> services){\n for(Services service : services){\n if(service.getServiceQuantity() > 0){\n return false;\n }\n }\n return true;\n }",
"public boolean containsIndependentParameter(String name);",
"public boolean isEliminable(VOUsuario us) {\n return true;\n }",
"public boolean removeService(String id){\n if(this.serviceList.containsKey(id)){\n this.serviceList.remove(id);\n lastID.remove(id);\n System.out.println(\"#\"+id+\" retiré de la liste des services.\");\n return true;\n } else {\n return false;\n }\n }",
"boolean hasServiceName();",
"boolean hasServiceName();",
"public boolean DeleteOptExist(String arg) {\n\t\tboolean val = false;\n\t\tfor (String s : DelOpt) {\n\t\t\tif (arg.equalsIgnoreCase(s)) {\n\t\t\t\tval = true;\n\t\t\t\treturn val;\n\n\t\t\t}\n\t\t}\n\t\treturn val;\n\t}",
"@Override\r\n public boolean validarNombreNoNulo(String nombre) throws ServiceException {\n if (StringUtils.isBlank(nombre)) {\r\n throw new ServiceException(\"consultorio.service.error.1203\", locale);\r\n }\r\n return true;\r\n }",
"public boolean ChangeNameOptExist(String arg) {\n\t\tboolean val = false;\n\t\tfor (String s : ChangeNameOpt) {\n\t\t\tif (arg.equalsIgnoreCase(s)) {\n\t\t\t\tval = true;\n\t\t\t\treturn val;\n\n\t\t\t}\n\t\t}\n\t\treturn val;\n\t}",
"private boolean comandosNoPermitidos(String comandos){\n \tboolean encontrado = false;\n \tString iniciar = \"INICIAR\".toUpperCase();\n \tString paso = \"paso\".toUpperCase();\n \tString vaciar = \"vaciar\".toUpperCase();\n \tString crearCelula = \"crearCelula\".toUpperCase();\n \tString eliminarCelula = \"eliminarCelula\".toUpperCase();\n\n \t\n \tcomandos = comandos.toUpperCase();\n \tString[] words = comandos.split(\" \");\n \tif(words[0].equals(iniciar)){\n \t\tencontrado = true;\n \t}\n \telse if(words[0].equals(paso)){\n \t\tencontrado = true;\n \t}\n \telse if(words[0].equals(vaciar)){\n \t\tencontrado = true;\n \t}\n \telse if(words[0].equals(crearCelula)){\n \t\tencontrado = true;\n \t}\n \telse if(words[0].equals(eliminarCelula)){\n \t\tencontrado = true;\n \t}\n \t\n \treturn encontrado;\n }",
"@Override\n public boolean containsNameCurso(String Curso) {\n try {\n Curso curso = (Curso) this.findByNameCurso(Curso);\n if(Curso.equals(curso.getNombre())){\n return true;\n } ;\n } catch (Exception ex) {\n //Exception Handler\n }\n return false;\n }",
"private boolean idSaoIguais(Service servico, Service servicoAComparar) {\n return servico.getId() == servicoAComparar.getId();\n }",
"@Test\n public void deleteParameterFalseTest() {\n Mockito.when(this.repo.existsById(100001L)).thenReturn(false);\n boolean resultFromService = this.publisherService.deleteOneById(100001L);\n assertFalse(resultFromService);\n }",
"boolean isSetServiceId();",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof Servicio)) {\n return false;\n }\n Servicio other = (Servicio) object;\n if ((this.idservicio == null && other.idservicio != null) || (this.idservicio != null && !this.idservicio.equals(other.idservicio))) {\n return false;\n }\n return true;\n }",
"private boolean cursoAsignado(Curso curso, Curso[] cursoAsignado) {\n\n for (int i = 0; i < cursoAsignado.length; i++) {\n\n if (cursoAsignado[i] != null) {\n if (curso.getNombre().equals(cursoAsignado[i].getNombre())) {\n return true;\n }\n }\n }\n return false;\n }",
"public boolean ignoreService() {\n if (\"undef\".equalsIgnoreCase(type) || \"undef,1.0\".equalsIgnoreCase(type))\n return true;\n return false;\n }",
"boolean hasServiceCmd();",
"private boolean hasNomeInvalido(String[] n) throws Exception {\n boolean invalido = false;\n for (int i = 0; i < n.length; i++) {\n if (n[i].equals(\"bank\")) {\n invalido = true;\n }\n }\n return invalido;\n }",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof Servicio)) {\n return false;\n }\n Servicio other = (Servicio) object;\n if ((this.serId == null && other.serId != null) || (this.serId != null && !this.serId.equals(other.serId))) {\n return false;\n }\n return true;\n }",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof GrupoServicio)) {\n return false;\n }\n GrupoServicio other = (GrupoServicio) object;\n if ((this.grupoServicioId == null && other.grupoServicioId != null) || (this.grupoServicioId != null && !this.grupoServicioId.equals(other.grupoServicioId))) {\n return false;\n }\n return true;\n }",
"public boolean exsitName(String name) {\n\t\tKynamic kynamic = this.kynamicDao.getKynamicByName(name);\r\n\t\treturn kynamic!=null?true:false;\r\n\t}",
"public void addServicio(String nombre_servicio, List<String> parametros){\n\t\t\n\t\tboolean exists = false;\n\t\t//Se comprueba si ya estaba registrado dicho servicio\n\t\tfor(InfoServicio is: infoServicios){\n\t\t\tif(is.getNombre_servicio().equalsIgnoreCase(\"nombre_servicio\")){\n\t\t\t\texists = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(!exists){\n\t\t\t//Es un servicio nuevo, se registra.\n\t\t\tInfoServicio is = new InfoServicio(nombre_servicio,parametros);\n\t\t\tinfoServicios.add(is);\n\t\t}\n\t\telse{\n\t\t\t//Servicio ya registrado, no se hace nada.\n\t\t\tSystem.err.println(\"ERROR: Servicio \" + nombre_servicio + \" ya registrado para \" + this.getNombre_servidor());\n\t\t}\n\t\t\n\t}",
"boolean toBeRemoved(){\n\t\tif(isCancelled() || getStatus() == 0){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\r\n public boolean validarNombreNoRepetido(Integer empresaId, String nombre) throws ServiceException, DaoException {\n List<Sucursal> sucursales = this.getSucursalesPorEmpresaNombre(empresaId, nombre, false, InterfaceDao.TO_UPPER_CASE);\r\n if (sucursales != null && sucursales.size() > 0) {\r\n throw new ServiceException(\"consultorio.service.error.1209\", locale);\r\n }\r\n return true;\r\n }",
"public boolean containServiceRequestResource(String name) {\r\n\t\treturn this.serviceRequestResources.containsValue(name);\r\n\t}",
"public boolean removeProcedureByName(String name){\n\t\tboolean result=false;\n\t\tfor(Procedure p: proceduresList){\n\t\t\tif(p.getName().equals(name)){\n\t\t\t\tsummaryPrice-=p.getPrice();\n\t\t\t\tproceduresList.remove(p);\n\t\t\t\tresult=true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}",
"public boolean update(Service servico){\n \n for (int i = 0; i < Database.servico.size(); i++) {\n if(idSaoIguais(Database.servico.get(i),servico)){\n Database.servico.set(i, servico);\n return true;\n }\n }\n return false; \n\n }",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"@Override\n\tpublic boolean eliminaDipendente() {\n\t\treturn false;\n\t}",
"@Override\r\n public boolean validarNombre(String nombre) throws ServiceException {\n if (validarNombreNoNulo(nombre)) {\r\n // Se verifica la longitud del nombre\r\n int longitud = StringUtils.length(nombre);\r\n if (longitud < 5 || longitud > 20) {\r\n throw new ServiceException(\"consultorio.service.error.1204\", locale);\r\n }\r\n // Se verifica que el nombre sea alfabético numérico\r\n if (!StringUtils.isAlphanumericSpace(nombre)) {\r\n throw new ServiceException(\"consultorio.service.error.1205\", locale);\r\n }\r\n }\r\n return true;\r\n }",
"boolean isRemove();",
"@Override\n\tpublic boolean isExist(String name) {\n\t\treturn false;\n\t}",
"public boolean deletarSorvete(String nome) {\n\t\t\n\t\tfor (Sorvete sorvete : listaSorvetes) {\n\t\t\tif(sorvete.getNome() == nome) {\n\t\t\t\tlistaSorvetes.remove(sorvete);\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"boolean hasServiceList();",
"@Override\r\n\tpublic boolean deletar(String nomeEmpresa) {\n\t\treturn false;\r\n\t}",
"boolean remove(String name);",
"boolean isSetListOfServiceElements();",
"private boolean hasNomeRepetido(String[] listaNomes) {\n for (int i = 0; i < listaNomes.length; i++) {\n for (int j = 0; j < listaNomes.length; j++) {\n if ((i != j) && (listaNomes[i].equals(listaNomes[j]))) {\n return true;\n }\n }\n }\n\n return false;\n }",
"public boolean getDisponible(String nombre) {\n\t\treturn asignada == null || asignada.equals(nombre);\n\t}",
"public boolean NuevoAfiliado(String nombrePersona, String numeroDui) {\n if (!Afiliados.contains(nombrePersona)) { //Verificar que sta persona no este agregada.\n //Agregar nuevo afiliado.\n Afiliados.add(nombrePersona);\n FechaAfiliacion.add(ObtenerFechaActual());\n NumeroDui.add(numeroDui);\n return true;\n }\n return false;\n }",
"boolean hasService();",
"boolean hasService();",
"boolean hasService();",
"boolean hasService();",
"boolean hasService();",
"@Test\n public void deleteParameterTrueTest() {\n Mockito.when(this.repo.existsById(1L)).thenReturn(true);\n boolean resultFromService = this.publisherService.deleteOneById(1L);\n assertTrue(resultFromService);\n }",
"@Override\n public boolean excluirRegistro() {\n this.produto.excluir();\n return true;\n }",
"public boolean removeClient(String nickname) {\n\t\ttry{\n\t\t\t// Implementacao JavaSpaces\n//\t\t\tif(space != null){\n//\t\n//\t\t\t\tClient client = new Client(nickname);\n//\t\t\t\tClient clientFromSpace = (Client) space.take(client, null, Long.MAX_VALUE);\n//\t\t\t\tClient clientFromMap = clients.get(nickname);\n//\t\t\t\t\n//\t\t\t\tif (!clientExists(clientFromSpace) && !clientExists(clientFromMap)) {\n//\t return true;\n//\t }\n//\t\t\t}\n\t\t\t\n\t\t\tClient clientFromMap = clients.remove(nickname);\n\t\t\t\n\t\t\tif (clientExists(clientFromMap)) {\n\t\t\t\treturn true;\n\t\t }\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(e.getMessage());\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn false;\n\t}",
"@Override\r\n public boolean isValidName(String proposedName)\r\n {\r\n assert(true);\r\n if (proposedName == null || proposedName.equals(\"\"))\r\n {\r\n return false;\r\n }\r\n \tfor (ChangableProductContainer groupImLookingAt : groups)\r\n {\r\n if (groupImLookingAt.getName().equals(proposedName))\r\n {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }",
"boolean isNameRequired();",
"protected boolean shouldDelete(String segmentsFileName) {\r\n return !segmentsFileToIDs.containsKey(segmentsFileName);\r\n }",
"boolean removeService(T service);",
"@Test\n public void userSuccessDelete() {\n String username = argument.substring(0, 15);\n\n for(int i = 0; i<users.size(); i++){\n if(users.get(i).substring(0, 15).trim().toLowerCase().contains(username.trim().toLowerCase())){\n users.remove(i);\n }\n }\n boolean Exists = Actions.searchArray(users, username);\n assertFalse(\"User Deleted\", Exists);\n }",
"public boolean verificaUnicidadeNome() {\n\t\tif(!EntidadesDAO.existeNome(entidades.getNome())) {\n\t\t\treturn true;\n\t\t}else {\n\t\t\treturn false;\n\t\t}\n\t}",
"boolean hasDeleteSensor();",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof ServiceInstance)) {\n return false;\n }\n ServiceInstance other = (ServiceInstance) object;\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\n return false;\n }\n return true;\n }",
"public boolean verificarNombre(String nombreEtiqueta){\n for(int i = 0;i < this.listaEtiquetas.size();i++){\n if(this.listaEtiquetas.get(i).getEtiqueta().equals(nombreEtiqueta)){ //Si existe el nombre en la lista de etiquetas\n return true;\n }\n }\n return false;\n }",
"public void disabilitaRegolaConDispositivo(String nomeDispositivo) {\n String[] regole = readRuleFromFile().split(\"\\n\");\n for (String s : regole) {\n try {\n ArrayList<String> disps = verificaCompRegola(s);\n\n if (disps.contains(nomeDispositivo)) {\n cambiaAbilitazioneRegola(s,false);\n }\n\n } catch (Exception e) {\n String msg = e.getMessage();\n }\n\n if (s.contains(nomeDispositivo)) {\n cambiaAbilitazioneRegola(s, false);\n }\n }\n }",
"@Test\n\tpublic void removeServiceByQuery() throws JSONException, ConfigurationException, InvalidServiceDescriptionException, ExistingResourceException, ParseException{\n\t\tint size = 10;\n\t\tJSONArray ja = TestValueConstants.getDummyJSONArrayWithMandatoryAttributes(size);\n\t\tfor (int i = 0; i < ja.length(); i++) {\n\t\t\tadminMgr.addService(ja.getJSONObject(i));\n\t\t}\n\t\tassertEquals(10, adminMgr.findAll().size());\n\t\t//this should remove everything\n\t\tadminMgr.removeServices(new JSONObject());\n\t\tassertEquals(0, adminMgr.findAll().size());\n\t}",
"public boolean bajaCliente(String nombreCliente){\r\n\t\t//TODO Implementar metodo\r\n\t\tthrow new IllegalStateException();\r\n\t}",
"public boolean deleteProduct(Product s) {\n for (int i = 0; i < products.size(); i++) {\n if (products.get(i).equals(s)){\n products.remove(i);\n return true;\n }\n }\n return false;\n }",
"boolean hasDataName();",
"public abstract boolean remove(String name);",
"public boolean isOKToRemove(){\n return ( this == Acked || this == Expired || this == DLCMessage);\n }",
"boolean existe(String nombre);",
"private boolean isNameUnique(String name) {\n boolean isUnique = true;\n for (User user : this.users) {\n if (user.getName().equals(name)) {\n isUnique = false;\n break;\n }\n }\n return isUnique;\n }",
"boolean hasParameterName();",
"public void verifyToDoNotExist(String todoName) {\n try {\n getLogger().info(\"Verify deleted todo: \" + todoName);\n boolean isExisted = false;\n for (int i = 0; i < eleToDoNameRow.size(); i++) {\n if (todoName.equals(getTextByAttributeValue(eleToDoNameRow.get(i), \"Todo expected not Exist\"))) {\n AbstractService.sStatusCnt++;\n NXGReports.addStep(\"Fail: Todo still existed: \" + todoName, LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n isExisted = true;\n }\n }\n if (!isExisted) {\n NXGReports.addStep(\"Todo deleted success\", LogAs.PASSED, null);\n }\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }",
"public static boolean isNameUnique(int ID, String name) throws IOException {\r\n if (pcQD == null) throw new IOException(\"Can't verify new component\");\r\n for (QuickDic qd : pcQD)\r\n if (qd.getID() != ID && qd.getFirstVal().equalsIgnoreCase(name))\r\n return false;\r\n return true;\r\n }",
"@Override\n\tpublic boolean deleteObraRecursoEquipo(ObraRecursoPersonaDTO dto) {\n\t\treturn false;\n\t}",
"private boolean validarCliente() {\n for (Cliente itemCliente : clienteList){\n if (cliente.getText().toString().equals(itemCliente.getClie_nombre())){\n clienteSeleccionado = itemCliente;\n return true;\n }\n }\n new Mensaje(getApplicationContext()).mensajeToas(\"El cliente no esta registrado\");\n return false;\n }",
"Boolean remover(String userName, Long idProducto);",
"public boolean setServices(ServiceCombo aNewServices)\n {\n boolean wasSet = false;\n if (aNewServices != null)\n {\n services = aNewServices;\n wasSet = true;\n }\n return wasSet;\n }",
"private boolean validParams(String name, String company) {\n\t\treturn (name != null && !name.trim().equals(\"\")) \n\t\t\t\t&& (company != null && !company.trim().equals(\"\"));\n\t}",
"public boolean containsKey(String NautiLODName) {\n for (NautiLODResult NautiLODI : this)\n if (NautiLODI.name.equals(NautiLODName))\n // Found an instance with the specified name\n return true;\n // No matching instance for specified name\n return false;\n }",
"@Override\n public boolean equals(Object o) {\n if (this == o) {\n return true;\n }\n if (!(o instanceof ChefService)) {\n return false;\n }\n return id != null && id.equals(((ChefService) o).id);\n }"
] | [
"0.6073742",
"0.57698905",
"0.56963414",
"0.5683964",
"0.5660456",
"0.5647944",
"0.5647944",
"0.5627774",
"0.5616336",
"0.5571077",
"0.5557093",
"0.5512538",
"0.549289",
"0.54095125",
"0.53801453",
"0.5378807",
"0.5363696",
"0.53557247",
"0.5346006",
"0.53337455",
"0.5320696",
"0.53060865",
"0.5301143",
"0.5286175",
"0.52810645",
"0.52752554",
"0.5268991",
"0.5267419",
"0.52671474",
"0.5265996",
"0.5265996",
"0.5265996",
"0.5265996",
"0.5265996",
"0.5265996",
"0.5265996",
"0.5265996",
"0.5265996",
"0.5265996",
"0.5265996",
"0.5265996",
"0.5265996",
"0.5265996",
"0.5265996",
"0.5265996",
"0.5265996",
"0.5265996",
"0.5265996",
"0.5265996",
"0.5265996",
"0.5265996",
"0.5265996",
"0.5248935",
"0.5245121",
"0.52424246",
"0.52392143",
"0.523289",
"0.5206568",
"0.5203762",
"0.51943773",
"0.5187889",
"0.51860183",
"0.5183082",
"0.5170897",
"0.5162237",
"0.5162237",
"0.5162237",
"0.5162237",
"0.5162237",
"0.515395",
"0.51463675",
"0.51427436",
"0.5136868",
"0.5136442",
"0.512118",
"0.51116055",
"0.5099375",
"0.5096773",
"0.5073385",
"0.5072329",
"0.5068638",
"0.50681114",
"0.50566584",
"0.5053535",
"0.50348014",
"0.5024573",
"0.5024223",
"0.5002751",
"0.5000909",
"0.4995583",
"0.4992924",
"0.49905357",
"0.49766654",
"0.4975352",
"0.49708933",
"0.49622568",
"0.49619305",
"0.49565893",
"0.49478793",
"0.49466443"
] | 0.6140372 | 0 |
private int epsg = 4326; Instantiates a new Bounding box. | public BoundingBox(double minX, double minY, double maxX, double maxY) {
this.setMinX(minX);
this.setMinY(minY);
this.setMaxX(maxX);
this.setMaxY(maxY);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public BoundingBox()\n\t{\n\t\tcenter = new Vector2(0.0, 0.0);\n\t\twidth = 1.0;\n\t\theight = 1.0;\n\t}",
"public BoundingBox(Vector2 c, double w, double h)\n\t{\n\t\tcenter = c;\n\t\twidth = w;\n\t\theight = h;\n\t}",
"public GeographicBoundingBox getBoundingBox()\r\n {\r\n return myBoundingBox;\r\n }",
"public BoundingBox(WGS84Point p1, WGS84Point p2) {\n this(p1.getLatitude(), p2.getLatitude(), p1.getLongitude(), p2.getLongitude());\n }",
"public GJBox2D boundingBox() {\n\t\tdouble xmin = Double.MAX_VALUE;\n\t\tdouble ymin = Double.MAX_VALUE;\n\t\tdouble xmax = Double.MIN_VALUE;\n\t\tdouble ymax = Double.MIN_VALUE;\n\n\t\t// coordinates of current point\n\t\tdouble x, y;\n\t\t\n\t\t// Iterate on each control point of each segment\n\t\tfor (Segment seg : this.segments) {\n\t\t\tfor (GJPoint2D p : seg.controlPoints()) {\n\t\t\t\t// get current coordinates\n\t\t\t\tx = p.x();\n\t\t\t\ty = p.y();\n\t\t\t\t\n\t\t\t\t// update bounds\n\t\t\t\txmin = Math.min(xmin, x);\n\t\t\t\tymin = Math.min(ymin, y);\n\t\t\t\txmax = Math.max(xmax, x);\n\t\t\t\tymax = Math.max(ymax, y);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// createFromCollection a new GJBox2D with the bounds\n\t\treturn new GJBox2D(xmin, xmax, ymin, ymax);\n\t}",
"public void addBoundingBox() {\n abstractEditor.drawNewShape(new EBoundingBoxDT());\n }",
"public BoundingBox(Rectangle r) {\n\t\tthis(new Coord(r.x, r.y), r.width, r.height);\n\t}",
"public void computeBoundingBox() {\n\taveragePosition = new Point3(center);\n tMat.rightMultiply(averagePosition);\n \n minBound = new Point3(Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY);\n maxBound = new Point3(Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY);\n // Initialize\n Point3[] v = new Point3[8];\n for (int i = 0; i < 8; i++)\n \tv[i] = new Point3(center);\n // Vertices of the box\n v[0].add(new Vector3(-radius, -radius, -height/2.0));\n v[1].add(new Vector3(-radius, radius, -height/2.0));\n v[2].add(new Vector3(radius, -radius, -height/2.0));\n v[3].add(new Vector3(radius, radius, -height/2.0));\n v[4].add(new Vector3(-radius, -radius, height/2.0));\n v[5].add(new Vector3(-radius, radius, height/2.0));\n v[6].add(new Vector3(radius, -radius, height/2.0));\n v[7].add(new Vector3(radius, radius, height/2.0));\n // Update minBound and maxBound\n for (int i = 0; i < 8; i++)\n {\n \ttMat.rightMultiply(v[i]);\n \tif (v[i].x < minBound.x)\n \t\tminBound.x = v[i].x;\n \tif (v[i].x > maxBound.x)\n \t\tmaxBound.x = v[i].x;\n \tif (v[i].y < minBound.y)\n \t\tminBound.y = v[i].y;\n \tif (v[i].y > maxBound.y)\n \t\tmaxBound.y = v[i].y;\n \tif (v[i].z < minBound.z)\n \t\tminBound.z = v[i].z;\n \tif (v[i].z > maxBound.z)\n \t\tmaxBound.z = v[i].z;\n }\n \n }",
"public BoundingBox(double centerX, double centerY, double w, double h)\n\t{\n\t\tcenter = new Vector2(centerX, centerY);\n\t\twidth = w;\n\t\theight = h;\n\t}",
"public BoundingBox(int x0, int y0, int width, int height) {\n\t\tthis(new Coord(x0, y0), width, height);\n\t}",
"public Rectangle getBoundingBox() {\n return new Rectangle(this);\r\n }",
"public LatLngBounds setupBounds(){\n\t\t\n\t\t\n\t\tdouble deltaLat = 0.000015; // correction value\n\t\t\n\t\tLatLng northEast = new LatLng(60.1876397959336 + (2.4 * deltaLat), 24.8207008838576);\n\t\tLatLng southWest = new LatLng(60.1866756699501 + deltaLat, 24.8172971606177);\n\t\t\n\t\t\n\t\t// 60.1866756699501\n\t\treturn new LatLngBounds(southWest, northEast);\n\t}",
"public GeometryBoundingBox(double west, double south, double east, double north) {\n this(west, south, east, north, null, null);\n }",
"public GeometryBoundingBox(double west, double south, double east, double north, Double minAltitude,\n Double maxAltitude) {\n this.west = west;\n this.south = south;\n this.east = east;\n this.north = north;\n this.minAltitude = minAltitude;\n this.maxAltitude = maxAltitude;\n }",
"public BoundingBox(Coord origin, int width, int height) {\n\t\tsuper();\n\t\tthis.origin = origin;\n\t\tthis.width = width;\n\t\tthis.height = height;\n\t}",
"public Rectangle getBoundingBox() {\n return location;\n }",
"protected Envelope parseBoundingBox( Element element, CoordinateSystem defaultCoordinateSystem )\n throws XMLParsingException,\n InvalidParameterValueException {\n\n // Envelope env = getWGS84BoundingBoxType( element );\n\n String crsAtt = element.getAttribute( \"crs\" );\n CoordinateSystem crs = null;\n if ( crsAtt == null ) {\n crs = defaultCoordinateSystem;\n } else {\n try {\n crs = CRSFactory.create( crsAtt );\n } catch ( UnknownCRSException e ) {\n throw new InvalidParameterValueException( e.getMessage() );\n }\n }\n\n double[] lowerCorner = XMLTools.getRequiredNodeAsDoubles( element,\n PRE_OWS + \"LowerCorner/text()\",\n nsContext,\n \" \" );\n if ( lowerCorner.length < 2 ) {\n throw new XMLParsingException( Messages.getMessage( \"WPVS_NO_VALID_BBOX_POINT\", PRE_OWS + \"LowerCorner\" ) );\n }\n double[] upperCorner = XMLTools.getRequiredNodeAsDoubles( element,\n PRE_OWS + \"UpperCorner/text()\",\n nsContext,\n \" \" );\n if ( upperCorner.length < 2 ) {\n throw new XMLParsingException( Messages.getMessage( \"WPVS_NO_VALID_BBOX_POINT\", PRE_OWS + \"UpperCorner\" ) );\n }\n if ( upperCorner.length != lowerCorner.length ) {\n throw new XMLParsingException( Messages.getMessage( \"WPVS_DIFFERENT_BBOX_DIMENSIONS\",\n PRE_OWS + \"LowerCorner\",\n PRE_OWS + \"UpperCorner\" ) );\n }\n\n for ( int i = 0; i < upperCorner.length; ++i ) {\n if ( lowerCorner[i] >= upperCorner[i] ) {\n throw new InvalidParameterValueException( Messages.getMessage( \"WPVS_WRONG_BBOX_POINT_POSITIONS\",\n new Integer( i ),\n new Double( lowerCorner[i] ),\n PRE_OWS + \"LowerCorner\",\n new Double( upperCorner[i] ),\n PRE_OWS + \"UpperCorner\" ) );\n\n }\n }\n\n return GeometryFactory.createEnvelope( lowerCorner[0], lowerCorner[1], upperCorner[0], upperCorner[1], crs );\n\n }",
"public Box() {\n \tsuper();\n \tthis.max = new Point3d( 1, 1, 1 );\n \tthis.min = new Point3d( -1, -1, -1 );\n }",
"RectangleLatLng getBounds();",
"public void constructBoundingBox()\r\n\t{\n\t\tdouble a = m_Qmin.x;\r\n\t\tdouble b = m_Qmin.y;\r\n\t\tdouble c = m_Qmin.z;\r\n\r\n\t\tdouble d = m_Qmax.x;\r\n\t\tdouble e = m_Qmax.y;\r\n\t\tdouble f = m_Qmax.z;\r\n\r\n\t\t//constructing the vertexes of the bounding box\r\n\t\tSceneVertex A = new SceneVertex( new Vector3d(a, b, c));\r\n\t\tSceneVertex B = new SceneVertex( new Vector3d(d, b, c));\r\n\t\tSceneVertex C = new SceneVertex( new Vector3d(d, b, f));\r\n\t\tSceneVertex D = new SceneVertex( new Vector3d(d, e, f));\r\n\t\tSceneVertex E = new SceneVertex( new Vector3d(a, e, f));\r\n\t\tSceneVertex F = new SceneVertex( new Vector3d(a, e, c));\r\n\t\tSceneVertex G = new SceneVertex( new Vector3d(d, e, c));\r\n\t\tSceneVertex H = new SceneVertex( new Vector3d(a, b, f));\r\n\r\n\r\n\t\t// building the vertices arrays for the faces\r\n\t\tArrayList<SceneVertex> verArrP0front = new ArrayList<SceneVertex>(4);\r\n\t\tverArrP0front.add(A);\r\n\t\tverArrP0front.add(B);\r\n\t\tverArrP0front.add(G);\r\n\t\tverArrP0front.add(F);\r\n\t\t\r\n\t\tArrayList<SceneVertex> verArrP1left = new ArrayList<SceneVertex>(4);\r\n\t\tverArrP1left.add(A);\r\n\t\tverArrP1left.add(F);\r\n\t\tverArrP1left.add(E);\r\n\t\tverArrP1left.add(H);\r\n\t\t\r\n\t\tArrayList<SceneVertex> verArrP2back = new ArrayList<SceneVertex>(4);\r\n\t\tverArrP2back.add(H);\r\n\t\tverArrP2back.add(C);\r\n\t\tverArrP2back.add(D);\r\n\t\tverArrP2back.add(E);\r\n\t\t\r\n\t\tArrayList<SceneVertex> verArrP3right = new ArrayList<SceneVertex>(4);\r\n\t\tverArrP3right.add(G);\r\n\t\tverArrP3right.add(D);\r\n\t\tverArrP3right.add(C);\r\n\t\tverArrP3right.add(B);\r\n\t\t\r\n\t\tArrayList<SceneVertex> verArrP4bottom = new ArrayList<SceneVertex>(4);\r\n\t\tverArrP4bottom.add(A);\r\n\t\tverArrP4bottom.add(H);\r\n\t\tverArrP4bottom.add(C);\r\n\t\tverArrP4bottom.add(B);\r\n\r\n\t\tArrayList<SceneVertex> verArrP5top = new ArrayList<SceneVertex>(4);\r\n\t\tverArrP5top.add(F);\r\n\t\tverArrP5top.add(G);\r\n\t\tverArrP5top.add(D);\r\n\t\tverArrP5top.add(E);\r\n\t\t\r\n\t\t// creating BoundingBox\r\n\t\tm_BoundingBox = new SceneNode(DrawingMode.GL_LINE, \"BoundingBox\", null);\r\n\t\tm_BoundingBox.addChild( new ScenePolygon(verArrP0front, \"FRONT\"));\r\n\t\tm_BoundingBox.addChild( new ScenePolygon(verArrP1left, \"LEFT\"));\r\n\t\tm_BoundingBox.addChild( new ScenePolygon(verArrP2back, \"BACK\"));\r\n\t\tm_BoundingBox.addChild( new ScenePolygon(verArrP3right, \"RIGHT\"));\r\n\t\tm_BoundingBox.addChild( new ScenePolygon(verArrP4bottom, \"BOTTOM\"));\r\n\t\tm_BoundingBox.addChild( new ScenePolygon(verArrP5top, \"TOP\"));\r\n\r\n\t\t\r\n\t}",
"private BioMightBoundBoxes setupDefaultBoundBoxes() \r\n\t{\r\n\t\t// Set up the collection to hold the Bounding Boxes\r\n\t\tBioMightBoundBoxes bioBoundBoxes = null;\r\n\t\r\n\t\t// Initialize the position of the bounding box vars\r\n\t\tBigDecimal xPos = new BigDecimal(0.0);\r\n\t\tBigDecimal yPos = new BigDecimal(0.0);\r\n\t\tBigDecimal zPos= new BigDecimal(0.0);\r\n\t\t\r\n\t\t// Set to base 1x1x1 cube\r\n\t\tBigDecimal xVector= new BigDecimal(1.0);\r\n\t\tBigDecimal yVector= new BigDecimal(1.0); \r\n\t\tBigDecimal zVector= new BigDecimal(1.0);\r\n\t\r\n\t\t// Initialize a BoundBox\r\n\t\tBioMightBoundBox bioBoundBox = null;\r\n\t\r\n\t\t// Initialize Connectors \r\n\t\tBioMightConnectors bioMightConnectors = null; \r\n\r\n\t\t// Initialize a Connector \r\n\t\tBioMightConnector bioMightConnector= null;\r\n\t\r\n\t\tdouble circumference = 0.0;\r\n\t\tdouble[] startPos = {0.0, 0.0, 0.0};\r\n\t\tdouble[][] startPoints = null;\r\n\t\r\n\t\t//********************************************************************* \r\n\t\t// LEFT FOOT BOUNDBOX\r\n\t\t// Set up the Bounding Box for the Feet\r\n\t\t// The connector for this will come from the incoming Bound Box\r\n\t\t// Both are defined like and bolt and they lock into position at the\r\n\t\t// interestion of both connectors\r\n\t\t//**********************************************************************\r\n\t\txPos = new BigDecimal(0.0);\r\n\t\tyPos = new BigDecimal(-65.0);\r\n\t\tzPos= new BigDecimal(3.0);\r\n\t\r\n\t\txVector= new BigDecimal(1.0);\r\n\t\tyVector= new BigDecimal(4.0); \r\n\t\tzVector= new BigDecimal(1.0);\r\n\r\n\t\tbioBoundBox = new BioMightBoundBox(xPos, yPos, zPos, xVector, yVector, zVector);\r\n\t\tbioMightConnectors = new BioMightConnectors();\r\n\t\r\n\t\t// Feet Epithelium Connector\r\n\t\tcircumference = 0.3;\r\n\t\tstartPos = getStartPoints(-2.0, -65.0, -1.0);\r\n\t\tstartPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\tbioMightConnector = new BioMightConnector(startPoints, Constants.FootEpitheliumRef,\"connType\");\r\n\t\tbioMightConnectors.setBioMightConnector(Constants.FootEpitheliumRef, bioMightConnector);\r\n\t\t\r\n\t\t// Associate the connector on the Box\r\n\t\tbioBoundBox.setBioMightConnectors(bioMightConnectors);\r\n\t\t\r\n\t\t// Put the Bounding Box in the collection\r\n\t\tbioBoundBoxes.setBoundingBox(Constants.LeftFootRef, bioBoundBox);\r\n\t\r\n\t\r\n\t\t//********************************************************************* er\r\n\t\t// RIGHT CNEMES BOUNDBOX\r\n\t\t// Set up the Bounding Box for the Foot\r\n\t\t// On a porportioned human, the \r\n\t\t//**********************************************************************\r\n\t\txPos = new BigDecimal(0.0);\r\n\t\tyPos = new BigDecimal(-14.0);\r\n\t\tzPos= new BigDecimal(-3.0);\r\n\t\r\n\t\txVector= new BigDecimal(1.0);\r\n\t\tyVector= new BigDecimal(4.0); \r\n\t\tzVector= new BigDecimal(1.0);\r\n\r\n\t\tbioBoundBox = new BioMightBoundBox(xPos, yPos, zPos, xVector, yVector, zVector);\r\n\t\tbioMightConnectors = new BioMightConnectors();\r\n\t\t\r\n\t\t// Foot Epithelium Connector\r\n\t\tcircumference = 0.3;\r\n\t\tstartPos = getStartPoints(2.0, -65.0, -1.0);\r\n\t\tstartPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\tbioMightConnector = new BioMightConnector(startPoints, Constants.FootEpitheliumRef,\"connType\");\r\n\t\tbioMightConnectors.setBioMightConnector(Constants.FootEpitheliumRef, bioMightConnector);\r\n\t\r\n\t\t// Associate the connector on the Box\r\n\t\tbioBoundBox.setBioMightConnectors(bioMightConnectors);\r\n\t\t\r\n\t\t// Put the Bounding Box in the collection\r\n\t\tbioBoundBoxes.setBoundingBox(Constants.RightFootRef, bioBoundBox);\r\n\t\r\n\t\t// return the collection that holds both foot bound boxes\r\n\t\treturn (bioBoundBoxes);\r\n\t}",
"public BoundingBox getBoundingBox ( ) {\n\t\t// TODO: backwards compatibility required\n\t\treturn invokeSafe ( \"getBoundingBox\" );\n\t}",
"@Override\n \tpublic Rectangle2D GetBoundingBox() {\n\t\treturn null;\n \t}",
"Rectangle getBoundingBox(Rectangle rect);",
"public BoundingBox3d() {\n reset();\n }",
"public ReferencedEnvelope getBounds(){\n if(bounds==null){\n // Create Null envelope\n this.bounds = new ReferencedEnvelope(getCRS());\n // First try to find the BBOX definition in the gisNode directly\n try{\n if(gisNode.hasProperty(INeoConstants.PROPERTY_BBOX_NAME)){\n double[] bbox = (double[])gisNode.getProperty(INeoConstants.PROPERTY_BBOX_NAME);\n this.bounds = new ReferencedEnvelope(bbox[0],bbox[1],bbox[2],bbox[3],crs);\n }else{\n System.err.println(\"No BBox defined in the GeoNeo object\");\n }\n }catch(Exception bbox_e){\n System.err.println(\"Failed to interpret BBOX: \"+bbox_e.getMessage());\n bbox_e.printStackTrace(System.err);\n }\n // Secondly, if bounds is still empty, try find all feature geometries and calculate bounds\n try{\n if(this.bounds.isNull()){\n // Try to create envelope from any data referenced by the gisNode\n for(GeoNode node:getGeoNodes()){\n //TODO: support high dimensions\n this.bounds.expandToInclude(node.getCoords()[0], node.getCoords()[1]);\n }\n }\n }catch(Exception bbox_e){\n System.err.println(\"Failed to interpret BBOX: \"+bbox_e.getMessage());\n bbox_e.printStackTrace(System.err);\n }\n }\n return bounds;\n }",
"private HashMap setupBoundBoxes(BioMightBoundBox bioMightBoundBoxIn) \r\n\t{\r\n\t\t// Set up the bounding boxes for the various components\r\n\t\t// The various components locations will be driven by the\r\n\t\t// bounding boxes\r\n\t\tHashMap boundingBoxMap = new HashMap();\r\n\t\t\r\n\t\t// Initialize the position of the bounding box vars\r\n\t\tBigDecimal xPos = new BigDecimal(0.0);\r\n\t\tBigDecimal yPos = new BigDecimal(0.0);\r\n\t\tBigDecimal zPos= new BigDecimal(0.0);\r\n\t\t\t\r\n\t\t// Set to base 1x1x1 cube\r\n\t\tBigDecimal xVector= new BigDecimal(1.0);\r\n\t\tBigDecimal yVector= new BigDecimal(1.0); \r\n\t\tBigDecimal zVector= new BigDecimal(1.0);\r\n\r\n\t\t// Initialize the BoundBoxes. This is used for\r\n\t\t// collections such as arms, legs,lungs,etc\r\n\t\tBioMightBoundBoxes bioBoundBoxes = null;\r\n\t\r\n\t\t// Initialize the BoundBox\r\n\t\tBioMightBoundBox bioBoundBox = null;\r\n\r\n\t\t// Initialize the Connectors \r\n\t\tBioMightConnectors bioMightConnectors = null; \r\n\r\n\t\t// Initialize the Connector \r\n\t\tBioMightConnector bioMightConnector= null;\r\n\t\t\r\n\t\tdouble circumference = 0.0;\r\n\t\tdouble[] startPos = {0.0, 0.0, 0.0};\r\n\t\tdouble[][] startPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\t\r\n\t\t// Use the information in the incomiing Bound Box\r\n\t\t// to orientate the inner bound boxes\r\n\t\tif (bioMightBoundBoxIn != null)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Arm - SetupBoundBoxes - Incoming BoundBox: \" + \r\n\t\t\t\t\tbioMightBoundBoxIn.getXPos() + \" \" +\r\n\t\t\t\t\tbioMightBoundBoxIn.getYPos() + \" \" +\r\n\t\t\t\t\tbioMightBoundBoxIn.getZPos());\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t//********************************************************************* \r\n\t\t// EPITHELIUM BOUNDBOX\r\n\t\t// Set up the Bounding Box for the Arm\r\n\t\t// The connector for this will come from the incoming Bound Box\r\n\t\t// Both are defined like and bolt and they lock into position at the\r\n\t\t// interestion of both connectors\r\n\t\t//**********************************************************************\r\n\t\txPos = new BigDecimal(0.0);\r\n\t\tyPos = new BigDecimal(-12.0);\r\n\t\tzPos= new BigDecimal(-1.0);\r\n\t\t\r\n\t\txVector= new BigDecimal(9.0);\r\n\t\tyVector= new BigDecimal(8.0); \r\n\t\tzVector= new BigDecimal(4.0);\r\n\r\n\t\tbioBoundBox = new BioMightBoundBox(xPos, yPos, zPos, xVector, yVector, zVector);\r\n\t\tbioMightConnectors = new BioMightConnectors();\r\n\t\t\r\n\t\t// Arm Epithelium Connector\r\n\t\tcircumference = 0.3;\r\n\t\tstartPos = getStartPoints(0.0, -9.0, -1.0);\r\n\t\tstartPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\tbioMightConnector = new BioMightConnector(startPoints, \"ArmEpithelialCell\",\"connType\");\r\n\t\tbioMightConnectors.setBioMightConnector(\"ArmEpithelialCell\", bioMightConnector);\r\n\t\t\t\r\n\t\tbioBoundBox.setBioMightConnectors(bioMightConnectors);\r\n\t\t\r\n\t\tboundingBoxMap.put(Constants.ArmEpitheliumRef, bioBoundBox);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\r\n\t\t//********************************************************************* \r\n\t\t// ARMS BOUND BOXES\r\n\t\t// Set up the Bounding Box for the Bronchi\r\n\t\t// On a porportioned human, the Bronchi are located in the --- \r\n\t\t//**********************************************************************\r\n\t\t\r\n\t\t//********************************************************************* \r\n\t\t// LEFT ARMS BOUNDBOX\r\n\t\t// Set up the Bounding Box for the Left Arm\r\n\t\t// On a porportioned human, the Bronchi are located in the --- \r\n\t\t//**********************************************************************\r\n\t\txPos = new BigDecimal(1.0);\r\n\t\tyPos = new BigDecimal(-11.0);\r\n\t\tzPos= new BigDecimal(-3.5);\r\n\t\t\r\n\t\txVector= new BigDecimal(2.0);\r\n\t\tyVector= new BigDecimal(2.0); \r\n\t\tzVector= new BigDecimal(2.0);\r\n\r\n\t\tbioBoundBoxes = new BioMightBoundBoxes();\r\n\t\t\r\n\t\tbioBoundBox = new BioMightBoundBox(xPos, yPos, zPos, xVector, yVector, zVector);\r\n\t\tbioMightConnectors = new BioMightConnectors();\r\n\t\t\t\r\n\t\t// ArmEpithelium Connector\r\n\t\tcircumference = 0.3;\r\n\t\tstartPos = getStartPoints(0.0, -8.0, -1.0);\r\n\t\tstartPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\tbioMightConnector = new BioMightConnector(startPoints, Constants.ArmEpitheliumRef,\"connType\");\r\n\t\tbioMightConnectors.setBioMightConnector(Constants.ArmEpitheliumRef, bioMightConnector);\r\n\t\t\t\r\n\t\tbioBoundBox.setBioMightConnectors(bioMightConnectors);\r\n\t\t\t\r\n\t\t// Put the Bounding Box into the Collection of Bounding Boxes \r\n\t\tbioBoundBoxes.setBoundingBox(Constants.LeftArmRef, bioBoundBox);\t\r\n\r\n\t\t//********************************************************************* \r\n\t\t// RIGHT ARMS BOUNDBOX\r\n\t\t// Set up the Bounding Box for the Bronchi\r\n\t\t// On a porportioned human, the Bronchi are located in the --- \r\n\t\t//**********************************************************************\r\n\t\txPos = new BigDecimal(-1.0);\r\n\t\tyPos = new BigDecimal(-11.0);\r\n\t\tzPos= new BigDecimal(-3.5);\r\n\t\t\r\n\t\txVector= new BigDecimal(2.0);\r\n\t\tyVector= new BigDecimal(2.0); \r\n\t\tzVector= new BigDecimal(2.0);\r\n\r\n\t\tbioBoundBox = new BioMightBoundBox(xPos, yPos, zPos, xVector, yVector, zVector);\r\n\t\tbioMightConnectors = new BioMightConnectors();\r\n\t\t\t\r\n\t\t// ArmEpithelium Connector\r\n\t\tcircumference = 0.3;\r\n\t\tstartPos = getStartPoints(0.0, -8.0, -1.0);\r\n\t\tstartPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\tbioMightConnector = new BioMightConnector(startPoints, Constants.ArmEpitheliumRef,\"connType\");\r\n\t\tbioMightConnectors.setBioMightConnector(Constants.ArmEpitheliumRef, bioMightConnector);\r\n\t\t\t\r\n\t\tbioBoundBox.setBioMightConnectors(bioMightConnectors);\r\n\t\t\r\n\t\t// Put the Bounding Box into the Collection of Bounding Boxes \r\n\t\tbioBoundBoxes.setBoundingBox(Constants.RightArmRef, bioBoundBox);\t\t\r\n\r\n\t\t// Put the BioMight BoundBoxes for the Bronchi \r\n\t\t// into the BoundingBoxMap \r\n\t\tboundingBoxMap.put(Constants.BronchiRef, bioBoundBoxes);\t\t\r\n\t\t\r\n\t\t\r\n\t\treturn (boundingBoxMap);\r\n\t}",
"@Override\n\tpublic BoundaryRectangle getBoundingBox() {\n\t\treturn new BoundaryRectangle(0, 0, drawView.getWidth(), drawView.getHeight());\n\t}",
"public EarthGeometry(){\n\t\tgcl1 = new GeodeticCalculator();\n\t\trnd1 = new Random(56789);\n\t}",
"@Override\n\tpublic Rectangle getBoundingBox() {\n\t\tRectangle rectangle = new Rectangle(this.image.getWidth(), this.image.getWidth());\n\t\trectangle.setLocation(this.position);\n\t\treturn rectangle;\n\t}",
"private void updateBoundingBox(GM_Object geo) {\r\n double minx_ = 0; double miny_ = 0;\r\n double maxx_ = 0; double maxy_ = 0;\r\n \r\n if ( geo instanceof GM_Point ) {\r\n minx_ = ((GM_Point)geo).getX();\r\n miny_ = ((GM_Point)geo).getY();\r\n maxx_ = ((GM_Point)geo).getX();\r\n maxy_ = ((GM_Point)geo).getY();\r\n } else {\r\n GM_Envelope tmp = geo.getEnvelope();\r\n minx_ = tmp.getMin().getX();\r\n miny_ = tmp.getMin().getY();\r\n maxx_ = tmp.getMax().getX();\r\n maxy_ = tmp.getMax().getY();\r\n }\r\n \r\n if ( minx_ < minx ) minx = minx_;\r\n if ( maxx_ > maxx ) maxx = maxx_;\r\n if ( miny_ < miny ) miny = miny_;\r\n if ( maxy_ > maxy ) maxy = maxy_;\r\n }",
"public static void main(String[] args) {\n\t\tint numberCoords = 4;\n\t\tdouble[] boundBox = new double[4];\n\t\t\n\t\t\n\t\t\t\tif(args.length > 0){\n\t\t\tif(args.length < 4){\n\t\t\t\tSystem.err.println(\"not correct number of arguments\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tdouble args0 = Double.parseDouble(args[0]);\n\t\t\tdouble args1 = Double.parseDouble(args[1]);\n\t\t\tdouble args2 = Double.parseDouble(args[2]);\n\t\t\tdouble args3 = Double.parseDouble(args[3]);\n\t\t\t\n\t\t\tboundBox[0] = args0; //southwest\n\t\t\tboundBox[1] = args1;\n\t\t\tboundBox[2] = args2; //northeast 42.7125\n\t\t\tboundBox[3] = args3;\n\t\t}else{\n\t\t\n\t\t\n\t\tSystem.out.println(\"Enter the four coordinate for the bounding box: \\n\");\n\t\t//ask user for the bounding box\n\t\tfor(int i = 0; i < numberCoords; i++){\n\t\t\t\n\t\t\t//getting user input\n\t\t\tScanner reader = new Scanner(System.in); // Reading from System.in\n\t\t\t\n\t\t\tif(i < 2){\n\t\t\t\tif(i==0)\n\t\t\t\t\tSystem.out.println(\"lat1: \");\n\t\t\t\tif(i==1)\n\t\t\t\t\tSystem.out.println(\"long1: \");\n\t\t\t}else{\n\t\t\t\tif(i==2)\n\t\t\t\t\tSystem.out.println(\"lat2: \");\n\t\t\t\tif(i==3)\n\t\t\t\t\tSystem.out.println(\"long2: \");\n\t\t\t}\n\t\t\tboundBox[i] = reader.nextInt(); \n\t\t}\n\t\t\n\t }\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t// random bounding box coordinates\n\t\t//South Latitude, West Longitude, North Latitude, East Longitude\n\t\t// 45.219,-122.325,47.610,-122.107\n\t\tboundBox[0] = 42.712439; //southwest\n\t\tboundBox[1] = -71.693370;\n\t\tboundBox[2] = 42.712439; //northeast 42.7125\n\t\tboundBox[3] = -71.693370;\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tAerialData aData = null;\n\t\tdouble currentLat;\n\t\tdouble currentLong;\n\t\tdouble[] currentCenter = new double[]{boundBox[0], boundBox[1]};\n\t\tString centerString;\n\t\tString data;\n\t\tString image;\n\t\t\n\t\t// get all of the images and put in a 2D array\n\t\tArrayList<ArrayList<BufferedImage>> listOfListImages = new ArrayList<ArrayList<BufferedImage>>(); \n\t\t\n\t\twhile(currentCenter[0] <= boundBox[2]){\n\t\t\t\n\t\t\t// resetting the current long\n\t\t\tcurrentCenter[1] = boundBox[1];\n\t\t\t\n\t\t\t// the row we will add images to\n\t\t\tArrayList<BufferedImage> currentRow = new ArrayList<BufferedImage>(); \n\t\t\t\n\t\t\twhile(currentCenter[1] <= boundBox[3]){\n\t\t\t\t\n\t\t\t\t// this is the start point\n\t\t\t\tcenterString = currentCenter[0] + \",\" + currentCenter[1];\n\t\t\t\t\n\t\t\t\t// build request for image\n\t\t\t\tdata = buildRequest(centerString,\"1\");\n\t\t\t\timage = buildRequest(centerString,\"0\");\n\t\t\t\t\n\t\t\t\t// creating the image\n\t\t\t\taData = new AerialData(data);\n\t\t\t\tAerialImage aImage = new AerialImage(image);\n\t\t\t\t\n\t\t\t\t//adding the new image to the list\n\t\t\t\tcurrentRow.add(aImage.getImage());\n\t\t\t\t\n\t\t\t\t// incrementing the longitude\n\t\t\t\tcurrentCenter[1] = aData.getNextLong();\n\t\t\t}\n\t\t\t\n\t\t\tif(aData == null){\n\t\t\t// incrementing the longitude\n\t\t\tSystem.err.println(\"there is not image in those bounds\");\n\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tcurrentCenter[0] = aData.getNextLat();\n\t\t\tlistOfListImages.add(currentRow);\n\t\t}\n\t\t\n\t\t//could to checking to make sure all columns are same number\n\t\t\n\t\t// number of pixels in image is 350\n\t\tint numberPixelsImage = 350;\n\t\t\n\t\t//add all the images togethere\n\t\t// width is the number of column * 350\n\t\tint width = listOfListImages.get(0).size() * 350;\n\t\t//height is the number of rows * 350\n\t\tint height = listOfListImages.size() * 350;\n\t\t\n\t\t// the new image that we will layer\n\t\tBufferedImage combined = new BufferedImage(width, height, listOfListImages.get(0).get(0).getType());\n\t\t\n\t\tGraphics graphics = combined.getGraphics();\n\t\t\n\t\tint yIndex = 0;\n\t\tint yCounter = 0;\n\t\t\n\t\tfor(int j = listOfListImages.size() - 1; j > -1; --j){\n\t\t\t\n\t\t\tfor(int i = 0; i < listOfListImages.get(j).size(); ++i){\n\t\t\t\t\n\t\t\tint xIndex = i * 350;\n\t\t\t// loop through adding the images to the finalImage\n\t\t\tgraphics.drawImage(listOfListImages.get(j).get(i), xIndex, yIndex, null);\n\n\t\t\t}\n\t\t\t\n\t\t\tyCounter++;\n\t\t\tyIndex = yCounter * 350;\n\t\t\t\n\t\t}\n\t\t\n\t\t// saving the final image\n\t\ttry {\n\t\t\tImageIO.write(combined, \"jpg\", new File(\"combined.jpeg\"));\n\t\t} catch (IOException e) {\n\t\t\t\tSystem.err.println(\"could not save image\");\n\t\t\t\te.printStackTrace();\n\t\t}\n\t\t\t\n\t}",
"private BioMightBoundBox setupDefaultBoundBox(String parentID) \r\n\t{\r\n\t\t// Initialize the position of the bounding box vars\r\n\t\tBigDecimal xPos = new BigDecimal(0.0);\r\n\t\tBigDecimal yPos = new BigDecimal(0.0);\r\n\t\tBigDecimal zPos= new BigDecimal(0.0);\r\n\t\t\r\n\t\t// Set to base 1x1x1 cube\r\n\t\tBigDecimal xVector= new BigDecimal(1.0);\r\n\t\tBigDecimal yVector= new BigDecimal(1.0); \r\n\t\tBigDecimal zVector= new BigDecimal(1.0);\r\n\t\r\n\t\t// Initialize the BoundBox\r\n\t\tBioMightBoundBox bioBoundBox = null;\r\n\t\r\n\t\t// Initialize the Connectors \r\n\t\tBioMightConnectors bioMightConnectors = null; \r\n\r\n\t\t// Initialize the Connector \r\n\t\tBioMightConnector bioMightConnector= null;\r\n\t\r\n\t\tdouble circumference = 0.0;\r\n\t\tdouble[] startPos = {0.0, 0.0, 0.0};\r\n\t\tdouble[][] startPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\t\r\n\t\t\r\n\t\t//**********************************************************************\r\n\t\t// ARMS BOUND BOX\t\t\r\n\t\t//\r\n\t\t// Set up the Bounding Box for the Arms\r\n\t\t// For default model, length of arms is 4.5\r\n\t\t//**********************************************************************\r\n\t\txPos = new BigDecimal(0.0);\r\n\t\tyPos = new BigDecimal(-15.0);\r\n\t\tzPos= new BigDecimal(-5.0);\r\n\t\r\n\t\txVector= new BigDecimal(11.5);\r\n\t\tyVector= new BigDecimal(6.0); \r\n\t\tzVector= new BigDecimal(5.0);\r\n\t\t\r\n\t\t// Setup the boundbox\r\n\t\tbioBoundBox = new BioMightBoundBox(xPos, yPos, zPos, xVector, yVector, zVector);\r\n\t\t// Set up its connectors\r\n\t\tbioMightConnectors = new BioMightConnectors();\r\n\t\t\r\n\t\t//********************************************\r\n\t\t// ARM - ORGAN CONNECTORS\r\n\t\t//********************************************\r\n\t\r\n\t\t// EpitheliumTissue Connector\r\n\t\tcircumference = 0.3;\r\n\t\tstartPos = getStartPoints(0.0, -5.0, -1.0);\r\n\t\tstartPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\tbioMightConnector = new BioMightConnector(startPoints, Constants.ArmEpitheliumRef,\"connType\");\r\n\t\tbioMightConnectors.setBioMightConnector(Constants.ArmEpitheliumRef, bioMightConnector);\r\n\t\r\n\t\t//********************************************\t\r\n\t\t// ARMS - VASCULAR CONNECTORS \r\n\t\t//********************************************\r\n\t\r\n\t\t// InternalCarotidArteryEpithelium\r\n\t\tcircumference = 0.3;\r\n\t\tstartPos = getStartPoints(0.0, -5.0, -1.0);\r\n\t\tstartPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\tbioMightConnector = new BioMightConnector(startPoints, \"InternalCarotidArteryEpithelium\",\"connType\");\r\n\t\tbioMightConnectors.setBioMightConnector(\"InternalCarotidArteryEpithelium\", bioMightConnector);\r\n\t\r\n\t\t// ExternalCarotidArteryEpithelium \r\n\t\tcircumference = 0.3;\r\n\t\tstartPos = getStartPoints(0.0, -5.0, -1.0);\r\n\t\tstartPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\tbioMightConnector = new BioMightConnector(startPoints, \"ExternalCarotidArteryEpithelium\",\"connType\");\r\n\t\tbioMightConnectors.setBioMightConnector(\"ExternalCarotidArteryEpithelium\", bioMightConnector);\r\n\t\r\n\t\t//********************************************\r\n\t\t// ARMS - MUSCULAR CONNECTORS\r\n\t\t//********************************************\r\n\r\n\t\r\n\t\t//********************************************\r\n\t\t// ARMS - SKELETAL CONNECTORS\r\n\t\t//********************************************\r\n\r\n\t\t// ThoracicVertebrae T6 \r\n\t\tcircumference = 0.3;\r\n\t\tstartPos = getStartPoints(0.0, -5.0, -1.0);\r\n\t\tstartPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\tbioMightConnector = new BioMightConnector(startPoints, \"CervicalVertebrae\",\"connType\");\r\n\t\tbioMightConnectors.setBioMightConnector(\"CervicalVertebrae\", bioMightConnector);\r\n\t\t\r\n\t\t\r\n\t\t// Stuff the Connectors into the Bounding Box \r\n\t\tbioBoundBox.setBioMightConnectors(bioMightConnectors);\r\n\t\t\r\n\t\treturn (bioBoundBox);\t\r\n\t}",
"public Bounds(double x, double y, double width, double height) {\n\t\tsuper();\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t\tthis.width = width;\n\t\tthis.height = height;\n\t}",
"private HashMap setupBoundBoxes(BioMightBoundBoxes bioMightBoundBoxesIn) \r\n\t{\r\n\t\t// Set up the bounding boxes for the various components\r\n\t\t// The various components locations will be driven by the\r\n\t\t// bounding boxes\r\n\t\tHashMap boundingBoxesMap = new HashMap();\r\n\t\r\n\t\t// Initialize the position of the bounding box vars\r\n\t\tBigDecimal xPos = new BigDecimal(0.0);\r\n\t\tBigDecimal yPos = new BigDecimal(0.0);\r\n\t\tBigDecimal zPos= new BigDecimal(0.0);\r\n\t\t\r\n\t\t// Set to base 1x1x1 cube\r\n\t\tBigDecimal xVector= new BigDecimal(1.0);\r\n\t\tBigDecimal yVector= new BigDecimal(1.0); \r\n\t\tBigDecimal zVector= new BigDecimal(1.0);\r\n\t\r\n\t\t// Initialize the BoundBoxes. These will have a bound\r\n\t\t// box for each foot by default\r\n\t\tBioMightBoundBoxes bioBoundBoxes = null;\r\n\t\r\n\t\t// Initialize the BoundBox\r\n\t\tBioMightBoundBox bioBoundBox = null;\r\n\t\r\n\t\t// Initialize the Connectors \r\n\t\tBioMightConnectors bioMightConnectors = null; \r\n\r\n\t\t// Initialize the Connector \r\n\t\tBioMightConnector bioMightConnector= null;\r\n\t\r\n\t\tdouble circumference = 0.0;\r\n\t\tdouble[] startPos = {0.0, 0.0, 0.0};\r\n\t\tdouble[][] startPoints = null;\r\n\t\tdouble[] endPos = {0.0, 0.0, 0.0};\r\n\t\tdouble[][] endPoints = null;\r\n\t\r\n\t\t// Use the information in the incoming Bound Box\r\n\t\t// to orientate the inner bound boxes\r\n\t\tif (bioMightBoundBoxesIn != null)\r\n\t\t{\r\n\t\t\t// In the default instance,there will be two bound boxes\r\n\t\t\tBioMightBoundBox bioMightBoundBoxTemp = bioMightBoundBoxesIn.getBoundingBox(Constants.LeftFootRef);\r\n\t\t\tSystem.out.println(\"LeftFoot - SetupBoundBoxes - Incoming BoundBox: \" + \r\n\t\t\t\t\tbioMightBoundBoxTemp.getXPos() + \" \" +\r\n\t\t\t\t\tbioMightBoundBoxTemp.getYPos() + \" \" +\r\n\t\t\t\t\tbioMightBoundBoxTemp.getZPos());\r\n\r\n\t\t\t// In the default instance,there will be two bound boxes\r\n\t\t\tbioMightBoundBoxTemp = bioMightBoundBoxesIn.getBoundingBox(Constants.RightFootRef);\r\n\t\t\tSystem.out.println(\"RightFoot - SetupBoundBoxes - Incoming BoundBox: \" + \r\n\t\t\t\t\tbioMightBoundBoxTemp.getXPos() + \" \" +\r\n\t\t\t\t\tbioMightBoundBoxTemp.getYPos() + \" \" +\r\n\t\t\t\t\tbioMightBoundBoxTemp.getZPos());\t\t\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Feet SetupBoundBoxes - Incoming BoundBoxes are Null\");\r\n\t\t}\r\n\t\r\n\t\r\n\t\tbioBoundBoxes = new BioMightBoundBoxes();\r\n\t\t\t\r\n\t\t//********************************************************************* \r\n\t\t// LEFT FOOT EPITHELIUM BOUNDBOX\r\n\t\t// Set up the Bounding Box for the Feet\r\n\t\t// The connector for this will come from the incoming Bound Box\r\n\t\t// Both are defined like and bolt and they lock into position at the\r\n\t\t// interestion of both connectors\r\n\t\t//**********************************************************************\r\n\t\txPos = new BigDecimal(1.0);\r\n\t\tyPos = new BigDecimal(-48.0);\r\n\t\tzPos= new BigDecimal(0.0);\r\n\t\r\n\t\txVector= new BigDecimal(1.0);\r\n\t\tyVector= new BigDecimal(4.0); \r\n\t\tzVector= new BigDecimal(1.0);\r\n\r\n\t\tbioBoundBox = new BioMightBoundBox(xPos, yPos, zPos, xVector, yVector, zVector);\r\n\t\tbioMightConnectors = new BioMightConnectors();\r\n\t\r\n\t\t// Feet Epithelium Connector\r\n\t\tcircumference = 0.3;\r\n\t\tstartPos = getStartPoints(1.0, -65.0, -1.0);\r\n\t\tstartPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\tendPos = getEndPoints(1.0, -67.50, -1.0);\r\n\t\tendPoints = BioGraphics.octogonYPlane(endPos, circumference);\r\n\t\r\n\t\tbioMightConnector = new BioMightConnector(startPoints, endPoints, Constants.FootEpitheliumRef,\"connType\");\r\n\t\tbioMightConnectors.setBioMightConnector(Constants.FootEpitheliumRef, bioMightConnector);\r\n\t\t\r\n\t\tbioBoundBox.setBioMightConnectors(bioMightConnectors);\r\n\t\t\r\n\t\t// Put the Bounding Box into the Collection of Bounding Boxes \r\n\t\tSystem.out.println(\"Adding - LeftBoundBox to bioBoundBoxes\"); \r\n\t\tbioBoundBoxes.setBoundingBox(Constants.FootEpitheliumRef, bioBoundBox);\r\n\t\t\r\n\t\t// Put the BioMight BoundBoxes for the Left Foot into the BoundingBoxMap \r\n\t\tboundingBoxesMap.put(Constants.LeftFootRef, bioBoundBoxes);\r\n\t\tSystem.out.println(\"Adding - Left Foot bioBoundBoxes into BoxesMap\"); \r\n\r\n\t\r\n\t\tbioBoundBoxes = new BioMightBoundBoxes();\r\n\t\t\t\r\n\t\t//********************************************************************* \r\n\t\t// RIGHT FOOT EPITHELIUM BOUNDBOX\r\n\t\t// Set up the Bounding Box for the Feet\r\n\t\t// The connector for this will come from the incoming Bound Box\r\n\t\t// Both are defined like and bolt and they lock into position at the\r\n\t\t// interestion of both connectors\r\n\t\t//**********************************************************************\r\n\t\txPos = new BigDecimal(-8.0);\r\n\t\tyPos = new BigDecimal(-65.0);\r\n\t\tzPos= new BigDecimal(-1.0);\r\n\t\r\n\t\txVector= new BigDecimal(1.0);\r\n\t\tyVector= new BigDecimal(4.0); \r\n\t\tzVector= new BigDecimal(1.0);\r\n\r\n\t\tbioBoundBox = new BioMightBoundBox(xPos, yPos, zPos, xVector, yVector, zVector);\r\n\t\tbioMightConnectors = new BioMightConnectors();\r\n\t\r\n\t\t// Feet Epithelium Connector\r\n\t\tcircumference = 0.3;\r\n\t\tstartPos = getStartPoints(-1.0, -65.0, -1.0);\r\n\t\tstartPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\tendPos = getEndPoints(-1.0, -67.50, -1.0);\r\n\t\tendPoints = BioGraphics.octogonYPlane(endPos, circumference);\r\n\t\t\r\n\t\tbioMightConnector = new BioMightConnector(startPoints, endPoints, Constants.FootEpitheliumRef,\"connType\");\r\n\t\tbioMightConnectors.setBioMightConnector(Constants.FootEpitheliumRef, bioMightConnector);\r\n\t\t\r\n\t\tbioBoundBox.setBioMightConnectors(bioMightConnectors);\t\t\r\n\t\t\r\n\t\t// Put the Bounding Box into the Collection of Bounding Boxes \r\n\t\tSystem.out.println(\"Adding - RightBoundBox to bioBoundBoxes\"); \r\n\t\tbioBoundBoxes.setBoundingBox(Constants.FootEpitheliumRef, bioBoundBox);\t\t\r\n\r\n\t\t// Put the BioMight BoundBoxes for the Left Shoulder into the BoundingBoxMap \r\n\t\tboundingBoxesMap.put(Constants.RightFootRef, bioBoundBoxes);\r\n\t\tSystem.out.println(\"Adding - Right Foot bioBoundBoxes into BoxesMap\"); \r\n\r\n\t\treturn (boundingBoxesMap);\r\n\t}",
"public Rect getBBox() throws PDFNetException {\n/* 857 */ return new Rect(GetBBox(this.a));\n/* */ }",
"@Override\r\n\tpublic Rectangle getBound() {\n\t\treturn new Rectangle((int)x, (int)y, (int)width, (int)height);\r\n\t}",
"public Shape getBgetBoundingBox() {\r\n\t\t\r\n\t\tEllipse2D elilipse = new Ellipse2D.Double(0, 0, imageWidth, imageHeight);\r\n\t\tAffineTransform at = new AffineTransform(); \r\n\t\tat.translate(locationX, locationY);\r\n\t\tat.rotate(Math.toRadians(angle*sizeAngles));\r\n\t\t at.scale(0.5, 0.5);\r\n\t\tat.translate(-imageWidth/2, -imageHeight/2);\r\n\t\t\r\n\t\tShape rotatedRect = at.createTransformedShape(elilipse);\r\n\t\treturn rotatedRect;\r\n\t}",
"public PickBounds() {\n\tbounds = null;\n }",
"private void updateBoundingBox(Point_dt p) {\n\t\tdouble x = p.x(), y = p.y(), z = p.z();\n\t\tif (m_boundingBoxMin == null) {\n\t\t\tm_boundingBoxMin = new Point_dt(p);\n\t\t\tm_boundingBoxMax = new Point_dt(p);\n\t\t} else {\n\t\t\tif (x < m_boundingBoxMin.x())\n\t\t\t\tm_boundingBoxMin.setX(x);\n\t\t\telse if (x > m_boundingBoxMax.x())\n\t\t\t\tm_boundingBoxMax.setX(x);\n\t\t\tif (y < m_boundingBoxMin.y())\n\t\t\t\tm_boundingBoxMin.setY(y);\n\t\t\telse if (y > m_boundingBoxMax.y())\n\t\t\t\tm_boundingBoxMax.setY(y);\n\t\t\tif (z < m_boundingBoxMin.z())\n\t\t\t\tm_boundingBoxMin.setZ(z);\n\t\t\telse if (z > m_boundingBoxMax.z())\n\t\t\t\tm_boundingBoxMax.setZ(z);\n\t\t}\n\t}",
"public void drawBoundingBoxes(Graphics g)\n\t{\n\t\tGraphics2D g2d = (Graphics2D) g;\n\t\t/*g2d.drawRect(0,0, originalBbox.getPoint(2).x - originalBbox.getPoint(0).x,\n \t\toriginalBbox.getPoint(2).y - originalBbox.getPoint(0).y);*/\n\t\t//g2d.drawRect(bbox.getPoint(0).x, bbox.getPoint(0).y, bbox.getPoint(2).x - bbox.getPoint(0).x,\n //\t\tbbox.getPoint(2).y - bbox.getPoint(0).y);\n\t\tg2d.setColor(new Color(0,255,0));\n\t\tg2d.drawPolygon(bbox.getXs(), bbox.getYs(), bbox.getNumPoints());\n\t}",
"private PolygonEditor()\n {\n this(null, 1.0f);\n }",
"public CoordinateSystem() {\r\n\t\torigin = new GuiPoint(0, 0);\r\n\t\tzoomFactor = 1f;\r\n\t}",
"public final BoundingBox getBounds() {\n\t\tif (bounds==null) {\n\t\t\tint srsID =( (Geometry)this.get(0).getDefaultGeometry()).getSRID();\n\t\t\tBoundingBox re = new BoundingBoxImpl(\"\"+srsID);\n\t\t\tfor (SimpleFeature f : this) {\n\t\t\t\tre.include(f.getBounds());\n\t\t\t}\n\t\t\tbounds = re;\n\t\t}\n\t\treturn bounds;\n\t}",
"public Rectangle getBoundingBox() {\n\t\treturn getBounds();\n\t}",
"public static String bboxVertices(){\n \treturn \"0.5 0.5 0.5 0.5 0.5 -0.5 0.5 -0.5 0.5 0.5 -0.5 -0.5 -0.5 0.5 0.5 -0.5 0.5 -0.5 -0.5 -0.5 0.5 -0.5 -0.5 -0.5\";\n }",
"public BoundsUserSpace() {\n super();\n }",
"public LatLongRectangle getBoundingRectangle() {\n return boundingRectangle;\n }",
"Geq createGeq();",
"@Test\n public void testLatLngBounds() {\n validateTestSetup();\n MapboxMapAction.invoke(mapboxMap, (uiController, mapboxMap) -> {\n LatLngBounds bounds = new LatLngBounds.Builder()\n .include(new LatLng(48.8589506, 2.2773457))\n .include(new LatLng(47.2383171, -1.6309316))\n .build();\n mapboxMap.moveCamera(CameraUpdateFactory.newLatLngBounds(bounds, 0));\n });\n }",
"@Override\n\tpublic void setProjection(String epsg) {\n\t}",
"public Bounds getBounds () { return (bounds); }",
"@Override\n\tpublic MyRectangle getMyBoundingBox() {\n\t\t\n\t\treturn this;\n\t}",
"public Polygon()\n {\n points = new ArrayList<PointF>();\n }",
"public PolygonOptions(org.xms.g.utils.XBox param0) {\n super(param0);\n }",
"public PickBounds(Bounds boundsObject) {\n\tbounds = boundsObject;\n }",
"public final native LatLngBounds getBounds() /*-{\n return this.getBounds();\n }-*/;",
"public Ground(int x, int y)\n {\n // initialise instance variables\n xleft= x;\n ybottom= y;\n \n }",
"public Rectangle getBounds()\n {\n return new Rectangle ((int)x,(int)y,32,32);\n }",
"public S2LatLngRect getBound() {\n // To save time, we ignore numerical errors in the computed S2LatLngs while\n // accumulating the bounds and then account for them here.\n //\n // S2LatLng(S2Point) has a maximum error of 0.955 * S2.DBL_EPSILON in latitude.\n // In the worst case, we might have rounded \"inwards\" when computing the\n // bound and \"outwards\" when computing the latitude of a contained point P,\n // therefore we expand the latitude bounds by 2 * S2.DBL_EPSILON in each\n // direction. (A more complex analysis shows that 1.5 * S2.DBL_EPSILON is\n // enough, but the expansion amount should be a multiple of S2.DBL_EPSILON in\n // order to avoid rounding errors during the expansion itself.)\n //\n // S2LatLng(S2Point) has a maximum error of S2.DBL_EPSILON in longitude, which\n // is simply the maximum rounding error for results in the range [-Pi, Pi].\n // This is true because the Gnu implementation of atan2() comes from the IBM\n // Accurate Mathematical Library, which implements correct rounding for this\n // intrinsic (i.e., it returns the infinite precision result rounded to the\n // nearest representable value, with ties rounded to even values). This\n // implies that we don't need to expand the longitude bounds at all, since\n // we only guarantee that the bound contains the *rounded* latitudes of\n // contained points. The *true* latitudes of contained points may lie up to\n // S2.DBL_EPSILON outside of the returned bound.\n\n S2LatLng expansion = S2LatLng.fromRadians(2 * S2.DBL_EPSILON, 0);\n return builder.build().expanded(expansion).polarClosure();\n }",
"public MbCoordDpto() {\r\n \r\n }",
"public CollisionBox(int x, int y, int width, int height) \n\t{\n\t\tbox = new Rectangle(x, y, width, height);\n\t}",
"public BoundingShape getBoundingShape() {\n\treturn boundingShape;\n }",
"public static Box getBoundingBox(Entity entity)\n\t{\n\t\treturn (new REntity(entity)).getBox().getBox();\n\t}",
"public Rectangle getBound(){\n \tint x = (int)location.getX();\n \tint y = (int)location.getY();\n \t\n \tif(isExploded == false)\n \t\treturn new Rectangle(x, y, image.getWidth(null), image.getHeight(null));\n \telse\n \t\treturn new Rectangle(x,y, 1,1);\n }",
"void addBounds(int x, int y, int width, int height);",
"public final native void setBounds(LatLngBounds bounds) /*-{\n this.setBounds(bounds); \n }-*/;",
"public PixelPositionedBox( int id, Vector3D center, \n \t\t Vector3D base, Vector3D up,\n Vector3D extents,\n Color new_color)\n {\n super( center, base, up, extents, new_color );\n\n PixelID = id;\n }",
"public Box()\n\t{\n\t\t\n\t\ttopLeftX = 50;\n\t\ttopLeftY = 50;\n\t\twidth = 50;\n\t\theight = 25;\n\t\t\n\t}",
"private WGS84(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public BoundsUserSpace(double x, double y, double w, double h) {\n super(x, y, w, h);\n }",
"public AxisAlignedBB getBoundingBox()\r\n {\r\n return null;\r\n }",
"protected void setBBox( org.geotools.data.wms.request.GetMapRequest getMap, Envelope envelope ) {\n String version = getMap.getProperties().getProperty( Request.VERSION );\n boolean forceXY = version == null || !version.startsWith( \"1.3\" );\n String srsName = CRS.toSRS( envelope.getCoordinateReferenceSystem() );\n \n CoordinateReferenceSystem crs = AbstractGetMapRequest.toServerCRS( srsName, forceXY );\n Envelope bbox = null;\n try {\n bbox = CRS.transform( envelope, crs );\n } \n catch (TransformException e) {\n bbox = envelope;\n }\n // FIXME\n String s = srsName.contains( \"31468\" ) && version.startsWith( \"1.3\" )\n ? Joiner.on( ',' ).join( bbox.getMinimum(1), bbox.getMinimum(0), bbox.getMaximum(1), bbox.getMaximum(0) )\n : Joiner.on( ',' ).join( bbox.getMinimum(0), bbox.getMinimum(1), bbox.getMaximum(0), bbox.getMaximum(1) );\n //log.info( \"Requested BBOX: \" + s );\n getMap.setBBox( s );\n }",
"public Rectangle getBounds () {\r\n\tcheckWidget();\r\n\tPhArea_t area = new PhArea_t ();\r\n\tOS.PtWidgetArea (handle, area);\r\n\treturn new Rectangle (area.pos_x, area.pos_y, area.size_w, area.size_h);\r\n}",
"public Shape(RectF bounds)\n {\n this.zIndex = 0;\n this.bounds = GeometryUtils.copy(bounds);\n this.visible = true;\n this.color = Color.white;\n this.positionAnchor = new PointF(0, 0);\n }",
"public SceneOctTree (\n Bounds bounds\n ) {\n\n this.bounds = bounds;\n\n }",
"public static Envelope createSafeBBOX(String bboxInput) throws InvalidParameterValueException{\n \t\n \tString[] splittedBBOX = bboxInput.split(\",\");\t\t\n \n \tif ( splittedBBOX.length != 4 ) {\n \t \n \tString message = \"Parameter 'BBOX' is not valid\" ;\n \tthrow new InvalidParameterValueException( message ) ;\n \t\n }\n \n \tdouble minx = Double.parseDouble( splittedBBOX[0] ) ; \n \tdouble maxx = Double.parseDouble( splittedBBOX[2] ) ; \n \t\n \tif ( minx >= maxx ) {\n \n \t\tString message = \"Paremeter 'BBOX' is not valid: \";\n \tmessage = \"\\n 'minx < maxx' is required , found (\" + minx +\">=\" +maxx+\")\";\n throw new InvalidParameterValueException( message );\n \n }\n \t\n \tdouble miny = Double.parseDouble( splittedBBOX[1] );\n \tdouble maxy = Double.parseDouble( splittedBBOX[3] );\n \t\n \tif ( miny >= maxy) {\n \n \t\t\tString message = \"Paremeter 'BBOX' is not valid: \" \n \t\t\t + \"\\n 'miny < maxy' is required found (\" + miny +\">=\" +maxy+\")\";\n throw new InvalidParameterValueException( message );\n \n \t}\n\n Envelope env = GeometryFactory.createEnvelope(minx, miny, maxx, maxy, null);\n return env;\n }",
"public CollisionBox(String parameters) {\n\n\t\tString coordinates[] = parameters.split(\",\");\n\n\t\ttopleft.x = Integer.parseInt(coordinates[0]);\n\t\ttopleft.y = Integer.parseInt(coordinates[1]);\n\t\tbottomright.x = Integer.parseInt(coordinates[2]);\n\t\tbottomright.y = Integer.parseInt(coordinates[3]);\n\n\t}",
"public Rectangle() {\n\t\tthis.corner = new Point();\n\t\tthis.size = new Point();\n\t}",
"private void initialize(Graph G, List<double[]> V, double[] mapBounds) {\n\t\tmapContainer = new JLabel();\n\t\tthis.G = G;\n\t\tthis.V = V;\n\t\tthis.mapBounds = mapBounds;\n\t\t\n\t\tDimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\n\t\tsetBounds(0, 0, screenSize.width, screenSize.height);\n\t\t\n\t\tsetTitle(\"Street Map\");\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\taddImage();\n\t\tsetVisible(true);\n\t\taddMouseListener(new MouseInput());\n\t\t\n\t\ttitle = \"Title\";\n\t\ttitleFont = new Font(\"Monospace\", Font.BOLD, 13);\n\t\tsubtitle = \"Subtitle\";\n\t\tsubtitleFont = new Font(\"Monospace\", Font.BOLD, 10);\n\t\t\n\t\troadWidth = 1;\n\t\troadColor = Color.black;\n\t\tpathWidth = 3;\n\t\tpathColor = Color.red;\n\t\tzoom = 1.0;\n\t\txF = yF = 0.5;\n\t}",
"public Rectangle getBounds() {\n\treturn new Rectangle((int)x,(int)y,32,32);\n\t}",
"public EarthGeometry(int iRandomSeed){\n\t\tgcl1 = new GeodeticCalculator();\n\t\trnd1 = new Random(iRandomSeed);\n\t}",
"@Override\n public STRegion getBoundingBox() {\n\n SQLiteDatabase db = this.getReadableDatabase();\n\n String query = \"SELECT minX FROM \" + this.table_identifier + \" ORDER BY minX ASC LIMIT 1;\";\n float minX = getRowValueHelper(db, query, 0);\n query = \"SELECT minY FROM \" + this.table_identifier + \" ORDER BY minY ASC Limit 1;\";\n float minY = getRowValueHelper(db, query, 0);\n query = \"SELECT minT FROM \" + this.table_identifier + \" ORDER BY minT ASC Limit 1;\";\n float minT = getRowValueHelper(db, query, 0);\n query = \"SELECT maxX FROM \" + this.table_identifier + \" ORDER BY maxX DESC Limit 1;\";\n float maxX = getRowValueHelper(db, query, 0);\n query = \"SELECT maxY FROM \" + this.table_identifier + \" ORDER BY maxY DESC Limit 1;\";\n float maxY = getRowValueHelper(db, query, 0);\n query = \"SELECT maxT FROM \" + this.table_identifier + \" ORDER BY maxT DESC Limit 1;\";\n float maxT = getRowValueHelper(db, query, 0);\n\n return new STRegion(new STPoint(minX, minY, minT), new STPoint(maxX, maxY, maxT));\n }",
"public Spatial(Location bl, Location br, Location tl, Location tr)\r\n {\r\n this.bl = (Location.Location2D)bl;\r\n this.br = (Location.Location2D)br;\r\n this.tl = (Location.Location2D)tl;\r\n this.tr = (Location.Location2D)tr;\r\n }",
"private Coordinate[] generateBoundingBox(final Geometry geometry) {\n if (geometry == null || geometry.getCoordinates() == null || geometry.getCoordinates().length == 0) {\n return new Coordinate[]{new Coordinate(0,0),new Coordinate(0,0)};\n }\n final Coordinate firstPoint = geometry.getCoordinates()[0];\n double minLat = firstPoint.y;\n double minLon = firstPoint.x;\n double maxLat = firstPoint.y;\n double maxLon = firstPoint.x;\n for (final Coordinate coordinate : geometry.getCoordinates()) {\n if (coordinate.x < minLon) {\n minLon = coordinate.x;\n }\n if (coordinate.y < minLat) {\n minLat = coordinate.y;\n }\n if (coordinate.x > maxLon) {\n maxLon = coordinate.x;\n }\n if (coordinate.y > maxLat) {\n maxLat = coordinate.y;\n }\n }\n return new Coordinate[]{\n new Coordinate(minLon, minLat),\n new Coordinate(maxLon, maxLat)\n };\n }",
"public MovingPolygon() {\r\n\t\tsuper();\r\n\t}",
"public Box(Vector3f min, Vector3f max)\n\t{\n\t\tsuper();\n\t\tupdateGeometry(min, max);\n\t}",
"public HitBox (double x, double y, double width, double height, int id) {\n\t\tsuper(x, y, width, height);\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t\tthis.width = width;\n\t\tthis.height = height;\n\t\tthis.id = id;\n\t}",
"public void setBounds(Rectangle b);",
"public interface GeoInterface {\n\t// infinity value\n\tstatic final double INF = Double.MAX_VALUE;\n\t// small number (less than this is consider as zero)\n\tstatic final double SMALL_NUM = 0.0001;\n\t\t\n\t// perimeter of the maximum area this application covers (map area)\n\t// grid/space dimensions\t\t //# Dataset\t\t\t\t\t//# Query \t\n\tfinal static double MIN_X = 52.0; // MinX: 52.99205499607079 // Min X: 375.7452259303738\n\tfinal static double MIN_Y = -21.0; // MinY: -20.08557496216634 // Min Y: 16.319751123918174\n\tfinal static double MAX_X = 717.0; // MaxX: 716.4193496072005 // Max X: 576.9230902330686\n\tfinal static double MAX_Y = 396.0; // MaxY: 395.5344310979076 // Max Y: 234.80924053063617\n\t\n\t// Earth radius (average) in meters\n\tstatic final int EARTH_RADIUS = 6371000;\n\t\n\t// pi\n\tstatic final double PI = Math.PI;\n}",
"public BoundingBox3d(float xmin, float xmax, float ymin, float ymax, float zmin, float zmax) {\n this.xmin = xmin;\n this.xmax = xmax;\n this.ymin = ymin;\n this.ymax = ymax;\n this.zmin = zmin;\n this.zmax = zmax;\n }",
"public Rect getBound() {\n return new Rect((int) (x - radius), (int) (y - radius), (int) (x + radius), (int) (y + radius));\n }",
"public Rectangle getBounds() {\n\t\tRectangle Box = new Rectangle(x, y, 48, 48);\n\t\treturn Box;\n\t}",
"Rectangle getBounds();",
"@Override\n public Rectangle getBounds() {\n return new Rectangle(x,y,64,64);\n }",
"public BRectangle2D\ngetNucSymbolBoundingBox()\nthrows Exception\n{\n\tBRectangle2D rect = (BRectangle2D)\n\t\tthis.getNucDrawObject().getBoundingBox().clone();\n\tif (rect == null)\n\t\treturn (null);\n\t\n\trect.setRect(rect.getX() + this.getX(), rect.getY() - this.getY(),\n\t\trect.getWidth(), rect.getHeight());\n\treturn (rect);\n}",
"public GpsCoordinate(double latitude, double longitude)\n\t{\n\t\tthis.latitude = latitude;\n\t\tthis.longitude = longitude;\n\t}",
"Report.LocationOuterClass.WGS84OrBuilder getWgs84OrBuilder();",
"public Polygon() {\n N = 0;\n a = new Point[4];\n }",
"Rectangle getBounds() {\n return new Rectangle(getLocation(), getSize());\n }"
] | [
"0.73561126",
"0.66694444",
"0.6652385",
"0.6615146",
"0.65105414",
"0.6428243",
"0.6393293",
"0.63532776",
"0.6323454",
"0.6309352",
"0.6198549",
"0.6161826",
"0.61617416",
"0.61521065",
"0.6149134",
"0.61426127",
"0.6136689",
"0.612732",
"0.6124731",
"0.60999405",
"0.60886484",
"0.6084518",
"0.60604537",
"0.6051633",
"0.59264696",
"0.58936644",
"0.58765244",
"0.5862187",
"0.58460563",
"0.5840956",
"0.583543",
"0.57946235",
"0.5792032",
"0.57615787",
"0.573023",
"0.57132375",
"0.57057285",
"0.5687336",
"0.5667241",
"0.56667775",
"0.5657079",
"0.56465185",
"0.56406736",
"0.5635711",
"0.56285375",
"0.56246984",
"0.56217927",
"0.5607034",
"0.556021",
"0.55422133",
"0.5516819",
"0.5506703",
"0.5502137",
"0.54896075",
"0.5482439",
"0.5480066",
"0.5479648",
"0.5478232",
"0.54754615",
"0.54698616",
"0.5469793",
"0.5464149",
"0.54629827",
"0.5445734",
"0.54432267",
"0.5439598",
"0.54347754",
"0.54318875",
"0.54169124",
"0.54090196",
"0.5402962",
"0.53999275",
"0.53896916",
"0.538289",
"0.53814626",
"0.5379675",
"0.5378877",
"0.5378578",
"0.5373763",
"0.5370484",
"0.5369916",
"0.5361769",
"0.53584284",
"0.53569174",
"0.53509444",
"0.53443795",
"0.53396827",
"0.53385395",
"0.5334913",
"0.5330804",
"0.53189063",
"0.5311968",
"0.531037",
"0.5308845",
"0.5305072",
"0.5304079",
"0.5297676",
"0.5296539",
"0.52944744",
"0.5292941"
] | 0.6081756 | 22 |
Sets m gax y. | public void setMaxY(double maxY) {
this.maxY = maxY;
this.bottomLeftLat = maxY;
this.lowerLeftY = maxY;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void setY(long value) {\n bitField0_ |= 0x00000002;\n y_ = value;\n }",
"void setY(float y) {\n _y = y;\n }",
"default void setY(double y)\n {\n getAxis().setY(y);\n }",
"public void setY(double y) {\n this.y = y;\r\n }",
"public void setEgY(int y) {\n\t\tthis.egY = y;\n\t}",
"public void setY(double y)\n {\n this.y = y;\n }",
"public void setY(double y) {\n this.y = y;\n }",
"public void setY(double y) {\n this.y = y;\n }",
"public void setY(double y) {\n this.y = y;\n }",
"void setY(final Number y) {\n this.yCoordinate = y;\n }",
"public void setY(double y){\n this.y = y;\n }",
"public void setY(double y){\n this.y = y;\n }",
"public void y(double y) {\n _y = y;\n }",
"public void setY(int theY)\r\n {\r\n y = theY;\r\n }",
"public void setY(double value) {\n origin.setY(value);\n }",
"public void setY(int y) {\n\tbaseYCoord = y;\n}",
"public void setY(final int y) {\n\n this.y = y;\n }",
"public void setY(double y) {\n\t\tthis.y = y;\n\t}",
"public void setY(double y)\n\t{\n\t\tthis.y = y;\n\t}",
"public void setY(long y){\n this.y = y;\n }",
"void setY(int y) {\n position = position.setY(y);\n }",
"public void setY(double pY) {\n mY = pY;\n }",
"void setY(double y){\r\n\t\tthis.y=y;\r\n\t}",
"public void setY(Double y);",
"public void setY(double y)\n\t\t{\n\t\t this.y[0] = y;\n\t\t}",
"public void setY(int y) {\n this.y = y;\r\n }",
"public void setY(int y){\r\n\t\tthis.y = y;\r\n\t}",
"public void setY(int y){\n\t\tthis.y_location = y;\n\t}",
"public void setY(double newY) {\r\n y = newY;\r\n }",
"public void setY(int y) {\r\n\t\tthis.y = y;\r\n\t}",
"public void setY(int y) {\r\n\t\tthis.y = y;\r\n\t}",
"public void setY(int y) {\r\n\t\tthis.y = y;\r\n\t}",
"public void setY(int y) {\r\n\t\tthis.y = y;\r\n\t}",
"public void setY(int y) {\n this.y = y;\n }",
"public void setY(int y) {\n this.y = y;\n }",
"public void setY(int y) {\n this.y = y;\n }",
"public PlotPosition setY( double y )\n {\n return setY( y, 1 );\n }",
"public void setY( double Y)\r\n {\r\n curY = Y;\r\n }",
"public void setY(int y)\n {\n this.y = y;\n }",
"@Override\r\n\tpublic void setY(float y) {\n\t\t\r\n\t}",
"public void setY(Double y) {\n\t\tthis.y = y;\n\t}",
"public void setY(int y) {\n\t\tthis.Y = y;\n\t}",
"public void setY(int y) {\n\t\tthis.y = y;\n\t}",
"public void setY(int y) {\n\t\tthis.y = y;\n\t}",
"public void setY(int y) {\n\t\tthis.y = y;\n\t}",
"public void setY(int y) {\n\t\tthis.y = y;\n\t}",
"void setY(int y) {\n this.y = y;\n }",
"public void setY(int y) { loc.y = y; }",
"public void setY(double value) {\n this.y = value;\n }",
"public void setY(int y){\n this.y = y;\n }",
"public void setY(int y){\n this.y = y;\n }",
"public void setY(int y){\n this.y = y;\n }",
"public void setEndY(double y)\n {\n endycoord=y; \n }",
"public void NewY(double y){\n\t\tthis.y = y;\n\t}",
"@Override\n\tpublic void setY(float y) \n\t{\n\t\t_y = y;\n\t}",
"public void setY(int y ){\n if(y>0){\n this.y=y;\n }\n \n }",
"public void setY(boolean y) {\n\tthis.y = y;\n }",
"public void setY(int y) {\r\n this.y = (short) y;\r\n }",
"final void setY(double d) {\n y = d;\n }",
"public void setY(int y)\n\t{\n\t\tthis.y = y;\t\t\t\t\t\t\t\t\t\t\t\t\t// Update point's y-coordinate \n\t}",
"@Override\n\tpublic void setY(float y) {\n\n\t}",
"public void setY(double y)\r\n\t{\t\r\n\t\tvirtualDxfPoint.setTransformationY(y);\r\n\t\tAnchor.setY(y);\r\n\t}",
"public void setY(float y) {\r\n\t\tthis.y = y;\r\n\t}",
"public void setY(float y){\n this.y = y;\n }",
"public void setY(float y) {\n this.y = y;\n }",
"public void setYmultiplier(double sety)\n {\n ymultiplier = sety;\n }",
"@Override\n\tpublic void setY(int y) {\n\t\t\n\t}",
"public void setYPos(int y) {\n // from MoveEventHandler\n // convert to real y coord\n // y = yP * (ymaxR - yminr) / (ymaxP - yminP)\n double tmp = config.getMaximumRealY() + (y - config.getMaximumPixelY())*(config.getMaximumRealY() - config.getMinimumRealY())/(config.getMaximumPixelY() - config.getMinimumPixelY());\n ypos.setText(formatter.format(tmp));\n }",
"public void setY( int y ) {\n\t\t//not checking if y is valid because that depends on the coordinate system\n\t\tthis.y = y;\n\t}",
"@Override\n\tpublic void setY(int y) {\n\n\t}",
"public void setY(int value) {\n this.y = value;\n }",
"public void setY(int ys)\r\n\t{\r\n\t\ty = ys;\r\n\t}",
"public void setY(Float y) {\n\t\tthis.y = y;\n\t}",
"public void setY(int newY)\r\n {\r\n yCoord = newY;\r\n }",
"public Builder setY(int value) {\n bitField0_ |= 0x00000004;\n y_ = value;\n onChanged();\n return this;\n }",
"public Builder setY(int value) {\n bitField0_ |= 0x00000004;\n y_ = value;\n onChanged();\n return this;\n }",
"public Builder setY(int value) {\n bitField0_ |= 0x00000004;\n y_ = value;\n onChanged();\n return this;\n }",
"public void setGy(final double gy) {\n mGy = gy;\n }",
"public Builder setY(int value) {\n bitField0_ |= 0x00000008;\n y_ = value;\n onChanged();\n return this;\n }",
"@SuppressLint(\"NewApi\")\n\tpublic S<T> Y(int y){\n\t\t((View)t).setY(y);\n\t\treturn this;\n\t}",
"public void setY(int y) { this.y=y; }",
"public Builder setY(int value) {\n bitField0_ |= 0x00000002;\n y_ = value;\n onChanged();\n return this;\n }",
"public Builder setY(double value) {\n bitField0_ |= 0x00001000;\n y_ = value;\n onChanged();\n return this;\n }",
"@Deprecated\n public final void setY(int y){\n this.y = y;\n }",
"public void setStandardY(double y)\n {\n standardy=y; \n }",
"public Builder setY(double value) {\n bitField0_ |= 0x00000004;\n y_ = value;\n onChanged();\n return this;\n }",
"public Builder setY(double value) {\n bitField0_ |= 0x00000008;\n y_ = value;\n onChanged();\n return this;\n }",
"public Builder setY(double value) {\n bitField0_ |= 0x00000020;\n y_ = value;\n onChanged();\n return this;\n }",
"public Builder setY(double value) {\n bitField0_ |= 0x00000020;\n y_ = value;\n onChanged();\n return this;\n }",
"public Builder setY(double value) {\n bitField0_ |= 0x00000020;\n y_ = value;\n onChanged();\n return this;\n }",
"public Builder setY(float value) {\n bitField0_ |= 0x00000002;\n y_ = value;\n onChanged();\n return this;\n }",
"public Builder setY(float value) {\n bitField0_ |= 0x00000002;\n y_ = value;\n onChanged();\n return this;\n }",
"public Builder setY(double value) {\n bitField0_ |= 0x00000010;\n y_ = value;\n onChanged();\n return this;\n }",
"public Builder setY(double value) {\n bitField0_ |= 0x00000010;\n y_ = value;\n onChanged();\n return this;\n }",
"public native void setYResolution(double yRes) throws MagickException;",
"public void setYCoordinates(double newY) { this.yCoordinates = newY; }",
"@Override\n public void setY(int y) {\n this.y=y;\n }",
"public void setyCoord(Location l) {\n\t\t\n\t}",
"@Override\n\tpublic void setY(int y) {\n\t\tyPos = y;\n\t}",
"public void setY(int y){ yPosition = y; }",
"public void setYPosition(double y)\n\t{\n\t\tthis.yPosition = y;\n\t}"
] | [
"0.7035445",
"0.6832871",
"0.6802297",
"0.6768158",
"0.6736761",
"0.672967",
"0.67230886",
"0.67230886",
"0.67230886",
"0.6709727",
"0.6702258",
"0.6702258",
"0.6701717",
"0.66806436",
"0.66791904",
"0.6670461",
"0.6668497",
"0.6643796",
"0.6627433",
"0.6614377",
"0.6604582",
"0.65903443",
"0.6588824",
"0.6575717",
"0.6548839",
"0.65401256",
"0.653184",
"0.65312004",
"0.65231967",
"0.65091586",
"0.65091586",
"0.65091586",
"0.65091586",
"0.65039545",
"0.65039545",
"0.65039545",
"0.6503026",
"0.6473034",
"0.6471883",
"0.64612013",
"0.64609224",
"0.645871",
"0.6444789",
"0.6444789",
"0.6444789",
"0.6444789",
"0.6436499",
"0.64336675",
"0.6409332",
"0.6403185",
"0.6403185",
"0.6403185",
"0.64028037",
"0.6400676",
"0.6399084",
"0.6391146",
"0.63797057",
"0.6379662",
"0.6373377",
"0.637142",
"0.6359442",
"0.6356326",
"0.6353204",
"0.63376534",
"0.63362604",
"0.63309056",
"0.63302404",
"0.63256824",
"0.6311264",
"0.6303205",
"0.62838453",
"0.6269875",
"0.6265526",
"0.62591875",
"0.6253384",
"0.6253384",
"0.6253384",
"0.62531286",
"0.62337625",
"0.62199533",
"0.62174374",
"0.6202276",
"0.61958617",
"0.6190987",
"0.61751825",
"0.61643374",
"0.61617386",
"0.61577016",
"0.61577016",
"0.61569566",
"0.6152269",
"0.6152269",
"0.61520565",
"0.6150393",
"0.6133077",
"0.61201596",
"0.6116069",
"0.61109847",
"0.6096676",
"0.60948867",
"0.60948783"
] | 0.0 | -1 |
Sets upper left y. | public void setLowerLeftY(double lowerLeftY) {
this.maxY = lowerLeftY;
this.bottomLeftLat = lowerLeftY;
this.lowerLeftY = lowerLeftY;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setY(int y) {\n\tbaseYCoord = y;\n}",
"@Override\n\tpublic void setY(int y) {\n\t\tyPos = y;\n\t}",
"@Override\n\tpublic void setY(int y) {\n\t\t\n\t}",
"@Override\n\tpublic void setY(int y) {\n\n\t}",
"public void setUpperRightY(float value)\n {\n rectArray.set(3, new COSFloat( value ) );\n }",
"public void setY(int y) {\r\n\t\tthis.y = y;\r\n\t}",
"public void setY(int y) {\r\n\t\tthis.y = y;\r\n\t}",
"public void setY(int y) {\r\n\t\tthis.y = y;\r\n\t}",
"public void setY(int y) {\r\n\t\tthis.y = y;\r\n\t}",
"void setY(int y) {\n position = position.setY(y);\n }",
"public void setY(int y){ yPosition = y; }",
"public void setY(int y){\r\n\t\tthis.y = y;\r\n\t}",
"public void setY(int y ){\n if(y>0){\n this.y=y;\n }\n \n }",
"public void setEndY(double y)\n {\n endycoord=y; \n }",
"public void setY( int y ) {\n\t\t//not checking if y is valid because that depends on the coordinate system\n\t\tthis.y = y;\n\t}",
"public void setY(int y) {\n\t\tthis.y = y;\n\t}",
"public void setY(int y) {\n\t\tthis.y = y;\n\t}",
"public void setY(int y) {\n\t\tthis.y = y;\n\t}",
"public void setY(int y) {\n\t\tthis.y = y;\n\t}",
"public void setY(int y){\n\t\tthis.y_location = y;\n\t}",
"public void setY(int y) {\n this.y = y;\r\n }",
"public void setY(int y) {\n this.y = y;\n }",
"public void setY(int y) {\n this.y = y;\n }",
"public void setY(int y) {\n this.y = y;\n }",
"public void setY(int y) {\n\t\tthis.Y = y;\n\t}",
"public void resetY() {this.startY = 11.3f;}",
"public int getYLeftUpper() {\n return yLeftUpper;\n }",
"public void setYPos(int y) {\n // from MoveEventHandler\n // convert to real y coord\n // y = yP * (ymaxR - yminr) / (ymaxP - yminP)\n double tmp = config.getMaximumRealY() + (y - config.getMaximumPixelY())*(config.getMaximumRealY() - config.getMinimumRealY())/(config.getMaximumPixelY() - config.getMinimumPixelY());\n ypos.setText(formatter.format(tmp));\n }",
"public void setY(int value) {\n this.y = value;\n }",
"public void setY(int y)\n\t{\n\t\tthis.y = y;\t\t\t\t\t\t\t\t\t\t\t\t\t// Update point's y-coordinate \n\t}",
"@Override\n public void setY(int y) {\n this.y=y;\n }",
"public void setY(int y)\n {\n this.y = y;\n }",
"default void setY(double y)\n {\n getAxis().setY(y);\n }",
"public void setY(final int y) {\n\n this.y = y;\n }",
"public void setY(float y)\n {\n getBounds().offsetTo(getBounds().left, y - positionAnchor.y);\n notifyParentOfPositionChange();\n conditionallyRelayout();\n }",
"void setY(int newY) {\n this.yPos = newY;\n }",
"public void setExtendedY(float y) {\n mMaximumTop = (int) y;\n }",
"public void setCurrentYPosition(int y) {\n\t\tthis.currentYPosition = y;\n\t\tthis.currentXPosition = this.floats.leftIntersectionPoint(this.box.getAbsoluteX()\n\t\t\t\t+ this.box.marginLeft + this.box.paddingLeft, this.box.getAbsoluteY() + y\n\t\t\t\t+ this.box.marginTop + this.box.paddingTop, this.currentRowMaxWidth, this.box);\n\t}",
"public void setY(int y){\n this.y = y;\n }",
"public void setY(int y){\n this.y = y;\n }",
"public void setY(int y){\n this.y = y;\n }",
"public void setY(long y){\n this.y = y;\n }",
"public PlotPosition setY( double y )\n {\n return setY( y, 1 );\n }",
"public void setY(int yPos){\t\t\n\t\ty = new Integer(yPos);\n\t}",
"public void setY(int theY)\r\n {\r\n y = theY;\r\n }",
"public void setY(int value)\n\t{\n\t\tgetWorldPosition().setY(value);\n\t}",
"public void setYTop(int top) {\n this.yTop = top;\n }",
"@Override\r\n\tpublic void setY(float y) {\n\t\t\r\n\t}",
"public void setYPosition(double y)\n\t{\n\t\tthis.yPosition = y;\n\t}",
"public void setY(int y) { loc.y = y; }",
"public void setY(double y)\r\n\t{\t\r\n\t\tvirtualDxfPoint.setTransformationY(y);\r\n\t\tAnchor.setY(y);\r\n\t}",
"void setY(int y) {\n this.y = y;\n }",
"@Override\r\n\tpublic void setPositionY(int y) {\n\t\tif (!(y >= 0))\r\n\t\t\tthrow new PreConditionError(\"Error PreCondition: y >= 0\");\r\n\r\n\t\tcheckInvariant();\r\n\r\n\t\tsuper.setPositionY(y);\r\n\r\n\t\tcheckInvariant();\r\n\r\n\t\t// post: getPositionY() == y\r\n\t\tif (!(getPositionY() == y))\r\n\t\t\tthrow new PostConditionError(\"Error PostCondition: getPositionY() == y\");\r\n\t}",
"public void setY(int y) { this.y=y; }",
"public void setRootYPos(int y) {\n root.setLayoutY(y);\n }",
"public void setY(float y){\n hitBox.offsetTo(hitBox.left,y);\n //this.y=y;\n }",
"public void setUpperRightY(double upperRightY) {\r\n this.minY = upperRightY;\r\n this.upperRightY = upperRightY;\r\n this.topRightLat = upperRightY;\r\n }",
"@Override\n\tpublic void setY(float y) {\n\n\t}",
"public void setY(int newY)\n\t{\n\t\ty+=newY;\n\t\tboundingBox = new Rectangle(x,y,width,height);\n\t}",
"public void setY(int newY)\r\n {\r\n yCoord = newY;\r\n }",
"public void setY(double value) {\n origin.setY(value);\n }",
"public void setY(int ys)\r\n\t{\r\n\t\ty = ys;\r\n\t}",
"void setY(final Number y) {\n this.yCoordinate = y;\n }",
"public void setY(int ypos) {\r\n this.ypos = ypos;\r\n }",
"public void setY(double val) {\r\n\t\t this.yCoord = val;\r\n\t }",
"public void setY(double y) {\n\t\tthis.y = y;\n\t}",
"public void setY(double y) {\n this.y = y;\r\n }",
"public void setY(int y) {\r\n this.y = y;\r\n\r\n this.slot = Slot.fromXY(getX(), y);\r\n }",
"public void setY(double y) {\n this.y = y;\n }",
"public void setY(double y) {\n this.y = y;\n }",
"public void setY(double y) {\n this.y = y;\n }",
"protected void setYWithinBounds(double y) {\n\t\tif (getWorld() != null && (y < 0 || y >= getWorld().getWorldHeight()))\n\t\t\t\tterminate();\n\t\tsetY(Math.max(y, 0));\n\t}",
"public void setY(double value) {\n this.y = value;\n }",
"public void setY(double y)\n\t{\n\t\tthis.y = y;\n\t}",
"@Override\n\tpublic void setY(float y) \n\t{\n\t\t_y = y;\n\t}",
"public void setY(double y)\n {\n this.y = y;\n }",
"public void setYCoordinate(int newValue)\n {\n y = newValue;\n }",
"public void setY(float y) {\r\n\t\tthis.y = y;\r\n\t}",
"public void setY(double y){\n this.y = y;\n }",
"public void setY(double y){\n this.y = y;\n }",
"public void setStartY(double y)\n {\n startycoord=y; \n }",
"public int getTopY() {\n\t\treturn 0;\r\n\t}",
"public void setCenterY(double y) { centerY.set(clamp(y, Y_MIN, Y_MAX)); }",
"void setY(double y){\r\n\t\tthis.y=y;\r\n\t}",
"public void setY(int ycoord) {\n\t\ty = ycoord;\n\t}",
"public void setY(float y) {\n this.y = y;\n }",
"public void setY(Float y) {\n\t\tthis.y = y;\n\t}",
"public void setY(float y){\n this.y = y;\n }",
"public void setYCoordinates(double newY) { this.yCoordinates = newY; }",
"void setY(float y) {\n _y = y;\n }",
"public void setY(int y) {\n collider.setLocation((int) collider.getX(), y);\n }",
"public void setY(double pY) {\n mY = pY;\n }",
"public void setYPosition(int newY) {\n this.yPosition = newY;\n }",
"public void setY( double Y)\r\n {\r\n curY = Y;\r\n }",
"public int getY() {\r\n\t\t\r\n\t\treturn topY;\r\n\t}",
"public double fixY( double y )\n {\n return pageSize.getHeight() - y;\n }",
"public void setLimit_lin_y_upper(float limit_lin_y_upper) throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeFloat(__io__address + 44, limit_lin_y_upper);\n\t\t} else {\n\t\t\t__io__block.writeFloat(__io__address + 36, limit_lin_y_upper);\n\t\t}\n\t}",
"private void setY(long value) {\n bitField0_ |= 0x00000002;\n y_ = value;\n }",
"public void setPositionY(float y) {\n\t\tthis.position.set(this.position.x, y, 0);\n\t}",
"public int yPos() {\n\t\treturn Engine.scaleY(y);\n\t}"
] | [
"0.770095",
"0.7583523",
"0.7520702",
"0.74962443",
"0.7495613",
"0.74781984",
"0.74781984",
"0.74781984",
"0.74781984",
"0.7475466",
"0.7458976",
"0.74547374",
"0.7448291",
"0.74411285",
"0.74159586",
"0.7389185",
"0.7389185",
"0.7389185",
"0.7389185",
"0.73801965",
"0.73572516",
"0.7324486",
"0.7324486",
"0.7324486",
"0.73118263",
"0.7305734",
"0.7285219",
"0.72843695",
"0.7270677",
"0.72489524",
"0.72476476",
"0.72463614",
"0.7243162",
"0.7229074",
"0.7215718",
"0.7203683",
"0.7198687",
"0.71689796",
"0.7168097",
"0.7168097",
"0.7168097",
"0.7159567",
"0.71505696",
"0.71499825",
"0.7139974",
"0.71195334",
"0.71165717",
"0.71140015",
"0.71120834",
"0.70887613",
"0.70848274",
"0.70842165",
"0.7077918",
"0.7074024",
"0.70681113",
"0.70603955",
"0.7051631",
"0.704032",
"0.7030654",
"0.70221305",
"0.70084363",
"0.70026654",
"0.69913703",
"0.6991319",
"0.69529706",
"0.6933916",
"0.69293475",
"0.6924775",
"0.6907599",
"0.6907599",
"0.6907599",
"0.690659",
"0.6902267",
"0.6900412",
"0.6898595",
"0.68912",
"0.68843234",
"0.6883481",
"0.68586266",
"0.68586266",
"0.68433833",
"0.6815721",
"0.68028116",
"0.6801526",
"0.6797513",
"0.67805755",
"0.67708164",
"0.67551476",
"0.6742935",
"0.6713708",
"0.66953564",
"0.66901535",
"0.6689694",
"0.66890347",
"0.6682961",
"0.6658105",
"0.66495895",
"0.6628326",
"0.6622247",
"0.6620212"
] | 0.6673457 | 95 |
Sets lower right x. | public void setUpperRightX(double upperRightX) {
this.upperRightX = upperRightX;
this.maxX = upperRightX;
this.topRightLon = upperRightX;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setX(float x) {\r\n\t\tleft = x - width / 2;\r\n\t}",
"protected final void setRight(IntervalNode x) {\n\tthis.right = x;\n\n\t// recalc max and min\n\tsetMax();\n\tsetMin();\n }",
"protected final void setLeft(IntervalNode x) {\n\tthis.left = x;\n\n\t// recalc max and min\n\tsetMax();\n\tsetMin();\n }",
"public void setX(int x) {\n\tbaseXCoord = x;\n}",
"public void setX(int x ){\n if(x>0){\n this.x=x;\n }\n \n }",
"public void setLeft(int x) {\r\n leftSide = x;\r\n }",
"public void setExtendedX(float x) {\n mLeft = (int) x;\n }",
"public void setRight(int x) {\r\n rightSide = x;\r\n }",
"void setX(int x) {\n position = position.setX(x);\n }",
"public void setLowerLeftX(float value)\n {\n rectArray.set(0, new COSFloat( value ) );\n }",
"public void setX(double x) {\n this.x = x;\r\n }",
"public void setX(double x){\n this.x = x;\n }",
"public void setX(double x){\n this.x = x;\n }",
"public void setX(double x)\n {\n this.x = x;\n }",
"public void setX(double x) {\n this.x = x;\n }",
"public void setX(double x) {\n this.x = x;\n }",
"public void setX(double x) {\n this.x = x;\n }",
"public void setX( int x ) {\n\t\t//not checking if x is valid because that depends on the coordinate system\n\t\tthis.x = x;\n\t}",
"void setX(double x){\r\n\t\tthis.x=x;\r\n\t}",
"public void setX(int x){\r\n\t\tthis.x = x;\r\n\t}",
"public void setX(int x) {\r\n\t\tthis.x = x;\r\n\t}",
"public void setX(int x) {\r\n\t\tthis.x = x;\r\n\t}",
"public void setX(int x) {\r\n\t\tthis.x = x;\r\n\t}",
"public void setX(int x) {\r\n\t\tthis.x = x;\r\n\t}",
"public void setX(double x)\n\t{\n\t\tthis.x = x;\n\t}",
"public void setX(double x) {\n\t\tthis.x = x;\n\t}",
"@Override\r\n\tpublic void setX(float x) {\n\t\t\r\n\t}",
"public void setX(float x){\n hitBox.offsetTo(x,hitBox.top);\n //this.x=x;\n }",
"public void setX(int x) {\n this.x = x;\r\n }",
"public void setX(double newX) {\r\n x = newX;\r\n }",
"public void setX(int x) {\n\t\tthis.x = x;\n\t}",
"public void setX(int x) {\n\t\tthis.x = x;\n\t}",
"public void setX(int x) {\n\t\tthis.x = x;\n\t}",
"public void setX(int x) {\n\t\tthis.x = x;\n\t}",
"public void setX(int x) {\n\t\tthis.x = x;\n\t}",
"public void setX(final int x) {\n\n this.x = x;\n }",
"public void setX(int newX)\r\n {\r\n xCoord = newX;\r\n }",
"@Override\r\n\tpublic void setPositionX(int x) {\n\t\tif (!(x >= 0))\r\n\t\t\tthrow new PreConditionError(\"Error PreCondition: x >= 0\");\r\n\r\n\t\tcheckInvariant();\r\n\r\n\t\tsuper.setPositionX(x);\r\n\r\n\t\tcheckInvariant();\r\n\r\n\t\t// post: getPositionX() == x\r\n\t\tif (!(getPositionX() == x))\r\n\t\t\tthrow new PostConditionError(\"Error PostCondition: getPositionX() == x\");\r\n\t}",
"public void setX(double X)\r\n {\r\n curX = X;\r\n }",
"public void setX(int newX)\n {\n x = newX;\n }",
"public void setX(int x)\n\t{\n\t\tthis.x = x;\t\t\t\t\t\t\t\t\t\t\t\t\t// Update point's x-coordinate\n\t}",
"public void setLimit_lin_x_lower(float limit_lin_x_lower) throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeFloat(__io__address + 32, limit_lin_x_lower);\n\t\t} else {\n\t\t\t__io__block.writeFloat(__io__address + 24, limit_lin_x_lower);\n\t\t}\n\t}",
"void setX(float x) {\n _x = x;\n }",
"@Override\n\tpublic void setX(int x) {\n\t\txPos = x;\n\t}",
"public void setXLeft(int left) {\n this.xLeft = left;\n }",
"void setX(int newX) {\n this.xPos = newX;\n }",
"public void setX(int x) {\n this.x = x;\n }",
"public void setX(int x) {\n this.x = x;\n }",
"@Override\n\tpublic void setX(int x) {\n\t\t\n\t}",
"public void setX(long x){\n this.x = x;\n }",
"public void setX(int x)\n\t{\n\t\tgetWorldPosition().setX(x);\n\t}",
"@Override\n\tpublic void setX(int x) {\n\n\t}",
"public void setX(Double x);",
"@Override\n\tpublic void setX(float x) {\n\n\t}",
"public void setX(int x) {\n\t\tthis.X = x;\n\t}",
"public void setLimit_ang_x_lower(float limit_ang_x_lower) throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeFloat(__io__address + 56, limit_ang_x_lower);\n\t\t} else {\n\t\t\t__io__block.writeFloat(__io__address + 48, limit_ang_x_lower);\n\t\t}\n\t}",
"public void setX(int x)\n {\n this.x = x;\n }",
"protected void setXWithinBounds(double x) {\n\t\tif (getWorld() != null && (x < 0 || x >= getWorld().getWorldWidth()))\n\t\t\t\tterminate();\n\t\tsetX(Math.max(x, 0));\n\t}",
"public void setX(int x)\r\n {\r\n this.x = x;\r\n }",
"public void setX(double value) {\n origin.setX(value);\n }",
"public void setX(int newX)\n\t{\n\t\tx += newX;\n\t\tboundingBox = new Rectangle(x,y,width,height);\n\t}",
"double setx(double x) {\n return this.x;\n }",
"public void reverseDirectionX()\n\t{\n\t\t\n\t\tvx = -vx;\n\t\t\n\t}",
"@Override\n\tpublic void setX(float x) \n\t{\n\t\t_x = x;\n\t}",
"public void setX(int x){ xPosition = x; }",
"public void setX(int x){\n this.x = x;\n }",
"public void setX(int x){\n this.x = x;\n }",
"public void setX(int x){\n this.x = x;\n }",
"public void setX(int x){\n this.x = x;\n }",
"public void setX(float x) {\r\n\t\tthis.x = x;\r\n\t}",
"public void setX(float x) {\n this.x = x;\n }",
"public void setX(double val) {\r\n\t\t this.xCoord = val;\r\n\t }",
"public void setEndX(double x)\n {\n endxcoord=x; \n }",
"private void set_x(int RHS)\n {\n // R26 and R27 contain the values of index X\n try\n {\n set_reg(26,Utils.get_lobyte(RHS));\n set_reg(27,Utils.get_hibyte(RHS));\n }\n catch(RuntimeException e) { }\n }",
"public void setX(double pX) {\n mX = pX;\n }",
"public void setX(double value) {\n this.x = value;\n }",
"public void setUpperRightX(float value)\n {\n rectArray.set(2, new COSFloat( value ) );\n }",
"public void setLowerLeftY(float value)\n {\n rectArray.set(1, new COSFloat( value ) );\n }",
"default void setX(double x)\n {\n getAxis().setX(x);\n }",
"public Point getXLower()\n {\n return (Point)xLow.clone();\n }",
"protected void setX(final Number x) {\n this.xCoordinate = x;\n }",
"public void setX(int newX) {\n\t\tthis.x = newX;\n\t}",
"public PlotPosition setX( double x )\n {\n return setX( x, 1 );\n }",
"public void setX(double x)\r\n\t{\t\r\n\t\tvirtualDxfPoint.setTransformationX(x);\r\n\t\tAnchor.setX(x);\r\n\t}",
"public void setX(float x)\n {\n getBounds().offsetTo(x - positionAnchor.x, getBounds().top);\n notifyParentOfPositionChange();\n conditionallyRelayout();\n }",
"public void setX(Float x) {\n\t\tthis.x = x;\n\t}",
"public void setX(int x) { this.x=x; }",
"public void setMinValue(int x) {\r\n\t\tminValue = x;\r\n\t}",
"public void setMinValue(double x) {\r\n\t\tminValue = x;\r\n\t}",
"public void setStartX(double x)\n {\n startxcoord=x; \n }",
"public void setXLoc(int xLoc){\n myRectangle.setX(xLoc);\n }",
"protected final void setMin() {\n\tint prevmin = this.min;\n\n\tint i1 = this.low;\n\tint i2 = left.min;\n\tint i3 = right.min;\n\n\tif (i2 == -1) \n\t i2 = i1;\n\tif (i3 == -1) \n\t i3 = i1;\n\n\tif ((i1 <= i2) && (i1 <= i3)) {\n\t this.min = i1;\n\t} else if ((i2 <= i1) && (i2 <= i3)) {\n\t this.min = i2;\n\t} else {\n\t this.min = i3;\n\t}\n\n\tif ((p != IntervalNode.nullIntervalNode) &&\n\t (prevmin != this.min)) {\n \t p.setMin();\n\t}\n }",
"public void setX(int x) { loc.x = x; }",
"public void setX(double value) {\n\t\tthis.x = value;\n\t}",
"public void setX(double x)\n\t\t{\n\t\t this.x[0] = x;\n\t\t}",
"public void setX(int xPos){\t\t\n\t\tx = new Integer(xPos);\n\t}",
"public void setX() {\n m_frontLeft.setDesiredState(new SwerveModuleState(0, Rotation2d.fromDegrees(45)));\n m_frontRight.setDesiredState(new SwerveModuleState(0, Rotation2d.fromDegrees(-45)));\n m_rearLeft.setDesiredState(new SwerveModuleState(0, Rotation2d.fromDegrees(-45)));\n m_rearRight.setDesiredState(new SwerveModuleState(0, Rotation2d.fromDegrees(45)));\n }",
"public void setX(double value) {\n\t\t\t\tthis.x = value;\n\t\t\t}",
"public void setLowerPoint(Point lower) {\n this.lower = lower;\n }",
"public void setX1()\n\t{\n\t\tthis.x[1] = this.x[0] - (this.length)/2;\n\t}"
] | [
"0.7560415",
"0.7146603",
"0.7123897",
"0.70083594",
"0.70075387",
"0.69978535",
"0.6982853",
"0.6976542",
"0.6904274",
"0.69012743",
"0.6830883",
"0.6756912",
"0.6756912",
"0.67549247",
"0.67261165",
"0.67261165",
"0.67261165",
"0.67148507",
"0.6714834",
"0.6699007",
"0.6684275",
"0.6684275",
"0.6684275",
"0.6684275",
"0.6676303",
"0.6652073",
"0.66280234",
"0.6614511",
"0.66035056",
"0.6597558",
"0.65965647",
"0.65965647",
"0.65965647",
"0.65965647",
"0.65965647",
"0.6583857",
"0.65817624",
"0.6579999",
"0.6577963",
"0.6572476",
"0.6571575",
"0.65566033",
"0.6554974",
"0.6537408",
"0.6534864",
"0.6527952",
"0.6526713",
"0.6526713",
"0.6526677",
"0.65146047",
"0.6511708",
"0.6500459",
"0.6500127",
"0.64858574",
"0.6473994",
"0.64717025",
"0.64547795",
"0.6441574",
"0.6439403",
"0.6437577",
"0.64358836",
"0.6432522",
"0.6428023",
"0.642201",
"0.64192814",
"0.6392416",
"0.6392416",
"0.6392416",
"0.6392416",
"0.6378359",
"0.6368499",
"0.63657385",
"0.6356718",
"0.6340438",
"0.6339406",
"0.63342166",
"0.6329542",
"0.632946",
"0.63255346",
"0.632019",
"0.6318544",
"0.63174504",
"0.63146836",
"0.6311083",
"0.63051283",
"0.62988025",
"0.62929565",
"0.62926096",
"0.6291456",
"0.62720937",
"0.6265532",
"0.6262791",
"0.6234414",
"0.6230048",
"0.62289786",
"0.6227513",
"0.62224156",
"0.6217972",
"0.62136465",
"0.6190011"
] | 0.66002333 | 29 |
Sets lower right y. | public void setUpperRightY(double upperRightY) {
this.minY = upperRightY;
this.upperRightY = upperRightY;
this.topRightLat = upperRightY;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setY(int y) {\n\tbaseYCoord = y;\n}",
"public void setY(int y ){\n if(y>0){\n this.y=y;\n }\n \n }",
"public void setY(int y){\r\n\t\tthis.y = y;\r\n\t}",
"public void setY(int y) {\r\n\t\tthis.y = y;\r\n\t}",
"public void setY(int y) {\r\n\t\tthis.y = y;\r\n\t}",
"public void setY(int y) {\r\n\t\tthis.y = y;\r\n\t}",
"public void setY(int y) {\r\n\t\tthis.y = y;\r\n\t}",
"public void setY(int y) {\n this.y = y;\r\n }",
"public void resetY() {this.startY = 11.3f;}",
"public void setY(int y) {\n this.y = y;\n }",
"public void setY(int y) {\n this.y = y;\n }",
"public void setY(int y) {\n this.y = y;\n }",
"@Override\n\tpublic void setY(int y) {\n\t\t\n\t}",
"public void setY(int theY)\r\n {\r\n y = theY;\r\n }",
"public void setY(int y) {\n\t\tthis.y = y;\n\t}",
"public void setY(int y) {\n\t\tthis.y = y;\n\t}",
"public void setY(int y) {\n\t\tthis.y = y;\n\t}",
"public void setY(int y) {\n\t\tthis.y = y;\n\t}",
"public void setLowerLeftY(double lowerLeftY) {\r\n this.maxY = lowerLeftY;\r\n this.bottomLeftLat = lowerLeftY;\r\n this.lowerLeftY = lowerLeftY;\r\n }",
"@Override\n\tpublic void setY(int y) {\n\n\t}",
"public void setY(int y)\n {\n this.y = y;\n }",
"public void setY(long y){\n this.y = y;\n }",
"public void setY(double y) {\n this.y = y;\r\n }",
"public void setY(final int y) {\n\n this.y = y;\n }",
"public void setY(double y)\n {\n this.y = y;\n }",
"void setY(int y) {\n position = position.setY(y);\n }",
"public void setY(double y){\n this.y = y;\n }",
"public void setY(double y){\n this.y = y;\n }",
"public void setY(int y)\n\t{\n\t\tthis.y = y;\t\t\t\t\t\t\t\t\t\t\t\t\t// Update point's y-coordinate \n\t}",
"public void setY(double y) {\n this.y = y;\n }",
"public void setY(double y) {\n this.y = y;\n }",
"public void setY(double y) {\n this.y = y;\n }",
"@Override\n public void setY(int y) {\n this.y=y;\n }",
"public void setY(int y){\n this.y = y;\n }",
"public void setY(int y){\n this.y = y;\n }",
"public void setY(int y){\n this.y = y;\n }",
"public void setY( int y ) {\n\t\t//not checking if y is valid because that depends on the coordinate system\n\t\tthis.y = y;\n\t}",
"public void setY(int y){\n\t\tthis.y_location = y;\n\t}",
"public void setY(double y)\n\t{\n\t\tthis.y = y;\n\t}",
"public void setY(int y) {\n\t\tthis.Y = y;\n\t}",
"void setY(double y){\r\n\t\tthis.y=y;\r\n\t}",
"public void setY(int y) { this.y=y; }",
"public void setY(double y) {\n\t\tthis.y = y;\n\t}",
"void setY(int y) {\n this.y = y;\n }",
"@Override\n\tpublic void setY(int y) {\n\t\tyPos = y;\n\t}",
"public void setY(int y) { loc.y = y; }",
"default void setY(double y)\n {\n getAxis().setY(y);\n }",
"@Override\r\n\tpublic void setY(float y) {\n\t\t\r\n\t}",
"public void setEndY(double y)\n {\n endycoord=y; \n }",
"public void setY(int y){ yPosition = y; }",
"public void setY(int value) {\n this.y = value;\n }",
"public PlotPosition setY( double y )\n {\n return setY( y, 1 );\n }",
"public void setY(double newY) {\r\n y = newY;\r\n }",
"public void setY(int ys)\r\n\t{\r\n\t\ty = ys;\r\n\t}",
"public void setY(int newY)\r\n {\r\n yCoord = newY;\r\n }",
"@Override\n\tpublic void setY(float y) {\n\n\t}",
"void setY(int newY) {\n this.yPos = newY;\n }",
"void setY(float y) {\n _y = y;\n }",
"public void setY(double y)\r\n\t{\t\r\n\t\tvirtualDxfPoint.setTransformationY(y);\r\n\t\tAnchor.setY(y);\r\n\t}",
"public void setY( double Y)\r\n {\r\n curY = Y;\r\n }",
"@Override\n\tpublic void setY(float y) \n\t{\n\t\t_y = y;\n\t}",
"public void setY(Double y);",
"public void setY(double pY) {\n mY = pY;\n }",
"public void setY(double value) {\n origin.setY(value);\n }",
"public void setY(Double y) {\n\t\tthis.y = y;\n\t}",
"public void setStartY(double y)\n {\n startycoord=y; \n }",
"private void setY(long value) {\n bitField0_ |= 0x00000002;\n y_ = value;\n }",
"public void setY(int yPos){\t\t\n\t\ty = new Integer(yPos);\n\t}",
"public void setY(double y)\n\t\t{\n\t\t this.y[0] = y;\n\t\t}",
"public void setY(float y) {\r\n\t\tthis.y = y;\r\n\t}",
"public void setY(double value) {\n this.y = value;\n }",
"public void setY(float y){\n this.y = y;\n }",
"public void setY(int y) {\r\n this.y = y;\r\n\r\n this.slot = Slot.fromXY(getX(), y);\r\n }",
"public void setY(float y) {\n this.y = y;\n }",
"public void setYPos(int y) {\n // from MoveEventHandler\n // convert to real y coord\n // y = yP * (ymaxR - yminr) / (ymaxP - yminP)\n double tmp = config.getMaximumRealY() + (y - config.getMaximumPixelY())*(config.getMaximumRealY() - config.getMinimumRealY())/(config.getMaximumPixelY() - config.getMinimumPixelY());\n ypos.setText(formatter.format(tmp));\n }",
"public void setYPosition(double y)\n\t{\n\t\tthis.yPosition = y;\n\t}",
"public void setY(double val) {\r\n\t\t this.yCoord = val;\r\n\t }",
"public void setLimit_lin_y_lower(float limit_lin_y_lower) throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeFloat(__io__address + 40, limit_lin_y_lower);\n\t\t} else {\n\t\t\t__io__block.writeFloat(__io__address + 32, limit_lin_y_lower);\n\t\t}\n\t}",
"public void setLowerLeftY(float value)\n {\n rectArray.set(1, new COSFloat( value ) );\n }",
"public void setY1()\n\t{\n\t\tdouble h;\n\t\th = Math.pow(this.length, 2) - Math.pow((this.length/2), 2);\n\t\th = Math.sqrt(h);\n\t\tthis.y[1] = this.y[0] - h;\n\t}",
"public void setY(Float y) {\n\t\tthis.y = y;\n\t}",
"void setY(final Number y) {\n this.yCoordinate = y;\n }",
"public void SetY2()\n\t{\n\t\tdouble h;\n\t\th = Math.pow(this.length, 2) - Math.pow((this.length/2), 2);\n\t\th = Math.sqrt(h);\n\t\tthis.y[2] = this.y[0] - h;\n\t}",
"public void setY(float y)\n {\n getBounds().offsetTo(getBounds().left, y - positionAnchor.y);\n notifyParentOfPositionChange();\n conditionallyRelayout();\n }",
"@Override\r\n\tpublic void setPositionY(int y) {\n\t\tif (!(y >= 0))\r\n\t\t\tthrow new PreConditionError(\"Error PreCondition: y >= 0\");\r\n\r\n\t\tcheckInvariant();\r\n\r\n\t\tsuper.setPositionY(y);\r\n\r\n\t\tcheckInvariant();\r\n\r\n\t\t// post: getPositionY() == y\r\n\t\tif (!(getPositionY() == y))\r\n\t\t\tthrow new PostConditionError(\"Error PostCondition: getPositionY() == y\");\r\n\t}",
"public void setInitial_y(short initial_y) {\n this.initial_y = initial_y;\n }",
"public void setY(float y){\n hitBox.offsetTo(hitBox.left,y);\n //this.y=y;\n }",
"public void setY(boolean y) {\n\tthis.y = y;\n }",
"@SuppressLint(\"NewApi\")\n\tpublic S<T> Y(int y){\n\t\t((View)t).setY(y);\n\t\treturn this;\n\t}",
"public void setYCoordinates(double newY) { this.yCoordinates = newY; }",
"public void setY(int y) {\r\n this.y = (short) y;\r\n }",
"public void reverseDirectionY()\n\t{\n\t\t\n\t\tvy = -vy;\n\t}",
"protected void setYWithinBounds(double y) {\n\t\tif (getWorld() != null && (y < 0 || y >= getWorld().getWorldHeight()))\n\t\t\t\tterminate();\n\t\tsetY(Math.max(y, 0));\n\t}",
"public void setyCoord(Location l) {\n\t\t\n\t}",
"public void setY(int newY)\n\t{\n\t\ty+=newY;\n\t\tboundingBox = new Rectangle(x,y,width,height);\n\t}",
"public void setUpperRightY(float value)\n {\n rectArray.set(3, new COSFloat( value ) );\n }",
"public void setExtendedY(float y) {\n mMaximumTop = (int) y;\n }",
"public void setCurrentYPosition(int y) {\n\t\tthis.currentYPosition = y;\n\t\tthis.currentXPosition = this.floats.leftIntersectionPoint(this.box.getAbsoluteX()\n\t\t\t\t+ this.box.marginLeft + this.box.paddingLeft, this.box.getAbsoluteY() + y\n\t\t\t\t+ this.box.marginTop + this.box.paddingTop, this.currentRowMaxWidth, this.box);\n\t}",
"@Override\n\tpublic int getY() {\n\t\treturn logicY;\n\t}",
"public void setY(int y) {\n collider.setLocation((int) collider.getX(), y);\n }"
] | [
"0.7494774",
"0.7477116",
"0.7476508",
"0.74492276",
"0.74492276",
"0.74492276",
"0.74492276",
"0.74115014",
"0.73765725",
"0.7367069",
"0.7367069",
"0.7367069",
"0.7362548",
"0.73618096",
"0.73495394",
"0.73495394",
"0.73495394",
"0.73495394",
"0.7336972",
"0.73326886",
"0.73251903",
"0.73202646",
"0.73095",
"0.730048",
"0.72834915",
"0.7280951",
"0.7279847",
"0.7279847",
"0.72721887",
"0.72707415",
"0.72707415",
"0.72707415",
"0.72702587",
"0.7267263",
"0.7267263",
"0.7267263",
"0.7265202",
"0.72630197",
"0.72605586",
"0.72514004",
"0.72454417",
"0.7241876",
"0.7237492",
"0.72005904",
"0.7194566",
"0.7191881",
"0.7177079",
"0.71767217",
"0.712596",
"0.7118418",
"0.7118",
"0.7107588",
"0.71048665",
"0.70929384",
"0.70737934",
"0.706365",
"0.7053696",
"0.705138",
"0.70466554",
"0.7037043",
"0.7022771",
"0.70185685",
"0.70036244",
"0.69998425",
"0.69957244",
"0.69936246",
"0.6979574",
"0.6979455",
"0.696718",
"0.69578296",
"0.6945221",
"0.6912171",
"0.6896397",
"0.688657",
"0.6885887",
"0.68821865",
"0.68764436",
"0.6861498",
"0.68582016",
"0.68562907",
"0.68559307",
"0.6826344",
"0.6803685",
"0.67959684",
"0.678747",
"0.6779474",
"0.6773346",
"0.6765009",
"0.67557293",
"0.6745536",
"0.6737379",
"0.67362046",
"0.6718584",
"0.67130417",
"0.67103654",
"0.67069376",
"0.6700468",
"0.6693624",
"0.6676767",
"0.6668717"
] | 0.69835114 | 66 |
Sets top left lat. | public void setBottomLeftLat(double bottomLeftLat) {
this.maxY = bottomLeftLat;
this.bottomLeftLat = bottomLeftLat;
this.lowerLeftY = bottomLeftLat;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setTopRightLat(double topRightLat) {\r\n this.minY = topRightLat;\r\n this.upperRightY = topRightLat;\r\n this.topRightLat = topRightLat;\r\n }",
"public void setLat(double value) {\n lat = value;\n }",
"public void setLat(double value) {\n this.lat = value;\n }",
"public Builder setLatitude(long value) {\n bitField0_ |= 0x00000010;\n latitude_ = value;\n onChanged();\n return this;\n }",
"@Override\n\tpublic void setLatitude(double Latitude) {\n\t\t_locMstLocation.setLatitude(Latitude);\n\t}",
"public void setLat(double lat) {\n this.lat = lat;\n }",
"void setLatitude(Double latitude);",
"public void setLat(double lat) {\r\n\t\tthis.lat = lat;\r\n\t}",
"public void setLat(double lat) {\r\n\t\t\tthis.lat = lat;\r\n\t\t}",
"@Test\n public void testSetLatitude() {\n \n assertEquals(0.0f, o2.getLatitude(), 0.0);\n o2.setLatitude(0.2f);\n assertEquals(0.2f, o2.getLatitude(), 0.0);\n }",
"public void setLat(String id, String lat);",
"private void setMyLatLong() {\n }",
"public void setLatitude(float latitude) { this.latitude = latitude; }",
"public void setPosition(Point pos) {\n this.topLeft = pos.asVector();\n }",
"public Builder setLatitude(int value) {\n bitField0_ |= 0x00000002;\n latitude_ = value;\n onChanged();\n return this;\n }",
"public void setLatitude(float value) {\n this.latitude = value;\n }",
"public void setLoc(int lx, int ly){\r\n \tbox.setLocation(lx,ly);\r\n }",
"public double getTopRightLat() {\r\n return topRightLat;\r\n }",
"public void setTopRightLon(double topRightLon) {\r\n this.topRightLon = topRightLon;\r\n this.upperRightX = topRightLon;\r\n this.maxX = topRightLon;\r\n }",
"public Builder setPlayerLat(double value) {\n \n playerLat_ = value;\n onChanged();\n return this;\n }",
"public void setLatitude(double latitude){\n this.latitude = latitude;\n }",
"public void setLatitude(float latitude) {\n this.latitude = latitude;\n }",
"public void setLatitude(int latitude) {\n this.latitude = latitude;\n }",
"public void setxCoord(Location l) {\n\t\t\n\t}",
"public void setLatitude(Float latitude) {\n this.latitude = latitude;\n }",
"public void setTopLeft(Item item) {\n topLeft = item;\n }",
"public void setLat(String lat) {\n this.lat = lat == null ? null : lat.trim();\n }",
"public void setLatitude(double latitude) {\n this.latitude = latitude;\n }",
"public Builder setLatitude(double value) {\n \n latitude_ = value;\n onChanged();\n return this;\n }",
"public void setLatitude(double latitude) {\n\t\tLatitude = latitude;\n\t}",
"public void setLatitude (String strLatitude){\n this.latitude = strLatitude;\n }",
"private void setLatLon(double lat, double lon,\n boolean andResetStationMenu) {\n try {\n this.lat = lat;\n this.lon = lon;\n \n // the setCenterPoint call destroys the existing displayables\n // within rangeRings (which is a CompositeDisplayable) and\n // recreates the labels using RadarGrid's makeLabels method.\n // so just make sure to call fixTextDisplayableSphereField!\n rangeRings.setCenterPoint(lat, lon);\n fixTextDisplayableSphereField();\n \n rescaleLabels();\n if (stationCbx != null) {\n if (andResetStationMenu) {\n stationCbx.setSelectedIndex(0);\n }\n updateLegendLabel();\n latField.setText(getDisplayConventions().formatLatLon(lat));\n lonField.setText(getDisplayConventions().formatLatLon(lon));\n }\n\n } catch (Exception exc) {\n logException(\"Setting lat/lon\", exc);\n }\n\n }",
"public void setPosition(GeoPoint position){\n\t\tmPosition = position.clone();\n\t\tif (isInfoWindowShown()) {\n\t\t\tcloseInfoWindow();\n\t\t\tshowInfoWindow();\n\t\t}\n\t\tmBounds=new BoundingBox(position.getLatitude(),position.getLongitude(),position.getLatitude(),position.getLongitude());\n\t}",
"public void setLocation(){\n //Check if user come from notification\n if (getIntent().hasExtra(EXTRA_PARAM_LAT) && getIntent().hasExtra(EXTRA_PARAM_LON)){\n Log.d(TAG, \"Proviene del servicio, lat: \" + getIntent().getExtras().getDouble(EXTRA_PARAM_LAT) + \" - lon: \" + getIntent().getExtras().getDouble(EXTRA_PARAM_LON));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(getIntent().getExtras().getDouble(EXTRA_PARAM_LAT), getIntent().getExtras().getDouble(EXTRA_PARAM_LON)), 18));\n NotificationManager mNM = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n mNM.cancel(1);\n } else{\n if (bestLocation!=null){\n Log.d(TAG, \"Posicion actual -> LAT: \"+ bestLocation.getLatitude() + \" LON: \" + bestLocation.getLongitude());\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(bestLocation.getLatitude(), bestLocation.getLongitude()), 16));\n } else{\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(41.651981, -4.728561), 16));\n }\n }\n }",
"void setLongitude(Double longitude);",
"public void setRouteCenter() {\n\t\tif (metaInfo.isAutoZoomingChecked()) {\n\t\t\t// Calculates the mean point and sets the route.\n\t\t\tdouble meanLat = 0;\n\t\t\tdouble meanLon = 0;\n\t\t\tint numberPoints;\n\t\t\tdouble farthestLat = 0;\n\t\t\tdouble farthestLon = 0;\n\t\t\tdouble zoom;\n\n\t\t\tList<UIWayPoint> currentWayPoints = utilities.getOrderedWayPoints();\n\t\t\tnumberPoints = utilities.getOrderedWayPoints().size();\n\n\t\t\tfor (UIWayPoint p : currentWayPoints) {\n\t\t\t\tmeanLat += Double.valueOf(p.getLatitude());\n\t\t\t\tmeanLon += Double.valueOf(p.getLongitude());\n\t\t\t}\n\n\t\t\tmeanLat /= (numberPoints * 1.0);\n\t\t\tmeanLon /= (numberPoints * 1.0);\n\n\t\t\t// Finds farthest latitude and longitude from mean.\n\t\t\tfor (UIWayPoint p : currentWayPoints) {\n\t\t\t\tif ((Math.abs(Double.valueOf(p.getLatitude()) - meanLat) > farthestLat)) {\n\t\t\t\t\tfarthestLat = (Math.abs((Double.valueOf(p.getLatitude())) - meanLat));\n\t\t\t\t}\n\t\t\t\tif ((Math.abs(Double.valueOf(p.getLongitude()) - meanLon) > farthestLon)) {\n\t\t\t\t\tfarthestLon = (Math.abs((Double.valueOf(p.getLongitude()) - meanLon)));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Used to calculate zoom level.\n\t\t\tPoint centerPoint = new Point(meanLat, meanLon);\n\t\t\tif (farthestLat == 0 && farthestLon == 0) {\n\t\t\t\tzoom = 17;\n\t\t\t} else {\n\t\t\t\tzoom = Math.floor(Math.log10(180.0 / Math.max(farthestLat, farthestLon)) / Math.log10(2));\n\t\t\t}\n\n\t\t\tleafletMap.setCenter(centerPoint, zoom + 1);\n\t\t}\n\t}",
"public Builder setLatitude(double value) {\n \n latitude_ = value;\n onChanged();\n return this;\n }",
"public int setLatitude(float latitude) {\n try {\n if ( ((latitude == FLOATNULL) ||\n (latitude == FLOATNULL2)) ||\n !((latitude < LATITUDE_MN) ||\n (latitude > LATITUDE_MX)) ) {\n this.latitude = latitude;\n latitudeError = ERROR_NORMAL;\n } else {\n throw latitudeOutOfBoundsException;\n } // if INTNULL ...\n } catch (Exception e) {\n setLatitudeError(FLOATNULL, e, ERROR_LOCAL);\n } // try\n return latitudeError;\n }",
"float latitude() {\n switch (this) {\n case NORTH_4M:\n case NORTH_16M:\n return FastMath.HALF_PI;\n case SOUTH_4M:\n case SOUTH_16M:\n return -FastMath.HALF_PI;\n case WILTSHIRE_4M:\n case WILTSHIRE_16M:\n /*\n * Stonehenge\n */\n return 51.1788f * FastMath.DEG_TO_RAD;\n }\n throw new IllegalStateException();\n }",
"public void setLon(double value) {\n lon = value;\n }",
"public void setLocation(double latitude, double longtitude, double altitude) {\r\n\t\tthis.p = new Point3D(longtitude, latitude, altitude);\r\n\t}",
"public void setMapPosition() {\n\t\txmap = levelState.getx();\n\t\tymap = levelState.gety();\n\t}",
"public void setLatitude(Double latitude) {\n this.latitude = latitude;\n }",
"public void setLatitude(Double latitude) {\n this.latitude = latitude;\n }",
"public void setLat(double latitude) {\n filename = evaluate(latitude, getLon(), getLevel());\n }",
"public void setLatitude(String latitude)\r\n {\r\n this.latitude = latitude;\r\n }",
"@Override\n\tpublic void setPosition(int left)\n\t{\n\t\t_mainPanel.getElement().getStyle().setLeft(left, Style.Unit.PX) ;\n\t}",
"@Override\n\tpublic double getLatitude() {\n\t\treturn _locMstLocation.getLatitude();\n\t}",
"@Override\n public void setCameraCoordinate(double latitude, double longitude) {\n mMap.moveCamera(CameraUpdateFactory.newLatLng(new LatLng(latitude, longitude)));\n }",
"public void setLatitude(double latitude) {\n\t\tthis.latitude = latitude;\n\t}",
"private void setUpStartPosition()\n {\n \tthis.xPos = startTile.xPos;\n this.yPos = startTile.yPos - startTile.tileHeight;\n yPos--;\n \n System.out.println(\"Player is on level \" + level + \n \" at position x: \" + xPos + \", y: \" + yPos); \n }",
"private void xxx() {\n LatLng westfieldNJ = new LatLng(40.659, -74.3474);\n mMap.addMarker(new MarkerOptions().position(westfieldNJ).title(\"Westfield, New Jersey\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(westfieldNJ));\n\n }",
"public void setLng(double value) {\n this.lng = value;\n }",
"@Override\r\n\tpublic void setMinCoordinates() {\n\t\t\r\n\t}",
"public void setUserLocation(double lat, double lon) {\n\tuserLocation = new Point2D.Double(lon,lat);\n }",
"public void setLowerLeftY(double lowerLeftY) {\r\n this.maxY = lowerLeftY;\r\n this.bottomLeftLat = lowerLeftY;\r\n this.lowerLeftY = lowerLeftY;\r\n }",
"public void setIsLat(Boolean boo) {\n\t this.isLat = boo;\n }",
"private void setMapPos()\r\n {\r\n try\r\n {\r\n Thread.sleep(1000);//so that you can see players move\r\n }\r\n catch(Exception e){}\r\n int currentPlayer = worldPanel.getCurrentPlayer();\r\n int currentUnit = worldPanel.getCurrentUnit();\r\n int unitPos = 0;\r\n int firstX = 0;\r\n int firstY = 0;\r\n if (currentPlayer == 1)\r\n {\r\n unitPos = worldPanel.player1.units[currentUnit - 1].getPosition();\r\n }\r\n if (currentPlayer == 2)\r\n {\r\n unitPos = worldPanel.player2.units[currentUnit - 1].getPosition();\r\n }\r\n int tempX = unitPos % mapWidth;\r\n int tempY = unitPos - tempX;\r\n if (tempY == 0) {}\r\n else\r\n tempY = tempY / mapHeight;\r\n tempX = tempX - 11;\r\n tempY = tempY - 7;\r\n if (tempX >= 0)\r\n firstX = tempX;\r\n else\r\n firstX = tempX + mapWidth;\r\n if (tempY >= 0)\r\n firstY = tempY;\r\n else\r\n firstY = tempY + mapWidth;\r\n\r\n int drawWidth = worldPanel.getDrawWidth();\r\n int drawHeight = worldPanel.getDrawHeight();\r\n worldPanel.setNewXYPos(firstX, firstY);\r\n miniMap.setNewXY(firstX, firstY, drawWidth, drawHeight);\r\n }",
"public void setRobotLocation(Point p);",
"public void setLoc(int x, int y) {\n locX = x;\n locY = y;\n }",
"public void setStart( GeoPoint start ){\n this.setOrigin(start);\n }",
"public void setStartPosition(int start) {\n mLastPosition = start;\n }",
"public void setLatitude(double latitude) {\n if (latitude < -90 || latitude > 90) {\n throw new IllegalArgumentException(\"Latitude value must be in the next range: [-90.0; 90.0].\");\n }\n this.latitude = latitude;\n }",
"public void setLocation(double lon, double lat) {\n\t\tthis.lon = lon;\n\t\tthis.lat = lat;\n\t}",
"@SuppressWarnings(\"unused\")\n private void setCenter(JSONArray args, CallbackContext callbackContext) throws JSONException {\n double lat, lng;\n\n lat = args.getDouble(1);\n lng = args.getDouble(2);\n\n LatLng latLng = new LatLng(lat, lng);\n CameraUpdate cameraUpdate = CameraUpdateFactory.newLatLng(latLng);\n this.myMoveCamera(cameraUpdate, callbackContext);\n }",
"public double getLat() {\r\n\t\t\treturn lat;\r\n\t\t}",
"@Override\n public String updateLat() {\n return mylat;\n }",
"public void setXYZ(Location loc)\n\t{\n\t\tsetXYZ(loc.getX(), loc.getY(), loc.getZ());\n\t}",
"public void setLongitude(float longitude) { this.longitude = longitude; }",
"public static float getLocX(double lat) {\n\t\treturn (float) ((lat - Graph.CENTRE_LAT) * Graph.SCALE_LAT * Graph.zoom);\n\t}",
"public void setStartMarker() {\n if (startLocation != null) {\n preferencesManager.putStringValue(\"STARTLATITUDE\", startLocation.latitude + \"\");\n preferencesManager.putStringValue(\"STARTLONGITUDE\", startLocation.longitude + \"\");\n if (mMarkerStartLocation != null) {\n mMarkerStartLocation.remove();\n }\n iconMarker = BitmapFactory.decodeResource(\n mainActivity.getResources(), R.drawable.ic_position_a);\n iconMarker = Bitmap.createScaledBitmap(iconMarker,\n iconMarker.getWidth(), iconMarker.getHeight(),\n false);\n mMarkerStartLocation = mMap.addMarker(new MarkerOptions().position(\n startLocation).icon(\n BitmapDescriptorFactory.fromBitmap(iconMarker)));\n showDirection();\n }\n }",
"public void setCenter(final ILatLng latlng) {\n setCenter(latlng, null);\n }",
"public double getLat() {\r\n\t\treturn lat;\r\n\t}",
"public void setStartPosition() {\n bounds.offsetTo((SanitizorGame.mSurfaceWidth - bounds.width()) / 2,\n SanitizorGame.mSurfaceHeight - (BOTTOM_PADDING + bounds.height()));\n }",
"public void setLatitud(String latitud);",
"public void setCameraPosition(Coord crd) {\n if(internalNative == null) {\n if(internalLightweightCmp != null) {\n internalLightweightCmp.zoomTo(crd, internalLightweightCmp.getZoomLevel());\n } else {\n // TODO: Browser component \n }\n return;\n }\n internalNative.setPosition(crd.getLatitude(), crd.getLongitude());\n }",
"public void setHomePosition(String latlng) {\r\n\t\t\r\n\t\tdataStorage.setHomePosition(latlng);\r\n\t\t\r\n\t}",
"public double getLat() {\n return lat;\n }",
"public double getLat() {\n return lat;\n }",
"public double getLat() {\n return lat;\n }",
"@Override\n public void setLocation(String latitude, String longitude) {\n lat = latitude;\n lon = longitude;\n }",
"private void setCameraPosition(Location location){\n map.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(location.getLatitude(),\n location.getLongitude()),15.0));\n }",
"public void set_latitude(double _latitude) {\r\n\t\tthis._latitude = _latitude;\r\n\t}",
"public void testSetStartLocation() {\n assertEquals(test, maze1.getStartLocation());\n test = new Location(0, 1);\n maze1.setStartLocation(test);\n assertEquals(test, maze1.getStartLocation());\n test = new Location(2, 2);\n maze1.setCell(test, MazeCell.WALL);\n maze1.setStartLocation(test);\n assertEquals(test, maze1.getStartLocation());\n \n }",
"@Override\n public String getLat() {\n return lat;\n }",
"@Override\n public void setLocation(geo_location p) {\n this.location.setX(p.x());\n this.location.setY(p.y());\n this.location.setZ(p.z());\n }",
"public void moveTheMap() {\n \t if(streetLevelFragment != null && map != null){\n \t\t map.setCenter(streetLevelFragment.getStreetLevelModel().getPosition(), MapAnimation.LINEAR, map.getZoomLevel(), streetLevelFragment.getStreetLevelModel().getHeading(), 0);\n \t }\n }",
"public int getLat();",
"public static void setCurrentLocation(Double lat, Double lng ){\n //SharedPreferences sharedPreferences1=appCompatActivity. getSharedPreferences(\"longitude\", MODE_PRIVATE) ;\n SharedPreferences.Editor editor=sharedPreferences.edit();\n editor.putString(USER_LTD, String.valueOf(lat));\n editor.putString(USER_LNG, String.valueOf(lng));\n editor.apply();\n }",
"private void setOrigin() {\n Hep3Vector origin = VecOp.mult(CoordinateTransformations.getMatrix(), _sensor.getGeometry().getPosition());\n // transform to p-side\n Polygon3D psidePlane = this.getPsidePlane();\n Translation3D transformToPside = new Translation3D(VecOp.mult(-1 * psidePlane.getDistance(),\n psidePlane.getNormal()));\n this._org = transformToPside.translated(origin);\n }",
"public void setPosition(GeoPoint pp, byte zoomlevel) {\n\n mapView.getMapViewPosition().setMapPosition(new MapPosition(pp, zoomlevel));\n }",
"public String getLat() {\n return lat;\n }",
"private void setTypeLatitude(String latitude, String longitude) {\n type = WeatherConsts.TYPE_LATITUDE;\n param1 = latitude;\n param2 = longitude;\n }",
"public synchronized void setLatitude(Double latitude) {\r\n\t\t// if it is the same don't update\r\n\t\tif (latitude.equals(this.latitude)) {\r\n\t\t\tupdatedLat = false;\r\n\t\t} else {\r\n\t\t\tthis.latitude = latitude;\r\n\t\t\tupdatedLat = true;\r\n\t\t\tSystem.out.println(\"Update latitude: \" + latitude);\r\n\t\t}\r\n\t}",
"private void setLocation() {\n switch (getKey()) {\n case UP:\n this.y_location = -136.8 - 6;\n this.y_tile = -1;\n this.positive = false;\n break;\n case DOWN:\n this.y_location = 136.8 + 6;\n this.y_tile = 1;\n break;\n case LEFT:\n this.x_location = -140.6 - 6;\n this.x_tile = -1;\n this.positive = false;\n break;\n case RIGHT:\n this.x_location = 140.6 + 6;\n this.x_tile = 1;\n break;\n default:\n break;\n }\n }",
"public int setLatitude(Integer latitude) {\n try {\n setLatitude(latitude.floatValue());\n } catch (Exception e) {\n setLatitudeError(FLOATNULL, e, ERROR_SYSTEM);\n } // try\n return latitudeError;\n }",
"public void setPosicao() {\n Dimension d = this.getDesktopPane().getSize();\n this.setLocation((d.width - this.getSize().width) / 2, (d.height - this.getSize().height) / 2);\n }",
"public void setLocation(int loacation) {\n\t\tsuper.setLocation(loacation);\n\t}",
"private void centerMap(final GoogleMap map) {\n // Bounds of campustown and some surroundings\n final double swLatitude = 40.098331;\n final double swLongitude = -88.246065;\n final double neLatitude = 40.116601;\n final double neLongitude = -88.213077;\n\n // Get the window dimensions (for the width)\n Point windowSize = new Point();\n getWindowManager().getDefaultDisplay().getSize(windowSize);\n\n // Convert 300dp (height of map control) to pixels\n final int mapHeightDp = 300;\n float heightPx = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, mapHeightDp,\n getResources().getDisplayMetrics());\n\n // Submit the camera update\n final int paddingPx = 10;\n map.moveCamera(CameraUpdateFactory.newLatLngBounds(new LatLngBounds(\n new LatLng(swLatitude, swLongitude),\n new LatLng(neLatitude, neLongitude)), windowSize.x, (int) heightPx, paddingPx));\n }",
"@Override\n public void setLocation(ITileGrid grid, int x, int y) {\n var tile = grid.getTile(x, y);\n pos = tile.getPixelCenterLocation(grid.getTileSize());\n }"
] | [
"0.67668563",
"0.6700373",
"0.6482389",
"0.64739394",
"0.64236534",
"0.64235437",
"0.6422019",
"0.64090556",
"0.63801277",
"0.6275343",
"0.6253029",
"0.6200645",
"0.6163332",
"0.61357665",
"0.61082965",
"0.60792714",
"0.6074244",
"0.60464674",
"0.5996463",
"0.5995611",
"0.599089",
"0.5985543",
"0.5966541",
"0.58984727",
"0.5885792",
"0.5855752",
"0.58513117",
"0.5838676",
"0.5835933",
"0.5801789",
"0.57853186",
"0.5780558",
"0.57670265",
"0.576668",
"0.57657635",
"0.5765088",
"0.5755454",
"0.5744702",
"0.5732106",
"0.5730741",
"0.5697911",
"0.5694716",
"0.56794286",
"0.56794286",
"0.5657251",
"0.5655258",
"0.5652277",
"0.56520563",
"0.5649778",
"0.564751",
"0.5635213",
"0.5626293",
"0.5618611",
"0.56159806",
"0.5589276",
"0.55873483",
"0.55864125",
"0.5582769",
"0.5577685",
"0.55759597",
"0.5572751",
"0.556916",
"0.5562436",
"0.55539006",
"0.5551531",
"0.5543273",
"0.55410343",
"0.55402946",
"0.55366915",
"0.5532144",
"0.5531816",
"0.55097777",
"0.5505287",
"0.5504321",
"0.54968834",
"0.5494351",
"0.5486798",
"0.54847324",
"0.54847324",
"0.54847324",
"0.54836655",
"0.5481557",
"0.5480342",
"0.5474305",
"0.54740244",
"0.54735357",
"0.54711217",
"0.5470018",
"0.5469531",
"0.5457046",
"0.54438",
"0.54371107",
"0.5434701",
"0.5421225",
"0.5418118",
"0.5414317",
"0.5399703",
"0.538723",
"0.5386553",
"0.5384398"
] | 0.69712967 | 0 |
Sets bottom right lon. | public void setTopRightLon(double topRightLon) {
this.topRightLon = topRightLon;
this.upperRightX = topRightLon;
this.maxX = topRightLon;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setBottomLeftLat(double bottomLeftLat) {\r\n this.maxY = bottomLeftLat;\r\n this.bottomLeftLat = bottomLeftLat;\r\n this.lowerLeftY = bottomLeftLat;\r\n }",
"public Point getBottomRight() {\n return location.bottomRight();\n }",
"public void setTopRightLat(double topRightLat) {\r\n this.minY = topRightLat;\r\n this.upperRightY = topRightLat;\r\n this.topRightLat = topRightLat;\r\n }",
"public void setUpperRightY(double upperRightY) {\r\n this.minY = upperRightY;\r\n this.upperRightY = upperRightY;\r\n this.topRightLat = upperRightY;\r\n }",
"public void setLon(double value) {\n lon = value;\n }",
"void setLongitude(Double longitude);",
"public void setLon(double lon) {\r\n\t\t\tthis.lon = lon;\r\n\t\t}",
"public void setBottom() {\n reset(State.BOTTOM);\n }",
"public void setEndY(double y)\n {\n endycoord=y; \n }",
"public void setyCoord(Location l) {\n\t\t\n\t}",
"public void setY(int y) { loc.y = y; }",
"private void setLast(int x, int y) {\n\t\tthis.lastx = x;\n\t\tthis.lasty = y;\n\t}",
"private void moveRight(GObject bottom) {\r\n\t\tif(!facingEast) {\r\n\t\t\tdouble x = player.getX();\r\n\t\t\tdouble y = player.getY();\r\n\t\t\tremove(player);\r\n\t\t\tplayer = new GImage(\"PlayerEast.png\");\r\n\t\t\tplayer.scale(.75);\r\n\t\t\tadd(player, x, y);\r\n\t\t\tfacingEast = true;\r\n\t\t}\r\n\t\tif(player.getX() < getWidth() - player.getWidth() - 5 && bottom != null)\r\n\t\t\tplayer.move(PLAYER_X_MOTION, 0);\r\n\t}",
"public Builder setLongitude(long value) {\n bitField0_ |= 0x00000020;\n longitude_ = value;\n onChanged();\n return this;\n }",
"public double getEndLon() {\n\t\treturn endLon;\n\t}",
"public void setLimit_lin_y_upper(float limit_lin_y_upper) throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeFloat(__io__address + 44, limit_lin_y_upper);\n\t\t} else {\n\t\t\t__io__block.writeFloat(__io__address + 36, limit_lin_y_upper);\n\t\t}\n\t}",
"public void setY(int y) {\n\tbaseYCoord = y;\n}",
"@Test\n public void testSetLongitude() {\n \n assertEquals(0.0f, o2.getLatitude(), 0.0);\n o2.setLongitude(0.2f);\n assertEquals(0.2f, o2.getLongitude(), 0.0);\n }",
"public Builder setLongitude(int value) {\n bitField0_ |= 0x00000001;\n longitude_ = value;\n onChanged();\n return this;\n }",
"public Vector2f getBottomRightCorner() {\n return bottomRightCorner;\n }",
"public UtilsPadding setBottom(Number bottom) {\n if (jsBase == null) {\n this.bottom = null;\n this.bottom1 = null;\n \n this.bottom = bottom;\n } else {\n this.bottom = bottom;\n if (!isChain) {\n js.append(jsBase);\n isChain = true;\n }\n \n js.append(String.format(Locale.US, \".bottom(%s)\", bottom));\n\n if (isRendered) {\n onChangeListener.onChange(String.format(Locale.US, jsBase + \".bottom(%s);\", bottom));\n js.setLength(0);\n }\n }\n return this;\n }",
"private void setEndLocation() {\n switch (direction) {\n case UP:\n case DOWN:\n componentToMove.setLocation(posX, Direction.UP == direction ? Math.min(endPosition, posY) : Math.max(endPosition, posY));\n break;\n default:\n componentToMove.setLocation(Direction.LEFT == direction ? Math.min(endPosition, posX) : Math.max(endPosition, posX), posY);\n }\n }",
"@Override\n\tpublic void setEast(float east) {\n\t\t\n\t}",
"public void setLon(double longitude) {\n filename = evaluate(getLat(), longitude, getLevel());\n }",
"public UtilsPadding setRight(Number right) {\n if (jsBase == null) {\n this.right = null;\n this.right1 = null;\n \n this.right = right;\n } else {\n this.right = right;\n if (!isChain) {\n js.append(jsBase);\n isChain = true;\n }\n \n js.append(String.format(Locale.US, \".right(%s)\", right));\n\n if (isRendered) {\n onChangeListener.onChange(String.format(Locale.US, jsBase + \".right(%s);\", right));\n js.setLength(0);\n }\n }\n return this;\n }",
"public void setUpperRightY(float value)\n {\n rectArray.set(3, new COSFloat( value ) );\n }",
"public void setEndLoc( Vector2 end ) { endLoc = end; }",
"public void setLongitude(float longitude) { this.longitude = longitude; }",
"public void setEnd( GeoPoint end ){\n this.end = end;\n\n }",
"void setY(int y) {\n position = position.setY(y);\n }",
"public void setBottom(int x) {\r\n bottomSide = x;\r\n }",
"@Override\n\tpublic void setLongitude(double Longitude) {\n\t\t_locMstLocation.setLongitude(Longitude);\n\t}",
"public void setRobotLocation(Point p);",
"public void setY(int y){\n\t\tthis.y_location = y;\n\t}",
"public void setRight(BinNode<E> r)\n {\n right = r;\n }",
"public void setLimit_ang_y_upper(float limit_ang_y_upper) throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeFloat(__io__address + 68, limit_ang_y_upper);\n\t\t} else {\n\t\t\t__io__block.writeFloat(__io__address + 60, limit_ang_y_upper);\n\t\t}\n\t}",
"public void setLongitude(Float longitude) {\n this.longitude = longitude;\n }",
"public void setLongitude(float longitude) {\n this.longitude = longitude;\n }",
"public Builder setLongitude(double value) {\n \n longitude_ = value;\n onChanged();\n return this;\n }",
"public void setBoundingBoxRight(double value) {\n this.boundingBoxRight = value;\n }",
"public int setLongitude(Integer longitude) {\n try {\n setLongitude(longitude.floatValue());\n } catch (Exception e) {\n setLongitudeError(FLOATNULL, e, ERROR_SYSTEM);\n } // try\n return longitudeError;\n }",
"public void setY(int y){ yPosition = y; }",
"public void setLongitude(int longitude) {\n this.longitude = longitude;\n }",
"public double getLon() {\r\n\t\t\treturn lon;\r\n\t\t}",
"public void setLongitude(double longitude) {\n this.longitude = longitude;\n }",
"public void setLongitude(double longitude) {\n this.longitude = longitude;\n }",
"public void setLongitude(double longitude) {\n if (longitude < -180 || longitude > 180) {\n throw new IllegalArgumentException(\"Longitude value must be in the next range: [-180.0; 180.0].\");\n }\n this.longitude = longitude;\n }",
"public void setRangeTopRight(Location location) {\n\t\tthis.rangeTopRight = location;\n\t}",
"public void setLastHeal(int x, int y, int mapX, int mapY)\n\t{\n\t\tm_healX = x;\n\t\tm_healY = y;\n\t\tm_healMapX = mapX;\n\t\tm_healMapY = mapY;\n\t}",
"public int setLongitude(Float longitude) {\n try {\n setLongitude(longitude.floatValue());\n } catch (Exception e) {\n setLongitudeError(FLOATNULL, e, ERROR_SYSTEM);\n } // try\n return longitudeError;\n }",
"@Override\n\tpublic void setUtmEast(int utmEast) {\n\t\t\n\t}",
"public void setRight(Lane right) {\r\n\t\tthis.right = right;\r\n\t}",
"public void setRootYPos(int y) {\n root.setLayoutY(y);\n }",
"public Builder setLongitude(double value) {\n \n longitude_ = value;\n onChanged();\n return this;\n }",
"public Location south()\r\n {\r\n return new Location(x, y + 1);\r\n }",
"public static int getEndYCoordinate(){\n\tint y = getThymioEndField_Y(); \n\t\t\n\t\tif(y == 0){\n\t\t\n \t}else{\n \t y *= FIELD_HEIGHT;\n \t}\n\t\treturn y;\n\t}",
"public double getLon() {\n return lon;\n }",
"public double getLon() {\n return lon;\n }",
"public void setRight (Node r) {\r\n\t\tright = r;\r\n\t}",
"void updatePosition() {\n if (gameScreen.cursorIsOnLeft()) \n {\n // set the panel's rightmost edge to be 1/12th from the edge\n // set the panel's bottommost edge to be 1/6th from the edge\n setLocation(\n gameScreen.getScreenWidth() * 11/12 - getWidth(), \n gameScreen.getScreenHeight() * 5/6 - getHeight());\n }\n else // Otherwise the cursor must be on the right half of the screen\n {\n // set the panel's leftmost edge to be 1/12th from the edge\n // set the panel's bottommost edge to be 1/6th from the edge\n setLocation(\n gameScreen.getScreenWidth() * 1/12, \n gameScreen.getScreenHeight() * 5/6 - getHeight());\n }\n }",
"public void setUpperLeft(Point p) {\n this.upperLeft = p;\n }",
"public Coords getUpperRight()\r\n {\r\n return new Coords(x + width, y);\r\n }",
"public void setY(long y){\n this.y = y;\n }",
"public void setLongitude(double longitude) {\n\t\tLongitude = longitude;\n\t}",
"public void setRightJoyY(double rightJoyY) {\n this.rightJoyY = rightJoyY;\n }",
"public void setTopRight( final Control control ) {\n checkWidget();\n setTopRight( control, SWT.RIGHT );\n }",
"public void setUpperRightX(double upperRightX) {\r\n this.upperRightX = upperRightX;\r\n this.maxX = upperRightX;\r\n this.topRightLon = upperRightX;\r\n }",
"public void setEndLocation(Location endLoc) {\n gameLocations.put(GameLocation.END, endLoc);\n }",
"private void setMyLatLong() {\n }",
"public void setRangeBottomLeft(Location location) {\n\t\tthis.rangeBottomLeft = location;\n\t}",
"static public void adjustLeftBottom(Shape2D shape,float left,float bottom){\n shape(shape,left-Shape2DLimits.minXShape(shape),bottom-Shape2DLimits.minYShape(shape));\n }",
"public void setLongitude(Double longitude) {\n this.longitude = longitude;\n }",
"public void setLongitude(Double longitude) {\n this.longitude = longitude;\n }",
"public void setYPos(int y) {\n // from MoveEventHandler\n // convert to real y coord\n // y = yP * (ymaxR - yminr) / (ymaxP - yminP)\n double tmp = config.getMaximumRealY() + (y - config.getMaximumPixelY())*(config.getMaximumRealY() - config.getMinimumRealY())/(config.getMaximumPixelY() - config.getMinimumPixelY());\n ypos.setText(formatter.format(tmp));\n }",
"public void setY(int value)\n\t{\n\t\tgetWorldPosition().setY(value);\n\t}",
"public void setLocation(double lon, double lat) {\n\t\tthis.lon = lon;\n\t\tthis.lat = lat;\n\t}",
"public Builder clearLongitude() {\n bitField0_ = (bitField0_ & ~0x00000020);\n longitude_ = 0L;\n onChanged();\n return this;\n }",
"@Override\r\n\tpublic double getLon() {\n\t\treturn this.lon;\r\n\t}",
"@Override\n\tpublic int getPosY() {\n\t\treturn Y_LAND;\n\t}",
"@Test\n public void testSetEndNotInMap(){\n smallMaze.setEnd(Maze.position(0, 23));\n }",
"private Point findBottomRightCornerPoint() {\n return new Point(origin.getX() + width, origin.getY());\n }",
"public void setY(double y)\r\n\t{\t\r\n\t\tvirtualDxfPoint.setTransformationY(y);\r\n\t\tAnchor.setY(y);\r\n\t}",
"void setY(final Number y) {\n this.yCoordinate = y;\n }",
"public void setLongitude(double longitude) {\n\t\tthis.longitude = longitude;\n\t}",
"public void setBoundingBoxBottom(double value) {\n this.boundingBoxBottom = value;\n }",
"public void updateLongitude(double longitude) {\n\t\tif (this.minLongitude > longitude) {\n\t\t\tthis.minLongitude = longitude - Plane.SmallestGrain;\n\t\t}\n\t\t\n\t\tif (this.maxLongitude < longitude) {\n\t\t\tthis.maxLongitude = longitude + Plane.SmallestGrain;\n\t\t}\n\t}",
"public int getLon();",
"public void setNeighbors(){\t\t\t\t\n\t\tint row = position[0];\n\t\tint column = position[1];\t\t\n\t\tif(column+1 < RatMap.SIDELENGTH){\n\t\t\teastCell = RatMap.getMapCell(row,column+1);\t\t\t\n\t\t}else{\n\t\t\teastCell = null;\n\t\t}\t\n\t\tif(row+1 < RatMap.SIDELENGTH){\n\t\t\tnorthCell = RatMap.getMapCell(row+1,column);\n\t\t}else{\n\t\t\tnorthCell = null;\n\t\t}\t\n\t\tif(column-1 > -1){\n\t\t\twestCell = RatMap.getMapCell(row, column-1);\t\t\t\n\t\t}else{\n\t\t\twestCell = null;\n\t\t}\n\t\tif(row-1 > -1){\n\t\t\tsouthCell = RatMap.getMapCell(row-1, column);\n\t\t}else{\n\t\t\tsouthCell = null;\n\t\t}\n\t}",
"public void adjustRight() {\n\n for (int y = 0; y < MAP_HEIGHT; y++)\n for (int x = 0; x < MAP_WIDTH; x++) {\n tiles[x][y].x = tiles[x][y].x + 4;\n backGroundTiles[x][y].x = backGroundTiles[x][y].x + 4;\n grassTiles[x][y].x = grassTiles[x][y].x + 4;\n }\n\n }",
"public void setBitmapRight(Bitmap b){\n\t\timgRight = b;\n\t\tright.setBitmap(b);\n\t\tinvalidate();\n\t}",
"public Builder clearLongitude() {\n bitField0_ = (bitField0_ & ~0x00000001);\n longitude_ = 0;\n onChanged();\n return this;\n }",
"public void updateYLoc();",
"public void shiftRangeFarRight() {\n Range r = new Range(getMaxRangeEnd() - getRange().getLength() + 1, getMaxRangeEnd());\n setLocation(r);\n }",
"public double getLongitude() {\n if (slon == GempakConstants.IMISSD) {\n return slon;\n }\n return slon / 100.;\n }",
"static void setY(int j) {\n\t\tpx = j;\n\t}",
"private void setLongitudeError (float longitude, Exception e, int error) {\n this.longitude = longitude;\n longitudeErrorMessage = e.toString();\n longitudeError = error;\n }",
"public float setRotationY(float hand_positionX, float r_mapY_start) {\n r_yStart = r_mapY_start - ((270.0f / (1200.0f-100.0f)) * (hand_positionX-100.0f));\n return r_yStart;\n}",
"public void set_longitude(double _longitude) {\r\n\t\tthis._longitude = _longitude;\r\n\t}",
"protected void moveEast(){\n\t\tcar.setXLocation(currentX + 1);\n\t\tcurrentX += 1;\n\t}",
"public void setLongitude(String longitude)\r\n {\r\n this.longitude = longitude; \r\n }"
] | [
"0.65024495",
"0.6120846",
"0.61173624",
"0.60864043",
"0.60337114",
"0.60067916",
"0.5895415",
"0.58509535",
"0.58248144",
"0.56888914",
"0.56532484",
"0.563437",
"0.56245935",
"0.5600494",
"0.55774015",
"0.55583555",
"0.5553263",
"0.5547263",
"0.554067",
"0.55099344",
"0.5494295",
"0.54712826",
"0.5463581",
"0.54327554",
"0.54239076",
"0.54162735",
"0.54096127",
"0.5405885",
"0.5398871",
"0.53986603",
"0.5397435",
"0.5374248",
"0.53703815",
"0.53680456",
"0.5356712",
"0.5352828",
"0.5350516",
"0.5315677",
"0.5310143",
"0.53063357",
"0.53003466",
"0.529722",
"0.5283656",
"0.52710074",
"0.5265842",
"0.5265842",
"0.5260853",
"0.5257699",
"0.5256898",
"0.52508295",
"0.5249867",
"0.5249524",
"0.5222782",
"0.52209127",
"0.52169245",
"0.52156997",
"0.5214837",
"0.5214837",
"0.52125233",
"0.5206912",
"0.5195813",
"0.5195416",
"0.5189319",
"0.5189249",
"0.51886284",
"0.5176632",
"0.5169545",
"0.5169293",
"0.51582265",
"0.5157606",
"0.5150826",
"0.5143665",
"0.5143665",
"0.514204",
"0.5140399",
"0.51398325",
"0.5137649",
"0.5129236",
"0.51186496",
"0.5114946",
"0.51091874",
"0.5108944",
"0.51014817",
"0.5096108",
"0.5092992",
"0.509177",
"0.5091186",
"0.5089864",
"0.5089679",
"0.5085855",
"0.5083544",
"0.5071798",
"0.5061592",
"0.50525486",
"0.50516146",
"0.5050501",
"0.5049108",
"0.5047977",
"0.5045413",
"0.5037112"
] | 0.6498887 | 1 |
Gets bottom right lat. | public double getTopRightLat() {
return topRightLat;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Point getBottomRight() {\n return location.bottomRight();\n }",
"double getLongitude();",
"long getLongitude();",
"int getLongitude();",
"Double getLongitude();",
"Double getLongitude();",
"public double getLongitude() {\n if (slon == GempakConstants.IMISSD) {\n return slon;\n }\n return slon / 100.;\n }",
"public int getLon();",
"BigDecimal getWgs84EndingLongitude();",
"public double getLongitude()\n\t{\n\t\treturn this.realBin.getLocation().getLongitude();\n\t}",
"@Override\n\tpublic double getLongitude() {\n\t\treturn _locMstLocation.getLongitude();\n\t}",
"public double getEndLat() {\n\t\treturn endLat;\n\t}",
"BigDecimal getWgs84EndingLatitude();",
"public double getLastLatitude(){\n if(location != null){\n lastLatitude = location.getLatitude();\n }else{\n lastLatitude = longitude;\n }\n return lastLatitude;\n }",
"public double getLongitude() {\n\t\tif (mLastLocation != null) {\n\t\t\tlongitude = mLastLocation.getLongitude();\n\t\t}\n\n\t\t// return longitude\n\t\treturn longitude;\n\t}",
"public double getLongitude(){\n if(location != null){\n longitude = location.getLongitude();\n }\n\n // return longitude\n return longitude;\n }",
"public double getLongitude(){\n if(location != null){\n longitude = location.getLongitude();\n }\n\n // return longitude\n return longitude;\n }",
"public double getLng() {\r\n\t\treturn lng;\r\n\t}",
"public double getLongitude() {\n if (location != null) {\n curr_longitude = location.getLongitude();\n }\n\n // return longitude\n return curr_longitude;\n }",
"public double getLongitude() {\n return location.getLongitude();\n }",
"public double getLongitude() {\n double lon = 0.0;\n if (mLocationHelper != null) {\n lon = mLocationHelper.getLongitude();\n }\n\n return lon;\n }",
"public double getLongitude() {\r\n if (location != null) {\r\n longitude = location.getLongitude();\r\n }\r\n\r\n // return longitude\r\n return longitude;\r\n }",
"public double getLongitude()\n {\n \treturn longitude;\n }",
"public double getLng() {\n return lng;\n }",
"public double getEndLon() {\n\t\treturn endLon;\n\t}",
"public synchronized Double getLongitude() {\r\n\t\treturn longitude;\r\n\t}",
"public double getLongitude() {\n if (location != null) {\n longitude = location.getLongitude();\n }\n\n // return longitude\n return longitude;\n }",
"public double getLongitude() {\n if (location != null) {\n longitude = location.getLongitude();\n }\n\n // return longitude\n return longitude;\n }",
"public double getLon() {\n return lon;\n }",
"public double getLon() {\n return lon;\n }",
"public double getLongitude() {\r\n if (location != null) {\r\n longitude = location.getLongitude();\r\n }\r\n\r\n return longitude;\r\n }",
"public double longitude() {\n return this.longitude;\n }",
"public double getLongitude() {\n return longitude_;\n }",
"public double getLongitude() {\n\t\treturn Longitude;\n\t}",
"@Override\r\n\tpublic double getLon() {\n\t\treturn this.lon;\r\n\t}",
"public double getLongitude() {\n if (currentLocation != null) {\n longitude = currentLocation.getLongitude();\n }\n // return longitude\n return longitude;\n }",
"public double getLongitude() {\n return longitude_;\n }",
"public double getLongitude() {\n return longitude_;\n }",
"public int getLongitude() {\n checkRep();\n return this.longitude;\n }",
"public double getLongitude() {\n return longitude;\n }",
"public double getLongitude() {\n return longitude;\n }",
"public double getLongitude() {\n return longitude;\n }",
"public double getLongitude() {\n return longitude;\n }",
"public Double getLongitude()\n\t{\n\t\treturn null;\n\t}",
"public double getLon() {\r\n\t\t\treturn lon;\r\n\t\t}",
"public Vector2f getBottomRightCorner() {\n return bottomRightCorner;\n }",
"public double getLongitude() {\n return longitude_;\n }",
"public double getLongitude() {\n\t\treturn longitude;\n\t}",
"public double getGpsLng() {\n return gpsLng;\n }",
"public Double getLongitude() {\n return longitude;\n }",
"public Double getLongitude() {\n return longitude;\n }",
"public Double getLongitude() {\n return longitude;\n }",
"public Double getLongitude() {\n return longitude;\n }",
"BigDecimal getWgs84Longitude();",
"public float getLongitudeValue (){\n return trackLon.getValue ();\n }",
"public String getWestBoundLongitude() {\r\n\t\treturn westBoundLongitude;\r\n\t}",
"long getLatitude();",
"public int getLongitude() {\n return longitude;\n }",
"public int getLongitude() {\n return longitude_;\n }",
"public long getLongitude() {\n return longitude_;\n }",
"private Point findBottomRightCornerPoint() {\n return new Point(origin.getX() + width, origin.getY());\n }",
"@Min(-180)\n @Max(180)\n public double getLng() {\n return lng;\n }",
"public double getMidLongitude() {\n\t\treturn midLongitude;\n\t}",
"public int getLat();",
"public long getLongitude() {\n return longitude_;\n }",
"Double getLatitude();",
"Double getLatitude();",
"public Longitude getLongitude (){\n return trackLon;\n }",
"public Coords getUpperRight()\r\n {\r\n return new Coords(x + width, y);\r\n }",
"public int getLongitude() {\n return longitude_;\n }",
"public Float getLongitude() {\n return longitude;\n }",
"public static float getLocY(double lon) {\n\t\treturn (float) ((lon - Graph.CENTRE_LON) * Graph.SCALE_LON * Graph.zoom);\n\t}",
"public Point getupperRigth() {\n Point upperRigth = new Point(this.upperLeft.getX() + this.getWidth(), this.upperLeft.getY());\n return upperRigth;\n }",
"public float getLongitude() {\n return longitude;\n }",
"public String getLongitude()\r\n {\r\n return longitude;\r\n }",
"public String getLocation() {\n\t\treturn \"-12.9990189,-38.5140298\";\n\t}",
"public float getLongitude() {\n return longitude;\n }",
"public float getLongitude() {\n return longitude;\n }",
"private Point2D.Double rightSensorLocation() {\n double dx = getSize() * Math.cos(getOrientation() - Math.PI / 4);\n double dy = -getSize() * Math.sin(getOrientation() - Math.PI / 4);\n return new Point2D.Double(getX() + dx * 2, getY() + dy * 2);\n }",
"public float getLongitude() { return longitude; }",
"@Override\n public String getLon() {\n return lon;\n }",
"int getLngE6();",
"int getLngE6();",
"double getMapPositionY();",
"double getLatitude();",
"public static Coordinates getTopRightCorner() {\n\t\treturn topRightCorner;\n\t}",
"public float getLongitude() {\n\t\treturn longitude;\n\t}",
"public float getLongitude() {\n\t\treturn longitude;\n\t}",
"private Point getUpper() {\n int upperX;\n int upperY;\n upperY = (int) (gameCanvas.getHeight() + mapOffsetY * 2);\n upperX = (int) (gameCanvas.getWidth() + mapOffsetX * 2);\n return new Point(upperX, upperY);\n }",
"public String getLongitude() {\n return String.valueOf(longitude);\n }",
"public Location getNortheast() {\n return mNortheast;\n }",
"public String getLongitude() {\n return longitude;\n }",
"public String getLongitude() {\n return longitude;\n }",
"int getLatitude();",
"public Point getUpperLeft() {\n return this.upperLeft;\n }",
"public double getResultLocationLongitude() {\n return resultLocationLongitude;\n }",
"public double getStartLon() {\n\t\treturn startLon;\n\t}",
"public Double A() {\n return this.f917a.getAsDouble(\"CFG_LOCATION_LONGITUDE\");\n }",
"public BigDecimal getLongitude() {\n return longitude;\n }",
"public double getEast() {\n return east;\n }"
] | [
"0.7457743",
"0.7158621",
"0.7058744",
"0.7033499",
"0.70253015",
"0.70253015",
"0.68315923",
"0.6822723",
"0.6815692",
"0.68130744",
"0.6799312",
"0.6778331",
"0.67713976",
"0.669816",
"0.66798663",
"0.6647057",
"0.6647057",
"0.6585775",
"0.65785784",
"0.6576633",
"0.6572651",
"0.6569798",
"0.65673316",
"0.65362585",
"0.6535121",
"0.6517778",
"0.6503366",
"0.6503366",
"0.6488178",
"0.6488178",
"0.6482848",
"0.64774245",
"0.6464674",
"0.64496905",
"0.6449265",
"0.6442028",
"0.6439467",
"0.6439467",
"0.64133984",
"0.64064",
"0.64064",
"0.64064",
"0.64064",
"0.63992256",
"0.63929963",
"0.63831717",
"0.63792163",
"0.63699156",
"0.6363919",
"0.63620114",
"0.63620114",
"0.63620114",
"0.63620114",
"0.6325903",
"0.63001573",
"0.62967634",
"0.62804484",
"0.6275123",
"0.62703395",
"0.6264561",
"0.623453",
"0.62244946",
"0.6205301",
"0.61984265",
"0.6167765",
"0.616578",
"0.616578",
"0.61648184",
"0.6160919",
"0.6154637",
"0.6151972",
"0.61502236",
"0.6149501",
"0.6146713",
"0.614614",
"0.61454064",
"0.6144298",
"0.6144298",
"0.6136805",
"0.61332",
"0.6121382",
"0.6109748",
"0.6109748",
"0.60864806",
"0.60821617",
"0.6080662",
"0.6069907",
"0.6069907",
"0.6063365",
"0.60564965",
"0.6047759",
"0.6040687",
"0.6040687",
"0.60329217",
"0.60249174",
"0.6014156",
"0.59989583",
"0.5996475",
"0.59953386",
"0.5979915"
] | 0.784831 | 0 |
Sets bottom right lat. | public void setTopRightLat(double topRightLat) {
this.minY = topRightLat;
this.upperRightY = topRightLat;
this.topRightLat = topRightLat;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setBottomLeftLat(double bottomLeftLat) {\r\n this.maxY = bottomLeftLat;\r\n this.bottomLeftLat = bottomLeftLat;\r\n this.lowerLeftY = bottomLeftLat;\r\n }",
"void setLongitude(Double longitude);",
"public void setTopRightLon(double topRightLon) {\r\n this.topRightLon = topRightLon;\r\n this.upperRightX = topRightLon;\r\n this.maxX = topRightLon;\r\n }",
"public void setUpperRightY(double upperRightY) {\r\n this.minY = upperRightY;\r\n this.upperRightY = upperRightY;\r\n this.topRightLat = upperRightY;\r\n }",
"@Override\n\tpublic void setLongitude(double Longitude) {\n\t\t_locMstLocation.setLongitude(Longitude);\n\t}",
"public void setLon(double value) {\n lon = value;\n }",
"public void setLongitude(float longitude) { this.longitude = longitude; }",
"private void setMyLatLong() {\n }",
"void setLatitude(Double latitude);",
"@Test\n public void testSetLongitude() {\n \n assertEquals(0.0f, o2.getLatitude(), 0.0);\n o2.setLongitude(0.2f);\n assertEquals(0.2f, o2.getLongitude(), 0.0);\n }",
"public void setLng(double value) {\n this.lng = value;\n }",
"public void setLng(double lng) {\n this.lng = lng;\n }",
"public double getTopRightLat() {\r\n return topRightLat;\r\n }",
"public void setLongitude(float longitude) {\n this.longitude = longitude;\n }",
"public void setLongitude(double longitude) {\n this.longitude = longitude;\n }",
"public void setLongitude(double longitude) {\n this.longitude = longitude;\n }",
"public void setLng(double lng) {\r\n\t\tthis.lng = lng;\r\n\t}",
"public Point getBottomRight() {\n return location.bottomRight();\n }",
"public void setyCoord(Location l) {\n\t\t\n\t}",
"public void setLongitude(Float longitude) {\n this.longitude = longitude;\n }",
"public void setLongitude(Double longitude) {\n this.longitude = longitude;\n }",
"public void setLongitude(Double longitude) {\n this.longitude = longitude;\n }",
"public void setEndY(double y)\n {\n endycoord=y; \n }",
"public void setLocation(double lon, double lat) {\n\t\tthis.lon = lon;\n\t\tthis.lat = lat;\n\t}",
"public Builder setLongitude(double value) {\n \n longitude_ = value;\n onChanged();\n return this;\n }",
"public void setLongitude(double longitude) {\n\t\tLongitude = longitude;\n\t}",
"public void setY(int y) { loc.y = y; }",
"public void setBottom() {\n reset(State.BOTTOM);\n }",
"public void set_longitude(double _longitude) {\r\n\t\tthis._longitude = _longitude;\r\n\t}",
"public synchronized void setLongitude(Double longitude) {\r\n\t\t// if it is the same don't update\r\n\t\tif (longitude.equals(this.longitude)) {\r\n\t\t\tupdatedLng = false;\r\n\t\t} else {\r\n\t\t\tthis.longitude = longitude;\r\n\t\t\tupdatedLng = true;\r\n\t\t\tSystem.out.println(\"Update longitude: \" + longitude);\r\n\t\t}\r\n\t}",
"public void setLongitude(String longitude)\r\n {\r\n this.longitude = longitude; \r\n }",
"public void setLon(double lon) {\r\n\t\t\tthis.lon = lon;\r\n\t\t}",
"public void setEnd( GeoPoint end ){\n this.end = end;\n\n }",
"public void setLongitude(double longitude) {\n\t\tthis.longitude = longitude;\n\t}",
"public Builder setLongitude(long value) {\n bitField0_ |= 0x00000020;\n longitude_ = value;\n onChanged();\n return this;\n }",
"double getLongitude();",
"public Builder setLongitude(double value) {\n \n longitude_ = value;\n onChanged();\n return this;\n }",
"public void setLongitude(int longitude) {\n this.longitude = longitude;\n }",
"public void setLongitude(double longitude) {\n if (longitude < -180 || longitude > 180) {\n throw new IllegalArgumentException(\"Longitude value must be in the next range: [-180.0; 180.0].\");\n }\n this.longitude = longitude;\n }",
"@Override\n\tpublic void setLatitude(double Latitude) {\n\t\t_locMstLocation.setLatitude(Latitude);\n\t}",
"public void setLongitude(float value) {\n this.longitude = value;\n }",
"private void setEndLocation() {\n switch (direction) {\n case UP:\n case DOWN:\n componentToMove.setLocation(posX, Direction.UP == direction ? Math.min(endPosition, posY) : Math.max(endPosition, posY));\n break;\n default:\n componentToMove.setLocation(Direction.LEFT == direction ? Math.min(endPosition, posX) : Math.max(endPosition, posX), posY);\n }\n }",
"public void setLocation(int y)\r\n {\r\n pencil.setBounds(110, y, 26, 26);\r\n minus.setBounds(136, y, 26, 26);\r\n draggable.setBounds(20, y, 90, 16);\r\n visible.setLocation(164, y+5);\r\n checkbox.setLocation(136, y);\r\n text.setLocation(20,y);\r\n }",
"Double getLongitude();",
"Double getLongitude();",
"public Builder setLongitude(int value) {\n bitField0_ |= 0x00000001;\n longitude_ = value;\n onChanged();\n return this;\n }",
"public void setRobotLocation(Point p);",
"@Override\n\tpublic void setEast(float east) {\n\t\t\n\t}",
"long getLongitude();",
"public double getEndLat() {\n\t\treturn endLat;\n\t}",
"@Override\n public void setLocation(String latitude, String longitude) {\n lat = latitude;\n lon = longitude;\n }",
"public void setLocation(double latitude, double longtitude, double altitude) {\r\n\t\tthis.p = new Point3D(longtitude, latitude, altitude);\r\n\t}",
"public void setBoundingBoxRight(double value) {\n this.boundingBoxRight = value;\n }",
"public void setEndLoc( Vector2 end ) { endLoc = end; }",
"private void updateGeo(Double latitude, Double longitude) {\n latitudeValue = latitude;\n longitudeValue = longitude;\n }",
"public void setLon(double longitude) {\n filename = evaluate(getLat(), longitude, getLevel());\n }",
"public void updateLongitude(double longitude) {\n\t\tif (this.minLongitude > longitude) {\n\t\t\tthis.minLongitude = longitude - Plane.SmallestGrain;\n\t\t}\n\t\t\n\t\tif (this.maxLongitude < longitude) {\n\t\t\tthis.maxLongitude = longitude + Plane.SmallestGrain;\n\t\t}\n\t}",
"public LatLngBounds setupBounds(){\n\t\t\n\t\t\n\t\tdouble deltaLat = 0.000015; // correction value\n\t\t\n\t\tLatLng northEast = new LatLng(60.1876397959336 + (2.4 * deltaLat), 24.8207008838576);\n\t\tLatLng southWest = new LatLng(60.1866756699501 + deltaLat, 24.8172971606177);\n\t\t\n\t\t\n\t\t// 60.1866756699501\n\t\treturn new LatLngBounds(southWest, northEast);\n\t}",
"private void setLocation() {\n switch (getKey()) {\n case UP:\n this.y_location = -136.8 - 6;\n this.y_tile = -1;\n this.positive = false;\n break;\n case DOWN:\n this.y_location = 136.8 + 6;\n this.y_tile = 1;\n break;\n case LEFT:\n this.x_location = -140.6 - 6;\n this.x_tile = -1;\n this.positive = false;\n break;\n case RIGHT:\n this.x_location = 140.6 + 6;\n this.x_tile = 1;\n break;\n default:\n break;\n }\n }",
"public void setUpperLeft(Point p) {\n this.upperLeft = p;\n }",
"public UtilsPadding setBottom(Number bottom) {\n if (jsBase == null) {\n this.bottom = null;\n this.bottom1 = null;\n \n this.bottom = bottom;\n } else {\n this.bottom = bottom;\n if (!isChain) {\n js.append(jsBase);\n isChain = true;\n }\n \n js.append(String.format(Locale.US, \".bottom(%s)\", bottom));\n\n if (isRendered) {\n onChangeListener.onChange(String.format(Locale.US, jsBase + \".bottom(%s);\", bottom));\n js.setLength(0);\n }\n }\n return this;\n }",
"public void setLat(double value) {\n lat = value;\n }",
"@Override\n public void setLocation(geo_location p) {\n this.location.setX(p.x());\n this.location.setY(p.y());\n this.location.setZ(p.z());\n }",
"public void setLastHeal(int x, int y, int mapX, int mapY)\n\t{\n\t\tm_healX = x;\n\t\tm_healY = y;\n\t\tm_healMapX = mapX;\n\t\tm_healMapY = mapY;\n\t}",
"int getLongitude();",
"private void setLongitudeError (float longitude, Exception e, int error) {\n this.longitude = longitude;\n longitudeErrorMessage = e.toString();\n longitudeError = error;\n }",
"public int setLongitude(Float longitude) {\n try {\n setLongitude(longitude.floatValue());\n } catch (Exception e) {\n setLongitudeError(FLOATNULL, e, ERROR_SYSTEM);\n } // try\n return longitudeError;\n }",
"private void setLast(int x, int y) {\n\t\tthis.lastx = x;\n\t\tthis.lasty = y;\n\t}",
"@Override\n\tpublic double getLongitude() {\n\t\treturn _locMstLocation.getLongitude();\n\t}",
"public int setLongitude(Integer longitude) {\n try {\n setLongitude(longitude.floatValue());\n } catch (Exception e) {\n setLongitudeError(FLOATNULL, e, ERROR_SYSTEM);\n } // try\n return longitudeError;\n }",
"@Override\n public void setCameraCoordinate(double latitude, double longitude) {\n mMap.moveCamera(CameraUpdateFactory.newLatLng(new LatLng(latitude, longitude)));\n }",
"public void setLocation(double m){\n\t\tsetParameters(m, scale);\n\t}",
"public void setLimit_lin_y_upper(float limit_lin_y_upper) throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeFloat(__io__address + 44, limit_lin_y_upper);\n\t\t} else {\n\t\t\t__io__block.writeFloat(__io__address + 36, limit_lin_y_upper);\n\t\t}\n\t}",
"public void setBaiduMapLocation(double longitude, double latitude) {\n MapStatusUpdate u1 = MapStatusUpdateFactory.newLatLng(GEO_TIANJIN);\n baiduMap.setMapStatus(MapStatusUpdateFactory.newMapStatus(\n new MapStatus.Builder().zoom(15f).build())\n );\n baiduMap.setMapStatus(u1);\n BitmapDescriptor bitmap = BitmapDescriptorFactory\n .fromResource(R.drawable.icon_marka);\n OverlayOptions option = new MarkerOptions()\n .position(GEO_TIANJIN)\n .icon(bitmap);\n baiduMap.addOverlay(option);\n }",
"public void setLowerLeftY(double lowerLeftY) {\r\n this.maxY = lowerLeftY;\r\n this.bottomLeftLat = lowerLeftY;\r\n this.lowerLeftY = lowerLeftY;\r\n }",
"public void setLoc(int lx, int ly){\r\n \tbox.setLocation(lx,ly);\r\n }",
"public Builder setLatitude(long value) {\n bitField0_ |= 0x00000010;\n latitude_ = value;\n onChanged();\n return this;\n }",
"public void setY(int y) {\n\tbaseYCoord = y;\n}",
"public void setRangeBottomLeft(Location location) {\n\t\tthis.rangeBottomLeft = location;\n\t}",
"BigDecimal getWgs84EndingLongitude();",
"public void setY(int y){\n\t\tthis.y_location = y;\n\t}",
"private void moveRight(GObject bottom) {\r\n\t\tif(!facingEast) {\r\n\t\t\tdouble x = player.getX();\r\n\t\t\tdouble y = player.getY();\r\n\t\t\tremove(player);\r\n\t\t\tplayer = new GImage(\"PlayerEast.png\");\r\n\t\t\tplayer.scale(.75);\r\n\t\t\tadd(player, x, y);\r\n\t\t\tfacingEast = true;\r\n\t\t}\r\n\t\tif(player.getX() < getWidth() - player.getWidth() - 5 && bottom != null)\r\n\t\t\tplayer.move(PLAYER_X_MOTION, 0);\r\n\t}",
"public void setY(double y)\r\n\t{\t\r\n\t\tvirtualDxfPoint.setTransformationY(y);\r\n\t\tAnchor.setY(y);\r\n\t}",
"public void setLoc(int x, int y)\n {\n powerUp.setBounds(x,y,65,29);\n text.setBounds(x,y,65,29);\n }",
"public void setBoundingBoxBottom(double value) {\n this.boundingBoxBottom = value;\n }",
"public void setLocation(Coordinate coordinate);",
"public double getEndLon() {\n\t\treturn endLon;\n\t}",
"public void setRight(BinNode<E> r)\n {\n right = r;\n }",
"public void setLimit_ang_y_upper(float limit_ang_y_upper) throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeFloat(__io__address + 68, limit_ang_y_upper);\n\t\t} else {\n\t\t\t__io__block.writeFloat(__io__address + 60, limit_ang_y_upper);\n\t\t}\n\t}",
"private void setCameraView() {\n double bottomBoundary = mUserPosition.getLatitude() - .1;\n double leftBoundary = mUserPosition.getLongitude() - .1;\n double topBoundary = mUserPosition.getLatitude() + .1;\n double rightBoundary = mUserPosition.getLongitude() + .1;\n\n mMapBoundary = new LatLngBounds(\n new LatLng(bottomBoundary, leftBoundary),\n new LatLng(topBoundary, rightBoundary)\n );\n\n mGoogleMap.moveCamera(CameraUpdateFactory.newLatLngBounds(mMapBoundary, 500,500,1));\n }",
"public void setEndLocation(Location endLoc) {\n gameLocations.put(GameLocation.END, endLoc);\n }",
"@Test\n public void testSetLatitude() {\n \n assertEquals(0.0f, o2.getLatitude(), 0.0);\n o2.setLatitude(0.2f);\n assertEquals(0.2f, o2.getLatitude(), 0.0);\n }",
"public Location south()\r\n {\r\n return new Location(x, y + 1);\r\n }",
"private void setLastLocation() {\n\n if (ContextCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n // Permission has already been granted\n mFusedLocationClient.getLastLocation()\n .addOnSuccessListener(this, new OnSuccessListener<Location>() {\n @Override\n public void onSuccess(Location location) {\n // Got last known location. In some rare situations this can be null.\n if (location != null) {\n lastLatitude = Double.toString(location.getLatitude());\n lastLongitude = Double.toString(location.getLongitude());\n //lastLocation = Double.toString(location.getLatitude()) + \",\" + Double.toString(location.getLongitude()) ;\n //String b = lastLocation;\n // Get into right format\n // Logic to handle location object\n }\n }\n });\n }\n }",
"public void setRangeTopRight(Location location) {\n\t\tthis.rangeTopRight = location;\n\t}",
"public void setRight(Lane right) {\r\n\t\tthis.right = right;\r\n\t}",
"public double getLongitude()\n {\n \treturn longitude;\n }",
"public float getLongitude() { return longitude; }",
"public void setUserLocation(double lat, double lon) {\n\tuserLocation = new Point2D.Double(lon,lat);\n }",
"@Test\n public void testSetEndNotInMap(){\n smallMaze.setEnd(Maze.position(0, 23));\n }"
] | [
"0.7208655",
"0.6688508",
"0.6248739",
"0.6093565",
"0.60826313",
"0.60694766",
"0.599394",
"0.59296405",
"0.5920562",
"0.5853935",
"0.58303964",
"0.5824722",
"0.58057624",
"0.57950395",
"0.5791085",
"0.5791085",
"0.5786386",
"0.57748026",
"0.57463545",
"0.57438695",
"0.57242763",
"0.57242763",
"0.57202345",
"0.5662008",
"0.5648369",
"0.5636977",
"0.56262696",
"0.56153953",
"0.5605371",
"0.5602952",
"0.5582147",
"0.5576823",
"0.5572279",
"0.55668443",
"0.556528",
"0.55488527",
"0.55485505",
"0.5545111",
"0.55349165",
"0.55195296",
"0.55007344",
"0.54920787",
"0.5491068",
"0.54671365",
"0.54671365",
"0.5466562",
"0.5463273",
"0.5455941",
"0.5443615",
"0.5424615",
"0.54098815",
"0.54025775",
"0.5388183",
"0.53843653",
"0.5382079",
"0.5373755",
"0.5373695",
"0.5359044",
"0.5356606",
"0.5349534",
"0.5333523",
"0.5330982",
"0.5322913",
"0.53159213",
"0.53158724",
"0.5288413",
"0.52871233",
"0.5286249",
"0.5284961",
"0.52847385",
"0.5265445",
"0.52637875",
"0.52632797",
"0.525984",
"0.5258378",
"0.52538604",
"0.525361",
"0.5251018",
"0.52492183",
"0.52427304",
"0.5241572",
"0.5231396",
"0.52240354",
"0.52227896",
"0.5219879",
"0.52159774",
"0.52155674",
"0.5207129",
"0.5202011",
"0.5201858",
"0.51962",
"0.518428",
"0.5181146",
"0.5180706",
"0.5179514",
"0.51744825",
"0.51715434",
"0.51709825",
"0.51664585",
"0.51611394"
] | 0.6842816 | 1 |
TODO: Warning this method won't work in the case the id fields are not set | @Override
public boolean equals(Object object) {
if (!(object instanceof User)) {
return false;
}
User other = (User) object;
if ((this.idUser == null && other.idUser != null) || (this.idUser != null && !this.idUser.equals(other.idUser))) {
return false;
}
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void setId(Integer id) { this.id = id; }",
"private Integer getId() { return this.id; }",
"public void setId(int id){ this.id = id; }",
"public void setId(Long id) {this.id = id;}",
"public void setId(Long id) {this.id = id;}",
"public void setID(String idIn) {this.id = idIn;}",
"public void setId(int id) { this.id = id; }",
"public void setId(int id) { this.id = id; }",
"public int getId() { return id; }",
"public int getId() { return id; }",
"public int getId() { return id; }",
"public int getId() { return id; }",
"public int getId() { return id; }",
"public int getId() { return id; }",
"public void setId(long id) { this.id = id; }",
"public void setId(long id) { this.id = id; }",
"public int getId(){ return id; }",
"public int getId() {return id;}",
"public int getId() {return Id;}",
"public int getId(){return id;}",
"public void setId(long id) {\n id_ = id;\n }",
"private int getId() {\r\n\t\treturn id;\r\n\t}",
"public Integer getId(){return id;}",
"public int id() {return id;}",
"public long getId(){return this.id;}",
"public int getId(){\r\n return this.id;\r\n }",
"@Override public String getID() { return id;}",
"public Long id() { return this.id; }",
"public Integer getId() { return id; }",
"@Override\n\tpublic Integer getId() {\n return id;\n }",
"@Override\n public Long getId () {\n return id;\n }",
"@Override\n public long getId() {\n return id;\n }",
"public Long getId() {return id;}",
"public Long getId() {return id;}",
"public String getId(){return id;}",
"@Override\r\n\tpublic Long getId() {\n\t\treturn null;\r\n\t}",
"public Integer getId() { return this.id; }",
"@Override\r\n public int getId() {\n return id;\r\n }",
"@Override\n\t\tpublic long getId() {\n\t\t\treturn 0;\n\t\t}",
"public int getId() {\n return id;\n }",
"public long getId() { return _id; }",
"public int getId() {\n/* 35 */ return this.id;\n/* */ }",
"public long getId() { return id; }",
"public long getId() { return id; }",
"public void setId(Long id) \n {\n this.id = id;\n }",
"@Override\n\tpublic Long getId() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic Long getId() {\n\t\treturn null;\n\t}",
"public void setId(String id) {\n this.id = id;\n }",
"@Override\n\tpublic void setId(Long id) {\n\t}",
"public Long getId() {\n return id;\n }",
"public long getId() { return this.id; }",
"public int getId()\n {\n return id;\n }",
"public void setId(int id){\r\n this.id = id;\r\n }",
"@Test\r\n\tpublic void testSetId() {\r\n\t\tbreaku1.setId(5);\r\n\t\texternu1.setId(6);\r\n\t\tmeetingu1.setId(7);\r\n\t\tteachu1.setId(8);\r\n\r\n\t\tassertEquals(5, breaku1.getId());\r\n\t\tassertEquals(6, externu1.getId());\r\n\t\tassertEquals(7, meetingu1.getId());\r\n\t\tassertEquals(8, teachu1.getId());\r\n\t}",
"protected abstract String getId();",
"@Override\n\tpublic int getId(){\n\t\treturn id;\n\t}",
"public int getID() {return id;}",
"public int getID() {return id;}",
"public String getId() { return id; }",
"public String getId() { return id; }",
"public String getId() { return id; }",
"public int getId ()\r\n {\r\n return id;\r\n }",
"@Override\n public int getField(int id) {\n return 0;\n }",
"public void setId(Long id)\n/* */ {\n/* 66 */ this.id = id;\n/* */ }",
"public int getId(){\r\n return localId;\r\n }",
"void setId(int id) {\n this.id = id;\n }",
"@Override\n public Integer getId() {\n return id;\n }",
"@Override\n\tpublic Object selectById(Object id) {\n\t\treturn null;\n\t}",
"private void clearId() {\n \n id_ = 0;\n }",
"private void clearId() {\n \n id_ = 0;\n }",
"private void clearId() {\n \n id_ = 0;\n }",
"private void clearId() {\n \n id_ = 0;\n }",
"private void clearId() {\n \n id_ = 0;\n }",
"private void clearId() {\n \n id_ = 0;\n }",
"private void clearId() {\n \n id_ = 0;\n }",
"@Override\n public int getId() {\n return id;\n }",
"@Override\n public int getId() {\n return id;\n }",
"public void setId(int id)\n {\n this.id=id;\n }",
"@Override\r\n public int getID()\r\n {\r\n\treturn id;\r\n }",
"@Override\n\tpublic Integer getId() {\n\t\treturn null;\n\t}",
"public int getId()\r\n {\r\n return id;\r\n }",
"public void setId(Long id){\n this.id = id;\n }",
"@java.lang.Override\n public int getId() {\n return id_;\n }",
"@java.lang.Override\n public int getId() {\n return id_;\n }",
"private void clearId() {\n \n id_ = 0;\n }",
"final protected int getId() {\n\t\treturn id;\n\t}",
"public abstract Long getId();",
"public void setId(Long id) \r\n {\r\n this.id = id;\r\n }",
"@Override\n public long getId() {\n return this.id;\n }",
"public String getId(){ return id.get(); }",
"@SuppressWarnings ( \"unused\" )\n private void setId ( final Long id ) {\n this.id = id;\n }",
"public void setId(long id){\n this.id = id;\n }",
"public void setId(long id){\n this.id = id;\n }",
"public void setId(Integer id)\r\n/* */ {\r\n/* 122 */ this.id = id;\r\n/* */ }",
"public Long getId() \n {\n return id;\n }",
"@Override\n\tpublic void setId(int id) {\n\n\t}",
"public void test_getId() {\n assertEquals(\"'id' value should be properly retrieved.\", id, instance.getId());\n }",
"@Override\r\n\tpublic Object getId() {\n\t\treturn null;\r\n\t}",
"public int getID(){\n return id;\n }",
"public int getId()\n {\n return id;\n }",
"public String getID(){\n return Id;\n }"
] | [
"0.6896886",
"0.6838461",
"0.67056817",
"0.66419715",
"0.66419715",
"0.6592331",
"0.6579151",
"0.6579151",
"0.6574321",
"0.6574321",
"0.6574321",
"0.6574321",
"0.6574321",
"0.6574321",
"0.65624106",
"0.65624106",
"0.65441847",
"0.65243006",
"0.65154546",
"0.6487427",
"0.6477893",
"0.6426692",
"0.6418966",
"0.6416817",
"0.6401561",
"0.63664836",
"0.63549376",
"0.63515353",
"0.6347672",
"0.6324549",
"0.6319196",
"0.6301484",
"0.62935394",
"0.62935394",
"0.62832105",
"0.62710917",
"0.62661785",
"0.6265274",
"0.6261401",
"0.6259253",
"0.62559646",
"0.6251244",
"0.6247282",
"0.6247282",
"0.6245526",
"0.6238957",
"0.6238957",
"0.6232451",
"0.62247443",
"0.6220427",
"0.6219304",
"0.6211484",
"0.620991",
"0.62023336",
"0.62010616",
"0.6192621",
"0.61895776",
"0.61895776",
"0.61893976",
"0.61893976",
"0.61893976",
"0.6184292",
"0.618331",
"0.61754644",
"0.6173718",
"0.6168409",
"0.6166131",
"0.6161708",
"0.6157667",
"0.6157667",
"0.6157667",
"0.6157667",
"0.6157667",
"0.6157667",
"0.6157667",
"0.61556244",
"0.61556244",
"0.61430943",
"0.61340135",
"0.6128617",
"0.6127841",
"0.61065215",
"0.61043483",
"0.61043483",
"0.6103568",
"0.61028486",
"0.61017346",
"0.6101399",
"0.6098963",
"0.6094214",
"0.6094",
"0.6093529",
"0.6093529",
"0.6091623",
"0.60896",
"0.6076881",
"0.60723215",
"0.6071593",
"0.6070138",
"0.6069936",
"0.6069529"
] | 0.0 | -1 |
LOG.info("test place2"); Create an image file name | private File createImageFile() {
String timeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss").format(new Date());
String imageFileName = "JPEG_" + timeStamp + "_";
//File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);
File storageDir = new File(utils.getSentImagesDirectory());
File image = null;
try {
image = File.createTempFile(
imageFileName, /* prefix */
".jpg", /* suffix */
storageDir /* directory */
);
} catch (Exception ex) {
ex.printStackTrace();
}
// Save a file: path for use with ACTION_VIEW intents
//LOG.info("test place3");
try {
imageFilePath = image.getAbsolutePath();
} catch (Exception ex) {
ex.printStackTrace();
}
//LOG.info("test place4");
if (image == null) {
LOG.info("image file is null");
} else {
LOG.info("image file is not null path is:" + imageFilePath);
}
return image;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void storeLogMessage(String log)\n {\n logImage += log + \"\\n\";\n System.out.println(logImage);\n printFile(\"Log.txt\");\n }",
"public static void CreateFile(){\n try{\n new File(\"wipimages\").mkdir();\n logscommissions.createNewFile();\n }catch(Exception e){\n e.printStackTrace();\n System.out.println(\"CreateFile Failed\\n\");\n }\n }",
"public void createNewImageFile(){\n fillNewImage();\n\n try {\n ImageIO.write(newImage, imageFileType, new File(k + \"_Colored_\" + fileName.substring(0,fileName.length() - 4) + \".\" + imageFileType));\n } catch (IOException e){\n e.printStackTrace();\n }\n \n }",
"private String createScreenshotFilePath() {\n String fileName = new SimpleDateFormat(FILE_NAME_FORMAT).format(new Date());\n String filePath = MainMenu.PUBLIC_EXTERNAL_PICTURES_ORION_PATH + fileName;\n return filePath;\n }",
"private void recordLocationData() \r\n\t{\r\n\t\tif(loadedImage!=null)\r\n\t\t{\r\n\t\t\tString image = BitMapToString(loadedImage);\r\n\t\t\tStringBuffer stringBuffer = new StringBuffer();\r\n\t\t\t\r\n\t\t\tfor (int i = 0; i < image.length(); i++) \r\n\t\t\t{\r\n\t\t\t\tif (image.charAt(i) != '\\n' && image.charAt(i) != '\\r') \r\n\t\t\t\t{\r\n\t\t\t\t\tstringBuffer.append(image.charAt(i));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfinalimage = stringBuffer.toString();\r\n\t\t\tfinaloutput=xLocation+\"\\n\"+yLocation+\"\\n\"+locationTitle+\"\\n\"+description+\"\\n\"+finalimage+\"\\n\";\r\n\t\t\t\t\r\n\t\t\tcreateLocationObject();\r\n\t\t\twritetoFile(finaloutput);\r\n\t\t\t\r\n\t\t\tdatasource.addLocation(getxLocation(), getyLocation(), locationTitle, description, finalimage); \r\n\t\t\tLog.v(\"CHECK again: \", getxLocation()+\"\\n\"+getyLocation());\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tfinalimage = \"dummystring\";\r\n\t\t\tfinaloutput=xLocation+\"\\n\"+yLocation+\"\\n\"+locationTitle+\"\\n\"+description+\"\\n\"+finalimage+\"\\n\";\r\n\t\t\t\r\n\t\t\tcreateLocationObject();\r\n\t\t\twritetoFile(finaloutput);\r\n\t\t\t\r\n\t\t\tdatasource.addLocation(getxLocation(), getyLocation(), locationTitle, description, finalimage); \r\n\t\t\tLog.v(\"CHECK again: \", getxLocation()+\"\\n\"+getyLocation());\r\n\t\t}\r\n\t\t\r\n\t\tLog.v(\"ADD finaloutput: \", finaloutput);\r\n\t}",
"private File createImageFileName() throws IOException {\n String timestamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n //there are two types of SimpleDateFormat and Date()\n String prepend = \"JPEG_\" + timestamp + \"_\";\n File imageFile = File.createTempFile(prepend, \".jpg\", mImageFolder);\n mImageFileName = imageFile.getAbsolutePath();\n return imageFile;\n\n }",
"private void logLocalMessage(String methodName, int status, String message, BufferedImage image) {\r\n\t\t// Save image into file\r\n\t\tif (image != null) {\r\n\t\t\tString absoluteImagePath = null;\r\n\t\t\t\r\n\t\t\t// kiedy wywolujemy bezposrednio z eclipsa\r\n\t\t\tif (!System.getProperty(\"user.dir\").contains(\"results\")) {\r\n\t\t\t\tnew File(System.getProperty(\"user.dir\") + \"/results/temp/img/\").mkdirs();\r\n\t\t\t\tabsoluteImagePath = System.getProperty(\"user.dir\") + \"/results/temp/img/\" + System.currentTimeMillis() + \".\" + IMG_FORMAT;\r\n\t\t\t} else {\t\t\t\r\n\t\t\t\tnew File(System.getProperty(\"user.dir\") + \"/img/\").mkdirs();\r\n\t\t\t\tabsoluteImagePath = System.getProperty(\"user.dir\") + \"/img/\" + System.currentTimeMillis() + \".\" + IMG_FORMAT;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tFile outputFile = new File(absoluteImagePath);\r\n\t\t\t\tImageIO.write(image, IMG_FORMAT, outputFile);\r\n\t\t\t\tSystem.out.println(\"*HTML*<img src=\\\"\" + absoluteImagePath + \"\\\">\");\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\t\t\t\r\n\t\t}\t\t\r\n\r\n\t\tswitch (status) {\r\n\t\tcase PASSED:\r\n\t\t\tSystem.out.println(\"|PASS|\" + currentDate() + \"|\" + methodName + \" \" + message);\r\n\t\t\tbreak;\r\n\t\tcase FAILED:\r\n\t\t\tSystem.err.println(\"|FAIL|\" + currentDate() + \"|\" + methodName + \" \" + message);\r\n\t\t\tbreak;\r\n\t\tcase WARNING:\r\n\t\t\tSystem.out.println(\"|WARN|\" + currentDate() + \"|\" + methodName + \" \" + message);\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tSystem.out.println(\"|INFO|\" + currentDate() + \"|\" + methodName + \" \" + message);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}",
"private File createImageFile() throws IOException{\n @SuppressLint(\"SimpleDateFormat\")\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"img_\"+timeStamp+\"_\";\n File storageDir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);\n return File.createTempFile(imageFileName,\".jpg\",storageDir);\n }",
"public static void main(String args[]) throws Exception {\n String fileName;\n fileName = scan.nextLine();\n\n OutputStream outStream = null;\n\n String info = readLogFile(fileName);\n\n String outFileName = \"gifs_\" + fileName;\n\n\n try{\n outStream = new FileOutputStream(new File(outFileName), true);\n outStream.write(info.getBytes(), 0, info.length());\n } catch(IOException ioEx) {\n ioEx.printStackTrace();\n } finally {\n try {\n outStream.close();\n } catch( IOException exception ){\n exception.printStackTrace();\n }\n }\n\n }",
"protected File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n strAbsolutePath = image.getAbsolutePath();\n Log.e(\"XpathX\", image.getAbsolutePath());\n return image;\n }",
"private static File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = JPEG_FILE_PREFIX + timeStamp + \"_\";\n File albumF = getAlbumDir();\n File imageF = File.createTempFile(imageFileName, JPEG_FILE_SUFFIX, albumF);\n return imageF;\n }",
"private static File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = JPEG_FILE_PREFIX + timeStamp + \"_\";\n File albumF = getAlbumDir();\n File imageF = File.createTempFile(imageFileName, JPEG_FILE_SUFFIX, albumF);\n return imageF;\n }",
"private File createImageFile() {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = new File(Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_DCIM), \"GIS\");\n File image = null;\n\n if(!storageDir.exists()){\n\n storageDir.mkdirs();\n\n }\n try {\n image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n }catch (Exception e){\n\n e.printStackTrace();\n\n }\n // Save a file: path for use with ACTION_VIEW intents\n\n return image;\n }",
"public void displayImageToConsole();",
"static void write(Image image, String filename) {\n try {\n image.write(filename);\n System.out.println(\"Wrote image: \" + filename);\n } catch (IOException err) {\n System.out.printf(\"Something went wrong writing: %n\", filename, err);\n }\n }",
"public void writeImage() {\n // Write generated image to a file\n try {\n // Save as JPEG\n File file = new File(\"Images/\" + name + \"INS\" + System.currentTimeMillis() + \".jpg\");\n ImageIO.write(bufferedImage, \"jpg\", file);\n\t\t\t\t\n\n } catch (IOException e) {\n }\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"1mind_\" + timeStamp + \".png\";\n File photo = new File(Environment.getExternalStorageDirectory(), imageFileName);\n mCurrentPhotoPath = photo.getAbsolutePath();\n return photo;\n }",
"private File createImageFile() throws IOException {\n // Create an image file name\n String timeStamp = new SimpleDateFormat ( \"yyyyMMdd_HHmmss\" ).format ( new Date () );\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir ( Environment.DIRECTORY_PICTURES );\n File image = File.createTempFile (\n imageFileName , /* prefix */\n \".jpg\" , /* suffix */\n storageDir /* directory */\n );\n\n // luu file: su dung ACTION_VIEW\n pathToFile = image.getAbsolutePath ();\n return image;\n }",
"private void createImgSample() throws IOException {\n\t\tSystem.out.print(\"[INFO][PLUGIN][REPLY]:Creating IMG Sample...\");\n\t\tURL url = new URL(\"http://w23.loxa.edu.tw/mm974401/SmallNight2019.png\");\n\t\tHttpURLConnection con = (HttpURLConnection) url.openConnection();\n\t\tcon.setRequestProperty(\"User-agent\", \" Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:70.0) Gecko/20100101 Firefox/70.0\");\n\t\tBufferedInputStream in = new BufferedInputStream(con.getInputStream());\n\t\tbyte[] data = new byte[1024];\n\t\tnew File(\"reply/img/Sample\").mkdir();\n\t\tFile sampImg = new File(\"reply/img/Sample/SmallNight2019.png\");\n\t\tFileOutputStream fos = new FileOutputStream(sampImg);\n\t\tint n;\n\t\twhile((n=in.read(data,0,1024))>=0) \n\t\t\tfos.write(data,0,n);\n\t\tfos.flush();\n\t\tfos.close();\n\t\tin.close();\n\t\tFileWriter sampCmd = new FileWriter(\"reply/cmd/SampleImg.yml\");\n\t\tsampCmd.write(\"img\\n\");\n\t\tsampCmd.write(\"Sample\\n\");\n\t\tsampCmd.write(\"sample||Sample||TEST||test\\n\");\n\t\tsampCmd.write(\"break\\n\");\n\t\tsampCmd.flush();\n\t\tsampCmd.close();\n\t\tSystem.out.println(\"DONE!\");\n\t}",
"public void setImageName(String name) {\n imageToInsert = name;\n}",
"@RequiresApi(api = Build.VERSION_CODES.N)\n private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n Log.i(TAG, \"Time Stamp: \" + timeStamp);\n\n String imageFileName = \"jpeg_\" + timeStamp + \"_\";\n Log.i(TAG, \"imageFileName: \" + imageFileName);\n\n //This is the directory in which the file will be created. This is the default location of Camera photos\n File storageDir = new File(Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_DCIM), \"Camera\");\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n // Save a file: path for using again\n cameraFilePath = \"file://\" + image.getAbsolutePath();\n Log.i(TAG, \"Photo file path: \" + cameraFilePath);\n return image;\n }",
"private static void createLogFile() {\n try {\n String date = new Date().toString().replaceAll(\":\", \"-\");\n logFile = new FileWriter(\"bio-formats-test-\" + date + \".log\");\n TestLogger log = new TestLogger(logFile);\n LogTools.setLog(log);\n }\n catch (IOException e) { }\n }",
"private static File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = MyApplication.getContext().getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n return image;\n }",
"private File createImageFile() throws IOException {\n // Create an image file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);\n File imageFile = File.createTempFile(imageFileName, \".jpg\", storageDir);\n return imageFile;\n }",
"static String getImage() {\n int rand = (int) (Math.random() * 13);\n return \"file:src/images/spaceships/\" + rand + \".png\";\n }",
"private void logDatabaseMessage(String methodName, int status, String message, BufferedImage image) {\r\n\t\tint idImg = -1;\r\n\t\ttry {\r\n\t\t\tconnect();\r\n\t\t\t\r\n\t\t\tif (image != null)\r\n\t\t\t\tidImg = insertImageIntoDatabase(image);\r\n\t\t\t\r\n\t\t\tPreparedStatement pStat = dbConnection\r\n\t\t\t\t\t.prepareStatement(\"insert into steps (id_test, id_run, id_status, title, details, time, id_img) VALUES (?, ?, ?, ?, ?, now(), ?)\");\r\n\t\t\tpStat.setInt(1, Conf.getTestId());\r\n\t\t\tpStat.setInt(2, Conf.getRunId());\r\n\t\t\tpStat.setInt(3, status);\r\n\t\t\tpStat.setString(4, methodName);\r\n\t\t\tpStat.setString(5, message);\r\n\r\n\t\t\tif (idImg == -1) {\r\n\t\t\t\tpStat.setNull(6, Types.INTEGER);\r\n\t\t\t} else {\r\n\t\t\t\tpStat.setInt(6, idImg);\r\n\t\t\t}\r\n\r\n\t\t\tpStat.execute();\r\n\t\t\tpStat.close();\r\n\t\t\t\r\n\t\t\tupdateTestEnd();\r\n\t\t\t\r\n\t\t} catch (SQLException | ClassNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} \r\n\t}",
"public void logScreen(String imageName) {\n this.logScreen(imageName, imageName, thumbHeight, thumbWidth);\n }",
"private File createImageFile() throws IOException {\n // Create an image file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"MAZE_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n return image;\n }",
"static public void saveAs(BufferedImage img, String name) {\n\t\ttry {\n\t\t\tString type = name.substring(name.length()-3);\n\t\t\tImageIO.write(img, type, new File(name));\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private static byte[] mergeImageAndText(BufferedImage im, String name, String event, Point pointName, Point pointEvent) throws IOException {\n\t\tGraphics2D g2 = im.createGraphics(); //graohics obj banaya to draw\n\t\tSystem.out.println(name);\n\t\tg2.setFont(new Font(\"TimesRoman\", Font.BOLD,28));\n\t\tg2.setColor(Color.BLACK);\n\t\tg2.drawString(name, pointName.x, pointName.y);//write text\n\t\tg2.drawString(event, pointEvent.x, pointEvent.y);//write text\n\t\tByteArrayOutputStream baos = new ByteArrayOutputStream();\n\t\tImageIO.write(im, \"jpg\", baos);\n\t\treturn baos.toByteArray();\n\t}",
"public void printFile(String fileName)\n {\n try\n {\n //takes the output string and writes it in a new file\n //called output.txt\n FileOutputStream out = new FileOutputStream(\n new File(fileName), true);\n out.write(logImage.getBytes());\n out.flush();\n out.close(); \n }\n //catches all exceptions from writing into the .txt\n catch(Exception e)\n {\n System.out.println(\"There was an error while writing into file\");\n }\n }",
"private String createFileName(){\n \t\n \tString state = Environment.getExternalStorageState();\n \tif(state.equals(Environment.MEDIA_MOUNTED)){ \t\t\n \t\tFile folder = new File(Environment.getExternalStorageDirectory() + \"/ArtCameraPro\");\n \t\tboolean success = true;\n \t\tif (!folder.exists()) {\n \t\t success = folder.mkdir();\n \t\t} \n \t\tString sFileName = Environment.getExternalStorageDirectory() + \"/ArtCameraPro\" + File.separator + System.currentTimeMillis() + \".jpg\";\n \t\treturn sFileName;\n \t\t\n \t}\n \treturn \"\";\n }",
"public void saveImage(){\n new Thread() {\n public void run() {\n String image_url = stuffRoomInfo.getStuffLink();\n Log.i(\"OGT\", \"image_url:in showImage \" + image_url);\n getOGTag(image_url);\n // Display a png image from the specified file\n ImageUrlSendServer();\n }\n }.start();\n }",
"private File createImageFile() throws IOException{\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\"+timeStamp;\n File image = File.createTempFile(imageFileName, \".jpg\", this.savePath);\n \n return image;\n }",
"public abstract String getImageSuffix();",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = JPEG_FILE_PREFIX + timeStamp + \"_\";\n File albumF = getAlbumDir();\n File imageF = File.createTempFile(imageFileName, JPEG_FILE_SUFFIX, albumF);\n return imageF;\n }",
"public void logScreen(String imageName, String title) {\n this.logScreen(imageName, title, thumbHeight, thumbWidth);\n }",
"public void m14909a(Bitmap bitmap, String str, String str2) throws IOException {\n StringBuilder sb = new StringBuilder();\n sb.append(\"bitmapsaveBitmap: path--\");\n sb.append(str);\n sb.append(\"--fileName--\");\n sb.append(str2);\n Log.i(\"ruomiz\", sb.toString());\n FileOutputStream fileOutputStream = new FileOutputStream(new File(str, str2));\n bitmap.compress(CompressFormat.JPEG, 100, fileOutputStream);\n fileOutputStream.flush();\n fileOutputStream.close();\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_PICTURES);\n File imageFile = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n return imageFile;\n }",
"private void createImage (String image_name, int filename){\n\n\t\tString image_folder = getLevelImagePatternFolder();\n\t\t\n\t\tString resource = filename+\".png\";\n\t\tImageIcon ii = new ImageIcon(this.getClass().getResource(image_folder + resource));\n images.put(image_name, ii.getImage());\n\t}",
"private File createImageFile(String imgDir) throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = imgDir + File.separator + timeStamp + \"_\";\n File storageDir = Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_PICTURES);\n return File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n }",
"@SuppressLint(\"SimpleDateFormat\")\n public static File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = JPEG_FILE_PREFIX + timeStamp + JPEG_FILE_SUFFIX;\n String nameAlbum = Environment.getExternalStorageDirectory().getAbsolutePath() + \"/\" + nameDir;// getString(R.string.app_name);\n File albumF = new File(nameAlbum);\n if (!albumF.exists()) {\n albumF.mkdirs();\n File noMedia = new File(albumF, \".nomedia\");\n noMedia.createNewFile();\n }\n\n File imageF = new File(albumF, imageFileName);\n imageF.createNewFile();\n return imageF;\n }",
"String getImage();",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp;\n\n String folderName = context.getString(R.string.app_name).toLowerCase();\n\n File path = new File(ContextCompat.getExternalFilesDirs(getActivity(), null)[0]\n .getAbsolutePath() + \"/\" + folderName);\n\n //make sure folder exists\n path.mkdirs();\n\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n path /* directory */\n );\n\n return image;\n }",
"private File getImageFile() throws IOException {\n\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n\n String imageName = \".jpg_\" + timeStamp + \"_\";\n\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n\n\n File imageFile = File.createTempFile(imageName, \".jpg\", storageDir);\n\n\n return imageFile;\n }",
"private File createImageFile() {\n\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\", Locale.getDefault()).format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n\n File storageDir = Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_PICTURES + APP_PICTURE_DIRECTORY);\n storageDir.mkdirs();\n\n File imageFile = null;\n\n try {\n imageFile = File.createTempFile(\n imageFileName, /* prefix */\n FILE_SUFFIX_JPG, /* suffix */\n storageDir /* directory */\n );\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return imageFile;\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(getString(R.string.day_format)).format(new Date());\n String imageFileName = getString(R.string.image_file_prefix) + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(imageFileName, getString(R.string.image_file_format),\n storageDir\n );\n\n return image;\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\", Locale.US).format(new Date());\n String imageFileName = \"perfil_\" + timeStamp + \"_\";\n String outputPath = PATH;\n File storageDir = new File(outputPath);\n if(!storageDir.exists())storageDir.mkdirs();\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = \"file:\" + image.getAbsolutePath();\n return image;\n }",
"private File createImageFile() throws IOException {\n // Create an image file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getContext().getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n return image;\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\")\n .format(new Date());\n String imageFileName = JPEG_FILE_PREFIX + timeStamp + \"_\";\n File albumF = getAlbumDir();\n File imageF = File.createTempFile(imageFileName, JPEG_FILE_SUFFIX,\n albumF);\n return imageF;\n }",
"private String generateFileName() {\n\t\t\n\t\treturn \"/tmp/logger.java_log\" + new Random().nextInt();\n\t}",
"private void logToFile() {\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new java.util.Date());\n String imageFileName = \"WILDLIFE_JPEG_\" + timeStamp + \"_\";\n File storageDir = Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = image.getAbsolutePath();\n return image;\n }",
"private static String createVariableName(Element image, String labelA, String labelN) {\n NodeList directionList = image.getElementsByTagName(\"direction\");\n Node direction = directionList.item(0).getFirstChild();\n NodeList typeList = image.getElementsByTagName(\"type\");\n Node type = typeList.item(0).getFirstChild();\n NodeList nameList = image.getElementsByTagName(\"imageName\");\n Node imageNameNode = nameList.item(0).getFirstChild();\n String imageName = imageNameNode.getNodeValue();\n String dirValue = \"_\" + direction.getNodeValue();\n if (imageName.contains(direction.getNodeValue())) {\n dirValue = \"\";\n }\n String typeValue = \"\";\n if (type.getNodeValue().equalsIgnoreCase(labelA) || type.getNodeValue().equalsIgnoreCase(labelN)) {\n typeValue = \"_\" + type.getNodeValue();\n }\n\n return imageName + typeValue + dirValue;\n }",
"private File createImageFile() throws IOException {\n @SuppressLint({\"NewApi\", \"LocalSuppress\"}) String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\", Locale.getDefault()).format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_PICTURES);\n return File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n }",
"public File createImageFile() {\n // the public picture director\n File picturesDirectory = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES); // To get pictures directory from android system\n\n // timestamp makes unique name.\n @SuppressLint(\"SimpleDateFormat\") SimpleDateFormat sdf = new SimpleDateFormat(\"yyyyMMdd_HHmmss\");\n String timestamp = sdf.format(new Date());\n\n // put together the directory and the timestamp to make a unique image location.\n File imageFile = new File(picturesDirectory, timestamp + \".jpg\");\n\n return imageFile;\n }",
"void createLogo(String logoCode);",
"private File createImageFile() throws IOException\n {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"Picko_JPEG\" + timeStamp + \"_\";\n File storageDir = new File(Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_DOCUMENTS),\"Whatsapp\");\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n String mCurrentPhotoPath = \"file:\" + image.getAbsolutePath();\n return image;\n\n\n }",
"@Test\n void writeToImage() {\n String imagename = \"img\";\n int width = 1600;\n int height = 1000;\n int nx =500;\n int ny =800;\n ImageWriter imageWriter = new ImageWriter(imagename, width, height, nx, ny);\n for (int col = 0; col < ny; col++) {\n for (int row = 0; row < nx; row++) {\n if (col % 10 == 0 || row % 10 == 0) {\n imageWriter.writePixel(row, col, Color.blue);\n }\n }\n }\n imageWriter.writeToImage();\n }",
"File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n //Todo:Este sera el nombre que tendra el archivo\n String imageFileName = \"IMAGE_\" + timeStamp + \"_\";\n //Todo:Ruta donde se almacenara la imagen\n File storageDirectory = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);\n\n //Todo:El tipo de archivo que se almacenara en el directorio\n File image = File.createTempFile(imageFileName,\".jpg\",storageDirectory);\n //Todo: mImageFileLocation sera el valor que se\n mImageFileLocation = image.getAbsolutePath();\n\n return image;\n }",
"private File createImageFile() throws IOException\r\n {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\r\n String imageFileName = \"MYAPPTEMP_\" + timeStamp + \"_\";\r\n File storageDir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);\r\n File image = File.createTempFile(imageFileName, /* prefix */\r\n \".jpg\", /* suffix */\r\n storageDir /* directory */\r\n );\r\n\r\n return image;\r\n }",
"private File createImageFile() throws IOException {\n // Create an image file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMddHHmmss\").format(new Date());\n String mFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File mFile = File.createTempFile(mFileName, \".jpg\", storageDir);\n return mFile;\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n return image;\n }",
"public File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n String folder_main = \"DNote\";\n String path = Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_PICTURES).toString() + File.separator + folder_main;\n File storageDir = new File(path);\n if (!storageDir.exists()) {\n storageDir.mkdir();\n }\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n fileName = image.getAbsolutePath();\n MediaScannerConnection.scanFile(getApplicationContext(), new String[]{image.getPath()}, null,\n new MediaScannerConnection.OnScanCompletedListener() {\n @Override\n public void onScanCompleted(String path, Uri uri) {\n// Log.i(TAG, \"Scanned \" + path);\n }\n });\n return image;\n }",
"public String createImageName(String empName) {\n StringBuilder iN = new StringBuilder();\n\n String[] fnLn = empName.split(\" \");\n iN.append(fnLn[0]);\n iN.append(fnLn[fnLn.length-1].substring(0, 1));\n return iN.toString().trim();\n }",
"public void run() {\nif(i[0] ==le.size()){\n i[0]=0;}\n File file = new File(\"/var/www/html/PawsAndClaws/web/bundles/uploads/brochures/\" + le.get( i[0]).getBrochure());\n\n Image it = new Image(file.toURI().toString(), 500, 310, false, false);\n eventspicture.setImage(it);\n i[0]++;\n }",
"private File createImageFile() throws IOException {\n // Create an image file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n return File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n }",
"static void write_section_file ( String image_file_name, int width, int height ) {\n }",
"@RequiresApi(api = Build.VERSION_CODES.FROYO)\n private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n imageFileName = timeStamp + \"_\" + \".jpg\";\n File storageDir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);\n\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = image.getAbsolutePath();\n Log.e(\"Getpath\", \"Cool\" + mCurrentPhotoPath);\n return image;\n }",
"java.lang.String getImage();",
"public void ShowImage(BufferedImage test) {\n try {\n BufferedImage output = test;\n File fo = new File(\"C:\\\\java\\\\images\\\\sub_image20170114.png\");\n ImageIO.write(output, \"PNG\", fo);\n } catch (IOException e) {\n System.out.println(\"Writing to output failed.\");\n }\n }",
"private void createImage()\n {\n GreenfootImage image = new GreenfootImage(width, height);\n setImage(\"Player.png\");\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n //This is the directory in which the file will be created. This is the default location of Camera photos\n File storageDir = new File(Environment.getExternalStorageDirectory(), getString(R.string.app_name));\n if (!storageDir.exists()){\n storageDir.mkdir();\n }\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n // Save a file: path for using again\n cameraFilePath = \"file://\" + image.getAbsolutePath();\n return image;\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"NDS_\" + timeStamp + \"_\";\n //File mediaStorageDir = Environment.getExternalStoragePublicDirectory(\"/NDS images\");\n String CameraFolder = \"Camera\";\n File mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM).toString() + \"/\" + CameraFolder + \"/\");\n\n if (!mediaStorageDir.exists()) {\n if (!mediaStorageDir.mkdirs()) {\n return null;\n }\n }\n\n\n File storageDir = Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_PICTURES);\n //-------------\n\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n mediaStorageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = \"file:\" + image.getAbsolutePath();\n return image;\n }",
"private void writeLog(){\n\t\tStringBuilder str = new StringBuilder();\r\n\t\tstr.append(System.currentTimeMillis() + \", \");\r\n\t\tstr.append(fileInfo.getCreator() + \", \");\r\n\t\tstr.append(fileInfo.getFileName() + \", \");\r\n\t\tstr.append(fileInfo.getFileLength() + \", \");\r\n\t\tstr.append(networkSize + \", \");\r\n\t\tstr.append(fileInfo.getN1() + \", \");\r\n\t\tstr.append(fileInfo.getK1() + \", \");\r\n\t\tstr.append(fileInfo.getN2() + \", \");\r\n\t\tstr.append(fileInfo.getK2() + \", \");\r\n\t\tstr.append(logger.getDiff(logger.topStart, logger.topEnd-Constants.TOPOLOGY_DISCOVERY_TIMEOUT)+ \", \");\r\n\t\tstr.append(logger.getDiff(logger.optStart, logger.optStop) + \", \");\r\n\t\tstr.append(logger.getDiff(logger.encryStart, logger.encryStop) + \", \");\r\n\t\tstr.append(logger.getDiff(logger.distStart, logger.distStop) + \"\\n\");\r\n\t\t\r\n\t\tString tmp=\"\t\";\r\n\t\tfor(Integer i : fileInfo.getKeyStorage())\r\n\t\t\ttmp += i + \",\";\r\n\t\ttmp += \"\\n\";\r\n\t\tstr.append(tmp);\r\n\t\t\r\n\t\ttmp=\"\t\";\r\n\t\tfor(Integer i : fileInfo.getFileStorage())\r\n\t\t\ttmp += i + \",\";\r\n\t\ttmp += \"\\n\";\r\n\t\tstr.append(tmp);\t\t\r\n\t\t//dataLogger.appendSensorData(LogFileName.FILE_CREATION, str.toString());\t\t\r\n\t\t\r\n\t\t// Topology Discovery\r\n\t\tstr.delete(0, str.length()-1);\r\n\t\tstr.append(Node.getInstance().getNodeId() + \", \");\t\t\t\r\n\t\tstr.append(\"TopologyDisc, \");\r\n\t\tstr.append(networkSize + \", \" + n1 + \", \" + k1 + \", \" + n2 + \", \" + k2 + \", \");\r\n\t\tstr.append(logger.topStart + \", \");\r\n\t\tstr.append(logger.getDiff(logger.topStart, logger.topEnd-Constants.TOPOLOGY_DISCOVERY_TIMEOUT ) + \", \");\r\n\t\tstr.append(\"\\n\");\t\t\t\t\r\n\t\t//dataLogger.appendSensorData(LogFileName.TIMES, str.toString());\r\n\t\t\r\n\t\t// Optimization\r\n\t\tstr.delete(0, str.length()-1);\r\n\t\tstr.append(Node.getInstance().getNodeId() + \", \");\t\t\t\r\n\t\tstr.append(\"Optimization, \");\r\n\t\tstr.append(networkSize + \", \" + n1 + \", \" + k1 + \", \" + n2 + \", \" + k2 + \", \");\r\n\t\tstr.append(logger.optStart + \", \");\r\n\t\tstr.append(logger.getDiff(logger.optStart, logger.optStop) + \", \");\r\n\t\tstr.append(\"\\n\");\r\n\t\t//dataLogger.appendSensorData(LogFileName.TIMES, str.toString());\t\t\r\n\t\t\r\n\t\t\r\n\t\t// File Distribution\r\n\t\tstr.delete(0, str.length()-1);\r\n\t\tstr.append(Node.getInstance().getNodeId() + \", \");\t\t\t\r\n\t\tstr.append(\"FileDistribution, \");\r\n\t\tstr.append(networkSize + \", \" + n1 + \", \" + k1 + \", \" + n2 + \", \" + k2 + \", \");\r\n\t\tstr.append(fileInfo.getFileLength() + \", \");\r\n\t\tstr.append(logger.distStart + \", \");\r\n\t\tstr.append(logger.getDiff(logger.distStart, logger.distStop) + \", \");\r\n\t\tstr.append(\"\\n\\n\");\r\n\t\t//dataLogger.appendSensorData(LogFileName.TIMES, str.toString());\t\t\r\n\t}",
"private static File createImageFile(Activity activity) throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = activity.getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n return image;\n }",
"private String getTempFileString() {\n final File path = new File(getFlagStoreDir() + String.valueOf(lJobId) + File.separator);\n // // If this does not exist, we can create it here.\n if (!path.exists()) {\n path.mkdirs();\n }\n //\n return new File(path, Utils.getDeviceUUID(this)+ \".jpeg\")\n .getPath();\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n //This is the directory in which the file will be created. This is the default location of Camera photos\n File storageDir = new File(Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_DCIM), \"Camera\");\n image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n // Save a file: path for using again\n cameraFilePath = \"file://\" + image.getAbsolutePath();\n return image;\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = image.getAbsolutePath();\n return image;\n }",
"private File createImageFile() throws IOException\n {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n return image;\n }",
"private File createImageFile() throws IOException {\n String imageFileName = new SimpleDateFormat(\"yyyyMMdd-HHmmss\", Locale.ENGLISH).format(new Date());\n String storageDir = Environment.getExternalStorageDirectory() + \"/DokuChat\";\n File dir = new File(storageDir);\n if (!dir.exists())\n dir.mkdir();\n\n image = new File(storageDir + \"/\" + imageFileName + \".jpg\");\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = image.getAbsolutePath();\n return image;\n }",
"public static void main(String[] args) {\n try {\n File image = new File(\"petite_image.png\");\n ImageSerializer serializer = new ImageSerializerBase64Impl();\n\n // Sérialization\n String encodedImage = (String) serializer.serialize(image);\n System.out.println(splitDisplay(encodedImage,76));\n\n // Désérialisation\n byte[] deserializedImage = (byte[]) serializer.deserialize(encodedImage);\n\n // Vérifications\n // 1/ Automatique\n assert (Arrays.equals(deserializedImage, Files.readAllBytes(image.toPath())));\n System.out.println(\"Cette sérialisation est bien réversible :)\");\n // 2/ Manuelle\n File extractedImage = new File(\"petite_image_extraite.png\");\n new FileOutputStream(extractedImage).write(deserializedImage);\n System.out.println(\"Je peux vérifier moi-même en ouvrant mon navigateur de fichiers et en ouvrant l'image extraite dans le répertoire de ce Test\");\n\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n String z = image.getAbsolutePath();\n return image;\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getActivity().getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".png\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n currentPhotoPath = image.getAbsolutePath();\n return image;\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMddHHmmss\").format(new Date());\n String mFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File mFile = File.createTempFile(mFileName, \".jpg\", storageDir);\n pictureFilePath = mFile.getAbsolutePath();\n return mFile;\n }",
"private String image_path(String path, String name, String ext) {\n return path + \"/\" + name + \".\" + ext;\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\", Locale.CANADA).format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = mActivity.getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName,\n \".jpg\",\n storageDir\n );\n\n cameraFilePath = image.getAbsolutePath();\n return image;\n }",
"Person addImage(String name, String imagePath);",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n //This is the directory in which the file will be created. This is the default location of Camera photos\n File storageDir = new File(Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_DCIM), \"Camera\");\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n // Save a file: path for using again\n cameraFilePath = \"file://\" + image.getAbsolutePath();\n return image;\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n //This is the directory in which the file will be created. This is the default location of Camera photos\n File storageDir = new File(Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_DCIM), \"Camera\");\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n // Save a file: path for using again\n cameraFilePath = \"file://\" + image.getAbsolutePath();\n return image;\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\r\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\r\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\r\n File image = File.createTempFile(\r\n imageFileName, // prefix //\r\n \".jpg\", // suffix //\r\n storageDir // directory //\r\n );\r\n\r\n // Save a file: path for use with ACTION_VIEW intents\r\n mPath = image.getAbsolutePath();\r\n return image;\r\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, // prefix\n \".jpg\", // suffix\n storageDir // directory\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = \"file:\" + image.getAbsolutePath();\n return image;\n }",
"public static void main(String[] args) {\n\t\tFile f = new File(\"/home/juedaiyuer\"+File.separator+\" woman.jpg\");\n\t\tSystem.out.println(f);\n\t}",
"public void Func_imagefile(){\n\n\t\tswf_env.containImg = true;\n\n\n\t\tthis.value = new SWFValue(\"Func\");\n\n\t\tString path = this.getAtt(\"path\", \".\");\n\t\tString filename = this.getAtt(\"default\");\n\t\tString type = \"auto\";\n\t\tvalue.instanceName = \"img\"+ Integer.toString(swf_env.instanceID);\n\t\tvalue.data = \"\";\n\t\tvalue.imgpath = path + \"/\" + filename;\n\t\tvalue.inter_imgpath = path + \"/\" + filename;\n\t\tvalue.inter_name = \"intimg\" + Integer.toString(swf_env.interactionImgNUM);\n\t\tvalue.tmp = \"tmp\" + Integer.toString(swf_env.interactionImgNUM);\n\t\tvalue.lnum = Integer.toString(swf_env.visibleflag_counter);\n\n\n\t\tif(!path.startsWith(\"/\")) {\n\t\t\tString basedir = GlobalEnv.getBaseDir();\n\t\t\tLog.out(\"basedir= \" +basedir);\n\t\t\tif(basedir != null && basedir != \"\") {\n\t\t\t\tpath = basedir + path;\n\t\t\t}\n\t\t}\n\n\t\tString filepath = path + \"/\" + filename;\n\n\n\t\tsetDecoration1();\n\t\tvalue.margin = margin;\n\n\n\t\tSystem.out.println(\"filepath = \"+filepath);\n\t\tint img = swf_env.open_image_file(type, filepath);\n\t\tvalue.img = img;\n\n\t\tdata_width = swf_env.get_value(\"imagewidth\", img);\n\t\tdata_height = swf_env.get_value(\"imageheight\", img);\n\t\tSystem.out.println(\"imagesize: \"+data_width+\" \"+data_height);\n\t\twidth = data_width + margin * 2;\n\t\theight = data_height + margin * 2;\n\n\n\t\tsetDecoration2();\n\n\t\tif(data_width > width){\n\t\t\tint original_width = data_width;\n\t\t\tdata_width = width - margin * 2;\n\t\t\tint scale = data_width / original_width;\n\t\t\tdata_height = data_height * scale;\n\t\t\theight = data_height + margin * 2;\n\t\t}\n\t\tif(data_height > height){\n\t\t\tint original_height = data_height;\n\t\t\tdata_height = height - margin * 2;\n\t\t\tint scale = data_height / original_height;\n\t\t\tdata_width = data_width * scale;\n\t\t\twidth = data_width + margin * 2;\n\t\t}\n\n\t\tvalue.data_width = data_width;\n\t\tvalue.data_height = data_height;\n\t\tvalue.width = width;\n\t\tvalue.height = height;\n\t\t//morya wrote\n\t\tvalue.int_w = width;\n\t\tvalue.int_h = height;\n\n\n\t\tsetDecoration3();\n\n\t\tswf_env.tmp_width = width;\n\t\tswf_env.tmp_height = height;\n\n\n\t\tswf_env.instanceID++;\n\n\t}",
"static File createTempImageFile(Context context)\n throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\",\n Locale.getDefault()).format(new Date());\n String imageFileName = \"AZTEK\" + timeStamp + \"_\";\n\n globalImageFileName = imageFileName;\n\n File storageDir = context.getExternalCacheDir();\n\n return File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n }",
"public static void TakeScreenShot(String i) throws IOException {//a metod we will use onTestFail listener, I added i so i can call the method for a particular case and put the screenShots in separate files\n Date d =new Date();\n String fileName = d.toString().replace(\":\",\"_\").replace(\" \",\"_\");\n path = System.getProperty(\"user.dir\")+\"\\\\src\\\\test\\\\resources\\\\Prints\"+i+\"\\\\\"+fileName+\".jpg\";\n File screenshot = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);\n FileUtils.copyFile(screenshot,new File(System.getProperty(\"user.dir\")+\"\\\\src\\\\test\\\\resources\\\\Prints\"+i+\"\\\\\"+fileName+\".jpg\"));\n }",
"public File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_PICTURES);\n File imageFile = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n return imageFile;\n }",
"@Test\n\tpublic void testImagePlusString() {\n\t\tip = new ImagePlus(DataConstants.DATA_DIR + \"hongKongFooey.tif\");\n\t\tassertNotNull(ip);\n\t\tassertNull(ip.getImage());\n\n\t\t// try a file that should exist\n\t\tip = new ImagePlus(DataConstants.DATA_DIR + \"gray8-3x2-sub1.tif\");\n\t\tassertNotNull(ip);\n\t\tassertNotNull(ip.getImage());\n\t\tassertEquals(2,ip.getNDimensions());\n\t\tassertEquals(2,ip.getHeight());\n\t\tassertEquals(3,ip.getWidth());\n\t\tassertEquals(1,ip.getStackSize());\n\t\tassertEquals(1,ip.getNFrames());\n\t\tassertEquals(1,ip.getNChannels());\n\t\tassertEquals(8,ip.getBitDepth());\n\t\tassertEquals(1,ip.getBytesPerPixel());\n\t\tassertEquals(\"gray8-3x2-sub1.tif\",ip.getTitle());\n\t}",
"@RequiresApi(api = Build.VERSION_CODES.N)\n private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n System.out.println(\"StorageDir \" + storageDir);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n currentPhotoPath = image.getAbsolutePath();\n return image;\n }",
"public void recordLog(){\r\n\t\tthis.finishLog(resourceFiles.getString(\"PathHepparIITestDirectory\") + \"/\" + TEST_FILE_NAME); \r\n\t}"
] | [
"0.70483786",
"0.6473069",
"0.6218714",
"0.6154189",
"0.61480653",
"0.6115117",
"0.60976046",
"0.603961",
"0.59715813",
"0.5969152",
"0.595339",
"0.595339",
"0.5940386",
"0.5908276",
"0.58827543",
"0.58638704",
"0.58522457",
"0.5851237",
"0.58508104",
"0.58299434",
"0.58243614",
"0.58176255",
"0.58148783",
"0.58025265",
"0.57920945",
"0.5791117",
"0.5790441",
"0.57867074",
"0.57778794",
"0.57768965",
"0.5776782",
"0.57632524",
"0.5739411",
"0.57381153",
"0.5727057",
"0.5718734",
"0.5712885",
"0.57113266",
"0.5711291",
"0.5710761",
"0.5702811",
"0.5702396",
"0.5686507",
"0.56728244",
"0.5672795",
"0.5671783",
"0.5668894",
"0.56688875",
"0.5668026",
"0.5665827",
"0.56577635",
"0.5654367",
"0.56536293",
"0.5652241",
"0.5651288",
"0.5634689",
"0.5633804",
"0.5633304",
"0.5632101",
"0.5628824",
"0.5628492",
"0.56271994",
"0.5626752",
"0.56260073",
"0.56253254",
"0.5625104",
"0.56196356",
"0.5612867",
"0.56124425",
"0.5605594",
"0.5604788",
"0.5600437",
"0.5596993",
"0.55801916",
"0.5578459",
"0.5576507",
"0.5573304",
"0.55607927",
"0.55548006",
"0.55519646",
"0.55512494",
"0.55463696",
"0.55450124",
"0.55437285",
"0.5540508",
"0.5536639",
"0.5534691",
"0.5531402",
"0.55305797",
"0.55305797",
"0.55276334",
"0.55270493",
"0.55206734",
"0.55130357",
"0.55113584",
"0.5510503",
"0.5510195",
"0.550815",
"0.55066544",
"0.55043036"
] | 0.63608307 | 2 |
This is used for change orientation of image | public static Bitmap modifyOrientation(Bitmap bitmap, String image_absolute_path) throws
IOException {
ExifInterface ei = new ExifInterface(image_absolute_path);
int orientation = ei.getAttributeInt(ExifInterface.TAG_ORIENTATION, ExifInterface.ORIENTATION_NORMAL);
switch (orientation) {
case ExifInterface.ORIENTATION_ROTATE_90:
return rotate(bitmap, 90);
case ExifInterface.ORIENTATION_ROTATE_180:
return rotate(bitmap, 180);
case ExifInterface.ORIENTATION_ROTATE_270:
return rotate(bitmap, 270);
case ExifInterface.ORIENTATION_FLIP_HORIZONTAL:
return flip(bitmap, true, false);
case ExifInterface.ORIENTATION_FLIP_VERTICAL:
return flip(bitmap, false, true);
default:
return bitmap;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setOrientation(int orientation) {\n }",
"public void setOrientation(Direction orientation);",
"void orientation(double xOrientation, double yOrientation, double zOrientation);",
"public void setNewOrientation(int value) {\n this.newOrientation = value;\n }",
"void setImageProperty() {\n\t\t imgView.setImageResource(R.drawable.weathericon);\n\t\tMatrix matrix = new Matrix();\n\t\trotate += 30;\n\t\tif (rotate == 360) {\n\t\t\trotate = 0;\n\t\t}\n\t\tfloat centerX = imgView.getWidth() / 2;\n\t\tfloat centerY = imgView.getHeight() / 2;\n\t\tmatrix.setRotate(rotate, centerX, centerY);\n\t\t//matrix.setTranslate(10, 20);\n\t\timgView.setImageMatrix(matrix); \n\t\t//ScaleType type = ScaleType.\n\t\t\n\t\t//imgView.setScaleType(scaleType);\n\t \n\t}",
"public ImageOrientation getOrientation()\n\t{\n\t\treturn ImageOrientation.None;\n\t}",
"@Override\n\tpublic void setOrientation(float orientation) {\n\t\t\n\t}",
"private Bitmap fixOrientation(Bitmap bitmap) {\n if (bitmap == null) {\n return null;\n }\n\n ExifInterface exif = null;\n try {\n exif = new ExifInterface(currentPhotoPath);\n } catch (IOException e) {\n e.printStackTrace();\n }\n int orientation = exif.getAttributeInt(ExifInterface.TAG_ORIENTATION, ExifInterface.ORIENTATION_UNDEFINED);\n\n Matrix matrix = new Matrix();\n switch (orientation) {\n case ExifInterface.ORIENTATION_ROTATE_90:\n matrix.postRotate(90);\n break;\n case ExifInterface.ORIENTATION_ROTATE_180:\n matrix.postRotate(180);\n break;\n case ExifInterface.ORIENTATION_ROTATE_270:\n matrix.postRotate(270);\n break;\n default:\n break;\n }\n bitmap = Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), matrix, true);\n return bitmap;\n }",
"public void onSetOrientation() {\n }",
"private void orientationChanged(int change) {\n orientation += change;\n if (orientation > 4) {\n orientation = orientation - 4;\n }\n }",
"public String orientation()\n {\n int height = cat.getWidth();\n int width = cat.getHeight();\n\n if (height >= width)\n {\n return \"landscape\";\n }\n else \n {\n return \"portrait\";\n\n }\n }",
"public int getOrientation(){ return mOrientation; }",
"public abstract double getOrientation();",
"public IOrientation getOrientation();",
"private void normalizeOrientation() {\n\t\twhile (this.orientation >= 2 * Math.PI) {\n\t\t\torientation -= 2 * Math.PI;\n\t\t}\n\t\twhile (this.orientation < 0) {\n\t\t\torientation += 2 * Math.PI;\n\t\t}\n\t}",
"public int getNewOrientation() {\n return newOrientation;\n }",
"private void flipOrientation() {\n try {\n if (Settings.System.getInt(getContentResolver(), Settings.System.USER_ROTATION) == Surface.ROTATION_0) {\n Settings.System.putInt(getContentResolver(), Settings.System.USER_ROTATION, Surface.ROTATION_180);\n } else if (Settings.System.getInt(getContentResolver(), Settings.System.USER_ROTATION) == Surface.ROTATION_90) {\n Settings.System.putInt(getContentResolver(), Settings.System.USER_ROTATION, Surface.ROTATION_270);\n } else if (Settings.System.getInt(getContentResolver(), Settings.System.USER_ROTATION) == Surface.ROTATION_180) {\n Settings.System.putInt(getContentResolver(), Settings.System.USER_ROTATION, Surface.ROTATION_0);\n } else {\n Settings.System.putInt(getContentResolver(), Settings.System.USER_ROTATION, Surface.ROTATION_90);\n }\n } catch (Settings.SettingNotFoundException e) {\n Log.e(TAG, e.getMessage());\n }\n }",
"public static BufferedImage reorientImage(BufferedImage image, boolean yAxisFlipNeeded, int cwRotationNeeded) {\r\n //If angle greater than 360 is entered, reduce this angle.\r\n cwRotationNeeded = cwRotationNeeded % 360;\r\n\r\n BufferedImage orientedImage = image;\r\n if (!yAxisFlipNeeded && cwRotationNeeded == 0) {\r\n //EXIF Orientation 1.\r\n return image;\r\n } else if (yAxisFlipNeeded && cwRotationNeeded == 0) {\r\n //EXIF Orientation 2.\r\n orientedImage = flipImageHorizontally(image);\r\n } else if (!yAxisFlipNeeded && cwRotationNeeded == 180) {\r\n //EXIF Orientation 3.\r\n orientedImage = rotateImage(image, 180);\r\n } else if (yAxisFlipNeeded && cwRotationNeeded == 180) {\r\n //EXIF Orientation 4.\r\n orientedImage = flipImageVertically(image);\r\n } else if (yAxisFlipNeeded && cwRotationNeeded == 270) {\r\n //EXIF Orientation 5.\r\n orientedImage = flipImageVertically(image);\r\n orientedImage = rotateImage(orientedImage, 90);\r\n } else if (!yAxisFlipNeeded && cwRotationNeeded == 90) {\r\n //EXIF Orientation 6.\r\n orientedImage = rotateImage(image, 90);\r\n } else if (yAxisFlipNeeded && cwRotationNeeded == 90) {\r\n //EXIF Orientation 7.\r\n orientedImage = flipImageVertically(image);\r\n orientedImage = rotateImage(orientedImage, 270);\r\n } else if (!yAxisFlipNeeded && cwRotationNeeded == 270) {\r\n //EXIF Orientation 8.\r\n orientedImage = rotateImage(image, 270);\r\n } else {\r\n return image;\r\n }\r\n\r\n return orientedImage;\r\n }",
"public abstract void setRequestedOrientation(int requestedOrientation);",
"public void setOrientation(int orientation){\n //save orientation of phone\n mOrientation = orientation;\n }",
"public Orientation getOrientation(){return this.orientation;}",
"public void changeDirection(int image){\n this.image = image; \n }",
"public void setOrientation(Orientation orientation)\n {\n this.orientation = orientation;\n }",
"public void setOrientation(int orientation)\n\t{\n\t\tthis.orientation = orientation;\n\t}",
"@Override // com.master.cameralibrary.CameraViewImpl\n public void setDisplayOrientation(int i) {\n if (this.mDisplayOrientation != i) {\n this.mDisplayOrientation = i;\n if (isCameraOpened()) {\n this.mCameraParameters.setRotation(calcCameraRotation(i));\n this.mCamera.setParameters(this.mCameraParameters);\n boolean z = this.mShowingPreview && Build.VERSION.SDK_INT < 14;\n if (z) {\n this.mCamera.stopPreview();\n }\n this.mCamera.setDisplayOrientation(calcDisplayOrientation(i));\n if (z) {\n this.mCamera.startPreview();\n }\n }\n }\n }",
"public int getOrientation()\n\t{\n\t\treturn orientation;\n\t}",
"public void onOrientationChanged(int orientation);",
"@Override\n public void setOrientation(Orientation orientation) {\n this.orientation = orientation;\n }",
"private void changeCalculatePreviewOrientation() {\n\n if (mHolder.getSurface() == null) {\n // preview surface does not exist\n Log.d(TAG, \"Preview surface does not exist\");\n return;\n }\n\n // stop preview before making changes\n stopCamera();\n\n int orientation = calculatePreviewOrientation(mCameraInfo, mDisplayOrientation);\n mCamera.setDisplayOrientation(orientation);\n\n startCamera();\n }",
"public String getOrientation() {\n\n if(getResources().getDisplayMetrics().widthPixels > \n getResources().getDisplayMetrics().heightPixels) { \n return \"LANDSCAPE\";\n } else {\n return \"PORTRAIT\";\n } \n \n }",
"protected void setOrientation(int n) {\n if (this.mStateMachine.isRecording()) {\n super.setOrientation(n, this.mRecordingOrientation);\n } else {\n super.setOrientation(n);\n }\n if (this.isHeadUpDesplayReady()) {\n if (this.mSettingDialogStack != null) {\n this.mSettingDialogStack.setUiOrientation(n);\n }\n this.mSceneIndicatorIcon.setRotation(RotationUtil.getAngle(this.getOrientationForUiNotRotateInRecording()));\n this.mConditionIndicatorIcon.setRotation(RotationUtil.getAngle(this.getOrientationForUiNotRotateInRecording()));\n this.mSceneIndicatorText.setAnimation(null);\n this.mSceneIndicatorText.setVisibility(4);\n if (this.mAutoReview != null) {\n this.mAutoReview.setOrientation(n);\n }\n if (this.mFocusRectangles != null) {\n this.mFocusRectangles.setOrientation(n);\n }\n if (this.mSelfTimerCountDownView != null) {\n this.mSelfTimerCountDownView.setSensorOrientation(n);\n }\n }\n }",
"public void draw()\n {\n imageView.setRotate(teta);\n imageView.relocate(super.getX(),super.getY());\n }",
"private static OrientationImage createOrientation(int detect, Class imageType) {\n\t\tif( isScaleSpace(detect)) {\n\t\t\tClass integralType = GIntegralImageOps.getIntegralType(imageType);\n\t\t\tOrientationIntegral orientationII = FactoryOrientationAlgs.sliding_ii(null, integralType);\n\t\t\treturn FactoryOrientation.convertImage(orientationII, imageType);\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}",
"void setLandscape(boolean ls);",
"@Override\n\tpublic void setOrientation(Quat4d orientation) {\n\t\t\n\t}",
"public final void setOrientation(Orientation value) {\n orientationProperty().set(value);\n }",
"public void setSensorOrientation(int n) {\n this.mSensorOrientation = n;\n if (this.mSensorOrientation == 2) {\n this.findViewById(2131689617).setVisibility(0);\n this.findViewById(2131689618).setVisibility(8);\n this.findViewById(2131689615).setRotation(0.0f);\n } else {\n this.findViewById(2131689617).setVisibility(8);\n this.findViewById(2131689618).setVisibility(0);\n this.findViewById(2131689615).setRotation(-90.0f);\n }\n this.invalidate();\n super.updateContentDescription();\n }",
"boolean getLandscape();",
"public int setCameraImageDisplayOrientation(Activity activity,\n int cameraId, android.hardware.Camera camera) {\n android.hardware.Camera.CameraInfo info =\n new android.hardware.Camera.CameraInfo();\n android.hardware.Camera.getCameraInfo(cameraId, info);\n int rotation = activity.getWindowManager().getDefaultDisplay()\n .getRotation();\n int screenOrientation = getResources().getConfiguration().orientation;\n if (screenOrientation == Configuration.ORIENTATION_LANDSCAPE) {\n isPortrait = false;\n } else if (screenOrientation == Configuration.ORIENTATION_PORTRAIT) {\n isPortrait = true;\n } else {\n isPortrait = true;\n }\n\n int degrees = 0;\n switch (rotation) {\n case Surface.ROTATION_0:\n degrees = 0;\n break;\n case Surface.ROTATION_90:\n degrees = 90;\n break;\n case Surface.ROTATION_180:\n degrees = 180;\n break;\n case Surface.ROTATION_270:\n degrees = 270;\n break;\n }\n\n int result;\n if (info.facing == Camera.CameraInfo.CAMERA_FACING_FRONT) {\n result = (info.orientation + degrees) % 360;\n result = (360 - result) % 360; // compensate the mirror\n } else { // back-facing\n result = (info.orientation - degrees + 360) % 360;\n }\n camera.setDisplayOrientation(result);\n\n return result;\n }",
"public void onLayoutOrientationChanged(boolean isLandscape);",
"public int getOrientation()\n {\n return m_orientation;\n }",
"private void setCameraDisplayOrientation(Activity activity, int cameraId, Camera camera){\n Camera.CameraInfo info = new Camera.CameraInfo();\n Camera.getCameraInfo(cameraId, info);\n int degrees = getDisplayRotation(activity);\n Log.i(\"Test\", \"rotation:-->\" + degrees);\n int result;\n if(info.facing == Camera.CameraInfo.CAMERA_FACING_FRONT){\n result = (info.orientation + degrees) % 360;\n result = (360 - result) % 360; //compensate the mirror\n }else{\n result = (info.orientation - degrees + 360) % 360;\n }\n camera.setDisplayOrientation(result);\n }",
"public final void setOrientation(Orientation value) {\n\n this.getWrappedControl().setOrientation(value);\n }",
"public void setOrientation(int orientation) {\n\t\tm_nOrientation = orientation;\n\t}",
"@Override\n\tpublic void setOrientation(Vector3 orient) {\n\n\t}",
"default void onOrientationChange(int orientation) { }",
"public String orientation() {\n\t\tif (orientation == null)\n\t\t\tarea();\n\t\treturn orientation;\n\t}",
"public java.lang.Integer getOrientation () {\n\t\treturn orientation;\n\t}",
"public float getOrientacion() { return orientacion; }",
"public void setOrientation(Orientation orientation) {\n\t\tsuper.setOrientation(orientation);\n\t}",
"public void setOrientation (java.lang.Integer orientation) {\n\t\tthis.orientation = orientation;\n\t}",
"private void rotateSeaperch(ImageView imageView, float x, float y, float z){\n\t\timageView.setRotationX(x);\n\t\timageView.setRotation(y);\n\t\timageView.setRotationY(z);\n\t}",
"public void rotateImage(View view) {\n\n View img = findViewById(ID_PlacementMode_BrickPreview_ImageView);\n\n float rotation;\n\n if (view.getId() == R.id.ID_PlacementMode_RotateLeft_Button) {\n rotation = img.getRotation() - (float) 90.0;\n }\n else { // rotate right\n rotation = img.getRotation() + (float) 90.0;\n }\n\n // set rotation in positive range in order to use map_angle_to_blockrotation correctly (Bugfix #414)\n if (rotation < 0) {\n rotation = rotation + 360f;\n }\n\n // set rotation of visualized brick preview\n img.setRotation(rotation);\n\n BlockRotation block_rotation = map_angle_to_blockrotation.get(((int)rotation)%360);\n\n // set rotation in block object\n objBrickPreview.setRotation(block_rotation);\n\n }",
"public interface UseLandscape {\n}",
"@Override\n\tprotected void onSaveInstanceState(Bundle bundle) {\n\t\tsuper.onSaveInstanceState(bundle);\n\t\tbundle.putInt(ASPECT_RATIO_X, mAspectRatioX);\n\t\tbundle.putInt(ASPECT_RATIO_Y, mAspectRatioY);\n\t}",
"@Override\n public void onSensorChanged(SensorEvent event) {\n mOrientation = event.values[0];\n }",
"private void determineOrientation(float[] rotationMatrix) {\n\t\t\t float[] orientationValues = new float[3];\n\t\t SensorManager.getOrientation(rotationMatrix, orientationValues);\n\t\t double azimuth = Math.toDegrees(orientationValues[0]);\n\t\t double pitch = Math.toDegrees(orientationValues[1]);\n\t\t double roll = Math.toDegrees(orientationValues[2]);\n\t\t if (pitch <= 10)\n\t\t { \n\t\t if (Math.abs(roll) >= 170)\n\t\t {\n\t\t onFaceDown();\n\t\t }\n\t\t else if (Math.abs(roll) <= 10)\n\t\t {\n\t\t onFaceUp();\n\t\t }\n\t\t }\n\t\t\t\n\t\t}",
"private int getOrientation() {\n return getContext().getResources().getConfiguration().orientation;\n }",
"void onOrientationChanged(float azimuth, float pitch, float roll);",
"public ReorientImageFilter() {\n }",
"public void changeOrientation(KeyEvent e){\n\t\t\n\t\tif(e.getKeyCode() == KeyEvent.VK_UP) { \n Frogger.flag=1;\n\t\t}\n\t\t\n if(e.getKeyCode() == KeyEvent.VK_DOWN) { \n\n \tif(orientation == Orientation.UP) orientation = Orientation.DOWN;\n \t\telse if (orientation == Orientation.DOWN) orientation = Orientation.UP;\n \t\telse if (orientation == Orientation.RIGHT) orientation = Orientation.LEFT;\n \t\telse if (orientation == Orientation.LEFT) orientation = Orientation.RIGHT;\n \tFrogger.flag=0;\n \n }\n if(e.getKeyCode() == KeyEvent.VK_LEFT) { \n\n \tif(orientation == Orientation.UP) orientation = Orientation.LEFT;\n \t\telse if (orientation == Orientation.DOWN) orientation = Orientation.RIGHT;\n \t\telse if (orientation == Orientation.RIGHT) orientation = Orientation.UP;\n \t\telse if (orientation == Orientation.LEFT) orientation = Orientation.DOWN;\n \tFrogger.flag=0;\n }\n if(e.getKeyCode() == KeyEvent.VK_RIGHT) {\n\n \tif(orientation == Orientation.UP) orientation = Orientation.RIGHT;\n \t\telse if (orientation == Orientation.DOWN) orientation = Orientation.LEFT;\n \t\telse if (orientation == Orientation.RIGHT) orientation = Orientation.DOWN;\n \t\telse if (orientation == Orientation.LEFT) orientation = Orientation.UP;\n \tFrogger.flag=0;\n }\n\t}",
"@Override\r\n\tpublic void onOrientationChanged(float azimuth, float pitch, float roll) {\n\r\n\t}",
"@Override\r\n\tpublic void rotate() {\n\t\t\r\n\t}",
"public void rotate()\r\n\t{\r\n\t\tdouble degree = Math.PI/2;\r\n\t\tdouble sin = Math.sin(degree);\r\n\r\n\t\tAffineTransform tx = new AffineTransform();\r\n\t\ttx.rotate(degree, this.bufferedImage.getWidth() / (double)2, this.bufferedImage.getHeight() / (double)2);\r\n\t\tAffineTransformOp op = new AffineTransformOp(tx, AffineTransformOp.TYPE_BILINEAR);\r\n\r\n\t\tRectangle rect = op.getBounds2D(this.bufferedImage).getBounds();\r\n\t\ttx.translate(sin * rect.getX(), -sin * rect.getY());\r\n\t\top = new AffineTransformOp(tx,AffineTransformOp.TYPE_BILINEAR);\r\n\t\tthis.bufferedImage = op.filter(this.bufferedImage, op.createCompatibleDestImage(this.bufferedImage, null) );\r\n\r\n\r\n\t\tthis.setBounds( getX(), getY(), this.bufferedImage.getWidth(), this.bufferedImage.getHeight() );\r\n\t\tthis.width = this.bufferedImage.getWidth();\r\n\t\tthis.height = this.bufferedImage.getHeight();\r\n\t\t\r\n\t}",
"private Bitmap rotateBitmapOrientation(String photoFilePath) {\n BitmapFactory.Options bounds = new BitmapFactory.Options();\n bounds.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(photoFilePath, bounds);\n BitmapFactory.Options opts = new BitmapFactory.Options();\n Bitmap bm = BitmapFactory.decodeFile(photoFilePath, opts);\n // Read EXIF Data\n ExifInterface exif = null;\n try {\n exif = new ExifInterface(photoFilePath);\n } catch (IOException e) {\n e.printStackTrace();\n }\n String orientString = exif.getAttribute(ExifInterface.TAG_ORIENTATION);\n int orientation = orientString != null ? Integer.parseInt(orientString) : ExifInterface.ORIENTATION_NORMAL;\n int rotationAngle = 0;\n if (orientation == ExifInterface.ORIENTATION_ROTATE_90) rotationAngle = 90;\n if (orientation == ExifInterface.ORIENTATION_ROTATE_180) rotationAngle = 180;\n if (orientation == ExifInterface.ORIENTATION_ROTATE_270) rotationAngle = 270;\n // Rotate Bitmap\n Matrix matrix = new Matrix();\n matrix.setRotate(rotationAngle, (float) bm.getWidth() / 2, (float) bm.getHeight() / 2);\n Bitmap rotatedBitmap = Bitmap.createBitmap(bm, 0, 0, bounds.outWidth, bounds.outHeight, matrix, true);\n // Return result\n return rotatedBitmap;\n }",
"@Override\n public void setKeepsOrientation(boolean value) {\n this.keepsOrientation = value;\n }",
"private Orientation() {\n }",
"public static Bitmap rotateBitmap(Bitmap newImage) throws IOException {\n ByteArrayOutputStream stream = new ByteArrayOutputStream();\n newImage.compress(Bitmap.CompressFormat.JPEG, 100, stream);\n InputStream inputStream = new ByteArrayInputStream(stream.toByteArray());\n try {\n ExifInterface exif = new ExifInterface(inputStream);\n int orientation = exif.getAttributeInt(ExifInterface.TAG_ORIENTATION, 1);\n if (orientation == ExifInterface.ORIENTATION_ROTATE_90) {\n Matrix matrix = new Matrix();\n matrix.postRotate(90);\n Bitmap rotatedBitmap = Bitmap.createBitmap(newImage, 0, 0, newImage.getWidth(), newImage.getHeight(), matrix, true);\n return rotatedBitmap;\n } else {\n return newImage;\n }\n } catch (Exception e) {\n Log.e(\"Error getting image: \", e.toString());\n }\n return newImage;\n }",
"private void setPic() {\n int targetW = 210;\n int targetH = 320;\n\n // Get the dimensions of the bitmap\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(previewPhotoPath, bmOptions);\n int photoW = bmOptions.outWidth;\n int photoH = bmOptions.outHeight;\n\n // Determine how much to scale down the image\n int scaleFactor = Math.min(photoW/targetW, photoH/targetH);\n\n // Decode the image file into a Bitmap sized to fill the View\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n bmOptions.inPurgeable = true;\n\n Bitmap bitmap = BitmapFactory.decodeFile(previewPhotoPath, bmOptions);\n bitmap = RotateBitmap(bitmap,270);\n preview.setImageBitmap(bitmap);\n }",
"@Override\n public boolean isKeepsOrientation() {\n return keepsOrientation;\n }",
"public void invertOrientation() {\n\t\tPoint3D temp = getPoint(2);\n\t\tsetPoint(2, getPoint(1));\n\t\tsetPoint(1, temp);\n\n\t\tTriangleElt3D temp2 = getNeighbour(2);\n\t\tsetNeighbour(2, getNeighbour(1));\n\t\tsetNeighbour(1, temp2);\n\t\tif (this.getNetComponent() != null)\n\t\t\tthis.getNetComponent().setOriented(false);\n\t}",
"@Override\n public void onConfigurationChanged(Configuration newConfig) {\n super.onConfigurationChanged(newConfig);\n setContentView(R.layout.activity_main);\n if (newConfig.orientation == Configuration.ORIENTATION_PORTRAIT) {\n CamB.setRotation(0);\n\n } else if (newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE) {\n CamB.setRotation(90);\n }\n }",
"public interface Orientation {\n\n int LEFT = 0; //左\n int TOP = 1; //顶\n int RIGHT = 2; //右\n int BOTTOM = 4; //底\n int ALL = 8; //所有方向\n int NONE = 16; //无方向\n\n}",
"protected int getExifOrientation(final File imageFile) {\n try {\n final ImageMetadata metadata = Imaging.getMetadata(imageFile);\n TiffImageMetadata tiffImageMetadata;\n\n if (metadata instanceof JpegImageMetadata) {\n tiffImageMetadata = ((JpegImageMetadata) metadata).getExif();\n } else if (metadata instanceof TiffImageMetadata) {\n tiffImageMetadata = (TiffImageMetadata) metadata;\n } else {\n return TiffTagConstants.ORIENTATION_VALUE_HORIZONTAL_NORMAL;\n }\n if(tiffImageMetadata==null){\n return TiffTagConstants.ORIENTATION_VALUE_HORIZONTAL_NORMAL;\n }\n TiffField field = tiffImageMetadata.findField(TiffTagConstants.TIFF_TAG_ORIENTATION);\n if (field != null) {\n return field.getIntValue();\n } else {\n TagInfo tagInfo = new TagInfoShort(\"Orientation\", 0x115, TiffDirectoryType.TIFF_DIRECTORY_IFD0); // MAGIC_NUMBER\n field = tiffImageMetadata.findField(tagInfo);\n if (field != null) {\n return field.getIntValue();\n } else {\n return TiffTagConstants.ORIENTATION_VALUE_HORIZONTAL_NORMAL;\n }\n }\n } catch (ImageReadException | IOException e) {\n return TiffTagConstants.ORIENTATION_VALUE_HORIZONTAL_NORMAL;\n }\n }",
"public void updateOrientation(Location loc)\n {\n orientation = new Orientation(loc);\n }",
"private void updateTransform() {\n Matrix matrix = new Matrix();\n float centerX = dataBinding.viewFinder.getWidth() / 2f;\n float centerY = dataBinding.viewFinder.getHeight() / 2f;\n int rotation = dataBinding.viewFinder.getDisplay().getRotation();\n int rotationDegrees = 0;\n switch (rotation) {\n case Surface.ROTATION_0:\n rotationDegrees = 0;\n break;\n case Surface.ROTATION_90:\n rotationDegrees = 90;\n break;\n case Surface.ROTATION_180:\n rotationDegrees = 180;\n break;\n case Surface.ROTATION_270:\n rotationDegrees = 270;\n break;\n default:\n }\n matrix.postRotate(-rotationDegrees, centerX, centerY);\n }",
"private static Bitmap rotateImageIfRequired(Context context, Bitmap img, Uri selectedImage) throws IOException {\n ExifInterface ei;\n /*\n if (Build.VERSION.SDK_INT > 23)\n ei = new ExifInterface(input);\n else\n */\n ei = new ExifInterface(selectedImage.getPath());\n\n int orientation = ei.getAttributeInt(ExifInterface.TAG_ORIENTATION, ExifInterface.ORIENTATION_NORMAL);\n\n switch (orientation) {\n case ExifInterface.ORIENTATION_ROTATE_90:\n return rotateImage(img, 90);\n case ExifInterface.ORIENTATION_ROTATE_180:\n return rotateImage(img, 180);\n case ExifInterface.ORIENTATION_ROTATE_270:\n return rotateImage(img, 270);\n default:\n return img;\n }\n }",
"public Rotation(){\n\t\timageData = new int[][] {{1,2,3,4}, {5,6,7,8},{9, 10, 11, 12},{13, 14, 15 ,16}};\n\t\tn = 4;\n\t}",
"public void setOrientation(EditText facingCompass){\n if (facingCompass.getText().toString().matches(\"NORTH\")) {\n orientation = 0;\n rotateRight = orientation;\n angleF = 0;\n\n } else if (facingCompass.getText().toString().matches(\"EAST\")) {\n orientation = 1;\n rotateRight = orientation;\n angleF = 90;\n\n } else if (facingCompass.getText().toString().matches(\"SOUTH\")) {\n orientation = 2;\n rotateRight = orientation;\n angleF = 180;\n\n } else if (facingCompass.getText().toString().matches(\"WEST\")) {\n orientation = 3;\n rotateRight = orientation;\n angleF = 270;\n\n } else\n errorMessage(\"Invalid F Direction...\\ndefaulted to NORTH\");\n return;\n }",
"@Override\n public int getCameraOrientation() {\n return characteristics_sensor_orientation;\n }",
"public void setOrientation(LatLonAlt lla) {\r\n\tOrientation = Location.azimuth_elevation_dist(lla)[0];\r\n}",
"protected void rotateImage(int degrees) {\n mCropImageView.rotateImage(degrees);\n }",
"@Override\n public void onClick(View v) {\n\n\n float x = ivImage.getScaleX();\n float y = ivImage.getScaleY();\n\n ivImage.setScaleX((float) (x - 1));\n ivImage.setScaleY((float) (y - 1));\n }",
"@Override\n\tpublic void rotate() {\n\t}",
"private Bitmap imageOrientationValidator(File mPhotoFile) {\n if (mPhotoFile == null) {\n return null;\n }\n ExifInterface ei;\n\n try {\n Bitmap bitmap = MediaStore.Images.Media.getBitmap(this.getContentResolver(),\n FileProvider.getUriForFile(this,\n BuildConfig.APPLICATION_ID,\n mPhotoFile));\n ei = new ExifInterface(mPhotoFile.getAbsolutePath());\n int orientation = ei.getAttributeInt(ExifInterface.TAG_ORIENTATION,\n ExifInterface.ORIENTATION_UNDEFINED);\n rotatedBitmap = null;\n switch (orientation) {\n\n case ExifInterface.ORIENTATION_ROTATE_90:\n rotatedBitmap = rotateImage(bitmap, 90);\n\n break;\n\n case ExifInterface.ORIENTATION_ROTATE_180:\n rotatedBitmap = rotateImage(bitmap, 180);\n\n break;\n\n case ExifInterface.ORIENTATION_ROTATE_270:\n rotatedBitmap = rotateImage(bitmap, 270);\n\n break;\n\n case ExifInterface.ORIENTATION_NORMAL:\n default:\n rotatedBitmap = bitmap;\n break;\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n return rotatedBitmap;\n }",
"public int setCameraDisplayOrientationByCameraSelected() {\n int result = 0;\n if (isBackCameraSelected) {\n result = setCameraImageDisplayOrientation(mCameraActivity, backCamera, mCamera);\n } else {\n if (hasFrontCamera) {\n result = setCameraImageDisplayOrientation(mCameraActivity, frontCamera, mCamera);\n }\n }\n return result;\n }",
"public void setOnOrientationChange(boolean changed){\n //orientation change flag\n mOrientationChange = changed;\n }",
"@Override\n\t\t\t\tpublic void onClick(View button) {\n\t\t\t\t\tInteger screenOrientation=0;\n\t\t\t\t\tif(btn_portrait==button)\n\t\t\t\t\t\tscreenOrientation=ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;\n\t\t\t\t\telse if(btn_rportrait==button)\n\t\t\t\t\t\tscreenOrientation=ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT;\n\t\t\t\t\t\n\t\t\t\t\tchangeScreenStatus(screenOrientation,sourcebitmap);\n\t\t\t\t\tMainActivity.Instance.PlayerSetting.setScreenOrientation(screenOrientation.toString());\n\t\t\t\t\tif(oldScreenOrientation!=screenOrientation)\n\t\t\t\t\t\tisModifyScreen=true;\n\t\t\t\t\telse {\n\t\t\t\t\t\tisModifyScreen=false;\n\t\t\t\t\t}\n\t\t\t\t}",
"public void rotate() {\n // amoeba rotate\n // Here i will use my rotation_x and rotation_y\n }",
"public void rotateShip(){\n if (this.orientation == false){\n this.orientation = true;\n }else\n orientation = false;\n \n return;\n }",
"public void updateImage(GameObject.Direction direction) {\n switch (direction) {\n case NORTH:\n currentImage = north;\n break;\n\n case SOUTH:\n currentImage = south;\n break;\n\n case WEST:\n currentImage = west;\n break;\n\n case EAST:\n currentImage = east;\n break;\n }\n }",
"public void updateOrientationAngles() {\n SensorManager.getRotationMatrix(rotationMatrix, null,\n accelerometerReading, magnetometerReading);\n\n // \"mRotationMatrix\" now has up-to-date information.\n\n float[] angles = SensorManager.getOrientation(rotationMatrix, orientationAngles);\n azimuth = (float) Math.toDegrees(angles[0]);\n // \"mOrientationAngles\" now has up-to-date information.\n TextView az = findViewById(R.id.az);\n rotateDriver(azimuth);\n\n az.setText(Float.toString(azimuth));\n }",
"@Override\n public void rotate(Command command) {\n switch (command){\n case UP:\n setOrientation(Orientation.UP);\n break;\n\n case DOWN:\n setOrientation(Orientation.DOWN);\n break;\n\n case LEFT:\n setOrientation(Orientation.LEFT);\n break;\n\n case RIGHT:\n setOrientation(Orientation.RIGHT);\n break;\n\n default:\n }\n }",
"@Override\n public void onConfigurationChanged(Configuration newConfig) {\n super.onConfigurationChanged(newConfig);\n if (newConfig.orientation == Configuration.ORIENTATION_PORTRAIT) {\n // background.setImageDrawable(ContextCompat.getDrawable(getContext(),\n // resid));\n background.setBackgroundResource(resid);\n } else if (newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE) {\n // background.setImageDrawable(ContextCompat.getDrawable(getContext(),\n // resid_land));\n background.setBackgroundResource(resid_land);\n }\n }",
"public int getOrientation() {\n\t\treturn m_nOrientation;\n\t}",
"public abstract void rotate();",
"private Bitmap rotateImage(final String path) {\n\n Bitmap b = decodeFileFromPath(path);\n\n try {\n ExifInterface ei = new ExifInterface(path);\n int orientation = ei.getAttributeInt(ExifInterface.TAG_ORIENTATION, ExifInterface.ORIENTATION_NORMAL);\n Matrix matrix = new Matrix();\n switch (orientation) {\n case ExifInterface.ORIENTATION_ROTATE_90:\n matrix.postRotate(90);\n b = Bitmap.createBitmap(b, 0, 0, b.getWidth(), b.getHeight(), matrix, true);\n\n break;\n case ExifInterface.ORIENTATION_ROTATE_180:\n matrix.postRotate(180);\n b = Bitmap.createBitmap(b, 0, 0, b.getWidth(), b.getHeight(), matrix, true);\n break;\n case ExifInterface.ORIENTATION_ROTATE_270:\n matrix.postRotate(270);\n b = Bitmap.createBitmap(b, 0, 0, b.getWidth(), b.getHeight(), matrix, true);\n break;\n default:\n b = Bitmap.createBitmap(b, 0, 0, b.getWidth(), b.getHeight(), matrix, true);\n //b.copyPixelsFromBuffer(ByteBuffer.)\n break;\n }\n } catch (Throwable e) {\n e.printStackTrace();\n }\n return b;\n }",
"private boolean isLandscapeOrientation(){\n return getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE; \n }",
"public final Orientation getOrientation() {\n return orientation == null ? Orientation.HORIZONTAL : orientation.get();\n }",
"public void setInvertedImage(double position, double height) {\n // set the X coordinate of the image center\n // X imageCenter = X of lensCenter + the distance between the lens and the image\n imageCenterX = lensCenterX + position;\n\n // remove the image from the pane if it's already existed\n removeFromPane(image);\n \n // create new image rectangle\n // x coordinate = Xcenter - half of the rectangle's width (since the width of the object is equal to the image)\n // y coordinate = Y coordinate of the ground line\n image = new Rectangle(objectWidth, height);\n image.setLayoutX(imageCenterX - objectWidth / 2);\n image.setLayoutY(groundLineY);\n\n // Check the comboBox to set the corresponding inverted image\n if (pickPicture.getValue().equals(\"Candle\")) {\n image.setFill(AssetManager.getInvertedCandleImage());\n } else if (pickPicture.getValue().equals(\"Can\")) {\n image.setFill(AssetManager.getInvertedCanImage());\n }\n else\n image.setFill(AssetManager.getInvertedPencilImage());\n \n // add the image rectangle to the pane\n addToPane(image);\n }"
] | [
"0.70882964",
"0.6852918",
"0.6780894",
"0.67782307",
"0.6772436",
"0.67526525",
"0.6741995",
"0.67326957",
"0.6720859",
"0.67114276",
"0.6669627",
"0.66286075",
"0.6570233",
"0.6487539",
"0.64683735",
"0.64101547",
"0.63583755",
"0.63435376",
"0.63098574",
"0.6303449",
"0.62671614",
"0.62497896",
"0.6237096",
"0.62174094",
"0.62100816",
"0.6185199",
"0.6184854",
"0.61713225",
"0.6163418",
"0.61544675",
"0.61078715",
"0.6094924",
"0.6076267",
"0.6069188",
"0.6037545",
"0.60363364",
"0.5956404",
"0.59552413",
"0.5930798",
"0.5911088",
"0.59057176",
"0.5901445",
"0.59004307",
"0.5866339",
"0.58489835",
"0.58483994",
"0.58447665",
"0.5835878",
"0.58346254",
"0.583442",
"0.58297074",
"0.58289474",
"0.5825806",
"0.5821329",
"0.5819967",
"0.5808443",
"0.5794431",
"0.57825214",
"0.57754385",
"0.57729214",
"0.5769145",
"0.57669663",
"0.5756348",
"0.5752537",
"0.5743037",
"0.5733165",
"0.5713458",
"0.57132727",
"0.57083684",
"0.5705396",
"0.57041925",
"0.56983167",
"0.56973684",
"0.569124",
"0.5664705",
"0.5656383",
"0.565255",
"0.5643036",
"0.5641403",
"0.563753",
"0.5634631",
"0.5631268",
"0.56261617",
"0.5620968",
"0.5614447",
"0.56133217",
"0.56117284",
"0.5608599",
"0.5600061",
"0.5598205",
"0.55856687",
"0.55789423",
"0.55780244",
"0.55706877",
"0.55604225",
"0.55567336",
"0.55537325",
"0.5551825",
"0.55513054",
"0.5543736"
] | 0.61301154 | 30 |
This is used for rotate image whatever you want | static Bitmap rotate(Bitmap bitmap, float degrees) {
Matrix matrix = new Matrix();
matrix.postRotate(degrees);
return Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), matrix, true);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void rotate();",
"public void rotateImage(View view) {\n\n View img = findViewById(ID_PlacementMode_BrickPreview_ImageView);\n\n float rotation;\n\n if (view.getId() == R.id.ID_PlacementMode_RotateLeft_Button) {\n rotation = img.getRotation() - (float) 90.0;\n }\n else { // rotate right\n rotation = img.getRotation() + (float) 90.0;\n }\n\n // set rotation in positive range in order to use map_angle_to_blockrotation correctly (Bugfix #414)\n if (rotation < 0) {\n rotation = rotation + 360f;\n }\n\n // set rotation of visualized brick preview\n img.setRotation(rotation);\n\n BlockRotation block_rotation = map_angle_to_blockrotation.get(((int)rotation)%360);\n\n // set rotation in block object\n objBrickPreview.setRotation(block_rotation);\n\n }",
"public void rotate() {\n // amoeba rotate\n // Here i will use my rotation_x and rotation_y\n }",
"@Override\r\n\tpublic void rotate() {\n\t\t\r\n\t}",
"public abstract void rotate();",
"public void rotate()\r\n\t{\r\n\t\tdouble degree = Math.PI/2;\r\n\t\tdouble sin = Math.sin(degree);\r\n\r\n\t\tAffineTransform tx = new AffineTransform();\r\n\t\ttx.rotate(degree, this.bufferedImage.getWidth() / (double)2, this.bufferedImage.getHeight() / (double)2);\r\n\t\tAffineTransformOp op = new AffineTransformOp(tx, AffineTransformOp.TYPE_BILINEAR);\r\n\r\n\t\tRectangle rect = op.getBounds2D(this.bufferedImage).getBounds();\r\n\t\ttx.translate(sin * rect.getX(), -sin * rect.getY());\r\n\t\top = new AffineTransformOp(tx,AffineTransformOp.TYPE_BILINEAR);\r\n\t\tthis.bufferedImage = op.filter(this.bufferedImage, op.createCompatibleDestImage(this.bufferedImage, null) );\r\n\r\n\r\n\t\tthis.setBounds( getX(), getY(), this.bufferedImage.getWidth(), this.bufferedImage.getHeight() );\r\n\t\tthis.width = this.bufferedImage.getWidth();\r\n\t\tthis.height = this.bufferedImage.getHeight();\r\n\t\t\r\n\t}",
"public ImageRotator(int receivedAngle){angle = receivedAngle;}",
"@Override\n\tpublic void rotate() {\n\t}",
"public ImageIcon rotateImage(ImageIcon aicon){\n\t\tswitch(angle){\n\t\tcase 90: case -90: return rotateImage(aicon, angle);\n\t\tcase 180: return rotateImage(rotateImage(aicon, 90), 90);\n\t\tdefault: return aicon;\n\t\t}\n\t}",
"private void rotateSeaperch(ImageView imageView, float x, float y, float z){\n\t\timageView.setRotationX(x);\n\t\timageView.setRotation(y);\n\t\timageView.setRotationY(z);\n\t}",
"private Bitmap rotateImage(Bitmap source, float angle) {\n Matrix matrix = new Matrix();\n matrix.postRotate(angle);\n return Bitmap.createBitmap(source, 0, 0, source.getWidth(), source.getHeight(),\n matrix, true);\n }",
"private static Bitmap rotateImage(Bitmap source, float angle) {\n Matrix matrix = new Matrix();\n matrix.postRotate(angle);\n return Bitmap.createBitmap(source, 0, 0, source.getWidth(), source.getHeight(),\n matrix, true);\n }",
"public Bitmap rotaingImageView(int angle , Bitmap bitmap) {\n Matrix matrix = new Matrix();\n matrix.postRotate(angle);\n // Create a new image\n return Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), matrix, true);\n }",
"public MutableImage rotate(double degrees) {\n return apply(t -> {\n var w = image.getWidth();\n var h = image.getHeight();\n var rads = Math.toRadians(degrees);\n var sin = Math.abs(Math.sin(rads));\n var cos = Math.abs(Math.cos(rads));\n var newWidth = (int) Math.floor(w * cos + h * sin);\n var newHeight = (int) Math.floor(h * cos + w * sin);\n t.translate((newWidth - w) / 2d, (newHeight - h) / 2d);\n var x = w / 2;\n var y = h / 2;\n t.rotate(rads, x, y);\n });\n }",
"public void draw()\n {\n imageView.setRotate(teta);\n imageView.relocate(super.getX(),super.getY());\n }",
"private Bitmap rotateImage(final String path) {\n\n Bitmap b = decodeFileFromPath(path);\n\n try {\n ExifInterface ei = new ExifInterface(path);\n int orientation = ei.getAttributeInt(ExifInterface.TAG_ORIENTATION, ExifInterface.ORIENTATION_NORMAL);\n Matrix matrix = new Matrix();\n switch (orientation) {\n case ExifInterface.ORIENTATION_ROTATE_90:\n matrix.postRotate(90);\n b = Bitmap.createBitmap(b, 0, 0, b.getWidth(), b.getHeight(), matrix, true);\n\n break;\n case ExifInterface.ORIENTATION_ROTATE_180:\n matrix.postRotate(180);\n b = Bitmap.createBitmap(b, 0, 0, b.getWidth(), b.getHeight(), matrix, true);\n break;\n case ExifInterface.ORIENTATION_ROTATE_270:\n matrix.postRotate(270);\n b = Bitmap.createBitmap(b, 0, 0, b.getWidth(), b.getHeight(), matrix, true);\n break;\n default:\n b = Bitmap.createBitmap(b, 0, 0, b.getWidth(), b.getHeight(), matrix, true);\n //b.copyPixelsFromBuffer(ByteBuffer.)\n break;\n }\n } catch (Throwable e) {\n e.printStackTrace();\n }\n return b;\n }",
"public native MagickImage rotateImage(double degrees)\n\t\t\tthrows MagickException;",
"private static Bitmap fixImageRotation (Bitmap bitmap, String rawImageFilePath) throws IOException\r\n {\r\n /* Evaluate if we need to rotate the bitmap and replace the old bitmap. */\r\n float angle = getRawImageRotation(rawImageFilePath);\r\n if ( bitmap != null\r\n && angle != 0)\r\n {\r\n Matrix matrix = new Matrix();\r\n matrix.postRotate(angle);\r\n\r\n Bitmap oldBitmap = bitmap;\r\n\r\n bitmap = Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(),\r\n bitmap.getHeight(), matrix, true);\r\n\r\n oldBitmap.recycle();\r\n }\r\n return bitmap;\r\n }",
"public void rotate(double deg) {\n deg = deg % 360;\n// System.out.println(\"Stopni:\" + deg);\n double e = 0;\n double f = 0;\n\n// for(int i = 0; i < pixels.length; i++) {\n// for(int j = 0; j < pixels[i].length; j++) {\n// e += pixels[i][j].getX();\n// f += pixels[i][j].getY();\n// }\n// }\n //e = e / (pixels.length * 2);\n //f = f / (pixels[0].length * 2);\n e = pixels.length / 2;\n f = pixels[0].length / 2;\n System.out.println(e);\n System.out.println(f);\n\n// System.out.println(e + \":\" + f);\n Matrix affineTransform;\n Matrix translateMinus = Matrix.translateRotate(-e, -f);\n Matrix translatePlus = Matrix.translateRotate(e, f);\n Matrix movedTransform = Matrix.multiply(translateMinus, Matrix.rotate(deg));\n //movedTransform.display();\n affineTransform = Matrix.multiply(movedTransform, translatePlus);\n //affineTransform.display();\n\n for(int i = 0; i < pixels.length; i++) {\n for(int j = 0; j < pixels[i].length; j++) {\n double[][] posMatrix1 = {{pixels[i][j].getX()}, {pixels[i][j].getY()}, {1}};\n Matrix m1 = new Matrix(posMatrix1);\n Matrix result1;\n result1 = Matrix.multiply(Matrix.transpose(affineTransform.v), m1);\n\n pixels[i][j].setX(Math.round(result1.v[0][0]));\n pixels[i][j].setY(Math.round(result1.v[1][0]));\n }\n }\n\n\n }",
"public static void drawRotatedImage(GraphicsContext gc, Image image, double angle, double x, double y, double width, double height) {\n gc.save(); // saves the current state on stack, including the current transform\n rotate(gc, angle, x + width / 2, y + height / 2); // + image.getWidth() / 2, y + image.getHeight() / 2);\n gc.drawImage(image, x, y, width, height);\n gc.restore(); // back to original state (before rotation)\n }",
"@Override\n \t\t\t\tpublic void doRotateX() {\n \n \t\t\t\t}",
"public void xRotate() {\n\t\t\n\t}",
"public Rotation(){\n\t\timageData = new int[][] {{1,2,3,4}, {5,6,7,8},{9, 10, 11, 12},{13, 14, 15 ,16}};\n\t\tn = 4;\n\t}",
"private Bitmap rotateBitmap(Bitmap bitmap){\n Matrix matrix = new Matrix();\n matrix.postRotate(90);\n return Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), matrix, true);\n }",
"public static BufferedImage rotateImage(BufferedImage img, double angle) {\n double rads = Math.toRadians(angle);\n double sin = Math.abs(Math.sin(rads)), cos = Math.abs(Math.cos(rads));\n int w = img.getWidth();\n int h = img.getHeight();\n int newWidth = (int) Math.floor(w * cos + h * sin);\n int newHeight = (int) Math.floor(h * cos + w * sin);\n\n BufferedImage rotated = new BufferedImage(newWidth, newHeight, BufferedImage.TYPE_INT_ARGB);\n Graphics2D g2d = rotated.createGraphics();\n AffineTransform at = new AffineTransform();\n at.translate((newWidth - w) / 2D, (newHeight - h) / 2D);\n\n int x = w / 2;\n int y = h / 2;\n\n at.rotate(rads, x, y);\n g2d.setTransform(at);\n g2d.drawImage(img, 0, 0, null);\n return rotated;\n }",
"public static BufferedImage rotateCw( BufferedImage img ) {\n int width = img.getWidth();\n int height = img.getHeight();\n BufferedImage newImage = new BufferedImage( height, width, img.getType());\n\n for( int i=0 ; i < width ; i++ )\n for( int j=0 ; j < height ; j++ )\n newImage.setRGB( height-1-j, i, img.getRGB(i,j) );\n \n return newImage;\n }",
"public static BufferedImage rotate(BufferedImage bimg, double angle) {\t\t\n\t int w = bimg.getWidth(); \n\t int h = bimg.getHeight();\n\n\t BufferedImage rotated = new BufferedImage(w, h, bimg.getType()); \n\t Graphics2D graphic = rotated.createGraphics();\n\t graphic.rotate(Math.toRadians(angle), w/2, h/2);\n\t graphic.drawImage(bimg, null, 0, 0);\n\t graphic.dispose();\n\t return rotated;\n\t}",
"public static Bitmap rotateBitmap(Bitmap newImage) throws IOException {\n ByteArrayOutputStream stream = new ByteArrayOutputStream();\n newImage.compress(Bitmap.CompressFormat.JPEG, 100, stream);\n InputStream inputStream = new ByteArrayInputStream(stream.toByteArray());\n try {\n ExifInterface exif = new ExifInterface(inputStream);\n int orientation = exif.getAttributeInt(ExifInterface.TAG_ORIENTATION, 1);\n if (orientation == ExifInterface.ORIENTATION_ROTATE_90) {\n Matrix matrix = new Matrix();\n matrix.postRotate(90);\n Bitmap rotatedBitmap = Bitmap.createBitmap(newImage, 0, 0, newImage.getWidth(), newImage.getHeight(), matrix, true);\n return rotatedBitmap;\n } else {\n return newImage;\n }\n } catch (Exception e) {\n Log.e(\"Error getting image: \", e.toString());\n }\n return newImage;\n }",
"@Override\r\n\tpublic void rotar() {\n\r\n\t}",
"private void spinCompass(ImageView imageView, float angle){\n //Check that the angle is valid\n if (angle >= 0 || angle <= 360)\n imageView.setRotation(-angle + 180); //Flip and rotate the image to correspond to the actual angle\n\t}",
"public static Image rotate(Image img, double angle){\n\n\t\tif(!(img instanceof BufferedImage)){\n\t\t\tMainFrame.error(\"[Rotate]: Image is not a bufferedimage\");\n\t\t\treturn img;\n\t\t}\n\n\t\tdouble sin = Math.abs(Math.sin(Math.toRadians(angle)));\n\t\tdouble cos = Math.abs(Math.cos(Math.toRadians(angle)));\n\n\t\tint w = img.getWidth(null); \n\t\tint h = img.getHeight(null);\n\n\t\tint new_width = (int) Math.floor(w*cos + h*sin);\n\t\tint new_height = (int) Math.floor(h*cos + w*sin);\n\n\t\tBufferedImage buffered_img = new BufferedImage(new_width,new_height,BufferedImage.TYPE_INT_ARGB);\n\t\tGraphics2D g = buffered_img.createGraphics();\n\n\n\t\tg.translate((new_width-w)/2, (new_height-h)/2);\n\t\tg.rotate(Math.toRadians(angle), w/2, h/2);\n\t\tg.drawRenderedImage((BufferedImage)img, null);\n\t\tg.dispose();\n\n\t\treturn (Image)buffered_img;\n\t}",
"public static BufferedImage rotate90ToLeft(BufferedImage inputImage) {\n // The most of code is same as before\n int width = inputImage.getWidth();\n int height = inputImage.getHeight();\n BufferedImage returnImage = new BufferedImage(height, width,\n inputImage.getType());\n // We have to change the width and height because when you rotate the image\n // by 90 degree, the\n // width is height and height is width <img\n // src='http://forum.codecall.net/public/style_emoticons/<#EMO_DIR#>/smile.png'\n // class='bbc_emoticon' alt=':)' />\n\n for (int x = 0; x < width; x++) {\n for (int y = 0; y < height; y++) {\n returnImage.setRGB(y, width - x - 1, inputImage.getRGB(x, y));\n }\n }\n return returnImage;\n\n }",
"public static ImageIcon createRotatedImage(Component c, Icon icon, double rotatedAngle) {\n // convert rotatedAngle to a value from 0 to 360\n double originalAngle = rotatedAngle % 360;\n if (rotatedAngle != 0 && originalAngle == 0) {\n originalAngle = 360.0;\n }\n \n // convert originalAngle to a value from 0 to 90\n double angle = originalAngle % 90;\n if (originalAngle != 0.0 && angle == 0.0) {\n angle = 90.0;\n }\n \n double radian = Math.toRadians(angle);\n \n int iw = icon.getIconWidth();\n int ih = icon.getIconHeight();\n int w;\n int h;\n \n if ((originalAngle >= 0 && originalAngle <= 90) || (originalAngle > 180 && originalAngle <= 270)) {\n w = (int) (iw * Math.sin(DEGREE_90 - radian) + ih * Math.sin(radian));\n h = (int) (iw * Math.sin(radian) + ih * Math.sin(DEGREE_90 - radian));\n } else {\n w = (int) (ih * Math.sin(DEGREE_90 - radian) + iw * Math.sin(radian));\n h = (int) (ih * Math.sin(radian) + iw * Math.sin(DEGREE_90 - radian));\n }\n BufferedImage image = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB);\n Graphics g = image.getGraphics();\n Graphics2D g2d = (Graphics2D) g.create();\n \n // calculate the center of the icon.\n int cx = iw / 2;\n int cy = ih / 2;\n \n // move the graphics center point to the center of the icon.\n g2d.translate(w / 2, h / 2);\n \n // rotate the graphics about the center point of the icon\n g2d.rotate(Math.toRadians(originalAngle));\n \n g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);\n icon.paintIcon(c, g2d, -cx, -cy);\n \n g2d.dispose();\n return new ImageIcon(image);\n }",
"public void zRotate() {\n\t\t\n\t}",
"public void rotateClockWise() {\r\n\r\n transpose();\r\n\r\n // swap columns\r\n for (int col = 0; col < pixels[0].length / 2; col++) {\r\n for (int row = 0; row < pixels.length; row++) {\r\n int tmp = pixels[row][col];\r\n pixels[row][col] = pixels[row][pixels[0].length - 1 - col];\r\n pixels[row][pixels[0].length - 1 - col] = tmp;\r\n }\r\n }\r\n\r\n this.pix2img();\r\n }",
"void setImageProperty() {\n\t\t imgView.setImageResource(R.drawable.weathericon);\n\t\tMatrix matrix = new Matrix();\n\t\trotate += 30;\n\t\tif (rotate == 360) {\n\t\t\trotate = 0;\n\t\t}\n\t\tfloat centerX = imgView.getWidth() / 2;\n\t\tfloat centerY = imgView.getHeight() / 2;\n\t\tmatrix.setRotate(rotate, centerX, centerY);\n\t\t//matrix.setTranslate(10, 20);\n\t\timgView.setImageMatrix(matrix); \n\t\t//ScaleType type = ScaleType.\n\t\t\n\t\t//imgView.setScaleType(scaleType);\n\t \n\t}",
"private static Bitmap rotateImageIfRequired(Context context, Bitmap img, Uri selectedImage) throws IOException {\n ExifInterface ei;\n /*\n if (Build.VERSION.SDK_INT > 23)\n ei = new ExifInterface(input);\n else\n */\n ei = new ExifInterface(selectedImage.getPath());\n\n int orientation = ei.getAttributeInt(ExifInterface.TAG_ORIENTATION, ExifInterface.ORIENTATION_NORMAL);\n\n switch (orientation) {\n case ExifInterface.ORIENTATION_ROTATE_90:\n return rotateImage(img, 90);\n case ExifInterface.ORIENTATION_ROTATE_180:\n return rotateImage(img, 180);\n case ExifInterface.ORIENTATION_ROTATE_270:\n return rotateImage(img, 270);\n default:\n return img;\n }\n }",
"private void rotate() {\n byte tmp = topEdge;\n topEdge = leftEdge;\n leftEdge = botEdge;\n botEdge = rightEdge;\n rightEdge = tmp;\n tmp = reversedTopEdge;\n reversedTopEdge = reversedLeftEdge;\n reversedLeftEdge = reversedBotEdge;\n reversedBotEdge = reversedRightEdge;\n reversedRightEdge = tmp;\n tmp = ltCorner;\n ltCorner = lbCorner;\n lbCorner = rbCorner;\n rbCorner = rtCorner;\n rtCorner = tmp;\n\n }",
"@Override\n \t\t\t\tpublic void doRotateZ() {\n \n \t\t\t\t}",
"private void createRotatedImage(Graphics g, String text, Color bgColor, Color fgColor, int angle1) \n\t{\n\t double angle = (double)angle1 * radiansPerDegree;\n\t FontMetrics fm = g.getFontMetrics();\n\n\t int width = fm.stringWidth(text);\n\t int height = fm.getHeight();\n\t int ascent = fm.getMaxAscent();\n\t int leading = fm.getLeading();\n\t int verMarzin = (height+ascent+leading - height)/2;\n\t \n\t int h = verMarzin + ascent + leading;\n\n//\t /*\n//\t * Create the image.\n//\t */\n//\t destroyOffscreen();\n// if (OffscreenI == null)\n// {\n// createOffscreen(width + 8, height);\n// }\n// updateOffscreen(width + 8, height);\n//\t \n//\t //Image image = parent.getApplet().createImage(width + 8, height);\n//\t \n//\t /*\n//\t * Set graphics attributes and draw the string.\n//\t */\n//\t //Graphics gr = image.getGraphics();\n//\t OffscreenG.setColor(bgColor);\n//\t //OffscreenG.fillRect(0, 0, OffscreenI.getWidth(parent.getApplet()), OffscreenI.getHeight(parent.getApplet()));\n//\n//\t OffscreenG.setFont(g.getFont());\n//\t \n//\t OffscreenG.setColor(fgColor);\n//\t OffscreenG.drawString(text, 4, ascent + leading);\n\n\t /*\n\t * Create an imagefilter to rotate the image.\n\t */\n\t //ImageFilter filter = new RotateFilter(angle);\n\t \n\t /*\n\t * Produce the rotated image.\n\t */\n\t //ImageProducer producer = new FilteredImageSource(OffscreenI.getSource(), filter);\n\t /*\n\t * Create the rotated image.\n\t */\n\t // if (true) return image;\n\t //OffscreenI = parent.getApplet().createImage(producer);\n\n\t //return image;\n\t}",
"public void rotate(float angle);",
"Mat rotateMatCW(Mat src ) {\n Mat rotationMatrix = Imgproc.getRotationMatrix2D(new Point(src.cols()/2,src.rows()/2),270,1);\n\n //Rotating the given image\n Imgproc.warpAffine(src, result,rotationMatrix, new Size(src.cols(), src.rows()));\n return result;\n }",
"public void rotate() {\n\t\t\tfor(int i=0; i<4; i++)\n\t\t\t\tfor(int j=0; j<4; j++)\n\t\t\t\t\ttmp_grid[i][j] = squares[i][j];\n\t\t\t// copy back rotated 90 degrees\n\t\t\tfor(int i=0; i<4; i++)\n\t\t\t\tfor(int j=0; j<4; j++)\n\t\t\t\t\tsquares[j][i] = tmp_grid[i][3-j];\n \n //log rotation\n LogEvent(\"rotate\");\n\t\t}",
"public static void rotateAcw(RasterImage inputImage, RasterImage outputImage)\n\t{\n\t\tassert inputImage != null && outputImage != null && outputImage.getSize() == inputImage.getSize();\n\t\t\n\t\t\n\t\tif (inputImage == outputImage)\n\t\t{\n\t\t\tinputImage = new RasterImage(inputImage);\n\t\t}\n\t\t\n\t\toutputImage.resize(inputImage.getHeight(), inputImage.getWidth());\n\t\t\n\t\tint newY;\n\t\t\n\t\tfor (int i = 0; i < inputImage.getHeight(); i++)\n\t\t{\n\t\t\tfor (int j = 0; j < inputImage.getWidth(); j++)\n\t\t\t{\n\t\t\t\tnewY = inputImage.getWidth() - j - 1;\n\t\t\t\toutputImage.setRgb(i, newY, inputImage.getRgb(j, i));\n\t\t\t}\n\t\t}\n\t}",
"public static BufferedImage rotateCCW (BufferedImage bi)\n {\n imageList.add(deepCopy(bi)); // add the image to the undo list\n int xSize = bi.getWidth();\n int ySize = bi.getHeight();\n\n BufferedImage newBi = new BufferedImage (ySize, xSize, 1); // switch the height and width of the new image\n for (int x = 0; x < xSize; x++)\n {\n for (int y = 0; y < ySize; y++)\n {\n int rgb = bi.getRGB(x,y); \n newBi.setRGB(y,xSize-x-1,rgb); // rotates the image\n }\n }\n redoList.add(deepCopy(newBi)); // add the image to the redo list\n return newBi; // return the new rotated image\n }",
"@Override\n \t\t\t\tpublic void doRotateY() {\n \n \t\t\t\t}",
"private static Bitmap rotateImageIfRequired(Context context, Bitmap img, Uri selectedImage) throws IOException {\n\n InputStream input = context.getContentResolver().openInputStream(selectedImage);\n ExifInterface ei;\n if (Build.VERSION.SDK_INT > 23)\n ei = new ExifInterface(input);\n else\n ei = new ExifInterface(selectedImage.getPath());\n\n int orientation = ei.getAttributeInt(ExifInterface.TAG_ORIENTATION, ExifInterface.ORIENTATION_NORMAL);\n\n switch (orientation) {\n case ExifInterface.ORIENTATION_ROTATE_90:\n return rotateImage(img, 90);\n case ExifInterface.ORIENTATION_ROTATE_180:\n return rotateImage(img, 180);\n case ExifInterface.ORIENTATION_ROTATE_270:\n return rotateImage(img, 270);\n default:\n return img;\n }\n }",
"protected void rotateImage(int degrees) {\n mCropImageView.rotateImage(degrees);\n }",
"public Image getRotatedImage(double angle, Component obs) {\n Image rotated = getCachedUnrotatedImage(angle);\n if (unrotated.isChanged()) {\n clearCachedImages();\n rotated = null;\n }\n if (rotated == null) {\n Rectangle rotatedBounds;\n Rectangle unrotatedBounds = piece.boundingBox();\n rotatedBounds = boundingBox();\n if (rotatedBounds.width > 0 && rotatedBounds.height > 0) {\n rotated = new BufferedImage(rotatedBounds.width,\n rotatedBounds.height,\n BufferedImage.TYPE_4BYTE_ABGR);\n ((BufferedImage) rotated).setRGB(0, 0,\n rotatedBounds.width,\n rotatedBounds.height,\n new int[rotatedBounds.width * rotatedBounds.height], 0,\n rotatedBounds.width);\n Graphics2D g2d = ((BufferedImage) rotated).createGraphics();\n g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION,\n RenderingHints.VALUE_INTERPOLATION_BILINEAR);\n AffineTransform t = AffineTransform\n .getTranslateInstance(-rotatedBounds.x, -rotatedBounds.y);\n t.rotate(-PI_180 * angle, centerX(), centerY()); \n t.translate(unrotatedBounds.x, unrotatedBounds.y);\n \n g2d.drawImage(unrotated.getImage(obs), t, obs);\n }\n else {\n RotateFilter filter = new RotateFilter(angle);\n rotatedBounds = piece.boundingBox();\n filter.transformSpace(rotatedBounds);\n ImageProducer producer =\n new FilteredImageSource(unrotated.getImage(obs).getSource(), filter);\n rotated = obs.createImage(producer);\n }\n images.put(new Double(angle), rotated);\n bounds.put(new Double(angle), rotatedBounds);\n }\n return rotated;\n }",
"public static BufferedImage rotateCW (BufferedImage bi)\n {\n imageList.add(deepCopy(bi)); // add the image to the undo list\n int xSize = bi.getWidth(); \n int ySize = bi.getHeight();\n\n BufferedImage newBi = new BufferedImage (ySize, xSize, 1); // switch the height and width of the new image\n for (int x = 0; x < xSize; x++)\n {\n for (int y = 0; y < ySize; y++)\n {\n int rgb = bi.getRGB(x,y); \n newBi.setRGB(ySize-y-1,x,rgb); // rotates the image\n }\n }\n\n redoList.add(deepCopy(newBi)); // add the image to the redo list\n return newBi; // return the new rotated image\n\n }",
"public MutableImage rotateLeft() {\n return rotate(-90);\n }",
"public @NotNull Image rotateCCW()\n {\n if (this.data != null)\n {\n if (this.mipmaps > 1) Image.LOGGER.warning(\"Image manipulation only applied to base mipmap level\");\n \n Color.Buffer output = Color.malloc(this.format, this.width * this.height);\n \n long srcPtr = this.data.address();\n long dstPtr = output.address();\n \n for (int y = 0; y < this.height; y++)\n {\n for (int x = 0; x < this.width; x++)\n {\n long src = Integer.toUnsignedLong(y * this.width + this.width - x - 1) * this.format.sizeof;\n long dst = Integer.toUnsignedLong(x * this.height + y) * this.format.sizeof;\n \n MemoryUtil.memCopy(srcPtr + src, dstPtr + dst, this.format.sizeof);\n }\n }\n \n this.data.free();\n this.data = output;\n }\n return this;\n }",
"@Override\r\n public void drawImage(Graphics g) {\r\n AffineTransform rotation = AffineTransform.getTranslateInstance(this.collider.x, this.collider.y);\r\n rotation.rotate(Math.toRadians(this.rotation), this.collider.width / 2.0, this.collider.height / 2.0);\r\n Graphics2D g2d = (Graphics2D) g;\r\n g2d.drawImage(this.sprite, rotation, null);\r\n }",
"private void rotate(int direction){\n\t\t//Gdx.app.debug(TAG, \"rotating, this.x: \" + this.x + \", this.y: \" + this.y);\n\t\tif (direction == 1 || direction == -1){\n\t\t\tthis.orientation = (this.orientation + (direction*-1) + 4) % 4;\n\t\t\t//this.orientation = (this.orientation + direction) % 4;\n\t\t} else{\n\t\t\tthrow new RuntimeException(\"Tile invalid direction\");\n\t\t}\n\t}",
"public MutableImage rotateRight() {\n return rotate(90);\n }",
"public void paint(Graphics g){\n\t\tGraphics2D g2d = (Graphics2D)g;\n\t\tg2d.rotate(angle, x + img.getWidth(null) / 2, y + img.getHeight(null)\n\t\t\t\t/ 2);\n\t\tg2d.drawImage(img, (int)x, (int)y, null);\n\t\tg2d.rotate(-angle, x + img.getWidth(null) / 2, y + img.getHeight(null)\n\t\t\t\t/ 2);\n\t}",
"private void rotateView(Canvas paramCanvas) {\n float degree = mDistance / 3f;\n paramCanvas.rotate(-degree, this.getWidth() / 2, this.getHeight() / 2);\n paramCanvas.drawBitmap(mBmp, this.getWidth() / 2 - mBmp.getWidth() / 2, this.getHeight()\n / 2 - mBmp.getHeight() / 2, mTxtPaint);\n }",
"public abstract void rotar();",
"private Bitmap rotateBitmapOrientation(String photoFilePath) {\n BitmapFactory.Options bounds = new BitmapFactory.Options();\n bounds.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(photoFilePath, bounds);\n BitmapFactory.Options opts = new BitmapFactory.Options();\n Bitmap bm = BitmapFactory.decodeFile(photoFilePath, opts);\n // Read EXIF Data\n ExifInterface exif = null;\n try {\n exif = new ExifInterface(photoFilePath);\n } catch (IOException e) {\n e.printStackTrace();\n }\n String orientString = exif.getAttribute(ExifInterface.TAG_ORIENTATION);\n int orientation = orientString != null ? Integer.parseInt(orientString) : ExifInterface.ORIENTATION_NORMAL;\n int rotationAngle = 0;\n if (orientation == ExifInterface.ORIENTATION_ROTATE_90) rotationAngle = 90;\n if (orientation == ExifInterface.ORIENTATION_ROTATE_180) rotationAngle = 180;\n if (orientation == ExifInterface.ORIENTATION_ROTATE_270) rotationAngle = 270;\n // Rotate Bitmap\n Matrix matrix = new Matrix();\n matrix.setRotate(rotationAngle, (float) bm.getWidth() / 2, (float) bm.getHeight() / 2);\n Bitmap rotatedBitmap = Bitmap.createBitmap(bm, 0, 0, bounds.outWidth, bounds.outHeight, matrix, true);\n // Return result\n return rotatedBitmap;\n }",
"@Override\r\n\t\t\tpublic void onClick(View v) {\n\r\n\t\t\t\timgfinalImage.setImageBitmap(rotateImage(RateItScreen.bmp, \"Left\"));\r\n\r\n\t\t\t}",
"LocalMaterialData rotate();",
"public void rotate(Point P, int rotation) {\n\n\n }",
"public abstract void rotateLeft();",
"public void SideDog(){\n imageView.clearAnimation();\n Picasso.get()\n .load(url)\n .rotate(90)\n .into(imageView);\n }",
"void rotate () {\n final int rows = currentPiece.height;\n final int columns = currentPiece.width;\n int[][] rotated = new int[columns][rows];\n\n for (int i = 0; i < rows; i++)\n for (int j = 0; j < columns; j++)\n rotated[j][i] = currentPiece.blocks[i][columns - 1 - j];\n\n Piece rotatedPiece = new Piece(currentPiece.color, rotated);\n int kicks[][] = {\n {0, 0},\n {0, 1},\n {0, -1},\n //{0, -2},\n //{0, 2},\n {1, 0},\n //{-1, 0},\n {1, 1},\n //{-1, 1},\n {1, -1},\n //{-1, -1},\n };\n for (int kick[] : kicks) {\n if (canMove(currentRow + kick[0], currentColumn + kick[1], rotatedPiece)) {\n //System.out.println(\"Kicking \" + kick[0] + \", \" + kick[1]);\n currentPiece = rotatedPiece;\n currentRow += kick[0];\n currentColumn += kick[1];\n updateView();\n break;\n }\n }\n }",
"private Bitmap fixOrientation(Bitmap bitmap) {\n if (bitmap == null) {\n return null;\n }\n\n ExifInterface exif = null;\n try {\n exif = new ExifInterface(currentPhotoPath);\n } catch (IOException e) {\n e.printStackTrace();\n }\n int orientation = exif.getAttributeInt(ExifInterface.TAG_ORIENTATION, ExifInterface.ORIENTATION_UNDEFINED);\n\n Matrix matrix = new Matrix();\n switch (orientation) {\n case ExifInterface.ORIENTATION_ROTATE_90:\n matrix.postRotate(90);\n break;\n case ExifInterface.ORIENTATION_ROTATE_180:\n matrix.postRotate(180);\n break;\n case ExifInterface.ORIENTATION_ROTATE_270:\n matrix.postRotate(270);\n break;\n default:\n break;\n }\n bitmap = Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), matrix, true);\n return bitmap;\n }",
"public double getRotation();",
"public void calculateAngleAndRotate(){\n\t\tdouble cumarea = 0;\n\t\tdouble sina = 0;\n\t\tdouble cosa = 0;\n\t\tdouble area, angle;\n\t\tfor (int n = 0; n < rt.size();n++) {\n\t\t\tarea = rt.getValueAsDouble(rt.getColumnIndex(\"Area\"),n);\n\t\t\tangle = 2*rt.getValueAsDouble(rt.getColumnIndex(\"Angle\"),n);\n\t\t\tsina = sina + area*Math.sin(angle*Math.PI/180);\n\t\t\tcosa = cosa + area*Math.cos(angle*Math.PI/180);\n\t\t\tcumarea = cumarea+area;\n\t\t}\n\t\taverageangle = Math.abs(0.5*(180/Math.PI)*Math.atan2(sina/cumarea,cosa/cumarea)); // this is the area weighted average angle\n\t\t// rotate the data \n\t\tIJ.run(ActiveImage,\"Select All\",\"\");\n\t\tActiveImageConverter.convertToGray32();\n\t\tIJ.run(ActiveImage,\"Macro...\", \"code=[v= x*sin(PI/180*\"+averageangle+\")+y*cos(PI/180*\"+averageangle+\")]\");\n\t\treturn;\n\t}",
"private void rotateEffect(int barra) {\n int val = barra;\n EffectFactory factory = effectContext.getFactory();\n effect = factory.createEffect(EffectFactory.EFFECT_ROTATE);\n effect.setParameter(\"angle\", val);\n effect.apply(textures[0], photoWidth, photoHeight, textures[1]);\n }",
"private static Bitmap rotateBitmap(Bitmap bitmap, float angle) {\n Matrix matrix = new Matrix();\n matrix.postRotate(angle);\n return Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(),\n matrix, true);\n }",
"private Bitmap flipImage(byte[] input, FileOutputStream fos){\n\n\t\t\t\tMatrix rotate_matrix = new Matrix();\n\t\t\t\trotate_matrix.preScale(-1.0f, 1.0f);\n\t\t\t\tBitmapFactory bmf = new BitmapFactory();\n\t\t\t\tBitmap raw_bitmap = bmf.decodeByteArray(input, 0, input.length);\n\t\t\t\tBitmap result = Bitmap.createBitmap(raw_bitmap, 0, 0, raw_bitmap.getWidth(), raw_bitmap.getHeight(), rotate_matrix, true);\n\t\t\t\treturn result;\n\t\t\t\t/*\n\t\t\t\tresult.compress(Bitmap.CompressFormat.JPEG, 90, fos);\n\t\t\t\ttry {\n\t\t\t\t\tfos.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t*/\n\t\t\t}",
"@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\timgfinalImage.setImageBitmap(rotateImage(RateItScreen.bmp, \"Right\"));\r\n\t\t\t}",
"private void applyTransform() {\n GlStateManager.rotate(180, 1.0F, 0.0F, 0.0F);\n GlStateManager.translate(offsetX, offsetY - 26, offsetZ);\n }",
"@Override\n\tprotected void onDraw(Canvas canvas) {\n\t\tint hieght=this.getHeight();\n\t\tint width=this.getWidth();\n\t\tcanvas.rotate(direction, width/2,hieght/2);\n\t\t\n\t\tsuper.onDraw(canvas);\n\t\t\n\t\t\n\t}",
"public @NotNull Image rotateCW()\n {\n if (this.data != null)\n {\n if (this.mipmaps > 1) Image.LOGGER.warning(\"Image manipulation only applied to base mipmap level\");\n \n Color.Buffer output = Color.malloc(this.format, this.width * this.height);\n \n long srcPtr = this.data.address();\n long dstPtr = output.address();\n \n for (int y = 0; y < this.height; y++)\n {\n for (int x = 0; x < this.width; x++)\n {\n long src = Integer.toUnsignedLong(y * this.width + x) * this.format.sizeof;\n long dst = Integer.toUnsignedLong(x * this.height + this.height - y - 1) * this.format.sizeof;\n \n MemoryUtil.memCopy(srcPtr + src, dstPtr + dst, this.format.sizeof);\n }\n }\n \n this.data.free();\n this.data = output;\n }\n return this;\n }",
"public static BufferedImage rotate90ToRight(BufferedImage inputImage) {\n int width = inputImage.getWidth();\n int height = inputImage.getHeight();\n BufferedImage returnImage = new BufferedImage(height, width,\n inputImage.getType());\n\n for (int x = 0; x < width; x++) {\n for (int y = 0; y < height; y++) {\n returnImage.setRGB(height - y - 1, x, inputImage.getRGB(x, y));\n }\n }\n return returnImage;\n }",
"public void rotateRight(Image im, int x, int y, int pixels, GraphicsContext gc2) {\n //permite que la imagen se pueda editar\n imageView = new ImageView(im);\n //selecciona el bloque que se va a rotar\n snapshot.setViewport(new Rectangle2D(x, y, pixels, pixels));\n im = imageView.snapshot(snapshot, null);\n imageView.setImage(im);\n //rota la imagen\n imageView.setRotate(imageView.getRotate() + 90);\n\n //coloca la imagen en el mismo lugar donde fue seleccionada\n SnapshotParameters params = new SnapshotParameters();\n params.setFill(Color.TRANSPARENT);\n Image rotatedImage = imageView.snapshot(params, null);\n gc2.drawImage(rotatedImage, x, y);\n\n imagePiece = null;\n imageView = null;\n }",
"public static void showImage(Stage primaryStage) {\n Pane pane = new HBox(10);\n pane.setPadding(new Insets(5, 5, 5, 5));\n Image image = new Image(\"image/us.gif\"); //load image from file\n pane.getChildren().add(new ImageView(image));\n\n ImageView imageView2 = new ImageView(image);\n imageView2.setFitHeight(100);\n imageView2.setFitWidth(100);\n pane.getChildren().add(imageView2);\n\n ImageView imageView3 = new ImageView(image);\n imageView3.setRotate(90);\n pane.getChildren().add(imageView3);\n\n // Create a scene and place it in the stage\n Scene scene = new Scene(pane);\n primaryStage.setTitle(\"ShowImage\"); // Set the stage title\n primaryStage.setScene(scene); // Place the scene in the stage\n primaryStage.show(); // Display the stage\n }",
"public abstract BufferedImage transform();",
"private void reanderImage(ImageData data) {\n \n }",
"int[][] rotate(int[][] image) {\n if(image.length != image[0].length) {\n throw new IllegalArgumentException();\n }\n // can assume the image is square matrix.\n int dimension = image.length;\n for(int i=0;i< dimension; i++) {\n for(int j=i;j<dimension;j++) {\n int temp = image[j][i];\n image[j][i] = image[i][j];\n image[i][j] = temp;\n }\n }\n return image;\n }",
"public void rotateShip(){\n if (this.orientation == false){\n this.orientation = true;\n }else\n orientation = false;\n \n return;\n }",
"public void rotateCCW(){\n rotState = (rotState + 3) % 4;\n for (int i = 0; i < tiles.length; ++i){\n tiles[i] = new Point(tiles[i].y , -tiles[i].x);\n }\n }",
"void rotate() {\n startAnimation(allSubCubes(), Axis.Y, Direction.CLOCKWISE);\n rotateCubeSwap();\n }",
"public BufferedImage getRotatedImage (BufferedImage src, int angle)\n\t{\n\t\tif (src == null)\n\t\t{\n\t\t\tSystem.out.println (\"getRotatedImage: input image is null\");\n\t\t\treturn null;\n\t\t} // end if\n\n\t\tint transparency = src.getColorModel ().getTransparency ();\n\t\tBufferedImage dest = gc.createCompatibleImage (src.getWidth (), src.getHeight (), transparency);\n\t\tGraphics2D g2d = dest.createGraphics ();\n\n\t\tAffineTransform origAT = g2d.getTransform (); // save original transform\n\n\t\t// rotate the coord. system of the dest. image around its center\n\t\tAffineTransform rot = new AffineTransform ();\n\t\trot.rotate (Math.toRadians (angle), src.getWidth () / 2, src.getHeight () / 2);\n\t\tg2d.transform (rot);\n\n\t\tg2d.drawImage (src, 0, 0, null); // copy in the image\n\n\t\tg2d.setTransform (origAT); // restore original transform\n\t\tg2d.dispose ();\n\n\t\treturn dest;\n\t}",
"@Override\n public void draw(SpriteBatch batch) {\n batch.draw(image, //texture region\n position.x - (width / 2f), position.y - (height / 2f), //position\n width / 2, height / 2, //origin of rotation\n width, height, //size of region\n 0.5f, 0.5f, //scaling\n rotation); //rotation\n }",
"public void paintComponent(Graphics gr)\n\t{\n Graphics2D g2d = (Graphics2D)gr;\n\n // Rotate the image\n g2d.rotate(Math.toRadians(rotationAngle),\n img.getWidth()/2, img.getHeight()/2);\n\n\t\tif ((img != null) && (selection != null))\n\t\t{\n // Declare variables\n int dx1 = selection.x;\n int dy1 = selection.y;\n int dx2 = selection.x + selection.width;\n int dy2 = selection.y + selection.height;\n\n // Draw the image\n\t\t\tg2d.drawImage(img,\n dx1, //dx1\n dy1, //dy1\n dx2, //dx2\n dy2, //dy2\n 0, //sx1\n 0, //sy1\n img.getWidth(), //sx2\n img.getHeight(), //sy2\n this);\n\t\t}\n\t}",
"public void rotateLeft(Image im, int x, int y, int pixels, GraphicsContext gc2) {\n //permite que la imagen se pueda editar\n imageView = new ImageView(im);\n //selecciona el bloque que se va a rotar\n snapshot.setViewport(new Rectangle2D(x, y, pixels, pixels));\n im = imageView.snapshot(snapshot, null);\n imageView.setImage(im);\n //rota la imagen\n imageView.setRotate(imageView.getRotate() - 90);\n\n //coloca la imagen en el mismo lugar donde fue seleccionada\n SnapshotParameters params = new SnapshotParameters();\n params.setFill(Color.TRANSPARENT);\n Image rotatedImage = imageView.snapshot(params, null);\n gc2.drawImage(rotatedImage, x, y);\n\n imagePiece = null;\n imageView = null;\n }",
"private static void rotate(GraphicsContext gc, double angle, double px, double py) {\n Rotate r = new Rotate(angle, px, py);\n gc.setTransform(r.getMxx(), r.getMyx(), r.getMxy(), r.getMyy(), r.getTx(), r.getTy());\n }",
"public void rotate() {\n\t\tclearPiece();\n\t\trotateFirstBlock();\n\t\trotateSecondBlock();\n\t\trotateFourthBlock();\n\t\tsetPiece();\n\t\trepaint();\n\t}",
"public static BufferedImage getRotatedImage(BufferedImage inputImage,\n int rotation) {\n BufferedImage result = inputImage;\n switch (rotation) {\n case 90:\n result = rotate90ToRight(result);\n break;\n case 180:\n result = rotate180(result);\n break;\n case 270:\n result = rotate90ToLeft(result);\n break;\n }\n return result;\n }",
"private void renderImage(double tx, double ty, BufferedImage img, int size, double rotation) {\n if (LOGGER.isLoggable(Level.FINEST)) {\n LOGGER.finest(\"drawing Image @\" + tx + \",\" + ty);\n }\n \n AffineTransform temp = graphics.getTransform();\n AffineTransform markAT = new AffineTransform();\n Point2D mapCentre = new java.awt.geom.Point2D.Double(tx, ty);\n Point2D graphicCentre = new java.awt.geom.Point2D.Double();\n temp.transform(mapCentre, graphicCentre);\n markAT.translate(graphicCentre.getX(), graphicCentre.getY());\n \n double shearY = temp.getShearY();\n double scaleY = temp.getScaleY();\n \n double originalRotation = Math.atan(shearY / scaleY);\n \n if (LOGGER.isLoggable(Level.FINER)) {\n LOGGER.finer(\"originalRotation \" + originalRotation);\n }\n \n markAT.rotate(rotation - originalRotation);\n \n double unitSize = Math.max(img.getWidth(), img.getHeight());\n \n double drawSize = (double) size / unitSize;\n \n if (LOGGER.isLoggable(Level.FINER)) {\n LOGGER.finer(\"unitsize \" + unitSize + \" size = \" + size + \" -> scale \" + drawSize);\n }\n \n markAT.scale(drawSize, drawSize);\n graphics.setTransform(markAT);\n \n // we moved the origin to the centre of the image.\n graphics.drawImage(img, -img.getWidth() / 2, -img.getHeight() / 2, obs);\n \n graphics.setTransform(temp);\n \n return;\n }",
"public abstract void rotateRight();",
"public static Bitmap RotateBitmap(Bitmap source, float angle)\n\t{\n\t Matrix matrix = new Matrix();\n\t matrix.postRotate(angle);\n\t return Bitmap.createBitmap(source, 0, 0, source.getWidth(), source.getHeight(), matrix, true);\n\t}",
"private void rotate(final MouseEvent event) {\r\n\r\n\t\t// reset transform3D\r\n\t\tthis.rotation.rotY(0);\r\n\r\n\t\t// rotate around y-axis\r\n\t\tif (super.x_last - event.getPoint().x > 0) {\r\n\t\t\t// rotate leftwards\r\n\t\t\tthis.rotation.rotY(this.angle);\r\n\t\t} else {\r\n\t\t\t// rotate rightwards\r\n\t\t\tthis.rotation.rotY(-this.angle);\r\n\t\t}\r\n\r\n\t\t// apply rotation\r\n\t\tsuper.transformGroup.getTransform(this.transform);\r\n\t\tthis.transform.mul(this.rotation);\r\n\t\tsuper.transformGroup.setTransform(this.transform);\r\n\t}",
"public void Rotation(int i) {\n mRender.Rotation(i);\n }",
"public Bitmap rotateBitmapOrientation(String file) {\n\t BitmapFactory.Options bounds = new BitmapFactory.Options();\n\t bounds.inJustDecodeBounds = true;\n\t BitmapFactory.decodeFile(file, bounds);\n\t BitmapFactory.Options opts = new BitmapFactory.Options();\n\t Bitmap bm = BitmapFactory.decodeFile(file, opts);\n\t CameraPreview cp = (CameraPreview) findViewById(R.id.camera_preview);\n\t bm = Bitmap.createScaledBitmap(bm, cp.getWidth(), cp.getHeight(), true);\n\t // Read EXIF Data\n\t ExifInterface exif;\n\t\ttry {\n\t\t\texif = new ExifInterface(file);\n\t\t String orientString = exif.getAttribute(ExifInterface.TAG_ORIENTATION);\n\t\t int orientation = orientString != null ? Integer.parseInt(orientString) : ExifInterface.ORIENTATION_NORMAL;\n\t\t int rotationAngle = 0;\n\t\t if (orientation == ExifInterface.ORIENTATION_ROTATE_90) rotationAngle = 90;\n\t\t if (orientation == ExifInterface.ORIENTATION_ROTATE_180) rotationAngle = 180;\n\t\t if (orientation == ExifInterface.ORIENTATION_ROTATE_270) rotationAngle = 270;\n\t\t // Rotate Bitmap\n\t\t Matrix matrix = new Matrix();\n\t\t matrix.setRotate(rotationAngle, (float) bm.getWidth() / 2, (float) bm.getHeight() / 2);\n\t\t Bitmap rotatedBitmap = Bitmap.createBitmap(bm, 0, 0, cp.getWidth(), cp.getHeight(), matrix, true);\n\t\t // Return result\n\t\t return rotatedBitmap;\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}",
"@Override\n public void reAngle() {\n }",
"public static void rotateCw(RasterImage inputImage, RasterImage outputImage)\n\t{\n\t\tassert outputImage.getSize() == inputImage.getSize();\n\t\t\n\t\t\n\t\tif (inputImage == outputImage)\n\t\t{\n\t\t\tinputImage = new RasterImage(inputImage);\n\t\t}\n\t\t\n\t\toutputImage.resize(inputImage.getHeight(), inputImage.getWidth());\n\t\t\n\t\tint newX;\n\t\t\n\t\tfor (int i = 0; i < inputImage.getHeight(); i++)\n\t\t{\n\t\t\tnewX = inputImage.getHeight() - i - 1;\n\t\t\t\n\t\t\tfor (int j = 0; j < inputImage.getWidth(); j++)\n\t\t\t{\n\t\t\t\toutputImage.setRgb(newX, j, inputImage.getRgb(j, i));\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public void rotate(double angle) {\n graphicsEnvironmentImpl.rotate(canvas, angle);\n }"
] | [
"0.74415946",
"0.7392443",
"0.7371154",
"0.7274586",
"0.7193486",
"0.71719843",
"0.7113016",
"0.7065193",
"0.70307845",
"0.6987983",
"0.6963983",
"0.6930758",
"0.68984324",
"0.689603",
"0.682967",
"0.68148845",
"0.68006086",
"0.6792381",
"0.6772762",
"0.6739701",
"0.67185134",
"0.6701154",
"0.6675287",
"0.66728514",
"0.66685694",
"0.6666635",
"0.6662712",
"0.66533154",
"0.66474354",
"0.6636503",
"0.6631744",
"0.66309255",
"0.66199946",
"0.6611263",
"0.66018593",
"0.6574477",
"0.6551404",
"0.6550674",
"0.6525594",
"0.6525262",
"0.6468181",
"0.6464426",
"0.6457199",
"0.6441708",
"0.6426719",
"0.64173293",
"0.6384556",
"0.63797057",
"0.6348369",
"0.63413084",
"0.63213813",
"0.6306098",
"0.6304363",
"0.62895995",
"0.6287396",
"0.62847507",
"0.627683",
"0.62750614",
"0.6266595",
"0.6263187",
"0.6262729",
"0.62511355",
"0.6247348",
"0.6240738",
"0.62246925",
"0.6216296",
"0.6214967",
"0.6211122",
"0.6204197",
"0.62013996",
"0.6181053",
"0.61710304",
"0.6162679",
"0.615942",
"0.6153525",
"0.6137849",
"0.61258346",
"0.6120166",
"0.6111663",
"0.6103497",
"0.6093726",
"0.60845494",
"0.60822034",
"0.6073677",
"0.6070834",
"0.60600775",
"0.6054445",
"0.60514355",
"0.6049715",
"0.6047823",
"0.6043559",
"0.6037595",
"0.6006991",
"0.5989542",
"0.5983527",
"0.5983016",
"0.5978815",
"0.59777904",
"0.5973314",
"0.5968671"
] | 0.61250144 | 77 |
This is used for flip image | static Bitmap flip(Bitmap bitmap, boolean horizontal, boolean vertical) {
Matrix matrix = new Matrix();
matrix.preScale(horizontal ? -1 : 1, vertical ? -1 : 1);
return Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), matrix, true);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public native MagickImage flipImage() throws MagickException;",
"public void flip(){\n Matrix mirrorMatrix = new Matrix();\n mirrorMatrix.preScale(-1, 1);\n Bitmap turnMap = Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), mirrorMatrix, false);\n turnMap.setDensity(DisplayMetrics.DENSITY_DEFAULT);\n bitmap = new BitmapDrawable(turnMap).getBitmap();\n }",
"public void flip() {\r\n \tif (flip != 0) {\r\n \t\tflipValue = -1;\r\n \t\tflipReposition = frameWidth;\r\n \t} else {\r\n \t\tflipValue = 1;\r\n \t\tflipReposition = 0;\r\n \t}\r\n }",
"public void flip() {\n\t\t\tif (showing.getImage() == faceUp) {\n\t\t\t\tshowing.setImage(FACE_DOWN);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tshowing.setImage(faceUp);\n\t\t\t}\n\t\t}",
"public void reverseFrame() {\r\n if (reversedImage) {\r\n reversedImage = false;\r\n } else {\r\n reversedImage = true;\r\n }\r\n }",
"void flip() {\n _flipped = !_flipped;\n }",
"public PImage flipVH(PImage img)\n {\n PImage flipped = createImage(img.width,img.height,RGB);\n flipped.loadPixels();\n for(int i = 0; i < img.width; i++)\n {\n for(int j = 0; j < img.height; j++)\n {\n int loc = i + j * flipped.width;\n int locFlipped = (img.width-i-1) + (img.height-j-1) * flipped.width;\n if(img.pixels[loc] == color(0,0,0))\n {\n flipped.pixels[locFlipped] = color(0,0,0);\n }\n else\n {\n flipped.pixels[locFlipped] = color(255,255,255);\n }\n }\n }\n flipped.updatePixels();\n return flipped;\n }",
"public void flip() {\n float tx = x1;\n float ty = y1;\n x1 = x2;\n y1 = y2;\n x2 = tx;\n y2 = ty;\n nx = -nx;\n ny = -ny;\n }",
"private Bitmap flipImage(byte[] input, FileOutputStream fos){\n\n\t\t\t\tMatrix rotate_matrix = new Matrix();\n\t\t\t\trotate_matrix.preScale(-1.0f, 1.0f);\n\t\t\t\tBitmapFactory bmf = new BitmapFactory();\n\t\t\t\tBitmap raw_bitmap = bmf.decodeByteArray(input, 0, input.length);\n\t\t\t\tBitmap result = Bitmap.createBitmap(raw_bitmap, 0, 0, raw_bitmap.getWidth(), raw_bitmap.getHeight(), rotate_matrix, true);\n\t\t\t\treturn result;\n\t\t\t\t/*\n\t\t\t\tresult.compress(Bitmap.CompressFormat.JPEG, 90, fos);\n\t\t\t\ttry {\n\t\t\t\t\tfos.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t*/\n\t\t\t}",
"public void flip(){\n this.faceDown = !this.faceDown;\n }",
"public void flipV() {\r\n int tmp, sym;\r\n for (int col = 0; col < pixels.length; ++col) {\r\n for (int row = 0; row < pixels[col].length / 2; ++row) {\r\n // find the column index of the vertically symmetric pixel\r\n sym = pixels[col].length - 1 - row;\r\n // swap the pixel value between the two\r\n tmp = pixels[col][row];\r\n pixels[col][row] = pixels[col][sym];\r\n pixels[col][sym] = tmp;\r\n }\r\n }\r\n this.pix2img();\r\n }",
"public void flipH() {\r\n int tmp, sym;\r\n for (int row = 0; row < pixels.length; ++row) {\r\n for (int col = 0; col < pixels[row].length / 2; ++col) {\r\n // find the column index of the horizontally symmetric pixel\r\n sym = pixels[row].length - 1 - col;\r\n // swap the pixel value between the two\r\n tmp = pixels[row][col];\r\n pixels[row][col] = pixels[row][sym];\r\n pixels[row][sym] = tmp;\r\n }\r\n }\r\n this.pix2img();\r\n }",
"public @NotNull Image flipV()\n {\n if (this.data != null)\n {\n if (this.mipmaps > 1) Image.LOGGER.warning(\"Image manipulation only applied to base mipmap level\");\n \n Color.Buffer output = Color.malloc(this.format, this.width * this.height);\n \n long srcPtr = this.data.address();\n long dstPtr = output.address();\n \n long bytesPerLine = Integer.toUnsignedLong(this.width) * this.format.sizeof;\n for (int i = this.height - 1, offsetSize = 0; i >= 0; i--)\n {\n long src = srcPtr + Integer.toUnsignedLong(i * this.width) * this.format.sizeof;\n \n MemoryUtil.memCopy(src, dstPtr + offsetSize, bytesPerLine);\n offsetSize += bytesPerLine;\n }\n \n this.data.free();\n this.data = output;\n this.mipmaps = 1;\n }\n return this;\n }",
"private void flipArrow() {\n arrow.setRotation(0);\n arrow.setScaleX(-1);\n arrow.setRotation(50);\n }",
"private void flip()\r\n\t{\r\n\t\tif(heading == Direction.WEST)\r\n\t\t{\r\n\t\t\tsetDirection(Direction.EAST);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tsetDirection(Direction.WEST);\r\n\t\t}\r\n\t}",
"public static void flipVertical (BufferedImage bi)\n {\n imageList.add(deepCopy(bi)); // add the image to the undo list\n int xSize = bi.getWidth();\n int ySize = bi.getHeight();\n\n // Temp image, to store pixels as we reverse everything\n BufferedImage newBi = new BufferedImage (xSize, ySize, 3); \n\n for (int i = 0; i < xSize; i++)\n {\n for (int j = 0; j< ySize; j++)\n {\n int rgb = bi.getRGB(i,j);\n newBi.setRGB(i,ySize-j-1, rgb); //flip the pixels\n }\n }\n for (int i = 0; i < xSize; i++)\n {\n for (int j = 0; j< ySize; j++)\n {\n bi.setRGB(i,j,newBi.getRGB(i,j)); // set each pixel of the original image \n }\n }\n redoList.add(deepCopy(bi)); // add the new image to the redo list\n }",
"public void flipCard() {\n this.faceUp = !faceUp;\n }",
"@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\timgfinalImage.setImageBitmap(flipImage(RateItScreen.bmp, \"Vertical\"));\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\timgfinalImage.setImageBitmap(flipImage(RateItScreen.bmp, \"Horizontal\"));\r\n\t\t\t}",
"public static void flipHorizontal (BufferedImage bi)\n {\n imageList.add(deepCopy(bi)); // add the image to the undo list\n int xSize = bi.getWidth();\n int ySize = bi.getHeight();\n\n // Temp image, to store pixels as we reverse everything\n BufferedImage newBi = new BufferedImage (xSize, ySize, 3); \n\n for (int i = 0; i < xSize; i++)\n {\n for (int j = 0; j< ySize; j++)\n {\n int rgb = bi.getRGB(i,j);\n newBi.setRGB(xSize-i-1,j,rgb); //flip the pixels\n }\n }\n for (int i = 0; i < xSize; i++)\n {\n for (int j = 0; j< ySize; j++)\n {\n bi.setRGB(i,j,newBi.getRGB(i,j)); // set each pixel of the original image \n }\n }\n redoList.add(deepCopy(bi)); // add the new image to the redo list\n }",
"void enableFlipMode();",
"public void flipBoard() {\r\n\t\tfor (int i = 0; i < this.SIZE/2; i++) {\r\n\t\t\tfor (int j = 0; j < this.SIZE; j++) {\r\n\t\t\t\tswap(j, this.SIZE - 1 - i, j, i);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void flip(int bitIndex);",
"public void hreflect() {\n int rows= currentIm.getRows();\n int cols= currentIm.getCols();\n int h= 0;\n int k= rows-1;\n //invariant: rows 0..h-1 and k+1.. have been inverted\n while (h < k) {\n // Swap row h with row k\n // invariant: pixels 0..c-1 of rows h and k have been swapped\n for (int c= 0; c != cols; c= c+1) {\n currentIm.swapPixels(h, c, k, c);\n }\n \n h= h+1; k= k-1;\n }\n }",
"static public int[][] flipAndInvertImage(int[][] A) {\n for(int i =0;i<A.length;i++){\n processARow(A[i]);\n }\n return A;\n }",
"public void flip() {\r\n\t\tObject[] bak = path.toArray(new Direction[path.size()]);\r\n\t\tpath.clear();\r\n\t\tfor (int i = bak.length-1; i >= 0; i--) {\r\n\t\t\tpath.push((Direction) bak[i]);\r\n\t\t}\r\n\t}",
"public static BufferedImage flipVertically(BufferedImage image) {\n BufferedImage trimImage = new BufferedImage(image.getWidth(), image.getHeight(), image.getType());\n Graphics2D graphics = trimImage.createGraphics();\n graphics.drawImage(image, 0, image.getHeight(), image.getWidth(), -image.getHeight(), null);\n graphics.dispose();\n\n return trimImage;\n }",
"public synchronized Block flip() {\r\n\t\t// TODO ILLEGAL STATUS: THROW AN EXCEPTION HERE\r\n\t\tif(status == Status.Fliped || status == Status.Cleared)\r\n\t\t\treturn null;\r\n\t\telse\r\n\t\t\tstatus = Status.Fliped;\r\n\t\t// when it is clicked when it should be flipped back after a short interval, the flag should be \r\n\t\t// reset to avoid being covered at which the card should be shown\r\n\t\tdelayedCover = false;\r\n\t\tgraphics.updateBlock();\r\n\t\treturn this;\r\n\t}",
"public void setFlip() {\n\t\tflip = true;\n\t}",
"public Piece flip(){\n if(this == BLACK){\n return WHITE;\n }\n else{\n return BLACK;\n }\n }",
"public @NotNull Image flipH()\n {\n if (this.data != null)\n {\n if (this.mipmaps > 1) Image.LOGGER.warning(\"Image manipulation only applied to base mipmap level\");\n \n if (this.format != ColorFormat.RGBA)\n {\n Color.Buffer output = Color.malloc(this.format, this.width * this.height);\n \n long srcPtr = this.data.address();\n long dstPtr = output.address();\n \n long bytesPerLine = Integer.toUnsignedLong(this.width) * this.format.sizeof;\n for (int y = 0; y < this.height; y++)\n {\n for (int x = 0; x < this.width; x++)\n {\n // OPTION 1: Move pixels with memCopy()\n long src = Integer.toUnsignedLong(y * this.width + this.width - 1 - x) * this.format.sizeof;\n long dst = Integer.toUnsignedLong(y * this.width + x) * this.format.sizeof;\n \n MemoryUtil.memCopy(srcPtr + src, dstPtr + dst, bytesPerLine);\n \n // OPTION 2: Just copy data pixel by pixel\n // output.put(y * this.width + x, this.data.getBytes(y * this.width + (this.width - 1 - x)));\n }\n }\n \n this.data.free();\n \n this.data = output;\n }\n else\n {\n // OPTION 3: Faster implementation (specific for 32bit pixels)\n // NOTE: It does not require additional allocations\n IntBuffer ptr = this.data.toBuffer().asIntBuffer();\n for (int y = 0; y < this.height; y++)\n {\n for (int x = 0; x < this.width / 2; x++)\n {\n int backup = ptr.get(y * this.width + x);\n ptr.put(y * this.width + x, ptr.get(y * this.width + this.width - 1 - x));\n ptr.put(y * this.width + this.width - 1 - x, backup);\n }\n }\n }\n this.mipmaps = 1;\n }\n \n return this;\n }",
"public void flip(int[] arr, int index) {\n moves.add(index);\n int temp;\n for (int i = 0; i < index/2; i ++) {\n temp = arr[i];\n arr[i] = arr[index - 1 - i];\n arr[index - 1 - i] = temp;\n }\n }",
"void disableFlipMode();",
"@Override\n public void Invert() {\n\t \n }",
"public void horizontalFlip(Image im, int x, int y, int pixels, GraphicsContext gc2) {\n //permite que la imagen se pueda editar\n imageView = new ImageView(im);\n SnapshotParameters snap = new SnapshotParameters();\n //selecciona el bloque que se va a voltear\n snap.setViewport(new Rectangle2D(x, y, pixels, pixels));\n im = imageView.snapshot(snap, null);\n //voltea la imagen\n gc2.drawImage(im, 0, 0, pixels, pixels, x, y + pixels, pixels, -pixels);\n }",
"@SuppressLint(\"NewApi\")\n public void flipit() {\n if (mCamera == null) {\n return;\n }\n if (Camera.getNumberOfCameras() >= 2) {\n btn_switch.setEnabled(false);\n if (null != mCamera) {\n try {\n mCamera.setPreviewCallback(null);\n mCamera.stopPreview();\n //这句要在stopPreview后执行,不然会卡顿或者花屏\n mCamera.setPreviewDisplay(null);\n mCamera.release();\n mCamera = null;\n Log.i(TAG, \"=== Stop Camera ===\");\n } catch (IOException e) {\n e.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n // \"which\" is just an integer flag\n switch (frontCamera) {\n case 0:\n mCamera = Camera.open(CameraInfo.CAMERA_FACING_FRONT);\n frontCamera = 1;\n break;\n case 1:\n mCamera = Camera.open(CameraInfo.CAMERA_FACING_BACK);\n frontCamera = 0;\n break;\n }\n\n if (Build.VERSION.SDK_INT > 17 && this.mCamera != null) {\n try {\n this.mCamera.enableShutterSound(false);\n } catch (Exception e) {\n e.printStackTrace();\n Log.e(\"CJT\", \"enable shutter_sound sound faild\");\n }\n }\n\n doStartPreview();\n btn_switch.setEnabled(true);\n }\n }",
"public void invertImage()\r\n {\r\n BufferedImage toInvert;\r\n if (isChanged || isBlured )\r\n {\r\n toInvert = cropedEdited;\r\n }\r\n else\r\n {\r\n toInvert = cropedPart;\r\n }\r\n for (int x = 0; x < toInvert.getWidth(); x++) {\r\n for (int y = 0; y < toInvert.getHeight(); y++) {\r\n int rgba = toInvert.getRGB(x, y);\r\n Color col = new Color(rgba, true);\r\n col = new Color(255 - col.getRed(),\r\n 255 - col.getGreen(),\r\n 255 - col.getBlue());\r\n toInvert.setRGB(x, y, col.getRGB());\r\n }\r\n }\r\n repaint();\r\n }",
"public void flipCoin() {\n coin.flip();\n }",
"public void flip_it(int i){\n // flip the coins i and i + 1\n int ni = (i+1)%board.length; // if (i+1 == board.length) ni = 0;\n\n int tmp = board[i];\n\n board[i] = board[ni];\n board[ni] = tmp;\n }",
"public void flipVertical() {\n\t\t\tthis.data = flipGridVertical(data);\n\t\t\tcomputeHashes();\n\t\t}",
"public void setPreviewCanvas()\n {\n if(grayImgToFit!=null)\n {\n canvas.beginDraw();\n for(int i = 0; i < xTiles+3; i++)\n {\n for(int j = 0; j < yTiles+1; j++)\n {\n //if(i<verticalFlip[0].length && j<verticalFlip.length)\n //{\n //if(!notShow[i][j])\n //{\n // even or odd row shift\n if(j%2 == 0)\n {\n if(verticalFlip[i][j] && ! horizontalFlip[i][j])\n {\n canvas.image(tileMiniaturesV[getTileIntensityAtIndex(i,j)],i * tileMiniaturesV[0].width + evenRowShift,j * tileMiniatures[0].height);\n }\n else if(horizontalFlip[i][j] && !verticalFlip[i][j])\n {\n canvas.image(tileMiniaturesH[getTileIntensityAtIndex(i,j)],i * tileMiniaturesH[0].width + evenRowShift,j * tileMiniatures[0].height);\n }\n else if(horizontalFlip[i][j] && verticalFlip[i][j])\n {\n canvas.image(tileMiniaturesVH[getTileIntensityAtIndex(i,j)],i * tileMiniaturesVH[0].width + evenRowShift,j * tileMiniatures[0].height);\n }\n else\n {\n canvas.image(tileMiniatures[getTileIntensityAtIndex(i,j)],i * tileMiniatures[0].width + evenRowShift,j * tileMiniatures[0].height);\n }\n }\n else\n {\n if(verticalFlip[i][j] && ! horizontalFlip[i][j])\n {\n canvas.image(tileMiniaturesV[getTileIntensityAtIndex(i,j)],i * tileMiniaturesV[0].width + oddRowShift,j * tileMiniatures[0].height);\n }\n else if(horizontalFlip[i][j] && !verticalFlip[i][j])\n {\n canvas.image(tileMiniaturesH[getTileIntensityAtIndex(i,j)],i * tileMiniaturesH[0].width + oddRowShift,j * tileMiniatures[0].height);\n }\n else if(horizontalFlip[i][j] && verticalFlip[i][j])\n {\n canvas.image(tileMiniaturesVH[getTileIntensityAtIndex(i,j)],i * tileMiniaturesVH[0].width + oddRowShift,j * tileMiniatures[0].height);\n }\n else\n {\n canvas.image(tileMiniatures[getTileIntensityAtIndex(i,j)],i * tileMiniatures[0].width + oddRowShift,j * tileMiniatures[0].height);\n }\n }\n //}\n //else\n //{\n // canvas.fill(255,255,255);\n // canvas.noStroke();\n // if(hoverIndex[1]%2 == 0)\n // canvas.rect(i * tileMiniatures[0].width + evenRowShift,j * tileMiniatures[0].height,tileMiniatures[0].width, tileMiniatures[0].height);\n // else\n // canvas.rect(i * tileMiniatures[0].width + oddRowShift,j * tileMiniatures[0].height,tileMiniatures[0].width, tileMiniatures[0].height);\n //}\n //}\n }\n }\n \n canvas.fill(0,255,0,100);\n canvas.noStroke();\n if(hoverIndex[1]%2 == 0)\n {\n canvas.rect(hoverIndex[0] * tileMiniatures[0].width + evenRowShift,hoverIndex[1] * tileMiniatures[0].height,tileMiniatures[0].width, tileMiniatures[0].height);\n }\n else\n {\n canvas.rect(hoverIndex[0] * tileMiniatures[0].width + oddRowShift,hoverIndex[1] * tileMiniatures[0].height,tileMiniatures[0].width, tileMiniatures[0].height);\n }\n canvas.endDraw();\n }\n }",
"public void flip(Card card) {\r\n\t\tcard.flip(card);\r\n\t}",
"public void verticalFlip(Image im, int x, int y, int pixels, GraphicsContext gc2) {\n //permite que la imagen se pueda editar\n imageView = new ImageView(im);\n SnapshotParameters snap = new SnapshotParameters();\n //selecciona el bloque que se va a voltear\n snap.setViewport(new Rectangle2D(x, y, pixels, pixels));\n im = imageView.snapshot(snap, null);\n //voltea la imagen\n gc2.drawImage(im, 0, 0, pixels, pixels, x + pixels, y, -pixels, pixels);\n }",
"public void turnCardFaceDown(){\r\n if (getImage() == CardFaceUp)\r\n setImage(Images.faceDown);\r\n else\r\n setImage(CardFaceUp);\r\n }",
"private void flipArray(T[] array) {\n int point1 = 0,point2 = array.length - 1;\r\n while (point1 < point2) {\r\n T t = array[point1];\r\n array[point1] = array[point2];\r\n array[point2] = t;\r\n point1++;\r\n point2--;\r\n }\r\n }",
"public void flipHand(){\n int up = 0;\n int down = Hand.length-1;\n Card[] temp = new Card[Hand.length];\n for(int i=0;i<Hand.length;i++){\n temp[down]=Hand[up];\n up++;down--;\n }\n Hand=temp;\n }",
"public void imageSwap() {\n GreenfootImage image = (movement.dx < 1) ? leftImage : rightImage;\n setImage(image);\n }",
"@SuppressWarnings(\"unchecked\")\n\t\t@Override\n\t\tprotected void onProgressUpdate(Object... values) {\n\t\t\tsuper.onProgressUpdate(values);\n\n\t\t\tfloat halfWidth = imswitcher.getWidth() / 2.0f;\n\t\t\tfloat halfHeight = imswitcher.getHeight() / 2.0f;\n\t\t\tint duration = 500;\n\t\t\tint depthz = 0;// viewFlipper.getWidth()/2;\n\n\t\t\tRotate3D rdin = new Rotate3D(75, 0, 0, halfWidth, halfHeight);\n\t\t\trdin.setDuration(duration);\n\t\t\trdin.setFillAfter(true);\n\t\t\timswitcher.setInAnimation(rdin);\n\t\t\tRotate3D rdout = new Rotate3D(-15, -90, 0, halfWidth, halfHeight);\n\n\t\t\trdout.setDuration(duration);\n\t\t\trdout.setFillAfter(true);\n\t\t\timswitcher.setOutAnimation(rdout);\n\n\t\t\ti = (i + 1);\n\t\t\tint p = i % 4;\n\n\t\t\tif (p >= 0) {\n\t\t\t\tsetpic(p);\n\t\t\t\timswitcher.setImageResource(imageIds[p]);\n\t\t\t} else {\n\n\t\t\t\tint k = 4 + p;\n\t\t\t\tsetpic(k);\n\t\t\t\timswitcher.setImageResource(imageIds[k]);\n\t\t\t}\n\n\t\t}",
"public void flip() {\n flipRecur(root);\n }",
"private void flip() {\n ObservableList<Node> tmp = FXCollections.observableArrayList(this.getChildren());\n Collections.reverse(tmp);\n getChildren().setAll(tmp);\n setAlignment(Pos.TOP_LEFT);\n }",
"private void flip() {\n ObservableList<Node> tmp = FXCollections.observableArrayList(this.getChildren());\n Collections.reverse(tmp);\n getChildren().setAll(tmp);\n setAlignment(Pos.TOP_LEFT);\n }",
"private void flip() {\n ObservableList<Node> tmp = FXCollections.observableArrayList(this.getChildren());\n Collections.reverse(tmp);\n getChildren().setAll(tmp);\n setAlignment(Pos.TOP_LEFT);\n }",
"public void turnCardFaceUp(){\r\n setImage(CardFaceUp);\r\n }",
"void flipUp( ) {\n\t\t\t\t\t\tUpCommand . execute ( ) ;\n\n\n\t\t}",
"public Squarelotron sideFlip(String side);",
"public void flip()throws IOException{\n String input = j.showInputDialog(\"Choose a file to use:\");\n Scanner ab = new Scanner(new File(input+\".ppm\"));\n input = j.showInputDialog(\"Choose a name for the new file:\");\n PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(input+\".ppm\")));\n input = j.showInputDialog(\"Flip: (1)Horizontal (2)Vertical (3)Both\");\n out.println(ab.next());\n int height=Integer.parseInt(ab.next());\n int width=Integer.parseInt(ab.next());\n out.println(height);out.println(width);\n out.println(ab.next());\n int asd[][][]=new int[width][height][3];\n for(int x=0;x<width;x++){\n for(int y=0;y<height;y++){\n for(int rgb=0;rgb<3;rgb++){\n String ass=ab.next();\n asd[x][y][rgb]= Integer.parseInt(ass);\n }\n }\n }\n if(Integer.parseInt(input)==1){\n for(int x=0;x<width;x++){\n for(int y=height-1;y>=0;y--){\n for(int rgb=0;rgb<3;rgb++){\n out.print(\" \"+asd[x][y][rgb]+\" \");\n }\n }\n }\n }\n else if(Integer.parseInt(input)==2){\n for(int x=width-1;x>=0;x--){\n for(int y=0;y<height;y++){\n for(int rgb=0;rgb<3;rgb++){\n out.print(\" \"+asd[x][y][rgb]+\" \");\n }\n }\n }\n }else{\n for(int x=width-1;x>=0;x--){\n for(int y=height-1;y>=0;y--){\n for(int rgb=0;rgb<3;rgb++){\n out.print(\" \"+asd[x][y][rgb]);\n }\n }\n }\n }\n out.close(); \n ab.close();\n System.exit(0);\n }",
"public void flipDirection(Direction flip){\n \tswitch (direction){\n\t\t\tcase NORTH: \n\t\t\t\tdirection = Direction.SOUTH;\n\t\t\t\tbreak;\n\t\t\tcase NORTHEAST:\n\t\t\t\tif (flip == Direction.EAST) direction = Direction.NORTHWEST;\n\t\t\t\telse direction = Direction.SOUTHEAST;\n\t\t\t\tbreak;\n\t\t\tcase EAST:\n\t\t\t\tdirection = Direction.WEST;\n\t\t\t\tbreak;\n\t\t\tcase SOUTHEAST:\n\t\t\t\tif (flip == Direction.EAST) direction = Direction.SOUTHWEST;\n\t\t\t\telse direction = Direction.NORTHEAST;\n\t\t\t\tbreak;\n\t\t\tcase SOUTH:\n\t\t\t\tdirection = Direction.NORTH;\n\t\t\t\tbreak;\n\t\t\tcase SOUTHWEST:\n\t\t\t\tif (flip == Direction.WEST) direction = Direction.SOUTHEAST;\n\t\t\t\telse direction = Direction.NORTHWEST;\n\t\t\t\tbreak;\n\t\t\tcase WEST:\n\t\t\t\tdirection = Direction.EAST;\n\t\t\t\tbreak;\n\t\t\tdefault: //NORTHWEST\n\t\t\t\tif (flip == Direction.WEST) direction = Direction.NORTHEAST;\n\t\t\t\telse direction = Direction.SOUTHWEST;\n\t\t\t\tbreak;\n \t\t}\n }",
"public static void flipHorizontalAxis(int[][] matrix) {\n for(int i = matrix.length - 1; i >= matrix.length/2; i-- ){\n for(int j = 0; j < matrix[i].length; j++){\n int temp = matrix[i][j];\n matrix[i][j] = matrix[(matrix.length - 1) - i][j];\n matrix[(matrix.length - 1) - i][j] = temp;\n }\n }\n}",
"@NotNull\n private Coordinate flipV() {\n angle = -angle;\n Coordinate nextCenterPointCoordinate = new Coordinate(this.centerPointCoordinate.getXCoordinate(),\n this.centerPointCoordinate.getYCoordinate() + (Constants.BULLET_SPEED * Math.sin(Math.toRadians(90 - angle))));\n return nextCenterPointCoordinate;\n }",
"public void changeDirection(int image){\n this.image = image; \n }",
"void display() {\n pushMatrix();\n pushStyle();\n \n translate(_x, _y);\n rotate(_rotVector.heading() - _front);\n if (_flipped) scale(-1, 1);\n imageMode(CENTER);\n image(_img, 0, 0, _w, _h);\n \n popStyle();\n popMatrix();\n }",
"public void flipCoin() {\n\t\tfaceUp = (int) (Math.random() * ((1 - 0 + 1) + 0));\n\n\t}",
"public void invert() {\n int len= currentIm.getRows() * currentIm.getCols();\n \n // invert all pixels (leave alpha/transparency value alone)\n \n // invariant: pixels 0..p-1 have been complemented.\n for (int p= 0; p < len; p= p+1) {\n int rgb= currentIm.getPixel(p);\n int red= 255 - DM.getRed(rgb);\n int blue= 255 - DM.getBlue(rgb);\n int green= 255 - DM.getGreen(rgb);\n int alpha= DM.getAlpha(rgb);\n currentIm.setPixel(p,\n (alpha << 24) | (red << 16) | (green << 8) | blue);\n }\n }",
"public void flipWarCard(){\n flipCards(WarGameConstants.NUMBER_CARDS_TO_WAR);\n }",
"@NotNull\n private Coordinate flipH() {\n angle = 180 - angle;\n Coordinate nextCenterPointCoordinate = new Coordinate(\n this.centerPointCoordinate.getXCoordinate() - (Constants.BULLET_SPEED * Math.cos(Math.toRadians(90 - angle))),\n this.centerPointCoordinate.getYCoordinate());\n return nextCenterPointCoordinate;\n }",
"public void flip(int pilePos, int cardPos) {\n \t\tmTable.get(pilePos).getCard(cardPos).flipFace();\n \t\tsendUpdatedState();\n \t}",
"private void flip(int i) {\n int start = 0;\n while(start < i){\n int temp = toSort[start].val;\n toSort[start].val = toSort[i].val;\n toSort[i].val = temp;\n start++;\n i--;\n sorting.add(paintIntegers.deepCopy(toSort));\n }\n }",
"private void flipOrientation() {\n try {\n if (Settings.System.getInt(getContentResolver(), Settings.System.USER_ROTATION) == Surface.ROTATION_0) {\n Settings.System.putInt(getContentResolver(), Settings.System.USER_ROTATION, Surface.ROTATION_180);\n } else if (Settings.System.getInt(getContentResolver(), Settings.System.USER_ROTATION) == Surface.ROTATION_90) {\n Settings.System.putInt(getContentResolver(), Settings.System.USER_ROTATION, Surface.ROTATION_270);\n } else if (Settings.System.getInt(getContentResolver(), Settings.System.USER_ROTATION) == Surface.ROTATION_180) {\n Settings.System.putInt(getContentResolver(), Settings.System.USER_ROTATION, Surface.ROTATION_0);\n } else {\n Settings.System.putInt(getContentResolver(), Settings.System.USER_ROTATION, Surface.ROTATION_90);\n }\n } catch (Settings.SettingNotFoundException e) {\n Log.e(TAG, e.getMessage());\n }\n }",
"private boolean isFlipped(){\n switch(this.orientation){\n case \"0\": case\"1\": case\"2\": case\"3\": return false;\n case \"4\": case\"5\": case\"6\": case\"7\": return true;\n default: return false;\n }\n }",
"@Override\n public void onClick(View v) {\n\n\n float x = ivImage.getScaleX();\n float y = ivImage.getScaleY();\n\n ivImage.setScaleX((float) (x - 1));\n ivImage.setScaleY((float) (y - 1));\n }",
"public Flip() {\n super(\"!flip\", true);\n }",
"public void flipBattleCard() {\n flipCards(WarGameConstants.NUMBER_CARDS_TO_BATTLE);\n }",
"public Squarelotron upsideDownFlip(int ring);",
"protected final byte[] flipCurrentBuffer()\n {\n byte[] returnBuf = currentBuf;\n currentBuf = ( currentBuf == buf1 ) ? buf2 : buf1;\n return returnBuf;\n }",
"public void flipOverY(){\n int len = tileChars.length;\r\n \r\n // swap columns\r\n for (int i = 0; i < len; i++)\r\n {\r\n for (int j = 0; j < len / 2; j++)\r\n {\r\n char temp = tileChars[i][j];\r\n tileChars[i][j] = tileChars[i][len - j - 1];\r\n tileChars[i][len - j - 1] = temp;\r\n }\r\n }\r\n \r\n boolean temp = this.matchFound[1];\r\n this.matchFound[1] = this.matchFound[3];\r\n this.matchFound[3] = temp;\r\n \r\n this.recalculateEdges(); //fix edges\r\n }",
"private void faceBackwards(){\n\t\tturnLeft();\n\t\tturnLeft();\n\t}",
"public void flipHorizontal() {\n\t\t\tfor(int row = 0; row < TILE_DIM; row++) {\n\t\t\t\tString tmp = \"\";\n\t\t\t\tfor(int col = TILE_DIM-1; col >= 0; col--) {\n\t\t\t\t\ttmp += this.data[row].charAt(col);\n\t\t\t\t}\n\t\t\t\tthis.data[row] = tmp;\n\t\t\t}\n\t\t\tcomputeHashes();\n\t\t}",
"public void flipCard() {\n if (jButton.getIcon() == null){//if the icon compares to null;\n switch (cardNumber) {//set the image of corresponding to the cardNumber\n case 1:\n jButton.setIcon(new ImageIcon(\"C:\\\\Users\\\\cokar\\\\OneDrive - ROC Drenthe College\\\\Drenthe College Van Schaikweg\\\\IT\\\\Java A3 Final\\\\src\\\\resources\\\\card_1.jpg\"));\n break;\n case 2:\n jButton.setIcon(new ImageIcon(\"C:\\\\Users\\\\cokar\\\\OneDrive - ROC Drenthe College\\\\Drenthe College Van Schaikweg\\\\IT\\\\Java A3 Final\\\\src\\\\resources\\\\card_2.jpg\"));\n break;\n case 3:\n jButton.setIcon(new ImageIcon(\"C:\\\\Users\\\\cokar\\\\OneDrive - ROC Drenthe College\\\\Drenthe College Van Schaikweg\\\\IT\\\\Java A3 Final\\\\src\\\\resources\\\\card_3.jpg\"));\n break;\n case 4:\n jButton.setIcon(new ImageIcon(\"C:\\\\Users\\\\cokar\\\\OneDrive - ROC Drenthe College\\\\Drenthe College Van Schaikweg\\\\IT\\\\Java A3 Final\\\\src\\\\resources\\\\card_4.jpg\"));\n break;\n case 5:\n jButton.setIcon(new ImageIcon(\"C:\\\\Users\\\\cokar\\\\OneDrive - ROC Drenthe College\\\\Drenthe College Van Schaikweg\\\\IT\\\\Java A3 Final\\\\src\\\\resources\\\\card_5.jpg\"));\n break;\n case 6:\n jButton.setIcon(new ImageIcon(\"C:\\\\Users\\\\cokar\\\\OneDrive - ROC Drenthe College\\\\Drenthe College Van Schaikweg\\\\IT\\\\Java A3 Final\\\\src\\\\resources\\\\card_6.jpg\"));\n break;\n case 7:\n jButton.setIcon(new ImageIcon(\"C:\\\\Users\\\\cokar\\\\OneDrive - ROC Drenthe College\\\\Drenthe College Van Schaikweg\\\\IT\\\\Java A3 Final\\\\src\\\\resources\\\\card_7.jpg\"));\n break;\n case 8:\n jButton.setIcon(new ImageIcon(\"C:\\\\Users\\\\cokar\\\\OneDrive - ROC Drenthe College\\\\Drenthe College Van Schaikweg\\\\IT\\\\Java A3 Final\\\\src\\\\resources\\\\card_8.jpg\"));\n break;\n }\n } else {//if the JButton icon does not compare to null;\n jButton.setIcon(null);//set the text to null;\n }\n\n\n\n }",
"public static void testMirrorVertical()\n {\n Picture caterpillar = new Picture(\"caterpillar.jpg\");\n caterpillar.explore();\n caterpillar.mirrorVertical();\n caterpillar.explore();\n }",
"public void flip(int x, int y){\n\t\tPiece temp = grid[x][y];\n\t\tint tempRepeats; //used to work out how many times in a diagonal to go\n\t\ttry{\n\t\t\t//UP\n\t\t\tfor (int i = 0;i < y; i++){\n\t\t\t\t//if piece is equal/null\n\t\t\t\tif(grid[x][y-i-1] == null || grid[x][y-i-1] == temp){\n\t\t\t\t\t//if piece is equal\n\t\t\t\t\tif (grid[x][y-i-1] == temp){\n\t\t\t\t\t\t//if it has already passed over the other color\n\t\t\t\t\t\tif(i > 0){\n\t\t\t\t\t\t\t//flip pieces in the middle\n\t\t\t\t\t\t\tfor (int j = 0;j < i;j++){\n\t\t\t\t\t\t\t\tgrid[x][y-(j+1)] = grid[x][y-(j+1)].flip();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//DOWN\n\t\t\tfor (int i = 0;i < grid.length - y - 1; i++){\n\t\t\t\t//if piece is equal/null\n\t\t\t\tif(grid[x][y+i+1] == null || grid[x][y+i+1] == temp){\n\t\t\t\t\t//if piece is equal\n\t\t\t\t\tif (grid[x][y+i+1] == temp){\n\t\t\t\t\t\t//if it has already passed over the other color\n\t\t\t\t\t\tif(i > 0){\n\t\t\t\t\t\t\t//flip pieces in the middle\n\t\t\t\t\t\t\tfor (int j = 0;j < i;j++){\n\t\t\t\t\t\t\t\tgrid[x][y+(j+1)] = grid[x][y+(j+1)].flip();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//LEFT\n\t\t\tfor (int i = 0;i < x; i++){\n\t\t\t\t//if piece is equal/null\n\t\t\t\tif(grid[x-(i+1)][y] == null || grid[x-(i+1)][y] == temp){\n\t\t\t\t\t//if piece is equal\n\t\t\t\t\tif (grid[x-(i+1)][y] == temp){\n\t\t\t\t\t\t//if it has already passed over the other color\n\t\t\t\t\t\tif(i > 0){\n\t\t\t\t\t\t\t//flip pieces in the middle\n\t\t\t\t\t\t\tfor (int j = 0;j < i;j++){\n\t\t\t\t\t\t\t\tgrid[x-(j+1)][y] = grid[x-(j+1)][y].flip();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//RIGHT\n\t\t\tfor (int i = 0;i < grid.length - x - 1; i++){\n\t\t\t\t//if piece is equal/null\n\t\t\t\tif(grid[x+(i+1)][y] == null || grid[x+(i+1)][y] == temp){\n\t\t\t\t\t//if piece is equal\n\t\t\t\t\tif (grid[x+(i+1)][y] == temp){\n\t\t\t\t\t\t//if it has already passed over the other color\n\t\t\t\t\t\tif(i > 0){\n\t\t\t\t\t\t\t//flip pieces in the middle\n\t\t\t\t\t\t\tfor (int j = 0;j < i;j++){\n\t\t\t\t\t\t\t\tgrid[x+(j+1)][y] = grid[x+(j+1)][y].flip();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//Top left\n\t\t\tif(x < y){\n\t\t\t\ttempRepeats = x;\n\t\t\t} else {\n\t\t\t\ttempRepeats = y;\n\t\t\t}\n\t\t\tfor (int i = 0;i < tempRepeats; i++){\n\t\t\t\t//if piece is equal/null\n\t\t\t\tif(grid[x-(i+1)][y-(i+1)] == null || grid[x-(i+1)][y-(i+1)] == temp){\n\t\t\t\t\t//if piece is equal\n\t\t\t\t\tif (grid[x-(i+1)][y-(i+1)] == temp){\n\t\t\t\t\t\t//if it has already passed over the other color\n\t\t\t\t\t\tif(i > 0){\n\t\t\t\t\t\t\t//flip pieces in the middle\n\t\t\t\t\t\t\tfor (int j = 0;j < i;j++){\n\t\t\t\t\t\t\t\tgrid[x-(j+1)][y-(j+1)] = grid[x-(j+1)][y-(j+1)].flip();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//top right\n\t\t\t\n\t\t\tif(grid.length - x < y){\n\t\t\t\ttempRepeats = grid.length - x - 1;\n\t\t\t} else {\n\t\t\t\ttempRepeats = y - 1;\n\t\t\t}\n\t\t\tfor (int i = 0;i < tempRepeats; i++){\n\t\t\t\t//if piece is equal/null\n\t\t\t\tif(grid[x+(i+1)][y-(i+1)] == null || grid[x+(i+1)][y-(i+1)] == temp){\n\t\t\t\t\t//if piece is equal\n\t\t\t\t\tif (grid[x+(i+1)][y-(i+1)] == temp){\n\t\t\t\t\t\t//if it has already passed over the other color\n\t\t\t\t\t\tif(i > 0){\n\t\t\t\t\t\t\t//flip pieces in the middle\n\t\t\t\t\t\t\tfor (int j = 0;j < i;j++){\n\t\t\t\t\t\t\t\tgrid[x+(j+1)][y-(j+1)] = grid[x+(j+1)][y-(j+1)].flip();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\n\t\t\t//down Right\n\t\t\tif(grid.length - x < grid.length - y){\n\t\t\t\ttempRepeats = grid.length - x - 1;\n\t\t\t} else {\n\t\t\t\ttempRepeats = grid.length - y - 1;\n\t\t\t}\n\t\t\tfor (int i = 0;i < tempRepeats; i++){\n\t\t\t\t//if piece is equal/null\n\t\t\t\tif(grid[x+(i+1)][y+(i+1)] == null || grid[x+(i+1)][y+(i+1)] == temp){\n\t\t\t\t\t//if piece is equal\n\t\t\t\t\tif (grid[x+(i+1)][y+(i+1)] == temp){\n\t\t\t\t\t\t//if it has already passed over the other color\n\t\t\t\t\t\tif(i > 0){\n\t\t\t\t\t\t\t//flip pieces in the middle\n\t\t\t\t\t\t\tfor (int j = 0;j < i;j++){\n\t\t\t\t\t\t\t\tgrid[x+(j+1)][y+(j+1)] = grid[x+(j+1)][y+(j+1)].flip();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//down Left\n\t\t\tif(x < grid.length - y){\n\t\t\t\ttempRepeats = x;\n\t\t\t} else {\n\t\t\t\ttempRepeats = grid.length - y - 1;\n\t\t\t}\n\t\t\tfor (int i = 0;i < tempRepeats; i++){\n\t\t\t\t//if piece is equal/null\n\t\t\t\tif(grid[x-(i+1)][y+(i+1)] == null || grid[x-(i+1)][y+(i+1)] == temp){\n\t\t\t\t\t//if piece is equal\n\t\t\t\t\tif (grid[x-(i+1)][y+(i+1)] == temp){\n\t\t\t\t\t\t//if it has already passed over the other color\n\t\t\t\t\t\tif(i > 0){\n\t\t\t\t\t\t\t//flip pieces in the middle\n\t\t\t\t\t\t\tfor (int j = 0;j < i;j++){\n\t\t\t\t\t\t\t\tgrid[x-(j+1)][y+(j+1)] = grid[x-(j+1)][y+(j+1)].flip();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\tcatch(Exception e){\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\tfinally {\n\n\t\t}\n\t}",
"public void moveBack() {\r\n\t\tsetY(getY() - 134);\r\n\t\tmyImage = myImage.getScaledInstance(100, 100, 60);\r\n\r\n\t}",
"public void mirror() {\n this.mirrored = !this.mirrored;\n }",
"public Card flip() {\n\t\treturn hand.remove(0);\n\t}",
"private Coordinate flipCorner(int cornerState) {\n Coordinate coordinate;\n coordinate = centerPointCoordinate;\n if (cornerState == 0) {\n angle = 180 + angle;\n } else if (cornerState == 1) {\n angle = 180 - angle;\n } else if (cornerState == 2) {\n angle = 180 - angle;\n } else if (cornerState == 3) {\n angle = 180 + angle;\n }\n return coordinate;\n }",
"private void flip() {\n ObservableList<Node> tmp = FXCollections.observableArrayList(this.getChildren());\n Collections.reverse(tmp);\n getChildren().setAll(tmp);\n setAlignment(Pos.TOP_LEFT);\n dialog.setPadding(new Insets(0,0,0,7));\n }",
"public void flipJags(){\n \t\tint length = jagsLeft.length/2;\n \t\tJaguar[] tempJags = new Jaguar[length];\n \t\t\n \t\ttempJags=jagsLeft;\n \t\tfor(int i=0; i < length; i++){ \n \t\t\tjagsLeft[i]=tempJags[length-1-i]; //Flip jaguars on left\n \t\t}\n \t\tfor(int i=0; i < length; i++){\n \t\t\ttempJags[i]=jagsRight[length-1-i]; //Flip jaguars on right\n \t\t}\n \t\t\n \t\tjagsRight = jagsLeft;\n \t\tjagsLeft = tempJags;\n assignLiveWindow();\n \t}",
"public void flipClose(PlayerCard playerCard){\n RotateTransition flip = createflipAnimation(playerCard);\n playerCard.setIsFlippedOpen(false);\n flip.play();\n if (mainController.checkIsEnabledSound()) cardFlipSound.makeSound();\n playerCard.setDefaultImage();\n }",
"public void startFlipping() {\n if (!mKeepFlipping) {\n mKeepFlipping = true;\n showOnly(mWhichChild);\n Message msg = mHandler.obtainMessage(FLIP_MSG);\n mHandler.sendMessageDelayed(msg, mFlipInterval);\n }\n }",
"private void updateSprite(){\n //facing front\n getImage().clear();\n getImage().drawImage(SHEET,-(frame%SHEET_W)*SPRITE_W,0);\n if(!goLeft) getImage().mirrorHorizontally();\n if (iframes>0&&iframes%10<5) setImage(SpriteHelper.makeWhite( getImage()));\n else frame = frame + 1 % (SHEET_H* SHEET_W);\n }",
"private void flipCardHelper(Card card)\n\t{\n\t\tint index = cards.indexOf(card);\n\t\t\n\t\t// If it's found, flip it\n\t\tif(index >= 0) {\n\t\t\t\n\t\t\t((Card) cards.get(index)).flip();\n\t\t\t\n\t\t}\n\t\t\n\t}",
"public Squarelotron leftRightFlip(int ring);",
"private GCompound hFlipGCompound(GCompound c) {\n\t\tfor (Iterator<GObject> i = c.iterator(); i.hasNext();)\n\t\t\thFlipGObject(i.next(), c.getWidth() / 2);\n\t\treturn c;\n\t}",
"public void rotateClockWise() {\r\n\r\n transpose();\r\n\r\n // swap columns\r\n for (int col = 0; col < pixels[0].length / 2; col++) {\r\n for (int row = 0; row < pixels.length; row++) {\r\n int tmp = pixels[row][col];\r\n pixels[row][col] = pixels[row][pixels[0].length - 1 - col];\r\n pixels[row][pixels[0].length - 1 - col] = tmp;\r\n }\r\n }\r\n\r\n this.pix2img();\r\n }",
"protected void changePic() {\nif(framesforUser.isEmpty())\n{\nToast.makeText(getApplicationContext(), \"Finished!\", Toast.LENGTH_LONG);\nmodeTextView.setText(\"Finished\");\nnewImgButton.setEnabled(false);\n\n}\nelse{\n\tCollections.shuffle(framesforUser);\n\n\tcurrentPicIndex=framesforUser.get(0);\n\n\t\t Log.e(\"SY\", \"Current PicIndex= \"+currentPicIndex+\" \"+framesforUser.get(0));\n\t\t currentOverlay = getResources().getDrawable(resourcefromframeorder[framesforUser.get(0)]);\n\t\t \n\t\t overlayview.setImageDrawable(currentOverlay);\n\t\t cameraframe.removeView(overlayview);\n\t\t cameraframe.addView(overlayview,1);\n\n\t\t framenumTextView.setText(currentPicIndex+\"\");\n\t\t\tcountdownView.setText(framesforUser.size()+\"\");\n\n\t}\n }",
"@Override\r\n\t\t\tpublic void onClick(View v) {\n\r\n\t\t\t\timgfinalImage.setImageBitmap(rotateImage(RateItScreen.bmp, \"Left\"));\r\n\r\n\t\t\t}",
"void FlipBook()\r\n\t\t{\r\n\t\t\t Collections.reverse(this);\r\n\t\t}",
"public static int[][][] flipVertically(int[][][] source) {\n\n\t\tint[][][] verticalTemp = source;\n\t\tint[][][] vertical = new int[source.length][source[0].length][3]; \n\t\tint rows = (vertical.length) - 1; \n\n\t\t// Using one loop to swift the content\n\t\tfor (int i = 0; i < (rows + 1); i++) { \n\t\t\tvertical[i] = verticalTemp[rows - i];\n\t\t}\n\t\treturn vertical;\n\t}",
"public static BufferedImage mirrorVertically (BufferedImage bi)\n {\n imageList.add(deepCopy(bi)); // add the image to the undo list\n int xSize = bi.getWidth();\n int ySize = bi.getHeight();\n\n BufferedImage newBi = new BufferedImage (xSize,ySize*2, 1); // double the height of the image\n for (int x = 0; x < xSize; x++)\n {\n for (int top = ySize-1, bottom = ySize;bottom < ySize*2; top--,bottom++)\n {\n int rgb = bi.getRGB(x,top); \n newBi.setRGB(x,top,rgb);\n newBi.setRGB(x,bottom,rgb);\n }\n }\n redoList.add(deepCopy(newBi)); // add the image to the redo list\n return newBi; // return the new mirrored image\n\n }",
"public void setFlipped() {\n\t\thasFlipped = true;\n\t}",
"public abstract BufferedImage transform();"
] | [
"0.8004548",
"0.7991714",
"0.77526176",
"0.75788283",
"0.75483954",
"0.74907637",
"0.7453966",
"0.73638046",
"0.73355204",
"0.732091",
"0.7136864",
"0.7047342",
"0.69744664",
"0.6770434",
"0.6757719",
"0.67424726",
"0.67272663",
"0.66953623",
"0.6676653",
"0.66747785",
"0.6656567",
"0.66075456",
"0.6559155",
"0.6551585",
"0.65480345",
"0.6535407",
"0.64827",
"0.6418965",
"0.6416349",
"0.639794",
"0.63928556",
"0.6264248",
"0.62297314",
"0.6226129",
"0.6200347",
"0.61871564",
"0.6178769",
"0.6168776",
"0.6163309",
"0.61472625",
"0.6103621",
"0.6077258",
"0.6075839",
"0.60745025",
"0.6065586",
"0.6057215",
"0.6048267",
"0.6039891",
"0.6025061",
"0.60062253",
"0.60062253",
"0.60062253",
"0.600461",
"0.5991288",
"0.59901875",
"0.5960409",
"0.59424096",
"0.59290946",
"0.59246504",
"0.58892083",
"0.5889055",
"0.5881404",
"0.587213",
"0.58587635",
"0.5853231",
"0.584363",
"0.5827467",
"0.5810869",
"0.58043057",
"0.5796046",
"0.57914466",
"0.5789779",
"0.5770143",
"0.576028",
"0.57434183",
"0.5730243",
"0.57005894",
"0.56955594",
"0.5693644",
"0.5691343",
"0.5691109",
"0.5687846",
"0.56667465",
"0.56630033",
"0.56620085",
"0.56561285",
"0.5654617",
"0.5653738",
"0.56274503",
"0.56230867",
"0.5612888",
"0.56119865",
"0.5600046",
"0.5590941",
"0.55881745",
"0.557416",
"0.55553424",
"0.55552256",
"0.5540586",
"0.55389917"
] | 0.65012413 | 26 |
Inflate the layout for this fragment | @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
view= inflater.inflate(R.layout.fragment_bpl__fixture_, container, false);
mRecyclerView = view.findViewById(R.id.bpl_fixture_RecyclerViewId);
WorldCupRecyclerView worldCupRecyclerView = new WorldCupRecyclerView(getContext(),lstWorldCup);
mRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
mRecyclerView.setAdapter(worldCupRecyclerView);
return view;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }",
"@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.wallpager_layout, null);\r\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_invit_friends, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_zhuye, container, false);\n initView(inflate);\n initData();\n return inflate;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_posts, parent, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n return inflater.inflate(R.layout.ilustration_fragment, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_sow_drug_cost_per_week, container, false);\n\n db = new DataBaseAdapter(getActivity());\n hc = new HelperClass();\n pop = new FeedSowsFragment();\n\n infltr = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n parent = (LinearLayout) v.findViewById(R.id.layout_for_add);\n tvTotalCost = (TextView) v.findViewById(R.id.totalCost);\n\n getData();\n setData();\n\n return v;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_stream_list, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_event, container, false);\n\n\n\n\n\n\n\n\n return v;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_feed, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.screen_select_list_student, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_overall, container, false);\n mNamesLayout = (LinearLayout) rootView.findViewById(R.id.fragment_overall_names_layout);\n mOverallView = (OverallView) rootView.findViewById(R.id.fragment_overall_view);\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState)\n {\n\n\n view = inflater.inflate(R.layout.fragment_earning_fragmant, container, false);\n ini(view);\n return view;\n }",
"@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n super.onCreateView(inflater, container, savedInstanceState);\n final View rootview = inflater.inflate(R.layout.activity_email_frag, container, false);\n ConfigInnerElements(rootview);\n return rootview;\n }",
"@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\trootView = inflater.inflate(R.layout.fragment_attack_armor, container, false);\r\n\r\n\t\tfindInterfaceElements();\r\n\t\taddRangeSelector();\r\n\t\tupdateHeadings();\r\n\t\tsetListeners();\r\n\r\n\t\tsetFromData();\r\n\r\n\t\treturn rootView;\r\n\t}",
"@SuppressLint(\"InflateParams\")\r\n\t@Override\r\n\tpublic View initLayout(LayoutInflater inflater) {\n\t\tView view = inflater.inflate(R.layout.frag_customer_all, null);\r\n\t\treturn view;\r\n\t}",
"@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_fore_cast, container, false);\r\n initView();\r\n mainLayout.setVisibility(View.GONE);\r\n apiInterface = RestClinet.getClient().create(ApiInterface.class);\r\n loadData();\r\n return view;\r\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_friend, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_detail, container, false);\n image = rootView.findViewById(R.id.fr_image);\n name = rootView.findViewById(R.id.fr_name);\n phoneNumber = rootView.findViewById(R.id.fr_phone_number);\n email = rootView.findViewById(R.id.fr_email);\n street = rootView.findViewById(R.id.fr_street);\n city = rootView.findViewById(R.id.fr_city);\n state = rootView.findViewById(R.id.fr_state);\n zipcode = rootView.findViewById(R.id.fr_zipcode);\n dBrith = rootView.findViewById(R.id.date_brith);\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_pm25, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_kkbox_playlist, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_feed_pager, container, false);\n\n// loadData();\n\n findViews(rootView);\n\n setViews();\n\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n layout = (FrameLayout) inflater.inflate(R.layout.fragment_actualites, container, false);\n\n relLayout = (RelativeLayout) layout.findViewById(R.id.relLayoutActus);\n\n initListView();\n getXMLData();\n\n return layout;\n }",
"@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.frag_post_prayer_video, container, false);\n setCustomDesign();\n setCustomClickListeners();\n return rootView;\n }",
"@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.lf_em4305_fragment, container, false);\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_recordings, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_category, container, false);\n initView(view);\n bindRefreshListener();\n loadParams();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_cm_box_details, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_layout12, container, false);\n\n iniv();\n\n init();\n\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_details, container, false);\n //return inflater.inflate(R.layout.fragment_details, container, false);\n getIntentValues();\n initViews();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_mem_body_blood, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_qiugouxiaoxi, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_coll_blank, container, false);\n initView(inflate);\n initData();\n return inflate;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_attendance_divide, container, false);\n\n initView(view);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.show_program_fragment, parent, false);\n }",
"@Override\n public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,\n @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.visualization_fragment, container, false);\n\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_category_details_page, container, false);\n initializeAll();\n\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View v = inflater.inflate(R.layout.fragemnt_reserve, container, false);\n\n\n\n\n return v;\n }",
"protected int getLayoutResId() {\n return R.layout.activity_fragment;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_quizs, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n role = getArguments().getInt(\"role\");\n rootview = inflater.inflate(R.layout.fragment_application, container, false);\n layout = rootview.findViewById(R.id.patentDetails);\n progressBar = rootview.findViewById(R.id.progressBar);\n try {\n run();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return rootview;\n }",
"@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tview = inflater.inflate(R.layout.fragment_zhu, null);\n\t\tinitView();\n\t\tinitData();\n\t\treturn view;\n\t}",
"@Override\n\t\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)\n\t\t{\n\t\t\tView rootView = inflater.inflate(R.layout.maimfragment, container, false);\n\t\t\treturn rootView;\n\t\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n // Inflate the layout for this fragment\n return inflater.inflate(R.layout.fragment__record__week, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_porishongkhan, container, false);\n\n\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_dashboard, container, false);\n resultsRv = view.findViewById(R.id.db_results_rv);\n resultText = view.findViewById(R.id.db_search_empty);\n progressBar = view.findViewById(R.id.db_progressbar);\n lastVisitText = view.findViewById(R.id.db_last_visit);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(getLayoutId(), container, false);\n init(view);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_feedback, container, false);\n self = getActivity();\n initUI(view);\n initControlUI();\n initData();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_service_summery, container, false);\n tvVoiceMS = v.findViewById(R.id.tvVoiceValue);\n tvDataMS = v.findViewById(R.id.tvdataValue);\n tvSMSMS = v.findViewById(R.id.tvSMSValue);\n tvVoiceFL = v.findViewById(R.id.tvVoiceFLValue);\n tvDataBS = v.findViewById(R.id.tvDataBRValue);\n tvTotal = v.findViewById(R.id.tvTotalAccountvalue);\n return v;\n }",
"@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_clan_rank_details, container, false);\r\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_star_wars_list, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_lei, container, false);\n\n initView(inflate);\n initData();\n return inflate;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_quotation, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_wode_ragment, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n\n\n\n\n\n return inflater.inflate(R.layout.fragment_appoint_list, parent, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n if (rootView == null) {\n rootView = inflater.inflate(R.layout.fragment_ip_info, container, false);\n initView();\n }\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_offer, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_rooms, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.fragment_img_eva, container, false);\n\n getSendData();\n\n initView(view);\n\n initData();\n\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_project_collection, container, false);\n ButterKnife.bind(this, view);\n fragment = this;\n initView();\n getCollectionType();\n // getCategoryList();\n initBroadcastReceiver();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_yzm, container, false);\n initView(view);\n return view;\n }",
"@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tmainLayout = inflater.inflate(R.layout.fragment_play, container, false);\r\n\t\treturn mainLayout;\r\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_invite_request, container, false);\n initialiseVariables();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n getLocationPermission();\n return inflater.inflate(R.layout.centrum_fragment, container, false);\n\n\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_habit_type_details, container, false);\n\n habitTitle = rootView.findViewById(R.id.textViewTitle);\n habitReason = rootView.findViewById(R.id.textViewReason);\n habitStartDate = rootView.findViewById(R.id.textViewStartDate);\n habitWeeklyPlan = rootView.findViewById(R.id.textViewWeeklyPlan);\n\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_information_friends4, container, false);\n\n if (getArguments() != null) {\n FriendsID = getArguments().getString(\"keyFriends\");\n }\n\n return v;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_post_details, container, false);\n\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hotel, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_bus_inquiry, container, false);\n initView();\n initData();\n initDialog();\n getDataFromNet();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_weather, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_srgl, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_ground_detail_frgment, container, false);\n init();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_book_appointment, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_wheretogo, container, false);\n ids();\n setup();\n click();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n binding = DataBindingUtil\n .inflate(inflater, R.layout.fragment_learning_leaders, container, false);\n init();\n\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_end_game_tab, container, false);\n\n setupWidgets();\n setupTextFields(view);\n setupSpinners(view);\n\n // Inflate the layout for this fragment\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.memoir_fragment, container, false);\n\n getUserIdFromSharedPref();\n configureUI(view);\n configureSortSpinner();\n configureFilterSpinner();\n\n networkConnection = new NetworkConnection();\n new GetAllMemoirTask().execute();\n\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_jadwal, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_delivery_detail, container, false);\n initialise();\n\n\n\n return view;\n }",
"@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_4, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_product, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_group_details, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment06_7, container, false);\n initView(view);\n setLegend();\n setXAxis();\n setYAxis();\n setData();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_downloadables, container, false);\n }",
"@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.movie_list_fragment, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_like, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hall, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_unit_main, container, false);\n TextView mTxvBusinessAassistant = (TextView) view.findViewById(R.id.txv_business_assistant);\n TextView mTxvCardINformation = (TextView) view.findViewById(R.id.txv_card_information);\n RelativeLayout mRelOfficialWebsite = (RelativeLayout) view.findViewById(R.id.rel_official_website);\n RelativeLayout mRelPictureAblum = (RelativeLayout) view.findViewById(R.id.rel_picture_album);\n TextView mTxvQrCodeCard = (TextView) view.findViewById(R.id.txv_qr_code_card);\n TextView mTxvShareCard = (TextView) view.findViewById(R.id.txv_share_card);\n mTxvBusinessAassistant.setOnClickListener(this.mOnClickListener);\n mTxvCardINformation.setOnClickListener(this.mOnClickListener);\n mRelOfficialWebsite.setOnClickListener(this.mOnClickListener);\n mRelPictureAblum.setOnClickListener(this.mOnClickListener);\n mTxvQrCodeCard.setOnClickListener(this.mOnClickListener);\n mTxvShareCard.setOnClickListener(this.mOnClickListener);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_moviespage, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_s, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_overview, container, false);\n\n initOverviewComponents(view);\n registerListeners();\n initTagListener();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_bahan_ajar, container, false);\n initView(view);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n root = (ViewGroup) inflater.inflate(R.layout.money_main, container, false);\n context = getActivity();\n initHeaderView(root);\n initView(root);\n\n getDate();\n initEvetn();\n return root;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_historical_event, parent, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_event_details, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_video, container, false);\n unbinder = ButterKnife.bind(this, view);\n initView();\n initData();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n v= inflater.inflate(R.layout.fragment_post_contacts, container, false);\n this.mapping(v);\n return v;\n }",
"@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_measures, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_feed, container, false);\n findViews(view);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_surah_list, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_data_binded, container, false);\n }"
] | [
"0.6739604",
"0.67235583",
"0.6721706",
"0.6698254",
"0.6691869",
"0.6687986",
"0.66869223",
"0.6684548",
"0.66766286",
"0.6674615",
"0.66654444",
"0.66654384",
"0.6664403",
"0.66596216",
"0.6653321",
"0.6647136",
"0.66423255",
"0.66388357",
"0.6637491",
"0.6634193",
"0.6625158",
"0.66195583",
"0.66164845",
"0.6608733",
"0.6596594",
"0.65928894",
"0.6585293",
"0.65842897",
"0.65730995",
"0.6571248",
"0.6569152",
"0.65689117",
"0.656853",
"0.6566686",
"0.65652984",
"0.6553419",
"0.65525705",
"0.65432084",
"0.6542382",
"0.65411425",
"0.6538022",
"0.65366334",
"0.65355957",
"0.6535043",
"0.65329415",
"0.65311074",
"0.65310687",
"0.6528645",
"0.65277404",
"0.6525902",
"0.6524516",
"0.6524048",
"0.65232015",
"0.65224624",
"0.65185034",
"0.65130377",
"0.6512968",
"0.65122765",
"0.65116245",
"0.65106046",
"0.65103024",
"0.6509013",
"0.65088093",
"0.6508651",
"0.6508225",
"0.6504662",
"0.650149",
"0.65011525",
"0.6500686",
"0.64974767",
"0.64935696",
"0.6492234",
"0.6490034",
"0.6487609",
"0.6487216",
"0.64872116",
"0.6486594",
"0.64861935",
"0.6486018",
"0.6484269",
"0.648366",
"0.6481476",
"0.6481086",
"0.6480985",
"0.6480396",
"0.64797544",
"0.647696",
"0.64758915",
"0.6475649",
"0.6474114",
"0.6474004",
"0.6470706",
"0.6470275",
"0.64702207",
"0.6470039",
"0.6467449",
"0.646602",
"0.6462256",
"0.64617974",
"0.6461681",
"0.6461214"
] | 0.0 | -1 |
prefer the JPA entity name, if specified... | protected String transformEntityName(EntityNaming entityNaming) {
if ( StringHelper.isNotEmpty( entityNaming.getJpaEntityName() ) ) {
return entityNaming.getJpaEntityName();
}
else {
// otherwise, use the Hibernate entity name
return StringHelper.unqualify( entityNaming.getEntityName() );
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getEntityName();",
"public String getEntityName() {\n return entityName;\n }",
"String getEntityName() throws DatabaseNotAccessibleException;",
"public String getEntityName() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String entityClassName() {\n\t\treturn null;\n\t}",
"public String getEntityTypeName() { return \"org.doxer.app.db.dbflute.exentity.StShhnKnyMs\"; }",
"protected String getEntityName() {\r\n\t\treturn EntityList.getEntityString(this);\r\n\t}",
"public String getEntityName() {\n\t\treturn entityName;\n\t}",
"@Override\n\tpublic String getEntityModelName() {\n\t\treturn null;\n\t}",
"public String getNameOfEntityHere() {\n \n return entityHere_.getName();\n \n }",
"public String getName(Class<? extends RawEntity<?>> entity) {\r\n\t\tTable tableAnnotation = entity.getAnnotation(Table.class);\r\n\t\tif (tableAnnotation != null) {\r\n\t\t\treturn tableAnnotation.value();\r\n\t\t}\r\n\t\t\r\n\t\tif (classMappings.containsKey(entity)) {\r\n\t\t\treturn classMappings.get(entity);\r\n\t\t}\r\n\t\t\r\n\t\treturn postProcessName(processName(convertName(entity)));\r\n\t}",
"public static String getEntityName(Entity entity) {\n\n\t\t//Player\n\t\tif (entity instanceof Player) return ((Player) entity).getName();\n\t\t//Other\n\t\telse return entity.getType().getName();\n\t}",
"protected String getEntityClassName() {\n\t\treturn this.getEntityClass().getName();\n\t}",
"public void setEntityName(String entityName) {\n\t\tthis.entityName = entityName;\n\t}",
"public void setEntityName(String entityName) {\n\t\tthis.entityName = entityName;\n\t}",
"public abstract String getDatabaseTableName(String entityName);",
"public void setEntityName(String entityName) {\n\t\t\n\t\tthis.entityName = entityName;\n\t}",
"public static String getEntityName(Class<?> clazz) {\n Annotation entityAnnotation = null;\n for (Annotation annotation : clazz.getAnnotations()) {\n Class<?> annotationClass = annotation.annotationType();\n if (annotationClass.getName().equals(\"javax.persistence.Entity\")) {\n entityAnnotation = annotation;\n }\n }\n\n if (entityAnnotation == null) {\n return null;\n }\n try {\n Method method = entityAnnotation.getClass().getMethod(\"name\");\n String name = (String) method.invoke(entityAnnotation);\n if (name != null && name.length() > 0) {\n return name;\n } else {\n return null;\n }\n } catch (Exception e) {\n throw new IllegalStateException(\"Could not get entity name from class \" + clazz, e);\n }\n }",
"@PrePersist()\r\n\tpublic void initEntity(){\r\n\t\tthis.name = WordUtils.capitalizeFully(this.name);\r\n\t}",
"@Override\n public String modelName() {\n Optional<? extends AnnotationMirror> mirror =\n Mirrors.findAnnotationMirror(element(), Entity.class);\n if (mirror.isPresent()) {\n return Mirrors.findAnnotationValue(mirror.get(), \"model\")\n .map(value -> value.getValue().toString())\n .filter(name -> !Names.isEmpty(name))\n .orElse(\"default\");\n }\n if (Mirrors.findAnnotationMirror(element(), javax.persistence.Entity.class).isPresent()) {\n Elements elements = processingEnvironment.getElementUtils();\n Name packageName = elements.getPackageOf(element()).getQualifiedName();\n String[] parts = packageName.toString().split(\"\\\\.\");\n return parts[parts.length - 1];\n } else {\n throw new IllegalStateException();\n }\n }",
"public static TranslatedName createEntity(EntityManager em) {\n TranslatedName translatedName = new TranslatedName()\n .language(DEFAULT_LANGUAGE)\n .name(DEFAULT_NAME)\n .slug(DEFAULT_SLUG);\n return translatedName;\n }",
"@Override\n public String getFormatEntity() {\n return NameIDType.ENTITY;\n }",
"public String getEntityTypeName() { return \"com.sample.twitter.dbflute.exentity.Tweet\"; }",
"<T extends ModelEntity> T findEntityType( Class<T> entityClass, String name );",
"<T extends ModelEntity> T findActualEntity( Class<T> entityClass, String name );",
"public void setEntity(String name, Class<? extends AbstractEntity> entclass) {\n entityClass = entclass;\n //label.setText(name);\n }",
"Product getProductByName(String name) throws EntityNotFoundException;",
"EntityType getEntity();",
"public NamedEntity(Long id, String name) {\n super(id);\n this.name = name;\n }",
"public abstract String getDatabaseColumnName(String entityName, String propertyName);",
"public NamedEntity(String name) { this(name, \"\"); }",
"public String getObjectName() {\r\n\t\tif (objectName == null || objectName.length() == 0)\r\n\t\t\tsetObjectName(\"entity\" + entityNr);\r\n\t\treturn objectName;\r\n\t}",
"public void setEntity(Entity entity) {\n\t\tthis.entity = entity;\n\t\tString s = entity.getClass().toString();\n\t\t// trim \"Class \" from the above String\n\t\tentityType = s.substring(s.lastIndexOf(\" \") + 1);\n\t}",
"protected abstract String getEntityExistanceSQL(E entity);",
"@Override\n\tpublic String buildTitle(IEntity entity) {\n\n\t\ttry {\n\t\t\tEntityDescriptor descriptor = DAOSystem.getEntityDescriptor(getEntityClass().getName());\n\t\t\tif (descriptor.getTitlePattern() != null) {\n\t\t\t\treturn TemplateUtil.parse(descriptor.getTitlePattern(), entity);\n\t\t\t} else {\n\t\t\t\t// create default title\n\t\t\t\tString cn = getEntityClass().getName();\n\t\t\t\tint idx = cn.lastIndexOf('.');\n\t\t\t\tif (idx != -1) {\n\t\t\t\t\tcn = cn.substring(idx + 1);\n\t\t\t\t}\n\t\t\t\treturn cn + \" #\" + entity.getId();\n\t\t\t}\n\t\t} catch (ConfigurationException e) {\n\t\t\tthrow new DataAccessException(\"No EntityDescriptor found for this type - cant validate: \"\n\t\t\t\t\t+ getEntityClass().getName());\n\t\t}\n\n\t}",
"private String getClassName(final Class<?> clazz) {\n return EntityType.getEntityType(clazz).map(e -> e.getEntityName(clazz)).orElse(clazz.getSimpleName());\n }",
"public static EntityType getEntityType(String name) {\n EntityType type = null;\n name = name.toLowerCase(Locale.ROOT).trim();\n if (name.contains(NAMESPACE)) {\n name = (name.split(\":\"))[1];\n }\n\n if (ConfigHandler.entities.get(name) != null) {\n type = EntityType.valueOf(name.toUpperCase(Locale.ROOT));\n }\n\n return type;\n }",
"public interface AdminMainEntity {\n\n public static final String MAIN_ENTITY_NAME_PROPERTY = \"__adminMainEntity\";\n\n public String getMainEntityName();\n\n}",
"@Override\r\n public void createNewEntity(String entityName) {\n\r\n }",
"String getEntity();",
"String getEntity();",
"@Override\n\tprotected String getEntityName() {\n\t\treturn GenOrderNum.class.getName();\n\t}",
"private String getEntitiesTableName()\n {\n\tString prefix = PropertyLookup.getTableNamePrefix();\n\tString separator = PropertyLookup.getTableNameSeparator();\n\tString suffix = PropertyLookup.getEntitiesTableNameSuffix();\n\n\treturn prefix + separator + catalogId + separator + suffix;\n }",
"@Override\n\tpublic String associatedEntityName(String field) {\n\t\treturn null;\n\t}",
"public String getEntityTypeName() { return \"com.ort.dbflute.exentity.Camp\"; }",
"@Override\r\n\tpublic String getNameById() {\n\t\treturn null;\r\n\t}",
"public abstract String getEntityId();",
"public UserQueryEntity getByName(String userName);",
"public void addEntityName(String name) {\n if (name != null) {\n this.entityNameSet.add(name);\n }\n }",
"@Override\n public String getEntityName()\n {\n return GWFArchiveProcess.ENTITY_NAME;\n }",
"protected String extractMemberNameFromEntity(Member entity) {\r\n return convert(entity.getMemberName(), String.class);\r\n }",
"public static TranslatedName createUpdatedEntity(EntityManager em) {\n TranslatedName translatedName = new TranslatedName()\n .language(UPDATED_LANGUAGE)\n .name(UPDATED_NAME)\n .slug(UPDATED_SLUG);\n return translatedName;\n }",
"public void setEntity(String entity) {\n\t\tthis.setEntity(entity, false);\n\t}",
"@Override\n public String getEntityName() {\n return \"MailServer\";\n }",
"String getKey(Object entity);",
"public ClassName entity() {\n return ClassName.get(this.getEntityPack(), this.getClassName());\n }",
"public String printEntityType(String name) {\n\t\tint type = _parser.getEntityType(name);\n\n\t\tswitch (type) {\n\t\tcase XmlParser.ENTITY_INTERNAL:\n\t\t\treturn \"ENTITY_INTERNAL\";\n\n\t\tcase XmlParser.ENTITY_NDATA:\n\t\t\treturn \"ENTITY_NDATA\";\n\n\t\tcase XmlParser.ENTITY_TEXT:\n\t\t\treturn \"ENTITY_TEXT\";\n\n\t\tcase XmlParser.ENTITY_UNDECLARED:\n\t\t\treturn \"ENTITY_DECLARED\";\n\n\t\tdefault:\n\t\t\treturn \"Unknown entity type\";\n\t\t}\n\t}",
"public final String getEntity() {\n\t\treturn entity;\n\t}",
"public JPAEntityType getEntityType();",
"public static String getEntityName(int id) {\n String entityName = \"\";\n if (ConfigHandler.entitiesReversed.get(id) != null) {\n entityName = ConfigHandler.entitiesReversed.get(id);\n }\n return entityName;\n }",
"public T caseEntityRenamed(EntityRenamed object) {\n\t\treturn null;\n\t}",
"@Override\n public String getEntityName() {\n return \"FavouriteAssociations\";\n }",
"abstract E getEntityManager();",
"public void entityReference(String name);",
"@Override\n\tpublic String getReferencedEntityClassName() {\n\t\treturn null;\n\t}",
"public NamedEntity(String name, String abbrev) {\n this.name= name;\n this.abbrev = abbrev;\n }",
"public String idName() {\n return entityType().getSimpleName().toLowerCase() + \"id\";\n }",
"public E getEntity();",
"@Test\n\tpublic void testGetTableNameByEntity(){\n\t\t;\n\t}",
"public Entity getEntityByName(String name) {\n return this.entity_list_.get(name);\n }",
"public static String name(PersonEntity pe)\n\t{\n\t\tif(pe == null) return null;\n\n\t\tPerson p = pe.getOx();\n\n\t\treturn cat(null, \" \", p.getLastName(),\n\t\t p.getFirstName(), p.getMiddleName()).toString();\n\t}",
"public String getEntityTypeName() { return \"jp.sourceforge.ea2ddl.dao.exentity.TTrxtypes\"; }",
"public Entity getEntity(String name) {\r\n\r\n for (int i = 0; i < entities.size(); i++) {\r\n if (name.equals(entities.get(i).nume)) {\r\n\r\n return entities.get(i);\r\n }\r\n }\r\n return null;\r\n }",
"public String getEntity()\n\t\t{\n\t\t\treturn userElement.getAttribute(ENTITY_ATTR_NAME);\n\t\t}",
"private static Person findPersonByName(EntityManager em, String name) {\n\t\tQuery query = em.createQuery(\"select p from Person p where name = :name\", Person.class);\n\t\tquery.setParameter(\"name\", name);\n\t\treturn (Person) query.getSingleResult();\n\t}",
"public String entityType();",
"public interface EntitySource extends IdentifiableTypeSource, ToolingHintContextContainer, EntityNamingSourceContributor {\n\t/**\n\t * Obtain the primary table for this entity.\n\t *\n\t * @return The primary table.\n\t */\n\tpublic TableSpecificationSource getPrimaryTable();\n\n\t/**\n\t * Obtain the secondary tables for this entity\n\t *\n\t * @return returns an iterator over the secondary tables for this entity\n\t */\n\tpublic Map<String,SecondaryTableSource> getSecondaryTableMap();\n\n\tpublic String getXmlNodeName();\n\n\t/**\n\t * Obtain the named custom tuplizer classes to be used.\n\t *\n\t * @return The custom tuplizer class names\n\t */\n\tpublic Map<EntityMode,String> getTuplizerClassMap();\n\n\t/**\n\t * Obtain the name of a custom persister class to be used.\n\t *\n\t * @return The custom persister class name\n\t */\n\tpublic String getCustomPersisterClassName();\n\n\t/**\n\t * Is this entity lazy (proxyable)?\n\t *\n\t * @return {@code true} indicates the entity is lazy; {@code false} non-lazy.\n\t */\n\tpublic boolean isLazy();\n\n\t/**\n\t * For {@link #isLazy() lazy} entities, obtain the interface to use in constructing its proxies.\n\t *\n\t * @return The proxy interface name\n\t */\n\tpublic String getProxy();\n\n\t/**\n\t * Obtain the batch-size to be applied when initializing proxies of this entity.\n\t *\n\t * @return returns the the batch-size.\n\t */\n\tpublic int getBatchSize();\n\n\t/**\n\t * Is the entity abstract?\n\t * <p/>\n\t * The implication is whether the entity maps to a database table.\n\t *\n\t * @return {@code true} indicates the entity is abstract; {@code false} non-abstract; {@code null}\n\t * indicates that a reflection check should be done when building the persister.\n\t */\n\tpublic Boolean isAbstract();\n\n\t/**\n\t * Did the source specify dynamic inserts?\n\t *\n\t * @return {@code true} indicates dynamic inserts will be used; {@code false} otherwise.\n\t */\n\tpublic boolean isDynamicInsert();\n\n\t/**\n\t * Did the source specify dynamic updates?\n\t *\n\t * @return {@code true} indicates dynamic updates will be used; {@code false} otherwise.\n\t */\n\tpublic boolean isDynamicUpdate();\n\n\t/**\n\t * Did the source specify to perform selects to decide whether to perform (detached) updates?\n\t *\n\t * @return {@code true} indicates selects will be done; {@code false} otherwise.\n\t */\n\tpublic boolean isSelectBeforeUpdate();\n\n\t/**\n\t * Obtain the name of a named-query that will be used for loading this entity\n\t *\n\t * @return THe custom loader query name\n\t */\n\tpublic String getCustomLoaderName();\n\n\t/**\n\t * Obtain the custom SQL to be used for inserts for this entity\n\t *\n\t * @return The custom insert SQL\n\t */\n\tpublic CustomSql getCustomSqlInsert();\n\n\t/**\n\t * Obtain the custom SQL to be used for updates for this entity\n\t *\n\t * @return The custom update SQL\n\t */\n\tpublic CustomSql getCustomSqlUpdate();\n\n\t/**\n\t * Obtain the custom SQL to be used for deletes for this entity\n\t *\n\t * @return The custom delete SQL\n\t */\n\tpublic CustomSql getCustomSqlDelete();\n\n\t/**\n\t * Obtain any additional table names on which to synchronize (auto flushing) this entity.\n\t *\n\t * @return Additional synchronized table names or 0 sized String array, never return null.\n\t */\n\tpublic String[] getSynchronizedTableNames();\n\n\t/**\n\t * Get the actual discriminator value in case of a single table inheritance\n\t *\n\t * @return the actual discriminator value in case of a single table inheritance or {@code null} in case there is no\n\t * explicit value or a different inheritance scheme\n\t */\n\tpublic String getDiscriminatorMatchValue();\n\n\t/**\n\t * @return returns the source information for constraints defined on the table\n\t */\n\tpublic Collection<ConstraintSource> getConstraints();\n\n\t/**\n\t * Obtain the filters for this entity.\n\t *\n\t * @return returns an array of the filters for this entity.\n\t */\n\tpublic FilterSource[] getFilterSources();\n\n\tpublic List<JaxbHbmNamedQueryType> getNamedQueries();\n\n\tpublic List<JaxbHbmNamedNativeQueryType> getNamedNativeQueries();\n\n\tpublic TruthValue quoteIdentifiersLocalToEntity();\n\n}",
"AirlineEntity findByName(String name);",
"public NamedEntity() {}",
"public EntityNameRenamer(String oldEntityName, String newEntityName) {\n\t\t\tsuper();\n\t\t\tthis.oldEntityName = oldEntityName;\n\t\t\tthis.newEntityName = newEntityName;\n\t\t}",
"@Test\n public void testFindById() {\n// String findById = EntityManagerImpl.\n// EntityUtils.getTableName(Department.class);\n assertEquals(\"Table name should be departments!\", \"departments\", tableName);\n }",
"public void skippedEntity(String name) { }",
"public NamedEntity() { this(\"\", \"\"); }",
"public Entity[] queryEntityInfo() throws UnifyException, SQLException {\n Bookmark bookmark = visual.getSelectBookmark();\n if (bookmark == null)\n return null;\n\n String catalogName= visual.getQueryCatalog();\n String schemaName = visual.getQuerySchema();\n\n String entityName = visual.getQueryEntity(); //ʵ��\n\n if(bookmark.getDbInfoProvider().getDatabaseMetaData().storesLowerCaseIdentifiers())\n {\n \tif(catalogName!=null)\n \t\tcatalogName = catalogName.toLowerCase();\n \tif(schemaName!=null)\n \t\tschemaName = schemaName.toLowerCase();\n \tif(entityName!=null)\n \t\tentityName = entityName.toLowerCase();\n }else if(bookmark.getDbInfoProvider().getDatabaseMetaData().storesUpperCaseIdentifiers())\n {\n \tif(catalogName!=null)\n \t\tcatalogName = catalogName.toUpperCase();\n \tif(schemaName!=null)\n \t\tschemaName = schemaName.toUpperCase();\n \tif(entityName!=null)\n \t\tentityName = entityName.toUpperCase();\n }\n// �����mysql��ݿ⣬����ѯ���������ݵ���Ϊ��д\n// if (catalogName != null&&!(bookmark.isMysql()))\n// \tcatalogName = catalogName.toUpperCase();\n// if (schemaName != null&&!(bookmark.isMysql()))\n// schemaName = schemaName.toUpperCase();\n// if (entityName != null&&!(bookmark.isMysql()))\n// entityName = entityName.toUpperCase();\n return queryEntityInfo(bookmark,catalogName, schemaName, entityName);\n }",
"Name findNameByPersonPrimary(int idPerson);",
"public EntityMetadata get(String appl, String entityName) {\n return get(appl, entityName, false);\n }",
"@Override\n\tpublic Class<?> getEntityClass() {\n\t\treturn null;\n\t}",
"EntityBeanDescriptor createEntityBeanDescriptor();",
"@Override\r\n public void updateEntity(String entityName, DataStoreEntity dataStoreEntity) {\n\r\n }",
"public void setEntityTitle(java.lang.Object entityTitle) {\n this.entityTitle = entityTitle;\n }",
"public default E onFind(E entity) {\n\t\treturn entity;\n\t}",
"@Override\n public void updateEntity(String entitySetName, OEntity entity) {\n super.updateEntity(entitySetName, entity);\n }",
"public interface Entity {\n\n // ===================================================================================\n // Display String\n // ==============\n /**\n * @return The display string of basic informations with one-nested relation values. (NotNull)\n */\n public String toStringWithRelation();\n\n /**\n * @param name The name for display. (NullAllowed: If it's null, it does not have a name)\n * @param column Does it contains column values or not?\n * @param relation Does it contains relation existences or not?\n * @return The display string for this entity. (NotNull)\n */\n public String buildDisplayString(String name, boolean column, boolean relation);\n}",
"@Override\n\tpublic Class<E> getEntityClass() {\n\t\treturn null;\n\t}",
"protected String defaultJNDIName() {\n return \"com/hps/july/persistence/Car\";\n }",
"@Override\n\tpublic Class<Object> getEntityClass() {\n\t\treturn null;\n\t}",
"public abstract T getEntityByColumnName(String columnName, String value);",
"@Override\n\tpublic ProductEntity findProductByName(String temp) {\n\t\treturn null;\n\t}",
"@Override\r\n public void saveOrUpdateEntity(String entityName, DataStoreEntity dataStoreEntity) {\n\r\n }",
"public void renameEntityName(String oldEntityName, String newEntityName) {\n\t\tEntityNameRenamer renamer = buildEntityNameRenamer(oldEntityName, newEntityName);\n\t\tgetStateObject().accept(renamer);\n\t}"
] | [
"0.7179063",
"0.67467594",
"0.67329264",
"0.6719733",
"0.6504623",
"0.64994216",
"0.6485817",
"0.6460469",
"0.6373252",
"0.6311401",
"0.62934875",
"0.62872386",
"0.62844557",
"0.6272139",
"0.6272139",
"0.6266914",
"0.62227386",
"0.61932904",
"0.61730134",
"0.6133778",
"0.6092962",
"0.6091802",
"0.60873175",
"0.6029836",
"0.59829533",
"0.59804225",
"0.59003407",
"0.58978057",
"0.58337986",
"0.5821707",
"0.57678306",
"0.57562846",
"0.5747009",
"0.5734605",
"0.57189554",
"0.56759137",
"0.5667406",
"0.5663855",
"0.56586325",
"0.56321985",
"0.56321985",
"0.56308436",
"0.5608581",
"0.56022793",
"0.56005454",
"0.5594806",
"0.5594556",
"0.5583808",
"0.55806595",
"0.55524164",
"0.5529138",
"0.5518951",
"0.5501293",
"0.5475755",
"0.54720265",
"0.5464525",
"0.5461692",
"0.5438262",
"0.54360366",
"0.5430623",
"0.5429351",
"0.54107964",
"0.5408869",
"0.53767127",
"0.5374418",
"0.5346777",
"0.5344307",
"0.53338563",
"0.5314327",
"0.5307291",
"0.52965087",
"0.5294345",
"0.5286917",
"0.5279024",
"0.5239551",
"0.5235911",
"0.52332616",
"0.5232888",
"0.52227676",
"0.52182865",
"0.5211315",
"0.5191613",
"0.518759",
"0.5181737",
"0.5179092",
"0.51751554",
"0.51735234",
"0.5168499",
"0.51554626",
"0.51499176",
"0.5141025",
"0.5137606",
"0.51281476",
"0.5124137",
"0.51210207",
"0.510836",
"0.5102404",
"0.51015717",
"0.5093983",
"0.50919896"
] | 0.66935027 | 4 |
JPA states the implicit column name should be the attribute name | @Override
public Identifier determineIdentifierColumnName(ImplicitIdentifierColumnNameSource source) {
return toIdentifier(
transformAttributePath( source.getIdentifierAttributePath() ),
source.getBuildingContext()
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"SqlColumns(String columnName){\n\t\t\t this.columnName = columnName; \n\t\t}",
"KijiColumnName getAttachedColumn();",
"public DatabaseQueryColumn(String name) {\n this.formula = null;\n this.name = name;\n }",
"public void setColumnName (String ColumnName);",
"public String getColumnName() {\n return columnName; \n }",
"@Override\n\tpublic String sqlQualifiedColumn(String tablename, String columnname) {\n\t\treturn String.format(\"%s.\\\"%s\\\"\", tablename, columnname);\n\t}",
"public void setColumnName(String columnName);",
"public String getName() {\n return columnName;\n }",
"public abstract String getDatabaseColumnName(String entityName, String propertyName);",
"protected abstract String getFavoriteColumnName();",
"String getColumnName();",
"public void setColumnName(String columnName) {\n this.columnName = columnName;\n }",
"public String getName(){\n\t\t\treturn columnName;\n\t\t}",
"public String getColumnName();",
"public String getColumnName() {\n return this.columnName;\n }",
"@Override\n public String getName() {\n return columnInfo.getName();\n }",
"public String getAttributeName(){\n if(field.getAnnotation(Column.class) != null){\n return field.getAnnotation(Column.class).column();\n }\n if( field.getAnnotation(PrimaryKey.class) !=null){\n return field.getAnnotation(PrimaryKey.class).name();\n }\n return null;\n }",
"public void setColumnName(java.lang.String columnName) {\r\n this.columnName = columnName;\r\n }",
"public void setColumnName(String columnName)\n {\n this.columnName = columnName;\n }",
"public java.lang.String getColumnName() {\r\n return columnName;\r\n }",
"Column(String column) {\n this.column = column;\n }",
"Column(String column) {\n this.column = column;\n }",
"@Override\n\tpublic Identifier determineBasicColumnName(ImplicitBasicColumnNameSource source) {\n\t\treturn toIdentifier( transformAttributePath( source.getAttributePath() ), source.getBuildingContext() );\n\t}",
"public abstract T getEntityByColumnName(String columnName, String value);",
"@Override\n protected String getColumnNameForMetadata(String columnName) {\n return (columnName == null) ? \"%\" : super\n .getColumnNameForMetadata(columnName);\n }",
"protected String getNewGenericColumnName(int column) {\n\t\tHashSet<String> usedNames = new HashSet<>();\n\t\tfor (AttributeColumn col : getAllAttributeColumns()) {\n\t\t\tusedNames.add(col.getName());\n\t\t}\n\n\t\twhile (usedNames.contains(\"attribute_\" + column)) {\n\t\t\tcolumn++;\n\t\t}\n\t\treturn \"attribute_\" + column;\n\t}",
"@Override\n public void alterColumnByName(String name, XPropertySet descriptor) throws SQLException, NoSuchElementException {\n \n }",
"public String getAttributeName() {\n\n if (getAD_Column_ID() == 0) {\n return super.getAttributeName();\n }\n\n // We have a column\n String\tattribute\t= super.getAttributeName();\n\n if ((attribute != null) && (attribute.length() > 0)) {\n return attribute;\n }\n\n setAttributeName(getColumn().getColumnName());\n\n return super.getAttributeName();\n\n }",
"@Override\n\tpublic java.lang.String getName() {\n\t\treturn _expandoColumn.getName();\n\t}",
"public void setColumnName(String columnName) {\r\n dataBinder.setColumnName(columnName);\r\n }",
"private String getAllColumnName() {\n\t\t\n\t\tStringBuilder builder = new StringBuilder();\n\t\t// .append(COLUMN_id).append(\"=?,\").\n\t\tbuilder.append(\"user_id\").append(\"=?,\");\n\t\tbuilder.append(\"lib_book_id\").append(\"=?,\");\n\t\tbuilder.append(\"lending_date\").append(\"=?,\");\n\t\tbuilder.append(\"return_date\").append(\"=?,\");\n\t\tbuilder.append(\"returned_date\").append(\"=?,\");\n\t\tbuilder.append(\"status\").append(\"=?\");\n\t\t\n\t\treturn builder.toString();\n\t}",
"public AttributeColumn(String attributeName) {\n\t\t\t// default parameters for value type, ... are implicit created\n\t\t\tthis.setName(attributeName);\n\t\t\t// this.setValueType(Ontology.NOMINAL);\n\t\t}",
"@Override\r\n\tpublic String getType() {\n\t\treturn \"column\";\r\n\t}",
"@Override\n public String getColumnName(int aColumn) {\n return model.getColumnName(aColumn); \n }",
"@Override\n\tpublic void setName(java.lang.String name) {\n\t\t_expandoColumn.setName(name);\n\t}",
"public String getColumnName() {\r\n return dataBinder.getColumnName();\r\n }",
"public String getColumnForPrimaryKey() {\n return null;\n }",
"public Column getColumn(String columnName);",
"public ColumnElementImpl (String name) {\n super(name);\n\t}",
"public ColumnElementImpl (String name) {\n super(name);\n\t}",
"Column createColumn();",
"Column getColumnForAttribute(String name) {\n name = Strings.underscore(name);\n for (Column column : getColumns()) {\n if (column.getName().equals(name)) return column;\n }\n return null;\n }",
"public interface DatabaseColumns extends BaseColumns {\n String CANDIDATES = \"Candidates\";\n String NAME = \"CandidateName\";\n String NUMBER = \"VotesNumber\";\n}",
"public interface Column{\n\t\tpublic abstract String asc();\n\t\tpublic abstract String desc();\n\t}",
"@Override\n public String getColumnName(int column) {\n if (column == COL_ID) {\n return \"Código\";\n } else if (column == COL_NAME) {\n return \"Nome\";\n }\n return \"\";\n }",
"@Override\n public String getColumnName(int column) {\n return colName[column];\n }",
"public InputNameForColumnTag()\r\n {\r\n super();\r\n }",
"public interface RegionColumns extends ExtendedColumns {\n\n String NAME = \"name\";\n String COUNTRY_ID = \"country_id\";\n}",
"IColumnBinding addColumn(String spec);",
"@Override\r\n\tpublic String getColumnName(int column) {\n\t\treturn columnName[column];\r\n\t}",
"@Override\r\n\tpublic String getColumnName(int column) {\n\t\treturn columnName[column];\r\n\t}",
"public DatabaseQueryColumn(String formula, String name) {\n this.formula = formula;\n this.name = name;\n }",
"private String getNormalisedColumnName(String columnName) {\n\t\t// Avoid double-quotes - if a column name is in quotes, then PG will\n\t\t// add more quotes around it causing the query to fail\n\t\t//\n\t\tif (columnName.startsWith(\"\\\"\") && columnName.endsWith(\"\\\"\")) {\n\t\t\tcolumnName = columnName.substring(1, columnName.length() - 1);\n\t\t}\n\t\treturn columnName;\n\t}",
"@Override\n public String foreignKeyColumnName(\n String propertyName,\n String propertyEntityName,\n String propertyTableName,\n String referencedColumnName\n ) {\n\n String header = propertyName != null ? StringHelper.unqualify(\n propertyName) : propertyTableName;\n if (header == null)\n throw new AssertionFailure(\"NamingStrategy not properly filled\");\n\n String col = \"\\\"\" + columnName(header + StringUtils.capitalize(\n referencedColumnName)) + \"\\\"\";\n // System.out.println(\"++++referencedColumnNameMod \" +\n // col);\n return col;\n // return super.foreignKeyColumnName(\n // propertyName,\n // propertyEntityName,\n // propertyTableName,\n // referencedColumnName\n // );\n }",
"@Override\n public String getColumnName(int column) {\n return columnNames[column];\n }",
"@Override\n public String getColumnName(int column) {\n return columnNames[column];\n }",
"@Override\n\tpublic String getPrimaryKeyColumnName() {\n\t\treturn TICKETCHARGE.TICKET_CHARGE_ID;\n\t}",
"public TableDataColumn(Creation creation){\r\n\t\tsuper();\r\n\t\tthis.creation = creation;\r\n\t\tattributs.add(new AttributDescribe(false, (\"NAME_COLUMN\"+(getRowCount()+1)), \"VARCHAR2\", \"20\", false, false));\r\n\t}",
"@Override\n public String getColumnName(int column) { return columnnames[column]; }",
"private void processBeanAttribute (BeanAttribute attribute) {\n\t\t// HACK TO GET RID OF UNSIGNED FROM MYSQL DEFINITIONS\r\n\t\t// -------------------------------------------------------------------------------\r\n\t\tif (attribute.getColumnType() != null && !attribute.getColumnType().isEmpty()) {\r\n\t\t\tattribute.setColumnType(GenerateBeanUtils.removeUnsigned(attribute.getColumnType()));\r\n\t\t}\r\n\t\t\r\n\t\t// -------------------------------------------------------------------------------\r\n\t\t// Use the Name as the Java attribute name - this is the master.\r\n\t\t// -------------------------------------------------------------------------------\r\n\t\r\n\t\tif (attribute.getName() == null || attribute.getName().trim().isEmpty()) {\r\n\t\t\t// No Java Name given - create a name from the Column Name:\r\n\t\t\t\r\n\t\t\tif (attribute.getColumnName() != null && !attribute.getColumnName().trim().isEmpty()) {\r\n\t\t\t\tif (StringUtils.isAllUpperCase(attribute.getColumnName())) {\r\n\t\t\t\t\tattribute.setName(attribute.getColumnName().toLowerCase());\r\n\t\t\t\t} else {\r\n\t\t\t\t\tattribute.setName(StringUtils.uncapitalize(attribute.getColumnName()));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\tlogger.error(\"An attribute has been passed without a column name or a java name - something has gone wrong!!!!\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\t// Give the Java name sensible options\r\n\t\t\tif (StringUtils.isAllUpperCase(attribute.getName())) {\r\n\t\t\t\tattribute.setName(attribute.getName().toLowerCase());\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// -------------------------------------------------------------------------------\r\n\t\t// If the column name has not been set - create a name based on the Java name\r\n\t\t// -------------------------------------------------------------------------------\r\n\r\n\t\tif (attribute.getColumnName() == null || attribute.getColumnName().trim().isEmpty()) {\r\n\t\t\t// No Column Name given - create a name from the Java Name:\r\n\t\t\tattribute.setColumnName(StringUtils.capitalize(attribute.getName()));\r\n\t\t}\r\n\r\n\t\t// -------------------------------------------------------------------------------\r\n\t\t// If the java type has not been set - generate one from the column type \r\n\t\t// -------------------------------------------------------------------------------\r\n\t\t\r\n\t\t// should check if the type is valid!\r\n\t\tif (attribute.getType()==null || attribute.getType().isEmpty()) {\t\t\t\t\t\r\n\t\t\tattribute.setType(GenerateBeanUtils.convertColumnTypeToJavaType(attribute.getColumnType()));\t\t\t\t\t\r\n\t\t} \r\n\t\t\r\n\t\t// Deal with issue of time stamps.\r\n\t\tif (attribute.getType().toLowerCase().equals(\"timestamp\")) {\r\n\t\t\tattribute.setType(\"Date\");\r\n\t\t}\r\n\t\t\r\n\t\t// -------------------------------------------------------------------------------\r\n\t\t// If the column type has not been set - generate one from the java type \r\n\t\t// -------------------------------------------------------------------------------\r\n\t\t\r\n\t\t// should check if the type is valid!\r\n\t\tif (attribute.getColumnType()==null || attribute.getColumnType().isEmpty()) {\t\t\t\t\t\r\n\t\t\tattribute.setColumnType(GenerateBeanUtils.convertJavaTypeToColumnType(attribute.getType()));\t\t\t\t\t\r\n\t\t} \r\n\t\t\r\n\t\t// check to see if this is a varchar - need to set the max size.\r\n\t\tif (attribute.getColumnType().toLowerCase().equals(\"varchar\") ) {\r\n\t\t\tif (attribute.getColumnSize() < 1) {\r\n\t\t\t\tif(attribute.getMaxValue() < 1) {\r\n\t\t\t\t\tattribute.setColumnSize(255);\t\t\t\t\t\t\r\n\t\t\t\t} else {\r\n\t\t\t\t\tattribute.setColumnSize(attribute.getMaxValue());\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Set the validation max size to column size\r\n\t\t\tif (attribute.getMaxValue() < 1 ) {\r\n\t\t\t\tattribute.setMaxValue(attribute.getColumnSize());\r\n\t\t\t}\t\t\t\t\t\r\n\t\t}\r\n\r\n\t\t// -------------------------------------------------------------------------------\r\n\t\t// Helpers\r\n\t\t// -------------------------------------------------------------------------------\r\n\t\t\r\n\t\tattribute.setObject(GenerateBeanUtils.isObject(attribute.getType()));\t\t\t\t\r\n\r\n\t\t// Check to see if a regular expression has been set and if it is valid...\r\n\t\tif (attribute.getValidationRegExp()!= null && !attribute.getValidationRegExp().trim().isEmpty()) { \r\n\t\t\t\tString result = GenerateBeanUtils.validateRegularExpression(attribute.getValidationRegExp());\r\n\t\t\t\tattribute.setValidationRegExp(result);\r\n\t\t\t\t\r\n\t\t\t\tif (result == null) {\r\n\t\t\t\t\tlogger.warn(\"Error parsing supplied regular expression - ignoring\"); \r\n\t\t\t\t}\r\n\t\t\t\tattribute.setValidationRegExp(result);\r\n\t\t}\r\n\t\t\r\n\t\tattribute.setValidated(GenerateBeanUtils.isValidated(attribute.getValidationRegExp(), attribute.getMinValue(), attribute.getMaxValue(),attribute.isMandatory()));\r\n\t\t\r\n\t\tlogger.trace(attribute);\r\n\r\n\t\t\r\n\t}",
"public void setAD_Column_ID (int AD_Column_ID);",
"public String getAliasedEscapedColumnName() {\n return this.getEscapedColumnName();\n }",
"public String getAliasedEscapedColumnName() {\n return this.getEscapedColumnName();\n }",
"public String getAliasedEscapedColumnName() {\n return this.getEscapedColumnName();\n }",
"public String getAliasedEscapedColumnName() {\n return this.getEscapedColumnName();\n }",
"public String getAliasedEscapedColumnName() {\n return this.getEscapedColumnName();\n }",
"public String getAliasedEscapedColumnName() {\n return this.getEscapedColumnName();\n }",
"public String getAliasedEscapedColumnName() {\n return this.getEscapedColumnName();\n }",
"@Override\n\tpublic String getColumnName(int column) {\n\t\treturn names[column];\n\t}",
"public boolean referenceColumnInSql() {\n return false;\n }",
"public interface ColumnMetaData {\n\n\t/**\n\t * The uniqueness level of a column data type.\n\t */\n\tenum Uniqueness {\n\t\t/**\n\t\t * No limitations. Multiple instances of a single column meta data type can be attached to a table or even a\n\t\t * single column.\n\t\t */\n\t\tNONE,\n\n\t\t/**\n\t\t * Multiple instances of a single column meta data type can be attached to a table but at most one per column.\n\t\t */\n\t\tCOLUMN,\n\n\t\t/**\n\t\t * At most one instance of the column meta data type can be attached to a table.\n\t\t */\n\t\tTABLE\n\t}\n\n\t/**\n\t * The unique type id of the column meta data.\n\t *\n\t * @return the type id\n\t */\n\tString type();\n\n\t/**\n\t * The uniqueness level of the meta data. Defaults to {@link Uniqueness#NONE} (no restrictions).\n\t *\n\t * @return the uniqueness level\n\t */\n\tdefault Uniqueness uniqueness() {\n\t\treturn Uniqueness.NONE;\n\t}\n\n}",
"public interface Columns {\r\n public static final String USERNAME = \"username\";\r\n public static final String EMAIL = \"email\";\r\n public static final String PW = \"password\";\r\n public static final String TIME = \"create_time\";\r\n public static final String AUTHORITY = \"authority_id\";\r\n }",
"@Override\n public String joinKeyColumnName(\n String joinedColumn, String joinedTable\n ) {\n return super.joinKeyColumnName(joinedColumn, joinedTable);\n }",
"protected String getDatabasePkColumnName() {\n return this.pkColumn == null ? getPlan().getDocIdField() : this.pkColumn;\n }",
"public void addColumn(String columnName);",
"@Override\n public String getColumnName(final int column) {\n return _columns.get(column);\n }",
"public void setColumnName(String columnName) {\r\n navBinder.setColumnName(columnName);\r\n }",
"Column createColumn(JavaTypeMapping mapping, String javaType, int datastoreFieldIndex);",
"private static TextColumnBuilder getColumnByNameField(String nameField){ \n return drColumns.get(nameField);\n }",
"@ApiModelProperty(value = \"Gets and sets the name of the column.\")\n public String getName() {\n return name;\n }",
"Column(@Nullable Field recordField, String name, @Nullable String title, boolean toggleable) {\r\n this.recordField = recordField;\r\n this.columnName = name;\r\n this.title = title;\r\n this.toggleable = toggleable;\r\n }",
"protected String getTableColumn()\n\t\t{\n\t\t\treturn Column ;\n\t\t}",
"Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {\n this.column = column;\n this.javaProperty = javaProperty;\n this.jdbcType = jdbcType;\n this.isColumnNameDelimited = isColumnNameDelimited;\n }",
"Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {\n this.column = column;\n this.javaProperty = javaProperty;\n this.jdbcType = jdbcType;\n this.isColumnNameDelimited = isColumnNameDelimited;\n }",
"Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {\n this.column = column;\n this.javaProperty = javaProperty;\n this.jdbcType = jdbcType;\n this.isColumnNameDelimited = isColumnNameDelimited;\n }",
"Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {\n this.column = column;\n this.javaProperty = javaProperty;\n this.jdbcType = jdbcType;\n this.isColumnNameDelimited = isColumnNameDelimited;\n }",
"Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {\n this.column = column;\n this.javaProperty = javaProperty;\n this.jdbcType = jdbcType;\n this.isColumnNameDelimited = isColumnNameDelimited;\n }",
"Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {\n this.column = column;\n this.javaProperty = javaProperty;\n this.jdbcType = jdbcType;\n this.isColumnNameDelimited = isColumnNameDelimited;\n }",
"Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {\n this.column = column;\n this.javaProperty = javaProperty;\n this.jdbcType = jdbcType;\n this.isColumnNameDelimited = isColumnNameDelimited;\n }",
"Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {\n this.column = column;\n this.javaProperty = javaProperty;\n this.jdbcType = jdbcType;\n this.isColumnNameDelimited = isColumnNameDelimited;\n }",
"Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {\n this.column = column;\n this.javaProperty = javaProperty;\n this.jdbcType = jdbcType;\n this.isColumnNameDelimited = isColumnNameDelimited;\n }",
"Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {\n this.column = column;\n this.javaProperty = javaProperty;\n this.jdbcType = jdbcType;\n this.isColumnNameDelimited = isColumnNameDelimited;\n }",
"Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {\n this.column = column;\n this.javaProperty = javaProperty;\n this.jdbcType = jdbcType;\n this.isColumnNameDelimited = isColumnNameDelimited;\n }",
"@Override\n public boolean supportsNonNullableColumns() {\n return false;\n }",
"private void validateColumnAttributes (String className, \n\t\t\t\tString fieldName, ColumnElement column)\n\t\t\t\tthrows ModelValidationException\n\t\t\t{\n\t\t\t\tString keyName = null;\n\n\t\t\t\t// column must be numeric type and non-nullable\n\t\t\t\tif (column.isNullable() || !column.isNumericType())\n\t\t\t\t\tkeyName = \"util.validation.version_field_column_type_invalid\";\t\t// NOI18N\n\t\t\t\telse\t// column must be non-PK and non-FK column\n\t\t\t\t{\n\t\t\t\t\tTableElement table = column.getDeclaringTable();\n\t\t\t\t\tUniqueKeyElement[] uks = table.getUniqueKeys();\n\t\t\t\t\tForeignKeyElement[] fks = table.getForeignKeys();\n\t\t\t\t\tint i, count = ((uks != null) ? uks.length : 0);\n\n\t\t\t\t\tfor (i = 0; i < count; i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tUniqueKeyElement uk = uks[i];\n\n\t\t\t\t\t\tif (uk.isPrimaryKey() && Arrays.asList(\n\t\t\t\t\t\t\tuk.getColumns()).contains(column))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tkeyName = \"util.validation.version_field_column_pk_invalid\";\t\t// NOI18N\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tcount = ((fks != null) ? fks.length : 0);\n\t\t\t\t\tfor (i = 0; i < count; i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tForeignKeyElement fk = fks[i];\n\n\t\t\t\t\t\tif (Arrays.asList(fk.getLocalColumns()).\n\t\t\t\t\t\t\tcontains(column))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tkeyName = \"util.validation.version_field_column_fk_invalid\";\t\t// NOI18N\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (keyName != null)\n\t\t\t\t{\n\t\t\t\t\tthrow new ModelValidationException(\n\t\t\t\t\t\tgetModel().getField(className, fieldName), \n\t\t\t\t\t\tI18NHelper.getMessage(getMessages(), keyName, \n\t\t\t\t\t\tnew Object[]{column.getName(), fieldName, className}));\n\t\t\t\t}\n\t\t\t}",
"private static String [] getColumnName(){\r\n\t\tString [] columnNames = { DBSAResourceBundle.res.getString(\"no\"), DBSAResourceBundle.res.getString(\"title\"), \r\n\t\t\t\tDBSAResourceBundle.res.getString(\"authors\"), DBSAResourceBundle.res.getString(\"link\"),\r\n\t\t\t\tDBSAResourceBundle.res.getString(\"year\"),DBSAResourceBundle.res.getString(\"abstract\"), \r\n\t\t\t\tDBSAResourceBundle.res.getString(\"publisher\"),(\"X\"), \r\n\t\t\t\t(\"duplicate\"), \"id\"};\r\n\t\t\t\r\n\t\treturn columnNames;\r\n\t}",
"@Override\n\tpublic String getColumnName(int column) {\n\t\treturn this.colunas[column];\n\t}",
"@Override\n\tpublic String getColumnName(int column) {\n\t\tswitch (column) {\n\t\tcase 0:\n\t\t\treturn \"Expression\";\n\t\tcase 1:\n\t\t\treturn \"Value\";\n\t\t}\n\t\treturn null;\n\t}",
"public void testSetColumnName_Accuracy() {\r\n String columnName = \"columnName\";\r\n auditDetail.setColumnName(columnName);\r\n assertEquals(\"The columnName value should be set properly.\", columnName,\r\n UnitTestHelper.getPrivateField(AuditDetail.class, auditDetail, \"columnName\").toString());\r\n }",
"@Override\r\n public String getColumnName(int column) {\n return (String)this.columnNames.get(column);\r\n }"
] | [
"0.6660508",
"0.65198755",
"0.6518146",
"0.6510813",
"0.6508433",
"0.6494111",
"0.6459628",
"0.6382589",
"0.632162",
"0.63085175",
"0.62904894",
"0.62822884",
"0.6267188",
"0.62591946",
"0.62554777",
"0.6251502",
"0.621748",
"0.62054497",
"0.6157939",
"0.6151308",
"0.6145579",
"0.6145579",
"0.61112934",
"0.60438925",
"0.60327905",
"0.60290235",
"0.60159564",
"0.5982355",
"0.5958122",
"0.5941724",
"0.59123844",
"0.5908198",
"0.58838475",
"0.5866709",
"0.5860007",
"0.584669",
"0.58409387",
"0.58359355",
"0.5807516",
"0.5807516",
"0.57882524",
"0.5786807",
"0.57629764",
"0.5755132",
"0.5746398",
"0.5725548",
"0.57210886",
"0.57121146",
"0.5694392",
"0.5684215",
"0.5684215",
"0.5673464",
"0.56558263",
"0.5652033",
"0.5629381",
"0.5629381",
"0.5623613",
"0.56170946",
"0.5612817",
"0.56106526",
"0.5602167",
"0.5588894",
"0.5588894",
"0.5588894",
"0.5588894",
"0.5588894",
"0.5588894",
"0.5588894",
"0.5559945",
"0.5553653",
"0.55398804",
"0.5532101",
"0.55293924",
"0.5523479",
"0.55089074",
"0.55087525",
"0.55086005",
"0.55069417",
"0.55067664",
"0.54971915",
"0.54940856",
"0.5488092",
"0.5483418",
"0.5483418",
"0.5483418",
"0.5483418",
"0.5483418",
"0.5483418",
"0.5483418",
"0.5483418",
"0.5483418",
"0.5483418",
"0.5483418",
"0.5481373",
"0.5468815",
"0.54673886",
"0.5464802",
"0.5462448",
"0.54616034",
"0.5460745"
] | 0.549355 | 81 |
JPA states we should use the following as default: "The property or field name" aka: The unqualified attribute path. | @Override
public Identifier determineBasicColumnName(ImplicitBasicColumnNameSource source) {
return toIdentifier( transformAttributePath( source.getAttributePath() ), source.getBuildingContext() );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getDefaultTargetPropertyName() {\r\n return null;\r\n }",
"public String getDefaultSourcePropertyName() {\r\n return null;\r\n }",
"protected String transformAttributePath(AttributePath attributePath) {\n\t\treturn attributePath.getProperty();\n\t}",
"java.lang.String getProperty();",
"public static boolean getDefaultAttributeQuote()\n {\n return defaults.attribute_quote;\n }",
"String getDefaultPropertyName(ICompilerProject project);",
"@Override\n public String modelName() {\n Optional<? extends AnnotationMirror> mirror =\n Mirrors.findAnnotationMirror(element(), Entity.class);\n if (mirror.isPresent()) {\n return Mirrors.findAnnotationValue(mirror.get(), \"model\")\n .map(value -> value.getValue().toString())\n .filter(name -> !Names.isEmpty(name))\n .orElse(\"default\");\n }\n if (Mirrors.findAnnotationMirror(element(), javax.persistence.Entity.class).isPresent()) {\n Elements elements = processingEnvironment.getElementUtils();\n Name packageName = elements.getPackageOf(element()).getQualifiedName();\n String[] parts = packageName.toString().split(\"\\\\.\");\n return parts[parts.length - 1];\n } else {\n throw new IllegalStateException();\n }\n }",
"public String getStringAttribute();",
"@Override\n public String toDefaultValue(Property p) {\n if (p instanceof StringProperty) {\n StringProperty dp = (StringProperty) p;\n if (dp.getDefault() != null) {\n return \"\\\"\" + dp.getDefault().toString() + \"\\\"\";\n }\n } else if (p instanceof BooleanProperty) {\n BooleanProperty dp = (BooleanProperty) p;\n if (dp.getDefault() != null) {\n return dp.getDefault().toString();\n }\n } else if (p instanceof DateProperty) {\n // TODO\n } else if (p instanceof DateTimeProperty) {\n // TODO\n } else if (p instanceof DoubleProperty) {\n DoubleProperty dp = (DoubleProperty) p;\n if (dp.getDefault() != null) {\n return dp.getDefault().toString();\n }\n } else if (p instanceof FloatProperty) {\n FloatProperty dp = (FloatProperty) p;\n if (dp.getDefault() != null) {\n return dp.getDefault().toString();\n }\n } else if (p instanceof IntegerProperty) {\n IntegerProperty dp = (IntegerProperty) p;\n if (dp.getDefault() != null) {\n return dp.getDefault().toString();\n }\n } else if (p instanceof LongProperty) {\n LongProperty dp = (LongProperty) p;\n if (dp.getDefault() != null) {\n return dp.getDefault().toString();\n }\n }\n\n return null;\n }",
"@Override\r\n public String getDebugPathInfo(String entityName) {\n return null;\r\n }",
"public String getAttributeName(){\n if(field.getAnnotation(Column.class) != null){\n return field.getAnnotation(Column.class).column();\n }\n if( field.getAnnotation(PrimaryKey.class) !=null){\n return field.getAnnotation(PrimaryKey.class).name();\n }\n return null;\n }",
"static String getAntPropertyName( final String property ) {\n if ( property != null &&\n property.startsWith( \"${\" ) && // NOI18N\n property.endsWith( \"}\" ) ) { // NOI18N\n return property.substring( 2, property.length() - 1 );\n } \n return property;\n }",
"String getControllingAttributeName();",
"public String getStringProperty(String propertyName, String defaultValue);",
"@Override\n public String getSecuredElementName() {\n return Preference.PROPERTY_PROPERTY + \"-\" + Preference.PROPERTY_ATTRIBUTE;\n }",
"@Override\r\n\tprotected String getSqlPropertiesPath() {\n\t\treturn null;\r\n\t}",
"@Override\n\tpublic Map<String, Object> getProjectName() {\n\t\treturn Collections.singletonMap(\"wrongAttribute\", \"the project name\");\n\t}",
"public String getProperty() {\n return \"\";\n }",
"protected String attributeToString(PropertyDescriptor prop,\r\n Object value,\r\n Field fieldDef) throws DataLayerException {\r\n try {\r\n // Statement param indexes start with 1, not 0.\r\n if (logCore.isDebugEnabled()) {\r\n logCore.debug(\"Property:\");\r\n logCore.debug(\" Property Name: \" + prop.getDisplayName());\r\n logCore.debug(\" prop.getPropertyType(): \" + prop.getPropertyType().getName());\r\n logCore.debug(\" Value: \" + value.toString());\r\n logCore.debug(\" value.getClass(): \" + value.getClass().getName());\r\n logCore.debug(\" FieldDef Name: \" + fieldDef.getName());\r\n logCore.debug(\" FieldDef Type: \" + fieldDef.getType());\r\n logCore.debug(\" FieldDef Format: \" + fieldDef.getFormat());\r\n }\r\n\r\n String fieldName = prop.getName().toLowerCase();\r\n String fieldType = fieldDef.getType();\r\n String result = null;\r\n\r\n if (fieldType.equals(\"key\") && value == null)\r\n return \"\";\r\n\r\n if (fieldType.equals(\"string\")) {\r\n // value is a String.\r\n result = \"'\" + FormatUtils.parseString(value.toString(), fieldDef) + \"'\";\r\n logCore.debug(\" \" + fieldName + \" (\" + fieldType + \") = '\" + value.toString()\r\n + \"' --> \" + result);\r\n return result;\r\n } else if (fieldType.equals(\"key\")) {\r\n // value is a primary key.\r\n logCore.debug(\" \" + fieldName + \" (\" + fieldType + \") = '\" + value.toString()\r\n + \"' --> \" + value.toString());\r\n return value.toString();\r\n } else if (fieldType.equals(\"date\")) {\r\n if (value != null) {\r\n java.util.Date date = null;\r\n\r\n if (String.class.isAssignableFrom(prop.getPropertyType()))\r\n date = FormatUtils.parseDate(value.toString(), fieldDef);\r\n else if (java.util.Date.class.isAssignableFrom(prop.getPropertyType()))\r\n date = (java.util.Date) value;\r\n else\r\n throw new DataLayerException(\"Error parsing value for field \" + fieldName\r\n + \". Type expected to be Date or String.\");\r\n String out = DateUtils.dateToString(date, \"yyyy-MM-dd HH:mm:ss\");\r\n\r\n result = \"TO_DATE('\" + out + \"', 'YYYY-MM-DD HH24:MI:SS')\";\r\n } else\r\n result = \"''\";\r\n logCore.debug(\" \" + fieldName + \" (\" + fieldType + \") = '\" + value.toString()\r\n + \"' --> \" + result);\r\n return result;\r\n } else if (fieldType.equals(\"long\")) {\r\n Long num = null;\r\n\r\n if (String.class.isAssignableFrom(prop.getPropertyType()))\r\n num = FormatUtils.parseLong(value.toString());\r\n else if (Long.class.isAssignableFrom(prop.getPropertyType()))\r\n num = (Long) value;\r\n else\r\n throw new DataLayerException(\"Error parsing value for field \" + fieldName\r\n + \". Type expected to be Long or String.\");\r\n logCore.debug(\" \" + fieldName + \" (\" + fieldType + \") = '\" + value.toString()\r\n + \"' --> \" + num.toString());\r\n return num.toString();\r\n } else if (fieldType.equals(\"int\")) {\r\n Integer num = null;\r\n\r\n if (String.class.isAssignableFrom(prop.getPropertyType()))\r\n num = FormatUtils.parseInteger(value.toString());\r\n else if (value instanceof Integer)\r\n num = (Integer) value;\r\n else {\r\n log.debug(\"value.getClass(): \" + value.getClass().getName());\r\n throw new DataLayerException(\"Error parsing value for field \" + fieldName\r\n + \". Type expected to be Integer or String.\");\r\n }\r\n logCore.debug(\" \" + fieldName + \" (\" + fieldType + \") = '\" + value.toString()\r\n + \"' --> \" + num.toString());\r\n return num.toString();\r\n } else if (fieldType.equals(\"boolean\")) {\r\n Boolean item = null;\r\n\r\n if (String.class.isAssignableFrom(prop.getPropertyType()))\r\n item = FormatUtils.parseBoolean(value.toString(), fieldDef);\r\n else if (value instanceof Boolean)\r\n item = (Boolean) value;\r\n else\r\n throw new DataLayerException(\"Error parsing value for field \" + fieldName\r\n + \". Type expected to be Boolean or String.\");\r\n\r\n if (item.booleanValue())\r\n result = \"'Y'\";\r\n else\r\n result = \"'N'\";\r\n logCore.debug(\" \" + fieldName + \" (\" + fieldType + \") = '\" + value.toString()\r\n + \"' --> \" + result);\r\n return result;\r\n } else if (fieldType.equals(\"double\") || fieldType.equals(\"float\")) {\r\n BigDecimal item = null;\r\n\r\n if (String.class.isAssignableFrom(prop.getPropertyType()))\r\n item = FormatUtils.parseBigDecimal(value.toString(), fieldDef);\r\n else if (BigDecimal.class.isAssignableFrom(prop.getPropertyType()))\r\n item = (BigDecimal) value;\r\n else\r\n throw new DataLayerException(\"Error parsing value for field \" + fieldName\r\n + \". Type expected to be BigDecimal or String.\");\r\n logCore.debug(\" \" + fieldName + \" (\" + fieldType + \") = '\" + value.toString()\r\n + \"' --> '\" + item.toString() + \"'\");\r\n return item.toString();\r\n } else {\r\n throw new DataLayerException(\r\n \"Error converting attribute to string. Unrecognized data type (\"\r\n + value.getClass() + \").\");\r\n }\r\n } catch (DataLayerException e) {\r\n throw e;\r\n } catch (java.lang.Exception e) {\r\n throw new DataLayerException(\"Error converting attribute to string.\", e);\r\n }\r\n }",
"protected String getPropertyName(){\n return propertyName;\n }",
"default String getQualifiedName() {\n return declaringType().getQualifiedName() + \".\" + this.getName();\n }",
"public String getPropertyName(){\n return SimpleTableField.mapPropName(this.columnName);\n }",
"protected abstract String getAddressPropertyName();",
"@Override\n\tpublic String associatedEntityName(String field) {\n\t\treturn null;\n\t}",
"private String loadAttributeName() {\n return parseMapField().getKey();\n }",
"boolean isDefaultFor(String javaFieldName);",
"@Override\n public String getProperty(String s) {\n return null;\n }",
"public String friendlyName() {\n return this.innerProperties() == null ? null : this.innerProperties().friendlyName();\n }",
"String getPropertyName();",
"public String getPropertyNameMapped(String aName) { return aName; }",
"public String getStringProperty(String propertyName) ;",
"public String getPropertyName();",
"java.lang.String getAttribute();",
"@Override\r\n\tpublic String getAttribute() {\n\t\treturn null;\r\n\t}",
"PropertyName getName();",
"public abstract String metadata(String property);",
"@Test\n public void testGetProperty_String_String() throws Exception {\n String key = \"doesn't exist\";\n String defaultValue = \"default\";\n DatabaseProperties instance = cveDb.getDatabaseProperties();\n String expResult = \"default\";\n String result = instance.getProperty(key, defaultValue);\n assertEquals(expResult, result);\n }",
"protected String getDisplayFieldName(Field field, Property prop) {\n return null;\n }",
"DavPropertyName getName();",
"@Override\n\t\tpublic Object getProperty(String key, Object defaultValue) {\n\t\t\treturn null;\n\t\t}",
"public String prop(String name);",
"java.lang.String getOptionalValue();",
"public static String propertyField(String fieldName, String propName, String altName) {\n\t\tString fieldPropName;\n\t\tboolean propGiven = propName != null && propName.length() > 0;\n\t\tif (!propGiven) {\n\t\t\tthrow new IllegalArgumentException(\"Must specify a property name\");\n\t\t}\n\t\tif (fieldName == null || fieldName.length() == 0) {\n\t\t\tfieldPropName = propName;\n\t\t} else {\n\t\t\tfieldPropName = fieldName + PROP_SEP + propName;\n\t\t}\n\n\t\tif (altName == null || altName.length() == 0) {\n\t\t\treturn fieldPropName;\n\t\t}\n\t\treturn fieldPropName + ALT_SEP + altName;\n\t}",
"String getDefaultAlias();",
"public interface AdminMainEntity {\n\n public static final String MAIN_ENTITY_NAME_PROPERTY = \"__adminMainEntity\";\n\n public String getMainEntityName();\n\n}",
"@Optional\n Property<String> bhkz();",
"@Override\n\tpublic String stringValue(final Attribute att) {\n\t\treturn null;\n\t}",
"@Test\n\tpublic void test_TCM__String_getName() {\n\t\tfinal Attribute attr = new Attribute(\"test\", \"value\");\n\t\tassertTrue(\"incorrect attribute name\", attr.getName().equals(\"test\"));\n\n\t}",
"public String getFieldName(String defaultAliasPrefix) {\r\n String fieldName = getFieldName();\r\n if (defaultAliasPrefix != null && !fieldName.contains(\".\") && !fieldName.contains(AS_KEYWORD)) {\r\n fieldName = defaultAliasPrefix + \".\" + fieldName;\r\n }\r\n return fieldName;\r\n }",
"public interface OxmNamingConvention {\r\n\r\n /**\r\n * Returns the default node/element/attribute name for the given property name.\r\n */\r\n public String getNodeName(String propertyName);\r\n}",
"String getProperty();",
"String getProperty();",
"String getProperty();",
"default String notRequired() {\n return \"Default implementation\";\n }",
"@Override\n\t\tpublic String getPathTranslated() {\n\t\t\treturn null;\n\t\t}",
"@Override\r\n public boolean isNameProperty() throws Exception\r\n {\n return false;\r\n }",
"@Override\n\tpublic String[] getFieldName() {\n\t\treturn new String[]{\"编码\",\"名称\",\"属性\"};\n\t}",
"String getProperty(String name, String defaultValue);",
"public java.lang.String getOldProperty_description(){\n return localOldProperty_description;\n }",
"@Override\n public String foreignKeyColumnName(\n String propertyName,\n String propertyEntityName,\n String propertyTableName,\n String referencedColumnName\n ) {\n\n String header = propertyName != null ? StringHelper.unqualify(\n propertyName) : propertyTableName;\n if (header == null)\n throw new AssertionFailure(\"NamingStrategy not properly filled\");\n\n String col = \"\\\"\" + columnName(header + StringUtils.capitalize(\n referencedColumnName)) + \"\\\"\";\n // System.out.println(\"++++referencedColumnNameMod \" +\n // col);\n return col;\n // return super.foreignKeyColumnName(\n // propertyName,\n // propertyEntityName,\n // propertyTableName,\n // referencedColumnName\n // );\n }",
"private String findAttribute (String className, String attributeName) {\n \tString returnValue = \"\";\n\t\tString toString = className + \".\" + attributeName;\n\t if (theModel.structuralEntities.containsKey(toString)) {\n \treturn className;\n } else { // Determine if attributeName is an inherited attribute \n \t\tString superClassName = indirectAssociations_findSuperClassThatDeclaresVariable(className, attributeName);\n \t\tif ((superClassName != null) && !superClassName.equals(\"\")) {\n \t\t\ttoString = superClassName + \".\" + attributeName;\n \t\t\tif (theModel.structuralEntities.containsKey(toString)) {\n \treturn superClassName;\n \t\t\t}\n \t\t}\n }\n \treturn returnValue;\n\t}",
"@Test\n\t public void testDefaultFatherClassName(){\n\t\t String fatherClassNameReceived=check.getFatherClassName();\n\t\t // fatherClassName default value should be empty string\n\t\t assertEquals(\"\", fatherClassNameReceived);\n\t }",
"@Override\r\n\tprotected String getParentPropertyName(Class beanClass) {\n\t\treturn null;\r\n\t}",
"java.lang.String getFieldOrDefault(\n java.lang.String key,\n java.lang.String defaultValue);",
"private void defaultAttributeShouldBeFound(String filter) throws Exception {\n restAttributeMockMvc.perform(get(\"/api/attributes?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(jsonPath(\"$.[*].id\").value(hasItem(attribute.getId().intValue())))\n .andExpect(jsonPath(\"$.[*].name\").value(hasItem(DEFAULT_NAME.toString())))\n .andExpect(jsonPath(\"$.[*].description\").value(hasItem(DEFAULT_DESCRIPTION.toString())))\n .andExpect(jsonPath(\"$.[*].showOrder\").value(hasItem(DEFAULT_SHOW_ORDER)))\n .andExpect(jsonPath(\"$.[*].active\").value(hasItem(DEFAULT_ACTIVE.booleanValue())));\n }",
"public String getAttributeName() {\n/* 85 */ return this.attributeName;\n/* */ }",
"abstract protected String getResourceBundlePropName();",
"@Override\r\n\tpublic String getFormat() {\r\n\t\treturn \"properties\";\r\n\t}",
"public String getProperty(String key,\n String defaultValue) {\n if (this.ignoreCase) {\n key = key.toUpperCase();\n }\n\n return this.attributes.getProperty(key, defaultValue);\n }",
"Optional<String> getOName();",
"private String getGetMethodName() {\n assert name != null;\n if (field != null && (field.getType() == Boolean.class\n || \"boolean\".equals(field.getType().getName()))) {\n return \"is\" + upperFirstChar(name);\n }\n return \"get\" + upperFirstChar(name);\n }",
"java.lang.String getField1025();",
"public void testGetColumnName_Default_Accuracy() {\r\n assertEquals(\"The columnName value should be got properly.\", null, auditDetail.getColumnName());\r\n }",
"@NonNull\n String getNecessaryAttribute();",
"public String getOptionalStringProperty(String property) {\n\t\treturn testProperties.getProperty(property);\n\t}",
"java.lang.String getField1016();",
"protected String getProperty(String prop) {\n\t\tLogManager mgr = LogManager.getLogManager();\n\t\tif (name.length() > 0) {\n\t\t\tString key = String.format(\"%s(\\\"%s\\\").%s\", getClass().getName(), name, prop);\t\t\t\n\t\t\tString val = mgr.getProperty(key);\n\t\t\tif (val != null)\n\t\t\t\treturn val;\t\t\t\n\t\t}\t\t\n\t\treturn mgr.getProperty(getClass().getName() + \".\" + prop);\t\t\t\n\t}",
"String optString(int index, String defaultValue) {\n Object object = this.opt(index);\n return PropertyObject.NULL.equals(object) ? defaultValue : object.toString();\n }",
"private static String createNameForProperty(String prop) {\r\n if (prop == null)\r\n return \"property\";\r\n String theProp = prop;\r\n\r\n // remove last \"AnimationProperties\"\r\n if (theProp.length() > 10\r\n && theProp.substring(theProp.length() - 10).equalsIgnoreCase(\r\n \"properties\"))\r\n theProp = theProp.substring(0, theProp.length() - 10);\r\n // first char is lowercase\r\n if (theProp.length() > 0)\r\n theProp = theProp.toLowerCase().charAt(0) + theProp.substring(1);\r\n return theProp;\r\n }",
"public String getIsEntityRequired() {\n return Boolean.TRUE.toString();\n }",
"java.lang.String getField1406();",
"private String getPropertyName(@Nullable final EntityProperty entityProperty, final String fieldName) {\n if (entityProperty != null && !isEmpty(entityProperty.name())) {\n return entityProperty.name();\n }\n return fieldName;\n }",
"public String getPropertyName()\n {\n return propertyName;\n }",
"@Override\n\tpublic String toString(final Attribute att) {\n\t\treturn null;\n\t}",
"public String getAnnotationSubPackageProperty() {\n return null;\n }",
"java.lang.String getAttributesOrDefault(java.lang.String key, java.lang.String defaultValue);",
"@Serialize//(getName = \"property\")\r\n\tpublic String getName()\r\n\t{\r\n\t\treturn _name; \r\n\t}",
"public String getRelationPropertyName() {\n return getForeignPropertyName();\n }",
"public String getNullAttribute();",
"@Override\n\t\t\tpublic <V> V get(ConfigurationProperty<V> property) {\n\t\t\t\treturn (V) \"Unit Test Dummy Name\";\n\t\t\t}",
"public abstract String getDatabaseColumnName(String entityName, String propertyName);",
"public String getEntityName() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String getPathTranslated() {\n\t\treturn null;\n\t}",
"public String annotation() {\n return this.innerProperties() == null ? null : this.innerProperties().annotation();\n }",
"java.lang.String getField1702();",
"public String getName(){\n return field.getName();\n }",
"@Override\r\n\t\tpublic boolean hasAttribute(String name)\r\n\t\t\t{\n\t\t\t\treturn false;\r\n\t\t\t}",
"private static String getPropertyValueOrDefault(String value) {\n return value != null ? value : \"\";\n }",
"public String propertyMissing(String name) {\n\t\treturn bnd.propertyMissing(name);\n\t}",
"public String getDependentParamMetadataString();",
"@JsonProperty(\"name\")\n@ApiModelProperty(example = \"myTestMapping\", value = \"A user specified string that is a name for this mapping.\")\n public String getName() {\n return name;\n }"
] | [
"0.5844835",
"0.5691401",
"0.5675163",
"0.56204706",
"0.5594406",
"0.5516647",
"0.5509249",
"0.5473914",
"0.5471281",
"0.5470394",
"0.54687667",
"0.54425454",
"0.54418105",
"0.542",
"0.54021454",
"0.5389513",
"0.5385",
"0.5374704",
"0.5372788",
"0.5365592",
"0.53650343",
"0.53617793",
"0.5360879",
"0.5341496",
"0.5326592",
"0.5326071",
"0.52925473",
"0.5291765",
"0.52633375",
"0.5261164",
"0.5227488",
"0.5220691",
"0.52197146",
"0.5212488",
"0.5212215",
"0.51877356",
"0.51817167",
"0.518041",
"0.5173891",
"0.5160589",
"0.5139643",
"0.5128561",
"0.51249385",
"0.51178324",
"0.51168436",
"0.51116216",
"0.5098868",
"0.5097844",
"0.5096056",
"0.5095023",
"0.5094766",
"0.5094766",
"0.5094766",
"0.509366",
"0.508833",
"0.5074939",
"0.5073449",
"0.507191",
"0.5069899",
"0.5066549",
"0.5058213",
"0.50563824",
"0.50548446",
"0.5053255",
"0.5053248",
"0.50482047",
"0.5039292",
"0.50384015",
"0.5032126",
"0.5030528",
"0.50233686",
"0.50190043",
"0.50139177",
"0.5011489",
"0.50111943",
"0.5011074",
"0.5009772",
"0.5007691",
"0.5002843",
"0.49985942",
"0.49907514",
"0.49866053",
"0.49798548",
"0.49651664",
"0.49552342",
"0.49547133",
"0.49525157",
"0.49426332",
"0.49397054",
"0.49356875",
"0.4930354",
"0.49244866",
"0.4923527",
"0.49215323",
"0.49207878",
"0.49189878",
"0.49181584",
"0.49180815",
"0.49166363",
"0.4915099",
"0.49050525"
] | 0.0 | -1 |
JPA states we should use the following as default: (1) if there is a "referencing relationship property": "The concatenation of the following: the name of the referencing relationship property or field of the referencing entity or embeddable class; "_"; the name of the referenced primary key column." (2) if there is no such "referencing relationship property", or if the association is an element collection: "The concatenation of the following: the name of the entity; "_"; the name of the referenced primary key column" todo : we need to better account for "referencing relationship property" | @Override
public Identifier determineJoinColumnName(ImplicitJoinColumnNameSource source) {
final String name;
if ( source.getNature() == ImplicitJoinColumnNameSource.Nature.ELEMENT_COLLECTION
|| source.getAttributePath() == null ) {
name = transformEntityName( source.getEntityNaming() )
+ '_'
+ source.getReferencedColumnName().getText();
}
else {
name = transformAttributePath( source.getAttributePath() )
+ '_'
+ source.getReferencedColumnName().getText();
}
return toIdentifier( name, source.getBuildingContext() );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getRelationPropertyName() {\n return getForeignPropertyName();\n }",
"public String getInverseRelationshipName ();",
"EReference getRelationReference();",
"@Override\n\tpublic String toString() {\n\t\treturn \"(relation \" +\n\t\t\t\t(this.source != null ? this.source.getId() : \"nil\") + \" \" +\n\t\t\t\tthis.name.toString() + \" \" +\n\t\t\t\t(this.dest != null ? this.dest.toString() : \"nil\") + \")\";\n\t}",
"public ObjectProp getRelationship() {\n return relationship;\n }",
"public OBOProperty getDefaultRelationship() {\n return DEFAULT_REL; // genotype influences phenotype\n }",
"public String toStringWithRelation();",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getRelatedTo();",
"public String getForeignPropertyName() {\n return _foreignPropertyName;\n }",
"@Override\n\t\tpublic boolean hasRelationship() {\n\t\t\treturn false;\n\t\t}",
"public String relation_str(DaikonVariableInfo var) {\n String out = parent_ppt_name + \" \" + id;\n if (!var.isStatic() && (local_prefix != null) && !local_prefix.equals(parent_prefix)) {\n out += \" \" + var.getName().replaceFirst(Pattern.quote(local_prefix), parent_prefix);\n }\n return out;\n }",
"@Override\n public String toString() {\n return \"RelatedOrg {\"\n + \"}\";\n }",
"public String[] getRelations() {\n/* 270 */ return getStringArray(\"relation\");\n/* */ }",
"Column referencedColumn();",
"@Override\n\tpublic String associatedEntityName(String field) {\n\t\treturn null;\n\t}",
"@DISPID(1610940428) //= 0x6005000c. The runtime will prefer the VTID if present\n @VTID(34)\n Relations relations();",
"public String getRelation() {\n return relation;\n }",
"public String toStringWithRelation() {\r\n StringBuilder sb = new StringBuilder();\r\n sb.append(toString());\r\n String l = \"\\n \";\r\n if (_member != null)\r\n { sb.append(l).append(xbRDS(_member, \"member\")); }\r\n if (_region != null)\r\n { sb.append(l).append(xbRDS(_region, \"region\")); }\r\n return sb.toString();\r\n }",
"protected String getRelatedTextKey(String propertyName) {\n return propertyName + \"::\" + RELATEDTEXT_ID_SUFFIX;\n }",
"public final native String getRelationship() /*-{\n return this.getRelationship();\n }-*/;",
"@Override\r\n public MetadataDescriptor getReferenceDescriptor() {\r\n if (isDirectEmbeddableCollection()) {\r\n return getEmbeddableAccessor().getDescriptor();\r\n } else {\r\n return super.getReferenceDescriptor();\r\n }\r\n }",
"public String getPromotionRelationshipDescriptor() {\n\t\treturn mPromotionRelationshipDescriptor;\n\t}",
"public void setRelationship( String relationship ) {\n this.relationship = relationship;\n }",
"java.lang.String getFkocs();",
"public void setRelatedTo(java.lang.String value);",
"public String get_relation() {\n\t\treturn relation;\n\t}",
"public java.lang.Object[] getRelationsAsReference() {\n return relationsAsReference;\n }",
"@Override\n\tpublic String getReferencedEntityClassName() {\n\t\treturn null;\n\t}",
"@Dump(compound = true)\n public BwRelatedTo getRelatedTo() {\n return relatedTo;\n }",
"@JsonIgnore\r\n public String getReferenceId() {\r\n return OptionalNullable.getFrom(referenceId);\r\n }",
"@NonNull String getAssociationsLink() {\n return associationsLink;\n }",
"ReferenceProperty createReferenceProperty();",
"@ApiModelProperty(required = true, value = \"Type of the product relationship, such as [bundled] if the product is a bundle and you want to describe the bundled products inside this bundle; [reliesOn] if the product needs another already owned product to rely on (e.g. an option on an already owned mobile access product) [targets] or [isTargeted] (depending on the way of expressing the link) for any other kind of links that may be useful\")\n @NotNull\n\n\n public String getRelationshipType() {\n return relationshipType;\n }",
"public String getOneOrMany()\n\t{\n\t\treturn oneOrMany;\n\t}",
"@Override\n\tpublic boolean isAssociatedEntityField(String field) {\n\t\treturn false;\n\t}",
"public String getADDITIONAL_REFERENCE() {\r\n return ADDITIONAL_REFERENCE;\r\n }",
"public String toStringPrologFormatListRelationship()\r\n\t{\n\t\t\r\n\t\tString output = \"[\";\r\n\r\n\t\tfor (Relationship Re : this.listRelationship)\r\n\t\t{\r\n\t\t\toutput += Re.toStringPrologFormat();\r\n\t\t\toutput += \",\";\r\n\t\t}\r\n\t\toutput = output.substring(0, output.length()-1);\r\n\t\toutput += \"]\";\r\n\t\treturn output;\t\r\n\t}",
"@Override\n public String getEntityName() {\n return \"FavouriteAssociations\";\n }",
"public interface Entity {\n\n // ===================================================================================\n // Display String\n // ==============\n /**\n * @return The display string of basic informations with one-nested relation values. (NotNull)\n */\n public String toStringWithRelation();\n\n /**\n * @param name The name for display. (NullAllowed: If it's null, it does not have a name)\n * @param column Does it contains column values or not?\n * @param relation Does it contains relation existences or not?\n * @return The display string for this entity. (NotNull)\n */\n public String buildDisplayString(String name, boolean column, boolean relation);\n}",
"private void handleJoinColumns(JsonNode propertyNode, JAnnotationUse jAnnotationUse, String annotationKey) {\n if (propertyNode.has(JpaConstants.JOIN_COLUMNS)) {\n JsonNode node = propertyNode.get(annotationKey);\n if (Objects.isNull(node)) {\n return;\n }\n\n // Create Join Column\n JAnnotationUse joinColumn = jAnnotationUse.annotationParam(annotationKey, JoinColumn.class);\n // Get name value\n if (node.has(JpaConstants.NAME)) {\n String joinColumnName = node.get(JpaConstants.NAME).asText();\n joinColumn.param(JpaConstants.NAME, joinColumnName);\n }\n // Get REFERENCED_COLUMN_NAME value and append\n if (node.has(JpaConstants.REFERENCED_COLUMN_NAME)) {\n joinColumn.param(JpaConstants.REFERENCED_COLUMN_NAME, node.get(JpaConstants.REFERENCED_COLUMN_NAME).asText());\n }\n }\n }",
"public String asRelativeReference() {\n return member == null ? name : name + \"$\" + member;\n }",
"@Override\n public boolean isUseForeignKeyPrefix() {\n return useForeignKeyPrefix;\n }",
"@Override\n\tpublic boolean isAssociatedEntity(String field) {\n\t\treturn false;\n\t}",
"public String getType() {\n return relationshipName;\n }",
"public String getDescricaoRelatorio() {\n\t\treturn descricaoRelatorio;\n\t}",
"public String getCascadeConstraintsString() {\n \t\treturn \"\";\n \t}",
"@Override\n public String foreignKeyColumnName(\n String propertyName,\n String propertyEntityName,\n String propertyTableName,\n String referencedColumnName\n ) {\n\n String header = propertyName != null ? StringHelper.unqualify(\n propertyName) : propertyTableName;\n if (header == null)\n throw new AssertionFailure(\"NamingStrategy not properly filled\");\n\n String col = \"\\\"\" + columnName(header + StringUtils.capitalize(\n referencedColumnName)) + \"\\\"\";\n // System.out.println(\"++++referencedColumnNameMod \" +\n // col);\n return col;\n // return super.foreignKeyColumnName(\n // propertyName,\n // propertyEntityName,\n // propertyTableName,\n // referencedColumnName\n // );\n }",
"@Override\n\tpublic String getAddForeignKeyConstraintString(String constraintName, String[] foreignKey, String referencedTable, String[] primaryKey, boolean referencesPrimaryKey) {\n\t\treturn \" \";\n\t}",
"public java.lang.String getZqu__Relationship_Field_Name__c() {\r\n return zqu__Relationship_Field_Name__c;\r\n }",
"private String addClassAssociations() {\n\n symplifyClassRelationMap();\n\n String result = \"\";\n Set<String> keys = classRelationMap.keySet(); // get all keys\n\n for (String key : keys) {\n\n String[] classes = key.split(\"-\");\n\n if (mapIfInterface.get(classes[0])) result += \"[<interface>;\" + classes[0] + \"]\";\n else result += \"[\" + classes[0] + \"]\";\n\n result += classRelationMap.get(key); // Add connection\n\n if (mapIfInterface.get(classes[1])) result += \"[<interface>;\" + classes[1] + \"]\";\n else result += \"[\" + classes[1] + \"]\";\n\n result += \",\";\n }\n return result;\n }",
"@Override\n public String convertToString(LinkedProperty property, Object val) {\n return null;\n }",
"public Map<String, Object> getRelatedKeys() throws ODataJPAProcessorException;",
"@Override\r\n\tpublic String toString() {\r\n\t\tString _infoReferencia = String.format(\"INFORMACIÓN DE REFERENCIA:\\n--------------------------------------\\n\"\r\n\t\t\t\t\t\t\t\t\t\t\t + \"Código de referencias: %s\\n\", this._codigoReferencia);\r\n\t\t\r\n\t\treturn _infoReferencia + super.toString();\r\n\t}",
"public String getClazz() {\n return relationshipName;\n }",
"public static String formatRelationship(String relationship) {\n\t\tDate asofToday = ErdUtils.asOfToday();\n\t\tPsTranslationItem psXlatItem = PsTranslationItem.findByFieldNameAndFieldValueAndEffectiveDate(\"RELATIONSHIP\", relationship, asofToday);\n\t\trelationship = psXlatItem.getXlatLongName();\n\t\tif(relationship != null) {\n\t\t\trelationship = relationship.toUpperCase();\n\t\t\tif(relationship.length() > 20) {\n\t\t\t\trelationship = relationship.substring(0, 20);\n\t\t\t}\n\t\t}\n\t\treturn relationship;\n\t}",
"String getContainmentReference();",
"public Relationship getRelationship() {\n\t\treturn relationship;\n\t}",
"@Override\n\tpublic String toString()\n\t{\n\t\treturn belong+\"-\"+name;\n\t}",
"@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getReferencedTables() != null)\n sb.append(\"ReferencedTables: \").append(getReferencedTables());\n sb.append(\"}\");\n return sb.toString();\n }",
"public String getParticulierAssociation() {\r\n\t\treturn particulierAssociation;\r\n\t}",
"public String friendlyName() {\n return this.innerProperties() == null ? null : this.innerProperties().friendlyName();\n }",
"public String getDatabaseGeneratedReferencedColumnValue() {\n return null;\n }",
"public Long getRelateId() {\n return relateId;\n }",
"public Relationship.Name getName() {\n return name;\n }",
"public java.lang.String getRELATION_ID() {\r\n return RELATION_ID;\r\n }",
"@java.lang.Deprecated\n public io.kubernetes.client.openapi.models.V1ObjectReference getRelated();",
"public String getRelationType()\n {\n String relationType = \"PSX\";\n Iterator i = m_keyNames.iterator();\n while (i.hasNext())\n {\n relationType += i.next().toString();\n }\n relationType += \"Relation\";\n\n return relationType;\n }",
"RelatingBuildingElementType getRelatingBuildingElement();",
"boolean isOneToMany();",
"public boolean referenceColumnInSql() {\n return false;\n }",
"public interface IRelationship<A extends IAttribute> extends IErdNode\n{\n\n /**\n * check the relationship, if the two connected entities are the same\n *\n * @return recursive\n */\n boolean isRecursive();\n\n /**\n * check if this relationship is a weak relationship\n * -> one of the entities is weak\n *\n * @return weak\n */\n boolean isWeakRelationship();\n\n /**\n * return the description of the relationship\n *\n * @return description\n */\n String getDescription();\n\n /**\n * create new attribute to relationship\n *\n * @param p_id name of the attribute\n * @param p_property of the attribute\n * @return self-reference\n */\n A createAttribute( @NonNull final String p_id, @Nonnull final String p_property );\n\n /**\n * get all connected attributes from the relationship in a map\n *\n * @return map with all attributes\n */\n Map<String, IAttribute> getConnectedAttributes();\n\n /**\n * connect entity incl. cardinality to the relationship\n *\n * @param p_entity name of the entity\n * @param p_cardinality cardinality\n * @return self-reference\n */\n IEntity<A> connectEntity( @NonNull final IEntity<IAttribute> p_entity, @NonNull final String p_cardinality );\n\n /**\n * return the connected entities in a map\n *\n * @return connected entities\n */\n Map<String, Collection<String>> getConnectedEntities();\n\n}",
"DefinedProperty relAddProperty( long relId, int propertyKey, Object value );",
"@Nullable\n public RelationInfo relation() {\n return relation;\n }",
"public boolean isPureFK() { // derived property\n return !_additionalFK && !_referrerAsOne;\n }",
"@JsonGetter(\"reference\")\r\n public String getReference ( ) { \r\n return this.reference;\r\n }",
"public String getRefPropertyName() {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\treturn \"lfims:branches\";\r\n\t\t\t\t\t}",
"public String getInverseRelationshipName ()\n\t{\n\t\treturn getRelationshipImpl().getInverseRelationshipName();\n\t}",
"private String getJoins() {\r\n\t\treturn joins;\r\n\t}",
"public void set_relation(String relation){\n\t\tthis.relation = relation;\n\t}",
"public String[] listRelations();",
"default String getQualifiedName() {\n return declaringType().getQualifiedName() + \".\" + this.getName();\n }",
"public Map<String, Set<String>> getRelatedEntities() {\n return relatedEntities;\n }",
"public boolean relationalExpressionTypeDerivation() {\r\n\t\treturn this.getImpl().relationalExpressionTypeDerivation();\r\n\t}",
"public boolean isAssocProperty();",
"boolean isInverseFunctionalLinkProperty();",
"protected boolean[] getEntityEagerPropertyFetches() {\n \t\treturn null;\n \t}",
"public CodeableConcept relationship() {\n return getObject(CodeableConcept.class, FhirPropertyNames.PROPERTY_RELATIONSHIP);\n }",
"EReference getModelReference();",
"@Optional\n Association<GebaeudeArtStaBuComposite> gebaeudeArtStaBu();",
"@Override\n\tpublic String toString() {\n\t\tString strg= \"Property Name: \"+propertyName\n\t +\"\\nLocated in \"+city\n\t +\"\\nBelonging to: \"+ owner\n\t +\"\\nRent Amount: \"+rentAmount+\"\\n\";\n\t\treturn strg;\n\t}",
"public String buildDisplayString(String name, boolean column, boolean relation) {\r\n StringBuilder sb = new StringBuilder();\r\n if (name != null) { sb.append(name).append(column || relation ? \":\" : \"\"); }\r\n if (column) { sb.append(buildColumnString()); }\r\n if (relation) { sb.append(buildRelationString()); }\r\n sb.append(\"@\").append(Integer.toHexString(hashCode()));\r\n return sb.toString();\r\n }",
"public String getRelatedObjectName() {\n return relatedObjectName;\n }",
"@Nullable\n String getRef();",
"public String getCustomerRelationshipAlertNarrative() {\n return customerRelationshipAlertNarrative;\n }",
"public boolean isAdditiveProperty() {\n\t\treturn false;\n\t}",
"@Override\n \tpublic void addIsCitedBy(Reference reference) {\n \t\tList<Reference> isCitedBy = getIsCitedBy();\n \t\t// check for existing relationship\n \t\tif (reference == null || isCitedBy.contains(reference))\n \t\t\treturn;\n \t\t// add both sides of relationship\n \t\treference.getCitationList().add(this);\n \t\tisCitedBy.add(reference);\n \t}",
"public interface ElPropertyValue extends ElPropertyDeploy {\r\n\r\n /**\r\n * Return the Id values for the given bean value.\r\n */\r\n public Object[] getAssocOneIdValues(Object bean);\r\n\r\n /**\r\n * Return the Id expression string.\r\n * <p>\r\n * Typically used to produce id = ? expression strings.\r\n * </p>\r\n */\r\n public String getAssocOneIdExpr(String prefix, String operator);\r\n\r\n /**\r\n * Return the logical id value expression taking into account embedded id's.\r\n */\r\n public String getAssocIdInValueExpr(int size);\r\n \r\n /**\r\n * Return the logical id in expression taking into account embedded id's.\r\n */\r\n public String getAssocIdInExpr(String prefix);\r\n \r\n /**\r\n * Return true if this is an ManyToOne or OneToOne associated bean property.\r\n */\r\n public boolean isAssocId();\r\n\r\n /**\r\n * Return true if any path of this path contains a Associated One or Many.\r\n */\r\n public boolean isAssocProperty();\r\n\r\n /**\r\n * Return true if the property is encrypted via Java.\r\n */\r\n public boolean isLocalEncrypted();\r\n \r\n /**\r\n * Return true if the property is encrypted in the DB.\r\n */\r\n public boolean isDbEncrypted();\r\n\r\n /**\r\n * Return the deploy order for the property.\r\n */\r\n public int getDeployOrder();\r\n \r\n /**\r\n * Return the default StringParser for the scalar property.\r\n */\r\n public StringParser getStringParser();\r\n\r\n /**\r\n * Return the default StringFormatter for the scalar property.\r\n */\r\n public StringFormatter getStringFormatter();\r\n\r\n /**\r\n * Return true if the last type is \"DateTime capable\" - can support\r\n * {@link #parseDateTime(long)}.\r\n */\r\n public boolean isDateTimeCapable();\r\n\r\n /**\r\n * Return the underlying JDBC type or 0 if this is not a scalar type.\r\n */\r\n public int getJdbcType();\r\n \r\n /**\r\n * For DateTime capable scalar types convert the long systemTimeMillis into\r\n * an appropriate java time (Date,Timestamp,Time,Calendar, JODA type etc).\r\n */\r\n public Object parseDateTime(long systemTimeMillis);\r\n\r\n /**\r\n * Return the value from a given entity bean.\r\n */\r\n public Object elGetValue(Object bean);\r\n\r\n /**\r\n * Return the value ensuring objects prior to the top scalar property are\r\n * automatically populated.\r\n */\r\n public Object elGetReference(Object bean);\r\n\r\n /**\r\n * Set a value given a root level bean.\r\n * <p>\r\n * If populate then\r\n * </p>\r\n */\r\n public void elSetValue(Object bean, Object value, boolean populate, boolean reference);\r\n\r\n /**\r\n * Make the owning bean of this property a reference (as in not new/dirty).\r\n */\r\n public void elSetReference(Object bean);\r\n\r\n /**\r\n * Convert the value to the expected type.\r\n * <p>\r\n * Typically useful for converting strings to the appropriate number type\r\n * etc.\r\n * </p>\r\n */\r\n public Object elConvertType(Object value);\r\n}",
"public String revealRelationshipsInX() {\n\t\tString x = \"\";\n\t\tif (this.numXVertices > 0) {\n\t\t\tint start = this.vertices.size() - this.numXVertices; // location where X vertices start\n\t\t\tfor (int i = start; i < this.vertices.size(); i++) {\n\t\t\t\t// find x_i and print it with all its neighbors\n\t\t\t\tx += this.vertices.get(i).toString() + \": \" + this.vertices.get(i).getNeighbors() + \"\\n\";\n\t\t\t}\n\t\t}\n\t\treturn x;\n\t}",
"@Override\n\t\t\tpublic String getPropertyId() {\n\t\t\t\treturn null;\n\t\t\t}",
"private void createNonRelationalMapping(PropertyDescriptor property)\n throws Exception {\n ClassDescriptor declaringClassDescriptor = property.parent();\n JavaModel javaModel = du.getJavaModel();\n Object propertyType = getJavaType(property);\n if (javaModel.isBasic(propertyType)) {\n BasicDescriptor basic = of.createBasicDescriptor();\n basic.setFetch(FetchType.EAGER);\n property.setMapping(basic);\n return;\n } else if (declaringClassDescriptor.isEmbeddable()) {\n property.setEmbedded(of.createEmbeddedDescriptor());\n return;\n } else if (javaModel.isAssignable(\n javaModel.getJavaType(Clob.class.getName()), propertyType)) {\n LobDescriptor lob = of.createLobDescriptor();\n lob.setType(LobType.CLOB);\n lob.setFetch(FetchType.LAZY);\n property.setMapping(lob);\n } else if (javaModel.isAssignable(\n javaModel.getJavaType(Blob.class.getName()), propertyType)) {\n LobDescriptor lob = of.createLobDescriptor();\n lob.setType(LobType.BLOB);\n lob.setFetch(FetchType.LAZY);\n property.setMapping(lob);\n } else if (javaModel.isAssignable(\n javaModel.getJavaType(Serializable.class.getName()),\n propertyType)) {\n SerializedDescriptor serialized = of.createSerializedDescriptor();\n serialized.setFetch(FetchType.EAGER);\n property.setMapping(serialized);\n } else {\n // Should this be caught by verifier in an earlier step?\n throw new DeploymentException(\n i18NHelper.msg(\"EXC_NotAbleToDefaultMappingForProperty\", // NOI18N\n property.getName(),\n declaringClassDescriptor.getName()));\n }\n }",
"public String getRel() {\r\n return rel;\r\n }"
] | [
"0.632889",
"0.60385144",
"0.60206753",
"0.6020039",
"0.59826976",
"0.594323",
"0.5721435",
"0.5701349",
"0.56623685",
"0.5635431",
"0.5632603",
"0.5538517",
"0.54936904",
"0.54859805",
"0.54762965",
"0.54358506",
"0.5416464",
"0.5394729",
"0.5380919",
"0.53691596",
"0.5347236",
"0.53373873",
"0.5305656",
"0.5296616",
"0.5294276",
"0.52923965",
"0.5268168",
"0.52630943",
"0.52494824",
"0.52388746",
"0.52306384",
"0.5227038",
"0.5226116",
"0.5220755",
"0.5212661",
"0.52035266",
"0.5195626",
"0.5186795",
"0.51839983",
"0.5176497",
"0.5157608",
"0.513519",
"0.5133161",
"0.5132744",
"0.51180077",
"0.5117986",
"0.5103591",
"0.5098758",
"0.50963855",
"0.5084694",
"0.50317323",
"0.50248444",
"0.5016422",
"0.50157857",
"0.50127983",
"0.50004643",
"0.49894437",
"0.498647",
"0.495051",
"0.49418706",
"0.49345133",
"0.49265948",
"0.49096957",
"0.49086526",
"0.4900227",
"0.48983726",
"0.4897436",
"0.4883314",
"0.4879924",
"0.4878005",
"0.48731288",
"0.48607048",
"0.48600292",
"0.48566866",
"0.48527217",
"0.48498353",
"0.48428905",
"0.48424816",
"0.48363498",
"0.48268554",
"0.48258513",
"0.48185906",
"0.4818353",
"0.48135364",
"0.48128057",
"0.4808602",
"0.48072264",
"0.47961393",
"0.4793345",
"0.47924486",
"0.47879815",
"0.47817048",
"0.47658592",
"0.47533438",
"0.47409743",
"0.47376874",
"0.4734765",
"0.4726481",
"0.47138616",
"0.47052276",
"0.47027373"
] | 0.0 | -1 |
JPA states we should use the following as default: "the same name as the primary key column [of the referenced table]" | @Override
public Identifier determinePrimaryKeyJoinColumnName(ImplicitPrimaryKeyJoinColumnNameSource source) {
return source.getReferencedPrimaryKeyColumnName();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Column referencedColumn();",
"@Override\n\tpublic String getPKFieldName() {\n\t\treturn null;\n\t}",
"@Override\n\t\tpublic String getPKFieldName() {\n\t\t\treturn null;\n\t\t}",
"@Override\n public String getPrimaryKey(String tableName) {\n return super.getPrimaryKey(tableName);\n }",
"@Id\n\t@Key\n\t@Override\n\tpublic String getId()\n\t{\n\t\treturn super.getId();\n\t}",
"protected String getDatabasePkColumnName() {\n return this.pkColumn == null ? getPlan().getDocIdField() : this.pkColumn;\n }",
"public Object generalPK() {\n\t\treturn null;\r\n\t}",
"@Override\npublic String findParentKeyColumnName()\n{\n\treturn null;\n}",
"@Override\n\t\tpublic String getParentPKFieldName() {\n\t\t\treturn null;\n\t\t}",
"@Override\n\tpublic Key getPk() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic Key getPk() {\n\t\treturn null;\n\t}",
"boolean referencesSingleColumnPrimaryKey();",
"public String getPkName() {\n\t\treturn \"id\";\n\t}",
"default Set<String> nameOfGeneratedIdentityColumn() { return new HashSet<>(Arrays.asList(new String[] {\n \"SCOPE_IDENTITY()\", \"IDENTITY()\", \"1\" })); }",
"@Override\n public boolean isUseForeignKeyPrefix() {\n return useForeignKeyPrefix;\n }",
"@Override\n\tpublic String getPkVal() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String findParentKeyColumnName()\n\t{\n\t\treturn null;\n\t}",
"@Override\n\tpublic Object getPrimaryKey() {\n\t\treturn null;\n\t}",
"@Override\r\n\tpublic String getPrimaryKey() {\n\t\treturn \"ID\";\r\n\t}",
"public String naturalKeyName() {\n return idName();\n }",
"@Override\r\n\tpublic String getIdFieldName() {\n\t\treturn null;\r\n\t}",
"@Id\n\t@Key\n\t@Override\n\tpublic void setId(String id)\n\t{\n\t\tsuper.setId(id);\n\t}",
"public boolean referenceColumnInSql() {\n return false;\n }",
"public TdNmResumenPK() {\n }",
"public String getColumnForPrimaryKey() {\n return null;\n }",
"public abstract String getPrimaryKey(String tableName);",
"public static String getPrimaryKeyName() {\r\n\t\t\treturn PRIMARY_KEY_ID;\r\n\t\t}",
"protected String getIdentityColumnString() throws MappingException {\n \t\tthrow new MappingException( getClass().getName() + \" does not support identity key generation\" );\n \t}",
"public TdOficioAfectacionPK() {\n }",
"public static void addDefaultJoinColumnForCompositePK(IdentifiableClass identifiableClass,\r\n Attribute attribute, Set<String> allFields, List<JoinColumn> joinColumns) {\r\n if (attribute instanceof SingleRelationAttribute) {\r\n SingleRelationAttribute relationAttribute = (SingleRelationAttribute) attribute;\r\n if (!relationAttribute.isOwner()) { //Only Owner will draw edge because in any case uni/bi owner is always exist\r\n return;\r\n }\r\n\r\n //check is it composite key\r\n Entity targetEntity = relationAttribute.getConnectedEntity();\r\n relationAttribute.getJoinColumn().clear();\r\n if (joinColumns == null || joinColumns.isEmpty()) {\r\n //unused snippet\r\n for (Attribute targetAttribute : targetEntity.getAttributes().getPrimaryKeyAttributes()) {\r\n JoinColumn joinColumn = new JoinColumn();\r\n String joinColumnName = (targetEntity.getClazz() + '_' + targetAttribute.getName()).toUpperCase();\r\n joinColumnName = getNext(joinColumnName, nextJoinColumnName -> allFields.contains(nextJoinColumnName));\r\n joinColumn.setName(joinColumnName);\r\n if (targetAttribute instanceof RelationAttribute) {\r\n Entity connectedEntity = ((RelationAttribute) targetAttribute).getConnectedEntity();\r\n if (connectedEntity.getCompositePrimaryKeyType() != null) {\r\n //TODO \r\n } else {\r\n Id id = connectedEntity.getAttributes().getId().get(0);\r\n joinColumn.setReferencedColumnName(targetAttribute.getName() + \"_\" + id.getDefaultColumnName());\r\n }\r\n } else {\r\n joinColumn.setReferencedColumnName(targetAttribute.getName());\r\n }\r\n relationAttribute.getJoinColumn().add(joinColumn);\r\n }\r\n } else {\r\n //called from db exception handeler\r\n relationAttribute.getJoinColumn().addAll(joinColumns);\r\n }\r\n }\r\n }",
"boolean getPrimaryKey();",
"private boolean includePrimaryKeyColumns() {\n\t\treturn false;\r\n\t}",
"@Override\n @Transient\n public Integer getParentId()\n {\n return parentTblId;\n }",
"@Override\n public String getKey()\n {\n return id; \n }",
"boolean isPrimaryKey();",
"public PrimaryKey getPrimaryKey();",
"public String getDatabaseGeneratedReferencedColumnValue() {\n return null;\n }",
"@Test\n\tpublic void getIdTest() {\n\t\tAssert.assertEquals(DEFAULT_ID, getDefaultKey().getId());\n\t}",
"public String getFirstKeyColumnName() {\r\n\t\treturn \"userId\";\r\n\t}",
"public int getEmployeePK() {\n return employeePK;\n}",
"@Override\n public ResultSet getGeneratedKeys() throws SQLException {\n return null;\n }",
"@Override\n\tpublic long getClassPK() {\n\t\treturn _changesetEntry.getClassPK();\n\t}",
"public String getPkColumnName() {\n return featureDao.getPkColumnName();\n }",
"@Override\n public String joinKeyColumnName(\n String joinedColumn, String joinedTable\n ) {\n return super.joinKeyColumnName(joinedColumn, joinedTable);\n }",
"public String getPrimaryKey() {\n if (primaryKey == null) primaryKey = \"id\";\n return primaryKey;\n }",
"public IEntityPK getPK() {\r\n\treturn this.pk;\r\n }",
"private void setPrimaryKey(PSJdbcTableSchema tableSchema) throws PSJdbcTableFactoryException\n {\n List<String> pkcols = new ArrayList<String>();\n pkcols.add(\"col1\");\n PSJdbcPrimaryKey pk = new PSJdbcPrimaryKey(pkcols.iterator(), PSJdbcTableComponent.ACTION_REPLACE);\n tableSchema.setPrimaryKey(pk);\n }",
"@Override\n\tpublic String getKey() {\n\t\treturn id+\"\";\n\t}",
"Key getPrimaryKey();",
"@Override\r\n\tpublic Long getId() {\n\t\treturn null;\r\n\t}",
"public String idName() {\n return entityType().getSimpleName().toLowerCase() + \"id\";\n }",
"@Override\n\tpublic String getPrimaryKeyColumnName() {\n\t\treturn TICKETCHARGE.TICKET_CHARGE_ID;\n\t}",
"PrimaryKey getPrimaryKey();",
"public DatasetParameterPK() {\n }",
"public interface ForeignKey extends Comparable<ForeignKey> {\r\n\r\n\t/**\r\n\t * Return the foreign key's name.\r\n\t */\r\n\tString getName();\r\n\r\n\t/**\r\n\t * Return the foreign key's \"base\" table.\r\n\t */\r\n\tTable getBaseTable();\r\n\r\n\t/**\r\n\t * Return the foreign key's \"referenced\" table.\r\n\t */\r\n\tTable getReferencedTable();\r\n\r\n\t/**\r\n\t * Return the foreign key's column pairs.\r\n\t * @see ColumnPair\r\n\t */\r\n\tIterator<ColumnPair> columnPairs();\r\n\r\n\t/**\r\n\t * Return the foreign key's single column pair. Throw an\r\n\t * IllegalStateException if the foreign key has more than one column pair.\r\n\t */\r\n\tColumnPair columnPair();\r\n\r\n\t/**\r\n\t * Return the size of the foreign key's column pairs.\r\n\t * @see ColumnPair\r\n\t */\r\n\tint columnPairsSize();\r\n\r\n\t/**\r\n\t * Return the foreign key's \"base\" columns.\r\n\t * @see ColumnPair\r\n\t */\r\n\tIterator<Column> baseColumns();\r\n\r\n\t/**\r\n\t * Return the foreign key's \"base\" columns that are not part of\r\n\t * the base table's primary key.\r\n\t * @see ColumnPair\r\n\t */\r\n\tIterator<Column> nonPrimaryKeyBaseColumns();\r\n\r\n\t/**\r\n\t * Return the foreign key's \"referenced\" columns.\r\n\t * @see ColumnPair\r\n\t */\r\n\tIterator<Column> referencedColumns();\r\n\r\n\t/**\r\n\t * Return a Java-appropriate name for a field that holds the entity\r\n\t * mapped to the foreign key's \"referenced\" table.\r\n\t */\r\n\tString getJavaFieldName();\r\n\r\n\t/**\r\n\t * Return whether the foreign key's default Java field name matches the\r\n\t * specified Java identifier, respecting the database's case-sensitivity.\r\n\t */\r\n\tboolean defaultMatchesJavaFieldName(String javaFieldName);\r\n\r\n\t/**\r\n\t * Return whether the foreign key is the default for the specified Java\r\n\t * field name, respecting the database's case-sensitivity.\r\n\t */\r\n\tboolean isDefaultFor(String javaFieldName);\r\n\r\n\t/**\r\n\t * Return whether the foreign key references the primary key of the\r\n\t * \"referenced\" table and that primary key has only a single column.\r\n\t */\r\n\tboolean referencesSingleColumnPrimaryKey();\r\n\r\n\r\n\t/**\r\n\t * Pair up the foreign key's column pairs, matching each \"base\" column with\r\n\t * the appropriate \"referenced\" column.\r\n\t * @see #columnPairs()\r\n\t */\r\n\tinterface ColumnPair extends Comparable<ColumnPair> {\r\n\r\n\t\t/**\r\n\t\t * Return the column pair's \"base\" column.\r\n\t\t */\r\n\t\tColumn baseColumn();\r\n\r\n\t\t/**\r\n\t\t * Return the column pair's \"referenced\" column.\r\n\t\t */\r\n\t\tColumn referencedColumn();\r\n\r\n\t}\r\n\r\n}",
"@Override\n\tpublic String getReferenceKey() {\n\t\treturn KEY;\n\t}",
"@Override\n\tpublic Long getId() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic Long getId() {\n\t\treturn null;\n\t}",
"@Override\r\n\tprotected void buildPrimaryKeys(final DatabaseTable table) throws SQLException {\r\n\t\tif (views.contains(table)) {\r\n\t\t\t// buildPrimaryKeysOfView(table);\r\n\t\t} else {\r\n\t\t\tbuildPrimaryKeysOfTable(table);\r\n\t\t}\r\n\t}",
"@Override\n\tpublic long getPrimaryKey() {\n\t\treturn _expandoColumn.getPrimaryKey();\n\t}",
"@Override\r\n\tpublic String getKey() {\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic String getKey() {\n\t\treturn null;\r\n\t}",
"PrimaryKey getPrimarykey();",
"public java.lang.String getReferenceDataColumnName() {\r\n\treturn referenceDataColumnName;\r\n}",
"public boolean supportsIdentityColumns() {\n \t\treturn false;\n \t}",
"public OmOrgSrefNamePK() {\r\n\t}",
"@Override\n\tpublic long getPrimaryKey() {\n\t\treturn _employee.getPrimaryKey();\n\t}",
"protected String createPrimaryKeyConstraint(TableModel table) {\r\n\t\tColumnModel[] pks = table.getPrimaryKeyColumns();\r\n\t\tString s = \"\";\r\n\t\tif (pks.length > 1) {\r\n\t\t\ts = \",\\n PRIMARY KEY(\";\r\n\t\t\tString a = \"\";\r\n\t\t\tfor (ColumnModel c : pks) {\r\n\t\t\t\tif (a.length() > 0) {\r\n\t\t\t\t\ta += \", \";\r\n\t\t\t\t}\r\n\t\t\t\ta += this.quote(c.getName());\r\n\t\t\t}\r\n\t\t\ts += a + \")\";\r\n\t\t}\r\n\t\treturn s;\r\n\t}",
"@Override\n\tpublic String getPrimaryKey() {\n\t\treturn \"user_id\";\n\t}",
"@Override\n\tpublic long getPrimaryKey() {\n\t\treturn model.getPrimaryKey();\n\t}",
"@Override\n\tpublic long getPrimaryKey() {\n\t\treturn model.getPrimaryKey();\n\t}",
"@Override\n\tpublic long getPrimaryKey() {\n\t\treturn model.getPrimaryKey();\n\t}",
"@Override\n\tpublic long getPrimaryKey() {\n\t\treturn _changesetEntry.getPrimaryKey();\n\t}",
"@Override\n protected void setEmbeddableKeys() {\n }",
"@Override\n\tpublic String getKey() {\n\t\treturn null;\n\t}",
"static void generatePrimary(Table table, Key key, PrintWriter outData, String mcomma)\r\n {\r\n String comma = \" ( \";\r\n String keyname = key.name.toUpperCase();\r\n if (keyname.indexOf(table.name.toUpperCase()) == -1)\r\n keyname = table.name.toUpperCase()+\"_\"+keyname;\r\n outData.println(mcomma+\"CONSTRAINT \"+keyname+\" PRIMARY KEY\");\r\n for (int i=0; i < key.fields.size(); i++, comma = \" , \")\r\n {\r\n String name = (String) key.fields.elementAt(i);\r\n outData.println(comma+name);\r\n }\r\n outData.println(\" )\");\r\n for (int i=0; i < key.options.size(); i++)\r\n {\r\n String option = (String) key.options.elementAt(i);\r\n outData.println(\" \"+option);\r\n }\r\n }",
"@Override\n\tpublic Integer getId() {\n\t\treturn null;\n\t}",
"@Override\n public long getPrimaryKey() {\n return _usersCatastropheOrgs.getPrimaryKey();\n }",
"@Override\r\n\t\tpublic String getId()\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}",
"@Override\n\tpublic int getId() {\n\t\treturn 0;\n\t}",
"@Override\n\tpublic int getId() {\n\t\treturn 0;\n\t}",
"@Test(timeout = 4000)\n public void test091() throws Throwable {\n String[] stringArray0 = new String[9];\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"%)vq\", (DBSchema) null);\n DBPrimaryKeyConstraint dBPrimaryKeyConstraint0 = new DBPrimaryKeyConstraint(defaultDBTable0, (String) null, true, stringArray0);\n NameSpec nameSpec0 = NameSpec.ALWAYS;\n String string0 = SQLUtil.pkSpec(dBPrimaryKeyConstraint0, nameSpec0);\n assertEquals(\"PRIMARY KEY (, , , , , , , , )\", string0);\n }",
"@Transient\n public String getCacheKey() {\n return this.getTableName();\n }",
"@Override\n public String asTableDbName() {\n return \"user\";\n }",
"public ParametroPorParametroPK() {\r\n\t}",
"@Test(timeout = 4000)\n public void test096() throws Throwable {\n String[] stringArray0 = new String[20];\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n DBPrimaryKeyConstraint dBPrimaryKeyConstraint0 = new DBPrimaryKeyConstraint(defaultDBTable0, \" = \", false, stringArray0);\n NameSpec nameSpec0 = NameSpec.IF_REPRODUCIBLE;\n String string0 = SQLUtil.pkSpec(dBPrimaryKeyConstraint0, nameSpec0);\n assertEquals(\"PRIMARY KEY (, , , , , , , , , , , , , , , , , , , )\", string0);\n }",
"@Override\n\tpublic Object key() {\n\t\treturn id;\n\t}",
"public boolean isSetPkcolumn_name() {\n return this.pkcolumn_name != null;\n }",
"public void setPrimaryKey(String primaryKey);",
"public void setPrimaryKey(String primaryKey);",
"public void setPrimaryKey(String primaryKey);",
"@Transient\n public Object[] getID() {\n return new Object[]{this.getTableName()};\n }",
"public List<ColumnMetaData> getPrimaryKeys();",
"PrimaryKey createPrimaryKey();",
"public String getFkId() {\r\n return fkId;\r\n }",
"protected void initializeEmbeddableKey() {\n }",
"ForeignKey createForeignKey();",
"@Override\n\tpublic long getPrimaryKey() {\n\t\treturn _candidate.getPrimaryKey();\n\t}",
"public MappingTable getPrimaryMappingTable() {\n return primaryTable;\n }",
"@KeepForSdk\n public abstract String getPrimaryDataMarkerColumn();"
] | [
"0.67292774",
"0.6674349",
"0.66637063",
"0.6432435",
"0.64022905",
"0.6394018",
"0.6362872",
"0.6299906",
"0.62830955",
"0.6279109",
"0.6279109",
"0.62334013",
"0.60772806",
"0.6068864",
"0.604891",
"0.602656",
"0.6024451",
"0.59584785",
"0.59378207",
"0.59152913",
"0.5850295",
"0.5833521",
"0.5745715",
"0.5744608",
"0.5742399",
"0.5730238",
"0.5723966",
"0.57081014",
"0.568674",
"0.5682109",
"0.56558764",
"0.5653153",
"0.5646656",
"0.56404775",
"0.56244636",
"0.5621105",
"0.5604705",
"0.5595414",
"0.55923355",
"0.55900395",
"0.55661",
"0.5564608",
"0.5552894",
"0.5550282",
"0.55173403",
"0.5505829",
"0.55053496",
"0.55030626",
"0.54928255",
"0.54880583",
"0.5486403",
"0.547218",
"0.54703367",
"0.54543704",
"0.544609",
"0.5439132",
"0.54259807",
"0.54259807",
"0.542206",
"0.541671",
"0.54093534",
"0.54093534",
"0.5401452",
"0.53944457",
"0.5388682",
"0.5373369",
"0.5371755",
"0.5366594",
"0.5364196",
"0.5359589",
"0.5359589",
"0.5359589",
"0.53591645",
"0.5350827",
"0.5345633",
"0.5340704",
"0.5339955",
"0.53397226",
"0.5332234",
"0.53234833",
"0.53234833",
"0.53222924",
"0.5320605",
"0.5310103",
"0.5309207",
"0.53091305",
"0.530564",
"0.52960205",
"0.5294017",
"0.5294017",
"0.5294017",
"0.5293236",
"0.52912366",
"0.5291013",
"0.52907115",
"0.528483",
"0.5284785",
"0.52818465",
"0.5279448",
"0.5277122"
] | 0.65495896 | 3 |
For JPA standards we typically need the unqualified name. However, a more usable impl tends to use the whole path. This method provides an easy hook for subclasses to accomplish that | protected String transformAttributePath(AttributePath attributePath) {
return attributePath.getProperty();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"default String getQualifiedName() {\n return declaringType().getQualifiedName() + \".\" + this.getName();\n }",
"@Override\n public String resolve(String path)\n {\n\n // strip classname\n path = path.substring(path.lastIndexOf(\"/\") + 1);\n\n return path;\n }",
"public abstract String getQualifiedName();",
"String qualifiedName();",
"String getDBQualifiedFieldName(String fieldName);",
"String getEntityName() throws DatabaseNotAccessibleException;",
"public String getFullyQualifiedName();",
"private static String resolveName(@Nonnull final Class<?> clazz) {\n\t\tfinal String n = clazz.getName();\n\t\tfinal int i = n.lastIndexOf('.');\n\t\treturn i > 0 ? n.substring(i + 1) : n;\n\t}",
"String getQualifiedName();",
"@Override\n\tpublic Object getObjectNameByPath(String path) throws Exception {\n\t\treturn null;\n\t}",
"@Override\r\n public String getBaseName() {\r\n if (baseName == null) {\r\n final int idx = getPath().lastIndexOf(SEPARATOR_CHAR);\r\n if (idx == -1) {\r\n baseName = getPath();\r\n } else {\r\n baseName = getPath().substring(idx + 1);\r\n }\r\n }\r\n\r\n return baseName;\r\n }",
"public String getQualifiedName();",
"protected String path() {\n return path(getName());\n }",
"@Override\n\tpublic String getName() {\n\t\tfinal String name = super.getName();\n\t\ttry {\n\t\t\treturn name.substring(namespace.length()+1);\n\t\t} catch (Exception e) {\n\t\t\treturn name;\n\t\t}\n\t}",
"String getEntityName();",
"@Override\n\tpublic String resolve(EObject from) {\n\t\tString resolvename = super.resolve(from);\n\t\tif (null == resolvename) {\n\t\t\treturn resolvename;\n\t\t}\n\t\t\n\t\tif (!resolvename.endsWith(\".sats\") && !resolvename.endsWith(\".dats\")) {\n\t\t\t// todo didn't check whether path is valid\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t// System.out.println(\"resolve: \" + resolvename);\n\t\t\n\t\tResource resource = from.eResource();\n\t\tURI importUri = URI.createURI(resolvename);\n\t\t// is already valid uri\n\t\tif (EcoreUtil2.isValidUri(resource, importUri)) {\n\t\t\treturn resolvename;\n\t\t}\n\n\t\t// get the name of the project\n\t\tString projname = null;\n\t\tString path = from.eResource().getURI().toString();\n\t\tfinal String platform = \"platform:/resource/\";\n\t\t// final String filesys = \"file://\";\n\t\tif (path.startsWith(platform)) {\n\t\t\tprojname = path.substring(platform.length()).split(\"/\")[0];\n\t\t\t// System.out.println(\"projname is \" + projname);\n\t\t resolvename = platform + projname + \"/\" + resolvename;\n\t\t}\n\n\t\treturn resolvename;\n\n\t}",
"public String getQualifiedName() {\n if (probe.getHost() != null) {\n return probe.getHost().getName() + \"/\" + getName();\n } else {\n return \"/\" + getName();\n }\n }",
"@Override\n\t\tpublic String getRealPath(String path) {\n\t\t\treturn null;\n\t\t}",
"public String getQualifiedName() {\n if(probe.getHost() != null) {\n return probe.getHost().getName() + \"/\" + getName();\n } else {\n return \"/\" + getName();\n }\n }",
"protected String getFullyQualifiedClassName(String classname)\n {\n return classname.contains(\".\") ? classname : \"org.apache.cassandra.hadoop.\" + classname;\n }",
"private static String getFQClassName(final String root, final String path) {\r\n\t\t//Remove root from front of path and \".class\" from end of path\r\n\t\tString trimmed = path.substring(path.indexOf(root) + root.length(), path.indexOf(\".class\"));\r\n\t\t\r\n\t\t//Replace backslashes with periods\r\n\t\treturn trimmed.replaceAll(Matcher.quoteReplacement(\"\\\\\"), \".\");\r\n\t}",
"String getPathName();",
"String getPathName();",
"@Override\n\tpublic String getRealPath(String path) {\n\t\treturn null;\n\t}",
"public String getName(Class<? extends RawEntity<?>> entity) {\r\n\t\tTable tableAnnotation = entity.getAnnotation(Table.class);\r\n\t\tif (tableAnnotation != null) {\r\n\t\t\treturn tableAnnotation.value();\r\n\t\t}\r\n\t\t\r\n\t\tif (classMappings.containsKey(entity)) {\r\n\t\t\treturn classMappings.get(entity);\r\n\t\t}\r\n\t\t\r\n\t\treturn postProcessName(processName(convertName(entity)));\r\n\t}",
"private static String p(Class n) {\n return n.getName().replace('.','/');\n }",
"private String getQualifiedSrcDsTableName() {\n return sourceDB + \".\" + DATASET_TABLE_NAME;\n }",
"public String getPathName();",
"@Override\n\tpublic String getRealPath(String arg0) {\n\t\treturn null;\n\t}",
"public String resolvePath();",
"public String getAbsoluteName() {\n\t\tint index = this.getName().indexOf(\".\");\n\t\tif (index == -1)\n\t\t\treturn this.getName();\n\t\telse\n\t\t\treturn this.getName().substring(0, index);\n\t}",
"String getPackageName() {\n final int lastSlash = name.lastIndexOf('/');\n final String parentPath = name.substring(0, lastSlash);\n return parentPath.replace('/', '.');\n }",
"java.lang.String getXpath();",
"public abstract String getDatabaseTableName(String entityName);",
"public String getQualifiedTableName();",
"public abstract String getFullPath();",
"public String getUnqualifiedName() { return unqualifiedName; }",
"@Override\n public String modelName() {\n Optional<? extends AnnotationMirror> mirror =\n Mirrors.findAnnotationMirror(element(), Entity.class);\n if (mirror.isPresent()) {\n return Mirrors.findAnnotationValue(mirror.get(), \"model\")\n .map(value -> value.getValue().toString())\n .filter(name -> !Names.isEmpty(name))\n .orElse(\"default\");\n }\n if (Mirrors.findAnnotationMirror(element(), javax.persistence.Entity.class).isPresent()) {\n Elements elements = processingEnvironment.getElementUtils();\n Name packageName = elements.getPackageOf(element()).getQualifiedName();\n String[] parts = packageName.toString().split(\"\\\\.\");\n return parts[parts.length - 1];\n } else {\n throw new IllegalStateException();\n }\n }",
"private String resolveLabel(String aLabel){\n\t\t// Pre-condition\n\t\tif(aLabel == null) return aLabel;\n\t\t// Main code\n\t\tif (aLabel == \"univ\") return null;\n\t\tString actualName = aLabel.contains(\"this/\")?aLabel.substring(\"this/\".length()):aLabel;\n\t\treturn actualName;\n\t}",
"private String getClassname() {\r\n\t\tString classname = this.getClass().getName();\r\n\t\tint index = classname.lastIndexOf('.');\r\n\t\tif (index >= 0)\r\n\t\t\tclassname = classname.substring(index + 1);\r\n\t\treturn classname;\r\n\t}",
"@Override\n public String getQualifiedName() {\n if (specClassDecl != null && specClassDecl.getDeclarationModel() != null) {\n// return specClassDecl.getDeclarationModel().getQualifiedNameString();\n } else if (stub != null) {\n return stub.getQualifiedName();\n }\n\n // bad workaround for the previous to do\n return getName();\n }",
"@Override\n\tpublic String sqlQualifiedColumn(String tablename, String columnname) {\n\t\treturn String.format(\"%s.\\\"%s\\\"\", tablename, columnname);\n\t}",
"private String entryName(String name) {\n name = name.replace(File.separatorChar, '/');\n String matchPath = \"\";\n /* Need to add code to consolidate paths\n for (String path : paths) {\n if (name.startsWith(path)\n && (path.length() > matchPath.length())) {\n matchPath = path;\n }\n }\n */\n name = name.substring(matchPath.length());\n \n if (name.startsWith(\"/\")) {\n name = name.substring(1);\n } else if (name.startsWith(\"./\")) {\n name = name.substring(2);\n }\n return name;\n }",
"@Override\n public String getName() {\n final String name = getClass().getName();\n final int lastDollar = name.lastIndexOf('$');\n return name.substring(lastDollar + 1);\n }",
"protected String getEntityName() {\r\n\t\treturn EntityList.getEntityString(this);\r\n\t}",
"public String getFullyQualifiedName() {\n\t\treturn this.getPackageName() + \".\" + this.getClassName();\n\t}",
"@Override\n public String getFullyQualifiedNamespace() {\n return this.namespace == null ? extractFqdnFromConnectionString() : (this.namespace + \".\" + domainName);\n }",
"public String getPath (Class<?> cn) {\n return PATH + cn.getSimpleName().toLowerCase() + FILE_EXTENSION;\n }",
"String getRootAlias();",
"public abstract String packageName();",
"String getParentDriverName();",
"public Path resolve(String part) {\n return Paths.get(part);\n }",
"public String getPersistenceCapableSuperClass(String classPath)\n throws EnhancerMetaDataUserException, EnhancerMetaDataFatalError\n {\n final JDOClass clazz = getJDOClass(classPath);\n if (clazz == null) {\n return null;\n }\n final String name = clazz.getPersistenceCapableSuperclassName();\n return (name != null ? name.replace('.', '/') : null);\n }",
"private static String getPackage(final String fullName) {\n \t\treturn fullName.substring(0, fullName.lastIndexOf(\".\"));\n \t}",
"@Override\n \tprotected File deriveLocalFileCodeBase(Class<?> baseClass)\n \t{\n \t\t// setup codeBase\n \t\tif (baseClass == null)\n \t\t\tbaseClass = this.getClass();\n \n \t\tPackage basePackage = baseClass.getPackage();\n \t\tString packageName = basePackage.getName();\n \t\tString packageNameAsPath = packageName.replace('.', Files.sep);\n \n \t\tString pathName = System.getProperty(\"user.dir\") + Files.sep;\n \t\tFile path = new File(pathName);\n \t\tString pathString = path.getAbsolutePath();\n \n \t\t// println(\"looking for \" + packageNameAsPath +\" in \" + pathString);\n \n \t\tint packageIndex = pathString.lastIndexOf(packageNameAsPath);\n \t\tif (packageIndex != -1)\n \t\t{\n \t\t\tpathString = pathString.substring(0, packageIndex);\n \t\t\tpath = new File(pathString + Files.sep);\n \t\t}\n \n \t\tcodeBase = new ParsedURL(path);\n \t\tprintln(\"codeBase=\" + codeBase);\n \t\treturn path;\n \t}",
"public String getName() { return FilePathUtils.getFileName(getPath()); }",
"@Override\r\n public String getDebugPathInfo(String entityName) {\n return null;\r\n }",
"public String getModuleName() {\n if (repository == null) {\n return baseName;\n } else {\n StringBuffer b = new StringBuffer();\n repository.getRelativePath(b);\n b.append(baseName);\n return b.toString();\n }\n }",
"public String getQualifiedName () {\n return rawName;\n }",
"protected String getEntityClassName() {\n\t\treturn this.getEntityClass().getName();\n\t}",
"private static String convertToQualifiedName(final String fileName) {\n final String replacedSeparators = fileName.replace(File.separatorChar, '.');\n return replacedSeparators.substring(0, replacedSeparators.length() - \".class\".length());\n }",
"String getRepositoryPath(String name);",
"protected abstract Object resolveQualifiedOperationEntity(String namespace, String localName);",
"private String getClassName(final Class<?> clazz) {\n return EntityType.getEntityType(clazz).map(e -> e.getEntityName(clazz)).orElse(clazz.getSimpleName());\n }",
"@Override\n\tpublic String getName() {\n\t\treturn new File(relativePath).getName();\n\t}",
"public String getNamespaceSourcePath(String ns) {\r\n \t\treturn getSourceFolderNames().iterator().next() + File.separator + \r\n \t\t\t\tns.replace('.', File.separatorChar) + \".tql\";\r\n \t}",
"private String getJsonPath(final String path) {\n final int dotPos = path.indexOf('.');\n final String jsonPath = path.substring(dotPos + 1);\n return jsonPath;\n }",
"public void setPathTableName(String name)\n\t{\n\t\tm_pathsTableName = name;\n\t}",
"public String getInternalName();",
"private static String getFullyQualifiedImport(\n\t\t\tImportDeclaration importDeclaration) {\n\t\tNameExpr nameExpr = importDeclaration.getName();\n\n\t\tString buf = nameExpr.getName();\n\n\t\twhile (nameExpr instanceof QualifiedNameExpr) {\n\t\t\tnameExpr = ((QualifiedNameExpr) nameExpr).getQualifier();\n\t\t\tbuf = nameExpr.getName() + \".\" + buf;\n\t\t}\n\n\t\treturn buf;\n\t}",
"default String getQualifiedSignature() {\n return declaringType().getId() + \".\" + this.getSignature();\n }",
"public String extractName(String line) {\n\t\t// Linux case\n\t\tif (line.contains(\"/\")) {\n\t\t\treturn line.substring(line.lastIndexOf(\"/\") + 1, line.indexOf(\".\"));\n\t\t}\n\t\t// Root dir case\n\t\treturn line.substring(1, line.indexOf(\".\")).trim();\n\t}",
"public String getQualifiedName()\n {\n return name + \".\" + type;\n }",
"public final String path() {\n return string(preparePath(concat(path, SLASH, name)));\n }",
"protected abstract String getName();",
"public interface AdminMainEntity {\n\n public static final String MAIN_ENTITY_NAME_PROPERTY = \"__adminMainEntity\";\n\n public String getMainEntityName();\n\n}",
"public String getName() throws AccessException {\n\t\tString path = getPath();\n\t\tint p = path.lastIndexOf(\"/\");\n\t\treturn path.substring(p + 1);\n\t}",
"@Override\n\tpublic String getReferencedEntityClassName() {\n\t\treturn null;\n\t}",
"private static String getName(PathOrUrl location) {\n\t\t\tthrow new UnsupportedOperationException(\"Not implemented yet.\");\r\n\t\t}",
"public String getPathName()\n {\n return getString(\"PathName\");\n }",
"private static String packageName(String cn) {\n int index = cn.lastIndexOf('.');\n return (index == -1) ? \"\" : cn.substring(0, index);\n }",
"public static String getCompName(String fullName) {\n\t\tString name = cutMetaExt(fullName);\n\t\tint i = name.lastIndexOf(\".\");\n\t\tif (i < 0)\n\t\t\treturn name;\n\t\treturn name.substring(0, i); // cut comp name from path's string\n\t}",
"public abstract String getRawName();",
"private String getJsonDocumentName(final String path) {\n final int dotPos = path.indexOf('.');\n final String jsonName = path.substring(0, dotPos);\n return jsonName;\n }",
"public String getFullName()\n {\n String schema = db.getSchema();\n return (schema!=null) ? schema+\".\"+name : name;\n }",
"abstract String getClassName();",
"public abstract String getPath();",
"public abstract String getPath();",
"public String getEntityName() {\n\t\treturn null;\n\t}",
"public String getAppPathname();",
"private String _getRelativeName(int classType, int index) {\n String name;\n\n switch (classType) {\n case CS_C_UNIV:\n //should be unique too!\n name = CLASS_TOKEN[classType] + index;\n break;\n case CS_C_DEPT:\n name = CLASS_TOKEN[classType] + index;\n break;\n default:\n name = CLASS_TOKEN[classType] + index;\n break;\n }\n\n return name;\n }",
"public String getPathname() {return this.pathname;}",
"public String getPathName()\n \t{\n \t\tif ( arcname!=null )\n \t\t\treturn arcname + ARC_SEPARATOR + pathname;\n \t\treturn pathname;\n \t}",
"String getFullName();",
"protected abstract String getRefName();",
"public String getSqlPath() {\n return (String) get(4);\n }",
"@Override\n\tpublic String entityClassName() {\n\t\treturn null;\n\t}",
"public String getPathName() {\n\t\treturn pathName;\n\t}",
"protected String getKeymapName() {\n String nm = getClass().getName();\n int index = nm.lastIndexOf('.');\n if (index >= 0) {\n nm = nm.substring(index+1);\n }\n return nm;\n }",
"private String retrieveAbsoluteName(Object obj)\r\n {\r\n return (String) objectNames.get(obj);\r\n }",
"public String resolve(final String name) {\n return name.length() > pathLength ? pathLength > 0 ? name.substring(pathLength) : name : null;\n }"
] | [
"0.63345194",
"0.6304665",
"0.6257411",
"0.6181762",
"0.60417736",
"0.5959242",
"0.5938211",
"0.593645",
"0.5891465",
"0.58831763",
"0.5831562",
"0.58315015",
"0.5797614",
"0.57787824",
"0.57408375",
"0.57153237",
"0.5705702",
"0.5673364",
"0.56587464",
"0.5647814",
"0.5620355",
"0.5619252",
"0.5619252",
"0.56062704",
"0.56036294",
"0.55975676",
"0.5594601",
"0.5576972",
"0.5567005",
"0.55418336",
"0.55317396",
"0.55239254",
"0.55143005",
"0.5499976",
"0.5484652",
"0.54528606",
"0.5420354",
"0.54191047",
"0.54179686",
"0.5401741",
"0.5390962",
"0.5381642",
"0.5375244",
"0.5339477",
"0.53367895",
"0.5321556",
"0.5313437",
"0.5309169",
"0.53002954",
"0.5287108",
"0.52682734",
"0.52674216",
"0.52569777",
"0.5251019",
"0.52484107",
"0.52463126",
"0.523794",
"0.5228968",
"0.5228713",
"0.5228154",
"0.5226367",
"0.5224126",
"0.5217173",
"0.52157456",
"0.5213847",
"0.52118796",
"0.5206659",
"0.5200062",
"0.5191057",
"0.51793563",
"0.5179143",
"0.51773614",
"0.5174545",
"0.51733905",
"0.5147527",
"0.51472604",
"0.5137948",
"0.51339114",
"0.5126618",
"0.5125075",
"0.5120695",
"0.51134896",
"0.51093024",
"0.50971013",
"0.5090627",
"0.5086659",
"0.5078293",
"0.5078293",
"0.50781655",
"0.5077498",
"0.5077234",
"0.50696903",
"0.506937",
"0.50678456",
"0.5066329",
"0.5064088",
"0.50618595",
"0.5059472",
"0.50587636",
"0.5054763",
"0.50496036"
] | 0.0 | -1 |
Easy hook to build an Identifier using the keyword safe IdentifierHelper. | protected Identifier toIdentifier(String stringForm, MetadataBuildingContext buildingContext) {
return buildingContext.getMetadataCollector()
.getDatabase()
.getJdbcEnvironment()
.getIdentifierHelper()
.toIdentifier( addUnderscores(stringForm) );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"IdentifierType createIdentifierType();",
"java.lang.String getIdentifier();",
"private IIdentifierElement createIdentifier() throws RodinDBException {\n\t\tfinal IContextRoot ctx = createContext(\"ctx\");\n\t\treturn ctx.createChild(ICarrierSet.ELEMENT_TYPE, null, null);\n\t}",
"private void generateID(){\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor (String t : terms.keySet())\n\t\t\tsb.append(t.replaceAll(\"\\\\W\", \"\")\n\t\t\t\t\t.substring(0, Math.min(4, t.replaceAll(\"\\\\W\", \"\").length())) + \"-\");\n\t\tfor (String s : sources)\n\t\t\tsb.append(s.replaceAll(\"\\\\W\", \"\")\n\t\t\t\t\t.substring(0, Math.min(4, s.replaceAll(\"\\\\W\", \"\").length())) + \"-\");\n\t\tsb.deleteCharAt(sb.length()-1);\n\t\tif (yearFrom > -1) sb.append(\"_\" + yearFrom);\n\t\tif (yearTo > -1) sb.append(\"_\" + yearTo);\n\t\tif (useCompounds) sb.append(\"_COMP\");\n\t\tif (useStopwords) sb.append(\"_STOP\");\n\t\tsb.append(\"_CNT\" + contextSize);\n\t\tsb.append(\"_\" + System.currentTimeMillis());\n\t\tthis.id = sb.toString();\n\t}",
"I getIdentifier();",
"protected abstract String getIdentifier();",
"public String getIdentifierString();",
"public Builder setIdentifier(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n identifier_ = value;\n onChanged();\n return this;\n }",
"IdentifiersType createIdentifiersType();",
"String getIdentifier();",
"String getIdentifier();",
"String getIdentifier();",
"String getIdentifier();",
"String getIdentifier();",
"String getIdentifier();",
"String getIdentifier();",
"org.hl7.fhir.Identifier addNewIdentifier();",
"private UniqueIdentifier(){\n\t\t\n\t}",
"public String asIdentifier() {\n\t\treturn this.keyword.toLowerCase().replace(' ', '_').replace('.', '_');\n\t}",
"@NonNull String identifier();",
"Identifier getId();",
"public interface IdFactory extends Supplier<String>\n{\n\n // Twitter has encountered a similar need for generating coherent IDs and has developed Snowflake:\n // https://blog.twitter.com/2010/announcing-snowflake\n\n /**\n * @return A new unique identifier for the encapsulated context.\n */\n @Override\n String get();\n}",
"void addId(II identifier);",
"public String getIdentifier() {\n/* 222 */ return getValue(\"identifier\");\n/* */ }",
"IdentifiersFactory getIdentifiersFactory();",
"int getIdentifier();",
"public String getValidIdentifier(String baseName, boolean truncateUsingRandomDigits);",
"public String escapeIdentifier(String identifierName);",
"public String getIdentifier();",
"public String getIdentifier();",
"private void buildQueryIdentifier(TermsList termsList)\n\t\t\tthrows UnsupportedEncodingException {\n\t\tString value = this.identifier;\n\n\t\tif ((value != null) && (!(value.equals(\"\")))) {\n\n\t\t\ttermsList.addTerm(value);\n\n\t\t\t/*\n\t\t\t * If the user entered a PASTA identifier, convert it to a packageId\n\t\t\t * value so that it will match the Solr 'packageid' field. (We don't\n\t\t\t * index the PASTA identifier in Solr.)\n\t\t\t */\n\t\t\tString packageId = PastaClient.pastaURLtoPackageId(value);\n\t\t\tif (packageId != null) {\n\t\t\t\tvalue = packageId;\n\t\t\t}\n\n\t\t String parenthesizedValue = parenthesizeQueryValue(value);\n\t\t\tString escapedValue = Search.escapeQueryChars(parenthesizedValue);\n\t\t\tString encodedValue = URLEncoder.encode(escapedValue, \"UTF-8\");\n\t\t\tString doiQuery = String.format(\"doi:%s\", encodedValue);\n\t\t\tupdateQString(doiQuery);\n\t\t\tString packageIdQuery = String.format(\"packageid:%s\", encodedValue);\n\t\t\tupdateQString(packageIdQuery);\n\t\t\tString idQuery = String.format(\"id:%s\", encodedValue);\n\t\t\tupdateQString(idQuery);\n\t\t}\n\t}",
"int toIdentifier() {\n return 1000 * y + x;\n }",
"IdentifierReferenceQualifier createIdentifierReferenceQualifier();",
"public static Value makeAnyStrIdent() {\n return theStrIdent;\n }",
"public static String randomIdentifier() {\r\n\t\tfinal String lexicon = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\";\r\n\t\tfinal java.util.Random rand = new java.util.Random();\r\n\t\t// consider using a Map<String,Boolean> to say whether the identifier is\r\n\t\t// being used or not\r\n\t\tfinal Set<String> identifiers = new HashSet<String>();\r\n\r\n\t\tStringBuilder builder = new StringBuilder();\r\n\t\twhile (builder.toString().length() == 0) {\r\n\t\t\tint length = rand.nextInt(5) + 5;\r\n\t\t\tfor (int i = 0; i < length; i++)\r\n\t\t\t\tbuilder.append(lexicon.charAt(rand.nextInt(lexicon.length())));\r\n\t\t\tif (identifiers.contains(builder.toString()))\r\n\t\t\t\tbuilder = new StringBuilder();\r\n\t\t}\r\n\t\treturn builder.toString();\r\n\t}",
"public int getIdentifier();",
"public T getIdentifier();",
"public void setIdentifier(String value) {\n/* 214 */ setValue(\"identifier\", value);\n/* */ }",
"public void setIdentifierKey(java.lang.String param) {\r\n localIdentifierKeyTracker = true;\r\n\r\n this.localIdentifierKey = param;\r\n\r\n\r\n }",
"public void markUseIdentifierNameString() {\n useIdentifierNameString = true;\n }",
"String getIdentifierName(String name, String type);",
"private String createId() {\n int idLength = 5;\n String possibleChars = \"1234567890\";\n Random random = new Random();\n StringBuilder newString = new StringBuilder();\n\n for (int i = 0; i < idLength; i++) {\n int randomInt = random.nextInt(10);\n newString.append(possibleChars.charAt(randomInt));\n }\n\n return newString.toString();\n }",
"private static ExpressionTree createQualIdent(WorkingCopy workingCopy, String typeName) {\n TypeElement typeElement = workingCopy.getElements().getTypeElement(typeName);\n if (typeElement == null) {\n typeElement = workingCopy.getElements().getTypeElement(\"java.lang.\" + typeName);\n if (typeElement == null) {\n return workingCopy.getTreeMaker().Identifier(typeName);\n }\n }\n return workingCopy.getTreeMaker().QualIdent(typeElement);\n }",
"public void setIdentifier(TelemetryIdentifier.Builder builderForValue) {\n this.identifier_ = (TelemetryIdentifier) builderForValue.build();\n this.bitField0_ |= 1;\n }",
"public interface Identifier {\n\n public String getIdentifier();\n\n}",
"public String createID(Connection conn, SimpleFeature feature, Statement statement)\r\n throws IOException {\r\n \t//JD: replacing no word characters with underscore\r\n \t//JD: forcing to start with a latter\r\n // According to GML and XML schema standards, FID is a XML ID\r\n // (http://www.w3.org/TR/xmlschema-2/#ID), whose acceptable values are those that match an\r\n // NCNAME production (http://www.w3.org/TR/1999/REC-xml-names-19990114/#NT-NCName):\r\n // NCName ::= (Letter | '_') (NCNameChar)* /* An XML Name, minus the \":\" */\r\n // NCNameChar ::= Letter | Digit | '.' | '-' | '_' | CombiningChar | Extender\r\n // We have to fix the generated UID replacing all non word chars with an _ (it seems\r\n // they area all \":\")\r\n// return \"fid-\" + new UID().toString().replaceAll( \"\\\\W\",\"_\" );\r\n// optimization, since the UID toString uses only \":\" and converts long and integers\r\n // to strings for the rest, so the only non word character is really \":\"\r\n return \"fid-\" + new UID().toString().replace(':', '_');\r\n }",
"com.microsoft.schemas.office.x2006.digsig.STUniqueIdentifierWithBraces xgetSetupID();",
"private @Nullable IdentifierToken eatIdOrKeywordAsId() {\n Token token = nextToken();\n if (token.type == TokenType.IDENTIFIER) {\n return (IdentifierToken) token;\n } else if (Keywords.isKeyword(token.type)) {\n return new IdentifierToken(token.location, Keywords.get(token.type).toString());\n } else {\n reportExpectedError(token, TokenType.IDENTIFIER);\n }\n return null;\n }",
"public native String getIdentifier();",
"private void nextKwId() {\n\t\tint old=pos;\n\t\tmany(letters);\n\t\tmany(legits);\n\t\tString lexeme=program.substring(old,pos);\n\t\ttoken=new Token((keywords.contains(lexeme) ? lexeme : \"id\"),lexeme);\n }",
"@Test\n\tpublic void testIdentifier() throws ParseException {\n\t\tIdentifier identifier = langParser(\"foo\").identifier();\n\t\tassertEquals(identifier.getName(), \"foo\");\n\t}",
"public interface IDMLIdentifiers\n{\n \n /**\n\t *\tGets the associated DML service.\n\t *\t@return\tThe DML service associated.\n\t */\n public IDMLService getDMLService();\n \n /**\n\t *\tGets the maximum length of a simple (not compound) identifier. This value should be the minimum valid length for any kind of identifier (e.g. table name, parameter name)\n\t *\t@return\tThe maximum length.\n\t */\n public int getMaxLength();\n \n /**\n\t *\tEscapes a simple (not compound) identifier to prevent name clashing with reserved words.\n\t *\t@param\tidentifierName\tName that identifies a database object.\n\t *\t@return\tAn escaped identifier.\n\t */\n public String escapeIdentifier(String identifierName);\n \n /**\n\t *\tReturns a name that can be used as a valid identifier (e.g. parameter name, constraint name). It should contain only valid characters and its length should not exceed the maximum defined in MaxLength.\n\t *\t@param\tbaseName\tAn identifier name.\n\t *\t@param\ttruncateUsingRandomDigits\tIndicates if the identifier should be truncated if its length exceeds the MaxLength. In this case, random digits should be used as a suffix to prevent name clashing.\n\t *\t@return\tA string representing a valid identifier.\n\t */\n public String getValidIdentifier(String baseName, boolean truncateUsingRandomDigits);\n}",
"public org.hl7.fhir.Identifier addNewIdentifier()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.hl7.fhir.Identifier target = null;\n target = (org.hl7.fhir.Identifier)get_store().add_element_user(IDENTIFIER$0);\n return target;\n }\n }",
"public org.hl7.fhir.Identifier addNewIdentifier()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.hl7.fhir.Identifier target = null;\n target = (org.hl7.fhir.Identifier)get_store().add_element_user(IDENTIFIER$0);\n return target;\n }\n }",
"public static String newId(long useFor, long dbNum, long tableNum) throws Exception{\n\t\treturn IdGenerator.generate61ForId(useFor, dbNum, tableNum);\t\t\n\t}",
"String getTokenConversionIdentifier(String prependE);",
"org.hl7.fhir.Identifier getIdentifier();",
"public interface Identifier extends Serializable, Comparable<Identifier> {\n byte byteValue();\n\n short shortValue();\n\n int intValue();\n\n /**\n * @return\n */\n default long longValue() {\n return lowValue();\n }\n\n long highValue();\n\n long lowValue();\n\n void reset(long v);\n\n void reset(long mostSigBits, long leastSigBits);\n\n void increase();\n\n int compare(Identifier i);\n\n static Identifier create() {\n return new IdentifierImpl(-1L);\n }\n\n static Identifier create(long l) {\n return new IdentifierImpl(l);\n }\n\n static Identifier create(Identifier i) {\n return new IdentifierImpl(i.highValue(), i.lowValue());\n }\n\n static Identifier randomIdentifier() {\n return new IdentifierImpl(UUID.randomUUID());\n }\n}",
"Rule STIdentifier() {\n // Push 1 IdentifierNode onto value stack\n return Sequence(\n Sequence(\n FirstOf(Letter(), \"_\"),\n ZeroOrMore(FirstOf(IndentChar(), \"-\"))),\n actions.pushIdentifierNode(),\n WhiteSpace());\n }",
"private static String buildID(String userID, Long propID) {\r\n\t\tString format = \"%020d\";\r\n\t\treturn userID + String.format(format, propID);\r\n\t}",
"String generateUID();",
"public String makeLoginID(){\r\n int firstAlphabet = firstName.charAt(0);\r\n if ( firstAlphabet <= 'Z' && firstAlphabet >= 'A' ){//user entered first alphabet of the first name as capital letter \r\n \tfirstAlphabet = firstAlphabet - 'A' + 'a';\r\n }\r\n String temp = \"\"+ (char)( firstAlphabet ) ;//add first alphabet of the first name to the string \r\n temp += getLastNameForID();\r\n temp += digitalRoot();\r\n return temp;\r\n }",
"Rule Identifier() {\n // Push 1 IdentifierNode onto the value stack\n return Sequence(\n Sequence(\n FirstOf(Letter(), \"_\"),\n ZeroOrMore(IndentChar())),\n actions.pushIdentifierNode(),\n WhiteSpace());\n }",
"public static String aUniqueIdentifier() {\n return \"MONEXT\" + new SimpleDateFormat(\"yyyyMMddHHmmss\").format(new Date());\n }",
"private @Nullable IdentifierToken eatId() {\n if (peekId()) {\n return eatIdOrKeywordAsId();\n } else {\n reportExpectedError(peekToken(), TokenType.IDENTIFIER);\n if (peekIdOrKeyword()) {\n return eatIdOrKeywordAsId();\n } else {\n return null;\n }\n }\n }",
"public int identifier();",
"@SuppressWarnings(\"unchecked\")\r\n public static String assignIdentifier(PatientIdentifierType type) {\t\t\r\n\t\ttry {\r\n\t\t\tClass identifierSourceServiceClass = Context.loadClass(\"org.openmrs.module.idgen.service.IdentifierSourceService\");\r\n\t\t\tObject idgen = Context.getService(identifierSourceServiceClass);\r\n\t Method generateIdentifier = identifierSourceServiceClass.getMethod(\"generateIdentifier\", PatientIdentifierType.class, String.class);\r\n\t \r\n\t // note that generate identifier returns null if this identifier type is not set to be auto-generated\r\n\t return (String) generateIdentifier.invoke(idgen, type, \"auto-assigned during patient creation\");\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n\t\t\tlog.error(\"Unable to access IdentifierSourceService for automatic id generation. Is the Idgen module installed and up-to-date?\", e);\r\n\t\t} \r\n\t\t\r\n\t\treturn null;\r\n\t}",
"public static String makeAnonID() {\n String id = \"__anon\" + nextAnonID;\n nextAnonID++;\n return id;\n }",
"String idProvider();",
"public void setIdentifierValue(java.lang.String param) {\r\n localIdentifierValueTracker = true;\r\n\r\n this.localIdentifierValue = param;\r\n\r\n\r\n }",
"public au.gov.asic.types.DocumentIdentifierType addNewAsicIdentifier()\n {\n synchronized (monitor())\n {\n check_orphaned();\n au.gov.asic.types.DocumentIdentifierType target = null;\n target = (au.gov.asic.types.DocumentIdentifierType)get_store().add_element_user(ASICIDENTIFIER$0);\n return target;\n }\n }",
"private void handleIdentifier() {\n\n while (isAlphaNumeric(peek())) {\n advance();\n }\n\n // Get the lexeme\n String text = source.substring(start, current);\n\n // Find a matching keyword (if any)\n TokenType type = keywords.get(text);\n if (type == null) {\n type = IDENTIFIER; // ie not a keyword\n }\n addToken(type);\n }",
"ELEMENTIDENTIFIER getIdentifier();",
"public IdentifierDt addIdentifier() {\n\t\tIdentifierDt newType = new IdentifierDt();\n\t\tgetIdentifier().add(newType);\n\t\treturn newType; \n\t}",
"public au.gov.asic.types.MessageIdentifierType.CustomerIdentifier.Identifier addNewIdentifier()\n {\n synchronized (monitor())\n {\n check_orphaned();\n au.gov.asic.types.MessageIdentifierType.CustomerIdentifier.Identifier target = null;\n target = (au.gov.asic.types.MessageIdentifierType.CustomerIdentifier.Identifier)get_store().add_element_user(IDENTIFIER$2);\n return target;\n }\n }",
"public static DeviceIdentifierBuilder builder() {\n return new DeviceIdentifierBuilder();\n }",
"@Override\n public String getIdentifier() {\n return myIdentity.getIdentifier();\n }",
"public String getIdentifier() {\n try {\n return keyAlias + \"-\" + toHexString(\n MessageDigest.getInstance(\"SHA1\").digest(keyStoreManager.getIdentifierKey(keyAlias).getEncoded()));\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }",
"public CustomerResourceIdentifier buildUnchecked() {\n return new CustomerResourceIdentifierImpl(id, key);\n }",
"@Override\n public String getToID()\n {\n \tStringBuilder sb = new StringBuilder();\n\n\t\tint prefix = getPrefix();\n \tint ident = getIdent1();\n\n \tswitch( IdentType.fromIdent( ident ) )\n \t{\n \t\tcase IPFIXI:\n \t\t\tsb.append( \"INTER-PREFIX\" );\n \t\t\tbreak;\n \t\tcase ALLI:\n \t\t\tsb.append( \"ALL RADIOS\" );\n \t\t\tbreak;\n \t\tcase PABXI:\n \t\t\tsb.append( \"PABX EXT\" );\n \t\t\tbreak;\n \t\tcase PSTNSI1:\n \t\tcase PSTNSI2:\n \t\tcase PSTNSI3:\n \t\tcase PSTNSI4:\n \t\tcase PSTNSI5:\n \t\tcase PSTNSI6:\n \t\tcase PSTNSI7:\n \t\tcase PSTNSI8:\n \t\tcase PSTNSI9:\n \t\tcase PSTNSI10:\n \t\tcase PSTNSI11:\n \t\tcase PSTNSI12:\n \t\tcase PSTNSI13:\n \t\tcase PSTNSI14:\n \t\tcase PSTNSI15:\n \t\t\tsb.append( \"PRE-DEFINED PSTN\" );\n \t\t\tbreak;\n \t\tcase PSTNGI:\n \t\t\tsb.append( \"PSTN GATEWAY\" );\n \t\t\tbreak;\n \t\tcase TSCI:\n \t\t\tsb.append( \"SYSTEM CONTROLLER\" );\n \t\t\tbreak;\n \t\tcase DIVERTI:\n \t\t\tsb.append( \"CALL DIVERT\" );\n \t\t\tbreak;\n \t\tcase USER:\n\t\t\tdefault:\n\t\t\t\tif( prefix != 0 || ident != 0 )\n\t\t\t\t{\n\t \tsb.append( format( prefix, 3 ) );\n\t \tsb.append( \"-\" );\n\t \tsb.append( format( ident, 4) );\n\t\t\t\t}\n \tbreak;\n \t}\n\n \treturn sb.toString();\n }",
"public AppID getIdentifier () ;",
"public void setIdentifier(FactIdentifier param) {\r\n localIdentifierTracker = true;\r\n\r\n this.localIdentifier = param;\r\n\r\n\r\n }",
"public IdentifierNode getIdentifier()throws ClassCastException;",
"@Override\n public @NonNull Object getIdentifier() {\n return null;\n }",
"private String creatUniqueID(){\n long ID = System.currentTimeMillis();\n return Long.toString(ID).substring(9,13);\n }",
"private Token scanIdentifier(LocatedChar firstChar) {\n\t\tStringBuffer buffer = new StringBuffer();\n\t\tbuffer.append(firstChar.getCharacter());\n\t\tappendSubsequentIdentifierChars(buffer);\n\n\t\tString lexeme = buffer.toString();\n\t\tif(Keyword.isAKeyword(lexeme)) {\n\t\t\treturn LextantToken.make(firstChar, lexeme, Keyword.forLexeme(lexeme));\n\t\t}\n\t\telse {\n\t\t\treturn IdentifierToken.make(firstChar, lexeme);\n\t\t}\n\t}",
"void xsetSetupID(com.microsoft.schemas.office.x2006.digsig.STUniqueIdentifierWithBraces setupID);",
"public Object getIdentifier() {\n return identifier;\n }",
"public native void setIdentifier (String identifier);",
"public void testStringID() {\n String testID = generator.generatePrefixedIdentifier(\"test\");\n assertNotNull(testID);\n assertTrue(testID.matches(\"test\" + ID_REGEX));\n }",
"public String getInstanceIdentifier();",
"public String identifier(){\n\n if (currentTokenType == TYPE.IDENTIFIER){\n\n return currentToken;\n\n }else {\n throw new IllegalStateException(\"Current token is not an identifier! current type:\" + currentTokenType);\n }\n }",
"public String getIdentifier() {\n return identifier;\n }",
"public String getIdentifier(){\n return identifier;\n }",
"public org.hl7.fhir.Identifier insertNewIdentifier(int i)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.hl7.fhir.Identifier target = null;\n target = (org.hl7.fhir.Identifier)get_store().insert_element_user(IDENTIFIER$0, i);\n return target;\n }\n }",
"String mo10312id();",
"public String getIdentifier()\n {\n return identifier;\n }",
"@Override\r\n protected final void append(final ToStringBuilder builder) {\r\n builder.append(\"Ident\", this.ident);\r\n appendId(builder);\r\n }",
"@Override\r\n\tpublic String createID() {\r\n\t\t \r\n\t\t\t\treturn transCode.toString();\r\n\t\t\t\t}",
"public int getIdentifier()\n {\n return identifier;\n }"
] | [
"0.6655096",
"0.6374665",
"0.62233293",
"0.61836565",
"0.61458385",
"0.61232364",
"0.6106407",
"0.6060289",
"0.60582346",
"0.60523474",
"0.60523474",
"0.60523474",
"0.60523474",
"0.60523474",
"0.60523474",
"0.60523474",
"0.60405505",
"0.6038513",
"0.5988861",
"0.59139085",
"0.5859371",
"0.5819862",
"0.57867694",
"0.5765519",
"0.57187295",
"0.57153344",
"0.57004786",
"0.56792945",
"0.5667413",
"0.5667413",
"0.5649072",
"0.5647345",
"0.56446224",
"0.5611916",
"0.55884475",
"0.5573842",
"0.5557229",
"0.555293",
"0.5551484",
"0.5544172",
"0.5514335",
"0.5493092",
"0.5490905",
"0.5489611",
"0.5480446",
"0.5460413",
"0.54393697",
"0.5439047",
"0.54376537",
"0.5430481",
"0.5406333",
"0.5403684",
"0.5403209",
"0.5403209",
"0.5371287",
"0.5364846",
"0.5356601",
"0.5356061",
"0.5353234",
"0.5346978",
"0.5330648",
"0.53225815",
"0.5317276",
"0.52855134",
"0.52708095",
"0.5268323",
"0.52660996",
"0.5266062",
"0.52551955",
"0.5252887",
"0.52377546",
"0.52197015",
"0.5165386",
"0.51641977",
"0.5155222",
"0.515037",
"0.5146123",
"0.5146084",
"0.5140354",
"0.513045",
"0.5121965",
"0.5106713",
"0.50938034",
"0.50843155",
"0.5084107",
"0.5081546",
"0.5080264",
"0.5071487",
"0.50643086",
"0.5050431",
"0.5050044",
"0.50476134",
"0.5041392",
"0.50360584",
"0.5035172",
"0.5028291",
"0.5007353",
"0.49988404",
"0.4998635",
"0.4990437"
] | 0.5866629 | 20 |
TODO Autogenerated method stub | @Override
public int getCount() {
return listab.size();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public Object getItem(int arg0) {
return listab.get(arg0);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public long getItemId(int arg0) {
return arg0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public View getView(int arg0, View arg1, ViewGroup arg2) {
if (arg1==null) {
mHolder=new ViewHolder();
arg1=mInflater.inflate(R.layout.pj_item, null);
mHolder.pj_content=(TextView) arg1.findViewById(R.id.pj_content);
mHolder.pj_username=(TextView) arg1.findViewById(R.id.pj_username);
mHolder.pj_time=(TextView) arg1.findViewById(R.id.pj_time);
arg1.setTag(mHolder);
}else {
mHolder=(ViewHolder) arg1.getTag();
}
mHolder.pj_content.setText(listab.get(arg0).getText());
mHolder.pj_username.setText(listab.get(arg0).getU_id()+"");
mHolder.pj_time.setText(listab.get(arg0).getTime()+"");
return arg1;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
for simulation purposes only | public IRoadSensor setRoadStatus(ERoadStatus s); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void simulate() {\n\t\t\r\n\t}",
"@Override\n public void simulationPeriodic() {\n }",
"public abstract void simulate();",
"public abstract int simulate();",
"@Override\n public void simulationPeriodic() {\n }",
"private void random() {\n\n\t}",
"public void quickSimulation() {\n\t\tnew SimulationControleur();\n\t}",
"SimulatedAnnealing() {\n generator = new Random(System.currentTimeMillis());\n }",
"public void mo4359a() {\n }",
"public void smell() {\n\t\t\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\n\tpublic void onSimulationComplete()\n\t{\n\t}",
"private DiscretePotentialOperations() {\r\n\t}",
"public void SOM() {\n // Pick an input vector randomly.\n // A input vector can't be picked twice in a row.\n ArrayList<Double> oldVector = new ArrayList<>();\n ArrayList<Double> vector;\n\n for (int t = 0; t < this.nbIterations; t++) {\n\n // Choose another entry vector than the previous one.\n do {\n int randomInput = (int) (Math.random() * this.input.size());\n vector = this.input.get(randomInput);\n } while (oldVector.equals(vector));\n\n // The old vector is replaced by the new one.\n oldVector = new ArrayList<>(vector);\n\n // Calculation of BMU (Best Matching Unit).\n Neuron BMU = this.getBMU(vector);\n\n // Update the BMU's neighbors.\n this.updateNeighbors(BMU, vector, t);\n\n // Update the screen.\n this.screen.repaint();\n // Sleep for the animation.\n try {\n Thread.sleep(10);\n }\n catch (InterruptedException e) {\n System.out.println(\"Erreur sleep : \" + e);\n }\n }\n }",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"SimulationRun() {\n firms = new ArrayList<>();\n }",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n public void perish() {\n \n }",
"public final void mo51373a() {\n }",
"public void mo38117a() {\n }",
"@Override\r\n\tprotected void compute() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic int inferSimulation(Structure struct) {\n\t\treturn 0;\n\t}",
"protected void mo6255a() {\n }",
"public void mo3376r() {\n }",
"public void mo6081a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void startSimulation();",
"@Override\r\n public void runSimulation(){\r\n initialize();\r\n initialRun();\r\n initialize(\"square\");\r\n initialRun();\r\n initialize(\"circle\");\r\n initialRun();\r\n initialize(\"crack\");\r\n initialRun(); \r\n initialize(\"cross\");\r\n initialRun();\r\n }",
"public void baocun() {\n\t\t\n\t}",
"double seBlesser();",
"public abstract void mo56925d();",
"public CarWashSimulation ()\n {\n bay = new Bay(CarWashApplication.BAY_TIME);\n waitingLine = new LLQueue<Car>();\n randGen = new Random();\n reset();\n }",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"public void logic(){\r\n\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"public void perder() {\n // TODO implement here\n }",
"public void mo21794S() {\n }",
"public void mo9848a() {\n }",
"private Boolean simulationTerminee() {\n if (Evenements.size() != 0) \n return false;\n else\n return true;\n }",
"public void solution() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"private stendhal() {\n\t}",
"public void skystonePos4() {\n }",
"public void mo21877s() {\n }",
"void test() {\n // A small hard coded world for testing\n Actor[][] testWorld = new Actor[][]{\n {Actor.RED, Actor.RED, Actor.NONE},\n {Actor.NONE, Actor.BLUE, Actor.NONE},\n {Actor.RED, Actor.NONE, Actor.BLUE}\n };\n double th = 0.5; // Simple threshold used for testing\n int size = testWorld.length;\n\n //Test distribution method distribution\n exit(0);\n }",
"public void simulation(){\n GameInformation gi = this.engine.getGameInformation();\n Point ball = gi.getBallPosition();\n Player playerSelected;\n int xTemp;\n team = gi.getTeam(ball.x , ball.y);\n\n //Attack\n if(team == gi.activeActor){\n selectAttackerPlayer(gi.getPlayerTeam(gi.activeActor));\n doAttackMoove(playerOne.getPosition(), gi.cells[(int) playerOne.getPosition().getX()][(int) playerOne.getPosition().getY()].playerMoves);\n selectProtectPlayer(gi.getPlayerTeam(gi.activeActor));\n doProtectMoove(playerTwo.getPosition(), playerOne.getPosition() ,gi.cells[(int) playerTwo.getPosition().getX()][(int) playerTwo.getPosition().getY()].playerMoves);\n playerOne = null;\n playerTwo = null;\n this.engine.next();\n }\n else{//Defense\n selectCloserPlayer(gi.getPlayerTeam(gi.activeActor));\n doDefenseMoove(playerOne.getPosition(), this.engine.getGameInformation().getBallPosition() ,gi.cells[(int) playerOne.getPosition().getX()][(int) playerOne.getPosition().getY()].playerMoves);\n selectCloserPlayer(gi.getPlayerTeam(gi.activeActor));\n doDefenseMoove(playerOne.getPosition(), this.engine.getGameInformation().getBallPosition() ,gi.cells[(int) playerOne.getPosition().getX()][(int) playerOne.getPosition().getY()].playerMoves);\n TacklAction tackl = new TacklAction();\n tackl.setSource(playerOne.getPosition());\n VisualArea[] area;\n if ( area = tackl.getVisualArea(this.engine.getGameInformation() ) != null ){\n tackl.setDestination(area[0]);\n this.engine.performAction( tackl );\n }\n\n tackl.setSource(playerTwo.getPosition());\n\n if ( area = tackl.getVisualArea(this.engine.getGameInformation() ) != null ){\n tackl.setDestination(area[0]);\n this.engine.performAction( tackl );\n }\n playerOne = null;\n playerTwo = null;\n }\n }",
"protected void runBeforeIteration() {}",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}",
"public void skystonePos5() {\n }",
"private void runBest() {\n }",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"protected void initializeExecutionRandomness() {\r\n\r\n\t}",
"@Override\r\n\tpublic void step(SimState state) {\r\n\r\n\t}",
"public void train ()\t{\t}",
"@Override\r\n \tpublic void process() {\n \t\t\r\n \t}",
"@Override\r\n\tpublic void runn() {\n\t\t\r\n\t}",
"private void initState() {\r\n double metaintensity=0;\r\n double diffr=0;\r\n for(int ii=0; ii < Config.numberOfSeeds; ii++)\r\n {\r\n Cur_state[ii] = this.seeds[ii].getDurationMilliSec();\r\n// Zeit2 = this.seeds[1].getDurationMilliSec();\r\n// Zeit3 = this.seeds[2].getDurationMilliSec();\r\n// LogTool.print(\"Zeit 1 : \" + Zeit1 + \"Zeit 2 : \" + Zeit2 + \"Zeit 3 : \" + Zeit3, \"notification\");\r\n// LogTool.print(\"initState: Dwelltime Seed \" + ii + \" : \" + Cur_state[ii], \"notification\");\r\n// Cur_state[0] = Zeit1;\r\n// Cur_state[1] = Zeit2;\r\n// Cur_state[2] = Zeit3;\r\n }\r\n \r\n if ((Config.SACostFunctionType==3)||(Config.SACostFunctionType==1)) {\r\n for(int x=Config.ptvXLow-0; x < Config.ptvXHigh+0; x++) {\r\n// for(int x=Solver.xBoundsTumor[0]; x < Solver.xBoundsTumor[1]; x+= Config.scaleFactor) {\r\n for(int y=Config.ptvYLow-0; y < Config.ptvYHigh+0; y++) {\r\n// for(int y=Solver.yBoundsTumor[0]; y < Solver.yBoundsTumor[1]; y+= Config.scaleFactor) {\r\n for(int z=Config.ptvZLow-0; z < Config.ptvZHigh+0; z++) {\r\n// for(int z=Solver.zBoundsTumor[0]; z < Solver.zBoundsTumor[1]; z+= Config.scaleFactor) {\r\n// this.body2[x][y][z].setCurrentDosis(0.0); //Set currentPtvVoxel Dose to 0 \r\n this.body2[x][y][z].metavalue = 0.0;\r\n for(int i=0; i<Config.numberOfSeeds;++i) { \r\n // Calculate intensity based based on current dwelltime\r\n metaintensity = this.body2[x][y][z].radiationIntensityNoTime((this.seeds2[i].getCoordinate()));\r\n // radiationIntensityNoTime(this.seeds2[i].getCoordinate(), New_state[i]);\r\n if (metaintensity>0) {\r\n // LogTool.print(\"Cost: Intensity :\" + intensity + \"@ \" + x + \" \" + y + \" \" + z,\"notification\");\r\n }\r\n // this.body2[x][y][z].addCurrentDosis(metaintensity);\r\n this.body2[x][y][z].metavalue += metaintensity; \r\n// Das ist implementation one\r\n } \r\n } \r\n }\r\n }\r\n// this.body = this.body2;\r\n } else {\r\n \r\n // for(int x=Config.ptvXLow-0; x < Config.ptvXHigh+0; x++) {\r\n// for(int x=Solver.xBoundsTumor[0]; x < Solver.xBoundsTumor[1]; x+= Config.scaleFactor) { \r\n for(int x=0; x < Solver.dimensions[0]; x+= Config.scaleFactor) {\r\n // for(int y=Config.ptvYLow-0; y < Config.ptvYHigh+0; y++) {\r\n// for(int y=Solver.yBoundsTumor[0]; y < Solver.yBoundsTumor[1]; y+= Config.scaleFactor) {\r\n for(int y=0; y < Solver.dimensions[1]; y+= Config.scaleFactor) {\r\n // for(int z=Config.ptvZLow-0; z < Config.ptvZHigh+0; z++) {\r\n// for(int z=Solver.zBoundsTumor[0]; z < Solver.zBoundsTumor[1]; z+= Config.scaleFactor) {\r\n for(int z=0; z < Solver.dimensions[2]; z+= Config.scaleFactor) {\r\n // this.body2[x][y][z].setCurrentDosis(0.0); //Set currentPtvVoxel Dose to 0 \r\n this.body2[x][y][z].metavalue = 0.0;\r\n for(int i=0; i<Config.numberOfSeeds;++i) { \r\n // Calculate intensity based based on current dwelltime\r\n metaintensity = this.body2[x][y][z].radiationIntensityNoTime((this.seeds2[i].getCoordinate()));\r\n // radiationIntensityNoTime(this.seeds2[i].getCoordinate(), New_state[i]);\r\n if (metaintensity>0) {\r\n // LogTool.print(\"Cost: Intensity :\" + intensity + \"@ \" + x + \" \" + y + \" \" + z,\"notification\");\r\n }\r\n // this.body2[x][y][z].addCurrentDosis(metaintensity);\r\n this.body2[x][y][z].metavalue += metaintensity;\r\n this.body[x][y][z].metavalue = 0; \r\n this.body[x][y][z].metavalue += this.body2[x][y][z].metavalue;\r\n // Das ist implementation one\r\n } \r\n } \r\n }\r\n }\r\n// this.body = this.body2;\r\n diffr = ((this.body[43][43][43].metavalue)-(this.body2[43][43][43].metavalue));\r\n LogTool.print(\"Shallowcopy Check, value should be 0 :\" + diffr + \"@ 43,43,43 \",\"notification\");\r\n }\r\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"public void mo21793R() {\n }",
"public void mo21791P() {\n }",
"public void calcOutput()\n\t{\n\t}",
"@Override\n\tpublic void tick() {\n\t\t\n\t}",
"@Override\n\tpublic void tick() {\n\t\t\n\t}",
"@Override\n\tpublic void tick() {\n\t\t\n\t}",
"@Override\n\tpublic void tick() {\n\t\t\n\t}",
"@Override\n\tpublic void tick() {\n\t\t\n\t}",
"@Override\n\tpublic void tick() {\n\t\t\n\t}",
"@Override\n\tpublic void tick() {\n\t\t\n\t}",
"@Override public void run()\n {\n final Set<E> elements = process.elements();\n if (elements.isEmpty() || random.nextDouble() * 3 - 2/*(-2..1]*/ < 0)\n send(process.add(randomNewElement()));\n else\n send(process.remove(randomElement(elements)));\n }",
"public void step() {\n // method 1 of Temperature randomness\n enPrice = 1.1 * enPrice;\n\n TempChange = Temperature * (0.1 * (1 - 2 * r.nextDouble()));\n // method 2 of Temperature\n// TempChange = temperature_list.get(count);\n// count+=1;\n\n Temperature += TempChange;\n year_num+=1;\n }",
"public void advanceSimulation () {\n\t\tstep_++;\n\t}",
"public void think() {\n\t\t\n\t}",
"@Override\r\n\tpublic void billGenerate() {\n\t\t\r\n\t}",
"public void mo3749d() {\n }",
"private void randomMove() {\n }",
"@Override\r\n\tpublic void compute() {\n\t\t\r\n\t}",
"public void mo21880v() {\n }",
"protected void runBeforeIterations() {}",
"@Override\n protected void inputObjects() {\n alpha1 = Utils.computeRandomNumber(Modulus, sp);\n alpha2 = Utils.computeRandomNumber(Modulus, sp);\n gamma = Utils.computeRandomNumber(Modulus, sp);\n gammaTilde = Utils.computeRandomNumber(Modulus, sp);\n\n capC = g2.modPow(gamma, Modulus);\n capCTilde = g2.modPow(gammaTilde, Modulus);\n\n beta1 = alpha1.multiply(x);\n beta2 = alpha2.multiply(x);\n BigInteger capU1 = t_i.modPow(alpha1, Modulus).multiply(b_i.modPow(beta1.negate(), Modulus))\n .mod(Modulus);\n BigInteger capU2 = g1.modPow(alpha1, Modulus).multiply(g2.modPow(alpha2, Modulus)).mod(Modulus);\n\n objects.put(\"tInverse\", t.modInverse(Modulus));\n objects.put(\"b\", b);\n objects.put(\"g1\", g1);\n objects.put(\"g2\", g2);\n objects.put(\"U1Inverse\", capU1.modInverse(Modulus));\n objects.put(\"U2Inverse\", capU2.modInverse(Modulus));\n objects.put(\"CInverse\", capC.modInverse(Modulus));\n objects.put(\"CTildeInverse\", capCTilde.modInverse(Modulus));\n objects.put(\"t_i\", t_i);\n objects.put(\"b_iInverse\", b_i.modInverse(Modulus));\n }",
"@Override\n\tpublic void driving() {\n\t\t\n\t}",
"public static void other() {\n // This is how to generate test data for the grid. (Use the VisibilityGraph algorithm to generate optimal path lengths)\n// ArrayList<Point> points = ReachableNodes.computeReachable(gridGraph, 5, 5);\n// System.out.println(points.size());\n//\n// generateRandomTestDataAndPrint(gridGraph);\n\n //This is how to conduct a running time / path length test for tha algorithm:\n// TestResult test1 = testAlgorithm(gridGraph, sx, sy, ex, ey, 1, 1);\n// System.out.println(test1);\n// TestResult test2 = testAlgorithm(gridGraph, sx, sy, ex, ey, 30, 25);\n// System.out.println(test2);\n }",
"protected abstract Simulate collectAgentData ();",
"@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}",
"public void mo12930a() {\n }",
"@Override\r\n\tpublic void tick() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void tick() {\n\t\t\r\n\t}",
"public void secrete() {\n\t\t/* Instantiate a new virus particle */\n\t\tSim.lps.add(new Lambda_phage(prob_surface, prob_enzymes));\n\t}",
"@Override\n\tpublic void swim() {\n\t\t\n\t}",
"public void skystonePos3() {\n }",
"private static void iterator() {\n\t\t\r\n\t}"
] | [
"0.70142424",
"0.6450707",
"0.6412138",
"0.6359343",
"0.62778574",
"0.6273465",
"0.6100688",
"0.60419285",
"0.5989683",
"0.5961025",
"0.59336495",
"0.59195745",
"0.590756",
"0.58706075",
"0.5851727",
"0.57993305",
"0.57560605",
"0.575442",
"0.5751829",
"0.5751242",
"0.57461447",
"0.57452905",
"0.5741529",
"0.5726434",
"0.5688475",
"0.56793445",
"0.5659603",
"0.5649287",
"0.5649287",
"0.5649287",
"0.5649287",
"0.5649287",
"0.5649287",
"0.5649287",
"0.56383175",
"0.5638053",
"0.56343496",
"0.5631449",
"0.56286085",
"0.5627466",
"0.5625715",
"0.5623372",
"0.56218594",
"0.56218594",
"0.5621673",
"0.5619786",
"0.5604935",
"0.55962837",
"0.5586899",
"0.5585066",
"0.5578378",
"0.55693567",
"0.5562515",
"0.5555618",
"0.5554487",
"0.55487174",
"0.55428827",
"0.55428827",
"0.5541438",
"0.55402035",
"0.5535085",
"0.5532449",
"0.5529381",
"0.5525264",
"0.55211675",
"0.5520976",
"0.5516268",
"0.55093193",
"0.5509069",
"0.55074483",
"0.55072457",
"0.55016387",
"0.5496592",
"0.5496592",
"0.5496592",
"0.5496592",
"0.5496592",
"0.5496592",
"0.5496592",
"0.549525",
"0.5491629",
"0.5491148",
"0.54891586",
"0.54878074",
"0.548555",
"0.54806334",
"0.5480518",
"0.5474406",
"0.5473582",
"0.54729533",
"0.54727066",
"0.5470163",
"0.5469571",
"0.54676557",
"0.5462515",
"0.5460663",
"0.5460663",
"0.54537714",
"0.54533017",
"0.5452444",
"0.54520357"
] | 0.0 | -1 |
Set name, password, confirm password, in password text box. | public RegisterPage fillRegisterPage (String name, String password, String confirmationPassword)
{
nameBox.sendKeys(name);
passwordBox.sendKeys(password);
confirmPasswordBox.sendKeys(confirmationPassword);
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setPassword(String text) {\n txtPassword().setText(text);\n }",
"void setPassword(String password);",
"void setPassword(String password);",
"void setPassword(String password);",
"public void setPassword(String pass);",
"public void setPassword(java.lang.String newPassword);",
"public void typePassword(String text) {\n txtPassword().typeText(text);\n }",
"public void inputToPasswordTextbox(String password) {\n\t\twaitToElementVisible(driver,RegisterPageUI.PASSWORD_TEXTBOX);\n\t\tsendkeyToElement(driver, RegisterPageUI.PASSWORD_TEXTBOX, password);\n\t}",
"void setPassword(Password newPassword, String plainPassword) throws NoUserSelectedException;",
"public void setPasswordValue(String value) {\r\n\t\ttxtPassword.setValue(value);\r\n\t}",
"public void setPassword(String password)\r\n/* 26: */ {\r\n/* 27:42 */ this.password = password;\r\n/* 28: */ }",
"void setErrorPassword();",
"public void inputToConfirmPasswordTextbox(String password) {\n\t\twaitToElementVisible(driver,RegisterPageUI.CONFIRM_PASSWORD_TEXTBOX);\n\t\tsendkeyToElement(driver, RegisterPageUI.CONFIRM_PASSWORD_TEXTBOX, password);\n\t}",
"private void setNewPassword(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n newPassword_ = value;\n }",
"public void setPassword(String strPassword){\n \t \n \tdriver.findElement(By.cssSelector(inputPassword)).sendKeys(strPassword);\n \n \n }",
"public void setPassword2(String password2);",
"public void settxtPassword(String pwd) {\n\t\tWebDriverWait wait = new WebDriverWait(ldriver, 25);\n\t\twait.until(ExpectedConditions.visibilityOf(txtPassword));\n\t\ttxtPassword.sendKeys(pwd);\n\t}",
"public void typePassword(String text) {\r\n\t\tpasswordInput = driver.findElement(passwordSelector);\r\n\t\tpasswordInput.sendKeys(text);\r\n\t\t\r\n\t}",
"private void setPassword(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n password_ = value;\n }",
"private void setPassword(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n password_ = value;\n }",
"void setPassword(String ps) {\n this.password = ps;\n }",
"@When(\"^The user enters the password$\")\n\tpublic void the_user_enters_the_password() throws Throwable {\n\t\t\n\t lpw.password_textbox();\n\t}",
"public void showPasswordPrompt();",
"public void setPassword(String pw)\n {\n this.password = pw;\n }",
"@Override\n\tpublic void setPlainPassword(String arg0) {\n\t\t\n\t}",
"public ChangePassword() {\n initComponents();\n SQLConnect sqlcon = new SQLConnect();\n con=sqlcon.sqlCon(con);\n jPasswordField2.setEnabled(false);\n jPasswordField3.setEnabled(false);\n }",
"public void setPassword(String p)\n\t{\n\t\tpassword = p;\n\t}",
"public void setPassword(String pw) {\n password = pw.toCharArray();\n cleared = false;\n }",
"public EditAccountPage fillPasswordField(String pass){\n\n pause();\n clickElement(newPasswordElement);\n pause();\n cleanElement(newPasswordElement);\n pause();\n setElementText(newPasswordElement, pass);\n\n return this;\n }",
"public void setPassword(String password)\n {\n _password = password;\n }",
"public void setPassword(String strPassword){\n\t\t driver.findElement(password99Guru).sendKeys(strPassword);\n\t}",
"public void setPasswordOutput(String text) {\n\t\tpasswordOutput.setText(text);\n\t}",
"public void enterPassword(String password) {\n\t\tutil.enterTextIntoTextBox(this.loginPageLocators.getPasswordInputBoxElement(), password, true);\n\t}",
"public Builder setPassword(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n password_ = value;\n onChanged();\n return this;\n }",
"public Builder setPassword(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n password_ = value;\n onChanged();\n return this;\n }",
"public void setInputPasswordValue(String value){\n WebElement passwordField = driver.findElement(inputPasswordLocator); \n // setValue(passwordField, value);\n // System.out.println(\"Value after set: \" + passwordField.getAttribute(\"value\"));\n passwordField.sendKeys(value);\n //shift + tab\n // actions.sendKeys(Keys.TAB).perform();\n WebElement deptidField = driver.findElement(inputTextDeptidLocator);\n actions.click(deptidField).perform();\n }",
"@Override\r\n\tpublic void modifyPassword(String username, String password, String confirmPassword, String oldPassword) {\n\t}",
"public Builder setPassword(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n password_ = value;\n onChanged();\n return this;\n }",
"public Builder setPassword(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n password_ = value;\n onChanged();\n return this;\n }",
"public Builder setPassword(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n password_ = value;\n onChanged();\n return this;\n }",
"public void changePasswordLinkText() {\n\t\tchangePasswordLinkText.click();\r\n\t}",
"public void setPassword(String p) {\n\t\tpassword = p;\n\t}",
"public void updatePassword(String account, String password);",
"public void setPassword(String strPassword){\n\t\tdriver.findElement(password99Guru).sendKeys(strPassword);\n\t}",
"private void changePassword(){\n\t\tif (changeCancelButton.getText().equals(\"Anuluj\")){\n\t\t\thidePassword();\n\t\t\tchangeCancelButton.setText(\"Zmień hasło\");\n\t\t\tchangePassword = false;\n\t\t}\t\n\t\telse {\n\t\t\tif (usersTable.getSelectionModel().getSelectedIndex() > -1) {\n\t\t\t\tchangePassword = true;\n\t\t\t\tchangeCancelButton.setText(\"Anuluj\");\n\t\t\t\tuserPasswordField.setText(\"\");\n\t\t\t\tuserConfirmPasswordField.setText(\"\");\n\t\t\t\tlackUserPasswordLabel.setVisible(false);\n\t\t\t\tlackUserConfirmPasswordLabel.setVisible(false);\t\t\t\t\n\t\t\t\tshowPassword();\n\t\t\t}\n\t\t}\n\t}",
"@Override\n\tpublic void setPassword(String password) {\n\n\t}",
"public void set_pass(String password)\n {\n pass=password;\n }",
"public Builder setPassword(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n password_ = value;\n onChanged();\n return this;\n }",
"public void enterPasswordInNewPassword(String newPassword) throws UIAutomationException{\r\n\t\r\n\t\telementController.requireElementSmart(fileName,\"New Password Text Field\",GlobalVariables.configuration.getAttrSearchList(), \"New Password\");\r\n\t\tUIActions.click(fileName,\"New Password Text Field\",GlobalVariables.configuration.getAttrSearchList(), \"New Password\");\r\n\t\tUIActions.clearTextBox(fileName,\"New Password Text Field\",GlobalVariables.configuration.getAttrSearchList(), \"New Password\");\r\n\t\tUIActions.enterValueInTextBox(newPassword,fileName,\"New Password Text Field\",GlobalVariables.configuration.getAttrSearchList(), \"New Password\");\r\n\t\tUIActions.enterKey(Keys.TAB);\r\n\t\r\n\t}",
"java.lang.String getPassword();",
"java.lang.String getPassword();",
"java.lang.String getPassword();",
"java.lang.String getPassword();",
"java.lang.String getPassword();",
"java.lang.String getPassword();",
"java.lang.String getPassword();",
"public void setSpPassword(java.lang.String param){\r\n \r\n if (param != null){\r\n //update the setting tracker\r\n localSpPasswordTracker = true;\r\n } else {\r\n localSpPasswordTracker = false;\r\n \r\n }\r\n \r\n this.localSpPassword=param;\r\n \r\n\r\n }",
"public ChangePass() {\n initComponents();\n this.setTitle(\"Change Password\");\n this.setLocation(400, 300);\n }",
"public void showPassword() {\n\t\thideIM.setVisible(true);\n\t\tseeIM.setVisible(false);\n\t\tcurPasswordField.setVisible(false);\n\t\tnewPasswordField.setVisible(false);\n\t\tseeCurPasswordField.setVisible(true);\n\t\tseeNewPasswordField.setVisible(true);\n\t\tseeCurPasswordField.setText(curPasswordField.getText());\n\t\tseeNewPasswordField.setText(newPasswordField.getText());\n\t\t\n\t}",
"public void enterPassword(String password) {\n Reporter.addStepLog(\" Enter password \" + password + \" to password field \" + _passwordField.toString());\n sendTextToElement(_passwordField, password);\n log.info(\" Enter password \" + password + \" to password field \" + _passwordField.toString());\n }",
"public void setBothValue(String value) {\r\n\t\ttxtPassword.setValue(value);\r\n\t\ttxtRetypePassword.setValue(value);\r\n\t}",
"String getNewPassword();",
"public void enterPassword(String pass) {\r\n\t driver.findElement(pswd).sendKeys(pass);\r\n\t }",
"private void resetPassword()\n {\n password = null;\n currentPasswdField.setText(\"\");\n currentPasswdField.requestFocusInWindow();\n okButton.setEnabled(false);\n }",
"public void setRegistrationConfirmPassword(String password){\r\n\r\n\t\tString password1 = getValue(password);\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Confirm password is entered\");\r\n\t\ttry{\r\n\r\n\t\t\twaitforElementVisible(locator_split(\"txtRegistrationContactConfirmPassword\"));\r\n\t\t\tsendKeys(locator_split(\"txtRegistrationContactConfirmPassword\"), password1); \r\n\r\n\r\n\t\t\tSystem.out.println(\"Confirm password is entered\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:-Create new user link clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Confirm password is not entered\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtRegistrationContactConfirmPassword\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t\tReporter.log(\"Entered Confirm Password in Registration Confirm Password field\");\r\n\t}",
"public String printNewPasswordPrompt() {\n return \"Please enter new password: \";\n }",
"public void setPassword(String paramPasswd) {\n\tstrPasswd = paramPasswd;\n }",
"public void setPassword(String password) throws Exception {\n DriverUtils.waitUntilLocatorAppears(getDriver(), By.id(PASSWORD_ID));\n DriverUtils.waitUntilElementClickable(getDriver(), emailField);\n passwordField.clear();\n passwordField.sendKeys(password);\n }",
"public void setPasswordField(final JPasswordField pwPasswordParam) {\n this.pwPassword = pwPasswordParam;\n }",
"public Builder setPassword(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n password_ = value;\n onChanged();\n return this;\n }",
"public void setPassword(java.lang.String param) {\r\n localPasswordTracker = param != null;\r\n\r\n this.localPassword = param;\r\n }",
"public void enterPassword(String pass) {\n\t\t driver.findElement(pswd).sendKeys(pass);\n\t }",
"public String setPassword(){\n String passWord = \"\";\n while(passWord.isBlank()) {\n System.out.print(\"Please Enter PassWord: \");\n passWord = supplyString.get();\n }\n return passWord.trim();\n }",
"public void setPassword(String password){\r\n this.password = password;\r\n }",
"public void setRegistrationPassword(String password){\r\n\t\tString Password = getValue(password);\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- check out registration password should be entered\");\r\n\t\ttry{\r\n\r\n\t\t\twaitforElementVisible(locator_split(\"txtRegistrationPassword\"));\r\n\t\t\tsendKeys(locator_split(\"txtRegistrationPassword\"), Password); \r\n\t\t\tSystem.out.println(\"Check out registration password is entered\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- check out registration password is entered\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- check out registration password is not entered\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtRegistrationPassword\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t\tReporter.log(\"Entered Confirm Password in Registration Confirm Password field\");\r\n\t}",
"public void enterPassword(String password) {\r\n\t\tdriver.findElement(pwd).sendKeys(password);\r\n\t}",
"void setUserPasswordHash(String passwordHash);",
"void onChangePasswordSuccess(ConformationRes data);",
"public void registerNewPassword(View view) {\r\n\t\t// Get the user's current password\r\n\t\tString currentPassword = currentPasswordInput.getText().toString();\r\n\r\n\t\t// Get the new, permanent password the user wants\r\n\t\tString newPassword = newPasswordInput.getText().toString();\r\n\t\t\r\n\t\t// Get the confirmation of the new, permanent password (should be the same as the previous field)\r\n\t\tString confirmNewPassword = confirmNewPasswordInput.getText().toString();\r\n\r\n\t\t/* Pass all three to the ResetPassword class, which will check validity, and, if valid,\r\n\t\t * reset the permanent password */\r\n\t\tResetPassword resetPassword = new ResetPassword(this);\r\n\t\tresetPassword.checkInputsAndTryToResetPassword(currentPassword, newPassword, confirmNewPassword);\r\n\t}",
"@When(\"^user should enter the valid password in the loginpage$\")\n\tpublic void user_should_enter_the_valid_password_in_the_loginpage() throws Throwable {\n\t\tinputValuestoElement(pa.getAp().getPasswordinput(), \"superman@1010\");\n\t\n\t \n\t}",
"String getPassword();",
"String getPassword();",
"String getPassword();",
"String getPassword();",
"String getPassword();",
"String getPassword();",
"String getPassword();",
"String getPassword();",
"String getPassword();",
"public void setPw(char[] password) {\n\t\t\r\n\t}",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n txtNewPass = new javax.swing.JPasswordField();\n btnSave = new javax.swing.JButton();\n jLabel3 = new javax.swing.JLabel();\n txtConfirmPass = new javax.swing.JPasswordField();\n txtCurrentPass = new javax.swing.JPasswordField();\n jLabel4 = new javax.swing.JLabel();\n\n setClosable(true);\n setMaximizable(true);\n setTitle(\"CHANGE PASSWORD\");\n addInternalFrameListener(new javax.swing.event.InternalFrameListener() {\n public void internalFrameActivated(javax.swing.event.InternalFrameEvent evt) {\n }\n public void internalFrameClosed(javax.swing.event.InternalFrameEvent evt) {\n formInternalFrameClosed(evt);\n }\n public void internalFrameClosing(javax.swing.event.InternalFrameEvent evt) {\n formInternalFrameClosing(evt);\n }\n public void internalFrameDeactivated(javax.swing.event.InternalFrameEvent evt) {\n }\n public void internalFrameDeiconified(javax.swing.event.InternalFrameEvent evt) {\n }\n public void internalFrameIconified(javax.swing.event.InternalFrameEvent evt) {\n }\n public void internalFrameOpened(javax.swing.event.InternalFrameEvent evt) {\n }\n });\n\n jLabel1.setText(\"CURRENT PASSWORD :\");\n\n jLabel2.setText(\"NEW PASSWORD :\");\n\n btnSave.setText(\"SAVE\");\n btnSave.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnSaveActionPerformed(evt);\n }\n });\n\n jLabel3.setText(\"CONFIRM PASSWORD :\");\n\n jLabel4.setText(\"Password must contain min 8 character with uppercase, number and symbol\");\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(69, 69, 69)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1)\n .addComponent(jLabel3))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(txtNewPass, javax.swing.GroupLayout.DEFAULT_SIZE, 150, Short.MAX_VALUE)\n .addComponent(txtConfirmPass))\n .addComponent(txtCurrentPass, javax.swing.GroupLayout.DEFAULT_SIZE, 150, Short.MAX_VALUE))))\n .addContainerGap(64, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addComponent(btnSave, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(145, 145, 145))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 373, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(53, 53, 53)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(txtCurrentPass, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(9, 9, 9)\n .addComponent(jLabel4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(txtNewPass, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(txtConfirmPass, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addComponent(btnSave)\n .addContainerGap(33, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n pack();\n }",
"public void setPassword(String password)\n {\n _password = password;\n }",
"public void enterPassword(String pwd)\n {\n driver.findElement(Password).sendKeys(pwd);\n }",
"public void setPassword(java.lang.String param) {\n localPasswordTracker = true;\n\n this.localPassword = param;\n }",
"public void enterPassword (String pwd) {\n driver.findElement(password).sendKeys(pwd);\n }",
"@Test\r\n public void testSetPassword() {\r\n\r\n }",
"public void setPassword( String password )\r\n {\r\n this.password = password;\r\n }",
"@Override\n public void setExisting(String login, String pasword) {\n loginEdit.setText(login);\n passwordEdit.setText(pasword);\n }",
"public void setpasswordConfirm(String strConfirmPass){\n\t\tdriver.findElement(passwordConfirm).sendKeys(strConfirmPass);\n\t}",
"@Test\n public void testInvalidPassword() {\n mDevice.findObject(By.res(BASIC_SAMPLE_PACKAGE, \"username_edit_text\"))\n .setText(USERNAME_TO_BE_TYPED);\n mDevice.findObject(By.res(BASIC_SAMPLE_PACKAGE, \"password_edit_text\"))\n .setText(INVALID_PASSWORD_TO_BE_TYPED);\n mDevice.findObject(By.res(BASIC_SAMPLE_PACKAGE, \"login_button\"))\n .click();\n\n }",
"public void setPasswordPlainText(String password) {\n this.password = password;\n }"
] | [
"0.7855664",
"0.7512801",
"0.7512801",
"0.7512801",
"0.7417978",
"0.74113",
"0.73308736",
"0.7281146",
"0.72708637",
"0.72334766",
"0.7210013",
"0.7206689",
"0.720108",
"0.70977974",
"0.7071264",
"0.70571446",
"0.70318186",
"0.7016525",
"0.7010956",
"0.7010956",
"0.70064497",
"0.6976065",
"0.6964246",
"0.6935414",
"0.69268095",
"0.68691057",
"0.68245703",
"0.68121874",
"0.6797168",
"0.67709357",
"0.6768841",
"0.67613816",
"0.6741245",
"0.67239654",
"0.67239654",
"0.6683714",
"0.66834164",
"0.66529626",
"0.66529626",
"0.66529626",
"0.6642506",
"0.6634659",
"0.66295594",
"0.6614186",
"0.6589221",
"0.6584442",
"0.65787977",
"0.65700305",
"0.6550633",
"0.65448207",
"0.65448207",
"0.65448207",
"0.65448207",
"0.65448207",
"0.65448207",
"0.65448207",
"0.6539606",
"0.6530733",
"0.65282923",
"0.65262425",
"0.6515025",
"0.65129715",
"0.65111333",
"0.65109825",
"0.65107703",
"0.6503411",
"0.64929783",
"0.6486692",
"0.6485813",
"0.64836866",
"0.6482152",
"0.64778376",
"0.6472566",
"0.647123",
"0.64587647",
"0.64522326",
"0.64471054",
"0.6437614",
"0.6417815",
"0.64177835",
"0.64172536",
"0.64172536",
"0.64172536",
"0.64172536",
"0.64172536",
"0.64172536",
"0.64172536",
"0.64172536",
"0.64172536",
"0.64116895",
"0.6411082",
"0.6404654",
"0.64043057",
"0.63909435",
"0.6378824",
"0.63733095",
"0.6370021",
"0.63655525",
"0.6361995",
"0.6360222",
"0.63564086"
] | 0.0 | -1 |
Click on Agree Terms. | public RegisterPage clickOnAgreeTerms()
{
agreeTermsButton.click();
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@OnClick(R.id.tvTermsOfUse)\n void termsOfUse()\n {\n UtilsMethods.openBrowser(this, Keys.TERM_OF_USE_URL);\n }",
"@Then (\"^Accept creation terms$\")\t\t\t\t\t\n public void Accept_creation_terms() throws Throwable \t\t\t\t\t\t\t\n { \t\t\n \tdriver.findElement(By.xpath(\"//*[@id='phoneUsageNext']/content/span\")).click();\n driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n driver.findElement(By.xpath(\"//*[@id='termsofserviceNext']/content/span\")).click();\n \t\t\t\t\n }",
"public void ClickOnUserAgreement() {\n\t\tUserAgreement.click();\n\t}",
"public void onClick(DialogInterface dialog, int which) {\n Toast.makeText(getApplicationContext(), \"Select Terms & Conditions\", Toast.LENGTH_SHORT).show();\n }",
"@Override\n public void onClick(View view) {\n Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(\"http://sozialmusfest.scalingo.io/privacy\"));\n startActivity(browserIntent);\n }",
"@Then(\"^click i agree & join$\")\r\n\tpublic void click_i_agree_join() throws Throwable {\n\t sign.agree();\r\n\t\r\n\t}",
"@OnClick(R.id.gou_agree)\n public void onViewClicked() {\n }",
"public void clickOnCheckboxIAgreeRules()\n \t{\n \t\tproductRequirementsPageLocators.clickOnAgreeRulesCheckbox.click();\n\n \t}",
"public void clickCourse() {\r\n\t\tthis.clickcourse.click();\r\n\r\n\t}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tgotoFAQView();\n\t\t\t}",
"public void clickContactUS() {\n\t\tSystem.out.println(\"Clicked contactus link\");\n\t}",
"public void clickOnYesButton() {\r\n\t\tsafeJavaScriptClick(manageVehiclesSideBar.replace(\"Manage Vehicles\", \"Yes\"));\r\n\t}",
"public void clickCreateAccLink()\n\t{\n \telementUtils.performElementClick(wbCreateAccLink);\n\t}",
"public void clickOnVolumeDiscount()\n\t{\n\t\twaitForVisibility(volumeDiscount);\n\t\tvolumeDiscount.click();\n\t}",
"@Override\n\tpublic void onClick(View v) {\n\t\tswitch (v.getId()) {\n\t\tcase R.id.btnAbout:\n\t\t\tif (v.getId() == R.id.menuTerm)\n\t\t\t\tshowDialogTermAbout(false);\n\t\t\telse\n\t\t\t\tshowDialogTermAbout(true);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t}",
"public void clickAssessment() {\r\n\t\tthis.clickAssessment.click();\r\n\t}",
"@Override\n public void onClick(View view) {\n Intent browser = new Intent(Intent.ACTION_VIEW, Uri.parse(\"https://petobesityprevention.org/\"));\n startActivity(browser);\n }",
"public void GoToSurvey(View view) {\n String url = \"https://globalobesity.com.au\";\n startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url)));\n }",
"@Override\n public void onClick(View view) {\n // Create a new intent to open the {@link word_list}\n Intent accomodationIntent = new Intent(Home.this, Accomodation.class);\n\n // Start the new activity\n startActivity(accomodationIntent);\n }",
"public void acceptTerms(View view) {\n if(((CheckBox)view).isChecked()){\n register.setEnabled(true);\n }\n else\n register.setEnabled(false);\n }",
"public void clickOnMenu() {\n\t\tgetAndroidmenubtn().isPresent();\n\t\tgetAndroidmenubtn().click();\n\t\twaitForPageToLoad();\n\t}",
"public void clickOnLogo() {\n\t\t\n\t}",
"public void clickOnViewCartButton()\n \t{\n \t\tproductRequirementsPageLocators.clickOnViewCartButton.click();\n\n \t}",
"@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\topenInterestDialog();\n\t\t\t}",
"void clickAmFromMenu();",
"@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tToast.makeText(mContext, \"购物\", Toast.LENGTH_SHORT).show();\n\t\t\t}",
"@Override\n public void onClick(View v) {\n Uri uri = Uri.parse(\"https://www.google.com/?gws_rd=ssl#q=\" + mAnswer.getWord());\n Intent intent = new Intent(Intent.ACTION_VIEW, uri);\n startActivity(intent);\n }",
"public void clickTaxExemptLink()\n\t{\n \telementUtils.performElementClick(wbTaxExemptLink);\n\t}",
"@Override\n\t\tpublic void onClick(View v) {\n\t\t\t// TODO Auto-generated method stub\n\t\t\t// decide on which button is clicked\n\t\t\t\n\t\t\tif (v.getId()==R.id.bdisagree){\n\t\t\t\t//user disagree with consent form then quit\n\t\t\t\texitNotice();\n\t\t\t}\n\t\t\telse if (v.getId()==R.id.bagree){\n\n\t\t\t\teditor = appinfo.edit();\n\t\t\t\teditor.putBoolean(\"system_consent\", true);\n\t\t\t\teditor.commit();\n\t\t\t\t\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tintent.setClass(getApplicationContext(),MainActivity.class); \n\t\t\t\tstartActivity(intent);\n\t\t\t\t\n\t\t\t\tSystemConsentActivity.this.finish();\n\t\t\t}\n\t\t}",
"public void clickTravellersAdultsInc() {\n\t\ttravellersAdultInc.click();\n\t}",
"@Override\n public void onClick(View view) {\n // Create a new intent to open the {@link PhrasesActivity}\n showChangeLanguageDialog();\n }",
"public void onClick(View view) {\n Intent intent = new Intent();\n intent.setAction(\"android.intent.action.VIEW\");\n intent.setType(\"text/plain\");\n intent.addCategory(\"android.intent.category.DEFAULT\");\n startActivity(intent);\n\n }",
"private void when_clickButtonVoice() {\n onView(withId(R.id.buttonVoice))\n .perform(click());\n }",
"public void clickYes ();",
"@Override\n public void onClick(View view) {\n // Create a new intent to open the {@link PhrasesActivity}\n Intent chillIntent = new Intent(Home.this, ChillZone.class);\n\n // Start the new activity\n startActivity(chillIntent);\n }",
"@Override\n public void onClick(View v)\n {\n Intent viewIntent =\n new Intent(\"android.intent.action.VIEW\",\n Uri.parse(\"https://datadiscovery.nlm.nih.gov/Drugs-and-Supplements/Pillbox/crzr-uvwg\"));\n startActivity(viewIntent);\n }",
"@Override\n public void onClick(View v) {\n Toast.makeText(c, \"yes\" + article.getWeblink(), Toast.LENGTH_LONG).show();\n }",
"public void ClickYes()\n\t{\n\t\tdriver.findElementByName(OR.getProperty(\"Yes\")).click();\n\t}",
"@Override\n public void onClick(View v) {\n Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(\"http://www.gteducation.in\"));\n startActivity(intent);\n Toast.makeText(NoticeActivity.this,\"go to my website\",Toast.LENGTH_SHORT).show();\n\n }",
"public void onClick(View arg0) {\n\n\t\t\t\tIntent i=new Intent(getApplicationContext(),Community_Vitality.class);\n\t\t\t\tstartActivity(i);\n\t\t\t}",
"public void clickCheckout()\n\t{\n\t\twaitForVisibility(checkout);\n\t\tcheckout.click();\n\t}",
"@Override\n public void onClick(View view) {\n // Create a new intent to open the {@link PhrasesActivity}\n Intent servicesIntent = new Intent(Home.this, Services.class);\n\n // Start the new activity\n startActivity(servicesIntent);\n }",
"@Override\n\t\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\t\tmCurriculumVitaeInterface.onAddLanguage();\n\t\t\t\t\t\t}",
"public void learnMoreOnClick(View view) {\n startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(\"https://www.cdc.gov/healthywater/drinking/nutrition/index.html\")));\n }",
"public void clickSurvey() {\n driver.get(\"https://\"+MainClass.site);\n driver.findElement(survey).click();\n //Home.waitObjectLoad(3000); //forced timeout to load the survey\n }",
"public void onLearnMoreClickedListener(View view) {\n Toast.makeText(this, \"Go to service page on the website . . . \", Toast.LENGTH_SHORT).show();\n }",
"public void myorders() {\n\t\t\t\r\n\t\t\t\r\n\t\tBy my=By.xpath(\"//a[@href='/my/orders/create?form']\");\r\n\t\tWebElement We_my=wt.ElementToBeClickable(my, 20);\r\n\t\tWe_my.click();\r\n\t\t}",
"@Override\n public void onClick(View view) {\n Intent Getintent = new Intent(Intent.ACTION_VIEW, Uri.parse(\"http://feedback.avriant.com\"));\n startActivity(Getintent);\n }",
"public void clickingOnGiftLink(WebDriver driver)\r\n\t {\r\n\t\t try\r\n\t\t {\r\n\t\t\t driver.manage().timeouts().implicitlyWait(10,TimeUnit.SECONDS);\r\n\t driver.findElement(By.xpath(\"//a[contains(text(),'Gift')]\")).click();\r\n\t\t\t log.info(\"Clicked on View/Edit Credits Link\");\r\n\t driver.manage().timeouts().implicitlyWait(5,TimeUnit.SECONDS); \r\n\t\t }catch(Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t }",
"public void clickOnMoreLatesBookLink() {\n\t}",
"public void clickDemandSideManagement();",
"public void I_Should_click_My_Account_link(){\n\t MyAccountLink.click();\n\t \n}",
"void clickFmFromMenu();",
"@Override\n\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\tmCurriculumVitaeInterface.onAddAwards();\n\t\t\t\t\t}",
"@Override\n\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\tmCurriculumVitaeInterface.onAddAwards();\n\t\t\t\t\t}",
"public void clickOnProceedToCheckoutButton()\n \t{\n \t\tproductRequirementsPageLocators.clickOnProceedToCheckoutButton.click();\n\n \t}",
"public void clickOnEmailLink1InFooter() {\n\t By element =By.xpath(\"//a[text()='CE at VIN' ]\");\n\t scrollIntoView(element);\n\t _normalWait(3000);\n\t waitAndClick(emailLink1InFooter);\n\t }",
"public void clickOnSellAMotorcycleLink() {\r\n\t\tprint(\"Click on Sell A Motorcycle Link\");\r\n\t\tlocator = Locator.MyTrader.Sell_A_Motorcycle.value;\r\n\t\twaitForElementPresentInDom(2);\r\n\t\tclickOn(locator);\r\n\t}",
"public void onClick(View arg0) {\n\t\t\t\tIntent it=new Intent(\"com.example.btp.FinalDecision\");\n\t\t\t\tstartActivity(it);\n\t\t\t\t\n\t\t\t}",
"public void selectAProduct() {\n specificProduct.click();\n }",
"private void clickSignOn() {\n\t\tthis.clickElement(signon);\n\t}",
"@Override\n public void onClick(View view) {\n Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(article.getLink())); // intent to show item using url\n Context context = view.getContext();\n context.startActivity(browserIntent);\n }",
"public void onShowLicences();",
"public void clickGoToYourAccountButton() {\n\t\telement(signUpObjects.getOTPButton).click();\n\t}",
"public final void click() {\n getUnderlyingElement().click();\n }",
"public void clickProductDetailsViewInCartBtn(){\n clickElement(productDetailsViewInCart);\n }",
"public void clickQALogo() {\r\n\t\theaderLogo = driver.findElement(headerNavBarSelector);\r\n\t\theaderLogo.click();\r\n\t}",
"public void clickOnAddNewDiscountAother() throws InterruptedException\n\t{\n\t\tThread.sleep(500);\n\t\twaitForVisibility(addNewDiscount);\n\t\taddNewDiscount.click();\n\t}",
"public void Open() {\r\n\t click();\r\n\t }",
"@Override\n public void onClick(View view) {\n Intent intent = new Intent(context, ProdDescActivity.class);\n context.startActivity(intent);\n }",
"public void clickOnText(String text);",
"public void clickSalvar (){driver.findElement(botaoSalvar).click();}",
"public void makeAnotherPayment() {\n btnMakeAnotherPayment().click();\n }",
"public void clickOnAddToCartButton()\n \t{\n \t\tproductRequirementsPageLocators.clickAddToCartButton.click();\n\n \t}",
"HtmlPage clickLink();",
"public void ClickNotesAndMessagesPage() {\r\n\t\tnotesandmessages.click();\r\n\t\t\tLog(\"Clicked the \\\"Notes and Messages\\\" button on the Birthdays page\");\r\n\t}",
"@Override\n public void onClick(View v){\n editor.putString(\"term\", idNum);\n editor.commit();\n\n //switch to Details activity\n Intent intent = new Intent(v.getContext(), TermDetailsActivity.class);\n v.getContext().startActivity(intent);\n }",
"public void ClickAccount() {\n if (lnkAccount.isDisplayed()) {\n lnkAccount.click();\n }\n else{System.out.println(\"Account link is not displayed\");}\n }",
"@Override\n\t\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\t\tmCurriculumVitaeInterface.onNative();\n\t\t\t\t\t\t}",
"public void clickTravellersAdultsDec() {\n\t\ttravellersAdultDec.click();\n\t}",
"public void ClickCommissionRatesPage() {\r\n\t\tcommissionrates.click();\r\n\t\t\tLog(\"Clicked the \\\"Commission Rates\\\" button on the Birthdays page\");\r\n\t}",
"public void ClickCommissionInformationPage() {\r\n\t\tcommissioninfo.click();\r\n\t\t\tLog(\"Clicked the \\\"Commission Information\\\" button on the Birthdays page\");\r\n\t}",
"public void clicarAvancar() {\n\t\tavancar.click();\n\t}",
"public void MyQuotePage()\n\t{\n\t\tbpmqobj.MyQuotesTab().click();\n\t\ttry { Thread.sleep(10000); } catch (InterruptedException e) {e.printStackTrace();}\n\t\tbpmqobj.MyQuoteResultCheckSingleCheckBox().click();\n\t\tnew Select(bpmqobj.MyQuotesQuoteActionsDropDown()).selectByVisibleText(\"Open\");\n\t\tbpmqobj.MyQuoteGOButton().click();\n\t\tSystem.out.println(\"----> Pass <---- My Quotes Screen checks are done!\");\t\n\t}",
"public void clickOnSummerDresses(){\n a = new Actions(driver);\n a.moveToElement(driver.findElement(By.cssSelector(\"div[id ='block_top_menu'] a[title='Women']\"))).build().perform();\n driver.findElement(By.cssSelector(\"ul[class='submenu-container clearfix first-in-line-xs'] li a[title='Summer Dresses']\")).click();\n a.moveToElement(driver.findElement(By.xpath(\"//ul[contains(@class,'product_list')]/li[2]\"))).build().perform();\n driver.findElement(By.xpath(\"//ul[contains(@class,'product_list')]/li[2]/div/div[2]/div[2]/a[1]\")).click();\n }",
"@When(\"user clicks on checkoutbutton\")\r\n\tpublic void usert_clicks_on_checkoutbutton() {\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"cart\\\"]/tfoot/tr[2]/td[5]/a\")).click();\r\n\t}",
"@Override\n public void onClick(View v) {\n Intent r1page = new Intent(v.getContext(), the_oxford_kitchen.class);\n startActivity(r1page);\n }",
"@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tUMFeedbackService.openUmengFeedbackSDK(ActMore.this);\n\t\t\t}",
"public void clickNoFee() {\n rbNoFee.click();\n }",
"public void clickOnAddNewVolumeDiscount() throws InterruptedException\n\t{\n\t\tThread.sleep(2000);\n\t\twaitForVisibility(addNewVolumeDiscount);\n\t\taddNewVolumeDiscount.click();\n\t}",
"public void clickDepartsAsLateAs() {\n\t\tdepartsAsLateAsButton.click();\n\t}",
"@When(\"^Click on Contactus Option$\")\r\n\tpublic void click_on_Contactus_Option() {\n\t\tnop.click(\"//*[@id=\\\"contact-link\\\"]/a\"); //clicking contact us option\r\n\t\t\r\n\t}",
"@Override\n\t\t\tpublic void buttonClick(ClickEvent event) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tUI.getCurrent().getNavigator().navigateTo(\"CliPantallaBusquedaExpedientes\");\t \n\t\t\t}",
"private void onClick() {\n\t\tbtnTocash.setOnClickListener(this);\n\t}",
"public void Rt_Click_AstCreation_Buttom_AppBar() {\r\n\t\tActions ac = new Actions(driver);\r\n\t\tac.contextClick().build().perform();\r\n\t}",
"public static void goToCheckout() {\n click(CHECKOUT_UPPER_MENU);\n }",
"@When(\"user clicks on Careers link\")\n public void user_clicks_on_careers_link() throws InterruptedException {\n // bu.windowHandling();\n hp.search();\n }",
"public void PurchaseTicket_OnClick(View view){\n\t\tVibrateButton();\n\t\tpurchaseTicket();\n\t}",
"@RestrictTo({RestrictTo.a.LIBRARY})\n public void performClick(View view) {\n super.performClick(view);\n c(view);\n }",
"public void sobreedad(View view){\n Intent sob = new Intent(this, Sobreedad.class);\n startActivity(sob);\n }"
] | [
"0.77439725",
"0.71571934",
"0.6849943",
"0.6485865",
"0.6292031",
"0.6237994",
"0.61728525",
"0.6087621",
"0.6046464",
"0.6033683",
"0.6026626",
"0.6023537",
"0.6001748",
"0.59800965",
"0.5978377",
"0.5957645",
"0.5935208",
"0.59088993",
"0.58993256",
"0.58901453",
"0.5877485",
"0.58614475",
"0.5861072",
"0.5854362",
"0.5847283",
"0.58465844",
"0.5840351",
"0.5823367",
"0.5806036",
"0.57957643",
"0.57907885",
"0.577887",
"0.57691157",
"0.57602",
"0.5757979",
"0.5757275",
"0.574882",
"0.5741286",
"0.57295144",
"0.57051384",
"0.56999886",
"0.5699493",
"0.5694382",
"0.568502",
"0.5673798",
"0.56725925",
"0.5667692",
"0.566528",
"0.5664274",
"0.5664027",
"0.5661473",
"0.56605566",
"0.56581366",
"0.56573874",
"0.56573874",
"0.56525886",
"0.56491494",
"0.5622867",
"0.56134903",
"0.5593019",
"0.5592819",
"0.559143",
"0.55902785",
"0.55817205",
"0.5576626",
"0.5573836",
"0.5569195",
"0.55680496",
"0.5564884",
"0.55640864",
"0.5562942",
"0.5561575",
"0.555632",
"0.5548943",
"0.553415",
"0.5528466",
"0.5526007",
"0.5522724",
"0.5520666",
"0.5515922",
"0.5514323",
"0.5507056",
"0.55008453",
"0.54989904",
"0.5496345",
"0.5493193",
"0.5491669",
"0.54910403",
"0.5486526",
"0.54832584",
"0.5482147",
"0.5476587",
"0.5476143",
"0.5474806",
"0.5468729",
"0.54513526",
"0.5446169",
"0.5444781",
"0.5443474",
"0.5442605"
] | 0.75165176 | 1 |
Click on Age Button. | public RegisterPage clickOnConfirmAgeButton()
{
confirmAgeButton.click();
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\t\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\t\tmCurriculumVitaeInterface.onBirthday();\n\t\t\t\t\t\t}",
"private void ageRollSelectionActionPerform() {\n\t\tif (ageRollSelection.isSelected()) {\n\t\t\tagePanel.setPreferredSize(new Dimension(2400, 220));\n\t\t\tagePanel.remove(ageInput);\n\t\t\tagePanel.add(intuitive);\n\t\t\tagePanel.add(selfTaught);\n\t\t\tagePanel.add(trained);\n\t\t\tagePanel.add(ageRoll);\n\t\t\treference.validate();\n\t\t\treference.repaint();\n\t\t}\n\t\t// Checks if the Age JButton has been pressed\n\t\tageRoll.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tage = getAgeRoll(intuitive.isSelected(), selfTaught.isSelected(), trained.isSelected());\n\t\t\t\tagePanel.setPreferredSize(new Dimension(2400, 120));\n\t\t\t\tagePanel.add(ageLabel);\n\t\t\t\tagePanel.add(ageInput);\n\t\t\t\tagePanel.remove(ageRollSelection);\n\t\t\t\tagePanel.remove(ageInputSelection);\n\t\t\t\tagePanel.remove(intuitive);\n\t\t\t\tagePanel.remove(selfTaught);\n\t\t\t\tagePanel.remove(trained);\n\t\t\t\tagePanel.remove(ageRoll);\n\t\t\t\tageInput.setText(String.valueOf(age));\n\t\t\t\treference.validate();\n\t\t\t\treference.repaint();\n\t\t\t}\n\n\t\t});\n\t}",
"@Override\n\tpublic void Age(int age) {\n\t\t\n\t}",
"@Override\n\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\tPersonAwardsItem item = (PersonAwardsItem)arg0.getTag();\n\t\t\t\t\t\tmCurriculumVitaeInterface.onChange(item);\n\t\t\t\t\t}",
"public void ClickAgentInformationPage() {\r\n\t\tagentinfo.click();\r\n\t\t\tLog(\"Clicked the \\\"Agent Information\\\" button on the Birthdays page\");\r\n\t}",
"public void setAge(int age) {\n this.age = age;\n }",
"public void setAge(int age) {\n this.age = age;\n }",
"public void setAge(int age) {\n this.age = age;\n }",
"public void setAge(int age) {\n this.age = age;\n }",
"public void setAge(int age) {\n this.age = age;\n }",
"public void setAge(int age) {\n this.age = age;\n }",
"@Override\n\t\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\t\tmCurriculumVitaeInterface.onSex();\n\t\t\t\t\t\t}",
"public void setAge(int age) {\n\t\tthis.age = age;\n\t}",
"public void setAge(int age) {\n\t\tthis.age = age;\n\t}",
"public void setAge(int age) {\n\t\tthis.age = age;\n\t}",
"public void setAge(int age) {\n\t\tthis.age = age;\n\t}",
"public void setAge(int age) {\n\t\tthis.age = age;\n\t}",
"@Override\n\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\tPersonEducation item = (PersonEducation)arg0.getTag();\n\t\t\t\t\t\tmCurriculumVitaeInterface.onChange(item);\n\t\t\t\t\t}",
"private void ageInputSelectionActionPerform() {\n\t\tif (ageInputSelection.isSelected()) {\n\t\t\tagePanel.remove(intuitive);\n\t\t\tagePanel.remove(selfTaught);\n\t\t\tagePanel.remove(trained);\n\t\t\tagePanel.remove(ageRoll);\n\t\t\tagePanel.add(ageInput);\n\t\t\tagePanel.setPreferredSize(new Dimension(2400, 120));\n\t\t\treference.validate();\n\t\t\treference.repaint();\n\t\t}\n\t\tageInput.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tagePanel.add(ageLabel);\n\t\t\t\tagePanel.remove(ageInputSelection);\n\t\t\t\tagePanel.remove(ageRollSelection);\n\t\t\t\treference.validate();\n\t\t\t\treference.repaint();\n\t\t\t}\n\t\t});\n\n\t}",
"@Override\n\t\t\t\tpublic void onClick(View v) {\n\n\t\t\t\t\tint val = Integer.parseInt(rf_booking_people_box.getText()\n\t\t\t\t\t\t\t.toString());\n\n\t\t\t\t\trf_booking_people_box.setText(String.valueOf(val + 1));\n\n\t\t\t\t\tGlobal_variable.str_booking_number_of_people = String\n\t\t\t\t\t\t\t.valueOf(val + 1);\n\t\t\t\t\tBooking_Screen_TabLayout.rf_booking_number_of_people_header.setText(Global_variable.str_booking_number_of_people);\n\n\t\t\t\t}",
"public void clickSearchAgainButtonForDriversAge() {\n travelerPhoneNumber.click();\n driversAge.findElement(By.xpath(\n \"//input[contains(@class,'seleniumDriverAge')]//..//..//a[contains(@class,'seleniumSearchAgainButton')]\"))\n .click();\n }",
"public void setAge(int age){\n this.age = age;\n }",
"@Override\n\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\tmCurriculumVitaeInterface.onAddPersonEducation();\n\t\t\t\t\t}",
"@Override\n\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\tmCurriculumVitaeInterface.onAddPersonEducation();\n\t\t\t\t\t}",
"public void clickGender() {\n driver.findElement(gender).click();\n }",
"public void setAge(Integer age) {\n this.age = age;\n }",
"public void setAge(int age)\r\n {\r\n this.age = age;\r\n }",
"public void setAge(Integer age) {\n this.age = age;\n }",
"public void setAge(Integer age) {\n this.age = age;\n }",
"public void setAge(Integer age) {\n this.age = age;\n }",
"public void setAge(Integer age) {\n this.age = age;\n }",
"protected void setAge(int age) {\r\n\t\tthis.age = age;\r\n\t}",
"public void setAge(Integer age) {\r\n this.age = age;\r\n }",
"public void clickGoToYourAccountButton() {\n\t\telement(signUpObjects.getOTPButton).click();\n\t}",
"public void setAge(int age) { \n\t\t this.age = age; \n\t}",
"@Override\n\t\t\t\tpublic void onClick(View v) {\n\n\t\t\t\t\tint val = Integer.parseInt(rf_booking_people_box.getText()\n\t\t\t\t\t\t\t.toString());\n\t\t\t\t\tif (val <= 1) {\n\t\t\t\t\t\trf_booking_people_box.setText(\"1\");\n\t\t\t\t\t\tGlobal_variable.str_booking_number_of_people = \"1\";\n\t\t\t\t\t\tBooking_Screen_TabLayout.rf_booking_number_of_people_header.setText(Global_variable.str_booking_number_of_people);\n\t\t\t\t\t} else {\n\t\t\t\t\t\trf_booking_people_box.setText(String.valueOf(val - 1));\n\t\t\t\t\t\tGlobal_variable.str_booking_number_of_people = String\n\t\t\t\t\t\t\t\t.valueOf(val - 1);\n\t\t\t\t\t\tBooking_Screen_TabLayout.rf_booking_number_of_people_header.setText(Global_variable.str_booking_number_of_people);\n\t\t\t\t\t}\n\n\t\t\t\t}",
"@Override\n\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\tmCurriculumVitaeInterface.onAddAwards();\n\t\t\t\t\t}",
"@Override\n\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\tmCurriculumVitaeInterface.onAddAwards();\n\t\t\t\t\t}",
"public static void calculateTheAge (int birthYear){\n int age = 2021 - birthYear;\n System.out.println(\"The person is \" + age + \" years old\");\n }",
"public Builder setAge(int value) {\n \n age_ = value;\n onChanged();\n return this;\n }",
"@Override\n\t\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\t\tmCurriculumVitaeInterface.onGrade();\n\t\t\t\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\topenInterestDialog();\n\t\t\t}",
"public static void setAge(String age){\n setUserProperty(Constants.ZeTarget_keyForUserPropertyAge, age);\n }",
"@Override\r\n\tpublic void setAge(int newAge) \r\n\t{\r\n\t\tthis._age = newAge;\r\n\t}",
"@Override\r\n\tpublic final void setAge(final int theAge) {\r\n\t\tthis.age = theAge;\r\n\t}",
"public Builder setAge(int value) {\n \n age_ = value;\n onChanged();\n return this;\n }",
"public Builder setAge(int value) {\n \n age_ = value;\n onChanged();\n return this;\n }",
"public void clickEdit() {\r\n\t\tEdit.click();\r\n\t}",
"public void setAge(String age) {\n this.age = age;\n }",
"@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tgeti();\n\t\t\t}",
"@Override\n public void onClick(View view) {\n updatePerson();\n }",
"public void incrementAge(int dogAge) {\n this.age = this.age + 1;\n }",
"public static void printAge(int year){\n int age =2021 - year;\n System.out.println(\"Birth year : \" + year + \" Age : \" + age);\n }",
"public static WebElement btn_clickYearsInBusinessGO() throws Exception{\r\n \ttry{\r\n \t\telement = driver.findElement(By.id(\"busYearsGoButton\"));\r\n \t\tAdd_Log.info(\"User is click on Years in Business 'GO' button.\");\r\n \t\t\r\n \t}catch(Exception e){\r\n \t\tAdd_Log.error(\"Years in Business 'GO' button is NOT found on the page.\");\r\n \t\tthrow(e);\r\n \t}\r\n \treturn element;\r\n }",
"protected void setAge(Age age) {\n this.age = age;\n }",
"public void btn_LearningActivity() {\r\n\t\tbtn_LearningActivity.click();\r\n\t}",
"public void editDogButtonClicked() {\r\n if (areFieldsNotBlank()) {\r\n viewModel.editDog();\r\n viewHandler.openView(\"home\");\r\n dogNameField.setStyle(null);\r\n }\r\n }",
"@Test\n public void ShowMoreIncomeButton() {\n onView(withId(R.id.showMoreIncome)).check(matches(isDisplayed())); // Find button\n onView(withId(R.id.showMoreIncome)).check(matches(isClickable())); // Check if clickable\n onView(withId(R.id.showMoreIncome)).perform(click()); // Perform click\n intended(hasComponent(showMoreIncome.class.getName())); // Opens more income page\n }",
"public void ClickUserInformationPage() {\r\n\t\tuserinfo.click();\r\n\t\t\tLog(\"Clicked the \\\"User Information\\\" button on the Birthdays page\");\r\n\t}",
"public void ClickCommissionRatesPage() {\r\n\t\tcommissionrates.click();\r\n\t\t\tLog(\"Clicked the \\\"Commission Rates\\\" button on the Birthdays page\");\r\n\t}",
"public void Number_Button(int i){\n\t}",
"@And(\"^I click on \\\"([^\\\"]*)\\\"$\")\r\n\tpublic void i_click_On_Button(String actkey) throws Throwable {\n\t\tThread.sleep(5000);\r\n\t\t//loginPage.getDriver().findElement(By.xpath(\".//*[contains(@value,'Edit')]\")).click();\r\n\t\tenduser.Qos_screen_edit_and_save(actkey);\r\n\t\t\r\n\t}",
"public void setAge(final int age) {\n mAge = age;\n }",
"@Override\n\tpublic void setAge () {\n\t\t// defining the random range for age between 1 up to 50\n\t\tint age = 1 + (int)(Math.random()*(3));\n\t\tthis.age = age;\n\t}",
"public void set_age(int obj_age) {\n\t\tage = obj_age;\n\t}",
"public void clickTravellersAdultsInc() {\n\t\ttravellersAdultInc.click();\n\t}",
"public void ClickIVANSInformationPage() {\r\n\t\tivansinfo.click();\r\n\t\t\tLog(\"Clicked the \\\"IVANS Information\\\" button on the Birthdays page\");\r\n\t}",
"public void setAge(int age) { this.age = age; }",
"public void clickLikeBtn() {\n likeBtn.click();\n }",
"public Builder setAge(int value) {\n bitField0_ |= 0x00000004;\n age_ = value;\n onChanged();\n return this;\n }",
"void setAge(int age);",
"public void age() {\r\n hp--;\r\n darkerColor();\r\n }",
"public void setAverageLifeExp(int age) {\n averageLifeExp = age;\n }",
"@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tdct5++;\r\n\t\t\t\tdtAdd5.setText(\"\" + dct5);\r\n\t\t\t\tdttotal = dttotal + 200;\r\n\t\t\t\tdtotal.setText(\"Bill Scratch Pad : To Pay tk. \" + dttotal);\r\n\t\t\t}",
"public void setAge(int age);",
"public void onClick(View arg0) {\n\n int i = arg0.getId();\n // login button was pressed\n\n }",
"@Override\n public void onDateSet(DatePicker view, int year1, int monthOfYear,\n int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year1);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n /* date=dayOfMonth;\n month=monthOfYear;\n year=year1;*/\n if(getAge(year1,monthOfYear,dayOfMonth) >= 18){\n updateLabel();\n }else{\n Utility.showToastMessage(GetUserInfoActivity.this,\"Age should be 18+\");\n }\n\n }",
"public void onChangedAdBtnPressed() {\n String uniqueID = advertisement.getUniqueID();\n view.showEditView(uniqueID);\n }",
"@Override\n\tpublic void onClick(View view) {\n\t\tswitch (view.getId()) {\n\t\tcase R.id.tv_income_time:\n\t\t\tshowTime();\n\t\t\tbreak;\n\t\tcase R.id.btn_save_income:\n\t\t\tsaveIncomeInfo();\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t}",
"@Override\n\tprotected void OnClick() {\n\t\t\n\t}",
"public void clickOnMoreLatesBookLink() {\n\t}",
"@Given(\"click {string} Early Access button\")\n public void clickEarlyAccessButton(String string) {\n $(page_objects.AdminPage.ApproveButton).click();\n }",
"@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tEditText pname = (EditText) findViewById(R.id.profilename);\n\t\t\t\tString prname = pname.getText().toString();\n\t\t\t\tshowDialogDays(prname + \"days\");\n\t\t\t}",
"public void onBankClick(View view) {\n bankUserScore();\n }",
"@When(\"^I click on Book button$\")\n\tpublic void i_click_on_Book_button() throws Throwable {\n\t\tfs.selectBookOption();\n\t}",
"public void ClickNext() {\r\n\t\tnext.click();\r\n\t\t\tLog(\"Clicked the \\\"Next\\\" button on the Birthdays page\");\r\n\t}",
"public void buttonClicked();",
"@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tcalendar.movePrevYear();\n\t\t\t\tdisplayCalendar();\n\t\t\t}",
"public void past()\n\t{\n\t\tdriver.findElementByName(OR.getProperty(\"Past\")).click();\n\t}",
"@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tcalendar.moveNextYear();\n\t\t\t\tdisplayCalendar();\n\t\t\t}",
"@When(\"^the user enters 'Term = (\\\\d+) years'$\")\r\n\tpublic void the_user_enters_Term_years(int arg1) throws Throwable {\n\t\tdriver.findElement(By.xpath(\"//input[@id='SearchMortgageTerm']\")).sendKeys(\"30\");\r\n\t\tSystem.out.println(\"user entered Term\");\r\n\r\n\t}",
"@When(\"I click on datepicker\")\n public void i_click_on_datepicker() {\n System.out.println(\"inside date picker\");\n jQueryHPage.clickDatePicker();\n }",
"public void onClick(View arg0) {\n\t\t\t\tint seledtedId = radioSex.getCheckedRadioButtonId();\n\t\t\t\tRadioButton radioMale = (RadioButton) findViewById(seledtedId);\n\t\t\t\tToast.makeText(ExampleRadio.this, radioMale.getText(), Toast.LENGTH_LONG).show();\n\t\t\t}",
"public void ClickAgentContactInformationPage() {\r\n\t\tagentcontactinfo.click();\r\n\t\t\tLog(\"Clicked the \\\"Agent Contact Information\\\" button on the Birthdays page\");\r\n\t}",
"public void onClicked();",
"public void setAge(int age) {\n\t\tif (age < 0) {\n\t\t\tthis.age = 0;\n\t\t} else {\n\t\t\tthis.age = age;\n\t\t}\n\t}",
"private void clickSignOn() {\n\t\tthis.clickElement(signon);\n\t}",
"public UserBuilder age(int age) {\n\t\t\tthis.age = age;\n\t\t\treturn this; // return this to make expression chainable.\n\t\t\t\n\t\t}",
"@When(\"^Clicks on Find a Mortgage Rate button$\")\r\n\tpublic void clicks_on_Find_a_Mortgage_Rate_button() throws Throwable {\n\t\tdriver.findElement(By.xpath(\"//button[@id='myButton']\")).click();\r\n\t\tSystem.out.println(\"Clicked on Find a Mortgage Rate button\");\r\n\r\n\t}",
"@SuppressLint(\"InlinedApi\")\n @Override\n public void onClick(final View v) {\n @SuppressLint({\"NewApi\", \"LocalSuppress\"}) final Calendar mcurrentDate = Calendar.getInstance();\n int mYear = mcurrentDate.get(Calendar.YEAR);\n int mMonth = mcurrentDate.get(Calendar.MONTH);\n int mDay = mcurrentDate.get(Calendar.DAY_OF_MONTH);\n\n DatePickerDialog mDatePicker = new DatePickerDialog(UserRegister.this, new DatePickerDialog.OnDateSetListener() {\n\n public void onDateSet(DatePicker datepicker, int selectedyear, int selectedmonth, int selectedday) {\n mybirthday = new GregorianCalendar(selectedyear, selectedmonth, selectedday).getTime();\n\n String birthday = \"\" + selectedday + \"/\" + (selectedmonth + 1) + \"/\" + selectedyear + \"\";\n // String dob = birthday;\n et_dob.setText(birthday);\n\n\n if (validatedate(mybirthday)) {\n Snackbar.make(v, birthday + \" is not possible\", Snackbar.LENGTH_LONG).show();\n et_dob.setText(\"\");\n return;\n }\n if (validateage(mybirthday)) {\n Snackbar.make(v, \"You have to be above 15 years old\", Snackbar.LENGTH_LONG)\n .setAction(\"Help\", new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n //visitwebsite();\n }\n })\n .show();\n et_dob.setText(\"\");\n }\n\n }\n }, mYear, mMonth, mDay);\n mDatePicker.setTitle(\"Select date\");\n mDatePicker.show();\n\n\n }"
] | [
"0.6420403",
"0.6344782",
"0.5865332",
"0.5804756",
"0.5722534",
"0.569864",
"0.569864",
"0.569864",
"0.569864",
"0.569864",
"0.569864",
"0.5687025",
"0.56846774",
"0.56846774",
"0.56846774",
"0.56846774",
"0.56846774",
"0.56787395",
"0.5672051",
"0.56618476",
"0.56198734",
"0.56104094",
"0.55946267",
"0.55946267",
"0.558489",
"0.552929",
"0.55224913",
"0.551321",
"0.551321",
"0.551321",
"0.551321",
"0.55055",
"0.54969496",
"0.54916567",
"0.54901725",
"0.54460245",
"0.53995055",
"0.53995055",
"0.5393823",
"0.5375506",
"0.53566486",
"0.5348923",
"0.53367203",
"0.5330415",
"0.53168774",
"0.53134996",
"0.53134996",
"0.53062934",
"0.529899",
"0.52985764",
"0.5290249",
"0.52805114",
"0.52766836",
"0.5251442",
"0.52499557",
"0.52492297",
"0.5245729",
"0.52385044",
"0.52262133",
"0.5225266",
"0.5183517",
"0.51754993",
"0.51746035",
"0.5157686",
"0.515766",
"0.51545614",
"0.5154151",
"0.51338756",
"0.5128263",
"0.5126354",
"0.51254606",
"0.511012",
"0.51090807",
"0.5104387",
"0.5085737",
"0.50849867",
"0.5075298",
"0.50685257",
"0.5065009",
"0.50640625",
"0.5058328",
"0.5056143",
"0.5054903",
"0.5053306",
"0.5045577",
"0.503529",
"0.5031832",
"0.5021231",
"0.50146276",
"0.50134563",
"0.5012238",
"0.5003741",
"0.4997312",
"0.4997132",
"0.49940467",
"0.49901837",
"0.4988094",
"0.49878123",
"0.49871862",
"0.49775618"
] | 0.71164393 | 0 |
Click on Continue Button. | public EmagHomePage clickonContinueButton()
{
continueButton.click();
return new EmagHomePage(driver);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void clickContinue() {\n\t\tcontinueButton.click();\n\t}",
"private void clickContinueButton() {\n clickElement(continueButtonLocator);\n }",
"@When(\"^I click on the Continue button$\")\n\tpublic void i_click_on_the_Continue_button() throws Throwable {\n\t\tdriver.findElement(By.id(\"tdb5\")).click();\n\t \n\t}",
"@When(\"^User clicks on continue button$\")\n\tpublic void user_clicks_on_continue_button() throws Throwable {\n\t\tGetDriver.browserState().findElement(By.name(\"findFlights\")).click();\n\t}",
"public void clickLogin() {\n\t\tcontinueButton.click();\n\t}",
"public void checkoutcontinuebutton( ){\r\n\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- continue Registartion button clicked in popu page\");\r\n\t\ttry{\r\n\r\n\t\t\twaitforElementVisible(locator_split(\"checkoutregistrationcontinue\"));\r\n\t\t\tclick(locator_split(\"checkoutregistrationcontinue\"));\r\n\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- ccontinue Registartion button clicked in popu page\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- continue Registartion button is not clicked in popu page\"+elementProperties.getProperty(\"_Regcontinuebutton\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"checkoutregistrationcontinue\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\r\n\t}",
"public void clickContinueInAgentPage() throws Exception {\n\n\t\twdriver.findElement(By.xpath(\"//button[@type='submit']\")).click();\n\n\t}",
"public void Regcontinuebutton( ){\r\n\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- continue Registartion button clicked\");\r\n\t\ttry{\r\n\r\n\t\t\twaitforElementVisible(locator_split(\"Regcontinuebutton\"));\r\n\t\t\tclick(locator_split(\"Regcontinuebutton\"));\r\n\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- continue Registartion button clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- continue Registartion button is not clicked \"+elementProperties.getProperty(\"Regcontinuebutton\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"Regcontinuebutton\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\r\n\t}",
"public void clickOnContinueButton() throws Exception {\n\t\twdriver.switchTo().frame(\"ifmail\");\n\t\twaitForElement.waitForElement(\"html/body/div[1]/div[3]/div[2]/div/div[1]/table[1]/tbody/tr[1]/td[2]/a\");\n\t\twdriver.findElement(By.xpath(\"html/body/div[1]/div[3]/div[2]/div/div[1]/table[1]/tbody/tr[1]/td[2]/a\")).click();\n\t}",
"@When(\"usert clicks on continue\")\r\n\tpublic void usert_clicks_on_continue() {\n\tdriver.findElement(By.id(\"btn\")).click();\r\n\t\r\n}",
"@And(\"^I Should see Continue shopping button$\")\n public void iShouldSeeCountinueButton()throws Throwable{\n Assert.assertTrue(\"Continue shopping button is not present\", Elements.elementPresent(\"checkout.rc_test_element\"));\n Clicks.click(\"checkout.rc_test_element\");\n getWebDriver().navigate().back();\n }",
"public void clickOnContinueShoppingButton()\n \t{\n \t\tproductRequirementsPageLocators.clickOnContinueShoppingButton.click();\n\n \t}",
"public synchronized void click_lnk_continueShopping() throws Exception {\n\t\tutils.clickWebElement(driver, btn_continueShopping(), \"Continue Shopping button not found\");\n\n\t}",
"public void ClickChecoutsubmitcontinue(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Checkout Registration submit continue button should be clicked\");\r\n\t\ttry{\r\n\r\n\t\t\tif(isElementPresent(locator_split(\"btncheckoutregistrationsubmitcontinue\"))){\r\n\t\t\t\tclick(locator_split(\"btncheckoutregistrationsubmitcontinue\"));\r\n\t\t\t}else{\r\n\t\t\t\tclick(locator_split(\"chkcheckoutregistrationconfirmaddress\"));\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"Checkout Registration submit continue button is clicked\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Checkout Registration submit continue button is clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Checkout Registration submit continue button is not clicked\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"btncheckoutregistrationsubmitcontinue\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\r\n\t}",
"private static void askForContinue() {\n\t\t\t\n\t\t}",
"public void continue_billing() {\r\n\t\t\tthis.Continue_Billing.click();\r\n\t\t}",
"@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tMessage msg = Message.obtain();\r\n\t\t\t\tnextStep = OK;\r\n\t\t\t\tmsg.what = nextStep;\r\n\t\t\t\tmHandler.sendMessage(msg);\r\n\t\t\t\tisPause =true;\r\n\t\t\t}",
"public Payment clickContinue() throws InterruptedException {\n\n Thread.sleep(2000);\n\n WebElement button = new WebDriverWait(BaseWebDriver.Instance, BaseWebDriver.getInstance().TIMEOUT)\n .until(ExpectedConditions.presenceOfElementLocated(locatorContinue));\n button.click();\n\n return new Payment();\n }",
"public void clickContinueButtonForUnit() {\r\n\t\twebAppDriver.clickElementByCss(btnContinueButtonStorageUnitCss);\r\n\t\twebAppDriver.verifyPresenceOfTextInDivTagText(\"Your Reservation\");\r\n\t}",
"public void proceedOnPopUp() {\n Controllers.button.click(proceedToCheckOutPopUp);\n }",
"public void enableContinue() {\n if (PayBillAccountBox.getValue() != null) continueButton.setDisable(false);\n }",
"private void setOnContinueClickListener()\n\t{\n\t\t_continue.setOnClickListener(new View.OnClickListener()\n\t\t{\t\n\t\t\tpublic void onClick(View v)\n\t\t\t{\n\t\t\t\tIntent intent = new Intent(\"cody.mtmanager.com.OrderTiebreakers\");\n\t\t\t\t\n\t\t\t\taddExtras(intent);\n\t\t\t\tstartActivity(intent);\n\t\t\t}\n\t\t});\n\t}",
"public void acceptAndProceed()\r\n {\r\n\t driver.findElement(By.id(\"PCNChecked\")).click();\r\n\t driver.findElement(By.xpath(\"/html/body/div[1]/div/div/main/div/main/div/div/div[1]/div/div/form/fieldset/div[3]/div[2]/button\")).click();\r\n }",
"@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tMessage msg = Message.obtain();\r\n\t\t\t\tnextStep = OTHERBEACH;\r\n\t\t\t\tmsg.what = nextStep;\r\n\t\t\t\tmHandler.sendMessage(msg);\r\n\t\t\t\tisPause =true;\r\n\t\t\t}",
"public void clickOnContinueAsGuestUserLink()\n \t{\n \t\tproductRequirementsPageLocators.continueAsGuestUserLIink.click();\n\n \t}",
"public void Click_Done()\r\n\t{\r\n\t\tExplicitWait(Specialdone);\r\n\t\tif (Specialdone.isDisplayed()) \r\n\t\t{\r\n\t\t\tJavascriptexecutor(Specialdone);\r\n\t\t\tExplicitWait(Checkavailability);\r\n\t\t\t//System.out.println(\"Clicked on Special Rate plan done button \");\r\n\t\t\tlogger.info(\"Clicked on Special Rate plan done button\");\r\n\t\t\ttest.log(Status.INFO, \"Clicked on Special Rate plan done button\");\r\n\r\n\t\t} else {\r\n\t\t\t//System.out.println(\"Special Rate plan done button not found\");\r\n\t\t\tlogger.error(\"Special Rate plan done button not found\");\r\n\t\t\ttest.log(Status.FAIL, \"Special Rate plan done button not found\");\r\n\r\n\t\t}\r\n\t}",
"@Test\n public void test_rf_continue_button_opens_correct_activity() {\n //Click the positive button in the dialog\n onView(withText(\"I understand\")).perform(click());\n //Find the views and perform action\n onView(withId(R.id.redFlag_continue)).perform(click());\n //Check if action returns desired outcome\n intended(hasComponent(ObservableSignsActivity.class.getName()));\n }",
"public void ClickContinueShopping(){\r\n\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Continue shopping button should be clicked\");\r\n\t\ttry{\r\n\t\t\tsleep(3000);\r\n\t\t\tList<WebElement> ele = listofelements(locator_split(\"btnClickcontinueButton\"));\r\n\t\t\tif(ele.size()>1){\r\n\t\t\t\tclick(ele.get(1));\r\n\t\t\t}else{\r\n\t\t\t\tclick(ele.get(0));\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"Continue Shopping button is clicked\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Continue Shopping button is clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Continue Shopping button is not clicked\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"btnClickcontinueButton\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t}",
"public synchronized WebElement btn_continueShopping() throws Exception {\n\n\t\treturn utils.findElementByLocator(driver, \"PDP_continueShopping\", \"| PDP:Continue Shopping not present\");\n\t}",
"public void clickbtnApprove() {\n\t\twaitForElementClickable(10,btnApprove);\n\t\tclickByJavaScript(btnApprove);\n\t\tsleep(1);\n\t}",
"public void clickOnProceedToCheckoutButton()\n \t{\n \t\tproductRequirementsPageLocators.clickOnProceedToCheckoutButton.click();\n\n \t}",
"private Button continueButton(EventHandler<ActionEvent> splashScreenComboBoxEvent) {\n\t\tcontinueButton = new Button();\n\t\tcontinueButton.setText(CONTINUE);\n\t\tcontinueButton.setPrefWidth(200);\n\t\tcontinueButton.setOnAction(splashScreenComboBoxEvent);\n\t\tcontinueButton.setId(\"Continue\");\n\t\t\n\t\tcontinueButton.setDisable(true);\n\t\t\n\t\treturn continueButton;\n\t}",
"public void clickOnSuccessOkBtn() throws Exception {\r\n\t\r\n\t\t\tclickOnButton(btnOKSuccess);\r\n\t\t\tlog(\"clicked on OK button and object is:-\" + btnOKSuccess.toString());\r\n\t\t\tThread.sleep(1000);\r\n\t}",
"public void onClick(View v) {\n \tm_main.gameContinue();\n }",
"public static void continueChat()\r\n {\r\n do\r\n {\r\n NPCChat.clickContinue(true);\r\n General.sleep(300, 450);\r\n }\r\n while (NPCChat.getClickContinueInterface() != null);\r\n General.sleep(300, 350);\r\n }",
"private void continueButton() {\n Optional<Squadron> anyAvailable = game\n .getHumanPlayer()\n .getNations()\n .stream()\n .filter(Nation::isSquadronsPresent)\n .flatMap(nation -> game.getHumanPlayer().getSquadrons(nation, SquadronLocationType.LAND).stream())\n .filter(Squadron::isAvailable)\n .findAny();\n\n List<Region> regionsNotSatisfied = gameMap\n .areAllRegionsSatisfied(game.getHumanSide());\n\n if (anyAvailable.isPresent()) {\n warnNotAllSquadronsDeployed();\n } else if (regionsNotSatisfied.size() > 0) {\n warnNotAllRegionsSatisfied(regionsNotSatisfied);\n } else {\n navigate.goNext(this.getClass(), stage);\n }\n }",
"public static void checkAndClickPlayButton() {\r\n\t\tcheckNoSuchElementExceptionByXPath(\"//*[@id=\\\"secondepage\\\"]/center/button[1]\", \"\\\"Play\\\" button\");\r\n\t\tcheckElementNotInteractableExceptionByXPath(\"//*[@id=\\\"secondepage\\\"]/center/button[1]\", \"\\\"Play\\\" button\");\r\n\t}",
"public static void clickNextBtn() {\t\n\t\ttry {\n\t\t\tdriver.findElement(By.id(\"nextquest\")).click();\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\tSystem.out.println(\"Next button in Q&A submit doesnt work\");\n\t\t}\n\t}",
"public void clickNextButton() {\n if (editSummaryFragment.isActive()) {\n //we're showing the custom edit summary window, so close it and\n //apply the provided summary.\n editSummaryFragment.hide();\n editPreviewFragment.setCustomSummary(editSummaryFragment.getSummary());\n } else if (editPreviewFragment.isActive()) {\n //we're showing the Preview window, which means that the next step is to save it!\n if (abusefilterEditResult != null) {\n //if the user was already shown an AbuseFilter warning, and they're ignoring it:\n funnel.logAbuseFilterWarningIgnore(abusefilterEditResult.getCode());\n }\n getEditTokenThenSave(false);\n funnel.logSaveAttempt();\n } else {\n //we must be showing the editing window, so show the Preview.\n hideSoftKeyboard(this);\n editPreviewFragment.showPreview(title, sectionText.getText().toString());\n funnel.logPreview();\n }\n }",
"public void clickOnCancelButtonInMarkAsCompletePopup() {\n getLogger().info(\"Click on cancel button in mark as complete button\");\n try {\n waitForClickableOfElement(eleCancelBtn, \"Wait for click on cancel button\");\n clickElement(eleCancelBtn, \"Click on cancel button\");\n NXGReports.addStep(\"Verify click on cancel button in mark as complete popup successful \", LogAs.PASSED, null);\n } catch (Exception ex) {\n AbstractService.sStatusCnt++;\n NXGReports.addStep(\"Verify click on cancel button in mark as complete popup fail\", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n }\n }",
"public void ClickMyAccountContinueShopping(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- My Account Registration continue shopping should be clicked\");\r\n\t\ttry{\r\n\r\n\t\t\tclick(locator_split(\"btnMyAccountContinueShopping\"));\r\n\t\t\tThread.sleep(3000);\r\n\t\t\tSystem.out.println(\"My Account Registration continue shopping is clicked\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- My Account Registration continue shopping is clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- My Account Registration continue shopping is not clicked\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"btnMyAccountContinueShopping\")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\r\n\t}",
"public void clickOnEnrollNowButton() {\n\t\tif(enrollNowButton.isEnabled()) {\n\t\twaitAndClick(enrollNowButton);\n\t\t}\n\t}",
"@Override\n public void onClick(View v) {\n if(((RelapseProcessActivity)getActivity()).canProceed == true) {\n goToEmergencyGoneStep();\n }\n }",
"private void actionResume() {\n\t\tselectedDownload.resume();\n\t\tupdateButtons();\n\t}",
"@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tMessage msg = Message.obtain();\r\n\t\t\t\tnextStep = PROPER;\r\n\t\t\t\tmsg.what = nextStep;\r\n\t\t\t\tmHandler.sendMessage(msg);\r\n\t\t\t\tisPause =true;\r\n\t\t\t}",
"public static void checkAndClickNextButtonTriviaMode() {\r\n\t\tcheckNoSuchElementExceptionByID(\"btnnext\", \"\\\"Next\\\" button in trivia mode\");\r\n\t\tcheckElementNotInteractableExceptionByID(\"btnnext\", \"\\\"Next\\\" button in trivia mode\");\r\n\t}",
"public static void checkAndClickNextButton() {\r\n\t\tcheckNoSuchElementExceptionByID(\"nextquest\", \"\\\"Next\\\" button\");\r\n\t\tcheckElementNotInteractableExceptionByID(\"nextquest\", \"\\\"Next\\\" button\");\r\n\t}",
"public void clickOnCancelButton() {\r\n\t\tsafeJavaScriptClick(manageVehiclesSideBar.replace(\"Manage Vehicles\", \"Cancel\"));\r\n\t}",
"@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\r\n\t\t\t\tMessage msg = Message.obtain();\r\n\t\t\t\tnextStep = USER;\r\n\t\t\t\tmsg.what = nextStep;\r\n\t\t\t\tmHandler.sendMessage(msg);\r\n\t\t\t\tisPause =true;\r\n\t\t\t}",
"public void clickOnYesButton() {\r\n\t\tsafeJavaScriptClick(manageVehiclesSideBar.replace(\"Manage Vehicles\", \"Yes\"));\r\n\t}",
"public void clickYes ();",
"void okButtonClicked();",
"@Test\r\n public void TestCancelButton(){\r\n solo.clickOnView(solo.getView(R.id.nav_view).findViewById(R.id.navigation_notifications));\r\n solo.waitForFragmentById(R.id.navigation_notifications);\r\n solo.clickOnView(solo.getView(R.id.addFollowing));\r\n solo.sleep(5000);\r\n solo.waitForActivity(AddFollowingActivity.class, 2000);\r\n solo.clickOnView(solo.getView(R.id.cancel2));\r\n solo.waitForFragmentById(R.id.navigation_notifications);\r\n\r\n }",
"private void clickOn() {\n\t\tll_returnbtn.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tfinish();\n\t\t\t}\n\t\t});\n\t}",
"public void proceedToLetsGo() {\n\t\tBrowser.click(\"xpath=.//*[@id='DisplayNavigatorBrokerLandingPage']/div/div/div/div/div/div/div/div/div[5]/a/img\");\n\t}",
"@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tBaseDroidApp.getInstanse().dismissErrorDialog();\n\t\t\t\t\t\n\t\t\t\t\tswitch (v.getId()) {\n\t\t\t\t\tcase R.id.exit_btn:// 取消\n\t\t\t\t\t\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase R.id.retry_btn:// 确定\n\t\t\t\t\t\tfinish();\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}",
"public void addContinue() {\n if (cursor == 0) {\n JOptionPane.showMessageDialog(null, \"There's no note to continue!\", \"Invalid Continue\", JOptionPane.WARNING_MESSAGE);\n } else {\n notePressed(CONTINUE);\n }\n }",
"public static void checkAndClickTryAgainButton() {\r\n\t\tcheckNoSuchElementExceptionByXPath(\"//*[@id=\\\"markpage\\\"]/center/button[1]\", \"\\\"Try again\\\" button\");\r\n\t\tcheckElementNotInteractableExceptionByXPath(\"//*[@id=\\\"markpage\\\"]/center/button[1]\", \"\\\"Try again\\\" button\");\r\n\t}",
"public void verifySkip()\n\t{\n\t\tAssert.assertEquals(continueButton.getText(), \"Skip\");\n\t}",
"public void ClickContinueShoppingBtnAddedToCartPage( ){\r\n\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Continue Shopping button clicked in Added to Cart Page.\");\r\n\t\ttry{\r\n\r\n\t\t\twaitforElementVisible(locator_split(\"btnShoppingCartContinueShopping\"));\r\n\t\t\tclick(locator_split(\"btnShoppingCartContinueShopping\"));\r\n\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Continue Shopping button clicked in Added to Cart Page.\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Continue Shopping button is not clicked in Added to Cart Page.\"+elementProperties.getProperty(\"btnShoppingCartContinueShopping\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"btnShoppingCartContinueShopping\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\r\n\t}",
"public void setContinue(javafx.event.ActionEvent actionEvent) {\n Alert.show(\"Deposit\", \"deposit succeed!\");\n backToMenu(actionEvent);\n }",
"public void clickGoToYourAccountButton() {\n\t\telement(signUpObjects.getOTPButton).click();\n\t}",
"public static void clickNextBtnGame() {\t\n\t\tdriver.findElement(By.id(\"btnnext\")).click();\n\t}",
"public void clickOnSubmit() {\r\n\r\n\t\treportStep(\"About to click on Submit button \", \"INFO\");\r\n\r\n\t\tif(clickAfterWait(submitButton)) {\r\n\r\n\t\t\treportStep(\"Successfully clicked on the Submit button \", \"PASS\");\r\n\r\n\t\t}else {\r\n\t\t\tclickAfterWait(submitButton);\r\n\t\t\treportStep(\"Failed to click on the Submit button \", \"INFO\");\r\n\r\n\t\t}\r\n\t}",
"@Override\n public void onClick(View view) {\n switch (view.getId())\n {\n case R.id.activity_slider_btn_skip:\n Intent loginIntent = new Intent(IntroductionActivity.this, MainActivity.class);\n loginIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(loginIntent);\n finish();\n break;\n }\n }",
"public static void checkAndClickQuitButtonStartPlayingPage() {\r\n\t\tcheckNoSuchElementExceptionByXPath(\"//*[@id=\\\"secondepage\\\"]/center/button[2]\", \"\\\"Quit\\\" button of Start playing page\");\r\n\t\tcheckElementNotInteractableExceptionByXPath(\"//*[@id=\\\"secondepage\\\"]/center/button[2]\", \"\\\"Quit\\\" button of Start playing page\");\r\n\t}",
"public void goToNextPage() {\n nextPageButton.click();\n }",
"@Override\n\t\t\tpublic void onClick(View v)\n\t\t\t{\n\t\t\t\tToast.makeText(getApplicationContext(), \"Please Sign in to continue.\", Toast.LENGTH_SHORT).show();\n\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View v)\n\t\t\t{\n\t\t\t\tToast.makeText(getApplicationContext(), \"Please Sign in to continue.\", Toast.LENGTH_SHORT).show();\n\n\t\t\t}",
"public void clickCookieOKButton(WebDriver driver)\n\t\t {\n\t\t\t \n\t\t\t try\n\t\t\t {\n\t\t\t\tList<WebElement> allbutton = driver.findElements(By.tagName(\"button\"));\n\t\t\t\t\n\t\t\t\tfor(WebElement btn:allbutton)\n\t\t\t\t{\n\t\t\t\t\tString strbtnText = btn.getText();\n\t\t\t\t\tif(strbtnText.equals(\"OK\"))\n\t\t\t\t\t{\n\t\t\t\t\t\tbtn.click();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t \n\t\t\t }\n\t\t\t catch(Exception e)\n\t\t\t {\n\t\t\t\t System.out.println(\"\");\n\t\t\t }\n\t\t }",
"@Override\r\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tgoNext();\r\n\t\t\t\t}",
"public void clickbtnReject() {\n\t\twaitForElementClickable(10,btnReject);\n\t\tdriver.findElement(btnReject).click();\n\t\tsleep(1);\n\t}",
"private void actionPause() {\n\t\tselectedDownload.pause();\n\t\tupdateButtons();\n\t}",
"@Override\n public void onClick(View v) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n doClickOnButtonOk();\n }\n });\n }",
"protected abstract void onClickRetryButton();",
"@Click(R.id.ivReturn)\n\tvoid toReturn() {\n\t\tfinish();\n\t}",
"private void proceed() {\n finish();\n Intent onReturnView = new Intent(ChatMessage.this, MainActivity.class);\n startActivity(onReturnView);\n }",
"public void ClickOnConfirmCertificateInformationButton()\n\t\t{\n\t\t\tConfirmCertificateInformation.click();\n\t\t}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif(projectsLoader.getNextInspection()!=null){\n\t\t\t\t\tString recordId = projectsLoader.getNextInspection().getRecordId_id();\n\t\t\t\t\tif(recordId==null)\n\t\t\t\t\t\treturn;\n\t\t\t\t\tActivityUtils.startScheduleInspectionActivity(LandingPageActivity.this, projectsLoader.getParentProject(recordId).getProjectId(), recordId, projectsLoader.getNextInspection(), AppConstants.CANCEL_INSPECTION_SOURCE_OTHER);\n\t\t\t\t}\n\t\t\t}",
"public void Continue(String downloadPath, boolean showDialog);",
"public AnnuityDetailsTab ClickContinueLinkwithOutFillingOut() throws InterruptedException\n\t{\n\t\tdriver.findElement(By.partialLinkText(\"Continue to Annuity Details\")).click();\n\t\t\n\t\tThread.sleep(1000);\t\n\t\treturn new AnnuityDetailsTab(driver);\n\t\t\n\t}",
"protected void resumeProcess() {\n algorithm.myresume();\n btnPause.setEnabled(true);\n btnResume.setEnabled(false);\n }",
"@Override\r\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tIntent intent = new Intent(AccountRemainActivity.this,\r\n\t\t\t\t\t\t\t\t\t\t\t\t ConfirmIdentityActivity.class);\r\n\t\t\t\t\t\tstartActivity(intent);\r\n\t\t\t\t\t}",
"@Override\r\n public void onClick(View v) {\n setResult(1);\r\n finish();\r\n }",
"@Then(\"^click on the Login button user nagivate to the next page$\")\r\n\tpublic void click_on_the_Login_button_user_nagivate_to_the_next_page() throws Throwable {\n\t w.submit();\r\n\t}",
"public void clickgoButton(){\n \n \t \n driver.findElement(By.cssSelector(goButton)).click();\n }",
"@And(\"^I click the signin button$\")\n public void iClickTheSigninButton() throws Throwable {\n }",
"public void proceedToCheckOut()\n\t{\n\t\tproceedtocheckoutpage = productpage.addToCartBtnClick();\n\t}",
"@When(\"user clicks on proceedtopay\")\r\n\tpublic void usert_clicks_on_cproceedtopay() {\n\t\tdriver.findElement(By.xpath(\"/html/body/b/div/div/div[1]/div/div[2]/div[3]/div/form[2]/input\")).click();\r\n\t\tdriver.manage().timeouts().implicitlyWait(2, TimeUnit.MINUTES);\r\n\t\t\r\n\t}",
"public void ClickYes()\n\t{\n\t\tdriver.findElementByName(OR.getProperty(\"Yes\")).click();\n\t}",
"public static void productAfterSaveOKBtn(WebDriver driver) throws InterruptedException {\n\t\tWebElement button = new WebDriverWait(driver, 2)\n\t\t\t\t.until(ExpectedConditions.elementToBeClickable(By.xpath(\"//button[text()='OK']\")));\n\t\tif (button.isDisplayed()) {\n\t\t\tThread.sleep(0);\n\t\t\tbutton.click();\n\t\t}\n\t}",
"@Test\n\tpublic void testClickOnOkayButton() {\n\n\t\tvar prompt = openPrompt();\n\t\tprompt.getOkayButton().click();\n\t\tassertNoDisplayedModalDialog();\n\t\tassertPromptInputApplied();\n\t}",
"public void clickConfirmDeleteButton() {\n // GeneralUtilities.waitSomeSeconds(1);\n // validateElementText(titleConfirmDeleteToDo, \"Delete To-Do?\");\n // validateElementText(titleConfirmDeleteToDoDescription, \"Are you sure you'd like to delete these To-Dos? Once deleted, you will not be able to retrieve any documents uploaded on the comments in the selected To-Dos.\");\n // waitForCssValueChanged(divConfirmDeleteToDo, \"Div Confirm Delete ToDo\", \"display\", \"block\");\n //\n // hoverElement(buttonConfirmDeleteToDo, \"Button Confirm Delete ToDo\");\n waitForAnimation(divConfirmDeleteToDoAnimate, \"Div Confirm Delete ToDo Animation\");\n clickElement(buttonConfirmDeleteToDo, \"Button Confirm Delete ToDo\");\n waitForCssValueChanged(divConfirmDeleteToDo, \"Div Confirm Delete ToDo\", \"display\", \"none\");\n }",
"@When(\"^click the submit button$\")\n public void click_the_submit_button() throws Throwable {\n \tSystem.out.println(\"click the button\");\n //throw new PendingException();\n }",
"public void ClickConfirmationPage() {\r\n\t\tconfirmation.click();\r\n\t\t\tLog(\"Clicked the \\\"Confirmation\\\" button on the Birthdays page\");\r\n\t}",
"@Override\n public void onClick(View v) {\n if (v == okButton)\n dismiss();\n }",
"public void btn_LearningActivity() {\r\n\t\tbtn_LearningActivity.click();\r\n\t}",
"public void actionPerformed(ActionEvent e)\n {\n if (yesRadio.isSelected())\n {\n parent.unlockNextButton();\n }\n else\n {\n parent.lockNextButton();\n }\n }",
"@Override\n public void clickPositive() {\n meetingManager.undoConfirm(chosenTrade, chosenTrader);\n Toast.makeText(this, \"Successfully undo confirm\", Toast.LENGTH_SHORT).show();\n viewList();\n\n }",
"@Test\n public final void testClickButton() {\n spysizedialog.getStartButton().doClick();\n }"
] | [
"0.9098737",
"0.8879397",
"0.78995997",
"0.75651044",
"0.7490869",
"0.73594576",
"0.7356564",
"0.7345194",
"0.7330288",
"0.73149586",
"0.7266635",
"0.72211564",
"0.7137856",
"0.7026749",
"0.69646376",
"0.69388324",
"0.6934444",
"0.6904473",
"0.68627465",
"0.6815993",
"0.68102187",
"0.6745754",
"0.67252284",
"0.6702067",
"0.6700041",
"0.66358954",
"0.662254",
"0.65992725",
"0.6595726",
"0.65681106",
"0.65648293",
"0.65522623",
"0.6542162",
"0.6541175",
"0.65195185",
"0.65109175",
"0.65022075",
"0.6498433",
"0.6478277",
"0.64555067",
"0.64235353",
"0.6419204",
"0.64064705",
"0.63996816",
"0.6386115",
"0.6376255",
"0.63681984",
"0.63480186",
"0.63366795",
"0.63194084",
"0.63103074",
"0.6308582",
"0.63011",
"0.63009095",
"0.6276352",
"0.6265293",
"0.6259539",
"0.6246753",
"0.62352204",
"0.6213597",
"0.6212221",
"0.6207338",
"0.62069863",
"0.62045693",
"0.62027335",
"0.61991304",
"0.61798114",
"0.61715406",
"0.61700237",
"0.6164055",
"0.61437094",
"0.6141268",
"0.6135097",
"0.61044836",
"0.6090182",
"0.6054428",
"0.60427624",
"0.602782",
"0.6010361",
"0.60100377",
"0.60056293",
"0.60032773",
"0.59990734",
"0.5997294",
"0.5994817",
"0.5993544",
"0.59763575",
"0.5974459",
"0.597101",
"0.5970364",
"0.5961435",
"0.595413",
"0.59510076",
"0.59476465",
"0.5947135",
"0.59470415",
"0.59443116",
"0.5943036",
"0.5927659",
"0.5927448"
] | 0.78166497 | 3 |
Path for Elements on the page | public WebElement getEmailFieldForLogin () {
return driver.findElement(By.id("email"));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public HtmlPage clickContentPath();",
"protected abstract int[] getPathElements();",
"java.util.List getClassPathElements();",
"public String getXPath();",
"java.lang.String getXpath();",
"@Override\r\n\tpublic List<WebElement> findElements() {\n\t\thandleContext(bean.getIn());\r\n\t\treturn driver.getRealDriver().findElements(bean.getBys().get(0));\r\n\t}",
"public String getXpath() { \n\t\treturn getXpathElement().getValue();\n\t}",
"String getXPath();",
"org.apache.xmlbeans.impl.xb.xsdschema.SelectorDocument.Selector.Xpath xgetXpath();",
"Elem getQualifiedElem();",
"public List<File> getClasspathElements() {\n\t\tthis.parseSystemClasspath();\n\t return classpathElements;\n\t}",
"public String getPath() { \n\t\treturn getPathElement().getValue();\n\t}",
"public String getProductURLXPath();",
"public String getMatchingElementXPath()\n\t{\n\t\treturn this.matchingElementXPath;\n\t}",
"public WebElement getXpathElements(String XPlocator, String XPtype) {\n\t\t\tXPtype = XPtype.toLowerCase();\n\t\t\tif (XPtype.equals(\"textarea\")) {\n\t\t\t\tSystem.out.println(\"Element found with textarea: \" + XPlocator);\n\t\t\t\treturn this.driver.findElement(By.xpath(XPlocator));\n\t\t\t\t\n\t\t\t}\n\n\t\t\telse if (XPtype.equals(\"input\")) {\n\t\t\t\tSystem.out.println(\"Element found with input: \" + XPlocator);\n\t\t\t\treturn this.driver.findElement(By.xpath(XPlocator));\n\t\t\t}\n\n\t\t\t// add more locator types here\n\n\t\t\telse\n\t\t\t\tSystem.out.println(\"Locator type not supported\");\n\t\t\treturn null;\n\t\t}",
"protected void deriveMatchingElementXPath()\n\t{\n\t\tString pcXPath = getParentContainerXPath();\n\t\tString base = pcXPath.substring(0, pcXPath.indexOf(\"[\"));\n\t\t\n\t\tStringBuffer sb = new StringBuffer();\n\t\tsb.append(base);\n\t\tsb.append(\"[\");\n\t\t\n\t\tif (getAttributeMatchExpression().equals(TaskExprType.STARTS_WITH))\n\t\t{\n\t\t\tsb.append(\"starts-with(\");\n\t\t}\n\t\telse if (getAttributeMatchExpression().equals(TaskExprType.CONTAINS))\n\t\t{\n\t\t\tsb.append(\"contains(\");\n\t\t}\n\n\t\tsb.append(getMatchingAttributeName());\n\t\tsb.append(\",'\");\n\t\tsb.append(getMatchingAttributeValue());\n\t\tsb.append(\"')]\");\n\t\t\n\t\t/*\n\t\t * Should look like this:\n\t\t * setMatchingElementXPath(\"//body/div/div[starts-with(@class,'Heading1')]\");\n\t\t */\n\t\tsetMatchingElementXPath(sb.toString());\n\t}",
"public SelenideElement formPageRoot () {\n return $(\"#form-page\");\n }",
"@WebElementLocator(webDesktop = \"section#faq div.container div.col-md-12 a.faq-title\",\n webPhone = \"section#faq div.container div.col-md-12 a.faq-title\")\n private static List<WebElement> faqElements() {\n return getDriver().findElements(By.cssSelector(new WebElementLocatorFactory().getLocator(ProductPage.class, \"faqElements\")));\n }",
"public final int[] xmlPath ()\r\n {\r\n return _value.path();\r\n }",
"public static void LoadTexturePathElementsIntoArray() {\r\n\t\t// Get all nodes for the settings\r\n\t\t// Node main = document.getElementById(\"main\");\r\n\t\t// Node textures = document.getElementById(\"textures\");\r\n\t\tNodeList nList = document.getElementsByTagName(\"TexturePath\");\r\n\r\n\t\tfor (int i = 0; i < nList.getLength(); i++) {\r\n\t\t\tNode node = nList.item(i);\r\n\t\t\tSystem.out.println(\"\"); // Just a separator\r\n\t\t\tif (node.getNodeType() == Node.ELEMENT_NODE) {\r\n\t\t\t\t// Print each employee's detail\r\n\t\t\t\tElement eElement = (Element) node;\r\n\t\t\t\ttexturePathElements.add(eElement);\r\n\t\t\t\tSystem.out.println(eElement.getAttribute(\"name\"));\r\n\t\t\t}\r\n\t\t}\r\n\t\tisTexturePathsDone = true;\r\n\t}",
"private Vector<ResourceLocation> getElements() {\n return getRef().elements;\n }",
"int placePathFollowingElement(String elementName, PathList pathList);",
"private String getValueFromXPathAndDescendants(HtmlPage appPage, String xPath) throws Exception {\n\t\treturn ((HtmlElement) appPage.getByXPath(xPath).get(0)).getTextContent();\n\t}",
"private WebElement getXpath(String xpathInfo) {\n\t\tWebElement element = null;\n\t\t// WebDriverWait wait = new WebDriverWait(driver, 60);\n\t\telement = SearchTest.wait.until(visibilityOfElementLocated(By.xpath(xpathInfo)));\n\t\treturn element;\n\t}",
"@Override\r\n\tpublic void findElement() {\n\t\t\r\n\t}",
"@CssSelector(\"${williamsSProducts}\")\n\tpublic AspireWebElements williamsSProducts();",
"@Test\n public void findElementByXPath_nativeContext() {\n WebElement element = driver.findElement(By.xpath(\n \"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget\" +\n \".FrameLayout/android.webkit.WebView/android.webkit.WebView/android.view\" +\n \".View/android.view.View/android.view.View/android.view.View/android.view\" +\n \".View/android.view.View[2]/android.view.View/android.view.View[2]/android.view\" +\n \".View[2]/android.view.View[1]\"));\n assertThat(element.getText()).contains(\"Ionic Documentation\");\n }",
"public String getXPath() {\n/* 114 */ return this.xPath;\n/* */ }",
"@PublicAtsApi\n public String getRootElementXPath() {\n\n return this.root.getUniquePath();\n }",
"@Test public void pathToMap() {\n query(\"<a/>[./name()]\", \"<a/>\");\n }",
"@Override\n public void getHomepageElementList() {\n String elementTypes = firebaseRemoteConfig.getString(Constants.FIREBASE_ELEMENT_LIST);\n List<String> elementTypeArray = Arrays.asList(elementTypes.split(\",\"));\n\n List<ElementView> elementViewList = new ArrayList<>();\n for (String elementType : elementTypeArray) {\n ElementView elementView = elementViewFactory.convert(elementType);\n if (elementView != null) {\n elementViewList.add(elementView);\n }\n }\n\n homepageView.setupElementViewAdapter(elementViewList);\n }",
"@Override\r\n public List<Element> findElements()\r\n {\n return null;\r\n }",
"WebElement getSearchButton();",
"private void scanForLocations(Element elem) {\n \n String location = getLocation(elem);\n if (location != null) {\n locationToElement.put(location, elem);\n DOM.setInnerHTML(elem, \"\");\n } else {\n int len = DOM.getChildCount(elem);\n for (int i = 0; i < len; i++) {\n scanForLocations(DOM.getChild(elem, i));\n }\n }\n }",
"static WebElement create_path(WebDriver driver,String a[])\n\t{\n\t\tWebElement element= null;\n\t\t//String element=\"\",\n\t\tString b;\n\t\tb=a[1];\n\t\t//System.out.println(\ta[2]);\n\t\tswitch(b)\n\t\t{\n\t\tcase \"id\" : \n\t\t\t element = driver.findElement(By.id(a[2]));\n\t\t\t break;\n\t\tcase \"xpath\" :\n\t\t\t element = driver.findElement(By.xpath(a[2]));\n\t\t\t break;\n\t\tcase \"css\" :\n\t\t\t element = driver.findElement(By.cssSelector(a[2]));\n\n\t\t\t \n\t\t}\n\t\treturn element;\n\t}",
"public static WebElement getObject(String xpathKey){\n\t\tString strXpath = xpathKey;\n\t\t\n\t\tif(strXpath.startsWith(\"//\")){\n\t\t\t\n\t\t\treturn driver.findElement(By.xpath((xpathKey).trim()));\n\t\t\n\t\t}else{\n\t\t\t\n\t\t\treturn driver.findElement(By.id((xpathKey).trim()));\n\t\t}\n\t}",
"public JodeList xPathFind(String path) {\n return new XPath(path).find(this);\n }",
"private List<WebElement> findElements(String strategy, String locator, boolean xpath) {\n if (elementId.equals(\"\")) {\n return (List<WebElement>) driver.executeAtom(atoms.findElementsJs, xpath, strategy, locator);\n } else {\n return (List<WebElement>) driver.executeAtom(atoms.findElementsJs, xpath, strategy, locator, this);\n }\n }",
"public List<WebElement> GetBulkWebElementusingxpath(String xpath){\r\n\t\t\t\t List<WebElement> lst =Driver.driver.findElements(By.xpath(xpath));\r\n\t\t\t\treturn lst;\r\n\t\t\t\t\r\n\t\t\t}",
"@PublicAtsApi\n public String[] getElementXPaths(\n String xpath ) throws XMLException {\n\n ArrayList<String> elementXPaths = new ArrayList<>(1);\n\n if (StringUtils.isNullOrEmpty(xpath)) {\n throw new XMLException(\"Null/empty xpath is not allowed.\");\n }\n\n Element element = findElement(xpath);\n\n if (element == null) {\n throw new XMLException(\"'\" + xpath + \"' is not a valid path\");\n }\n\n Iterator<Element> it = element.elementIterator();\n\n while (it.hasNext()) {\n elementXPaths.add(it.next().getUniquePath());\n }\n\n return elementXPaths.toArray(new String[elementXPaths.size()]);\n }",
"public WebElement apply(WebDriver arg0) //We are defining the function taking the WebDriver as input \n {\n WebElement ele = arg0.findElement(By.xpath(spath));\n return ele;\n }",
"public String getXPath() {\n\t\treturn this.builder.toString();\n\t}",
"private static List<Element> getXMLPaths(Model model) {\n Set<Path> paths = new TreeSet<>(Comparators.objectsById());\n paths.addAll(model.getPaths(null));\n List<Element> result = new ArrayList<>(paths.size());\n for (Path curPath : paths) {\n Element pathElement = new Element(\"path\");\n pathElement.setAttribute(\"id\", String.valueOf(curPath.getId()));\n pathElement.setAttribute(\"name\", curPath.getName());\n pathElement.setAttribute(\"sourcePoint\",\n curPath.getSourcePoint().getName());\n pathElement.setAttribute(\"destinationPoint\",\n curPath.getDestinationPoint().getName());\n pathElement.setAttribute(\"length\", String.valueOf(curPath.getLength()));\n pathElement.setAttribute(\"routingCost\",\n String.valueOf(curPath.getRoutingCost()));\n // velocities\n pathElement.setAttribute(\"maxVelocity\",\n String.valueOf(curPath.getMaxVelocity()));\n // reverse velocities\n pathElement.setAttribute(\"maxReverseVelocity\",\n String.valueOf(curPath.getMaxReverseVelocity()));\n // locks\n pathElement.setAttribute(\"locked\", String.valueOf(curPath.isLocked()));\n // actions\n for (Map.Entry<String, String> curEntry\n : curPath.getProperties().entrySet()) {\n Element propertyElement = new Element(\"property\");\n propertyElement.setAttribute(\"name\", curEntry.getKey());\n propertyElement.setAttribute(\"value\", curEntry.getValue());\n pathElement.addContent(propertyElement);\n }\n // XXX Add the path's other attributes as well.\n result.add(pathElement);\n }\n return result;\n }",
"public List<WebElement> locateElements(String type, String value) {\n\t\ttry {\r\n\t\t\tswitch(type.toLowerCase()) {\r\n\t\t\tcase \"id\": return getter().findElements(By.id(value));\r\n\t\t\tcase \"name\": return getter().findElements(By.name(value));\r\n\t\t\tcase \"class\": return getter().findElements(By.className(value));\r\n\t\t\tcase \"link\": return getter().findElements(By.linkText(value));\r\n\t\t\tcase \"xpath\": return getter().findElements(By.xpath(value));\r\n\t\t\t}\r\n\t\t} catch (NoSuchElementException e) {\r\n\t\t\tSystem.err.println(\"The Element locator:\"+type+\" value not found: \"+value);\r\n\t\t\tthrow new RuntimeException();\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"@Override\npublic void findElement(String by) {\n\t\n}",
"public SelenideElement searchByUser() {\n return formPageRoot().$(By.xpath(\"//input[@type='text']\"));\n }",
"public StringDt getPathElement() { \n\t\tif (myPath == null) {\n\t\t\tmyPath = new StringDt();\n\t\t}\n\t\treturn myPath;\n\t}",
"public void goToPage(String xPathCustom) { \n seleniumDriver.findElement(By.xpath(xPathCustom)).click();\n }",
"public final Object [] getVisibleElements() {\r\n\t\tfinal List<XElementNode> roots = new ArrayList<XElementNode>();\t\t\t\t\r\n\t\tStringBuffer paths = new StringBuffer();\r\n\r\n\t\t//if right side is empty, we take selection of left side:\r\n\t\tif(targetHierarchyTree.isEmpty()) {\r\n//\t\t\tfinal Map <FastMSTreeItem, XElementNode> parents = new HashMap<FastMSTreeItem, XElementNode>();\r\n\t\t\tfinal LinkedHashSet <FastMSTreeItem> currentSelection = sourceHierarchyTree.getSelection(); \r\n\t\t\tfor (FastMSTreeItem it: currentSelection) {\r\n\t\t\t\tpaths.append(it.getModel().getPath());\r\n\t\t\t\tpaths.append(\",\");\r\n\t\t\t}\r\n\t\t\tsourceHierarchyTree.traverse(new FastMSTreeItemVisitor() {\r\n\t\t\t\tpublic boolean visit(FastMSTreeItem item, FastMSTreeItem parent) {\r\n\t\t\t\t\tXElementNode elNode = getElementNodeCopyFrom(item);\r\n//\t\t\t\t\telNode.removeChildren();\r\n//\t\t\t\t\tparents.put(item, elNode);\r\n\t\t\t\t\titem.setElementNode(elNode);\r\n\t\t\t\t\tXElementNode xParent = getParent(parent); //, parents); //parents.get(parent);\r\n\t\t\t\t\tif(xParent == null)\r\n\t\t\t\t\t\troots.add(elNode);\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\txParent.forceAddChild(elNode);\r\n\t\t\t\t\t\telNode.setParent(xParent);\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\txAxisHierarchy.addProperty(\"filterPaths\", paths.toString());\r\n\t\t} else {\r\n\t\t\tfinal Map<FastMSTreeItem, XElementNode> parents = new HashMap<FastMSTreeItem, XElementNode>();\r\n\t\t\tfinal List <String> filterPaths = new ArrayList <String>();\r\n\t\t\ttargetHierarchyTree.traverse(new FastMSTreeItemVisitor(){\r\n\t\t\t\tpublic boolean visit(FastMSTreeItem item, FastMSTreeItem parent) {\r\n\t\t\t\t\tXObjectModel node = item.getXObjectModel();\r\n\t\t\t\t\tString path = node.get(\"filterPath\");\r\n\t\t\t\t\tif (path != null) {\r\n\t\t\t\t\t\tfilterPaths.add(path);\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn item.getChildCount() > 0;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tfor (String f: filterPaths) {\r\n\t\t\t\tpaths.append(f);\r\n\t\t\t\tpaths.append(\",\");\r\n\t\t\t}\r\n\t\t\ttargetHierarchyTree.traverse(new FastMSTreeItemVisitor() {\r\n\t\t\t\tpublic boolean visit(FastMSTreeItem item, FastMSTreeItem parent) {\r\n\t\t\t\t\tXElementNode elNode = getElementNodeCopyFrom(item);\r\n\t\t\t\t\telNode.removeChildren();\r\n\t\t\t\t\titem.setElementNode(elNode);\r\n\t\t\t\t\tXElementNode xParent = getParent(parent); //parents.get(parent);\r\n\t\t\t\t\tif(xParent == null)\r\n\t\t\t\t\t\troots.add(elNode);\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\txParent.forceAddChild(elNode);\r\n\t\t\t\t\t\telNode.setParent(xParent);\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t});\t\t\t\r\n\t\t\txAxisHierarchy.addProperty(\"filterPaths\", paths.toString());\r\n\t\t}\r\n\t\treturn new Object [] {roots.toArray(new XElementNode[0]), paths.toString()};\r\n\t}",
"@Override\n\tpublic AllegationsElement Elements() {\n\t\treturn new AllegationsElement(driver);\n\t}",
"@Property Element getDocumentElement();",
"public static String nodePath(Node n)\n {\n // abort early\n if (null == n)\n return null;\n\n // declarations\n Node parent = null;\n Stack<Node> hierarchy = new Stack<Node>();\n StringBuffer buffer = new StringBuffer('/');\n\n // push element on stack\n hierarchy.push(n);\n\n switch (n.getNodeType()) {\n case Node.ATTRIBUTE_NODE:\n parent = ((Attr) n).getOwnerElement();\n break;\n case Node.COMMENT_NODE:\n case Node.ELEMENT_NODE:\n case Node.DOCUMENT_NODE:\n parent = n.getParentNode();\n break;\n default:\n throw new IllegalStateException(\"Unexpected Node type\" + n.getNodeType());\n }\n\n while (null != parent && parent.getNodeType() != Node.DOCUMENT_NODE) {\n // push on stack\n hierarchy.push(parent);\n\n // get parent of parent\n parent = parent.getParentNode();\n }\n\n // construct xpath\n Object obj = null;\n while (!hierarchy.isEmpty() && null != (obj = hierarchy.pop())) {\n Node node = (Node) obj;\n boolean handled = false;\n\n if (node.getNodeType() == Node.ELEMENT_NODE)\n {\n Element e = (Element) node;\n\n // is this the root element?\n if (buffer.length() == 1)\n {\n // root element - simply append element name\n buffer.append(node.getNodeName());\n }\n else\n {\n // child element - append slash and element name\n buffer.append(\"/\");\n buffer.append(node.getNodeName());\n\n if (node.hasAttributes())\n {\n // see if the element has a name or id attribute\n if (e.hasAttribute(\"id\"))\n {\n // id attribute found - use that\n buffer.append(\"[@id='\" + e.getAttribute(\"id\") + \"']\");\n handled = true;\n }\n else if (e.hasAttribute(\"name\"))\n {\n // name attribute found - use that\n buffer.append(\"[@name='\" + e.getAttribute(\"name\") + \"']\");\n handled = true;\n }\n }\n\n if (!handled)\n {\n // no known attribute we could use - get sibling index\n int prev_siblings = 1;\n Node prev_sibling = node.getPreviousSibling();\n while (null != prev_sibling)\n {\n if (prev_sibling.getNodeType() == node.getNodeType())\n {\n if (prev_sibling.getNodeName().equalsIgnoreCase(\n node.getNodeName()))\n {\n prev_siblings++;\n }\n }\n prev_sibling = prev_sibling.getPreviousSibling();\n }\n buffer.append(\"[\" + prev_siblings + \"]\");\n }\n }\n }\n else if (node.getNodeType() == Node.ATTRIBUTE_NODE)\n {\n buffer.append(\"/@\");\n buffer.append(node.getNodeName());\n }\n }\n // return buffer\n return buffer.toString();\n }",
"public WebElement element(String strElement) throws Exception {\n String locator = prop.getProperty(strElement); \n // extract the locator type and value from the object\n String locatorType = locator.split(\";\")[0];\n String locatorValue = locator.split(\";\")[1];\n // System.out.println(By.xpath(\"AppLogo\"));\n \n // for testing and debugging purposes\n System.out.println(\"Retrieving object of type '\" + locatorType + \"' and value '\" + locatorValue + \"' from the Object Repository\");\n \n // wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(\"//input[@id='text3']\")));\n try {\n\n\n \tif(locatorType.equalsIgnoreCase(\"Id\"))\n \t\treturn driver.findElement(By.id(locatorValue)); \n \telse if(locatorType.equalsIgnoreCase(\"Xpath\")) \n \t\t\treturn driver.findElement(By.xpath(locatorValue)); \n// \t\t}catch(Exception e) {\n// \t\t\tdriver.navigate().refresh();\n//\n// \t\t\t@SuppressWarnings({ \"unchecked\", \"deprecation\", \"rawtypes\" })\n// \t\t\tWait<WebDriver> wait = new FluentWait(driver) \n// \t\t\t.withTimeout(8, TimeUnit.SECONDS) \n// \t\t\t.pollingEvery(1, TimeUnit.SECONDS) \n// \t\t\t.ignoring(NoSuchElementException.class);\n// \t\t\twait.until(ExpectedConditions.visibilityOf(driver.findElement(By.xpath(locatorValue))));\n// \t\t\treturn driver.findElement(By.xpath(locatorValue)); \n// \t\t}\n \n \n \n else if(locatorType.equalsIgnoreCase(\"Name\"))\n \treturn driver.findElement(By.name(locatorValue));\n else if(locatorType.equalsIgnoreCase(\"Classname\")) \n \treturn driver.findElement(By.className(locatorValue));\n else if(locatorType.equalsIgnoreCase(\"Tagname\"))\n \treturn driver.findElement(By.className(locatorValue));\n else if(locatorType.equalsIgnoreCase(\"Linktext\"))\n \treturn driver.findElement(By.linkText(locatorValue));\n else if(locatorType.equalsIgnoreCase(\"Partiallinktext\"))\n \treturn driver.findElement(By.partialLinkText(locatorValue));\n else if(locatorType.equalsIgnoreCase(\"Cssselector\")) \n \treturn driver.findElement(By.cssSelector(locatorValue));\n\n \n } catch (NoSuchElementException | StaleElementReferenceException e) {\n \t\t\n if(locatorType.equalsIgnoreCase(\"Id\"))\n return driver.findElement(By.id(locatorValue)); \n else if(locatorType.equalsIgnoreCase(\"Xpath\")) \n return driver.findElement(By.xpath(locatorValue)); \n else if(locatorType.equalsIgnoreCase(\"Name\"))\n \treturn driver.findElement(By.name(locatorValue));\n else if(locatorType.equalsIgnoreCase(\"Classname\")) \n \treturn driver.findElement(By.className(locatorValue));\n else if(locatorType.equalsIgnoreCase(\"Tagname\"))\n \treturn driver.findElement(By.className(locatorValue));\n else if(locatorType.equalsIgnoreCase(\"Linktext\"))\n \treturn driver.findElement(By.linkText(locatorValue));\n else if(locatorType.equalsIgnoreCase(\"Partiallinktext\"))\n \treturn driver.findElement(By.partialLinkText(locatorValue));\n else if(locatorType.equalsIgnoreCase(\"Cssselector\")) \n \treturn driver.findElement(By.cssSelector(locatorValue));\n }\n throw new NoSuchElementException(\"Unknown locator type '\" + locatorType + \"'\"); \n \t}",
"public StringDt getXpathElement() { \n\t\tif (myXpath == null) {\n\t\t\tmyXpath = new StringDt();\n\t\t}\n\t\treturn myXpath;\n\t}",
"PathKeys getPathKeys();",
"public String getXPath() {\n return xPathStr;\n }",
"public File[] elements() {\n File plik = new File(katalog);\n katalog = plik.getAbsolutePath();\n if (katalog.endsWith(\".\")) {\n katalog = katalog.substring(0, katalog.length() - 1);\n }\n return plik.listFiles();\n }",
"public Element getElement(Path aPath) {\r\n \r\n assert aPath!=null;\r\n assert iRootElement!=null;\r\n \r\n if (aPath.fDepth==0) {//if root path\r\n return iRootElement;//return root element\r\n }//if root path\r\n \r\n Element element=iRootElement;//start at root element\r\n for (int i=0;i<aPath.fDepth;++i) {//for each level\r\n if (aPath.fKeys[i]!=null) {//if object key\r\n element=element.getChildElement(aPath.fKeys[i]);//get element for object key\r\n } else if (aPath.fPatterns[i]!=null) {//else array index\r\n element=element.getChildElement(aPath.fPatterns[i]);//get element for pattern\r\n } else {\r\n element=element.getChildElement(aPath.fIndexes[i]);//get element for array index\r\n }//if object key\r\n if (element==null) return null;//return null if path does not exist\r\n }//for each key\r\n\r\n return element;//our work here is done\r\n \r\n }",
"public void setXPaths(String[] s) {\n\t xpaths = s;\n }",
"public List<AccessibleElement> getAccessibleChildren();",
"ContentLocator getContentLocator();",
"private static String sEnterSelectRootXpath(String sWhichField) {\n\t\tString sReturn = \"unset\"; \n\t\tswitch (sWhichField) {\n\t\tcase \"Content Type\": //content type on the create content modal\n\t\t\tsReturn = \"//*[text()[contains(.,\\\"\" + sWhichField + \"\\\")]]/ancestor::mat-form-field\";\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tsReturn = \"//*[text()[contains(.,\\\"\" + sWhichField + \"\\\")]]/ancestor::iti-form-field\";\t\t\t\n\t\t}\n\t\t\n\t\treturn sReturn;\n\t}",
"protected List<WebElement> jsFindListOfElements(String locator) {\n JavascriptExecutor js = (JavascriptExecutor) driver;\n\n List<WebElement> listOfElements = (List<WebElement>) js.executeScript(\n \"var results = new Array();\"\n + \"var element = document.evaluate(\\\"\" + locator + \"\\\", document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);\"\n + \"for (var i=0; i<element.snapshotLength; i++)\"\n + \"{\"\n + \"results.push(element.snapshotItem(i));\"\n + \"}\"\n + \"return results;\", \"\");\n return listOfElements;\n }",
"@Test\n public void testFindElements() {\n\tList<WebElement> links = driver.findElements(By.tagName(\"a\"));\n\n\t// Verify there are 41 Links displayed on the page\n\tAssert.assertEquals(links.size(), 41);\n\n\t// Print each link value\n\tfor (WebElement link : links) {\n\t System.out.println(link.getAttribute(\"href\"));\n\t}\n }",
"public WebElement ProfileManagementLink()\n{\n return driver.findElement(By.xpath(\".//*[@id='ibm-primary-links']/li[2]/a\"));\n}",
"@Override\n public String[] selectDecoratorPaths(Content content, WebAppContext context) throws IOException {\n HttpServletRequest request = context.getRequest();\n String decorator = null;\n //首先从header头信息取值\n decorator = request.getHeader(\"Sitemesh-Decorator\");\n if (StringUtils.isBlank(decorator)) {\n //未取到再从参数取值\n decorator = request.getParameter(\"sitemesh-decorator\");\n }\n if (StringUtils.isNotBlank(decorator)) {\n //按照参数值返回对应路径下面的jsp装饰模板页码\n return new String[]{\"/WEB-INF/views/layouts/\" + decorator + \".jsp\"};\n }\n\n // Otherwise, fallback to the standard configuration\n return defaultDecoratorSelector.selectDecoratorPaths(content, context);\n }",
"public static WebElement getObject(String xpathKey){\n\t\t\n\t\tWebElement obj = null;\n\t\tobj = driver.findElement(By.xpath(OR.getProperty(xpathKey)));\n\t\treturn obj;\n\t}",
"public List<ApexPath> getPaths() {\n TestUtil.Config config = TestUtil.Config.Builder.get(g, sourceCode).build();\n return TestUtil.getApexPaths(config, apexPathExpanderConfig, methodName);\n }",
"void setXpath(java.lang.String xpath);",
"public static void main(String[] args) {\n\t\tString abslouteXpath =\"/html/body/did/div/div/div/div/form/table/tr/td/input\";\n\t\tString RelativeXpath =\"//input[@id ='email']\";\n\n\t}",
"private Element traverse_learningpath(Element element) {\n \ttry {\n\t \tString userid = profile.getAttributeValue(\"personal\", \"id\");\n\t \tString course = profile.getAttributeValue(\"personal\", \"course\");\n\t \tArrayList<ArrayList<String>> path = WOWContextListener.getInstance().getTriUMServer().\n \t\t\tgetCommunicateService().getQueryDelegator().\n \t\t\tlearningPathQuery(userid, course);\n\n\t \tElement div = doc.createElement(\"div\");\n\t \tif(path.size() == 0) div.appendChild(doc.createTextNode(\"No result!\"));\n\t \t\n\t\t\tfor(int i = path.size() - 1; i >= 0; i--) {\n\t\t\t\tArrayList<String> concepts = path.get(i);\n\t\t\t\t\n\t\t\t\tif(concepts.size() > 1) div.appendChild(doc.createTextNode(\"(\"));\n\t\t\t\tfor(int j = 0; j < concepts.size(); j++) {\n\t\t\t\t\tdiv.appendChild(LinkAdaptation.createLink(concepts.get(j), profile, \"MAINVIEW\", doc));\n\t\t\t\t\tif(j < concepts.size() - 1) div.appendChild(doc.createTextNode(\", \"));\n\t\t\t\t}\n\t\t\t\tif(concepts.size() > 1) div.appendChild(doc.createTextNode(\")\"));\n\t\t\t\t\n\t\t\t\tif(i > 0) div.appendChild(doc.createTextNode(\" => \"));\n\t\t\t}\n\t \treturn (Element)replaceNode(element, div);\n\t\t\t\n \t}\n \tcatch(Throwable e) {\n \t\te.printStackTrace();\n \t\treturn (Element)replaceNode(element, createErrorElement(\"No result!\"));\n \t}\n }",
"String getElem();",
"@Override\n\tpublic WebElement $x(String xpath) {\n\t\tList<WebElement> els = this.findElements(By.xpath(xpath));\n\t\tif (els.size() >= 0) {\n\t\t\treturn els.get(0);\n\t\t}\n\t\treturn null;\n\t}",
"@Test(priority = 5)\n public void openDifferentElementsPageTest() {\n driver.findElement(new By.ByLinkText(\"SERVICE\")).click();\n driver.findElement(By.xpath(\"//a[contains(text(),'Different elements')]\")).click();\n }",
"IPath getPath();",
"public String getPath() {\n \tStringBuilder path = new StringBuilder();\n \tint s = this.getSelectedIndex();\n \tif (s <= 0 ) s = 0;\n \tJPiereIADTabpanel p = tabPanelList.get(s);\n \tfor (int i = 0; i <= s; i++) {\n \t\tString n = null;\n \t\tif (i == s)\n \t\t\tn = p.getTitle();\n \t\telse {\n \t\t\tJPiereIADTabpanel t = tabPanelList.get(i);\n \t\t\tif (t.getTabLevel() < p.getTabLevel())\n \t\t\t\tn = t.getTitle();\n \t\t}\n \t\tif (n != null) {\n \t\t\tif (path.length() > 0) {\n \t\t\t\tpath.append(\" > \");\n \t\t\t}\n \t\t\tpath.append(n);\n \t\t}\n \t}\n\n \treturn path.toString();\n }",
"public String getPath() throws Exception {\n\t\t/*\n\t\t * return \"/news-oppsRecord\" + doc.selectSingleNode\n\t\t * (\"/metadataFieldInfo/field/@path\").getText();\n\t\t */\n\t\treturn doc.selectSingleNode(\"/metadataFieldInfo/field/@path\").getText();\n\t}",
"protected List<WebElement> findListOfElements(By locator) {\n waitForVisibilityOf(locator);\n return driver.findElements(locator);\n }",
"public SoPath getPath() {\n\t\t return path; \n\t}",
"public String getElement(String name) {\n\t\t\n\t\tField elementField = allElements.get(name);\n\t\tif (elementField == null) {\n\t\t\tthrow new ScenarioException(String.format(\"Element '%s' cannot be found among all classes. It may not have been defined\", name));\n\t\t}\n\t\t\n\t\tClass<?> pageClass = elementField.getDeclaringClass(); \n\t\t\n\t\t// create new page if we are not on it\n\t\tif (currentPage.get() == null || pageClass != currentPage.get().getClass()) {\n\t\t\ttry {\n\t\t\t\tcurrentPage.set((PageObject)pageClass.newInstance());\n\t\t\t} catch (InstantiationException | IllegalAccessException e) {\n\t\t\t\tthrow new ScenarioException(String.format(\"Page '%s' don't have default constructor, add it to avoid this error\", pageClass.getSimpleName()));\n\t\t\t}\n\t\t\tlogger.info(\"switching to page \" + pageClass.getSimpleName());\n\t\t}\n\t\t\n\t\tif (name.split(\"\\\\.\").length == 1) {\n\t\t\treturn name;\n\t\t} else {\n\t\t\treturn name.split(\"\\\\.\")[1];\n\t\t}\n\t}",
"public XMLElement[] getChildren(String path)\n/* */ {\n/* 641 */ if (path.indexOf('/') != -1) {\n/* 642 */ return getChildrenRecursive(PApplet.split(path, '/'), 0);\n/* */ }\n/* */ \n/* */ \n/* 646 */ if (Character.isDigit(path.charAt(0))) {\n/* 647 */ return new XMLElement[] { getChild(Integer.parseInt(path)) };\n/* */ }\n/* 649 */ int childCount = getChildCount();\n/* 650 */ XMLElement[] matches = new XMLElement[childCount];\n/* 651 */ int matchCount = 0;\n/* 652 */ for (int i = 0; i < childCount; i++) {\n/* 653 */ XMLElement kid = getChild(i);\n/* 654 */ String kidName = kid.getName();\n/* 655 */ if ((kidName != null) && (kidName.equals(path))) {\n/* 656 */ matches[(matchCount++)] = kid;\n/* */ }\n/* */ }\n/* 659 */ return (XMLElement[])PApplet.subset(matches, 0, matchCount);\n/* */ }",
"protected XPath getXPathHandler()\n\t{\n\t\treturn xPath;\n\t}",
"@Override\r\n public Element findElement()\r\n {\n return null;\r\n }",
"public String getElementClass ();",
"public WebElement apply(WebDriver driver ) {\n return driver.findElement(By.xpath(\"/html/body/div[1]/section/div[2]/div/div[1]/div/div[1]/div/div/div/div[2]/div[2]/div/div/div/div/div[1]/div/div/a/i\"));\n }",
"<T extends IElement> List<T> findElements(By locator, ElementType type, ElementsCount count);",
"public WebElement returnElementByXpath(String xpath){\n WebElement element;\n element = driver.findElement(By.xpath(xpath));\n return element;\n }",
"private String getValueFromXPath(HtmlPage appPage, String xPath) throws Exception {\n\t\treturn ((HtmlElement) appPage.getByXPath(xPath).get(0)).asText();\n\t}",
"void setXPath(String xpath);",
"@Override\n\t\tpublic WebElementFacade getUniqueElementInPage() {\n\t\t\treturn null;\n\t\t}",
"SeleniumComponent parent();",
"public List<MenuElement> getElements()\n {\n return elements;\n }",
"@Test(priority = 6)\n public void elementsOnDifferentElementsPageTest() {\n List<WebElement> checkboxesList = driver.findElements(By.className(\"label-checkbox\"));\n assertEquals(checkboxesList.size(), 4);\n List<WebElement> radioList = driver.findElements(By.className(\"label-radio\"));\n assertEquals(radioList.size(), 4);\n assertTrue(driver.findElement(By.className(\"colors\")).isDisplayed());\n assertTrue(driver.findElement(By.cssSelector(\"button[name='Default Button']\"))\n .isDisplayed());\n assertTrue(driver.findElement(By.cssSelector(\"input[value='Button']\"))\n .isDisplayed());\n }",
"public List<Node> findPath(Node start);",
"Object getComponent(WebElement element);",
"public ArrayList<SearchNode> getPath() {\n\treturn path;\n }",
"Element getElement();",
"public List<String> getClickElementsOfDOM(WebElement rootElement) {\n\n List<String> clickElements = new ArrayList<String>();\n clickElements = (List<String>) ((JavascriptExecutor) this.driver).executeScript(\n this.excludeTagsJS + this.isDisPlayedJS + this.getElementXPathJS + this.getClickElementOfDOMJS +\n \"return getClickElementsOfDOM(arguments[0]);\",\n rootElement\n );\n\n return clickElements;\n }",
"public WebElement getElement(String locator){\n\t\tWebElement webElement = null;\n\t\twaitForElementVisibility(locator);\n\t\ttry{\n\t\t\tif(locator.startsWith(\"//\")) {\t\n\t\t\t\twebElement = driver.findElement(By.xpath(locator));\t\t\t\t\n\t\t\t}else if( locator.startsWith(\"css=\")) {\n\t\t\t\tlocator=locator.substring(4);\n\t\t\t\twebElement = driver.findElement(By.cssSelector(locator));\n\t\t\t}else if( locator.startsWith(\"class=\")) {\n\t\t\t\tlocator = locator.split(\"\\\\=\")[1];\n\t\t\t\twebElement = driver.findElement(By.className(locator));\n\t\t\t}else if( locator.startsWith(\"name=\")) {\n\t\t\t\tlocator = locator.split(\"\\\\=\")[1];\n\t\t\t\twebElement = driver.findElement(By.name(locator));\n\t\t\t}else if( locator.startsWith(\"link=\")) {\n\t\t\t\tlocator = locator.split(\"\\\\=\")[1];\n\t\t\t\twebElement = driver.findElement(By.linkText(locator));\n\t\t\t}else if( locator.startsWith(\"tag=\")) {\n\t\t\t\tlocator = locator.split(\"\\\\=\")[1];\n\t\t\t\twebElement = driver.findElement(By.tagName(locator));\n\t\t\t} else\n\t\t\t\twebElement = driver.findElement(By.id(locator));\n\t\t\tlog.debug(\"ELEMENT FOUND WITH LOCATOR : \"+locator);\n\t\t}catch (NoSuchElementException ex) {\n\t\t\tlog.debug(\"No such element \"+locator);\n\t\t\treturn webElement;\n\t\t} catch(Exception ex) {\n\t\t\tlog.debug(\"ELEMENT NOT FOUND WITH LOCATOR : \"+locator);\n\t\t ex.printStackTrace();\n\t\t return webElement;\n\t\t}\n\t\treturn webElement;\t\t\n\t}",
"public WebElement game() { return driver.findElement(gameLocator); }",
"public AnnotatedElement getQualifiedElement()\n/* */ {\n/* 241 */ return this.qualifiedElement;\n/* */ }"
] | [
"0.6149154",
"0.60734296",
"0.6053999",
"0.596173",
"0.5912377",
"0.5910231",
"0.58694804",
"0.58476436",
"0.5820424",
"0.5581188",
"0.556779",
"0.55219674",
"0.5505577",
"0.548881",
"0.54788977",
"0.54032564",
"0.54010594",
"0.538248",
"0.5348262",
"0.53277165",
"0.531752",
"0.53124356",
"0.52954507",
"0.52927923",
"0.5289261",
"0.5265842",
"0.5225776",
"0.521172",
"0.51893306",
"0.5177428",
"0.517451",
"0.51654553",
"0.51233613",
"0.51178366",
"0.5087795",
"0.50811654",
"0.5064775",
"0.5041997",
"0.4995995",
"0.4986181",
"0.49670357",
"0.49613944",
"0.49542615",
"0.4948363",
"0.4945988",
"0.49398685",
"0.49303046",
"0.49236158",
"0.49189094",
"0.49186763",
"0.49059442",
"0.48928207",
"0.4889693",
"0.48842156",
"0.4883532",
"0.48690823",
"0.48647946",
"0.48526657",
"0.48436677",
"0.48285684",
"0.48199895",
"0.48195198",
"0.48179588",
"0.48068184",
"0.4806711",
"0.48062098",
"0.48041323",
"0.4802094",
"0.48001274",
"0.47843292",
"0.47766984",
"0.4773243",
"0.47716242",
"0.47665414",
"0.4762945",
"0.4761329",
"0.47607294",
"0.47559965",
"0.47321472",
"0.4706289",
"0.47056967",
"0.47018215",
"0.4699157",
"0.4694209",
"0.4693908",
"0.46937093",
"0.46855405",
"0.46845534",
"0.4683816",
"0.46778333",
"0.46746433",
"0.46729654",
"0.46705478",
"0.46670994",
"0.46551245",
"0.46415028",
"0.46391004",
"0.46295005",
"0.46262172",
"0.46161678",
"0.46147057"
] | 0.0 | -1 |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.