query
stringlengths 7
33.1k
| document
stringlengths 7
335k
| metadata
dict | negatives
listlengths 3
101
| negative_scores
listlengths 3
101
| document_score
stringlengths 3
10
| document_rank
stringclasses 102
values |
---|---|---|---|---|---|---|
Specifies whether the user in the user pool is enabled. | public User withEnabled(Boolean enabled) {
setEnabled(enabled);
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isEnabledByUser() {\n return mEnabledByUser;\n }",
"@Override\n public boolean isEnabled() {\n return user.hasBeenActivated;\n }",
"public void setEnabled(Boolean value) { this.myEnabled = value.booleanValue(); }",
"@ApiModelProperty(value = \"User is enabled or disabled. Effect: Controls the value of the corresponding CfgPerson attribute \")\n public Boolean isEnabled() {\n return enabled;\n }",
"public void setEnabled(boolean isEnable) throws SQLException\r\n\t{\r\n\t\tString SQL_USER = \"UPDATE user SET enabled=? WHERE id=?;\";\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//Prepare the statement\r\n\t\t\tPreparedStatement statement = this.getConn().prepareStatement(SQL_USER);\r\n\r\n\t\t\t//Bind the variables\r\n\t\t\tstatement.setInt(1, (isEnable ? 1 : 0));\r\n\t\t\tstatement.setInt(2, userId);\r\n\r\n\t\t\t//Execute the update\r\n\t\t\tstatement.executeUpdate();\r\n\r\n\t\t} catch (SQLException e)\r\n\t\t{\r\n\t\t\tGWT.log(\"Error in SQL: Student->setEnabled(boolean \"+ isEnable+ \")\", e);\r\n\t\t\tthis.getConn().rollback();\r\n\t\t\tthrow e;\t\r\n\t\t}\t\t\r\n\t\t//commit change\r\n\t\tDatabase.get().commit();\r\n\t}",
"@XmlTransient\n\tpublic boolean isCanActivateUser() {\n\t\treturn (isSecurityAdministrator() && isSelfRegistrationEnabled());\n\t}",
"public void setOnlyManageUser(boolean enable) {\n\t\t_onlyManageUser = enable;\n\t}",
"public void setEnabled(boolean value) {\n this.enabled = value;\n }",
"@Test\n\t void testEnabled() {\n\t\tassertTrue(user.isEnabled());\n\t}",
"public void assignAuthorisedUser(final boolean val) {\n authorisedUser = val;\n }",
"@Override\n public Users setEnable(Integer id) {\n Users u = userdao.findUserById(id);\n if (u.isEnabled()) {\n u.setEnabled(false);//if enable is true ,admin changes it to false so user can't login app\n } else {\n u.setEnabled(true);//if enable is false,admin changes it to true,so he gives access for login to user\n }\n userdao.save(u);\n\n return u;\n }",
"public boolean setEnabled(boolean enable);",
"public void setEnabled(boolean value) {\n m_Enabled = value;\n }",
"public boolean isEnabled() throws Exception\r\n\t{\r\n\t\tString SQL_USER = \"SELECT enabled FROM user WHERE id=?;\";\t\t\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\tPreparedStatement statement = this.getConn().prepareStatement(SQL_USER);\r\n\t\t\tstatement.setInt(1, userId);\r\n\t\t\tResultSet result = statement.executeQuery();\r\n\r\n\t\t\t// If this returns true, then the user already exists.\r\n\t\t\tif (!result.next())\r\n\t\t\t{\r\n\t\t\t\tthrow new Exception(\"No student found! (getEnabled)\");\r\n\t\t\t}\r\n\t\t\tif (result.getInt(\"enabled\")==1)\r\n\t\t\t\treturn true;\r\n\t\t\treturn false;\r\n\t\t} catch (SQLException e)\r\n\t\t{\r\n\t\t\tGWT.log(\"Error in getEnabled()\", e);\r\n\t\t\tthis.getConn().rollback();\r\n\t\t\tthrow e;\r\n\t\t}\r\n\t}",
"public void setEnabled(boolean aFlag) { _enabled = aFlag; }",
"@Transactional\n\tpublic void enableUser(String userName) {\n\t\tuserInfoDAO.enableUser(userName);\n\t}",
"public void setEnabled(boolean enabled);",
"public void setEnabled(boolean enabled);",
"public boolean isSetUser() {\n return this.user != null;\n }",
"public boolean isSetUser() {\n return this.user != null;\n }",
"public boolean hasUserSettings() {\r\n return processModel.getUserInfos() != null;\r\n }",
"public boolean hasUser(){\n return numUser < MAX_USER;\n }",
"void setEnabled(boolean enabled);",
"void setEnabled(boolean enabled);",
"void setEnabled(boolean enabled);",
"void setEnabled(boolean enabled);",
"boolean hasUser();",
"boolean hasUser();",
"boolean hasUser();",
"boolean hasUser();",
"boolean hasUser();",
"boolean hasUser();",
"boolean hasUser();",
"final public void setEnabled(boolean value) {\n enabledType = value ? ENABLED_ANY : ENABLED_NONE;\n }",
"public void setEnabled(String tmp) {\n enabled = DatabaseUtils.parseBoolean(tmp);\n }",
"@Override\r\n public void setEnabled(final boolean b) {\r\n _enabled = b;\r\n }",
"@FXML\n\tpublic void enableMyUser(ActionEvent event) {\n\t\tif (!txtDisableMyUser.getText().isEmpty()) {\n\t\t\tSystemUser user = restaurant.returnUser(txtDisableMyUser.getText());\n\n\t\t\tif (user != null) {\n\t\t\t\ttry {\n\t\t\t\t\tuser.setCondition(Condition.ACTIVE);\n\t\t\t\t\trestaurant.saveUsersData();\n\t\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\t\tdialog.setContentText(\"Tu usuario ha sido habilitado\");\n\t\t\t\t\tdialog.setTitle(\"Usuario Deshabilitado\");\n\t\t\t\t\tdialog.show();\n\t\t\t\t\ttxtDisableMyUser.setText(\"\");\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\t\tdialog.setContentText(\"No se ha podido guardar el nuevo estado del usuario\");\n\t\t\t\t\tdialog.setTitle(\"Error al guardar datos\");\n\t\t\t\t\tdialog.show();\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\tdialog.setContentText(\"Este usuario no existe\");\n\t\t\t\tdialog.setTitle(\"Error, usuario inexistente\");\n\t\t\t\tdialog.show();\n\t\t\t}\n\n\t\t} else {\n\t\t\tDialog<String> dialog = createDialog();\n\t\t\tdialog.setContentText(\"Todos los campos deben de ser llenados\");\n\t\t\tdialog.setTitle(\"Error al guardar datos\");\n\t\t\tdialog.show();\n\t\t}\n\t}",
"public boolean enabled(){\n return enabled;\n }",
"public boolean hasUser() {\n return instance.hasUser();\n }",
"@Override\n public boolean isUser() {\n return false;\n }",
"@Override\n public void setRole(User u) {\n loginTrue(u.getName());\n uRole = u.getUserRole();\n switch (uRole) {\n case 1:\n nhanvien.setEnabled(true);\n break;\n case 2:\n quanly.setEnabled(false);\n break;\n case 3:\n break;\n case 4:\n dathang.setEnabled(false);\n break;\n case 5:\n baocao.setEnabled(false);\n break;\n }\n }",
"void setAdminStatus(User user, boolean adminStatus);",
"boolean hasUserManaged();",
"void setUserLocked(boolean b);",
"public void setEnabled(Boolean enabled) {\r\n this.enabled = enabled;\r\n }",
"boolean hasSelectedUser();",
"public void setEnabled(final boolean enabled);",
"public void enable ( ) {\r\n\t\tenabled = true;\r\n\t}",
"public void setEnabled(final boolean theFlag) {\n myEnabled = theFlag;\n }",
"public void isAllowed(String user) {\n \r\n }",
"public void setEnabled(boolean enabled) {\n this.enabled = enabled;\n }",
"public void enable()\r\n\t{\r\n\t\tenabled = true;\r\n\t}",
"public boolean hasUser() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }",
"public void setEnabled(Boolean enabled) {\n this.enabled = enabled;\n }",
"public void setEnabled(Boolean enabled) {\n this.enabled = enabled;\n }",
"public void setEnabled(Boolean enabled) {\n this.enabled = enabled;\n }",
"public void setEnabled(Boolean enabled) {\n this.enabled = enabled;\n }",
"boolean getEnabled();",
"boolean getEnabled();",
"boolean getEnabled();",
"public void setEnabled(boolean enabled) {\r\n this.enabled = enabled;\r\n }",
"public void setEnabled(boolean enabled) {\r\n this.enabled = enabled;\r\n }",
"public boolean hasUser() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }",
"public boolean hasUser() {\n return user_ != null;\n }",
"public boolean hasUser() {\n return user_ != null;\n }",
"public boolean getEnabled(){\r\n\t\treturn enabled;\r\n\t}",
"public boolean isSetCreate_user_priv() {\n return this.__isset.create_user_priv;\n }",
"boolean hasEnabled();",
"@ApiModelProperty(example = \"false\", required = true, value = \"Flag is true if this permission can only be assigned to users, and not groups or organizations\")\n public Boolean isUserOnly() {\n return userOnly;\n }",
"public void setWhitelisted ( boolean value ) {\n\t\texecute ( handle -> handle.setWhitelisted ( value ) );\n\t}",
"@Override\n public boolean requiresUser() {\n return false;\n }",
"@Override\n\tpublic boolean isUser(User user) {\n\t\treturn false;\n\t}",
"public boolean hasUser() {\n return user_ != null;\n }",
"public void setEnable(Boolean enable) {\n this.enable = enable;\n }",
"public Boolean isEnable() {\n return this.enable;\n }",
"public void setEnabled(String enabled) {\r\n\t\tthis.enabled = enabled;\r\n\t}",
"private boolean shouldUseSimpleUserSwitcher() {\n return Settings.Global.getInt(this.mContext.getContentResolver(), \"lockscreenSimpleUserSwitcher\", this.mContext.getResources().getBoolean(17891459) ? 1 : 0) != 0;\n }",
"public void setEnabled(boolean enabled) {\r\n\t}",
"public void setEnabled(boolean enabled) {\n this.enabled = enabled;\n }",
"public void setEnabled(boolean enabled) {\n this.enabled = enabled;\n }",
"public void setEnabled(boolean enabled) {\n this.enabled = enabled;\n }",
"public void setEnabled(boolean enabled) {\n this.enabled = enabled;\n }",
"public void setEnabled(boolean enabled) {\n this.enabled = enabled;\n }",
"public boolean isEnable() {\n return enable;\n }",
"public void setUserAdmin(boolean isUserAdmin) {\r\n this.userAdmin = isUserAdmin;\r\n }",
"public void enable() {\r\n m_enabled = true;\r\n }",
"@Override\n public boolean isUserActive(String userName) {\n User user = getUserInfo(userName);\n if (user != null) {\n return user.isActive();\n }\n return false;\n }",
"@Override\r\n\tpublic boolean updateUser() {\n\t\treturn false;\r\n\t}",
"public void setEnable(Boolean enable) {\n this.enable = enable;\n }",
"public Boolean enable() {\n return this.enable;\n }",
"public Boolean isEnable() {\n\t\treturn enable;\n\t}",
"public void setExistingUser(boolean isExistingUser) {\r\n this.isExistingUser = isExistingUser;\r\n }",
"public boolean getUser () {\n return user;\n }",
"public void flagUser() {\n\t\tsuper.flagUser();\n\t}",
"public void setEnable(Boolean enable) {\n this.enable = enable;\n }",
"public void enableEditUserClasses(boolean state) {\r\n \t\teditUserClasses.setEnabled(state);\r\n \t}",
"public Boolean getEnabled() {\r\n return enabled;\r\n }",
"public void setCurrentUserPremium() {\n\t\tcurrentUser.setPremium(true);\n\t\tuserCatalog.modifyUser(currentUser);\n\t}",
"public boolean isEnable() {\n return _enabled;\n }",
"void setHasLoggedIn(Boolean value);",
"public abstract void setEnabled(Context context, boolean enabled);"
]
| [
"0.6775098",
"0.63565594",
"0.6331958",
"0.6313802",
"0.63045305",
"0.6209358",
"0.6188251",
"0.6127331",
"0.612362",
"0.60765254",
"0.6029914",
"0.60182935",
"0.5979081",
"0.59612423",
"0.59327596",
"0.59109956",
"0.5895865",
"0.5895865",
"0.5816808",
"0.5816808",
"0.58157766",
"0.5798427",
"0.57948595",
"0.57948595",
"0.57948595",
"0.57948595",
"0.5765339",
"0.5765339",
"0.5765339",
"0.5765339",
"0.5765339",
"0.5765339",
"0.5765339",
"0.5763997",
"0.57467306",
"0.5743507",
"0.57098794",
"0.56937075",
"0.56870204",
"0.5677256",
"0.56643087",
"0.56584305",
"0.5657461",
"0.5657388",
"0.56453925",
"0.5631652",
"0.562193",
"0.5616303",
"0.56029063",
"0.5598619",
"0.55869395",
"0.55777913",
"0.5575512",
"0.55748105",
"0.55748105",
"0.55748105",
"0.55748105",
"0.55624247",
"0.55624247",
"0.55624247",
"0.5557817",
"0.5557817",
"0.5557775",
"0.55515677",
"0.55515677",
"0.5551116",
"0.5532084",
"0.5529831",
"0.55257374",
"0.5523827",
"0.5521263",
"0.55155",
"0.5494004",
"0.5491977",
"0.5491444",
"0.54879117",
"0.5487194",
"0.5474753",
"0.5473189",
"0.5473189",
"0.5473189",
"0.5473189",
"0.5473189",
"0.5465476",
"0.5464782",
"0.5462437",
"0.5462118",
"0.54591954",
"0.5451033",
"0.5443489",
"0.54406554",
"0.54364294",
"0.54352605",
"0.5431857",
"0.5417437",
"0.5415318",
"0.54077816",
"0.54020435",
"0.53946143",
"0.5388621",
"0.5388006"
]
| 0.0 | -1 |
Specifies whether the user in the user pool is enabled. | public Boolean isEnabled() {
return this.enabled;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isEnabledByUser() {\n return mEnabledByUser;\n }",
"@Override\n public boolean isEnabled() {\n return user.hasBeenActivated;\n }",
"public void setEnabled(Boolean value) { this.myEnabled = value.booleanValue(); }",
"@ApiModelProperty(value = \"User is enabled or disabled. Effect: Controls the value of the corresponding CfgPerson attribute \")\n public Boolean isEnabled() {\n return enabled;\n }",
"public void setEnabled(boolean isEnable) throws SQLException\r\n\t{\r\n\t\tString SQL_USER = \"UPDATE user SET enabled=? WHERE id=?;\";\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//Prepare the statement\r\n\t\t\tPreparedStatement statement = this.getConn().prepareStatement(SQL_USER);\r\n\r\n\t\t\t//Bind the variables\r\n\t\t\tstatement.setInt(1, (isEnable ? 1 : 0));\r\n\t\t\tstatement.setInt(2, userId);\r\n\r\n\t\t\t//Execute the update\r\n\t\t\tstatement.executeUpdate();\r\n\r\n\t\t} catch (SQLException e)\r\n\t\t{\r\n\t\t\tGWT.log(\"Error in SQL: Student->setEnabled(boolean \"+ isEnable+ \")\", e);\r\n\t\t\tthis.getConn().rollback();\r\n\t\t\tthrow e;\t\r\n\t\t}\t\t\r\n\t\t//commit change\r\n\t\tDatabase.get().commit();\r\n\t}",
"@XmlTransient\n\tpublic boolean isCanActivateUser() {\n\t\treturn (isSecurityAdministrator() && isSelfRegistrationEnabled());\n\t}",
"public void setOnlyManageUser(boolean enable) {\n\t\t_onlyManageUser = enable;\n\t}",
"public void setEnabled(boolean value) {\n this.enabled = value;\n }",
"@Test\n\t void testEnabled() {\n\t\tassertTrue(user.isEnabled());\n\t}",
"public void assignAuthorisedUser(final boolean val) {\n authorisedUser = val;\n }",
"@Override\n public Users setEnable(Integer id) {\n Users u = userdao.findUserById(id);\n if (u.isEnabled()) {\n u.setEnabled(false);//if enable is true ,admin changes it to false so user can't login app\n } else {\n u.setEnabled(true);//if enable is false,admin changes it to true,so he gives access for login to user\n }\n userdao.save(u);\n\n return u;\n }",
"public boolean setEnabled(boolean enable);",
"public void setEnabled(boolean value) {\n m_Enabled = value;\n }",
"public boolean isEnabled() throws Exception\r\n\t{\r\n\t\tString SQL_USER = \"SELECT enabled FROM user WHERE id=?;\";\t\t\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\tPreparedStatement statement = this.getConn().prepareStatement(SQL_USER);\r\n\t\t\tstatement.setInt(1, userId);\r\n\t\t\tResultSet result = statement.executeQuery();\r\n\r\n\t\t\t// If this returns true, then the user already exists.\r\n\t\t\tif (!result.next())\r\n\t\t\t{\r\n\t\t\t\tthrow new Exception(\"No student found! (getEnabled)\");\r\n\t\t\t}\r\n\t\t\tif (result.getInt(\"enabled\")==1)\r\n\t\t\t\treturn true;\r\n\t\t\treturn false;\r\n\t\t} catch (SQLException e)\r\n\t\t{\r\n\t\t\tGWT.log(\"Error in getEnabled()\", e);\r\n\t\t\tthis.getConn().rollback();\r\n\t\t\tthrow e;\r\n\t\t}\r\n\t}",
"public void setEnabled(boolean aFlag) { _enabled = aFlag; }",
"@Transactional\n\tpublic void enableUser(String userName) {\n\t\tuserInfoDAO.enableUser(userName);\n\t}",
"public void setEnabled(boolean enabled);",
"public void setEnabled(boolean enabled);",
"public boolean isSetUser() {\n return this.user != null;\n }",
"public boolean isSetUser() {\n return this.user != null;\n }",
"public boolean hasUserSettings() {\r\n return processModel.getUserInfos() != null;\r\n }",
"public boolean hasUser(){\n return numUser < MAX_USER;\n }",
"void setEnabled(boolean enabled);",
"void setEnabled(boolean enabled);",
"void setEnabled(boolean enabled);",
"void setEnabled(boolean enabled);",
"boolean hasUser();",
"boolean hasUser();",
"boolean hasUser();",
"boolean hasUser();",
"boolean hasUser();",
"boolean hasUser();",
"boolean hasUser();",
"final public void setEnabled(boolean value) {\n enabledType = value ? ENABLED_ANY : ENABLED_NONE;\n }",
"public void setEnabled(String tmp) {\n enabled = DatabaseUtils.parseBoolean(tmp);\n }",
"@Override\r\n public void setEnabled(final boolean b) {\r\n _enabled = b;\r\n }",
"@FXML\n\tpublic void enableMyUser(ActionEvent event) {\n\t\tif (!txtDisableMyUser.getText().isEmpty()) {\n\t\t\tSystemUser user = restaurant.returnUser(txtDisableMyUser.getText());\n\n\t\t\tif (user != null) {\n\t\t\t\ttry {\n\t\t\t\t\tuser.setCondition(Condition.ACTIVE);\n\t\t\t\t\trestaurant.saveUsersData();\n\t\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\t\tdialog.setContentText(\"Tu usuario ha sido habilitado\");\n\t\t\t\t\tdialog.setTitle(\"Usuario Deshabilitado\");\n\t\t\t\t\tdialog.show();\n\t\t\t\t\ttxtDisableMyUser.setText(\"\");\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\t\tdialog.setContentText(\"No se ha podido guardar el nuevo estado del usuario\");\n\t\t\t\t\tdialog.setTitle(\"Error al guardar datos\");\n\t\t\t\t\tdialog.show();\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\tdialog.setContentText(\"Este usuario no existe\");\n\t\t\t\tdialog.setTitle(\"Error, usuario inexistente\");\n\t\t\t\tdialog.show();\n\t\t\t}\n\n\t\t} else {\n\t\t\tDialog<String> dialog = createDialog();\n\t\t\tdialog.setContentText(\"Todos los campos deben de ser llenados\");\n\t\t\tdialog.setTitle(\"Error al guardar datos\");\n\t\t\tdialog.show();\n\t\t}\n\t}",
"public boolean enabled(){\n return enabled;\n }",
"public boolean hasUser() {\n return instance.hasUser();\n }",
"@Override\n public boolean isUser() {\n return false;\n }",
"@Override\n public void setRole(User u) {\n loginTrue(u.getName());\n uRole = u.getUserRole();\n switch (uRole) {\n case 1:\n nhanvien.setEnabled(true);\n break;\n case 2:\n quanly.setEnabled(false);\n break;\n case 3:\n break;\n case 4:\n dathang.setEnabled(false);\n break;\n case 5:\n baocao.setEnabled(false);\n break;\n }\n }",
"void setAdminStatus(User user, boolean adminStatus);",
"boolean hasUserManaged();",
"void setUserLocked(boolean b);",
"public void setEnabled(Boolean enabled) {\r\n this.enabled = enabled;\r\n }",
"boolean hasSelectedUser();",
"public void setEnabled(final boolean enabled);",
"public void enable ( ) {\r\n\t\tenabled = true;\r\n\t}",
"public void setEnabled(final boolean theFlag) {\n myEnabled = theFlag;\n }",
"public void isAllowed(String user) {\n \r\n }",
"public void setEnabled(boolean enabled) {\n this.enabled = enabled;\n }",
"public void enable()\r\n\t{\r\n\t\tenabled = true;\r\n\t}",
"public boolean hasUser() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }",
"public void setEnabled(Boolean enabled) {\n this.enabled = enabled;\n }",
"public void setEnabled(Boolean enabled) {\n this.enabled = enabled;\n }",
"public void setEnabled(Boolean enabled) {\n this.enabled = enabled;\n }",
"public void setEnabled(Boolean enabled) {\n this.enabled = enabled;\n }",
"boolean getEnabled();",
"boolean getEnabled();",
"boolean getEnabled();",
"public void setEnabled(boolean enabled) {\r\n this.enabled = enabled;\r\n }",
"public void setEnabled(boolean enabled) {\r\n this.enabled = enabled;\r\n }",
"public boolean hasUser() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }",
"public boolean hasUser() {\n return user_ != null;\n }",
"public boolean hasUser() {\n return user_ != null;\n }",
"public boolean getEnabled(){\r\n\t\treturn enabled;\r\n\t}",
"public boolean isSetCreate_user_priv() {\n return this.__isset.create_user_priv;\n }",
"boolean hasEnabled();",
"@ApiModelProperty(example = \"false\", required = true, value = \"Flag is true if this permission can only be assigned to users, and not groups or organizations\")\n public Boolean isUserOnly() {\n return userOnly;\n }",
"public void setWhitelisted ( boolean value ) {\n\t\texecute ( handle -> handle.setWhitelisted ( value ) );\n\t}",
"@Override\n public boolean requiresUser() {\n return false;\n }",
"@Override\n\tpublic boolean isUser(User user) {\n\t\treturn false;\n\t}",
"public boolean hasUser() {\n return user_ != null;\n }",
"public void setEnable(Boolean enable) {\n this.enable = enable;\n }",
"public Boolean isEnable() {\n return this.enable;\n }",
"public void setEnabled(String enabled) {\r\n\t\tthis.enabled = enabled;\r\n\t}",
"private boolean shouldUseSimpleUserSwitcher() {\n return Settings.Global.getInt(this.mContext.getContentResolver(), \"lockscreenSimpleUserSwitcher\", this.mContext.getResources().getBoolean(17891459) ? 1 : 0) != 0;\n }",
"public void setEnabled(boolean enabled) {\r\n\t}",
"public void setEnabled(boolean enabled) {\n this.enabled = enabled;\n }",
"public void setEnabled(boolean enabled) {\n this.enabled = enabled;\n }",
"public void setEnabled(boolean enabled) {\n this.enabled = enabled;\n }",
"public void setEnabled(boolean enabled) {\n this.enabled = enabled;\n }",
"public void setEnabled(boolean enabled) {\n this.enabled = enabled;\n }",
"public boolean isEnable() {\n return enable;\n }",
"public void setUserAdmin(boolean isUserAdmin) {\r\n this.userAdmin = isUserAdmin;\r\n }",
"public void enable() {\r\n m_enabled = true;\r\n }",
"@Override\n public boolean isUserActive(String userName) {\n User user = getUserInfo(userName);\n if (user != null) {\n return user.isActive();\n }\n return false;\n }",
"@Override\r\n\tpublic boolean updateUser() {\n\t\treturn false;\r\n\t}",
"public void setEnable(Boolean enable) {\n this.enable = enable;\n }",
"public Boolean enable() {\n return this.enable;\n }",
"public Boolean isEnable() {\n\t\treturn enable;\n\t}",
"public void setExistingUser(boolean isExistingUser) {\r\n this.isExistingUser = isExistingUser;\r\n }",
"public boolean getUser () {\n return user;\n }",
"public void flagUser() {\n\t\tsuper.flagUser();\n\t}",
"public void setEnable(Boolean enable) {\n this.enable = enable;\n }",
"public void enableEditUserClasses(boolean state) {\r\n \t\teditUserClasses.setEnabled(state);\r\n \t}",
"public Boolean getEnabled() {\r\n return enabled;\r\n }",
"public void setCurrentUserPremium() {\n\t\tcurrentUser.setPremium(true);\n\t\tuserCatalog.modifyUser(currentUser);\n\t}",
"public boolean isEnable() {\n return _enabled;\n }",
"void setHasLoggedIn(Boolean value);",
"public abstract void setEnabled(Context context, boolean enabled);"
]
| [
"0.6775098",
"0.63565594",
"0.6331958",
"0.6313802",
"0.63045305",
"0.6209358",
"0.6188251",
"0.6127331",
"0.612362",
"0.60765254",
"0.6029914",
"0.60182935",
"0.5979081",
"0.59612423",
"0.59327596",
"0.59109956",
"0.5895865",
"0.5895865",
"0.5816808",
"0.5816808",
"0.58157766",
"0.5798427",
"0.57948595",
"0.57948595",
"0.57948595",
"0.57948595",
"0.5765339",
"0.5765339",
"0.5765339",
"0.5765339",
"0.5765339",
"0.5765339",
"0.5765339",
"0.5763997",
"0.57467306",
"0.5743507",
"0.57098794",
"0.56937075",
"0.56870204",
"0.5677256",
"0.56643087",
"0.56584305",
"0.5657461",
"0.5657388",
"0.56453925",
"0.5631652",
"0.562193",
"0.5616303",
"0.56029063",
"0.5598619",
"0.55869395",
"0.55777913",
"0.5575512",
"0.55748105",
"0.55748105",
"0.55748105",
"0.55748105",
"0.55624247",
"0.55624247",
"0.55624247",
"0.5557817",
"0.5557817",
"0.5557775",
"0.55515677",
"0.55515677",
"0.5551116",
"0.5532084",
"0.5529831",
"0.55257374",
"0.5523827",
"0.5521263",
"0.55155",
"0.5494004",
"0.5491977",
"0.5491444",
"0.54879117",
"0.5487194",
"0.5474753",
"0.5473189",
"0.5473189",
"0.5473189",
"0.5473189",
"0.5473189",
"0.5465476",
"0.5464782",
"0.5462437",
"0.5462118",
"0.54591954",
"0.5451033",
"0.5443489",
"0.54406554",
"0.54364294",
"0.54352605",
"0.5431857",
"0.5417437",
"0.5415318",
"0.54077816",
"0.54020435",
"0.53946143",
"0.5388621",
"0.5388006"
]
| 0.0 | -1 |
The first name, or given name, of the user. | public void setFirstName(String firstName) {
this.firstName = firstName;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic String getGivenName() {\n\t\treturn user.getUserInfo().getGivenName();\n\t}",
"public java.lang.String getUserFirstName() {\r\n return userFirstName;\r\n }",
"java.lang.String getFirstName();",
"java.lang.String getFirstName();",
"public String getGoogleUserFirstName(){\n return (String) attributes.get(GOOGLE_USER_FIRST_NAME);\n }",
"public String getFirstName() {\n return userItem.getFirstName();\n }",
"public java.lang.String getFirstName();",
"java.lang.String getUserName();",
"java.lang.String getUserName();",
"java.lang.String getUserName();",
"public String getFirstName() {\r\n return insertMode ? \"\" : stringValue(CONTACTS_FIRST_NAME);\r\n }",
"public String getName() {\n return user.getName();\n }",
"public java.lang.String getFirst_name() {\n return first_name;\n }",
"public java.lang.CharSequence getFirstName() {\n return first_name;\n }",
"public java.lang.CharSequence getFirstName() {\n return first_name;\n }",
"public String getFirstname() {\n return (String) get(\"firstname\");\n }",
"public String getFirstname() {\r\n\t\treturn firstname;\r\n\t}",
"public final String getFirstName() {\r\n\t\treturn firstName;\r\n\t}",
"public String getFirst_name() {\n return first_name;\n }",
"public final String getFirstName() {\n\t\treturn firstName;\n\t}",
"public static String getUserDisplayName() {\r\n return getUsername();\r\n }",
"public String getFirstname() {\n\t\treturn firstname;\n\t}",
"public String getFirstName()\r\n\t{\r\n\t\treturn firstName;\r\n\t}",
"private void getUserName() {\n if (mAuth.getCurrentUser() != null) {\n nameOfCurrentUser = mAuth.getCurrentUser().getDisplayName();\n Log.d(TAG, \"getUserName: getDisplayName is not null\");\n if (nameOfCurrentUser != null && nameOfCurrentUser.contains(\" \")) {\n String[] nameArray = nameOfCurrentUser.split(\" \");\n personalWelcomeMessage.setText(\"Hello, \" + nameArray[0]);\n Log.d(TAG, \"Name is: \" + personalWelcomeMessage.getText().toString());\n }\n else if (nameOfCurrentUser != null && !nameOfCurrentUser.contains(\" \")) {\n personalWelcomeMessage.setText(\"Hello, \" + nameOfCurrentUser);\n Log.d(TAG, \"Name is: \" + personalWelcomeMessage.getText().toString());\n }\n else if (nameOfCurrentUser==null){\n personalWelcomeMessage.setText(\"Hello\");\n }\n }\n }",
"public String getFirstName(){\r\n\t\treturn firstName;\r\n\t}",
"public String getFirstName()\n\t{\n\t\t//local consants\n\n\t\t//local variables\n\n\t\t/*******************************************************************************/\n\n\t\t//Return the firstName.\n\t\treturn firstName;\n\n\t}",
"public String getFirstName() {\n return (String)getAttributeInternal(FIRSTNAME);\n }",
"public String getFirstName() {\r\n\t\treturn firstName;\r\n\t}",
"public String getFirstName() {\r\n\t\treturn firstName;\r\n\t}",
"@Override\n public String getUserFullName(String userName) {\n User user = getUserInfo(userName);\n String fullName = \"\";\n\n if (user == null) {\n return \"\";\n }\n\n if (user.getFirstName() != null) {\n fullName = user.getFirstName();\n }\n\n if (user.getLastName() != null) {\n if (fullName.length() > 0) {\n fullName += \" \" + user.getLastName();\n } else {\n fullName = user.getLastName();\n }\n }\n return fullName;\n }",
"public String getFirstName() {\n return firstNameField.getText();\n }",
"public String getFirstName()\n\t{\n\t\treturn firstName;\n\t}",
"public String getFirstName()\n\t{\n\t\treturn firstName;\n\t}",
"public String getFirstname() throws Exception\r\n\t{\r\n\t\tString SQL_USER = \"SELECT firstname FROM user WHERE id=?;\";\r\n\t\tString returnValue=\"\";\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\tPreparedStatement statement = this.getConn().prepareStatement(SQL_USER);\r\n\t\t\tstatement.setInt(1, userId);\r\n\t\t\tResultSet result = statement.executeQuery();\r\n\r\n\t\t\t// If this returns true, then the user already exists.\r\n\t\t\tif (!result.next())\r\n\t\t\t{\r\n\t\t\t\tthrow new Exception(\"No student found! (getFirstname)\");\r\n\t\t\t}\r\n\r\n\t\t\t// Return the successfully user.\r\n\t\t\treturnValue = result.getString(\"firstname\");\r\n\t\t} catch (Exception e)\r\n\t\t{\r\n\t\t\tGWT.log(\"Error in getFirstname()\", e);\r\n\t\t\tthis.getConn().rollback();\r\n\t\t\tthrow e;\r\n\t\t}\r\n\t\treturn returnValue;\r\n\t}",
"public String firstName() { return firstName; }",
"public static String getFirstName() {\r\n\t\treturn firstName;\r\n\t}",
"public String getFirstName() {\r\n\t\treturn firstName;\t\t\r\n\t}",
"public java.lang.String getFirstName() {\r\n return firstName;\r\n }",
"public java.lang.String getFirstName() {\r\n return firstName;\r\n }",
"public java.lang.String getFirstName() {\n return firstName;\n }",
"public java.lang.String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n\t\treturn firstName;\r\n\t}",
"public String getUserRealName() {\r\n return userRealName;\r\n }",
"@Override\n\tpublic java.lang.String getUserName() {\n\t\treturn _second.getUserName();\n\t}",
"public String getFirstName(){\n\t\treturn firstName;\n\t}",
"public String getFirstName() {\n\t\treturn firstName;\n\t}",
"public String getFirstName() {\n\t\treturn firstName;\n\t}",
"public String getFirstName() {\n\t\treturn firstName;\n\t}",
"public String getFirstName() {\n\t\treturn firstName;\n\t}",
"public String getFirstName() {\n\t\treturn firstName;\n\t}",
"public String getFirstName() {\n\t\treturn firstName;\n\t}",
"public String getFirstName() {\n\t\treturn firstName;\n\t}",
"public String getFirstName() {\n\t\treturn firstName;\n\t}",
"public String getFirstName() {\n\t\treturn firstName;\n\t}",
"public String getFirstName() {\n\t\treturn firstName;\n\t}",
"public String getFirstName() {\n\t\treturn firstName;\n\t}",
"public String getFirstName() {\n\t\treturn firstName;\n\t}",
"public String getFirstName() {\n\t\treturn firstName;\n\t}",
"public String getFirstName()\r\n\t{\r\n\t\treturn firstName.getModelObjectAsString();\r\n\t}",
"public String getFirstName() {\n\t\treturn this.FirstName ;\n\t}",
"public String getFirstName() {\r\n\t\treturn this.firstName;\r\n\t}",
"String getFirstName();",
"String getFirstName();",
"String getFirstName();",
"@Override\r\n\tpublic String getFistName() {\n\t\treturn first_name;\r\n\t}",
"public String getFirstName() {\r\n return firstName;\r\n }",
"public String getFirstName() {\r\n return firstName;\r\n }",
"public String getFirstName() {\r\n return firstName;\r\n }",
"java.lang.String getUsername();",
"java.lang.String getUsername();",
"java.lang.String getUsername();",
"java.lang.String getUsername();",
"java.lang.String getUsername();",
"java.lang.String getUsername();",
"java.lang.String getUsername();",
"java.lang.String getUsername();",
"java.lang.String getUsername();",
"public String getFirstName() {\n\t\treturn myFirstName;\n\t}",
"public String getFirstName(final SessionContext ctx)\n\t{\n\t\treturn (String)getProperty( ctx, FIRSTNAME);\n\t}",
"public String getFirstName(final SessionContext ctx)\n\t{\n\t\treturn (String)getProperty( ctx, FIRSTNAME);\n\t}",
"public String getFirstName(){\n\t\treturn this.firstName;\n\t}",
"public String getNameFirst() {\n\t\t\treturn nameFirst;\n\t\t}",
"@AutoEscape\n\tpublic String getFirstName();",
"@Override\n\tpublic java.lang.String getFirstName() {\n\t\treturn _candidate.getFirstName();\n\t}",
"public String getUserRealname() {\n return userRealname;\n }",
"public String getFirstName(){\n\t\treturn this.firstName;\r\n\t}",
"public static String getUserName(long requestorId)\n\t {\n\t String fullName = StringPool.BLANK;\n\t try\n\t {\n\t User user = UserLocalServiceUtil.getUserById(requestorId);\n\t fullName = user.getFirstName() + StringPool.SPACE + user.getLastName();\n\t } catch (PortalException e)\n\t {\n\t LOGGER.error(\"Failed to find user details...\" + e.getMessage());\n\t } catch (SystemException e)\n\t {\n\t LOGGER.error(\"User not exist....\" + e.getMessage());\n\t }\n\t return fullName;\n\t }",
"public String getFirstName() {\n\t\treturn this.firstName;\n\t}",
"@java.lang.Override\n public java.lang.String getFirstName() {\n java.lang.Object ref = firstName_;\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 firstName_ = s;\n return s;\n }\n }",
"public String getFirstName()\r\n {\r\n return firstName;\r\n }",
"public String getUser_name() {\n return user_name;\n }",
"public String getFirstName() {\n return fName;\n }",
"@java.lang.Override\n public java.lang.String getFirstName() {\n java.lang.Object ref = firstName_;\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 firstName_ = s;\n return s;\n }\n }",
"@java.lang.Override\n public java.lang.String getFirstName() {\n java.lang.Object ref = firstName_;\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 firstName_ = s;\n return s;\n }\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }"
]
| [
"0.789419",
"0.76937485",
"0.7590751",
"0.7590751",
"0.75394845",
"0.7456505",
"0.73016965",
"0.72258896",
"0.72258896",
"0.72258896",
"0.7212932",
"0.7200413",
"0.71796566",
"0.71727985",
"0.71717745",
"0.71543664",
"0.7140811",
"0.7102241",
"0.7069955",
"0.705405",
"0.7045691",
"0.70432407",
"0.70352864",
"0.7004903",
"0.70004654",
"0.69969827",
"0.69817126",
"0.6975869",
"0.6975869",
"0.69622755",
"0.6959147",
"0.695912",
"0.695912",
"0.6957506",
"0.6951554",
"0.695099",
"0.6943427",
"0.693987",
"0.693987",
"0.6933965",
"0.6933965",
"0.69322956",
"0.69265085",
"0.6924928",
"0.6923447",
"0.6917628",
"0.6917628",
"0.6917628",
"0.6917628",
"0.6917628",
"0.6917628",
"0.6917628",
"0.6917628",
"0.6917628",
"0.6917628",
"0.6917628",
"0.6917628",
"0.6917628",
"0.6911898",
"0.68956935",
"0.6894817",
"0.68907064",
"0.68907064",
"0.68907064",
"0.68851084",
"0.6879616",
"0.6879616",
"0.6879616",
"0.68768513",
"0.68768513",
"0.68768513",
"0.68768513",
"0.68768513",
"0.68768513",
"0.68768513",
"0.68768513",
"0.68768513",
"0.68751425",
"0.6858508",
"0.6858508",
"0.68569803",
"0.6855014",
"0.68542284",
"0.68460846",
"0.68424755",
"0.68351305",
"0.6828774",
"0.6826331",
"0.68215",
"0.68206966",
"0.68187916",
"0.68003285",
"0.67945325",
"0.67945325",
"0.6791823",
"0.6791823",
"0.67896783",
"0.67896783",
"0.67896783",
"0.67896783",
"0.67896783"
]
| 0.0 | -1 |
The first name, or given name, of the user. | public String getFirstName() {
return this.firstName;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic String getGivenName() {\n\t\treturn user.getUserInfo().getGivenName();\n\t}",
"public java.lang.String getUserFirstName() {\r\n return userFirstName;\r\n }",
"java.lang.String getFirstName();",
"java.lang.String getFirstName();",
"public String getGoogleUserFirstName(){\n return (String) attributes.get(GOOGLE_USER_FIRST_NAME);\n }",
"public String getFirstName() {\n return userItem.getFirstName();\n }",
"public java.lang.String getFirstName();",
"java.lang.String getUserName();",
"java.lang.String getUserName();",
"java.lang.String getUserName();",
"public String getFirstName() {\r\n return insertMode ? \"\" : stringValue(CONTACTS_FIRST_NAME);\r\n }",
"public String getName() {\n return user.getName();\n }",
"public java.lang.String getFirst_name() {\n return first_name;\n }",
"public java.lang.CharSequence getFirstName() {\n return first_name;\n }",
"public java.lang.CharSequence getFirstName() {\n return first_name;\n }",
"public String getFirstname() {\n return (String) get(\"firstname\");\n }",
"public String getFirstname() {\r\n\t\treturn firstname;\r\n\t}",
"public final String getFirstName() {\r\n\t\treturn firstName;\r\n\t}",
"public String getFirst_name() {\n return first_name;\n }",
"public final String getFirstName() {\n\t\treturn firstName;\n\t}",
"public static String getUserDisplayName() {\r\n return getUsername();\r\n }",
"public String getFirstname() {\n\t\treturn firstname;\n\t}",
"public String getFirstName()\r\n\t{\r\n\t\treturn firstName;\r\n\t}",
"private void getUserName() {\n if (mAuth.getCurrentUser() != null) {\n nameOfCurrentUser = mAuth.getCurrentUser().getDisplayName();\n Log.d(TAG, \"getUserName: getDisplayName is not null\");\n if (nameOfCurrentUser != null && nameOfCurrentUser.contains(\" \")) {\n String[] nameArray = nameOfCurrentUser.split(\" \");\n personalWelcomeMessage.setText(\"Hello, \" + nameArray[0]);\n Log.d(TAG, \"Name is: \" + personalWelcomeMessage.getText().toString());\n }\n else if (nameOfCurrentUser != null && !nameOfCurrentUser.contains(\" \")) {\n personalWelcomeMessage.setText(\"Hello, \" + nameOfCurrentUser);\n Log.d(TAG, \"Name is: \" + personalWelcomeMessage.getText().toString());\n }\n else if (nameOfCurrentUser==null){\n personalWelcomeMessage.setText(\"Hello\");\n }\n }\n }",
"public String getFirstName(){\r\n\t\treturn firstName;\r\n\t}",
"public String getFirstName()\n\t{\n\t\t//local consants\n\n\t\t//local variables\n\n\t\t/*******************************************************************************/\n\n\t\t//Return the firstName.\n\t\treturn firstName;\n\n\t}",
"public String getFirstName() {\n return (String)getAttributeInternal(FIRSTNAME);\n }",
"public String getFirstName() {\r\n\t\treturn firstName;\r\n\t}",
"public String getFirstName() {\r\n\t\treturn firstName;\r\n\t}",
"@Override\n public String getUserFullName(String userName) {\n User user = getUserInfo(userName);\n String fullName = \"\";\n\n if (user == null) {\n return \"\";\n }\n\n if (user.getFirstName() != null) {\n fullName = user.getFirstName();\n }\n\n if (user.getLastName() != null) {\n if (fullName.length() > 0) {\n fullName += \" \" + user.getLastName();\n } else {\n fullName = user.getLastName();\n }\n }\n return fullName;\n }",
"public String getFirstName() {\n return firstNameField.getText();\n }",
"public String getFirstName()\n\t{\n\t\treturn firstName;\n\t}",
"public String getFirstName()\n\t{\n\t\treturn firstName;\n\t}",
"public String getFirstname() throws Exception\r\n\t{\r\n\t\tString SQL_USER = \"SELECT firstname FROM user WHERE id=?;\";\r\n\t\tString returnValue=\"\";\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\tPreparedStatement statement = this.getConn().prepareStatement(SQL_USER);\r\n\t\t\tstatement.setInt(1, userId);\r\n\t\t\tResultSet result = statement.executeQuery();\r\n\r\n\t\t\t// If this returns true, then the user already exists.\r\n\t\t\tif (!result.next())\r\n\t\t\t{\r\n\t\t\t\tthrow new Exception(\"No student found! (getFirstname)\");\r\n\t\t\t}\r\n\r\n\t\t\t// Return the successfully user.\r\n\t\t\treturnValue = result.getString(\"firstname\");\r\n\t\t} catch (Exception e)\r\n\t\t{\r\n\t\t\tGWT.log(\"Error in getFirstname()\", e);\r\n\t\t\tthis.getConn().rollback();\r\n\t\t\tthrow e;\r\n\t\t}\r\n\t\treturn returnValue;\r\n\t}",
"public String firstName() { return firstName; }",
"public static String getFirstName() {\r\n\t\treturn firstName;\r\n\t}",
"public String getFirstName() {\r\n\t\treturn firstName;\t\t\r\n\t}",
"public java.lang.String getFirstName() {\r\n return firstName;\r\n }",
"public java.lang.String getFirstName() {\r\n return firstName;\r\n }",
"public java.lang.String getFirstName() {\n return firstName;\n }",
"public java.lang.String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n\t\treturn firstName;\r\n\t}",
"public String getUserRealName() {\r\n return userRealName;\r\n }",
"@Override\n\tpublic java.lang.String getUserName() {\n\t\treturn _second.getUserName();\n\t}",
"public String getFirstName(){\n\t\treturn firstName;\n\t}",
"public String getFirstName() {\n\t\treturn firstName;\n\t}",
"public String getFirstName() {\n\t\treturn firstName;\n\t}",
"public String getFirstName() {\n\t\treturn firstName;\n\t}",
"public String getFirstName() {\n\t\treturn firstName;\n\t}",
"public String getFirstName() {\n\t\treturn firstName;\n\t}",
"public String getFirstName() {\n\t\treturn firstName;\n\t}",
"public String getFirstName() {\n\t\treturn firstName;\n\t}",
"public String getFirstName() {\n\t\treturn firstName;\n\t}",
"public String getFirstName() {\n\t\treturn firstName;\n\t}",
"public String getFirstName() {\n\t\treturn firstName;\n\t}",
"public String getFirstName() {\n\t\treturn firstName;\n\t}",
"public String getFirstName() {\n\t\treturn firstName;\n\t}",
"public String getFirstName() {\n\t\treturn firstName;\n\t}",
"public String getFirstName()\r\n\t{\r\n\t\treturn firstName.getModelObjectAsString();\r\n\t}",
"public String getFirstName() {\n\t\treturn this.FirstName ;\n\t}",
"public String getFirstName() {\r\n\t\treturn this.firstName;\r\n\t}",
"String getFirstName();",
"String getFirstName();",
"String getFirstName();",
"@Override\r\n\tpublic String getFistName() {\n\t\treturn first_name;\r\n\t}",
"public String getFirstName() {\r\n return firstName;\r\n }",
"public String getFirstName() {\r\n return firstName;\r\n }",
"public String getFirstName() {\r\n return firstName;\r\n }",
"java.lang.String getUsername();",
"java.lang.String getUsername();",
"java.lang.String getUsername();",
"java.lang.String getUsername();",
"java.lang.String getUsername();",
"java.lang.String getUsername();",
"java.lang.String getUsername();",
"java.lang.String getUsername();",
"java.lang.String getUsername();",
"public String getFirstName() {\n\t\treturn myFirstName;\n\t}",
"public String getFirstName(final SessionContext ctx)\n\t{\n\t\treturn (String)getProperty( ctx, FIRSTNAME);\n\t}",
"public String getFirstName(final SessionContext ctx)\n\t{\n\t\treturn (String)getProperty( ctx, FIRSTNAME);\n\t}",
"public String getFirstName(){\n\t\treturn this.firstName;\n\t}",
"public String getNameFirst() {\n\t\t\treturn nameFirst;\n\t\t}",
"@AutoEscape\n\tpublic String getFirstName();",
"@Override\n\tpublic java.lang.String getFirstName() {\n\t\treturn _candidate.getFirstName();\n\t}",
"public String getUserRealname() {\n return userRealname;\n }",
"public String getFirstName(){\n\t\treturn this.firstName;\r\n\t}",
"public static String getUserName(long requestorId)\n\t {\n\t String fullName = StringPool.BLANK;\n\t try\n\t {\n\t User user = UserLocalServiceUtil.getUserById(requestorId);\n\t fullName = user.getFirstName() + StringPool.SPACE + user.getLastName();\n\t } catch (PortalException e)\n\t {\n\t LOGGER.error(\"Failed to find user details...\" + e.getMessage());\n\t } catch (SystemException e)\n\t {\n\t LOGGER.error(\"User not exist....\" + e.getMessage());\n\t }\n\t return fullName;\n\t }",
"public String getFirstName() {\n\t\treturn this.firstName;\n\t}",
"@java.lang.Override\n public java.lang.String getFirstName() {\n java.lang.Object ref = firstName_;\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 firstName_ = s;\n return s;\n }\n }",
"public String getFirstName()\r\n {\r\n return firstName;\r\n }",
"public String getUser_name() {\n return user_name;\n }",
"public String getFirstName() {\n return fName;\n }",
"@java.lang.Override\n public java.lang.String getFirstName() {\n java.lang.Object ref = firstName_;\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 firstName_ = s;\n return s;\n }\n }",
"@java.lang.Override\n public java.lang.String getFirstName() {\n java.lang.Object ref = firstName_;\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 firstName_ = s;\n return s;\n }\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }"
]
| [
"0.78938997",
"0.769339",
"0.7590854",
"0.7590854",
"0.75391686",
"0.7456368",
"0.730161",
"0.72260636",
"0.72260636",
"0.72260636",
"0.72125626",
"0.7200455",
"0.7179324",
"0.7172308",
"0.7171259",
"0.71541095",
"0.7140512",
"0.71018577",
"0.7069635",
"0.7053675",
"0.7046186",
"0.70429605",
"0.70349383",
"0.7005087",
"0.70001316",
"0.69966704",
"0.6981391",
"0.6975443",
"0.6975443",
"0.6962879",
"0.6958821",
"0.6958746",
"0.6958746",
"0.69572747",
"0.6951413",
"0.69508225",
"0.6943025",
"0.69395125",
"0.69395125",
"0.69335866",
"0.69335866",
"0.69318575",
"0.6926767",
"0.6925158",
"0.69231135",
"0.6917201",
"0.6917201",
"0.6917201",
"0.6917201",
"0.6917201",
"0.6917201",
"0.6917201",
"0.6917201",
"0.6917201",
"0.6917201",
"0.6917201",
"0.6917201",
"0.6917201",
"0.691169",
"0.68953365",
"0.6894348",
"0.6890624",
"0.6890624",
"0.6890624",
"0.68847543",
"0.6879318",
"0.6879318",
"0.6879318",
"0.6876973",
"0.6876973",
"0.6876973",
"0.6876973",
"0.6876973",
"0.6876973",
"0.6876973",
"0.6876973",
"0.6876973",
"0.68747556",
"0.6858447",
"0.6858447",
"0.6856585",
"0.68550134",
"0.68542284",
"0.68456304",
"0.68426996",
"0.68347293",
"0.68291986",
"0.68258524",
"0.6821525",
"0.6820411",
"0.68189013",
"0.67999995",
"0.6794554",
"0.6794554",
"0.679155",
"0.679155",
"0.6789377",
"0.6789377",
"0.6789377",
"0.6789377",
"0.6789377"
]
| 0.0 | -1 |
The first name, or given name, of the user. | public User withFirstName(String firstName) {
setFirstName(firstName);
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic String getGivenName() {\n\t\treturn user.getUserInfo().getGivenName();\n\t}",
"public java.lang.String getUserFirstName() {\r\n return userFirstName;\r\n }",
"java.lang.String getFirstName();",
"java.lang.String getFirstName();",
"public String getGoogleUserFirstName(){\n return (String) attributes.get(GOOGLE_USER_FIRST_NAME);\n }",
"public String getFirstName() {\n return userItem.getFirstName();\n }",
"public java.lang.String getFirstName();",
"java.lang.String getUserName();",
"java.lang.String getUserName();",
"java.lang.String getUserName();",
"public String getFirstName() {\r\n return insertMode ? \"\" : stringValue(CONTACTS_FIRST_NAME);\r\n }",
"public String getName() {\n return user.getName();\n }",
"public java.lang.String getFirst_name() {\n return first_name;\n }",
"public java.lang.CharSequence getFirstName() {\n return first_name;\n }",
"public java.lang.CharSequence getFirstName() {\n return first_name;\n }",
"public String getFirstname() {\n return (String) get(\"firstname\");\n }",
"public String getFirstname() {\r\n\t\treturn firstname;\r\n\t}",
"public final String getFirstName() {\r\n\t\treturn firstName;\r\n\t}",
"public String getFirst_name() {\n return first_name;\n }",
"public final String getFirstName() {\n\t\treturn firstName;\n\t}",
"public static String getUserDisplayName() {\r\n return getUsername();\r\n }",
"public String getFirstname() {\n\t\treturn firstname;\n\t}",
"public String getFirstName()\r\n\t{\r\n\t\treturn firstName;\r\n\t}",
"private void getUserName() {\n if (mAuth.getCurrentUser() != null) {\n nameOfCurrentUser = mAuth.getCurrentUser().getDisplayName();\n Log.d(TAG, \"getUserName: getDisplayName is not null\");\n if (nameOfCurrentUser != null && nameOfCurrentUser.contains(\" \")) {\n String[] nameArray = nameOfCurrentUser.split(\" \");\n personalWelcomeMessage.setText(\"Hello, \" + nameArray[0]);\n Log.d(TAG, \"Name is: \" + personalWelcomeMessage.getText().toString());\n }\n else if (nameOfCurrentUser != null && !nameOfCurrentUser.contains(\" \")) {\n personalWelcomeMessage.setText(\"Hello, \" + nameOfCurrentUser);\n Log.d(TAG, \"Name is: \" + personalWelcomeMessage.getText().toString());\n }\n else if (nameOfCurrentUser==null){\n personalWelcomeMessage.setText(\"Hello\");\n }\n }\n }",
"public String getFirstName(){\r\n\t\treturn firstName;\r\n\t}",
"public String getFirstName()\n\t{\n\t\t//local consants\n\n\t\t//local variables\n\n\t\t/*******************************************************************************/\n\n\t\t//Return the firstName.\n\t\treturn firstName;\n\n\t}",
"public String getFirstName() {\n return (String)getAttributeInternal(FIRSTNAME);\n }",
"public String getFirstName() {\r\n\t\treturn firstName;\r\n\t}",
"public String getFirstName() {\r\n\t\treturn firstName;\r\n\t}",
"@Override\n public String getUserFullName(String userName) {\n User user = getUserInfo(userName);\n String fullName = \"\";\n\n if (user == null) {\n return \"\";\n }\n\n if (user.getFirstName() != null) {\n fullName = user.getFirstName();\n }\n\n if (user.getLastName() != null) {\n if (fullName.length() > 0) {\n fullName += \" \" + user.getLastName();\n } else {\n fullName = user.getLastName();\n }\n }\n return fullName;\n }",
"public String getFirstName() {\n return firstNameField.getText();\n }",
"public String getFirstName()\n\t{\n\t\treturn firstName;\n\t}",
"public String getFirstName()\n\t{\n\t\treturn firstName;\n\t}",
"public String getFirstname() throws Exception\r\n\t{\r\n\t\tString SQL_USER = \"SELECT firstname FROM user WHERE id=?;\";\r\n\t\tString returnValue=\"\";\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\tPreparedStatement statement = this.getConn().prepareStatement(SQL_USER);\r\n\t\t\tstatement.setInt(1, userId);\r\n\t\t\tResultSet result = statement.executeQuery();\r\n\r\n\t\t\t// If this returns true, then the user already exists.\r\n\t\t\tif (!result.next())\r\n\t\t\t{\r\n\t\t\t\tthrow new Exception(\"No student found! (getFirstname)\");\r\n\t\t\t}\r\n\r\n\t\t\t// Return the successfully user.\r\n\t\t\treturnValue = result.getString(\"firstname\");\r\n\t\t} catch (Exception e)\r\n\t\t{\r\n\t\t\tGWT.log(\"Error in getFirstname()\", e);\r\n\t\t\tthis.getConn().rollback();\r\n\t\t\tthrow e;\r\n\t\t}\r\n\t\treturn returnValue;\r\n\t}",
"public String firstName() { return firstName; }",
"public static String getFirstName() {\r\n\t\treturn firstName;\r\n\t}",
"public String getFirstName() {\r\n\t\treturn firstName;\t\t\r\n\t}",
"public java.lang.String getFirstName() {\r\n return firstName;\r\n }",
"public java.lang.String getFirstName() {\r\n return firstName;\r\n }",
"public java.lang.String getFirstName() {\n return firstName;\n }",
"public java.lang.String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n\t\treturn firstName;\r\n\t}",
"public String getUserRealName() {\r\n return userRealName;\r\n }",
"@Override\n\tpublic java.lang.String getUserName() {\n\t\treturn _second.getUserName();\n\t}",
"public String getFirstName(){\n\t\treturn firstName;\n\t}",
"public String getFirstName() {\n\t\treturn firstName;\n\t}",
"public String getFirstName() {\n\t\treturn firstName;\n\t}",
"public String getFirstName() {\n\t\treturn firstName;\n\t}",
"public String getFirstName() {\n\t\treturn firstName;\n\t}",
"public String getFirstName() {\n\t\treturn firstName;\n\t}",
"public String getFirstName() {\n\t\treturn firstName;\n\t}",
"public String getFirstName() {\n\t\treturn firstName;\n\t}",
"public String getFirstName() {\n\t\treturn firstName;\n\t}",
"public String getFirstName() {\n\t\treturn firstName;\n\t}",
"public String getFirstName() {\n\t\treturn firstName;\n\t}",
"public String getFirstName() {\n\t\treturn firstName;\n\t}",
"public String getFirstName() {\n\t\treturn firstName;\n\t}",
"public String getFirstName() {\n\t\treturn firstName;\n\t}",
"public String getFirstName()\r\n\t{\r\n\t\treturn firstName.getModelObjectAsString();\r\n\t}",
"public String getFirstName() {\n\t\treturn this.FirstName ;\n\t}",
"public String getFirstName() {\r\n\t\treturn this.firstName;\r\n\t}",
"String getFirstName();",
"String getFirstName();",
"String getFirstName();",
"@Override\r\n\tpublic String getFistName() {\n\t\treturn first_name;\r\n\t}",
"public String getFirstName() {\r\n return firstName;\r\n }",
"public String getFirstName() {\r\n return firstName;\r\n }",
"public String getFirstName() {\r\n return firstName;\r\n }",
"java.lang.String getUsername();",
"java.lang.String getUsername();",
"java.lang.String getUsername();",
"java.lang.String getUsername();",
"java.lang.String getUsername();",
"java.lang.String getUsername();",
"java.lang.String getUsername();",
"java.lang.String getUsername();",
"java.lang.String getUsername();",
"public String getFirstName() {\n\t\treturn myFirstName;\n\t}",
"public String getFirstName(final SessionContext ctx)\n\t{\n\t\treturn (String)getProperty( ctx, FIRSTNAME);\n\t}",
"public String getFirstName(final SessionContext ctx)\n\t{\n\t\treturn (String)getProperty( ctx, FIRSTNAME);\n\t}",
"public String getFirstName(){\n\t\treturn this.firstName;\n\t}",
"public String getNameFirst() {\n\t\t\treturn nameFirst;\n\t\t}",
"@AutoEscape\n\tpublic String getFirstName();",
"@Override\n\tpublic java.lang.String getFirstName() {\n\t\treturn _candidate.getFirstName();\n\t}",
"public String getUserRealname() {\n return userRealname;\n }",
"public String getFirstName(){\n\t\treturn this.firstName;\r\n\t}",
"public static String getUserName(long requestorId)\n\t {\n\t String fullName = StringPool.BLANK;\n\t try\n\t {\n\t User user = UserLocalServiceUtil.getUserById(requestorId);\n\t fullName = user.getFirstName() + StringPool.SPACE + user.getLastName();\n\t } catch (PortalException e)\n\t {\n\t LOGGER.error(\"Failed to find user details...\" + e.getMessage());\n\t } catch (SystemException e)\n\t {\n\t LOGGER.error(\"User not exist....\" + e.getMessage());\n\t }\n\t return fullName;\n\t }",
"public String getFirstName() {\n\t\treturn this.firstName;\n\t}",
"@java.lang.Override\n public java.lang.String getFirstName() {\n java.lang.Object ref = firstName_;\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 firstName_ = s;\n return s;\n }\n }",
"public String getFirstName()\r\n {\r\n return firstName;\r\n }",
"public String getUser_name() {\n return user_name;\n }",
"public String getFirstName() {\n return fName;\n }",
"@java.lang.Override\n public java.lang.String getFirstName() {\n java.lang.Object ref = firstName_;\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 firstName_ = s;\n return s;\n }\n }",
"@java.lang.Override\n public java.lang.String getFirstName() {\n java.lang.Object ref = firstName_;\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 firstName_ = s;\n return s;\n }\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }"
]
| [
"0.78938997",
"0.769339",
"0.7590854",
"0.7590854",
"0.75391686",
"0.7456368",
"0.730161",
"0.72260636",
"0.72260636",
"0.72260636",
"0.72125626",
"0.7200455",
"0.7179324",
"0.7172308",
"0.7171259",
"0.71541095",
"0.7140512",
"0.71018577",
"0.7069635",
"0.7053675",
"0.7046186",
"0.70429605",
"0.70349383",
"0.7005087",
"0.70001316",
"0.69966704",
"0.6981391",
"0.6975443",
"0.6975443",
"0.6962879",
"0.6958821",
"0.6958746",
"0.6958746",
"0.69572747",
"0.6951413",
"0.69508225",
"0.6943025",
"0.69395125",
"0.69395125",
"0.69335866",
"0.69335866",
"0.69318575",
"0.6926767",
"0.6925158",
"0.69231135",
"0.6917201",
"0.6917201",
"0.6917201",
"0.6917201",
"0.6917201",
"0.6917201",
"0.6917201",
"0.6917201",
"0.6917201",
"0.6917201",
"0.6917201",
"0.6917201",
"0.6917201",
"0.691169",
"0.68953365",
"0.6894348",
"0.6890624",
"0.6890624",
"0.6890624",
"0.68847543",
"0.6879318",
"0.6879318",
"0.6879318",
"0.6876973",
"0.6876973",
"0.6876973",
"0.6876973",
"0.6876973",
"0.6876973",
"0.6876973",
"0.6876973",
"0.6876973",
"0.68747556",
"0.6858447",
"0.6858447",
"0.6856585",
"0.68550134",
"0.68542284",
"0.68456304",
"0.68426996",
"0.68347293",
"0.68291986",
"0.68258524",
"0.6821525",
"0.6820411",
"0.68189013",
"0.67999995",
"0.6794554",
"0.6794554",
"0.679155",
"0.679155",
"0.6789377",
"0.6789377",
"0.6789377",
"0.6789377",
"0.6789377"
]
| 0.0 | -1 |
The last name, or surname, of the user. | public void setLastName(String lastName) {
this.lastName = lastName;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public java.lang.String getUserLastName() {\r\n return userLastName;\r\n }",
"public String getGoogleUserLastName() {\n return (String) attributes.get(GOOGLE_USER_LAST_NAME);\n }",
"public String getLastName() {\n return userItem.getLastName();\n }",
"public String getLastName();",
"public String getLast_name() {\r\n return last_name;\r\n }",
"public java.lang.CharSequence getLastName() {\n return last_name;\n }",
"public java.lang.String getLastName();",
"public String getLast_name() {\n return last_name;\n }",
"public java.lang.String getLast_name() {\n return last_name;\n }",
"public java.lang.String getLast_name() {\n return last_name;\n }",
"java.lang.String getLastName();",
"java.lang.String getLastName();",
"public String getLastName() {\n return lastNameField.getText();\n }",
"public java.lang.CharSequence getLastName() {\n return last_name;\n }",
"String getLastName();",
"String getLastName();",
"public String getLastName() { return lastName; }",
"public String getLastname() {\n return (String) get(\"lastname\");\n }",
"@AutoEscape\n\tpublic String getLast_name();",
"public String getLastname() {\n return lastname;\n }",
"public String getLastName()\r\n {\r\n return lastName;\r\n }",
"public String getLastname() {\r\n\t\treturn lastname;\r\n\t}",
"@AutoEscape\n\tpublic String getLastname();",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName()\r\n {\r\n return lastName;\r\n }",
"public String getLastName()\r\n {\r\n return lastName;\r\n }",
"public String getLastName()\r\n {\r\n return lastName;\r\n }",
"public String getLastName()\r\n\t{\r\n\t\treturn lastName;\r\n\t}",
"public java.lang.CharSequence getLastName() {\n return lastName;\n }",
"public String returnLastName() {\n\t\treturn this.registration_lastname.getAttribute(\"value\");\r\n\t}",
"public String getLastName(){\r\n\t\treturn lastName;\r\n\t}",
"Optional<String> getLastname();",
"public String getLastName() {\r\n return lastName;\r\n }",
"public String getLastname() {\n\t\treturn lastname;\n\t}",
"public final String getLastName() {\r\n\t\treturn lastName;\r\n\t}",
"public String getLastName()\n {\n return this.lastName;\n }",
"public java.lang.CharSequence getLastName() {\n return lastName;\n }",
"public String getLastName()\n {\n return lastName;\n }",
"public String getLastName(){\r\n return lastname;\r\n }",
"public String getLastName() {\n return _lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName()\n\t{\n\t\treturn lastName;\n\t}",
"@AutoEscape\n\tpublic String getLastName();",
"java.lang.String getSurname();",
"public String getLastName() {\n return _lastName;\n }",
"public final String getLastName() {\n\t\treturn lastName;\n\t}",
"public String getLastName() {\r\n\t\treturn lastName;\t\t\r\n\t}",
"public String getLastName()\n {\n return lastName;\n }",
"public String getLastName() {\r\n\t\treturn lastName;\r\n\t}",
"public String getLastName() {\r\n\t\treturn lastName;\r\n\t}",
"public String getLastName() {\r\n return insertMode ? \"\" : stringValue(CONTACTS_LAST_NAME);\r\n }",
"public String getLastName(){\n\t\treturn lastName;\n\t}",
"public String getLastName()\r\n\t{\r\n\t\treturn lastName.getModelObjectAsString();\r\n\t}",
"public String getLastName() {\n return this.lastName;\n }",
"public String getLastName(){\n return(this.lastName);\n }",
"public java.lang.String getLastName() {\r\n return lastName;\r\n }",
"public String getLastName() {\n\t\treturn lastName;\r\n\t}",
"public java.lang.String getLastName() {\n return lastName;\n }",
"public String getLastName(){\n\t\treturn this.lastName;\n\t}",
"public String getLastName()\n\t{\n\t\t//local constants\n\n\t\t//local variables\n\n\t\t/*******************************************************************************/\n\n\t\t//Return the last name.\n\t\treturn lastName;\n\n\t}",
"public String getLastName() {\n\t\treturn lastName;\n\t}",
"public String getLastName() {\n\t\treturn lastName;\n\t}",
"public String getLastName() {\n\t\treturn lastName;\n\t}",
"public String getLastName() {\n\t\treturn lastName;\n\t}",
"public String getLastName() {\n\t\treturn lastName;\n\t}",
"public String getLastName() {\n\t\treturn lastName;\n\t}",
"public String getLastName() {\n\t\treturn lastName;\n\t}",
"public String getLastName() {\n\t\treturn lastName;\n\t}",
"@ApiModelProperty(required = true, value = \"User's last name. Effect: Controls the value of the corresponding CfgPerson attribute \")\n public String getLastName() {\n return lastName;\n }",
"public synchronized String getLastName()\r\n {\r\n return lastName;\r\n }",
"public String getLastName() {\n\t\tthis.setLastName(this.lastName);\n\t\treturn this.lastName;\n\t}",
"public String getLastName() {\n\t\treturn this.lastName;\n\t}",
"public String getLastname() throws Exception\r\n\t{\r\n\t\tString SQL_USER = \"SELECT lastname FROM user WHERE id=?;\";\t\t\r\n\t\tString returnValue=\"\";\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\tPreparedStatement statement = this.getConn().prepareStatement(SQL_USER);\r\n\t\t\tstatement.setInt(1, userId);\r\n\t\t\tResultSet result = statement.executeQuery();\r\n\r\n\t\t\t// If this returns true, then the user already exists.\r\n\t\t\tif (!result.next())\r\n\t\t\t{\r\n\t\t\t\tthrow new Exception(\"No student found! (getLastname)\");\r\n\t\t\t}\r\n\r\n\t\t\t// Return the successfully user.\r\n\t\t\treturnValue = result.getString(\"lastname\");\r\n\t\t} catch (Exception e)\r\n\t\t{\r\n\t\t\tGWT.log(\"Error in getLastname()\", e);\r\n\t\t\tthis.getConn().rollback();\r\n\t\t\tthrow e;\r\n\t\t}\r\n\t\treturn returnValue;\r\n\t}",
"public String getSurname()\n\t{\n\t\treturn surname;\n\t}",
"public String getLastName() {\n \treturn lName;\n }",
"public String getSurname()\n\t{\n\t\treturn getSurname( getSession().getSessionContext() );\n\t}",
"public String getLastName() {\n return (String)getAttributeInternal(LASTNAME);\n }",
"public void setLastName(java.lang.CharSequence value) {\n this.last_name = value;\n }",
"String getSurname();",
"@Override\n\tpublic String getGivenName() {\n\t\treturn user.getUserInfo().getGivenName();\n\t}",
"public String getAuthorLastName() {\r\n return author.getLastName();\r\n }"
]
| [
"0.82011056",
"0.8015198",
"0.79349333",
"0.7922742",
"0.77650154",
"0.7753967",
"0.7735399",
"0.7724454",
"0.77183294",
"0.77183294",
"0.77025443",
"0.77025443",
"0.7651238",
"0.76447886",
"0.76418155",
"0.76418155",
"0.7640441",
"0.76072305",
"0.7599219",
"0.7595992",
"0.7518466",
"0.75111985",
"0.75066537",
"0.7498044",
"0.7498044",
"0.7483666",
"0.7483666",
"0.7483666",
"0.74817425",
"0.7474026",
"0.74635303",
"0.743391",
"0.74236983",
"0.7419483",
"0.74172384",
"0.7408632",
"0.739828",
"0.73844546",
"0.73769015",
"0.73705053",
"0.7366702",
"0.736122",
"0.736122",
"0.736122",
"0.736122",
"0.736122",
"0.736122",
"0.736122",
"0.736122",
"0.736122",
"0.736122",
"0.736122",
"0.736122",
"0.736122",
"0.736122",
"0.736122",
"0.736122",
"0.736122",
"0.736122",
"0.736122",
"0.736122",
"0.7356293",
"0.7346927",
"0.7343769",
"0.7327166",
"0.7326546",
"0.7324429",
"0.7322764",
"0.7321177",
"0.7321177",
"0.7312674",
"0.7303833",
"0.73013765",
"0.73006904",
"0.72952056",
"0.7285019",
"0.7279346",
"0.72602075",
"0.7259983",
"0.7227251",
"0.7226286",
"0.7226286",
"0.7226286",
"0.7226286",
"0.7226286",
"0.7226286",
"0.7226286",
"0.7226286",
"0.7217245",
"0.7197386",
"0.7182173",
"0.7181862",
"0.71587825",
"0.715619",
"0.71035653",
"0.70568335",
"0.704465",
"0.6993658",
"0.6990017",
"0.69856757",
"0.69849217"
]
| 0.0 | -1 |
The last name, or surname, of the user. | public String getLastName() {
return this.lastName;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public java.lang.String getUserLastName() {\r\n return userLastName;\r\n }",
"public String getGoogleUserLastName() {\n return (String) attributes.get(GOOGLE_USER_LAST_NAME);\n }",
"public String getLastName() {\n return userItem.getLastName();\n }",
"public String getLastName();",
"public String getLast_name() {\r\n return last_name;\r\n }",
"public java.lang.CharSequence getLastName() {\n return last_name;\n }",
"public java.lang.String getLastName();",
"public String getLast_name() {\n return last_name;\n }",
"public java.lang.String getLast_name() {\n return last_name;\n }",
"public java.lang.String getLast_name() {\n return last_name;\n }",
"java.lang.String getLastName();",
"java.lang.String getLastName();",
"public String getLastName() {\n return lastNameField.getText();\n }",
"public java.lang.CharSequence getLastName() {\n return last_name;\n }",
"String getLastName();",
"String getLastName();",
"public String getLastName() { return lastName; }",
"public String getLastname() {\n return (String) get(\"lastname\");\n }",
"@AutoEscape\n\tpublic String getLast_name();",
"public String getLastname() {\n return lastname;\n }",
"public String getLastName()\r\n {\r\n return lastName;\r\n }",
"public String getLastname() {\r\n\t\treturn lastname;\r\n\t}",
"@AutoEscape\n\tpublic String getLastname();",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName()\r\n {\r\n return lastName;\r\n }",
"public String getLastName()\r\n {\r\n return lastName;\r\n }",
"public String getLastName()\r\n {\r\n return lastName;\r\n }",
"public String getLastName()\r\n\t{\r\n\t\treturn lastName;\r\n\t}",
"public java.lang.CharSequence getLastName() {\n return lastName;\n }",
"public String returnLastName() {\n\t\treturn this.registration_lastname.getAttribute(\"value\");\r\n\t}",
"public String getLastName(){\r\n\t\treturn lastName;\r\n\t}",
"Optional<String> getLastname();",
"public String getLastName() {\r\n return lastName;\r\n }",
"public String getLastname() {\n\t\treturn lastname;\n\t}",
"public final String getLastName() {\r\n\t\treturn lastName;\r\n\t}",
"public String getLastName()\n {\n return this.lastName;\n }",
"public java.lang.CharSequence getLastName() {\n return lastName;\n }",
"public String getLastName()\n {\n return lastName;\n }",
"public String getLastName(){\r\n return lastname;\r\n }",
"public String getLastName() {\n return _lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName()\n\t{\n\t\treturn lastName;\n\t}",
"@AutoEscape\n\tpublic String getLastName();",
"java.lang.String getSurname();",
"public String getLastName() {\n return _lastName;\n }",
"public final String getLastName() {\n\t\treturn lastName;\n\t}",
"public String getLastName() {\r\n\t\treturn lastName;\t\t\r\n\t}",
"public String getLastName()\n {\n return lastName;\n }",
"public String getLastName() {\r\n\t\treturn lastName;\r\n\t}",
"public String getLastName() {\r\n\t\treturn lastName;\r\n\t}",
"public String getLastName() {\r\n return insertMode ? \"\" : stringValue(CONTACTS_LAST_NAME);\r\n }",
"public String getLastName(){\n\t\treturn lastName;\n\t}",
"public String getLastName()\r\n\t{\r\n\t\treturn lastName.getModelObjectAsString();\r\n\t}",
"public String getLastName(){\n return(this.lastName);\n }",
"public java.lang.String getLastName() {\r\n return lastName;\r\n }",
"public String getLastName() {\n\t\treturn lastName;\r\n\t}",
"public java.lang.String getLastName() {\n return lastName;\n }",
"public String getLastName(){\n\t\treturn this.lastName;\n\t}",
"public String getLastName()\n\t{\n\t\t//local constants\n\n\t\t//local variables\n\n\t\t/*******************************************************************************/\n\n\t\t//Return the last name.\n\t\treturn lastName;\n\n\t}",
"public String getLastName() {\n\t\treturn lastName;\n\t}",
"public String getLastName() {\n\t\treturn lastName;\n\t}",
"public String getLastName() {\n\t\treturn lastName;\n\t}",
"public String getLastName() {\n\t\treturn lastName;\n\t}",
"public String getLastName() {\n\t\treturn lastName;\n\t}",
"public String getLastName() {\n\t\treturn lastName;\n\t}",
"public String getLastName() {\n\t\treturn lastName;\n\t}",
"public String getLastName() {\n\t\treturn lastName;\n\t}",
"@ApiModelProperty(required = true, value = \"User's last name. Effect: Controls the value of the corresponding CfgPerson attribute \")\n public String getLastName() {\n return lastName;\n }",
"public synchronized String getLastName()\r\n {\r\n return lastName;\r\n }",
"public String getLastName() {\n\t\tthis.setLastName(this.lastName);\n\t\treturn this.lastName;\n\t}",
"public String getLastName() {\n\t\treturn this.lastName;\n\t}",
"public String getLastname() throws Exception\r\n\t{\r\n\t\tString SQL_USER = \"SELECT lastname FROM user WHERE id=?;\";\t\t\r\n\t\tString returnValue=\"\";\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\tPreparedStatement statement = this.getConn().prepareStatement(SQL_USER);\r\n\t\t\tstatement.setInt(1, userId);\r\n\t\t\tResultSet result = statement.executeQuery();\r\n\r\n\t\t\t// If this returns true, then the user already exists.\r\n\t\t\tif (!result.next())\r\n\t\t\t{\r\n\t\t\t\tthrow new Exception(\"No student found! (getLastname)\");\r\n\t\t\t}\r\n\r\n\t\t\t// Return the successfully user.\r\n\t\t\treturnValue = result.getString(\"lastname\");\r\n\t\t} catch (Exception e)\r\n\t\t{\r\n\t\t\tGWT.log(\"Error in getLastname()\", e);\r\n\t\t\tthis.getConn().rollback();\r\n\t\t\tthrow e;\r\n\t\t}\r\n\t\treturn returnValue;\r\n\t}",
"public String getSurname()\n\t{\n\t\treturn surname;\n\t}",
"public String getLastName() {\n \treturn lName;\n }",
"public String getSurname()\n\t{\n\t\treturn getSurname( getSession().getSessionContext() );\n\t}",
"public String getLastName() {\n return (String)getAttributeInternal(LASTNAME);\n }",
"public void setLastName(java.lang.CharSequence value) {\n this.last_name = value;\n }",
"String getSurname();",
"public String getAuthorLastName() {\r\n return author.getLastName();\r\n }",
"@Override\n\tpublic String getGivenName() {\n\t\treturn user.getUserInfo().getGivenName();\n\t}"
]
| [
"0.820121",
"0.80144334",
"0.79347646",
"0.79225034",
"0.776477",
"0.77536243",
"0.77351856",
"0.7724194",
"0.7717987",
"0.7717987",
"0.7702291",
"0.7702291",
"0.7650447",
"0.7644451",
"0.7641434",
"0.7641434",
"0.76406264",
"0.7607075",
"0.7598854",
"0.75956196",
"0.7518398",
"0.7510755",
"0.7506064",
"0.7498008",
"0.7498008",
"0.74835926",
"0.74835926",
"0.74835926",
"0.74815756",
"0.747384",
"0.7462795",
"0.7433914",
"0.7423833",
"0.74193907",
"0.7416791",
"0.74083865",
"0.73981726",
"0.73842674",
"0.73769027",
"0.73704696",
"0.7366476",
"0.7361143",
"0.7361143",
"0.7361143",
"0.7361143",
"0.7361143",
"0.7361143",
"0.7361143",
"0.7361143",
"0.7361143",
"0.7361143",
"0.7361143",
"0.7361143",
"0.7361143",
"0.7361143",
"0.7361143",
"0.7361143",
"0.7361143",
"0.7361143",
"0.7361143",
"0.7361143",
"0.7356116",
"0.73464143",
"0.7344185",
"0.7326916",
"0.73263276",
"0.7324297",
"0.73227745",
"0.7321093",
"0.7321093",
"0.73122704",
"0.7303886",
"0.73012984",
"0.72951096",
"0.72848415",
"0.72792506",
"0.726005",
"0.72598374",
"0.7226848",
"0.7226224",
"0.7226224",
"0.7226224",
"0.7226224",
"0.7226224",
"0.7226224",
"0.7226224",
"0.7226224",
"0.72170454",
"0.7197229",
"0.71820474",
"0.7181636",
"0.7158061",
"0.7156363",
"0.71030116",
"0.70565176",
"0.7044177",
"0.69942063",
"0.69902486",
"0.69849235",
"0.69848937"
]
| 0.73004925 | 73 |
The last name, or surname, of the user. | public User withLastName(String lastName) {
setLastName(lastName);
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public java.lang.String getUserLastName() {\r\n return userLastName;\r\n }",
"public String getGoogleUserLastName() {\n return (String) attributes.get(GOOGLE_USER_LAST_NAME);\n }",
"public String getLastName() {\n return userItem.getLastName();\n }",
"public String getLastName();",
"public String getLast_name() {\r\n return last_name;\r\n }",
"public java.lang.CharSequence getLastName() {\n return last_name;\n }",
"public java.lang.String getLastName();",
"public String getLast_name() {\n return last_name;\n }",
"public java.lang.String getLast_name() {\n return last_name;\n }",
"public java.lang.String getLast_name() {\n return last_name;\n }",
"java.lang.String getLastName();",
"java.lang.String getLastName();",
"public String getLastName() {\n return lastNameField.getText();\n }",
"public java.lang.CharSequence getLastName() {\n return last_name;\n }",
"String getLastName();",
"String getLastName();",
"public String getLastName() { return lastName; }",
"public String getLastname() {\n return (String) get(\"lastname\");\n }",
"@AutoEscape\n\tpublic String getLast_name();",
"public String getLastname() {\n return lastname;\n }",
"public String getLastName()\r\n {\r\n return lastName;\r\n }",
"public String getLastname() {\r\n\t\treturn lastname;\r\n\t}",
"@AutoEscape\n\tpublic String getLastname();",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName()\r\n {\r\n return lastName;\r\n }",
"public String getLastName()\r\n {\r\n return lastName;\r\n }",
"public String getLastName()\r\n {\r\n return lastName;\r\n }",
"public String getLastName()\r\n\t{\r\n\t\treturn lastName;\r\n\t}",
"public java.lang.CharSequence getLastName() {\n return lastName;\n }",
"public String returnLastName() {\n\t\treturn this.registration_lastname.getAttribute(\"value\");\r\n\t}",
"public String getLastName(){\r\n\t\treturn lastName;\r\n\t}",
"Optional<String> getLastname();",
"public String getLastName() {\r\n return lastName;\r\n }",
"public String getLastname() {\n\t\treturn lastname;\n\t}",
"public final String getLastName() {\r\n\t\treturn lastName;\r\n\t}",
"public String getLastName()\n {\n return this.lastName;\n }",
"public java.lang.CharSequence getLastName() {\n return lastName;\n }",
"public String getLastName()\n {\n return lastName;\n }",
"public String getLastName(){\r\n return lastname;\r\n }",
"public String getLastName() {\n return _lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName()\n\t{\n\t\treturn lastName;\n\t}",
"@AutoEscape\n\tpublic String getLastName();",
"java.lang.String getSurname();",
"public String getLastName() {\n return _lastName;\n }",
"public final String getLastName() {\n\t\treturn lastName;\n\t}",
"public String getLastName() {\r\n\t\treturn lastName;\t\t\r\n\t}",
"public String getLastName()\n {\n return lastName;\n }",
"public String getLastName() {\r\n\t\treturn lastName;\r\n\t}",
"public String getLastName() {\r\n\t\treturn lastName;\r\n\t}",
"public String getLastName() {\r\n return insertMode ? \"\" : stringValue(CONTACTS_LAST_NAME);\r\n }",
"public String getLastName(){\n\t\treturn lastName;\n\t}",
"public String getLastName()\r\n\t{\r\n\t\treturn lastName.getModelObjectAsString();\r\n\t}",
"public String getLastName() {\n return this.lastName;\n }",
"public String getLastName(){\n return(this.lastName);\n }",
"public java.lang.String getLastName() {\r\n return lastName;\r\n }",
"public String getLastName() {\n\t\treturn lastName;\r\n\t}",
"public java.lang.String getLastName() {\n return lastName;\n }",
"public String getLastName(){\n\t\treturn this.lastName;\n\t}",
"public String getLastName()\n\t{\n\t\t//local constants\n\n\t\t//local variables\n\n\t\t/*******************************************************************************/\n\n\t\t//Return the last name.\n\t\treturn lastName;\n\n\t}",
"public String getLastName() {\n\t\treturn lastName;\n\t}",
"public String getLastName() {\n\t\treturn lastName;\n\t}",
"public String getLastName() {\n\t\treturn lastName;\n\t}",
"public String getLastName() {\n\t\treturn lastName;\n\t}",
"public String getLastName() {\n\t\treturn lastName;\n\t}",
"public String getLastName() {\n\t\treturn lastName;\n\t}",
"public String getLastName() {\n\t\treturn lastName;\n\t}",
"public String getLastName() {\n\t\treturn lastName;\n\t}",
"@ApiModelProperty(required = true, value = \"User's last name. Effect: Controls the value of the corresponding CfgPerson attribute \")\n public String getLastName() {\n return lastName;\n }",
"public synchronized String getLastName()\r\n {\r\n return lastName;\r\n }",
"public String getLastName() {\n\t\tthis.setLastName(this.lastName);\n\t\treturn this.lastName;\n\t}",
"public String getLastName() {\n\t\treturn this.lastName;\n\t}",
"public String getLastname() throws Exception\r\n\t{\r\n\t\tString SQL_USER = \"SELECT lastname FROM user WHERE id=?;\";\t\t\r\n\t\tString returnValue=\"\";\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\tPreparedStatement statement = this.getConn().prepareStatement(SQL_USER);\r\n\t\t\tstatement.setInt(1, userId);\r\n\t\t\tResultSet result = statement.executeQuery();\r\n\r\n\t\t\t// If this returns true, then the user already exists.\r\n\t\t\tif (!result.next())\r\n\t\t\t{\r\n\t\t\t\tthrow new Exception(\"No student found! (getLastname)\");\r\n\t\t\t}\r\n\r\n\t\t\t// Return the successfully user.\r\n\t\t\treturnValue = result.getString(\"lastname\");\r\n\t\t} catch (Exception e)\r\n\t\t{\r\n\t\t\tGWT.log(\"Error in getLastname()\", e);\r\n\t\t\tthis.getConn().rollback();\r\n\t\t\tthrow e;\r\n\t\t}\r\n\t\treturn returnValue;\r\n\t}",
"public String getSurname()\n\t{\n\t\treturn surname;\n\t}",
"public String getLastName() {\n \treturn lName;\n }",
"public String getSurname()\n\t{\n\t\treturn getSurname( getSession().getSessionContext() );\n\t}",
"public String getLastName() {\n return (String)getAttributeInternal(LASTNAME);\n }",
"public void setLastName(java.lang.CharSequence value) {\n this.last_name = value;\n }",
"String getSurname();",
"@Override\n\tpublic String getGivenName() {\n\t\treturn user.getUserInfo().getGivenName();\n\t}",
"public String getAuthorLastName() {\r\n return author.getLastName();\r\n }"
]
| [
"0.82011056",
"0.8015198",
"0.79349333",
"0.7922742",
"0.77650154",
"0.7753967",
"0.7735399",
"0.7724454",
"0.77183294",
"0.77183294",
"0.77025443",
"0.77025443",
"0.7651238",
"0.76447886",
"0.76418155",
"0.76418155",
"0.7640441",
"0.76072305",
"0.7599219",
"0.7595992",
"0.7518466",
"0.75111985",
"0.75066537",
"0.7498044",
"0.7498044",
"0.7483666",
"0.7483666",
"0.7483666",
"0.74817425",
"0.7474026",
"0.74635303",
"0.743391",
"0.74236983",
"0.7419483",
"0.74172384",
"0.7408632",
"0.739828",
"0.73844546",
"0.73769015",
"0.73705053",
"0.7366702",
"0.736122",
"0.736122",
"0.736122",
"0.736122",
"0.736122",
"0.736122",
"0.736122",
"0.736122",
"0.736122",
"0.736122",
"0.736122",
"0.736122",
"0.736122",
"0.736122",
"0.736122",
"0.736122",
"0.736122",
"0.736122",
"0.736122",
"0.736122",
"0.7356293",
"0.7346927",
"0.7343769",
"0.7327166",
"0.7326546",
"0.7324429",
"0.7322764",
"0.7321177",
"0.7321177",
"0.7312674",
"0.7303833",
"0.73013765",
"0.73006904",
"0.72952056",
"0.7285019",
"0.7279346",
"0.72602075",
"0.7259983",
"0.7227251",
"0.7226286",
"0.7226286",
"0.7226286",
"0.7226286",
"0.7226286",
"0.7226286",
"0.7226286",
"0.7226286",
"0.7217245",
"0.7197386",
"0.7182173",
"0.7181862",
"0.71587825",
"0.715619",
"0.71035653",
"0.70568335",
"0.704465",
"0.6993658",
"0.6990017",
"0.69856757",
"0.69849217"
]
| 0.0 | -1 |
The date and time the user was created in the user pool. | public void setCreatedTime(java.util.Date createdTime) {
this.createdTime = createdTime;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Long getUserCreated();",
"public long timeOfCreation() {\n\t\treturn timeOfCreation ;\n\t}",
"public Date getUserCreateTime() {\r\n return userCreateTime;\r\n }",
"public Long getTimeCreated() {\r\n\t\treturn timeCreated;\r\n\t}",
"public int getCreatedTime() {\n return instance.getCreatedTime();\n }",
"public int getCreatedTime() {\n return createdTime_;\n }",
"String timeCreated();",
"public int getUserTime() {\n\t\treturn this.userTime;\n\t}",
"public DateTime getCreatedTimestamp() {\n\t\treturn getDateTime(\"sys_created_on\");\n\t}",
"public Date getTimeCreate() {\n return timeCreate;\n }",
"public java.lang.String getUserCreated() {\n\t\treturn _tempNoTiceShipMessage.getUserCreated();\n\t}",
"public long getCreatedByUser();",
"public long getCurrentUserTime() {\n return getUserTime() - startUserTimeNano;\n }",
"public Date getCreationTime() {\n\n\t\treturn createdAtTime;\n\t}",
"public long getCreatedTime() {\n return createdTime;\n }",
"public String getCreatedUser() {\r\n return this.createdUser;\r\n }",
"public int getCreateTime() {\n return createTime_;\n }",
"public long getCreationDate() {\n return creationDate_;\n }",
"public Long getCreationTimestamp() {\n return creationTimestamp;\n }",
"long getCreatedTime();",
"public long getCreationTime() {\n return creationTime_;\n }",
"public long getCreationDate() {\n return creationDate_;\n }",
"public Date getCreatedTime() {\n return createdTime;\n }",
"public Date getCreatedTime() {\n return createdTime;\n }",
"public Date getCreatedTime() {\n return createdTime;\n }",
"public Date getDateCreated() {\r\n\t\t\r\n\t\t\tDate date= new Date(System.currentTimeMillis());\r\n\t\treturn date;\r\n\t}",
"public Date getCreationDate() {\n return m_module.getConfiguration().getCreationDate();\n }",
"public long getCreationTime() {\n return creationTime_;\n }",
"public int getCreateTime() {\n return createTime_;\n }",
"public Long getUserCreate() {\n return userCreate;\n }",
"public Integer getCreatedUser() {\n\t\treturn createdUser;\n\t}",
"public long getCreateTime() {\n return createTime_;\n }",
"public Date getCreationTime() {\n\t\treturn creationTime;\n\t}",
"public Date getCreationTime()\n\t{\n\t\treturn creationTime;\n\t}",
"public DateTime creationTime() {\n return this.creationTime;\n }",
"public Long getCreatetime() {\n return createtime;\n }",
"public long getCreateTime() {\n return createTime_;\n }",
"public String getCreatedTime() {\n return createdTime;\n }",
"public long getCreationTime() {\n return creationTime;\n }",
"public Long getCreationDate()\r\n\t{\r\n\t\treturn creationDate;\r\n\t}",
"public Date getCreateTimestamp() {\n return createTimestamp;\n }",
"public Date getCreateTimestamp() {\r\n return createTimestamp;\r\n }",
"public Date getCreate_time() {\n return create_time;\n }",
"public Date getCreate_time() {\n return create_time;\n }",
"public Date getCreationTime() {\n return creationTime;\n }",
"public DateTime createdTime() {\n return this.createdTime;\n }",
"public Long getCreateduser() {\n return createduser;\n }",
"public String getCreatedTime() {\n return this.CreatedTime;\n }",
"public String getCreatedTime() {\n return this.CreatedTime;\n }",
"public Date getCreated() {\r\n\t\treturn created;\r\n\t}",
"public Date getCreated() {\r\n\t\treturn created;\r\n\t}",
"public LocalDateTime getCreationTime() {\n\t\treturn creationTime;\n\t}",
"@DISPID(110)\r\n\t// = 0x6e. The runtime will prefer the VTID if present\r\n\t@VTID(105)\r\n\tjava.util.Date creationDateTime();",
"public Date getCreationTime() {\n return creationTime;\n }",
"public Date getCreationTime() {\n return creationTime;\n }",
"public long getCreateTime() {\n return this.createTime;\n }",
"Date getDateCreated();",
"Instant getCreated();",
"public Date getCreateTime() {\n\t\treturn this.createTime;\n\t}",
"public Instant getCreationTime() {\n return creation;\n }",
"public long getCreationTime() {\n return this.creationTime;\n }",
"public Date getCreationTime()\n {\n return created;\n }",
"public String getCreatetime() {\n\t\treturn createtime;\n\t}",
"public String getCreatetime() {\n\t\treturn createtime;\n\t}",
"public String getCurrentDate() {\n return createdDate;\n }",
"public Date getCreateTime() {\n\t\treturn createTime;\n\t}",
"public Date getCreateTime() {\n\t\treturn createTime;\n\t}",
"public Date getCreateTime() {\n\t\treturn createTime;\n\t}",
"public Date getCreateTime() {\n\t\treturn createTime;\n\t}",
"public Date getCreateTime() {\n\t\treturn createTime;\n\t}",
"public Date getCreateTime() {\r\n\t\treturn createTime;\r\n\t}",
"public Date getCreateTime() {\r\n\t\treturn createTime;\r\n\t}",
"public Long getCreateAt() {\n return createAt;\n }",
"public Date getCreateTime() {\n return this.createTime;\n }",
"public Date getCreateTime() {\n return this.createTime;\n }",
"public Integer getCreateTime() {\n return createTime;\n }",
"public Date getDateCreated() {\n\t\treturn dateCreated;\n\t}",
"@java.lang.Override\n public long getCreationDate() {\n return creationDate_;\n }",
"public Date getDateCreated() {\r\n\t\treturn dateCreated;\r\n\t}",
"public Integer getCreateTime() {\r\n return createTime;\r\n }",
"public java.lang.Long getCreated() {\n return created;\n }",
"public ZonedDateTime getDateCreation() {\n\t\treturn this.dateCreation;\n\t}",
"public java.lang.String getCreatetime () {\n\t\treturn createtime;\n\t}",
"public Long getCreateTime() {\n\t\treturn createTime;\n\t}",
"public Date getCreateTime() {\n return createTime;\n }",
"public Timestamp getCreatedByTimestamp() {\n\t\treturn new Timestamp(this.createdByTimestamp.getTime());\n\t}",
"public java.util.Date getCreationTimestamp() {\n return this.creationTimestamp;\n }",
"public Date getDateCreated(){\n\t\treturn dateCreated;\n\t}",
"public Date getCreatTime() {\n return creatTime;\n }",
"public Date getCreatTime() {\n return creatTime;\n }",
"public Timestamp getCreated() {\n return created;\n }",
"public java.lang.Long getCreated() {\n return created;\n }",
"public DateTime getCreationTime() {\n return created;\n }",
"public Date getCreatetime() {\n return createtime;\n }",
"public Date getCreatetime() {\n return createtime;\n }",
"public Date getCreatetime() {\n return createtime;\n }",
"public Date getCreatetime() {\n return createtime;\n }",
"public Date getCreatetime() {\n return createtime;\n }",
"public Date getCreatetime() {\n return createtime;\n }",
"public Date getCreatetime() {\n return createtime;\n }",
"public Date getCreatetime() {\n return createtime;\n }"
]
| [
"0.79503983",
"0.75306726",
"0.7490089",
"0.7320149",
"0.721744",
"0.7195444",
"0.7096884",
"0.70529073",
"0.704335",
"0.70170194",
"0.7006995",
"0.69967514",
"0.6983678",
"0.6977244",
"0.694431",
"0.6934629",
"0.69030404",
"0.690103",
"0.68989354",
"0.689614",
"0.6892953",
"0.68824095",
"0.686851",
"0.686851",
"0.686851",
"0.6862883",
"0.6861379",
"0.6860921",
"0.68585473",
"0.6845938",
"0.68431526",
"0.6841411",
"0.6836342",
"0.68283355",
"0.6826061",
"0.68124235",
"0.6801725",
"0.67941624",
"0.6791194",
"0.6780544",
"0.67767906",
"0.67649925",
"0.6763171",
"0.6763171",
"0.67548174",
"0.67545426",
"0.6750479",
"0.6742832",
"0.6742832",
"0.6722632",
"0.6722632",
"0.67213285",
"0.67205614",
"0.67158085",
"0.67158085",
"0.6713329",
"0.6713164",
"0.67075497",
"0.67026496",
"0.66912436",
"0.6680584",
"0.66798",
"0.6675759",
"0.6675759",
"0.6672308",
"0.66612124",
"0.66612124",
"0.66612124",
"0.66612124",
"0.66612124",
"0.6660357",
"0.6660357",
"0.66585374",
"0.6657974",
"0.6657974",
"0.6653317",
"0.6649849",
"0.66487825",
"0.66484964",
"0.6646417",
"0.66408694",
"0.66348624",
"0.6625384",
"0.6624895",
"0.66248214",
"0.6623118",
"0.6621156",
"0.66206497",
"0.6616944",
"0.6616944",
"0.66128165",
"0.6612623",
"0.66114014",
"0.66037107",
"0.66037107",
"0.66037107",
"0.66037107",
"0.66037107",
"0.66037107",
"0.66037107",
"0.66037107"
]
| 0.0 | -1 |
The date and time the user was created in the user pool. | public java.util.Date getCreatedTime() {
return this.createdTime;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Long getUserCreated();",
"public long timeOfCreation() {\n\t\treturn timeOfCreation ;\n\t}",
"public Date getUserCreateTime() {\r\n return userCreateTime;\r\n }",
"public Long getTimeCreated() {\r\n\t\treturn timeCreated;\r\n\t}",
"public int getCreatedTime() {\n return instance.getCreatedTime();\n }",
"public int getCreatedTime() {\n return createdTime_;\n }",
"String timeCreated();",
"public int getUserTime() {\n\t\treturn this.userTime;\n\t}",
"public DateTime getCreatedTimestamp() {\n\t\treturn getDateTime(\"sys_created_on\");\n\t}",
"public Date getTimeCreate() {\n return timeCreate;\n }",
"public java.lang.String getUserCreated() {\n\t\treturn _tempNoTiceShipMessage.getUserCreated();\n\t}",
"public long getCreatedByUser();",
"public long getCurrentUserTime() {\n return getUserTime() - startUserTimeNano;\n }",
"public Date getCreationTime() {\n\n\t\treturn createdAtTime;\n\t}",
"public long getCreatedTime() {\n return createdTime;\n }",
"public String getCreatedUser() {\r\n return this.createdUser;\r\n }",
"public int getCreateTime() {\n return createTime_;\n }",
"public long getCreationDate() {\n return creationDate_;\n }",
"public Long getCreationTimestamp() {\n return creationTimestamp;\n }",
"long getCreatedTime();",
"public long getCreationTime() {\n return creationTime_;\n }",
"public long getCreationDate() {\n return creationDate_;\n }",
"public Date getCreatedTime() {\n return createdTime;\n }",
"public Date getCreatedTime() {\n return createdTime;\n }",
"public Date getCreatedTime() {\n return createdTime;\n }",
"public Date getDateCreated() {\r\n\t\t\r\n\t\t\tDate date= new Date(System.currentTimeMillis());\r\n\t\treturn date;\r\n\t}",
"public Date getCreationDate() {\n return m_module.getConfiguration().getCreationDate();\n }",
"public long getCreationTime() {\n return creationTime_;\n }",
"public int getCreateTime() {\n return createTime_;\n }",
"public Long getUserCreate() {\n return userCreate;\n }",
"public Integer getCreatedUser() {\n\t\treturn createdUser;\n\t}",
"public long getCreateTime() {\n return createTime_;\n }",
"public Date getCreationTime() {\n\t\treturn creationTime;\n\t}",
"public Date getCreationTime()\n\t{\n\t\treturn creationTime;\n\t}",
"public DateTime creationTime() {\n return this.creationTime;\n }",
"public Long getCreatetime() {\n return createtime;\n }",
"public long getCreateTime() {\n return createTime_;\n }",
"public String getCreatedTime() {\n return createdTime;\n }",
"public long getCreationTime() {\n return creationTime;\n }",
"public Long getCreationDate()\r\n\t{\r\n\t\treturn creationDate;\r\n\t}",
"public Date getCreateTimestamp() {\n return createTimestamp;\n }",
"public Date getCreateTimestamp() {\r\n return createTimestamp;\r\n }",
"public Date getCreate_time() {\n return create_time;\n }",
"public Date getCreate_time() {\n return create_time;\n }",
"public Date getCreationTime() {\n return creationTime;\n }",
"public DateTime createdTime() {\n return this.createdTime;\n }",
"public Long getCreateduser() {\n return createduser;\n }",
"public String getCreatedTime() {\n return this.CreatedTime;\n }",
"public String getCreatedTime() {\n return this.CreatedTime;\n }",
"public Date getCreated() {\r\n\t\treturn created;\r\n\t}",
"public Date getCreated() {\r\n\t\treturn created;\r\n\t}",
"public LocalDateTime getCreationTime() {\n\t\treturn creationTime;\n\t}",
"@DISPID(110)\r\n\t// = 0x6e. The runtime will prefer the VTID if present\r\n\t@VTID(105)\r\n\tjava.util.Date creationDateTime();",
"public Date getCreationTime() {\n return creationTime;\n }",
"public Date getCreationTime() {\n return creationTime;\n }",
"public long getCreateTime() {\n return this.createTime;\n }",
"Date getDateCreated();",
"Instant getCreated();",
"public Date getCreateTime() {\n\t\treturn this.createTime;\n\t}",
"public Instant getCreationTime() {\n return creation;\n }",
"public long getCreationTime() {\n return this.creationTime;\n }",
"public Date getCreationTime()\n {\n return created;\n }",
"public String getCreatetime() {\n\t\treturn createtime;\n\t}",
"public String getCreatetime() {\n\t\treturn createtime;\n\t}",
"public String getCurrentDate() {\n return createdDate;\n }",
"public Date getCreateTime() {\n\t\treturn createTime;\n\t}",
"public Date getCreateTime() {\n\t\treturn createTime;\n\t}",
"public Date getCreateTime() {\n\t\treturn createTime;\n\t}",
"public Date getCreateTime() {\n\t\treturn createTime;\n\t}",
"public Date getCreateTime() {\n\t\treturn createTime;\n\t}",
"public Date getCreateTime() {\r\n\t\treturn createTime;\r\n\t}",
"public Date getCreateTime() {\r\n\t\treturn createTime;\r\n\t}",
"public Long getCreateAt() {\n return createAt;\n }",
"public Date getCreateTime() {\n return this.createTime;\n }",
"public Date getCreateTime() {\n return this.createTime;\n }",
"public Integer getCreateTime() {\n return createTime;\n }",
"public Date getDateCreated() {\n\t\treturn dateCreated;\n\t}",
"@java.lang.Override\n public long getCreationDate() {\n return creationDate_;\n }",
"public Date getDateCreated() {\r\n\t\treturn dateCreated;\r\n\t}",
"public Integer getCreateTime() {\r\n return createTime;\r\n }",
"public java.lang.Long getCreated() {\n return created;\n }",
"public ZonedDateTime getDateCreation() {\n\t\treturn this.dateCreation;\n\t}",
"public java.lang.String getCreatetime () {\n\t\treturn createtime;\n\t}",
"public Long getCreateTime() {\n\t\treturn createTime;\n\t}",
"public Date getCreateTime() {\n return createTime;\n }",
"public Timestamp getCreatedByTimestamp() {\n\t\treturn new Timestamp(this.createdByTimestamp.getTime());\n\t}",
"public java.util.Date getCreationTimestamp() {\n return this.creationTimestamp;\n }",
"public Date getDateCreated(){\n\t\treturn dateCreated;\n\t}",
"public Date getCreatTime() {\n return creatTime;\n }",
"public Date getCreatTime() {\n return creatTime;\n }",
"public Timestamp getCreated() {\n return created;\n }",
"public java.lang.Long getCreated() {\n return created;\n }",
"public DateTime getCreationTime() {\n return created;\n }",
"public Date getCreatetime() {\n return createtime;\n }",
"public Date getCreatetime() {\n return createtime;\n }",
"public Date getCreatetime() {\n return createtime;\n }",
"public Date getCreatetime() {\n return createtime;\n }",
"public Date getCreatetime() {\n return createtime;\n }",
"public Date getCreatetime() {\n return createtime;\n }",
"public Date getCreatetime() {\n return createtime;\n }",
"public Date getCreatetime() {\n return createtime;\n }"
]
| [
"0.79503983",
"0.75306726",
"0.7490089",
"0.7320149",
"0.721744",
"0.7195444",
"0.7096884",
"0.70529073",
"0.704335",
"0.70170194",
"0.7006995",
"0.69967514",
"0.6983678",
"0.6977244",
"0.694431",
"0.6934629",
"0.69030404",
"0.690103",
"0.68989354",
"0.689614",
"0.6892953",
"0.68824095",
"0.686851",
"0.686851",
"0.686851",
"0.6862883",
"0.6861379",
"0.6860921",
"0.68585473",
"0.6845938",
"0.68431526",
"0.6841411",
"0.6836342",
"0.68283355",
"0.6826061",
"0.68124235",
"0.6801725",
"0.67941624",
"0.6791194",
"0.6780544",
"0.67767906",
"0.67649925",
"0.6763171",
"0.6763171",
"0.67548174",
"0.67545426",
"0.6750479",
"0.6742832",
"0.6742832",
"0.6722632",
"0.6722632",
"0.67213285",
"0.67205614",
"0.67158085",
"0.67158085",
"0.6713329",
"0.6713164",
"0.67075497",
"0.67026496",
"0.66912436",
"0.6680584",
"0.66798",
"0.6675759",
"0.6675759",
"0.6672308",
"0.66612124",
"0.66612124",
"0.66612124",
"0.66612124",
"0.66612124",
"0.6660357",
"0.6660357",
"0.66585374",
"0.6657974",
"0.6657974",
"0.6653317",
"0.6649849",
"0.66487825",
"0.66484964",
"0.6646417",
"0.66408694",
"0.66348624",
"0.6625384",
"0.6624895",
"0.66248214",
"0.6623118",
"0.6621156",
"0.66206497",
"0.6616944",
"0.6616944",
"0.66128165",
"0.6612623",
"0.66114014",
"0.66037107",
"0.66037107",
"0.66037107",
"0.66037107",
"0.66037107",
"0.66037107",
"0.66037107",
"0.66037107"
]
| 0.0 | -1 |
The date and time the user was created in the user pool. | public User withCreatedTime(java.util.Date createdTime) {
setCreatedTime(createdTime);
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Long getUserCreated();",
"public long timeOfCreation() {\n\t\treturn timeOfCreation ;\n\t}",
"public Date getUserCreateTime() {\r\n return userCreateTime;\r\n }",
"public Long getTimeCreated() {\r\n\t\treturn timeCreated;\r\n\t}",
"public int getCreatedTime() {\n return instance.getCreatedTime();\n }",
"public int getCreatedTime() {\n return createdTime_;\n }",
"String timeCreated();",
"public int getUserTime() {\n\t\treturn this.userTime;\n\t}",
"public DateTime getCreatedTimestamp() {\n\t\treturn getDateTime(\"sys_created_on\");\n\t}",
"public Date getTimeCreate() {\n return timeCreate;\n }",
"public java.lang.String getUserCreated() {\n\t\treturn _tempNoTiceShipMessage.getUserCreated();\n\t}",
"public long getCreatedByUser();",
"public long getCurrentUserTime() {\n return getUserTime() - startUserTimeNano;\n }",
"public Date getCreationTime() {\n\n\t\treturn createdAtTime;\n\t}",
"public long getCreatedTime() {\n return createdTime;\n }",
"public String getCreatedUser() {\r\n return this.createdUser;\r\n }",
"public int getCreateTime() {\n return createTime_;\n }",
"public long getCreationDate() {\n return creationDate_;\n }",
"public Long getCreationTimestamp() {\n return creationTimestamp;\n }",
"long getCreatedTime();",
"public long getCreationTime() {\n return creationTime_;\n }",
"public long getCreationDate() {\n return creationDate_;\n }",
"public Date getCreatedTime() {\n return createdTime;\n }",
"public Date getCreatedTime() {\n return createdTime;\n }",
"public Date getCreatedTime() {\n return createdTime;\n }",
"public Date getDateCreated() {\r\n\t\t\r\n\t\t\tDate date= new Date(System.currentTimeMillis());\r\n\t\treturn date;\r\n\t}",
"public Date getCreationDate() {\n return m_module.getConfiguration().getCreationDate();\n }",
"public long getCreationTime() {\n return creationTime_;\n }",
"public int getCreateTime() {\n return createTime_;\n }",
"public Long getUserCreate() {\n return userCreate;\n }",
"public Integer getCreatedUser() {\n\t\treturn createdUser;\n\t}",
"public long getCreateTime() {\n return createTime_;\n }",
"public Date getCreationTime() {\n\t\treturn creationTime;\n\t}",
"public Date getCreationTime()\n\t{\n\t\treturn creationTime;\n\t}",
"public DateTime creationTime() {\n return this.creationTime;\n }",
"public Long getCreatetime() {\n return createtime;\n }",
"public long getCreateTime() {\n return createTime_;\n }",
"public String getCreatedTime() {\n return createdTime;\n }",
"public long getCreationTime() {\n return creationTime;\n }",
"public Long getCreationDate()\r\n\t{\r\n\t\treturn creationDate;\r\n\t}",
"public Date getCreateTimestamp() {\n return createTimestamp;\n }",
"public Date getCreateTimestamp() {\r\n return createTimestamp;\r\n }",
"public Date getCreate_time() {\n return create_time;\n }",
"public Date getCreate_time() {\n return create_time;\n }",
"public Date getCreationTime() {\n return creationTime;\n }",
"public DateTime createdTime() {\n return this.createdTime;\n }",
"public Long getCreateduser() {\n return createduser;\n }",
"public String getCreatedTime() {\n return this.CreatedTime;\n }",
"public String getCreatedTime() {\n return this.CreatedTime;\n }",
"public Date getCreated() {\r\n\t\treturn created;\r\n\t}",
"public Date getCreated() {\r\n\t\treturn created;\r\n\t}",
"public LocalDateTime getCreationTime() {\n\t\treturn creationTime;\n\t}",
"@DISPID(110)\r\n\t// = 0x6e. The runtime will prefer the VTID if present\r\n\t@VTID(105)\r\n\tjava.util.Date creationDateTime();",
"public Date getCreationTime() {\n return creationTime;\n }",
"public Date getCreationTime() {\n return creationTime;\n }",
"public long getCreateTime() {\n return this.createTime;\n }",
"Date getDateCreated();",
"Instant getCreated();",
"public Date getCreateTime() {\n\t\treturn this.createTime;\n\t}",
"public Instant getCreationTime() {\n return creation;\n }",
"public long getCreationTime() {\n return this.creationTime;\n }",
"public Date getCreationTime()\n {\n return created;\n }",
"public String getCreatetime() {\n\t\treturn createtime;\n\t}",
"public String getCreatetime() {\n\t\treturn createtime;\n\t}",
"public String getCurrentDate() {\n return createdDate;\n }",
"public Date getCreateTime() {\n\t\treturn createTime;\n\t}",
"public Date getCreateTime() {\n\t\treturn createTime;\n\t}",
"public Date getCreateTime() {\n\t\treturn createTime;\n\t}",
"public Date getCreateTime() {\n\t\treturn createTime;\n\t}",
"public Date getCreateTime() {\n\t\treturn createTime;\n\t}",
"public Date getCreateTime() {\r\n\t\treturn createTime;\r\n\t}",
"public Date getCreateTime() {\r\n\t\treturn createTime;\r\n\t}",
"public Long getCreateAt() {\n return createAt;\n }",
"public Date getCreateTime() {\n return this.createTime;\n }",
"public Date getCreateTime() {\n return this.createTime;\n }",
"public Integer getCreateTime() {\n return createTime;\n }",
"public Date getDateCreated() {\n\t\treturn dateCreated;\n\t}",
"@java.lang.Override\n public long getCreationDate() {\n return creationDate_;\n }",
"public Date getDateCreated() {\r\n\t\treturn dateCreated;\r\n\t}",
"public Integer getCreateTime() {\r\n return createTime;\r\n }",
"public java.lang.Long getCreated() {\n return created;\n }",
"public ZonedDateTime getDateCreation() {\n\t\treturn this.dateCreation;\n\t}",
"public java.lang.String getCreatetime () {\n\t\treturn createtime;\n\t}",
"public Date getCreateTime() {\n return createTime;\n }",
"public Long getCreateTime() {\n\t\treturn createTime;\n\t}",
"public Timestamp getCreatedByTimestamp() {\n\t\treturn new Timestamp(this.createdByTimestamp.getTime());\n\t}",
"public java.util.Date getCreationTimestamp() {\n return this.creationTimestamp;\n }",
"public Date getDateCreated(){\n\t\treturn dateCreated;\n\t}",
"public Date getCreatTime() {\n return creatTime;\n }",
"public Date getCreatTime() {\n return creatTime;\n }",
"public Timestamp getCreated() {\n return created;\n }",
"public java.lang.Long getCreated() {\n return created;\n }",
"public DateTime getCreationTime() {\n return created;\n }",
"public Date getCreatetime() {\n return createtime;\n }",
"public Date getCreatetime() {\n return createtime;\n }",
"public Date getCreatetime() {\n return createtime;\n }",
"public Date getCreatetime() {\n return createtime;\n }",
"public Date getCreatetime() {\n return createtime;\n }",
"public Date getCreatetime() {\n return createtime;\n }",
"public Date getCreatetime() {\n return createtime;\n }",
"public Date getCreatetime() {\n return createtime;\n }"
]
| [
"0.795112",
"0.75323135",
"0.7490857",
"0.7320884",
"0.7218224",
"0.7196591",
"0.70979536",
"0.70538163",
"0.70441693",
"0.7018008",
"0.7007567",
"0.69966596",
"0.69847816",
"0.6978364",
"0.69453806",
"0.6934896",
"0.6903908",
"0.69021505",
"0.69001275",
"0.6897184",
"0.6893963",
"0.6883593",
"0.6869653",
"0.6869653",
"0.6869653",
"0.68632585",
"0.68623513",
"0.68619055",
"0.6859369",
"0.6845801",
"0.6842993",
"0.6842525",
"0.6837384",
"0.6829365",
"0.6827463",
"0.6813304",
"0.68028164",
"0.6795378",
"0.6792125",
"0.6781461",
"0.677768",
"0.6765929",
"0.67642736",
"0.67642736",
"0.6756002",
"0.67557126",
"0.67504084",
"0.6744019",
"0.6744019",
"0.67234725",
"0.67234725",
"0.67226255",
"0.67216575",
"0.67170274",
"0.67170274",
"0.67142314",
"0.67138416",
"0.6709163",
"0.6703622",
"0.66925514",
"0.66814387",
"0.668084",
"0.66766906",
"0.66766906",
"0.6673486",
"0.6662198",
"0.6662198",
"0.6662198",
"0.6662198",
"0.6662198",
"0.6661406",
"0.6661406",
"0.6659355",
"0.66590106",
"0.66590106",
"0.66539323",
"0.665024",
"0.6650079",
"0.6648942",
"0.664705",
"0.6641444",
"0.6636191",
"0.6626263",
"0.66259265",
"0.66257924",
"0.6624288",
"0.6622198",
"0.66210294",
"0.6618293",
"0.6618293",
"0.66140294",
"0.66131794",
"0.6612613",
"0.6604578",
"0.6604578",
"0.6604578",
"0.6604578",
"0.6604578",
"0.6604578",
"0.6604578",
"0.6604578"
]
| 0.0 | -1 |
The authentication type for the user. | public void setAuthenticationType(String authenticationType) {
this.authenticationType = authenticationType;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getAuthenticationType() {\n return this.authenticationType;\n }",
"int getLoginType();",
"public String 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 int getLoginType() {\n return loginType_;\n }",
"public int getLoginType() {\n return loginType_;\n }",
"public int getUserType() {\n\t\treturn userType;\n\t}",
"public String getAuthMethod() {\n return AUTH_NAME;\n }",
"public String getAuthType() {\n if (authType != null) {\n return authType;\n } else if (scheme.equals(\"aws.v4\")) {\n return SIGV4_AUTH_TYPE;\n } else {\n return DEFAULT_AUTH_TYPE;\n }\n }",
"@NotNull\n\tpublic UserType getType() {\n\t\treturn super.getTypeEnum();\n\t}",
"public com.symantec.schemas.vip._2011._04.vipuserservices.CredentialTypeEnum getCredentialType() {\r\n return credentialType;\r\n }",
"UserType getType();",
"public String getAuthentication() {\r\n return authentication;\r\n }",
"@DISPID(98)\r\n\t// = 0x62. The runtime will prefer the VTID if present\r\n\t@VTID(96)\r\n\tasci.activebatch.enumUserAuthenticationType userAuthenticationTypeUsed();",
"public Byte getUserType() {\n return userType;\n }",
"protected String getAuthMethod() {\n return \"Token\" ;// TODO this.conf.getAuthMethod();\n }",
"@ApiModelProperty(example = \"null\", value = \"The provider of the credentials\")\n public AuthenticationProviderEnum getAuthenticationProvider() {\n return authenticationProvider;\n }",
"public int getEditAuthUserType() {\n return editAuthUserType;\n }",
"public String getAuthMethod() {\n\t\tString method = options.getProperty(\"auth-method\");\n\t\tif(method == null) {\n\t\t\tmethod = options.getProperty(\"Authentication-Method\");\n\t\t}\n\t\treturn trimedValue(method);\n\t}",
"public Byte getUserType() {\r\n return userType;\r\n }",
"@Override\n\t\tpublic String getAuthType() {\n\t\t\treturn null;\n\t\t}",
"public String getPrincipalType(){\n return principalType;\n }",
"public Short getUserType() {\r\n return userType;\r\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 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 int getPasswordType() throws RemoteException;",
"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 java.lang.String getSecurityType() {\r\n return securityType;\r\n }",
"java.lang.String getAuth();",
"java.lang.String getAuth();",
"java.lang.String getAuth();",
"public boolean userType()\n {\n return false;\n }",
"public UserType getUserType() {\n\t\tif (userType == CustomerControl.dummyUserType)\n\t\t\tuserType = CustomerControl.getUserTypeById(userTypeID);\n\t\treturn userType;\n\t}",
"public String getRcTypeUser() {\r\n return rcTypeUser;\r\n }",
"public String getToken_type() {\r\n\t\treturn token_type;\r\n\t}",
"public com.rightrez.PassportType getType() {\r\n return type;\r\n }",
"@Test\n public void getUserAuthTypeTest() throws ApiException {\n String userId = null;\n String scope = null;\n AdminAuth response = api.getUserAuthType(userId, scope);\n\n // TODO: test validations\n }",
"@Override\npublic boolean supports(Class<?> authentication) {\n return true;\n}",
"public User withAuthenticationType(String authenticationType) {\n setAuthenticationType(authenticationType);\n return this;\n }",
"public String getAuthenticationRealm() {\n return this.realm;\n }",
"public EndpointAuthMode authMode() {\n return this.authMode;\n }",
"public String getAccountType() {\n return accountType;\n }",
"public String getAccountType() {\n return accountType;\n }",
"public SecurityType getSecurityType() {\n return securityType;\n }",
"public org.graylog.plugins.dnstap.protos.DnstapOuterClass.Message.Type getType() {\n org.graylog.plugins.dnstap.protos.DnstapOuterClass.Message.Type result = org.graylog.plugins.dnstap.protos.DnstapOuterClass.Message.Type.valueOf(type_);\n return result == null ? org.graylog.plugins.dnstap.protos.DnstapOuterClass.Message.Type.AUTH_QUERY : result;\n }",
"public String getAuthLevel()\n\t{\n\t\treturn authLevel;\n\t}",
"public org.graylog.plugins.dnstap.protos.DnstapOuterClass.Message.Type getType() {\n org.graylog.plugins.dnstap.protos.DnstapOuterClass.Message.Type result = org.graylog.plugins.dnstap.protos.DnstapOuterClass.Message.Type.valueOf(type_);\n return result == null ? org.graylog.plugins.dnstap.protos.DnstapOuterClass.Message.Type.AUTH_QUERY : result;\n }",
"@Override\n public String getTypeForDisplay() {\n return \"User\";\n }",
"public String getType()\n {\n try\n {\n if (result.has(\"error\"))\n {\n Object error;\n error = result.get(\"error\");\n\n if (error instanceof String)\n {\n // OAuth 2.0 Draft 10 style\n return (String) error;\n } else if (error instanceof JSONObject)\n {\n // OAuth 2.0 Draft 00 style\n if (((JSONObject) error).has(\"type\"))\n {\n return ((JSONObject) error).getString(\"type\");\n }\n }\n }\n } catch (JSONException e)\n {\n e.printStackTrace();\n }\n\n return \"Exception\";\n }",
"public String getRoleType() {\n return roleType;\n }",
"public String getRoleType() {\n return roleType;\n }",
"public String getIdentityType() {\n return identityType;\n }",
"@ApiModelProperty(value = \"The type of token eg \\\"Bearer\\\"\")\n public String getTokenType() {\n return tokenType;\n }",
"public String getUsercomtype() {\n\t\treturn usercomtype;\n\t}",
"public AuthStrategy getAuthStrategy() {\n\t\treturn authStrategy;\n\t}",
"@Override\n public String getAuthenticationScheme() {\n return \"OAuth2\";\n }",
"@Override\n public Set<Class<? extends AuthenticationRequest>> getCredentialTypes() {\n return Collections.singleton(NegotiateAuthenticationRequest.class);\n }",
"@Override\n\tpublic boolean supports(Class<?> authentication) {\n\t\treturn true;\n\t}",
"public String getPassholderType() {\n\t\treturn passholderType;\n\t}",
"protected String getType(){\n sharedPref = getSharedPreferences(AppCSTR.PREF_NAME, Context.MODE_PRIVATE);\n //Log.d(\"TYPE\", sharedPref.getString(\"accountType\", null));\n return sharedPref.getString(AppCSTR.ACCOUNT_TYPE, null);\n }",
"public boolean login (String username,String password, String userType) {\n\t\tString uname =null;\n\t\tString passwd=null;\n\t\tString uType=null;\n\t\t\n\t\tuname=this.getUsername();\n\t\tpasswd=this.getPassword();\n\t\tuType=this.getUserType();\n\t\t\n\t\tif ((uname.equals(username)) && (passwd.equals(password)) && (uType.equals(userType)))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public final String type() {\n return type;\n }",
"@Override\n\tpublic boolean supports(Class<?> auth) {\n\t\treturn auth.equals(UsernamePasswordAuthenticationToken.class);\n\t}",
"boolean isAuthenticated();",
"public Integer getUserTypeId() {\n return userTypeId;\n }",
"GlAccountType getGlAccountType();",
"@Override\n public io.emqx.exhook.ClientAuthorizeRequest.AuthorizeReqType getType() {\n @SuppressWarnings(\"deprecation\")\n io.emqx.exhook.ClientAuthorizeRequest.AuthorizeReqType result = io.emqx.exhook.ClientAuthorizeRequest.AuthorizeReqType.valueOf(type_);\n return result == null ? io.emqx.exhook.ClientAuthorizeRequest.AuthorizeReqType.UNRECOGNIZED : result;\n }",
"@Override\n\tpublic boolean supports(Class<?> authentication) {\n\t\treturn authentication.equals(UsernamePasswordAuthenticationToken.class);\n\t}",
"public VerificationType verificationType() {\n return this.verificationType;\n }",
"@Override\n public User getUserInfo() {\n return User.AUTHORIZED_USER;\n }",
"@Column(name = \"ACCOUNT_TYPE\")\n\tpublic String getAccountType()\n\t{\n\t\treturn accountType;\n\t}",
"@Override public io.emqx.exhook.ClientAuthorizeRequest.AuthorizeReqType getType() {\n @SuppressWarnings(\"deprecation\")\n io.emqx.exhook.ClientAuthorizeRequest.AuthorizeReqType result = io.emqx.exhook.ClientAuthorizeRequest.AuthorizeReqType.valueOf(type_);\n return result == null ? io.emqx.exhook.ClientAuthorizeRequest.AuthorizeReqType.UNRECOGNIZED : result;\n }",
"RoleType getRoleType();",
"public java.lang.String getAuth() {\n java.lang.Object ref = auth_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n auth_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getAuth() {\n java.lang.Object ref = auth_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n auth_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getAuth() {\n java.lang.Object ref = auth_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n auth_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"pl.stormit.protobuf.UserProtos.User.UserType getUserType();",
"public String getUsertype() {\n return usertype;\n }",
"public java.lang.String getAuth() {\n java.lang.Object ref = auth_;\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 auth_ = s;\n return s;\n }\n }",
"public java.lang.String getAuth() {\n java.lang.Object ref = auth_;\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 auth_ = s;\n return s;\n }\n }",
"public java.lang.String getAuth() {\n java.lang.Object ref = auth_;\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 auth_ = s;\n return s;\n }\n }",
"@Override\n\tpublic Class<LoginUserAction> getActionType() {\n\t\treturn null;\n\t}",
"public PersonUserType getUserType() throws NotLoadedException {\n return userType.getValue();\n }",
"@Override\n public boolean supports(Class<?> authentication) {\n return authentication.equals(\n UsernamePasswordAuthenticationToken.class);\n }",
"@Override\r\n\tpublic boolean supports(Class authentication) {\n\t\treturn true;\r\n\t}",
"public Integer getJuserType() {\n return juserType;\n }",
"public int getAccessType() {\n return accessType;\n }",
"public boolean authenticate(String id, String password, String type) {\r\n\t\tmethodname = \"authenticate\" ;\r\n\t\tlogger.info(\"ENTRY---> methodname : \"+methodname);\r\n\t\t\r\n\t\tboolean flag = authDao.authenticate(id,password,type) ;\r\n\t\t\r\n\t\tlogger.info(\"EXIT---> methodname : \"+methodname);\r\n\t\treturn flag;\r\n\t}",
"public void setUserType(String userType) {\n this.userType = userType;\n }",
"@Override\n\tpublic boolean supports(Class<?> authentication) {\n\t\treturn authentication.equals(AuthTokenAuthentication.class);\n\t}",
"public Builder authType(String authType) {\n this.authType = authType;\n return this;\n }",
"public Integer getUserTypeId()\n {\n return userTypeId;\n }",
"public AuthenticationState getAuthenticationState() {\n return authenticationState;\n }",
"public String type(){\n\t\treturn type;\n\t}",
"public AccountType getAccountType() {\n return accountType;\n }",
"public AccountType getAccountType() {\n return accountType;\n }",
"String getType() {\n return type;\n }"
]
| [
"0.8147669",
"0.7200479",
"0.71259874",
"0.70830554",
"0.70830554",
"0.70830554",
"0.70830554",
"0.705879",
"0.7020581",
"0.69852006",
"0.693212",
"0.6857912",
"0.6733803",
"0.6378653",
"0.63103044",
"0.6308923",
"0.6305592",
"0.6301531",
"0.6290716",
"0.6270139",
"0.62362635",
"0.6234415",
"0.62208784",
"0.6204722",
"0.61848015",
"0.6178014",
"0.614322",
"0.61396384",
"0.6137534",
"0.6112538",
"0.59464294",
"0.5921847",
"0.5921847",
"0.5921847",
"0.5848478",
"0.58345723",
"0.5833843",
"0.58313763",
"0.58102053",
"0.58006",
"0.5793324",
"0.57809055",
"0.57713646",
"0.5769634",
"0.5706991",
"0.5706991",
"0.5705172",
"0.57032657",
"0.56956124",
"0.5689979",
"0.5662191",
"0.56513786",
"0.56349826",
"0.56349826",
"0.56322384",
"0.5623861",
"0.56088454",
"0.559894",
"0.5594113",
"0.5582496",
"0.55759716",
"0.55721813",
"0.5566114",
"0.55583745",
"0.55385447",
"0.5524242",
"0.5522105",
"0.55184424",
"0.551722",
"0.5513314",
"0.55041206",
"0.5503293",
"0.5495511",
"0.5487439",
"0.54870135",
"0.547799",
"0.5477738",
"0.5477738",
"0.5477738",
"0.54564655",
"0.5450228",
"0.5449636",
"0.5449636",
"0.5449636",
"0.5439095",
"0.543673",
"0.5435411",
"0.5433266",
"0.54265654",
"0.54248214",
"0.54217076",
"0.54117304",
"0.53985775",
"0.5389064",
"0.5386254",
"0.53855747",
"0.53812665",
"0.53798",
"0.53798",
"0.5373212"
]
| 0.64245147 | 13 |
The authentication type for the user. | public String getAuthenticationType() {
return this.authenticationType;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int getLoginType();",
"public String 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 int getLoginType() {\n return loginType_;\n }",
"public int getLoginType() {\n return loginType_;\n }",
"public int getUserType() {\n\t\treturn userType;\n\t}",
"public String getAuthMethod() {\n return AUTH_NAME;\n }",
"public String getAuthType() {\n if (authType != null) {\n return authType;\n } else if (scheme.equals(\"aws.v4\")) {\n return SIGV4_AUTH_TYPE;\n } else {\n return DEFAULT_AUTH_TYPE;\n }\n }",
"@NotNull\n\tpublic UserType getType() {\n\t\treturn super.getTypeEnum();\n\t}",
"public void setAuthenticationType(String authenticationType) {\n this.authenticationType = authenticationType;\n }",
"public com.symantec.schemas.vip._2011._04.vipuserservices.CredentialTypeEnum getCredentialType() {\r\n return credentialType;\r\n }",
"UserType getType();",
"public String getAuthentication() {\r\n return authentication;\r\n }",
"@DISPID(98)\r\n\t// = 0x62. The runtime will prefer the VTID if present\r\n\t@VTID(96)\r\n\tasci.activebatch.enumUserAuthenticationType userAuthenticationTypeUsed();",
"public Byte getUserType() {\n return userType;\n }",
"protected String getAuthMethod() {\n return \"Token\" ;// TODO this.conf.getAuthMethod();\n }",
"@ApiModelProperty(example = \"null\", value = \"The provider of the credentials\")\n public AuthenticationProviderEnum getAuthenticationProvider() {\n return authenticationProvider;\n }",
"public int getEditAuthUserType() {\n return editAuthUserType;\n }",
"public String getAuthMethod() {\n\t\tString method = options.getProperty(\"auth-method\");\n\t\tif(method == null) {\n\t\t\tmethod = options.getProperty(\"Authentication-Method\");\n\t\t}\n\t\treturn trimedValue(method);\n\t}",
"public Byte getUserType() {\r\n return userType;\r\n }",
"@Override\n\t\tpublic String getAuthType() {\n\t\t\treturn null;\n\t\t}",
"public String getPrincipalType(){\n return principalType;\n }",
"public Short getUserType() {\r\n return userType;\r\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 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 int getPasswordType() throws RemoteException;",
"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 java.lang.String getSecurityType() {\r\n return securityType;\r\n }",
"java.lang.String getAuth();",
"java.lang.String getAuth();",
"java.lang.String getAuth();",
"public boolean userType()\n {\n return false;\n }",
"public UserType getUserType() {\n\t\tif (userType == CustomerControl.dummyUserType)\n\t\t\tuserType = CustomerControl.getUserTypeById(userTypeID);\n\t\treturn userType;\n\t}",
"public String getRcTypeUser() {\r\n return rcTypeUser;\r\n }",
"public String getToken_type() {\r\n\t\treturn token_type;\r\n\t}",
"public com.rightrez.PassportType getType() {\r\n return type;\r\n }",
"@Test\n public void getUserAuthTypeTest() throws ApiException {\n String userId = null;\n String scope = null;\n AdminAuth response = api.getUserAuthType(userId, scope);\n\n // TODO: test validations\n }",
"@Override\npublic boolean supports(Class<?> authentication) {\n return true;\n}",
"public User withAuthenticationType(String authenticationType) {\n setAuthenticationType(authenticationType);\n return this;\n }",
"public String getAuthenticationRealm() {\n return this.realm;\n }",
"public EndpointAuthMode authMode() {\n return this.authMode;\n }",
"public String getAccountType() {\n return accountType;\n }",
"public String getAccountType() {\n return accountType;\n }",
"public SecurityType getSecurityType() {\n return securityType;\n }",
"public org.graylog.plugins.dnstap.protos.DnstapOuterClass.Message.Type getType() {\n org.graylog.plugins.dnstap.protos.DnstapOuterClass.Message.Type result = org.graylog.plugins.dnstap.protos.DnstapOuterClass.Message.Type.valueOf(type_);\n return result == null ? org.graylog.plugins.dnstap.protos.DnstapOuterClass.Message.Type.AUTH_QUERY : result;\n }",
"public String getAuthLevel()\n\t{\n\t\treturn authLevel;\n\t}",
"public org.graylog.plugins.dnstap.protos.DnstapOuterClass.Message.Type getType() {\n org.graylog.plugins.dnstap.protos.DnstapOuterClass.Message.Type result = org.graylog.plugins.dnstap.protos.DnstapOuterClass.Message.Type.valueOf(type_);\n return result == null ? org.graylog.plugins.dnstap.protos.DnstapOuterClass.Message.Type.AUTH_QUERY : result;\n }",
"@Override\n public String getTypeForDisplay() {\n return \"User\";\n }",
"public String getType()\n {\n try\n {\n if (result.has(\"error\"))\n {\n Object error;\n error = result.get(\"error\");\n\n if (error instanceof String)\n {\n // OAuth 2.0 Draft 10 style\n return (String) error;\n } else if (error instanceof JSONObject)\n {\n // OAuth 2.0 Draft 00 style\n if (((JSONObject) error).has(\"type\"))\n {\n return ((JSONObject) error).getString(\"type\");\n }\n }\n }\n } catch (JSONException e)\n {\n e.printStackTrace();\n }\n\n return \"Exception\";\n }",
"public String getRoleType() {\n return roleType;\n }",
"public String getRoleType() {\n return roleType;\n }",
"public String getIdentityType() {\n return identityType;\n }",
"@ApiModelProperty(value = \"The type of token eg \\\"Bearer\\\"\")\n public String getTokenType() {\n return tokenType;\n }",
"public String getUsercomtype() {\n\t\treturn usercomtype;\n\t}",
"public AuthStrategy getAuthStrategy() {\n\t\treturn authStrategy;\n\t}",
"@Override\n public String getAuthenticationScheme() {\n return \"OAuth2\";\n }",
"@Override\n public Set<Class<? extends AuthenticationRequest>> getCredentialTypes() {\n return Collections.singleton(NegotiateAuthenticationRequest.class);\n }",
"@Override\n\tpublic boolean supports(Class<?> authentication) {\n\t\treturn true;\n\t}",
"public String getPassholderType() {\n\t\treturn passholderType;\n\t}",
"protected String getType(){\n sharedPref = getSharedPreferences(AppCSTR.PREF_NAME, Context.MODE_PRIVATE);\n //Log.d(\"TYPE\", sharedPref.getString(\"accountType\", null));\n return sharedPref.getString(AppCSTR.ACCOUNT_TYPE, null);\n }",
"public boolean login (String username,String password, String userType) {\n\t\tString uname =null;\n\t\tString passwd=null;\n\t\tString uType=null;\n\t\t\n\t\tuname=this.getUsername();\n\t\tpasswd=this.getPassword();\n\t\tuType=this.getUserType();\n\t\t\n\t\tif ((uname.equals(username)) && (passwd.equals(password)) && (uType.equals(userType)))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public final String type() {\n return type;\n }",
"@Override\n\tpublic boolean supports(Class<?> auth) {\n\t\treturn auth.equals(UsernamePasswordAuthenticationToken.class);\n\t}",
"boolean isAuthenticated();",
"public Integer getUserTypeId() {\n return userTypeId;\n }",
"GlAccountType getGlAccountType();",
"@Override\n public io.emqx.exhook.ClientAuthorizeRequest.AuthorizeReqType getType() {\n @SuppressWarnings(\"deprecation\")\n io.emqx.exhook.ClientAuthorizeRequest.AuthorizeReqType result = io.emqx.exhook.ClientAuthorizeRequest.AuthorizeReqType.valueOf(type_);\n return result == null ? io.emqx.exhook.ClientAuthorizeRequest.AuthorizeReqType.UNRECOGNIZED : result;\n }",
"@Override\n\tpublic boolean supports(Class<?> authentication) {\n\t\treturn authentication.equals(UsernamePasswordAuthenticationToken.class);\n\t}",
"public VerificationType verificationType() {\n return this.verificationType;\n }",
"@Override\n public User getUserInfo() {\n return User.AUTHORIZED_USER;\n }",
"@Column(name = \"ACCOUNT_TYPE\")\n\tpublic String getAccountType()\n\t{\n\t\treturn accountType;\n\t}",
"@Override public io.emqx.exhook.ClientAuthorizeRequest.AuthorizeReqType getType() {\n @SuppressWarnings(\"deprecation\")\n io.emqx.exhook.ClientAuthorizeRequest.AuthorizeReqType result = io.emqx.exhook.ClientAuthorizeRequest.AuthorizeReqType.valueOf(type_);\n return result == null ? io.emqx.exhook.ClientAuthorizeRequest.AuthorizeReqType.UNRECOGNIZED : result;\n }",
"RoleType getRoleType();",
"public java.lang.String getAuth() {\n java.lang.Object ref = auth_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n auth_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getAuth() {\n java.lang.Object ref = auth_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n auth_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getAuth() {\n java.lang.Object ref = auth_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n auth_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"pl.stormit.protobuf.UserProtos.User.UserType getUserType();",
"public String getUsertype() {\n return usertype;\n }",
"public java.lang.String getAuth() {\n java.lang.Object ref = auth_;\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 auth_ = s;\n return s;\n }\n }",
"public java.lang.String getAuth() {\n java.lang.Object ref = auth_;\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 auth_ = s;\n return s;\n }\n }",
"public java.lang.String getAuth() {\n java.lang.Object ref = auth_;\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 auth_ = s;\n return s;\n }\n }",
"@Override\n\tpublic Class<LoginUserAction> getActionType() {\n\t\treturn null;\n\t}",
"public PersonUserType getUserType() throws NotLoadedException {\n return userType.getValue();\n }",
"@Override\n public boolean supports(Class<?> authentication) {\n return authentication.equals(\n UsernamePasswordAuthenticationToken.class);\n }",
"@Override\r\n\tpublic boolean supports(Class authentication) {\n\t\treturn true;\r\n\t}",
"public Integer getJuserType() {\n return juserType;\n }",
"public int getAccessType() {\n return accessType;\n }",
"public boolean authenticate(String id, String password, String type) {\r\n\t\tmethodname = \"authenticate\" ;\r\n\t\tlogger.info(\"ENTRY---> methodname : \"+methodname);\r\n\t\t\r\n\t\tboolean flag = authDao.authenticate(id,password,type) ;\r\n\t\t\r\n\t\tlogger.info(\"EXIT---> methodname : \"+methodname);\r\n\t\treturn flag;\r\n\t}",
"public void setUserType(String userType) {\n this.userType = userType;\n }",
"@Override\n\tpublic boolean supports(Class<?> authentication) {\n\t\treturn authentication.equals(AuthTokenAuthentication.class);\n\t}",
"public Builder authType(String authType) {\n this.authType = authType;\n return this;\n }",
"public Integer getUserTypeId()\n {\n return userTypeId;\n }",
"public AuthenticationState getAuthenticationState() {\n return authenticationState;\n }",
"public String type(){\n\t\treturn type;\n\t}",
"public AccountType getAccountType() {\n return accountType;\n }",
"public AccountType getAccountType() {\n return accountType;\n }",
"String getType() {\n return type;\n }"
]
| [
"0.7200479",
"0.71259874",
"0.70830554",
"0.70830554",
"0.70830554",
"0.70830554",
"0.705879",
"0.7020581",
"0.69852006",
"0.693212",
"0.6857912",
"0.6733803",
"0.64245147",
"0.6378653",
"0.63103044",
"0.6308923",
"0.6305592",
"0.6301531",
"0.6290716",
"0.6270139",
"0.62362635",
"0.6234415",
"0.62208784",
"0.6204722",
"0.61848015",
"0.6178014",
"0.614322",
"0.61396384",
"0.6137534",
"0.6112538",
"0.59464294",
"0.5921847",
"0.5921847",
"0.5921847",
"0.5848478",
"0.58345723",
"0.5833843",
"0.58313763",
"0.58102053",
"0.58006",
"0.5793324",
"0.57809055",
"0.57713646",
"0.5769634",
"0.5706991",
"0.5706991",
"0.5705172",
"0.57032657",
"0.56956124",
"0.5689979",
"0.5662191",
"0.56513786",
"0.56349826",
"0.56349826",
"0.56322384",
"0.5623861",
"0.56088454",
"0.559894",
"0.5594113",
"0.5582496",
"0.55759716",
"0.55721813",
"0.5566114",
"0.55583745",
"0.55385447",
"0.5524242",
"0.5522105",
"0.55184424",
"0.551722",
"0.5513314",
"0.55041206",
"0.5503293",
"0.5495511",
"0.5487439",
"0.54870135",
"0.547799",
"0.5477738",
"0.5477738",
"0.5477738",
"0.54564655",
"0.5450228",
"0.5449636",
"0.5449636",
"0.5449636",
"0.5439095",
"0.543673",
"0.5435411",
"0.5433266",
"0.54265654",
"0.54248214",
"0.54217076",
"0.54117304",
"0.53985775",
"0.5389064",
"0.5386254",
"0.53855747",
"0.53812665",
"0.53798",
"0.53798",
"0.5373212"
]
| 0.8147669 | 0 |
The authentication type for the user. | public User withAuthenticationType(String authenticationType) {
setAuthenticationType(authenticationType);
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getAuthenticationType() {\n return this.authenticationType;\n }",
"int getLoginType();",
"public String 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 int getLoginType() {\n return loginType_;\n }",
"public int getLoginType() {\n return loginType_;\n }",
"public int getUserType() {\n\t\treturn userType;\n\t}",
"public String getAuthMethod() {\n return AUTH_NAME;\n }",
"public String getAuthType() {\n if (authType != null) {\n return authType;\n } else if (scheme.equals(\"aws.v4\")) {\n return SIGV4_AUTH_TYPE;\n } else {\n return DEFAULT_AUTH_TYPE;\n }\n }",
"@NotNull\n\tpublic UserType getType() {\n\t\treturn super.getTypeEnum();\n\t}",
"public void setAuthenticationType(String authenticationType) {\n this.authenticationType = authenticationType;\n }",
"public com.symantec.schemas.vip._2011._04.vipuserservices.CredentialTypeEnum getCredentialType() {\r\n return credentialType;\r\n }",
"UserType getType();",
"public String getAuthentication() {\r\n return authentication;\r\n }",
"@DISPID(98)\r\n\t// = 0x62. The runtime will prefer the VTID if present\r\n\t@VTID(96)\r\n\tasci.activebatch.enumUserAuthenticationType userAuthenticationTypeUsed();",
"public Byte getUserType() {\n return userType;\n }",
"protected String getAuthMethod() {\n return \"Token\" ;// TODO this.conf.getAuthMethod();\n }",
"@ApiModelProperty(example = \"null\", value = \"The provider of the credentials\")\n public AuthenticationProviderEnum getAuthenticationProvider() {\n return authenticationProvider;\n }",
"public int getEditAuthUserType() {\n return editAuthUserType;\n }",
"public String getAuthMethod() {\n\t\tString method = options.getProperty(\"auth-method\");\n\t\tif(method == null) {\n\t\t\tmethod = options.getProperty(\"Authentication-Method\");\n\t\t}\n\t\treturn trimedValue(method);\n\t}",
"public Byte getUserType() {\r\n return userType;\r\n }",
"@Override\n\t\tpublic String getAuthType() {\n\t\t\treturn null;\n\t\t}",
"public String getPrincipalType(){\n return principalType;\n }",
"public Short getUserType() {\r\n return userType;\r\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 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 int getPasswordType() throws RemoteException;",
"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 java.lang.String getSecurityType() {\r\n return securityType;\r\n }",
"java.lang.String getAuth();",
"java.lang.String getAuth();",
"java.lang.String getAuth();",
"public boolean userType()\n {\n return false;\n }",
"public UserType getUserType() {\n\t\tif (userType == CustomerControl.dummyUserType)\n\t\t\tuserType = CustomerControl.getUserTypeById(userTypeID);\n\t\treturn userType;\n\t}",
"public String getRcTypeUser() {\r\n return rcTypeUser;\r\n }",
"public String getToken_type() {\r\n\t\treturn token_type;\r\n\t}",
"public com.rightrez.PassportType getType() {\r\n return type;\r\n }",
"@Test\n public void getUserAuthTypeTest() throws ApiException {\n String userId = null;\n String scope = null;\n AdminAuth response = api.getUserAuthType(userId, scope);\n\n // TODO: test validations\n }",
"@Override\npublic boolean supports(Class<?> authentication) {\n return true;\n}",
"public String getAuthenticationRealm() {\n return this.realm;\n }",
"public EndpointAuthMode authMode() {\n return this.authMode;\n }",
"public String getAccountType() {\n return accountType;\n }",
"public String getAccountType() {\n return accountType;\n }",
"public SecurityType getSecurityType() {\n return securityType;\n }",
"public org.graylog.plugins.dnstap.protos.DnstapOuterClass.Message.Type getType() {\n org.graylog.plugins.dnstap.protos.DnstapOuterClass.Message.Type result = org.graylog.plugins.dnstap.protos.DnstapOuterClass.Message.Type.valueOf(type_);\n return result == null ? org.graylog.plugins.dnstap.protos.DnstapOuterClass.Message.Type.AUTH_QUERY : result;\n }",
"public String getAuthLevel()\n\t{\n\t\treturn authLevel;\n\t}",
"public org.graylog.plugins.dnstap.protos.DnstapOuterClass.Message.Type getType() {\n org.graylog.plugins.dnstap.protos.DnstapOuterClass.Message.Type result = org.graylog.plugins.dnstap.protos.DnstapOuterClass.Message.Type.valueOf(type_);\n return result == null ? org.graylog.plugins.dnstap.protos.DnstapOuterClass.Message.Type.AUTH_QUERY : result;\n }",
"@Override\n public String getTypeForDisplay() {\n return \"User\";\n }",
"public String getType()\n {\n try\n {\n if (result.has(\"error\"))\n {\n Object error;\n error = result.get(\"error\");\n\n if (error instanceof String)\n {\n // OAuth 2.0 Draft 10 style\n return (String) error;\n } else if (error instanceof JSONObject)\n {\n // OAuth 2.0 Draft 00 style\n if (((JSONObject) error).has(\"type\"))\n {\n return ((JSONObject) error).getString(\"type\");\n }\n }\n }\n } catch (JSONException e)\n {\n e.printStackTrace();\n }\n\n return \"Exception\";\n }",
"public String getRoleType() {\n return roleType;\n }",
"public String getRoleType() {\n return roleType;\n }",
"public String getIdentityType() {\n return identityType;\n }",
"@ApiModelProperty(value = \"The type of token eg \\\"Bearer\\\"\")\n public String getTokenType() {\n return tokenType;\n }",
"public String getUsercomtype() {\n\t\treturn usercomtype;\n\t}",
"public AuthStrategy getAuthStrategy() {\n\t\treturn authStrategy;\n\t}",
"@Override\n public String getAuthenticationScheme() {\n return \"OAuth2\";\n }",
"@Override\n public Set<Class<? extends AuthenticationRequest>> getCredentialTypes() {\n return Collections.singleton(NegotiateAuthenticationRequest.class);\n }",
"@Override\n\tpublic boolean supports(Class<?> authentication) {\n\t\treturn true;\n\t}",
"public String getPassholderType() {\n\t\treturn passholderType;\n\t}",
"protected String getType(){\n sharedPref = getSharedPreferences(AppCSTR.PREF_NAME, Context.MODE_PRIVATE);\n //Log.d(\"TYPE\", sharedPref.getString(\"accountType\", null));\n return sharedPref.getString(AppCSTR.ACCOUNT_TYPE, null);\n }",
"public boolean login (String username,String password, String userType) {\n\t\tString uname =null;\n\t\tString passwd=null;\n\t\tString uType=null;\n\t\t\n\t\tuname=this.getUsername();\n\t\tpasswd=this.getPassword();\n\t\tuType=this.getUserType();\n\t\t\n\t\tif ((uname.equals(username)) && (passwd.equals(password)) && (uType.equals(userType)))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public final String type() {\n return type;\n }",
"@Override\n\tpublic boolean supports(Class<?> auth) {\n\t\treturn auth.equals(UsernamePasswordAuthenticationToken.class);\n\t}",
"boolean isAuthenticated();",
"public Integer getUserTypeId() {\n return userTypeId;\n }",
"GlAccountType getGlAccountType();",
"@Override\n public io.emqx.exhook.ClientAuthorizeRequest.AuthorizeReqType getType() {\n @SuppressWarnings(\"deprecation\")\n io.emqx.exhook.ClientAuthorizeRequest.AuthorizeReqType result = io.emqx.exhook.ClientAuthorizeRequest.AuthorizeReqType.valueOf(type_);\n return result == null ? io.emqx.exhook.ClientAuthorizeRequest.AuthorizeReqType.UNRECOGNIZED : result;\n }",
"@Override\n\tpublic boolean supports(Class<?> authentication) {\n\t\treturn authentication.equals(UsernamePasswordAuthenticationToken.class);\n\t}",
"public VerificationType verificationType() {\n return this.verificationType;\n }",
"@Override\n public User getUserInfo() {\n return User.AUTHORIZED_USER;\n }",
"@Column(name = \"ACCOUNT_TYPE\")\n\tpublic String getAccountType()\n\t{\n\t\treturn accountType;\n\t}",
"@Override public io.emqx.exhook.ClientAuthorizeRequest.AuthorizeReqType getType() {\n @SuppressWarnings(\"deprecation\")\n io.emqx.exhook.ClientAuthorizeRequest.AuthorizeReqType result = io.emqx.exhook.ClientAuthorizeRequest.AuthorizeReqType.valueOf(type_);\n return result == null ? io.emqx.exhook.ClientAuthorizeRequest.AuthorizeReqType.UNRECOGNIZED : result;\n }",
"RoleType getRoleType();",
"public java.lang.String getAuth() {\n java.lang.Object ref = auth_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n auth_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getAuth() {\n java.lang.Object ref = auth_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n auth_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getAuth() {\n java.lang.Object ref = auth_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n auth_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"pl.stormit.protobuf.UserProtos.User.UserType getUserType();",
"public String getUsertype() {\n return usertype;\n }",
"public java.lang.String getAuth() {\n java.lang.Object ref = auth_;\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 auth_ = s;\n return s;\n }\n }",
"public java.lang.String getAuth() {\n java.lang.Object ref = auth_;\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 auth_ = s;\n return s;\n }\n }",
"public java.lang.String getAuth() {\n java.lang.Object ref = auth_;\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 auth_ = s;\n return s;\n }\n }",
"@Override\n\tpublic Class<LoginUserAction> getActionType() {\n\t\treturn null;\n\t}",
"public PersonUserType getUserType() throws NotLoadedException {\n return userType.getValue();\n }",
"@Override\n public boolean supports(Class<?> authentication) {\n return authentication.equals(\n UsernamePasswordAuthenticationToken.class);\n }",
"@Override\r\n\tpublic boolean supports(Class authentication) {\n\t\treturn true;\r\n\t}",
"public Integer getJuserType() {\n return juserType;\n }",
"public int getAccessType() {\n return accessType;\n }",
"public boolean authenticate(String id, String password, String type) {\r\n\t\tmethodname = \"authenticate\" ;\r\n\t\tlogger.info(\"ENTRY---> methodname : \"+methodname);\r\n\t\t\r\n\t\tboolean flag = authDao.authenticate(id,password,type) ;\r\n\t\t\r\n\t\tlogger.info(\"EXIT---> methodname : \"+methodname);\r\n\t\treturn flag;\r\n\t}",
"public void setUserType(String userType) {\n this.userType = userType;\n }",
"@Override\n\tpublic boolean supports(Class<?> authentication) {\n\t\treturn authentication.equals(AuthTokenAuthentication.class);\n\t}",
"public Builder authType(String authType) {\n this.authType = authType;\n return this;\n }",
"public Integer getUserTypeId()\n {\n return userTypeId;\n }",
"public AuthenticationState getAuthenticationState() {\n return authenticationState;\n }",
"public String type(){\n\t\treturn type;\n\t}",
"public AccountType getAccountType() {\n return accountType;\n }",
"public AccountType getAccountType() {\n return accountType;\n }",
"String getType() {\n return type;\n }"
]
| [
"0.8147669",
"0.7200479",
"0.71259874",
"0.70830554",
"0.70830554",
"0.70830554",
"0.70830554",
"0.705879",
"0.7020581",
"0.69852006",
"0.693212",
"0.6857912",
"0.6733803",
"0.64245147",
"0.6378653",
"0.63103044",
"0.6308923",
"0.6305592",
"0.6301531",
"0.6290716",
"0.6270139",
"0.62362635",
"0.6234415",
"0.62208784",
"0.6204722",
"0.61848015",
"0.6178014",
"0.614322",
"0.61396384",
"0.6137534",
"0.6112538",
"0.59464294",
"0.5921847",
"0.5921847",
"0.5921847",
"0.5848478",
"0.58345723",
"0.5833843",
"0.58313763",
"0.58102053",
"0.58006",
"0.5793324",
"0.57713646",
"0.5769634",
"0.5706991",
"0.5706991",
"0.5705172",
"0.57032657",
"0.56956124",
"0.5689979",
"0.5662191",
"0.56513786",
"0.56349826",
"0.56349826",
"0.56322384",
"0.5623861",
"0.56088454",
"0.559894",
"0.5594113",
"0.5582496",
"0.55759716",
"0.55721813",
"0.5566114",
"0.55583745",
"0.55385447",
"0.5524242",
"0.5522105",
"0.55184424",
"0.551722",
"0.5513314",
"0.55041206",
"0.5503293",
"0.5495511",
"0.5487439",
"0.54870135",
"0.547799",
"0.5477738",
"0.5477738",
"0.5477738",
"0.54564655",
"0.5450228",
"0.5449636",
"0.5449636",
"0.5449636",
"0.5439095",
"0.543673",
"0.5435411",
"0.5433266",
"0.54265654",
"0.54248214",
"0.54217076",
"0.54117304",
"0.53985775",
"0.5389064",
"0.5386254",
"0.53855747",
"0.53812665",
"0.53798",
"0.53798",
"0.5373212"
]
| 0.57809055 | 42 |
The authentication type for the user. | public User withAuthenticationType(AuthenticationType authenticationType) {
this.authenticationType = authenticationType.toString();
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getAuthenticationType() {\n return this.authenticationType;\n }",
"int getLoginType();",
"public String 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 int getLoginType() {\n return loginType_;\n }",
"public int getLoginType() {\n return loginType_;\n }",
"public int getUserType() {\n\t\treturn userType;\n\t}",
"public String getAuthMethod() {\n return AUTH_NAME;\n }",
"public String getAuthType() {\n if (authType != null) {\n return authType;\n } else if (scheme.equals(\"aws.v4\")) {\n return SIGV4_AUTH_TYPE;\n } else {\n return DEFAULT_AUTH_TYPE;\n }\n }",
"@NotNull\n\tpublic UserType getType() {\n\t\treturn super.getTypeEnum();\n\t}",
"public void setAuthenticationType(String authenticationType) {\n this.authenticationType = authenticationType;\n }",
"public com.symantec.schemas.vip._2011._04.vipuserservices.CredentialTypeEnum getCredentialType() {\r\n return credentialType;\r\n }",
"UserType getType();",
"public String getAuthentication() {\r\n return authentication;\r\n }",
"@DISPID(98)\r\n\t// = 0x62. The runtime will prefer the VTID if present\r\n\t@VTID(96)\r\n\tasci.activebatch.enumUserAuthenticationType userAuthenticationTypeUsed();",
"public Byte getUserType() {\n return userType;\n }",
"protected String getAuthMethod() {\n return \"Token\" ;// TODO this.conf.getAuthMethod();\n }",
"@ApiModelProperty(example = \"null\", value = \"The provider of the credentials\")\n public AuthenticationProviderEnum getAuthenticationProvider() {\n return authenticationProvider;\n }",
"public int getEditAuthUserType() {\n return editAuthUserType;\n }",
"public String getAuthMethod() {\n\t\tString method = options.getProperty(\"auth-method\");\n\t\tif(method == null) {\n\t\t\tmethod = options.getProperty(\"Authentication-Method\");\n\t\t}\n\t\treturn trimedValue(method);\n\t}",
"public Byte getUserType() {\r\n return userType;\r\n }",
"@Override\n\t\tpublic String getAuthType() {\n\t\t\treturn null;\n\t\t}",
"public String getPrincipalType(){\n return principalType;\n }",
"public Short getUserType() {\r\n return userType;\r\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 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 int getPasswordType() throws RemoteException;",
"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 java.lang.String getSecurityType() {\r\n return securityType;\r\n }",
"java.lang.String getAuth();",
"java.lang.String getAuth();",
"java.lang.String getAuth();",
"public boolean userType()\n {\n return false;\n }",
"public UserType getUserType() {\n\t\tif (userType == CustomerControl.dummyUserType)\n\t\t\tuserType = CustomerControl.getUserTypeById(userTypeID);\n\t\treturn userType;\n\t}",
"public String getRcTypeUser() {\r\n return rcTypeUser;\r\n }",
"public String getToken_type() {\r\n\t\treturn token_type;\r\n\t}",
"public com.rightrez.PassportType getType() {\r\n return type;\r\n }",
"@Test\n public void getUserAuthTypeTest() throws ApiException {\n String userId = null;\n String scope = null;\n AdminAuth response = api.getUserAuthType(userId, scope);\n\n // TODO: test validations\n }",
"@Override\npublic boolean supports(Class<?> authentication) {\n return true;\n}",
"public User withAuthenticationType(String authenticationType) {\n setAuthenticationType(authenticationType);\n return this;\n }",
"public String getAuthenticationRealm() {\n return this.realm;\n }",
"public EndpointAuthMode authMode() {\n return this.authMode;\n }",
"public String getAccountType() {\n return accountType;\n }",
"public String getAccountType() {\n return accountType;\n }",
"public SecurityType getSecurityType() {\n return securityType;\n }",
"public org.graylog.plugins.dnstap.protos.DnstapOuterClass.Message.Type getType() {\n org.graylog.plugins.dnstap.protos.DnstapOuterClass.Message.Type result = org.graylog.plugins.dnstap.protos.DnstapOuterClass.Message.Type.valueOf(type_);\n return result == null ? org.graylog.plugins.dnstap.protos.DnstapOuterClass.Message.Type.AUTH_QUERY : result;\n }",
"public String getAuthLevel()\n\t{\n\t\treturn authLevel;\n\t}",
"public org.graylog.plugins.dnstap.protos.DnstapOuterClass.Message.Type getType() {\n org.graylog.plugins.dnstap.protos.DnstapOuterClass.Message.Type result = org.graylog.plugins.dnstap.protos.DnstapOuterClass.Message.Type.valueOf(type_);\n return result == null ? org.graylog.plugins.dnstap.protos.DnstapOuterClass.Message.Type.AUTH_QUERY : result;\n }",
"@Override\n public String getTypeForDisplay() {\n return \"User\";\n }",
"public String getType()\n {\n try\n {\n if (result.has(\"error\"))\n {\n Object error;\n error = result.get(\"error\");\n\n if (error instanceof String)\n {\n // OAuth 2.0 Draft 10 style\n return (String) error;\n } else if (error instanceof JSONObject)\n {\n // OAuth 2.0 Draft 00 style\n if (((JSONObject) error).has(\"type\"))\n {\n return ((JSONObject) error).getString(\"type\");\n }\n }\n }\n } catch (JSONException e)\n {\n e.printStackTrace();\n }\n\n return \"Exception\";\n }",
"public String getRoleType() {\n return roleType;\n }",
"public String getRoleType() {\n return roleType;\n }",
"public String getIdentityType() {\n return identityType;\n }",
"@ApiModelProperty(value = \"The type of token eg \\\"Bearer\\\"\")\n public String getTokenType() {\n return tokenType;\n }",
"public String getUsercomtype() {\n\t\treturn usercomtype;\n\t}",
"public AuthStrategy getAuthStrategy() {\n\t\treturn authStrategy;\n\t}",
"@Override\n public String getAuthenticationScheme() {\n return \"OAuth2\";\n }",
"@Override\n public Set<Class<? extends AuthenticationRequest>> getCredentialTypes() {\n return Collections.singleton(NegotiateAuthenticationRequest.class);\n }",
"@Override\n\tpublic boolean supports(Class<?> authentication) {\n\t\treturn true;\n\t}",
"public String getPassholderType() {\n\t\treturn passholderType;\n\t}",
"protected String getType(){\n sharedPref = getSharedPreferences(AppCSTR.PREF_NAME, Context.MODE_PRIVATE);\n //Log.d(\"TYPE\", sharedPref.getString(\"accountType\", null));\n return sharedPref.getString(AppCSTR.ACCOUNT_TYPE, null);\n }",
"public boolean login (String username,String password, String userType) {\n\t\tString uname =null;\n\t\tString passwd=null;\n\t\tString uType=null;\n\t\t\n\t\tuname=this.getUsername();\n\t\tpasswd=this.getPassword();\n\t\tuType=this.getUserType();\n\t\t\n\t\tif ((uname.equals(username)) && (passwd.equals(password)) && (uType.equals(userType)))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public final String type() {\n return type;\n }",
"@Override\n\tpublic boolean supports(Class<?> auth) {\n\t\treturn auth.equals(UsernamePasswordAuthenticationToken.class);\n\t}",
"boolean isAuthenticated();",
"public Integer getUserTypeId() {\n return userTypeId;\n }",
"GlAccountType getGlAccountType();",
"@Override\n public io.emqx.exhook.ClientAuthorizeRequest.AuthorizeReqType getType() {\n @SuppressWarnings(\"deprecation\")\n io.emqx.exhook.ClientAuthorizeRequest.AuthorizeReqType result = io.emqx.exhook.ClientAuthorizeRequest.AuthorizeReqType.valueOf(type_);\n return result == null ? io.emqx.exhook.ClientAuthorizeRequest.AuthorizeReqType.UNRECOGNIZED : result;\n }",
"public VerificationType verificationType() {\n return this.verificationType;\n }",
"@Override\n\tpublic boolean supports(Class<?> authentication) {\n\t\treturn authentication.equals(UsernamePasswordAuthenticationToken.class);\n\t}",
"@Override\n public User getUserInfo() {\n return User.AUTHORIZED_USER;\n }",
"@Column(name = \"ACCOUNT_TYPE\")\n\tpublic String getAccountType()\n\t{\n\t\treturn accountType;\n\t}",
"@Override public io.emqx.exhook.ClientAuthorizeRequest.AuthorizeReqType getType() {\n @SuppressWarnings(\"deprecation\")\n io.emqx.exhook.ClientAuthorizeRequest.AuthorizeReqType result = io.emqx.exhook.ClientAuthorizeRequest.AuthorizeReqType.valueOf(type_);\n return result == null ? io.emqx.exhook.ClientAuthorizeRequest.AuthorizeReqType.UNRECOGNIZED : result;\n }",
"RoleType getRoleType();",
"public java.lang.String getAuth() {\n java.lang.Object ref = auth_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n auth_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getAuth() {\n java.lang.Object ref = auth_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n auth_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getAuth() {\n java.lang.Object ref = auth_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n auth_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"pl.stormit.protobuf.UserProtos.User.UserType getUserType();",
"public String getUsertype() {\n return usertype;\n }",
"public java.lang.String getAuth() {\n java.lang.Object ref = auth_;\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 auth_ = s;\n return s;\n }\n }",
"public java.lang.String getAuth() {\n java.lang.Object ref = auth_;\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 auth_ = s;\n return s;\n }\n }",
"public java.lang.String getAuth() {\n java.lang.Object ref = auth_;\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 auth_ = s;\n return s;\n }\n }",
"@Override\n\tpublic Class<LoginUserAction> getActionType() {\n\t\treturn null;\n\t}",
"public PersonUserType getUserType() throws NotLoadedException {\n return userType.getValue();\n }",
"@Override\n public boolean supports(Class<?> authentication) {\n return authentication.equals(\n UsernamePasswordAuthenticationToken.class);\n }",
"@Override\r\n\tpublic boolean supports(Class authentication) {\n\t\treturn true;\r\n\t}",
"public Integer getJuserType() {\n return juserType;\n }",
"public int getAccessType() {\n return accessType;\n }",
"public boolean authenticate(String id, String password, String type) {\r\n\t\tmethodname = \"authenticate\" ;\r\n\t\tlogger.info(\"ENTRY---> methodname : \"+methodname);\r\n\t\t\r\n\t\tboolean flag = authDao.authenticate(id,password,type) ;\r\n\t\t\r\n\t\tlogger.info(\"EXIT---> methodname : \"+methodname);\r\n\t\treturn flag;\r\n\t}",
"public void setUserType(String userType) {\n this.userType = userType;\n }",
"@Override\n\tpublic boolean supports(Class<?> authentication) {\n\t\treturn authentication.equals(AuthTokenAuthentication.class);\n\t}",
"public Builder authType(String authType) {\n this.authType = authType;\n return this;\n }",
"public Integer getUserTypeId()\n {\n return userTypeId;\n }",
"public AuthenticationState getAuthenticationState() {\n return authenticationState;\n }",
"public String type(){\n\t\treturn type;\n\t}",
"public AccountType getAccountType() {\n return accountType;\n }",
"public AccountType getAccountType() {\n return accountType;\n }",
"String getType() {\n return type;\n }"
]
| [
"0.8147578",
"0.72007304",
"0.71272784",
"0.70842135",
"0.70842135",
"0.70842135",
"0.70842135",
"0.70584685",
"0.70202565",
"0.6986235",
"0.6931623",
"0.6859321",
"0.673537",
"0.64246976",
"0.6379435",
"0.6312824",
"0.6307097",
"0.63053167",
"0.63021386",
"0.6289902",
"0.6269034",
"0.6236074",
"0.62343633",
"0.6221448",
"0.6205434",
"0.6187184",
"0.61789644",
"0.61442906",
"0.61406785",
"0.6137639",
"0.6113341",
"0.5948293",
"0.59204054",
"0.59204054",
"0.59204054",
"0.584925",
"0.58358645",
"0.5834821",
"0.5832101",
"0.5812666",
"0.5800324",
"0.5793076",
"0.5780599",
"0.57704437",
"0.5768786",
"0.57082754",
"0.57082754",
"0.57067907",
"0.57057995",
"0.5693796",
"0.5692506",
"0.5663206",
"0.56528115",
"0.56370616",
"0.56370616",
"0.56341726",
"0.5623671",
"0.5611088",
"0.55979735",
"0.5594306",
"0.5582898",
"0.55765957",
"0.55727756",
"0.5567453",
"0.5557403",
"0.554054",
"0.5523745",
"0.55196005",
"0.5518686",
"0.551831",
"0.55152553",
"0.55042386",
"0.55037487",
"0.5493342",
"0.548916",
"0.54890543",
"0.5480613",
"0.5475995",
"0.5475995",
"0.5475995",
"0.5457622",
"0.5452235",
"0.544789",
"0.544789",
"0.544789",
"0.5439663",
"0.5438262",
"0.5434881",
"0.5433882",
"0.5428125",
"0.5425287",
"0.5419842",
"0.5413257",
"0.53986716",
"0.5389886",
"0.53865445",
"0.5383",
"0.5382887",
"0.53807247",
"0.53807247",
"0.53747"
]
| 0.0 | -1 |
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value. | @Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getArn() != null)
sb.append("Arn: ").append(getArn()).append(",");
if (getUserName() != null)
sb.append("UserName: ").append("***Sensitive Data Redacted***").append(",");
if (getEnabled() != null)
sb.append("Enabled: ").append(getEnabled()).append(",");
if (getStatus() != null)
sb.append("Status: ").append(getStatus()).append(",");
if (getFirstName() != null)
sb.append("FirstName: ").append("***Sensitive Data Redacted***").append(",");
if (getLastName() != null)
sb.append("LastName: ").append("***Sensitive Data Redacted***").append(",");
if (getCreatedTime() != null)
sb.append("CreatedTime: ").append(getCreatedTime()).append(",");
if (getAuthenticationType() != null)
sb.append("AuthenticationType: ").append(getAuthenticationType());
sb.append("}");
return sb.toString();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String toString() { return stringify(this, true); }",
"@Override\n public String toString() {\n return new JSONSerializer().serialize(this);\n }",
"public String toString() {\n\t\treturn this.toJSON().toString();\n\t}",
"public String toString() {\n\t\treturn this.toJSON().toString();\n\t}",
"@Override\n public String toString() {\n // TODO: Using Serializer\n return Serializer.toByteArray(this).toString();\n }",
"@Override\n public String toString() {\n return new Gson().toJson(this);\n }",
"@Override\n public String toString() {\n ObjectMapper mapper = new ObjectMapper();\n try {\n return mapper.writeValueAsString(this);\n } catch (JsonProcessingException e) {\n return null;\n }\n }",
"@Override\n public String toString() {\n return new GsonBuilder().serializeNulls().create().toJson(this).toString();\n }",
"public String toString() {\n StringWriter writer = new StringWriter();\n this.write(writer);\n return writer.toString();\n }",
"@Override\n public String toString() {\n return gson.toJson(this);\n }",
"@Override\n public String toString() {\n final Map<String, Object> augmentedToStringFields = Reflect.getStringInstanceVarEntries(this);\n augmentToStringFields(augmentedToStringFields);\n return Reflect.joinStringMap(augmentedToStringFields, this);\n }",
"@Override\n\tpublic String toString() {\n\t\treturn toStringBuilder(new StringBuilder()).toString();\n\t}",
"@Override\r\n public String toString() {\r\n return JsonSerializer.SerializeObject(this);\r\n }",
"@Override\n public String toString() {\n return JsonSerializer.SerializeObject(this);\n }",
"@Override\n public String toString() {\n return JsonSerializer.SerializeObject(this);\n }",
"@Override\n public String toString() {\n return JsonSerializer.SerializeObject(this);\n }",
"@Override()\n public String toString()\n {\n final StringBuilder buffer = new StringBuilder();\n toString(buffer);\n return buffer.toString();\n }",
"@Override\n public String toString() {\n // TODO this is a sudo method only for testing puroposes\n return \"{name: 5aled, age:15}\";\n }",
"public String toString()\n\t{\n\t\treturn Printer.stringify(this, false);\n\t}",
"public String serialize() {\n Gson gson = new Gson();\n return gson.toJson(this);\n }",
"public String serialize() {\n Gson gson = new Gson();\n return gson.toJson(this);\n }",
"public String toString() {\n\t\t//TODO add your own field name here\t\t\n\t\t//return buffer.append(this.yourFieldName).toString();\n\t\treturn \"\";\n\t}",
"public String toString() {\n\t\treturn toString(true);\n\t}",
"public String toString() {\n return ToStringBuilder.reflectionToString(this);\n }",
"@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getName() != null)\n sb.append(\"Name: \").append(getName()).append(\",\");\n if (getPhoneNumber() != null)\n sb.append(\"PhoneNumber: \").append(\"***Sensitive Data Redacted***\").append(\",\");\n if (getEmail() != null)\n sb.append(\"Email: \").append(\"***Sensitive Data Redacted***\").append(\",\");\n if (getIdentificationNumber() != null)\n sb.append(\"IdentificationNumber: \").append(getIdentificationNumber()).append(\",\");\n if (getIdentificationExpirationDate() != null)\n sb.append(\"IdentificationExpirationDate: \").append(getIdentificationExpirationDate()).append(\",\");\n if (getIdentificationIssuingOrg() != null)\n sb.append(\"IdentificationIssuingOrg: \").append(getIdentificationIssuingOrg()).append(\",\");\n if (getDevicePickupId() != null)\n sb.append(\"DevicePickupId: \").append(getDevicePickupId());\n sb.append(\"}\");\n return sb.toString();\n }",
"@Override\n\tpublic String toString() {\n\t\ttry {\n\t\t\treturn this.toJSONString(0);\n\t\t} catch (Exception e) {\n\t\t\treturn null;\n\t\t}\n\t}",
"@Override\n public String toString() {\n String str = \"\";\n\n //TODO: Complete Method\n\n return str;\n }",
"@Override\n\tpublic String toString() {\n\t\treturn toText();\n\t}",
"@Override\r\n\tpublic String toString() {\n\t\tString str = \"\";\r\n\t\treturn str;\r\n\t}",
"@Override\n public String toString() {\n Gson gson = new Gson();\n\n String json = gson.toJson(this);\n System.out.println(\"json \\n\" + json);\n return json;\n }",
"@Override\n public String toString() {\n return toString(false, true, true, null);\n }",
"@Override\r\n\tpublic String toString() {\n\t\treturn JSONObject.toJSONString(this);\r\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn Json.pretty( this );\n\t}",
"public String toString() {\n\t\treturn toString(this);\n\t}",
"@Override\n public final String toString() {\n return asString(0, 4);\n }",
"@Override\n public String toString() {\n return MoreObjects.toStringHelper(this) //\n .add(\"name\", getName()) //\n .add(\"phNumber\", getPhNumber()) //\n .add(\"emailId\", getEmailId()) //\n .add(\"parent\", getParent()) //\n .toString();\n }",
"public java.lang.String toString() {\n return this.stringValue;\n }",
"@Override\r\n\tpublic String toString() {\r\n\t\treturn MoreObjects.toStringHelper(this) //\r\n\t\t\t\t.add(\"id\", getId()) //\r\n\t\t\t\t.add(\"parameter\", getParameter()) //\r\n\t\t\t\t.add(\"value\", getValue()) //\r\n\t\t\t\t.add(\"hieraAddress\", getHieraAddress()) //\r\n\t\t\t\t.toString();\r\n\t}",
"public String toString() {\n StringBuilder stringBuilder = new StringBuilder(40);\n stringBuilder.append(\"property '\").append(this.getName()).append(\"' (\");\n if (this._accessorMethod != null) {\n stringBuilder.append(\"via method \").append(this._accessorMethod.getDeclaringClass().getName()).append(\"#\").append(this._accessorMethod.getName());\n } else {\n stringBuilder.append(\"field \\\"\").append(this._field.getDeclaringClass().getName()).append(\"#\").append(this._field.getName());\n }\n if (this._serializer == null) {\n stringBuilder.append(\", no static serializer\");\n } else {\n stringBuilder.append(\", static serializer of type \" + this._serializer.getClass().getName());\n }\n stringBuilder.append(')');\n return stringBuilder.toString();\n }",
"@Override\n\tpublic String toString()\n\t{\n\t\treturn this.str;\n\t}",
"@Override\n public String toString() {\n byte[] buffer = toBuffer();\n return (buffer == null) ? null : new String(buffer, StandardCharsets.UTF_8);\n }",
"@Override\n public String toString() {\n return (this.str);\n }",
"public String toString()\n\t{\n\t\tString result = \"\";\n\t\tresult += this.data;\n\t\treturn result;\n\t}",
"@Override\n public String toString()\n {\n StringBuilder builder = new StringBuilder();\n dump(builder, 0, '\\'');\n return builder.toString();\n }",
"@Override\n\tpublic String toString() {\n\t\treturn JSON.toJSONString(this,SerializerFeature.WriteMapNullValue,\n\t\t\t\tSerializerFeature.WriteNonStringKeyAsString,\n\t\t\t\tSerializerFeature.WriteNullListAsEmpty,\n\t\t\t\tSerializerFeature.WriteNullNumberAsZero,\n\t\t\t\tSerializerFeature.WriteNullStringAsEmpty);\n\t}",
"@Override\n\tpublic String toString() {\n\t\tif (repr == null)\n\t\t\trepr = toString(null);\n\n\t\treturn repr;\n\t}",
"public String toString() {\n\treturn createString(data);\n }",
"public String toString() {\n\t\t\tif (this.getKey() == null) {\n\t\t\t\treturn \"\";\n\t\t\t} else {\n\t\t\t\treturn \"Key:\" + this.getKey() + \" Value:\" + this.getValue();\n\t\t\t}\n\t\t}",
"@Override\n public String toString() {\n return mString;\n }",
"public String toString() {\n return toDisplayString();\n }",
"public java.lang.String toString()\n {\n return this.stringValue;\n }",
"public String toString() {\n StringBuffer buffer = new StringBuffer();\n\n buffer.append(getClass().getName());\n buffer.append(\"@\");\n buffer.append(Integer.toHexString(hashCode()));\n buffer.append(\" [\");\n buffer.append(objectToString(\"Id\", getId()));\n buffer.append(objectToStringFK(\"Project\", getProject()));\n buffer.append(objectToStringFK(\"User\", getUser()));\n buffer.append(objectToString(\"Status\", getStatus()));\n buffer.append(objectToString(\"LastActivityDate\", getLastActivityDate()));\n buffer.append(objectToString(\"HasPiSeen\", getHasPiSeen()));\n buffer.append(objectToString(\"HasDpSeen\", getHasDpSeen()));\n buffer.append(objectToString(\"HasAdminSeen\", getHasAdminSeen()));\n buffer.append(objectToString(\"HasRequestorSeen\", getHasRequestorSeen()));\n buffer.append(objectToString(\"EmailStatus\", getEmailStatus()));\n buffer.append(\"]\");\n\n return buffer.toString();\n }",
"public String toString() {\r\n\t\treturn \"Name: \" + getName() + \" Phone: \" + phoneNumber + \" Email: \" + email;\r\n\t\t\r\n\t}",
"public String toString() {\n\t\treturn EPPUtil.toString(this);\n\t}",
"public String toString() {\n\t\treturn EPPUtil.toString(this);\n\t}",
"@Override\n public String toString() {\n return string;\n }",
"@Override\r\n\tpublic String toString() {\n\t\treturn value + \"\";\r\n\t}",
"@Override\n public final String toString() {\n return this.value;\n }",
"public String toString() {\n\t\treturn toString(0, 0);\n\t}",
"@Override\r\n\tpublic String toString() {\n\t\treturn \"\";\r\n\t}",
"@Override\n public String toString() {\n ByteArrayOutputStream bs = new ByteArrayOutputStream();\n PrintStream out = new PrintStream(bs);\n output(out, \"\");\n return bs.toString();\n }",
"@Override\n\tpublic String toString() {\n\t\treturn toJSON().toString();\n\t}",
"public String toString() {\r\n\t\treturn \"Name: \" + name + \"\\nAddress: \" + addr + \"\\n\" + city + \"\\n\"\r\n\t\t\t\t+ state + \"\\n\" + zip + \"\\nPhone: \" + phone + \"\\nId: \" + id\r\n\t\t\t\t+ \"\\nMajor: \" + major + \"\\nGPA: \" + gpa;\r\n\t}",
"public synchronized String toString() {\n StringBuffer oBuffer = new StringBuffer();\n\n oBuffer\n .append(\"Preprocessing params: \").append(this.oPreprocessingParams).append(\"\\n\")\n .append(\"Feature extraction params: \").append(this.oFeatureExtractionParams).append(\"\\n\")\n .append(\"Classification params: \").append(this.oClassificationParams);\n\n return oBuffer.toString();\n }",
"public String toString() {\r\n\t\treturn \"Name: \" + getName() + \"\\nAddress: \" + getAddress() + \"\\nPhone Number: \" + getPhoneNumber();\r\n\t}",
"@Override String toString();",
"@Override\n\tpublic String toString() {\n\t\treturn \"\";\n\t}",
"@Override\n public String toString() {\n return value();\n }",
"@Override\n\tpublic String toString() {\n\t\treturn this.toAnticipatedString();\n\t}",
"public String toString(){\r\n\t\tString superString = super.toString();\r\n\t\tStringBuilder builder = new StringBuilder();\r\n\t\t//Add the object to the string\r\n\t\tbuilder.append(\". \");\r\n\t\tif (this.error != null) {\r\n\t\t\tbuilder.append(error.toString());\r\n\t\t\tbuilder.append(\". \");\r\n\t\t}\r\n\t\tbuilder.append(\"Object: \");\r\n\t\tbuilder.append(object.toString());\r\n\t\tif (this.recordRoute)\r\n\t\t\tbuilder.append(\", [RECORD_ROUTE]\");\r\n\t\tif (this.reRouting) \r\n\t\t\tbuilder.append(\", [RE-ROUTING]\");\r\n\t\t//Add the masks to the string\r\n\t\tif (this.mask != null) {\r\n\t\t\tbuilder.append(\", label set: \");\r\n\t\t\tbuilder.append(mask.toString());\r\n\t\t}\r\n\t\treturn superString.concat(builder.toString());\r\n\t}",
"@Override\n public String toString() {\n try {\n return new ObjectMapper().writeValueAsString(this);\n } catch (final JsonProcessingException ioe) {\n return ioe.getLocalizedMessage();\n }\n }",
"public String toString()\r\n\t{\r\n\t\treturn toCharSequence().toString();\r\n\t}",
"public String toString() {\n\t\treturn \"{\\\"username\\\":\\\"\" + this.username + \"\\\",\\\"apiKey\\\":\\\"\"\n\t\t\t\t+ this.apiKey + \"\\\",\\\"apiSecret:\\\"\" + this.apiSecret\n\t\t\t\t+ \"\\\",\\\"nonce:\\\"\" + this.nonce + \"\\\"}\";\n\t}",
"@Override\n public String toString() {\n return Objects.toStringHelper(this)\n .addValue(this.id)\n .addValue(this.name)\n .addValue(this.author)\n .addValue(this.description)\n .addValue(this.pictureOfCover)\n .toString();\n }",
"public String getAsString() {\n\t\treturn new String(this.getAsBytes());\n\t}",
"@Override\n public String toString() {\n return toStringHelper(this)\n .addValue(id)\n .addValue(firstName)\n .addValue(lastName)\n .addValue(email)\n .addValue(activities)\n .addValue(password).toString();\n }",
"public String toString() {\n return \"\" + data;\n }",
"public String toString()\r\n\t{\r\n\t\tStringBuffer OutString = new StringBuffer();\r\n\t\t// Open tag\r\n\t\tOutString.append(\"<\");\r\n\t\t// Add the object's type\r\n\t\tOutString.append(getType());\r\n\t\t// attach the ID if required.\r\n\t\tif (DEBUG)\r\n\t\t\tOutString.append(getObjID());\r\n\t\t// add the class attribute if required; default: don't.\r\n\t\tif (getIncludeClassAttribute() == true)\r\n\t\t\tOutString.append(getClassAttribute());\r\n\t\t// Add any transformation information,\r\n\t\t// probably the minimum is the x and y values.\r\n\t\t// again this is new to Java 1.4;\r\n\t\t// this function returns a StringBuffer.\r\n\t\tOutString.append(getAttributes());\r\n\t\t// close the tag.\r\n\t\tOutString.append(\">\");\r\n\t\tOutString.append(\"&\"+entityReferenceName+\";\");\r\n\t\t// close tag\r\n\t\tOutString.append(\"</\");\r\n\t\tOutString.append(getType());\r\n\t\tOutString.append(\">\");\r\n\r\n\t\treturn OutString.toString();\r\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn new StringBuilder()\n\t\t\t.append(this.getClass().getSimpleName())\n\t\t\t.append(\" { id:\").append(id)\n\t\t\t.append(\", version:\").append(version)\n\t\t\t.append(\" }\")\n\t\t\t.toString();\n\t}",
"public String toString() {\n\t\treturn (getValue().toString());\r\n\t}",
"public String toString() {\n StringBuffer buffer = new StringBuffer();\n\n buffer.append(getClass().getName());\n buffer.append(\"@\");\n buffer.append(Integer.toHexString(hashCode()));\n buffer.append(\" [\");\n buffer.append(objectToString(\"Id\", getId()));\n buffer.append(objectToString(\"ProjectName\", getProjectName()));\n buffer.append(objectToStringFK(\"DataProvider\", getDataProvider()));\n buffer.append(objectToStringFK(\"PrimaryInvestigator\", getPrimaryInvestigator()));\n buffer.append(objectToStringFK(\"CreatedBy\", getCreatedBy()));\n buffer.append(objectToString(\"CreatedTime\", getCreatedTime()));\n buffer.append(\"]\");\n\n return buffer.toString();\n }",
"public String toString ( ) {\r\n String returnString = _name + \"{ id: \" + _uniqueID + \" pos: [\"+ getPosition().getPosition() + \"] }\";\r\n return returnString;\r\n }",
"public String toString() {\n String output = \"\\nName: \" + name;\n output += \"\\nType: \" + type;\n output += \"\\nContact Details: \" + contactNo;\n output += \"\\nEmail address: \" + email;\n output += \"\\nResidentail Address: \" + address;\n\n return output;\n }",
"@Override \n\tpublic String toString() {\n\t\treturn stringForm;\n\t}",
"@Override public String toString();",
"@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\" {\");\n sb.append(\" \\\"fileid\\\":\\\"\").append(fileid);\n sb.append(\", \\\"filename\\\":\\\"\").append(filename);\n sb.append(\", \\\"fileupdate\\\":\\\"\").append(fileupdate);\n sb.append(\", \\\"filepath\\\":\\\"\").append(filepath);\n sb.append(\", \\\"fileuploader\\\":\\\"\").append(fileuploader);\n sb.append(\", \\\"isdelete\\\":\\\"\").append(isdelete);\n sb.append(\", \\\"filedesc\\\":\\\"\").append(filedesc);\n sb.append(\", \\\"filetype\\\":\\\"\").append(filetype);\n sb.append(\"\\\"}\");\n return sb.toString();\n }",
"public final String toString() {\n\t\tStringWriter write = new StringWriter();\n\t\tString out = null;\n\t\ttry {\n\t\t\toutput(write);\n\t\t\twrite.flush();\n\t\t\tout = write.toString();\n\t\t\twrite.close();\n\t\t} catch (UnsupportedEncodingException use) {\n\t\t\tuse.printStackTrace();\n\t\t} catch (IOException ioe) {\n\t\t\tioe.printStackTrace();\n\t\t}\n\t\treturn (out);\n\t}",
"public String toString() {\n\t\tByteArrayOutputStream bos = new ByteArrayOutputStream();\n\n\t\tDocument document = XMLUtils.newDocument();\n\t\tdocument.appendChild(toXML(document));\n\t\tXMLUtils.write(bos, document);\n\n\t\treturn bos.toString();\n\t}",
"public String toString() {\n\t\treturn super.toString();\n\t\t// This gives stack overflows:\n\t\t// return ToStringBuilder.reflectionToString(this);\n\t}",
"public String toString() {\n\t\treturn String.format(\"%s\\nID: %d\\nDescription: %s\\n\", name.toUpperCase(), id, description); \n\t}",
"public String toString() {\r\n String result = \"Name: \" + name + \"\\n\";\r\n\r\n result += \"Address: \" + address + \"\\n\";\r\n result += \"Phone: \" + phone;\r\n\r\n return result;\r\n }",
"@Override\n public String toString() {\n return \"\" + this.value;\n }",
"public String toString()\n\t{\n\t\treturn String.format(\"%-25s%-15s\\n%-25s%-15s\\n%-25s%-15s\\n%-25s%-15d\\n%-25s%-15s\\n%-25s$%,-13.2f\", \n\t\t\t\t \t\t \t \"Name\", this.getName(), \"Address:\", this.getAddress(), \"Telephone number:\", this.getTelephone(), \n\t\t\t\t \t\t \t \"Customer Number:\", this.getCustNum(), \"Email notifications:\", this.getSignedUp() == true ? \"Yes\" : \"No\",\n\t\t\t\t \t\t \t \"Purchase amount:\", this.getCustomerPurchase());\n\t}",
"public String toString() {\n\t\treturn str;\n\t}",
"public String toString() {\n return String.format(mFormat,\n format(mManufacturer),\n format(mBrand),\n format(mModel),\n mResolution,\n mDensity,\n mAndroidDensity,\n mVersion,\n mSdk,\n mLanguage);\n }",
"@Override\r\n public String toString() {\r\n return toSmartText().toString();\r\n }",
"@Override\n public String toString()\n {\n return this.toLsString();\n }",
"public String toString()\n {\n return this.string;\n }",
"@Override\n public String toString() {\n return Helper.concat(this.getClass().getName(), \"{\",\n \"id:\", getId(),\n \", name:\", getName(),\n \", positions:\", positions,\n \", resourceRoles:\", resourceRoles,\n \"}\");\n }",
"@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getVersion() != null)\n sb.append(\"version: \").append(getVersion()).append(\",\");\n if (getResource() != null)\n sb.append(\"resource: \").append(getResource()).append(\",\");\n if (getPath() != null)\n sb.append(\"path: \").append(getPath()).append(\",\");\n if (getHttpMethod() != null)\n sb.append(\"httpMethod: \").append(getHttpMethod()).append(\",\");\n if (getHeaders() != null)\n sb.append(\"headers: \").append(getHeaders().toString()).append(\",\");\n if (getMultiValueHeaders() != null)\n sb.append(\"multiValueHeaders: \").append(getMultiValueHeaders().toString()).append(\",\");\n if (getQueryStringParameters() != null)\n sb.append(\"queryStringParameters: \").append(getQueryStringParameters().toString()).append(\",\");\n if (getMultiValueQueryStringParameters() != null)\n sb.append(\"multiValueQueryStringParameters: \").append(getMultiValueQueryStringParameters().toString()).append(\",\");\n if (getPathParameters() != null)\n sb.append(\"pathParameters: \").append(getPathParameters().toString()).append(\",\");\n if (getStageVariables() != null)\n sb.append(\"stageVariables: \").append(getStageVariables().toString()).append(\",\");\n if (getRequestContext() != null)\n sb.append(\"requestContext: \").append(getRequestContext().toString()).append(\",\");\n if (getBody() != null)\n sb.append(\"body: \").append(getBody()).append(\",\");\n if (getIsBase64Encoded() != null)\n sb.append(\"isBase64Encoded: \").append(getIsBase64Encoded());\n sb.append(\"}\");\n return sb.toString();\n }",
"public String toString() {\n return \"\";\n }"
]
| [
"0.80985874",
"0.80732197",
"0.8047513",
"0.8047513",
"0.8024033",
"0.79729897",
"0.7937434",
"0.79279774",
"0.7910009",
"0.7893946",
"0.77830815",
"0.7782138",
"0.77671623",
"0.7766482",
"0.7766482",
"0.7766482",
"0.7755718",
"0.77268595",
"0.7722678",
"0.7674297",
"0.7674297",
"0.76681435",
"0.76526856",
"0.76505053",
"0.7642501",
"0.7642076",
"0.76359296",
"0.7633344",
"0.76215285",
"0.76207054",
"0.7617713",
"0.7597116",
"0.7588771",
"0.75885665",
"0.755378",
"0.7536821",
"0.7535371",
"0.75304365",
"0.7525412",
"0.75252604",
"0.752022",
"0.75057673",
"0.7499074",
"0.7475128",
"0.74524856",
"0.7421566",
"0.7420364",
"0.7417442",
"0.7417213",
"0.7416235",
"0.7412045",
"0.7405539",
"0.74030536",
"0.74027884",
"0.74027884",
"0.7394859",
"0.7393656",
"0.7393531",
"0.73907864",
"0.7388064",
"0.7377053",
"0.73759604",
"0.73701817",
"0.7360588",
"0.73588043",
"0.73478115",
"0.73409235",
"0.7339499",
"0.7333856",
"0.7328081",
"0.73267305",
"0.73266727",
"0.7321378",
"0.73182285",
"0.73138624",
"0.7312766",
"0.73112106",
"0.72998244",
"0.7293567",
"0.72908014",
"0.729058",
"0.7290412",
"0.7287041",
"0.7277845",
"0.72748864",
"0.7274324",
"0.72721386",
"0.7260385",
"0.7259722",
"0.72576416",
"0.7255941",
"0.724944",
"0.7248274",
"0.7246941",
"0.7244847",
"0.72406876",
"0.7239322",
"0.7237533",
"0.7236298",
"0.7231221",
"0.7224654"
]
| 0.0 | -1 |
Connect GUI and ACTIVITY | private void setOnClickListeners() {
progressBar = (ProgressBar) findViewById(R.id.progressBar);
progressBar.setMax(100);
progressBar.setIndeterminate(false);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void initAndShowGUI() {\n }",
"public GUI() {\n app = new Aplikasi();\n initComponents();\n }",
"void onConnected() {\n closeFab();\n\n if (pendingConnection != null) {\n // it'd be null for dummy connection\n historian.connect(pendingConnection);\n }\n\n connections.animate().alpha(1);\n ButterKnife.apply(allViews, ENABLED, true);\n startActivity(new Intent(this, ControlsActivity.class));\n }",
"private void setupGUI() {\n\t\tcollapsingToolbarLayout = (CollapsingToolbarLayout) findViewById(R.id.collapsingToolbarLayout);\n\t\tlogo = (SmartImageView) findViewById(R.id.logoo);\n\t\tnomePosto = (TextView) findViewById(R.id.nomeposto);\n\t\tdescrizione = (TextView) findViewById(R.id.descrizioneposto);\n\t\twebsite = (TextView) findViewById(R.id.websiteposto);\n\t\tnumtelefono = (TextView) findViewById(R.id.telefonoposto);\n\t\tcitta = (TextView) findViewById(R.id.cittaposto);\n\t\tbtnMappa = (FloatingActionButton) findViewById(R.id.fabbuttonmappa);\n\t\tgallery = (LinearLayout) findViewById(R.id.gallery);\n\t\tgalleryContainer = (CardView) findViewById(R.id.cv1);\n\t\t// rvofferte = (RecyclerView) findViewById(R.id.rvofferte);\n\t\t// LinearLayoutManager llm = new\n\t\t// LinearLayoutManager(DetPlaActivity.this);\n\t\t// rvofferte.setLayoutManager(llm);\n\t\t// rvofferte.setSaveEnabled(false);\n\t}",
"protected void iniciarGUI()\n {\n \tiniciarLayout();\n\n mUILayout.setVisibility(View.VISIBLE);\n mUILayout.setBackgroundColor(Color.BLACK);\n\n mDialogoDetectando = mUILayout.findViewById(R.id.loading_indicator);\n mTextoDetectando = mUILayout.findViewById(R.id.textoDetectando);\n }",
"public abstract void initUiAndListener();",
"public void start() {\n SetupGUI setup = new SetupGUI();\n }",
"public window() {\n initComponents();\n letras();\n ArduinoConnection();\n }",
"private static void createAndShowGUI() {\n\t\tgui = new GUI();\n\t}",
"private void createAndShowGUI (){\n\n JustawieniaPowitalne = new JUstawieniaPowitalne();\n }",
"public ConnectToServerGUI() {\n super(\"Connect to Server\");\n initComponents();\n setVisible(true);\n }",
"private void setupGUI() {\r\n\t\tnetPaintClient = new NetPaintClient(out, clientName);\t\r\n\t\tnetPaintClient.addWindowListener(new WindowAdapter(){\r\n\t\tpublic void windowClosing(WindowEvent arg0) {\r\n\t\t\ttry {\r\n\t\t\t\tout.writeObject(new DisconnectCommand(clientName));\r\n\t\t\t\tout.close();\r\n\t\t\t\tin.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}\r\n\t});\r\n\t}",
"private void initGui() {\n initSeekBar();\n initDateFormatSpinner();\n GuiHelper.defineButtonOnClickListener(view, R.id.settings_buttonSave, this);\n\n }",
"public History_GUI(){\n super();\n InitializeComponents();\n ConfigureWin();\n\n }",
"public void initGui() {\r\n\t\tEventQueue.invokeLater(new Runnable() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tGuiWindow window = new GuiWindow(Controller.this);\r\n\t\t\t\t\tlinkedGuiWindow = window;\r\n\t\t\t\t\twindow.setVisible(true);\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}",
"public void connecting_screen() {\r\n\t\tclear_screen();\r\n\t\tJLabel connect = new JLabel(\"Connexion au serveur en cours, merci de patienter...\", SwingConstants.CENTER);\r\n\t\tconnect.setFont(new Font(\"Calibri\", Font.BOLD, 50));\r\n\t\tconnect.setBounds(0, 325, 1280, 60);\r\n\t\tthis.add(connect);\r\n\t}",
"public GUI() {\n initComponents();\n model = new Model();\n playerTurn = 1;\n JTurnMessage.setText(\"Player X Turn\");\n }",
"public void initGui()\n {\n StringTranslate var2 = StringTranslate.getInstance();\n int var4 = this.height / 4 + 48;\n\n this.controlList.add(new GuiButton(1, this.width / 2 - 100, var4 + 24 * 1, \"Offline Mode\"));\n this.controlList.add(new GuiButton(2, this.width / 2 - 100, var4, \"Online Mode\"));\n\n this.controlList.add(new GuiButton(3, this.width / 2 - 100, var4 + 48, var2.translateKey(\"menu.mods\")));\n\t\tthis.controlList.add(new GuiButton(0, this.width / 2 - 100, var4 + 72 + 12, 98, 20, var2.translateKey(\"menu.options\")));\n\t\tthis.controlList.add(new GuiButton(4, this.width / 2 + 2, var4 + 72 + 12, 98, 20, var2.translateKey(\"menu.quit\")));\n this.controlList.add(new GuiButtonLanguage(5, this.width / 2 - 124, var4 + 72 + 12));\n }",
"private void initGui(){\n // TODO: add code for GUI initialization for a given auction\n }",
"public void setupGui(){\n \t\n \t w1 = (RadioButton) guiView.findViewById(R.id.w1); \t\t \n \t w2 = (RadioButton) guiView.findViewById(R.id.w2);\n \t w3 = (RadioButton) guiView.findViewById(R.id.w3);\n \t w4 = (RadioButton) guiView.findViewById(R.id.w4);\n \t pb = (Button) guiView.findViewById(R.id.paint_button);\n \t plus = (Button) guiView.findViewById(R.id.plus_button);\n \t minus = (Button) guiView.findViewById(R.id.minus_button);\n \t \n \t \n \t //model select listener\n \t lis =new View.OnClickListener(){\n \t\t \n public void onClick(View v){\n \t RadioButton b = (RadioButton)v;\n \t String tmp=b.getHint().toString();\n \t int i = Integer.parseInt(tmp);\n \t setModel(i); \n }\n };\n w1.setOnClickListener(lis);\n w2.setOnClickListener(lis);\n w3.setOnClickListener(lis);\n w4.setOnClickListener(lis);\n \n w1.setHintTextColor(Color.TRANSPARENT);\n w2.setHintTextColor(Color.TRANSPARENT);\n w3.setHintTextColor(Color.TRANSPARENT);\n w4.setHintTextColor(Color.TRANSPARENT);\n \n w1.setChecked(true);\n \n //paint button listener\n pb.setOnClickListener(new View.OnClickListener(){\n public void onClick(View v){ \t \n \t paintWheel();\t \n }\n }); \n \n //plus button listener\n plus.setOnClickListener(new View.OnClickListener(){\n public void onClick(View v){ \t \n \t scaleUp();\t \n }\n }); \n \n //minus button listener\n minus.setOnClickListener(new View.OnClickListener(){\n public void onClick(View v){ \t \n \t scaleDown();\t \n }\n }); \n }",
"private GUI()\n {\n makeGUI();\n }",
"private void ConnectDialog(){\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);\n\t\tbuilder.setIcon(R.mipmap.ic_launcher);\n\t\tbuilder.setTitle(\"请输入主机名称和密码\");\n\t\t// 通过LayoutInflater来加载一个xml的布局文件作为一个View对象\n\t\tView view = LayoutInflater.from(MainActivity.this).inflate(R.layout.dialog, null);\n\t\t// 设置我们自己定义的布局文件作为弹出框的Content\n\t\tbuilder.setView(view);\n\n\t\tfinal EditText username = (EditText)view.findViewById(R.id.username);\n\t\tfinal EditText password = (EditText)view.findViewById(R.id.password);\n\n\t\tbuilder.setPositiveButton(\"确定\", new DialogInterface.OnClickListener()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which)\n\t\t\t{\n\t\t\t\tString a = username.getText().toString().trim();\n\t\t\t\tString b = password.getText().toString().trim();\n\n\t\t\t\tSwitchToSlaveRemoteController(a,b);\n\t\t\t}\n\t\t});\n\t\tbuilder.setNegativeButton(\"取消\", new DialogInterface.OnClickListener()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which)\n\t\t\t{\n\n\t\t\t}\n\t\t});\n\t\tbuilder.show();\n\t}",
"public SchoolTourGUI() {\n initComponents();\n getConnection();\n }",
"public void ChatGUI() {\n try {\n\n DataOutputStream out = new DataOutputStream(socket.getOutputStream());\n DataInputStream in = new DataInputStream(socket.getInputStream());\n out.writeUTF(\"Connmain\");\n String message = in.readUTF();\n if (message.equals(\"Conf\")) {\n ObjectInputStream inOb = new ObjectInputStream(socket.getInputStream());\n ArrayList<String> chatlog = (ArrayList<String>) inOb.readObject();\n\n new ChatGUI().start(stage, this, socket, chatlog);\n }\n } catch (IOException | ClassNotFoundException e) {\n e.printStackTrace();\n }\n }",
"void userPressConnectButton();",
"private void handleUI() {\r\n // Start/stop camera\r\n btnCam.setOnAction(new EventHandler<ActionEvent>() {\r\n @Override\r\n public void handle(ActionEvent e) {\r\n if (!camRunning) {\r\n videoStream = new ClientVideoStream(imageView);\r\n videoThread = new Thread(videoStream);\r\n videoThread.start();\r\n new Thread(new Client(MsgType.START_VIDEO_STREAM)).start();\r\n btnCam.setText(\"Stop camera\");\r\n camRunning = true;\r\n }\r\n else {\r\n btnCam.setText(\"Stop camera\");\r\n try {\r\n videoStream.terminate();\r\n } catch (Exception ex) {\r\n System.out.println(\"Failed to stop camera\");\r\n }\r\n camRunning = false;\r\n }\r\n }\r\n });\r\n // Toggle man/auto\r\n btnManAut.setOnAction(new EventHandler<ActionEvent>() {\r\n @Override\r\n public void handle(ActionEvent e) {\r\n if (manualMode) {\r\n new Thread(new Client(MsgType.MANUAL)).start();\r\n btnManAut.setText(\"Manual\");\r\n }\r\n else {\r\n new Thread(new Client(MsgType.AUTO)).start();\r\n btnManAut.setText(\"Auto\");\r\n }\r\n manualMode = !manualMode;\r\n }\r\n });\r\n }",
"public GUI_Edit_Tour(){\n init();\n }",
"public ExecutantGui() {\n initComponents();\n }",
"public void setupUI() {\n users = (Button) findViewById(R.id.btnUtilisateur);\n services = (Button) findViewById(R.id.btnServices);\n }",
"private void initJoin() {\n\n\t\tthis.setResizable(false);\n\t\tthis.setSize(400, 155);\n\t\tthis.setLocationRelativeTo(null);\n\t\tthis.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);\n\n\t\tJPanel panNom = addPannelName();\n\t\tJPanel panPass = addPannelPassword();\n\n\t\tJPanel content = new JPanel();\n\n\t\tcontent.add(panNom);\n\t\tcontent.add(panPass);\n\n\t\tJPanel control = new JPanel();\n\n\t\tJButton okBouton = addOKButton();\n\t\tJButton cancelButton = addCancelButton();\n\n\t\tcontrol.add(okBouton);\n\t\tcontrol.add(cancelButton);\n\n\t\tthis.getContentPane().add(content, BorderLayout.NORTH);\n\t\tthis.getContentPane().add(control, BorderLayout.SOUTH);\n\t}",
"protected void initializeGUI() {\n\n\t}",
"public Main_Window() {\n initComponents();\n getConnection();\n //Show_database();\n }",
"public void showGui()\n {\n // TODO\n }",
"public NewSessionGui() {\n initComponents();\n client = new HttpBraimClient();\n setLocationRelativeTo(null);\n }",
"public AplicationGUI() {\n initComponents();\n }",
"private GuiTest() {\n // Load custom resources (fonts, etc.)\n ResourceLoader.loadResources();\n\n // Load the user accounts into the system\n UserController.getInstance().loadUsers();\n\n // Set up GuiController and the main window.\n GuiController.instantiate(1280, 720, \"FPTS\");\n\n char[] password = {'p', 'a', 's', 's', 'w', 'o', 'r', 'd'};\n UserController.getInstance().login(\"rhochmuth\", password);\n\n // Show the screen/window\n PortfolioController.getInstance().showAddHoldingView();\n GuiController.getInstance().showWindow();\n\n // Load the market information and update it every 2 minutes\n MarketController.getInstance().StartTimer();\n }",
"public void setLaunchPage() {\n resetLaunchPageStatus();\n\n // set recognised ssid\n ssidLabel.setVisible(true);\n Color backColor = rootPanel.getBackground();\n int backRed = backColor.getRed();\n int backGreen = backColor.getGreen();\n int backBlue = backColor.getBlue();\n new Thread(() -> {\n try {\n int j=backGreen,k=backBlue;\n for(int i=backRed;i>0&&retStatus==-1;i-=3){\n j-=3;k-=3;\n if(j < 0) j=0;\n if(k < 0) k=0;\n ssidLabel.setForeground(new Color(i,j,k));\n sleep(100);\n }\n } catch (InterruptedException e) {\n System.out.println(e.getMessage());\n }\n }).start();\n\n // set break connection button to visible\n breakConnBtn.setVisible(true);\n registerBtn.setVisible(false);\n\n // set launch status based on login info\n new Thread(() -> {\n try {\n // store img status icon thread to local\n connStatusImgThread = Thread.currentThread();\n // set wifi icons\n int wifiIconIndex = 0;\n int wifiIconLen = wifiLaunchIcons.length;\n ImageIcon connStatusIcon = connectingIcon;\n String connStr = \"正在连接\";\n connectStatusL.setVisible(true);\n connectStatusL.setText(connStr);\n while(retStatus == -1) {\n connectStatusL.setIcon(connStatusIcon);\n wifiIconLabel.setIcon(wifiLaunchIcons[wifiIconIndex]);\n connStatusIcon = (connStatusIcon == connectingIcon ? connectedOpaqueIcon : connectingIcon);\n sleep(600);\n wifiIconIndex = (++wifiIconIndex) % wifiIconLen;\n }\n ssidLabel.setForeground(Color.black);\n if(retStatus == 0) {\n setBreakdownStatus();\n } else if(retStatus == 64) {\n wifiIconLabel.setIcon(wifiLaunchIcons[3]);\n connectStatusL.setIcon(connectedIcon);\n connectStatusL.setText(\"已连接 \");\n // set wallet left value\n setLoginStatus(1);\n //========== do deduction ==========//\n File file = new File(configSetting.getWpaCmdPath().concat(\"/testLeftToken\"));\n BufferedReader leftCoinReader = new BufferedReader(new FileReader(file));\n String leftCoinStr = leftCoinReader.readLine();\n if(! leftCoinStr.contains(\"registerReward\")) {\n //====== read balance from blockchain =====//\n if(Utils.getTestChain()) {\n BufferedReader tokenReader = new BufferedReader(new FileReader(rootPath.concat(\"/wpa_setup/testLeftToken\")));\n BufferedReader coinReader = new BufferedReader(new FileReader(rootPath.concat(\"/wpa_setup/testLeftCoin\")));\n leftToken = Double.valueOf(tokenReader.readLine());\n leftCoin = Double.valueOf(coinReader.readLine());\n// currency.put(\"leftToken\",Double.valueOf(tokenReader.readLine()));\n// currency.put(\"leftCoin\",Double.valueOf(coinReader.readLine()));\n tokenReader.close();\n coinReader.close();\n } else {\n try {\n ProcessBuilder pb = new ProcessBuilder(\n \"node\",\n rootPath.concat(\"/js_contact_chain/get_value.js\")\n );\n pb.redirectErrorStream(true);\n Process process = pb.start();\n BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));\n StringBuilder sb = new StringBuilder();\n String line;\n System.out.println(\"========== get reward from blockchain ==========\");\n // tricky getting coin and token\n while ((line = reader.readLine()) != null) {\n sb.append(line);\n if (Pattern.matches(\"Token:[0-9]*\",line)) {\n leftToken = Double.valueOf(line.split(\":\")[1]);\n// currency.put(\"leftToken\",Double.valueOf(line.split(\":\")[1]));\n }\n if (Pattern.matches(\"Coin:[0-9]*\",line)) {\n leftCoin = Double.valueOf(line.split(\":\")[1]);\n// currency.put(\"leftCoin\",Double.valueOf(line.split(\":\")[1]));\n }\n System.out.println(\"<reward>\" + line + \"<reward>\");\n }\n process.waitFor();\n } catch (IOException e) {\n System.out.println(e.getMessage());\n }\n // deduct 10 coin in backend\n new Thread(() -> {\n int tryout = 3;\n while(tryout > 0) {\n try {\n ArrayList<String> cmd = new ArrayList<>();\n cmd.add(\"node\");\n cmd.add(rootPath.concat(\"/js_contact_chain/client.js\"));\n cmd.add(\"DeductionToken\");\n cmd.add(\"0x01c96e4d9be1f4aef473dc5dcf13d8bd1d4133cd\");\n cmd.add(\"e16a1130062b37f038b9df02f134d7ddd9009c54c62bd92d4ed42c0dba1189a8\");\n cmd.add(\"0xf439bf68fc695b4a62f9e3322c75229ba5a0ff33\");\n ProcessBuilder pb = new ProcessBuilder(cmd);\n Process process = pb.start();\n BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));\n String line;\n // tricky getting data\n boolean isSuccess = false;\n while ((line = reader.readLine()) != null) {\n System.out.println(line);\n if (line.contains(\"status\")) {\n String[] tmpArry = line.split(\":\");\n String status = tmpArry[1];\n status = status.substring(1, status.length() - 1);\n isSuccess = Boolean.valueOf(status);\n }\n }\n if(isSuccess) {\n break;\n }\n System.out.println(\"[ERROR] Transaction failed! Deduct token failed!\");\n process.waitFor();\n } catch (IOException|InterruptedException e) {\n System.out.println(e.getMessage());\n }\n tryout--;\n }\n }).start();\n }\n leftToken = Arith.sub(leftToken,10);\n // record item\n writeRecord(\"-10: 登陆\",tokenHistoryFP);\n } else {\n String[] tmpStr = leftCoinStr.split(\":\");\n leftToken = Double.valueOf(tmpStr[1]);\n leftCoin = 0;\n// currency.put(\"leftToken\",Double.valueOf(tmpStr[1]));\n// currency.put(\"leftCoin\",0.0);\n writeRecord(\"+\"+leftToken+\": 注册\",tokenHistoryFP);\n }\n sleep(200);\n String historyStr = readRecord(historyReadlineNum,tokenHistoryFP);\n tokenHistoryLabel.setText(historyStr);\n } else {\n wifiIconLabel.setIcon(unLaunchIcon);\n connectStatusL.setIcon(unconnectedIcon);\n connectStatusL.setText(\"未连接 \");\n }\n setPageStatus();\n // set login page advertisement\n new Thread(() -> {\n try {\n int adsIndex = 0;\n int adsLen = loginAdsIcons.length;\n while (loginStatus == 1) {\n launchAdsLabel.setIcon(loginAdsIcons[adsIndex]);\n sleep(2500);\n adsIndex = ++adsIndex % adsLen;\n }\n } catch (InterruptedException e) {\n System.out.println(e.getMessage());\n }\n }).start();\n } catch (InterruptedException|IOException ex) {\n System.out.println(ex.getMessage());\n }\n }).start();\n }",
"public GuiController()\n {\n\n DefaultTerminalFactory terminalFactory = new DefaultTerminalFactory();\n PageStack = new ArrayDeque<>(); // Gives us a screen stack\n window = new BasicWindow(\"Just put anything, I don't even care\");\n try\n {\n screen = terminalFactory.createScreen(); //Populates screen\n screen.startScreen(); //Runs screen\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n textGUI = new MultiWindowTextGUI(screen);\n\n }",
"public void connectRobot(View view) {\n Button connectButton = (Button) view;\n LinearLayout robotInfo = (LinearLayout) findViewById(R.id.robotInfo);\n if (networkThread == null || !networkThread.connected()) {\n // Get IP from dropdown list\n Spinner dropdown = (Spinner) findViewById(R.id.robotsDropdown);\n String IP = (String) dropdown.getSelectedItem();\n if (IP == null) {\n return;\n }\n // Start thread with robot connection\n networkThread = NetworkThread.getInstance();\n networkThread.setIP(IP);\n networkThread.setHandler(handler);\n new Thread(networkThread).start();\n\n // Change button text and show robot info if connected\n if (networkThread != null && networkThread.connected()) {\n // Get info from the robot\n JSONObject json = new JSONObject();\n try {\n json.put(\"type\", \"info\");\n } catch (JSONException e) {\n e.printStackTrace();\n }\n networkThread.addToSend(json);\n\n connectButton.setText(\"Disconnect\");\n robotInfo.setVisibility(View.VISIBLE);\n }\n } else {\n // Close thread\n if (networkThread != null) {\n networkThread.closeThread();\n }\n // Change button text and hide robot info\n connectButton.setText(\"Connect\");\n robotInfo.setVisibility(View.INVISIBLE);\n }\n }",
"public GUI(Display display) {\n\t\t/* Init fields */\n\t\tGUI.display = display;\n\t\tGUI.gui = this;\n\t\t// displayThread = Thread.currentThread();\n\t\t/* Startup process */\n\t}",
"private void connected(){\n FXMLLoader loader = new FXMLLoader(getClass().getResource(\"/ui/dashboard.fxml\"));\n Parent root ;\n try {\n root = loader.load();\n } catch (IOException e) {\n e.printStackTrace();\n return;\n }\n DashboardController dashboardController = loader.getController();\n dashboardController.setData(loginManager.getFacadeManager());\n changeScene(root,\"Home\");\n }",
"public void openMoving() {\n myActivity.setContentView(R.layout.moving);\n Button movingButtonToGame = myActivity.findViewById(R.id.button10);\n\n movingButtonToGame.setOnClickListener(\n new View.OnClickListener() {\n public void onClick(View v) {\n ShogiHumanPlayer.this.setAsGui(myActivity);\n usingRulesScreen = false;\n if (state != null) {\n receiveInfo(state);\n }\n }\n });\n }",
"void setGui(Gui gui);",
"private SimpleChatUI() {\n initComponents();\n convo = null;\n setConnStatus(false);\n jMessageEntry.addActionListener(new java.awt.event.ActionListener() {\n @Override\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jSendButtonActionPerformed(evt);\n }\n });\n }",
"public void initializeUIComponents() {\n etIdentification = (EditText) findViewById(R.id.etIdentification);\n etAddress = (EditText) findViewById(R.id.etAddress);\n etPort = (EditText) findViewById(R.id.etPort);\n btnConnect = (Button) findViewById(R.id.btnConnect);\n\n try {\n getSupportActionBar().setDisplayHomeAsUpEnabled(false);\n getSupportActionBar().setHomeButtonEnabled(false);\n } catch (Exception e){\n Log.e(\"phys timer\", e.getMessage());\n }\n }",
"public static void setupGUI() {\n\t\t\n\t\t//My GUI Frame\n\t\tJFrame GUIframe = new JFrame(\"ChatBot Conversation GUI\");\n\t\tGUIframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tGUIframe.setSize(800,400);\n\t\t\n\t\t//GUI Panel Setup\n\t\tJPanel panel1 = new JPanel();\n\t\tJButton enter = new JButton(\"Enter\");\n\t\t\n\t\t//Listener for the Submit button\n\t\tenter.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tString newUserInput = (myTextField.getText()).trim();\n\t\t\t\t\n\t\t\t\tif(newUserInput.length()>=1){\n\t\t\t\t\tagent.execute(conversation, newUserInput);\n\t\t\t\t\tmyTextField.setText(\"\");\n\t\t\t\t}\t\n\t\t\t}\n\t\t});\n\t\t//Listener to enable users to press Enter into the textfield\n\t\tmyTextField.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tString newUserInput = (myTextField.getText()).trim();\n\t\t\t\t\n\t\t\t\tif(newUserInput.length()>=1){\n\t\t\t\t\tagent.execute(conversation, newUserInput);\n\t\t\t\t\tmyTextField.setText(\"\");\n\t\t\t\t}\t\n\t\t\t}\n\t\t});\n\t\t\n\t\tpanel1.add(myTextField);\n\t\tpanel1.add(enter);\n\t\t\n\t\t//JTextArea chat = new JTextArea();\n\t\tchat.setEditable(false);\n\t\tJScrollPane letsScroll = new JScrollPane(chat);\n\t\t\n\t\tGUIframe.getContentPane().add(BorderLayout.SOUTH, panel1);\n\t\t//GUIframe.getContentPane().add(BorderLayout.CENTER, chat);\n\t\tGUIframe.getContentPane().add(BorderLayout.CENTER, letsScroll);\n\t\tGUIframe.setVisible(true);\t\n\n\t\t\n\t}",
"private void setupSettingWindow()\n {\n setGUI.setWindowListener(new WindowListener() {\n @Override\n public void windowOpened(WindowEvent we) {\n }\n\n @Override\n public void windowClosing(WindowEvent we) {\n }\n\n @Override\n public void windowClosed(WindowEvent we) {\n player1Color = setGUI.getPlayer1Color();\n player2Color = setGUI.getPlayer2Color();\n }\n\n @Override\n public void windowIconified(WindowEvent we) {\n }\n\n @Override\n public void windowDeiconified(WindowEvent we) {\n }\n\n @Override\n public void windowActivated(WindowEvent we) {\n }\n\n @Override\n public void windowDeactivated(WindowEvent we) {\n }\n });\n }",
"void onConnect();",
"void inicializaComponentes(){\r\n\t\t\r\n\t\t//Botão com status\r\n\t\ttgbGeral = (ToggleButton) findViewById(R.id.tgbGeral);\r\n\t\ttgbGeral.setOnClickListener(this);\r\n\t\ttgbMovimento = (ToggleButton) findViewById(R.id.tgbMovimento);\r\n\t\ttgbMovimento.setOnClickListener(this);\r\n\t\ttgbfogo = (ToggleButton) findViewById(R.id.tgbFogo);\r\n\t\ttgbfogo.setOnClickListener(this);\r\n\r\n\t\t//botão\r\n\t\tbtnTemperatura = (Button) findViewById(R.id.btnTemperatura);\r\n\t\tbtnTemperatura.setOnClickListener(this);\r\n\t\t\r\n\t\t//label\r\n\t\ttxtLegenda = (TextView) findViewById(R.id.txtSensorLegenda);\r\n\t}",
"@Override\n public void initGUI() {\n\n }",
"public UI_PDA(Tribot robot)\r\n\t{\r\n\t\tlego = robot;\r\n\t\t\r\n\t\t// GUI\r\n\t\tsetLayout(new BorderLayout(10, 10));\r\n\t\t//tabbed_pane = new JTabbedPane();\r\n\r\n\t\tauto_panel = new GUI_AutoCtrlPanel(lego);\r\n\t\t//manual_panel = new GUI_ManualCtrlPanel(lego);\r\n\t\t//ap_panel = new GUI_APCollectorPanel();\r\n\t\r\n\t\t//tabbed_pane.add(\"Auto\", auto_panel);\r\n\t\t//tabbed_pane.add(\"Manual\", manual_panel);\r\n\t\t//tabbed_pane.add(\"AP Collector\", ap_panel);\r\n\t\tadd(auto_panel, BorderLayout.CENTER);\r\n\t}",
"static void SetUpScadaAndControllers() {\n pumpForSolutionOn.setVisible(false);\n pumpForTitrationOn.setVisible(false);\n mixerOn.setVisible(false);\n valveTitrationOpened.setVisible(false);\n valveSolutionOpened.setVisible(false);\n valveWaterOpened.setVisible(false);\n valveOutOpened.setVisible(false);\n\n frame.addWindowListener(new WindowAdapter() {\n @Override\n public void windowClosing(WindowEvent e) {\n System.out.println(\"connection closed\");\n InitialClass.arduino.closeConnection();\n }\n });\n\n\n log.setFont(fontMarker);\n log.setRows(10);\n log.setPreferredSize(new Dimension(200, 400));\n log.setBackground(new Color(19, 28, 48));\n log.setForeground(Color.WHITE);\n\n\n visualPH.setBounds(460, 90, 150, 30);\n visualPH.setText(\"_.__pH\");\n visualPH.setForeground(Color.WHITE);\n visualPH.setFont(new Font(\"Montserrat\", Font.PLAIN, 32));\n\n\n JToggleButton titrationStart = new JToggleButton();\n titrationStart.setPreferredSize(new Dimension(200, 30));\n titrationStart.setText(\"Автоматическое измерение\");\n\n titrationStart.addItemListener(ev -> {\n if (ev.getStateChange() == ItemEvent.SELECTED) {\n Chart.series.clear();\n Chart.secondSeries.clear();\n Chart.dot.clear();\n titrationStart.setText(\"В процессе\");\n new Thread(auto).start();\n\n } else if (ev.getStateChange() == ItemEvent.DESELECTED) {\n forScanner = false;\n log.append(\"Завершение\" + \"\\n\");\n\n }\n });\n\n JButton washing = new JButton();\n washing.setPreferredSize(new Dimension(200, 30));\n washing.setText(\"Промывка\");\n\n washing.addActionListener(e -> {\n washing.setText(\"В процессе\");\n new Thread(new Flushing()).start();\n washing.setText(\"Промывка\");\n });\n\n JButton handMode = new JButton();\n handMode.setPreferredSize(new Dimension(200, 30));\n handMode.setText(\"Начать ручной режим\");\n\n handMode.addActionListener(e -> {\n if (handMode.getText().equals(\"Начать ручной режим\")) {\n handMode.setText(\"Включен ручной режим !\");\n titrationStart.setEnabled(false);\n washing.setEnabled(false);\n Chart.series.clear();\n Chart.secondSeries.clear();\n Chart.dot.clear();\n forScanner = true;\n new Thread(listeningThe_pH).start();\n } else if (handMode.getText().equals(\"Включен ручной режим !\")) {\n forScanner = false;\n titrationStart.setEnabled(true);\n washing.setEnabled(true);\n log.append(\"Ручной режим отключен\\n\");\n handMode.setText(\"Начать ручной режим\");\n }\n });\n\n\n JPanel flaskLevel = new JPanel();\n flaskLevel.setBounds(225, 200, 200, 200);\n flaskLevel.setBackground(Color.orange);\n\n /*\n *Setting SCADA layered window\n */\n scada.setPreferredSize(new Dimension(620, 400));\n\n scada.add(flaskLevel, 1);\n scada.add(mixerLayer, 2);\n scada.add(waterTube, 3);\n scada.add(pumpForTitration, 4);\n scada.add(pumpForSolution, 5);\n scada.add(pumpForTitrationOn, 6);\n scada.add(pumpForSolutionOn, 7);\n scada.add(mixerOn, 8);\n scada.add(valveTitrationClosed, 9);\n scada.add(valveTitrationOpened, 10);\n scada.add(valveSolutionClosed, 11);\n scada.add(valveSolutionOpened, 12);\n scada.add(valveOutClosed, 13);\n scada.add(valveOutOpened, 14);\n scada.add(valveWaterClosed, 15);\n scada.add(valveWaterOpened, 16);\n scada.add(visualPH, 17);\n\n result.setPreferredSize(new Dimension(200, 50));\n result.setText(\"0.00 ml\");\n result.setFont(new Font(\"Montserrat\", Font.PLAIN, 32));\n result.setForeground(Color.WHITE);\n\n panelRightTop.setPreferredSize(new Dimension(200, 75));\n panelRightTop.add(titrationStart);\n panelRightTop.add(washing);\n panelRightTop.setBackground(new Color(10, 70, 90));\n\n JLabel mode = new JLabel(\"Ручной режим\");\n mode.setForeground(Color.WHITE);\n mode.setFont(fontMarker);\n\n panelRightBot.setLayout(new FlowLayout());\n panelRightBot.setPreferredSize(new Dimension(200, 325));\n panelRightBot.setBackground(new Color(19, 28, 48));\n panelRightBot.add(mode);\n panelRightBot.add(handMode);\n panelRightBot.add(addToggle(\"Помпа раствора\", '5', '4', pumpForSolutionOn));\n panelRightBot.add(addToggle(\"Помпа титранта\", '3', '2', pumpForTitrationOn));\n panelRightBot.add(addToggle(\"Клапан для воды\", 'D', 'C', valveWaterOpened));\n panelRightBot.add(addToggle(\"Клапан для раствора\", '9', '8', valveSolutionOpened));\n panelRightBot.add(addToggle(\"Клапан для титранта\", 'B', 'A', valveTitrationOpened));\n panelRightBot.add(addToggle(\"Клапан для слива\", '1', '0', valveOutOpened));\n panelRightBot.add(addToggle(\"Мешалка\", '7', '6', mixerOn));\n panelRightBot.add(addToggle(\"Датчик\", 'Y', 'X'));\n panelRightBot.add(result);\n\n panelRight.setLayout(new BorderLayout());\n panelRight.setPreferredSize(new Dimension(200, 400));\n panelRight.add(panelRightBot, BorderLayout.CENTER);\n panelRight.add(panelRightTop, BorderLayout.NORTH);\n panelRight.setBackground(new Color(19, 28, 48));\n\n panel.setLayout(new BorderLayout());\n panel.setBackground(new Color(19, 28, 48));\n panel.add(scada, BorderLayout.WEST);\n panel.add(panelRight, BorderLayout.CENTER);\n panel.add(log, BorderLayout.EAST);\n\n panelRightTop.setLayout(new FlowLayout());\n\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.setMinimumSize(new Dimension(850, 500));\n frame.add(panel);\n frame.pack();\n frame.setVisible(true);\n frame.setLocationRelativeTo(null);\n }",
"public void actionPerformed(ActionEvent ae) {\n\n GUI_dialoog dialoog = new GUI_dialoog();\n dialoog.setVisible(true);\n\n }",
"public void run() {\n controlador = new Controlador();\n createGUI();\n }",
"public MainActivity() {\n initComponents();\n conn = JavaConnect.ConnectDB();\n displayAllTable();\n\n }",
"private void inicComponent() {\n\n\t\tprogres = (LinearLayout) findViewById(R.id.linearLayoutProgres);\n\t\t\n\t\tbuttonKategorije = (Button) findViewById(R.id.buttonKategorije);\n\t\t\n\t}",
"public GUI() {\n initComponents();\n this.setVisible(true);\n }",
"public void welcome_screen() {\r\n\t\tclear_screen();\r\n\t\tJLabel kahoot_msg = new JLabel(\"Kahoot Java\", SwingConstants.CENTER);\r\n\t\tkahoot_msg.setFont(new Font(\"Calibri\", Font.BOLD, 50));\r\n\t\tkahoot_msg.setBounds(0,156, 1280,60 );\r\n\t\tthis.add(kahoot_msg);\r\n\t\tJLabel please_enter = new JLabel(\"Merci d'entrer les informations de connexion du serveur\", SwingConstants.CENTER);\r\n\t\tplease_enter.setFont(new Font(\"Calibri\", Font.PLAIN, 30));\r\n\t\tplease_enter.setBounds(0,204,1280,50);\r\n\t\tthis.add(please_enter);\r\n\r\n\t\tJLabel enter_ip = new JLabel(\"Entrez l'adresse IP du serveur : \");\r\n\t\tenter_ip.setBounds(320, 499, 320, 13);\r\n\t\tthis.add(enter_ip);\r\n\r\n\t\tJLabel enter_port = new JLabel(\"Entrez le port du serveur : \");\r\n\t\tenter_port.setBounds(320, 530, 320, 13);\r\n\t\tthis.add(enter_port);\r\n\r\n\t\t// JTextArea pour entrer les donn�es\r\n\t\tip = new JTextField(\"127.0.0.1\");\r\n\t\tip.setBounds(640, 497, 320, 16);\r\n\t\tthis.add(ip);\r\n\r\n\t\tport = new JTextField(\"50000\");\r\n\t\tport.setBounds(640, 530, 320, 16);\r\n\t\tthis.add(port);\r\n\r\n\t\tlogin_btn = new JButton(\"Se Connecter\");\r\n\t\tlogin_btn.setBounds(515,640,250,30);\r\n\t\tlogin_btn.addActionListener(this);\r\n\t\tthis.add(login_btn);\r\n\r\n\t}",
"public GUI(GUIController controler){\n\t\t//Create the fame with specific features\n\t\ttry {\n\t\t\tUIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\n\t\t} catch (ClassNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (InstantiationException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IllegalAccessException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (UnsupportedLookAndFeelException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tthis.controler=controler;\n\t\tsetFrame(new JFrame(\"Network Topology\"));\n\t\t//getFrame().setPreferredSize(new Dimension(1200, 700));\n\t\tbuttons=new ArrayList<JButton>();\n\t\tcirclePanel=new CirclePanel();\n\t\tstratButtons= new ArrayList<JButton>();\n\t\t\n\t\tgetFrame().setResizable(true);\n\t\t}",
"public void registerGui()\n {\n }",
"private void setGUI()\r\n\t{\r\n\t\tbubblePB = setProgressBar(bubblePB);\r\n\t\tinsertionPB = setProgressBar(insertionPB);\r\n\t\tmergePB = setProgressBar(mergePB);\r\n\t\tquickPB = setProgressBar(quickPB);\r\n\t\tradixPB = setProgressBar(radixPB);\r\n\t\t\r\n\t\tsetLabels();\r\n\t\tsetPanel();\r\n\t\tsetLabels();\r\n\t\tsetFrame();\r\n\t}",
"@Override\n public void start() throws DialException {\n frame = new JFrame();\n JointActionListener jointListener = new JointActionListener();\n MyActionListener actionListener = new MyActionListener();\n\n JPanel jointPanel = new JPanel();\n JPanel actionPanel = new JPanel();\n JPanel statusPanel = new JPanel();\n frame.add(jointPanel);\n frame.add(actionPanel);\n frame.add(statusPanel);\n BoxLayout actionPanelLayout = new BoxLayout(actionPanel, BoxLayout.Y_AXIS);\n BoxLayout jointPanelLayout = new BoxLayout(jointPanel, BoxLayout.Y_AXIS);\n BoxLayout statusPanelLayout = new BoxLayout(statusPanel, BoxLayout.Y_AXIS);\n\n BoxLayout frameLayout = new BoxLayout(frame.getContentPane(), BoxLayout.X_AXIS);\n\n jointPanel.setLayout(jointPanelLayout);\n actionPanel.setLayout(actionPanelLayout);\n statusPanel.setLayout(statusPanelLayout);\n frame.setLayout(frameLayout);\n\n ArrayList<String> jointNames = readJointNames();\n for (String jointName : jointNames) {\n JButton button = new JButton(jointName);\n button.addActionListener(jointListener);\n\n jointPanel.add(button);\n }\n\n String actions[] = {\"up\", \"down\", \"max\", \"min\", \"def\", \"GO\", \"USER_READY\", \"YES\", \"NO\"};\n for (String action : actions) {\n JButton button = new JButton(action);\n button.addActionListener(actionListener);\n\n actionPanel.add(button);\n\n }\n\n currentAction.setText(actions[0]);\n currentJoint.setText(jointNames.get(0));\n statusPanel.add(currentJoint);\n\n statusPanel.add(currentAction);\n\n frame.setSize(800, 600);\n // frame.setLocation(600, 600);\n paused = false;\n frame.setVisible(true);\n }",
"void onConnect( );",
"public JavierGUI() {\r\n\t\tsuper();\r\n\t\tinitialize();\r\n\t\tthis.setJavier(getJavier());\r\n\t\tbtnHome.doClick();\r\n\t}",
"@Override\n\tpublic void EjecutaGui() {\n\t\tVentanaEj1 inicio = new VentanaEj1();\n\t\tinicio.setVisible(true);\n\t}",
"void goMainScreen(){\n\t\tcheckSavePwd();\n\t\tActionEvent e = new ActionEvent();\n\t\te.sender = this;\n\t\te.action = ActionEventConstant.ACTION_SWITH_TO_CATEGORY_SCREEN;\n\t\tUserController.getInstance().handleSwitchActivity(e);\n\t}",
"private void initNewConnect() {\r\n\t\tthis.newConnect = new JMenu(\"Connect To\");\r\n\t\t\r\n\t\t// textfield for ip address with keylistener\r\n\t\tJTextField ipAddress = new JTextField(\"000.000.0.000\");\r\n ipAddress.setPreferredSize(new Dimension(100,18));\r\n ipAddress.setMaximumSize(new Dimension(100,18));\r\n\t\tipAddress.addKeyListener(new KeyListener() {\r\n\t\t\tpublic void keyTyped(KeyEvent e) {}\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\r\n\t\t\t\tint key = e.getKeyCode();\r\n\t\t\t\tif(key == KeyEvent.VK_ENTER) {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tactController.setRemoteIPadress(e);\r\n\t\t\t\t\t} catch (UnknownHostException e1) {\r\n\t\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tpublic void keyReleased(KeyEvent e) {}\r\n\t\t});\r\n\t\r\n\t\t// add textfield to newconnect\r\n newConnect.add(ipAddress);\r\n \r\n // add newconnect to option\r\n\t\tthis.option.add(newConnect);\r\n\t}",
"private void buildGui() {\n nifty = screen.getNifty();\n nifty.setIgnoreKeyboardEvents(true);\n nifty.loadStyleFile(\"nifty-default-styles.xml\");\n nifty.loadControlFile(\"nifty-default-controls.xml\");\n nifty.addScreen(\"Option_Screen\", new ScreenBuilder(\"Options_Screen\") {\n {\n controller((ScreenController) app);\n layer(new LayerBuilder(\"background\") {\n {\n childLayoutCenter();;\n font(\"Interface/Fonts/zombie.fnt\");\n backgroundImage(\"Backgrounds/ZOMBIE1.jpg\");\n visibleToMouse(true);\n }\n });\n layer(new LayerBuilder(\"foreground\") {\n {\n childLayoutOverlay();\n font(\"Interface/Fonts/zombie.fnt\");\n\n panel(new PanelBuilder(\"Switch_Options\") {\n {\n childLayoutVertical();\n control(new ButtonBuilder(\"\", \"Display Settings\") {\n {\n marginTop(\"42%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n interactOnClick(\"goTo(Display_Settings)\");\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n /*control(new ButtonBuilder(\"\", \"Graphics Settings\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(Graphics_Extension)\");\n }\n });*/\n control(new ButtonBuilder(\"\", \"Sound Settings\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(#Sound_Settings)\");\n }\n });\n control(new ButtonBuilder(\"\", \"Leaderboard\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(Leader_Board)\");\n }\n });\n control(new ButtonBuilder(\"\", \"Logout\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(#Login_Screen)\");\n }\n });\n control(new ButtonBuilder(\"\", \"Quit Game\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"quitGame()\");\n }\n });\n }\n });\n }\n });\n }\n }.build(nifty));\n nifty.addScreen(\"Graphics_Settings\", new ScreenBuilder(\"Graphics_Extension\") {\n {\n controller(settingsControl);\n layer(new LayerBuilder(\"background\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n childLayoutCenter();\n backgroundImage(\"Backgrounds/ZOMBIE1.jpg\");\n visibleToMouse(true);\n }\n });\n layer(new LayerBuilder(\"foreground\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n childLayoutOverlay();\n panel(new PanelBuilder(\"Settings\") {\n {\n childLayoutVertical();\n control(new ButtonBuilder(\"\", \"Display Settings\") {\n {\n marginTop(\"42%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(Display_Settings)\");\n }\n });\n /*control(new ButtonBuilder(\"\", \"Graphics Settings\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });*/\n control(new ButtonBuilder(\"\", \"Sound Settings\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(#Sound_Settings)\");\n }\n });\n control(new ButtonBuilder(\"\", \"Leaderboard\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(Leader_Board)\");\n }\n });\n control(new ButtonBuilder(\"\", \"Logout\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(#Login_Screen)\");\n }\n });\n control(new ButtonBuilder(\"\", \"Quit Game\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"quitGame()\");\n }\n });\n }\n });\n }\n });\n layer(new LayerBuilder(\"Settings\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n childLayoutVertical();\n panel(new PanelBuilder(\"Post_Water_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"40%\");\n marginTop(\"15%\");\n control(new LabelBuilder(\"\", \"Post Water\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n color(\"#ff0000\");\n }\n });\n control(new CheckboxBuilder(\"Post_Water_Button\") {\n {\n marginLeft(\"110%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"Water_Reflections_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"40%\");\n marginTop(\"5%\");\n control(new LabelBuilder(\"\", \"Water Reflections\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n color(\"#ff0000\");\n }\n });\n control(new CheckboxBuilder(\"Water_Reflections_Button\") {\n {\n marginLeft(\"45%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"Water_Ripples_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"40%\");\n marginTop(\"5%\");\n control(new LabelBuilder(\"\", \"Water Ripples\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n color(\"#ff0000\");\n }\n });\n control(new CheckboxBuilder(\"Water_Ripples_Button\") {\n {\n marginLeft(\"75%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"Water_Specular_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"40%\");\n marginTop(\"5%\");\n control(new LabelBuilder(\"\", \"Water Specular\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n color(\"#ff0000\");\n }\n });\n control(new CheckboxBuilder(\"Water_Specular_Button\") {\n {\n marginLeft(\"59%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"Water_Foam_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"40%\");\n marginTop(\"5%\");\n control(new LabelBuilder(\"\", \"Water Foam\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n color(\"#ff0000\");\n }\n });\n control(new CheckboxBuilder(\"Water_Foam_Button\") {\n {\n marginLeft(\"93%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"Sky_Dome_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"40%\");\n marginTop(\"5%\");\n control(new LabelBuilder(\"\", \"Sky Dome\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n color(\"#ff0000\");\n }\n });\n control(new CheckboxBuilder(\"Sky_Dome_Button\") {\n {\n marginLeft(\"128%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"Star_Motion_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"40%\");\n marginTop(\"5%\");\n control(new LabelBuilder(\"\", \"Star Motion\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n color(\"#ff0000\");\n }\n });\n control(new CheckboxBuilder(\"Star_Motion_Button\") {\n {\n marginLeft(\"106%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"Cloud_Motion_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"40%\");\n marginTop(\"5%\");\n control(new LabelBuilder(\"\", \"Cloud Motion\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n color(\"#ff0000\");\n }\n });\n control(new CheckboxBuilder(\"Cloud_Motion_Button\") {\n {\n marginLeft(\"87%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"Bloom_Light_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"40%\");\n marginTop(\"5%\");\n control(new LabelBuilder(\"\", \"Bloom Lighting\") {\n {\n color(\"#ff0000\");\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n control(new CheckboxBuilder(\"Bloom_Light_Button\") {\n {\n marginLeft(\"70%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"Light_Scatter_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"40%\");\n marginTop(\"5%\");\n control(new LabelBuilder(\"\", \"Light Scatter\") {\n {\n color(\"#ff0000\");\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n control(new CheckboxBuilder(\"Light_Scatter_Button\") {\n {\n marginLeft(\"90%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"Apply_Panel\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n childLayoutHorizontal();\n marginLeft(\"43%\");\n marginTop(\"5%\");\n control(new ButtonBuilder(\"Apply_Button\", \"Apply Settings\") {\n {\n interactOnClick(\"applySettings()\");\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n }\n });\n }\n });\n }\n }.build(nifty));\n nifty.addScreen(\"Display_Screen\", new ScreenBuilder(\"Display_Settings\") {\n {\n controller(settingsControl);\n layer(new LayerBuilder(\"background\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n childLayoutCenter();;\n backgroundImage(\"Backgrounds/ZOMBIE1.jpg\");\n visibleToMouse(true);\n }\n });\n layer(new LayerBuilder(\"foreground\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n childLayoutOverlay();\n panel(new PanelBuilder(\"Settings\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n childLayoutVertical();\n control(new ButtonBuilder(\"\", \"Display Settings\") {\n {\n marginTop(\"42%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n /*control(new ButtonBuilder(\"\", \"Graphics Settings\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(Graphics_Extension)\");\n }\n });*/\n control(new ButtonBuilder(\"\", \"Sound Settings\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(#Sound_Settings)\");\n }\n });\n control(new ButtonBuilder(\"\", \"Leaderboard\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(Leader_Board)\");\n }\n });\n control(new ButtonBuilder(\"\", \"Logout\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(#Login_Screen)\");\n }\n });\n control(new ButtonBuilder(\"\", \"Quit Game\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"quitGame()\");\n }\n });\n }\n });\n }\n });\n layer(new LayerBuilder(\"Settings\") {\n {\n childLayoutVertical();\n panel(new PanelBuilder(\"Resolution_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"40%\");\n marginTop(\"15%\");\n control(new LabelBuilder(\"\", \"Set Resolution\") {\n {\n color(\"#ff0000\");\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n control(new ListBoxBuilder(\"Resolution_Opts\") {\n {\n marginLeft(\"4%\");\n marginBottom(\"10%\");\n displayItems(1);\n showVerticalScrollbar();\n hideHorizontalScrollbar();\n selectionModeSingle();\n width(\"10%\");\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"Apply_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"45%\");\n marginTop(\"5%\");\n control(new ButtonBuilder(\"Apply_Button\", \"Apply Settings\") {\n {\n interactOnClick(\"displayApply()\");\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n }\n });\n }\n });\n }\n }.build(nifty));\n nifty.addScreen(\"Sound Settings\", new ScreenBuilder(\"#Sound_Settings\") {\n {\n controller(settingsControl);\n layer(new LayerBuilder(\"background\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n childLayoutCenter();;\n backgroundImage(\"Backgrounds/ZOMBIE1.jpg\");\n visibleToMouse(true);\n }\n });\n layer(new LayerBuilder(\"foreground\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n childLayoutOverlay();\n panel(new PanelBuilder(\"Settings\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n childLayoutVertical();\n control(new ButtonBuilder(\"\", \"Display Settings\") {\n {\n marginTop(\"42%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(ElementBuilder.Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(Display_Settings)\");\n }\n });\n /*control(new ButtonBuilder(\"\", \"Graphics Settings\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(ElementBuilder.Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(Graphics_Extension)\");\n }\n });*/\n control(new ButtonBuilder(\"\", \"Sound Settings\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(ElementBuilder.Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n control(new ButtonBuilder(\"\", \"Leaderboard\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(ElementBuilder.Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(Leader_Board)\");\n }\n });\n control(new ButtonBuilder(\"\", \"Logout\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(#Login_Screen)\");\n }\n });\n control(new ButtonBuilder(\"\", \"Quit Game\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(ElementBuilder.Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"quitGame()\");\n }\n });\n }\n });\n }\n });\n layer(new LayerBuilder(\"Settings\") {\n {\n childLayoutVertical();\n panel(new PanelBuilder(\"#Master_Volume_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"30%\");\n marginTop(\"35%\");\n control(new LabelBuilder(\"\", \"Master Volume : \") {\n {\n color(\"#ff0000\");\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n control(new SliderBuilder(\"#Master_Volume\", false) {\n {\n marginLeft(\"20px\");\n min(0);\n max(100);\n width(\"25%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"#Ambient_Volume_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"30%\");\n marginTop(\"8%\");\n control(new LabelBuilder(\"\", \"Ambient Volume : \") {\n {\n color(\"#ff0000\");\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n control(new SliderBuilder(\"#Ambient_Volume\", false) {\n {\n marginLeft(\"20px\");\n min(0);\n max(100);\n width(\"25%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"#Combat_Volume_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"30%\");\n marginTop(\"8%\");\n control(new LabelBuilder(\"\", \"Combat Volume : \") {\n {\n color(\"#ff0000\");\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n control(new SliderBuilder(\"#Combat_Volume\", false) {\n {\n marginLeft(\"20px\");\n min(0);\n max(100);\n width(\"25%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"#Dialog_Volume_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"30%\");\n marginTop(\"8%\");\n control(new LabelBuilder(\"\", \"Dialog Volume : \") {\n {\n color(\"#ff0000\");\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n control(new SliderBuilder(\"#Dialog_Volume\", false) {\n {\n marginLeft(\"20px\");\n min(0);\n max(100);\n width(\"25%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"#Footsteps_Volume_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"30%\");\n marginTop(\"8%\");\n control(new LabelBuilder(\"\", \"Footsteps Volume : \") {\n {\n color(\"#ff0000\");\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n control(new SliderBuilder(\"#Footsteps_Volume\", false) {\n {\n marginLeft(\"20px\");\n min(0);\n max(100);\n width(\"25%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"Apply_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"45%\");\n marginTop(\"5%\");\n control(new ButtonBuilder(\"#Apply_Button\", \"Apply Settings\") {\n {\n interactOnClick(\"soundApply()\");\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n }\n });\n }\n });\n\n }\n }.build(nifty));\n }",
"private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.getContentPane().setLayout(null);\n\n\t\tJPanel chatInfoSec = new JPanel();\n\t\tchatInfoSec.setBorder(new TitledBorder(new EtchedBorder(EtchedBorder.LOWERED, new Color(0, 0, 0), null),\n\t\t\t\t\"CHAT INFO \", TitledBorder.LEADING, TitledBorder.TOP, null, new Color(0, 0, 0)));\n\t\tchatInfoSec.setBounds(20, 23, 347, 100);\n\t\tframe.getContentPane().add(chatInfoSec);\n\t\tchatInfoSec.setLayout(null);\n\n\t\tJLabel ipLabel = new JLabel(\"IP\");\n\t\tipLabel.setFont(new Font(\"굴림\", Font.BOLD, 12));\n\t\tipLabel.setBounds(39, 30, 32, 15);\n\t\tchatInfoSec.add(ipLabel);\n\n\t\tipText = new JTextField();\n\t\tipText.setBounds(114, 26, 179, 21);\n\t\tipText.setBorder(null);\n\t\tchatInfoSec.add(ipText);\n\n\t\tJLabel portLabel = new JLabel(\"Port\");\n\t\tportLabel.setFont(new Font(\"굴림\", Font.BOLD, 12));\n\t\tportLabel.setBounds(39, 65, 32, 15);\n\t\tchatInfoSec.add(portLabel);\n\n\t\tportText = new JTextField();\n\t\tportText.setBounds(114, 61, 179, 21);\n\t\tportText.setBorder(null);\n\t\tchatInfoSec.add(portText);\n\n\t\tRoundedButton1 inBtn = new RoundedButton1(\"IN\");\n\t\tinBtn.setBounds(398, 30, 75, 90);\n\t\tRoundedButton1 outBtn = new RoundedButton1(\"OUT\");\n\t\toutBtn.setBounds(505, 30, 75, 90);\n\t\tframe.getContentPane().add(inBtn);\n\t\tframe.getContentPane().add(outBtn);\n\n\t\tinBtn.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tClientThread clientThread = new ClientThread();\n\t\t\t\tclientThread.setDaemon(true);\n\t\t\t\tclientThread.start();\n\t\t\t}\n\t\t});\n\t\toutBtn.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\ttry {\n\t\t\t\t\tif(socket != null) {\n\t\t\t\t\t\tsocket.close();\n\t\t\t\t\t}else {\n\t\t\t\t\t\tchatSec.append(\"채팅방에 접속을 하지 않았습니다\\n\");\n\t\t\t\t\t}\n\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tJPanel mySec = new JPanel();\n\t\tmySec.setLayout(null);\n\t\tmySec.setBorder(new TitledBorder(new EtchedBorder(EtchedBorder.LOWERED, new Color(0, 0, 0), null), \" MY \",\n\t\t\t\tTitledBorder.LEADING, TitledBorder.TOP, null, new Color(0, 0, 0)));\n\t\tmySec.setBounds(20, 133, 563, 100);\n\t\tframe.getContentPane().add(mySec);\n\n\t\tJLabel myIpLabel = new JLabel(\"IP\");\n\t\tmyIpLabel.setFont(new Font(\"굴림\", Font.BOLD, 12));\n\t\tmyIpLabel.setBounds(39, 30, 32, 15);\n\t\tmySec.add(myIpLabel);\n\n\t\tJTextField myIpText = new JTextField();\n\t\tmyIpText.setBackground(UIManager.getColor(\"Button.background\"));\n\t\tmyIpText.setEditable(false);\n\t\tmyIpText.setBounds(114, 26, 437, 21);\n\t\tmyIpText.setBorder(new LineBorder(Color.LIGHT_GRAY));\n\t\tmyIpText.setText(common.myIp());\n\t\tmySec.add(myIpText);\n\n\t\tJLabel nameLabel = new JLabel(\"Name\");\n\t\tnameLabel.setFont(new Font(\"굴림\", Font.BOLD, 12));\n\t\tnameLabel.setBounds(39, 65, 47, 15);\n\t\tmySec.add(nameLabel);\n\n\t\tnameText = new JTextField();\n\t\tnameText.setBounds(114, 61, 323, 21);\n\t\tnameText.setBorder(null);\n\t\tnameText.setText(myName);\n\t\tmySec.add(nameText);\n\n\t\tRoundedButton2 changeBtn = new RoundedButton2(\"CHANGE\");\n\t\tchangeBtn.setBounds(463, 60, 88, 23);\n\t\tmySec.add(changeBtn);\n\t\tchangeBtn.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tchangeName(myName);\n\t\t\t}\n\t\t});\n\n\t\tchatSec = new JTextArea();\n\t\tchatSec.setEditable(false);\n\t\tJScrollPane scrollPane = new JScrollPane(chatSec);\n\t\tscrollPane.setBounds(22, 255, 560, 235);\n\t\tframe.getContentPane().add(scrollPane);\n\n\t\tchatText = new JTextField();\n\t\tchatText.setBounds(22, 500, 458, 21);\n\t\tchatText.setBorder(null);\n\t\tchatText.addKeyListener(new KeyAdapter() {\n\t\t\t@Override\n\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tsuper.keyPressed(e);\n\n\t\t\t\t// 입력받은 키가 엔터인지\n\t\t\t\tint keyCode = e.getKeyCode();\n\t\t\t\tswitch (keyCode) {\t\n\t\t\t\t\tcase KeyEvent.VK_ENTER:\n\t\t\t\t\t\tsendMessage();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tframe.getContentPane().add(chatText);\n\n\t\twindowbuilder.RoundedButton2 sendBtn = new windowbuilder.RoundedButton2(\"SEND\");\n\t\tsendBtn.setBounds(492, 499, 88, 23);\n\t\tframe.getContentPane().add(sendBtn);\n\t\tsendBtn.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tsendMessage();\n\t\t\t}\n\t\t});\n\n\t\tframe.setTitle(\"\\uCC44\\uD305\\uCC38\\uC5EC\");\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.setBackground(Color.WHITE);\n\t\tframe.setBounds(720, 120, 609, 573);\n\t}",
"public ConnectionTestsScreen() {\r\n setTitle(\"Connection Tests\");\r\n\r\n // Display URL label and edit box on top of the screen\r\n _urlEditField =\r\n new BasicEditField(\"URL: \", \"http://www.blackberry.com\", 128,\r\n BasicEditField.FILTER_URL);\r\n add(_urlEditField);\r\n\r\n // Display \"Connect\" button that triggers connection to be established\r\n // with the specified URL.\r\n final ButtonField connectBtn =\r\n new ButtonField(\"Connect\", Field.FIELD_HCENTER\r\n | ButtonField.CONSUME_CLICK);\r\n connectBtn.setChangeListener(this);\r\n\r\n // Display \"Show Options\" button that displays connection options when\r\n // clicked\r\n _optionsBtn =\r\n new ButtonField(\"Show Options\", Field.FIELD_HCENTER\r\n | ButtonField.CONSUME_CLICK);\r\n _optionsBtn.setChangeListener(this);\r\n _optionsHidden = true;\r\n\r\n add(new SeparatorField());\r\n\r\n // Region to layout \"Connect\" and \"Show Options\" buttons side by side\r\n final HorizontalFieldManager hfmBtns =\r\n new HorizontalFieldManager(Field.FIELD_HCENTER);\r\n hfmBtns.add(connectBtn);\r\n hfmBtns.add(_optionsBtn);\r\n add(hfmBtns);\r\n\r\n add(new SeparatorField());\r\n\r\n _labelConnectionOpt = new LabelField(\"Connection Settings [optional]\");\r\n\r\n // Connection mode\r\n final String[] connectionModes = { \"READ\", \"WRITE\", \"READ/WRITE\" };\r\n _connectionMode =\r\n new ObjectChoiceField(\" Connection Mode: \", connectionModes, 2);\r\n\r\n // Connection timeout\r\n _timeoutSupported = new CheckboxField(\" Support timeouts\", false);\r\n _connectionTimeout =\r\n new BasicEditField(\"Connection timeout: \", \"\", 6,\r\n BasicEditField.FILTER_INTEGER);\r\n\r\n // Connection security settings for tls/ssl\r\n _endToEndRequired =\r\n new CheckboxField(\" tls/ssl end to end required\", false);\r\n _endToEndDesired =\r\n new CheckboxField(\" tls/ssl end to end desired\", false);\r\n\r\n // Connection retry options\r\n _labelRetriesOpt = new LabelField(\"Retry options [optional]\");\r\n _timeLimit =\r\n new BasicEditField(\" Time Limit for Connections: \", \"0\", 6,\r\n BasicEditField.FILTER_INTEGER);\r\n _attemptsLimit =\r\n new BasicEditField(\" Attempts Limit: \", \"0\", 4,\r\n BasicEditField.FILTER_INTEGER);\r\n _retryFactor =\r\n new BasicEditField(\" Retry Factor: \", \"0\", 6,\r\n BasicEditField.FILTER_INTEGER);\r\n\r\n // Transport selection\r\n final String[] transportNames =\r\n { \"none\", \"TCP Cellular\", \"Wap\", \"Wap2\", \"Mds\", \"Bis B\",\r\n \"TCP Wifi\" };\r\n\r\n // Preferred transport types option\r\n _transportSelection =\r\n new CheckboxField(\"Preferred Transport Types [Optional]\", false);\r\n _transportSelection.setChangeListener(new FieldChangeListener() {\r\n public void fieldChanged(final Field field, final int context) {\r\n if (_transportSelection.getChecked()) {\r\n // Transport selection check box is checked. Enable drop\r\n // downs for choosing the preferred transport.\r\n _order1.setEditable(true);\r\n _order2.setEditable(true);\r\n _order3.setEditable(true);\r\n _order4.setEditable(true);\r\n _order5.setEditable(true);\r\n _order6.setEditable(true);\r\n } else {\r\n // Transport selection check box is not checked. Disable\r\n // drop\r\n // downs for choosing the preferred transport and set them\r\n // to\r\n // \"none\".\r\n _order1.setSelectedIndex(0);\r\n _order1.setEditable(false);\r\n _order2.setSelectedIndex(0);\r\n _order2.setEditable(false);\r\n _order3.setSelectedIndex(0);\r\n _order3.setEditable(false);\r\n _order4.setSelectedIndex(0);\r\n _order4.setEditable(false);\r\n _order5.setSelectedIndex(0);\r\n _order5.setEditable(false);\r\n _order6.setSelectedIndex(0);\r\n _order6.setEditable(false);\r\n }\r\n }\r\n });\r\n\r\n // Initialize preferred transport types option.\r\n // By default disable the options.\r\n _order1 = new ObjectChoiceField(\"First:\", transportNames);\r\n _order1.setEditable(false);\r\n _order2 = new ObjectChoiceField(\"Second:\", transportNames);\r\n _order2.setEditable(false);\r\n _order3 = new ObjectChoiceField(\"Third:\", transportNames);\r\n _order3.setEditable(false);\r\n _order4 = new ObjectChoiceField(\"Forth:\", transportNames);\r\n _order4.setEditable(false);\r\n _order5 = new ObjectChoiceField(\"Fifth:\", transportNames);\r\n _order5.setEditable(false);\r\n _order6 = new ObjectChoiceField(\"Sixth:\", transportNames);\r\n _order6.setEditable(false);\r\n\r\n // Initialize disallowed transport types check boxes\r\n _labelDisallowedTrasnports =\r\n new LabelField(\"Disallowed Transport Types [optional]:\");\r\n _disallowDirectTCP = new CheckboxField(\"TCP Cellular\", false);\r\n _disallowWap = new CheckboxField(\"Wap\", false);\r\n _disallowWap2 = new CheckboxField(\"Wap2\", false);\r\n _disallowMds = new CheckboxField(\"Mds\", false);\r\n _disallowBisB = new CheckboxField(\"Bis B\", false);\r\n _disallowWifi = new CheckboxField(\"TCP Wifi\", false);\r\n\r\n // Initialize TCP Cellular transport options\r\n _labelTcpCellular = new LabelField(\"TCP Cellular Options [optional]:\");\r\n _tcpApn = new EditField(\" APN: \", \"\");\r\n _tcpApnUser = new EditField(\" Username: \", \"\");\r\n _tcpApnPassword = new EditField(\" Password: \", \"\");\r\n\r\n // Initialize WAP transport options\r\n _labelWap = new LabelField(\"WAP Options [optional]:\");\r\n _wapGatewayApn = new EditField(\" Gateway APN: \", \"\");\r\n _wapGatewayIp = new EditField(\" Gateway IP: \", \"\");\r\n _wapGatewayPort = new EditField(\" Gateway Port: \", \"\");\r\n _wapSourceIp = new EditField(\" Source IP: \", \"\");\r\n _wapSourcePort = new EditField(\" Source Port: \", \"\");\r\n _wapUser = new EditField(\" Username: \", \"\");\r\n _wapPassword = new EditField(\" Password: \", \"\");\r\n\r\n _wapEnableWTLS = new CheckboxField(\" Enable WTLS\", false);\r\n\r\n // Initialize BisB transport options\r\n _labelBisB = new LabelField(\"BisB Options [mandatory for BisB]\");\r\n _bisBConnectionType = new EditField(\" Connection Type: \", \"\");\r\n\r\n // Add options to a VerticalFieldManager\r\n _optionFieldsManager = new VerticalFieldManager();\r\n _optionFieldsManager.add(_labelConnectionOpt);\r\n _optionFieldsManager.add(_connectionMode);\r\n _optionFieldsManager.add(_timeoutSupported);\r\n _optionFieldsManager.add(_endToEndRequired);\r\n _optionFieldsManager.add(_endToEndDesired);\r\n _optionFieldsManager.add(_connectionTimeout);\r\n\r\n _optionFieldsManager.add(new SeparatorField());\r\n\r\n _optionFieldsManager.add(_labelRetriesOpt);\r\n _optionFieldsManager.add(_timeLimit);\r\n _optionFieldsManager.add(_attemptsLimit);\r\n _optionFieldsManager.add(_retryFactor);\r\n\r\n _optionFieldsManager.add(new SeparatorField());\r\n\r\n _optionFieldsManager.add(_transportSelection);\r\n _optionFieldsManager.add(_order1);\r\n _optionFieldsManager.add(_order2);\r\n _optionFieldsManager.add(_order3);\r\n _optionFieldsManager.add(_order4);\r\n _optionFieldsManager.add(_order5);\r\n _optionFieldsManager.add(_order6);\r\n\r\n _optionFieldsManager.add(new SeparatorField());\r\n\r\n _optionFieldsManager.add(_labelDisallowedTrasnports);\r\n _optionFieldsManager.add(_disallowDirectTCP);\r\n _optionFieldsManager.add(_disallowWap);\r\n _optionFieldsManager.add(_disallowWap2);\r\n _optionFieldsManager.add(_disallowMds);\r\n _optionFieldsManager.add(_disallowBisB);\r\n _optionFieldsManager.add(_disallowWifi);\r\n\r\n _optionFieldsManager.add(new SeparatorField());\r\n\r\n _optionFieldsManager.add(_labelTcpCellular);\r\n _optionFieldsManager.add(_tcpApn);\r\n _optionFieldsManager.add(_tcpApnUser);\r\n _optionFieldsManager.add(_tcpApnPassword);\r\n\r\n _optionFieldsManager.add(new SeparatorField());\r\n\r\n _optionFieldsManager.add(_labelWap);\r\n _optionFieldsManager.add(_wapGatewayApn);\r\n _optionFieldsManager.add(_wapGatewayIp);\r\n _optionFieldsManager.add(_wapGatewayPort);\r\n _optionFieldsManager.add(_wapUser);\r\n _optionFieldsManager.add(_wapPassword);\r\n _optionFieldsManager.add(_wapSourceIp);\r\n _optionFieldsManager.add(_wapSourcePort);\r\n _optionFieldsManager.add(_wapEnableWTLS);\r\n\r\n _optionFieldsManager.add(new SeparatorField());\r\n\r\n _optionFieldsManager.add(_labelBisB);\r\n _optionFieldsManager.add(_bisBConnectionType);\r\n\r\n _uiApp = UiApplication.getUiApplication();\r\n }",
"private GUIAltaHabitacion() {\r\n\t initComponents();\r\n\t }",
"private void initUI() {\n mLocalContainer = findViewById(R.id.local_video_view_container);\n mRemoteContainer = findViewById(R.id.remote_video_view_container);\n\n mCallBtn = findViewById(R.id.btn_call);\n mMuteBtn = findViewById(R.id.btn_mute);\n mSwitchCameraBtn = findViewById(R.id.btn_switch_camera);\n }",
"public void initGui()\n {\n StringTranslate var1 = StringTranslate.getInstance();\n int var2 = this.func_73907_g();\n\n for (int var3 = 0; var3 < this.options.keyBindings.length; ++var3)\n {\n this.controlList.add(new GuiSmallButton(var3, var2 + var3 % 2 * 160, this.height / 6 + 24 * (var3 >> 1), 70, 20, this.options.getOptionDisplayString(var3)));\n }\n\n this.controlList.add(new GuiButton(200, this.width / 2 - 100, this.height / 6 + 168, var1.translateKey(\"gui.done\")));\n this.screenTitle = var1.translateKey(\"controls.minimap.title\");\n }",
"private static void createAndShowGUI() {\n Functionality func = new Functionality();\n }",
"protected void setupUI() {\n textView = (TextView) findViewById(R.id.textView);\n viewGradeButton = (Button) findViewById(R.id.viewAllBillsButton);\n viewDash = (Button) findViewById(R.id.viewDash);\n\n //Listen if the buttons is clicked\n viewGradeButton.setOnClickListener(onClickViewGradeButton);\n viewDash.setOnClickListener(onClickViewDash);\n\n }",
"public Authentification() {\n initComponents();\n init_Panel();\n Admin_Button.addActionListener(new Admin_Action()); \n User_Button.addActionListener(new User_Action());\n Retour_Button.addActionListener(new Retour_Action() );\n Retour_Button.addActionListener(new Connexion_Action() );\n \n \n }",
"public MainGui() {\n initComponents();\n this.setVisible(true);\n configuracoesSalvas();\n }",
"private void connectEventHandlers() {\n\t\t// Join game\n\t\tjoinGame.addListener(SWT.Selection, new Listener() {\n\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\tString ip = server.getText();\n\t\t\t\tString player = name.getText();\n\t\t\t\ttry {\n\t\t\t\t\t// Connect to the server\n\t\t\t\t\tapp.connect(ip, player);\n\t\t\t\t\t// Close the window after a successful connect\n\t\t\t\t\tshell.dispose();\n\t\t\t\t} catch (UnknownHostException e) {\n\t\t\t\t\tnew MessageDialog(shell, SWT.ICON_WARNING, \"Error\",\n\t\t\t\t\t\t\t\"Unknown host: \" + e.getMessage());\n\t\t\t\t} catch (LookupFailedException e) {\n\t\t\t\t\tnew MessageDialog(shell, SWT.ICON_WARNING, \"Error\",\n\t\t\t\t\t\t\t\"Unknown host: \" + e.getMessage());\n\t\t\t\t} catch (EstablishConnectionFailed e) {\n\t\t\t\t\tnew MessageDialog(shell, SWT.ICON_WARNING, \"Error\",\n\t\t\t\t\t\t\t\"Unknown host: \" + e.getMessage());\n\t\t\t\t} catch (ServerFullException e) {\n\t\t\t\t\tnew MessageDialog(shell, SWT.ICON_WARNING, \"Error\",\n\t\t\t\t\t\t\t\"Unknown host: \" + e.getMessage());\n\t\t\t\t} catch (NoNameException e) {\n\t\t\t\t\tnew MessageDialog(shell, SWT.ICON_WARNING, \"Error\",\n\t\t\t\t\t\t\t\"Unknown host: \" + e.getMessage());\n\t\t\t\t}\n\n\t\t\t}\n\t\t});\n\n\t\t// Load game\n\t\tloadGame.addListener(SWT.Selection, new Listener() {\n\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\t\n\t\t\t\tFileDialog fd = new FileDialog(shell, SWT.OPEN);\n\t\t\t\tfd.setText(\"Öffnen\");\n\t\t\t\tfd.setFilterPath(\"C:/\");\n\t\t\t\tString[] filterExt = { \"*.txt\", \"*.doc\", \".rtf\", \"*.*\" };\n\t\t\t\tfd.setFilterExtensions(filterExt);\n\t\t\t\t\n\t\t\t\tfd.open();\n//\t\t\t\tString selected = fd.open();\n\t\t\t\t// TODO use this String to open the right savegame\n\t\t\t}\n\n\t\t});\n\n\t\t// Quit the program on window close\n\t\tshell.addListener(SWT.Close, new Listener() {\n\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\n\t\t});\n\t}",
"private void initialize() {\n\t\tsetModal(true);\n\t\tsetTitle(\"Mode Selector\");\n\t\tsetBounds(100, 100, 550, 343);\n\t\tsetDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);\n\t\tToolkit toolkit = Toolkit.getDefaultToolkit();\n\t\tImage image = toolkit.getImage(ConfigFilePath.SWING_PATH);\n\t\tsetIconImage(image);\n\t\tgetContentPane().setLayout(null);\n\t\tsetLocationRelativeTo(null);\n\t\tsetResizable(false);\n\t\tJPanel panel = new JPanel();\n\t\tpanel.setBounds(0, 0, 534, 304);\n\t\tgetContentPane().add(panel);\n\t\tpanel.setLayout(null);\n\t\tbtnMes.setFont(new Font(\"宋体\", Font.PLAIN, 27));\n\t\tbtnMes.setBounds(280, 104, 163, 75);\n\t\tpanel.add(btnMes);\n\t\tbtnOperator.setFont(new Font(\"宋体\", Font.PLAIN, 25));\n\t\tbtnOperator.setBounds(80, 104, 163, 75);\n\t\tpanel.add(btnOperator);\n\n\t\t// mes监听\n\t\tbtnMes.addActionListener(new ModeMesAction(this));\n\t\t// op监听\n\t\tbtnOperator.addActionListener(new ModeOpAction(this));\n\t}",
"void initUI();",
"public void InitAVComCtl(){\n\n\n\t\tmBtnStart = (Button) findViewById(R.id.btn_start);\n\t\tmBtnStop = (Button) findViewById(R.id.btn_stop);\n\t\tmBtnSetting = (Button) findViewById(R.id.btn_setting);\n\t\tmBtnChooseCam = (Button) findViewById(R.id.btn_choosecam);\n\n\t\tonStartClickEvent();\n\t\tonStopClickEvent();\n\t\tonSettingClickEvent();\n\t\tgetStatToDisplay();\n\n\t\tonChooseCamClickEvent();\n\n\t\tconfigInfo = getSharedPreferences(\"AdvideoConfig\", Context.MODE_PRIVATE);\n\t\tinitViewConfig();\n\t}",
"public void GUISetup(){\n simTime.setText(\"50\");\n qMean.setText(\"24\");\n dMean.setText(\"45\");\n pMean.setText(\"55\");\n changeNorth.add(simTime2);\n changeNorth.add(simTime);\n changeNorth.add(pMean2);\n changeNorth.add(pMean);\n changeNorth.add(dMean2);\n changeNorth.add(dMean);\n changeNorth.add(qMean2);\n changeNorth.add(qMean);\n changeSouth.add(okay);\n \n resultDisplay.setEditable(false);\n descriptionDisplay.setEditable(false);\n \n changeFrame.add(changeNorth, BorderLayout.NORTH);\n changeFrame.add(changeSouth, BorderLayout.SOUTH);\n \n center.add(totalCus, BorderLayout.CENTER);\n center.add(doorCus, BorderLayout.CENTER);\n center.add(phoneCus, BorderLayout.CENTER);\n center.add(unhelped, BorderLayout.CENTER);\n\n help.add(programDescription);\n menuBar.add(help);\n north.add(menuBar);\n \n frame.setBounds(650, 400, 500, 200);\n changeFrame.setBounds(500, 400, 1100, 145);\n resultFrame.setBounds(500, 200, 600, 500);\n dFrame.setBounds(500, 200, 600, 500);\n frame.add(north, BorderLayout.NORTH);\n frame.add(south, BorderLayout.SOUTH);\n frame.add(center, BorderLayout.CENTER);\n frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\n resultFrame.add(scroll);\n dFrame.add(dScroll);\n showDetails.setEnabled(false);\n \n south.add(runSim);\n south.add(showDetails);\n south.add(changeSimProp);\n \n time = simTime.getText();\n questionT = qMean.getText();\n phoneT = pMean.getText();\n doorT = dMean.getText();\n frame.setVisible(true);\n buttonFunctions();\n }",
"public DesktopGUI() {\n initComponents();\n }",
"public void onClickConnect(View v) {\n try{sonBoxeur.getListeSons().get(0).stop();}catch (Exception e){}\n if (mSocket.getPseudo() == null) {\n Intent activity = new Intent(this, Connexion.class);\n try{sonBulle.play();}catch(Exception e){}\n startActivity(activity);\n } else {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(\"Vous êtes connecté en tant que \" + mSocket.getPseudo() + \", voulez-vous vous vraiment vous déconnecter?\").setTitle(\"Déconnexion\");\n builder.setPositiveButton(\"Oui\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n mSocket.deconnexion();\n connectImageView.setImageResource(R.drawable.reseau_disconnect);\n }\n });\n builder.setNegativeButton(\"Annuler\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User cancelled the dialog\n }\n });\n\n dialog = builder.create();\n dialog.show();\n }\n }",
"private void jbInit() {\r\n\t\t\tbuttonSend.setText(\"Invia\");\r\n\t\t\tbuttonSend.setSize(100, 100);\r\n\t\t\tgetContentPane().setLayout(new FlowLayout());\r\n\t\t\tsetResizable(false);\r\n\t\t\tgetContentPane().add(jPanel1);\r\n\t\t\tgetContentPane().add(jPanel2);\r\n\t\t\tgetContentPane().add(buttonSend);\r\n\t\t\tjPanel1.setLayout(new FlowLayout());\r\n\t\t\tjPanel1.add(labelIp);\r\n\t\t\tjPanel1.add(textip);\r\n\t\t\tjPanel2.setLayout(new FlowLayout());\r\n\t\t\tjPanel2.add(labelPorta);\r\n\t\t\tjPanel2.add(textport);\r\n\t\t\tjPanel2.add(labeleccez);\r\n\t\t\tbuttonSend.addActionListener(new ServerListener());\r\n\t\t\tgetRootPane().setDefaultButton(buttonSend);\r\n\t\t}",
"Gui getGui();",
"private void ini() {\n\t\tmLinearLayoutpush = (LinearLayout)findViewById(R.id.mLinearLayoutpush);\n\t\tmDialogText = (TextView)findViewById(R.id.mDialogText);\n\t\tmDialogTitle = (TextView)findViewById(R.id.mDialogTitle);\n\t\tmButtonpush = (Button)findViewById(R.id.mButtonpush);\n\t\tmbtn_back = (ImageButton)findViewById(R.id.mbtn_back);\n\t\tmLinearLayoutpush.setOnClickListener(this);\n\t\tmDialogText.setOnClickListener(this);\n\t\tmDialogTitle.setOnClickListener(this);\n\t\tmButtonpush.setOnClickListener(this);\n\t\tmbtn_back.setOnClickListener(this);\n\t\t\n\t}",
"public MyGUI() {\n \t super(\"Mastermind\");\n \t guiManager = new GUIManager();\n createMenuComponents();\n createMastermindComponents(this,2);\n \n }",
"public GUI() {\n\t\tinitComponents();\n\t}",
"private void init(Shell shell) {\r\n\t\t\r\n // GridLayout setzen\r\n\t\tGridLayout thisLayout = new GridLayout();\r\n\t thisLayout.numColumns = 2;\r\n\t\tshell.setLayout(thisLayout);\r\n\r\n\t\tshell.setText(\"Serververbindung\");\t\t\r\n\r\n\t\t// ConnectWindow-Elemente initialisieren\t\t\r\n\t\tipLabel = new Label(shell, SWT.NONE);\r\n\t\tipLabel.setText(\"Server IP:\");\r\n\t\tipLabel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));\r\n\t\tipLabel.pack();\r\n\t\t\r\n\t\tip = new Text(shell, SWT.BORDER);\r\n\t\tip.setText(\"255.255.255.255\");\r\n\t\tip.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\r\n\t\tip.pack();\r\n\t\t\r\n\t\tportLabel = new Label(shell, SWT.NONE);\r\n\t\tportLabel.setText(\"Server Port:\");\r\n\t\tportLabel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));\r\n\t\tportLabel.pack();\r\n\t\r\n\t\tport = new Text(shell, SWT.BORDER);\r\n\t\tport.setText(\"4711\");\r\n\t\tport.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\r\n\t\tport.pack();\r\n\t\r\n\t\tLabel empty = new Label(shell, SWT.NONE);\r\n\t\tempty.pack();\r\n\r\n\t\tconnect = new Button(shell, SWT.PUSH);\r\n\t\tconnect.setText(\"Verbinden\");\r\n\t\tconnect.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));\r\n\t\tconnect.pack();\r\n\t\t\r\n\t\t// Aktion beim Klicken auf connect-Button\r\n\t\tconnect.addSelectionListener(new SelectionAdapter() {\r\n\t\t\tpublic void widgetSelected(SelectionEvent evt) {\r\n\t\t\t\t\r\n\t\t\t\t// Verbindung zum Server wird aufgebaut\r\n\t\t\t\tConnectToServer();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tshell.pack();\r\n\t\t\r\n\t\t// Position von ConnectWindow wird an Position von MainWindow gebunden (Mitte)\r\n\t\t// Ermittlung und Setzen der Position\r\n Rectangle shellBounds = parent.shell.getBounds();\r\n Point dialogSize = shell.getSize();\r\n\r\n shell.setLocation(\r\n \t\tshellBounds.x + (shellBounds.width / 2) - (dialogSize.x / 2),\r\n \t\tshellBounds.y + (shellBounds.height / 2) - (dialogSize.y / 2));\r\n \r\n ip.setText(\"localhost\");\r\n\r\n\t}",
"public void handleConnectingState() {\n\n setProgressBarVisible(true);\n setGreenCheckMarkVisible(false);\n setMessageText(\"Connecting to \" + tallyDeviceName);\n\n }",
"public void buttonClick_connect(View view)\n\t{\n\t\tAppSettings.showConnectionLost = false;\n\t\tLog.i(TAG, \"showConnectionLost = false\");\n\t\t\n\t\tAppSettings.bluetoothConnection = new BluetoothConnection(this.getApplicationContext(), this.btConnectionHandler);\n\t\tBluetoothAdapter btAdapter = AppSettings.bluetoothConnection.getBluetoothAdapter();\n\t\t\n\t\t// If the adapter is null, then Bluetooth is not supported\n if (btAdapter == null) {\n \tToast.makeText(getApplicationContext(), R.string.bt_not_available, Toast.LENGTH_LONG).show();\n }\n else {\n \t// If Bluetooth is not on, request that it be enabled.\n if (!btAdapter.isEnabled()) {\n Intent enableIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableIntent, REQUEST_ENABLE_BT);\n }\n else {\n \t// Launch the DeviceListActivity to see devices and do scan\n Intent serverIntent = new Intent(getApplicationContext(), DeviceListActivity.class);\n startActivityForResult(serverIntent, REQUEST_CONNECT_DEVICE);\n }\n }\n\t}",
"public GUI_IntroDatos() {\n initComponents();\n }",
"private void initComponents() {\r\n stethoscopeLabel = (TextView) findViewById(R.id.stethoscope_label);\r\n modelNumber = (TextView) findViewById(R.id.model);\r\n firmwareVersion = (TextView) findViewById(R.id.firmware_version);\r\n batteryLevel = (TextView) findViewById(R.id.battery_level);\r\n autoBluetooth = (TextView) findViewById(R.id.auto_bluetooth);\r\n\r\n bytesRead = (TextView) findViewById(R.id.bytes_read);\r\n bytesReadSecond = (TextView) findViewById(R.id.bytes_read_sec);\r\n bytesWritten = (TextView) findViewById(R.id.bytes_written);\r\n bytesWrittenSecond = (TextView) findViewById(R.id.bytes_written_sec);\r\n\r\n switchButton = (Button) findViewById(R.id.stethoscope_switch_button);\r\n switchButton.setOnClickListener(new OnClickListener() {\r\n\r\n @Override\r\n public void onClick(View v) {\r\n listener.switchStethoscopeInformation();\r\n }\r\n });\r\n\r\n stopStreamingButton = (Button) findViewById(R.id.stop_streaming_button);\r\n stopStreamingButton.setOnClickListener(new OnClickListener() {\r\n\r\n @Override\r\n public void onClick(View v) {\r\n listener.stopStreaming();\r\n }\r\n });\r\n }",
"public GUI(){\n\t\tsuper(\"Simori\");\n\t\tthis.setDefaultCloseOperation(EXIT_ON_CLOSE);\n\t\tthis.getContentPane().setBackground(new Color(215,215,215));\n\t\tthis.setLayout(null);\n\t\t\n\t\t\n\t\tJPanel central = new JPanel();\n\t\tcentral.setSize(690,690);\n\t\tcentral.setLayout(new GridLayout(16,16));\n\t\tcentral.setBackground(new Color(215,215,215));\n\t\t\t\t\n\t\tActionListener modeListener = new ChangeModeListener();\n\t\tActionListener gridListener = new GridListener();\n\n\t\t\n\t\tfor(int i = 0; i < display.length; i++){\n\t\t\tfor(int j = 0; j < display[i].length; j++){\n\t\t\t\tJToggleButton button = new JToggleButton();\n\t\t\t\t\t\t\t\t\n\t\t\t\tbutton.setOpaque(true);\n\t\t\t\tbutton.setContentAreaFilled(true);\n\t\t\t\tbutton.setBorderPainted(false);\n\t\t\t\tbutton.setSelectedIcon(SCANNED);\n\t\t\t\tbutton.setIcon(DEFAULT);\n\t\t\t\t\n\t\t\t\tdisplay[i][j] = button;\t\t\t\t\t\t\t\n\t\t\t\tbutton.addActionListener(gridListener);\t\t\t\t\t\t\n\t\t\t\tcentral.add(button);\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(int i=0;i<36;i++){\n\t\t\tkeyboardIconArray[i] = new ImageIcon(\"imgs//\"+keyboardArray[i]+\".jpg\");\n\t\t\tkeyboardSelectedArray[i] = new ImageIcon(\"imgs//\"+keyboardArray[i]+\"s.jpg\");\n\t\t}\n\t\tthis.add(central);\n\t\tcentral.setBounds(110, 70, 690, 690);\n\t\t\n\t\tChangeLayer.Layers = new Layer[16];\n\t\tfor(int i = 0; i < ChangeLayer.Layers.length; i++){\n\t\t\tChangeLayer.Layers[i] = new Layer();\n\t\t}\n\n\t\t\n\t\tJToggleButton ON = new JToggleButton();\n\t\tON.setToolTipText(\"ON\");;\n\t\tmenuButtons[0] = ON;\n\t\t\n\t\tJToggleButton L1 = new JToggleButton();\n\t\tL1.setToolTipText(\"L1\");\n\t\tmenuButtons[1] = L1;\n\t\tJToggleButton L2 = new JToggleButton();\n\t\tL2.setToolTipText(\"L2\");\n\t\tmenuButtons[2] = L2;\n\t\tJToggleButton L3 = new JToggleButton();\n\t\tL3.setToolTipText(\"L3\");\n\t\tmenuButtons[3] = L3;\n\t\tJToggleButton L4 = new JToggleButton();\n\t\tL4.setToolTipText(\"L4\");\n\t\tmenuButtons[4] = L4;\n\t\t\n\t\tJToggleButton R1 = new JToggleButton();\n\t\tR1.setToolTipText(\"R1\");\n\t\tmenuButtons[5] = R1;\n\t\tJToggleButton R2 = new JToggleButton();\n\t\tR2.setToolTipText(\"R2\");\n\t\tmenuButtons[6] = R2;\n\t\tJToggleButton R3 = new JToggleButton();\n\t\tR3.setToolTipText(\"R3\");\n\t\tmenuButtons[7] = R3;\n\t\tJToggleButton R4 = new JToggleButton();\n\t\tR4.setToolTipText(\"R4\");\n\t\tmenuButtons[8] = R4;\n\t\t\n\t\tJToggleButton OK = new JToggleButton();\n\t\tOK.setToolTipText(\"OK\");\n\t\tmenuButtons[9] = OK;\n\t\t\t\t\t\n\t\t\t\t\n\t\tthis.add(ON);\n\t\tON.setBounds(400, 5, 60, 60);\n\t\tON.setIcon(new ImageIcon(\"imgs//ON.jpg\"));\n\t\tON.setSelectedIcon(new ImageIcon(\"imgs//ONs.jpg\"));\n\t\tON.setBorderPainted(false);\n\t\tON.addActionListener(modeListener);\n\t\t\n\t\tthis.add(L1);\n\t\tL1.setBounds(20, 100, 70, 70);\n\t\tL1.setIcon(new ImageIcon(\"imgs//L1.jpg\"));\n\t\tL1.setSelectedIcon(new ImageIcon(\"imgs//L1s.jpg\"));\n\t\tL1.setBorderPainted(false);\n\t\tL1.addActionListener(modeListener);\n\t\tthis.add(L2);\n\t\tL2.setBounds(20, 250, 70, 70);\n\t\tL2.setIcon(new ImageIcon(\"imgs//L2.jpg\"));\n\t\tL2.setSelectedIcon(new ImageIcon(\"imgs//L2s.jpg\"));\n\t\tL2.setBorderPainted(false);\n\t\tL2.addActionListener(modeListener);\n\t\tthis.add(L3);\n\t\tL3.setBounds(20, 400, 70, 70);\n\t\tL3.setIcon(new ImageIcon(\"imgs//L3.jpg\"));\n\t\tL3.setSelectedIcon(new ImageIcon(\"imgs//L3s.jpg\"));\n\t\tL3.setBorderPainted(false);\n\t\tL3.addActionListener(modeListener);\n\t\tthis.add(L4);\n\t\tL4.setBounds(20, 550, 70, 70);\n\t\tL4.setIcon(new ImageIcon(\"imgs//L4.jpg\"));\n\t\tL4.setSelectedIcon(new ImageIcon(\"imgs//L4s.jpg\"));\n\t\tL4.setBorderPainted(false);\n\t\tL4.addActionListener(modeListener);\n\t\t\n\t\tthis.add(R1);\n\t\tR1.setBounds(820, 100, 70, 70);\n\t\tR1.setIcon(new ImageIcon(\"imgs//R1.jpg\"));\n\t\tR1.setSelectedIcon(new ImageIcon(\"imgs//R1s.jpg\"));\n\t\tR1.setBorderPainted(false);\n\t\tR1.addActionListener(modeListener);\n\t\tthis.add(R2);\n\t\tR2.setBounds(820, 250, 70, 70);\n\t\tR2.setIcon(new ImageIcon(\"imgs//R2.jpg\"));\n\t\tR2.setSelectedIcon(new ImageIcon(\"imgs//R2s.jpg\"));\n\t\tR2.setBorderPainted(false);\n\t\tR2.addActionListener(modeListener);\n\t\tthis.add(R3);\n\t\tR3.setBounds(820, 400, 70, 70);\n\t\tR3.setIcon(new ImageIcon(\"imgs//R3.jpg\"));\n\t\tR3.setSelectedIcon(new ImageIcon(\"imgs//R3s.jpg\"));\n\t\tR3.setBorderPainted(false);\n\t\tR3.addActionListener(modeListener);\n\t\tthis.add(R4);\n\t\tR4.setBounds(820, 550, 70, 70);\n\t\tR4.setIcon(new ImageIcon(\"imgs//R4.jpg\"));\n\t\tR4.setSelectedIcon(new ImageIcon(\"imgs//R4s.jpg\"));\n\t\tR4.setBorderPainted(false);\n\t\tR4.addActionListener(modeListener);\n\t\t\n\t\tthis.add(OK);\n\t\tOK.setBounds(550, 770, 70, 70);\n\t\tOK.setIcon(new ImageIcon(\"imgs//OK.jpg\"));\n\t\tOK.setSelectedIcon(new ImageIcon(\"imgs//OKs.jpg\"));\n\t\tOK.setBorderPainted(false);\n\t\tOK.addActionListener(modeListener);\n\t\t\n\t\tthis.add(textField);\n\t\ttextField.setEditable(false);\n\t\ttextField.setText(\"LCD\");\n\t\ttextField.setBounds(120, 770, 280, 70);\n\t\t\n\n\t\t//sets the initial behaviour\n\t\tOnOff.disableMenuButtons();\n\t\tOnOff.disableGridButtons();\n\t\t\n\t\tthis.setSize(915, 890);\n\t\tthis.setResizable(false);\n\t\tthis.setVisible(true);\n\t\t\n\t}",
"public void run() {\n criaGUI();\n \n }",
"protected void initUI() {\n\r\n\t\t((Button) findViewById(R.id.project_site_start_wifiscan_button)).setOnClickListener(this);\r\n\r\n\t\t// ((Button) findViewById(R.id.project_site_calculate_ap_positions_button)).setOnClickListener(this);\r\n\r\n\t\t// ((Button) findViewById(R.id.project_site_add_known_ap)).setOnClickListener(this);\r\n\r\n\t\t((Button) findViewById(R.id.project_site_step_detect)).setOnClickListener(this);\r\n\t\t\r\n\t\t((ToggleButton) findViewById(R.id.project_site_toggle_autorotate)).setOnClickListener(this);\r\n\r\n\t\tmultiTouchView = ((MultiTouchView) findViewById(R.id.project_site_resultview));\r\n\t\tmultiTouchView.setRearrangable(false);\r\n\r\n\t\tmultiTouchView.addDrawable(map);\r\n\r\n\t\tif (site.getTitle().equals(ProjectSite.UNTITLED)) {\r\n\t\t\tshowDialog(DIALOG_TITLE);\r\n\t\t} else {\r\n\t\t\tif (freshSite) {\r\n\t\t\t\t// start configuration dialog\r\n\t\t\t\tshowDialog(DIALOG_FRESH_SITE);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}",
"GUIbrain() {\n addMouseListener(this);\n addMouseMotionListener(this);\n createGUI(this);\n }",
"public void openPromotion() {\n myActivity.setContentView(R.layout.promotion);\n Button promotionButtonToGame = myActivity.findViewById(R.id.button6);\n\n promotionButtonToGame.setOnClickListener(\n new View.OnClickListener() {\n\n public void onClick(View v) {\n ShogiHumanPlayer.this.setAsGui(myActivity);\n usingRulesScreen = false;\n if (state != null) {\n receiveInfo(state);\n }\n }\n }\n\n\n );\n\n\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.main);\n\n //TAREFA \n //- Recuperar instância de ConnectivityManager \n //- A partir da instância, recuperar informações da interface de rede ativa\n //- Mostrar nome da interface e se está conectada ou não\n //- Recuperar informações da rede Wifi e móvel e mostrar se estão conectadas ou não\n }",
"public FrameIntroGUI() {\n\t\ttry {\n\t\t\tjbInit();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}"
]
| [
"0.6821918",
"0.676339",
"0.66051",
"0.65846735",
"0.65842986",
"0.6469205",
"0.6420565",
"0.63972557",
"0.6333056",
"0.6304586",
"0.6299166",
"0.6291304",
"0.6290674",
"0.62803704",
"0.62784857",
"0.6267952",
"0.62348944",
"0.6196004",
"0.619154",
"0.61868435",
"0.6178142",
"0.61656237",
"0.6153718",
"0.61522776",
"0.61497116",
"0.61145824",
"0.6113264",
"0.6111855",
"0.61041296",
"0.6097473",
"0.60892045",
"0.60848206",
"0.60839283",
"0.60779357",
"0.6072452",
"0.60722625",
"0.60662043",
"0.60646814",
"0.6053665",
"0.6051131",
"0.6039886",
"0.6026475",
"0.60235786",
"0.60180247",
"0.60131955",
"0.600643",
"0.59947807",
"0.5968202",
"0.59599805",
"0.59589213",
"0.59475297",
"0.59456855",
"0.5942156",
"0.59393096",
"0.5937301",
"0.5935794",
"0.593362",
"0.59293425",
"0.5929033",
"0.59257907",
"0.59164524",
"0.5911513",
"0.59018576",
"0.5895054",
"0.5889222",
"0.5883459",
"0.588326",
"0.58829045",
"0.5882602",
"0.5880658",
"0.58753854",
"0.5875029",
"0.5863398",
"0.58630455",
"0.58628684",
"0.5855686",
"0.58454216",
"0.584408",
"0.58398736",
"0.5838062",
"0.58316636",
"0.5831018",
"0.58309865",
"0.58307326",
"0.5830455",
"0.58289653",
"0.58272254",
"0.5823346",
"0.5823345",
"0.5816271",
"0.5814264",
"0.5811434",
"0.580824",
"0.5805169",
"0.58037275",
"0.5801631",
"0.57989174",
"0.57983065",
"0.5798195",
"0.5797971",
"0.5797717"
]
| 0.0 | -1 |
TODO Fill this out someday | @Override
protected void onPreExecute() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"private void poetries() {\n\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\n\tpublic void anular() {\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 protected void getExras() {\n }",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"private void strin() {\n\n\t}",
"protected MetadataUGWD() {/* intentionally empty block */}",
"private static void cajas() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"public final void mo51373a() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"private void getStatus() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"@Override\n protected void init() {\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"protected boolean func_70814_o() { return true; }",
"private void kk12() {\n\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}",
"public void method_4270() {}",
"@Override\n public int describeContents() { return 0; }",
"@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"public void mo38117a() {\n }",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\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}",
"private void init() {\n\n\t}",
"public void smell() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {}",
"@Override\n\tpublic void apply() {\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\tprotected void prepare() {\n\t\t\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\n public void init() {\n }",
"@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}",
"@Override\n void init() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"protected void mo6255a() {\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\tprotected void prepare()\r\n\t{\r\n\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"public void identify() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void init() {}",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"protected OpinionFinding() {/* intentionally empty block */}",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initialize() {\n\t}",
"@Override\n\tprotected void initialize() {\n\t}",
"private Rekenhulp()\n\t{\n\t}",
"public void mo4359a() {\n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }"
]
| [
"0.57965225",
"0.5670303",
"0.5649603",
"0.5623082",
"0.55997676",
"0.554161",
"0.5524909",
"0.5503544",
"0.54934305",
"0.54776937",
"0.54053915",
"0.5397535",
"0.5397535",
"0.5388049",
"0.53607637",
"0.53471977",
"0.53151566",
"0.5284153",
"0.52837527",
"0.52813447",
"0.5274948",
"0.52640283",
"0.5263527",
"0.525516",
"0.525516",
"0.525516",
"0.525516",
"0.525516",
"0.525516",
"0.5253846",
"0.5252859",
"0.5249194",
"0.52462614",
"0.52418774",
"0.5239053",
"0.5236122",
"0.52107376",
"0.5201246",
"0.5201246",
"0.5184469",
"0.5183022",
"0.51795876",
"0.51795876",
"0.5168246",
"0.5164293",
"0.5161268",
"0.5144677",
"0.514243",
"0.51412666",
"0.5139472",
"0.5136059",
"0.5136059",
"0.51328456",
"0.51316595",
"0.5126386",
"0.5113663",
"0.51099086",
"0.5109487",
"0.5099384",
"0.5099384",
"0.5099384",
"0.5099384",
"0.5099384",
"0.5096842",
"0.50869745",
"0.5086704",
"0.5086688",
"0.50799567",
"0.50799567",
"0.50799567",
"0.50751966",
"0.5074371",
"0.507153",
"0.5067545",
"0.5065844",
"0.50591797",
"0.5049884",
"0.5047218",
"0.5039327",
"0.50379884",
"0.5036639",
"0.5034394",
"0.50339717",
"0.50278246",
"0.50235844",
"0.501942",
"0.50194",
"0.50194",
"0.50194",
"0.50149804",
"0.5012802",
"0.50097334",
"0.50097334",
"0.5003385",
"0.5003182",
"0.5002022",
"0.50006974",
"0.50006974",
"0.50006974",
"0.50006974",
"0.50006974"
]
| 0.0 | -1 |
Slows down progress bar process to give user time to read about the activity. TODO Will be used to download data in the background in the future. | @Override
protected Void doInBackground(Void... params) {
while (myProgress < 100) {
myProgress++;
publishProgress(myProgress);
SystemClock.sleep(50);
}
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void onClick(View view) {\n progressStatus = 0;\n\n // Start the lengthy operation in a background thread\n new Thread(new Runnable() {\n @Override\n public void run() {\n while (progressStatus < 100) {\n // Update the progress status\n progressStatus += 1;\n }\n\n //Try to sleep the thread for 30 milliseconds\n try {\n Thread.sleep(30);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n // Update the progress bar\n handler.post(new Runnable() {\n @Override\n public void run() {\n pgb.setProgress(progressStatus);\n }\n });\n }\n }).start();// Start the operation\n }",
"public static void updateProgressBar() {\r\n mHandler.postDelayed(mUpdateTime, 100);\r\n }",
"private void updateUI() {\n handler_.post(new Runnable() {\n public void run() {\n bar_.setProgress(time_);\n String remTimeStr = \"\" + (maxTime_ - time_);\n timeRemaining_.setText(REM_STRING.replace(\"?\", remTimeStr));\n }\n });\n }",
"private void toggleProgress() {\n if (progWheel.getVisibility() == View.VISIBLE) {\n // Needs its own thread for timing control\n Handler handler = new Handler();\n final Runnable r = new Runnable() {\n public void run() {\n if (progWheel.getVisibility()\n == View.VISIBLE) {\n progWheel.setVisibility(View.GONE);\n }\n }\n };\n handler.postDelayed(r, 1);\n } else if (progWheel.getVisibility() == View.GONE) {\n progWheel.spin();\n progWheel.setVisibility(View.VISIBLE);\n }\n }",
"private void updateTaskActivityLabel()\r\n {\r\n setLabelValue(\"Tile Downloads \" + myActiveQueryCounter.intValue());\r\n setProgress(myDoneQueryCounter.doubleValue() / myTotalSinceLastAllDoneCounter.doubleValue());\r\n }",
"public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {\n textViewDelay.setText(\"Delay: \" + progress + \" seconds\"); //update \"progress\" value and pass it to textview\n }",
"private void timmer() {\n showTimmerOptions();\n\n\n\n final int val = 500;\n taskProgressInner = (ProgressBar) findViewById(com.ryansplayllc.ryansplay.R.id.TaskProgress_Inner);\n new Thread(new Runnable() {\n public void run() {\n int tmp = (val / 100);\n\n for (int incr = 0; incr <= val; incr++) {\n\n try {\n taskProgressInner.setProgress(incr);\n if ((incr % 100) == 0) {\n tmp--;\n }\n Thread.sleep(10);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }\n }).start();\n\n // intilaizating count down timer object\n progressDialog.dismiss();\n countDownTimer = new CountDownTimer(4000, 1000) {\n\n public void onTick(long millisUntilFinished) {\n countDownTextView.setText(Long\n .toString(millisUntilFinished / 1000));\n\n\n }\n\n public void onFinish() {\n\n countDownTextView.setText(\"0\");\n\n\n isSelectable = false;\n\n\n // changing text view if player is not umpire\n if (!Utility.isUmpire) {\n\n runOnUiThread(new Runnable() {\n\n @Override\n public void run() {\n String message = \"Waiting for the Umpire result.\";\n// showWaitingPopUp(message);\n showBallinPlayView();\n final ImageView gamescreenbackground = (ImageView) findViewById(com.ryansplayllc.ryansplay.R.id.umpirescreenfield);\n gamescreenbackground.setImageResource(com.ryansplayllc.ryansplay.R.drawable.baseball_field);\n\n\n }\n });\n }\n // calling method to submit result\n submitPlayerPrediction();\n }\n };\n isSelectable = true;\n countDownTimer.start();\n\n }",
"private void progressBarLoading() {\n new Thread(new Runnable() {\n public void run() {\n while (progressStatus < 100) {\n progressStatus += 1;\n handler.post(new Runnable() {\n public void run() {\n progressBar.setProgress(progressStatus);\n }\n });\n try {\n Thread.sleep(30);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n if (progressStatus == 100) {\n //intent for go next page\n MainActivityGo = new Intent(getApplicationContext(),MainActivity.class);\n startActivity(MainActivityGo);\n }\n }\n }).start();\n }",
"void startProgress();",
"@Override\n public void showProgressBar() {\n MainActivity.sInstance.showProgressBar();\n }",
"public void onBtnBeginClicked(View v) {\n progressBar.setSecondaryProgress(0);\n\n //Setting initial value to time textview\n txtTime.setText(String.format(\"%d\\\"\", PROGRESSBAR_TIME_MS / 1000));\n\n //Disable button to prevent more clicks\n btnBegin.setEnabled(false);\n\n new CountDownTimer(PROGRESSBAR_TIME_MS, PROGRESSBAR_INTERVAL_MS) {\n\n public void onTick(long millisUntilFinished) {\n\n //Setting current step to progress bar\n int progress = (int)(Math.ceil((PROGRESSBAR_TIME_MS - millisUntilFinished)/(double)PROGRESSBAR_INTERVAL_MS));\n progressBar.setSecondaryProgress(progress);\n\n //Updating value to time textview\n txtTime.setText(String.format(\"%d\\\"\", millisUntilFinished / 1000));\n\n }\n\n public void onFinish() {\n\n //final value for the progress bar (100%)\n progressBar.setSecondaryProgress(PROGRESSBAR_TIME_MS);\n\n Toast.makeText(getApplicationContext(), \"FINISHED TIME\", Toast.LENGTH_SHORT).show();\n\n //Enable button again\n btnBegin.setEnabled(true);\n }\n }.start();\n\n\n\n }",
"@Override\n public void onTick(long leftTimeInMilliseconds) {\n long seconds = leftTimeInMilliseconds / 1000;\n barTimer.setProgress((int) seconds);\n\n }",
"private void startDownloadActivity() {\n checking();\n numDownloading = 0;\n updateMax = 0;\n updateProgress = 0;\n readPref();\n writePref();\n update();\n }",
"@Override \r\n\t\t public void onProgressChanged(SeekBar seekBar, int progress,boolean fromUser) {\n\t\t \tint actualValue = Math.round(progress/100)*100;\r\n\t\t \tactualValue += delayMinimum;\t\t \t\r\n\t\t seekValue.setText(\"\"+actualValue);\t\t\r\n\t\t delayTime = actualValue;\r\n\t\t }",
"private void startProgressBar() {\n\t b_buscar.setVisibility(View.GONE);\n\t // wi_progreso.setVisibility(View.VISIBLE);\n\t ly_progreso.setVisibility(View.VISIBLE);\n\t}",
"@Override\n public Void doInBackground() {\n Random random = new Random();\n int progress = 0;\n //Initialize progress property.\n super.setProgress(0);\n while (progress < 100) {\n //Sleep for up to one second.\n try {\n Thread.sleep(random.nextInt(1000));\n } catch (InterruptedException ignore) {}\n //Make random progress.\n progress += random.nextInt(10);\n super.setProgress(Math.min(progress, 100));\n }\n return null;\n }",
"void showProgress();",
"@Override\n public void showProgress() {\n\n }",
"private void updateProgressBar() {\n\t\tdouble current = model.scannedCounter;\n\t\tdouble total = model.fileCounter;\n\t\tdouble percentage = (double)(current/total);\n\t\t\n\t\t//Update Progress indicators\n\t\ttxtNumCompleted.setText((int) current + \" of \" + (int) total + \" Completed (\" + Math.round(percentage*100) + \"%)\");\n\t\tprogressBar.setProgress(percentage);\n\t}",
"public abstract void onProgress(short percentage, long downloadedSoFar);",
"@Override\n \t\tprotected Void doInBackground(Void... params) \n \t\t{\n \t\t\ttry \n \t\t\t{\n \t\t\t\twhile(m_progress < 100) {\n \t\t\t\t\t//Get the current thread's token\n \t\t\t\t\tsynchronized (this) \n \t\t\t\t\t{\n \t\t\t\t\t\tthis.wait();\n \t\t\t\t\t\t//Set the current progress. \n \t\t\t\t\t\t//This value is going to be passed to the onProgressUpdate() method.\n \t\t\t\t\t\tpublishProgress(m_progress);\n \t\t\t\t\t}\n \t\t\t\t}\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\treturn null;\n \t\t}",
"@Override\n\t\tprotected Object doInBackground(Object... arg0) {\n\n\t\t\tfor (int i = 0; i < Integer.MAX_VALUE; i++) {\n\t\t\t\ttry {\n\t\t\t\t\tThread.sleep(6000);\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\n\t\t\t\tpublishProgress(null);\n\n\t\t\t}\n\n\t\t\treturn null;\n\t\t}",
"@Override\n public void run() {\n if (!MainActivity.pause) {\n MainActivity.fetch = MainActivity.fetch - 1;\n MainActivity.cpbProgress.setProgress(MainActivity.fetch);\n if (MainActivity.fetch < 10) {\n MainActivity.tvTimer.setText(Constant.ZERO + MainActivity.fetch + \"\");\n } else {\n MainActivity.tvTimer.setText(MainActivity.fetch + \"\");\n }\n if (MainActivity.fetch == 0) {\n /*Toast t=Toast.makeText(MainActivity.act, \"Sorry time is Up....\",4000);//////..........not working............///////\n t.show();*/\n finish();\n System.exit(0);\n }\n } else {\n i--;\n }\n }",
"public void run() {\n\t\t\t\t\tmHandler.post(new Runnable() {\r\n\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\tprogressbar.setProgress(Integer\r\n\t\t\t\t\t\t\t\t\t.parseInt(tvsp.progress));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t}",
"@Override\n\t\tprotected void onProgressUpdate(Integer... progress) {\n\t\t\tprogressBar.setVisibility(View.VISIBLE);\n\n\t\t\t// updating progress bar value\n\t\t\tprogressBar.setProgress(progress[0]);\n\n\t\t\t// updating percentage value\n\t\t\ttxtPercentage.setText(String.valueOf(progress[0]) + \"%\");\n\t\t}",
"@Override\r\n\tprotected void onProgressUpdate(String... s) {\r\n\t\tactivity.addToGUI(s[0]);\r\n\t}",
"@Override\n protected String doInBackground(String... url) {\n\n // Increment progress up to half of total background processing\n while(progress_status < 50){\n\n progress_status += 2;\n\n // send progress to UI thread\n publishProgress(progress_status);\n\n // sleep to show progress bar\n SystemClock.sleep(SLEEP_DURATION);\n }\n\n String s = null;\n try {\n\n // Download directions with url\n s = downloadUrl(url[0]);\n }\n catch (IOException e) {\n Log.d(\"Background Task\",e.toString());\n }\n\n // Return a string with xml data\n return s;\n }",
"@Override\n public void onProgress(String requestId, long bytes, long totalBytes) {\n Double progress = (double) bytes / totalBytes;\n // post progress to app UI (e.g. progress bar, notification)\n // example code ends here\n mAvi1.setVisibility(View.VISIBLE);\n }",
"@Override\n public void onProgress(String requestId, long bytes, long totalBytes) {\n Double progress = (double) bytes / totalBytes;\n // post progress to app UI (e.g. progress bar, notification)\n // example code ends here\n mAvi1.setVisibility(View.VISIBLE);\n }",
"@Override\n protected void onProgressUpdate(Integer... progress) {\n progressBar.setVisibility(View.VISIBLE);\n\n // updating progress bar value\n progressBar.setProgress(progress[0]);\n\n // updating percentage value\n txtPercentage.setText(String.valueOf(progress[0]) + \"%\");\n }",
"@Override\n protected void onProgressUpdate(Integer... progress) {\n super.onProgressUpdate(progress);\n // if we get here, length is known, now set indeterminate to false\n AudioActivity.sProgDialDownload.setIndeterminate(false);\n AudioActivity.sProgDialDownload.setMax(100);\n AudioActivity.sProgDialDownload.setProgress(progress[0]);\n }",
"public void onPause() {\n super.onPause();\n Settings.System.putInt(this.mActivity.getContentResolver(), Constants.System.STATUS_BAR_SHOW_NETWORK_SPEED, this.mStatusBarShowNetworkSpeed);\n }",
"void onProgress(long bytesTransferred);",
"@Override\r\n\tprotected Void doInBackground() throws Exception {\n\t\tint MyProg=0;\r\n\t\tSystem.out.println(\"dsdksj\");\r\n\t\twhile(MyProg<100){\r\n\t\t\tfor(long klo=0; klo<999; klo++);\r\n\t\t\t\r\n\t\t\t MyProg = (int) MP3Player.getProgress();\r\n\t\t\tMyGui.progressBar.setValue(MyProg);\r\n\t\t\tMyGui.TimeLabel.setText(MP3Player.getTime());\r\n\t\t//MyGui.progressBar.setValue((int) MP3Player.getProgress());\r\n\t\t\tif(MyProg==99){\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\tSystem.out.println(MyProg);\r\n\t\t}\r\n\t\tMyGui.progressBar.setValue(100);\r\n\t\tMyGui.progressBar.setValue(0);\r\n\t\tMyGui.TimeLabel.setText(\"\");\r\n\t\tMyGui.lblArtistBio.setText(\"\");\r\n\t\treturn null;\r\n\t}",
"@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tmpProgress = ProgressDialog.show(mContext,\n\t\t\t\t\t\t\t\"Downloading data\",\n\t\t\t\t\t\t\t\"Please wait for a moment...\");\n\t\t\t\t}",
"@Override\n public void hideProgressBar() {\n MainActivity.sInstance.hideProgressBar();\n }",
"@Override\n protected void onPreExecute() {\n\n myProgress = 0;\n }",
"public void infoProgressOn (){\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n if (tabTourInfoBinding.tourInfoProgress.getVisibility() != View.VISIBLE) {\n tabTourInfoBinding.tourInfoProgress.setVisibility(View.VISIBLE);\n }\n if (tabTourInfoBinding.tourInfoLayout.getVisibility() != View.GONE) {\n tabTourInfoBinding.tourInfoLayout.setVisibility(View.GONE);\n }\n }\n });\n }",
"private void fillData() {\n timer = null;\n timer2 = null;\n timer = new Timer();\n timer2 = new Timer();\n\n ActivityManager.MemoryInfo mi = new ActivityManager.MemoryInfo();\n ActivityManager activityManager = (ActivityManager) getActivity().getSystemService(ACTIVITY_SERVICE);\n activityManager.getMemoryInfo(mi);\n double availableMegs = mi.availMem / 0x100000L;\n double percentAvail = mi.availMem / (double)mi.totalMem * 100.0;\n\n\n// long l = AppUtil.getAvailMemory(mContext);\n// long y = AppUtil.getTotalMemory(mContext);\n// final double x = (((y - l) / (double) y) * 100);\n// // arcProcess.setProgress((int) x);\n final double x = 100 - percentAvail;\n arcProcess.setProgress(0);\n timer.schedule(new TimerTask() {\n @Override\n public void run() {\n getActivity().runOnUiThread(new Runnable() {\n @Override\n public void run() {\n\n\n if (arcProcess.getProgress() >= (int) x) {\n timer.cancel();\n } else {\n arcProcess.setProgress(arcProcess.getProgress() + 1);\n }\n\n }\n });\n }\n }, 50, 20);\n\n SDCardInfo mSDCardInfo = StorageUtil.getSDCardInfo();\n SDCardInfo mSystemInfo = StorageUtil.getSystemSpaceInfo(mContext);\n\n long nAvailaBlock;\n long TotalBlocks;\n if (mSDCardInfo != null) {\n nAvailaBlock = mSDCardInfo.free + mSystemInfo.free;\n TotalBlocks = mSDCardInfo.total + mSystemInfo.total;\n } else {\n nAvailaBlock = mSystemInfo.free;\n TotalBlocks = mSystemInfo.total;\n }\n\n final double percentStore = (((TotalBlocks - nAvailaBlock) / (double) TotalBlocks) * 100);\n\n capacity.setText(StorageUtil.convertStorage(TotalBlocks - nAvailaBlock) + \"/\" + StorageUtil.convertStorage(TotalBlocks));\n arcStore.setProgress(0);\n\n timer2.schedule(new TimerTask() {\n @Override\n public void run() {\n getActivity().runOnUiThread(new Runnable() {\n @Override\n public void run() {\n\n\n if (arcStore.getProgress() >= (int) percentStore) {\n timer2.cancel();\n } else {\n arcStore.setProgress(arcStore.getProgress() + 1);\n }\n\n }\n });\n }\n }, 50, 20);\n\n\n }",
"@Override\n public void run() {\n Message uiMSG;\n //Create message with only SHOW_ORIGINAL_COLOR argument\n uiMSG = BackgroundThread.this.uiHandler.obtainMessage(BidirectionalMessageActivity.SHOW_ORIGINAL_COLOR, 0, 0, null);\n BackgroundThread.this.uiHandler.sendMessage(uiMSG); //Send start message to UI thread\n\n fillProgressbar(progressBar); //Fill progress bar as a long time operation\n //Message with information SHOW_NEW_COLOR as a end of long time operation\n uiMSG = BackgroundThread.this.uiHandler.obtainMessage(BidirectionalMessageActivity.SHOW_NEW_COLOR, 0, 0, null);\n BackgroundThread.this.uiHandler.sendMessage(uiMSG); //Message with end result is sent\n }",
"@Override\n\t\t\t\t\t\tpublic void onLoading(long count, long current) {\n\t\t\t\t\t\t\tsuper.onLoading(count, current);\n\t\t\t\t\t\t\tprocess_tv.setVisibility(View.VISIBLE);\n\t\t\t\t\t\t\tint process = (int) (current*100/count);\n\t\t\t\t\t\t\tprocess_tv.setText(\"下载进度:\"+process+\"%\");\n\t\t\t\t\t\t}",
"void onShowProgress();",
"@Override\n public void run() {\n for (int i = 0; i<100 ; i++) {\n pb.setProgress(i/1000.0);\n try {\n Thread.sleep(1000);\n } catch (InterruptedException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }\n }",
"@Override\n protected Void doInBackground(Void... params) {\n while(myProgress<TIEMPOMAXIMO){\n if (isCancelled())\n break;\n\n if(Cancelar==true){\n myProgress=TIEMPOMAXIMO;\n }else {\n\n if(issumartiempo==true){\n TIEMPOMAXIMO=TIEMPOAUMENTADO+TIEMPOLIMITE;\n\n }\n myProgress++;\n\n publishProgress(myProgress);\n\n\n SystemClock.sleep(1000);}\n }\n return null;\n }",
"@Override\n public void onProgressChanged(SeekBar seekBar, int progress, boolean b)\n {\n speed = progress;\n speedLabel.setText(speed + \"\");\n if(serviceIntent != null)\n serviceIntent.putExtra(\"Speed\", speed+\"\");\n\n //TODO: Notify the service\n if(crashDetectionService != null)\n {\n crashDetectionService.setSpeed(speed);\n }\n }",
"@Override\n protected void onPreExecute() {\n myProgress = 0;\n }",
"@Override\r\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\twait_time = 0;\r\n\t\t\t\t\t\t\twhile (true) {\r\n\t\t\t\t\t\t\t\tif (HomeView.ble_status == 0\r\n\t\t\t\t\t\t\t\t\t\t|| HomeView.ble_status == 1\r\n\t\t\t\t\t\t\t\t\t\t|| HomeView.ble_status == 2) {\r\n\r\n\t\t\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t\t\tscanLeDevice(true);\r\n\t\t\t\t\t\t\t\t\t\tbluetoothSwitch = true;\r\n\t\t\t\t\t\t\t\t\t\tsetUI();\r\n\t\t\t\t\t\t\t\t\t\trunOnUiThread(new Runnable() {\r\n\t\t\t\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\t\t\t\tprogress.dismiss();\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\t} catch (IllegalArgumentException e) {\r\n\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\twait_time++;\r\n\t\t\t\t\t\t\t\tif (wait_time > 5) {\r\n\t\t\t\t\t\t\t\t\trunOnUiThread(new Runnable() {\r\n\t\t\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\t\t\tprogress.dismiss();\r\n\t\t\t\t\t\t\t\t\t\t\twait_time = 0;\r\n\t\t\t\t\t\t\t\t\t\t\tbluetoothSwitch = false;\r\n\t\t\t\t\t\t\t\t\t\t\tsetUI();\r\n\t\t\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\treturn;\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t\t\tThread.sleep(1000);\r\n\t\t\t\t\t\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}",
"public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t}",
"public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t}",
"@Override\n public void onTick(long leftTimeInMilliseconds) {\n long seconds = leftTimeInMilliseconds / 1000;\n if(counter == 15){\n pgBarCountDown.setProgress(100);\n }\n else {\n pgBarCountDown.setProgress(counter * 6);\n }\n\n tv_timer_text.setText(counter+\" \" +\"Sec\");\n // format the textview to show the easily readable format\n counter++;\n\n }",
"@Override\n public void onProgress(long downloaded, long total) {\n int progress = (int) (downloaded / total * 100);\n bar.setProgress(progress);\n }",
"private void showSpinerProgress() {\n dialog.setMessage(\"Loading\");\n//\n// dialog.setButton(ProgressDialog.BUTTON_POSITIVE, \"YES\", new DialogInterface.OnClickListener() {\n// @Override\n// public void onClick(DialogInterface dialog, int which) {\n//\n// }\n// });\n\n //thiet lap k the huy - co the huy\n dialog.setCancelable(false);\n\n //show dialog\n dialog.show();\n Timer timer = new Timer();\n timer.schedule(new TimerTask() {\n @Override\n public void run() {\n dialog.dismiss();\n }\n }, 20000000);\n }",
"public void onProgressUpdate(int numRouleau,String prochain);",
"@Override\n protected void onProgressUpdate(Integer... values) {\n barratime.setProgress(values[0]);\n }",
"private void progressStuff() {\n cd = new ConnectionDetector(getActivity());\n parser = new JSONParser();\n progress = new ProgressDialog(getActivity());\n progress.setMessage(getResources().getString(R.string.loading));\n progress.setIndeterminate(false);\n progress.setCancelable(true);\n // progress.show();\n }",
"protected void sendProgress() {\n setProgress(getProgress() ^ 1);\n }",
"protected void speedRefresh() {\r\n\t\t\ttStartTime = System.currentTimeMillis();\r\n\t\t\ttDownloaded = 0;\r\n\t\t}",
"@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t Toast.makeText(getBaseContext(),\"Task Completed\",Toast.LENGTH_LONG).show();\n\t progressStatus=0; \n\t myProgress=0;\n\t\t\t\t\t\t\n\t\t\t\t\t}",
"public void slowDownProcess() {\n\n for (int i = 0; i < arrayList.size(); i++) {\n arrayList.get(i).gifImageView.setImageDrawable(null);\n }\n try {\n Thread.sleep(100);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n for (int i = 0; i < arrayList.size(); i++) {\n arrayList.get(i).display();\n }\n }",
"@Override\n\tprotected void onProgressUpdate(Integer... values) {\n\t\tint len = progressBar.getProgress() + values[0];\n\t\tprogressBar.setProgress(len);\n\t\tString str = progressBar.getProgress() * 100 / progressBar.getMax()\n\t\t\t\t+ \"%\";\n\t\ttv.setText(\"下载完成\" + str);\n\t\tsuper.onProgressUpdate(values);\n\t}",
"@Override\n public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {\n final int bpm = progress + 50;\n Log.d(TAG, \"BPM recorded as \" + bpm);\n heartbeat2.setDurationBasedOnBPM(bpm);\n bpmTV.setText(\"BPM: \" + bpm);\n }",
"@Override\n protected void onProgressUpdate(Long... progress)\n {\n\n if (mActivity != null)\n {\n mActivity.onProgressUpdate(progress[0], progress[1]);\n\n //if (wait)\n //{\n // waitFor(mPrefPauseTime);\n // playNextSong();\n //}\n }\n }",
"public int getProgress();",
"@Override\n public void run() {\n if(mProgressBar.getProgress() < maxTime) {\n mProgressBar.incrementProgressBy(1);\n if(mProgressListener != null){\n mProgressListener.progress(mProgressBar.getProgress());\n }\n mHandler.postDelayed(timeCount, 1000);\n }else{\n if(mProgressListener != null){\n mProgressListener.finish();\n }\n mHandler.removeCallbacks(timeCount);\n// Log.i(\"slack\",\"timeCount finish...\");\n }\n\n }",
"@Override\n protected void onProgressUpdate(Integer... params) {\n now_tx.setText(String.valueOf(params)); // 계속 현재 포지션 계속 보여주기. ex) 3/14\n if(params[0] == -1){ // 일시 정지 걸렸을 때,\n // --- show the 'pause' sight --\n// text.setText(\"PAUSED\");\n\n }\n }",
"@Override\n protected void onProgressUpdate(Integer... progress) {\n ProgressBar pbFileIO = (ProgressBar)findViewById(R.id.pbFileIO);\n pbFileIO.setProgress(progress[0]);\n }",
"public void onProgress(int pos);",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n \n setContentView(R.layout.progressbar);\n rectangleProgressBar=(ProgressBar)findViewById(R.id.rectangleprobar);\n CircleProgressBar=(ProgressBar)findViewById(R.id.circleProgressBar);\n mButton=(Button)findViewById(R.id.probutton);\n \n rectangleProgressBar.setIndeterminate(false); \n CircleProgressBar.setIndeterminate(false); \n \n mButton.setOnClickListener(new Button.OnClickListener()\n {\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t rectangleProgressBar.setVisibility(View.VISIBLE); \n\t\t\t\t CircleProgressBar.setVisibility(View.VISIBLE); \n\t \n\t rectangleProgressBar.setMax(100); \n\t rectangleProgressBar.setProgress(0); \n\t CircleProgressBar.setProgress(0); \n\t \n\t //创建一个线程,每秒步长为增加,到100%时停止 \n\t Thread mThread = new Thread(new Runnable() { \n\t \n\t\t\t\t\t\tpublic void run() { \n\t \n\t for(int i=0 ; i < 20; i++){ \n\t try{ \n\t \tcount = (i + 1) * 5 ; \n\t Thread.sleep(1000); \n\t if(i == 19){ \n\t Message msg = new Message(); \n\t msg.what = STOP; \n\t mHandler.sendMessage(msg); \n\t break; \n\t }else{ \n\t Message msg = new Message(); \n\t msg.what = NEXT; \n\t mHandler.sendMessage(msg); \n\t } \n\t }catch (Exception e) { \n\t e.printStackTrace(); \n\t } \n\t } \n\t \n\t } \n\t }); \n\t mThread.start(); \n\t \n\t }});\n \n }",
"@Override\n\t\t\tpublic void onResume() {\n\t\t\t\tsuper.onResume();\n\t\t\t\tisonshow=true;\n\t\t\t\tMythtead mythread=new Mythtead();\n\t\t\t\tmythread.start();\n\t\t\t\t\n\t\t\t\tcircleprogressbar.setProgress(pro);\n\n\t\t\t}",
"@Override\n\tpublic void onProgressUpdate() {\n\n\t}",
"@Override\n public void onProgress(String requestId, long bytes, long totalBytes) {\n Double progress = (double) bytes / totalBytes;\n // post progress to app UI (e.g. progress bar, notification)\n // example code ends here\n mProgressbar.setVisibility(View.VISIBLE);\n if(!networkConnection.isNetworkConnected(getContext())){\n mProgressbar.setVisibility(View.GONE);\n mBtnLayout2A2.setVisibility(View.VISIBLE);\n showMessage(\"Internet Connection Failed\");\n }\n\n }",
"@Override\n public void onProgress(String requestId, long bytes, long totalBytes) {\n Double progress = (double) bytes / totalBytes;\n // post progress to app UI (e.g. progress bar, notification)\n // example code ends here\n mProgressbar.setVisibility(View.VISIBLE);\n if(!networkConnection.isNetworkConnected(getContext())){\n mProgressbar.setVisibility(View.GONE);\n mBtnLayout2A2.setVisibility(View.VISIBLE);\n showMessage(\"Internet Connection Failed\");\n }\n\n }",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\twhile(progressStatus<100)\n\t\t\t\t{\n\t\t\t\t\tprogressStatus=performTask();\n\t\t\t\t\tmyHandler.post(new Runnable()\n\t\t\t\t\t{\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\tprogressBar.setProgress(progressStatus);\n\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tmyHandler.post(new Runnable() {\n\t\t\t\t\t\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t Toast.makeText(getBaseContext(),\"Task Completed\",Toast.LENGTH_LONG).show();\n\t progressStatus=0; \n\t myProgress=0;\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t\n\t\t\t}",
"private void setUpProgressBar() {\n DatabaseHelper database = new DatabaseHelper(this);\n Cursor cursor = database.getAllDataForScavengerHunt();\n\n int totalLocationCount = 0;\n double visitedCount = 0;\n\n while (cursor.moveToNext()) {\n totalLocationCount++;\n int visited = cursor.getInt(cursor.getColumnIndex(database.COL_VISITED));\n if (visited == 1) visitedCount++;\n }\n\n int progress = (int) (visitedCount / totalLocationCount * 100);\n ProgressBar progressBar = findViewById(R.id.progress);\n TextView progressText = findViewById(R.id.progress_text);\n progressBar.setProgress(progress);\n progressText.setText(\" \" + progress + \"%\");\n }",
"@Override\n\t\t\tprotected Integer doInBackground(Integer... params) {\n\t\t\t\t\n\t\t\t\tInteger counter = params[0];\n\t\t\t\tstop = false;\n\t\t\t\twhile(!stop){\n\t\t\t\t\tpublishProgress(counter);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(1000);\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\tcounter ++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn counter;\n\t\t\t}",
"@Override\n\t\tprotected Void doInBackground(Void... arg0) {\n\t\t\tfor (int i = 0; i < 5; i++) {\n\t\t\t\tpublishProgress(i);\n\t\t\t\ttry {\n\t\t\t\t\tThread.sleep(100);\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\treturn null;\n\t\t}",
"@Override\n public long progressInterval() {\n return 500;\n }",
"@Override\n public void onProgressChanged(SeekBar seekBar, int i, boolean b) {\n Device[] devices = App.getInstance().getDevices();\n for (Device device : devices) {\n device.setPwmDuty(seekBar.getProgress());\n }\n }",
"public void progressBarTimer() {\r\n progressBar.setProgress(0);\r\n TimerTask task = new TimerTask() {\r\n @Override\r\n public void run() {\r\n if(!pause) progressBar.incrementProgressBy(1);\r\n\r\n //Game over\r\n if (progressBar.getProgress() >= 100) gameOver();\r\n }\r\n };\r\n\r\n //schedule starts after 0.01 seconds and repeats every second.\r\n timer.schedule(task, 10, 1000);\r\n }",
"@Override\n protected void onPreExecute() {\n super.onPreExecute();\n\n /*mProgress.setMessage(\"Receiving.....\");\n mProgress.show();\n mProgress.setCancelable(false);*/\n }",
"@Override\n public void run() {\n try {\n Thread.sleep(25000);\n dialog.cancel();\n Intent intent=new Intent(ProgressActivity.this,SudokuActivity.class);\n startActivity(intent);\n } catch (InterruptedException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }",
"@Override\n public void onProgress(long downloaded,\n long total) {\n int progress = (int) (downloaded / total * 100);\n bar.setProgress(progress);\n }",
"@Override\n protected String[] doInBackground(Void... params) {\n try {\n Thread.sleep(2000);\n } catch (InterruptedException e) {\n }\n return null;\n }",
"private void getQuota() {\n getProgressDialog().show();\n new Handler().postDelayed(this::onQuotaDownloadComplete, 2000);\n }",
"@Override\r\n public void onPause() {\r\n \tsuper.onPause();\r\n \tif (download!=null && download.isUsed()) {\r\n \t\tdownload.setNotUsed();\r\n \t\tsetProgressBarIndeterminateVisibility(false);\r\n \t}\r\n \tif (downloadComments!=null && downloadComments.isUsed()) {\r\n \t\tdownloadComments.setNotUsed();\r\n \t\tsetProgressBarIndeterminateVisibility(false);\r\n \t}\r\n \tif (downloadUserImage!=null && downloadUserImage.isUsed()) {\r\n \t\tdownloadUserImage.setNotUsed();\r\n \t\tsetProgressBarIndeterminateVisibility(false);\r\n \t}\r\n }",
"@Override\n\t\tpublic void onShutter() {\n\t\t\tmProgressContainer.setVisibility(View.VISIBLE);\n\t\t}",
"public int getProgress() {\n long d = executable.getParent().getEstimatedDuration();\n if(d<0) return -1;\n \n int num = (int)((System.currentTimeMillis()-startTime)*100/d);\n if(num>=100) num=99;\n return num;\n }",
"void hideProgress();",
"@Override\n protected void onPreExecute() {\n mProgressBar.setVisibility(View.VISIBLE);\n }",
"@Override\n public void onProgressChanged(SeekBar seekBar, int progress,\n boolean fromUser) {\n seek_bar3.setMax(10);\n txt3.setText(String.valueOf(progress));\n salataAdet = progress;\n \n \n }",
"@Override\n protected void onProgressUpdate(Integer... values) {\n progress.setVisibility(View.VISIBLE);\n progress.setProgress(values[0]);\n super.onProgressUpdate(values);\n }",
"@Override\n public void onProgressChanged(SeekBar seekBar, int progress,\n boolean fromUser) {\n seek_bar1.setMax(10);\n txt1.setText(String.valueOf(progress));\n yemekAdet = progress; \n \n }",
"@Override\n void slowDown() {\n if (this.speed>0){\n this.speed=this.speed-1;\n }\n }",
"@Override\n public void onProgress(long bytesWritten, long totalSize) {\n super.onProgress(bytesWritten, totalSize);\n int count = (int) ((bytesWritten * 1.0 / totalSize) * 100);\n // 下载进度显示\n// progress.setProgress(count);\n Log.e(\"下载 Progress>>>>>\", bytesWritten + \" / \" + totalSize);\n\n }",
"public void infoProgressOff (){\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n if (tabTourInfoBinding.tourInfoProgress.getVisibility() != View.GONE) {\n tabTourInfoBinding.tourInfoProgress.setVisibility(View.GONE);\n }\n if (tabTourInfoBinding.tourInfoLayout.getVisibility() != View.VISIBLE) {\n tabTourInfoBinding.tourInfoLayout.setVisibility(View.VISIBLE);\n }\n }\n });\n }",
"@Override\n public void onProgress(String requestId, long bytes, long totalBytes) {\n Double progress = (double) bytes / totalBytes;\n // post progress to app UI (e.g. progress bar, notification)\n // example code ends here\n mProgressbar.setVisibility(View.VISIBLE);\n if (!networkConnection.isNetworkConnected(getContext())) {\n mBtnLayout2A2.setVisibility(View.GONE);\n mProgressbar.setVisibility(View.VISIBLE);\n showMessage(\"Internet Connection Failed\");\n }\n\n }",
"@Override\n protected String doInBackground(Integer... integers) {\n int iVeces = integers[0];\n int iDemora = integers[1];\n for (int i = 0; i < iVeces; i++) {\n try {\n Thread.sleep(iDemora);\n publishProgress(i + \" - \");\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n return \"AsyncTask End\";\n }",
"public void run() {\r\n ouputProgressModel.setPogressStarted(true);\r\n try {\r\n for (int i = 0; i <= 100; i += 10) {\r\n // pause the thread\r\n Thread.sleep(PROCCESS_SLEEP_LENGTH);\r\n // update the percent value\r\n ouputProgressModel.setPercentComplete(i);\r\n SessionRenderer.render(\"progressExample\");\r\n }\r\n }\r\n catch (InterruptedException e) { }\r\n ouputProgressModel.setPogressStarted(false);\r\n }",
"public void onShutter()\n {\n mProgressContainer.setVisibility(View.VISIBLE);\n }",
"@Override\n public void onProgress(String requestId, long bytes, long totalBytes) {\n Double progress = (double) bytes / totalBytes;\n // post progress to app UI (e.g. progress bar, notification)\n // example code ends here\n mProgressbar.setVisibility(View.VISIBLE);\n if (!networkConnection.isNetworkConnected(getContext())) {\n mBtnLayout2A2.setVisibility(View.VISIBLE);\n mProgressbar.setVisibility(View.GONE);\n showMessage(\"Internet Connection Failed\");\n }\n\n }"
]
| [
"0.65812266",
"0.6467429",
"0.62313366",
"0.6173557",
"0.60954696",
"0.6054263",
"0.6042177",
"0.60170984",
"0.59882224",
"0.5987106",
"0.5955058",
"0.5934405",
"0.59334254",
"0.59230995",
"0.58941996",
"0.58852893",
"0.58830845",
"0.58691937",
"0.58580023",
"0.58333373",
"0.58331627",
"0.58293647",
"0.5829056",
"0.5752029",
"0.57367885",
"0.5729509",
"0.5727806",
"0.57271576",
"0.57271576",
"0.5720812",
"0.57161736",
"0.5701707",
"0.56894237",
"0.5673846",
"0.5673668",
"0.56718314",
"0.56711495",
"0.56555814",
"0.56550163",
"0.5654179",
"0.5648344",
"0.5638751",
"0.56307274",
"0.5628638",
"0.56282234",
"0.56180114",
"0.5607172",
"0.55997646",
"0.55997646",
"0.55953455",
"0.55899113",
"0.5584449",
"0.558401",
"0.55785346",
"0.55755436",
"0.55695087",
"0.5561899",
"0.5561137",
"0.5559863",
"0.55582416",
"0.55571675",
"0.55545455",
"0.55471814",
"0.55423385",
"0.5541068",
"0.5536583",
"0.5533559",
"0.5532196",
"0.5523963",
"0.5519721",
"0.5515348",
"0.5515348",
"0.5513051",
"0.55110794",
"0.5510894",
"0.5509672",
"0.55061805",
"0.5493312",
"0.5486427",
"0.5478679",
"0.5477726",
"0.54763544",
"0.54745257",
"0.5458278",
"0.54548454",
"0.5451586",
"0.54457295",
"0.5435192",
"0.54316854",
"0.54288363",
"0.54258645",
"0.5419854",
"0.5419187",
"0.5418942",
"0.5418652",
"0.5412636",
"0.54115945",
"0.54102445",
"0.5408516",
"0.54035187"
]
| 0.625883 | 2 |
TODO Autogenerated method stub | @Override
protected void onProgressUpdate(Integer... values) {
progressBar.setProgress(values[0]);
} | {
"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 |
constraint definition, spec section 3.6.6 | public interface Constraint extends TOSCAObject<Constraint> {
public String name();
public default Constraint.Type type() {
return Type.valueOf(Type.class, name());
}
/* this is a one entry map so here we pick the single
*/
public default Object expression() {
return info().values().iterator().next();
}
public enum Type {
equal,
greater_than,
greater_or_equal,
less_than,
less_or_equal,
in_range,
valid_values,
length,
min_length,
max_length,
pattern
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Constraint createConstraint();",
"Constraint createConstraint();",
"protected abstract void defineConstraints();",
"@DISPID(1610940427) //= 0x6005000b. The runtime will prefer the VTID if present\n @VTID(33)\n Constraints constraints();",
"public interface IHardConstraint {\n\t\n\tpublic boolean isConstraintViolated(List<Job> jobs, List<Resource> resources, Plan plan);\n\t\t\n}",
"public LinearConstraint() {\n\n }",
"@Override\n\tpublic void addConstraint(String constraint) {\n\n\t}",
"public Constraint addConstraint() {\n\t\tConstraint newType = new Constraint();\n\t\tgetConstraint().add(newType);\n\t\treturn newType; \n\t}",
"@objid (\"db7f3c97-1871-4855-958d-3659b2211f8a\")\n protected Object getConstraint() {\n return this.constraint;\n }",
"public interface MoppetConstraint<EventType> {\n\n /**\n * checks if the requirements to validate this constraint are satisfied which means e.g. the event happened on a certain component and the system is in a certainstate\n *\n * @return true if valdiation can occur\n */\n public boolean check(EventType event);\n\n /**\n * validate this constraint. which means that code is executed that checks a constraint and corrects it if possible\n *\n * @param event\n */\n public void repair(EventType event);\n}",
"public interface LookupConstraint {\n}",
"protected abstract Object validateParameter(Object constraintParameter);",
"LengthConstraint createLengthConstraint();",
"public ConstraintVertex(Coordinate p) {\n super(p);\n }",
"public int constraintType()\n\t{\n\t\treturn _constraintType;\n\t}",
"public PrimitiveConstraint getConstraint() {\r\n return new XlteqC(var, value);\r\n }",
"@Override\n\tprotected void getConstraintFromNetlistConstraintFile() {\n\n\t}",
"public Constraint(String cnline)\n {\n// PrintStream stdout = System.out;\n// stdout.printf(\"Constraint: line: %s\\n\", cnline);\n\tString[] cnArray = cnline.split(\" \");\n\tif (cnArray.length != 2) {\n\t debug.error(\"Invalid constraint: '%s'\", cnline);\n\t}\n\n\tthis.name = cnArray[0].toLowerCase();;\n\tthis.mf = Scoring.mf2int(cnArray[1].charAt(0));\n }",
"@DISPID(1611006036) //= 0x60060054. The runtime will prefer the VTID if present\n @VTID(111)\n boolean constraintsInGeometry();",
"protected Constraint add(Constraint c) throws IllegalArgumentException {\r\n\t\tif (!constraints.contains(c)) {\r\n\t\t\tif (c.getIndex() >= 0) {\r\n\t\t\t\tthrow new IllegalArgumentException();\r\n\t\t\t}\r\n\t\t\tc.setIndex(constraints.size());\r\n\t\t\tconstraints.add(c);\r\n\t\t}\r\n\t\treturn c;\r\n\t}",
"public FormalGenConstraint getConstraint() {\n return constraint;\n }",
"public ConstraintDefinition() {\n\t\tthis(\"\");\n\t}",
"ValueRangeConstraint createValueRangeConstraint();",
"public ConstraintExt(ArrayList<String> var) {\n\t\tsuper(var);\n\t\tvalTuples = new HashSet<ArrayList<Object>>();\n\t}",
"@Test(timeout = 4000)\n public void test101() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n String[] stringArray0 = new String[3];\n DBUniqueConstraint dBUniqueConstraint0 = new DBUniqueConstraint(defaultDBTable0, (String) null, false, stringArray0);\n NameSpec nameSpec0 = NameSpec.NEVER;\n StringBuilder stringBuilder0 = SQLUtil.createConstraintSpecBuilder(dBUniqueConstraint0, nameSpec0);\n StringBuilder stringBuilder1 = stringBuilder0.append('8');\n SQLUtil.addRequiredCondition(\"Unknown constraint type: \", stringBuilder1);\n assertEquals(\"8 and Unknown constraint type: \", stringBuilder1.toString());\n assertEquals(\"8 and Unknown constraint type: \", stringBuilder0.toString());\n }",
"@Generated\n @Selector(\"isConstrained\")\n public native boolean isConstrained();",
"public List<Constraint> getConstraints();",
"@Override\n\tpublic Clause getConstraints() {\n\t\treturn null;\n\t}",
"public abstract void printConstraint();",
"public InstConstraintVisitor(){}",
"public interface ConstraintContext {\n Optional<TraversalConstraint> getConstraint();\n}",
"public CheckConstraints() {\n this(DSL.name(\"CHECK_CONSTRAINTS\"), null);\n }",
"com.microsoft.schemas.crm._2011.contracts.ArrayOfConstraintRelation addNewConstraints();",
"public abstract\n ImmutableUniqueMemberConstraint getUniqueMemberConstraint();",
"protected void addConstraints() throws IloException {\n// Constrain (2)\n for (int i = 0; i < m; i++) {\n IloLinearNumExpr expr_2 = model.linearNumExpr();\n for (int j = 0; j < n; j++) {\n expr_2.addTerm(x[i][j], 1);\n }\n model.addLe(expr_2, supply[i]);\n }\n\n // Constrain (3)\n for (int j = 0; j < n; j++) {\n IloLinearNumExpr expr_3 = model.linearNumExpr();\n for (int i = 0; i < m; i++) {\n expr_3.addTerm(x[i][j], 1);\n }\n model.addEq(expr_3, demands[j]);\n }\n }",
"void visitConstraintValue(ConstraintValue value);",
"public void createConstraint(ConstraintConfig constraintConfig) throws ConfigurationException;",
"public interface Constraint<ANNOTATION extends Annotation, TYPE> extends Serializable\n{\n /**\n * For each value or parameter which should be checked this method will be invoked.\n * If the method returns true the value is valid. If it returns false the value\n * is considered invalid. When all constraints have been checked a ConstraintViolationException\n * will be thrown with all the constraint violations that were found.\n *\n * @param annotation the annotation to match\n * @param value the value to be checked\n * @return true if valid, false if invalid\n */\n boolean isValid( ANNOTATION annotation, TYPE value );\n}",
"public java.util.List<Constraint> getConstraint() { \n\t\tif (myConstraint == null) {\n\t\t\tmyConstraint = new java.util.ArrayList<Constraint>();\n\t\t}\n\t\treturn myConstraint;\n\t}",
"public G20ConstraintFunction_h8() {\n }",
"public Constraint(Vec2 incident, Vec2 referencePointA, Vec2 referencePointB) {\r\n\t\tinc = incident;\r\n\t\trefA = referencePointA;\r\n\t\trefB = referencePointB;\r\n\t\t//Assumed reference has infinite mass\r\n\t\tincMass = 1.0;\r\n\t\trefMass = 0.0;\r\n\t}",
"public abstract double getConstraintFitness();",
"public final void constraint() throws RecognitionException {\n CommonTree IDENTIFIER7 = null;\n Expression e = null;\n\n List<EAnnotation> anns = null;\n\n\n try {\n // parser/flatzinc/FlatzincFullExtWalker.g:722:2: ( ^( CONSTRAINT IDENTIFIER (e= expr )+ anns= annotations ) )\n // parser/flatzinc/FlatzincFullExtWalker.g:723:2: ^( CONSTRAINT IDENTIFIER (e= expr )+ anns= annotations )\n {\n\n // Solver aSolver, String id, List<Expression> exps, List<EAnnotation> annotations\n ArrayList<Expression> exps = new ArrayList();\n\n\n match(input, CONSTRAINT, FOLLOW_CONSTRAINT_in_constraint2144);\n\n match(input, Token.DOWN, null);\n IDENTIFIER7 = (CommonTree) match(input, IDENTIFIER, FOLLOW_IDENTIFIER_in_constraint2146);\n\n // parser/flatzinc/FlatzincFullExtWalker.g:727:30: (e= expr )+\n int cnt48 = 0;\n loop48:\n do {\n int alt48 = 2;\n switch (input.LA(1)) {\n case EXPR:\n case FALSE:\n case IDENTIFIER:\n case INT_CONST:\n case LB:\n case STRING:\n case TRUE: {\n alt48 = 1;\n }\n break;\n\n }\n\n switch (alt48) {\n case 1:\n // parser/flatzinc/FlatzincFullExtWalker.g:727:31: e= expr\n {\n pushFollow(FOLLOW_expr_in_constraint2151);\n e = expr();\n\n state._fsp--;\n\n\n exps.add(e);\n\n }\n break;\n\n default:\n if (cnt48 >= 1) break loop48;\n EarlyExitException eee =\n new EarlyExitException(48, input);\n throw eee;\n }\n cnt48++;\n } while (true);\n\n\n pushFollow(FOLLOW_annotations_in_constraint2158);\n anns = annotations();\n\n state._fsp--;\n\n\n match(input, Token.UP, null);\n\n\n String id = (IDENTIFIER7 != null ? IDENTIFIER7.getText() : null);\n FConstraint.make_constraint(mSolver, map, id, exps, anns);\n\n\n }\n\n } catch (RecognitionException re) {\n reportError(re);\n recover(input, re);\n } finally {\n // do for sure before leaving\n }\n return;\n }",
"@Override\r\n\tpublic void satisfy() {\n\t\t\r\n\t}",
"public interface ParameterConstraint\n{\n /**\n * Gets the unique name of the constraint\n * \n * @return String constraint name\n */\n String getName();\n \n /**\n * Indicates whether the provided value satisfies the constraint. True if it does, false otherwise.\n * \n * @return boolean true if valid, false otherwise\n */\n boolean isValidValue(String value);\n \n /**\n * \n * @param value\n * @return\n */\n String getValueDisplayLabel(String value);\n \n /**\n * \n */\n Map<String, String> getAllowableValues();\n}",
"private void createConstraintsForSingleton() {\n \t\tSet s = slice.entrySet();\n \t\tfor (Iterator iterator = s.iterator(); iterator.hasNext();) {\n \t\t\tMap.Entry entry = (Map.Entry) iterator.next();\n \t\t\tHashMap conflictingEntries = (HashMap) entry.getValue();\n \t\t\tif (conflictingEntries.size() < 2)\n \t\t\t\tcontinue;\n \n \t\t\tCollection conflictingVersions = conflictingEntries.values();\n \t\t\tString singletonRule = \"\"; //$NON-NLS-1$\n \t\t\tArrayList nonSingleton = new ArrayList();\n \t\t\tint countSingleton = 0;\n \t\t\tfor (Iterator conflictIterator = conflictingVersions.iterator(); conflictIterator.hasNext();) {\n \t\t\t\tIInstallableUnit conflictElt = (IInstallableUnit) conflictIterator.next();\n \t\t\t\tif (conflictElt.isSingleton()) {\n \t\t\t\t\tsingletonRule += \" -1 \" + getVariable(conflictElt); //$NON-NLS-1$\n \t\t\t\t\tcountSingleton++;\n \t\t\t\t} else {\n \t\t\t\t\tnonSingleton.add(conflictElt);\n \t\t\t\t}\n \t\t\t}\n \t\t\tif (countSingleton == 0)\n \t\t\t\tcontinue;\n \n \t\t\tfor (Iterator iterator2 = nonSingleton.iterator(); iterator2.hasNext();) {\n \t\t\t\tconstraints.add(singletonRule + \" -1 \" + getVariable((IInstallableUnit) iterator2.next()) + \" >= -1;\"); //$NON-NLS-1$ //$NON-NLS-2$\n \t\t\t}\n \t\t\tsingletonRule += \" >= -1;\"; //$NON-NLS-1$\n \t\t\tconstraints.add(singletonRule);\n \t\t}\n \t}",
"public Constraint(Vec2 incident, Vec2 reference) {\r\n\t\tinc = incident;\r\n\t\trefA = reference;\r\n\t\trefB = null;//Ensure this is null for the solve method\r\n\t\t//Assumed reference has infinite mass\r\n\t\tincMass = 1.0;\r\n\t\trefMass = 0.0;\r\n\t}",
"private void addConstraint(String tok) throws SyntaxError {\n assert(tok.startsWith(PREFIX_OP_STR));\n \n if (!tok.endsWith(\")\")) {\n throw new SyntaxError(String.format(\"Wrong format for the constraint '%s', expected format: %s\",\n tok, CONSTR_FMT));\n }\n int pos = tok.indexOf('(');\n if (pos == -1) {\n throw new SyntaxError(String.format(\"Missing '(' in the constraint '%s', expected format: %s\",\n tok, CONSTR_FMT)); \n }\n String op = tok.substring(1, pos);\n ConstraintType type = ConstraintType.CONSTRAINT_PARENT;\n if (op.equalsIgnoreCase(CONSTR_CONTAINS)) {\n type = ConstraintType.CONSTRAINT_CONTAINS;\n } else if (!op.equalsIgnoreCase(CONSTR_PARENT)) {\n throw new SyntaxError(String.format(\"Wrong constraint name '%s' in the element '%s'\", op, tok));\n }\n // Labels cannot contain commas\n String parts[] = tok.substring(pos + 1, tok.length() - 1).split(\",\");\n if (parts.length < 2) {\n throw new SyntaxError(String.format(\n \"There should be at least 2 elements between '(' and ')'\" + \n \" in the constraint '%s', expected format %s\",\n tok, CONSTR_FMT));\n }\n String headLabel = parts[0].trim();\n Integer headId = mLabel2Id.get(headLabel);\n if (null == headId) {\n throw new SyntaxError(String.format(\"Cannot find a lexical entry \" +\n \" for the label '%s', constraint '%s'\", headLabel, tok)); \n }\n\n ArrayList<ConstraintType> constr = mConstrType.get(headId);\n ArrayList<Integer> dependIds = mDependId.get(headId);\n \n if (ConstraintType.CONSTRAINT_PARENT == type) {\n if (mTypes.get(headId) != FieldType.FIELD_ANNOTATION) {\n throw new SyntaxError(String.format(\n \"The parent in the constraint '%s' should be an annotation\", tok));\n }\n }\n \n for (int i = 1; i < parts.length; ++i) {\n String depLabel = parts[i].trim();\n Integer depId = mLabel2Id.get(depLabel);\n if (null == depId) {\n throw new SyntaxError(String.format(\"Cannot find a lexical entry \" +\n \" for the label '%s', constraint '%s'\", depLabel, tok)); \n }\n \n if (ConstraintType.CONSTRAINT_PARENT == type) {\n if (mTypes.get(depId) != FieldType.FIELD_ANNOTATION) {\n throw new SyntaxError(String.format(\n \"A child (label '%s') in the constraint '%s' should be an annotation\", \n depLabel, tok));\n }\n } \n \n constr.add(type);\n dependIds.add(depId);\n\n /*\n * This is a potentially horrible linear-time complexity search\n * in an array. However, for a reasonable-size user query \n * these arrays are going to be tiny and, in practice, \n * such a linear search be as fast as or likely even faster than \n * a hash/tree map lookup.\n */\n if (!mEdges.get(depId).contains(headId))\n mEdges.get(depId).add(headId);\n if (!mEdges.get(headId).contains(depId))\n mEdges.get(headId).add(depId);\n\n }\n }",
"public interface GridConstraint {\n\n\t/**\n\t * Length of the grid.\n\t */\n\tpublic static final int GRID_X_SIZE = 5;\n\n\t/**\n\t * Width of the grid.\n\t */\n\tpublic static final int GRID_Y_SIZE = 5;\n\n\t/**\n\t * Checks whether the given x and y values are on the grid and not off the grid.\n\t * \n\t * @param xValue\n\t * x coordinate\n\t * @param yValue\n\t * y coordinate\n\t * @return true if on the grid and false if off the grid\n\t */\n\tpublic boolean onGrid(int xValue, int yValue);\n}",
"private void addVertexVisitConstraint(){\n\n for (int vertex=0; vertex < vertexCount; vertex++){\n Integer[] pos = new Integer[variables.length];\n for (int position =0; position < positionCount; position++){\n pos[position] = variables[position][vertex];\n }\n addExactlyOne(pos);\n }\n }",
"public Interval getConstraint (int subcl) {\n return this.constraints[subcl-1];\n }",
"RegExConstraint createRegExConstraint();",
"public interface PFNsAreDifferent extends PFNConstraint\r\n{\r\n\tSet<String> getPfns();\r\n}",
"public interface FrequencyConstraintShapeType extends ExternalConstraintShapeType {\n}",
"public interface UserDefinedConstraints extends EObject {\n\t/**\n\t * <!-- begin-user-doc --> <!-- end-user-doc -->\n\t * \n\t * @model\n\t * @generated\n\t */\n\tvoid _NC_SingeltonSystem(SystemTimer system1, SystemTimer system2);\n\n\t/**\n\t * <!-- begin-user-doc --> <!-- end-user-doc -->\n\t * \n\t * @model\n\t * @generated\n\t */\n\tvoid _NC_SingeltonCurrentSem(Semester sem2, Semester sem1);\n\n\t/**\n\t * <!-- begin-user-doc --> <!-- end-user-doc -->\n\t * \n\t * @model\n\t * @generated\n\t */\n\tvoid _NC_NoTwoEnrollmentsWithSameID(Enrollment en1, Enrollment en2);\n\n\t/**\n\t * <!-- begin-user-doc --> <!-- end-user-doc -->\n\t * \n\t * @model\n\t * @generated\n\t */\n\tvoid _NC_NoTwoEntriesWithSameID(GradeFormular gf);\n\n\t/**\n\t * <!-- begin-user-doc --> <!-- end-user-doc -->\n\t * \n\t * @model\n\t * @generated\n\t */\n\tvoid _NC_onlyOneRecordForModuleOfferAndExam(Enrollment en);\n\n\t/**\n\t * <!-- begin-user-doc --> <!-- end-user-doc -->\n\t * \n\t * @model\n\t * @generated\n\t */\n\tvoid _XNC_onlyOneCMOPerExam(Enrollment en);\n\n\t/**\n\t * <!-- begin-user-doc --> <!-- end-user-doc -->\n\t * \n\t * @model\n\t * @generated\n\t */\n\tvoid _NC_OnlyOneRegPerEnrollment(Record rec2, Record rec1);\n\n\t/**\n\t * <!-- begin-user-doc --> <!-- end-user-doc -->\n\t * \n\t * @model\n\t * @generated\n\t */\n\tvoid _NC_NoCompetingBookings(Room room);\n\t// <-- [user code injected with eMoflon]\n\n\t// [user code injected with eMoflon] -->\n}",
"public void setConstraint(int constraint) {\n mConstraint = constraint;\n }",
"ConstraintModelFactory getConstraintModelFactory();",
"A adapt(C constraint);",
"com.microsoft.schemas.crm._2011.contracts.ArrayOfConstraintRelation getConstraints();",
"@Test(timeout = 4000)\n public void test093() throws Throwable {\n DBSchema dBSchema0 = new DBSchema((String) null);\n DefaultDBTable defaultDBTable0 = new DefaultDBTable((String) null, dBSchema0);\n DBForeignKeyConstraint dBForeignKeyConstraint0 = new DBForeignKeyConstraint(\" start/stop selectivity is : \", false, defaultDBTable0, (String[]) null, defaultDBTable0, (String[]) null);\n StringBuilder stringBuilder0 = new StringBuilder();\n NameSpec nameSpec0 = NameSpec.ALWAYS;\n StringBuilder stringBuilder1 = SQLUtil.appendConstraintName((DBConstraint) dBForeignKeyConstraint0, stringBuilder0, nameSpec0);\n SQLUtil.addOptionalCondition((String) null, stringBuilder1);\n assertEquals(\"CONSTRAINT \\\" start/stop selectivity is : \\\" or null\", stringBuilder1.toString());\n assertEquals(\"CONSTRAINT \\\" start/stop selectivity is : \\\" or null\", stringBuilder0.toString());\n }",
"Constraint getBodyCondition();",
"public interface LookupConstraint {\n\n /**\n * @param lookedUpNodes A set of unique string representations of the nodes discovered\n * @return True if after the recent node discovery, the lookup should be ended.\n */\n boolean isLookupEnded(final Set<String> lookedUpNodes);\n\n}",
"public static void validateInitialConstraints(Constraints constraints) \n throws InvalidInputDataException, ArrayIndexOutOfBoundsException { \n \t\n \tint[][] constraintsArray = Utilities.convertSolutionToArray(constraints);\n \t//check that no non-zero number appears twice in a row\n \tfor (int x=0; x<constraints.getDimSq(); x++) {\n \t\tList<Integer> cellList = new ArrayList<Integer>();\n \t\tfor(int y=0; y<constraints.getDimSq(); y++) {\n \tif (constraintsArray[x][y] != 0){\n \t\tif ((constraintsArray[x][y] < 0) || (constraintsArray[x][y] > constraints.getDimSq())) {\n \t\t\tthrow new InvalidInputDataException(\"Out-of-range value \" + constraintsArray[x][y] + \" found at cell x = \" + x + \" y = \" + y);\n \t\t}\n \t\tInteger currentValue = new Integer(constraintsArray[x][y]);\n \t\tif (cellList.contains(currentValue)){\n \t\t\tthrow new InvalidInputDataException(\"Value \" + currentValue.intValue() + \" found twice in row \" + x);\n \t\t}\n \t\tcellList.add(currentValue);\n \t}\n }\n }\n //check that non-zero number appears twice in a column\n for (int y=0; y<constraints.getDimSq(); y++) {\n List<Integer> cellList = new ArrayList<Integer>();\n for(int x=0; x<constraints.getDimSq(); x++) {\n \tif (constraintsArray[x][y] != 0){\n \t\tInteger currentValue = new Integer(constraintsArray[x][y]);\n \t\tif (cellList.contains(currentValue)) {\n \t\t\tthrow new InvalidInputDataException(\"Value \" + currentValue.intValue() + \" found twice in column \" + y);\n \t\t}\n \t\tcellList.add(currentValue);\n \t}\n }\n }\n //check that no non-zero number appears twice in the same box\n for (int bx=0;bx<constraints.getDim();bx++){\n for (int by=0;by<constraints.getDim();by++) {\n \tList<Integer> cellList = new ArrayList<Integer>();\n \tfor (int x=0; x<constraints.getDimSq(); x++) {\n \t for(int y=0; y<constraints.getDimSq(); y++) {\n \t \tif ((x / constraints.getDim() == bx) && (y / constraints.getDim() == by)){\n \t \tif (constraintsArray[x][y] != 0){\n \t \t\tInteger currentValue = new Integer(constraintsArray[x][y]);\n \t \t\tif (cellList.contains(currentValue)) {\n \t \t\t\tthrow new InvalidInputDataException(\"Value \" + currentValue.intValue() + \" found twice in box \" + bx + \" \" + by);\n \t \t\t}\n \t \t\tcellList.add(currentValue);\n \t \t}\n \t \t}\n \t }\n \t}\n }\n }\n }",
"@Override\n\tConstraintFinder findConstraints();",
"public static void buildConstraints(SOS2Primitive constraint,Matrix matrix){\n\t\tint row=matrix.numRows();\n\t\t// First the reference row \t\t\n\t\tMatrixRow rowpointer =new MatrixRow(0,0,LPX.LPX_FX,\n\t\t\t\trow,constraint.label,\"ReferenceRow\");\n\t\tmatrix.addRow(rowpointer);\t\t\n\t\trow++;\n\t\trowpointer.addElement(new MatrixElement(constraint.getDependentColumn(0),-1));\n\t\tfor(int i=0;i<constraint.xVals.length;i++){\n\t\t\trowpointer.addElement(new MatrixElement(constraint.getDependentColumn(i+1),constraint.xVals[i]));\n\t\t}\n\t\t\n\t\t// Now the convexity row\n\t\trowpointer =new MatrixRow(1,1,LPX.LPX_FX,\n\t\t\t\trow,constraint.label,\"ConvexityRow\");\n\t\tmatrix.addRow(rowpointer);\t\t\n\t\trow++;\n\t\tfor(int i=0;i<constraint.xVals.length;i++){\n\t\t\trowpointer.addElement(new MatrixElement(constraint.getDependentColumn(i+1),1));\n\t\t}\n\t\t\n\t\tint firstBinVarColumn=constraint.xVals.length+1;\n\t\t// Constraint to ensure one and only one non-zero binary variable\n\t\trowpointer =new MatrixRow(1,1,LPX.LPX_FX,\n\t\t\t\trow,constraint.label,\"BinaryNZRow\");\n\t\tmatrix.addRow(rowpointer);\t\t\n\t\trow++;\n\t\tfor(int i=0;i<(constraint.xVals.length-1);i++){\n\t\t\trowpointer.addElement(new MatrixElement(constraint.getDependentColumn(i+firstBinVarColumn),1));\n\t\t}\n\t\t\n\t\t// Now we need several rows to ensure the SOS2 property\n\t\tfor( int i=0;i<constraint.xVals.length;i++){\n\t\t\trowpointer =new MatrixRow(0,0,LPX.LPX_LO,\n\t\t\t\t\trow,constraint.label,\"SOS2Row\"+i);\n\t\t\tmatrix.addRow(rowpointer);\t\t\n\t\t\trow++;\n\t\t\trowpointer.addElement(new MatrixElement(constraint.getDependentColumn(i+1),-1));\n\t\t\tfor( int b=0;b<2;b++){\n\t\t\t\tint bc=i-b+firstBinVarColumn; // Column index for associated binary variable\n\t\t\t\tif ( bc >=firstBinVarColumn && bc < (firstBinVarColumn+constraint.xVals.length-1)){\n\t\t\t\t\trowpointer.addElement(new MatrixElement(constraint.getDependentColumn(bc),1));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\n\t}",
"public interface SlotConstraint {\n /**\n * Check the entry\n */\n public void check(Item item, int quantity) throws InventoryException;\n}",
"private void addVertexPositionConstraint(){\n for (int vertex=0; vertex < vertexCount; vertex++){\n addExactlyOne(variables[vertex]);\n }\n }",
"protected void addConstraint(RecognizerConstraint c) {\n constraints.put(c.getName(), c);\n\n // 2. Retain a list of all the slots used in this constraint, so we can\n // easily get the related constraints to each slot.\n for (String slotName : c.getSlotNames()) {\n String primary = RecognizerConstraint.primary(slotName);\n // ensure there's a place to record the pairing\n if (!slotsToConstraints.containsKey(primary)) {\n slotsToConstraints.put(primary, new HashSet<String>());\n }\n slotsToConstraints.get(primary).add(c.getName());\n }\n }",
"@Test(timeout = 4000)\n public void test086() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n String[] stringArray0 = new String[0];\n DBPrimaryKeyConstraint dBPrimaryKeyConstraint0 = new DBPrimaryKeyConstraint(defaultDBTable0, \"*F(PV|\", true, stringArray0);\n String string0 = SQLUtil.constraintName(dBPrimaryKeyConstraint0);\n assertEquals(\"CONSTRAINT *F(PV| \", string0);\n }",
"IRequirement or(IRequirement constraint);",
"@Test(timeout = 4000)\n public void test105() throws Throwable {\n String[] stringArray0 = new String[18];\n DBSchema dBSchema0 = new DBSchema(\"/@N&XY<1%CW~y`m*=TA\");\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"@A[%Yy\", dBSchema0);\n DBForeignKeyConstraint dBForeignKeyConstraint0 = new DBForeignKeyConstraint(\"null = null AND null = null AND null = null AND null = null AND null = null AND null = null AND null = null AND null = null AND null = null AND null = null AND null = null AND null = null AND null = null AND null = null AND null = null AND null = null AND null = null AND null = null\", true, defaultDBTable0, stringArray0, defaultDBTable0, stringArray0);\n NameSpec nameSpec0 = NameSpec.ALWAYS;\n String string0 = SQLUtil.constraintSpec(dBForeignKeyConstraint0, nameSpec0);\n assertEquals(\"CONSTRAINT \\\"null = null AND null = null AND null = null AND null = null AND null = null AND null = null AND null = null AND null = null AND null = null AND null = null AND null = null AND null = null AND null = null AND null = null AND null = null AND null = null AND null = null AND null = null\\\" FOREIGN KEY (, , , , , , , , , , , , , , , , , ) REFERENCES @A[%Yy(, , , , , , , , , , , , , , , , , )\", string0);\n }",
"void addConstraintRelation(IViewRelation relation);",
"public ConstraintDefinition(String name) {\n\t\tm_parameters = new ArrayList<ConstraintParameter>();\n\t\tm_parameterString = \"\";\n\t\tsetName(name);\n\t\tsetThresholdMultiplier(1.0);\n\t}",
"@Test(timeout = 4000)\n public void test095() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n String[] stringArray0 = new String[3];\n DBUniqueConstraint dBUniqueConstraint0 = new DBUniqueConstraint(defaultDBTable0, (String) null, false, stringArray0);\n NameSpec nameSpec0 = NameSpec.NEVER;\n StringBuilder stringBuilder0 = SQLUtil.createConstraintSpecBuilder(dBUniqueConstraint0, nameSpec0);\n SQLUtil.appendConstraintName((DBConstraint) dBUniqueConstraint0, stringBuilder0);\n assertEquals(\"\", stringBuilder0.toString());\n }",
"@Test(timeout = 4000)\n public void test088() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n String[] stringArray0 = new String[7];\n DBForeignKeyConstraint dBForeignKeyConstraint0 = new DBForeignKeyConstraint(\"p2Gs!^@lUVq$\", true, defaultDBTable0, stringArray0, defaultDBTable0, stringArray0);\n StringBuilder stringBuilder0 = new StringBuilder();\n SQLUtil.appendConstraintName((DBConstraint) dBForeignKeyConstraint0, stringBuilder0);\n assertEquals(\"CONSTRAINT p2Gs!^@lUVq$ \", stringBuilder0.toString());\n }",
"public void addConstraint(ContextConstraint node) {\n List<ContextConstraint> list = getConstraintList();\n list.addChild(node);\n }",
"@Test(timeout = 4000)\n public void test012() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"\");\n String[] stringArray0 = new String[6];\n DBForeignKeyConstraint dBForeignKeyConstraint0 = new DBForeignKeyConstraint(\"oq\", false, defaultDBTable0, stringArray0, defaultDBTable0, stringArray0);\n NameSpec nameSpec0 = NameSpec.NEVER;\n StringBuilder stringBuilder0 = SQLUtil.createConstraintSpecBuilder(dBForeignKeyConstraint0, nameSpec0);\n assertEquals(\"\", stringBuilder0.toString());\n }",
"public interface LayoutConstraintAdapter<C, A> {\n\n\t/**\n\t * Adapts the constraint given in the configuration to a constraint suitable\n\t * for a layout.\n\t * \n\t * @param constraint\n\t * Constraint given in the configuration\n\t * @return Constraint suitable for a layout.\n\t */\n\tA adapt(C constraint);\n\n}",
"public String getConstraintName() {\n return constraintName;\n }",
"public ElementDefinitionDt setConstraint(java.util.List<Constraint> theValue) {\n\t\tmyConstraint = theValue;\n\t\treturn this;\n\t}",
"boolean hasInputConstraints();",
"public ConstraintChecker(\n\t\t\tArrayList<TimeSlot> cSlots, \n\t\t\tArrayList<TimeSlot> lSlots, \n\t\t\tArrayList<Pair<Course, Course>> notCompat,\n\t\t\tArrayList<Pair<Course, TimeSlot>> unWant,\n\t\t\tArrayList<Pair<Course, TimeSlot>> parts,\n\t\t\tArrayList<Triple<TimeSlot, Course, Integer>> pref,\n\t\t\tArrayList<Pair<Course, Course>> pair)\n\t\n\t{\n\t\tcourseSlots = cSlots;\n\t\tlabSlots = lSlots;\n\t\tnotCompatible = notCompat;\n\t\tunwanted = unWant;\n\t\tpartials = parts;\n\t\tpreferences = pref;\n\t\tpairs = pair;\n\t}",
"@Override\r\n\tpublic void validateIntegrityConstraint() {\n\t\tvalidatorEngine.validate(entity);\r\n\t}",
"@Override\n public ImmutableList<ImmutableSetMultimap<TypeVariableImpl<X, ?>, Constraint<X>>> getConstraints() {\n return ImmutableList.of(constraints);\n }",
"public void InitializeConstraints(boundkey[] bkc, double[] blc, NodesVector nvector, PipesVector pvector,\n\t\t\tTapsVector tvector, double outflow, double PrixMax, double lcom) {\n\t\tNodes nodes;\n\t\tPipes pipes;\n\t\tTaps taps;\n\n\t\t/* Contraintes sur les Nodes - taps */\n\t\tfor (int i = 0; i < (NbNodes - NbTaps - 1); i++) {\n\t\t\tnodes = (Nodes) nvector.elementAt(i + 1);\n\t\t\tCste[i] = -nodes.height;\n\t\t\tbkc[i] = mosek.boundkey.up;\n\t\t\tblc[i] = -1.0e30;\n\t\t}\n\n\t\t/* Contraintes sur les Taps */\n\t\tfor (int i = NbNodes - NbTaps - 1; i < (NbNodes - 1); i++) {\n\t\t\tnodes = (Nodes) nvector.elementAt(i + 1);\n\t\t\ttaps = (Taps) tvector.elementAt(i - (NbNodes - NbTaps - 1));\n\n\t\t\tif (taps.orifice == Orifices.MAXDIAM) {\n\t\t\t\tCste[i] = -nodes.height - ((outflow * outflow) / taps.faucetCoef);\n\t\t\t} else {\n\t\t\t\tCste[i] = (-nodes.height\n\t\t\t\t\t\t- (outflow * outflow * ((1 / taps.faucetCoef) + Math.pow(CoefOrif / taps.orifice, 4))));\n\t\t\t}\n\n\t\t\tbkc[i] = mosek.boundkey.up;\n\t\t\tblc[i] = -1.0e30;\n\t\t}\n\n\t\t/* Contraintes sur les longueurs des Pipes */\n\t\tfor (int i = NbNodes - 1; i < (m - 1); i++) {\n\t\t\tpipes = (Pipes) pvector.elementAt(i - NbNodes + 1);\n\n\t\t\tCste[i] = pipes.length;\n\n\t\t\tbkc[i] = mosek.boundkey.fx;\n\t\t\tblc[i] = Cste[i];\n\t\t}\n\n\t\t/* contrainte de prix max */\n\t\tCste[m - 1] = PrixMax;\n\t\tbkc[m - 1] = mosek.boundkey.up;\n\t\tblc[m - 1] = -1.0e30;\n\t}",
"public Collection<LinearConstraint> createConstraint(MathematicalProgram problem, Scenario scenario, ElectricPowerFlowConnection connection, ElectricPowerModel model) throws NoVariableException, InvalidConstraintException {\n ArrayList<LinearConstraint> constraints = new ArrayList<LinearConstraint>();\n// ElectricPowerModel modelK = (ElectricPowerModel)scenario.getModel();\n int k = scenario.getIndex();\n FlowScenarioVariableFactory flowVariableFactory = new FlowScenarioVariableFactory(scenarios);\n PhaseAngleScenarioVariableFactory phaseAngleVariableFactory = new PhaseAngleScenarioVariableFactory(scenarios);\n\n ElectricPowerNode fNode = model.getFirstNode(connection);\n ElectricPowerNode sNode = model.getSecondNode(connection);\n \n double impedance = connection.getSusceptance();\n LinearConstraint constraint = new LinearConstraintEquals(getFlowConstraintName(connection, k));\n constraint.setRightHandSide(0.0);\n constraint.addVariable(flowVariableFactory.getVariable(problem, connection, scenario), -1.0); \n constraint.addVariable(phaseAngleVariableFactory.getVariable(problem, fNode, scenario), impedance);\n constraint.addVariable(phaseAngleVariableFactory.getVariable(problem, sNode, scenario), -impedance);\n problem.addLinearConstraint(constraint);\n constraints.add(constraint);\n\n \n \n return constraints;\n }",
"@Override\n\tpublic void CheckBounds() {\n\t\t\n\t}",
"public void addConstraint(final PgConstraint constraint) {\n constraints.add(constraint);\n }",
"public double returnsConstraint()\n\t{\n\t\treturn _returnsConstraint;\n\t}",
"public final EObject ruleEConstraints() throws RecognitionException {\n EObject current = null;\n\n EObject lv_constraints_1_0 = null;\n\n\n\n \tenterRule();\n\n try {\n // InternalRMParser.g:7950:2: ( ( () ( (lv_constraints_1_0= ruleEConstraint ) )* ) )\n // InternalRMParser.g:7951:2: ( () ( (lv_constraints_1_0= ruleEConstraint ) )* )\n {\n // InternalRMParser.g:7951:2: ( () ( (lv_constraints_1_0= ruleEConstraint ) )* )\n // InternalRMParser.g:7952:3: () ( (lv_constraints_1_0= ruleEConstraint ) )*\n {\n // InternalRMParser.g:7952:3: ()\n // InternalRMParser.g:7953:4: \n {\n\n \t\t\t\tcurrent = forceCreateModelElement(\n \t\t\t\t\tgrammarAccess.getEConstraintsAccess().getEConstraintsAction_0(),\n \t\t\t\t\tcurrent);\n \t\t\t\n\n }\n\n // InternalRMParser.g:7959:3: ( (lv_constraints_1_0= ruleEConstraint ) )*\n loop61:\n do {\n int alt61=2;\n int LA61_0 = input.LA(1);\n\n if ( (LA61_0==Greater_or_equal||LA61_0==Less_or_equal||LA61_0==Greater_than||LA61_0==Valid_values||(LA61_0>=Max_length && LA61_0<=Min_length)||LA61_0==Less_than||LA61_0==In_range||LA61_0==Length||LA61_0==Equal) ) {\n alt61=1;\n }\n\n\n switch (alt61) {\n \tcase 1 :\n \t // InternalRMParser.g:7960:4: (lv_constraints_1_0= ruleEConstraint )\n \t {\n \t // InternalRMParser.g:7960:4: (lv_constraints_1_0= ruleEConstraint )\n \t // InternalRMParser.g:7961:5: lv_constraints_1_0= ruleEConstraint\n \t {\n\n \t \t\t\t\t\tnewCompositeNode(grammarAccess.getEConstraintsAccess().getConstraintsEConstraintParserRuleCall_1_0());\n \t \t\t\t\t\n \t pushFollow(FOLLOW_85);\n \t lv_constraints_1_0=ruleEConstraint();\n\n \t state._fsp--;\n\n\n \t \t\t\t\t\tif (current==null) {\n \t \t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getEConstraintsRule());\n \t \t\t\t\t\t}\n \t \t\t\t\t\tadd(\n \t \t\t\t\t\t\tcurrent,\n \t \t\t\t\t\t\t\"constraints\",\n \t \t\t\t\t\t\tlv_constraints_1_0,\n \t \t\t\t\t\t\t\"org.sodalite.dsl.RM.EConstraint\");\n \t \t\t\t\t\tafterParserOrEnumRuleCall();\n \t \t\t\t\t\n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop61;\n }\n } while (true);\n\n\n }\n\n\n }\n\n\n \tleaveRule();\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }",
"@Test\n public void testBoundsAsCompositesWithOneEqRestrictionsAndOneClusteringColumn()\n {\n CFMetaData cfMetaData = newCFMetaData(Sort.ASC);\n\n ByteBuffer clustering_0 = ByteBufferUtil.bytes(1);\n Restriction eq = newSingleEq(cfMetaData, 0, clustering_0);\n\n PrimaryKeyRestrictions restrictions = new PrimaryKeyRestrictionSet(cfMetaData.comparator);\n restrictions = restrictions.mergeWith(eq);\n\n List<Composite> bounds = restrictions.boundsAsComposites(cfMetaData, Bound.START, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), clustering_0, EOC.START);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.END, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), clustering_0, EOC.END);\n }",
"public List<Constraint> getConstraints() {\r\n\t\treturn constraints;\r\n\t}",
"public String getConstraintReference() {\n return constraintName + '.' + clause;\n }",
"@DISPID(1611006004) //= 0x60060034. The runtime will prefer the VTID if present\n @VTID(79)\n boolean constraintsNodeInTree();",
"protected OldRankedConstraint(Constraint c) {\n constraint = c;\n sortingValues = SortingValues.createInstance(defaultStratum,\n defaultRankingValue);\n lastSamplingId = -1;\n }",
"final public ColumnConstraint ColumnConstraint() throws ParseException {Token tk = null, tk2 = null, tk3 = null, tk4 = null;\n String constraintName = null;\n String indexName = null;\n List<ColumnName> indexColumnNames = null;\n ColumnReference reference = null;\n ExpressionValue checkExpr = null;\n switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {\n case PRIMARY:\n case CONSTRAINT:\n case UNIQUE:\n case FOREIGN:{\n switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {\n case CONSTRAINT:{\n tk = jj_consume_token(CONSTRAINT);\n switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {\n case S_IDENTIFIER:\n case S_QUOTED_IDENTIFIER:{\n constraintName = DbObjectName();\n break;\n }\n default:\n jj_la1[96] = jj_gen;\n ;\n }\n break;\n }\n default:\n jj_la1[97] = jj_gen;\n ;\n }\n switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {\n case PRIMARY:{\n tk2 = jj_consume_token(PRIMARY);\n tk3 = jj_consume_token(KEY);\n switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {\n case USING:{\n jj_consume_token(USING);\n tk4 = jj_consume_token(S_IDENTIFIER);\n break;\n }\n default:\n jj_la1[98] = jj_gen;\n ;\n }\n jj_consume_token(118);\n indexColumnNames = ColumnNames();\n jj_consume_token(119);\n switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {\n case USING:{\n jj_consume_token(USING);\n tk4 = jj_consume_token(S_IDENTIFIER);\n break;\n }\n default:\n jj_la1[99] = jj_gen;\n ;\n }\n break;\n }\n case UNIQUE:{\n tk2 = jj_consume_token(UNIQUE);\n switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {\n case KEY:{\n tk3 = jj_consume_token(KEY);\n break;\n }\n default:\n jj_la1[100] = jj_gen;\n ;\n }\n switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {\n case S_IDENTIFIER:\n case S_QUOTED_IDENTIFIER:{\n indexName = DbObjectName();\n break;\n }\n default:\n jj_la1[101] = jj_gen;\n ;\n }\n switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {\n case USING:{\n jj_consume_token(USING);\n tk4 = jj_consume_token(S_IDENTIFIER);\n break;\n }\n default:\n jj_la1[102] = jj_gen;\n ;\n }\n jj_consume_token(118);\n indexColumnNames = ColumnNames();\n jj_consume_token(119);\n switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {\n case USING:{\n jj_consume_token(USING);\n tk4 = jj_consume_token(S_IDENTIFIER);\n break;\n }\n default:\n jj_la1[103] = jj_gen;\n ;\n }\n break;\n }\n case FOREIGN:{\n tk2 = jj_consume_token(FOREIGN);\n switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {\n case KEY:{\n tk3 = jj_consume_token(KEY);\n break;\n }\n default:\n jj_la1[104] = jj_gen;\n ;\n }\n switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {\n case S_IDENTIFIER:\n case S_QUOTED_IDENTIFIER:{\n indexName = DbObjectName();\n break;\n }\n default:\n jj_la1[105] = jj_gen;\n ;\n }\n jj_consume_token(118);\n indexColumnNames = ColumnNames();\n jj_consume_token(119);\n switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {\n case REFERENCES:{\n reference = ColumnReference();\n break;\n }\n default:\n jj_la1[106] = jj_gen;\n ;\n }\n break;\n }\n default:\n jj_la1[107] = jj_gen;\n jj_consume_token(-1);\n throw new ParseException();\n }\n break;\n }\n case KEY:{\n tk2 = jj_consume_token(KEY);\n switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {\n case S_IDENTIFIER:\n case S_QUOTED_IDENTIFIER:{\n indexName = DbObjectName();\n break;\n }\n default:\n jj_la1[108] = jj_gen;\n ;\n }\n switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {\n case USING:{\n jj_consume_token(USING);\n tk4 = jj_consume_token(S_IDENTIFIER);\n break;\n }\n default:\n jj_la1[109] = jj_gen;\n ;\n }\n jj_consume_token(118);\n indexColumnNames = ColumnNames();\n jj_consume_token(119);\n switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {\n case USING:{\n jj_consume_token(USING);\n tk4 = jj_consume_token(S_IDENTIFIER);\n break;\n }\n default:\n jj_la1[110] = jj_gen;\n ;\n }\n break;\n }\n case INDEX:{\n tk2 = jj_consume_token(INDEX);\n switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {\n case S_IDENTIFIER:\n case S_QUOTED_IDENTIFIER:{\n indexName = DbObjectName();\n break;\n }\n default:\n jj_la1[111] = jj_gen;\n ;\n }\n switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {\n case USING:{\n jj_consume_token(USING);\n tk4 = jj_consume_token(S_IDENTIFIER);\n break;\n }\n default:\n jj_la1[112] = jj_gen;\n ;\n }\n jj_consume_token(118);\n indexColumnNames = ColumnNames();\n jj_consume_token(119);\n switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {\n case USING:{\n jj_consume_token(USING);\n tk4 = jj_consume_token(S_IDENTIFIER);\n break;\n }\n default:\n jj_la1[113] = jj_gen;\n ;\n }\n break;\n }\n case FULLTEXT:\n case SPATIAL:{\n switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {\n case FULLTEXT:{\n tk2 = jj_consume_token(FULLTEXT);\n break;\n }\n case SPATIAL:{\n tk2 = jj_consume_token(SPATIAL);\n break;\n }\n default:\n jj_la1[114] = jj_gen;\n jj_consume_token(-1);\n throw new ParseException();\n }\n switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {\n case INDEX:{\n tk3 = jj_consume_token(INDEX);\n break;\n }\n default:\n jj_la1[115] = jj_gen;\n ;\n }\n switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {\n case S_IDENTIFIER:\n case S_QUOTED_IDENTIFIER:{\n indexName = DbObjectName();\n break;\n }\n default:\n jj_la1[116] = jj_gen;\n ;\n }\n jj_consume_token(118);\n indexColumnNames = ColumnNames();\n jj_consume_token(119);\n break;\n }\n case CHECK:{\n tk2 = jj_consume_token(CHECK);\n jj_consume_token(118);\n checkExpr = ExpressionValue();\n jj_consume_token(119);\n break;\n }\n default:\n jj_la1[117] = jj_gen;\n jj_consume_token(-1);\n throw new ParseException();\n }\nreturn new ColumnConstraint(tk != null, constraintName, (tk2 != null ? tk2.image : \"\") + (tk3 != null ? \" \" + tk3.image : \"\"),\n indexColumnNames, (tk4 != null ? tk4.image : null), indexName, reference, checkExpr);\n}",
"@Test(timeout = 4000)\n public void test048() throws Throwable {\n String[] stringArray0 = new String[5];\n DBSchema dBSchema0 = new DBSchema(\"\");\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"k4#~A6 _d6{6v)5_\", dBSchema0);\n DBPrimaryKeyConstraint dBPrimaryKeyConstraint0 = new DBPrimaryKeyConstraint(defaultDBTable0, \"\", false, stringArray0);\n DBForeignKeyConstraint dBForeignKeyConstraint0 = new DBForeignKeyConstraint(\"zMTj(6E;C\", true, defaultDBTable0, stringArray0, defaultDBTable0, stringArray0);\n NameSpec nameSpec0 = NameSpec.NEVER;\n StringBuilder stringBuilder0 = SQLUtil.createConstraintSpecBuilder(dBPrimaryKeyConstraint0, nameSpec0);\n SQLUtil.appendConstraintName((DBConstraint) dBForeignKeyConstraint0, stringBuilder0);\n assertEquals(\"CONSTRAINT zMTj(6E;C \", stringBuilder0.toString());\n }",
"int getConstraintsCount();",
"public interface Equality extends Clause {}",
"void setConstraints(com.microsoft.schemas.crm._2011.contracts.ArrayOfConstraintRelation constraints);"
]
| [
"0.7221522",
"0.7221522",
"0.69576776",
"0.6791041",
"0.6715775",
"0.64845765",
"0.6404917",
"0.6312633",
"0.61906075",
"0.617452",
"0.61227024",
"0.6107571",
"0.6103187",
"0.60952",
"0.609515",
"0.60715526",
"0.6045759",
"0.60431397",
"0.6042889",
"0.6007383",
"0.59707594",
"0.59399503",
"0.59328735",
"0.5901874",
"0.5893061",
"0.58749765",
"0.5838479",
"0.58092946",
"0.5801134",
"0.57959145",
"0.5787243",
"0.57793987",
"0.577841",
"0.57697207",
"0.57684445",
"0.5764012",
"0.5757541",
"0.5751249",
"0.5750976",
"0.57417446",
"0.5731625",
"0.57056445",
"0.5668306",
"0.5647843",
"0.5644119",
"0.56194353",
"0.5618966",
"0.5597982",
"0.558215",
"0.5581433",
"0.5580622",
"0.55804485",
"0.557243",
"0.55348176",
"0.5533361",
"0.55277294",
"0.5520422",
"0.5520315",
"0.5514553",
"0.5495709",
"0.54888964",
"0.5476193",
"0.5475438",
"0.5471219",
"0.54686075",
"0.5459443",
"0.5440806",
"0.5402265",
"0.54009676",
"0.5385178",
"0.5384728",
"0.5383191",
"0.5382586",
"0.5368711",
"0.53663033",
"0.5339653",
"0.5337795",
"0.5337179",
"0.53221285",
"0.531419",
"0.5312145",
"0.5300549",
"0.52993566",
"0.5299001",
"0.52926177",
"0.52921915",
"0.5280611",
"0.52796096",
"0.5272349",
"0.52631325",
"0.5261475",
"0.52537096",
"0.5252904",
"0.52457327",
"0.52382797",
"0.52274036",
"0.5218873",
"0.5218199",
"0.5217539",
"0.5206058"
]
| 0.64954424 | 5 |
/ this is a one entry map so here we pick the single | public default Object expression() {
return info().values().iterator().next();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n public Entry<K, V> firstEntry() {\n return null;\r\n }",
"@Override\n\tpublic Map<String, Object> findOne(Long arg0) {\n\t\treturn null;\n\t}",
"@Override\n\t@TimeComplexity(\"O(1)\")\n\tpublic Entry<K, V> firstEntry() {\n\t/* TCJ\n\t * Continuous operation: O(1)\n\t */\n\t\treturn safeEntry(0);\n\t}",
"public Mapping getMappingFirstRep() {\n\t\tif (getMapping().isEmpty()) {\n\t\t\treturn addMapping();\n\t\t}\n\t\treturn getMapping().get(0); \n\t}",
"@Override\r\n\t\tpublic T getFirst() {\n\t\t\tsynchronized (mutex) {\r\n\t\t\t\treturn pair.getFirst();\r\n\t\t\t}\r\n\t\t}",
"@Override\r\n\t\tpublic T getFirst() {\n\t\t\treturn pair.getFirst();\r\n\t\t}",
"protected abstract S get(E entry);",
"@Override\n public Tile getFirst() {\n return tiles.iterator().next();\n }",
"@Override\r\n\t\tpublic E getFirst() {\n\t\t\treturn pair.getFirst();\r\n\t\t}",
"@Override\r\n\t\tpublic E getFirst() {\n\t\t\treturn pair.getFirst();\r\n\t\t}",
"final IntHashMapEntry lookupEntry(int par1)\n {\n int j = computeHash(par1);\n\n for (IntHashMapEntry inthashmapentry = this.slots[getSlotIndex(j, this.slots.length)]; inthashmapentry != null; inthashmapentry = inthashmapentry.nextEntry)\n {\n if (inthashmapentry.hashEntry == par1)\n {\n return inthashmapentry;\n }\n }\n\n return null;\n }",
"Optional<ValueType> getSingle(KeyType key);",
"public static <K, V> BiValue<K, V> getAny(MapStream<K, V> s) {\n return s.getFirst();\n }",
"@Override\r\n public Entry<K, V> pollFirstEntry() {\n return null;\r\n }",
"public Object lookup(int par1)\n {\n int j = computeHash(par1);\n\n for (IntHashMapEntry inthashmapentry = this.slots[getSlotIndex(j, this.slots.length)]; inthashmapentry != null; inthashmapentry = inthashmapentry.nextEntry)\n {\n if (inthashmapentry.hashEntry == par1)\n {\n return inthashmapentry.valueEntry;\n }\n }\n\n return null;\n }",
"public char FirstAppearingOnce_2(){\n if(!map.isEmpty()){\n //不为空时返回第一个即可\n for(Map.Entry<Character,Character> entry : map.entrySet()){\n return entry.getKey();\n }\n }\n return '#';\n }",
"@Override\n\tpublic GenericMapInfo get(PK id) {\n\t\treturn null;\n\t}",
"private Object getEntry( Object[] row, String rrName ) {\n Integer icol = colMap_.get( rrName );\n return icol == null ? null : row[ icol.intValue() ];\n }",
"@Nullable\n protected abstract Map.Entry<K, V> onGetLowestEntry();",
"@Override\n\t\t\tpublic String pickItem(Map<String, Integer> distribution) {\n\t\t\t\treturn null;\n\t\t\t}",
"@Override\n\t\t\tpublic String pickItem(Map<String, Integer> distribution) {\n\t\t\t\treturn null;\n\t\t\t}",
"public MapElement get(long key) {\r\n return (MapElement) getElement(key);\r\n }",
"@Override\r\n public K firstKey() {\n return null;\r\n }",
"public Widget findOne(Point p) {\n // we need to deal with scaled points because of zoom feature\n Point2D.Double scaledPos = new Point2D.Double();\n scaledPos.x = (double)p.x;\n scaledPos.y = (double)p.y;\n if (zoomFactor > 1) // transforms are only needed in zoom mode\n inv_at.transform(scaledPos, scaledPos);\n Point2D.Double mappedPos = u.fromWinPoint(scaledPos);\n// System.out.println(\"findOne: Z=\" + zoomFactor + \" p=[\" + p.x + \",\" + p.y + \"] \" \n// + \" s=[\" + scaledPos.getX() + \",\" + scaledPos.getY() + \"]\"\n// + \" m=[\" + mappedPos.getX() + \",\" + mappedPos.getY() + \"]\");\n Widget ret = null;\n for (Widget w : widgets) {\n if (w.contains(mappedPos)) {\n// System.out.println(\"found: \" + w.getKey() + \" p= \" + p + w.getBounded());\n ret = w;\n }\n }\n return ret;\n }",
"protected ExitQuestionsMap fetchSingleResult(ResultSet rs) throws SQLException {\n\t\tif (rs.next()){\n\t\t\tExitQuestionsMap dto = new ExitQuestionsMap();\n\t\t\tpopulateDto(dto, rs);\n\t\t\treturn dto;\n\t\t}\n\t\treturn null;\n\t}",
"public <T> T1 caseMappingEntry(MappingEntry<T> object) {\n\t\treturn null;\n\t}",
"public Entry find(Object key) {\r\n Entry entry_with_key = new Entry();\r\n entry_with_key.key = key; \r\n int comp_hash = compFunction(entry_with_key.key.hashCode());\r\n if (hash_table[comp_hash] == null) {\r\n return null;\r\n } else {\r\n DList searching = hash_table[comp_hash];\r\n for(Object entry: searching){\r\n if(((Entry) entry).key().equals(key)){\r\n return (Entry) entry;\r\n }\r\n }\r\n return null;\r\n \r\n }\r\n\r\n\r\n }",
"@Override\r\n\t\t\tpublic SimpleEntry<Point, Square> nextEntry() {\r\n\t\t\t\tMap.Entry<Point, Square> e = master.next();\r\n\t\t\t\treturn new SimpleEntry<Point, Square>(e.getKey(), e.getValue());\r\n\t\t\t}",
"public Object get(short key) {\n\t\tIterator iter = iterator();\n\t\tEntry e = null;\n\t\tfor (; iter.hasNext(); e=(Entry)iter.next())\n\t\t\tif (e.getKey()==key)\n\t\t\t\treturn e.getObject();\n\t\treturn null;\n\t}",
"public T getEntry(int givenPosition);",
"public V get(Object key) { return _map.get(key); }",
"@CheckForNull public Archetype getAnyArchetype() {\n if (map.isEmpty()) {\n return null;\n }\n return map.values().iterator().next();\n }",
"private Item getCurrentItem(Iterator entriesIterator){\r\n\t\tMap.Entry mapping = (Map.Entry) entriesIterator.next();\r\n\t\treturn (Item) mapping.getValue();\r\n\t}",
"public String get(String key){\n\t\tListMapEntry temp = first;\n\t\twhile(temp!=null && !temp.getKey().equals(key)){\n\t\t\ttemp = temp.getNext();\n\t\t}\n\t\tif(temp==null){\n\t\t\treturn null;\n\t\t}\n\t\telse{\n\t\t\treturn temp.getValue();\n\t\t}\n\t}",
"@Override\n public V get(K key) {\n if(containsKey(key)) {\n LinkedList<Entry<K, V>> pointer = entryArr[Math.floorMod(key.hashCode(), entryArr.length)];\n return pointer.stream().filter(x->x.key.equals(key))\n .collect(Collectors.toList()).get(0).value;\n }\n return null;\n }",
"public K getFirst() {\r\n\t\treturn first;\r\n\t}",
"public HashMap<String, HashMap<String, String>> getNearestFacility() {\n if (this.featureInfoHashMap==null) {\n return null;\n }\n return (HashMap<String, HashMap<String, String>>) this.featureInfoHashMap.entrySet().iterator().next();\n }",
"public Object get(Object key) {\n IEntry e = map.get(key);\n if (e == null) {\n return null;\n }\n if (currentMode == Scope.APPLICATION) {\n if (e.scope == Scope.APPLICATION) {\n return e.obj;\n } else {\n return null;\n }\n } else {\n return e.obj;\n }\n }",
"public Entry find(Object key) {\n int hashCode = key.hashCode();\n int index = compFunction(hashCode);\n\n if(defTable[index].isEmpty()) {\n return null;\n }\n\n Entry entry = new Entry();\n ListNode current = defTable[index].front();\n\n try{\n while(true) {\n if(((Entry) current.item()).key().equals(key)) {\n entry.key = key;\n entry.value = ((Entry) current.item()).value();\n return entry;\n }\n if(current==defTable[index].back()) {\n break;\n }\n current = current.next();\n }\n } catch(Exception err) {\n System.out.println(err);\n }\n return null;\n }",
"private static Object findKey(Map<?, ?> in, Object value) {\n\t\tfor (Object key : in.keySet()) {\n\t\t\tif (in.get(key).equals(value)) {\n\t\t\t\treturn key;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public MapElement getElement(int key) {\n int index = key % capacity;\n if (index < 0) {\n index = -index;\n }\n\n if (map[index] == null) {\n return null;\n } else {\n MapElement me = map[index];\n while (true) {\n if (me.getKey() == key) {\n return me;\n } else {\n me = me.getNext();\n if (me == null) {\n return null;\n }\n }\n }\n }\n }",
"XClass getMapKey();",
"@Override\n\tpublic JSONArray getOne(Map<String, Object> map) {\n\t\tList<Map<String,Object>> list = licDao.getOne(map);\n\t\tJSONArray jsonArray = new JSONArray();\n\t\tif(list!=null){\n\t\t\tif(list.size()>0){\n\t\t\t\tMap<String,Object> rtnMap = list.get(0);\n\t\t\t\tjsonArray.add(rtnMap);\n\t\t\t}\n\t\t}\n\t\treturn jsonArray;\n\t}",
"public static java.util.Map singletonMap(java.lang.Object arg0, java.lang.Object arg1)\n { return null; }",
"public <T extends IConstruct> T byIdentity(Map<ILocator, T> map, ILocator l) {\r\n\t\tif (map == null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn map.get(l);\r\n\t}",
"private Integer getKey(WeatherData value)\n\t{\n\t for(Integer key : trainDataXMap.keySet())\n\t {\n\t if(trainDataXMap.get(key).equals(value))\n\t {\n\t return key; //return the first found\n\t }\n\t }\n\t return null;\n\t}",
"@Override\n\tpublic Object selectOne2(Object map) {\n\t\treturn null;\n\t}",
"@Override\r\n public Entry<K, V> floorEntry(final K key) {\n return null;\r\n }",
"public int get(int key) {\n int hashedKey = hash(key);\n Entry entry = map.get(hashedKey);\n if (entry.key == -1)\n return -1;\n else if (entry.key == key)\n return entry.value;\n else if (entry.next != null){\n while(entry.next!=null && entry.key != key){\n entry = entry.next;\n }\n if (entry.key == key)\n return entry.value;\n else\n return -1;\n }else\n return -1;\n }",
"public char FirstAppearingOnce()\n {\n char rs='#';\n int size=list.size();\n for(int i=0;i<size;i++){\n char ch= (char) list.get(i);\n if(1 == (Integer) map.get(ch)){\n rs=ch;\n break;\n }\n }\n return rs;\n }",
"public BSTMapNode findMin() \n\t{\n\t\t\n\t\t\n\t\treturn null;\n\t}",
"@Override\r\n\tpublic V getElement(K key) {\n\t\tif (hashMap.containsKey(key)){\r\n\t\t\tque.remove(key);\r\n\t\t\tque.add(key);\r\n\t\t\treturn hashMap.get(key);\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}",
"@Override\r\n\t\tpublic final E getFirst() {\n\t\t\treturn null;\r\n\t\t}",
"@Override\r\n\t\tpublic K getKey() {\n\t\t\treturn pair.getFirst();\r\n\t\t}",
"public char FirstAppearingOnce_3(){\n char[] ch = sb.toString().toCharArray();\n if(!hashMap.isEmpty()){\n //通过遍历返回第一个\n for(char i : ch){\n if(hashMap.containsKey(i)){\n return hashMap.get(i);\n }\n }\n }\n return '#';\n }",
"@Override\r\n\tpublic Object first(){\r\n\t\tcheck();\r\n\t\treturn head.value;\r\n\t}",
"@Override\r\n\tpublic E getFirst() {\n\t\treturn null;\r\n\t}",
"public Object get(Object key) {\n\t\tint index = key.hashCode() % SLOTS;\n\t\t// check if key is already present in that slot/bucket.\n\t\tfor(Pair p:table[index]) {\n\t\t\tif(key.equals(p.key))\n\t\t\t\treturn p.value;\n\t\t}\n\t\t// if not found, return null\n\t\treturn null;\n\t}",
"private Mapping getMappingByID(List<BaseMapping> mappings, String uuid) {\n Mapping objectMapping = null;\n if (mappings != null) {\n for (ListIterator<BaseMapping> iter = mappings.listIterator(); iter.hasNext();) {\n Mapping element = (Mapping)iter.next();\n if (element.getId().equals(uuid)) {\n objectMapping = element;\n break;\n }\n }\n }\n return objectMapping;\n }",
"public E getFirst();",
"private <T, E> T getKeyByValue(Map<T, E> map, E value) {\n for (Map.Entry<T, E> entry : map.entrySet()) {\n if (value.equals(entry.getValue())) {\n return entry.getKey();\n }\n }\n return null;\n }",
"public MapElement next() {\n return findNext(true);\n }",
"protected int firstIndex(Object key)\r\n {\r\n return key.hashCode() & mask;\r\n }",
"public Object getFirst(){\n return pattern[0];\n }",
"ConceptMap loadLatestConceptMapForUUID(String uuid) {\n \t\tArrayList<ConceptMap> listItems = loadConceptMapVersionsForUUID(uuid, 1);\n \t\tif (listItems == null || listItems.isEmpty()) return null;\n \t\treturn listItems.get(0);\n \t}",
"public Object getFirst() {\n if (first == null)\n return null;\n return first.getInfo();\n }",
"abstract K getFirstLeafKey();",
"abstract K getFirstLeafKey();",
"protected SafeHashMap.Entry instantiateEntry()\n {\n return new Entry();\n }",
"public Tile sameValue(Tile t) {\n for (int i=0; i<this.size(); i++) {\n if (this.get(i).getColour() == t.getColour() &&\n this.get(i).getValue() == t.getValue()) {\n return this.get(i);\n }\n }\n return null;\n\n }",
"@Override\n\t@TimeComplexity(\"O(log n)\")\n\tpublic Entry<K, V> floorEntry(K key) {\n\t/* TCJ\n\t * Binary search operation: log n\n\t */\n\t\tint j = findIndex(key);\n\t\tif ( j == size() || ! key.equals(map.get(j).getKey())) j--;\n\t\treturn safeEntry(j);\n\t}",
"@Override\n\t@TimeComplexity(\"O(1)\")\n\tpublic Entry<K, V> lastEntry() {\n\t/* TCJ\n\t * Continuous operation: 1\n\t */\n\t\treturn safeEntry(map.size() - 1);\n\t}",
"public T getFirst();",
"public T getFirst();",
"private Integer mapTaskID(Integer id)\r\n {\r\n Integer mappedID = m_clashMap.get(id);\r\n if (mappedID == null)\r\n {\r\n mappedID = id;\r\n }\r\n return (mappedID);\r\n }",
"public E first() \n throws NoSuchElementException {\n if (entries != null && \n size > 0 ) {\n position = 0;\n E element = entries[position]; \n position++;\n return element;\n } else {\n throw new NoSuchElementException();\n }\n }",
"@Override\n\t@TimeComplexity(\"O(log n)\")\n\tpublic Entry<K, V> higherEntry(K key) {\n\t/* TCJ \n\t * Binary search operation: log n\n\t */\n\t\tint j = findIndex(key);\n\t\tif ( j < size() && key.equals(map.get(j).getKey())) j++;\n\t\treturn safeEntry(j);\n\t}",
"public Object obtDupla(Object key1, Object key2) {\r\n\t\tObject value=null;\r\n\t\tHashMap<String, Double> fila = structure.get(key1);\r\n\t\tif (fila != null)\r\n\t\t\tvalue = fila.get(key2);\r\n\t\treturn value;\r\n\t}",
"private Node _locate(Object key){\n\t\tint hashCode = key.hashCode();\r\n\t\tint bucketNum = hashCode % _numBuckets;\r\n\t\treturn _locate(key, bucketNum);\r\n\t}",
"public O first()\r\n {\r\n if (isEmpty()) return null; \r\n return first.getObject();\r\n }",
"public Object objectAt(Position position){\n return mapElement.get(position);\n }",
"public Item getFirst();",
"@Override\n\tpublic V get(Object key) {\n\t\treturn map.get(key);\n\t}",
"K getFirstLeafKey() {\r\n return keys.get(0);\r\n }",
"public Key getFirst() {\n\t\treturn firstNode.key;\n\t}",
"private V get(K key) {\n\t\t\tif (keySet.contains(key)) {\n\t\t\t\treturn valueSet.get(keySet.indexOf(key));\n\t\t\t}\n\t\t\treturn null;\n\t\t}",
"public E getFirst() {\n\t\t// Bitte fertig ausprogrammieren:\n\t\treturn null;\n\t}",
"public int get(int key) {\n return 1;\n }",
"protected TopicMapObject identifyByID(TopicMap tm) {\n\n // id of a topic supplied?\n if (id == null)\n return null;\n\n return tm.getObjectByID(id);\n\n }",
"@Override\n public Map.Entry<K, V> next() {\n if (iter.hasNext()) {\n \n lastItemReturned = iter.next();\n return lastItemReturned;\n } else {\n throw new NoSuchElementException();\n }\n }",
"@Override\n public T getValue() {\n return entry.getValue().getValue();\n }",
"public T caseEntry(Entry object) {\n\t\treturn null;\n\t}",
"V getEntry(K key);",
"public T lookup(T item) \r\n {\r\n \t\r\n \tint code = item.hashCode(); // The hashcode for the item\r\n \t\r\n \t// If the hashcode is negative\r\n \tif(code < 0)\r\n \t{\r\n \t\tcode = -code;\r\n \t}\r\n \t\r\n \tcode = code % hashTable.length;\r\n \t\r\n \tif(hashTable[code].contains(item))\r\n \t{\r\n \t\treturn hashTable[code].get(hashTable[code].indexOf(item));\r\n \t}\r\n \telse\r\n \t{\r\n \t\treturn null;\r\n \t}\r\n }",
"@Override\n\tpublic Setting queryone() {\n\t\treturn SettingMapper.queryone();\n\t}",
"@Override\n\tpublic T retrieveItem(T obj) {\n\t\tif(cache.contains(obj)) {\n\t\t\tfor (T objInSet : cache) {\n\t\t\t\tif (objInSet.equals(obj)) {\n\t\t\t\t\treturn objInSet;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"private Node<Pair<K, V>> findItem(K key) {\n Node<Pair<K, V>> result = null;\n\n int hash1 = hash1(key);\n\n if (table[hash1] != null) {\n Node<Pair<K, V>> node = search(table[hash1].list, key);\n\n if (node != null) {\n result = node;\n }\n }\n\n int hash2 = hash2(key);\n\n if (table[hash2] != null && result == null) {\n Node<Pair<K, V>> node = search(table[hash2].list, key);\n\n if (node != null) {\n result = node;\n }\n }\n\n return result;\n }",
"public String get(BSTMapNode element) \n\t{\n\t\tif(element.getKey() == this.key)\n\t\t{\n\t\t\treturn this.value;\n\t\t}\n\t\telse if(element.getKey() < this.key)\n\t\t{\n\t\t\tif(this.left == null)\n\t\t\t{\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn this.left.get(element);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(this.right == null)\n\t\t\t{\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn this.right.get(element);\n\t\t\t}\n\t\t}\n\t}",
"public T get(String name) {\n for (int i = maps.size() - 1; i >= 0; i--) {\n HashMap<String, T> scope = maps.get(i);\n T t = scope.get(name);\n if (t != null) return t; // Found it!\n }\n return null; // Not found\n }",
"@Override\r\n public Entry<K, V> higherEntry(final K key) {\n return null;\r\n }",
"public V get(K key)\n\t{\n\t\tcheckForNulls(key);\n\t\tint n = Math.abs(key.hashCode() % entries.length);\n\t\t\n\t\tif (entries[n] == null)\n\t\t\treturn null;\n\t\t\n\t\tfor (Entry e : entries[n])\n\t\t{\n\t\t\tif (key.equals(e.key) == true)\n\t\t\t\treturn e.value;\n\t\t}\n\t\t\n\t\treturn null;\n\t}"
]
| [
"0.6851043",
"0.6302916",
"0.6269377",
"0.62665904",
"0.6254953",
"0.6223843",
"0.6154084",
"0.60607606",
"0.60486794",
"0.60486794",
"0.6039011",
"0.59853905",
"0.59706634",
"0.5952702",
"0.5898442",
"0.58281887",
"0.5795658",
"0.5788179",
"0.5765968",
"0.5764722",
"0.5764722",
"0.57514787",
"0.5748625",
"0.5745031",
"0.5742451",
"0.5738408",
"0.57368803",
"0.57320684",
"0.5718228",
"0.5716444",
"0.57092196",
"0.5706439",
"0.5689176",
"0.5679428",
"0.56503797",
"0.56438446",
"0.56407845",
"0.56281483",
"0.5625369",
"0.562238",
"0.56220204",
"0.5610146",
"0.5597866",
"0.55958086",
"0.55532205",
"0.552973",
"0.551668",
"0.5508615",
"0.5495454",
"0.5468289",
"0.5463071",
"0.54452115",
"0.5438224",
"0.54361874",
"0.5431099",
"0.54234546",
"0.5417638",
"0.5412776",
"0.54085726",
"0.5405415",
"0.540537",
"0.54043967",
"0.5404312",
"0.5396492",
"0.53911406",
"0.53795475",
"0.53754014",
"0.53754014",
"0.5375153",
"0.53733474",
"0.53654546",
"0.53566307",
"0.53543913",
"0.53543913",
"0.5353147",
"0.534899",
"0.5346179",
"0.5345819",
"0.5343628",
"0.53398424",
"0.5335314",
"0.5332248",
"0.53302073",
"0.532654",
"0.53168553",
"0.5312458",
"0.53123343",
"0.5309056",
"0.53077394",
"0.53072095",
"0.53062433",
"0.53054565",
"0.530457",
"0.5304038",
"0.53007317",
"0.52990276",
"0.5294084",
"0.52912486",
"0.5277733",
"0.5276696",
"0.5273877"
]
| 0.0 | -1 |
First name will return an empty string | @Test
public void shouldCreateErrorMessageIfFieldsAreEmpty() {
when(mockView.getFirstName()).thenReturn("");
mPresenter.saveUser();
verify(mockView, times(1)).getFirstName();
verify(mockView, never()).getLastName();
verify(mockView, times(1)).showInputError();
// This time the last name will return an empty string
when(mockView.getFirstName()).thenReturn("Albert");
when(mockView.getLastName()).thenReturn("");
mPresenter.saveUser();
// Called two times, once before and once for this time
verify(mockView, times(2)).getFirstName();
// Called only once this time
verify(mockView, times(1)).getLastName();
// Called two times, once before and once for this time
verify(mockView, times(2)).showInputError();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getFirstName();",
"java.lang.String getFirstName();",
"public String getFirstname() {\n return (String) get(\"firstname\");\n }",
"public String getFirstname() {\r\n\t\treturn firstname;\r\n\t}",
"public String getFirstname() {\n\t\treturn firstname;\n\t}",
"public String getFirst_name() {\n return first_name;\n }",
"public java.lang.String getFirstName();",
"public String getFirstName() {\r\n return insertMode ? \"\" : stringValue(CONTACTS_FIRST_NAME);\r\n }",
"public java.lang.String getFirst_name() {\n return first_name;\n }",
"public java.lang.CharSequence getFirstName() {\n return first_name;\n }",
"public java.lang.CharSequence getFirstName() {\n return first_name;\n }",
"Optional<String> getFirstname();",
"@AutoEscape\n\tpublic String getFirst_name();",
"public String getFirstName() {\n return firstNameField.getText();\n }",
"@Override\r\n\tpublic String getFistName() {\n\t\treturn first_name;\r\n\t}",
"public String getNameFirst() {\n\t\t\treturn nameFirst;\n\t\t}",
"String getFirstName();",
"String getFirstName();",
"String getFirstName();",
"public String firstName() { return firstName; }",
"public String getFirstName()\n\t{\n\t\t//local consants\n\n\t\t//local variables\n\n\t\t/*******************************************************************************/\n\n\t\t//Return the firstName.\n\t\treturn firstName;\n\n\t}",
"public String getFirstName()\r\n\t{\r\n\t\treturn firstName.getModelObjectAsString();\r\n\t}",
"public String getFirstName(){\r\n\t\treturn firstName;\r\n\t}",
"@AutoEscape\n\tpublic String getFirstName();",
"public static String getFirstName() {\r\n\t\treturn firstName;\r\n\t}",
"public final String getFirstName() {\r\n\t\treturn firstName;\r\n\t}",
"public String returnFirstName() {\n\t\treturn this.registration_firstname.getAttribute(\"value\");\t\t\r\n\t}",
"public String getFirstName()\r\n\t{\r\n\t\treturn firstName;\r\n\t}",
"public final String getFirstName() {\n\t\treturn firstName;\n\t}",
"public String getFirstName(){\n\t\treturn firstName;\n\t}",
"public String getFirstName() {\n\t\treturn getfirstName.getText();\n\t}",
"public String getFirstName() {\n\t\t System.out.println(\"method getFirstName() called.\");\n\t\t return firstName;\n\t\t}",
"public String getFirstName(){\n\t\treturn this.firstName;\r\n\t}",
"public String getFirstName() {\n\t\treturn this.FirstName ;\n\t}",
"static String getFirstName() {\n\t\tScanner s = new Scanner(System.in);\n\t\tSystem.out.print(\"Enter first name: \");\n\t\tString fn = s.nextLine();\n\t\treturn fn;\n\t}",
"public String getFirstName() {\r\n\t\treturn firstName;\t\t\r\n\t}",
"@java.lang.Override\n public java.lang.String getFirstName() {\n java.lang.Object ref = firstName_;\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 firstName_ = s;\n return s;\n }\n }",
"public static String cleanName(String firstOrLastName) {\n return firstOrLastName.trim().replaceAll(\"\\\\s+\", \" \");\n }",
"public String getFirstName(){\n\t\treturn this.firstName;\n\t}",
"public String getFirst_name_textFieldText() {\n return first_name_textField.getText();\n }",
"@java.lang.Override\n public java.lang.String getFirstName() {\n java.lang.Object ref = firstName_;\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 firstName_ = s;\n return s;\n }\n }",
"@java.lang.Override\n public java.lang.String getFirstName() {\n java.lang.Object ref = firstName_;\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 firstName_ = s;\n return s;\n }\n }",
"public String setUserFirstName(){\n String firstName = \"\";\n while(firstName.isBlank()) {\n System.out.print(\"Please Enter First Name: \");\n firstName = supplyString.get();\n }\n return firstName.trim();\n }",
"public String getFirstName()\n\t{\n\t\treturn firstName;\n\t}",
"public String getFirstName()\n\t{\n\t\treturn firstName;\n\t}",
"public String getFirstName() {\r\n\t\treturn firstName;\r\n\t}",
"public String getFirstName() {\r\n\t\treturn firstName;\r\n\t}",
"public String getFirstName() {\n\t\treturn firstName;\r\n\t}",
"public String getFirstName() {\r\n return firstName;\r\n }",
"public String getFirstName() {\r\n return firstName;\r\n }",
"public String getFirstName() {\r\n return firstName;\r\n }",
"public String getFirstName() {\n return fName;\n }",
"public String getFirstName() {\n return (String)getAttributeInternal(FIRSTNAME);\n }",
"private String getFirstName() {\n System.out.println(\"Enter Your Last Name Of First Letter In Capital \");\n return sc.next();\n }",
"public java.lang.String getFirstName() {\r\n return firstName;\r\n }",
"public java.lang.String getFirstName() {\r\n return firstName;\r\n }",
"public static String getFirstName() {\n String firstName = \"George\";\n String lastName = \"Washington\";\n return lastName;\n }",
"public java.lang.String getFirstName() {\n java.lang.Object ref = firstName_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n firstName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public String getFirstName()\r\n {\r\n return firstName;\r\n }",
"public String getFirstName() {\r\n\t\treturn this.firstName;\r\n\t}",
"public java.lang.String getFirstName() {\n java.lang.Object ref = firstName_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n firstName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getFirstName() {\n java.lang.Object ref = firstName_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n firstName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public String getFirstName() {\n\t\treturn firstName;\n\t}",
"public String getFirstName() {\n\t\treturn firstName;\n\t}",
"public String getFirstName() {\n\t\treturn firstName;\n\t}",
"public String getFirstName() {\n\t\treturn firstName;\n\t}",
"public String getFirstName() {\n\t\treturn firstName;\n\t}",
"public String getFirstName() {\n\t\treturn firstName;\n\t}",
"public String getFirstName() {\n\t\treturn firstName;\n\t}",
"public String getFirstName() {\n\t\treturn firstName;\n\t}",
"public String getFirstName() {\n\t\treturn firstName;\n\t}",
"public String getFirstName() {\n\t\treturn firstName;\n\t}",
"public String getFirstName() {\n\t\treturn firstName;\n\t}",
"public String getFirstName() {\n\t\treturn firstName;\n\t}",
"public String getFirstName() {\n\t\treturn firstName;\n\t}",
"public java.lang.String getFirstName() {\n\t\t\t\tjava.lang.Object ref = firstName_;\n\t\t\t\tif (!(ref instanceof java.lang.String)) {\n\t\t\t\t\tcom.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n\t\t\t\t\tjava.lang.String s = bs.toStringUtf8();\n\t\t\t\t\tfirstName_ = s;\n\t\t\t\t\treturn s;\n\t\t\t\t} else {\n\t\t\t\t\treturn (java.lang.String) ref;\n\t\t\t\t}\n\t\t\t}",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName()\r\n {\r\n return firstName;\r\n }",
"public String getFirstName()\r\n {\r\n return firstName;\r\n }",
"public String getFirstName()\r\n {\r\n return firstName;\r\n }",
"public java.lang.String getFirstName() {\n return firstName;\n }",
"public java.lang.String getFirstName() {\n return firstName;\n }",
"public String getGoogleUserFirstName(){\n return (String) attributes.get(GOOGLE_USER_FIRST_NAME);\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }"
]
| [
"0.8143754",
"0.8143754",
"0.801979",
"0.7969185",
"0.78766453",
"0.78515077",
"0.7838957",
"0.7807898",
"0.78023434",
"0.776323",
"0.7743187",
"0.77384245",
"0.76749253",
"0.76193374",
"0.7608269",
"0.75981367",
"0.759615",
"0.759615",
"0.759615",
"0.757334",
"0.7536024",
"0.7528298",
"0.7482774",
"0.74704146",
"0.7467634",
"0.7466782",
"0.7446686",
"0.74384147",
"0.7426935",
"0.74177593",
"0.7402382",
"0.73892766",
"0.7384424",
"0.7381072",
"0.73803055",
"0.73678267",
"0.7365973",
"0.7365872",
"0.7360961",
"0.73559576",
"0.7350128",
"0.7350128",
"0.73493165",
"0.7343553",
"0.7343553",
"0.73389417",
"0.73389417",
"0.73381907",
"0.7337378",
"0.7337378",
"0.7337378",
"0.7328609",
"0.7327051",
"0.7321451",
"0.7313541",
"0.7313541",
"0.7308977",
"0.73079115",
"0.72989255",
"0.7294394",
"0.72911036",
"0.72911036",
"0.72864187",
"0.72864187",
"0.72864187",
"0.72864187",
"0.72864187",
"0.72864187",
"0.72864187",
"0.72864187",
"0.72864187",
"0.72864187",
"0.72864187",
"0.72864187",
"0.72864187",
"0.7276948",
"0.7275888",
"0.7275888",
"0.7274607",
"0.7274607",
"0.7274607",
"0.7266183",
"0.7266183",
"0.725814",
"0.72546303",
"0.72546303",
"0.72546303",
"0.72546303",
"0.72546303",
"0.72546303",
"0.72546303",
"0.72546303",
"0.72546303",
"0.72546303",
"0.72546303",
"0.72546303",
"0.72546303",
"0.72546303",
"0.72546303",
"0.72546303",
"0.72546303"
]
| 0.0 | -1 |
First name and last name will return the data | @Test
public void shouldBeAbleToSaveValidUser() {
when(mockView.getFirstName()).thenReturn("Albert");
when(mockView.getLastName()).thenReturn("Einstein");
mPresenter.saveUser();
// Called two times
verify(mockView, times(2)).getFirstName();
verify(mockView, times(2)).getLastName();
// Make sure the repository saved the user
verify(mockLoginModel, times(1))
.createUser(123, "Albert", "Einstein");
// Verify that the user informed with a toast message
verify(mockView, times(1)).showUserSavedMessage();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getFirstName();",
"java.lang.String getFirstName();",
"String getFirstName();",
"String getFirstName();",
"String getFirstName();",
"public java.lang.String getFirstName();",
"public void getFirstAndLastName( String name ){//\r\n String nameNew = name.trim();\r\n String[] arr = nameNew.split(\"\\\\s\");\r\n firstName = arr[0];\r\n lastName = arr[1];\r\n }",
"public String getFirstName();",
"public String getName (){\r\n return firstName + \" \" + lastName;\r\n }",
"public String getFirstName(){\r\n return firstname;\r\n }",
"String getSurname();",
"public abstract String getFirstNameAndLastName(T itemVO);",
"public String getName(){\n\t\treturn this.firstName + \" \" + this.surname;\r\n\t}",
"public void getFirstName() {\n\n\t}",
"@Override\n public String getFullName() {\n return firstName + \" \" + lastName;\n }",
"public String getName() {\n return lastname + \", \" + firstname;\n }",
"public String getFullName()\n {\n return firstName + \" \" + lastName;\n }",
"String fullName();",
"public String getFirstName() {\n\t\t System.out.println(\"method getFirstName() called.\");\n\t\t return firstName;\n\t\t}",
"public String getFirstname() {\n return (String) get(\"firstname\");\n }",
"@Override\r\n\tpublic String getFistName() {\n\t\treturn first_name;\r\n\t}",
"public String firstName() { return firstName; }",
"java.lang.String getSurname();",
"@Override\n public String toString() {\n return \"Name: \" + firstName + \"\\n\" + \"Lastname: \" + lastName;\n \n }",
"public String getFirstName() \r\n {\r\n return firstName;\r\n }",
"private String getFirstName() {\n System.out.println(\"Enter Your Last Name Of First Letter In Capital \");\n return sc.next();\n }",
"public static String getFirstName() {\n String firstName = \"George\";\n String lastName = \"Washington\";\n return lastName;\n }",
"public String getFullName() {\n return getFirstName()+\" \"+getLastName();\n }",
"public String getFirst_name() {\n return first_name;\n }",
"String getLastName();",
"String getLastName();",
"public void updateFirstNameAndlastName() {\r\n\t\tprint(\"Update First name and last name\");\r\n\t\tDateFormat txt = new SimpleDateFormat(\"yyyyMMddHHmmss\");\r\n\t\tDate date = new Date();\r\n\t\tString fNamePostFix = \"Vivek\" + txt.format(date);\r\n\t\tString lNamePostFix = \"Sharma\" + txt.format(date);\r\n\t\tsendKeys(Locator.MyTrader.First_Name.value, fNamePostFix);\r\n\t\tsendKeys(Locator.MyTrader.Last_Name.value, lNamePostFix);\r\n\t}",
"public String getFirstName()\n {\n return firstName;\n }",
"public String getFirstName() { return firstName; }",
"public String getFirstName()\r\n {\r\n return firstName;\r\n }",
"private String fullName(){\n\t\tFullName=firstName+\" \"+lastName;\n\t\treturn (initial.toUpperCase()+\".\"+\" \"+firstName.toUpperCase()+\" \"+lastName.toUpperCase());\n\t}",
"public ArrayList<String> getFullName(){\n\t\tArrayList<String> fullName = new ArrayList<>(); \n\t\t\n\t\tfor(int i =0; i<firstName.size(); i++) {\n\t\t\tfullName.add(firstName.get(i) + \" \" + lastName.get(i)); \n\t\t}\n\t\t\n\t\treturn fullName; \t\t\n\t}",
"public String getFirstName()\r\n {\r\n return firstName;\r\n }",
"public String getFirstName()\r\n {\r\n return firstName;\r\n }",
"public String getFirstName()\r\n {\r\n return firstName;\r\n }",
"public String getFirstName()\r\n {\r\n return firstName;\r\n }",
"public String getFirstName(){\n return(this.firstName);\n }",
"public String getFirstName() {\n return fName;\n }",
"@AutoEscape\n\tpublic String getFirst_name();",
"public String getLastName();",
"public abstract String fullName();",
"public abstract String fullName();",
"@Override public String toString(){\n\t\treturn String.format(\"%s %s %s\", firstName, middleName, lastName);\n\t}",
"public String getFirstName(){\r\n\t\treturn firstName;\r\n\t}",
"String getFirstName( String key ) {\n return developer.firstName;\n }",
"@Override\n public final String toString() {\n return firstName + \" \" + lastName;\n\n }",
"public String getFirstName(){\n\t\treturn this.firstName;\r\n\t}",
"@AutoEscape\n\tpublic String getFirstName();",
"public java.lang.CharSequence getFirstName() {\n return first_name;\n }",
"public String returnFirstName() {\n\t\treturn this.registration_firstname.getAttribute(\"value\");\t\t\r\n\t}",
"public String getFirstName()\n {\n return this.firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFullname() {\n\t\treturn this.name + \" \" + this.surname;\n\t}",
"public String getFirstName()\n {\n return firstName;\n }",
"public String getFirstName()\n {\n return firstName;\n }",
"public String getFirstName(){\n\t\treturn firstName;\n\t}",
"public String getFirstName(){\n\t\treturn this.firstName;\n\t}",
"@Override\n public String toString() {\n return firstName + \"\\n\" + lastName + \"\\n\";\n }",
"public String getFullName() {\r\n StringBuffer buf = new StringBuffer();\r\n if (firstName != null) {\r\n buf.append(firstName);\r\n }\r\n if (buf.length()>0) {\r\n buf.append(\" \");\r\n }\r\n if (lastName != null) {\r\n buf.append(lastName);\r\n }\r\n return buf.toString();\r\n }",
"@PostMapping(\"get-by\")\n public Iterable<Generic> getUsersByName(\n @RequestParam(value = \"firstname\", required = false) String firstname,\n @RequestParam(value = \"lastname\", required = false) String lastname,\n @RequestParam(value = \"name\", required = false) String name\n ) {\n if (!StringUtils.isEmpty(firstname)) return genericService.getUsersByFirstname(firstname);\n if (!StringUtils.isEmpty(lastname)) return genericService.getUsersByLastname(lastname);\n if (!StringUtils.isEmpty(name)) return genericService.getUsersByName(name);\n return new ArrayList<>();\n }",
"public String getFirstName() {\n return firstNameField.getText();\n }",
"public String getFirstName() {\r\n return firstName;\r\n }",
"public String getFirstName() {\r\n return firstName;\r\n }",
"public String getFirstName() {\r\n return firstName;\r\n }",
"public String getFirstname() {\r\n\t\treturn firstname;\r\n\t}",
"public String getFirstName()\r\n\t{\r\n\t\treturn firstName.getModelObjectAsString();\r\n\t}",
"public java.lang.CharSequence getFirstName() {\n return first_name;\n }",
"public String returnLastName() {\n\t\treturn this.registration_lastname.getAttribute(\"value\");\r\n\t}",
"public void name(String first, String last) {\r\n String display = first + \" \" + last;\r\n textName.setText(display);\r\n }",
"public String getFirstName()\n\t{\n\t\t//local consants\n\n\t\t//local variables\n\n\t\t/*******************************************************************************/\n\n\t\t//Return the firstName.\n\t\treturn firstName;\n\n\t}",
"public String getFullName() {\n return this.firstName + \" \" + this.lastName;\n }",
"public static String retrieveFirstNameLastNameModifiedInMemberProfile(WebDriver driver, String memEmail, String FirstName,String LastName) throws ClassNotFoundException, SQLException\n\t{\n\t\tString port = Directory.Oracle_Port;\n\t\tString database_name= Directory.Oracle_Databasename;\n\t\tString user = Directory.Oracle_User;\n\t\tString pass = Directory.Oracle_Pass;\n\t\tString hostname =Directory.Oracle_Hostname;\n\t\tString url =\"jdbc:oracle:thin:@\"+hostname+\":\"+port+\":\"+database_name+\"\";\n\t\tClass.forName(\"oracle.jdbc.driver.OracleDriver\");\n\t\tConnection conn = DriverManager.getConnection(url,user,pass);\n\t\tSystem.out.println(\"connection success\");\n\t\tStatement stat=conn.createStatement();\n\t\tResultSet rs = stat.executeQuery(\"select FIRST_NAME, LAST_NAME, EMAIL from account where Email like '\"+memEmail+\"'\");\n\t\tSystem.out.println(\"query executed\");\n\t\tString email=\"\";\n\t\tString FName=\"\";\n\t\tString LName=\"\";\n\t\tif(rs.next())\n\t\t{\n\t\t\temail= rs.getString(\"EMAIL\");\n\t\t\tFName= rs.getString(\"FIRST_NAME\");\n\t\t\tLName= rs.getString(\"LAST_NAME\");\n\t\t\tif(memEmail.equalsIgnoreCase(email)&&FirstName.equalsIgnoreCase(FName)&&LastName.equalsIgnoreCase(LName))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"FirstName, LastName and Email match eachother\");\n\t\t\t}\n\t\t\telse if(!memEmail.equalsIgnoreCase(email)&&!FirstName.equalsIgnoreCase(FName)&&!LastName.equalsIgnoreCase(LName))\n\t\t\t{\n\t\t\t\tAssert.fail();\n\t\t\t}\n\t\t}\n\t\treturn email;\n\t}",
"public String getLastName(){\r\n return lastname;\r\n }",
"public String getFullName(String firstName, String lastName) {\n return firstName + \" \" + lastName;\n }",
"public String getFirstName()\r\n\t{\r\n\t\treturn firstName;\r\n\t}",
"public String getFirstName() {\n return this.firstName;\n }",
"public String getFirstName() {\n return this.firstName;\n }",
"@Override\n protected Map<String, String> getParams()\n {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"fullname\", fullName);\n\n\n\n\n return params;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }",
"public String getFirstName() {\n return firstName;\n }"
]
| [
"0.7466971",
"0.7466971",
"0.7239312",
"0.7239312",
"0.7239312",
"0.71813595",
"0.71587336",
"0.7069017",
"0.68785757",
"0.67908597",
"0.6772801",
"0.67594117",
"0.6747502",
"0.67332906",
"0.67240316",
"0.67186606",
"0.66937506",
"0.6677721",
"0.6664307",
"0.6660033",
"0.6658852",
"0.665872",
"0.66382605",
"0.6627032",
"0.66223454",
"0.6618884",
"0.65799975",
"0.6553608",
"0.6552282",
"0.654929",
"0.654929",
"0.65454596",
"0.6538605",
"0.6534078",
"0.65295756",
"0.6513826",
"0.6511034",
"0.65006596",
"0.6498662",
"0.6498662",
"0.6498662",
"0.64761144",
"0.64731395",
"0.6468736",
"0.6464932",
"0.6464776",
"0.6464776",
"0.6455893",
"0.6447334",
"0.6447034",
"0.6443758",
"0.6437723",
"0.6433366",
"0.6427003",
"0.6422767",
"0.64133435",
"0.64042974",
"0.64042974",
"0.639538",
"0.63900435",
"0.63900435",
"0.63700813",
"0.6356825",
"0.6354156",
"0.63510346",
"0.63480777",
"0.63476074",
"0.63439906",
"0.63439906",
"0.63439906",
"0.63370955",
"0.63341224",
"0.63323504",
"0.63303024",
"0.632297",
"0.6305101",
"0.6304515",
"0.6295387",
"0.6291544",
"0.6290535",
"0.62652117",
"0.6261543",
"0.6261543",
"0.6256926",
"0.6255634",
"0.6255634",
"0.6255634",
"0.6255634",
"0.6255634",
"0.6255634",
"0.6255634",
"0.6255634",
"0.6255634",
"0.6255634",
"0.6255634",
"0.6255634",
"0.6255634",
"0.6255634",
"0.6255634",
"0.6255634",
"0.6255634"
]
| 0.0 | -1 |
Define an interface that positive button listeners must implement | public interface ChangePasswordListener {
// Positive button listener onClick
void onDialogPositiveClick(ChangePasswordFragment dialog);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface DialogListener {\r\n public void handleYesButton();\r\n}",
"public interface PromptButtonListener {\n void onClick(PromptButton button);\n}",
"public interface PromptButtonListener {\n void onClick(PromptButton button);\n}",
"public interface CallbacksListener\n {\n public void onPositiveButtonClicked();\n\n public void onNegativeButtonClicked();\n }",
"public interface ButtonListener {\n void add();\n}",
"public interface DialogClick {\n void doPositiveClick();\n void doNegativeClick();\n}",
"public interface DialogButtonListener {\n\n void buttonClicked(String buttonText);\n\n}",
"public interface YesNoDialogConfirmation {\n\n public void onYesClicked(int pos,String type);\n}",
"public interface EventosCaixaDialogo {\n\n void onClickPositivo();\n\n void onClickNegativo();\n\n}",
"public interface Callback{\n //Required public empty constructor\n public void buttonClicked();\n }",
"public interface OnClickListenerJudge {\n public boolean judgeSetOnClickListener();\n}",
"void enablButtonListener();",
"public interface ThankYouLayoutListener {\n\n void onFacebookBtnClick();\n\n void onTwitterBtnClick();\n\n void onThankYouActionClick();\n\n void onShouldShowSimpleDialog();\n\n void onDismissClick();\n}",
"public interface OnButtonPressListener {\n void onButtonPress(Message message);\n }",
"public interface OnOkClickListener {\n\tvoid onOkClicked(View clickedView);\n}",
"public interface OnButtonClickedListener {\n public void onButtonClicked(View v);\n }",
"public interface customButtonListener {\n public void onNavigateButtonClickListener(int position,String value);\n\n public void onFeedbackButtonClickListener(int position,String value);\n }",
"private interface ClickCounterState extends ActionListener {\r\n }",
"public interface DialogFragmentTwoButtonListener {\r\n public abstract void onBtnPositiveClick(DialogFragment dialogFragment);\r\n\r\n public abstract void onBtnNegativeClick(DialogFragment dialogFragment);\r\n}",
"public interface OnClick{\n void action();\n }",
"public interface OnClickPovratak {\n public void onClickedPovratak();\n }",
"public interface ClickListener {\n\n public void Onclick(int pos);\n}",
"abstract public boolean onPositiveClicked(String userInput);",
"public interface DialogClickListener {\n\n void onAlertPositiveClicked(int tag);\n\n void onAlertNegativeClicked(int tag);\n}",
"public interface IButtonClickProvider {\n public void onBtnClick();\n}",
"public interface ClickEventListener {\n public void click();\n\n}",
"public interface OnClickAdaptadorDeNoticia{\n public void onClickPosition(int pos);\n }",
"public interface C0260a {\n boolean onClick();\n }",
"public interface NumberBtnInterface {\n\n void onNumberSelected(int selectedNumber);\n\n}",
"public abstract void buttonPressed();",
"public interface ToastClick {\r\n void btnclick(int pos);\r\n}",
"public interface OnDialogListener {\n void onPositiveListener();\n void onNegativeListener();\n }",
"public interface ClickListener {\n void onPositionClicked(int position);\n}",
"public interface OnClickAdaptadorDependencia {\n public void onClickPosition(int pos);\n }",
"public interface Button {\n void display();\n}",
"protected abstract boolean onOkClicked();",
"void buttonPressed(ButtonType type);",
"public interface Listener{\n void onQuestionClicked(Question question);\n }",
"public interface ClickGenerator {\r\n /**\r\n * adds listeners that listens for clickEvents\r\n * @param listener \r\n */\r\n public void addListener(ClickListener listener);\r\n}",
"protected abstract void pressedOKButton( );",
"public interface customButtonListener {\n void onCommentButtonClickListener(int position);\n\n void onLikeButtonClickListener(int position);\n }",
"public interface MenuDelegate {\n\t\n\tpublic abstract void didPressBackButton();\n\tpublic abstract void didPressLoadButton();\n\tpublic abstract void didPressSaveButton();\n\tpublic abstract void didPressReturnMain();\n\t\n}",
"public interface IGUIEvent {\n\n\n /**\n * Returns the source of the event.\n * \n * @return the source.\n */\n public abstract Object getSource();\n\n\n /**\n * Consumes the event.\n */\n public abstract void consume();\n\n\n /**\n * Returns whether this event has been consumed.\n * \n * @return <CODE>true</CODE> if the event has been consumed;\n * <CODE>false</CODE> otherwise.\n */\n public abstract boolean isConsumed();\n}",
"public interface AddAccountFragmentButtonListener {\r\n\t/**\r\n\t * Submit Account info to presenter.\r\n\t * @param accountName account name (unique)\r\n\t * @param accountDescription account description\r\n\t * @param currency currency (ex> Locale.US)\r\n\t */\r\n void submit(String accountName, String accountDescription, String currency);\r\n /**\r\n * Cancel adding account.\r\n */\r\n void cancel();\r\n}",
"public interface EventPressMenu {\r\n public void OnClickMenu(String name);\r\n}",
"public interface Listener extends Serializable {\n void onClose(CheckboxConfirmDialog dialog);\n }",
"public interface NotifyItemClicked {\r\n\r\n public void onUsernameCLicked(int position);\r\n public void onNotifyCLicked(int position);\r\n public void onDeleteCLicked(int position);\r\n}",
"public interface DialogListener {\n void onOk();\n void onCancel();\n}",
"public interface ButtonInterface {\n public void buttonClicked(View v);\n public void onBookClick(String _ourBeginDate, String _ourEndDate);\n}",
"public interface CurrentlyReadingClickListener {\n public void itemClicked(View view, int position);\n public void onReturn(View deleteView, int position);\n}",
"public interface OnClickCallBack\n{\n public void onUIupdate();\n}",
"public interface UIAction {\n}",
"public interface CustomDialogListener {\n\n void onFirstOptionClicked();\n\n void onSecondOptionClicked();\n}",
"public interface CustomDialogCallBack {\n\n void positiveCallBack(Dialog dialog);\n\n void negativeCallBack(Dialog dialog);\n}",
"public interface OnPopUpFollowingListener {\n\n void onActionStart(long merchantId);\n}",
"public interface IOnOffClick {\n public void onOffClick(View view, int pos, boolean isOn);\n}",
"public interface click {\n\n void clickme(View view);\n}",
"public abstract boolean onButtonClick(Player player, int button);",
"public interface ConfirmCallback {\r\n\r\n /**\r\n * This event is triggered when the OK button is pressed.\r\n */\r\n void ok();\r\n\r\n /**\r\n * This event is triggered when the CANCEL button is pressed.\r\n */\r\n void cancel();\r\n }",
"public interface PendingClickListener {\n\n void clickedID(long id);\n\n}",
"@Override\n\t\tpublic void buttonStatusChange() {\n\t\t\t\n\t\t}",
"public interface OnImpresionConfirmadaListener {\n\tpublic void onImpresionConfirmada();\n}",
"public interface MyOnClickListener {\n void onClick(int position);\n}",
"public interface OnEasyProgressClickListener {\n void onLoadingViewClick();\n\n void onEmptyViewClick();\n\n void onErrorViewClick();\n}",
"interface ClickListener {\n void onClick(View view, int position);\n\n}",
"public interface EventListener {\n public void click1(View v);\n public void click2(View v);\n public void cilck3(String s);\n}",
"public interface CustomVaDialogListener extends Serializable {\n void onOkClicked(String input);\n\n void onCancelClicked();\n}",
"public interface Buttons {\n\n\t/**\n\t * \n\t * @param btnText - the text that will be shown when looking at the button\n\t * @param tooltip - the text that will be shown when the user is mouseover the\n\t * button\n\t * @return Button - with the text btnText and a tooltip of tooltip, the rest of\n\t * the button is very basic\n\t */\n\tpublic default Button buttons(String btnText, String tooltip) {\n\t\tButton btn = new Button(btnText);\n\t\tTooltip btnTooltip = new Tooltip(tooltip);\n\t\tbtn.setTooltip(btnTooltip);\n\t\tbtn.setMinWidth(MinWidth());\n\t\tbtn.setPrefWidth(50.0);\n\t\tbtn.setMaxWidth(50.0);\n\t\tbtn.setFont(Font.font(\"Verdana\", 20));\n\t\tEventHandler<ActionEvent> buttonHandler = new EventHandler<ActionEvent>() {\n\t\t\t@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\tactionButton(btnText);\n\t\t\t\tevent.consume();\n\t\t\t}\n\n\t\t};\n\t\tbtn.setOnAction(buttonHandler);\n\t\treturn btn;\n\n\t}\n\n\t/**\n\t * all the action that will happen when the button is pressed will be defined\n\t * here\n\t * \n\t * @param text - that is on the button. \n\t */\n\tpublic void actionButton(String text);\n\n\tpublic default double MinWidth() {\n\t\treturn 50.0;\n\t}\n}",
"public interface DialogInterface {\n void setTitleContent();\n\n void setContainer();\n\n void OnClickListenEvent(View v);\n}",
"public interface IClickable {\n void onClick();\n}",
"public interface OnItemClickedListener {\n\n\tvoid onItemClicked(Integer itemId);\n}",
"void configureButtonListener();",
"public interface IProductClick {\n\n /*Creo una interfaz para el clic asi es mas facil llamarla en cualquier punto*/\n\n void clickProduct(View v);\n}",
"public interface ButtonClickCallback {\n void onOk();\n\n void onCancel();\n\n ButtonClickCallback NULL = new ButtonClickCallback() {\n @Override\n public void onOk() {\n\n }\n\n @Override\n public void onCancel() {\n\n }\n };\n}",
"public interface Callback {\n public void click();\n }",
"public interface OnBaseUIListener {\n}",
"public interface GoldenCookieClickListener {\n void onGoldenCookieClick(GoldenCookieClickEvent e);\n}",
"public static interface Listener {\n public void onClick(String letter);\n }",
"public interface OnPlayClick {\n\n void onPlay(int position);\n}",
"public interface QueueImageClickListener {\n /**\n * Called when thumbnail is clicked\n * @param pos Position of {@link com.python.pythonator.structures.queue.ImageQueueItem} which thumbnail was clicked\n */\n void onThumbnailClick(int pos);\n\n /**\n * Called when sendbutton is clicked\n * @param pos Position of {@link com.python.pythonator.structures.queue.ImageQueueItem} which sendbutton was clicked\n */\n void onSendClicked(int pos);\n}",
"public interface CalenderTitleOnClickListener {\n\n void OnPreClick();\n void OnNextClick();\n}",
"public interface OkCancelCallback {\n\n void onOkClicked();\n\n void onCancelClicked();\n\n}",
"public interface ViewListener {\n\n void onClickOk(LoginWarningDialog dialog);\n }",
"public interface EButton extends EButtonBase {\r\n}",
"public interface ChoosableEvent extends Event{\n\n void chooseAnswer(String answer, String username);\n}",
"public interface VoidReasonDialogListener {\n void onDialogPositiveClick(VoidReasonDialogFragment dialog);\n }",
"public MyButtonListener(){\n super();\n }",
"public interface OnClickListener{\n\t\tabstract boolean onClick(Polyline polyline, MapView mapView, GeoPoint eventPos);\n\t}",
"public interface OnNotificationActionListener {\n\n /**\n * item click\n *\n * @param notificationInfo notificationInfo\n * @param position position\n */\n void onItemClick(NotificationInfo notificationInfo, int position);\n\n /**\n * item click\n *\n * @param notificationInfo notificationInfo\n * @param selected selected\n */\n void onItemLongClick(NotificationInfo notificationInfo, boolean selected);\n\n}",
"public interface StudentClickListner {\n public void onitemclick(student v,int position);\n public void onitemupdate(student v,int position);\n\n}",
"public interface OnNoteListener {\n public void onClick(View v , int position);\n}",
"public interface ClickListener {\n public void onClickListener(ArrayList<StepsRecipe> steps);\n}",
"public interface OnCreateGroupClickListener {\n void onCreateGroupClicked();\n}",
"public interface Listener {\n void onClose(ConfirmDialog dialog);\n }",
"public interface ILabelPress extends IBasePress {\n\n void getLabelList();\n\n void evaluation();\n}",
"protected abstract boolean up(int button);",
"public interface InputEventListener {\n /**\n * this method is called, when some button is pressed or released\n *\n * @param view on which the user is pressing the button\n * @param buttons Bit-Encoded buttons\n */\n void onInputEvent(View view, int buttons);\n }",
"public interface OnCrosheMenuClick {\n void onClick(CrosheMenuItem item, View view);\n}",
"public interface ItemClickListener {\n// void onShareClick(T item);\n// void onDownloadClick(T item);\n void onChannelTitleClick(Item item);\n void onPlayClick(Item item);\n}",
"public void clickYes ();",
"public interface UpdateAddAccountFragmentButtonListener {\r\n\t/**\r\n\t * Update Listener.\r\n\t * @param mAddAccountFragmentButtonListener Button Listener Interface for AddAccountFragment\r\n\t */\r\n void updateAddAccountFragmentButtonListener(AddAccountFragmentButtonListener mAddAccountFragmentButtonListener);\r\n}"
]
| [
"0.75698644",
"0.7567086",
"0.7567086",
"0.7449133",
"0.7426525",
"0.7334629",
"0.7265905",
"0.7258738",
"0.7155342",
"0.71370524",
"0.71306765",
"0.7081347",
"0.7075818",
"0.7036765",
"0.70239925",
"0.6991788",
"0.6986414",
"0.6951077",
"0.6945641",
"0.69411933",
"0.6941191",
"0.693657",
"0.6936494",
"0.69205844",
"0.6916484",
"0.6839025",
"0.68317497",
"0.6825275",
"0.6822163",
"0.6761097",
"0.6748488",
"0.673654",
"0.6696526",
"0.6690285",
"0.6672337",
"0.6667744",
"0.6664146",
"0.66469765",
"0.6641692",
"0.6640102",
"0.6631857",
"0.6626339",
"0.66241324",
"0.66202176",
"0.65971094",
"0.65881306",
"0.65667725",
"0.65522057",
"0.6541393",
"0.65373445",
"0.6527857",
"0.6524995",
"0.6521207",
"0.65089846",
"0.65050125",
"0.64857817",
"0.64768654",
"0.64763933",
"0.6469681",
"0.64529455",
"0.6446734",
"0.6443787",
"0.64407873",
"0.6427923",
"0.6425022",
"0.6418391",
"0.6418179",
"0.64131755",
"0.6412371",
"0.64105195",
"0.64083624",
"0.6397659",
"0.6392686",
"0.63919353",
"0.63881075",
"0.63864625",
"0.6385831",
"0.63832986",
"0.63811934",
"0.6380317",
"0.63737524",
"0.6368913",
"0.63609797",
"0.6350158",
"0.6348674",
"0.6346656",
"0.6338454",
"0.6328237",
"0.63227224",
"0.6321276",
"0.6318864",
"0.6318449",
"0.629648",
"0.62908024",
"0.6286799",
"0.6281349",
"0.62782586",
"0.62776566",
"0.62754154",
"0.6275402",
"0.62677586"
]
| 0.0 | -1 |
Positive button listener onClick | void onDialogPositiveClick(ChangePasswordFragment dialog); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tpositiveButtonClickListener.onClick(dialog, DialogInterface.BUTTON_POSITIVE);\n\t\t\t\t\t\n\t\t\t\t\tif(dialog != null)\tdialog.dismiss();\n\t\t\t\t}",
"public void clickYes ();",
"abstract public boolean onPositiveClicked(String userInput);",
"public void doPositiveClick() {\n // Do stuff here.\n Log.i(\"FragmentAlertDialog\", \"Positive click!\");\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 }",
"protected boolean hasPositiveButton() {\n return false;\n }",
"void okButtonClicked();",
"public void doPositiveClick() {\n\n Note_database db = new Note_database(calendar_main.this);\n\n Event_SQLite event = new Event_SQLite(title, date2, time2);\n\n db.add_row_event_2(event);\n\n finish();\n\n Log.i(\"FragmentAlertDialog\", \"Positive click!\");\n }",
"@Override\n \t\t\t\tpublic void onClick(View v) {\n \t\t\t\t\tnegativeButtonClickListener.onClick(dialog, DialogInterface.BUTTON_NEGATIVE);\n \t\t\t\t}",
"@Override\n \t\t\t\tpublic void onClick(View v) {\n \t\t\t\t\tnegativeButtonClickListener.onClick(dialog, DialogInterface.BUTTON_NEGATIVE);\n \t\t\t\t}",
"protected abstract boolean onOkClicked();",
"@Override\n public void onPositiveClick() {\n quitThisActivity();\n }",
"@Override\n\t\t\t\tpublic void onClick(DialogInterface dialog, int button) {\n\t\t\t\t}",
"@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int button) {\n\t\t\t}",
"@Override\n\tpublic void onClick(DialogInterface arg0, int arg1) {\n\t\tif (arg1 == DialogInterface.BUTTON_POSITIVE) {\n\t\t\tonDialogPositiveClick((DialogFragment) arg0);\n\t\t} else {\n\t\t\tonDialogNegativeClick((DialogFragment) arg0);\n\t\t}\n\n\t}",
"public void doPositiveClick() {\n\t\t//Shows message that contact added to database. \n\t\tToast.makeText(this, \"Контакт сохранен\", Toast.LENGTH_SHORT).show();\n\t\taddRecord();\n\t}",
"public void onClick(DialogInterface arg0, int arg1) {\n // the button was clicked\n Toast.makeText(getApplicationContext(), \"Professional backhand-Male Video\", Toast.LENGTH_LONG).show();\n }",
"protected abstract void pressedOKButton( );",
"public void buttonClicked();",
"public void OnOkClick()\r\n {\r\n\r\n }",
"@Override\n public void onClick(View v) {\n new AlertDialog.Builder(MainActivity.this)\n .setIcon(android.R.drawable.ic_menu_save)\n .setTitle(\"End Evidence Collection\")\n .setMessage(\"Are you sure you want to end collecting evidence?\")\n .setPositiveButton(\"Yes\", new DialogInterface.OnClickListener()\n {\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n\n submit();\n\n }\n\n })\n .setNegativeButton(\"No\", null)\n .show();\n\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 = 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}",
"@Override\r\n\t\t\t\t\t\t\t\tpublic void setPositiveButton() {\n\t\t\t\t\t\t\t\t\tif (SystemConfig.loginResponse.getDutyFlag().equals(\"on\")) {\r\n\t\t\t\t\t\t\t\t\t\tsendForService(\"1\", str);\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\thandler.sendEmptyMessage(ConstantValue.PROGRESS_CLOSE);\r\n\t\t\t\t\t\t\t\t\t\tMessage message = Message.obtain();\r\n\t\t\t\t\t\t\t\t\t\tmessage.obj = \"下班状态不可以改派任务!\";\r\n\t\t\t\t\t\t\t\t\t\tmessage.what = ConstantValue.ERROE;\r\n\t\t\t\t\t\t\t\t\t\thandler.sendMessage(message);\r\n\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t// for update by haoyun\r\n\t\t\t\t\t\t\t\t\t// 20130401 end\r\n\t\t\t\t\t\t\t\t}",
"@Override\n public void onClick(View v) {\n builder.setMessage(R.string.alertMessage)\n .setCancelable(false)\n .setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n //buClick();\n //finish();\n dialog.cancel();\n calculat();\n\n }\n })\n .setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // Action for 'NO' Button\n dialog.cancel();\n\n }\n });\n //Creating dialog box\n AlertDialog alert = builder.create();\n //Setting the title manually\n alert.setTitle(R.string.alertTitle);\n alert.show();\n }",
"@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tToast.makeText(getApplicationContext(), \"Button 1\", Toast.LENGTH_SHORT).show();\n\t\t\t}",
"public void submit_intsatpos(View button) {\n }",
"@Override\n public void onClick(View v) {\n Button b = (Button) v;\n if (b.getId() == R.id.buttonOk){\n calculate();\n dismiss();\n }\n else{\n dismiss();\n }\n\n }",
"public void ClickFunction(){\n System.out.println(\"Click Function\");\n alertButton.setText(\"Cancel\");\n\n// click = !click;\n// if(click) {\n// SendTextMessage stm = new SendTextMessage();\n// stm.sendMessage(getActivity(), false);\n//\n// alertButton.setText(\"Cancel\");\n// makeSound_shake ();\n//\n// //Toast.makeText( getActivity(),\"Alert!\", Toast.LENGTH_SHORT).show();\n// }\n// else{\n// SendTextMessage stm = new SendTextMessage();\n// stm.sendMessage(getActivity(), true);\n// }\n\n }",
"public void buttonClicked() {\n mSanitizorGame.buttonClicked();\n }",
"@Override\n\t\t\tpublic void onClick(DialogInterface arg0, int arg1) {\n\t\t\t\t\n\t\t\t}",
"@Override\n public void onClick() {\n System.out.println(\"Button has been JUST clicked\");\n }",
"@Override\r\n\t\t\t\t\tpublic void onClick(DialogInterface arg0, int arg1) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}",
"@Override\r\n\t\t\t\t\tpublic void onClick(DialogInterface arg0, int arg1) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}",
"@Override\r\n\t\t\t\t\tpublic void onClick(DialogInterface arg0, int arg1) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}",
"@Override\r\n\t\t\t\t\tpublic void onClick(DialogInterface arg0, int arg1) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}",
"@Override\r\n\t\t\t\t\tpublic void onClick(DialogInterface arg0, int arg1) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}",
"public void onYesButtonClicked() {\n changeAfterClientPick();\n }",
"@Override\n\t\t\t\tpublic void onClick(DialogInterface arg0, int arg1) {\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\n public void onClick(View v) {\n if(((RelapseProcessActivity)getActivity()).canProceed == true) {\n goToEmergencyGoneStep();\n }\n }",
"@Override\r\n\t\t\t\t\t\t\tpublic void onClick(DialogInterface arg0, int arg1) {\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}",
"@Override\n\tpublic boolean onClick(Player player, int buttonID) {\n\t\treturn false;\n\t}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tClickOK();\n\t\t\t\tCursurIndex = 3;\n\t\t\t\tHandleCursurDisplay.sendMessage(HandleCursurDisplay.obtainMessage(CursurIndex));\n\t\t\t}",
"@Override\n\t\t\t\t\t\t\tpublic void onClick(DialogInterface arg0, int arg1) {\n\t\t\t\t\t\t\t}",
"public void onClick(View v) {\n System.out.println(\"Click on Listener: \" + click);\n if(!click) {\n click = !click;\n MainActivity.updateAlert(click);\n alertButton.setText(\"Cancel\");\n Toast.makeText( getActivity(),\"Alert!\", Toast.LENGTH_SHORT).show();\n activity = \"Button\";\n makeSound ();\n SendTextMessage stm = new SendTextMessage();\n stm.sendMessage(getActivity(), false);\n }\n else{\n showAuthenticationScreen();\n SendTextMessage stm = new SendTextMessage();\n stm.sendMessage(getActivity(), true);\n }\n\n\n\n }",
"public void onButtonAPressed();",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\ttotalLayout.setBackgroundColor(getResources().getColor(R.color.red));\n\t\t\t\tconfirmButton.setEnabled(false);\n\t\t\t\tconfirmRequest1();\n\t\t\t}",
"@Override\n public void onClick(View v) {\n buttonCancelClicked();\n }",
"public void clickOnYesButton() {\r\n\t\tsafeJavaScriptClick(manageVehiclesSideBar.replace(\"Manage Vehicles\", \"Yes\"));\r\n\t}",
"@Override\r\n\tpublic void actionPerformed(GuiButton button) {\r\n switch (button.id) {\r\n case 0:\r\n GuiYesNo confirmGui = new GuiYesNo(this, \"Delete Waypoints\", \"Are you sure you want to delete the selected waypoints?\", \"Yes\", \"No\", 0);\r\n confirmGui.setButtonDelay(5);\r\n this.mc.displayGuiScreen(confirmGui);\r\n break;\r\n }\r\n\t}",
"@Override\r\n\tpublic void onClick() {\n\t\tif(bSendStatus)\r\n\t\t\tnativeadstatus(E_ONCLICK);\r\n\t}",
"void onOkButtonPressed();",
"@Override\n public void actionPerformed(ActionEvent e) {\n JOptionPane.showConfirmDialog(OverCounterForm.this, \"Check this\");\n }",
"@Override\n public void onClick(View v) {\n if (v == okButton)\n dismiss();\n }",
"@Override\r\n\t\t\tpublic void onClick(DialogInterface arg0, int arg1)\r\n\t\t\t{\n\t\t\t}",
"@Override\n public void onClick(DialogInterface arg0, int arg1) {\n }",
"@Override\n public void onClick(DialogInterface arg0, int arg1) {\n }",
"@Override\n\t public void onClick(View v) {\n\t \t SendReqToPebble();\n\t }",
"@Override\n protected void negativeClick() {\n\n }",
"@Override\n public void onClick(DialogInterface arg0, int arg1) {\n }",
"@Override\n\t public void onClick(View v) {\n\t \teditor.putInt(\"buttonLabel\", 4);\n\t \t\teditor.commit();\n\t \tif(powerSwitch.isChecked() && nCurrentSpeed > drivingSpeed){\n\t \t\twarning();\n\t \t}\n\t \telse\n\t \t\tlaunchContact();\n\t }",
"public void actionPerformed (ActionEvent e)\n\t\t\t\t{\n\t\t\t\talertOK();\n\t\t\t\t}",
"@Override\n public void onDialogPositiveClick(DialogFragment dialog) {\n // User touched the dialog's positive button\n Toast.makeText(this, \"OK\", Toast.LENGTH_LONG).show();\n\n }",
"@Override\n public void onClick(View v) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n doClickOnButtonOk();\n }\n });\n }",
"@Override\n public void onClick(DialogInterface arg0, int arg1) {\n }",
"public abstract boolean onButtonClick(Player player, int button);",
"@Override\n\t public void onClick(DialogInterface arg0, int arg1) {\n\t \n\t }",
"@Override\n public void onClick(View v) {\n\n\n Toast.makeText(MainSOSActivity.this, \"Stay Safe and Confirm the Message!\", Toast.LENGTH_SHORT).show();\n\n }",
"@Override\n public void onClick(View v) {\n if (one.isChecked()){\n scoreCounter += 1 ;\n }\n buttonSubmit ();\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tcheckAnswer(true);\n\t\t\t\t\n\t\t\t}",
"@Override\r\n \t\t\t\t\tpublic void onClick(DialogInterface dialog, int whichButton) {\n \t\t\t\t\t}",
"public void onClick(View v) {\r\n \t if (v == okButton)\r\n \t dismiss();\r\n \t }",
"public void onClick(View v) {\n\t\tswitch (v.getId()) {\r\n\t\tcase R.id.regist_sure: // 确认\r\n\t\t\tsubmit();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}",
"@Override\n public void onPositiveClick() {\n AbDialogUtil.removeDialog(ApplyAcitivity.this);\n quitThisActivity();\n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n JOptionPane.showConfirmDialog(OverCounterForm.this, \"Check this out\");\n }",
"@Override\r\n public void onClick(final DialogInterface dialog, final int whichButton) {\r\n }",
"@Override\n\t\t\t public void onClick(DialogInterface arg0, int arg1) {\n\t\t\t \n\n\t\t\t\t\t\t\t\n\n\n\t\t\t \n\t\t\t }",
"public void onClick(DialogInterface dialog, int whichButton) {\n\n //Do Nothing\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tCursurIndex = 3;\n\t\t\t\tHandleCursurDisplay.sendMessage(HandleCursurDisplay.obtainMessage(CursurIndex));\n\t\t\t\tClickOK();\n\t\t\t}",
"public void onClicked();",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n Toast.makeText(getActivity(), \"clicked okay\", Toast.LENGTH_SHORT).show();\n }",
"@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\thandler.sendEmptyMessage(0);\r\n\t\t\t\t\r\n\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tCursurIndex = 5;\n\t\t\t\tHandleCursurDisplay.sendMessage(HandleCursurDisplay.obtainMessage(CursurIndex));\n\t\t\t\tClickOK();\n\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tmButtonListener.onButtonListener();\n\t\t\t}",
"public void onClick(DialogInterface arg0, int arg1) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n public void onDialogPositiveClick(DialogFragment dialog) {\n // User touched the dialog's positive button\n Log.d(LOG_TAG, \"onDialogPositiveClick() called\");\n endShift();\n }",
"public void proceedOnPopUp() {\n Controllers.button.click(proceedToCheckOutPopUp);\n }",
"@Override\n public void onClick(View v) {\n dialog_action();\n }",
"@Override \r\n\t public void onClick(DialogInterface dialog, int which) {\n\t }",
"void onClick();",
"@Override\n public void onSureClick(String value) {\n tenPayPopWindow.dismiss();\n checkPresenterImpl.addTenPayPayment(cashierResult.bill.unpaid, value);\n }",
"@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t}",
"@Override\n public void onClick(View v) {\n buttonPressed = 0;\n switch (v.getId()) {\n case R.id.button01:\n buttonPressed = 1;\n break;\n\n case R.id.button02:\n buttonPressed = 2;\n break;\n }\n launchTask();\n }",
"@Override\n public void onButtonClick(View view) {\n successDialog.dismiss();\n }",
"@Override\n public void onClick(View v) {\n AbDialogUtil.showAlertDialog(ApplyAcitivity.this, 0, \"温馨提示\", \"确认要取消报名吗?取消后报名信息将不保存。\",\n new AbAlertDialogFragment.AbDialogOnClickListener() {\n\n @Override\n public void onPositiveClick() {\n // TODO Auto-generated method stub\n quitThisActivity();\n }\n\n @Override\n public void onNegativeClick() {\n // TODO Auto-generated method stub\n AbDialogUtil.removeDialog(ApplyAcitivity.this);\n }\n });\n }",
"public void onClick(View v) {\n\n\t\tif (v.getId() == R.id.button1) {\n\n\t\t\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n\t\t\tbuilder.setMessage(\"Are you sure you want to save\")\n\t\t\t\t\t.setCancelable(false)\n\t\t\t\t\t.setPositiveButton(\"Yes\",\n\t\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\t\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\n\t\t\t\t\t\t\t\t\t\tint id) {\n\n\t\t\t\t\t\t\t\t\tdatabase.open();\n\t\t\t\t\t\t\t\t\tif(check)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tdatabase.UpdateSkuData(getMid(),\n\t\t\t\t\t\t\t\t\t\t\t\tstore_id, stockdata);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\tdatabase.InsertAssetData(getMid(),\n\t\t\t\t\t\t\t\t\t\t\tstore_id, stockdata);\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\tIntent DailyEntryMenu= new Intent(SkuDisplay.this,DailyentryMenuActivity.class);\n\t\t\t\t\t\t\t\t\tstartActivity(DailyEntryMenu);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\t\t\t\t\t.setNegativeButton(\"No\",\n\t\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\t\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\n\t\t\t\t\t\t\t\t\t\tint id) {\n\t\t\t\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\tAlertDialog alert = builder.create();\n\n\t\t\talert.show();\n\n\t\t}\n\n\t}",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n }",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n }",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n }"
]
| [
"0.7590884",
"0.7536193",
"0.74646556",
"0.74395835",
"0.7434436",
"0.7416193",
"0.735176",
"0.727986",
"0.7166165",
"0.7166165",
"0.71564215",
"0.71242225",
"0.7123972",
"0.7115549",
"0.71098274",
"0.70987386",
"0.70794",
"0.702757",
"0.69980645",
"0.6979715",
"0.6967779",
"0.6959759",
"0.6950681",
"0.69363284",
"0.69103014",
"0.69006693",
"0.6896596",
"0.689508",
"0.68899935",
"0.6884302",
"0.68823624",
"0.6874727",
"0.6874727",
"0.6874727",
"0.6874727",
"0.6874727",
"0.68736964",
"0.68681264",
"0.6837969",
"0.6834971",
"0.6829776",
"0.6823112",
"0.68097717",
"0.6798901",
"0.6797525",
"0.6786796",
"0.67848027",
"0.67770195",
"0.677444",
"0.6774241",
"0.67704844",
"0.67686975",
"0.67540115",
"0.6752528",
"0.67512554",
"0.67512554",
"0.67443764",
"0.6743652",
"0.67417103",
"0.6737851",
"0.67351437",
"0.6716249",
"0.6702575",
"0.6701558",
"0.66905403",
"0.6686379",
"0.66723347",
"0.66716766",
"0.66714615",
"0.66590804",
"0.6658833",
"0.6653808",
"0.6650786",
"0.66464216",
"0.6644139",
"0.6643459",
"0.663426",
"0.6632658",
"0.66312134",
"0.6628352",
"0.66201013",
"0.661435",
"0.6613681",
"0.6611783",
"0.66096956",
"0.66068393",
"0.6606072",
"0.66055053",
"0.65953267",
"0.6592668",
"0.65899765",
"0.65899765",
"0.65899765",
"0.6589361",
"0.6588107",
"0.65863895",
"0.6575889",
"0.6572735",
"0.65705216",
"0.65705216",
"0.65705216"
]
| 0.0 | -1 |
Create a dialog builder and layout inflater, and inflate the view | @Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
LayoutInflater inflater = getActivity().getLayoutInflater();
View view = inflater.inflate(R.layout.dialog_change_password, null);
curPass = (EditText) view.findViewById(R.id.currentPasswordInput);
newPass = (EditText) view.findViewById(R.id.newPasswordInput);
conPass = (EditText) view.findViewById(R.id.confirmPasswordInput);
builder.setTitle("Change Password");
builder.setMessage("Enter your current password, then enter a new password and confirm it.");
// Set the dialog view to the inflated xml
builder.setView(view);
// Set positive button's text to Add
// Don't do anything because this will be overridden
builder.setPositiveButton("Save", null);
// Set negative button's text to Cancel
builder.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
// Cancel the dialog when button is pressed
ChangePasswordFragment.this.getDialog().cancel();
}
});
// Create the dialog
dialog = builder.create();
// Set a new onShowListener to override positive button's listener
dialog.setOnShowListener(new DialogInterface.OnShowListener() {
@Override
public void onShow(DialogInterface dialog) {
// Get the positive button of the dialog
Button submit = ChangePasswordFragment.this.dialog.getButton(AlertDialog.BUTTON_POSITIVE);
// We override the original listener method because we do not want to exit the dialog
// until we verify that the entered email is valid
submit.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// Call positive button listener's on click method
// and pass in current dialog fragment
pListener.onDialogPositiveClick(ChangePasswordFragment.this);
// Don't dismiss
// Listener will dismiss when data is validated
}
});
}
});
return dialog;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n LayoutInflater inflater = requireActivity().getLayoutInflater();\n final View view = inflater.inflate(R.layout.on_click_dialog, null);\n builder.setView(view);\n\n\n\n\n\n\n\n\n return builder.create();\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_dialog, container, false);\n mUnbinder = ButterKnife.bind(this, view);\n return view;\n\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.alert_dialog_fragment, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState){\n View layout = inflater.inflate(R.layout.setup_chatroom_dialog, container, false);\n Button setupButton = (Button)layout.findViewById(R.id.setup_chatRoom_dialog_setup_button);\n Button cancelButton = (Button)layout.findViewById(R.id.setup_chatRoom_dialog_cancel_button);\n editText = (EditText)layout.findViewById(R.id.setup_chatRoom_dialog_edit_text);\n setupButton.setOnClickListener(setupListener);\n cancelButton.setOnClickListener(cancelListener);\n return layout;\n }",
"@Override\r\n\tpublic Dialog onCreateDialog(Bundle savedInstanceState) {\n\r\n\t\tAlertDialog.Builder builder = new Builder(this.getActivity());\r\n\t\tView view = LayoutInflater.from(getActivity()).inflate(\r\n\t\t\t\tR.layout.load_dialog, null);\r\n\r\n\t\tbuilder.setView(view);\r\n\t\tbuilder.setCancelable(false);\r\n\t\tdialog=builder.create();\r\n\t\treturn dialog;\r\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View root = inflater.inflate(R.layout.fragment_dialog_add_hole, container, false);\n butOk = root.findViewById(R.id.butOk);\n butCancelar = root.findViewById(R.id.butCancelar);\n latLng = root.findViewById(R.id.lntLng);\n address = root.findViewById(R.id.ads);\n latLng.setText(latlng);\n address.setText(ad);\n\n butOk.setOnClickListener(this);\n butCancelar.setOnClickListener(this);\n\n return root;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_varification_dialog, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n sharedPreferences = getActivity().getSharedPreferences(\"VALUES\", Context.MODE_PRIVATE);\n currentTheme = sharedPreferences.getInt(\"THEME\", 0);\n\n //inflate theme_dialog.xml\n view = inflater.inflate(R.layout.theme_dialog, container);\n\n // remove title (already defined in theme_dialog.xml)\n getDialog().requestWindowFeature(Window.FEATURE_NO_TITLE);\n\n // Declare buttons and onClick methods\n dialogButtons();\n\n setUltimoThemeBooton(currentTheme);\n\n return view;\n }",
"private AlertDialog cargando() {\n final AlertDialog.Builder builder = new AlertDialog.Builder(this);\n\n LayoutInflater inflater = getLayoutInflater();\n\n @SuppressLint(\"InflateParams\") View v = inflater.inflate(R.layout.loading, null);\n\n\n builder.setView(v);\n builder.setCancelable(false);\n\n return builder.create();\n\n }",
"@SuppressLint(\"InflateParams\")\r\n\t@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\r\n\t\tView view = (View) inflater.inflate(R.layout.customprogress, null);\r\n//\t\tButton buttonPositive = (Button) view.findViewById(R.id.dialog_button_positive);\r\n//\t\tButton buttonNegative = (Button) view.findViewById(R.id.dialog_button_negative);\r\n\t\tmProgressBar = (ProgressBar) view.findViewById(R.id.progress_bar);\r\n\t\tmProgressTextView = (TextView) view.findViewById(R.id.progress_txt);\r\n\t\tmProgressBarfile = (ProgressBar) view.findViewById(R.id.progress_bar2);\r\n\t\tmProgressTextViewFile = (TextView) view.findViewById(R.id.progress_txt2);\r\n\r\n//\t\tbuttonNegative.setOnClickListener(this);\r\n//\t\tbuttonPositive.setEnabled(false);\r\n//\t\tbuttonPositive.setOnClickListener(this);\r\n\t\tgetDialog().getWindow().requestFeature(Window.FEATURE_NO_TITLE);\r\n\t\treturn view;\r\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_loading_dialog, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_my_dialog, container, false);\n recyclerView = (RecyclerView) view.findViewById(R.id.dialogrecycle);\n recyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));\n\n getDialog().setTitle(\"Search Results: Select One\");\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_language_dialog, container, false);\n jalang=(EditText)view.findViewById(R.id.jalang);\n jalanglevel=(Spinner)view.findViewById(R.id.jalanglevel);\n saveslangd=(Button)view.findViewById(R.id.saveslangd);\n cancellangd=(Button)view.findViewById(R.id.cancellangd);\n saveslangd.setOnClickListener(this);\n cancellangd.setOnClickListener(this);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_contest_search_dialog, container, false);\n\n initUi(view);\n\n setInitialData();\n\n getData(IApiEvent.REQUEST_SEARCH_NEWS_FEED_MIRROR_CODE);\n\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_ranking_settings_dialog, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n showDialog_Cacgiaodich();\n return inflater.inflate(R.layout.cacgiaodich_activity, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_dialog_customer_info, container, false);\n if (getDialog()!=null){\n getDialog().requestWindowFeature( STYLE_NO_TITLE );\n\n int width = ViewGroup.LayoutParams.MATCH_PARENT;\n int height = ViewGroup.LayoutParams.MATCH_PARENT;\n getDialog().getWindow().setLayout(width, height);\n }\n\n progressBar = view.findViewById( R.id.progress_circular );\n layoutContent = view.findViewById( R.id.layoutContent );\n layoutMonthlyRecharge = view.findViewById( R.id.layoutMonthlyRecharge );\n\n operatorName = view.findViewById(R.id.operatorName);\n customerName = view.findViewById( R.id.customerName );\n balance = view.findViewById( R.id.balance );\n nextRechargeDate = view.findViewById( R.id.nextRechargeDate );\n monthlyRecharge = view.findViewById( R.id.monthlyRecharge );\n planName = view.findViewById( R.id.planName );\n deleteBtn = view.findViewById( R.id.imageButtonClose );\n\n // --- Click Action\n deleteBtn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n FragmentDialogCustomerInfo.this.dismiss();\n }\n });\n\n if (callDTHInfo == null){\n // Query...\n DBQuery.queryToGetCustomerInfo( this, s_Username, s_Password, s_provider, s_mobile );\n\n }else {\n setData();\n }\n\n return view;\n }",
"@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n LayoutInflater inflator = getActivity().getLayoutInflater();\n View view = inflator.inflate(R.layout.informationdialog, datePicker);\n builder.setView(view);\n init(view);\n Dialog dialog = builder.create();\n\n //Dialog will not close automatically until user click on cancle button.\n setCancelable(false);\n return dialog;\n }",
"@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n // Get the layout inflater\n LayoutInflater inflater = getActivity().getLayoutInflater();\n View rootView = inflater.inflate(R.layout.filter_dialog, null);\n\n\n\n /* Inflate and set the layout for the dialog */\n /* Pass null as the parent view because its going in the dialog layout*/\n builder.setView(rootView)\n /* Add action buttons */\n .setPositiveButton(R.string.filter, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int id) {\n addShoppingList();\n }\n });\n\n return builder.create();\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 }",
"@NonNull\n @Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\n //set new View to the builder and create the Dialog\n Dialog dialog = builder.setView(new View(getActivity())).create();\n\n //get WindowManager.LayoutParams, copy attributes from Dialog to LayoutParams and override them with MATCH_PARENT\n WindowManager.LayoutParams layoutParams = new WindowManager.LayoutParams();\n layoutParams.copyFrom(dialog.getWindow().getAttributes());\n layoutParams.width = WindowManager.LayoutParams.WRAP_CONTENT;\n layoutParams.height = WindowManager.LayoutParams.WRAP_CONTENT;\n //show the Dialog before setting new LayoutParams to the Dialog\n dialog.show();\n dialog.getWindow().setAttributes(layoutParams);\n\n return dialog;\n }",
"@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\n builder.setTitle(\"Add Participant...\");\n builder.setMessage(\"Participant address:\");\n\n final EditText input = new EditText(getActivity());\n LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(\n LinearLayout.LayoutParams.MATCH_PARENT,\n LinearLayout.LayoutParams.MATCH_PARENT);\n input.setLayoutParams(lp);\n builder.setView(input); // uncomment this line\n\n\n builder.setPositiveButton(\"Add\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n mListener.onAddUserDialogAdd(input.getText().toString());\n }\n })\n .setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n mListener.onAddUserDialogCancel();\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }",
"private void initDialog() {\n dialog = new Dialog(context);\n dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\n dialog.setContentView(R.layout.dialog_custom_ok);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_sensor_dialog, container, false);\n getDialog().requestWindowFeature(Window.FEATURE_NO_TITLE);\n this.spinner_sensor_type = (Spinner)view.findViewById(R.id.sensor_dialog_spinner_sensor_type);\n this.sensor_deep = (EditText)view.findViewById(R.id.sensor_dialog_edit_deep);\n this.sensor_description = (EditText)view.findViewById(R.id.sensor_dialog_edit_description);\n this.spinner_sensor_type.setAdapter(new ArrayAdapter<SensorType>(getActivity(), android.R.layout.simple_list_item_1, SensorType.values()));\n Button button = (Button)view.findViewById(R.id.btnNewSensor);\n //button.setOnClickListener(this);\n\n return view;\n }",
"@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n\n LayoutInflater inflater = getActivity().getLayoutInflater();\n\n\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setMessage(\"CREA USUARIO\")\n .setView(inflater.inflate(R.layout.register_dialog, null))\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n editUser = ((AlertDialog) dialog).findViewById(R.id.username);\n editPass = ((AlertDialog) dialog).findViewById(R.id.password);\n startConexion();\n }\n })\n .setNegativeButton(\"CANCEL\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User cancelled the dialog\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }",
"private void initDialogView(View dialogView) {\n btnTidak = (Button) dialogView.findViewById(R.id.btnTidak);\n btnYa = (Button) dialogView.findViewById(R.id.btnYa);\n imgClosePopup = (ImageView) dialogView.findViewById(R.id.imgClosePopup);\n txtTitle = (TextView) dialogView.findViewById(R.id.txtTitle);\n iconTitle = (ImageView) dialogView.findViewById(R.id.iconTitle);\n }",
"@Override\n public View onCreateView(@NonNull final LayoutInflater inflater, final ViewGroup container,\n final Bundle savedInstanceState) {\n return inflater.inflate(R.layout.dialog_playlists, container);\n }",
"public BaseDialog create()\n {\n LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n // instantiate the dialog with the custom Theme\n final BaseDialog dialog = new BaseDialog(context, R.style.Dialog);\n\n View layout = inflater.inflate(R.layout.view_shared_basedialog, null);\n\n //set the dialog's image\n this.icon = (ImageView) layout.findViewById(R.id.view_shared_basedialog_icon);\n\n if (this.imageResource > 0 || this.imageUrl != null)\n {\n this.icon.setVisibility(View.VISIBLE);\n if (this.imageResource > 0)\n {\n this.icon.setBackgroundResource(this.imageResource);\n }\n else\n {\n// TextureRender.getInstance().setBitmap(this.imageUrl, this.icon, R.drawable.no_data_error_image);\n }\n }\n else\n {\n this.icon.setVisibility(View.GONE);\n }\n\n // set check box's text and default value\n this.checkLayout = layout.findViewById(R.id.view_shared_basedialog_checkbox_layout);\n this.checkBox = (CheckBox) layout.findViewById(R.id.view_shared_basedialog_checkbox);\n this.checkBoxTextView = (TextView) layout.findViewById(R.id.view_shared_basedialog_checkbox_text);\n\n if (!TextUtils.isEmpty(this.checkBoxText))\n {\n this.checkLayout.setVisibility(View.VISIBLE);\n this.checkBoxTextView.setText(this.checkBoxText);\n this.checkBox.setChecked(checkBoxDefaultState);\n }\n else\n {\n this.checkLayout.setVisibility(View.GONE);\n }\n\n // set the dialog main title and sub title\n this.maintitleTextView = (TextView) layout.findViewById(R.id.view_shared_basedialog_maintitle_textview);\n this.subtitleTextView = (TextView) layout.findViewById(R.id.view_shared_basedialog_subtitle_textview);\n this.titleDivideTextView = (TextView) layout.findViewById(R.id.view_shared_basedialog_titledivide_textview);\n if (!TextUtils.isEmpty(title1))\n {\n this.maintitleTextView.setText(title1);\n if (this.title1BoldAndBig)\n {\n this.maintitleTextView.setTypeface(null, Typeface.BOLD);\n this.maintitleTextView.setTextSize(17);\n }\n\n this.maintitleTextView.setVisibility(View.VISIBLE);\n }\n else\n {\n this.maintitleTextView.setVisibility(View.GONE);\n }\n\n if (!TextUtils.isEmpty(title2))\n {\n this.subtitleTextView.setText(title2);\n this.subtitleTextView.setVisibility(View.VISIBLE);\n }\n else\n {\n this.subtitleTextView.setVisibility(View.GONE);\n }\n this.titleDivideTextView.setVisibility(View.GONE);\n\n // set the confirm button\n this.positiveButton = ((Button) layout.findViewById(R.id.view_shared_basedialog_positivebutton));\n if (!TextUtils.isEmpty(positiveButtonText))\n {\n this.positiveButton.setText(positiveButtonText);\n this.positiveButton.setVisibility(View.VISIBLE);\n if (positiveButtonClickListener != null)\n {\n this.positiveButton.setOnClickListener(new View.OnClickListener()\n {\n public void onClick(View v)\n {\n positiveButtonClickListener.onClick(dialog, DialogInterface.BUTTON_POSITIVE);\n if (checkBox.isChecked()&&onCheckBoxListener!=null)\n {\n onCheckBoxListener.checkedOperation();\n }\n }\n });\n }\n }\n else\n {\n // if no confirm button just set the visibility to GONE\n this.positiveButton.setVisibility(View.GONE);\n }\n\n // set the cancel button\n this.negativeButton = ((Button) layout.findViewById(R.id.view_shared_basedialog_negativebutton));\n if (!TextUtils.isEmpty(negativeButtonText))\n {\n this.negativeButton.setText(negativeButtonText);\n this.negativeButton.setVisibility(View.VISIBLE);\n if (negativeButtonClickListener != null)\n {\n this.negativeButton.setOnClickListener(new View.OnClickListener()\n {\n public void onClick(View v)\n {\n negativeButtonClickListener.onClick(dialog, DialogInterface.BUTTON_NEGATIVE);\n }\n });\n }\n }\n else\n {\n // if no confirm button just set the visibility to GONE\n this.negativeButton.setVisibility(View.GONE);\n }\n\n // set button's background\n this.buttonDivideTextView = (TextView) layout.findViewById(R.id.view_shared_basedialog_buttondivide_textview);\n if (!TextUtils.isEmpty(negativeButtonText) && !TextUtils.isEmpty(negativeButtonText))\n {\n this.buttonDivideTextView.setVisibility(View.VISIBLE);\n this.positiveButton.setBackgroundResource(R.drawable.view_shared_corner_round_rightbottom);\n this.negativeButton.setBackgroundResource(R.drawable.view_shared_corner_round_leftbottom);\n }\n else\n {\n this.buttonDivideTextView.setVisibility(View.GONE);\n this.positiveButton.setBackgroundResource(R.drawable.view_shared_corner_round_bottom);\n this.negativeButton.setBackgroundResource(R.drawable.view_shared_corner_round_bottom);\n }\n\n // set the content message\n this.contentLayout = layout.findViewById(R.id.view_shared_basedialog_content_layout);\n if (!TextUtils.isEmpty(message))\n {\n this.contentTextView = ((TextView) layout.findViewById(R.id.view_shared_basedialog_content_textview));\n this.contentTextView.setText(message);\n this.contentTextView.setMovementMethod(ScrollingMovementMethod.getInstance());\n }\n else if (contentView != null)\n {\n // if no message set\n // add the contentView to the dialog body\n ((ViewGroup) this.contentLayout).removeAllViews();\n ((ViewGroup) this.contentLayout).addView(contentView, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT));\n }\n else\n {\n this.contentLayout.setVisibility(View.GONE);\n }\n\n int[] params = Utils.getLayoutParamsForHeroImage();\n dialog.setContentView(layout, new ViewGroup.LayoutParams(params[0]*4/5, ViewGroup.LayoutParams.MATCH_PARENT));\n return dialog;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n ctx = getActivity();\n View view = inflater.inflate(getLayoutID(),null);\n mPreenter = createPresenter();\n loading = new MyProgressLoading(ctx, R.style.DialogStyle);\n sp = ctx.getSharedPreferences(SpUtiles.SP_Mode,Context.MODE_PRIVATE);\n HideUtil.init(getActivity());\n unbinder = ButterKnife.bind(this, view);\n initView();\n initData();\n initListener();\n return view;\n }",
"@NonNull\n View buildView(@NonNull LayoutInflater inflater, @NonNull ViewGroup parent);",
"@Override\r\n\t@Nullable\r\n\tpublic View onCreateView(LayoutInflater inflater,\r\n\t\t\t@Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n\t\tView view = inflater.inflate(R.layout.dialog_add_item_check_list,\r\n\t\t\t\tcontainer);\r\n\t\teditContent = (EditText) view.findViewById(R.id.check_item_content);\r\n\t\taddBtn = (Button) view.findViewById(R.id.add);\r\n\t\taddMoreBtn = (Button) view.findViewById(R.id.add_more);\r\n\t\tcancelBtn = (Button) view.findViewById(R.id.cancel);\r\n\t\t\r\n\t\taddBtn.setOnClickListener(new OnClickListener() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tmListener.onAddPress(editContent.getEditableText().toString());\r\n\t\t\t\tdialog.dismiss();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\taddMoreBtn.setOnClickListener(new OnClickListener() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tmListener.onAddMorePressed(editContent.getEditableText().toString());\r\n\t\t\t\tdialog.dismiss();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tcancelBtn.setOnClickListener(new OnClickListener() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tmListener.onCancelPressed();\r\n\t\t\t\tdialog.dismiss();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\treturn view;\r\n\t}",
"@Override\r\n\tpublic Dialog onCreateDialog(Bundle savedInstanceState) {\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\r\n\r\n\t\t// Set up the layout inflater\r\n\t\tLayoutInflater inflater = getActivity().getLayoutInflater();\r\n\r\n\t\t// Set the title, message and layout of the dialog box\r\n\t\tbuilder.setView(inflater.inflate(R.layout.dialog_box_layout, null))\r\n\t\t\t\t.setTitle(R.string.dialog_title);\r\n\r\n\t\t// User accepts the thing in the dialog box\r\n\t\tbuilder.setPositiveButton(R.string.dialog_accpet,\r\n\t\t\t\tnew DialogInterface.OnClickListener() {\r\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int id) {\r\n\t\t\t\t\t\tToast.makeText(getActivity(),\r\n\t\t\t\t\t\t\t\t\"Thank you for your kiss ^.^\",\r\n\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t// User cancels the thing in the dialog box\r\n\t\tbuilder.setNegativeButton(R.string.dialog_cancel,\r\n\t\t\t\tnew DialogInterface.OnClickListener() {\r\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int id) {\r\n\t\t\t\t\t\tToast.makeText(getActivity(), \"Refuse my kiss??? >.<\",\r\n\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\treturn builder.create(); // return the AlertDialog object\r\n\t}",
"@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n\n View view = getActivity().getLayoutInflater().inflate(R.layout.rollback_detail_dialog, new LinearLayout(getActivity()), false);\n\n initUI(view);\n // clickEvents();\n\n /*\n assert getArguments() != null;\n voucherTypes = (ArrayList<VoucherType>) getArguments().getSerializable(\"warehouses\");\n voucherType=\"\";\n*/\n\n Dialog builder = new Dialog(getActivity());\n builder.requestWindowFeature(Window.FEATURE_NO_TITLE);\n builder.setContentView(view);\n return builder;\n\n\n }",
"private void initViews() {\n\t\t\r\n\t\tTypeface face = Typeface.createFromAsset(getAssets(), \"Teko_Light.ttf\");\r\n\r\n\t\tet_pin = (EditText) findViewById(R.id.et_pin);\r\n\t\tet_pin.setTypeface(face);\r\n\t\tbtn_admin_login = (Button) findViewById(R.id.btn_admin_login);\r\n\t\tbtn_admin_login.setTypeface(face);\r\n\r\n\t\td = new DialogView();\r\n\t}",
"@Override\n\t\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\t\tBundle savedInstanceState) {\n\n\t\t\tView rootView = inflater.inflate(R.layout.status_update_layout, container,\n\t\t\t\t\tfalse);\n\t\t\tgetDialog().getWindow().setBackgroundDrawableResource(android.R.color.white);\n\t\t\tgetDialog().setTitle(\"Post Status Update\"); \n\n\t\t\tstatusLayoutHandle(rootView);\n\n\t\t\treturn rootView;\n\t\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_settings_dialog_planned_basal_injections, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_hint_dialog, container, false);\n \n cancel_btn = (ImageView) view.findViewById(R.id.cancel_btn);\n confirm_btn = (TextView) view.findViewById(R.id.confirm_btn);\n hint_image = (ImageView) view.findViewById(R.id.hint_icon);\n hint_text = (TextView) view.findViewById(R.id.hint_text);\n\n Glide.with(getActivity()).load(R.drawable.snack_bar_icon).into(hint_image);\n hint_text.setText(hint);\n \n cancel_btn.setOnClickListener(this);\n confirm_btn.setOnClickListener(this);\n\n return view;\n }",
"@Override\r\n public Dialog onCreateDialog(Bundle savedInstanceState) {\r\n //use the builder class for convenient dialog construction\r\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\r\n //get the layout inflater\r\n LayoutInflater inflater = getActivity().getLayoutInflater();\r\n View rootView = inflater.inflate(R.layout.dialog_room, null);\r\n mRoomNumber = rootView.findViewById(R.id.roomNumberEditText);\r\n mAllergy = rootView.findViewById(R.id.allergyEditText);\r\n mPlateType = rootView.findViewById(R.id.plateTypeEditText);\r\n mChemicalDiet = rootView.findViewById(R.id.chemicalDietEditText);\r\n mTextureDiet = rootView.findViewById(R.id.textureDietEditText);\r\n mLiquidDiet = rootView.findViewById(R.id.liquidDietEditText);\r\n mLikes = rootView.findViewById(R.id.likesEditText);\r\n mDislikes = rootView.findViewById(R.id.dislikesEditText);\r\n mNotes = rootView.findViewById(R.id.notesEditText);\r\n mMeal = rootView.findViewById(R.id.mealEditText);\r\n mDessert = rootView.findViewById(R.id.dessertEditText);\r\n mBeverage = rootView.findViewById(R.id.beverageEditText);\r\n\r\n mBeverage.setOnEditorActionListener(new TextView.OnEditorActionListener() {\r\n @Override\r\n public boolean onEditorAction(TextView textView, int i, KeyEvent keyEvent) {\r\n if (i == EditorInfo.IME_ACTION_DONE || keyEvent.getAction() == KeyEvent.ACTION_DOWN){\r\n addRoom();\r\n }\r\n return true;\r\n }\r\n });\r\n\r\n //inflate and set the layout for the dialog\r\n //pass null as the parent view cause its going in the dialog layout.\r\n builder.setView(rootView).setPositiveButton(R.string.button_done, new DialogInterface.OnClickListener() {\r\n @Override\r\n public void onClick(DialogInterface dialogInterface, int i) {\r\n addRoom();\r\n }\r\n });\r\n\r\n return builder.create();\r\n }",
"@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n // Get the layout inflater\n LayoutInflater inflater = getActivity().getLayoutInflater();\n \n // Inflate and set the layout for the dialog\n // Pass null as the parent view because its going in the dialog layout\n View view = inflater.inflate(R.layout.signin_dialog, null);\n view.findViewById(R.id.sign_in_button).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n mHelper.beginUserInitiatedSignIn();\n SignInDialogFragment.this.dismiss();\n }\n });\n builder.setView(view);\n // Create the AlertDialog object and return it\n return builder.create();\n }",
"@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tgetDialog().requestWindowFeature(Window.FEATURE_NO_TITLE);\n\n\t\tView view = inflater.inflate(R.layout.dialog_bookletter_custom,\n\t\t\t\tcontainer, false);\n\t\ttvTitle=(TextView)view.findViewById(R.id.textView_dialogTitle);\n\t\ttvMessage=(TextView)view.findViewById(R.id.textView_dialogMessage);\n\t\tbtnOk = (Button) view.findViewById(R.id.button_dialogok);\n\t\tbtnCancle = (Button) view.findViewById(R.id.button_dialogcancle);\n\t\ttvTitle.setText(\"게시물 삭제\");\n\t\ttvMessage.setText(\"이 게시물을 북레터에서 영구적으로\\n삭제 하시겠습니까?\");\n\t\tbtnOk.setText(\"삭제\");\n\n\t\tbtnCancle.setText(\"취소\");\n\t\t \n\t\t btnOk.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\tif (mReviewDeleteClickListener != null) {\n\t\t\t\t\tmReviewDeleteClickListener.onReviewDeleteClick();\n\t\t\t\t}\n\t\t\t\tdismiss();\n\t\t\t}\n\t\t});\n\n\t\t \n\t\t btnCancle.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\tdismiss();\n\t\t\t}\n\t\t});\n\n\t\treturn view;\n\t}",
"@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) {\n\n final View contentView = inflater.inflate(R.layout.dialog_add_worklog, container, false);\n\n ButterKnife.bind(this, contentView);\n\n saveButton.setOnClickListener((v -> {\n String shortDescText = shortDesc.getText().toString();\n String longDescText = longDesc.getText().toString();\n\n ((TicketDetails)getActivity()).addWorkLogRemote(shortDescText,longDescText);\n\n shortDesc.setText(null);\n longDesc.setText(null);\n dismiss();\n }));\n\n cancelButton.setOnClickListener((view -> {\n dismiss();\n }));\n\n title.setText(getString(R.string.dialogWorkLog_title));\n return contentView;\n }",
"@Override\r\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\r\n \r\n LayoutInflater inflater = getActivity().getLayoutInflater();\r\n builder.setTitle(\"New Wallet\");\r\n \r\n\t final View view = inflater.inflate(R.layout.new_wallet_dialog, null);\r\n\t \r\n\t final EditText name = (EditText) view.findViewById(R.id.newWallet_text);\r\n\t \r\n builder.setPositiveButton(R.string.confirmRecord, new DialogInterface.OnClickListener() {\r\n \r\n \tpublic void onClick(DialogInterface dialog, int id) {\r\n \t\tlistener.comfirmPressed(name.getText().toString());\t\r\n \t\t}\r\n });\r\n builder.setNegativeButton(R.string.cancelRecord, new DialogInterface.OnClickListener() {\r\n \tpublic void onClick(DialogInterface dialog, int id) {\r\n \t\tlistener.cancelPressed();\r\n \t\t}\r\n \t});\r\n // Create the AlertDialog object and return it\r\n return builder.create();\r\n }",
"public Dialog onCreateDialog(Bundle savedInstanceState){\n AlertDialog.Builder sample_builder = new AlertDialog.Builder(getActivity());\n sample_builder.setView(\"activity_main\");\n sample_builder.setMessage(\"This is a sample prompt. No new networks should be scanned while this prompt is up\");\n sample_builder.setCancelable(true);\n sample_builder.setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n listener.onDialogPositiveClick(StationFragment.this);\n }\n });\n sample_builder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n listener.onDialogNegativeClick(StationFragment.this);\n }\n });\n return sample_builder.create();\n\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n\n View view = inflater.inflate(R.layout.layout_answer_support, container, false);\n// getDialog().getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));\n\n\n mAnswer = (TextView) view.findViewById(R.id.answer_textview);\n mOk = (Button) view.findViewById(R.id.answer_support_btn_ok);\n\n mOk.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n getDialog().dismiss();\n }\n });\n\n Bundle mArgs = getArguments();\n String test = mArgs.getString(\"answer\");\n mAnswer.setText(test);\n\n\n return view;\n }",
"@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_estim, container, false);\r\n progressDialog = CreateProgressDialog().create();\r\n ctx = getContext();\r\n\r\n bindUI(view);\r\n Events();\r\n Estim.getEstim(getContext(), progressDialog);\r\n\r\n return view;\r\n }",
"void makeDialog()\n\t{\n\t\tfDialog = new ViewOptionsDialog(this.getTopLevelAncestor());\n\t}",
"@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setMessage(R.string.dialog_fire_missiles)\n .setPositiveButton(R.string.fire, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n }\n });\n return builder.create();\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n return initUiComponents(inflater, container);\n }",
"@Override\n public Dialog onCreateDialog(Bundle state) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\n // Set the title\n builder.setTitle(R.string.new_location_title);\n\n // Get the layout inflater\n LayoutInflater inflater = getActivity().getLayoutInflater();\n\n // Pass null as the parent view because its going in the dialog layout\n view = inflater.inflate(R.layout.fire_report, null);\n builder.setView(view);\n\n populate();\n\n // Add a cancel button\n builder.setNegativeButton(R.string.close, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int id) {\n new Thread(new Runnable() {\n @Override\n public void run() {\n Boolean checked = ((CheckBox) view.findViewById(R.id.checkExtinguished)).isChecked();\n if (fire.isExtinguished() != checked) {\n fire.setExtinguished(checked);\n if (!new Cloud(view.getContext()).updateExtinguishedToCloud(fire)) {\n fire.setExtinguished(!checked);\n view.post(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(view.getContext(), R.string.extinguished_failed, Toast.LENGTH_SHORT).show();\n }\n });\n }\n }\n }\n }).start();\n }\n });\n\n dlg = builder.create();\n\n return dlg;\n }",
"@NonNull\n @Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n Dialog dialog = new Dialog(getContext(), R.style.alert_dialog_style);\n dialog.setCancelable(false);\n dialog.setCanceledOnTouchOutside(false);\n View view = View.inflate(getContext(), R.layout.loading, null);\n dialog.setContentView(view);\n return dialog;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n view = inflater.inflate(R.layout.fragment_atsc, container, false);\n mtextView = inflater.inflate(R.layout.dialog_text_layout,null,false);\n// mlayout = inflater.inflate(R.layout.dialog_text_layout,(ViewGroup) container.findViewById(R.id.dialog));\n mContext = this.getActivity();\n\n WindowManager wm = (WindowManager) getContext()\n .getSystemService(Context.WINDOW_SERVICE);\n\n width = wm.getDefaultDisplay().getWidth();\n height = wm.getDefaultDisplay().getHeight();\n// TextView txt_content = (TextView)view.findViewById(R.id.txt_atsccontent);\n// txt_content.setText(\"第一个Fragment\");\n\n Log.e(\"HEHE\", \"1日狗\");\n initView();\n initListener();\n return view;\n }",
"@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\n builder.setMessage(msg)\n .setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n return;\n }\n });\n\n Dialog dialog = builder.create();\n\n // Create the AlertDialog object and return it\n return dialog;\n }",
"@Override // com.oculus.panelapp.assistant.dialogs.AssistantDialog\n public View onCreateView(Context context) {\n return LayoutInflater.from(context).inflate(R.layout.system_dialog, (ViewGroup) null, false);\n }",
"@Nullable\n @Override\n public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.dialog_create_a_index_card_category,container);\n }",
"private void createDialog() {\r\n final AlertDialog dialog = new AlertDialog.Builder(getActivity()).setView(R.layout.dialog_recorder_details)\r\n .setTitle(\"Recorder Info\").setPositiveButton(\"Start\", (dialog1, which) -> {\r\n EditText width = (EditText) ((AlertDialog) dialog1).findViewById(R.id.dialog_recorder_resolution_width);\r\n EditText height = (EditText) ((AlertDialog) dialog1).findViewById(R.id.dialog_recorder_resolution_height);\r\n CheckBox audio = (CheckBox) ((AlertDialog) dialog1).findViewById(R.id.dialog_recorder_audio_checkbox);\r\n EditText fileName = (EditText) ((AlertDialog) dialog1).findViewById(R.id.dialog_recorder_filename_name);\r\n mServiceHandle.start(new RecordingInfo(Integer.parseInt(width.getText().toString()), Integer.parseInt(height.getText().toString()),\r\n audio.isChecked(), fileName.getText().toString()));\r\n dialog1.dismiss();\r\n }).setNegativeButton(\"Cancel\", (dialog1, which) -> {\r\n dialog1.dismiss();\r\n }).show();\r\n Point size = new Point();\r\n getActivity().getWindowManager().getDefaultDisplay().getRealSize(size);\r\n ((EditText) dialog.findViewById(R.id.dialog_recorder_resolution_width)).setText(Integer.toString(size.x));\r\n ((EditText) dialog.findViewById(R.id.dialog_recorder_resolution_height)).setText(Integer.toString(size.y));\r\n }",
"@Override\n\t\tpublic Dialog onCreateDialog(Bundle savedInstanceState) {\n\t\t\treturn mDialog;\n\t\t}",
"public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)\r\n\t{\n\t\tView view = inflater.inflate(R.layout.login_form, container, false);\r\n\t\tinstantiate(view);\r\n\t\treturn view;\r\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n getDialog().requestWindowFeature(Window.FEATURE_NO_TITLE);\n mView = inflater.inflate(R.layout.fragment_bottom_sheet, container, false);\n slideUpTo(mView);\n return mView;\n }",
"@NonNull\n @Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n // Use the Builder class for convenient dialog construction\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setTitle(R.string.title_add_to_shopping);\n\n // initialize itemcreation\n m_createItemDlg = new CreateItemDialog(this);\n\n // create item selection\n builder.setView(createItemSelection());\n\n // set buttonss\n builder.setPositiveButton(R.string.button_add, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n if(m_callback != null) {\n m_callback.readAddToShoppingDlgAndUpdate();\n }\n }\n });\n builder.setNegativeButton(R.string.button_cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) { }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.fragment_open_composition, null, false);\n compositionSelectionList = (ListView) view.findViewById(R.id.savedCompositionSelectionList);\n\n getDialog().getWindow().requestFeature(Window.FEATURE_NO_TITLE);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_edit, container, false);\n\n ((AppCompatActivity)getActivity()).getSupportActionBar().setTitle(\"Edit\");\n\n builder = new AlertDialog.Builder(getContext());\n\n Retrofit retrofit = new Retrofit.Builder()\n .baseUrl(getString(R.string.base_url_api))\n .addConverterFactory(GsonConverterFactory.create())\n .build();\n\n service = retrofit.create(ApiRequest.class);\n\n ViewDialouge();\n\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n setHasOptionsMenu(true);\n view = inflater.inflate(R.layout.fragment_orders_open, container, false);\n wdProgressDialog = new WDProgressDialog(getActivity());\n icons = new Icons(getActivity());\n\n // set current month and year\n month = Calendar.getInstance().get(Calendar.MONTH);\n year = Calendar.getInstance().get(Calendar.YEAR);\n\n return view;\n }",
"@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n return mDialog;\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 }",
"public ClassChoiceDialog(Context context) {\n // 通过LayoutInflater来加载一个xml的布局文件作为一个View对象\n this.context = context;\n initialView();\n dialog = builder.create();\n initListener();\n\n }",
"@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\tView v=inflater.inflate(R.layout.notepad_main, container, false);\r\n\t\tbody=(LineEditText) v.findViewById(R.id.body);\r\n\t\tdel=(Button) v.findViewById(R.id.delAll);\r\n\t\tdel.setOnClickListener(this);\r\n\t\treturn v;\r\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.be_admin_printers, container, false);\n\n /** RETURN THE VIEW INSTANCE TO SETUP THE LAYOUT **/\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)\n {\n FragmentDialogReviewListBinding mBinding = FragmentDialogReviewListBinding.inflate(inflater, container, false);\n\n this.getDialog().setTitle(this.mMovie.getTitle() + \"'s Reviews\");\n\n TextView textView = (TextView) this.getDialog().findViewById(android.R.id.title);\n if (textView != null)\n {\n textView.setGravity(Gravity.CENTER);\n }\n\n RecyclerView mRecyclerView = mBinding.reviewRecyclerViewLarge;\n\n BaseReviewAdapter mAdapter = new BaseReviewAdapter(this, this.mReviews, R.layout.item_review_list_large);\n\n mRecyclerView.setAdapter(mAdapter);\n mRecyclerView.setLayoutManager(new LinearLayoutManager(this.getActivity()));\n mRecyclerView.addItemDecoration(new ItemDivider(this.getActivity()));\n if (this.mSelectedIndex != 0)\n {\n mRecyclerView.scrollToPosition(this.mSelectedIndex);\n }\n\n return mBinding.getRoot();\n }",
"@Override\n\tprotected Dialog onCreateDialog(int id) {\n\t\treturn buildDialog(MainActivity.this);\n\t\t\n\t}",
"@RequiresApi(api = Build.VERSION_CODES.KITKAT)\n @Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.f_subjects, container, false);\n mdb = new MaterialDialog.Builder(Objects.requireNonNull(this.getContext()));\n database = new DBHelper(this.getContext());\n rc = v.findViewById(R.id.rc_subject);\n list = new ArrayList<>();\n\n rc.setHasFixedSize(true); rc.setLayoutManager(new LinearLayoutManager(this.getContext()));\n return v;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.information_view, container, false);\n mFillContentCallback.invoke(view);\n\n return view;\n }",
"private void inflateCreditCardDialog() {\n\n LayoutInflater inflater = getActivity().getLayoutInflater();\n View view = inflater.inflate(R.layout.fragment_add_credit_card, null);\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setView(view);\n payDialog = builder.show();\n\n textViewCreditCardExpirationDate = (TextView) view.findViewById(R.id.editTextCreditCardExpirationDate);\n// spinnerCreditCardSelector = (Spinner) view.findViewById(R.id.spinnerCreditCardSelector);\n editTextCreditCardNumber = (EditText) view.findViewById(R.id.editTextCreditCardNumber);\n editTextCreditCardName = (EditText) view.findViewById(R.id.editTextCreditCardName);\n editTextCCV = (EditText) view.findViewById(R.id.editTextCCV);\n checkBoxAgreedTAC = (CheckBox) view.findViewById(R.id.checkBoxAgreedTAC);\n textViewSubTotalPay = (TextView) view.findViewById(R.id.textViewSubTotalPay);\n payButton = (Button) view.findViewById(R.id.buttonPayWithCC);\n textViewSubTotalPay.setText(String.valueOf(textViewPrepaidPrice.getText()));\n\n textViewCreditCardExpirationDate.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n showDatePicker();\n }\n });\n\n payButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n payButtonClicked();\n }\n });\n }",
"@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n\n\n view = inflater.inflate(LAYOUT, container, false);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.results_screen, container, false);\n settingsView = (RelativeLayout) view.findViewById(R.id.setting_layout);\n setBasicContents(view);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_trans, container, false);\n listView = view.findViewById(R.id.trans_list);\n view.findViewById(R.id.trans_insert).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n TransDialog transDialog = new TransDialog(getContext());\n transDialog.setFragment(TransFragment.this);\n transDialog.show();\n }\n });\n adapter = new TransAdapter(getContext());\n adapter.setTransFragment(this);\n listView.setAdapter(adapter);\n loadData();\n return view;\n }",
"@Override\n public View onCreateView(\n LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState\n ) {\n return inflater.inflate(R.layout.select_game, container, false);\n }",
"@Override\n\t public Dialog onCreateDialog(Bundle savedInstanceState) {\n\t AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\t \n\t \n\t \n\t LayoutInflater inflater = getActivity().getLayoutInflater();\n\t \n\t final View inflator = inflater.inflate(R.layout.dialog_signin, null);\n\t \n\t \n\t \n\t builder.setView(inflator)\n\t \n\t \n\t .setPositiveButton(\"Set\", new DialogInterface.OnClickListener() {\n\t public void onClick(DialogInterface dialog, int id) {\n\t \t EditText username = (EditText) inflator.findViewById(R.id.username);\n\t \t String str = username.getText().toString();\n\t System.out.println(str);\n\t mEditText.setText(str);\n\t }\n\t })\n\t .setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n\t public void onClick(DialogInterface dialog, int id) {\n\t // User cancelled the dialog\n\t }\n\t });\n\t // Create the AlertDialog object and return it\n\t return builder.create();\n\t }",
"public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n LayoutInflater inflater = getActivity().getLayoutInflater();\n\n View layout = inflater.inflate(R.layout.add_item_layout, null);\n\n builder.setView(layout)\n .setPositiveButton(\"Add\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n int price = (int) (Float.parseFloat(((EditText)layout.findViewById(R.id.price)).getText().toString())*100);\n Group g = Group.getCurrentGroup();\n for(int i = 0; i < Integer.parseInt(((EditText) layout.findViewById(R.id.quantity)).getText().toString()); i++) {\n g.addItem(\n new Item(\n ((EditText)layout.findViewById(R.id.item_name)).getText().toString(),\n price\n )\n );\n }\n getDialog().dismiss();\n }\n })\n .setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n getDialog().dismiss();\n }\n })\n .setTitle(\"Add Items\");\n // Create the AlertDialog object and return it\n return builder.create();\n }",
"@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n LayoutInflater inflater = getActivity().getLayoutInflater();\n View view = inflater.inflate(R.layout.complete_workout_dialog,null);\n builder.setView(view);\n completeScore = view.findViewById(R.id.score_edit_text);\n completeTime = view.findViewById(R.id.time_edit_text);\n\n // Inflate and set the layout for the dialog\n // Pass null as the parent view because its going in the dialog layout\n // Add action buttons\n builder.setMessage(\"\")\n .setPositiveButton(\"Ok \", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n completeWorkoutListener.onCompletedWorkoutSelected(completeScore.getText().toString(), completeTime.getText().toString());\n }\n })\n .setNegativeButton(\" Cancel\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User cancelled the dialog\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }",
"public Dialog onCreateDialog(Bundle savedInstanceState) {\r\n\t return mDialog;\r\n\t }",
"@NonNull\n @Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n return mDialog;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n viewModel = new ViewModelProvider(requireActivity()).get(MainActivityViewModel.class);\n if (binding == null) {\n binding = FragmentProfileServiceInfoBinding.inflate(inflater, container, false);\n }\n dialog = Utils.buildProgressDialog(requireActivity());\n generalDialog.buildGeneralDialog(viewModel.getApplication().getApplicationContext(), new DialogData(\"\", \"\", \"OK\", \"\", View.GONE));\n generalDialog.binding.footer.dialogBtnFooterPositive.setOnClickListener(v -> generalDialog.dialog.dismiss());\n viewModel.getBaseData().setTitleBarName(\"Facility Profile\");\n specialityRemovedNotifier.addObserver(this);\n specialityAddedNotifier.addObserver(this);\n ApiCalls.getInstance().addObserver(this);\n attachAdapters();\n attachListeners();\n addTextWatchers();\n setData();\n return binding.getRoot();\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View view = inflater.inflate(R.layout.fragment_alerts, container, false);\n fab = view.findViewById(R.id.fabAlert);\n textAlerts = view.findViewById(R.id.text_alerts);\n\n\n fab.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n DialogAlerts();\n }\n });\n return view;\n }",
"public Dialog onCreateDialog(Bundle savedInstanceState) {\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\r\n\t\tLayoutInflater inflater = getActivity().getLayoutInflater();\r\n\t\tView dialogView = inflater.inflate(R.layout.posted, null);\r\n\r\n\t\tbuilder.setTitle(\"Posted Message to:\");\r\n\t\tbuilder.setView(dialogView);\r\n\t\tfinal AlertDialog dialog = builder.show();\r\n\t\t//dialog.getWindow().setLayout(520, 525);\r\n\t\t\r\n\t\tTextView message = (TextView) dialog.findViewById(R.id.sites_posted);\r\n\t\tmessage.setText(sites);\r\n\r\n\t\tButton done = (Button) dialog.findViewById(R.id.done);\r\n\t\tdone.setOnClickListener(new OnClickListener(){\r\n\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t// TODO open social media options\r\n\t\t\t\tdialog.cancel();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t});\r\n\t\t\r\n\t\treturn dialog;\r\n\t}",
"@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\tv = inflater.inflate(R.layout.wisata, container, false);\r\n \r\n\t\t\r\n\t\t\r\n\t\treturn v;\r\n\t}",
"public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n LinearLayout ll = (LinearLayout) inflater.inflate(R.layout.density, container, false);\n Bundle bundle = this.getArguments();\n filename = bundle.getString(\"filename\");\n final CharSequence[] items = {\n \"Reset original\", \"ldpi 120dpi\", \"mdpi 160dpi\", \"hdpi 240dpi\", \"xhdpi 320dpi\", \"xxhdpi 480dpi\", \"xxxhdpi 640dpi\"\n };\n Button db = (Button) ll.findViewById(R.id.button_density);\n db.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n AlertDialog.Builder builder = new AlertDialog.Builder(getContext() ,R.style.MyAlertDialogStyle);\n builder.setTitle(\"Select Density\");\n builder.setItems(items, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int item) {\n // Do something with the selection\n switch (item) {\n case 0 :\n new original().execute();\n break;\n case 1 :\n idd = 1;\n new ldpi().execute();\n break;\n case 2 :\n idd = 2;\n new mdpi().execute();\n break;\n case 3 :\n idd = 3;\n new hdpi().execute();\n break;\n case 4 :\n idd = 4;\n new xhdpi().execute();\n break;\n case 5 :\n idd = 5;\n new xxhdpi().execute();\n break;\n case 6:\n idd = 6;\n new xxxhdpi().execute();\n break;\n }\n }\n });\n AlertDialog alert = builder.create();\n alert.show();\n }\n });\n return ll;\n }",
"@SuppressLint(\"InflateParams\")\n @Override @NonNull\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\n LayoutInflater inflater = getActivity().getLayoutInflater();\n\n builder.setTitle(R.string.settings_manual_input_dialog_title)\n .setView(inflater.inflate(R.layout.dialog_settings_manual_input, null))\n .setPositiveButton(R.string.settings_manual_input_dialog_ok, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // Send the positive button event back to the host activity\n\n String tokenName = ((EditText) getDialog().findViewById(R.id.settings_manual_input_dialog_name)).getText().toString();\n String token = ((EditText) getDialog().findViewById(R.id.settings_manual_input_dialog_value)).getText().toString();\n String issuerUrl = ((EditText) getDialog().findViewById(R.id.settings_manual_input_dialog_url)).getText().toString();\n mListener.onSettingsManualInputDialogOkClick(tokenName, token, issuerUrl);\n }\n })\n .setNegativeButton(R.string.settings_manual_input_dialog_cancel, null);\n\n // Create the AlertDialog object and return it\n return builder.create();\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_confirm, container, false);\n unbinder = ButterKnife.bind(this, view);\n Realm.init(Objects.requireNonNull(getContext()));\n realm = Realm.getDefaultInstance();\n\n showData();\n return view;\n }",
"@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setMessage(device.getName())\n \t\t.setTitle(R.string.bt_exchange_dialog_title)\n .setPositiveButton(R.string.bt_exchange_dialog_positive_btn, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n\n \t //Add BT Device Activity\n \t performBTKeyExchange(device);\n }\n })\n .setNegativeButton(R.string.bt_exchange_dialog_negative_btn, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User cancelled the dialog\n \t dismiss();\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.gui_fragment,\n container, false);\n\n return view;\n }",
"@Override\n\tprotected Dialog onCreateDialog(int id)\n\t{\n\t\tif(id == DLG_ABOUT)\n\t\t{\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n\t\tbuilder.setMessage(R.string.app_about);\n\t\t\tbuilder.setPositiveButton(\"返回\", new DialogInterface.OnClickListener(){\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(DialogInterface p1, int p2)\n\t\t\t\t\t{\n\t\t\t\t\t\t// TODO: Implement this method\n\n\t\t\t\t\t}\n\n\n\t\t\t\t}\n\t\t\t);\n\t\treturn builder.create();\n\t\t}\n\t\t\n\t\tif(id == DLG_HELP)\n\t\t{\n\t\t\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n\t\t\tbuilder.setMessage(R.string.app_help);\n\t\t\tbuilder.setPositiveButton(\"返回\", new DialogInterface.OnClickListener(){\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(DialogInterface p1, int p2)\n\t\t\t\t\t{\n\t\t\t\t\t\t// TODO: Implement this method\n\n\t\t\t\t\t}\n\n\n\t\t\t\t}\n\t\t\t);\n\t\t\treturn builder.create();\n\t\t}\n\t\t\n\t\tif(id == DLG_UNPACKER)\n\t\t{\n\t\t\tView view = ViewTool.getView(this,R.layout.dlg_unpack);\n\t\t\tfinal EditText edit_png = (EditText) view.findViewById(R.id.edit_pngpath);\n\t\t\tfinal EditText edit_undir = (EditText) view.findViewById(R.id.edit_undir);\n\t\t\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n\t\t\t\n\t\t\tbuilder.setView(view);\n\t\t\tbuilder.setPositiveButton(\"确定\", new DialogInterface.OnClickListener(){\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(DialogInterface p1, int p2)\n\t\t\t\t\t{\n\t\t\t\t\t\t// TODO: Implement this method\n UnPacker unpacker = new UnPacker();\n\t\t String path_png = edit_png.getText().toString();\n\t\t String path_atlas = null;\n\t\t String path_output = edit_undir.getText().toString();\n\t\t int index = path_png.lastIndexOf('.');\n\t\t if(index>0){\n\t\t\t path_atlas = path_png.substring(0,index)+\".atlas\";\n\t\t }\n\t\t unpacker.unPNG( path_atlas,path_png, path_output);\n\t\t Toast.makeText(MainActivity.this,\"解包完成\",Toast.LENGTH_SHORT).show();\n\t\t\t\t\t}\n\n\n\t\t\t\t}\n\t\t\t);\n\t\t\tbuilder.setNegativeButton(\"返回\", new DialogInterface.OnClickListener(){\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(DialogInterface p1, int p2)\n\t\t\t\t\t{\n\t\t\t\t\t\t// TODO: Implement this method\n\n\t\t\t\t\t}\n\n\n\t\t\t\t}\n\t\t\t);\n\t\t\treturn builder.create();\n\t\t}\n\t\t\n\t\t\n\t\treturn super.onCreateDialog(id);\n\t}",
"@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n //return super.onCreateDialog(savedInstanceState); // TODO: should we call it?\n final String title = getArguments().getString(\"TITLE\");\n final String msg = getArguments().getString(\"MESSAGE\");\n final String pos = getArguments().getString(\"POS\");\n final String neg = getArguments().getString(\"NEG\");\n final String neu = getArguments().getString(\"NEU\");\n // TODO - this is just an int... what about other ... Parcelable\n final int idx = getArguments().getInt(\"IDX\");\n final int iconid = getArguments().getInt(\"ICON_ID\");\n final float textsize = getArguments().getFloat(\"MSGSIZE\");\n\n if (savedInstanceState != null) {\n tag = savedInstanceState.getString(\"TAG\");\n }\n\n final DialogInterface.OnClickListener listener = new DialogInterface.OnClickListener() {\n\n @Override\n public void onClick(DialogInterface dialogInterface, int clickedButton) {\n ConfirmListener act = (ConfirmListener) getActivity();\n act.processConfirmation(clickedButton, tag, idx);\n }\n };\n\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity())\n .setTitle(title)\n .setMessage(msg);\n if (iconid != 0 && getResources().getResourceTypeName(iconid).equals(\"drawable\")) {\n // this must be a R.drawable.id, otherwise crash!\n // android.content.res.Resources$NotFoundException:\n builder.setIcon(iconid);\n }\n if (pos != null) {\n builder.setPositiveButton(pos, listener);\n }\n if (neg != null) {\n builder.setNegativeButton(neg, listener);\n }\n if (neu != null) {\n builder.setNeutralButton(neu, listener);\n }\n\n dialog = builder.create();\n if (textsize != 0) {\n dialog.show(); // need to call this to be able to get the TextView as non-null pointer\n TextView tv = (TextView) dialog.findViewById(android.R.id.message);\n if (tv != null) {\n tv.setTextSize(textsize);\n }\n }\n return dialog;\n }",
"@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,\n Bundle savedInstanceState) {\n\n View vi = inflater.inflate(R.layout.fragment_fees, container, false);\n\n\n infobtn = (ImageView)vi.findViewById(R.id.infobtn);\n\n infobtn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n new MaterialDialog.Builder(getActivity())\n .title(\"Consultation fees\")\n .content(\"This fees is indicative and might vary. \\n NOTE:Fees is payable at clinic. There are NO charges for booking an appointment.\")\n .positiveText(\"DISMISS\")\n .negativeText(\"\")\n .show();\n }\n });\n\n\n return vi;\n }",
"@NonNull\n @Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\n //setting the message and the title of dialog\n builder.setTitle(R.string.dialog_title)\n .setMessage(R.string.dialog_message)\n .setPositiveButton(android.R.string.yes, (dialog, which) -> {\n getActivity().finish();\n })\n .setOnCancelListener(dialog -> getActivity().finish());\n\n //creating and returning the dialog\n return builder.create();\n }",
"@Override\n\tpublic Dialog onCreateDialog(Bundle savedInstanceState) {\n\t\tActivity activity = getActivity();\n\t\t// Get the layout inflater\n\t\tLayoutInflater inflater = activity.getLayoutInflater();\n\n\t\t// inflate the view\n\t\t// Inflate and set the layout for the dialog \n\t\t// Pass null as the parent view because its going in the dialog layout \n\t\tView view = inflater.inflate(R.layout.settings, null);\n\t\t\n\t\t// dialog builder\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(activity);\n\t\tbuilder.setView(view)\n\t\t\t .setTitle(R.string.settings)\n\t\t\t\t\n\t\t\t // Add action buttons \n\t\t\t\t\n\t\t\t\t.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() { \n\t\t\t \t\n\t\t\t \t@Override \n\t\t\t \tpublic void onClick(DialogInterface dialog, int id) { \n\t\t\t \t\t// Send the positive button event back to the host activity\n\t\t\t \t\tmListener.onSettingsPositiveClick(SettingsDialogFragment.this);\n\t\t\t \t} \n\t\t \t}) \n\t\t \t.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() { \n\n\t\t \t\t@Override \n\t\t \t\tpublic void onClick(DialogInterface dialog, int id) { \n\t\t \t\t\t// Send the negative button event back to the host activity\n\t\t\t \t\tmListener.onSettingsNegativeClick(SettingsDialogFragment.this);\n\t\t \t\t} \n\t \t\t}); \n \n\t\tmCheckBoxPlaySound = (CheckBox)view.findViewById(R.id.cbPlaySound);\n\t\tmRadioButtonDrawOne = (RadioButton)view.findViewById(R.id.rbDrawOne);\n\t\tfinal RadioButton radioButtonDrawThree = (RadioButton)view.findViewById(R.id.rbDrawThree);\n\t\tmRadioButtonGreen = (RadioButton)view.findViewById(R.id.rbGreen);\n\t\tfinal RadioButton radioButtonBlue = (RadioButton)view.findViewById(R.id.rbBlue);\n\t\tmCheckBoxPlaySound.setChecked(mIsPlaySound);\n\t\tif (mIsDrawOne)\n\t\t\tmRadioButtonDrawOne.setChecked(true);\n\t\telse\n\t\t\tradioButtonDrawThree.setChecked(true);\n\t\tif (mIsBackgroundGreen)\n\t\t\tmRadioButtonGreen.setChecked(true);\n\t\telse\n\t\t\tradioButtonBlue.setChecked(true);\n\t\t\n\t\treturn builder.create();\n }",
"@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_help6, container, false);\n }",
"@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.animation_dialog);\n\n\t\tinitView();\n\t}",
"@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n LayoutInflater inflater = getActivity().getLayoutInflater();\n // Pass null as the parent view because its going in the dialog layout.\n View view = inflater.inflate(R.layout.dialog_image_chooser, null);\n\n View cameraView = view.findViewById(R.id.action_camera);\n View galleryView = view.findViewById(R.id.action_gallery);\n\n cameraView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n // Send the camera click event back to the host activity.\n mListener.onDialogCameraClick(ImageChooserDialogFragment.this);\n // Dismiss the dialog fragment.\n dismiss();\n }\n });\n\n galleryView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n // Send the gallery click event back to the host activity.\n mListener.onDialogGalleryClick(ImageChooserDialogFragment.this);\n // Dismiss the dialog fragment.\n dismiss();\n }\n });\n\n // Create an AlertDialog.Builder and set the layout.\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setView(view);\n\n return builder.create();\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_login, container, false);\n\n nameEdit = (EditText) view.findViewById(R.id.name);\n phoneEdit = (EditText) view.findViewById(R.id.mobno);\n loginButton = (Button) view.findViewById(R.id.log_btn);\n\n loginButton.setOnClickListener(this);\n\n progress = new ProgressDialog(getActivity());\n progress.setMessage(\"Registering ...\");\n progress.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n progress.setIndeterminate(true);\n progress.setCanceledOnTouchOutside(false);\n\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.book_list, container, false);\n\n /** RETURN THE VIEW INSTANCE TO SETUP THE LAYOUT **/\n return view;\n }"
]
| [
"0.7538445",
"0.7298336",
"0.7167019",
"0.7162532",
"0.7148993",
"0.714352",
"0.71316767",
"0.7117337",
"0.7009876",
"0.6994682",
"0.6982373",
"0.69589806",
"0.69330466",
"0.6923854",
"0.6911665",
"0.6903424",
"0.68995523",
"0.6885198",
"0.6876444",
"0.67877233",
"0.67491615",
"0.67354095",
"0.6713327",
"0.66874146",
"0.666928",
"0.6664249",
"0.6648295",
"0.6623859",
"0.6611377",
"0.6610882",
"0.6599023",
"0.6593201",
"0.65911394",
"0.6586936",
"0.65844154",
"0.6581665",
"0.6577152",
"0.6543601",
"0.65409905",
"0.6492383",
"0.64843094",
"0.6481068",
"0.64609957",
"0.64436495",
"0.64353186",
"0.6420244",
"0.6417768",
"0.64145774",
"0.6404839",
"0.63999265",
"0.6399419",
"0.63931876",
"0.637605",
"0.63690156",
"0.6368755",
"0.63683796",
"0.63581306",
"0.6340432",
"0.63332725",
"0.63266397",
"0.63128924",
"0.6303988",
"0.6303467",
"0.6300317",
"0.62860894",
"0.628329",
"0.6275921",
"0.62679696",
"0.62501496",
"0.62290347",
"0.6216068",
"0.62128806",
"0.6211275",
"0.62064856",
"0.62057",
"0.6194198",
"0.61928123",
"0.619246",
"0.6191528",
"0.6188624",
"0.61885345",
"0.6170526",
"0.61623806",
"0.6158279",
"0.61542434",
"0.61505497",
"0.6144308",
"0.6142203",
"0.6140805",
"0.614034",
"0.6139767",
"0.6136544",
"0.6135513",
"0.61300784",
"0.6127514",
"0.6124468",
"0.61241484",
"0.61220145",
"0.61218035",
"0.61174124",
"0.6115826"
]
| 0.0 | -1 |
Cancel the dialog when button is pressed | @Override
public void onClick(DialogInterface dialog, int which) {
ChangePasswordFragment.this.getDialog().cancel();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void cancelDialog() {dispose();}",
"@Override\n public void onClick(View v)\n {\n begindialog.cancel();\n }",
"@Override\n public void onClick(DialogInterface dialog, int arg1) {\n\t\t\t\t\t\t\t\tdialog.cancel();\n }",
"@Override\n public void onClick(View v) {\n dialog.cancel();\n }",
"@Override\n public void onClick(View v) {\n\n dialog.cancel();\n }",
"@Override\n public void onClick(View v) {\n\n dialog.cancel();\n }",
"@Override\n\t\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\t\t}",
"public void cancel() { Common.exitWindow(cancelBtn); }",
"@Override\n public void onClick(DialogInterface dialog,\n int which)\n {\n dialog.cancel();\n }",
"@Override\n public void onClick(DialogInterface dialog,\n int which) {\n dialog.cancel();\n }",
"@Override\n public void onCancel(DialogInterface dialog) {\n cancel(true);\n }",
"@Override\n public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n }",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }",
"@Override\n public void onClick(DialogInterface dialog,\n int which)\n {\n dialog.cancel();\n }",
"@Override\n public void onClick(DialogInterface dialog, int whichButton) {\n \tdialog.cancel(); //Close this dialog box\n }",
"void cancelButton_actionPerformed(ActionEvent e)\n\t{\n\t\tcloseDlg();\n }",
"@Override\r\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\r\n\r\n }",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }",
"@Override\n public void onClick(DialogInterface dialog, int which)\n {\n dialog.cancel();\n }",
"@Override\r\n\t\t\t\t\t\t\t\t\t\tpublic void onClick(\r\n\t\t\t\t\t\t\t\t\t\t\t\tDialogInterface dialog,\r\n\t\t\t\t\t\t\t\t\t\t\t\tint which) {\n\t\t\t\t\t\t\t\t\t\t\tdialog.cancel();\r\n\t\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t}",
"@Override\r\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tdialog.cancel();\r\n\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\t}",
"@Override\n public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n finish();\n }",
"@Override\n public void onBtnClick() {\n dialog.dismiss();\n }",
"@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tdialog.cancel();\n\t\t\t}",
"@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tdialog.cancel();\n\t\t\t}",
"public void onClick(DialogInterface dialog, int arg1) {\n dialog.cancel();\n }",
"@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which)\n\t\t\t{\n\t\t\t\tdialog.cancel();\n\t\t\t}",
"public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n }",
"@Override\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\n\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\n\t\t\t\t\tfinish();\n\t\t\t\t}",
"public void onClick(DialogInterface dialog, int which) {\n\n dialog.cancel();\n }",
"public void onClick(DialogInterface dialog, int which) {\n\n dialog.cancel();\n }",
"public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n }",
"public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }",
"public void onClick(DialogInterface dialog,int id) {\n dialog.cancel();\n }",
"@Override\n\t\t\t\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\t\t\t\tcancel(true);\n\t\t\t\t\t\tfinish();\n\t\t\t\t\t}",
"public void onClick(DialogInterface dialog,int id)\n {\n dialog.cancel();\n }",
"void cancelButton_actionPerformed(ActionEvent e) {\n setUserAction(CANCELLED);\n setVisible(false);\n }",
"public void onClick(DialogInterface dialog,\n int id) {\n dialog.cancel();\n }",
"public void onClick(DialogInterface dialog,int id) {\n dialog.cancel();\n }",
"public void onClick(DialogInterface dialog,int id) {\n dialog.cancel();\n }",
"public void onCancelButtonClick() {\n close();\n }",
"public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n }",
"public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n }",
"public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n }",
"public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n }",
"public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n }",
"public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n }",
"public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n }",
"public void onClick(DialogInterface dialog, int which) {\n\n dialog.cancel();\n }",
"public void onClick(DialogInterface dialog,\n int which) {\n dialog.cancel();\n }",
"public void onClick(DialogInterface dialog,\n int id) {\n dialog.cancel();\n }",
"public void onClick(DialogInterface dialog,int id) {\n dialog.cancel();\n }",
"public void onClick(DialogInterface dialog,int id) {\n dialog.cancel();\n }",
"public void onClick(DialogInterface dialog,int id) {\n dialog.cancel();\n }",
"public void onClick(DialogInterface dialog,int id) {\n dialog.cancel();\n }",
"public void onClick(DialogInterface dialog,int id) {\n dialog.cancel();\n }",
"public void onClick(DialogInterface dialog,int id) {\n dialog.cancel();\n }",
"public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n\n }",
"public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n\n }",
"private void cancel(){\n\t\tSPSSDialog.instance = null;\n\t\thide();\n\t}",
"@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tmListener.onCancelPressed();\r\n\t\t\t\tdialog.dismiss();\r\n\t\t\t}",
"public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }",
"public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }",
"@Override\n\t\t\t\t\t\tpublic void doCancel() {\n\t\t\t\t\t\t\tcommonDialog.dismiss();\n\t\t\t\t\t\t}",
"public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n }",
"public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n }",
"public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n }",
"public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n }",
"public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n }",
"public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n }",
"private void cancel(){\n if(isFormEmpty()){\n finish();\n }else{\n // Confirmation dialog\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n\n builder.setTitle(getString(R.string.cancel_booking_creation_confirmation));\n // When users confirms dialog, end activity\n builder.setPositiveButton(android.R.string.ok, (dialog, which) -> {\n finish();\n });\n\n // Do nothing if cancel\n builder.setNegativeButton(android.R.string.cancel, null);\n\n AlertDialog dialog = builder.create();\n dialog.show();\n\n // Change button colors\n Button positiveButton = dialog.getButton(AlertDialog.BUTTON_POSITIVE);\n positiveButton.setTextColor(getColor(R.color.colorPrimary));\n Button negativeButton = dialog.getButton(AlertDialog.BUTTON_NEGATIVE);\n negativeButton.setTextColor(getColor(R.color.colorPrimary));\n }\n }",
"public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n }",
"public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n }",
"public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n }",
"public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n }",
"public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n }",
"public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n }",
"public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n }",
"public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n }",
"public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n }",
"public void onClick(DialogInterface dialog, int which) {\n\t\t\t dialog.cancel();\n\t\t\t }",
"public void onClick(DialogInterface dialog,int id) {\n dialog.cancel();\n }",
"public void onClick(DialogInterface dialog,int id) {\n dialog.cancel();\n }",
"public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n }",
"public void onClick(View v) {\n\t\t\t\tdialog.cancel();\r\n\t\t\t}",
"public void onClick(DialogInterface dialog,int id) {\n dialog.cancel();\n }",
"public void onClick(DialogInterface dialog,int id) {\n dialog.cancel();\n }",
"public void onClick(DialogInterface dialog,int id) {\n dialog.cancel();\n }",
"public void onClick(DialogInterface dialog,int id) {\n dialog.cancel();\n }",
"public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n\n }",
"public void onClickCancel()\n\t{\n\t\tsetVisible(false);\n\t\tdispose();\t\n\t}"
]
| [
"0.8327062",
"0.82356596",
"0.822662",
"0.8203973",
"0.81913346",
"0.81913346",
"0.8188865",
"0.8153912",
"0.81236774",
"0.81124043",
"0.81056017",
"0.8078501",
"0.80643594",
"0.8064118",
"0.8063951",
"0.80627275",
"0.8059702",
"0.8023287",
"0.80094254",
"0.80094254",
"0.80094254",
"0.80094254",
"0.80094254",
"0.8008303",
"0.7972209",
"0.79711795",
"0.79248655",
"0.7920139",
"0.79095703",
"0.79095703",
"0.79095703",
"0.7905822",
"0.78981924",
"0.7892263",
"0.7892263",
"0.78728926",
"0.7846959",
"0.7831672",
"0.78264624",
"0.7813604",
"0.7813604",
"0.78104424",
"0.7809995",
"0.7808718",
"0.7806461",
"0.77878034",
"0.778334",
"0.7774041",
"0.77713245",
"0.77713245",
"0.7765429",
"0.7754037",
"0.7754037",
"0.7754037",
"0.7754037",
"0.7754037",
"0.7754037",
"0.7754037",
"0.77491814",
"0.7730937",
"0.77217454",
"0.77176154",
"0.77176154",
"0.77176154",
"0.77176154",
"0.77176154",
"0.77176154",
"0.77027816",
"0.77027816",
"0.7699898",
"0.76931936",
"0.7680095",
"0.7680095",
"0.7678074",
"0.76638734",
"0.76638734",
"0.76638734",
"0.76638734",
"0.76638734",
"0.76638734",
"0.7663716",
"0.764986",
"0.764986",
"0.764986",
"0.764986",
"0.764986",
"0.764986",
"0.764986",
"0.764986",
"0.764986",
"0.7641554",
"0.76376736",
"0.76376736",
"0.763497",
"0.76348245",
"0.76341504",
"0.76341504",
"0.76341504",
"0.76341504",
"0.7609299",
"0.7604876"
]
| 0.0 | -1 |
Get the positive button of the dialog | @Override
public void onShow(DialogInterface dialog) {
Button submit = ChangePasswordFragment.this.dialog.getButton(AlertDialog.BUTTON_POSITIVE);
// We override the original listener method because we do not want to exit the dialog
// until we verify that the entered email is valid
submit.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// Call positive button listener's on click method
// and pass in current dialog fragment
pListener.onDialogPositiveClick(ChangePasswordFragment.this);
// Don't dismiss
// Listener will dismiss when data is validated
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected boolean hasPositiveButton() {\n return false;\n }",
"protected Button getOkButton()\r\n\t{\r\n\t\treturn okButton;\r\n\t}",
"private JButton getAcceptButton() {\n return ((OkCancelButtonPanel) getButtonPanel()).getOkayButton();\n }",
"public JButton getOkButton(){\n\t\treturn okButton;\n\t}",
"public Button getYes() {\n return yes;\n }",
"public JButton getOkButton() {\n return okButton;\n }",
"public boolean getAButton() {\n\t\treturn getRawButton(A_Button);\n\t}",
"private JButton getRejectButton() {\n return ((OkCancelButtonPanel) getButtonPanel()).getCancelButton();\n }",
"public boolean getAButton() {\n\t\treturn getRawButton(A_BUTTON);\n\t}",
"private RButton getOkButton() {\n if (okButton == null) {\n okButton = new RButton();\n okButton.setText(\"<%= ivy.cms.co(\\\"/Buttons/ok\\\") %>\");\n okButton.setName(\"okButton\");\n }\n return okButton;\n }",
"Button getBtn();",
"HasClickHandlers getCancelButton();",
"public int getButtonViewId() {\n return R.id.tv_dismiss;\n }",
"@Override\n public JButton get_default_button()\n {\n return BT_OK;\n }",
"private JButton getBtnOK() {\n if (btnOK == null) {\n btnOK = new JButton();\n btnOK.setText(\" OK \");\n btnOK.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent e) {\n selected = true;\n setVisible(false);\n }\n });\n getRootPane().setDefaultButton(btnOK);\n }\n return btnOK;\n }",
"public boolean isOkClicked() {\r\n return okClicked;\r\n }",
"public boolean isOkClicked() {\r\n return okClicked;\r\n }",
"public boolean isOkClicked() {\r\n return okClicked;\r\n }",
"public boolean isOkClicked() {\r\n return okClicked;\r\n }",
"public boolean isOkClicked(){\n\t\treturn okClicked;\n\t}",
"public int getButton() {\n\t\t//Check what button it is then return the value\n\t\tif (this.isLeftButton)\n\t\t\treturn 0;\n\t\telse if (this.isRightButton)\n\t\t\treturn 1;\n\t\telse if (this.isMiddleButton)\n\t\t\treturn 2;\n\t\telse\n\t\t\treturn -1;\n\t}",
"public boolean isOkClicked() {\n return okClicked;\n }",
"public boolean isOkClicked() {\n return okClicked;\n }",
"public boolean hasNeutralButton(){\n return true;\n }",
"public JButton getAcceptButton() {\n\t\treturn acceptButton;\n\t}",
"private BButton getBtnOK() {\r\n\t\tif (btnOK == null) {\r\n\t\t\tbtnOK = new BButton();\r\n\t\t\tbtnOK.setText(\"OK\");\r\n\t\t\tbtnOK.setPreferredSize(new Dimension(100, 29));\r\n\t\t}\r\n\t\treturn btnOK;\r\n\t}",
"public boolean isOkClicked() {\n\t\treturn okClicked;\n\t}",
"public boolean isOkClicked() {\n\t\treturn okClicked;\n\t}",
"public boolean isOkClicked() {\n\t\treturn okClicked;\n\t}",
"public boolean isOkClicked() {\n\t\treturn okClicked;\n\t}",
"public boolean isOkClicked() {\n\t\treturn okClicked;\n\t}",
"public boolean isOkClicked() {\r\n\t\treturn okClicked;\r\n\t}",
"public String getText_click_CloseModal_Button(){\r\n\t\treturn click_CloseModal_Button.getText();\r\n\t}",
"@Override\r\n public void onClick(final DialogInterface dialog, final int whichButton) {\r\n }",
"public String getMessageButton() {\n return messageButton;\n }",
"@Override\n public void onDialogPositiveClick(DialogFragment dialog) {\n // User touched the dialog's positive button\n Toast.makeText(this, \"OK\", Toast.LENGTH_LONG).show();\n\n }",
"void okButtonClicked();",
"public String GetButtonText() {\n\t\treturn getWrappedElement().getText();\n\t}",
"public void onDialogPositiveClick(DialogFragment dialog);",
"public void onClick(DialogInterface dialog, int whichButton) {\n\t\t }",
"public Object getBtnCancel() {\n return btnCancel;\n }",
"private JButton getBtnCancel() {\n if (btnCancel == null) {\n btnCancel = new JButton();\n btnCancel.setText(\"Odustani\");\n btnCancel.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent e) {\n selected = false;\n setVisible(false);\n }\n });\n }\n return btnCancel;\n }",
"private JButton getOkButton() {\r\n\t\tif (okButton == null) {\r\n\t\t\ttry {\r\n\t\t\t\tokButton = new JButton();\r\n\t\t\t\tokButton.setText(\"OK\");\r\n\t\t\t\tokButton.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\r\n\t\t\t\t\t\tsetVisible(false);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t} catch (java.lang.Throwable e) {\r\n\t\t\t\t// TODO: Something\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn okButton;\r\n\t}",
"public boolean getXButton() {\n\t\treturn getRawButton(X_Button);\n\t}",
"@Override\n\t\t\t\tpublic void onClick(DialogInterface dialog, int button) {\n\t\t\t\t}",
"private JButton getOkButton() {\n\t\tif (okButton == null) {\n\t\t\tokButton = new JButton();\n\t\t\tokButton.setText(\"OK\");\n\t\t\tokButton.addActionListener(new java.awt.event.ActionListener() {\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\tdoOK();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn okButton;\n\t}",
"public boolean getButton(XboxController.Button inputButton) {\n\t\treturn this.getRawButton(inputButton.value);\n\t}",
"public void onClick(DialogInterface dialog, int whichButton) {\n }",
"public void onClick(DialogInterface dialog, int whichButton) {\n }",
"public void onClick(DialogInterface dialog, int whichButton) {\n }",
"public void OnOkClick()\r\n {\r\n\r\n }",
"@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tpositiveButtonClickListener.onClick(dialog, DialogInterface.BUTTON_POSITIVE);\n\t\t\t\t\t\n\t\t\t\t\tif(dialog != null)\tdialog.dismiss();\n\t\t\t\t}",
"public void onClick(DialogInterface dialog, int whichButton) {\n }",
"public void onClick(DialogInterface dialog, int whichButton) {\n }",
"public void onClick(DialogInterface dialog, int whichButton) {\n }",
"public void onClick(DialogInterface dialog, int whichButton) {\n }",
"@Override\n public void onDialogPositiveClick(DialogFragment dialog) {\n // User touched the dialog's positive button\n Log.d(LOG_TAG, \"onDialogPositiveClick() called\");\n endShift();\n }",
"public void onClick(DialogInterface dialog, int whichButton) {\n\n\t\t\t }",
"public Button getButton() {\n\t\treturn button;\n\t}",
"private JButton getJButtonOk() {\n\t\tif (jButtonOk == null) {\n\t\t\tjButtonOk = new JButton();\n\t\t\tjButtonOk.setText(\"I agree\");\n\t\t\tjButtonOk.addActionListener(new java.awt.event.ActionListener() {\n\t\t\t\t@Override\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\tok = true;\n\t\t\t\t\tdispose();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn jButtonOk;\n\t}",
"@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int button) {\n\t\t\t}",
"private JButton getOkButton() {\n if (okButton == null) {\n okButton = new JButton();\n okButton.setText(\"OK\");\n okButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent e) {\n canceled = false;\n dispose();\n }\n });\n }\n return okButton;\n }",
"public void onClick(DialogInterface dialog, int whichButton)\r\n\t {\r\n\t }",
"public void onClick(DialogInterface dialog, int whichButton)\r\n\t {\r\n\t }",
"public void onClick(DialogInterface dialog, int whichButton) {\n\t\t\t\t\t\t }",
"public JButton getGoBtn() {\n\t\treturn go;\n\t}",
"public boolean onConfirmClicked(DialogActivity dialog)\n {\n return mApplyButton.performClick();\n }",
"boolean isCloseButtonDisplayed();",
"public JButton getPOSBtn() {\r\n\t\tthis.posBtn = new JButton(\"POS File\");\r\n\t\tthis.posBtn.addActionListener(this);\r\n\t\tthis.posBtn.setEnabled(ComponentData.getPosBtnIsEnabled());\r\n\t\treturn this.posBtn;\r\n\t}",
"protected abstract void pressedOKButton( );",
"public void onClick(DialogInterface dialog, int whichButton) {\n }",
"public void onClick(DialogInterface dialog, int whichButton) {\n }",
"public void onClick(DialogInterface dialog, int whichButton) {\n }",
"public void onClick(DialogInterface dialog, int whichButton) {\n }",
"public void onClick(DialogInterface dialog, int whichButton) {\n }",
"public void onClick(DialogInterface dialog, int whichButton) {\n }",
"public JCommandToggleButton getSelectedButton() {\n return this.buttonSelectionGroup.getSelected();\n }",
"protected GuiTestObject okbutton() \n\t{\n\t\treturn new GuiTestObject(\n getMappedTestObject(\"okbutton\"));\n\t}",
"public IButton getReturnButton() {\n return controls.getReturnButton();\n }",
"public boolean getXButton() {\n\t\treturn getRawButton(X_BUTTON);\n\t}",
"public boolean getBButton() {\n\t\treturn getRawButton(B_Button);\n\t}",
"private JButton getJButtonOK() {\r\n\t\tif (jButtonOK == null) {\r\n\t\t\tjButtonOK = new JButton();\r\n\t\t\tjButtonOK.setBounds(new Rectangle(40, 215, 90, 30));\r\n\t\t\tjButtonOK.setText(\"确定\");\r\n\t\t\tjButtonOK.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\r\n\t\t\t\t\tjColorChooser.setVisible(false);\r\n\t\t\t\t\tchooserColor = color;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn jButtonOK;\r\n\t}",
"public void onClick(DialogInterface dialog, int whichButton) {\r\n }",
"public javax.swing.JButton getBtnCancel() {\n return btnCancel;\n }",
"@Override\r\n \t\t\t\t\tpublic void onClick(DialogInterface dialog, int whichButton) {\n \t\t\t\t\t}",
"public WebElement get123BankingCancelBtn() {\n\t\tWebDriverWait wait = new WebDriverWait(driver, 20);\n\t\treturn wait.until(ExpectedConditions.elementToBeClickable(findElement(\n\t\t\t\trepositoryParser, PAGE_NAME, \"123BankingCancelBtn\")));\n\t}",
"public void onClick(DialogInterface dialog, int whichButton) {\n\t\t\t }",
"public void onClick(DialogInterface dialog, int whichButton) {\n\t\t\t }",
"public void clickYes ();",
"public JButton getUpLevelButton() {\n return getNoTextButton(0);\n }",
"public Button getNo() {\n return no;\n }",
"private JButton getJButtonOK() {\n\t\tif (jButtonOK == null) {\n\t\t\tjButtonOK = new JButton();\n\t\t\tjButtonOK.setLocation(new Point(100, 200));\n\t\t\tjButtonOK.setText(\"OK\");\n\t\t\tjButtonOK.addActionListener( new ActionListener() {\n\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\tcloseFrameSobre();\n\t\t\t\t}\n\t\t\t});\n\t\t\tjButtonOK.setSize(new Dimension(100, 30));\n\t\t}\n\t\treturn jButtonOK;\n\t}",
"public static boolean getButton(int index) {\n\t\treturn SmartDashboard.getBoolean(\"DB/Button \" + index, false);\n\t}",
"public JButton getP1WinPoint() {\n return p1WinPoint;\n }",
"public int getChoice()\n {\n super.setVisible(true);\n return this.choice;\n }",
"protected abstract boolean onOkClicked();",
"private JButton getJButtonCancelar() {\r\n\t\tif (jButtonCancelar == null) {\r\n\t\t\tjButtonCancelar = new JButton();\r\n\t\t\tjButtonCancelar.setText(CANCELAR);\r\n\t\t}\r\n\t\treturn jButtonCancelar;\r\n\t}",
"public boolean getCopilotButton(int button) {\n return copilot.getRawButton(button);\n }",
"private JButton getJButtonCancel() {\n\t\tif (jButtonCancel == null) {\n\t\t\tjButtonCancel = new JButton();\n\t\t\tjButtonCancel.setText(\"I disagree\");\n\t\t\tjButtonCancel.addActionListener(new java.awt.event.ActionListener() {\n\t\t\t\t@Override\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\tok = false;\n\t\t\t\t\tdispose();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn jButtonCancel;\n\t}",
"public JButton getVerifyButton() {\n return VerifyButton;\n }",
"int getSelectedButton() {\n for (int i = 0; i < buttons.length; i++) {\n if (buttons[i].isSelected()) {\n return (i);\n }\n }\n return (-1);\n }"
]
| [
"0.7175321",
"0.7051049",
"0.7007193",
"0.68688124",
"0.6848644",
"0.6828308",
"0.6650004",
"0.66388845",
"0.658856",
"0.64980894",
"0.64858395",
"0.6468716",
"0.6438733",
"0.6433405",
"0.64132243",
"0.6406703",
"0.6406703",
"0.6406703",
"0.6406703",
"0.6378116",
"0.63775164",
"0.6349568",
"0.6349568",
"0.6313916",
"0.6281006",
"0.6263727",
"0.6258543",
"0.6258543",
"0.6258543",
"0.6258543",
"0.6258543",
"0.6257689",
"0.62475693",
"0.62287134",
"0.6225114",
"0.6221173",
"0.6207638",
"0.6202548",
"0.6196559",
"0.618013",
"0.6179393",
"0.6166966",
"0.6165256",
"0.61644405",
"0.6164183",
"0.6163106",
"0.6151671",
"0.61490667",
"0.61490667",
"0.61490667",
"0.6148131",
"0.6147411",
"0.6141775",
"0.6141775",
"0.6141775",
"0.6141775",
"0.6141463",
"0.61388034",
"0.61378056",
"0.6129783",
"0.6126689",
"0.61203563",
"0.61153924",
"0.61153924",
"0.6106556",
"0.6106201",
"0.61007196",
"0.60986483",
"0.6092535",
"0.6086591",
"0.60830843",
"0.60830843",
"0.60830843",
"0.60830843",
"0.60830843",
"0.60830843",
"0.6082162",
"0.60807514",
"0.6070478",
"0.60695565",
"0.60694224",
"0.6060263",
"0.60599905",
"0.60510606",
"0.6033832",
"0.6033673",
"0.6032839",
"0.6032839",
"0.6030508",
"0.60301286",
"0.60255206",
"0.60162497",
"0.6011181",
"0.6008817",
"0.60011",
"0.5996977",
"0.59930915",
"0.5988876",
"0.59776247",
"0.59773797",
"0.5977098"
]
| 0.0 | -1 |
Call positive button listener's on click method and pass in current dialog fragment | @Override
public void onClick(View v) {
pListener.onDialogPositiveClick(ChangePasswordFragment.this);
// Don't dismiss
// Listener will dismiss when data is validated
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void onDialogPositiveClick(DialogFragment dialog);",
"@Override\n public void onDialogPositiveClick(DialogFragment dialog) {\n // User touched the dialog's positive button\n Toast.makeText(this, \"OK\", Toast.LENGTH_LONG).show();\n\n }",
"public void doPositiveClick() {\n // Do stuff here.\n Log.i(\"FragmentAlertDialog\", \"Positive click!\");\n }",
"@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tpositiveButtonClickListener.onClick(dialog, DialogInterface.BUTTON_POSITIVE);\n\t\t\t\t\t\n\t\t\t\t\tif(dialog != null)\tdialog.dismiss();\n\t\t\t\t}",
"@Override\n public void onDialogPositiveClick(DialogFragment dialog) {\n // User touched the dialog's positive button\n Log.d(LOG_TAG, \"onDialogPositiveClick() called\");\n endShift();\n }",
"@Override\n\tpublic void onClick(DialogInterface arg0, int arg1) {\n\t\tif (arg1 == DialogInterface.BUTTON_POSITIVE) {\n\t\t\tonDialogPositiveClick((DialogFragment) arg0);\n\t\t} else {\n\t\t\tonDialogNegativeClick((DialogFragment) arg0);\n\t\t}\n\n\t}",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n Toast.makeText(getActivity(), \"clicked okay\", Toast.LENGTH_SHORT).show();\n }",
"@Override\n public void onDialogPositiveClick(DialogFragment dialog){\n dialog.dismiss();\n returnButtonOnClick(findViewById(R.id.refresh_button));\n }",
"@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tdialog();\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\n public void onClick(View v) {\n dialog_action();\n }",
"@Override\n public void onClick(View view) {\n FragmentManager fragmentManager = getSupportFragmentManager();\n final CheckingDialog checkingDialog = CheckingDialog.getInstance(0);\n checkingDialog.show(fragmentManager,\"check\");\n checkingDialog.setCancelable(true);\n }",
"public void onDialogNegativeClick(DialogFragment dialog);",
"@Override\n public void onShow(DialogInterface dialog) {\n Button submit = ChangePasswordFragment.this.dialog.getButton(AlertDialog.BUTTON_POSITIVE);\n\n // We override the original listener method because we do not want to exit the dialog\n // until we verify that the entered email is valid\n submit.setOnClickListener(new View.OnClickListener() {\n\n @Override\n public void onClick(View v) {\n // Call positive button listener's on click method\n // and pass in current dialog fragment\n pListener.onDialogPositiveClick(ChangePasswordFragment.this);\n\n // Don't dismiss\n // Listener will dismiss when data is validated\n }\n });\n }",
"@Override\r\n\tpublic void onClick(View iView) {\r\n\t\tif(mClickListener!= null){\r\n\t\t\tswitch (iView.getId()) {\r\n//\t\t\tcase R.id.dialog_button_positive:\r\n//\t\t\t\tmClickListener.onCustomDialogClickView(true);\r\n//\t\t\t\tbreak;\r\n//\t\t\tcase R.id.dialog_button_negative:\r\n//\t\t\t\tmClickListener.onCustomDialogClickView(false);\r\n//\t\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tdismiss();\r\n\t}",
"@Override\n public void onClick(View v) {\n ThreeFragment dialogFragment = ThreeFragment.newInstance(\"Are you sure to do this action?\");\n dialogFragment.show(getFragmentManager(), \"dialog\");\n }",
"@Override\n public void onClick(DialogInterface dialog, int id) {\n mListener.onDialogPositiveClick(YesNoDialog.this, callback_id);\n }",
"public void onClick(DialogInterface dialog, int whichButton) {\n }",
"public void onClick(DialogInterface dialog, int whichButton) {\n }",
"public void onClick(DialogInterface dialog, int whichButton) {\n }",
"public void onClick(DialogInterface dialog, int whichButton) {\n }",
"public void onClick(DialogInterface dialog, int whichButton) {\n }",
"public void onClick(DialogInterface dialog, int whichButton) {\n }",
"public void onClick(DialogInterface dialog, int whichButton) {\n }",
"public void onClick(DialogInterface dialog, int whichButton) {\n }",
"public void onClick(DialogInterface dialog, int whichButton) {\n }",
"public void onClick(DialogInterface dialog, int whichButton) {\n }",
"public void onClick(DialogInterface dialog, int whichButton) {\n }",
"public void onClick(DialogInterface dialog, int whichButton) {\n }",
"public void onClick(DialogInterface dialog, int whichButton) {\n }",
"public void onClick(DialogInterface dialog, int id) {\n\n }",
"@Override\n public void onClick(View v) {\n showDialog();\n }",
"public void onClick(DialogInterface dialog, int whichButton) {\n }",
"public void onClick(DialogInterface dialog, int whichButton) {\n }",
"public void onClick(DialogInterface dialog, int whichButton) {\n }",
"public void onClick(DialogInterface dialog, int whichButton) {\n\n\t\t\t }",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n getActivity().finish();\n }",
"public void onClick(DialogInterface dialog, int whichButton) {\r\n }",
"@Override\n public void onClick(DialogInterface dialog, int id) {\n \n }",
"@Override\n public void onClick(View v) {\n FragmentManager fm = getFragmentManager();\n ConfirmDialogFragment cfDialog =\n ConfirmDialogFragment.getNewInstance(R.string.add_confirm, R.string.save_title);\n cfDialog.setTargetFragment(MemeViewFragment.this, REQUEST_CODE4);\n cfDialog.show(fm, CONFIRM);\n }",
"public void onClick(DialogInterface dialog, int which) {\n\n }",
"public void onClick(DialogInterface dialog, int id) { }",
"public void onClick(DialogInterface dialog, int which) {\n\n }",
"public void onClick(DialogInterface dialog, int id) {\n }",
"public void onClick(DialogInterface dialog, int id) {\n }",
"public void onClick(DialogInterface dialog, int id) {\n }",
"public void onClick(DialogInterface dialog, int id) {\n }",
"public void onClick(DialogInterface dialog, int id) {\n }",
"public void onClick(DialogInterface dialog, int id) {\n }",
"public void onClick(DialogInterface dialog, int id) {\n }",
"public void onClick(DialogInterface dialog, int id) {\n }",
"public void onClick(DialogInterface dialog, int id) {\n }",
"public void onClick(DialogInterface dialog, int id) {\n }",
"public void onClick(DialogInterface dialog, int id) {\n }",
"public void onClick(DialogInterface dialog, int id) {\n }",
"public void onClick(DialogInterface dialog, int id) {\n }",
"public void onClick(DialogInterface dialog, int id) {\n }",
"public void onClick(DialogInterface dialog, int id) {\n }",
"public void onClick(DialogInterface dialog, int id) {\n }",
"public void onClick(DialogInterface dialog, int id) {\n }",
"public void onClick(DialogInterface dialog, int id) {\n }",
"public void onClick(DialogInterface dialog, int id) {\n }",
"@Override \n\t\t\t \tpublic void onClick(DialogInterface dialog, int id) {\n\t\t\t \t\tmListener.onSettingsPositiveClick(SettingsDialogFragment.this);\n\t\t\t \t}",
"public void onClick(DialogInterface dialog, int whichButton) {\n }",
"public void onClick(DialogInterface dialog, int id) {\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\n\t\t\t\tshowdialog();\n\n\t\t\t}",
"public void onClick(DialogInterface dialog, int id) {\n }",
"public void onClick(DialogInterface dialog, int whichButton) {\n }",
"public void onClick(DialogInterface dialog, int whichButton) {\n }",
"public void onClick(DialogInterface dialog, int whichButton) {\n }",
"public void onClick(DialogInterface dialog, int whichButton) {\n }",
"public void onClick(DialogInterface dialog, int id) {\n }",
"public void onClick(DialogInterface dialog, int id) {\n }",
"public void onClick(DialogInterface dialog, int id) {\n }",
"public void onClick(DialogInterface dialog, int id) {\n }",
"public void onClick(DialogInterface dialog, int id) {\n }",
"public void onClick(DialogInterface dialog, int id) {\n }",
"public void onClick(DialogInterface dialog, int id) {\n }",
"public void onClick(DialogInterface dialog, int id) {\n }",
"public void onClick(DialogInterface dialog, int id) {\n }",
"public void onClick(DialogInterface dialog, int id) {\n }",
"public void onClick(DialogInterface dialog, int id) {\n }",
"public void onClick(DialogInterface dialog, int id) {\n }",
"public void onClick(DialogInterface dialog, int which) {\n\n }",
"public void onClick(DialogInterface dialog, int whichButton) {\n\t\t }",
"public void onClick(DialogInterface dialog, int whichButton) {\n\t\t\t\t\t\t }",
"public void onClick(DialogInterface dialog, int whichButton)\r\n\t {\r\n\t }",
"public void onClick(DialogInterface dialog, int whichButton)\r\n\t {\r\n\t }",
"public void onClick(DialogInterface dialog, int id) {\n }",
"public void onClick(DialogInterface dialog, int id) {\n }",
"public void onClick(DialogInterface dialog, int id) {\n }",
"public void onClick(DialogInterface dialog, int id) {\n }",
"public void onClick(DialogInterface dialog, int id) {\n }",
"public void onClick(DialogInterface dialog, int id) {\n }",
"public void onClick(DialogInterface dialog, int id) {\n }",
"public void onClick(DialogInterface dialog, int which) {\n }",
"public void onClick(DialogInterface dialog, int which) {\n }",
"public void onClick(DialogInterface dialog, int which) {\n }",
"public void onClick(DialogInterface dialog, int which) {\n }",
"public void onClick(DialogInterface dialog, int which) {\n }",
"public void onClick(DialogInterface dialog, int which) {\n }",
"public void onClick(DialogInterface dialog, int whichButton) {\n\t\t\t }"
]
| [
"0.84945464",
"0.79012394",
"0.7824403",
"0.7636068",
"0.7590929",
"0.75433147",
"0.74476534",
"0.7424516",
"0.7389888",
"0.7283796",
"0.7168562",
"0.7167252",
"0.7117434",
"0.7104133",
"0.7049274",
"0.70399356",
"0.70015204",
"0.70015204",
"0.70015204",
"0.70015204",
"0.70015204",
"0.70015204",
"0.6989355",
"0.6989355",
"0.6989355",
"0.6989355",
"0.6989355",
"0.6989355",
"0.6989355",
"0.6982454",
"0.69799197",
"0.697893",
"0.697893",
"0.697893",
"0.69748956",
"0.69740695",
"0.6961242",
"0.6954638",
"0.69413424",
"0.6940707",
"0.69403774",
"0.6939104",
"0.693555",
"0.69353485",
"0.69353485",
"0.69353485",
"0.69353485",
"0.69353485",
"0.69353485",
"0.69353485",
"0.69353485",
"0.69353485",
"0.69353485",
"0.69353485",
"0.69353485",
"0.69353485",
"0.69353485",
"0.69353485",
"0.69353485",
"0.69353485",
"0.6931923",
"0.6928396",
"0.6926205",
"0.69136435",
"0.6913202",
"0.6912856",
"0.69121253",
"0.69121253",
"0.69121253",
"0.69121253",
"0.6909321",
"0.6909321",
"0.6909321",
"0.6909321",
"0.6909321",
"0.6909321",
"0.6909321",
"0.6909321",
"0.6909321",
"0.6909321",
"0.6909321",
"0.6909321",
"0.69067067",
"0.69053966",
"0.6903556",
"0.68959284",
"0.68959284",
"0.6895082",
"0.6895082",
"0.6895082",
"0.6895082",
"0.6895082",
"0.6895082",
"0.6895082",
"0.6893901",
"0.6893901",
"0.6893901",
"0.6893901",
"0.6893901",
"0.6893901",
"0.6892091"
]
| 0.0 | -1 |
TODO Autogenerated method stub | public int deleteEntities(String[] ids) {
return 0;
} | {
"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 | public int countEntities(Map<String, Object> parms) {
return 0;
} | {
"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 |
Gets the value of the accountId property. | public long getAccountId() {
return accountId;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getAccountId() {\n return accountId;\n }",
"public String getAccountId() {\n return accountId;\n }",
"public String getAccountId() {\n\t\treturn accountId;\n\t}",
"public String getAccountId() {\n\t\treturn accountId;\n\t}",
"public String getAccountId() {\n return this.accountId;\n }",
"public io.lightcone.data.types.AccountID getAccountId() {\n return accountId_ == null ? io.lightcone.data.types.AccountID.getDefaultInstance() : accountId_;\n }",
"public Long getAccountId() {\n\t\treturn accountId;\n\t}",
"public Integer getAccountId() {\n return this.accountId;\n }",
"public Long getAccountId() {\n return accountId;\n }",
"public Integer getAccountId() {\n return accountId;\n }",
"public Integer getAccountId() {\n return accountId;\n }",
"public java.lang.String getAccountId() {\n java.lang.Object ref = accountId_;\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 accountId_ = s;\n }\n return s;\n }\n }",
"public java.lang.String getAccountId() {\n java.lang.Object ref = accountId_;\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 accountId_ = s;\n }\n return s;\n }\n }",
"public java.lang.String getAccountId() {\n java.lang.Object ref = accountId_;\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 accountId_ = s;\n }\n return s;\n }\n }",
"public java.lang.String getAccountId() {\n java.lang.Object ref = accountId_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n accountId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getAccountId() {\n java.lang.Object ref = accountId_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n accountId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getAccountId() {\n java.lang.Object ref = accountId_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n accountId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public long getAccountId() {\n\t\treturn accountId;\n\t}",
"public String getAccountId() {\n return mAccountId;\n }",
"public io.lightcone.data.types.AccountID getAccountId() {\n if (accountIdBuilder_ == null) {\n return accountId_ == null ? io.lightcone.data.types.AccountID.getDefaultInstance() : accountId_;\n } else {\n return accountIdBuilder_.getMessage();\n }\n }",
"public int getAccountId() {\n return accountId;\n }",
"java.lang.String getAccountId();",
"java.lang.String getAccountId();",
"java.lang.String getAccountId();",
"public String getAccountId() {\r\n return (String) getAttributeInternal(ACCOUNTID);\r\n }",
"public com.google.protobuf.ByteString\n getAccountIdBytes() {\n java.lang.Object ref = accountId_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n accountId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public com.google.protobuf.ByteString\n getAccountIdBytes() {\n java.lang.Object ref = accountId_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n accountId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public com.google.protobuf.ByteString\n getAccountIdBytes() {\n java.lang.Object ref = accountId_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n accountId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public com.google.protobuf.ByteString\n getAccountIdBytes() {\n java.lang.Object ref = accountId_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n accountId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public com.google.protobuf.ByteString\n getAccountIdBytes() {\n java.lang.Object ref = accountId_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n accountId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public com.google.protobuf.ByteString\n getAccountIdBytes() {\n java.lang.Object ref = accountId_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n accountId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"@JsonProperty(\"accountId\")\n public String getAccountId() {\n return accountId;\n }",
"com.google.protobuf.ByteString\n getAccountIdBytes();",
"com.google.protobuf.ByteString\n getAccountIdBytes();",
"com.google.protobuf.ByteString\n getAccountIdBytes();",
"Long getAccountId();",
"public io.lightcone.data.types.AccountIDOrBuilder getAccountIdOrBuilder() {\n return getAccountId();\n }",
"public io.lightcone.data.types.AccountIDOrBuilder getAccountIdOrBuilder() {\n if (accountIdBuilder_ != null) {\n return accountIdBuilder_.getMessageOrBuilder();\n } else {\n return accountId_ == null ?\n io.lightcone.data.types.AccountID.getDefaultInstance() : accountId_;\n }\n }",
"@ApiModelProperty(required = true, value = \"account to that payment belongs (to which it is accounted)\")\n public BigDecimal getAccountId() {\n return accountId;\n }",
"public Long getUserAccountId() {\r\n return userAccountId;\r\n }",
"@javax.annotation.Nullable\n @ApiModelProperty(value = \"ID of the account that created this participant.\")\n\n public String getAccountId() {\n return accountId;\n }",
"public String getAccountId() {\n return (String)(userItem.getId());\n }",
"@ApiModelProperty(value = \"The Xero identifier for an account\")\n /**\n * The Xero identifier for an account\n *\n * @return accountId UUID\n */\n public UUID getAccountId() {\n return accountId;\n }",
"public String getMyAccountId()\n\t{\n\t\treturn (String) session.getAttribute(\"accountId\");\n\t}",
"public java.lang.Object getAccountID() {\n return accountID;\n }",
"@SequenceGenerator(name = \"generator\", sequenceName=\"SEQ_CUSTOMER_ACCOUNT_MANAGENT\", allocationSize = 1)\n\t@Id\n\t@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = \"generator\")\n\t@Column(name = \"ACCOUNT_ID\", unique = true, nullable = false, precision = 20, scale = 0)\n\tpublic BigDecimal getAccountId() {\n\t\treturn this.accountId;\n\t}",
"public Long getAccountID() {\n return accountID;\n }",
"public Long getAccountID() {\n return accountID;\n }",
"public Long getAccountID() {\n return accountID;\n }",
"public Long getAccountID() {\n return accountID;\n }",
"public java.lang.String getAccount_Id() {\n return account_Id;\n }",
"public static Account getAccount(String accountId) {\r\n return (accounts.get(accountId));\r\n }",
"public String getAccountIdType() {\n return accountIdType;\n }",
"public Integer getAcctId() {\n return acctId;\n }",
"public String getAccount() {\n return account;\n }",
"public String getAccount() {\n return account;\n }",
"public String getAccount() {\n return account;\n }",
"public String getAccount() {\n return account;\n }",
"public String getAccount() {\n return account;\n }",
"public String getAccount() {\n return account;\n }",
"public String getAccount() {\n return account;\n }",
"public String getAccount() {\n return account;\n }",
"public String getAccount() {\n return account;\n }",
"public String getAccount() {\n return account;\n }",
"public String getAccountID() {\n return (tozAdAccountID);\n }",
"public String getAccount() {\r\n return account;\r\n }",
"public Long getSourceAccountId() {\n return sourceAccountId;\n }",
"public int getAccountID() {\n return accountID;\n }",
"public String getAccount() {\r\n\t\treturn account;\r\n\t}",
"public void setAccountId(Integer value) {\n this.accountId = value;\n }",
"public String getAccount(){\n\t\treturn account;\n\t}",
"public void setAccountId(String accountId) {\n this.accountId = accountId;\n }",
"public java.lang.String getAccount() {\n java.lang.Object ref = account_;\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 account_ = s;\n }\n return s;\n }\n }",
"public long getAccountId()\r\n/* 115: */ {\r\n/* 116:121 */ return this.accountId;\r\n/* 117: */ }",
"public java.lang.String getAccount() {\n java.lang.Object ref = account_;\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 account_ = s;\n return s;\n }\n }",
"public void setAccountId(String accountId) {\n this.accountId = accountId;\n }",
"public void setAccountId(String accountId) {\n this.accountId = accountId;\n }",
"String getAccountID();",
"String getAccountID();",
"public String getOwnerAccountId() {\n return this.ownerAccountId;\n }",
"public java.lang.String getAccount() {\n java.lang.Object ref = account_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n account_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public void setAccountId(Integer accountId) {\n this.accountId = accountId;\n }",
"public java.lang.String getAccount() {\n java.lang.Object ref = account_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n account_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public String getAccountName() {\n return accountName;\n }",
"public String getAccountName() {\n return accountName;\n }",
"public String getAccountName() {\n return accountName;\n }",
"@Column(name = \"ACCOUNT_ID\")\n\tpublic String getAccountID()\n\t{\n\t\treturn accountID;\n\t}",
"public String getAccountName() {\r\n return accountName;\r\n }",
"public String getAccountName() {\n return this.accountName;\n }",
"public String getAccountCode() {\n return accountCode;\n }",
"public void setAccountId(int accountId) {\n this.accountId = accountId;\n }",
"java.lang.String getAccount();",
"public String getAccountNumber() {\n\t\tthis.setAccountNumber(this.account);\n\t\treturn this.account;\n\t}",
"public void setAccountId(long value) {\n this.accountId = value;\n }",
"public java.lang.String getAccountNumber() {\n return accountNumber;\n }",
"public void setAccountId(Long accountId) {\n this.accountId = accountId;\n }",
"@JsonGetter(\"bank_account_id\")\r\n public String getBankAccountId() {\r\n return bankAccountId;\r\n }",
"public Integer getAccountNumber() {\n return accountNumber;\n }",
"public Integer getAccountNumber() {\n return accountNumber;\n }",
"public java.lang.String getAccountNumber() {\r\n return accountNumber;\r\n }"
]
| [
"0.8301011",
"0.8301011",
"0.82768995",
"0.82768995",
"0.82346284",
"0.8202037",
"0.81597173",
"0.8155866",
"0.81554145",
"0.8145926",
"0.8145926",
"0.81022036",
"0.81022036",
"0.81022036",
"0.80702",
"0.80702",
"0.80702",
"0.80178374",
"0.800108",
"0.7887783",
"0.78616005",
"0.7859121",
"0.7859121",
"0.7859121",
"0.78457624",
"0.77621895",
"0.77621895",
"0.77621895",
"0.7733198",
"0.7733198",
"0.7733198",
"0.7697101",
"0.7477496",
"0.7477496",
"0.7477496",
"0.74560773",
"0.7425863",
"0.740126",
"0.73511636",
"0.73056155",
"0.7248457",
"0.71845824",
"0.71823364",
"0.7124434",
"0.7044263",
"0.70169604",
"0.69500315",
"0.69500315",
"0.69492805",
"0.69492805",
"0.6899491",
"0.68811935",
"0.68177754",
"0.6802658",
"0.6767554",
"0.6767554",
"0.6767554",
"0.6767554",
"0.6767554",
"0.6767554",
"0.6767554",
"0.6767554",
"0.6767554",
"0.6767554",
"0.6717355",
"0.6713267",
"0.67070585",
"0.66940534",
"0.6682557",
"0.6583564",
"0.6580857",
"0.6561901",
"0.65436006",
"0.65304935",
"0.6528867",
"0.6521393",
"0.6521393",
"0.6514846",
"0.6514846",
"0.65114236",
"0.649524",
"0.64679825",
"0.6466976",
"0.6463703",
"0.6463703",
"0.6463703",
"0.6460557",
"0.6453058",
"0.6443655",
"0.6385009",
"0.6374769",
"0.63720846",
"0.63716614",
"0.6369991",
"0.63659066",
"0.63503706",
"0.63396204",
"0.63283795",
"0.63283795",
"0.63176036"
]
| 0.801915 | 17 |
Sets the value of the accountId property. | public void setAccountId(long value) {
this.accountId = value;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setAccountId(int accountId) {\n this.accountId = accountId;\n }",
"public void setAccountId(UUID accountId) {\n this.accountId = accountId;\n }",
"public void setAccountId(Integer accountId) {\n this.accountId = accountId;\n }",
"public void setAccountId(String accountId) {\n this.accountId = accountId;\n }",
"void setAccountId(Long accountId);",
"public void setAccountId(String accountId) {\n this.accountId = accountId;\n }",
"public void setAccountId(String accountId) {\n this.accountId = accountId;\n }",
"public void setAccountId(String accountId) {\n\t\tthis.accountId = accountId == null ? null : accountId.trim();\n\t}",
"public void setAccountId(String accountId) {\n\t\tthis.accountId = accountId == null ? null : accountId.trim();\n\t}",
"public void setAccountId(String accountId) {\n this.accountId = accountId == null ? null : accountId.trim();\n }",
"public void setAccountId(Long accountId) {\n this.accountId = accountId;\n }",
"public void setAccountId(Integer value) {\n this.accountId = value;\n }",
"public void setAccountId(Long accountId) {\n\t\tthis.accountId = accountId;\n\t}",
"public void setAccountId(String s) { accountId = s;}",
"public void setAccountId(String value) {\r\n setAttributeInternal(ACCOUNTID, value);\r\n }",
"public Builder setAccountId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n accountId_ = value;\n onChanged();\n return this;\n }",
"public Builder setAccountId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n accountId_ = value;\n onChanged();\n return this;\n }",
"public Builder setAccountId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000008;\n accountId_ = value;\n onChanged();\n return this;\n }",
"public Builder setAccountId(io.lightcone.data.types.AccountID value) {\n if (accountIdBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n accountId_ = value;\n onChanged();\n } else {\n accountIdBuilder_.setMessage(value);\n }\n\n return this;\n }",
"public CashValidationResponse accountId(UUID accountId) {\n this.accountId = accountId;\n return this;\n }",
"void setAccount(final Account account);",
"public Builder setAccountIdBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n accountId_ = value;\n onChanged();\n return this;\n }",
"public Builder setAccountIdBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n accountId_ = value;\n onChanged();\n return this;\n }",
"public void setUserAccountId(Long userAccountId) {\r\n this.userAccountId = userAccountId;\r\n }",
"public Builder setAccountIdBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000008;\n accountId_ = value;\n onChanged();\n return this;\n }",
"public void setAccount(Account account) {\n this.account = account;\n }",
"public Builder setAccountID(long value) {\n validate(fields()[2], value);\n this.accountID = value;\n fieldSetFlags()[2] = true;\n return this; \n }",
"public String getAccountId() {\n\t\treturn accountId;\n\t}",
"public String getAccountId() {\n\t\treturn accountId;\n\t}",
"public Builder setAccountID(long value) {\n validate(fields()[0], value);\n this.accountID = value;\n fieldSetFlags()[0] = true;\n return this; \n }",
"public String getAccountId() {\n return this.accountId;\n }",
"public String getAccountId() {\n return accountId;\n }",
"public String getAccountId() {\n return accountId;\n }",
"public\n void\n setAccount(Account account)\n {\n itsAccount = account;\n }",
"public void setAccountID(Long value) {\n this.accountID = value;\n }",
"public void setAccountID(Long value) {\n this.accountID = value;\n }",
"public Long getAccountId() {\n\t\treturn accountId;\n\t}",
"protected void setAccountName(final String account) {\n this.account = account;\n }",
"public Long getAccountId() {\n return accountId;\n }",
"public void setAccount(String accountID) {\n this.account = accountID;\n }",
"@ApiModelProperty(value = \"The Xero identifier for an account\")\n /**\n * The Xero identifier for an account\n *\n * @return accountId UUID\n */\n public UUID getAccountId() {\n return accountId;\n }",
"public long getAccountId() {\n\t\treturn accountId;\n\t}",
"public Builder setAccount(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n account_ = value;\n onChanged();\n return this;\n }",
"public void setAcctId(Integer acctId) {\n this.acctId = acctId;\n }",
"public io.lightcone.data.types.AccountID getAccountId() {\n return accountId_ == null ? io.lightcone.data.types.AccountID.getDefaultInstance() : accountId_;\n }",
"@ApiModelProperty(required = true, value = \"account to that payment belongs (to which it is accounted)\")\n public BigDecimal getAccountId() {\n return accountId;\n }",
"public Integer getAccountId() {\n return accountId;\n }",
"public Integer getAccountId() {\n return accountId;\n }",
"public Integer getAccountId() {\n return this.accountId;\n }",
"public com.google.protobuf.ByteString\n getAccountIdBytes() {\n java.lang.Object ref = accountId_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n accountId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public com.google.protobuf.ByteString\n getAccountIdBytes() {\n java.lang.Object ref = accountId_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n accountId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public com.google.protobuf.ByteString\n getAccountIdBytes() {\n java.lang.Object ref = accountId_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n accountId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"void setAccountNumber(java.lang.String accountNumber);",
"public long getAccountId() {\n return accountId;\n }",
"@javax.annotation.Nullable\n @ApiModelProperty(value = \"ID of the account that created this participant.\")\n\n public String getAccountId() {\n return accountId;\n }",
"public void setAccount(String account) {\n this.account = account;\n }",
"public void setAccount(String account) {\n this.account = account;\n }",
"public void setAccount(String account) {\n this.account = account;\n }",
"public void setAccount(String account) {\n this.account = account;\n }",
"public synchronized void setAccountNumber(int number) {\n this.accountNumber = number;\n }",
"@SequenceGenerator(name = \"generator\", sequenceName=\"SEQ_CUSTOMER_ACCOUNT_MANAGENT\", allocationSize = 1)\n\t@Id\n\t@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = \"generator\")\n\t@Column(name = \"ACCOUNT_ID\", unique = true, nullable = false, precision = 20, scale = 0)\n\tpublic BigDecimal getAccountId() {\n\t\treturn this.accountId;\n\t}",
"public String getAccountId() {\n return mAccountId;\n }",
"@JsonProperty(\"accountId\")\n public String getAccountId() {\n return accountId;\n }",
"public com.google.protobuf.ByteString\n getAccountIdBytes() {\n java.lang.Object ref = accountId_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n accountId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public com.google.protobuf.ByteString\n getAccountIdBytes() {\n java.lang.Object ref = accountId_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n accountId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public com.google.protobuf.ByteString\n getAccountIdBytes() {\n java.lang.Object ref = accountId_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n accountId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public boolean setAccountNumber(int account) {\n\t\tif (account > 0)\n\t\t\tthis.account = String.valueOf(account);\n\t\telse\n\t\t\treturn false;\n\t\treturn true;\n\t}",
"public void setupAccount(long accountId) throws NamingException {\r\n\t\tloginToAccount(accountId);\r\n\t}",
"public int getAccountId() {\n return accountId;\n }",
"public void setAccount(String account) {\r\n\t\tthis.account = account;\r\n\t}",
"public void setUserAccount(final UserAccount.Immutable userAccount) {\n this.userAccount = userAccount;\n }",
"public void setAccount(com.huawei.www.bme.cbsinterface.cbs.businessmgr.Account account) {\r\n this.account = account;\r\n }",
"public void setAccount(String account) {\n this.account = account == null ? null : account.trim();\n }",
"public void setAccount(String account) {\n this.account = account == null ? null : account.trim();\n }",
"public void setAccount(String account) {\n this.account = account == null ? null : account.trim();\n }",
"public void setAccount(String account) {\n this.account = account == null ? null : account.trim();\n }",
"public void setAccount(String account) {\n this.account = account == null ? null : account.trim();\n }",
"public void setAccount(String account) {\r\n this.account = account == null ? null : account.trim();\r\n }",
"public Builder setAccount(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n account_ = value;\n onChanged();\n return this;\n }",
"public java.lang.String getAccountId() {\n java.lang.Object ref = accountId_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n accountId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getAccountId() {\n java.lang.Object ref = accountId_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n accountId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getAccountId() {\n java.lang.Object ref = accountId_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n accountId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public void setAccountID(java.lang.Object accountID) {\n this.accountID = accountID;\n }",
"public void setAccountName(String accountName){\n if(checkAccountClosed()){\n System.out.println(\"This transaction could not be processed. Please check your account status.\");\n }\n this.accountName = accountName;\n }",
"public void setAccountNumber(int accountNumberIn)\r\n\t{\r\n\t\t\r\n\t\tif (accountNumberIn >= ACCOUNT_NUM_MIN && accountNumberIn <= ACCOUNT_NUM_MAX)\r\n\t\t\r\n\t\t\taccountNumber = accountNumberIn;\r\n\t\t\r\n\t\telse\r\n\t\t\taccountNumber = -1;\r\n\t\t\r\n\t}",
"void accountSet(boolean admin, String username, String password, String fName, String lName, int accountId);",
"public void setAccountIdType(String accountIdType) {\n this.accountIdType = accountIdType;\n }",
"public Builder setAccountId(\n io.lightcone.data.types.AccountID.Builder builderForValue) {\n if (accountIdBuilder_ == null) {\n accountId_ = builderForValue.build();\n onChanged();\n } else {\n accountIdBuilder_.setMessage(builderForValue.build());\n }\n\n return this;\n }",
"public Builder setAccount(net.nyhm.protonet.example.proto.AccountProto.Account value) {\n if (accountBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n account_ = value;\n onChanged();\n } else {\n accountBuilder_.setMessage(value);\n }\n bitField0_ |= 0x00000004;\n return this;\n }",
"public Builder setAccount(net.nyhm.protonet.example.proto.AccountProto.Account value) {\n if (accountBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n account_ = value;\n onChanged();\n } else {\n accountBuilder_.setMessage(value);\n }\n bitField0_ |= 0x00000004;\n return this;\n }",
"public void setAccountNo (String AccountNo);",
"public Builder clearAccountId() {\n bitField0_ = (bitField0_ & ~0x00000001);\n accountId_ = getDefaultInstance().getAccountId();\n onChanged();\n return this;\n }",
"public Builder clearAccountId() {\n bitField0_ = (bitField0_ & ~0x00000001);\n accountId_ = getDefaultInstance().getAccountId();\n onChanged();\n return this;\n }",
"public void setAccountName(String accountName) {\n if (accountName != null) {\n this.accountName = accountName;\n }\n }",
"public io.lightcone.data.types.AccountIDOrBuilder getAccountIdOrBuilder() {\n return getAccountId();\n }",
"public Builder clearAccountId() {\n bitField0_ = (bitField0_ & ~0x00000008);\n accountId_ = getDefaultInstance().getAccountId();\n onChanged();\n return this;\n }",
"public io.lightcone.data.types.AccountID getAccountId() {\n if (accountIdBuilder_ == null) {\n return accountId_ == null ? io.lightcone.data.types.AccountID.getDefaultInstance() : accountId_;\n } else {\n return accountIdBuilder_.getMessage();\n }\n }",
"public void setAccountID(String accountID)\n\t{\n\t\tthis.accountID = accountID;\n\t}",
"public java.lang.String getAccountId() {\n java.lang.Object ref = accountId_;\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 accountId_ = s;\n }\n return s;\n }\n }",
"public java.lang.String getAccountId() {\n java.lang.Object ref = accountId_;\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 accountId_ = s;\n }\n return s;\n }\n }"
]
| [
"0.7986824",
"0.7953282",
"0.78935283",
"0.78059775",
"0.7799391",
"0.77686983",
"0.77686983",
"0.7728872",
"0.7728872",
"0.7723508",
"0.7675094",
"0.7642664",
"0.7613561",
"0.74370354",
"0.7360639",
"0.7188583",
"0.7188583",
"0.7172787",
"0.6849692",
"0.67671984",
"0.67533094",
"0.66018057",
"0.66018057",
"0.65932983",
"0.6540739",
"0.6346358",
"0.62725997",
"0.6271798",
"0.6271798",
"0.62707317",
"0.6251193",
"0.6250135",
"0.6250135",
"0.62365067",
"0.61931616",
"0.61931616",
"0.6159004",
"0.6148343",
"0.6111027",
"0.60963905",
"0.60566336",
"0.60354096",
"0.6015941",
"0.60084265",
"0.60064965",
"0.598148",
"0.59723073",
"0.59723073",
"0.59676075",
"0.59637684",
"0.59637684",
"0.59637684",
"0.5959675",
"0.5946314",
"0.59273016",
"0.5918638",
"0.5918638",
"0.5918638",
"0.5918638",
"0.58711356",
"0.58607864",
"0.583788",
"0.58236426",
"0.58219963",
"0.58219963",
"0.58219963",
"0.5818677",
"0.5798085",
"0.5796876",
"0.5788582",
"0.5759227",
"0.57289803",
"0.5718242",
"0.5718242",
"0.5718242",
"0.5718242",
"0.5718242",
"0.57022506",
"0.56925946",
"0.5685229",
"0.5685229",
"0.5685229",
"0.56801176",
"0.5644971",
"0.56323564",
"0.56285924",
"0.56138545",
"0.5609035",
"0.5607652",
"0.5607652",
"0.5600994",
"0.555485",
"0.555485",
"0.55437595",
"0.5534239",
"0.5516994",
"0.54971945",
"0.5480767",
"0.548071",
"0.548071"
]
| 0.7584144 | 13 |
creates an ArrayList that can contain Player objects | private GameController() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"ArrayList<IPlayer> buildPlayerList();",
"public Player()\n {\n playerItem = new ArrayList();\n }",
"public Player()\r\n {\r\n playerItem = new ArrayList();\r\n }",
"@Override\n public List<Player> getPlayers() {\n return new ArrayList<Player>(players);\n }",
"ArrayList<Player> getAllPlayer();",
"public ArrayList<Player> getPlayerList() {\n ArrayList<Player> ret = new ArrayList<>();\n ret.addAll(playerList);\n return ret;\n }",
"public static ArrayList<Player> getPlayerAry(){\n\t\treturn players;\n\t}",
"List<Player> listPlayers();",
"List<Player> getPlayers();",
"protected void newPlayerList() {\n int len = getPlayerCount();\n mPlayerStartList = new PlayerStart[ len ];\n for(int i = 0; i < len; i++) {\n mPlayerStartList[i] = new PlayerStart( 0.f, 0.f );\n }\n }",
"public void initializePlayers(){\r\n allPlayers = new ArrayList<Player>();\r\n currentPlayerIndex = 0;\r\n Player redPlayer = new Player(1, new Location(2, 2), Color.RED);\r\n Player bluePlayer = new Player(2, new Location(4, 2), Color.BLUE);\r\n Player whitePlayer = new Player(3, new Location(2, 4), Color.WHITE);\r\n Player yellowPlayer = new Player(4, new Location(4, 4), Color.YELLOW);\r\n allPlayers.add(redPlayer);\r\n allPlayers.add(bluePlayer);\r\n allPlayers.add(whitePlayer);\r\n allPlayers.add(yellowPlayer);\r\n }",
"public ArrayList<Player> getPlayers() {\n return players;\n}",
"public static ArrayList<Player> getWinners(){return winners;}",
"public PlayerServices(){\n playerList = new ArrayList<>();\n }",
"public List<Player> getPlayerList(){\n return this.players;\n }",
"public ArrayList<Player> getPlayers() {\n return players;\n }",
"@Override\n public List<Player> getPlayers() {\n return players;\n }",
"public Player(){\r\n cards = new ArrayList<String>();\r\n indexes = new ArrayList<Integer>();\r\n }",
"public ArrayList<Entity> getPlayers() {\n ArrayList<Entity> players = new ArrayList<>();\n students.forEach(student -> players.add(student.getPlayer()));\n return players;\n }",
"private void createPlayers() {\n // create human player first\n Player human = new Player(\"Player 1\", true);\n players.add(human);\n \n // create remaining AI Players\n for (int i = 0; i < numAIPlayers; i++) {\n Player AI = new Player(\"AI \" + (i + 1), false);\n players.add(AI);\n }\n }",
"@Override\n public ArrayList<Player> getPlayers() {return steadyPlayers;}",
"public ArrayList<Player> getPlayers() {\n return players;\n }",
"public CopyOnWriteArrayList<Player> getPlayerList() \t\t\t\t\t\t\t{ return this.playerList; }",
"@Override\n public ArrayList<Player> getPlayers() throws RemoteException {\n return players;\n }",
"public PlayerDAO(){\n\t\tplayerList = new ArrayList<Player>();\n\t}",
"private Collection<Player> getPlayers() {\n\t\treturn players;\n\t}",
"public List<Player> getPlayers() {\r\n return players;\r\n }",
"public List<Player> getPlayers() {\r\n return players;\r\n }",
"public void addPlayers(ArrayList<Player> players) {\r\n\t\tthis.players = players;\r\n\t}",
"Collection<User> players();",
"static List<Player> getAllPlayers() {\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic ArrayList<PlayerPO> getAllPlayers() {\n\t\treturn playerController.getAllPlayers();\r\n\t}",
"public Player[] getPlayers() {\r\n return players;\r\n }",
"public Player[] getPlayers() {\n return players;\n }",
"public Collection<Player> getPlayersChunk() {\n var chunk = new Chunk<Player>();\n var playersChunk = chunk.get(this.players, ALL_PLAYERS_CHUNK_SIZE, allPlayersChunkIndex);\n\n // up to ALL_PLAYERS_CHUNK_SIZE with empty players\n // to have an even view\n var startIndex = playersChunk.size();\n for (var i = startIndex; i < ALL_PLAYERS_CHUNK_SIZE; i++) {\n playersChunk.add(new Player(new Person()));\n }\n\n return playersChunk;\n }",
"public abstract Collection<PlayerFish> getPlayers();",
"public List<PlayerInstance> getAllPlayers()\n\t{\n\t\tfinal List<PlayerInstance> players = new ArrayList<>();\n\t\tfor (Creature temp : getCharactersInside())\n\t\t{\n\t\t\tif (temp instanceof PlayerInstance)\n\t\t\t{\n\t\t\t\tplayers.add((PlayerInstance) temp);\n\t\t\t}\n\t\t}\n\t\treturn players;\n\t}",
"private void getPlayerList(){\r\n\r\n PlayerDAO playerDAO = new PlayerDAO(Statistics.this);\r\n players = playerDAO.readListofPlayerNameswDefaultFirst();\r\n\r\n }",
"public ArrayList<CardGamePlayer> getPlayerList(){\n\t\treturn this.playerList;\n\t}",
"public List<Player> getPlayerList()\n\t{\n\t\treturn playerList;\n\t}",
"public List<Player> getAllPlayers() {\r\n // TODO fix actual order of players in the List.\r\n\r\n List<Player> players = new ArrayList<>();\r\n players.addAll(teamRed.getPlayers());\r\n players.addAll(teamBlue.getPlayers());\r\n\r\n return players;\r\n }",
"public void setUpPlayers() {\n this.players.add(new Player(\"Diogo\"));\n this.players.add(new Player(\"Hayden\"));\n this.players.add(new Player(\"Gogo\"));\n }",
"public Player[] getPlayers() {\n return this.players;\n }",
"public Player[] getPlayers() {\n return this.players;\n }",
"public void addPlayerToTheList(){\n \tif(!txtFieldPlayerName.getText().trim().isEmpty() && totPlayers <= maximumPlayersAllowed){\n\t\t\t\n \t\t//creates a new Player and adds the name that the user inputs from the textField\n\t\t\tplayer.add(new Player(txtFieldPlayerName.getText()));\n\t\t\n\t\t\tString playerName = \"\";\n\t\t\tint playerNr = 1;\n\t\t\t\n\t\t\tfor(Player p : player){\n\t\t\t\tplayerName += playerNr+\": \"+p.getName()+\"<br>\"; \n\t\t\t\tplayerNr++;\n\t\t\t}\n\t\t\t\n\t\t\ttotPlayers++;\n\t\t\tlblPlayerList.setText(\"<html><h2>PLAYER LIST</h2>\"+playerName+\"</html>\");\n\t\t\ttxtFieldPlayerName.setText(\"\");\n\t\t}\n\t\t\n\t\tif(totPlayers >= minimumPlayersAllowed){\n\t\t\tbtnPlay.setEnabled(true);\n\t\t}\n\t\t\n\t\tif(totPlayers >= maximumPlayersAllowed){\n\t\t\tbtnAddPlayer.setEnabled(false);\n\t\t\ttxtFieldPlayerName.setEnabled(false);\n\t\t}\n }",
"public void createPlayerListArray(int numberOfPlayers) throws IOException {\n //Generate string from JSON data\n String jsonFile = \"data/players.json\";\n //Instantiate new Gson class\n Gson gson = new Gson();\n FileReader fileReader = new FileReader(jsonFile);\n JsonReader jsonReader = new JsonReader(fileReader);\n ReadJson[] data = gson.fromJson(jsonReader, ReadJson[].class);\n\n for (int i = 0; i < numberOfPlayers; i++) {\n\n String firstName = data[i].getFirst_name();\n String lastName = data[i].getLast_name();\n\n this.playersList.add(new Player(firstName, lastName));\n //shuffle the arrayList for randomness\n Collections.shuffle(playersList);\n\n }\n }",
"public void addPlayer(Player player) {\n playerList.add(player);\n }",
"@Override\n\tpublic List<Player> getPlayer() {\n\t\treturn ofy().load().type(Player.class).list();\n\t}",
"public Player[] getPlayers()\n\t{\n\t\treturn players;\n\t}",
"public List<PlayerItem> getAllPlayerItemById(Player player);",
"public ServerPlayers() {\n sockets = new ArrayList<Socket>();\n }",
"public Player[] getPlayers()\r\n\t{\r\n\t\treturn this.players;\r\n\t}",
"public List<Player> findAllPlayers(){\n\t\treturn playerRepository.findAll();\n\t}",
"public void setPlayers(ArrayList<Player> players) {\n this.players = players;\n }",
"public List<Player> getPlayers() {\r\n\t\treturn players;\r\n\t}",
"public static List<Player> getTrackablePlayers() {\n\t\tPlayer[] players = Bukkit.getOnlinePlayers();\n\t\tList<Player> players1 = new ArrayList<Player>();\n\t\tfor (int i = 0; i < players.length; i++) {\n\t\t\tif (!players[i].hasMetadata(\"invisible\")) {\n\t\t\t\tplayers1.add(players[i]);\n\t\t\t}\n\n\t\t}\n\t\treturn players1;\n\t}",
"public void addPlayer(Player player){\n players.add(player);\n }",
"public void createPlayers() {\r\n\t\tPlayerList playerlist = new PlayerList();\r\n\t\tPlayer p = new Player();\r\n\t\tfor (int x = 0; x <= players; x++) {\r\n\t\t\tplayerlist.createPlayer(p);\r\n\t\t}\r\n\r\n\t\tScanner nameScanner = new Scanner(System.in);\r\n\r\n\t\tfor (int createdPlayers = 1; createdPlayers < players; createdPlayers++) {\r\n\t\t\tSystem.out.println(\"Enter next player's name:\");\r\n\t\t\tplayerlist.namePlayer(createdPlayers, nameScanner.nextLine());\r\n\t\t}\r\n\t\tnameScanner.close();\r\n\t}",
"public List<Colour> getPlayerList();",
"public List<Player> formatPlayers(ResultSet rs) {\n\t\tList<Player> pList = new ArrayList<Player>();\n\t\ttry {\n\t\t\twhile (rs.next()) {\n\t\t\t\tPlayer p = new Player(rs.getString(3), rs.getString(4), rs.getDate(5), rs.getInt(6));\n\t\t\t\tpList.add(p);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn pList;\n\t}",
"public static Player[] createPlayers(){\r\n\t\tPlayer[] players = new Player[2];\r\n\t\tSystem.out.print(\"Enter three letter nick name of Player1: \");\r\n\t\tplayers[0] = new Player(getName(), 0);\r\n\t\tSystem.out.print(\"Enter three letter nick name of Player2: \");\r\n\t\tplayers[1] = new Player(getName(), 18);\r\n\t\treturn players;\r\n\t}",
"public ArrayList<Player> getListaJugadores(){\n return listaJugadores;\n }",
"public CompactPlayer[] getPlayers()\n {\n return players;\n }",
"public List<Player> getPlayers() {\r\n\t\tList<Player> playerList = new ArrayList<Player>();\r\n\r\n\t\tfor (Player p : players.values()) {\r\n\t\t\tif (p != null)\r\n\t\t\t\tplayerList.add(p);\r\n\t\t}\r\n\r\n\t\treturn playerList;\r\n\t}",
"public ArrayList<CardGamePlayer> getPlayerList() {\n\t\treturn playerList;\n\t}",
"public List<PlayerItem> getAll();",
"private void getPlayers() {\r\n\t\tSystem.out.println(\"How Many Players: \");\r\n\t\tpnum = getNumber(1, 3);\r\n\r\n\t\tfor(int i=0; i < pnum; i++){\r\n\t\t\tSystem.out.println(\"What is player \" + (i + 1) + \"'s name? \");\r\n\t\t\tString name = sc.next();\r\n\t\t\tboolean dupe = true;\r\n\t\t\twhile(dupe){\r\n\t\t\t\tint samecounter = 0;\r\n\t\t\t\tfor(Player p : players){\r\n\t\t\t\t\tif(name.equals(p.getName())){\r\n\t\t\t\t\t\tsamecounter += 1;\r\n\t\t\t\t\t\tSystem.out.println(\"Name is the same as another players. Please choose another name: \");\r\n\t\t\t\t\t\tname = sc.next();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif(samecounter == 0){\r\n\t\t\t\t\tdupe = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tplayers.add(new Player(name));\r\n\r\n\t\t}\r\n\t}",
"List<Player> getViewers();",
"public static ArrayList<EntityPlayer> getAll() {\r\n\t\ttry {\r\n\t\t\tArrayList<EntityPlayer> players = new ArrayList<EntityPlayer>();\r\n\t\t\t\r\n\t\t\tfor (EntityPlayer player : mc.world.playerEntities) {\r\n\t\t\t\tif (!player.isEntityEqual(mc.player)) {\r\n\t\t\t\t\tplayers.add(player);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn players;\r\n\t\t} catch (NullPointerException ignored) {\r\n\t\t\treturn new ArrayList<EntityPlayer>();\r\n\t\t}\r\n\t}",
"public List<Player> getPlayers() {\n\t\treturn players;\n\t}",
"private void createPlayers() {\n\t\t//Randomize roles\n\t\tArrayList<AdventurerEnum> randomisedRoles = getRandomisedRoles();\n\t\tfor(int i=0; i<numPlayers; i++) \n\t\t\tcreateOnePlayer(randomisedRoles.get(i), i+1);\n\t}",
"private void createSpritesList() {\n\t\tArrayList<PartyMember> pmList = player.getPartyMembers();\n\t\tfor (int i = 0; i < pmList.size(); i++) {\n\t\t\tSprite as = pmList.get(i);\n\t\t\tsprites.put(as.hashCode(), as);\n\t\t}\n\t\telements = new SortingElement[sprites.size()];\n\t\tIterator<Integer> it = sprites.keySet().iterator();\n\t\tint i = 0;\n\t\twhile (it.hasNext()) {\n\t\t\tint index = it.next();\n\t\t\tSprite as = sprites.get(index);\n\t\t\telements[i++] = new SortingElement(as.pos[Values.Y], index);\n\t\t}\n\t}",
"public List<Player> list() throws Exception {\r\n this.players = new ArrayList<>();\r\n File folder = new File(filepath);\r\n File[] files = folder.listFiles();\r\n for (int i = 0 ; i<files.length ; i++){\r\n if (files[i].isFile()){\r\n players.add(i,get(filepath+\"\\\\\"+files[i].getName()));\r\n }\r\n }\r\n return players;\r\n }",
"public ArrayList<String> getObjects(){\n ArrayList<String> objs = new ArrayList<>();\n for (int i = 0; i < field.length; i++){\n objs.add(\"Asteroid\");\n }\n return objs;\n }",
"List<Player> findAllPlayers();",
"private void createAIPlayers(int numOfAIPlayers) {\n // starts with 1 because HumanPlayer is in index 0\n for (int i = 1; i <= numOfAIPlayers; i++) {\n players[i] = new AIPlayer(\"AI\" + i);\n }\n }",
"public List<Player> getPlayersOrdered() {\r\n ArrayList<Player> result = new ArrayList<>();\r\n for (PlayerContainer container : players) {\r\n result.add(container.player);\r\n }\r\n return result;\r\n }",
"public void createPlayers() {\n\t\t\n\t\twhite = new Player(Color.WHITE);\n\t\twhite.initilizePieces();\n\t\tcurrentTurn = white;\n\t\t\n\t\tblack = new Player(Color.BLACK);\n\t\tblack.initilizePieces();\n\t}",
"public PlayList() {\n\t\tsongList = new ArrayList<Song>();\n\t}",
"public ArrayList<Player> importPlayerData() {\n \n try {\n //Try to access player.csv in the given directory\n\t\t\tFile file = new File(\"data\\\\player.csv\");\n Scanner fileIn = new Scanner(file);\n \n fileIn.skip(\"userName,fullName,password,gold,exp,noOfLand\");\n \n\t\t\t//Use comma as delimiter in extracting various player info\n\t\t\tfileIn.useDelimiter(\",|\\r\\n|\\n\");\n \n while (fileIn.hasNext()) {\n String userName = fileIn.next().trim();\n String fullName = fileIn.next().trim();\n String password = fileIn.next().trim();\n int gold = fileIn.nextInt();\n int exp = fileIn.nextInt();\n\t\t\t\tint noOfLand = fileIn.nextInt();\n\t\t\t\t\n\t\t\t\t//Create new players based on extracted info\n Player player = new Player(userName, fullName, password, gold, exp, noOfLand);\n\t\t\t\t\n\t\t\t\t//Add players to playerList\n playerList.add(player);\n }\n \n }\n \n catch (IOException e) {\n //Specify the location of IOException\n\t\t\te.printStackTrace();\n }\n\t\t\n\t\treturn playerList;\n\t}",
"public Game(String id){\n this.id = id;\n players = new ArrayList<>();\n }",
"public List<Player> getPlayers() {\n\n\t\treturn players;\n\t}",
"private void loadPlayers() {\r\n this.passive_players.clear();\r\n this.clearRoster();\r\n //Map which holds the active and passive players' list\r\n Map<Boolean, List<PlayerFX>> m = ServiceHandler.getInstance().getDbService().getPlayersOfTeam(this.team.getID())\r\n .stream().map(PlayerFX::new)\r\n .collect(Collectors.partitioningBy(x -> x.isActive()));\r\n this.passive_players.addAll(m.get(false));\r\n m.get(true).stream().forEach(E -> {\r\n //System.out.println(\"positioning \"+E.toString());\r\n PlayerRosterPosition pos = this.getPlayerPosition(E.getCapnum());\r\n if (pos != null) {\r\n pos.setPlayer(E);\r\n }\r\n });\r\n }",
"private void createSetOfPlayers(List<ImgPath.Color> colors, boolean auto, AutoplayMode autoMode) {\n int i = 0;\n for (ImgPath.Color c : ImgPath.Color.values()) {\n this.players[i] = new Player(c, auto, autoMode);\n this.players[i].setPIndex(i);\n //System.out.println(\"Player \"+c.name()+\" created.\");\n for(int j=0; j<4; j++){\n this.players[i].setXY(j);\n }\n if (colors.contains(c)) {\n this.players[i].setActive(true);\n this.xPlayers.add(i);\n }\n i++;\n }\n }",
"public static ArrayList<Player> getAllPlayingPlayers() {\n // Anton fix: Would copy the list itself, we want just the items.\n // Remove/add manipulations would affect original list\n /*\n * ArrayList<Player> all = players; for (Player player: all) { if\n * (!player.isPlaying()) { all.remove(player); } }\n */\n\n ArrayList<Player> all = new ArrayList<Player>();\n for (Player player : players) {\n if (player.isPlaying()) all.add(player);\n }\n\n return all;\n }",
"public List<Player> getAll() {\n PlayerDB pdb = new PlayerDB();\n return pdb.getAll();\n }",
"public Robber() {\n\t\t// robberPlayers = (ArrayList<Player>) GSC.players.clone();\n\t}",
"public static void createPlayers() {\n\t\tcomputer1 = new ComputerSpeler();\n\t\tspeler = new PersoonSpeler();\n//\t\tif (Main.getNumberOfPlayers() >= 3) { \n//\t\t\tSpeler computer2 = new ComputerSpeler();\n//\t\t}\n//\t\tif (Main.getNumberOfPlayers() == 4) {\n//\t\t\tSpeler computer3 = new ComputerSpeler();\n//\t\t}\n\n\n\t}",
"public ArrayList<Player> getPlayersInGame() {\n return playersInGame;\n }",
"public static ArrayList<String> getPlayerInformation() {\n clearScreen();\n ArrayList<String> Names = new ArrayList<String>();\n for (int i = 1; i < 3; i++) {\n System.out.println(\"Player \" + i + \"'s Name:\");\n Names.add(Input.nextLine());\n clearScreen();\n }\n return Names;\n }",
"public void setPlayers(ArrayList<Player> players) {\n\t\tthis.players = players;\n\t}",
"public Connect4Player[] getPlayers(){\n\t\tConnect4Player[] output = new Connect4Player[4];\n\t\tif(players.isEmpty()){\n\t\t\tplayers.add(new Connect4Player(this, TOKEN.X));\n\t\t\tplayers.add(new Connect4Player(this, TOKEN.O));\n\t\t}\n\t\toutput[0] = players.get(0);\n\t\toutput[1] = players.get(1);\n\t\treturn output;\n\t}",
"private ArrayList<T> createObjects(ResultSet resultSet) {\n\t\tArrayList<T> list = new ArrayList<T>();\n\t\ttry {\n\t\t\twhile (resultSet.next()) {\n\t\t\t\tT instance = null;\n\t\t\t\ttry {\n\t\t\t\t\tinstance = type.getDeclaredConstructor().newInstance();\n\t\t\t\t} catch (NoSuchMethodException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tfor (Field field : type.getDeclaredFields()) {\n\t\t\t\t\tObject value = resultSet.getObject(field.getName());\n\t\t\t\t\tPropertyDescriptor propertyDescriptor = new PropertyDescriptor(field.getName(), type);\n\t\t\t\t\tMethod method = propertyDescriptor.getWriteMethod();\n\t\t\t\t\tmethod.invoke(instance, value);\n\t\t\t\t}\n\t\t\t\tlist.add(instance);\n\t\t\t}\n\t\t} catch (InstantiationException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IllegalAccessException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (SecurityException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IllegalArgumentException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (InvocationTargetException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IntrospectionException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn list;\n\t}",
"@Override\r\n\tpublic ArrayList<PlayerPO> findPlayerByName(String name) {\n\t\treturn playerController.findPlayerByName(name);\r\n\t}",
"private void createPlayers() {\n\tGlobal.camera_player1 = new Camera(new OrthographicCamera());\n\tGlobal.camera_player2 = new Camera(new OrthographicCamera());\n\tGlobal.camera_ui = new OrthographicCamera();\n\tGlobal.player1 = new Plane(Global.player1_respawn.x,\n\t\tGlobal.player1_respawn.y, 0, new Planetype(PlaneTypes.F35),\n\t\tEntityType.PLAYER1);\n\tGlobal.player2 = new Plane(Global.player2_respawn.x,\n\t\tGlobal.player2_respawn.y, 0, new Planetype(PlaneTypes.F35),\n\t\tEntityType.PLAYER2);\n }",
"private List<Room> addRooms() {\n List<Room> rooms = new ArrayList<>();\n int numRooms = RandomUtils.uniform(random, MINROOMNUM, MAXROOMNUM);\n int playerRoomNum = RandomUtils.uniform(random, 0, numRooms);\n for (int i = 0; i < numRooms; i++) {\n rooms.add(addRandomRoom(random));\n if (i == playerRoomNum) {\n setPlayerInitialPosition(rooms, playerRoomNum);\n }\n }\n return rooms;\n }",
"public Pile(){\n pile = new ArrayList<Card>();\n }",
"public String[] getPlayers() {\r\n return playerIds;\r\n }",
"private void createSetOfPlayers(List<ImgPath.Color> colors, List<Boolean> auto, List<AutoplayMode> autoMode) {\n int i = 0;\n for (ImgPath.Color c : ImgPath.Color.values()) {\n this.players[i] = new Player(c, auto.get(i), autoMode.get(i));\n this.players[i].setPIndex(i);\n //System.out.println(\"Player \"+c.name()+\" created.\");\n for(int j=0; j<4; j++){\n this.players[i].setXY(j);\n }\n if (colors.contains(c)) {\n this.players[i].setActive(true);\n this.xPlayers.add(i);\n }\n i++;\n }\n }",
"public List<Player> getAllOrdered() {\n PlayerDB pdb = new PlayerDB();\n return pdb.getAllOrdered();\n }",
"private CompactPlayer[] toCompatPlayerArray(List<Player> playerList)\n {\n CompactPlayer[] arr = new CompactPlayer[playerList.size()];\n for(int i =0; i< playerList.size(); i++)\n {\n arr[i] = new CompactPlayer(playerList.get(i));\n }\n return arr;\n }"
]
| [
"0.78319466",
"0.74215704",
"0.73959255",
"0.7377569",
"0.73339444",
"0.72291595",
"0.72256595",
"0.7205654",
"0.7167832",
"0.7167477",
"0.7066718",
"0.7056798",
"0.6950345",
"0.6935536",
"0.6900472",
"0.68444955",
"0.6803092",
"0.679793",
"0.67354155",
"0.67337054",
"0.66950905",
"0.6691588",
"0.6630199",
"0.6626516",
"0.6615179",
"0.6593828",
"0.65344",
"0.65344",
"0.6525981",
"0.6498156",
"0.6491811",
"0.6488596",
"0.64538217",
"0.6426413",
"0.63704914",
"0.6368712",
"0.6342349",
"0.63406736",
"0.6332448",
"0.6325878",
"0.62986887",
"0.62344325",
"0.62197745",
"0.62197745",
"0.62162787",
"0.6210724",
"0.6204194",
"0.6169612",
"0.616865",
"0.6146406",
"0.61462176",
"0.6135735",
"0.61296725",
"0.6126884",
"0.61194",
"0.6118309",
"0.6100097",
"0.6086059",
"0.60847116",
"0.6073741",
"0.60685843",
"0.6068496",
"0.6062898",
"0.6059285",
"0.60467213",
"0.6027034",
"0.60255355",
"0.6024857",
"0.6009554",
"0.6005881",
"0.5990173",
"0.5977863",
"0.5970983",
"0.5959143",
"0.5955676",
"0.5955632",
"0.5950493",
"0.59387815",
"0.59263647",
"0.59221584",
"0.5911774",
"0.590291",
"0.5900639",
"0.58992714",
"0.5899108",
"0.589163",
"0.588689",
"0.58832705",
"0.58732647",
"0.5855112",
"0.58512986",
"0.58484036",
"0.58377993",
"0.58228076",
"0.58162034",
"0.58077866",
"0.5796974",
"0.5795427",
"0.5794776",
"0.579355",
"0.57852495"
]
| 0.0 | -1 |
stores the players location on the gameboard | public static void movePlayer(Player thisPlayer, int moveFields) {
if (thisPlayer.getOnField() + moveFields <= FIELD_COUNT) {
thisPlayer.setOnField(thisPlayer.getOnField() + moveFields);
} else {
thisPlayer.setOnField(thisPlayer.getOnField() + moveFields - FIELD_COUNT);
}
//"Moves" the car on the board by removing it in the previous location
// and then set it to the new location.
InterfaceController.removeAllCars(thisPlayer.getName());
InterfaceController.setCar(thisPlayer.getOnField(), thisPlayer.getName());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Location getPlayerLocation();",
"public void adjLocation(double l){this.PlayerLocation;}",
"private void setupPlayerPosition() {\n\t\tHashMap<Suspect, Coordinates> startPositions = new HashMap<Suspect, Coordinates>();\r\n\t\tstartPositions.put(Suspect.KasandraScarlet, new Coordinates(18, 28));\r\n\t\tstartPositions.put(Suspect.JackMustard, new Coordinates(7, 28));\r\n\t\tstartPositions.put(Suspect.DianeWhite, new Coordinates(0, 19));\r\n\t\tstartPositions.put(Suspect.JacobGreen, new Coordinates(0, 9));\r\n\t\tstartPositions.put(Suspect.EleanorPeacock, new Coordinates(6, 0));\r\n\t\tstartPositions.put(Suspect.VictorPlum, new Coordinates(20, 0));\r\n\r\n\t\tfor (int i = 0; i < this.listOfPlayer.size(); i++) {\r\n\t\t\tPlayer p = this.listOfPlayer.get(i);\r\n\t\t\tSuspect sus = p.getSuspect().getData();\r\n\t\t\tboolean b = p.setCoord(startPositions.get(sus), this.grid);\r\n\t\t\t// should always be able to put character on starting position\r\n\t\t}\r\n\t\tSystem.out.println(\"Initial player starting positions set\");\r\n\t}",
"public int getBoardLocation() {return boardLocation;}",
"void setPlayerLocation(Player p, int bp) {\n\t\t\tplayerLocationRepo.put(p, bp);\n\t\t}",
"int getPlayerLocation(Player p) {\n\t\t\treturn playerLocationRepo.get(p);\n\t\t}",
"public void setBoardLocation(int boardLocation) {this.boardLocation = boardLocation;}",
"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 updatePlayerLocation() {requires new property on gamestate object\n //\n }",
"MazePoint getActivePlayerCoordinates();",
"public Location getPlayersLocation(String player)\n\t{\n\t\treturn playerLocations.get(player);\n\t}",
"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 }",
"@Nonnull\n Location getPlayerLocation();",
"private void saveInitialGameLocation() {\n\n\t\tGAME_LIST = new ArrayList<gameLocation>();\n\n\t\tfor (int i = 0; i < NumGameLocation; i++) {\n\t\t\taddNewGame(getGameLocation(i));\n\t\t}\n\t}",
"public Point getXyLocation() {\n return playerxy;\n }",
"public static int[] findPlayerLocation(Player player){\r\n int playerX = 0;\r\n int playerY = 0;\r\n //finding the player on the board\r\n for (int i = 0; i < board.length; i++) {\r\n for (int j = 0; j < board[i].length; j++) {\r\n if (player.getPosition() == board[i][j]) {\r\n playerX = i;\r\n playerY = j;\r\n }\r\n }\r\n }\r\n\r\n int[] playerLocation = {playerX, playerY};\r\n\r\n return playerLocation;\r\n }",
"void setPlayerLocation(@Nonnull Location location);",
"public int[] savePlayerPosition(){\n int [] playerPosition = new int[2];\n playerPosition[0] = player.getX();\n playerPosition[1]= player.getY();\n return playerPosition;\n }",
"private static void setupLocations() {\n\t\tcatanWorld = Bukkit.createWorld(new WorldCreator(\"catan\"));\n\t\tspawnWorld = Bukkit.createWorld(new WorldCreator(\"world\"));\n\t\tgameLobby = new Location(catanWorld, -84, 239, -647);\n\t\tgameSpawn = new Location(catanWorld, -83, 192, -643);\n\t\thubSpawn = new Location(spawnWorld, 8, 20, 8);\n\t\twaitingRoom = new Location(catanWorld, -159, 160, -344);\n\t}",
"public void updatePosition(){\n\t\t//maps the position to the closest \"grid\"\n\t\tif(y-curY>=GameSystem.GRID_SIZE/2){\n\t\t\tcurY=curY+GameSystem.GRID_SIZE;\n\t\t\tyGridNearest++;\n\t\t}\n\t\telse if(curX-x>=GameSystem.GRID_SIZE/2){\n\t\t\tcurX=curX-GameSystem.GRID_SIZE;\n\t\t\txGridNearest--;\n\t\t}\n\t\telse if(x-curX>=GameSystem.GRID_SIZE/2){\n\t\t\tcurX=curX+GameSystem.GRID_SIZE;\n\t\t\txGridNearest++;\n\t\t}\n\t\telse if(curY-y>=GameSystem.GRID_SIZE/2){\n\t\t\tcurY=curY-GameSystem.GRID_SIZE;\n\t\t\tyGridNearest--;\n\t\t}\n\t\t//sets the last completely arrived location grid\n\t\tif(y-yTemp>=GameSystem.GRID_SIZE){\n\t\t\tyTemp=yTemp+GameSystem.GRID_SIZE;\n\t\t\ty=yTemp;\n\t\t\tlastY++;\n\t\t}\n\t\telse if(xTemp-x>=GameSystem.GRID_SIZE){\n\t\t\txTemp=xTemp-GameSystem.GRID_SIZE;\n\t\t\tx=xTemp;\n\t\t\tlastX--;\n\t\t}\n\t\telse if(x-xTemp>=GameSystem.GRID_SIZE){\n\t\t\txTemp=xTemp+GameSystem.GRID_SIZE;\n\t\t\tx=xTemp;\n\t\t\tlastX++;\n\t\t}\n\t\telse if(yTemp-y>=GameSystem.GRID_SIZE){\n\t\t\tyTemp=yTemp-GameSystem.GRID_SIZE;\n\t\t\ty=yTemp;\n\t\t\tlastY--;\n\t\t}\n\t\t//only updates nextX and nextY when the move buttons are being pressed down\n\t\t/*\n\t\tif(movable){\n\t\t\tif(direction.equals(\"right\")){\n\t\t\t\t\tnextX=lastX+1;\n\t\t\t\t\tnextY=lastY;\n\t\t\t}\n\t\t\telse if(direction.equals(\"left\")){\n\t\t\t\tnextX=lastX-1;\n\t\t\t\tnextY=lastY;\n\t\t\t}\n\t\t\telse if(direction.equals(\"up\")){\n\t\t\t\tnextY=lastY-1;\n\t\t\t\tnextX=lastX;\n\t\t\t}\n\t\t\telse if(direction.equals(\"down\")){\n\t\t\t\tnextY=lastY+1;\n\t\t\t\tnextX=lastX;\n\t\t\t}\n\t\t}\n\t\t*/\n\t\t\n\t}",
"public void setStartingPosition(GameTile [][] visibleMap) {\r\n\t\t//method to set the starting position of our player.\r\n\t\tfor(int i=0; i<visibleMap.length; i++) {\r\n\t\t\tfor(int j=0; j<visibleMap[i].length; j++) {\r\n\t\t\t\tif(visibleMap[i][j] != null && visibleMap[i][j].hasPlayer()) {\r\n\t\t\t\t\tplayerX = i;\r\n\t\t\t\t\tplayerY = j;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"String getLawnPosition();",
"public void storeNpcs() {\n\t\tNPCs = new HashMap<NPC, Location>();\n\n\t\tfor (Location location : board.getLocations().values()) {\n\t\t\tfor (Tile ta[] : location.getTiles()) {\n\t\t\t\tfor (Tile t : ta) {\n\t\t\t\t\tif (t.getGameObject() instanceof NPC) {\n\t\t\t\t\t\tNPCs.put((NPC) t.getGameObject(), location);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public static void worldLocsInsert(Player player) {\n\n\t\ttry {\n\n\t\t\tStatement st = conn.createStatement();\n\n\t\t\tLocation pLoc = player.getLocation();\n\t\t\tint x = pLoc.getBlockX();\n\t\t\tint y = pLoc.getBlockY();\n\t\t\tint z = pLoc.getBlockZ();\n\t\t\tUUID uuid = player.getUniqueId();\n\n\t\t\t/* This is easier... */\n\t\t\tst.executeUpdate(\"DELETE FROM worldlocs WHERE uuid='\" + uuid + \"';\");\n\t\t\tst.executeUpdate(\"INSERT INTO worldlocs(uuid, x, y, z) VALUES ('\" + uuid + \"', '\" + x + \"', '\" + y + \"', '\" + z + \"');\");\n\n\t\t\tst.close();\n\n\t\t} catch (Exception e) {\n\t\t\tPvPTeleport.instance.getLogger().info(e.getMessage());\n\t\t}\n\n\t}",
"public int getPlayerPosition(int player)\n {\n return players[player];\n }",
"@Test\n\tpublic void getNewPlayerLocation() {\n\t\tmap = new Map(10, 0, 0, 0);\n\t\tCavern cavernOne = new Cavern(0, 0);\n\t\tCavern cavernTwo = new Cavern(1, 0);\n\t\tCavern cavernThree = new Cavern(2, 0);\n\t\tCavern cavernFour = new Cavern(0, 1);\n\t\tcaverns.put(cavernOne, \"\");\n\t\tcaverns.put(cavernTwo, \"\");\n\t\tcaverns.put(cavernThree, \"\");\n\t\tcaverns.put(cavernFour, \"\");\n\t\tthis.bat = new Bat(this.player, caverns);\n\n\t\tplayer.setPlayerLocation(cavernOne);\n\n\t\tCavern newLocation = this.bat.getNewLocation();\n\t\tCavern playerLocation = this.bat.getOriginalLocation();\n\t\tassertNotNull(newLocation);\n\t\tassertTrue(playerLocation != newLocation);\n\t}",
"public Location getLocation(){\n\t\tWorld w = Bukkit.getWorld(worldName);\n\t\tif(w==null){\n\t\t\tSystem.out.println(\"Error, null world in Location from SQL\");\n\t\t\treturn null;\n\t\t}\n\t\treturn new Location(w, x+0.5, y, z+0.5);\n\t\t\n\t}",
"public Location getRandomLocationForPlayers() {\n\t\tfinal Location temp = getRandomLocationForMobs();\n\t\t\n\t\treturn new Location(temp.getWorld(), temp.getBlockX(), temp.getBlockY() + 1, temp.getBlockZ());\n\t}",
"public void setPlayerPosition(CellView playerPosition) {\n this.playerPosition = playerPosition;\n }",
"private void setPlayer()\t{\n\t\tgrid.setGameObject(spy, Spy.INITIAL_X, Spy.INITIAL_Y);\n\t}",
"public void setMove(char player, int place) {\n\n playBoard[place] = player;\n }",
"void playerPositionChanged(Player player);",
"protected abstract void position(int[][] gameboard, int col, int row);",
"@Override\n public Location getDisplayedLocation() {\n this.displayedLocation = new Location((int)pane.getHvalue(), (int)pane.getVvalue(), curFloor, \"Unknown\");\n return displayedLocation;\n }",
"void placePowerStation() {\n this.board.get(powerRow).get(powerCol).placePowerStation();\n }",
"public void setPlayerPosition(Player player) {\n if (player.getPositionX() < 0 && (player.getPositionY() > screenHeight / 2 - doorSize && player.getPositionY() < screenHeight / 2 + doorSize)) {\n //left exit to right entry\n player.position.x = screenWidth - wallSize - player.getRadius();\n player.position.y = player.getPositionY();\n } else if ((player.getPositionX() > screenWidth / 2 - doorSize && player.getPositionX() < screenWidth / 2 + doorSize) && player.getPositionY() < 0) {\n //top exit to bottom entry\n player.position.x = player.getPositionX();\n player.position.y = screenHeight - wallSize - player.getRadius();\n } else if (player.getPositionX() > screenWidth && (player.getPositionY() > screenHeight / 2 - doorSize && player.getPositionY() < screenHeight / 2 + doorSize)) {\n //right exit to left entry\n player.position.x = wallSize + player.getRadius();\n player.position.y = player.getPositionY();\n } else {\n //bottom exit to top entry\n player.position.x = player.getPositionX();\n player.position.y = wallSize + player.getRadius();\n }\n }",
"public void setSpawns() {\n List<Tile> spawns = this.board.getSpawns();// get all the possible spawns from board\n List<Tile> usedSpawns = new ArrayList<Tile>();// empty list used to represent all the spawns that have been used so no playerPiece gets the same spawn\n for (PlayerPiece playerPiece : this.playerPieces) { // for each playerPiece\n boolean hasSpawn = false; // boolean to represent whether the playerPiece has a spawn and used to initiate and stop the following while loop.\n while (!hasSpawn) { // while hasSpawn is false.\n int random_int = (int) (Math.random() * spawns.size());// get random number with max number of the total possible tiles the pieces can spawn from\n Tile spawn = spawns.get(random_int); // get spawn from spawns list using the random int as an index\n if (!usedSpawns.contains(spawn)) {// if the spawn isn't in the usedSpawn list\n playerPiece.setLocation(spawn);// set the location of the playerPiece to the spawn\n usedSpawns.add(spawn);//add the spawn to usedSpawns\n hasSpawn = true; // set the variable to true so the while loop stops.\n }\n }\n }\n }",
"private void setLocations(){\n\t\tbuttonArea.setSize(FRAME_WIDTH, 50);\n\t\tbuttonArea.setLocation(0, 0);\n\t\tboardOne.setSize(600,600);\n\t\tboardOne.setLocation(0,buttonArea.getHeight());\n\t\tboardTwo.setSize(600,600);\n\t\tboardTwo.setLocation(boardOne.getWidth() + 10,buttonArea.getHeight());\n\t\tboardOne.setIcon(background);\n\t\tboardTwo.setIcon(background);\n\t\tnewGame.setSize(100,20);\n\t\tnewGame.setLocation(5,5);\n\t\tcp1shipLabel.setSize(200,15);\n\t\tcp1shipLabel.setLocation((boardOne.getWidth() / 2) - (cp1shipLabel.getWidth() / 2),buttonArea.getHeight() - cp1shipLabel.getHeight() - 5);\n\t\tcp1shipLabel.setVisible(false);\n\t\tcp2shipLabel.setSize(200,15);\n\t\tcp2shipLabel.setLocation(boardTwo.getX() + (boardTwo.getWidth() / 2) - (cp2shipLabel.getWidth() / 2),buttonArea.getHeight() - cp2shipLabel.getHeight() - 5);\n\t\tcp2shipLabel.setVisible(false);\n\t}",
"@java.lang.Override\n public double getPlayerLng() {\n return playerLng_;\n }",
"Square getCurrentPosition();",
"public void placeMarker(BoardPosition marker, char player)\r\n {\n if(gameMap.containsKey(player))\r\n {\r\n List<BoardPosition> tempList;\r\n tempList = gameMap.get(player);\r\n tempList.add(marker);\r\n gameMap.put(player, tempList);\r\n }\r\n // If the player does not exist in the map, create a new array list and put the key and value in the map\r\n else\r\n {\r\n List<BoardPosition> newList = new ArrayList<BoardPosition>();\r\n newList.add(marker);\r\n gameMap.put(player, newList);\r\n }\r\n }",
"public void setSpace(int position, Box player){\r\n\t\tboard[position - 1] = player;\r\n\t\t\r\n\t}",
"private Point2D getBoardPosition() {\n double size = getCellSize();\n double x = canvas.getWidth() / 2 - board.getWidth() * size / 2;\n double y = canvas.getHeight() / 2 - board.getHeight() * size / 2;\n\n return new Point2D(x, y);\n }",
"@java.lang.Override\n public double getPlayerLng() {\n return playerLng_;\n }",
"public void setLobbyLocation(Location loc) {\n gameLocations.put(GameLocation.LOBBY, loc);\n }",
"public void setPlayerPosition(Player player) {\n\n if (player.getPosition().equals(\"Left Wing\")) {\n\n for (int i = 0; i < 2; i++) {\n if (forwardLines[i][0] == null) {\n forwardLines[i][0] = player;\n break;\n }\n }\n }\n\n else if (player.getPosition().equals(\"Center\")) {\n for (int i = 0; i < 2; i++) {\n if (forwardLines[i][1] == null) {\n forwardLines[i][1] = player;\n break;\n }\n }\n }\n\n else if (player.getPosition().equals(\"Right Wing\")) {\n for (int i = 0; i < 2; i++) {\n if (forwardLines[i][2] == null) {\n forwardLines[i][2] = player;\n break;\n }\n }\n }\n\n else if (player.getPosition().equals(\"Left Defence\")) {\n for (int i = 0; i < 2; i++) {\n if (defenceLines[i][0] == null) {\n defenceLines[i][0] = player;\n break;\n }\n }\n }\n\n else if (player.getPosition().equals(\"Right Defence\")) {\n for (int i = 0; i < 2; i++) {\n if (defenceLines[i][1] == null) {\n defenceLines[i][1] = player;\n break;\n }\n }\n }\n }",
"public static void setUpGamePlayer() {\r\n String orientation; \r\n int xCoord;\r\n int yCoord;\r\n \r\n System.out.println(\"Let's place your ships on this \" + gameBoardPlayer.length + \"\"\r\n + \" by \" + gameBoardPlayer[0].length + \" board!\");\r\n \r\n displayBoard(gameBoardPlayer);\r\n \r\n System.out.println(\"\\n - - - - - - - - - - - - - - - - - - - \\n\");\r\n System.out.print(\"Position ships randomly (r) or manually (m): \");\r\n String choice = scan.next();\r\n \r\n // randomly places ships\r\n if (choice.equalsIgnoreCase(\"r\")) {\r\n System.out.println(\"Outcome: \");\r\n for (int i = 0; i < fleet.length; i++) {\r\n int random = (int)(Math.random() * 10);\r\n //0 - 4: ships placed horizontally, 5 - 9: ships placed vertically\r\n if (random < 5) {\r\n placeShipHorzRand(gameBoardPlayer, fleet[i], symbols[i]);\r\n }\r\n else {\r\n placeShipVertRand(gameBoardPlayer, fleet[i], symbols[i]);\r\n }\r\n }\r\n // display after all ships are randomly placed\r\n displayBoard(gameBoardPlayer);\r\n }\r\n // player chooses location for each ship\r\n else {\r\n for (int i = 0; i < fleet.length; i++) {\r\n System.out.println();\r\n displayBoard(gameBoardPlayer);\r\n System.out.println();\r\n System.out.println(\"Current ship: \" + fleet[i].getTitle());\r\n System.out.println(\"Length: \" + fleet[i].getLength());\r\n System.out.println();\r\n System.out.print(\"Place vertically (v) or horizontally (h): \");\r\n orientation = scan.next();\r\n System.out.print(\"Starting x-coordinate: \");\r\n xCoord = scan.nextInt();\r\n System.out.print(\"Starting y-coordinate: \");\r\n yCoord = scan.nextInt();\r\n \r\n if (orientation.equalsIgnoreCase(\"h\")) {\r\n placeShipHorzMan(gameBoardPlayer, fleet[i], symbols[i], xCoord, yCoord);\r\n }\r\n else {\r\n placeShipVertMan(gameBoardPlayer, fleet[i], symbols[i], xCoord, yCoord);\r\n }\r\n }\r\n }\r\n System.out.print(\"\\nComplete!! Now the computer is setting up . . .\");\r\n \r\n }",
"protected void storeLetterPositions () {\n letterLocations.clear();\n\n for (int row = 0; row < height; row++) {\n for (int col = 0; col < length; col++) {\n char c = board[row][col];\n if (letterLocations.containsKey(c)) {\n letterLocations.get(c).add(new ImmutablePair<>(row, col));\n } else {\n letterLocations.put(c, new HashSet<>(Arrays.asList(new ImmutablePair<>(row, col))));\n }\n }\n }\n }",
"private long opponent_winning_position() {\r\n return compute_winning_position(bitboard ^ mask, mask);\r\n }",
"public void setPlayer(Player _player) { // beallit egy ezredest az adott mapElementre, ha az rajta van\n player = _player;\n }",
"public void recordLocation(){\n\t\tg2d.setColor(Color.blue);\n\t\n int x = (int)(sd.getLocationX() * scale) + width/2;\n int y = (int)(sd.getLocationY() * scale) + height/2;\n g2d.fillRect(x,y,8,8);\n\t\n\t}",
"@Test\n public void storeSavesBotLocation() {\n BotMemoryRecord record = new BotMemoryRecord();\n record.store(Point.pt(5, 5));\n\n assertThat(record.getLastKnownLocation(), Matchers.is(Point.pt(5, 5)));\n }",
"public Point getLocation() { return loc; }",
"private void setSpawnLocation(Object packet, Vector location, String xName, String yName, String zName) {\n ReflectUtils.setField(packet, xName, location.getX());\n ReflectUtils.setField(packet, yName, location.getY());\n ReflectUtils.setField(packet, zName, location.getZ());\n }",
"private void setLocation(){\r\n\t\t//make the sql command\r\n\t\tString sqlCmd = \"INSERT INTO location VALUES ('\" + commandList.get(1) + \"', '\"\r\n\t\t\t\t+ commandList.get(2) + \"', '\" + commandList.get(3) + \"');\";\r\n\r\n\t\ttry {//start SQL statement\r\n\t\t\tstmt.executeUpdate(sqlCmd);\r\n\t\t} catch (SQLException e) {\r\n\t\t\terror = true;\r\n\t\t\tout.println(e.getMessage());\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tif(error == false)\r\n\t\t\tout.println(\"true\");\r\n\t}",
"public static void setCoordinates(JButton currentButton, int numPlayers, JButton tile[][] ) {\n\t\t if(currentButton.getIcon()==Player1.PieceImages[0]) {\n\t\t\t //System.out.println(\"This is player 1's \" + Player1.playersTeam.teamPieces[0].name);\n\t\t\t for (int i=0; i<tile.length; i++) {\n \t\t\t for(int j=0; j<tile[i].length; j++) {\n \t\t\t\t if (currentButton == tile[i][j]) {\n \t\t\t\t\t pieceYCoord = i; \n \t\t\t\t\t pieceXCoord = j;\n \t\t\t\t\t //System.out.println(pieceYCoord + \"\" + pieceXCoord);\n \t\t\t\t }\n \t\t\t }\n \t\t }\n\t\t }\n\t\t if(currentButton.getIcon()==Player1.PieceImages[1]) {\n\t\t\t //System.out.println(\"This is player 1's \" + Player1.playersTeam.teamPieces[1].name);\n\t\t\t for (int i=0; i<tile.length; i++) {\n \t\t\t for(int j=0; j<tile[i].length; j++) {\n \t\t\t\t if (currentButton == tile[i][j]) {\n \t\t\t\t\t pieceYCoord = i; \n \t\t\t\t\t pieceXCoord = j;\n \t\t\t\t\t//System.out.println(pieceYCoord + \"\" + pieceXCoord);\n \t\t\t\t }\n \t\t\t }\n \t\t }\n\t\t }\n\t\t if(currentButton.getIcon()==Player1.PieceImages[2]) {\n\t\t\t //System.out.println(\"This is player 1's \" + Player1.playersTeam.teamPieces[2].name);\n\t\t\t for (int i=0; i<tile.length; i++) {\n \t\t\t for(int j=0; j<tile[i].length; j++) {\n \t\t\t\t if (currentButton == tile[i][j]) {\n \t\t\t\t\t pieceYCoord = i;\n \t\t\t\t\t pieceXCoord = j;\n \t\t\t\t\t//System.out.println(pieceYCoord + \"\" + pieceXCoord);\n \t\t\t\t }\n \t\t\t }\n \t\t }\n\t\t }\n\t\t if(currentButton.getIcon()==Player1.PieceImages[3]) {\n\t\t\t //System.out.println(\"This is player 1's \" + Player1.playersTeam.teamPieces[3].name);\n\t\t\t for (int i=0; i<tile.length; i++) {\n \t\t\t for(int j=0; j<tile[i].length; j++) {\n \t\t\t\t if (currentButton == tile[i][j]) {\n \t\t\t\t\t pieceYCoord = i;\n \t\t\t\t\t pieceXCoord = j;\n \t\t\t\t\t//System.out.println(pieceYCoord + \"\" + pieceXCoord);\n \t\t\t\t }\n \t\t\t }\n \t\t }\n\t\t }\n\t\t if(currentButton.getIcon()==Player1.PieceImages[4]) {\n\t\t\t //System.out.println(\"This is player 1's \" + Player1.playersTeam.teamPieces[4].name);\n\t\t\t for (int i=0; i<tile.length; i++) {\n \t\t\t for(int j=0; j<tile[i].length; j++) {\n \t\t\t\t if (currentButton == tile[i][j]) {\n \t\t\t\t\t pieceYCoord = i;\n \t\t\t\t\t pieceXCoord = j;\n \t\t\t\t\t//System.out.println(pieceYCoord + \"\" + pieceXCoord);\n \t\t\t\t }\n \t\t\t }\n \t\t }\n\t\t }\n\t\t if(currentButton.getIcon()==Player2.PieceImages[0]) {\n\t\t\t //System.out.println(\"This is player 2's \" + Player2.playersTeam.teamPieces[0].name);\n\t\t\t for (int i=0; i<tile.length; i++) {\n \t\t\t for(int j=0; j<tile[i].length; j++) {\n \t\t\t\t if (currentButton == tile[i][j]) {\n \t\t\t\t\t pieceYCoord = i;\n \t\t\t\t\t pieceXCoord = j;\n \t\t\t\t\t//System.out.println(pieceYCoord + \"\" + pieceXCoord);\n \t\t\t\t }\n \t\t\t }\n \t\t }\n\t\t }\n\t\t if(currentButton.getIcon()==Player2.PieceImages[1]) {\n\t\t\t //System.out.println(\"This is player 2's \" + Player2.playersTeam.teamPieces[1].name);\n\t\t\t for (int i=0; i<tile.length; i++) {\n \t\t\t for(int j=0; j<tile[i].length; j++) {\n \t\t\t\t if (currentButton == tile[i][j]) {\n \t\t\t\t\t pieceYCoord = i;\n \t\t\t\t\t pieceXCoord = j;\n \t\t\t\t\t//System.out.println(pieceYCoord + \"\" + pieceXCoord);\n \t\t\t\t }\n \t\t\t }\n \t\t }\n\t\t }\n\t\t if(currentButton.getIcon()==Player2.PieceImages[2]) {\n\t\t\t //System.out.println(\"This is player 2's \" + Player2.playersTeam.teamPieces[2].name);\n\t\t\t for (int i=0; i<tile.length; i++) {\n \t\t\t for(int j=0; j<tile[i].length; j++) {\n \t\t\t\t if (currentButton == tile[i][j]) {\n \t\t\t\t\t pieceYCoord = i;\n \t\t\t\t\t pieceXCoord = j;\n \t\t\t\t\t//System.out.println(pieceYCoord + \"\" + pieceXCoord);\n \t\t\t\t }\n \t\t\t }\n \t\t }\n\t\t }\n\t\t if(currentButton.getIcon()==Player2.PieceImages[3]) {\n\t\t\t //System.out.println(\"This is player 2's \" + Player2.playersTeam.teamPieces[3].name);\n\t\t\t for (int i=0; i<tile.length; i++) {\n \t\t\t for(int j=0; j<tile[i].length; j++) {\n \t\t\t\t if (currentButton == tile[i][j]) {\n \t\t\t\t\t pieceYCoord = i;\n \t\t\t\t\t pieceXCoord = j;\n \t\t\t\t\t//System.out.println(pieceYCoord + \"\" + pieceXCoord);\n \t\t\t\t }\n \t\t\t }\n \t\t }\n\t\t }\n\t\t if(currentButton.getIcon()==Player2.PieceImages[4]) {\n\t\t\t //System.out.println(\"This is player 2's \" + Player2.playersTeam.teamPieces[4].name);\n\t\t\t for (int i=0; i<tile.length; i++) {\n \t\t\t for(int j=0; j<tile[i].length; j++) {\n \t\t\t\t if (currentButton == tile[i][j]) {\n \t\t\t\t\t pieceYCoord = i;\n \t\t\t\t\t pieceXCoord = j;\n \t\t\t\t\t//System.out.println(pieceYCoord + \"\" + pieceXCoord);\n \t\t\t\t }\n \t\t\t }\n \t\t }\n\t\t }\n\t\t if(numPlayers==4) {\n\t\t\t if(currentButton.getIcon()==Player3.PieceImages[0]) {\n\t\t\t //System.out.println(\"This is player 3's \" + Player3.playersTeam.teamPieces[0].name);\n\t\t\t \tfor (int i=0; i<tile.length; i++) {\n\t\t\t \t\tfor(int j=0; j<tile[i].length; j++) {\n\t\t\t \t\t\tif (currentButton == tile[i][j]) {\n\t\t\t \t\t\t\tpieceYCoord = i;\n\t\t\t \t\t\t\tpieceXCoord = j;\n\t\t\t \t\t\t\t//System.out.println(pieceYCoord + \"\" + pieceXCoord);\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\t if(currentButton.getIcon()==Player3.PieceImages[1]) {\n\t\t\t //System.out.println(\"This is player 3's \" + Player3.playersTeam.teamPieces[1].name);\n\t\t\t \tfor (int i=0; i<tile.length; i++) {\n\t\t\t \t\tfor(int j=0; j<tile[i].length; j++) {\n\t\t\t \t\t\tif (currentButton == tile[i][j]) {\n\t\t\t \t\t\t\tpieceYCoord = i;\n\t\t\t \t\t\t\tpieceXCoord = j;\n\t\t\t \t\t\t\t//System.out.println(pieceYCoord + \"\" + pieceXCoord);\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\t if(currentButton.getIcon()==Player3.PieceImages[2]) {\n\t\t\t //System.out.println(\"This is player 3's \" + Player3.playersTeam.teamPieces[2].name);\n\t\t\t\tfor (int i=0; i<tile.length; i++) {\n\t\t\t \t\tfor(int j=0; j<tile[i].length; j++) {\n\t\t\t \t\t\tif (currentButton == tile[i][j]) {\n\t\t\t \t\t\t\tpieceYCoord = i;\n\t\t\t \t\t\t\tpieceXCoord = j;\n\t\t\t \t\t\t\t//System.out.println(pieceYCoord + \"\" + pieceXCoord);\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\t if(currentButton.getIcon()==Player3.PieceImages[3]) {\n\t\t\t //System.out.println(\"This is player 3's \" + Player3.playersTeam.teamPieces[3].name);\n\t\t\t\tfor (int i=0; i<tile.length; i++) {\n\t\t\t \t\tfor(int j=0; j<tile[i].length; j++) {\n\t\t\t \t\t\tif (currentButton == tile[i][j]) {\n\t\t\t \t\t\t\tpieceYCoord = i;\n\t\t\t \t\t\t\tpieceXCoord = j;\n\t\t\t \t\t\t\t//System.out.println(pieceYCoord + \"\" + pieceXCoord);\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\t if(currentButton.getIcon()==Player3.PieceImages[4]) {\n\t\t\t //System.out.println(\"This is player 3's \" + Player3.playersTeam.teamPieces[4].name);\n\t\t\t\tfor (int i=0; i<tile.length; i++) {\n\t\t\t \t\tfor(int j=0; j<tile[i].length; j++) {\n\t\t\t \t\t\tif (currentButton == tile[i][j]) {\n\t\t\t \t\t\t\tpieceYCoord = i;\n\t\t\t \t\t\t\tpieceXCoord = j;\n\t\t\t \t\t\t\t//System.out.println(pieceYCoord + \"\" + pieceXCoord);\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\t if(currentButton.getIcon()==Player4.PieceImages[0]) {\n\t\t\t //System.out.println(\"This is player 4's \" + Player4.playersTeam.teamPieces[0].name);\n\t\t\t\tfor (int i=0; i<tile.length; i++) {\n\t\t\t \t\tfor(int j=0; j<tile[i].length; j++) {\n\t\t\t \t\t\tif (currentButton == tile[i][j]) {\n\t\t\t \t\t\t\tpieceYCoord = i;\n\t\t\t \t\t\t\tpieceXCoord = j;\n\t\t\t \t\t\t\t//System.out.println(pieceYCoord + \"\" + pieceXCoord);\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\t if(currentButton.getIcon()==Player4.PieceImages[1]) {\n\t\t\t //System.out.println(\"This is player 4's \" + Player4.playersTeam.teamPieces[1].name);\n\t\t\t\tfor (int i=0; i<tile.length; i++) {\n\t\t\t \t\tfor(int j=0; j<tile[i].length; j++) {\n\t\t\t \t\t\tif (currentButton == tile[i][j]) {\n\t\t\t \t\t\t\tpieceYCoord = i;\n\t\t\t \t\t\t\tpieceXCoord = j;\n\t\t\t \t\t\t\t//System.out.println(pieceYCoord + \"\" + pieceXCoord);\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\t if(currentButton.getIcon()==Player4.PieceImages[2]) {\n\t\t\t //System.out.println(\"This is player 4's \" + Player4.playersTeam.teamPieces[2].name);\n\t\t\t\tfor (int i=0; i<tile.length; i++) {\n\t\t\t \t\tfor(int j=0; j<tile[i].length; j++) {\n\t\t\t \t\t\tif (currentButton == tile[i][j]) {\n\t\t\t \t\t\t\tpieceYCoord = i;\n\t\t\t \t\t\t\tpieceXCoord = j;\n\t\t\t \t\t\t\t//System.out.println(pieceYCoord + \"\" + pieceXCoord);\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\t if(currentButton.getIcon()==Player4.PieceImages[3]) {\n\t\t\t //System.out.println(\"This is player 4's \" + Player4.playersTeam.teamPieces[3].name);\n\t\t\t\tfor (int i=0; i<tile.length; i++) {\n\t\t\t \t\tfor(int j=0; j<tile[i].length; j++) {\n\t\t\t \t\t\tif (currentButton == tile[i][j]) {\n\t\t\t \t\t\t\tpieceYCoord = i;\n\t\t\t \t\t\t\tpieceXCoord = j;\n\t\t\t \t\t\t\t//System.out.println(pieceYCoord + \"\" + pieceXCoord);\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\t if(currentButton.getIcon()==Player4.PieceImages[4]) {\n\t\t\t //System.out.println(\"This is player 4's \" + Player4.playersTeam.teamPieces[4].name);\n\t\t\t\tfor (int i=0; i<tile.length; i++) {\n\t\t\t \t\tfor(int j=0; j<tile[i].length; j++) {\n\t\t\t \t\t\tif (currentButton == tile[i][j]) {\n\t\t\t \t\t\t\tpieceYCoord = i;\n\t\t\t \t\t\t\tpieceXCoord = j;\n\t\t\t \t\t\t\t//System.out.println(pieceYCoord + \"\" + pieceXCoord);\n\t\t\t \t\t\t}\n\t\t\t \t\t}\n\t\t\t \t}\n\t\t\t }\n\t\t }\n\n\t}",
"public void setPiece(int x, int y, int player) throws GameException {\n if (!squareInBounds(x, y)) {\n throw new GameException(\"Square is off the board\");\n }\n int arrayPos = getArrayPos(x, y);\n if (!isSquareFree(arrayPos)) {\n throw new GameException(\"Location is already taken\");\n }\n ;\n setSurrounding(x, y);\n intArray[arrayPos] = player;\n }",
"void storeValues(int posx, int posy, int piece) {\n\t\tprevPosX = posx;\n\t\tprevPosY = posy;\n\t\tprevName = \"\" + prevPosX + \"\" + prevPosY;\n\t\tprevComp = (JLabel) curComp;\n\t\tprevPiece = piece;\n\t\tpiece = Logic.arr[posx][posy];\n\t}",
"@Override\n\tpublic ArrayList<BoardLocation> findLocation() {\n\t\treturn null;\n\t}",
"public void setInitialPosition()\n {\n putGenericPiece(GenericPiece.PAWN, Colour.WHITE, Square.a2);\n putGenericPiece(GenericPiece.PAWN, Colour.WHITE, Square.b2);\n putGenericPiece(GenericPiece.PAWN, Colour.WHITE, Square.c2);\n putGenericPiece(GenericPiece.PAWN, Colour.WHITE, Square.d2);\n putGenericPiece(GenericPiece.PAWN, Colour.WHITE, Square.e2);\n putGenericPiece(GenericPiece.PAWN, Colour.WHITE, Square.f2);\n putGenericPiece(GenericPiece.PAWN, Colour.WHITE, Square.g2);\n putGenericPiece(GenericPiece.PAWN, Colour.WHITE, Square.h2);\n //Se colocan los peones negros en la séptima fila\n putGenericPiece(GenericPiece.PAWN, Colour.BLACK, Square.a7);\n putGenericPiece(GenericPiece.PAWN, Colour.BLACK, Square.b7);\n putGenericPiece(GenericPiece.PAWN, Colour.BLACK, Square.c7);\n putGenericPiece(GenericPiece.PAWN, Colour.BLACK, Square.d7);\n putGenericPiece(GenericPiece.PAWN, Colour.BLACK, Square.e7);\n putGenericPiece(GenericPiece.PAWN, Colour.BLACK, Square.f7);\n putGenericPiece(GenericPiece.PAWN, Colour.BLACK, Square.g7);\n putGenericPiece(GenericPiece.PAWN, Colour.BLACK, Square.h7);\n //Se colocan las torres blancas en a1 y h1\n putGenericPiece(GenericPiece.ROOK,Colour.WHITE,Square.a1);\n putGenericPiece(GenericPiece.ROOK,Colour.WHITE,Square.h1);\n //Se colocan las torres negras en a8 y h9\n putGenericPiece(GenericPiece.ROOK,Colour.BLACK,Square.a8);\n putGenericPiece(GenericPiece.ROOK,Colour.BLACK,Square.h8);\n //Se colocan los caballos blancos en b1 y g1\n putGenericPiece(GenericPiece.KNIGHT,Colour.WHITE,Square.b1);\n putGenericPiece(GenericPiece.KNIGHT,Colour.WHITE,Square.g1);\n //Se colocan los caballos negros en b8 y g8\n putGenericPiece(GenericPiece.KNIGHT,Colour.BLACK,Square.b8);\n putGenericPiece(GenericPiece.KNIGHT,Colour.BLACK,Square.g8);\n //Se colocan los alfiles blancos en c1 y f1\n putGenericPiece(GenericPiece.BISHOP,Colour.WHITE,Square.c1);\n putGenericPiece(GenericPiece.BISHOP,Colour.WHITE,Square.f1);\n //Se colocan los alfiles negros en c8 y f8\n putGenericPiece(GenericPiece.BISHOP,Colour.BLACK,Square.c8);\n putGenericPiece(GenericPiece.BISHOP,Colour.BLACK,Square.f8);\n //Se coloca la dama blanca en d1\n putGenericPiece(GenericPiece.QUEEN,Colour.WHITE,Square.d1);\n //Se coloca la dama negra en d8\n putGenericPiece(GenericPiece.QUEEN,Colour.BLACK,Square.d8);\n //Se coloca el rey blanco en e1\n putGenericPiece(GenericPiece.KING,Colour.WHITE,Square.e1);\n //Se coloca el rey negro en e8\n putGenericPiece(GenericPiece.KING,Colour.BLACK,Square.e8);\n \n //Se permiten los enroques para ambos jugadores\n setCastlingShort(Colour.WHITE,true);\n setCastlingShort(Colour.BLACK,true);\n setCastlingLong(Colour.WHITE,true);\n setCastlingLong(Colour.BLACK,true);\n \n //Se da el turno a las blancas\n setTurn(Colour.WHITE);\n \n gamePositionsHash.clear();\n gamePositionsHash.put(zobristKey.getKey(), 1);\n }",
"@Override\n public void setLocation(Point location) {\n pos = location;\n try {\n if (TerraGen.window != null && TerraGen.window.getClient() != null)\n TerraGen.window.getClient().pushGameChange(TerraGen.window.game.getMap().getTokens().indexOf(this), NetworkType.TOKEN, this);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public GridLocation(){ //of the grid at the moment\n charactersOccupiedTheLocation=new Object[4];\n }",
"public GridLocation getLocation();",
"public void setPlayerGrid(){\n\t\tplayerGrid = new Grid(true);\n\t\tsetShips(playerGrid,playerBattleShipsList,0);//2\n\t}",
"public BoardPosition(int rowInput, int colInput, char playerInput) {\n row = rowInput;\n col = colInput;\n player = playerInput;\n }",
"public final void initialPosition() {\n\t\tfor( int i = 0; i < 4; i++) {\n\t\t setPiece( new PieceImpl( Color.RED, Type.PAWN), new PositionImpl( 38 + 8*i));\n\t\t}\n\t\tfor( int i = 0; i < 4; i++) {\n\t\t setPiece( new PieceImpl( Color.BLACK, Type.PAWN), new PositionImpl( 12 + i));\n\t\t}\n\t\tfor( int i = 0; i < 4; i++) {\n\t\t setPiece( new PieceImpl( Color.YELLOW, Type.PAWN), new PositionImpl( 1 + 8*i));\n\t\t}\n\t\tfor( int i = 0; i < 4; i++) {\n\t\t setPiece( new PieceImpl( Color.GREEN, Type.PAWN), new PositionImpl( 48 + i));\n\t\t}\n\t\t\n\t\tsetPiece( new PieceImpl( Color.RED, Type.BOAT), new PositionImpl( 63 ));\n\t\tsetPiece( new PieceImpl( Color.RED, Type.KNIGHT), new PositionImpl( 55 ));\n\t\tsetPiece( new PieceImpl( Color.RED, Type.ELEPHANT), new PositionImpl( 47 ));\n\t\tsetPiece( new PieceImpl( Color.RED, Type.KING), new PositionImpl( 39 ));\n\t\t\n\t\tsetPiece( new PieceImpl( Color.BLACK, Type.BOAT), new PositionImpl( 7 ));\n\t\tsetPiece( new PieceImpl( Color.BLACK, Type.KNIGHT), new PositionImpl( 6 ));\n\t\tsetPiece( new PieceImpl( Color.BLACK, Type.ELEPHANT), new PositionImpl( 5 ));\n\t\tsetPiece( new PieceImpl( Color.BLACK, Type.KING), new PositionImpl( 4 ));\n\n\t\tsetPiece( new PieceImpl( Color.YELLOW, Type.BOAT), new PositionImpl( 0 ));\n\t\tsetPiece( new PieceImpl( Color.YELLOW, Type.KNIGHT), new PositionImpl( 8 ));\n\t\tsetPiece( new PieceImpl( Color.YELLOW, Type.ELEPHANT), new PositionImpl( 16 ));\n\t\tsetPiece( new PieceImpl( Color.YELLOW, Type.KING), new PositionImpl( 24 ));\n\n\t\tsetPiece( new PieceImpl( Color.GREEN, Type.BOAT), new PositionImpl( 56 ));\n\t\tsetPiece( new PieceImpl( Color.GREEN, Type.KNIGHT), new PositionImpl( 57 ));\n\t\tsetPiece( new PieceImpl( Color.GREEN, Type.ELEPHANT), new PositionImpl( 58 ));\n\t\tsetPiece( new PieceImpl( Color.GREEN, Type.KING), new PositionImpl( 59 ));\n\t\t\n }",
"public void updateLocation();",
"@Override\n\tpublic Point getLocation() {\n\t\treturn position;\n\t}",
"private void setInfoPlayers() {\n\n\t\t//PLAYER 1\n\t\tlblPlayer1name.setText(players.get(0).getName());\n\t\tlblCashP1.setText(\"\" + players.get(0).getMoney());\n\t\tlblBuildP1.setText(\"\" + players.get(0).getNumberBuildings());\n\t\tlblPropP1.setText(\"\" + players.get(0).getOwnproperties().size());\n\t\tlblPosP1.setText(\"\"+ players.get(0).getPosition());\n\n\t\t//PLAYER 2\n\t\tlblPlayer2name.setText(players.get(1).getName());\n\t\tlblCashP2.setText(\"\" + players.get(1).getMoney());\n\t\tlblBuildP2.setText(\"\" + players.get(1).getNumberBuildings());\n\t\tlblPropP2.setText(\"\" + players.get(1).getOwnproperties().size());\n\t\tlblPosP2.setText(\"\"+ players.get(1).getPosition());\n\t\t\n\t\tif(players.size() > 2){\n\t\t\t//PLAYER 3\n\t\t\tlblPlayerName3.setText(players.get(2).getName());\n\t\t\tlblCashP3.setText(\"\" + players.get(2).getMoney());\n\t\t\tlblBuildP3.setText(\"\" + players.get(2).getNumberBuildings());\n\t\t\tlblPropP3.setText(\"\" + players.get(2).getOwnproperties().size());\n\t\t\tlblPosP3.setText(\"\"+ players.get(2).getPosition());\n\n\t\t\tif(players.size() > 3){\n\t\t\t\t//PLAYER 4\n\t\t\t\tlblPlayerName4.setText(players.get(3).getName());\n\t\t\t\tlblCashP4.setText(\"\" + players.get(3).getMoney());\n\t\t\t\tlblBuildP4.setText(\"\" + players.get(3).getNumberBuildings());\n\t\t\t\tlblPropP4.setText(\"\" + players.get(3).getOwnproperties().size());\n\t\t\t\tlblPosP4.setText(\"\"+ players.get(3).getPosition());\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"public GameLogic(){\n\t\tplayerPosition = new HashMap<Integer, int[]>();\n\t\tcollectedGold = new HashMap<Integer, Integer>();\n\t\tmap = new Map();\n\t}",
"public StarSystem getCurrentLocation() {\n\t\treturn player.getLocation();\n\t}",
"@Override\n public void onLocationChange(Location loc) {\n user.setRelativePosition(loc.getX(), loc.getY());\n map.addStep(new PointF(loc.getX(), loc.getY()));\n //messageHandler.sendEmptyMessage(MESSAGE_REFRESH);\n }",
"@Override\r\n\tpublic void updateScreen() {\r\n\t\tsuper.updateScreen();\r\n\t\t_resolutionResolver = new ScaledResolution(Minecraft.getMinecraft(), Minecraft.getMinecraft().displayWidth, Minecraft.getMinecraft().displayHeight);\r\n\t\tthis.width = _resolutionResolver.getScaledWidth();\r\n\t\tthis.height = _resolutionResolver.getScaledHeight();\r\n\r\n\t\t// Handle when the player clicked on a cell\r\n\t\tif (_selectedCell != -1) {\r\n\t\t \r\n\t\t\t// make sure we have our player or otherwise we will\r\n\t\t // not be able to set the correct position for the player\r\n\t\t\tif (HubbyUtils.getServerPlayer() != null) {\r\n\t\t\t\tint cellIndex = _startCell + _selectedCell;\r\n\t\t\t\tif (cellIndex < UltraTeleportWaypoint.getWaypointCount()) {\r\n\t\t\t\t UltraTeleportWaypoint p = UltraTeleportWaypoint.getWaypoints().get(cellIndex);\r\n\t\t\t\t double posX = p.getPos().getX();\r\n\t\t\t\t double posY = p.getPos().getY();\r\n\t\t\t\t double posZ = p.getPos().getZ();\r\n\t\t\t\t float yaw = p.getRotationY();\r\n\t\t\t\t float pitch = p.getRotationX();\r\n\r\n\t\t\t\t // Get the client world to be able to find the proper block for teleporting\r\n\t\t\t\t World world = HubbyUtils.getClientWorld();\r\n\t\t\t\t if (world != null) {\r\n\t\t\t\t while (true) {\r\n\t\t\t\t \tBlockPos pos = new BlockPos(posX, posY, posZ);\r\n\t\t\t\t if (world.isAirBlock(pos)) {\r\n\t\t\t\t break;\r\n\t\t\t\t }\r\n\t\t\t\t posY += 1.0d;\r\n\t\t\t\t }\r\n\t\t\t\t }\r\n\r\n\t\t\t\t // Update the player's location on the server and then\r\n\t\t\t\t // that will pass down to the client player and update his\r\n\t\t\t\t // position as well\r\n\t\t\t\t HubbyUtils.getServerPlayer().playerNetServerHandler.setPlayerLocation(posX, posY, posZ, yaw, pitch);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t_selectedCell = -1;\r\n\t\t}\r\n\r\n\t\t// update selected list\r\n for (int i = 0; i < UltraTeleportWaypoint.getWaypointCount(); ++i) {\r\n if (i >= _selectedList.size()) {\r\n _selectedList.add(false);\r\n }\r\n }\r\n\r\n // Only show delete button when we have something selected\r\n if (getSelectedCount() > 0) {\r\n this.buttonList.add(_deleteButton);\r\n }\r\n else {\r\n this.buttonList.clear();\r\n }\r\n\t}",
"@Test\n\t\tpublic void canGiveTheseusLocation() {\n\t\t\tPoint whereTheseus = new Pointer(3,3);\n\t\t\tgameLoader.addTheseus(whereTheseus);\n\t\t\tPoint expected = whereTheseus;\n\t\t\tPoint actual = gameSaver.wheresTheseus();\n\t\t\t\n\t\t\tassertEquals(expected.across(), actual.across());\n\t\t\tassertEquals(expected.down(), actual.down());\n\t\t}",
"public void setUserLocation(Room setRoom)\n {\n\n // Gets each person from the characters' array list.\n for(Person person: characters){\n\n // Check if found the player.\n if(person.getName().equals(PLAYER)){\n\n // sets the location of the player to the specifed room.\n person.setLocation(setRoom);\n }\n }\n }",
"public int[][] place(){\r\n\t\treturn coords(pos);\r\n\t}",
"public Location getSpawnLocation() {\n return this.spawnLocation;\n }",
"public Location computerMove()\n\t{\n\t\tArrayList<Location> possibleLocs = new ArrayList<Location>();\n\t\tfor (int row = 0; row < grid.length; row++)\n\t\t{\n\t\t\tfor (int col = 0; col < grid[0].length; col++)\n\t\t\t{\n\t\t\t\tLocation temp = new Location(row, col);\n\t\t\t\tif (!isOccupied(temp))\n\t\t\t\t\tpossibleLocs.add(temp);\n\t\t\t}\n\t\t}\n\t\tfor (int count = 0; count < possibleLocs.size(); count++)\n\t\t{\n\t\t\tif (checkWin(1, possibleLocs.get(count)))\n\t\t\t\treturn possibleLocs.get(count);\n\t\t\telse if (checkWin(0, possibleLocs.get(count)))\n\t\t\t\treturn possibleLocs.get(count);\n\t\t}\n\t\treturn possibleLocs.get((int) (Math.random() * possibleLocs.size()));\n\t}",
"private void setInformationToDraw(Player player)\n {\n playerPieceList = player.getPieces();\n\n if (player == antagonistPlayer) {\n x = antagonistLocation[0];\n y = antagonistLocation[1];\n damageToAnnounce = antagonistDamage;\n healthBenefitToAnnounce = antagonistHealthBenefit;\n } else if (player == heroPlayer) {\n x = heroLocation[0];\n y = heroLocation[1];\n damageToAnnounce = heroDamage;\n healthBenefitToAnnounce = heroHealthBenefit;\n } else {\n x = 0;\n y = 0;\n }\n }",
"Tile getPosition();",
"public void saveCameraPosition() {\n \t\tCameraPosition camera = mMap.getCameraPosition();\n \t\tSharedPreferences settings = context.getSharedPreferences(\"MAP\", 0);\n \t\tSharedPreferences.Editor editor = settings.edit();\n \t\teditor.putFloat(\"lat\", (float) camera.target.latitude);\n \t\teditor.putFloat(\"lng\", (float) camera.target.longitude);\n \t\teditor.putFloat(\"bea\", camera.bearing);\n \t\teditor.putFloat(\"tilt\", camera.tilt);\n \t\teditor.putFloat(\"zoom\", camera.zoom);\n \t\teditor.commit();\n \t}",
"public Location getLobbyLocation() {\n return gameLocations.get(GameLocation.LOBBY);\n }",
"private void setPlayerRoom(){\n player.setRoom(currentRoom);\n }",
"public PositionInTheGameBoard()\r\n\t{\r\n\t\tthis.X = new Random().nextInt(PositionInTheGameBoard.max_X);\r\n\t\tthis.Y = new Random().nextInt(PositionInTheGameBoard.max_Y);\r\n\t}",
"void setLocation(int x, int y);",
"public Set<Location> getPlayerLocations()\n\t{\n\t\tSet<Location> places = new HashSet<Location>();\n\t\tfor(Location place: playerLocations.values())\n\t\t{\n\t\t\tplaces.add(place);\n\t\t}\n\t\treturn places;\n\t}",
"public void addPositionCell(int user, String position){\n int posXY[] = {Character.getNumericValue(position.charAt(0)), Character.getNumericValue(position.charAt(2))};\n if(user==1){\n gameBoard[posXY[0]][posXY[1]] = \"O\";\n }\n else{\n gameBoard[posXY[0]][posXY[1]] = \"X\";\n }\n }",
"public void spawn(Location location) {\r\n Packet<?>[] packets = {\r\n new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER),\r\n new PacketPlayOutNamedEntitySpawn(),\r\n new PacketPlayOutEntityHeadRotation()\r\n };\r\n\r\n setFieldCastValue(packets[0], \"b\", Collections.singletonList(this.getPlayerInfoData((PacketPlayOutPlayerInfo) packets[0])));\r\n\r\n setFieldValue(packets[1], \"a\", this.entityId); // Just change entity id to prevent client-side problems\r\n setFieldValue(packets[1], \"b\", this.profile.getId());\r\n setFieldValue(packets[1], \"c\", location.getX());\r\n setFieldValue(packets[1], \"d\", location.getY());\r\n setFieldValue(packets[1], \"e\", location.getZ());\r\n setFieldValue(packets[1], \"f\", (byte) (location.getYaw() * 256.0F / 360.0F));\r\n setFieldValue(packets[1], \"g\", (byte) (location.getPitch() * 256.0F / 360.0F));\r\n setFieldValue(packets[1], \"h\", this.player.getPlayer().getHandle().getDataWatcher());\r\n\r\n setFieldValue(packets[2], \"a\", this.entityId);\r\n setFieldValue(packets[2], \"b\", (byte) (location.getYaw() * 256.0F / 360.0F));\r\n\r\n for (GamePlayer player : this.plugin.getGameManager().getAllPlayers())\r\n for (Packet<?> packet : packets)\r\n player.sendPacket(packet);\r\n }",
"private void setGridElement (int row, int column, Player player)\n {\n mGrid[row][column] = new Move(player, row, column);\n }",
"public World(){\r\n locations = new Location[3][3];\r\n for(int r=0; r<3; r+=1){\r\n for(int c=0; c<3; c+=1){\r\n locations[r][c] = new EmptyLocation(new Position(r,c), \"Nothing here to see.\");\r\n }\r\n }\r\n home = locations[0][0];\r\n players = new ArrayList<Player>();\r\n }",
"public void setPlayerPosition() throws IOException\r\n\t{\r\n\t\tboolean flag = false;\r\n\t\t\r\n\t\tint X = 0;\r\n\t\tint Y = 0;\r\n\t\t\r\n\t\twhile(flag == false)\r\n\t\t{\r\n\t\t\toStream.writeInt(X);\r\n\t\t\toStream.writeInt(Y);\r\n\t\t\tflag = iStream.readBoolean();\r\n\t\t\tX++;\r\n\t\t\tY++;\r\n\t\t}\r\n\t\tboard.makePlayer(X-1, Y-1);\r\n\t}",
"public int getCurrentPlayerRealPosition();",
"public void setPlayersAtGo()\n {\n for(int i = 0; i < m_numPlayers; i++)\n {\n m_gameBoard.addPlayerToSpace(i + 1, 0);\n }\n }",
"public static void placePlayerPiece(PlayerMovesHandler player) {\n\t\t// char piece = player.getPiece();\n\t\tScanner in = new Scanner(System.in);\n\t\tboolean invalidInput = true;\n\n\t\twhile (invalidInput) {\n\t\t\tSystem.out.println(\"Enter row and column no. where you want to place your mark (Top left is [1,1])\");\n\n\t\t\tint row = in.nextInt() - 1;\n\t\t\tint col = in.nextInt() - 1;\n\t\t\tinvalidInput = !(player.setPiece(row, col));\t// callee returns true if success \n\t\t}\n\t}",
"private void saveMove(){\n\t\tpreviousTile=monster.currentTile;\r\n\t}",
"public static void playerpoints(String board[][]){\n\t\tint player1pointcount=0, player2pointcount=0;\n\t\tfor(int x=1;x<=boardwidth;x++){\n\t\t\tfor(int i=1;i<=boardlength;i++){\n\t\t\t\tif(board[x][i]==\"x\"){\n\t\t\t\t\tplayer1pointcount++;\n\t\t\t\t}\n\t\t\t\tif(board[x][i]==\"o\"){\n\t\t\t\t\tplayer2pointcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tplayer1score=player1pointcount;\n\t\tplayer2score=player2pointcount;\n\t}",
"public void changePlayerPixels() {\n //change the player point2pixels\n if (!playerFlag) {\n game.getPlayer().setPixels(convertor.gps2Pixels(game.getPlayer().getPoint()));\n Point3D point = new Point3D(game.getPlayer().getPixels()[0] , game.getPlayer().getPixels()[1]);\n GraphNode playerNode = new GraphNode(point);\n vertices.add(playerNode);\n\n }\n\n else {\n Point3D point = new Point3D(game.getPlayer().getPixels()[0] , game.getPlayer().getPixels()[1]);\n GraphNode playerNode = new GraphNode(point);\n vertices.add(playerNode);\n }\n\n playerFlag = true;\n\n }",
"public void savePlayers()\r\n {\r\n for(User p : players.values())\r\n {\r\n \r\n }\r\n }",
"public void generatePlayer()\n {\n board.getTile(8,0).insertPlayer(this.player);\n }",
"public void updateLoc()\n {\n driverLoc = new ParseGeoPoint(driverLocCord.latitude, driverLocCord.longitude);\n ParseUser.getCurrentUser().put(\"Location\", driverLoc);\n ParseUser.getCurrentUser().saveInBackground(new SaveCallback() {\n @Override\n public void done(ParseException e) {\n if(e==null){\n Toast.makeText(getApplicationContext(), \"Location Updated\", Toast.LENGTH_SHORT).show();\n }\n else{\n\n Toast.makeText(getApplicationContext(), \"Error in Location Update\", Toast.LENGTH_SHORT).show();\n e.printStackTrace();\n }\n }\n });\n\n\n populate();\n\n }",
"private void placeRooms() {\n if (roomList.size() == 0) {\n throw new IllegalArgumentException(\"roomList must have rooms\");\n }\n // This is a nice cool square\n map = new int[MAP_SIZE][MAP_SIZE];\n\n for (Room room : roomList) {\n assignPosition(room);\n }\n }"
]
| [
"0.7392213",
"0.6889234",
"0.6730974",
"0.6705546",
"0.6673576",
"0.66507804",
"0.65681213",
"0.65671223",
"0.6550317",
"0.6532122",
"0.6477468",
"0.644399",
"0.64160347",
"0.6415783",
"0.6412908",
"0.63505507",
"0.62842906",
"0.627141",
"0.62223077",
"0.6175402",
"0.6158848",
"0.60526097",
"0.6048203",
"0.6044002",
"0.6033849",
"0.6017562",
"0.60082626",
"0.60004646",
"0.5963482",
"0.5959034",
"0.5949261",
"0.59452575",
"0.59349173",
"0.593127",
"0.59260756",
"0.5925053",
"0.5923097",
"0.590782",
"0.5906895",
"0.5903139",
"0.59012085",
"0.58967274",
"0.5884785",
"0.58777547",
"0.5861926",
"0.5841308",
"0.5831411",
"0.5827262",
"0.5822134",
"0.5817531",
"0.5815315",
"0.5804535",
"0.58039665",
"0.5801079",
"0.58009183",
"0.58001107",
"0.57946485",
"0.579117",
"0.5790069",
"0.5785893",
"0.57807493",
"0.57758415",
"0.57696295",
"0.57687324",
"0.5760798",
"0.5755955",
"0.57509",
"0.5749072",
"0.57482845",
"0.5748084",
"0.5744147",
"0.57421523",
"0.5734145",
"0.5712464",
"0.57112354",
"0.5699008",
"0.5698976",
"0.5693598",
"0.569347",
"0.56922185",
"0.56887406",
"0.5684075",
"0.56826323",
"0.56540155",
"0.56506956",
"0.56453145",
"0.56332487",
"0.56328607",
"0.5619813",
"0.5610847",
"0.56095517",
"0.56073034",
"0.56065005",
"0.56061345",
"0.56037056",
"0.56007135",
"0.55972594",
"0.5585313",
"0.558312",
"0.558165",
"0.5579823"
]
| 0.0 | -1 |
Declares face values to show the die in the GUI | private static void displayDice(Shaker shaker) {
int faceValue1 = shaker.getDice()[0].getFaceValue();
int faceValue2 = shaker.getDice()[1].getFaceValue();
// Displays the dice on the board
InterfaceController.setDice(faceValue1, faceValue2);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Die ()\n {\n numFaces = 6;\n faceValue = 1;\n }",
"public Die (int faces)\n {\n if (faces < MIN_FACES)\n numFaces = 6;\n else\n numFaces = faces;\n \n faceValue = 1;\n }",
"public Die() {\n\t\tthis.faceValue = 1;\n\t}",
"public Die(int faceValue) {\n\t\tthis.faceValue = faceValue;\n\t}",
"public int getDie1FaceValue()\r\n {\r\n return die1FaceValue;\r\n }",
"public void setFaceValue(double f){\n\t\tface = f ;\n\t}",
"public String toString()\r\n {\r\n return \"Die 1: \" + getFaceValue1() + \" Die 2: \" + getFaceValue2();\r\n }",
"public void setDie(int faceValue) {\n boardController.setDie(faceValue);\n }",
"public int getFaceValue ()\n {\n return faceValue;\n }",
"private void setFaceValue(FaceValue faceValue) {\n this.faceValue = faceValue;\n }",
"public double getFaceValue(){\n\t\t\n\t\treturn face ;\n\t}",
"public int getDie2FaceValue()\r\n {\r\n return die2FaceValue;\r\n }",
"protected int getFace() {\n return face;\n }",
"public void traitsValues(){\n\t\tsetTracksThatCover(Math.round((ADN.getTracksThatCover() +127)/85)+1);\n\t\tsetAmountOfPixels(Math.round((ADN.getAmountOfPixels() +127)/25)+5);\n\t\tsetAmountOfPoints(Math.round((ADN.getAmountOfPoints() +127)/85)+3);\n\n\t\tthis.getColorTrait();\n\t}",
"public Dice(int faces){\n this.faces = faces;\n }",
"public void setFace(int face) {\n\t\tthis.face = face;\n\t}",
"public int getFace(){\n return face;\n }",
"public int getFace(){\n\t\treturn this.verdi;\n\t}",
"public int getMyFaceValue(){\r\n return myFaceValue;\r\n }",
"public void setDice(int faceValue1, int faceValue2) {\n boardController.setDice(faceValue1, faceValue2);\n }",
"public String getFace()\r\n {\r\n face = \"[\";\r\n if (color != \"none\")\r\n {\r\n face += this.color + \" \";\r\n }\r\n // Switch sttements to set diffrent faces \r\n switch(this.value)\r\n {\r\n default: face += String.valueOf(this.value); \r\n break;\r\n case 10: face += \"Skip\"; \r\n break;\r\n case 11: face += \"Reverse\"; \r\n break;\r\n case 12: face += \"Draw 2\"; \r\n break;\r\n case 13: face += \"Wild\"; \r\n break;\r\n case 14: face += \"Wild Draw 4\"; \r\n break;\r\n }\r\n face += \"]\";\r\n return face;\r\n }",
"protected abstract void setFaces();",
"public Cup(GUI Gui)\n {\n gui = Gui;\n die1 = new Die();\n die2 = new Die();\n lastThrow = new int[]{die1.getFacevalue(), die2.getFacevalue()};\n }",
"public int getFaceValue() {\n\t\treturn faceValue;\n\t}",
"public String toString() {\n\t\treturn \"Face: \" + faceValue;\n\t}",
"public int showFace() {\n\t\treturn faceUp;\n\t}",
"public String getFaceValue()\n {\n\t// Local constants\n\n\t// Local variables\n\n\t/************ Start getFaceValue Method ***************/\n\n\t// Return face value\n return faceValue;\n\n }",
"public int faces() { \n return this.faces; \n }",
"protected abstract void showLeftFace();",
"public void setFace(int face) {\n\t\tthis.faceDirection = Face.values()[face];\n\t}",
"public String getFace() {\r\n return face;\r\n }",
"public String getFace() {\r\n return face;\r\n }",
"public String printFace() {\n if (faceUp) {\n return \"Faced up\";\n } else {\n return \"Faced down\";\n }\n }",
"public face2(){\r\n\tsuper(\"library\");\r\n\tface1.any1();\r\n\t//y=new GridLayout(face1.b,0);\r\n\tsetLayout(new BorderLayout());\r\n\tString s=\"\";\r\n\t//d=new JLabel[face1.b];\r\n\t\r\n\tfor(int i=0;i<face1.b;i++)\r\n\t{//d[i]=new JLabel(face1.a[i]);\r\n\t//add (d[i]);\r\n\ts=s+face1.a[i]+\"\\n\";\r\n\t}\r\n\tJTextArea f=new JTextArea(s,5,5);\r\n\t\t\tf.setEditable(false);\r\n\t\t\tadd(new JScrollPane(f), BorderLayout.CENTER);\r\n\t\t\r\n\t}",
"public void DPrimeEvent(ArrayList<ArrayList<Shape>> faces) {\r\n \tint cube = CUBE7;\r\n \tfor(int i = 0; i < 3; i++) {\r\n \t\tColor color = faces.get(FRONT).get(cube).getColor();\r\n \tfaces.get(FRONT).get(cube).changeColor(faces.get(RIGHT).get(cube).getColor());\r\n \tfaces.get(RIGHT).get(cube).changeColor(faces.get(BACK).get(cube).getColor());\r\n \tfaces.get(BACK).get(cube).changeColor(faces.get(LEFT).get(cube).getColor());\r\n \tfaces.get(LEFT).get(cube).changeColor(color);\r\n \tcube++;\r\n \t} \r\n \r\n \tColor color = faces.get(BOTTOM).get(CUBE1).getColor();\r\n \tfaces.get(BOTTOM).get(CUBE1).changeColor(faces.get(BOTTOM).get(CUBE3).getColor());\r\n \tfaces.get(BOTTOM).get(CUBE3).changeColor(faces.get(BOTTOM).get(CUBE9).getColor());\r\n \tfaces.get(BOTTOM).get(CUBE9).changeColor(faces.get(BOTTOM).get(CUBE7).getColor());\r\n \tfaces.get(BOTTOM).get(CUBE7).changeColor(color);\r\n \tcolor = faces.get(BOTTOM).get(CUBE2).getColor();\r\n \tfaces.get(BOTTOM).get(CUBE2).changeColor(faces.get(BOTTOM).get(CUBE6).getColor());\r\n \tfaces.get(BOTTOM).get(CUBE6).changeColor(faces.get(BOTTOM).get(CUBE8).getColor());\r\n \tfaces.get(BOTTOM).get(CUBE8).changeColor(faces.get(BOTTOM).get(CUBE4).getColor());\r\n \tfaces.get(BOTTOM).get(CUBE4).changeColor(color);\r\n }",
"public void drawFace(int face) {\n\t\tif (faceNearClipped[face]) {\n\t\t\tdrawNearClippedFace(face);\n\t\t\treturn;\n\t\t}\n\n\t\tint a = faceVertexA[face];\n\t\tint b = faceVertexB[face];\n\t\tint c = faceVertexC[face];\n\t\tDraw3D.clipX = faceClippedX[face];\n\n\t\tif (faceAlpha == null) {\n\t\t\tDraw3D.alpha = 0;\n\t\t} else {\n\t\t\tDraw3D.alpha = faceAlpha[face];\n\t\t}\n\n\t\tint type;\n\n\t\tif (faceInfo == null) {\n\t\t\ttype = 0;\n\t\t} else {\n\t\t\ttype = faceInfo[face] & 0b11;\n\t\t}\n\n\t\tif (type == 0) {\n\t\t\tDraw3D.fillGouraudTriangle(vertexScreenY[a], vertexScreenY[b], vertexScreenY[c], vertexScreenX[a], vertexScreenX[b], vertexScreenX[c], faceColorA[face], faceColorB[face], faceColorC[face]);\n\t\t} else if (type == 1) {\n\t\t\tDraw3D.fillTriangle(vertexScreenY[a], vertexScreenY[b], vertexScreenY[c], vertexScreenX[a], vertexScreenX[b], vertexScreenX[c], palette[faceColorA[face]]);\n\t\t} else if (type == 2) {\n\t\t\tint texturedFace = faceInfo[face] >> 2;\n\t\t\tint ta = texturedVertexA[texturedFace];\n\t\t\tint tb = texturedVertexB[texturedFace];\n\t\t\tint tc = texturedVertexC[texturedFace];\n\t\t\tDraw3D.fillTexturedTriangle(vertexScreenY[a], vertexScreenY[b], vertexScreenY[c], vertexScreenX[a], vertexScreenX[b], vertexScreenX[c], faceColorA[face], faceColorB[face], faceColorC[face], vertexViewSpaceX[ta], vertexViewSpaceX[tb], vertexViewSpaceX[tc], vertexViewSpaceY[ta], vertexViewSpaceY[tb], vertexViewSpaceY[tc], vertexViewSpaceZ[ta], vertexViewSpaceZ[tb], vertexViewSpaceZ[tc], faceColor[face]);\n\t\t} else if (type == 3) {\n\t\t\tint texturedFace = faceInfo[face] >> 2;\n\t\t\tint ta = texturedVertexA[texturedFace];\n\t\t\tint tb = texturedVertexB[texturedFace];\n\t\t\tint tc = texturedVertexC[texturedFace];\n\t\t\tDraw3D.fillTexturedTriangle(vertexScreenY[a], vertexScreenY[b], vertexScreenY[c], vertexScreenX[a], vertexScreenX[b], vertexScreenX[c], faceColorA[face], faceColorA[face], faceColorA[face], vertexViewSpaceX[ta], vertexViewSpaceX[tb], vertexViewSpaceX[tc], vertexViewSpaceY[ta], vertexViewSpaceY[tb], vertexViewSpaceY[tc], vertexViewSpaceZ[ta], vertexViewSpaceZ[tb], vertexViewSpaceZ[tc], faceColor[face]);\n\t\t}\n\t}",
"public Dice(int faces) {\n this.random = new Random();\n this.faces = faces;\n }",
"public void DEvent(ArrayList<ArrayList<Shape>> faces) {\r\n \tint cube = CUBE7;\r\n \tfor(int i = 0; i < 3; i++) {\r\n \t\tColor color = faces.get(FRONT).get(cube).getColor();\r\n \tfaces.get(FRONT).get(cube).changeColor(faces.get(LEFT).get(cube).getColor());\r\n \tfaces.get(LEFT).get(cube).changeColor(faces.get(BACK).get(cube).getColor());\r\n \tfaces.get(BACK).get(cube).changeColor(faces.get(RIGHT).get(cube).getColor());\r\n \tfaces.get(RIGHT).get(cube).changeColor(color);\r\n \tcube++;\t\r\n \t} \r\n \r\n \tColor color = faces.get(BOTTOM).get(CUBE1).getColor();\r\n \tfaces.get(BOTTOM).get(CUBE1).changeColor(faces.get(BOTTOM).get(CUBE7).getColor());\r\n \tfaces.get(BOTTOM).get(CUBE7).changeColor(faces.get(BOTTOM).get(CUBE9).getColor());\r\n \tfaces.get(BOTTOM).get(CUBE9).changeColor(faces.get(BOTTOM).get(CUBE3).getColor());\r\n \tfaces.get(BOTTOM).get(CUBE3).changeColor(color);\r\n \tcolor = faces.get(BOTTOM).get(CUBE2).getColor();\r\n \tfaces.get(BOTTOM).get(CUBE2).changeColor(faces.get(BOTTOM).get(CUBE4).getColor());\r\n \tfaces.get(BOTTOM).get(CUBE4).changeColor(faces.get(BOTTOM).get(CUBE8).getColor());\r\n \tfaces.get(BOTTOM).get(CUBE8).changeColor(faces.get(BOTTOM).get(CUBE6).getColor());\r\n \tfaces.get(BOTTOM).get(CUBE6).changeColor(color);\r\n }",
"public void setFace(String face) {\n\t\tthis.face = face;\n\t}",
"@Override\n\tpublic void render() {\n\t\tJOptionPane.showMessageDialog(null,\n\t\t \"Cuboid Dimensions: \" + \n\t\t \"\\nHeight = \" + height + \n\t\t \"\\nWidth = \" + width + \n\t\t \"\\nDepth = \" + depth +\n\t\t \"\\nSurface Area = \" + surfaceArea() +\n\t\t \"\\nVolume = \" + volume());\n\t\t\n\t}",
"private void ShowCurrentFace() \n {\n if( m_DoneInit )\n {\n String file = \"/tsbtool_gui/facepackage/\"+String.format(\"%02x.BMP\",m_ImageNumber).toUpperCase();\n //new javax.swing.ImageIcon(getClass().getResource(\"/tsbtool_gui/facepackage/00.png\")\n Image face = GetImage(file);\n if( face != null )\n {\n mFaceBox.setIcon( new ImageIcon( face));\n m_FaceLabel.setText(String.format(\"%02x\",m_ImageNumber).toUpperCase());\n }\n else\n JOptionPane.showMessageDialog(this, \"Problem with \"+file);\n AutoUpdateRoster();\n }\n }",
"public String toString()\r\n {\r\n return \"Die one is \" + die1FaceValue +\r\n \" and die two is \" + die2FaceValue +\r\n \" and dice total is \" + diceTotal + \".\" ;\r\n }",
"public void UPrimeEvent(ArrayList<ArrayList<Shape>> faces) {\r\n \tint cube = CUBE1;\r\n \tfor(int i = 0; i < 3; i++) {\r\n \t\tColor color = faces.get(FRONT).get(cube).getColor();\r\n \tfaces.get(FRONT).get(cube).changeColor(faces.get(LEFT).get(cube).getColor());\r\n \tfaces.get(LEFT).get(cube).changeColor(faces.get(BACK).get(cube).getColor());\r\n \tfaces.get(BACK).get(cube).changeColor(faces.get(RIGHT).get(cube).getColor());\r\n \tfaces.get(RIGHT).get(cube).changeColor(color);\r\n \tcube++;\r\n \t} \r\n \r\n \tColor color = faces.get(TOP).get(CUBE1).getColor();\r\n \tfaces.get(TOP).get(CUBE1).changeColor(faces.get(TOP).get(CUBE3).getColor());\r\n \tfaces.get(TOP).get(CUBE3).changeColor(faces.get(TOP).get(CUBE9).getColor());\r\n \tfaces.get(TOP).get(CUBE9).changeColor(faces.get(TOP).get(CUBE7).getColor());\r\n \tfaces.get(TOP).get(CUBE7).changeColor(color);\r\n \tcolor = faces.get(TOP).get(CUBE2).getColor();\r\n \tfaces.get(TOP).get(CUBE2).changeColor(faces.get(TOP).get(CUBE6).getColor());\r\n \tfaces.get(TOP).get(CUBE6).changeColor(faces.get(TOP).get(CUBE8).getColor());\r\n \tfaces.get(TOP).get(CUBE8).changeColor(faces.get(TOP).get(CUBE4).getColor());\r\n \tfaces.get(TOP).get(CUBE4).changeColor(color);\r\n }",
"public int getFace() {\n\t\treturn face;\n\t}",
"public void setDice(int faceValue1, int x1, int y1, int faceValue2,\n int x2, int y2) {\n boardController.setDice(faceValue1, x1, y1, faceValue2, x2, y2);\n }",
"public void roll ()\n {\n //sets faceValue to an int between 1 - numFaces (both inclusive)\n faceValue = (int)(Math.random() * numFaces + 1);\n }",
"@Override\n public void onNewItem(int id, Face face) {\n mEyesGraphic = new FaceTrackerGraphic(mOverlay);\n }",
"public void updateDirectionFace();",
"public void UEvent(ArrayList<ArrayList<Shape>> faces) {\r\n \tint cube = CUBE1;\r\n \tfor(int i = 0; i < 3; i++) {\r\n \t\tColor color = faces.get(FRONT).get(cube).getColor();\r\n \tfaces.get(FRONT).get(cube).changeColor(faces.get(RIGHT).get(cube).getColor());\r\n \tfaces.get(RIGHT).get(cube).changeColor(faces.get(BACK).get(cube).getColor());\r\n \tfaces.get(BACK).get(cube).changeColor(faces.get(LEFT).get(cube).getColor());\r\n \tfaces.get(LEFT).get(cube).changeColor(color);\r\n \tcube++; \t\r\n \t} \r\n \r\n \tColor color = faces.get(TOP).get(CUBE1).getColor();\r\n \tfaces.get(TOP).get(CUBE1).changeColor(faces.get(TOP).get(CUBE7).getColor());\r\n \tfaces.get(TOP).get(CUBE7).changeColor(faces.get(TOP).get(CUBE9).getColor());\r\n \tfaces.get(TOP).get(CUBE9).changeColor(faces.get(TOP).get(CUBE3).getColor());\r\n \tfaces.get(TOP).get(CUBE3).changeColor(color);\r\n \tcolor = faces.get(TOP).get(CUBE2).getColor();\r\n \tfaces.get(TOP).get(CUBE2).changeColor(faces.get(TOP).get(CUBE4).getColor());\r\n \tfaces.get(TOP).get(CUBE4).changeColor(faces.get(TOP).get(CUBE8).getColor());\r\n \tfaces.get(TOP).get(CUBE8).changeColor(faces.get(TOP).get(CUBE6).getColor());\r\n \tfaces.get(TOP).get(CUBE6).changeColor(color);\r\n }",
"public String getFace() {\n\t\treturn face;\n\t}",
"private void instantiateVariables() {\n paint = new Paint();\n fightActivity = (FightActivity) context;\n Typeface tf = Typeface.create(\"Arial\", Typeface.BOLD);\n paint.setTypeface(tf);\n }",
"public Furnace() {\n\t\tsuper(\"Furnace\"); // Name of the furnace\n\t\tcol = Color.get(-1, 000, 222, 333); // Color of the furnace\n\t\tsprite = 3; // Location of the sprite\n\t\txr = 3; // Width of the furnace (in-game, not sprite) \n\t\tyr = 2; // Height of the furnace (in-game, not sprite) \n\t}",
"@Override\n public void onNewItem(int id, Face face) {\n //mEyesGraphic = new com.eyegalaxy.eyegalaxydemo.GooglyEyesGraphic(mOverlay);\n }",
"protected abstract void showRightFace();",
"public Figure (){\n\t\tthis.simple = 0;\n\t\tthis.paire = 0;\n\t\tthis.berlan = 0;\n\t\tthis.carre = 0;\n\t}",
"public Die()\n {\n sides = 6;\n }",
"public Face()\n {\n \n // nothing to do... instance variables are automatically set to null\n }",
"void intialize_variables() {\n rolls=\"\";\n down_angle=0;\n up_angle=0;\n angle_with_ground=0;\n human_length = 162;\n seek_human_length=(SeekBar) findViewById(R.id.seekBar);\n seek_human_length.setProgress(160);\n text_sek=(TextView)findViewById(R.id.text_seek);\n touch_ground_switch =(Switch)findViewById(R.id.switch1);\n cross_h = (ImageView) findViewById(R.id.crosshair);\n dm = new DisplayMetrics();\n getWindowManager().getDefaultDisplay().getMetrics(dm);\n cross_h.getLayoutParams().width = (dm.widthPixels * 15 / 100);\n cross_h.getLayoutParams().height = (dm.widthPixels * 15 / 100);\n\n }",
"void updateFace(Face face) {\n mFace = face;\n postInvalidate();\n }",
"void showFaithCube(FamilyColor familyColor, int cardOrdinal);",
"public void setFaceUp(){faceUp = true;}",
"public void setFace(CardFace face) {\n if (face == CardFace.FACE_DOWN) {\n cardFace = CardFace.FACE_DOWN;\n sprite.texture = faceDownTexture;\n } else {\n cardFace = CardFace.FACE_UP;\n sprite.texture = faceUpTexture;\n }\n }",
"@Override\n public void onUpdate(FaceDetector.Detections<Face> detectionResults, Face face) {\n mOverlay.add(mEyesGraphic);\n\n updatePreviousProportions(face);\n\n float leftOpenScore = face.getIsLeftEyeOpenProbability();\n if (leftOpenScore == Face.UNCOMPUTED_PROBABILITY) {\n //cannot be computed nothing is done\n } else {\n isLeftOpen = (leftOpenScore > EYE_CLOSED_THRESHOLD);\n }\n\n float rightOpenScore = face.getIsRightEyeOpenProbability();\n if (rightOpenScore == Face.UNCOMPUTED_PROBABILITY) {\n //false nothing done\n } else {\n isRightOpen = (rightOpenScore > EYE_CLOSED_THRESHOLD);\n }\n\n\n if(face.getEulerZ()>20){\n isRotateRight = true;\n if (rotated==0){\n }\n rotated++;\n //security measure only true after you've passed the prev one\n if (winked>0){\n rotated++;\n }\n\n }\n\n winkLeft = !isLeftOpen && isRightOpen;\n if (winkLeft && rotated>0){\n winked++;\n }\n\n if (face.getIsSmilingProbability()>SMILE_THRESHOLD){\n isSmile = true;\n if (winked>0 && rotated>0){\n smile++;\n }\n\n }\n /*\n Log.i(\"test\",\"Y rotation is\" +face.getEulerY());\n Log.i(\"test\",\"Z rotation is\" +face.getEulerZ());\n Log.i(\"test\",\"smilin prob is\" +face.getIsSmilingProbability());\n*/\n mEyesGraphic.updateItem(face, rotated, winked, smile);\n }",
"public void setSwingCharacteristics() {\n\t\tcharacterName.setPreferredSize(new Dimension(1050, 100));\n\t\tcharacterName.setFont(f);\n\n\t\talignment.setPreferredSize(new Dimension(400, 100));\n\t\talignment.setFont(f);\n\n\t\tplayerName.setPreferredSize(new Dimension(500, 100));\n\t\tplayerName.setFont(f);\n\n\t\tmultiClassLabel.setPreferredSize(new Dimension(200, 100));\n\t\tmultiClassLabel\n\t\t\t\t.setForeground(new Color(Colors.WHITE.getColorR(), Colors.WHITE.getColorG(), Colors.WHITE.getColorB()));\n\t\tmultiClassLabel.setFont(f);\n\n\t\tmultiClass.setPreferredSize(new Dimension(100, 100));\n\t\tmultiClass.setFont(f);\n\n\t\traceLabel.setPreferredSize(new Dimension(150, 100));\n\t\traceLabel.setFont(f);\n\n\t\trace.setPreferredSize(new Dimension(300, 100));\n\t\trace.setFont(f);\n\n\t\tsize.setPreferredSize(new Dimension(250, 100));\n\t\tsize.setFont(f);\n\n\t\tgender.setPreferredSize(new Dimension(200, 100));\n\t\tgender.setFont(f);\n\n\t\tgenderLabel.setPreferredSize(new Dimension(150, 100));\n\t\tgenderLabel.setFont(f);\n\n\t\tageRollOrInput.add(ageRollSelection);\n\t\tageRollOrInput.add(ageInputSelection);\n\n\t\tageRollSelection.setPreferredSize(new Dimension(200, 100));\n\t\tageRollSelection.setFont(f);\n\t\tageRollSelection.setBackground(lightGray);\n\n\t\tageInputSelection.setPreferredSize(new Dimension(240, 100));\n\t\tageInputSelection.setFont(f);\n\t\tageInputSelection.setBackground(lightGray);\n\n\t\tageRoll.setPreferredSize(new Dimension(150, 100));\n\t\tageRoll.setFont(f);\n\n\t\tageInput.setPreferredSize(new Dimension(200, 100));\n\t\tageInput.setFont(f);\n\n\t\tageRange.add(intuitive);\n\t\tageRange.add(selfTaught);\n\t\tageRange.add(trained);\n\n\t\tageLabel.setPreferredSize(new Dimension(75, 100));\n\t\tageLabel.setFont(f);\n\n\t\tintuitive.setPreferredSize(new Dimension(350, 100));\n\t\tintuitive.setFont(f);\n\n\t\tselfTaught.setPreferredSize(new Dimension(400, 100));\n\t\tselfTaught.setFont(f);\n\n\t\ttrained.setPreferredSize(new Dimension(350, 100));\n\t\ttrained.setFont(f);\n\n\t\theightRollOrInput.add(heightInputSelection);\n\t\theightRollOrInput.add(heightRollSelection);\n\n\t\theightInputSelection.setPreferredSize(new Dimension(300, 100));\n\t\theightInputSelection.setFont(f);\n\n\t\theightRollSelection.setPreferredSize(new Dimension(300, 100));\n\t\theightRollSelection.setFont(f);\n\n\t\theightRoll.setPreferredSize(new Dimension(150, 100));\n\t\theightRoll.setFont(f);\n\n\t\theightInput.setPreferredSize(new Dimension(150, 100));\n\t\theightInput.setFont(f);\n\n\t\theightLabel.setPreferredSize(new Dimension(150, 100));\n\t\theightLabel.setFont(f);\n\n\t\tweightRollOrInput.add(weightInputSelection);\n\t\tweightRollOrInput.add(weightRollSelection);\n\n\t\tweightInputSelection.setPreferredSize(new Dimension(300, 100));\n\t\tweightInputSelection.setFont(f);\n\n\t\tweightRollSelection.setPreferredSize(new Dimension(300, 100));\n\t\tweightRollSelection.setFont(f);\n\n\t\tweightRoll.setPreferredSize(new Dimension(200, 100));\n\t\tweightRoll.setFont(f);\n\n\t\tweightInput.setPreferredSize(new Dimension(150, 100));\n\t\tweightInput.setFont(f);\n\n\t\tweightLabel.setPreferredSize(new Dimension(150, 100));\n\t\tweightLabel.setFont(f);\n\n\t\thairLabel.setPreferredSize(new Dimension(200, 100));\n\t\thairLabel.setFont(f);\n\n\t\thairColor.setPreferredSize(new Dimension(400, 100));\n\t\thairColor.setFont(f);\n\n\t\teyeLabel.setPreferredSize(new Dimension(200, 100));\n\t\teyeLabel.setFont(f);\n\n\t\teyeColor.setPreferredSize(new Dimension(400, 100));\n\t\teyeColor.setFont(f);\n\n\t\tstrengthSpinner.setValue(10);\n\t\tstrengthSpinner.setPreferredSize(new Dimension(200, 150));\n\t\tstrengthSpinner.setFont(f);\n\n\t\tdexteritySpinner.setValue(10);\n\t\tdexteritySpinner.setPreferredSize(new Dimension(200, 150));\n\t\tdexteritySpinner.setFont(f);\n\n\t\tconstitutionSpinner.setValue(10);\n\t\tconstitutionSpinner.setPreferredSize(new Dimension(200, 150));\n\t\tconstitutionSpinner.setFont(f);\n\n\t\tintelligenceSpinner.setValue(10);\n\t\tintelligenceSpinner.setPreferredSize(new Dimension(200, 150));\n\t\tintelligenceSpinner.setFont(f);\n\n\t\twisdomSpinner.setValue(10);\n\t\twisdomSpinner.setPreferredSize(new Dimension(200, 150));\n\t\twisdomSpinner.setFont(f);\n\n\t\tcharismaSpinner.setValue(10);\n\t\tcharismaSpinner.setPreferredSize(new Dimension(200, 150));\n\t\tcharismaSpinner.setFont(f);\n\n\t\tstrengthLabel.setPreferredSize(new Dimension(200, 150));\n\t\tstrengthLabel.setFont(f);\n\t\tstrengthLabel.setOpaque(true);\n\t\tstrengthLabel.setBackground(black);\n\t\tstrengthLabel.setForeground(white);\n\n\t\tdexterityLabel.setPreferredSize(new Dimension(200, 150));\n\t\tdexterityLabel.setFont(f);\n\t\tdexterityLabel.setOpaque(true);\n\t\tdexterityLabel.setBackground(black);\n\t\tdexterityLabel.setForeground(white);\n\n\t\tconstitutionLabel.setPreferredSize(new Dimension(220, 150));\n\t\tconstitutionLabel.setFont(f);\n\t\tconstitutionLabel.setOpaque(true);\n\t\tconstitutionLabel.setBackground(black);\n\t\tconstitutionLabel.setForeground(white);\n\n\t\tintelligenceLabel.setPreferredSize(new Dimension(200, 150));\n\t\tintelligenceLabel.setFont(f);\n\t\tintelligenceLabel.setOpaque(true);\n\t\tintelligenceLabel.setBackground(black);\n\t\tintelligenceLabel.setForeground(white);\n\n\t\twisdomLabel.setPreferredSize(new Dimension(200, 150));\n\t\twisdomLabel.setFont(f);\n\t\twisdomLabel.setOpaque(true);\n\t\twisdomLabel.setBackground(black);\n\t\twisdomLabel.setForeground(white);\n\n\t\tcharismaLabel.setPreferredSize(new Dimension(200, 150));\n\t\tcharismaLabel.setFont(f);\n\t\tcharismaLabel.setOpaque(true);\n\t\tcharismaLabel.setBackground(black);\n\t\tcharismaLabel.setForeground(white);\n\n\t\tstrengthInput.setPreferredSize(new Dimension(200, 150));\n\t\tstrengthInput.setFont(f);\n\n\t\tdexterityInput.setPreferredSize(new Dimension(200, 150));\n\t\tdexterityInput.setFont(f);\n\n\t\tconstitutionInput.setPreferredSize(new Dimension(200, 150));\n\t\tconstitutionInput.setFont(f);\n\n\t\tintelligenceInput.setPreferredSize(new Dimension(200, 150));\n\t\tintelligenceInput.setFont(f);\n\n\t\twisdomInput.setPreferredSize(new Dimension(200, 150));\n\t\twisdomInput.setFont(f);\n\n\t\tcharismaInput.setPreferredSize(new Dimension(200, 150));\n\t\tcharismaInput.setFont(f);\n\n\t\tstrengthRoll.setPreferredSize(new Dimension(200, 150));\n\t\tstrengthRoll.setFont(f);\n\n\t\tdexterityRoll.setPreferredSize(new Dimension(200, 150));\n\t\tdexterityRoll.setFont(f);\n\n\t\tconstitutionRoll.setPreferredSize(new Dimension(250, 150));\n\t\tconstitutionRoll.setFont(f);\n\n\t\tintelligenceRoll.setPreferredSize(new Dimension(240, 150));\n\t\tintelligenceRoll.setFont(f);\n\n\t\twisdomRoll.setPreferredSize(new Dimension(180, 150));\n\t\twisdomRoll.setFont(f);\n\n\t\tcharismaRoll.setPreferredSize(new Dimension(220, 150));\n\t\tcharismaRoll.setFont(f);\n\n\t\ttemporaryStrengthInput.setPreferredSize(new Dimension(150, 150));\n\t\ttemporaryStrengthInput.setFont(f);\n\n\t\ttemporaryDexterityInput.setPreferredSize(new Dimension(150, 150));\n\t\ttemporaryDexterityInput.setFont(f);\n\n\t\ttemporaryConstitutionInput.setPreferredSize(new Dimension(150, 150));\n\t\ttemporaryConstitutionInput.setFont(f);\n\n\t\ttemporaryIntelligenceInput.setPreferredSize(new Dimension(150, 150));\n\t\ttemporaryIntelligenceInput.setFont(f);\n\n\t\ttemporaryWisdomInput.setPreferredSize(new Dimension(150, 150));\n\t\ttemporaryWisdomInput.setFont(f);\n\n\t\ttemporaryCharismaInput.setPreferredSize(new Dimension(150, 150));\n\t\ttemporaryCharismaInput.setFont(f);\n\n\t\ttemporaryStrengthLabel.setPreferredSize(new Dimension(200, 150));\n\t\ttemporaryStrengthLabel.setFont(f);\n\n\t\ttemporaryDexterityLabel.setPreferredSize(new Dimension(200, 150));\n\t\ttemporaryDexterityLabel.setFont(f);\n\n\t\ttemporaryConstitutionLabel.setPreferredSize(new Dimension(200, 150));\n\t\ttemporaryConstitutionLabel.setFont(f);\n\n\t\ttemporaryIntelligenceLabel.setPreferredSize(new Dimension(200, 150));\n\t\ttemporaryIntelligenceLabel.setFont(f);\n\n\t\ttemporaryWisdomLabel.setPreferredSize(new Dimension(200, 150));\n\t\ttemporaryWisdomLabel.setFont(f);\n\n\t\ttemporaryCharismaLabel.setPreferredSize(new Dimension(200, 150));\n\t\ttemporaryCharismaLabel.setFont(f);\n\n\t\tstrengthModifierLabel.setPreferredSize(new Dimension(200, 200));\n\t\tstrengthModifierLabel.setFont(f);\n\t\tstrengthModifierLabel.setText(\"<html>Modifier: \" + \"<br>\"\n\t\t\t\t+ String.valueOf((Integer.parseInt(strengthInput.getText()) - abilityScoreBaseValue) / 2) + \"</html>\");\n\n\t\tdexterityModifierLabel.setPreferredSize(new Dimension(200, 200));\n\t\tdexterityModifierLabel.setFont(f);\n\t\tdexterityModifierLabel.setText(\"<html>Modifier: \" + \"<br>\"\n\t\t\t\t+ String.valueOf((Integer.parseInt(dexterityInput.getText()) - abilityScoreBaseValue) / 2) + \"</html>\");\n\n\t\tconstitutionModifierLabel.setPreferredSize(new Dimension(200, 200));\n\t\tconstitutionModifierLabel.setFont(f);\n\t\tconstitutionModifierLabel.setText(\"<html>Modifier: \" + \"<br>\"\n\t\t\t\t+ String.valueOf((Integer.parseInt(constitutionInput.getText()) - abilityScoreBaseValue) / 2)\n\t\t\t\t+ \"</html>\");\n\n\t\tintelligenceModifierLabel.setPreferredSize(new Dimension(200, 200));\n\t\tintelligenceModifierLabel.setFont(f);\n\t\tintelligenceModifierLabel.setText(\"<html>Modifier: \" + \"<br>\"\n\t\t\t\t+ String.valueOf((Integer.parseInt(intelligenceInput.getText()) - abilityScoreBaseValue) / 2)\n\t\t\t\t+ \"</html>\");\n\n\t\twisdomModifierLabel.setPreferredSize(new Dimension(200, 200));\n\t\twisdomModifierLabel.setFont(f);\n\t\twisdomModifierLabel.setText(\"<html>Modifier: \" + \"<br>\"\n\t\t\t\t+ String.valueOf((Integer.parseInt(wisdomInput.getText()) - abilityScoreBaseValue) / 2) + \"</html>\");\n\n\t\tcharismaModifierLabel.setPreferredSize(new Dimension(200, 200));\n\t\tcharismaModifierLabel.setFont(f);\n\t\tcharismaModifierLabel.setText(\"<html>Modifier: \" + \"<br>\"\n\t\t\t\t+ String.valueOf((Integer.parseInt(charismaInput.getText()) - abilityScoreBaseValue) / 2) + \"</html>\");\n\n\t\ttemporaryStrengthModifierLabel.setPreferredSize(new Dimension(200, 150));\n\t\ttemporaryStrengthModifierLabel.setFont(f);\n\n\t\ttemporaryDexterityModifierLabel.setPreferredSize(new Dimension(200, 150));\n\t\ttemporaryDexterityModifierLabel.setFont(f);\n\n\t\ttemporaryConstitutionModifierLabel.setPreferredSize(new Dimension(200, 150));\n\t\ttemporaryConstitutionModifierLabel.setFont(f);\n\n\t\ttemporaryIntelligenceModifierLabel.setPreferredSize(new Dimension(200, 150));\n\t\ttemporaryIntelligenceModifierLabel.setFont(f);\n\n\t\ttemporaryWisdomModifierLabel.setPreferredSize(new Dimension(200, 150));\n\t\ttemporaryWisdomModifierLabel.setFont(f);\n\n\t\ttemporaryCharismaModifierLabel.setPreferredSize(new Dimension(200, 150));\n\t\ttemporaryCharismaModifierLabel.setFont(f);\n\n\t\tabilitySelection.add(abilityRoll);\n\t\tabilitySelection.add(abilityInput);\n\n\t\tabilityRoll.setPreferredSize(new Dimension(400, 100));\n\t\tabilityRoll.setFont(f);\n\n\t\tabilityInput.setPreferredSize(new Dimension(400, 100));\n\t\tabilityInput.setFont(f);\n\n\t\tfantasySelection.add(lowFantasy);\n\t\tfantasySelection.add(standardFantasy);\n\t\tfantasySelection.add(highFantasy);\n\t\tfantasySelection.add(epicFantasy);\n\n\t\tlowFantasy.setPreferredSize(new Dimension(450, 100));\n\t\tlowFantasy.setFont(f);\n\n\t\tstandardFantasy.setPreferredSize(new Dimension(550, 100));\n\t\tstandardFantasy.setFont(f);\n\n\t\thighFantasy.setPreferredSize(new Dimension(450, 100));\n\t\thighFantasy.setFont(f);\n\n\t\tepicFantasy.setPreferredSize(new Dimension(450, 100));\n\t\tepicFantasy.setFont(f);\n\n\t\tfantasyPointsLabel.setPreferredSize(new Dimension(400, 100));\n\t\tfantasyPointsLabel.setFont(f);\n\n\t\tsaveProgress.setPreferredSize(new Dimension(700, 100));\n\t\tsaveProgress.setFont(f);\n\n\t\tsaveAbility.setPreferredSize(new Dimension(300, 100));\n\t\tsaveAbility.setFont(f);\n\n\t}",
"public void FPrimeEvent(ArrayList<ArrayList<Shape>> faces) {\r\n \tint u1 = CUBE7, l1 = CUBE9, r1 = CUBE1, b1 = CUBE3;\r\n \tfor(int i = 0; i < 3; i++) {\r\n \t\tColor color = faces.get(TOP).get(u1).getColor();\r\n \tfaces.get(TOP).get(u1).changeColor(faces.get(RIGHT).get(r1).getColor());\r\n \tfaces.get(RIGHT).get(r1).changeColor(faces.get(BOTTOM).get(b1).getColor());\r\n \tfaces.get(BOTTOM).get(b1).changeColor(faces.get(LEFT).get(l1).getColor());\r\n \tfaces.get(LEFT).get(l1).changeColor(color);\r\n \tu1++;\r\n \tl1 -= SHIFT_ROW;\r\n \tb1--;\r\n \tr1 += SHIFT_ROW;\r\n \t} \r\n \r\n \tColor color = faces.get(FRONT).get(CUBE1).getColor();\r\n \tfaces.get(FRONT).get(CUBE1).changeColor(faces.get(FRONT).get(CUBE3).getColor());\r\n \tfaces.get(FRONT).get(CUBE3).changeColor(faces.get(FRONT).get(CUBE9).getColor());\r\n \tfaces.get(FRONT).get(CUBE9).changeColor(faces.get(FRONT).get(CUBE7).getColor());\r\n \tfaces.get(FRONT).get(CUBE7).changeColor(color);\r\n \tcolor = faces.get(FRONT).get(CUBE2).getColor();\r\n \tfaces.get(FRONT).get(CUBE2).changeColor(faces.get(FRONT).get(CUBE6).getColor());\r\n \tfaces.get(FRONT).get(CUBE6).changeColor(faces.get(FRONT).get(CUBE8).getColor());\r\n \tfaces.get(FRONT).get(CUBE8).changeColor(faces.get(FRONT).get(CUBE4).getColor());\r\n \tfaces.get(FRONT).get(CUBE4).changeColor(color);\r\n }",
"public int getFaces() {\n return this.faces;\n }",
"public void FEvent(ArrayList<ArrayList<Shape>> faces) {\r\n \tint u1 = CUBE7, l1 = CUBE9, r1 = CUBE1, b1 = CUBE3;\r\n \tfor(int i = 0; i < 3; i++) {\r\n \t\tColor color = faces.get(TOP).get(u1).getColor();\r\n \tfaces.get(TOP).get(u1).changeColor(faces.get(LEFT).get(l1).getColor());\r\n \tfaces.get(LEFT).get(l1).changeColor(faces.get(BOTTOM).get(b1).getColor());\r\n \tfaces.get(BOTTOM).get(b1).changeColor(faces.get(RIGHT).get(r1).getColor());\r\n \tfaces.get(RIGHT).get(r1).changeColor(color);\r\n \tu1++;\r\n \tl1 -= SHIFT_ROW;\r\n \tb1--;\r\n \tr1 += SHIFT_ROW;\r\n \t} \r\n \r\n \tColor color = faces.get(FRONT).get(CUBE1).getColor();\r\n \tfaces.get(FRONT).get(CUBE1).changeColor(faces.get(FRONT).get(CUBE7).getColor());\r\n \tfaces.get(FRONT).get(CUBE7).changeColor(faces.get(FRONT).get(CUBE9).getColor());\r\n \tfaces.get(FRONT).get(CUBE9).changeColor(faces.get(FRONT).get(CUBE3).getColor());\r\n \tfaces.get(FRONT).get(CUBE3).changeColor(color);\r\n \tcolor = faces.get(FRONT).get(CUBE2).getColor();\r\n \tfaces.get(FRONT).get(CUBE2).changeColor(faces.get(FRONT).get(CUBE4).getColor());\r\n \tfaces.get(FRONT).get(CUBE4).changeColor(faces.get(FRONT).get(CUBE8).getColor());\r\n \tfaces.get(FRONT).get(CUBE8).changeColor(faces.get(FRONT).get(CUBE6).getColor());\r\n \tfaces.get(FRONT).get(CUBE6).changeColor(color);\r\n }",
"public JavFx() {\n JFrame frame = new JFrame(\"FX\");\n Dimension dm = new Dimension(850, 630);\n\n frame.getContentPane().setLayout(null);\n\n final JTextArea url = new JTextArea(); //a field for entering an url addresses\n url.setToolTipText(\"Example: google.com\");\n\n final JButton jButton = new JButton(\"Dataset\");\n final JButton jLoad = new JButton(\"Load\");\n\n JMenuBar jmb = new JMenuBar();\n JMenu jm = new JMenu(\"File\");\n JMenuItem rec = new JMenuItem(\"Learn\");\n\n JMenuItem setting = new JMenuItem(\"Settings\");\n\n JPanel paramsPane = new JPanel();\n JPanel settingPane = new JPanel();\n settingPane.setLayout(new BoxLayout(settingPane,BoxLayout.Y_AXIS));\n\n final Checkbox ck = new Checkbox(\"Draw the facial rectangles within the window (Haar)\");\n final Checkbox eigenCheck = new Checkbox(\"Eigenfaces recognition\");\n final Checkbox AFRCheck = new Checkbox(\"AnnotatorFaceRecogniser KNN\");\n final Checkbox fisherCheck = new Checkbox(\"Fisherfaces recognition + KEFaceDetector\");\n\n final JTextField threshold = new JTextField(3);\n threshold.setToolTipText(\"Threshold for EigenFaces\");\n threshold.setText(\"Threashold\");\n\n //overriding of paintComponent() method for drawing operations in window\n fxPanel = new JFXPanel() {\n @Override\n public void paintComponent(Graphics g) {\n super.paintComponent(g);\n w = getWidth();\n h = getHeight();\n g2D = (Graphics2D) g;\n g2D.setPaint(Color.RED);\n g2D.setStroke(bsk);\n if (faces != null && ifInside) {\n\n int bounderer = 0;\n\n for (DetectedFace face : faces) {\n if (face.getConfidence() < 8.0f) continue;\n x = Math.round(face.getBounds().x);\n y = Math.round(face.getBounds().y);\n buf = \"\" + face.getConfidence();\n width = Math.round(face.getBounds().width);\n height = Math.round(face.getBounds().height);\n g.drawString(buf, x + 10, y - 10);\n g.drawRect(x, y, width, height);\n\n thrName = Thread.currentThread().getName();\n\n if (namesAwt != null && !thrName.equals(\"firstWorker\") && !thrName.equals(\"secondWorker\")) {\n\n if (bounderer < namesAwt.size()) {\n if (!namesAwt.get(bounderer).isEmpty()) {\n g.drawString(namesAwt.get(bounderer), x + 40, y - 10);\n bounderer++;\n }\n }\n if (bounderer == namesAwt.size()) bounderer = 0;\n }\n }\n }\n if(kefaces != null){\n int bounderer = 0;\n\n for (KEDetectedFace face : kefaces) {\n if (face.getConfidence() < 8.0f) continue;\n x = Math.round(face.getBounds().x);\n y = Math.round(face.getBounds().y);\n buf = \"\" + face.getConfidence();\n width = Math.round(face.getBounds().width);\n height = Math.round(face.getBounds().height);\n g.drawString(buf, x + 10, y - 10);\n g.drawRect(x, y, width, height);\n\n thrName = Thread.currentThread().getName();\n\n if (namesAwt != null && !thrName.equals(\"firstWorker\") && !thrName.equals(\"secondWorker\")) {\n\n if (bounderer < namesAwt.size()) {\n if (!namesAwt.get(bounderer).isEmpty()) {\n g.drawString(namesAwt.get(bounderer), x + 40, y - 10);\n bounderer++;\n }\n }\n if (bounderer == namesAwt.size()) bounderer = 0;\n }\n }\n }\n }\n };\n\n Platform.runLater(() -> { //runs long-running process for making images and facial detecting\n MixedProcess process = new MixedProcess();\n try {\n process.execute();\n } catch (Exception e) {\n e.printStackTrace();\n }\n });\n\n Platform.runLater(() -> { //runs second long-running process for making images and performing recognition\n LongRunProcess process2 = new LongRunProcess();\n try {\n process2.execute();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n );\n\n //\n frame.addWindowListener(new WindowListener() {\n @Override\n public void windowOpened(WindowEvent e) {\n\n }\n\n @Override\n public void windowClosing(WindowEvent e) {\n Platform.runLater(new Runnable() { //closes frame consisting initFX and set the WebView to null\n @Override\n public void run() {\n webView.getEngine().load(null);\n frame.setVisible(false);\n }\n });\n }\n\n @Override\n public void windowClosed(WindowEvent e) {\n\n }\n\n @Override\n public void windowIconified(WindowEvent e) {\n\n }\n\n @Override\n public void windowDeiconified(WindowEvent e) {\n\n }\n\n @Override\n public void windowActivated(WindowEvent e) {\n\n }\n\n @Override\n public void windowDeactivated(WindowEvent e) {\n\n }\n });\n\n //allows us to change a loaded page by pushing the jLoad button\n jLoad.addActionListener(e -> {\n Platform.runLater(() -> {\n if (!url.getText().equals(\"\"))\n webView.getEngine().load(\"http:\\\\\\\\\" + url.getText());\n });\n });\n\n jButton.addActionListener(e -> { //Execute some JS code by pushing button\n Platform.runLater(() -> {\n if(!(JOptionPane.showConfirmDialog(null,\"Are you sure?\",\"Datasets handling\",JOptionPane.YES_NO_OPTION,JOptionPane.QUESTION_MESSAGE) == JOptionPane.OK_OPTION))\n return;\n if(dataset == null && KNN_dataset == null && training == null) {\n JOptionPane.showMessageDialog(null, \"Please train any algorithm first!\", \"Prompt\", JOptionPane.WARNING_MESSAGE);\n return;\n }\n if(dataset != null && method == 3)\n if(!dataset.isEmpty()) {\n frame.setEnabled(false);\n JFrame jfr = new JFrame(\"Method: Fisherfaces + KEFaceDetection\");\n JLabel info = new JLabel(\"Training dataset:\",SwingConstants.CENTER);\n JButton erase = new JButton(\"Erase dataset\");\n DefaultTableModel model = new DefaultTableModel(new String[]{\"Facial name\",\"Image\"},dataset.keySet().size()){\n public Class getColumnClass(int column)\n {\n return getValueAt(0, column).getClass();\n }\n };\n\n Iterator<String> it = dataset.getGroups().iterator();\n for (int i = 0; i < dataset.keySet().size(); i++) {\n String buff = it.next();\n model.setValueAt(buff,i,0);\n //model.setValueAt(dataset.getRandomInstance(buff),i,1);\n model.setValueAt(new ImageIcon(ImageUtilities.createBufferedImage(dataset.getRandomInstance(buff).getFacePatch())),i,1);\n }\n JTable table = new JTable(model);\n table.setPreferredScrollableViewportSize(table.getPreferredSize());\n table.setCellSelectionEnabled(false);\n table.setRowHeight(rows);\n JScrollPane jsp = new JScrollPane(table);\n jsp.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);\n jsp.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);\n\n erase.addActionListener((e2)->{\n dataset = null;\n fisherCheck.setState(false);\n fisher_recogniser = null;\n ck.setState(false);\n kefaces = null;\n faces = null;\n names = null;\n namesAwt = null;\n model.setRowCount(0);\n table.revalidate();\n ifInside = false;\n });\n\n jfr.getContentPane().add(info,BorderLayout.NORTH);\n jfr.getContentPane().add(jsp,BorderLayout.CENTER);\n jfr.getContentPane().add(erase,BorderLayout.SOUTH);\n\n jfr.setSize(400,rows + 200);\n\n jfr.addWindowListener(new WindowListener() {\n @Override\n public void windowOpened(WindowEvent e) {\n\n }\n\n @Override\n public void windowClosing(WindowEvent e) {\n frame.setEnabled(true);\n }\n\n @Override\n public void windowClosed(WindowEvent e) {\n\n }\n\n @Override\n public void windowIconified(WindowEvent e) {\n\n }\n\n @Override\n public void windowDeiconified(WindowEvent e) {\n\n }\n\n @Override\n public void windowActivated(WindowEvent e) {\n\n }\n\n @Override\n public void windowDeactivated(WindowEvent e) {\n\n }\n });\n\n jfr.setVisible(true);\n }\n\n if(KNN_dataset != null && method == 2)\n if(!KNN_dataset.isEmpty()) {\n frame.setEnabled(false);\n JFrame jfr = new JFrame(\"Method: KNNAnnotator + HaarFaceDetection\");\n JLabel info = new JLabel(\"Training dataset:\",SwingConstants.CENTER);\n JButton erase = new JButton(\"Erase dataset\");\n DefaultTableModel model = new DefaultTableModel(new String[]{\"Facial name\",\"Image\"},KNN_dataset.keySet().size()){\n public Class getColumnClass(int column)\n {\n return getValueAt(0, column).getClass();\n }\n };\n\n Iterator<String> it = KNN_dataset.getGroups().iterator();\n for (int i = 0; i < KNN_dataset.keySet().size(); i++) {\n String buff = it.next();\n model.setValueAt(buff,i,0);\n //model.setValueAt(dataset.getRandomInstance(buff),i,1);\n model.setValueAt(new ImageIcon(ImageUtilities.createBufferedImage(KNN_dataset.getRandomInstance(buff).getFacePatch())),i,1);\n }\n JTable table = new JTable(model);\n table.setPreferredScrollableViewportSize(table.getPreferredSize());\n table.setCellSelectionEnabled(false);\n table.setRowHeight(rows);\n JScrollPane jsp = new JScrollPane(table);\n jsp.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);\n jsp.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);\n\n erase.addActionListener((e2)->{\n KNN_dataset = null;\n AFRCheck.setState(false);\n recogniser = null;\n ck.setState(false);\n faces = null;\n names = null;\n namesAwt = null;\n model.setRowCount(0);\n table.revalidate();\n ifInside = false;\n });\n\n jfr.getContentPane().add(info,BorderLayout.NORTH);\n jfr.getContentPane().add(jsp,BorderLayout.CENTER);\n jfr.getContentPane().add(erase,BorderLayout.SOUTH);\n\n jfr.setSize(400,rows + 200);\n\n jfr.addWindowListener(new WindowListener() {\n @Override\n public void windowOpened(WindowEvent e) {\n\n }\n\n @Override\n public void windowClosing(WindowEvent e) {\n frame.setEnabled(true);\n }\n\n @Override\n public void windowClosed(WindowEvent e) {\n\n }\n\n @Override\n public void windowIconified(WindowEvent e) {\n\n }\n\n @Override\n public void windowDeiconified(WindowEvent e) {\n\n }\n\n @Override\n public void windowActivated(WindowEvent e) {\n\n }\n\n @Override\n public void windowDeactivated(WindowEvent e) {\n\n }\n });\n\n jfr.setVisible(true);\n }\n\n if(training != null && method == 1)\n if(!training.isEmpty()) {\n frame.setEnabled(false);\n JFrame jfr = new JFrame(\"Eigenfaces + HaarFaceDetection\");\n JLabel info = new JLabel(\"Training dataset:\",SwingConstants.CENTER);\n JButton erase = new JButton(\"Erase dataset\");\n DefaultTableModel model = new DefaultTableModel(new String[]{\"Facial name\",\"Image\"},training.keySet().size()){\n public Class getColumnClass(int column)\n {\n return getValueAt(0, column).getClass();\n }\n };\n\n Iterator<String> it = training.getGroups().iterator();\n for (int i = 0; i < training.keySet().size(); i++) {\n String buff = it.next();\n model.setValueAt(buff,i,0);\n //model.setValueAt(dataset.getRandomInstance(buff),i,1);\n model.setValueAt(new ImageIcon(ImageUtilities.createBufferedImage(training.getRandomInstance(buff))),i,1);\n }\n JTable table = new JTable(model);\n table.setPreferredScrollableViewportSize(table.getPreferredSize());\n table.setCellSelectionEnabled(false);\n table.setRowHeight(rows);\n JScrollPane jsp = new JScrollPane(table);\n jsp.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);\n jsp.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);\n\n erase.addActionListener((e2)->{\n training = null;\n eigenCheck.setState(false);\n eigen = null;\n ck.setState(false);\n faces = null;\n names = null;\n namesAwt = null;\n model.setRowCount(0);\n table.revalidate();\n ifInside = false;\n });\n\n jfr.getContentPane().add(info,BorderLayout.NORTH);\n jfr.getContentPane().add(jsp,BorderLayout.CENTER);\n jfr.getContentPane().add(erase,BorderLayout.SOUTH);\n\n jfr.setSize(400,rows + 200);\n\n jfr.addWindowListener(new WindowListener() {\n @Override\n public void windowOpened(WindowEvent e) {\n\n }\n\n @Override\n public void windowClosing(WindowEvent e) {\n frame.setEnabled(true);\n }\n\n @Override\n public void windowClosed(WindowEvent e) {\n\n }\n\n @Override\n public void windowIconified(WindowEvent e) {\n\n }\n\n @Override\n public void windowDeiconified(WindowEvent e) {\n\n }\n\n @Override\n public void windowActivated(WindowEvent e) {\n\n }\n\n @Override\n public void windowDeactivated(WindowEvent e) {\n\n }\n });\n\n jfr.setVisible(true);\n }\n /*\n CloseableHttpClient httpclient = HttpClients.createMinimal();\n HttpPost request = new HttpPost(\"http://bit.do/mod_perl/url-shortener.pl\");\n StringBody action = new StringBody(\"shorten\", ContentType.APPLICATION_FORM_URLENCODED);\n StringBody urlPost = new StringBody(\"http://opds.spbsut.ru/data/_uploaded/mu/vlss16mu_opentest.pdf\", ContentType.APPLICATION_FORM_URLENCODED);\n StringBody url2Post = new StringBody(\" site2 \", ContentType.APPLICATION_FORM_URLENCODED);\n StringBody url_hash = new StringBody(\"\", ContentType.APPLICATION_FORM_URLENCODED);\n StringBody url_stats_is_private = new StringBody(\"0\", ContentType.APPLICATION_FORM_URLENCODED);\n StringBody permission = new StringBody(\"1555799293|i7daeiv0bj\", ContentType.APPLICATION_FORM_URLENCODED);\n\n MultipartEntityBuilder builder = MultipartEntityBuilder.create();\n builder.setMode(HttpMultipartMode.BROWSER_COMPATIBLE);\n builder.addPart(\"action\", action);\n builder.addPart(\"url\", urlPost);\n builder.addPart(\"url2\", url2Post);\n builder.addPart(\"url_hash\", url_hash);\n builder.addPart(\"url_stats_is_private\", url_stats_is_private);\n builder.addPart(\"permasession\", permission);\n\n HttpEntity entity = builder.build();\n\n request.setEntity(entity);\n try {\n HttpResponse response = httpclient.execute(request);\n HttpEntity he = response.getEntity();\n InputStream in = new PushbackInputStream(he.getContent());\n\n byte[] buff = in.readAllBytes();\n if (buff.length == 0) System.out.println(\"SUCK!\");\n\n FileOutputStream fw = new FileOutputStream(new File(\"logger.txt\"));\n OutputStreamWriter osw = new OutputStreamWriter(fw, \"UTF-8\");\n osw.write(response.toString());\n osw.write(\"|-|\");\n fw.write(buff);\n\n //webView.getEngine().load(EntityUtils.toString(he, \"UTF-8\")); //почему то не работает\n osw.close();\n } catch (IOException ie) {\n ie.printStackTrace();\n }\n\n //some another JS Script\n /*CloseableHttpClient httpclient = HttpClients.createMinimal();\n /*\n HttpClient client = new HttpClient();\n HttpMethod method = new PostMethod(\"https://cabinet.sut.ru/raspisanie_all_new?type_z=1\");\n /\n HttpPost request = new HttpPost(\"https://cabinet.sut.ru/raspisanie_all_new?type_z=1\");\n StringBody faculty = new StringBody(\"50029\", ContentType.MULTIPART_FORM_DATA);\n StringBody kurs = new StringBody(\"4\", ContentType.MULTIPART_FORM_DATA);\n StringBody group = new StringBody(\"52543\", ContentType.MULTIPART_FORM_DATA);\n StringBody ok = new StringBody(\"Показать\", ContentType.MULTIPART_FORM_DATA);\n StringBody group_el = new StringBody(\"0\", ContentType.MULTIPART_FORM_DATA);\n\n MultipartEntityBuilder builder = MultipartEntityBuilder.create();\n builder.setMode(HttpMultipartMode.BROWSER_COMPATIBLE);\n builder.addPart(\"faculty\",faculty);\n builder.addPart(\"kurs\",kurs);\n builder.addPart(\"group\",group);\n builder.addPart(\"ok\",ok);\n builder.addPart(\"group_el\",group_el);\n\n HttpEntity entity = builder.build();\n\n request.setEntity(entity);\n try {\n HttpResponse response = httpclient.execute(request);\n HttpEntity he = response.getEntity();\n webView.getEngine().load(EntityUtils.toString(he, \"UTF-8\")); //почему то не работает\n }catch (IOException ie){\n ie.printStackTrace();\n }\n }\n );\n */\n });\n });\n\n final JavaBridge bridge = new JavaBridge(); //allows us to get a console.log() method's results as System.out.println()\n\n bridge2 = bridge;\n\n ck.setState(false);\n ck.addItemListener(new ItemListener() {\n @Override\n public void itemStateChanged(ItemEvent e) {\n ifInside = !ifInside;\n }\n });\n\n eigenCheck.addItemListener(new ItemListener() { //prevents the use of several recognition methods concurrently\n @Override\n public void itemStateChanged(ItemEvent e) {\n if(!(dataset == null) || !(KNN_dataset == null)) {\n JOptionPane.showMessageDialog(null, \"You have to erase dataset of current algorithm\", \"Dataset issue\", JOptionPane.WARNING_MESSAGE);\n eigenCheck.setState(false);\n return;\n }\n method = 1;\n AFRCheck.setState(false);\n fisherCheck.setState(false);\n if(eigenCheck.getState() == false) method = 0;\n }\n });\n\n AFRCheck.addItemListener(new ItemListener() { //does the same as previous one\n @Override\n public void itemStateChanged(ItemEvent e) {\n if(!(eigen == null) || !(dataset == null)) {\n JOptionPane.showMessageDialog(null, \"You have to erase dataset of current algorithm\", \"Dataset issue\", JOptionPane.WARNING_MESSAGE);\n AFRCheck.setState(false);\n return;\n }\n method = 2;\n eigenCheck.setState(false);\n fisherCheck.setState(false);\n if(AFRCheck.getState() == false) method = 0;\n }\n });\n\n fisherCheck.addItemListener(new ItemListener() { //does the same as previous one\n @Override\n public void itemStateChanged(ItemEvent e) {\n if(!(eigen == null) || !(KNN_dataset == null)) {\n JOptionPane.showMessageDialog(null, \"You have to erase dataset of current algorithm\", \"Dataset issue\", JOptionPane.WARNING_MESSAGE);\n fisherCheck.setState(false);\n return;\n }\n method = 3;\n eigenCheck.setState(false);\n AFRCheck.setState(false);\n if(fisherCheck.getState() == false) method = 0;\n }\n });\n\n fisherCheck.addItemListener((e)->{\n if(fisherCheck.getState() == true)\n JOptionPane.showMessageDialog(null,\n \"Please make sure you set the amount greater than 20 for this method.\\nRecognition won't be working until 3 faces get added to\",\n \"Warning\", JOptionPane.WARNING_MESSAGE);\n });\n\n //setting of the component placements and their sizes\n jButton.setSize(new Dimension(200, 27));\n jButton.setLocation(0, 0);\n url.setBounds(Math.round(jButton.getWidth()) + 5, 5, 300,\n url.getPreferredSize().height);\n jLoad.setBounds(url.getX() + url.getWidth() + 5, 0, 70, jButton.getHeight());\n\n fxPanel.setSize(dm);\n fxPanel.setLocation(new Point(0, jButton.getHeight()));\n\n //adding of the menu on the frame\n jm.add(setting);\n jm.add(rec);\n jmb.add(jm);\n frame.setJMenuBar(jmb);\n\n //settings in MessageDialog\n setting.addActionListener((e)->{\n settingPane.add(threshold);\n settingPane.add(ck);\n settingPane.add(eigenCheck);\n settingPane.add(AFRCheck);\n settingPane.add(fisherCheck);\n\n JOptionPane.showMessageDialog(null, settingPane,\"Settings\",JOptionPane.OK_OPTION);\n if(threshold.getText().isEmpty() || threshold.getText().equals(\"Threashold\")) {maxVecVal = 20; threshold.setText(\"\" + maxVecVal); return;}\n //else threshold.setText(threshold.getText());\n try {\n maxVecVal = Math.round(Double.parseDouble(threshold.getText()));\n }catch (NumberFormatException nfe){\n threshold.setText(\"20.0\");\n maxVecVal = 20;\n JOptionPane.showMessageDialog(null,\"Threshold was set in the wrong way and so set by default\");\n }\n });\n\n //starts learning operations for previously selected recognition method\n rec.addActionListener((e) -> {\n\n if(ck.getState() == false || (eigenCheck.getState() == false && AFRCheck.getState() == false && fisherCheck.getState() == false)){\n JOptionPane.showMessageDialog(null,\"You have to first select method and turn detection on!\",\"Warning\",JOptionPane.WARNING_MESSAGE);\n return;\n }\n\n name.setText(\"Name:\");\n if(amnt == 0) amount.setText(\"Amount:\");\n\n paramsPane.add(name);\n\n if (!checking)\n for (Component cmp : paramsPane.getComponents())\n if (cmp == amount) {\n checking = true;\n paramsPane.remove(amount);\n }\n\n if(amount.getText().isEmpty() || amnt == 0) checking = false;\n\n if (!checking) paramsPane.add(amount);\n\n JOptionPane.showMessageDialog(null, paramsPane,\"Parameters\",JOptionPane.PLAIN_MESSAGE);\n if(!name.getText().isEmpty() && !amount.getText().isEmpty() && !name.getText().equals(\"Name:\") && method != 0) {\n try{\n Integer.parseInt(amount.getText());\n }catch(NumberFormatException nfe){\n checking = false;\n amount.setText(\"Amount:\");\n return;\n }\n rc = new Recognition();\n rc.execute();\n }\n\n });\n\n frame.add(jButton);\n frame.add(jLoad);\n frame.add(url);\n //frame.add(ck);\n frame.add(fxPanel);\n\n frame.setVisible(true);\n\n frame.getContentPane().setPreferredSize(dm);\n frame.pack();\n frame.setResizable(false);\n\n frame.setDefaultCloseOperation(EXIT_ON_CLOSE);\n\n Platform.runLater(new Runnable() { // this will run initFX as JavaFX-Thread\n @Override\n public void run() {\n initFX(fxPanel);\n }\n });\n }",
"public String toString(){\r\n String result = \"The number of sides is: \" + myNumSides + \"The current face value is: \" + myFaceValue;\r\n return result;\r\n }",
"protected abstract void showBottomFace();",
"public void RPrimeEvent(ArrayList<ArrayList<Shape>> faces) {\r\n \tint cube = CUBE3, backCube = CUBE7;\r\n \tfor(int i = 0; i < 3; i++) {\r\n \t\tColor color = faces.get(FRONT).get(cube).getColor();\r\n \tfaces.get(FRONT).get(cube).changeColor(faces.get(TOP).get(cube).getColor());\r\n \tfaces.get(TOP).get(cube).changeColor(faces.get(BACK).get(backCube).getColor());\r\n \tfaces.get(BACK).get(backCube).changeColor(faces.get(BOTTOM).get(cube).getColor());\r\n \tfaces.get(BOTTOM).get(cube).changeColor(color);\r\n \tcube += SHIFT_ROW;\r\n \tbackCube -= SHIFT_ROW;\r\n \t\r\n \t} \r\n \r\n \tColor color = faces.get(RIGHT).get(CUBE1).getColor();\r\n \tfaces.get(RIGHT).get(CUBE1).changeColor(faces.get(RIGHT).get(CUBE3).getColor());\r\n \tfaces.get(RIGHT).get(CUBE3).changeColor(faces.get(RIGHT).get(CUBE9).getColor());\r\n \tfaces.get(RIGHT).get(CUBE9).changeColor(faces.get(RIGHT).get(CUBE7).getColor());\r\n \tfaces.get(RIGHT).get(CUBE7).changeColor(color);\r\n \tcolor = faces.get(RIGHT).get(CUBE2).getColor();\r\n \tfaces.get(RIGHT).get(CUBE2).changeColor(faces.get(RIGHT).get(CUBE6).getColor());\r\n \tfaces.get(RIGHT).get(CUBE6).changeColor(faces.get(RIGHT).get(CUBE8).getColor());\r\n \tfaces.get(RIGHT).get(CUBE8).changeColor(faces.get(RIGHT).get(CUBE4).getColor());\r\n \tfaces.get(RIGHT).get(CUBE4).changeColor(color);\r\n }",
"public void setDice(int faceValue1, int rotation1, int faceValue2, int rotation2) {\n boardController.setDice(faceValue1, rotation1, faceValue2, rotation2);\n }",
"public Dice() {\n this.random = new Random();\n this.faces = 6;\n }",
"public void roll() {\n int number = new Random().nextInt(MAXIMUM_FACE_NUMBER);\n FaceValue faceValue = FaceValue.values()[number];\n setFaceValue(faceValue);\n }",
"private Face(int diffX, int diffY) {\n\t\t\tthis.diffX = diffX;\n\t\t\tthis.diffY = diffY;\n\t\t}",
"public void BPrimeEvent(ArrayList<ArrayList<Shape>> faces) {\r\n \tint u1 = CUBE1, l1 = CUBE7, b1 = CUBE9, r1 = CUBE3;\r\n \tfor(int i = 0; i < 3; i++) {\r\n \t\tColor color = faces.get(TOP).get(u1).getColor();\r\n \tfaces.get(TOP).get(u1).changeColor(faces.get(LEFT).get(l1).getColor());\r\n \tfaces.get(LEFT).get(l1).changeColor(faces.get(BOTTOM).get(b1).getColor());\r\n \tfaces.get(BOTTOM).get(b1).changeColor(faces.get(RIGHT).get(r1).getColor());\r\n \tfaces.get(RIGHT).get(r1).changeColor(color);\r\n \tu1++;\r\n \tl1 -= SHIFT_ROW;\r\n \tb1--;\r\n \tr1 += SHIFT_ROW;\r\n \t\r\n \t} \r\n \r\n \tColor color = faces.get(BACK).get(CUBE1).getColor();\r\n \tfaces.get(BACK).get(CUBE1).changeColor(faces.get(BACK).get(CUBE3).getColor());\r\n \tfaces.get(BACK).get(CUBE3).changeColor(faces.get(BACK).get(CUBE9).getColor());\r\n \tfaces.get(BACK).get(CUBE9).changeColor(faces.get(BACK).get(CUBE7).getColor());\r\n \tfaces.get(BACK).get(CUBE7).changeColor(color);\r\n \tcolor = faces.get(BACK).get(CUBE2).getColor();\r\n \tfaces.get(BACK).get(CUBE2).changeColor(faces.get(BACK).get(CUBE6).getColor());\r\n \tfaces.get(BACK).get(CUBE6).changeColor(faces.get(BACK).get(CUBE8).getColor());\r\n \tfaces.get(BACK).get(CUBE8).changeColor(faces.get(BACK).get(CUBE4).getColor());\r\n \tfaces.get(BACK).get(CUBE4).changeColor(color);\r\n }",
"public Die() {\n\t\tthis.name = \"D6\";\n\t\tthis.numSides = 6;\n\t}",
"public Die(int numSides) {\n this.numSides = numSides;\n value = 1;\n frozen = false;\n }",
"public void init()\n{\n // obtain content pane and change its layout to \n // a FlowLayout\n Container container = getContentPane();\n container.setLayout( new FlowLayout() ); \n \n\n // create label and text field for die 1\n die1Label = new JLabel( \"Die 1\" );\n container.add( die1Label );\n die1Field = new JTextField( 10 );\n die1Field.setEditable( false );\n container.add( die1Field );\n\n // create label and text field for die 2\n die2Label = new JLabel( \"Die 2\" );\n container.add( die2Label );\n die2Field = new JTextField( 10 );\n die2Field.setEditable( false );\n container.add( die2Field );\n\n // create label and text field for sum\n sumLabel = new JLabel( \"Sum is\" );\n container.add( sumLabel );\n sumField = new JTextField( 10 );\n sumField.setEditable( false );\n container.add( sumField );\n\n // create label and text field for point\n pointLabel = new JLabel( \"Point is\" );\n container.add( pointLabel );\n pointField = new JTextField( 10 );\n pointField.setEditable( false );\n container.add( pointField );\n \n\n\n \n wonLabel=new JLabel(\" Money\");\n container.add(wonLabel);\n\n wonMoney=new JTextField(10);\n wonMoney.setEditable(false);\n container.add(wonMoney);\n \n wonLabel=new JLabel(\"$\");\n container.add(wonLabel);\n \n \n \n \n\n // create button user clicks to roll dice\n rollButton = new JButton( \"Roll Dice\" );\n rollButton.addActionListener( this );\n container.add( rollButton );\n}",
"@Override\n protected void paintForeground(Graphics2D g) {\n g.setColor(Color.MAGENTA);\n g.setFont(new Font(\"Calibri\", Font.BOLD,20));\n g.drawString(\"Villain Carnage\",5,30);\n g.setFont(new Font(\"Calibri\", Font.BOLD, 15));\n g.drawString((\"Level 1\"),20,60);\n \n \n \n //g.drawImage(ballIcon, 2,2, this);\n \n g.drawString(\"Ball Count :\" + villain.getBallCount(), 20,120 );\n \n //g.drawImage(heartIcon, 20,40, this);\n g.drawString(\"Lives left : \" + villain.getLives(),20,150);\n \n // Sets all the appropriate GUI components for this level, including ball count and \n // lives count which will be incremented/decremented as the player collides with it's\n // respective object\n \n }",
"private void appearance()\r\n\t\t{\n\t\tgridLayout.setHgap(5);\r\n\t\tgridLayout.setVgap(5);\r\n\r\n\t\t//set the padding + external border with title inside the box\r\n\t\tBorder lineBorder = BorderFactory.createLineBorder(Color.BLACK);\r\n\t\tBorder outsideBorder = BorderFactory.createTitledBorder(lineBorder, title, TitledBorder.CENTER, TitledBorder.TOP);\r\n\t\tBorder marginBorder = BorderFactory.createEmptyBorder(5, 5, 5, 5);\r\n\t\tthis.setBorder(BorderFactory.createCompoundBorder(outsideBorder, marginBorder));\r\n\r\n\t\t//set initial value to builder\r\n\t\tdiceBuilder.setInterval(min, max);\r\n\t\t}",
"public void vignette() {\n int rows= currentIm.getRows();\n int cols= currentIm.getCols();\n \n int middleRow = rows/2; //Height of the right angle\n int middleCol = cols/2; //Width of the right angle\n double hfD = (Math.sqrt(Math.pow(rows,2)+Math.pow(cols,2)))/2;\n \n //Outer: Rows, Inner: Columns\n for(int rr = 0; rr < rows; rr++){\n \n for(int cc = 0; cc < cols; cc++){\n \n int rgb= currentIm.getPixel(rr,cc);\n double red= DM.getRed(rgb);\n double blue= DM.getBlue(rgb);\n double green= DM.getGreen(rgb);\n int alpha= DM.getAlpha(rgb);\n \n double currentDistance = Math.sqrt(Math.pow(Math.abs(middleRow-rr),2)+\n Math.pow(Math.abs(middleCol-cc),2));\n \n double vigValue = 1-Math.pow((currentDistance/hfD),2);\n \n red = red * vigValue;\n green = green * vigValue;\n blue = blue * vigValue;\n \n currentIm.setPixel(rr, cc,\n (alpha << 24) | ((int)red << 16) | ((int)green << 8) | \n (int)blue);\n }\n \n }\n \n }",
"public void LPrimeEvent(ArrayList<ArrayList<Shape>> faces) {\r\n \tint cube = CUBE1, backCube = CUBE9;\r\n \tfor(int i = 0; i < 3; i++) {\r\n \t\tColor color = faces.get(FRONT).get(cube).getColor();\r\n \tfaces.get(FRONT).get(cube).changeColor(faces.get(BOTTOM).get(cube).getColor());\r\n \tfaces.get(BOTTOM).get(cube).changeColor(faces.get(BACK).get(backCube).getColor());\r\n \tfaces.get(BACK).get(backCube).changeColor(faces.get(TOP).get(cube).getColor());\r\n \tfaces.get(TOP).get(cube).changeColor(color);\r\n \tcube += SHIFT_ROW;\r\n \tbackCube -= SHIFT_ROW;\r\n \t\r\n \t} \r\n \r\n \tColor color = faces.get(LEFT).get(CUBE1).getColor();\r\n \tfaces.get(LEFT).get(CUBE1).changeColor(faces.get(LEFT).get(CUBE3).getColor());\r\n \tfaces.get(LEFT).get(CUBE3).changeColor(faces.get(LEFT).get(CUBE9).getColor());\r\n \tfaces.get(LEFT).get(CUBE9).changeColor(faces.get(LEFT).get(CUBE7).getColor());\r\n \tfaces.get(LEFT).get(CUBE7).changeColor(color);\r\n \tcolor = faces.get(LEFT).get(CUBE2).getColor();\r\n \tfaces.get(LEFT).get(CUBE2).changeColor(faces.get(LEFT).get(CUBE6).getColor());\r\n \tfaces.get(LEFT).get(CUBE6).changeColor(faces.get(LEFT).get(CUBE8).getColor());\r\n \tfaces.get(LEFT).get(CUBE8).changeColor(faces.get(LEFT).get(CUBE4).getColor());\r\n \tfaces.get(LEFT).get(CUBE4).changeColor(color);\r\n }",
"public Die() {\n\t\t//numDice = 0;\n\t\tnumSides = 0;\n\t\tdieValue = 0;\n\t}",
"public int[] getFace() {\n\t\treturn this.face;\n\t}",
"private void addLifeDisplay() {\r\n\t\tGImage lifeDisplay = new GImage(\"PlayerEast.png\");\r\n\t\tlifeDisplay.scale(.3);\r\n\t\tadd(lifeDisplay, 0, 0);\r\n\t\tlifeBar = new GRect(lifeDisplay.getWidth(), LIFE_BAR_OFFSET, LIFE_BAR_WIDTH, LIFE_BAR_HEIGHT);\r\n\t\tlifeBar.setFilled(true);\r\n\t\tlifeBar.setColor(Color.GREEN);\r\n\t\tadd(lifeBar);\r\n\t}",
"@Override\n public void draw(Canvas canvas) {\n\n int cW = canvas.getWidth();\n int cH = canvas.getHeight();\n\n // модификатор сдвига (камера снимает 640*480, а канвас другого размера)\n float xMod = (float) cW / width;\n float yMod = (float) cH / height;\n\n\n Face face = mFace;\n if (face == null) {\n return;\n }\n\n // Draws a circle at the position of the detected face, with the face's track id below.\n float x = translateX(face.getPosition().x + face.getWidth() / 2);\n float y = translateY(face.getPosition().y + face.getHeight() / 2);\n canvas.drawText(\"id: \" + mFaceId, x + ID_X_OFFSET, y + ID_Y_OFFSET, mIdPaint);\n\n final List<Landmark> landmarks = face.getLandmarks();\n\n Landmark leftEye = null;\n Landmark rightEye = null;\n Landmark nose = null;\n\n for (Landmark landmark : landmarks) {\n int cx = (int) (landmark.getPosition().x);\n int cy = (int) (landmark.getPosition().y);\n if (landmark.getType() == Landmark.LEFT_EYE) {\n leftEye = landmark;\n }\n if (landmark.getType() == Landmark.RIGHT_EYE) {\n rightEye = landmark;\n }\n if (landmark.getType() == Landmark.NOSE_BASE) {\n nose = landmark;\n }\n }\n\n if (leftEye != null && rightEye != null) {\n float lX = translateX(leftEye.getPosition().x);\n float lY = translateY(leftEye.getPosition().y);\n float rX = translateX(rightEye.getPosition().x);\n float rY = translateY(rightEye.getPosition().y);\n canvas.drawCircle(lX, lY, 10, mIdPaint);\n canvas.drawCircle(rX, rY, 10, mIdPaint);\n canvas.drawLine(lX, lY, rX, rY, mIdPaint);\n }\n\n if (nose != null) {\n float nX = translateX(nose.getPosition().x);\n float nY = translateY(nose.getPosition().y);\n canvas.drawCircle(nX, nY, 10, mIdPaint);\n canvas.drawLine(nX, nY - 100, nX, nY + 100, mIdPaint);\n }\n\n\n // Draws a bounding box around the face.\n float xOffset = scaleX(face.getWidth() / 2.0f);\n float yOffset = scaleY(face.getHeight() / 2.0f);\n float left = x - xOffset;\n float top = y - yOffset;\n float right = x + xOffset;\n float bottom = y + yOffset;\n canvas.drawRect(left, top, right, bottom, mBoxPaint);\n }",
"@Override\n public void draw(Canvas canvas) {\n Face face = mFace;\n if (face == null) {\n return;\n }\n/*\n // 3\n float centerX = translateX(face.getPosition().x + face.getWidth() / 2.0f);\n float centerY = translateY(face.getPosition().y + face.getHeight() / 2.0f);\n float offsetX = scaleX(face.getWidth() / 2.0f);\n float offsetY = scaleY(face.getHeight() / 2.0f);\n\n // 4\n // Draw a box around the face.\n float left = centerX - offsetX;\n float right = centerX + offsetX;\n float top = centerY - offsetY;\n float bottom = centerY + offsetY;\n\n // 5\n canvas.drawRect(left, top, right, bottom, mHintOutlinePaint);\n\n // 6\n // Draw the face's id.\n canvas.drawText(String.format(\"id: %d\", face.getId()), centerX, centerY, mHintTextPaint);\n*/\n // Get the landmarks associated with the face\n for (Landmark lm : face.getLandmarks()) {\n switch (lm.getType()) {\n case Landmark.BOTTOM_MOUTH:\n case Landmark.LEFT_EYE:\n case Landmark.LEFT_MOUTH:\n case Landmark.NOSE_BASE:\n case Landmark.RIGHT_EYE:\n case Landmark.RIGHT_MOUTH:\n // draw the green dot\n PointF pt = lm.getPosition();\n float x = translateX(pt.x);\n float y_pt = translateY(pt.y);\n float y_text = y_pt - 10f;\n canvas.drawCircle(x, y_pt, DOT_RADIUS, mLandmarkPaint);\n String text = getTextFromLandmarkType(lm.getType());\n canvas.drawText(text, x, y_text, mHintTextPaint);\n if (lm.getType() == Landmark.NOSE_BASE) {\n System.out.println(\"x = \" + String.valueOf(x) + \", y_pt = \" + String.valueOf(y_pt));\n }\n break;\n }\n } // end for\n\n }",
"public TopoDS_Face Value() {\n TopoDS_Face ret = new TopoDS_Face(OCCwrapJavaJNI.StepToTopoDS_TranslateCurveBoundedSurface_Value(swigCPtr, this), true);\n return ret;\n }",
"boolean turnFaceDown();",
"public void registerFaceDown() {\n this.setFaceDown(true);\n }",
"@Override\n public void draw(Canvas canvas) {\n Face face = this.face;\n if (face == null) {\n return;\n }\n\n // Draws a circle at the position of the detected face, with the face's track id below.\n float x = translateX(face.getPosition().x + face.getWidth() / 2);\n float y = translateY(face.getPosition().y + face.getHeight() / 2);\n\n if (showText) {\n canvas.drawCircle(x, y, FACE_POSITION_RADIUS, facePositionPaint);\n\n canvas.drawText(\"id: \" + getId(), x + ID_X_OFFSET, y + ID_Y_OFFSET, idPaint);\n\n canvas.drawText(\"happiness: \" + String.format(\"%.2f\", face.getIsSmilingProbability()),\n x - ID_X_OFFSET, y - ID_Y_OFFSET, idPaint);\n\n canvas.drawText(\"right eye: \" + String.format(\"%.2f\", face.getIsRightEyeOpenProbability()),\n x + ID_X_OFFSET * 2, y + ID_Y_OFFSET * 2, idPaint);\n\n canvas.drawText(\"left eye: \" + String.format(\"%.2f\", face.getIsLeftEyeOpenProbability()),\n x - ID_X_OFFSET * 2, y - ID_Y_OFFSET * 2, idPaint);\n }\n\n // Draws a bounding box around the face.\n canvas.drawRect(getBoundingBox(), boxPaint);\n }",
"public void LEvent(ArrayList<ArrayList<Shape>> faces) {\r\n \tint cube = CUBE1, backCube = CUBE9;\r\n \tfor(int i = 0; i < 3; i++) {\r\n \t\tColor color = faces.get(FRONT).get(cube).getColor();\r\n \tfaces.get(FRONT).get(cube).changeColor(faces.get(TOP).get(cube).getColor());\r\n \tfaces.get(TOP).get(cube).changeColor(faces.get(BACK).get(backCube).getColor());\r\n \tfaces.get(BACK).get(backCube).changeColor(faces.get(BOTTOM).get(cube).getColor());\r\n \tfaces.get(BOTTOM).get(cube).changeColor(color);\r\n \tcube += SHIFT_ROW;\r\n \tbackCube -= SHIFT_ROW;\r\n \t\r\n \t} \r\n \r\n \tColor color = faces.get(LEFT).get(CUBE1).getColor();\r\n \tfaces.get(LEFT).get(CUBE1).changeColor(faces.get(LEFT).get(CUBE7).getColor());\r\n \tfaces.get(LEFT).get(CUBE7).changeColor(faces.get(LEFT).get(CUBE9).getColor());\r\n \tfaces.get(LEFT).get(CUBE9).changeColor(faces.get(LEFT).get(CUBE3).getColor());\r\n \tfaces.get(LEFT).get(CUBE3).changeColor(color);\r\n \tcolor = faces.get(LEFT).get(CUBE2).getColor();\r\n \tfaces.get(LEFT).get(CUBE2).changeColor(faces.get(LEFT).get(CUBE4).getColor());\r\n \tfaces.get(LEFT).get(CUBE4).changeColor(faces.get(LEFT).get(CUBE8).getColor());\r\n \tfaces.get(LEFT).get(CUBE8).changeColor(faces.get(LEFT).get(CUBE6).getColor());\r\n \tfaces.get(LEFT).get(CUBE6).changeColor(color);\r\n }",
"public Die(int numSides){\r\n myNumSides = numSides;\r\n }",
"@Override\r\n\tprotected void draw() {\n\t\tgoodCabbage = new Oval(center.x - CABBAGE_RADIUS, center.y\r\n\t\t\t\t- CABBAGE_RADIUS, 2 * CABBAGE_RADIUS, 2 * CABBAGE_RADIUS,\r\n\t\t\t\tColor.red, true);\r\n\t\twindow.add(goodCabbage);\r\n\t}",
"protected abstract void showTopFace();",
"public void setVariablesFromValue() {\n\t\tif (this.value < .05) {\n\t\t\tthis.diameter = 10;\n\t\t\t// White\n\t\t\tthis.r = 255;\n\t\t\tthis.g= 255;\n\t\t\tthis.b = 255;\n\t\t} else if (this.value < .2) {\n\t\t\tthis.diameter = 20;\n\t\t\t// Gold\n\t\t\tthis.r = 245;\n\t\t\tthis.g = 171;\n\t\t\tthis.b = 53;\n\t\t} else if (this.value < 1) {\n\t\t\tthis.diameter = 40;\n\t\t\t// Turquoise\n\t\t\tthis.r = 3;\n\t\t\tthis.g= 201;\n\t\t\tthis.b = 169;\n\t\t} else if (this.value < 2) {\n\t\t\tthis.diameter = 80;\n\t\t\t// Burgundy\n\t\t\tthis.r = 192;\n\t\t\tthis.g= 57;\n\t\t\tthis.b = 43;\n\t\t}else if (this.value < 5) {\n\t\t\tthis.diameter = 100;\n\t\t\t// Purple\n\t\t\tthis.r = 155;\n\t\t\tthis.g= 89;\n\t\t\tthis.b = 182;\n\t\t}else if (this.value < 20) {\n\t\t\tthis.diameter = 150;\n\t\t\t// Steel Blue\n\t\t\tthis.r = 75;\n\t\t\tthis.g= 119;\n\t\t\tthis.b = 190;\n\t\t}else {\n\t\t\tthis.diameter = 200;\n\t\t\t// Pink\n\t\t\tthis.r = 210;\n\t\t\tthis.g= 82;\n\t\t\tthis.b = 127;\n\t\t}\n\t}",
"void Death(){\r\n if (vie==0){\r\n this.plateau[this.x][this.y]='0';\r\n }\r\n }",
"public static void main(String[] args) {\n Die die1 = new Die();\n die1.roll();\n\n //create die 2 and roll\n Die die2 = new Die();\n die2.roll();\n\n System.out.println(die1.getFaceValue());\n System.out.println(die2.getFaceValue());\n\n if(die1.getFaceValue() + die2.getFaceValue() == 7){\n System.out.println(\"You win\");\n }\n else\n System.out.println(\"You Lose\");\n }",
"private void setDefaultValues() {\n\t// Caeli scroll bar\n\tint scrollValue = caeliScroll.getMaximum() - caeliScroll.getValue();\n\tparent.setCaeliDensity( scrollValue / 100.0 );\n\n\t// Planet count scroll bar\n\tscrollValue = planetScroll.getMaximum() - planetScroll.getValue();\n\tparent.setPlanetCount( scrollValue );\n\n\t// Triangle size\n\tscrollValue = triSizeScroll.getMaximum() - triSizeScroll.getValue()\n\t + triFineSizeScroll.getMaximum() - triFineSizeScroll.getValue();\n\tparent.setDustTrianglesThreshold( scrollValue );\n\n\t// Particle attractions\n\tint strnScrollValue = attStrengthScroll.getMaximum() - attStrengthScroll.getValue();\n\tint distScrollValue = attDistanceScroll.getMaximum() - attDistanceScroll.getValue();\n\tparent.setAttraction( distScrollValue, strnScrollValue );\n }"
]
| [
"0.7710756",
"0.7133129",
"0.70513093",
"0.6934533",
"0.6838618",
"0.6786866",
"0.67275184",
"0.6627905",
"0.65862405",
"0.6512967",
"0.63959473",
"0.63134754",
"0.63057524",
"0.62438565",
"0.62405604",
"0.623107",
"0.62145054",
"0.61780846",
"0.608222",
"0.60734415",
"0.6056311",
"0.60151696",
"0.6003151",
"0.5988206",
"0.59694767",
"0.59597534",
"0.59169465",
"0.5894081",
"0.58434474",
"0.57778776",
"0.5775888",
"0.5775888",
"0.5772967",
"0.57560563",
"0.574373",
"0.57398146",
"0.57284653",
"0.5728383",
"0.5711767",
"0.57090497",
"0.56885743",
"0.5680115",
"0.5658189",
"0.56533",
"0.5641455",
"0.5621183",
"0.559625",
"0.559496",
"0.55802065",
"0.55797887",
"0.5575252",
"0.5571284",
"0.5557949",
"0.555618",
"0.55537516",
"0.55432236",
"0.55310893",
"0.5528694",
"0.5527394",
"0.552048",
"0.5512779",
"0.55053794",
"0.550349",
"0.5500439",
"0.54990983",
"0.549805",
"0.54800195",
"0.547147",
"0.54652286",
"0.54618263",
"0.54501593",
"0.5430501",
"0.5426629",
"0.5423875",
"0.54022706",
"0.5395206",
"0.5390405",
"0.5375409",
"0.53751206",
"0.5371516",
"0.5370603",
"0.5368422",
"0.5363743",
"0.53590703",
"0.53331244",
"0.5329043",
"0.532758",
"0.5322843",
"0.5322674",
"0.53102446",
"0.5310165",
"0.53100103",
"0.53059024",
"0.53055227",
"0.53021854",
"0.529753",
"0.5280344",
"0.5279774",
"0.52631533",
"0.525036"
]
| 0.5583755 | 48 |
Constructors Constructor voor Hibernate | protected Betaling()
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public RepoSQL() { // constructor implicit\r\n\t\t super();\r\n\t }",
"public EstadosSql() {\r\n }",
"public OnibusDAO() {}",
"public DatabaseTable() { }",
"protected CompanyJPA() {\n\t}",
"public AbstractHibernateDAOSupport() {\n super();\n }",
"public AbstractEntity() {\r\n\t}",
"public SourceDataFileJpa() {\n // n/a\n }",
"private HibernateUtil() {\r\n }",
"private HibernateUtil() {\n\t}",
"public MySqlModelBean() {\r\n \r\n }",
"public DB() {\r\n\t\r\n\t}",
"private void hibernateInitialize(Solicitud solicitud) {\n// Hibernate.initialize(solicitud);\n// Hibernate.initialize(solicitud.getEstudiante());\n// Hibernate.initialize(solicitud.getEstudiante().getPersona());\n// Hibernate.initialize(solicitud.getEstudiante().getPersona().getTipoDocumento());\n// Hibernate.initialize(solicitud.getEstudiante().getHorario_disponible());\n// Hibernate.initialize(solicitud.getEstudiante().getHorario_disponible().getDias_disponibles());\n// Hibernate.initialize(solicitud.getEstudiante().getEstudiante().getInformacion_Academica());\n// Hibernate.initialize(solicitud.getEstudiante().getEstudiante().getPrograma().getNombre());\n// Hibernate.initialize(solicitud.getMonitoria_solicitada());\n// Hibernate.initialize(solicitud.getMonitoria_solicitada().getCurso());\n// Collection<MonitoriaAceptada> monitorias = solicitud.getMonitorias();\n// for (Iterator<MonitoriaAceptada> it = monitorias.iterator(); it.hasNext();) {\n// MonitoriaAceptada monitoria = it.next();\n// Hibernate.initialize(monitoria);\n// Hibernate.initialize(monitoria.getSeccion());\n// }\n// Collection<MonitoriaRealizada> monitoriasRealizadas = solicitud.getEstudiante().getMonitoriasRealizadas();\n// Hibernate.initialize(monitoriasRealizadas);\n// for (MonitoriaRealizada monitoriaRealizada : monitoriasRealizadas) {\n// Hibernate.initialize(monitoriaRealizada);\n// }\n// Hibernate.initialize(solicitud.getResponsablePreseleccion());\n\n }",
"public DaoFactory()\n\t{\n\n\t}",
"public ProtocoloDAO() {\n }",
"public ProductosPuntoVentaDaoImpl() {\r\n }",
"public PacienteDAO(){ \n }",
"public empresaDAO(){\r\n \r\n }",
"public Database()\r\n\t{\r\n\t\tinitializeDatabase();\r\n\t\t\r\n\t}",
"public DbUser() {\r\n\t}",
"public BOEmpresa() {\r\n\t\tdaoEmpresa = new DAOEmpresaJPA();\r\n\t}",
"public BlogDaoHibernateFactoryImpl() {\n\t\tsuper();\n\t}",
"public ProfesorDAOImpl() {\n super();\n }",
"public CreditChainDao() {\n super(CreditChain.CREDIT_CHAIN, com.generator.tables.pojos.CreditChain.class);\n }",
"private HibernateController(){}",
"public Model() {\n this(Persistence.createEntityManagerFactory(PERSISTENCE_UNIT_NAME), new TextRepository());\n }",
"public CiviliteDao() {\r\n\t\tsuper();\r\n\t}",
"public NationalityDAO() {\n //sessionFactory = HibernateUtil.getSessionFactory();\n session=HibernateUtil.openSession();\n }",
"public PersistenciaCMT() {\n\n }",
"public sqlDatabase() {\n }",
"public RoleEntity(){}",
"public ProductoRepository() {}",
"public DaoConnection() {\n\t\t\n\t}",
"public Constructor(){\n\t\t\n\t}",
"public StockCardReportDAO () {}",
"public DescritoresDAO() {\n\t\t\n\t}",
"public ExpertiseEntity() {\n }",
"public JdbcObjectStudentDAO() {\n\t\tsuper();\n\t}",
"public ArticleDao() {\n super(Article.ARTICLE, cn.edu.kmust.flst.domain.flst.tables.pojos.Article.class);\n }",
"public MapEntity() {\n\t}",
"public HProvinceFbDAOImpl() {\r\n super();\r\n }",
"public Documento() {\n\n\t}",
"protected AbstractDao()\n {\n\n }",
"public CrudCasinosBean() {\r\n }",
"public User() {\r\n\r\n\t}",
"public LocalResidenciaColaborador() {\n //ORM\n }",
"public ModeOfPurchaseDAOImpl() {\r\n\r\n }",
"public TreePositionListJpa() {\n // do nothing\n }",
"public User() {\r\n\t}",
"public Pasien() {\r\n }",
"public ProductDAO() {\n }",
"public ExcursionEntity() {\n\t}",
"@Inject\n\tpublic AbsenceDaoImpl() throws SQLException {\n\t\tsuper(Absence.class);\n\t}",
"public QueryBO() {\r\n }",
"public Identity()\n {\n super( Fields.ARGS );\n }",
"public Classe() {\r\n }",
"public ArAgingDetailReportDAO () {}",
"public User() {\r\n \r\n }",
"public User() {\r\n }",
"public Article() {\n\t}",
"private static void init(){\n entityManager = HibernateUtil.getEntityManager();\n transaction = entityManager.getTransaction();\n }",
"public UserDAO()\n {\n \n }",
"Constructor() {\r\n\t\t \r\n\t }",
"public User()\n\t{\n\t}",
"public OmsUsuario() {\n\t}",
"public User(){}",
"public User(){}",
"public User(){}",
"public User() {\n\t}",
"public UserEntity() {\n\t\tsuper();\n\t}",
"public CrudUserDao() {\r\n super();\r\n }",
"protected void entityInit() {}",
"public DatasetParameterPK() {\n }",
"public HibernateDao(Class<T> modelClass) {\n\t\tthis.modelClass = modelClass;\n\t}",
"public SchoolCourseStudentDAOImpl() {\r\n\t\tsuper();\r\n\t}",
"public User() {\n\n\t}",
"protected JpaModule() {\n }",
"public AddressDaoImpl()\n {\n \t//Initialise the related Object stores\n \n }",
"private static void init() {\n\t\tif (factory == null) {\n\t\t\tfactory = Persistence.createEntityManagerFactory(\"hibernatePersistenceUnit\");\n\t\t}\n\t\tif (em == null) {\n\t\t\tem = factory.createEntityManager();\n\t\t}\n\t}",
"public TableImpl() { columns = new Column[0]; }",
"private DbQuery() {}",
"public ServiceCacheDB()\n\t{\n\t\tthis(0);\n\t}",
"public User(){\n }",
"public Bean_article() {\n }",
"private CommentDAO() {\n\n\t}",
"public UserDAO() {\n }",
"public EntityFactoryImpl() {\n\t\tsuper();\n\t}",
"public PostDao() {\n\t}",
"public PurchaseCaseDAO() {\n\t\tsuper(PurchaseCaseVO.class, \"purchaseCaseId\");\n\t}",
"@Override\n\tpublic void init() throws SlickException {\n\t\t\n\t}",
"public CrudBean() {\n }",
"public Alojamiento() {\r\n\t}",
"public ScOrgSeqDAOImpl() {\n super();\n }",
"public Clade() {}",
"public User() { }",
"public DatabaseOperations(){\n\n }",
"public User() {\n super();\n }",
"public User() {\n super();\n }",
"public NamedEntity() {}",
"public DataBean() {\r\n \r\n }",
"public Caso_de_uso () {\n }"
]
| [
"0.72585285",
"0.68300843",
"0.6652742",
"0.66322255",
"0.66252345",
"0.6610751",
"0.6604195",
"0.65826166",
"0.6578161",
"0.6552468",
"0.6546738",
"0.65380156",
"0.653401",
"0.65315986",
"0.6493163",
"0.6493131",
"0.6461747",
"0.6449739",
"0.6439853",
"0.64229363",
"0.6421713",
"0.64111435",
"0.6407234",
"0.6400533",
"0.63953686",
"0.63927865",
"0.6390891",
"0.6341511",
"0.63247037",
"0.63132745",
"0.62958694",
"0.6293381",
"0.62835944",
"0.62832385",
"0.6274301",
"0.62705034",
"0.6261687",
"0.6258105",
"0.62524426",
"0.6240825",
"0.6236771",
"0.6236645",
"0.6231023",
"0.62283987",
"0.6224626",
"0.62087023",
"0.62049586",
"0.6189798",
"0.618781",
"0.6186699",
"0.6179532",
"0.61758864",
"0.61711425",
"0.6169813",
"0.61686444",
"0.61638415",
"0.61608356",
"0.61603725",
"0.6160079",
"0.6159231",
"0.6154353",
"0.61506623",
"0.6146667",
"0.61459756",
"0.61340046",
"0.6133973",
"0.6133973",
"0.6133973",
"0.6132571",
"0.6120039",
"0.6119561",
"0.611185",
"0.6100197",
"0.60977626",
"0.6096824",
"0.6094483",
"0.60915697",
"0.60827684",
"0.60795754",
"0.6075367",
"0.60746336",
"0.6073981",
"0.60711485",
"0.6065566",
"0.60626966",
"0.60566413",
"0.60506755",
"0.60505724",
"0.60492516",
"0.60484797",
"0.60450155",
"0.6044298",
"0.60408723",
"0.6032167",
"0.6031526",
"0.6031118",
"0.60302716",
"0.60302716",
"0.6029854",
"0.602965",
"0.6028866"
]
| 0.0 | -1 |
Get a launcher and missile Explicitly calculate where the missile ends up given angle PhysicsEngine will contain static methods to generate and get data | @Test
public void testXEnd() {
double endX1 = 55.17, endX2 = 138.75;
double v01 = 25, v02 = 38.6;
double theta1 = 30, theta2 = 57;
assertEquals(PhysicsEngine.findXEnd(v01, theta1, 0), endX1, DELTA);
assertEquals(PhysicsEngine.findXEnd(v02, theta2, 0), endX2, DELTA);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int TakeStep()\n\t\t{\n\t\t// the eventual movement command is placed here\n\t\tVec2\tresult = new Vec2(0,0);\n\n\t\t// get the current time for timestamps\n\t\tlong\tcurr_time = abstract_robot.getTime();\n\n\n\t\t/*--- Get some sensor data ---*/\n\t\t// get vector to the ball\n\t\tVec2 ball = abstract_robot.getBall(curr_time);\n\n\t\t// get vector to our and their goal\n\t\tVec2 ourgoal = abstract_robot.getOurGoal(curr_time);\n\t\tVec2 theirgoal = abstract_robot.getOpponentsGoal(curr_time);\n\n\t\t// get a list of the positions of our teammates\n\t\tVec2[] teammates = abstract_robot.getTeammates(curr_time);\n\n\t\t// find the closest teammate\n\t\tVec2 closestteammate = new Vec2(99999,0);\n\t\tfor (int i=0; i< teammates.length; i++)\n\t\t\t{\n\t\t\tif (teammates[i].r < closestteammate.r)\n\t\t\t\tclosestteammate = teammates[i];\n\t\t\t}\n\n\n\t\t/*--- now compute some strategic places to go ---*/\n\t\t// compute a point one robot radius\n\t\t// behind the ball.\n\t\tVec2 kickspot = new Vec2(ball.x, ball.y);\n\t\tkickspot.sub(theirgoal);\n\t\tkickspot.setr(abstract_robot.RADIUS);\n\t\tkickspot.add(ball);\n\n\t\t// compute a point three robot radii\n\t\t// behind the ball.\n\t\tVec2 backspot = new Vec2(ball.x, ball.y);\n\t\tbackspot.sub(theirgoal);\n\t\tbackspot.setr(abstract_robot.RADIUS*5);\n\t\tbackspot.add(ball);\n\n\t\t// compute a north and south spot\n\t\tVec2 northspot = new Vec2(backspot.x,backspot.y+0.7);\n\t\tVec2 southspot = new Vec2(backspot.x,backspot.y-0.7);\n\n\t\t// compute a position between the ball and defended goal\n\t\tVec2 goaliepos = new Vec2(ourgoal.x + ball.x,\n\t\t\t\tourgoal.y + ball.y);\n\t\tgoaliepos.setr(goaliepos.r*0.5);\n\n\t\t// a direction away from the closest teammate.\n\t\tVec2 awayfromclosest = new Vec2(closestteammate.x,\n\t\t\t\tclosestteammate.y);\n\t\tawayfromclosest.sett(awayfromclosest.t + Math.PI);\n\n\n\t\t/*--- go to one of the places depending on player num ---*/\n\t\tint mynum = abstract_robot.getPlayerNumber(curr_time);\n\n\t\t/*--- Goalie ---*/\n\t\tif (mynum == 0)\n\t\t\t{\n\t\t\t// go to the goalie position if far from the ball\n\t\t\tif (ball.r > 0.5) \n\t\t\t\tresult = goaliepos;\n\t\t\t// otherwise go to kick it\n\t\t\telse if (ball.r > 0.1) \n\t\t\t\tresult = kickspot;\n\t\t\telse \n\t\t\t\tresult = ball;\n\t\t\t// keep away from others\n\t\t\tif (closestteammate.r < 0.3)\n\t\t\t\t{\n\t\t\t\tresult = awayfromclosest;\n\t\t\t\t}\n\t\t\t}\n\n\t\t/*--- midback ---*/\n\t\telse if (mynum == 1)\n\t\t\t{\n\t\t\t// go to a midback position if far from the ball\n\t\t\tif (ball.r > 0.5) \n\t\t\t\tresult = backspot;\n\t\t\t// otherwise go to kick it\n\t\t\telse if (ball.r > 0.30) \n\t\t\t\tresult = kickspot;\n\t\t\telse \n\t\t\t\tresult = ball;\n\t\t\t// keep away from others\n\t\t\tif (closestteammate.r < 0.3)\n\t\t\t\t{\n\t\t\t\tresult = awayfromclosest;\n\t\t\t\t}\n\t\t\t}\n\n\t\telse if (mynum == 2)\n\t\t\t{\n\t\t\t// go to a the northspot position if far from the ball\n\t\t\tif (ball.r > 0.5) \n\t\t\t\tresult = northspot;\n\t\t\t// otherwise go to kick it\n\t\t\telse if (ball.r > 0.30) \n\t\t\t\tresult = kickspot;\n\t\t\telse \n\t\t\t\tresult = ball;\n\t\t\t// keep away from others\n\t\t\tif (closestteammate.r < 0.3)\n\t\t\t\t{\n\t\t\t\tresult = awayfromclosest;\n\t\t\t\t}\n\t\t\t}\n\n\t\telse if (mynum == 4)\n\t\t\t{\n\t\t\t// go to a the northspot position if far from the ball\n\t\t\tif (ball.r > 0.5) \n\t\t\t\tresult = southspot;\n\t\t\t// otherwise go to kick it\n\t\t\telse if (ball.r > 0.3 )\n\t\t\t\tresult = kickspot;\n\t\t\telse \n\t\t\t\tresult = ball;\n\t\t\t// keep away from others\n\t\t\tif (closestteammate.r < 0.3)\n\t\t\t\t{\n\t\t\t\tresult = awayfromclosest;\n\t\t\t\t}\n\t\t\t}\n\n\t\t/*---Lead Forward ---*/\n\t\telse if (mynum == 3)\n\t\t\t{\n\t\t\t// if we are more than 4cm away from the ball\n\t\t\tif (ball.r > .3)\n\t\t\t\t// go to a good kicking position\n\t\t\t\tresult = kickspot;\n\t\t\telse\n\t\t\t\t// go to the ball\n\t\t\t\tresult = ball;\n\t\t\t}\n\n\n\t\t/*--- Send commands to actuators ---*/\n\t\t// set the heading\n\t\tabstract_robot.setSteerHeading(curr_time, result.t);\n\n\t\t// set speed at maximum\n\t\tabstract_robot.setSpeed(curr_time, 1.0);\n\n\t\t// kick it if we can\n\t\tif (abstract_robot.canKick(curr_time))\n\t\t\tabstract_robot.kick(curr_time);\n\n\t\t/*--- Send message to other robot ---*/\n\t\t// COMMUNICATION\n\t\t// if I can kick\n\t\tif (abstract_robot.canKick(curr_time))\n\t\t\t{\n\t\t\t// and I am robot #3\n\t\t\tif ((mynum==3))\n\t\t\t\t{\n\t\t\t\t// construct a message\n\t\t\t\tStringMessage m = new StringMessage();\n\t\t\t\tm.val = (new Integer(mynum)).toString();\n\t\t\t\tm.val = m.val.concat(\" can kick\");\n\n\t\t\t\t// send the message to robot 2\n\t\t\t\t// note: broadcast and multicast are also\n\t\t\t\t// available.\n\t\t\t\ttry{abstract_robot.unicast(2,m);}\n\t\t\t\tcatch(CommunicationException e){}\n\t\t\t\t}\n\t\t\t}\n\n\t\t/*--- Look for incoming messages ---*/\n\t\t//COMMUNICATION\n\t\twhile (messagesin.hasMoreElements())\n\t\t\t{\n\t\t\tStringMessage recvd = \n\t\t\t\t(StringMessage)messagesin.nextElement();\n\t\t\tSystem.out.println(mynum + \" received:\\n\" + recvd);\n\t\t\t}\n\n\t\t// tell the parent we're OK\n\t\treturn(CSSTAT_OK);\n\t\t}",
"public MissileLauncher getMissileLauncher() {\n\t\treturn this.missileLauncher;\n\t}",
"private Array<Tile>[] walk() {\n float targetY = currentTile.y + 1;\n Vector2 previousTile = new Vector2(currentTile.x, currentTile.y);\n\n Array<Vector2> tiles = new Array<Vector2>();\n tiles.add(new Vector2(currentTile.x, currentTile.y));\n\n while(currentTile.y < targetY) {\n float rnd = random.nextFloat();\n\n if(rnd > 0.75f) { // up\n Array<Tile> grassRow = new Array<Tile>();\n Array<Tile> treeRow = new Array<Tile>();\n\n for(int x = 1; x <= 5; x++) {\n Vector2 vector = new Vector2(x, currentTile.y);\n\n GrassNEW grass = grassPool.obtain();\n grass.init(vector.x * GameVars.TILE_SIZE, vector.y * GameVars.TILE_SIZE);\n grassRow.add(grass);\n\n if(!tiles.contains(vector, false)) {\n if(random.nextFloat() > 0.3) {\n TreeNEW tree = treePool.obtain();\n tree.init(vector.x * GameVars.TILE_SIZE, vector.y * GameVars.TILE_SIZE);\n treeRow.add(tree);\n }\n } else {\n if(random.nextFloat() > 0.99) {\n Collectible power = new PowerUpSpikes(world, spikesTexture, vector.x * GameVars.TILE_SIZE, vector.y * GameVars.TILE_SIZE);\n collectibles.add(power);\n } else {\n if(random.nextFloat() > 0.5) {\n Coin coin = new Coin(world, coinTexture, vector.x * GameVars.TILE_SIZE, vector.y * GameVars.TILE_SIZE);\n collectibles.add(coin);\n }\n }\n }\n }\n\n currentTile.add(0, 1);\n\n Array<Tile>[] ret = new Array[2];\n ret[0] = grassRow;\n ret[1] = treeRow;\n\n return ret;\n } else if(rnd > 0.375) { // right\n if(currentTile.x < 5 && Math.abs(previousTile.x - currentTile.x) <= 2) {\n currentTile.add(1, 0);\n tiles.add(new Vector2(currentTile.x, currentTile.y));\n }\n } else { // left\n if(currentTile.x > 1 && Math.abs(previousTile.x - currentTile.x) <= 2) {\n currentTile.add(-1, 0);\n tiles.add(new Vector2(currentTile.x, currentTile.y));\n }\n }\n }\n\n return null; // will never happen\n }",
"public int magicMissile();",
"private void NoAirResistanceCalculator(double velocity, double launchAngle)\n\t{\n\t\t/*\n\t\t * Convert launch angle from degrees into radians\n\t\t * Convert velocity from mph to fps\n\t\t * Convert gravity to fps\n\t\t */\n\t\tlaunchAngle = (launchAngle * (Math.PI)) / 180;\n\t\tvelocity = velocity * 1.46667;\n\t\tgravity = gravity * 3.28084;\n\n\t\t// Calculate when the ball hits the ground\n\t\ttimeBallHitsGround = (2 * velocity * Math.sin(launchAngle)) / gravity;\n\n\t\t// Calculate max height (velocity_f = 0)\n\t\tmaxHeightTime = (velocity * Math.sin(launchAngle)) / gravity;\n\t\tmaxHeight = strikeHeight + (velocity * Math.sin(launchAngle) * maxHeightTime) - ((.5 * gravity) * (maxHeightTime * maxHeightTime));\n\n\t\t// Y Position: y = y_0 + (v_y)t + .5(-9.8)(t^2), v_y = (v_0)sin(theta)\n\t\tfor(double t = 0; t <= timeBallHitsGround + .1; t = t + timeIncrement)\n\t\t{\n\t\t\t// Math for y(t) position\n\t\t\tyPos = (velocity * Math.sin(launchAngle) * t) - ((.5 * gravity) * (t * t));\n\n\t\t\t// Add y position and time\n\t\t\tyPosList.add(yPos + strikeHeight);\n\t\t\ttimeList.add(t);\n\n\t\t}\n\n\t\t// X Position: x = x_0 + (v_x)t, v_x = (v_0)cos(theta)\n\t\tfor(int i = 0; i < timeList.size(); i++)\n\t\t{\n\t\t\t// Math for x(t) position\n\t\t\txPos = (velocity * Math.cos(launchAngle) * timeList.get(i));\n\n\t\t\t// Add x position\n\t\t\txPosList.add(xPos);\n\t\t}\n\t}",
"private void AirResistanceCalculator(double velocity, double launchAngle)\n\t{\n\t\t/*\n\t\t * Convert launch angle from degrees into radians\n\t\t * Convert velocity from mph to mps\n\t\t * Do not convert gravity to fps\n\t\t * This one is different than noAirResis because it converts units at the end\n\t\t */\n\t\tlaunchAngle = (launchAngle * (Math.PI)) / 180;\n\t\tvelocity = velocity * 0.44704;\n\n\t\t// Max height and the time it takes to get to max height\n\t\tmaxHeightTime = (terminalVelocity / gravity) *\n\t\t\t\t(Math.atan((velocity * Math.sin(launchAngle)) / terminalVelocity));\n\t\ttop = Math.cos(Math.atan(((velocity * Math.sin(launchAngle)) / terminalVelocity)) -\n\t\t\t\t((gravity * maxHeightTime) / terminalVelocity));\n\t\tbottom = Math.cos(Math.atan((velocity * Math.sin(launchAngle)) / terminalVelocity));\n\t\tmaxHeight = ((terminalVelocity * terminalVelocity) / gravity) *\n\t\t\t\tMath.log(top / bottom);\n\n\t\t// Time it takes to hit ground\n\t\t// coh^-1(x) = ln(x + sqrt((x^2) - 1) x >= 1\n\t\tdouble poo = Math.exp((maxHeight * gravity) / (terminalVelocity * terminalVelocity));\n\t\ttimeBallHitsGround = (terminalVelocity / gravity) *\n\t\t\t\tMath.log(poo + Math.sqrt((poo * poo) - 1)) + maxHeightTime;\n\t\tSystem.out.println(\"TimeBallHitsGround: \" + timeBallHitsGround);\n\t\tSystem.out.println(\"MaxHeightTime \" + maxHeightTime);\n\n\n\t\t// Y Position, t2 is the new time that starts when the ball reaches max height\n\t\tfor(double t = 0, t2 = 0; t < timeBallHitsGround + .1; t = t + timeIncrement)\n\t\t{\n\t\t\tif(t <= maxHeightTime)\n\t\t\t{\n\t\t\t\t// 1 meter = 3.28084 ft\n\t\t\t\ttop = Math.cos(Math.atan(((velocity * Math.sin(launchAngle)) / terminalVelocity)) -\n\t\t\t\t\t\t((gravity * t) / terminalVelocity));\n\t\t\t\tbottom = Math.cos(Math.atan((velocity * Math.sin(launchAngle)) / terminalVelocity));\n\n\n\t\t\t\tyPos = (((terminalVelocity * terminalVelocity) / gravity) *\n\t\t\t\t\t\tMath.log(top / bottom)) * 3.28084;\n\t\t\t}\n\t\t\t// Drag changes directions as the ball falls down\n\t\t\telse\n\t\t\t{\n\t\t\t\t// 1 meter = 3.28084 ft\n\t\t\t\tyPos = (-((terminalVelocity * terminalVelocity) / gravity) *\n\t\t\t\t\t\t(Math.log((Math.cosh((gravity * t2) / terminalVelocity)))) + maxHeight) * 3.28084;\n\t\t\t\tSystem.out.println(\"YPos: \" + yPos + \" t: \" + t + \" t2: \" + t2);\n\t\t\t\tt2 = t2 + timeIncrement;\n\t\t\t}\n\n\n\t\t\t// Add y position and time\n\t\t\tyPosList.add(yPos + strikeHeight);\n\t\t\ttimeList.add(t);\n\t\t}\n\n\t\t// X Position\n\t\tfor(int i = 0; i < timeList.size(); i++)\n\t\t{\n\t\t\t// Math for x(t) position\n\t\t\t// 1 meter = 3.28084 ft\n\t\t\txPos = ((mass / b) * (Math.log(((b * velocity * Math.cos(launchAngle) * timeList.get(i)) + mass)\n\t\t\t\t\t/ mass))) * 3.28084;\n\n\t\t\t// Add x position\n\t\t\t// 1 meter = 3.28084 ft\n\t\t\txPosList.add(xPos);\n\t\t}\n\n\t\t// Convert the final stats to meters\n\t\tmaxHeight = maxHeight * 3.28084;\n\t}",
"public void calculateShooterInfo(double distance) {\n }",
"public void getProbe () {\n double prxg;\n int index;\n double effaoa = effective_aoa();\n /* get variables in the generating plane */\n if (Math.abs(ypval) < .01) ypval = .05;\n getPoints(xpval,ypval);\n\n solver.getVel(lrg,lthg);\n loadProbe();\n\n pxg = lxgt;\n pyg = lygt;\n prg = lrgt;\n pthg = lthgt;\n pxm = lxmt;\n pym = lymt;\n /* smoke */\n if (pboflag == 3 ) {\n prxg = xpval;\n for (index =1; index <=POINTS_COUNT; ++ index) {\n getPoints(prxg,ypval);\n xg[19][index] = lxgt;\n yg[19][index] = lygt;\n rg[19][index] = lrgt;\n thg[19][index] = lthgt;\n xm[19][index] = lxmt;\n ym[19][index] = lymt;\n if (stall_model_type != STALL_MODEL_IDEAL_FLOW) { // stall model\n double apos = stall_model_type == STALL_MODEL_DFLT ? +10 : stall_model_apos;\n double aneg = stall_model_type == STALL_MODEL_DFLT ? -10 : stall_model_aneg;\n if (xpval > 0.0) {\n if (effaoa > apos && ypval > 0.0) { \n ym[19][index] = ym[19][1];\n } \n if (effaoa < aneg && ypval < 0.0) {\n ym[19][index] = ym[19][1];\n }\n }\n if (xpval < 0.0) {\n if (effaoa > apos && ypval > 0.0) { \n if (xm[19][index] > 0.0) {\n ym[19][index] = ym[19][index-1];\n }\n } \n if (effaoa < aneg && ypval < 0.0) {\n if (xm[19][index] > 0.0) {\n ym[19][index] = ym[19][index-1];\n }\n }\n }\n }\n solver.getVel(lrg,lthg);\n prxg = prxg + vxdir*STEP_X;\n }\n }\n return;\n }",
"protected final String look(int direction, boolean steps) {\r\n \t\r\n \t//pay the LOOK_ENERGY_COST\r\n \tenergy = energy - Params.LOOK_ENERGY_COST;\r\n \tint look;\r\n \t//get the x and y coordinates of the critter\r\n \tint xCoord = this.x_coord;\r\n \tint yCoord = this.y_coord;\r\n \t\r\n \tif(steps == true)\r\n \t\tlook = 2; //look 2 steps\r\n \telse \r\n \t\tlook = 1; //look 1 step\r\n \t\r\n \t//get the coordinate position of the location to look\r\n \tswitch(direction) {\r\n \tcase 0:\r\n \t\txCoord += look; //straight right \r\n \t\tbreak;\r\n \t\t\r\n \tcase 1:\r\n \t\txCoord += look; //diagonally up and to the right\r\n \t\tyCoord -= look;\r\n \t\tbreak;\r\n \t\t\r\n \tcase 2:\r\n \t\tyCoord -= look; //straight up\r\n \t\tbreak;\r\n \t\t\r\n \tcase 3: \r\n \t\txCoord -= look; //diagonally up and to left\r\n \t\tyCoord -= look;\r\n \t\tbreak;\r\n \t\t\r\n \tcase 4:\r\n \t\txCoord -= look; //straight left\r\n \t\tbreak;\r\n \t\r\n \tcase 5:\r\n \t\txCoord -= look; //diagonally down and to left\r\n \t\tyCoord += look; \r\n \t\tbreak;\r\n \t\t\r\n \tcase 6:\r\n \t\tyCoord += look; //diagonally down\r\n \t\tbreak;\r\n \t\t\r\n \tcase 7:\r\n \t\txCoord += look; //diagonally down and to right\r\n \t\tyCoord += look;\r\n \t\tbreak;\r\n \t}\r\n \t\r\n \t//wrap-around world, need to correct coordinates\r\n \tif(xCoord > (Params.WORLD_WIDTH - 1))\r\n \t\txCoord %= Params.WORLD_WIDTH;\r\n \telse if(xCoord < 0)\r\n \t\txCoord += Params.WORLD_WIDTH;\r\n \tif(yCoord > (Params.WORLD_HEIGHT - 1))\r\n \t\tyCoord %= Params.WORLD_HEIGHT;\r\n \telse if(yCoord < 0)\r\n \t\tyCoord += Params.WORLD_HEIGHT;\r\n \r\n \t//Iterate through population hashMap\r\n \tIterator<String> positionIter = population.keySet().iterator();\r\n \t//Iterate through all of the position keys\r\n \twhile(positionIter.hasNext()) {\r\n \t\t//get the position key\r\n \t\tString position = positionIter.next();\r\n \t\t//get the critter list in that position\r\n \t\tArrayList<Critter> critterList = population.get(position);\r\n \t\t//iterate through the critters \r\n \t\tListIterator<Critter> currCritter = critterList.listIterator();\r\n \t\twhile(currCritter.hasNext()) {\r\n \t\t\t//get a critter\r\n \t\t\tCritter c = currCritter.next();\r\n \t\t\t//check whether each critter is in the position\r\n \t\t\tif(c.x_coord == xCoord && c.y_coord == yCoord) {\r\n \t\t\t\tif(c.getEnergy() >= 0) {\r\n \t\t\t\t\treturn c.toString();\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n \t\r\n \t//return null if the position is unoccupied\r\n \treturn null;\r\n }",
"Entity getShooter();",
"public static void main(String[] args) throws UsbException {\n\t\tDefenseGrid grid = DefenseGrid.getInstance();\n\t\t\n\t\t// perform initialization (zeroing) of each missile launcher in parallel\n\t\tgrid.initializeMissileLaunchers();\n\t\t\n\t\t// get an array of missile launchers to control\n\t\tMissileLauncher[] launchers = grid.getMissileLaunchers();\n\t\t\n\t\t// test each missile launchers ability to aim up, down, left, right, and fire\n\t\tif(launchers.length == 0){\n\t\t\tSystem.out.println(\"No USB Missile Launchers could not be found. Try disconnecting and reconnecting USB devices from port.\");\n\t\t} else {\n\t\t\tint launcherID = 0; // launcher's index\n\t\t\tfor(MissileLauncher ml : launchers){\n\t\t\t\tlauncherID++;\n\t\t\t\tSystem.out.println(\"[Launcher \" + launcherID + \"] Vertical Position: \" + ml.adjustVerticalPosition(500));\n\t\t\t\tSystem.out.println(\"[Launcher \" + launcherID + \"] Vertical Position: \" + ml.adjustVerticalPosition(-500));\n\t\t\t\tSystem.out.println(\"[Launcher \" + launcherID + \"] Vertical Position: \" + ml.adjustVerticalPosition(0));\n\t\t\t\tSystem.out.println(\"[Launcher \" + launcherID + \"] Horizontal Position: \" + ml.adjustHorizontalPosition(500));\n\t\t\t\tSystem.out.println(\"[Launcher \" + launcherID + \"] Horizontal Position: \" + ml.adjustHorizontalPosition(-500));\n\t\t\t\tSystem.out.println(\"[Launcher \" + launcherID + \"] Horizontal Position: \" + ml.adjustHorizontalPosition(0));\n\t\t\t\tSystem.out.println(\"[Launcher \" + launcherID + \"] Fired: \" + ml.fire());\n\t\t\t}\n\t\t}\n\t}",
"Vec3 getHomeCoords(IGeneticMob geneticMob);",
"public GameObject spawnCarrier(LogicEngine in_logicEngine, float in_x , CARRIER_TYPE in_type)\r\n\t{\n\t\tGameObject ship = new GameObject(\"data/\"+GameRenderer.dpiFolder+\"/thrusterboss.png\",in_x,LogicEngine.SCREEN_HEIGHT+64,30);\r\n\t\t\r\n\t\t\r\n\t\t//set animation frame\r\n\t\tship.i_animationFrame=4;\r\n\t\tship.i_animationFrameRow=0;\r\n\t\tship.i_animationFrameSizeWidth=32;\r\n\t\tship.i_animationFrameSizeHeight=132;\r\n\t\t\r\n\t\tSimplePathfollowing followPathBehaviour = new SimplePathfollowing();\r\n\t\t//pause at the first waypoint\r\n\t\tfollowPathBehaviour.waitAtWaypoint(1, 50);\r\n\t\t\r\n\t\tfollowPathBehaviour.setInfluence(1);\r\n\t\tfollowPathBehaviour.setAttribute(\"arrivedistance\", \"50\", null);\r\n\t\t\r\n\t\tfollowPathBehaviour.waitAtWaypoint(1, 300);\r\n\t\t\r\n\t\t//go straight down then split\r\n\t\tship.v.addWaypoint(new Point2d(in_x, LogicEngine.SCREEN_HEIGHT/1.5));\r\n\t\tship.v.addWaypoint(new Point2d(in_x,-100));\r\n\t\t\r\n\t\tCustomBehaviourStep b = new CustomBehaviourStep(followPathBehaviour);\r\n\t\t\r\n\t\t//turret\r\n\t\t//turret\r\n\t\tDrawable turret = new Drawable();\r\n\t\tturret.i_animationFrame = 6;\r\n\t\tturret.i_animationFrameSizeWidth=16;\r\n\t\tturret.i_animationFrameSizeHeight=16;\r\n\t\tturret.str_spritename = \"data/\"+GameRenderer.dpiFolder+\"/gravitonlevel.png\";\r\n\t\tturret.f_forceRotation = 90;\r\n\t\tship.shotHandler = new TurretShot(turret,\"data/\"+GameRenderer.dpiFolder+\"/redbullets.png\",6,5.0f);\r\n\t\tship.visibleBuffs.add(turret);\r\n\t\t\r\n\t\tship.v.setMaxForce(1);\r\n\t\tship.v.setMaxVel(1);\r\n\t\t\r\n\t\tship.stepHandlers.add(b);\r\n\t\t\r\n\t\tHitpointShipCollision s;\r\n\t\tif(!Difficulty.isHard())\r\n\t\t\t s = new HitpointShipCollision(ship, 160, 32);\r\n\t\telse\r\n\t\t\t s = new HitpointShipCollision(ship, 125, 32);\r\n\t\t\t\r\n\t\ts.setExplosion(Utils.getBossExplosion(ship));\r\n\t\tship.collisionHandler = s; \r\n\t\r\n\t\t//TODO:launch ships handler for shooting\r\n\t\tif(in_type == CARRIER_TYPE.PATHFINDERS_BOTH_SIDES)\r\n\t\t{\r\n\t\t\tship.stepHandlers.add(new LaunchShipsStep(pathFinder(true), 50, 5, 5,true));\r\n\t\t\tship.stepHandlers.add(new LaunchShipsStep(pathFinder(false), 50, 5, 5,false));\r\n\t\t}\r\n\t\telse\r\n\t\t\tif(in_type == CARRIER_TYPE.PATHFINDERS_RIGHT_ONLY)\r\n\t\t\t{\r\n\t\t\t\tship.stepHandlers.add(new LaunchShipsStep(pathFinder(true), 50, 5, 5,true));\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\tif(in_type == CARRIER_TYPE.PATHFINDERS_LEFT_ONLY)\r\n\t\t\t\t{\r\n\t\t\t\t\tship.stepHandlers.add(new LaunchShipsStep(pathFinder(false), 50, 5, 5,false));\r\n\t\t\t\t}\r\n\t\t\t\t\t\t \r\n\t\tship.allegiance = GameObject.ALLEGIANCES.ENEMIES;\r\n\t\t\r\n\t\tin_logicEngine.objectsEnemies.add(ship);\r\n\t\t\r\n\t\treturn ship;\r\n\t\r\n\t}",
"protected Vector2 get_ray_fire_point() {\n Vector2 p = new Vector2(\n sprite.getX() + (sprite.getWidth() / 2),\n sprite.getY() + (sprite.getHeight()));\n\n Vector2 p1 = p.rotateAround(new Vector2(\n sprite.getX() + (sprite.getWidth() / 2),\n sprite.getY() + (sprite.getHeight() / 2)),\n sprite.getRotation());\n\n return p1;\n }",
"public void defensive_act()\r\n\t{\r\n\t\tBullet closestBullet = IMAGINARY_BULLET;\r\n\t//\tBullet secondClosestBullet = IMAGINARY_BULLET;\r\n\t\t\r\n\t\tActor machines;\r\n\t\tEnumeration<Actor> opponent = ((MachineInfo)data.get(TankFrame.PLAYER_1)).getHashtable().elements();\r\n\t\twhile(opponent.hasMoreElements())\r\n\t\t{\r\n\t\t\tmachines = (Actor) opponent.nextElement();\r\n\t\t\tif(machines instanceof Bullet)\r\n\t\t\t{\r\n\t\t\t\tif(machines.getPoint().distance(getPoint()) < MIN_SHOOT_DISTANCE)\r\n\t\t\t\t{\r\n\t\t\t\t\tclosestBullet = (Bullet)machines;\r\n\t\t\t\t\tLine2D aim = new Line2D.Double(getCenterX(), getCenterY(), closestBullet.getPosX(), closestBullet.getPosY() );\r\n\t\t\t\t\tSystem.out.println(aim.getP1().distance(aim.getP2()));\r\n\t\t\t\t\tif(hasClearPath(aim) && aim.getP1().distance(aim.getP2()) < MIN_SHOOT_DISTANCE)\r\n\t\t\t\t\t\taimAndShoot(aim);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t/*\tif(machines.getPoint().distance(getPoint()) > secondClosestBullet.getPoint().distance(getPoint()) \r\n\t\t\t\t\t&& machines.getPoint().distance(getPoint()) < closestBullet.getPoint().distance(getPoint()))\r\n\t\t\t\t\tsecondClosestBullet = (Bullet)machines;*/\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t/*\r\n\t\t * Find the line\r\n\t\t */\r\n\t\t/*if(!closestBullet.equals(IMAGINARY_BULLET))\r\n\t\t{\r\n\t\t\tLine2D bulletPath = new Line2D(getLeftPoint(), closestBullet.getPoint());\r\n\t\t\tLine2D aim = new Line2D(getCenterX(), getCenterY(), (bulletPath.getX2()+bulletPath.getX1())/2,(bulletPath.getY2()+bulletPath.getY1())/2 );\r\n\t\t\tif(hasClearPath(aim) && aim.getP1().distance(aim.getP2()) < MIN_SHOOT_DISTANCE)\r\n\t\t\t\taimAndShoot(aim);\r\n\t\t\t/*bulletPath = new Line2D(getRightPoint(), closestBullet.getPoint());\r\n\t\t\taim = new Line2D(posX, posY, (bulletPath.getX2()+bulletPath.getX1())/2,(bulletPath.getY2()+bulletPath.getY1())/2 );\r\n\t\t\tif(hasClearPath(aim))\r\n\t\t\t\taimAndShoot(aim);\r\n\t\t\tbulletPath = new Line2D(getPoint(), closestBullet.getPoint());\r\n\t\t\taim = new Line2D(posX, posY, (bulletPath.getX2()+bulletPath.getX1())/2,(bulletPath.getY2()+bulletPath.getY1())/2 );\r\n\t\t\tif(hasClearPath(aim))\r\n\t\t\t\taimAndShoot(aim);*/\r\n\t\t\t\r\n\t\t//}\r\n\t/*\tif(!secondClosestBullet.equals(IMAGINARY_BULLET))\r\n\t\t{\r\n\t\t\tLine2D bulletPath = new Line2D(getLeftPoint(), secondClosestBullet.getPoint());\r\n\t\t\tLine2D aim = new Line2D(posX, posY, (bulletPath.getX2()+bulletPath.getX1())/2,(bulletPath.getY2()+bulletPath.getY1())/2 );\r\n\t\t\tif(hasClearPath(aim))\r\n\t\t\t\taimAndShoot(aim);\r\n\t\t}*/\r\n\r\n\t}",
"public static void main(String [] args) {\n PPPoint pt1 = new PPPoint(0.0, 0.0);\n PPPoint pt2 = new PPPoint(0.0, 100.0);\n double lookAheadDist = 10.0;\n double targetVelocity = 0.5;\n\n PurePursuitCalc calc = new PurePursuitCalc(pt1, pt2, lookAheadDist, targetVelocity);\n double heading;\n double x = (args.length > 0) ? Double.parseDouble(args[0]) : 0.0;\n double y = (args.length > 1) ? Double.parseDouble(args[1]) : 0.0;\n final int numPoints = (args.length > 2) ? Integer.parseInt(args[2]) : 11;\n double maxAngle = (args.length > 3) ? Double.parseDouble(args[3]) : 20;\n double stepSize = maxAngle * 2.0 / ((double)numPoints - 1.0);\n\n for (int i = 0; i < numPoints; i++) {\n heading = -maxAngle + ((double)i * stepSize);\n double[] data = calc.calcVelocities(x, y, heading);\n double[] alldata = calc.getData();\n String msg = String.format(\"currX=%6.2f, currY=%6.2f, currHeading=%6.2f, desiredHeading=%6.2f, leftSetV=%6.2f, rightSetV=%6.2f\",\n alldata[0], alldata[1], alldata[2], alldata[3], alldata[4], alldata[5]);\n System.out.println(msg);\n }\n }",
"public GameObject spawnBomber(LogicEngine in_logicEngine){\n\t\tGameObject ship = new GameObject(\"data/\"+GameRenderer.dpiFolder+\"/bomber.png\",((float)LogicEngine.SCREEN_WIDTH)+50,LogicEngine.SCREEN_HEIGHT-50,0);\r\n\t\tship.i_animationFrameSizeHeight = 58;\r\n\t\tship.i_animationFrameSizeWidth = 58;\r\n\t\t\r\n\t\t//fly back and forth\r\n\t\tLoopWaypointsStep s = new LoopWaypointsStep();\r\n\t\ts.waypoints.add(new Point2d(-30,LogicEngine.SCREEN_HEIGHT-50));\r\n\t\ts.waypoints.add(new Point2d(LogicEngine.SCREEN_WIDTH+50,LogicEngine.SCREEN_HEIGHT-50));\r\n\t\t\r\n\t\tship.b_mirrorImageHorizontal = true;\r\n\t\t\r\n\t\tship.stepHandlers.add(s);\r\n\t\tship.v.setMaxForce(5.0f);\r\n\t\tship.v.setMaxVel(5.0f);\r\n\t\tship.allegiance = GameObject.ALLEGIANCES.ENEMIES;\r\n\r\n\r\n\t\t//tadpole bullets\r\n\t\tGameObject go_tadpole = this.spawnTadpole(in_logicEngine);\r\n\t\tgo_tadpole.stepHandlers.clear();\r\n\t\tFlyStraightStep fly = new FlyStraightStep(new Vector2d(0,-0.5f));\r\n\t\tfly.setIsAccelleration(true);\r\n\t\t\r\n\t\t\r\n\t\tif(Difficulty.isHard())\r\n\t\t{\tgo_tadpole.v.setMaxVel(5);\r\n\t\t\tgo_tadpole.v.setMaxForce(5);\r\n\t\t}\r\n\t\telse\r\n\t\t{\tgo_tadpole.v.setMaxVel(10);\r\n\t\t\tgo_tadpole.v.setMaxForce(5);\r\n\t\t}\r\n\t\tgo_tadpole.stepHandlers.add(fly);\r\n\t\tgo_tadpole.v.setVel(new Vector2d(-2.5f,0f));\r\n\t\t\r\n\t\t\r\n\t\t//bounce on hard and medium\r\n\t\tif(Difficulty.isHard() || Difficulty.isMedium())\r\n\t\t{\r\n\t\t\tBounceOfScreenEdgesStep bounce = new BounceOfScreenEdgesStep();\r\n\t\t\tbounce.b_sidesOnly = true;\r\n\t\t\tgo_tadpole.stepHandlers.add(bounce);\r\n\t\t}\r\n\t\t\r\n\t\t//drop bombs\r\n\t\tLaunchShipsStep launch = new LaunchShipsStep(go_tadpole, 20, 5, 3, true);\r\n\t\tlaunch.b_addToBullets = true;\r\n\t\tlaunch.b_forceVelocityChangeBasedOnParentMirror = true;\r\n\t\t\r\n\t\tship.stepHandlers.add(launch);\r\n\t\tship.rotateToV=true;\r\n\t\t\r\n\t\t//give it some hp\r\n\t\tHitpointShipCollision c = new HitpointShipCollision(ship, 50, 50f);\r\n\t\tc.setSimpleExplosion();\r\n\t\tship.collisionHandler = c;\r\n\t\t\r\n\t\tin_logicEngine.objectsEnemies.add(ship);\r\n\t\t\r\n\t\treturn ship;\r\n\t\r\n\t}",
"void getMotionInfo(){\n double degreeDistance = Math.sqrt(Math.pow((startLat - endLat),2) + Math.pow((startLong - endLong),2));\n double R = 6378.137; // Radius of earth in KM\n double dLat = startLat * Math.PI / 180 - endLat* Math.PI / 180;\n dLat = Math.abs(dLat);\n double dLon = startLong * Math.PI / 180 - endLong* Math.PI / 180;\n dLon = Math.abs(dLon);\n double a = Math.sin(dLat / 2) * Math.sin(dLat / 2) +\n Math.cos(endLat * Math.PI / 180) * Math.cos(startLat* Math.PI / 180) *\n Math.sin(dLon / 2) * Math.sin(dLon / 2);\n double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n double distance;\n distance = R * c;\n distance = distance * 1000f;\n pathDistance = distance;\n degToMRatio = degreeDistance/distance;\n double angle = Math.atan(dLat/dLon);\n xCompMotion = Math.cos(angle);\n yCompMotion = Math.sin(angle);\n totalNumSteps = pathDistance/STEP_LENGTH;\n //Rounds number of steps to nearest whole number\n totalNumSteps = Math.round(totalNumSteps);\n }",
"public static void main( String args[] )\n {\n double Ei = 500;\n double EPS = 10;\n double phi = 60;\n float mutS = 0.1f;\n float mutA = 0.2f;\n float gamma = 45;\n double energy = Ei - EPS;\n\n double self = SelfShielding( energy, Ei, phi, mutS, mutA, gamma );\n System.out.println( \"self shielding factor = \" + self );\n // result should be: 1.1944503488285683\n\n String filename = \"/usr2/HRCS_TEST/hrcs3084.run\";\n RunfileRetriever rr = new RunfileRetriever( filename );\n DataSet ds = rr.getDataSet(1);\n Operator ToEL = new SpectrometerTofToEnergyLoss( ds, 0, 0, 0 );\n ds = (DataSet)ToEL.getResult();\n new ViewManager( ds, IViewManager.IMAGE );\n\n Vector result = SelfShielding( ds, mutS, mutA, gamma, true );\n\n DataSet ss_ds_1 = (DataSet)result.elementAt(0); \n new ViewManager( ss_ds_1, IViewManager.IMAGE );\n\n DataSet ss_ds_2 = (DataSet)result.elementAt(1); \n new ViewManager( ss_ds_2, IViewManager.IMAGE );\n }",
"public Tile diveBomb() {\n List<Tile> targets = this.findTargets();\n Tile us_tile = this.gb.get(this.us_head_x, this.us_head_y);\n LinkedList<Tile> shortestPath = null;\n\n // Chose the shortest path\n //System.out.println(\"HeadX: \" + this.us_head_x + \" HeadY: \" + this.us_head_y);\n //System.out.println(\"EnemyX: \" + this.enemy_head_x + \" EnemyY: \" + this.enemy_head_y);\n // System.out.println(\"Targets - \" + targets);\n for (Tile target : targets) {\n LinkedList<Tile> path = this.dk.path(us_tile, target, this.gb);\n\n if (path != null) { // means we couldn't reach the desired target\n // System.out.println(\"Path - \" + path);\n if (shortestPath == null) {\n shortestPath = path;\n } else if (path.size() < shortestPath.size()) {\n shortestPath = path;\n }\n }\n }\n // System.out.println(\"Shortest Path - \" + shortestPath);\n if (shortestPath == null) return us_tile;\n return shortestPath.get(1);\n }",
"private State calculatePM25(double longi, double lati) {\n Double breath = 0.0;\n Double density = PM25Density;\n boolean isConnected = ShortcutUtil.isNetworkAvailable(this);\n String inOutStr = aCache.getAsString(Const.Cache_Indoor_Outdoor);\n if(!ShortcutUtil.isStringOK(inOutStr)){\n inOutStr = String.valueOf(LocationService.Indoor);\n aCache.put(Const.Cache_Indoor_Outdoor,inOutStr);\n }\n inOutDoor = Integer.valueOf(inOutStr);\n /*double ratio;\n if (!isConnected) {\n ratio = this.getLastSevenDaysInOutRatio();\n FileUtil.appendStrToFile(DBRunTime,\"no network connection, using ratio == \"+ratio);\n density = ratio * density + (1-ratio)*density/3;\n FileUtil.appendStrToFile(DBRunTime,\"no network connection, using ratio to get density \"+density);\n if (ratio > 0.5) inOutDoor = LocationService.Indoor;\n else inOutDoor = LocationService.Outdoor;\n } else {\n if (inOutDoor == LocationService.Indoor) density /= 3;\n }*/\n\n double static_breath = ShortcutUtil.calStaticBreath(cacheUtil.getAsString(Const.Cache_User_Weight));\n\n if (static_breath == 0.0) {\n if(isBackground != null && isBackground.equals(bgStr))\n Toast.makeText(getApplicationContext(), Const.Info_Weight_Null, Toast.LENGTH_SHORT).show();\n static_breath = 6.6; // using the default one\n }\n if (mMotionStatus == Const.MotionStatus.STATIC) {\n breath = static_breath;\n } else if (mMotionStatus == Const.MotionStatus.WALK) {\n breath = static_breath * 2.1;\n } else if (mMotionStatus == Const.MotionStatus.RUN) {\n breath = static_breath * 6;\n }\n venVolToday += breath;\n breath = breath / 1000; //change L/min to m3/min\n PM25Today += density * breath;\n State state = new State(IDToday, aCache.getAsString(Const.Cache_User_Id), Long.toString(System.currentTimeMillis()),\n String.valueOf(longi),\n String.valueOf(lati),\n String.valueOf(inOutDoor),\n mMotionStatus == Const.MotionStatus.STATIC ? \"1\" : mMotionStatus == Const.MotionStatus.WALK ? \"2\" : \"3\",\n Integer.toString(numStepsForRecord), avg_rate, String.valueOf(venVolToday), density.toString(), String.valueOf(PM25Today), String.valueOf(PM25Source), 0, isConnected ? 1 : 0);\n numStepsForRecord = 0;\n return state;\n }",
"protected Unit target() {\n\t\tUnit closest = null; // this variable will contain the closest Unit\n\t\tDouble min = (double) projectile_range; // this will contain the lowest distance\n\t\tList<Entity> entities = level.getEntities();\n\n\t\tfor (int i = 0; i < entities.size(); i++) {\n\t\t\tEntity e = entities.get(i);\n\t\t\tUnit u = (Unit) e; // casts e to Unit\n\t\t\tif (u.equals(this)) continue; // discounts self\n\t\t\tif (u.UNIT_R != UNIT_G && u.UNIT_G != UNIT_R) continue; // discounts Units from own team\n\t\t\tif (!(e instanceof Unit)) continue; // discounts non-Unit entities\n\n\t\t\tdouble distance = MathMachine.distance((u.getX() - x), (u.getY() - y));\n\t\t\t/*\n\t\t\t * int r = 0; int g = 0; for (int y = 0; y < level.getHeight() * 16; y++) { for (int x = 0; x < level.getWidth() * 16; x++) { if (level.redPixels[x + y * level.getWidth() * 16] == true) r++; if (level.greenPixels[x + y * level.getWidth() * 16] == true )g++; System.out.println(\"r: \" + r + \", \" + g); } }\n\t\t\t */\n\t\t\tif (UNIT_R) { // if it is a red unit\n\t\t\t\tif (distance < min) {\n\t\t\t\t\tint xt = (int) Math.round(u.getX());\n\t\t\t\t\tint yt = (int) Math.round(u.getY());\n\t\t\t\t\tif (level.redPixels[(int) Math.round(xt + level.getWidth() * 16.0 * yt)]) {\n\t\t\t\t\t\tclosest = u;\n\t\t\t\t\t\tmin = distance;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (UNIT_G) { // if it is a green unit\n\t\t\t\tif (distance < min) {\n\t\t\t\t\tSystem.out.println(level.greenPixels[(int) Math.round(u.getX() + level.getWidth() * 16.0 * u.getY())]);\n\n\t\t\t\t\tif (level.greenPixels[(int) Math.round(u.getX() + level.getWidth() * 16.0 * u.getY())]) {\n\t\t\t\t\t\tclosest = u;\n\t\t\t\t\t\tmin = distance;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\treturn closest; // the program is fucked if null happens. just a headsup. hopefully you will remember if you get a null pointer exception.\n\t}",
"public void spawnWanderingSeeker(LogicEngine in_logicEngine)\r\n\t{\n\t\tGameObject ship = new GameObject(\"data/\"+GameRenderer.dpiFolder+\"/triangle.png\",(float)LogicEngine.SCREEN_WIDTH*Math.random(),LogicEngine.SCREEN_HEIGHT-10,0);\r\n\t\t\t\t\r\n\t\t//set animation frame\r\n\t\tship.i_animationFrame=1;\r\n\t\tship.i_animationFrameRow=0;\r\n\t\tship.i_animationFrameSizeWidth=16;\r\n\t\tship.i_animationFrameSizeHeight=16;\r\n\t\t\r\n\t\t//wander \t\r\n\t\tCustomBehaviourStep cb = new CustomBehaviourStep(new Wander(-2.5,2.5,20,0.1));\r\n\t\tship.stepHandlers.add( cb);\r\n\t\t\r\n\t\t//chase player if on medium or hard\r\n\t\tif(Difficulty.difficulty == DIFFICULTY.MEDIUM || \r\n\t\t\t\tDifficulty.difficulty == DIFFICULTY.HARD)\r\n\t\t{\t\r\n\t\t\tSeekNearestPlayerStep sps = new SeekNearestPlayerStep(100);\r\n\t\t\tship.stepHandlers.add(sps);\r\n\t\t}\r\n\t\r\n\t\tship.stepHandlers.add(new FlyStraightStep(new Vector2d(0,-2)));\r\n\t\tship.collisionHandler = new DestroyIfEnemyCollision(ship, 10, true);\r\n\t\tship.v.setMaxForce(2);\r\n\t\tship.v.setMaxVel(2);\r\n\t\t\r\n\t\tship.allegiance = GameObject.ALLEGIANCES.ENEMIES;\r\n\t\t\r\n\t\tin_logicEngine.objectsEnemies.add(ship);\r\n\t\t\r\n\t}",
"void createLaser(float x, float y, int team, float angle, float damage) {\n exists = true;\n this.team = team;\n this.damage = damage;\n degrees = angle;\n positionX = x - midX;\n positionY = y - midY;\n centerPosX = positionX + midX;\n centerPosY = positionY + midY;\n }",
"public Field.Fieldelements placeShotComputer() {\r\n int sizeX = this.fieldUser.getSizeX();\r\n int sizeY = this.fieldUser.getSizeY();\r\n \r\n // probability that a field contains a ship (not in percent, 1000 is best)\r\n double[][] probability = new double[sizeX][sizeY];\r\n double sumProbability = 0;\r\n \r\n for (int posX = 0; posX < sizeX; posX++) {\r\n for (int posY = 0; posY < sizeY; posY++) {\r\n // set probability for each field to 1\r\n probability[sizeX][sizeY] = 1.;\r\n \r\n // check neighbouring fields for hits and set probability to 1000\r\n if (Field.Fieldelements.HIT == fieldUser.getFieldStatus(posX, posY - 1) ||\r\n Field.Fieldelements.HIT == fieldUser.getFieldStatus(posX, posY + 1) ||\r\n Field.Fieldelements.HIT == fieldUser.getFieldStatus(posX - 1, posY) ||\r\n Field.Fieldelements.HIT == fieldUser.getFieldStatus(posX + 1, posY)) {\r\n probability[posX][posY] = 1000;\r\n }\r\n \r\n // 0 points if all fields above and below are SUNK or SHOT\r\n if ((Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX, posY - 1) || Field.Fieldelements.WATER == fieldUser.getFieldStatus(posX, posY - 1)) &&\r\n (Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX, posY + 1) || Field.Fieldelements.WATER == fieldUser.getFieldStatus(posX, posY + 1)) &&\r\n (Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX - 1, posY) || Field.Fieldelements.WATER == fieldUser.getFieldStatus(posX - 1, posY)) &&\r\n (Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX + 1, posY) || Field.Fieldelements.WATER == fieldUser.getFieldStatus(posX + 1, posY))\r\n ) {\r\n probability[posX][posY] = 0;\r\n }\r\n \r\n // 0 points if a neighbouring field is SUNK\r\n if (Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX - 1, posY - 1) ||\r\n Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX - 1, posY) ||\r\n Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX - 1, posY + 1) ||\r\n Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX, posY - 1) ||\r\n Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX, posY + 1) ||\r\n Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX + 1, posY - 1) ||\r\n Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX + 1, posY) ||\r\n Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX + 1, posY + 1)\r\n ) {\r\n probability[posX][posY] = 0;\r\n }\r\n \r\n // 0 points if top right, top left, bottom right or bottom left is HIT\r\n if (Field.Fieldelements.HIT == fieldUser.getFieldStatus(posX - 1, posY - 1) ||\r\n Field.Fieldelements.HIT == fieldUser.getFieldStatus(posX - 1, posY + 1) ||\r\n Field.Fieldelements.HIT == fieldUser.getFieldStatus(posX + 1, posY - 1) ||\r\n Field.Fieldelements.HIT == fieldUser.getFieldStatus(posX + 1, posY + 1)\r\n ) {\r\n probability[posX][posY] = 0;\r\n }\r\n \r\n // 0 points if a shot has already been placed\r\n if (Field.Fieldelements.WATER != fieldUser.getFieldStatus(posX, posY) &&\r\n Field.Fieldelements.SHIP != fieldUser.getFieldStatus(posX, posY)) {\r\n probability[posX][posY] = 0;\r\n }\r\n }\r\n }\r\n \r\n // calculate sum of all points\r\n // TODO check if probability must be smaller numbers\r\n for (int posX = 0; posX < sizeX; sizeX++) {\r\n for (int posY = 0; posY < sizeY; posY++) {\r\n sumProbability += probability[posX][posY];\r\n }\r\n }\r\n \r\n // random element\r\n Random random = new Random();\r\n sumProbability = random.nextInt((int) --sumProbability);\r\n sumProbability++; // must at least be 1\r\n int posY = -1;\r\n int posX = -1;\r\n while (posY < sizeY - 1 && sumProbability >= 0) {\r\n posY++;\r\n posX = -1;\r\n while (posX < sizeX && sumProbability >= 0) {\r\n posX++;\r\n sumProbability = sumProbability - probability[posX][posY];\r\n }\r\n }\r\n return fieldUser.shoot(posX, posY);\r\n }",
"public MineralLocation getMineralLocation(RobotOrientation orientation){\n MineralLocation absoluteLocation = MineralLocation.Center;\n //if tfod failed to init, just return center\n //otherwise, continue with detection\n if(!error) {\n List<Recognition> updatedRecognitions = tfod.getRecognitions();\n List<Recognition> filteredList = new ArrayList<Recognition>();\n\n /*for(Recognition recognition : updatedRecognitions){\n if(recognition.getHeight() < recognition.getImageHeight() * 3 / 11){\n filteredList.add(recognition);\n }\n }*/\n //Variabes to store two mins\n Recognition min1 = null;\n Recognition min2 = null;\n //Iterate through all minerals\n for(Recognition recognition : updatedRecognitions){\n double height = recognition.getHeight();\n if (min1 == null){\n min1 = recognition;\n }\n else if(min2 == null){\n min2 = recognition;\n }\n else if(height < min1.getHeight()){\n min1 = recognition;\n }\n else if(height < min2.getHeight()){\n min2 = recognition;\n }\n if (min1 != null && min2 != null){\n if(min1.getHeight() > min2.getHeight()){\n Recognition temp = min1;\n min1 = min2;\n min2 = temp;\n }\n }\n }\n filteredList.add(min1);\n filteredList.add(min2);\n int goldMineralX = -1;\n int silverMineral1X = -1;\n int silverMineral2X = -1;\n //Three Mineral Algorithm\n if(orientation == RobotOrientation.Center){\n for (Recognition recognition : filteredList) {\n if (recognition.getLabel().equals(LABEL_GOLD_MINERAL)) {\n goldMineralX = (int) recognition.getLeft();\n } else if (silverMineral1X == -1) {\n silverMineral1X = (int) recognition.getLeft();\n } else {\n silverMineral2X = (int) recognition.getLeft();\n }\n }\n if (goldMineralX != -1 && silverMineral1X != -1 && silverMineral2X != -1) {\n if (goldMineralX < silverMineral1X && goldMineralX < silverMineral2X) {\n return MineralLocation.Left;\n } else if (goldMineralX > silverMineral1X && goldMineralX > silverMineral2X) {\n return MineralLocation.Right;\n } else {\n return MineralLocation.Center;\n }\n }\n }\n else{//Two Mineral Algorithm\n //looks at each detected object, obtains \"the most\" gold and silver mineral\n float goldMineralConfidence = 0;\n float silverMineralConfidence = 0;\n for (Recognition recognition : updatedRecognitions) {\n String label = recognition.getLabel();\n float confidence = recognition.getConfidence();\n int location = (int) recognition.getLeft();\n if (label.equals(LABEL_GOLD_MINERAL)\n && confidence > goldMineralConfidence) {\n goldMineralX = location;\n goldMineralConfidence = confidence;\n } else if (label.equals(LABEL_SILVER_MINERAL)\n && confidence > silverMineralConfidence) {\n silverMineral1X = location;\n silverMineralConfidence = confidence;\n }\n }\n //using the two gold and silver object x locations,\n //obtains whether the gold mineral is on the relative left or the right\n boolean goldRelativeLeft;\n if (goldMineralX != -1 && silverMineral1X != -1) {\n if (goldMineralX < silverMineral1X) {\n goldRelativeLeft = true;\n } else {\n goldRelativeLeft = false;\n }\n // telemetry.addData(\"Relative\", goldRelativeLeft);\n //translates the relative location to an absolute location based off the orientation\n if (orientation == RobotOrientation.Left) {\n if (goldRelativeLeft) {\n absoluteLocation = MineralLocation.Left;\n } else {\n absoluteLocation = MineralLocation.Center;\n }\n //telemetry.addData(\"orientation\",absoluteLocation);\n } else {\n if (goldRelativeLeft) {\n absoluteLocation = MineralLocation.Center;\n } else {\n absoluteLocation = MineralLocation.Right;\n }\n // telemetry.addData(\"orientation\",\"fail\");\n }\n } //sees at least one silver (so not a reading from the wrong position, but no gold seen)\n else if(silverMineral1X != -1 && goldMineralX == -1){\n if(orientation == RobotOrientation.Left){\n absoluteLocation = MineralLocation.Right;\n }else if(orientation == RobotOrientation.Right){\n absoluteLocation = MineralLocation.Left;\n }\n }\n }\n\n }\n return absoluteLocation;\n }",
"public void spawnSateliteShip(LogicEngine in_logicEngine,float in_x)\r\n\t{\n\t\tGameObject ship = new GameObject(\"data/\"+GameRenderer.dpiFolder+\"/gravitonlevel.png\",in_x,LogicEngine.SCREEN_HEIGHT,1);\r\n\t\tship.i_animationFrameSizeWidth = 64;\r\n\t\tship.i_animationFrameSizeHeight = 32;\r\n\t\tship.i_animationFrame = 2;\r\n\t\tship.allegiance = GameObject.ALLEGIANCES.ENEMIES;\r\n\t\t\r\n\t\tship.v.setMaxForce(1.0f);\r\n\t\tship.v.setMaxVel(4.0f);\r\n\t\t\r\n\t\t\r\n\t\t//fly down\r\n\t\t//ship.stepHandlers.add( new FlyStraightStep(new Vector2d(0,-1f)));\r\n\t\t\r\n\t\tSimplePathfollowing followPathBehaviour = new SimplePathfollowing();\r\n\t\tfollowPathBehaviour.setInfluence(1);\r\n\t\tfollowPathBehaviour.setAttribute(\"arrivedistance\", \"10\", null);\r\n\t\t\r\n\t\t//add waypoints\r\n\t\tfor(int i=0 ; i< 20 ; i++)\r\n\t\t{\r\n\t\t\t\t\t\t\r\n\t\t\t//put in some edge ones too\r\n\t\t\tif(r.nextInt(6)%3==0)\r\n\t\t\t\tship.v.addWaypoint(new Point2d((int) LogicEngine.SCREEN_WIDTH * (i%2), LogicEngine.SCREEN_HEIGHT/1.5 + r.nextInt((int) LogicEngine.SCREEN_HEIGHT/5)));\r\n\t\t\telse\r\n\t\t\t\t//put in some random doublebacks etc\r\n\t\t\t\tship.v.addWaypoint(new Point2d(r.nextInt((int) LogicEngine.SCREEN_WIDTH), LogicEngine.SCREEN_HEIGHT/1.5 + r.nextInt((int) LogicEngine.SCREEN_HEIGHT/5)));\r\n\t\t}\r\n\t\tship.v.addWaypoint(new Point2d(LogicEngine.SCREEN_WIDTH/2, -100));\r\n\t\t\r\n\t\tif(Difficulty.isEasy())\r\n\t\t\tship.shotHandler = new BeamShot(50);\r\n\t\telse\r\n\t\tif(Difficulty.isMedium())\r\n\t\t\tship.shotHandler = new BeamShot(40);\r\n\t\telse\r\n\t\tif(Difficulty.isHard())\r\n\t\t\tship.shotHandler = new BeamShot(30);\r\n\t\t\r\n\t\tCustomBehaviourStep b = new CustomBehaviourStep(followPathBehaviour);\r\n\t\tship.stepHandlers.add(b);\r\n\t\t\r\n\t\t//destroy ships that get too close\r\n\t\tHitpointShipCollision hps = new HitpointShipCollision(ship, 10, 32);\r\n\t\thps.setSimpleExplosion();\r\n\t\t\r\n\t\tship.collisionHandler = hps; \r\n\t\t\r\n\t\tin_logicEngine.objectsEnemies.add(ship);\t\r\n\t\r\n\t}",
"public GameObject spawnBigBeamer(LogicEngine in_logicEngine) {\n\t\tGameObject ship = new GameObject(\"data/\"+GameRenderer.dpiFolder+\"/bigbeamer.png\",((float)LogicEngine.SCREEN_WIDTH/2),LogicEngine.SCREEN_HEIGHT+64,0);\r\n\t\tship.i_animationFrameSizeHeight = 115;\r\n\t\tship.i_animationFrameSizeWidth = 115;\r\n\t\t\r\n\t\t\r\n\t\tship.stepHandlers.add(new FlyStraightStep(new Vector2d(0,-1f)));\r\n\t\t\r\n\t\r\n\t\tship.v.setMaxForce(2.5f);\r\n\t\tship.v.setMaxVel(2.5f);\r\n\t\tship.allegiance = GameObject.ALLEGIANCES.ENEMIES;\r\n\t\t\r\n\t\tint i_shootEvery = 80;\r\n\t\t\r\n\t\tBeamShot b = new BeamShot(i_shootEvery);\r\n\t\t\r\n\t\tb.b_flare=false;\r\n\t\tb.f_offsetX=-40;\r\n\t\tb.f_offsetY=-30;\r\n\t\tb.i_delay = 40;\r\n\t\tb.i_beamWidth = 15;\r\n\t\t\r\n\t\tBeamShot b2 = new BeamShot(i_shootEvery);\r\n\t\tb2.b_flare=false;\r\n\t\tb2.f_offsetX=40;\r\n\t\tb2.f_offsetY=-30;\r\n\t\tb2.i_delay = 40+(i_shootEvery/2);\r\n\t\tb2.i_beamWidth = 15;\r\n\t\tb.nextBeam = b2;\r\n\t\t\r\n\t\tship.shootEverySteps=1;\r\n\t\tship.shotHandler = b;\r\n\t\t\r\n\t\tHitpointShipCollision c = new HitpointShipCollision(ship, 100, 50f);\r\n\t\t\r\n\t\tif(!Difficulty.isHard())\r\n\t\t\tc.f_numberOfHitpoints = 200;\r\n\t\tif(!Difficulty.isMedium())\r\n\t\t\tc.f_numberOfHitpoints = 160;\r\n\t\t\r\n\t\tc.setExplosion(Utils.getBossExplosion(ship));\r\n\t\tship.collisionHandler = c;\r\n\t\t\r\n\t\tin_logicEngine.objectsEnemies.add(ship);\r\n\t\t\r\n\t\treturn ship;\r\n\t}",
"private TargetInformation findHighGoal(Mat image) {\r\n\t\tTargetInformation ret = new TargetInformation();\r\n\t\tret.targetingPeg = false;\r\n\t\t\r\n long[] xsums = sums(image, true);\r\n long[] ysums = sums(image, false);\r\n \r\n\t List<PeakLoc> xpeaks = findPeaks(xsums, 10);\r\n\t List<PeakLoc> ypeaks = findPeaks(ysums, 10);\r\n\r\n\t if (ypeaks.size() == 2 && xpeaks.size() > 0) {\r\n\t \tret.targetFound = true;\r\n\t \tret.x = (xpeaks.get(0).getStop() - xpeaks.get(0).getStart()) / 2;\r\n\t \tret.gap = ypeaks.get(1).getStart() - ypeaks.get(0).getStop();\r\n\t \tret.width = xpeaks.get(0).getStop() - xpeaks.get(0).getStart();\r\n\t \tret.height = ypeaks.get(1).getStop() - ypeaks.get(0).getStart();\r\n\t \tret.y = (ypeaks.get(0).getStop() + ypeaks.get(1).getStart())/2;\r\n\t \t\r\n\t \tdouble pixelsPerInch = ret.gap / highGoalGapInches;\r\n\t \tif (xpeaks.get(0).isTruePeak() && xpeaks.get(1).isTruePeak())\r\n\t \t{\r\n\t \t\tpixelsPerInch = (pixelsPerInch + ret.width / highGoalWidthInches) / 2;\r\n\t \t}\r\n\t \tif (ypeaks.get(0).isTruePeak())\r\n\t \t{\r\n\t \t\tif (xpeaks.get(0).isTruePeak() && xpeaks.get(1).isTruePeak())\r\n\t \t\t{\r\n\t \t\t\tpixelsPerInch = (pixelsPerInch * 2 + ret.width / highGoalHeightInches) / 3;\r\n\t \t\t}\r\n\t \t\telse\r\n\t \t\t{\r\n\t \t\t\tpixelsPerInch = (pixelsPerInch + ret.width / highGoalHeightInches) / 2;\r\n\t \t\t}\r\n\t \t} \t\r\n\t \t\r\n\t \tret.aimX = ret.x + (cameraOffsetInches - shooterOffsetInches) * pixelsPerInch;\r\n\t \t\r\n\t \tret.correctionAngle = (double)((ret.aimX - image.cols() / 2)) / pixelsPerXDegree;\r\n\t }\r\n\t else\r\n\t {\r\n\t \tret.targetFound = false;\r\n\t }\r\n\t \r\n\t return ret;\r\n\t}",
"Optional<UUID> getShooter(UUID projectile);",
"public Pile getExhaustPile(){\n return piles.getExhaustPile();\n }",
"public static void render(Graphics g, Tile tile, Point pxCenterPoint, float value) {\n Point topLeft = new Point(pxCenterPoint.x - (tile.getImage().getWidth() / 2), pxCenterPoint.y - (tile.getImage().getHeight() / 2));\n if (value >= 0) {\n\n\n if (tile.getType() == \"Mountain\") {\n\n g.drawImage(GraphicAssets.col, topLeft.x, topLeft.y + 19 + 21, 60, tile.getImageHeight() / 2, null);\n g.drawImage(GraphicAssets.base, topLeft.x, topLeft.y + 19 + 19 + tile.getImageHeight() / 2, 60, 19, null);\n g.drawImage(tile.getImage(), topLeft.x, topLeft.y, tile.getImage().getWidth(), tile.getImage().getHeight(), null);\n\n } else if (tile.getType() == \"Water\" || tile.getType() == \"Grass\" || tile.getType() == \"Running\") {\n //\n //System.out.println(topLeft.y);\n g.drawImage(GraphicAssets.col, topLeft.x, topLeft.y + 10 + 19, 60, tile.getImageHeight() / 2, null);\n g.drawImage(GraphicAssets.base, topLeft.x, topLeft.y + 10 + 19 + tile.getImageHeight() / 2, 60, 19, null);\n g.drawImage(tile.getImage(), topLeft.x, topLeft.y + 10, tile.getImage().getWidth(), tile.getImage().getHeight(), null);\n } else {\n g.drawImage(GraphicAssets.col, topLeft.x, topLeft.y + 10 + 19, 60, tile.getImageHeight() / 2, null);\n g.drawImage(GraphicAssets.base, topLeft.x, topLeft.y + 10 + 19 + tile.getImageHeight() / 2, 60, 19, null);\n g.drawImage(tile.getImage(), topLeft.x, topLeft.y + 10, tile.getImage().getWidth(), tile.getImage().getHeight(), null);\n }\n if (tile.hasAreaEffect()) {\n areaEffectRenderer.render(g, tile.getAreaEffect(), topLeft);\n }\n\n if (tile.hasItem()) {\n for (Item item : tile.getItems()) {\n itemRenderer.render(g, item, topLeft);\n }\n }\n }\n }",
"public int getArmorPoint ()\r\n {\r\n return armorPoint;\r\n }",
"@Override\n public void teleopPeriodic() {\n \n boolean targetFound = false; \n int Xpos = -1; int Ypos = -1; int Height = -1; int Width = -1; Double objDist = -1.0; double []objAng = {-1.0,-1.0};\n\n //Getting the number of blocks found\n int blockCount = pixy.getCCC().getBlocks(false, Pixy2CCC.CCC_SIG1, 25);\n\t\tSystem.out.println(\"Found \" + blockCount + \" blocks!\"); // Reports number of blocks found\n\t\tif (blockCount <= 0) {\n System.err.println(\"No blocks found\");\n }\n ArrayList <Block> blocks = pixy.getCCC().getBlocks();\n Block largestBlock = null;\n\n //verifies the largest block and store it in largestBlock\n for (Block block:blocks){\n if (block.getSignature() == Pixy2CCC.CCC_SIG1) {\n\n\t\t\t\tif (largestBlock == null) {\n\t\t\t\t\tlargestBlock = block;\n\t\t\t\t} else if (block.getWidth() > largestBlock.getWidth()) {\n\t\t\t\t\tlargestBlock = block;\n }\n\t\t\t}\n }\n //loop\n while (pixy.getCCC().getBlocks(false, Pixy2CCC.CCC_SIG1, 25)>=0 && ButtonLB){\n\n if (largestBlock != null){\n targetFound = true; \n Xpos = largestBlock.getX();\n Ypos = largestBlock.getY();\n Height = largestBlock.getHeight();\n Width = largestBlock.getWidth();\n\n objDist = RobotMap.calculateDist((double)Height, (double)Width, (double)Xpos, (double)Ypos);\n objAng = RobotMap.calculateAngle(objDist, Xpos, Ypos);\n \n }\n //print out values to Dashboard\n SmartDashboard.putBoolean(\"Target found\", targetFound);\n SmartDashboard.putNumber (\"Object_X\", Xpos);\n SmartDashboard.putNumber (\"Object_Y\", Ypos);\n SmartDashboard.putNumber (\"Height\", Height);\n SmartDashboard.putNumber(\"Width\", Width);\n SmartDashboard.putNumber (\"Distance\", objDist);\n SmartDashboard.putNumber(\"X Angle\", objAng[0]);\n SmartDashboard.putNumber(\"Y Angle\", objAng[1]);\n }\n }",
"@Override\r\n\tpublic Projectile getProjectile(int yield) {\r\n\t\treturn new BazookaProjectile(getWorm(), yield);\r\n\t}",
"public static void main(String[] args) {\n MeepMeep mm = new MeepMeep(800)\n // Set field image\n .setBackground(MeepMeep.Background.FIELD_ULTIMATE_GOAL_DARK)\n // Set theme\n .setTheme(new ColorSchemeRedDark())\n // Background opacity from 0-1\n .setBackgroundAlpha(1f)\n // Set constraints: maxVel, maxAccel, maxAngVel, maxAngAccel, track width\n .setConstraints(99, 30, Math.toRadians(37.74), Math.toRadians(60), 37)\n .followTrajectorySequence(drive ->\n drive.trajectorySequenceBuilder(new Pose2d(-60, 48, 0))\n .lineTo(new Vector2d(56, 48))\n .addTemporalMarker(15.0,() -> {\n // do stuff\n })\n// .lineToConstantHeading(new Vector2d(56, 48))\n //drop wobble\n// .lineToConstantHeading(new Vector2d(56, 19))\n .addDisplacementMarker(() -> {\n // drop wobble goal\n //return Unit.INSTANCE;\n })\n .waitSeconds(1.5)\n // Get to wobble goal\n .lineToSplineHeading(new Pose2d(-12, 19, Math.toRadians(0)))\n // slowly approach wobble goal\n .lineTo(new Vector2d(-27, 19), new TranslationalVelocityConstraint(5))\n // grab wobble goal\n .addDisplacementMarker(() -> {\n // grab wobble goal\n //return Unit.INSTANCE;\n })\n .waitSeconds(2.0)\n .strafeTo(new Vector2d(56, 19))\n .lineToLinearHeading(new Pose2d(56, 36, Math.toRadians(-90)))\n .addDisplacementMarker(() -> {\n // drop wobble goal\n //return Unit.INSTANCE;\n })\n .strafeTo(new Vector2d(56, 30))\n .strafeTo(new Vector2d(12, 30))\n .waitSeconds(1.0)\n .build()\n )\n .start();\n\n/*\n\n .lineTo(new Vector2d(12, 48))\n .splineToConstantHeading(new Vector2d(12, 19), Math.toRadians(0))\n .splineToConstantHeading(new Vector2d(-18, 19), Math.toRadians(0))\n .lineTo(\n new Vector2d(-27, 19)\n// SampleMecanumDrive.getVelocityConstraint(slowerVelocity, DriveConstants.MAX_ANG_VEL, DriveConstants.TRACK_WIDTH),\n// SampleMecanumDrive.getAccelerationConstraint(DriveConstants.MAX_ACCEL)\n )\n .splineToConstantHeading(new Vector2d(12, 19), Math.toRadians(0))\n .splineToLinearHeading(new Pose2d(12, 36, Math.toRadians(-90)), Math.toRadians(0))\n .start()\n */\n }",
"public ParticleMesh getMissileTrail() {\r\n for (int x = 0, tSize = missileTrails.size(); x < tSize; x++) {\r\n ParticleMesh e = missileTrails.get(x);\r\n if (!e.isActive()) {\r\n e.getParticleController().setRepeatType(Controller.RT_WRAP);\r\n e.forceRespawn();\r\n return e;\r\n }\r\n }\r\n return createMissileTrail();\r\n }",
"public Pile getHandPile(){\n return piles.getHandPile();\n }",
"private void calculateLocation()\r\n\t{\r\n\t\tdouble leftAngleSpeed \t= this.angleMeasurementLeft.getAngleSum() / ((double)this.angleMeasurementLeft.getDeltaT()/1000); //degree/seconds\r\n\t\tdouble rightAngleSpeed \t= this.angleMeasurementRight.getAngleSum() / ((double)this.angleMeasurementRight.getDeltaT()/1000); //degree/seconds\r\n\r\n\t\tdouble vLeft\t= (leftAngleSpeed * Math.PI * LEFT_WHEEL_RADIUS ) / 180 ; //velocity of left wheel in m/s\r\n\t\tdouble vRight\t= (rightAngleSpeed * Math.PI * RIGHT_WHEEL_RADIUS) / 180 ; //velocity of right wheel in m/s\t\t\r\n\t\tdouble w \t\t= (vRight - vLeft) / WHEEL_DISTANCE; //angular velocity of robot in rad/s\r\n\t\t\r\n\t\tDouble R \t= new Double(( WHEEL_DISTANCE / 2 ) * ( (vLeft + vRight) / (vRight - vLeft) ));\t\t\t\t\t\t\t\t\r\n\t\t\r\n\t\tdouble ICCx = 0;\r\n\t\tdouble ICCy = 0;\r\n\r\n\t\tdouble W_xResult \t\t= 0;\r\n\t\tdouble W_yResult \t\t= 0;\r\n\t\tdouble W_angleResult \t= 0;\r\n\t\t\r\n\t\tdouble E_xResult \t\t= 0;\r\n\t\tdouble E_yResult \t\t= 0;\r\n\t\tdouble E_angleResult \t= 0;\r\n\t\t\r\n\t\t//short axe = 0;\r\n\t\t\r\n\t\tdouble deltaT = ((double)this.angleMeasurementLeft.getDeltaT())/1000;\r\n\t\t\r\n\t\t// Odometry calculations\r\n\t\tif (R.isNaN()) \t\t\t\t//robot don't move\r\n\t\t{\r\n\t\t\tW_xResult\t\t= this.pose.getX();\r\n\t\t\tW_yResult\t\t= this.pose.getY();\r\n\t\t\tW_angleResult \t= this.pose.getHeading();\r\n\t\t} \r\n\t\telse if (R.isInfinite()) \t//robot moves straight forward/backward, vLeft==vRight\r\n\t\t{ \r\n\t\t\tW_xResult\t\t= this.pose.getX() + vLeft * Math.cos(this.pose.getHeading()) * deltaT;\r\n\t\t\tW_yResult\t\t= this.pose.getY() + vLeft * Math.sin(this.pose.getHeading()) * deltaT;\r\n\t\t\tW_angleResult \t= this.pose.getHeading();\r\n\t\t} \r\n\t\telse \r\n\t\t{\t\t\t\r\n\t\t\tICCx = this.pose.getX() - R.doubleValue() * Math.sin(this.pose.getHeading());\r\n\t\t\tICCy = this.pose.getY() + R.doubleValue() * Math.cos(this.pose.getHeading());\r\n\t\t\r\n\t\t\tW_xResult \t\t= Math.cos(w * deltaT) * (this.pose.getX()-ICCx) - Math.sin(w * deltaT) * (this.pose.getY() - ICCy) + ICCx;\r\n\t\t\tW_yResult \t\t= Math.sin(w * deltaT) * (this.pose.getX()-ICCx) + Math.cos(w * deltaT) * (this.pose.getY() - ICCy) + ICCy;\r\n\t\t\tW_angleResult \t= this.pose.getHeading() + w * deltaT;\r\n\t\t}\r\n\t\t\r\n\t\tthis.pose.setLocation((float)W_xResult, (float)W_yResult);\r\n\t\tthis.pose.setHeading((float)W_angleResult);\r\n\t\t\r\n\t\t// Conversion to grads\r\n\t\tW_angleResult = W_angleResult/Math.PI*180;\r\n\t\t\r\n\t\t// Get the heading axe\r\n\t\t//axe = getHeadingAxe();\r\n\t\tgetHeadingAxe();\r\n\t\t\r\n\t\t// Verify the coordinates and the heading angle\r\n\t\tif (Po_Corn == 1)\r\n\t\t{\r\n\t\t\tswitch (Po_CORNER_ID)\r\n\t\t\t{\r\n\t\t\t\tcase 0:\r\n\t\t\t\t\tE_xResult = 0;\r\n\t\t\t\t\tE_yResult = 0;\r\n\t\t\t\t\tPo_ExpAng = 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\tE_xResult = 1.8;\r\n\t\t\t\t\tE_yResult = 0.11;\r\n\t\t\t\t\tPo_ExpAng = 90;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tE_xResult = 1.6;\r\n\t\t\t\t\tE_yResult = 0.6;\r\n\t\t\t\t\tPo_ExpAng = 180;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\tE_xResult = 1.5;\r\n\t\t\t\t\tE_yResult = 0.45;\r\n\t\t\t\t\tPo_ExpAng = 270;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r\n\t\t\t\t\tE_xResult = 1.5;\r\n\t\t\t\t\tE_yResult = 0.3;\r\n\t\t\t\t\tPo_ExpAng = 180;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 5:\r\n\t\t\t\t\tE_xResult = 0.3;\r\n\t\t\t\t\tE_yResult = 0.3;\r\n\t\t\t\t\tPo_ExpAng = 90;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 6:\r\n\t\t\t\t\tE_xResult = 0.3;\r\n\t\t\t\t\tE_yResult = 0.6;\r\n\t\t\t\t\tPo_ExpAng = 180;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 7:\r\n\t\t\t\t\tE_xResult = 0;\r\n\t\t\t\t\tE_yResult = 0.6;\r\n\t\t\t\t\tPo_ExpAng = 270;\r\n\t\t\t\t\tbreak;\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tE_angleResult = W_angleResult;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tint block = 0;\r\n\t\t\t// white = 0, black = 2, grey = 1\r\n\t\t\tif ((lineSensorLeft == 0) && (lineSensorRight == 0) && (block == 0)) \t// Robot moves on the black line\r\n\t\t\t{\r\n\t\t\t\tswitch (Po_CORNER_ID)\t\t\t\t\t\t\t\t// Even numbers - x, Odd numbers - y\r\n\t\t\t\t{\r\n\t\t\t\tcase 0: \r\n\t\t\t\t\tif (this.pose.getX() < 1.6)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_yResult = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = W_angleResult;\r\n\t\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 1: \r\n\t\t\t\t\tif (this.pose.getY() < 0.4)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_xResult = 1.8;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = W_angleResult; \r\n\t\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tif (this.pose.getX() > 1.65)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_yResult = 0.6;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = W_angleResult;\r\n\t\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\tif (this.pose.getY() > 0.4)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_xResult = 1.5; \r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = W_angleResult; \r\n\t\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 4: \r\n\t\t\t\t\tif (this.pose.getX() > 0.4)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_yResult = 0.3;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = W_angleResult;\r\n\t\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 5:\r\n\t\t\t\t\tif (this.pose.getY() < 0.5)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_xResult = 0.3;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = W_angleResult; \r\n\t\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 6: \r\n\t\t\t\t\tif (this.pose.getX() > 0.1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_yResult = 0.6;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = W_angleResult;\r\n\t\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 7:\r\n\t\t\t\t\tif (this.pose.getY() > 0.1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_xResult = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = W_angleResult; \r\n\t\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tdefault: \r\n\t\t\t\t\tE_angleResult = W_angleResult;\r\n\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if(((lineSensorLeft == 0) && (lineSensorRight == 2)) || ((lineSensorLeft == 2) && (lineSensorRight == 0)))\r\n\t\t\t{\r\n\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\r\n\t \tif (W_angleResult >= TRSH_W)\r\n\t \t{\r\n\t \t\tE_angleResult = TRSH_W;\r\n\t \t}\r\n\t \telse if (W_angleResult >= (360 - TRSH_W))\r\n\t \t{\r\n\t \t\tE_angleResult = 360 - TRSH_W;\r\n\t \t}\r\n\t \telse\r\n\t \t{\r\n\t \t\tE_angleResult = W_angleResult;\r\n\t \t}\r\n\t \t\r\n\t \t// test\r\n\t \tE_angleResult = W_angleResult;\r\n\t\t\t}\r\n\t\t\telse if(((lineSensorLeft == 0) && (lineSensorRight == 1)) || ((lineSensorLeft == 1) && (lineSensorRight == 0)))\r\n\t\t\t{\r\n\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\r\n\t \tif (W_angleResult >= TRSH_G)\r\n\t \t{\r\n\t \t\tE_angleResult = TRSH_G;\r\n\t \t}\r\n\t \telse if (W_angleResult >= (360 - TRSH_G))\r\n\t \t{\r\n\t \t\tE_angleResult = 360 - TRSH_G;\r\n\t \t}\r\n\t \telse\r\n\t \t{\r\n\t \t\tE_angleResult = W_angleResult;\r\n\t \t}\r\n\t \t\r\n\t \t// test\r\n\t \tE_angleResult = W_angleResult;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\tE_angleResult = W_angleResult;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tLCD.drawString(\"AngRs: \" + (E_angleResult), 0, 7);\r\n\t\t\r\n\t\t// Conversion to rads\r\n\t\tW_angleResult = W_angleResult*Math.PI/180;\r\n\t\tE_angleResult = E_angleResult*Math.PI/180;\r\n\t\t\r\n\t\tif ((Po_CORNER_ID == 3) && (100*this.pose.getY() < 45))\r\n\t\t{\r\n\t\t\tE_angleResult = 3*Math.PI/180;;\r\n\t\t}\r\n\t\t\r\n\t\tthis.pose.setLocation((float)E_xResult, (float)E_yResult);\r\n\t\tthis.pose.setHeading((float)E_angleResult);\r\n\t\t\r\n\t\t/*\r\n\t\t// Integration deviation correction\r\n\t\tthis.pose.setLocation((float)(W_xResult), (float)(W_yResult + (0.01*22.4)/175));\r\n\t\tthis.pose.setHeading((float)((W_angleResult + 14/175)*Math.PI/180));\r\n\t\t*/\r\n\t}",
"public Result call()\n {\n HashMap<RotamerPair,Double> tempMap = new HashMap<>();\n for ( Map.Entry<Rotamer,Rotamer> entry : work.entries() )\n {\n Rotamer rotamer1 = entry.getKey();\n Rotamer rotamer2 = entry.getValue();\n RotamerPair pair = new RotamerPair(rotamer1, rotamer2);\n if ( incompatiblePairs.contains(pair) )\n continue;\n \n //Atom extraAtom1 = null;\n //if ( rotamer1.description.indexOf(\"proline\") == -1 )\n // extraAtom1 = peptide.sequence.get(rotamer1.sequenceIndex).HN;\n \n //Atom extraAtom2 = null;\n //if ( rotamer2.description.indexOf(\"proline\") == -1 )\n // extraAtom2 = peptide.sequence.get(rotamer2.sequenceIndex).HN;\n \n //double energy = OPLScalculator.getInteractionEnergy(rotamer1, extraAtom1, rotamer2, extraAtom2);\n double energy = OPLScalculator.getInteractionEnergy(rotamer1, null, rotamer2, null);\n tempMap.put(pair,energy);\n }\n map.putAll(tempMap);\n return null;\n }",
"protected void calculatePathfindingGrid(Tile[] tiles) {\n \n if(tiles == null) {\n return;\n }\n \n /**\n * Problem:\n * Because the tile size used by the path finding engine will most likely be\n * different from that of the visual effect size, we have to\n * look at all the visual tiles and judge whether they are blocking of\n * particular kinds of unit.\n * \n * Algorithm:\n * For land, air and sea take a look at the number of blocking/non-blocking\n * tiles there are and if there is over 50% either way then that will be the\n * PathTiles result.\n */\n \n // First get the size of the map in PathTile(s)\n int rows = getActualHeightInTiles();\n int cols = getActualWidthInTiles();\n \n // Calculate the number of tiles to a PathTile\n int tilesPerActualTilesX = getActualTileWidth() / getTileWidth();\n int tilesPerActualTilesY = getActualTileHeight() / getTileHeight();\n int tileCount = tilesPerActualTilesX * tilesPerActualTilesY;\n \n int tileCols = getWidthInTiles();\n \n // Create an array\n mPathTiles = new PathTile[ rows * cols ];\n \n // Iterate through these tiles\n for(int x = 0; x < cols ; x++) {\n for(int y = 0; y < rows; y++) {\n \n // Setup some variables\n int blockSea, blockAir, blockLand;\n blockAir = blockLand = blockSea = 0;\n \n // Figure out the percentage of each block\n for(int tx = 0; tx < tilesPerActualTilesX; tx++) {\n for(int ty = 0; ty < tilesPerActualTilesY; ty++) {\n \n int tileX = (x * tilesPerActualTilesX) + tx;\n int tileY = (y * tilesPerActualTilesY) + ty;\n \n Tile thisTile = tiles[ (tileY * tileCols) + tileX ];\n \n if(thisTile.blockAir()) {\n blockAir++;\n }\n \n if(thisTile.blockLand()) {\n blockLand++;\n }\n \n if(thisTile.blockSea()) {\n blockSea++;\n }\n \n }\n }\n \n // Calculate percentage\n float a,b,c;\n a = (float)blockAir / (float)tileCount;\n b = (float)blockLand / (float)tileCount;\n c = (float)blockSea / (float)tileCount;\n \n // Set the new tile\n mPathTiles[ (y * cols) + x ] = new PathTile( (a >= .5f), (b >= .5f), (c >= .5f) );\n \n // System.out.println(\"Grid \" + ((y * cols) + x) + \" (\" + x + \", \" + y + \") Air: \" + a + \" Land: \" + b + \" Sea: \" + c);\n \n }\n }\n \n }",
"public double smilePos(){\r\n\r\n\t\treturn smile.getY();\r\n\r\n\t}",
"public interface AI {\n\n /**\n * Sets the new enemy position.\n * @param pos the new enemy position\n */\n void setEnemyPos(Point2D pos);\n\n /**\n * Returns the new position for the enemy to\n * move to.\n * @param target the position that wants to be tracked\n * @param pursuit the state in which the enemy is in\n * @param map\n * @return the position to move to\n */\n Point2D getNextMove(Point2D target, boolean pursuit, Set<Point2D> map);\n\n /**\n * Returns the new enemy rotation based on the\n * state in which the enemy is in.\n * @param target the position that wants to be tracked\n * @param pursuit the state in which the enemy is in\n * @return the angle that the enemy should face\n */\n double getRotation(Point2D target, boolean pursuit);\n\n /**\n * Returns if the enemy is in pursuit of the target\n * by calculating if the noise radius overlap with the\n * two.\n * @param target the position that wants to be tracked\n * @param noise the radius of the noise made by a player action\n * @return the state in which the enemy will be in\n * @see Player\n */\n boolean isInPursuit(Point2D target, double noise);\n\n /**\n * Returns if the enemy has the {@code target} in line of\n * sight and is close enough to get the enemy attention\n * to shoot.\n * @param target the position that wants to be tracked\n * @return the action that should be performed by the enemy\n */\n boolean isShooting(Point2D target);\n\n /**\n * Returns the collection of all position to check\n * if target is obscured by a wall used to JUnit\n * tests purpose.\n * @return the collections of all wall objects position\n */\n Set<Point2D> getWallSet();\n\n}",
"public String getMissile() {\n return\n \" BB \\n\" +\n \" BB \\n\" +\n \" BB \\n\" +\n \" BB \\n\" +\n \" BB \\n\" +\n \" BB \\n\" +\n \" BBBB \\n\" +\n \" BBBBBB \\n\" +\n \" BB BB \\n\" +\n \" BB BB \\n\" +\n \" B B \\n\";\n\n }",
"public FloorTile getGoalTile() {\r\n return goalTile;\r\n }",
"private final Item createPileItem(Item posItem, boolean starting) {\n/* */ try {\n/* 4519 */ Item pileItem = ItemFactory.createItem(177, 60.0F, null);\n/* */ \n/* 4521 */ float newXPos = ((this.tilex << 2) + 1) + Server.rand.nextFloat() * 2.0F;\n/* 4522 */ float newYPos = ((this.tiley << 2) + 1) + Server.rand.nextFloat() * 2.0F;\n/* */ \n/* 4524 */ float height = posItem.getPosZ();\n/* 4525 */ if (Server.getSecondsUptime() > 0) {\n/* 4526 */ height = Zones.calculatePosZ(newXPos, newYPos, this, isOnSurface(), false, posItem\n/* 4527 */ .getPosZ(), null, posItem.onBridge());\n/* */ }\n/* */ \n/* */ \n/* */ \n/* 4532 */ pileItem.setPos(newXPos, newYPos, height, posItem\n/* 4533 */ .getRotation(), posItem.getBridgeId());\n/* */ \n/* 4535 */ pileItem.setZoneId(this.zone.getId(), this.surfaced);\n/* 4536 */ int data = posItem.getTemplateId();\n/* 4537 */ pileItem.setData1(data);\n/* 4538 */ byte material = 0;\n/* 4539 */ boolean multipleMaterials = false;\n/* */ \n/* */ \n/* */ \n/* 4543 */ if (this.vitems != null)\n/* */ {\n/* 4545 */ for (Item item : this.vitems.getAllItemsAsArray()) {\n/* */ \n/* 4547 */ if (!item.isDecoration() && item.getFloorLevel() == pileItem.getFloorLevel()) {\n/* */ \n/* 4549 */ if (!starting)\n/* 4550 */ sendRemoveItem(item, false); \n/* 4551 */ if (!multipleMaterials)\n/* */ {\n/* */ \n/* */ \n/* 4555 */ if (item.getMaterial() != material)\n/* */ {\n/* 4557 */ if (material == 0) {\n/* */ \n/* */ \n/* */ \n/* 4561 */ material = item.getMaterial();\n/* */ \n/* */ \n/* */ \n/* */ }\n/* */ else {\n/* */ \n/* */ \n/* */ \n/* 4570 */ material = 0;\n/* 4571 */ multipleMaterials = true;\n/* */ } \n/* */ }\n/* */ }\n/* 4575 */ if (!item.equals(posItem))\n/* 4576 */ pileItem.insertItem(item, true); \n/* 4577 */ if (data != -1 && item.getTemplateId() != data) {\n/* */ \n/* 4579 */ pileItem.setData1(-1);\n/* 4580 */ data = -1;\n/* */ } \n/* */ } \n/* */ } \n/* */ }\n/* 4585 */ String name = pileItem.getName();\n/* 4586 */ String modelname = pileItem.getModelName();\n/* 4587 */ if (data != -1) {\n/* */ \n/* 4589 */ ItemTemplate template = ItemTemplateFactory.getInstance().getTemplate(data);\n/* 4590 */ String tname = template.getName();\n/* 4591 */ name = \"Pile of \" + template.sizeString + tname;\n/* 4592 */ if (material == 0) {\n/* 4593 */ pileItem.setMaterial(template.getMaterial());\n/* */ } else {\n/* 4595 */ pileItem.setMaterial(material);\n/* 4596 */ } StringBuilder build = new StringBuilder();\n/* 4597 */ build.append(pileItem.getTemplate().getModelName());\n/* 4598 */ build.append(tname);\n/* 4599 */ build.append(\".\");\n/* 4600 */ build.append(MaterialUtilities.getMaterialString(material));\n/* 4601 */ modelname = build.toString().replaceAll(\" \", \"\").trim();\n/* 4602 */ pileItem.setName(name);\n/* */ } \n/* */ \n/* */ \n/* 4606 */ if (!starting && this.watchers != null)\n/* */ {\n/* 4608 */ for (VirtualZone vz : getWatchers()) {\n/* */ \n/* */ \n/* */ try {\n/* 4612 */ if (vz.isVisible(pileItem, this)) {\n/* */ \n/* 4614 */ boolean onGroundLevel = true;\n/* 4615 */ if (pileItem.getFloorLevel() > 0) {\n/* 4616 */ onGroundLevel = false;\n/* */ \n/* */ }\n/* 4619 */ else if ((getFloors(0, 0)).length > 0) {\n/* 4620 */ onGroundLevel = false;\n/* */ } \n/* 4622 */ vz.addItem(pileItem, this, onGroundLevel);\n/* 4623 */ if (data != -1) {\n/* 4624 */ vz.renameItem(pileItem, name, modelname);\n/* */ }\n/* */ } \n/* 4627 */ } catch (Exception e) {\n/* */ \n/* 4629 */ logger.log(Level.WARNING, e.getMessage(), e);\n/* */ } \n/* */ } \n/* */ }\n/* 4633 */ return pileItem;\n/* */ }\n/* 4635 */ catch (FailedException fe) {\n/* */ \n/* 4637 */ logger.log(Level.WARNING, fe.getMessage(), (Throwable)fe);\n/* */ }\n/* 4639 */ catch (NoSuchTemplateException nst) {\n/* */ \n/* 4641 */ logger.log(Level.WARNING, nst.getMessage(), (Throwable)nst);\n/* */ } \n/* 4643 */ return null;\n/* */ }",
"public void act() \n {\n age += 1;\n \n RandomTerrain world = (RandomTerrain)getWorld();\n \n int centreX = getX();\n \n int leftX = centreX - WHEEL_BASE;\n int rightX = centreX + WHEEL_BASE;\n \n int leftY = world.getTerrainHeight(leftX) - WHEEL_RADIUS;\n int rightY = world.getTerrainHeight(rightX) - WHEEL_RADIUS;\n \n double angle = Math.atan2(rightY - leftY, WHEEL_BASE * 2);\n \n /*\n {\n int midY = (leftY + rightY) / 2;\n leftY = midY + (int)(-WHEEL_BASE * Math.sin(angle));\n rightY = midY + (int)(WHEEL_BASE * Math.sin(angle));\n }\n */\n \n exactX += velocity * Math.cos(Math.max(-Math.PI/4, Math.min(Math.PI/4, angle)));\n \n setLocation((int)exactX, (leftY + rightY) / 2);\n \n GreenfootImage img = new GreenfootImage(WHEEL_BASE * 3, WHEEL_BASE * 3);\n img.setColor(java.awt.Color.RED);\n \n int leftWheelX = (img.getWidth()/2) - WHEEL_BASE;\n int rightWheelX = (img.getWidth()/2) + WHEEL_BASE;\n int leftWheelY = leftY - getY() + (img.getHeight()/2);\n int rightWheelY = rightY - getY() + (img.getHeight()/2);\n \n drawWheel(img, leftWheelX, leftWheelY);\n drawWheel(img, rightWheelX, rightWheelY);\n \n int perpX = (int)(WHEEL_BASE * Math.cos(angle - Math.PI/2));\n int perpY = (int)(WHEEL_BASE * Math.sin(angle - Math.PI/2));\n \n int[] xs = new int[] {leftWheelX, leftWheelX + perpX, rightWheelX + perpX, rightWheelX};\n int[] ys = new int[] {leftWheelY, leftWheelY + perpY, rightWheelY + perpY, rightWheelY};\n \n img.fillPolygon(xs, ys, 4);\n \n setImage(img);\n \n if ((exactX < 0 && velocity < 0 )|| (exactX >= getWorld().getWidth() && velocity > 0))\n {\n getWorld().removeObject(this);\n }\n }",
"protected void execute() {\n \n \t\n \t \n \t\n \n System.out.println((Timer.getFPGATimestamp()- starttime ) + \",\" + (RobotMap.motorLeftTwo.getEncPosition()) + \",\"\n + (RobotMap.motorLeftTwo.getEncVelocity()*600)/-4096 + \",\" + RobotMap.motorRightTwo.getEncPosition() + \",\" + (RobotMap.motorRightTwo.getEncVelocity()*600)/4096);\n \n /*if(endpoint > 0){\n cruiseVelocityLeft = (float) (this.initCruiseVelocityLeft+ angleorientation.getResult());\n cruiseVelocityRight = (float) (this.initCruiseVelocityRight - angleorientation.getResult());\n }\n if(endpoint <= 0){\n cruiseVelocityLeft = (float) (this.initCruiseVelocityLeft- angleorientation.getResult());\n cruiseVelocityRight = (float) (this.initCruiseVelocityRight + angleorientation.getResult());\n }*/\n System.out.println(this.motionMagicEndPoint*4096 + RobotMap.motorLeftTwo.getEncPosition() + \"l\");\n System.out.println(this.motionMagicEndPoint*4096 - RobotMap.motorRightTwo.getEncPosition() + \"r\");\n \n \n \t if(RobotMap.motorLeftTwo.getEncVelocity()!= velocityLeft)\n velocityLeft = RobotMap.motorLeftTwo.getEncVelocity(); \n velocityRight = RobotMap.motorRightTwo.getEncVelocity();\n SmartDashboard.putNumber(\"LeftWheelError\", (this.motionMagicEndPoint*4096 + RobotMap.motorLeftTwo.getEncPosition()));\n SmartDashboard.putNumber(\"RightWheelError\",(this.motionMagicEndPoint*4096 - RobotMap.motorRightTwo.getEncPosition()));\n SmartDashboard.putNumber(\"LeftWheelVelocity\", (RobotMap.motorLeftTwo.getEncVelocity())*600/4096);\n SmartDashboard.putNumber(\"RightWheelVelocity\",(RobotMap.motorRightTwo.getEncVelocity()*600)/4096);\n \n \n count++;\n \tangleorientation.updatePID(RobotMap.navx.getAngle());\n }",
"public XYPoint getSnakeHeadStartLocation();",
"public void getGSpeedAfterJumpLand() {\n if(jumpState == JumpState.STATE_JUMP_DOWN && angle < 45) {\n groundSpeed = xSpeed;\n }\n else if(jumpState == JumpState.STATE_JUMP_DOWN && angle == 45) {\n if(Math.abs(xSpeed) > ySpeed) {\n groundSpeed = xSpeed; \n }\n else {\n groundSpeed = ySpeed*0.5*-Math.signum(Math.sin(angle));\n } \n } \n jumpState = JumpState.STATE_NOJUMP;\n springState = SpringState.STATE_NOSPRING;\n }",
"protected long getAvailableData_EM() {\n long result = 0;\n IGregTechTileEntity baseMetaTileEntity = getBaseMetaTileEntity();\n Vec3Impl pos = new Vec3Impl(baseMetaTileEntity.getXCoord(), baseMetaTileEntity.getYCoord(), baseMetaTileEntity.getZCoord());\n for (GT_MetaTileEntity_Hatch_InputData in : eInputData) {\n if (in.q != null) {\n Long value = in.q.contentIfNotInTrace(pos);\n if (value != null) {\n result += value;\n }\n }\n }\n return result;\n }",
"public static void createInfluenceMap(Spaceship predator, Spaceship prey) {\n mapWidth = Constants.screenWidth / CELL_SIZE;\n mapHeight = Constants.screenHeight / CELL_SIZE;\n influenceMap = new double[mapWidth][mapHeight];\n lowestValue = Double.MAX_VALUE;\n highestValue = -Double.MAX_VALUE;\n\n Vector2d cellCenter = new Vector2d();\n for (int y = 0; y < mapHeight; y++) {\n for (int x = 0; x < mapWidth; x++) {\n cellCenter.set(CELL_SIZE * (x + 0.5), CELL_SIZE * (y + 0.5));\n double dist = cellCenter.dist(prey.pos);\n // use exponential dropoff instead of linear dropoff\n //double value = 5 + Math.log1p(dist) * -1;\n double value = (MAX_DIST - dist)/MAX_DIST;\n influenceMap[x][y] += value;\n }\n }\n\n // go through map and establish ranges\n for (int y = 0; y < mapHeight; y++) {\n for (int x = 0; x < mapWidth; x++) {\n double value = influenceMap[x][y];\n if (value > highestValue) highestValue = value;\n if (value < lowestValue) lowestValue = value;\n }\n }\n\n }",
"private void setupEnemySpawnPoints() {\n float ring = ProtectConstants.VIEWPORT_WIDTH / 2 + (ProtectConstants.GAME_OBJECT_SIZE * 2);\n float angle = 18; // start angle\n for(int i = 1; i < ProtectConstants.COLUMNS + 1; i++){\n enemySpawnPoints.add(divideCircle(ring, angle));\n angle += 360 / ProtectConstants.COLUMNS;\n }\n enemySpawnPoints.shuffle();\n }",
"private void initiateProjectile() {\n\t}",
"public static BodyImage getWalkImage() {return walkImage;}",
"private ParticleMesh createMissileTrail() {\r\n ParticleMesh pMesh = ParticleFactory.buildParticles(\"tail\", 200,\r\n ParticleType.Quad);\r\n pMesh.setEmissionDirection(new Vector3f(1, 1, 1));\r\n pMesh.setInitialVelocity(0);\r\n pMesh.setStartSize(1f);\r\n pMesh.setEndSize(3.45f);\r\n pMesh.setMinimumLifeTime(500);\r\n pMesh.setMaximumLifeTime(500);\r\n pMesh.setStartColor(ColorRGBA.lightGray.clone());\r\n pMesh.setEndColor(ColorRGBA.black.clone());\r\n pMesh.setParticleSpinSpeed(180 * FastMath.DEG_TO_RAD);\r\n pMesh.getParticleController().setControlFlow(true);\r\n// pMesh.setReleaseRate(500);\r\n pMesh.forceRespawn();\r\n \r\n pMesh.setModelBound(new BoundingBox());\r\n pMesh.updateModelBound();\r\n pMesh.setCullHint(Spatial.CullHint.Never);\r\n\r\n // removes the missile from the scene after the particle trail has died\r\n pMesh.getParticleController().addListener(new OnDeadListener());\r\n pMesh.setRenderState(ts);\r\n pMesh.setRenderState(bs);\r\n pMesh.setRenderState(zs);\r\n \r\n missileTrails.add(pMesh);\r\n \r\n return pMesh;\r\n }",
"public float[] GetStartPosition(int playerId)\r\n/* 515: */ {\r\n/* 516:621 */ for (int x = 0; x < getWidthInTiles(); x++) {\r\n/* 517:623 */ for (int y = 0; y < getHeightInTiles(); y++) {\r\n/* 518:625 */ if (tilePlayerPlacable(x, y, playerId)) {\r\n/* 519:627 */ return new float[] { x, y };\r\n/* 520: */ }\r\n/* 521: */ }\r\n/* 522: */ }\r\n/* 523:631 */ return new float[] { 0.0F, 0.0F };\r\n/* 524: */ }",
"private void setup()\n {\n // TO STUDENTS: Add, revise, or remove methods as needed to define your own game's world\n //addLeftGround();\n //addFences();\n //addMetalPlateSteps();\n addClouds();\n addEnemy();\n addCoin();\n //addRightGround();\n // add a metal plate\n for(int i=0; i<=3; i+=1)\n {\n //location\n int x = 10 * TILE_SIZE + HALF_TILE_SIZE;\n int y = HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=3; i+=1)\n {\n //location\n int x = 11 * TILE_SIZE + HALF_TILE_SIZE;\n int y = HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=4; i+=1)\n {\n //location\n int x = 10 * TILE_SIZE + HALF_TILE_SIZE;\n int y = 10 * TILE_SIZE + HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=4; i+=1)\n {\n //location\n int x = 11 * TILE_SIZE + HALF_TILE_SIZE;\n int y = 10 * TILE_SIZE + HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=1; i+=1)\n {\n //location\n int x = 17 * TILE_SIZE + HALF_TILE_SIZE;\n int y = HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=1; i+=1)\n {\n //location\n int x = 18 * TILE_SIZE + HALF_TILE_SIZE;\n int y = HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=7; i+=1)\n {\n //location\n int x = 17 * TILE_SIZE + HALF_TILE_SIZE;\n int y = 7 * TILE_SIZE + HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=7; i+=1)\n {\n //location\n int x = 18 * TILE_SIZE + HALF_TILE_SIZE;\n int y = 7 * TILE_SIZE + HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=3; i+=1)\n {\n //location\n int x = 24 * TILE_SIZE + HALF_TILE_SIZE;\n int y = HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=3; i+=1)\n {\n //location\n int x = 25 * TILE_SIZE + HALF_TILE_SIZE;\n int y = HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=5; i+=1)\n {\n //location\n int x = 24 * TILE_SIZE + HALF_TILE_SIZE;\n int y = 10 * TILE_SIZE + HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=5; i+=1)\n {\n //location\n int x = 25 * TILE_SIZE + HALF_TILE_SIZE;\n int y = 10 * TILE_SIZE + HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=6; i+=1)\n {\n //location\n int x = 31 * TILE_SIZE + HALF_TILE_SIZE;\n int y = HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n }\n\n // add a metal plate\n for(int i=0; i<=6; i+=1)\n {\n //location\n int x = 32 * TILE_SIZE + HALF_TILE_SIZE;\n int y = HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n }\n\n // add a metal plate\n for(int i=0; i<=1; i+=1)\n {\n //location\n int x = 31 * TILE_SIZE + HALF_TILE_SIZE;\n int y = 13 * TILE_SIZE + HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=1; i+=1)\n {\n //location\n int x = 32 * TILE_SIZE + HALF_TILE_SIZE;\n int y = 13 * TILE_SIZE + HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=1; i+=1)\n {\n //location\n int x = 42 * TILE_SIZE + HALF_TILE_SIZE;\n int y = HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=1; i+=1)\n {\n //location\n int x = 43 * TILE_SIZE + HALF_TILE_SIZE;\n int y = HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=6; i+=1)\n {\n //location\n int x = 42 * TILE_SIZE + HALF_TILE_SIZE;\n int y = 8 * TILE_SIZE + HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=6; i+=1)\n {\n //location\n int x = 43 * TILE_SIZE + HALF_TILE_SIZE;\n int y = 8 * TILE_SIZE + HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=4; i+=1)\n {\n //location\n int x = 47 * TILE_SIZE + HALF_TILE_SIZE;\n int y = HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=4; i+=1)\n {\n //location\n int x = 48 * TILE_SIZE + HALF_TILE_SIZE;\n int y = HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=5; i+=1)\n {\n //location\n int x = 47 * TILE_SIZE + HALF_TILE_SIZE;\n int y = 10 * TILE_SIZE + HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=5; i+=1)\n {\n //location\n int x = 48 * TILE_SIZE + HALF_TILE_SIZE;\n int y = 10 * TILE_SIZE + HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=2; i+=1)\n {\n //location\n int x = 52 * TILE_SIZE + HALF_TILE_SIZE;\n int y = HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=2; i+=1)\n {\n //location\n int x = 53 * TILE_SIZE + HALF_TILE_SIZE;\n int y = HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=6; i+=1)\n {\n //location\n int x = 52 * TILE_SIZE + HALF_TILE_SIZE;\n int y = 8 * TILE_SIZE + HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=6; i+=1)\n {\n //location\n int x = 53 * TILE_SIZE + HALF_TILE_SIZE;\n int y = 8 * TILE_SIZE + HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n addHero();\n }",
"public String toString() {\n\t\treturn \"Missile Launcher dir = \" + this.getDirection();\n\t}",
"public void physics(double rate){\n\t\tfloat nextTop=0;\r\n\t\tif(getContained()==null){\r\n\t\t\tint year=Main.world.timeline.getTerra();\r\n\r\n\t\t\tgx=(int)Math.floor(x);\r\n\t\t\tgy=(int)Math.floor(y);\r\n\t\t\tif(gx<0){\r\n\t\t\t\tgx=0;\r\n\t\t\t}\r\n\t\t\tif(gy<0){\r\n\t\t\t\tgy=0;\r\n\t\t\t}\r\n\t\t\tMain.world.contacts(this);\r\n\t\t\tif(getTopObjects()>0){\r\n\t\t\t\ttop=getTopObjects();\r\n\t\t\t}else{\r\n\t\t\t\ttop=(Main.world.land.getHigh(year,gx,gy));\r\n\t\t\t}\r\n\r\n\t\t\tif(dx<pit){\r\n\t\t\t\tdx=pit;\r\n\t\t\t}\r\n\t\t\tif(dy<pit){\r\n\t\t\t\tdy=pit;\r\n\t\t\t}\r\n\t\t\tfloat mm=Main.level.getStats().getSize()-pit;\r\n\t\t\tif(dx>mm ){\r\n\t\t\t\tdx=mm;\r\n\t\t\t}\r\n\t\t\tif(dy>mm ){\r\n\t\t\t\tdy=mm;\r\n\t\t\t}\r\n\r\n\t\t\tnextTop=Main.world.land.getHigh(year,(int)Math.floor(dx), (int)Math.floor(dy));\r\n\t\t}else{\r\n\t\t\tfloat smx=getContained().boundsx;\r\n\t\t\tfloat smy=getContained().boundsy;\r\n\t\t\tfloat emx=getContained().boundex;\r\n\t\t\tfloat emy=getContained().boundey;\r\n\r\n\t\t\tif(dx<smx){\r\n\t\t\t\tdx=smx;\r\n\t\t\t}else if(dx>emx){\r\n\t\t\t\tdx=emx;\r\n\t\t\t}\r\n\r\n\t\t\tif(dy<smy){\r\n\t\t\t\tdy=smy;\r\n\t\t\t}else if(dy>emy){\r\n\t\t\t\tdy=emy;\r\n\t\t\t}\r\n\t\t\tgetContained().innerTouch(this);\r\n\t\t}\r\n\r\n\t\tint m=Main.level.getStats().getSize()-1;\r\n\t\tpz=z;\r\n\t\tz+=vz*rate;\r\n\t\tfloat hz=z-top;\r\n\t\tif(z<-2){\r\n\t\t\tz=-2;\r\n\t\t\tfallDamage();\r\n\t\t}\r\n\t\tif(hz>0){\r\n\t\t\tif(submerged()){\r\n\t\t\t\tvz-=UserData.getWaterGravity()*rate;\r\n\t\t\t\tif(vz<-1){\r\n\t\t\t\t\tvz=-1;\r\n\t\t\t\t}\r\n\t\t\t\tfloat zu=Main.world.land.getWaterHigh(gx,gy);\r\n\t\t\t\tfloat z1=zu;\r\n\t\t\t\tfloat z2=zu;\r\n\t\t\t\tfloat z3=zu;\r\n\t\t\t\tfloat z4=zu;\r\n\r\n\t\t\t\tif(gx>0){\r\n\t\t\t\t\tz1=Main.world.land.getWaterHigh(gx-1,gy);\r\n\t\t\t\t}\r\n\t\t\t\tif(gx<m){\r\n\t\t\t\t\tz2=Main.world.land.getWaterHigh(gx+1,gy);\r\n\t\t\t\t}\r\n\t\t\t\tif(gy>0){\r\n\t\t\t\t\tz3=Main.world.land.getWaterHigh(gx,gy-1);\r\n\t\t\t\t}\r\n\t\t\t\tif(gy<m){\r\n\t\t\t\t\tz4=Main.world.land.getWaterHigh(gx,gy+1);\r\n\t\t\t\t}\r\n\t\t\t\tif(z1>zu){\r\n\t\t\t\t\tvx+=rate;\r\n\t\t\t\t}\r\n\t\t\t\tif(z2>zu){\r\n\t\t\t\t\tvx-=rate;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(z3>zu){\r\n\t\t\t\t\tvy+=rate;\r\n\t\t\t\t}\r\n\t\t\t\tif(z4>zu){\r\n\t\t\t\t\tvy-=rate;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tvz-=UserData.getGravity()*rate;\r\n\t\t\t}\r\n\t\t\tgrounded=false;//vz>=-0.02;\r\n\t\t}else{\r\n\t\t\tif(!grounded){\r\n\t\t\t\tgrounded=true;\r\n\t\t\t\tland();\r\n\r\n\t\t\t}\r\n\t\t\tvz=0;\r\n\t\t\tz=top;\r\n\t\t}\r\n\r\n\t\tdx+=vx*rate;\r\n\t\tdy+=vy*rate;\r\n\r\n\t\tfloat sz=nextTop-z;\r\n\t\tfloat sx=(float) (rate*(dx-x)/5f);\r\n\t\tfloat sy=(float) (rate*(dy-y)/5f);\r\n\r\n\t\tif(sz<=stepHeight && Math.abs(vx)<0.01f && Math.abs(vy)<0.01f){\r\n\t\t\tpx=x;\r\n\t\t\tpy=y;\r\n\t\t\tx+=sx;\r\n\t\t\ty+=sy;\r\n\t\t}else{\r\n\t\t\tdx=x;\r\n\t\t\tdy=y;\r\n\t\t}\r\n\t\tif(Math.abs(sx)<0.006 &&Math.abs(sy)<0.006){\r\n\t\t\tmoving=false;\r\n\t\t}else{\r\n\t\t\tmoving=true;\r\n\t\t}\r\n\t}",
"public Projectile[] fire() {\r\n /*\r\n * Hint, to get a spread, second parameter to Projectile() should\r\n * be something like (i - (NUM_CANNONS / 2)) * SPREAD\r\n */\r\n \r\n\t\tProjectile[] x = new Projectile[NUM_CANNONS];\r\n\t\tPosition p = new Position(pos.getX() + InvaderShip.SHIPS_Y / 2, pos.getY() - InvaderShip.SHIPS_X / 2);\r\n\t\tx[0] = new Projectile(p, (0 - (NUM_CANNONS / 2)) * SPREAD, -PROJECTILE_SPEED, -.01 );\r\n\t\t\r\n\t\t\r\n\t\treturn null;\r\n\t}",
"public Missile(Shooter shooter, Point2D.Double start, double speed, double direction)\n {\n this.shooter = shooter;\n this.direction = direction;\n \n location = start;\n \n velocity = new Point2D.Double(-speed*Math.sin(direction), speed*Math.cos(direction));\n }",
"public void onUsingTick(ItemStack stack, EntityLivingBase player, int count) {\n/* 108 */ List<EntityItem> stuff = EntityUtils.getEntitiesInRange(player.field_70170_p, player.field_70165_t, player.field_70163_u, player.field_70161_v, player, EntityItem.class, 10.0D);\n/* */ \n/* */ \n/* 111 */ if (stuff != null && stuff.size() > 0)\n/* */ {\n/* 113 */ for (EntityItem e : stuff) {\n/* 114 */ if (!e.field_70128_L) {\n/* */ \n/* 116 */ double d6 = e.field_70165_t - player.field_70165_t;\n/* 117 */ double d8 = e.field_70163_u - player.field_70163_u + (player.field_70131_O / 2.0F);\n/* 118 */ double d10 = e.field_70161_v - player.field_70161_v;\n/* 119 */ double d11 = MathHelper.func_76133_a(d6 * d6 + d8 * d8 + d10 * d10);\n/* 120 */ d6 /= d11;\n/* 121 */ d8 /= d11;\n/* 122 */ d10 /= d11;\n/* 123 */ double d13 = 0.3D;\n/* 124 */ e.field_70159_w -= d6 * d13;\n/* 125 */ e.field_70181_x -= d8 * d13 - 0.1D;\n/* 126 */ e.field_70179_y -= d10 * d13;\n/* 127 */ if (e.field_70159_w > 0.25D) e.field_70159_w = 0.25D; \n/* 128 */ if (e.field_70159_w < -0.25D) e.field_70159_w = -0.25D; \n/* 129 */ if (e.field_70181_x > 0.25D) e.field_70181_x = 0.25D; \n/* 130 */ if (e.field_70181_x < -0.25D) e.field_70181_x = -0.25D; \n/* 131 */ if (e.field_70179_y > 0.25D) e.field_70179_y = 0.25D; \n/* 132 */ if (e.field_70179_y < -0.25D) e.field_70179_y = -0.25D; \n/* 133 */ if (player.field_70170_p.field_72995_K) {\n/* 134 */ FXDispatcher.INSTANCE.crucibleBubble((float)e.field_70165_t + (player.field_70170_p.field_73012_v\n/* 135 */ .nextFloat() - player.field_70170_p.field_73012_v.nextFloat()) * 0.2F, (float)e.field_70163_u + e.field_70131_O + (player.field_70170_p.field_73012_v\n/* 136 */ .nextFloat() - player.field_70170_p.field_73012_v.nextFloat()) * 0.2F, (float)e.field_70161_v + (player.field_70170_p.field_73012_v\n/* 137 */ .nextFloat() - player.field_70170_p.field_73012_v.nextFloat()) * 0.2F, 0.33F, 0.33F, 1.0F);\n/* */ }\n/* */ } \n/* */ } \n/* */ }\n/* */ }",
"public HeroMissile(int x,int y, int a, int b)\n {\n _startingX = x;\n _startingY = y;\n _endPointX = a;\n _endPointY = b;\n _currentX = _startingX;\n _currentY = _startingY;\n movingDistance = 1;\n distance = calcDistance(_startingX, _startingY,_endPointX,_endPointY);\n remainingDistance = 0;\n }",
"public Pile getDrawPile(){\n return piles.getDrawPile();\n }",
"public void Attack(){\n float randomx = (float)(Math.random()-0.5)*attackRange*GameView.instance.cameraSize/10;\n float randomy = (float)(Math.random()-0.5)*attackRange*GameView.instance.cameraSize/5;\n Vector2 target = GameView.instance.player.aimFor();\n float dx = target.x-creationPoint.x;\n float dy =target.y-creationPoint.y;\n float l= (float)Math.sqrt(dx*dx+dy*dy);\n dx = dx/l-((float)Math.random()-0.5f)/2;\n dy = dy/l-(float)(Math.random())/10;\n ProjectilePool.instance.shootArrow(creationPoint.x, creationPoint.y, 1, dx, dy, 3);\n }",
"public Image getWalkB(int player, boolean ep) {if (player==1) return walkB1; else return walkB2;}",
"private double getDistance() {\n\t\tfinal double h2 = 86.7;\n\t\t// h1: height of top of camera\n\t\tfinal double h1 = 17.6;\n\n\t\t// a1: angle of camera (relative to chasis)\n\t\tfinal double a1 = 36.175;\n\t\t// a2: angle of target relative to a1\n\t\tfinal double a2 = ty.getDouble(0.0);\n\n\t\t// distance: distance from camera to base of target\n\t\tfinal double distance = ((h2 - h1) / Math.tan(Math.toRadians(a1 + a2)));\n\n\t\tfinal double d = Math.sqrt(Math.pow(h2 - h1, 2) + Math.pow(distance, 2));\n\t\tSmartDashboard.putNumber(\"Py Distance\", d);\n\n\t\treturn (distance);\n\n\t}",
"private static Image getAttackPoint()\n\t{\n\t\ttry {\n\t\t\treturn ImageIO.read(new File(guiDirectory + attack));\n\t\t} catch (IOException ioe) {\n\t\t}\n\t\treturn null;\n\t}",
"@f0g\n @LauncherEventHide\n public void method_739(@NotNull f4u var1) {\n if (var1.c() == f41.field_2120 && !var1.c()) {\n if (this.c.player.dimension != 0) {\n ArrayList var2 = this.method_740();\n float var3 = 0.0F;\n Ref.ObjectRef var4 = new Ref.ObjectRef();\n var4.element = (BlockPos)null;\n float var5 = this.c.player.getHealth() + this.c.player.getAbsorptionAmount();\n BlockPos var6 = new BlockPos(this.c.player.getPositionVector());\n ArrayList var7 = new ArrayList();\n int var8 = var6.getX() - 10;\n int var9 = (int)((float)var6.getY() + this.c.player.getEyeHeight() - (float)10);\n int var10 = var6.getZ() - 10;\n int var11 = var6.getX() + 10;\n int var12 = (int)((float)var6.getY() + this.c.player.getEyeHeight() + (float)10);\n int var13 = var6.getZ() + 10;\n double var14 = ((Number)this.field_522.c()).doubleValue() * ((Number)this.field_522.c()).doubleValue();\n int var16 = var8;\n\n for(int var17 = var11; var16 < var17; ++var16) {\n int var18 = var9;\n\n for(int var19 = var12; var18 < var19; ++var18) {\n int var20 = var10;\n\n for(int var21 = var13; var20 < var21; ++var20) {\n BlockPos var22 = new BlockPos(var16, var18, var20);\n double var23 = this.c.player.posX - ((double)var22.getX() + 0.5D);\n double var25 = this.c.player.posY - ((double)var22.getY() + 0.5D) + 1.5D;\n double var27 = this.c.player.posZ - ((double)var22.getZ() + 0.5D);\n double var29 = var23 * var23 + var25 * var25 + var27 * var27;\n if (!(var29 > 36.0D) && !(var29 > var14)) {\n Block var31 = feg.method_1779(var22);\n if (!Intrinsics.areEqual((Object)var31, (Object)Blocks.AIR) && !(var31 instanceof BlockLiquid)) {\n if (var31 instanceof BlockBed) {\n float var46 = fdM.method_1882(var22, (EntityLivingBase)this.c.player);\n if (!(Boolean)this.field_523.c() || !(var46 >= var5 + (float)1)) {\n Iterator var34 = var2.iterator();\n\n while(var34.hasNext()) {\n EntityPlayer var33 = (EntityPlayer)var34.next();\n float var35 = fdM.method_1882(var22, (EntityLivingBase)var33);\n if (var35 >= var3) {\n var3 = var35;\n var4.element = var22;\n }\n }\n }\n } else if ((BlockPos)var4.element == null) {\n float[] var32 = few.method_1716().method_1736(var22, EnumFacing.UP);\n if (this.method_741(var22, var32[0])) {\n var7.add(var22);\n }\n }\n }\n }\n }\n }\n }\n\n Ref.ObjectRef var38;\n if ((BlockPos)var4.element != null) {\n var1.0();\n Ref.ObjectRef var37 = new Ref.ObjectRef();\n var37.element = few.method_1732((BlockPos)var4.element, true);\n var38 = new Ref.ObjectRef();\n var38.element = few.method_1716().method_1717((BlockPos)var4.element, (EnumFacing)var37.element);\n var1.method_3139(((fex)var38.element).method_2076().meth3());\n var1.method_3140(((fex)var38.element).method_2076().meth4());\n var1.method_3133((Consumer)(new f6k(this, var4, var37, var38)));\n } else {\n Ref.IntRef var36 = new Ref.IntRef();\n var36.element = fdX.field_1227.method_1839(Items.BED);\n if (var36.element != -1) {\n var38 = new Ref.ObjectRef();\n var38.element = (BlockPos)null;\n Iterator var41 = var7.iterator();\n\n while(true) {\n BlockPos var39;\n float var42;\n do {\n if (!var41.hasNext()) {\n if ((BlockPos)var38.element != null) {\n Ref.ObjectRef var40 = new Ref.ObjectRef();\n var40.element = few.method_1716().method_1717((BlockPos)var38.element, EnumFacing.UP);\n var1.0();\n var1.method_3139(((fex)var40.element).method_2076().meth3());\n var1.method_3140(((fex)var40.element).method_2076().meth4());\n var1.method_3133((Consumer)(new f6l(this, var36, var38, var40)));\n }\n\n return;\n }\n\n var39 = (BlockPos)var41.next();\n var42 = fdM.method_1882(var39, (EntityLivingBase)this.c.player);\n } while((Boolean)this.field_523.c() && var42 >= var5 + (float)1);\n\n Iterator var44 = var2.iterator();\n\n while(var44.hasNext()) {\n EntityPlayer var43 = (EntityPlayer)var44.next();\n float var45 = fdM.method_1882(var39, (EntityLivingBase)var43);\n if (var45 >= var3) {\n var3 = var45;\n var38.element = var39;\n }\n }\n }\n }\n }\n }\n }\n }",
"void object_calculations_touch_ground(){\n\n if (down_angle < 0 && up_angle > 0)//base case\n {\n double temp = up_angle;\n up_angle = down_angle;\n down_angle = temp;\n base_case();\n } else if ((down_angle > 0 && up_angle > 0) && (down_angle < up_angle))//smaller object\n {\n double temp = up_angle;\n up_angle = down_angle;\n down_angle = temp;\n measure_small_object();\n } else if (up_angle < 0 && down_angle > 0)//base case\n base_case();\n else //smaller object\n measure_small_object();\n }",
"private double[] genHealthAndSpeed() {\n double multiplier = genMultiplier();\n double[] healthAndSpeed = new double[2]; //0 for health, 1 for speed\n healthAndSpeed[0] = (100+currentDifficulty)*multiplier;\n healthAndSpeed[1] = 2*(1+(1-multiplier));\n return healthAndSpeed;\n }",
"private static float[] findNewPosition(Cell cell){\n int cA = cell.angleInDegree+90;\n cA = (cA>360) ? cA-360 : (cA<0) ? cA+360 : cA;\n angs[0] = cA;\n angs[1] = (cA+180>360) ? cA+180-360 : (cA+180<0) ? cA+180+360 : cA+180;\n\n //define position of new cell based on angle\n float angRad = (float) Math.toRadians(angs[1]);\n pos[0]=(float) (cell.x+2*Pars.rad*(Math.cos(angRad)));\n pos[1]=(float) (cell.y+2*Pars.rad*(Math.sin(angRad)));\n\n //check that cell in not outside of tissue\n int hX=Functions.getHexCoordinates('x',pos[0], pos[1],Pars.numPointsW,Pars.numPointsH,Pars.hexSide,Pars.hexDiag);\n int hY=Functions.getHexCoordinates('y',pos[0], pos[1],Pars.numPointsW,Pars.numPointsH,Pars.hexSide,Pars.hexDiag);\n while(Field.noMatter[hX][hY]){\n //if outside of tissue, try another angle\n cA=diceRoller.nextInt(360);\n angs[0] = cA;\n angs[1] = (cA+180>360) ? cA+180-360 : (cA+180<0) ? cA+180+360 : cA+180;\n\n //redefine cell position\n angRad = (float) Math.toRadians(angs[1]);\n pos[0]=(float) (cell.x+2*Pars.rad*(Math.cos(angRad)));\n pos[1]=(float) (cell.y+2*Pars.rad*(Math.sin(angRad)));\n\n //update hex mesh point to check within tissue\n hX=Functions.getHexCoordinates('x',pos[0], pos[1],Pars.numPointsW,Pars.numPointsH,Pars.hexSide,Pars.hexDiag);\n hY=Functions.getHexCoordinates('y',pos[0], pos[1],Pars.numPointsW,Pars.numPointsH,Pars.hexSide,Pars.hexDiag);\n }\n\n return pos;\n }",
"public Projectile getArrow() {\r\n return entity;\r\n }",
"public void execute() {\n\t\tdouble xPos = lateralDrive + axialDrive * DimensionConstants.ROBOT_WIDTH_TO_DIAGONAL_RATIO;\n\t\tdouble xNeg = lateralDrive - axialDrive * DimensionConstants.ROBOT_WIDTH_TO_DIAGONAL_RATIO;\n\t\tdouble yPos = longitudinalDrive + axialDrive * DimensionConstants.ROBOT_LENGTH_TO_DIAGONAL_RATIO;\n\t\tdouble yNeg = longitudinalDrive - axialDrive * DimensionConstants.ROBOT_LENGTH_TO_DIAGONAL_RATIO;\n\t\t\n\t\tdouble fld = MathUtilities.magnitude(xPos, yPos);\n\t\tdouble frd = MathUtilities.magnitude(xPos, yNeg);\n\t\tdouble bld = MathUtilities.magnitude(xNeg, yPos);\n\t\tdouble brd = MathUtilities.magnitude(xNeg, yNeg);\n\t\t\n\t\tdouble m = Math.max(MathUtilities.magnitude(lateralDrive, longitudinalDrive), Math.abs(axialDrive));\n\t\tdouble sx1, sy1, sx2;\n\t\tif (m != 0) {\n\t\t\tsx1 = lateralDrive/m;\n\t\t\tsy1 = longitudinalDrive/m;\n\t\t\tsx2 = axialDrive/m;\n\t\t}\n\t\telse {\n\t\t\tsx1 = 0;\n\t\t\tsy1 = 0;\n\t\t\tsx2 = 0;\n\t\t}\n\t\t\n\t\tdouble maxMag = MathUtilities.magnitude(Math.abs(sx1) + DimensionConstants.ROBOT_WIDTH_TO_DIAGONAL_RATIO*Math.abs(sx2),\n\t\t\t\tMath.abs(sy1) + DimensionConstants.ROBOT_LENGTH_TO_DIAGONAL_RATIO*Math.abs(sx2));\n\t\t\n\t\tif (maxMag != 0) {\n\t\t\tfld /= maxMag;\n\t\t\tfrd /= maxMag;\n\t\t\tbld /= maxMag;\n\t\t\tbrd /= maxMag;\n\t\t}\n\t\telse {\n\t\t\tfld = 0;\n\t\t\tfrd = 0;\n\t\t\tbld = 0;\n\t\t\tbrd = 0;\n\t\t}\n\t\t\n\t\tdouble fls = MathUtilities.angle(xPos, yPos);\n\t\tdouble frs = MathUtilities.angle(xPos, yNeg);\n\t\tdouble bls = MathUtilities.angle(xNeg, yPos);\n\t\tdouble brs = MathUtilities.angle(xNeg, yNeg);\n\t\t\n\t\tif((lateralDrive == 0 && longitudinalDrive == 0 && axialDrive == 0)){\n\t\t\tfls = flPivot.getTargetAngle();\n\t\t\tfrs = frPivot.getTargetAngle();\n\t\t\tbls = blPivot.getTargetAngle();\n\t\t\tbrs = brPivot.getTargetAngle();\n\t\t}\n\t\t\n\t\tsteerStrat.setFLDirection(fls);\n\t\tsteerStrat.setFRDirection(frs);\n\t\tsteerStrat.setBLDirection(bls);\n\t\tsteerStrat.setBRDirection(brs);\n\n\t\tdriveStrat.setFLDrive(fld);\n\t\tdriveStrat.setFRDrive(frd);\n\t\tdriveStrat.setBLDrive(bld);\n\t\tdriveStrat.setBRDrive(brd);\n\t\t\n\t\tsteerStrat.execute();\n\t\tdriveStrat.execute();\n\t}",
"public Coords getJumpPathHighestPoint() {\n Coords highestCoords = null;\n int highestElevation = 0;\n for (MoveStep step : steps) {\n if (getGame().getBoard().getHex(step.getPosition()).getLevel() > highestElevation) {\n highestElevation = step.getElevation();\n highestCoords = step.getPosition();\n }\n }\n return highestCoords;\n }",
"public void displayUtilities() {\n double utility;\n int noOfRows = environment.getRows();\n int noOfColumns = environment.getColumns();\n\n for (int i = 0; i < noOfRows; i++) {\n for (int j = 0; j < noOfColumns; j++) {\n if(!environment.getTile(i, j).getTileType().equals(\"WALL\")) {\n utility = environmentUtilities[i][j].getUtility();\n System.out.println(\"(\"+i+\",\"+j+\")\"+utility);\n }\n }\n }\n }",
"protected IProjectile getProjectileEntity(World par1World, IPosition par2IPosition)\n {\n \tEntityBrick brick = new EntityBrick(par1World, par2IPosition.getX(), par2IPosition.getY(), par2IPosition.getZ());\n \tbrick.dispensed = true;\n \treturn brick; \n }",
"ArrayList<Integer> getStepCounterTileY();",
"ILogo getMugShot();",
"private Alien3 shootbottom() {\n\t\tAlien3 shooter = alien3[choose()];\n\t\tif (shooter == null) return shootbottom();\n\t\telse if (shooter.Destroyed) return shootbottom();\n\t\telse return shooter;\n\t}",
"private int inputMap(Identifier id, float data)\n\t{\n\t\tif (id == Axis.RX)\n\t\t{\n\t\t\tif (linearityX == 1)\n\t\t\t{\n\n\t\t\t\tint testValue = (int) (Math.pow(data, 3) * 1000);\n\t\t\t\tif (Math.abs(data) < zone)\n\t\t\t\t\treturn 0;\n\t\t\t\telse\n\t\t\t\t\treturn testValue;\n\t\t\t} else\n\t\t\t{\n\t\t\t\tif (Math.abs(data) < zone)\n\t\t\t\t\treturn 0;\n\t\t\t\telse\n\t\t\t\t\treturn (int) (data * 1000);\n\t\t\t}\n\n\t\t} else if (id == Axis.RY)\n\t\t{\n\t\t\t// Right Stick Up and Down\n\t\t\tif (linearityY == 1)\n\t\t\t{\n\t\t\t\tint testValue = (int) (Math.pow(data, 3) * 1000);\n\t\t\t\tif (Math.abs(data) < zone)\n\t\t\t\t\treturn 0;\n\t\t\t\telse\n\t\t\t\t\treturn testValue;\n\t\t\t} else\n\t\t\t{\n\t\t\t\tif (Math.abs(data) < zone)\n\t\t\t\t\treturn 0;\n\t\t\t\telse\n\t\t\t\t\treturn (int) (data * 1000);\n\t\t\t}\n\t\t} else if (id == Axis.Z)\n\t\t{\n\t\t\t// Right Stick Up and Down\n\t\t\tif (linearityZ == 1)\n\t\t\t{\n\t\t\t\tint testValue = (int) (Math.pow(data, 3) * 1000);\n\t\t\t\tif (Math.abs(data) < zone)\n\t\t\t\t\treturn 0;\n\t\t\t\telse\n\t\t\t\t\treturn testValue;\n\t\t\t} else\n\t\t\t{\n\t\t\t\tif (Math.abs(data) < zone)\n\t\t\t\t\treturn 0;\n\t\t\t\telse\n\t\t\t\t\treturn (int) (data * 1000);\n\t\t\t}\n\t\t} else if (id == Axis.X)\n\t\t{\n\t\t\t// Right Stick Up and Down\n\t\t\tif (linearityX == 1)\n\t\t\t{\n\t\t\t\tint testValue = (int) (Math.pow(data, 3) * 1000);\n\t\t\t\tif (Math.abs(data) < zone)\n\t\t\t\t\treturn 0;\n\t\t\t\telse\n\t\t\t\t\treturn testValue;\n\t\t\t} else\n\t\t\t{\n\t\t\t\tif (Math.abs(data) < zone)\n\t\t\t\t\treturn 0;\n\t\t\t\telse\n\t\t\t\t\treturn (int) (data * 1000);\n\t\t\t}\n\t\t} else if (id == Axis.Y)\n\t\t{\n\t\t\t// Right Stick Up and Down\n\t\t\tif (linearityY == 1)\n\t\t\t{\n\t\t\t\tint testValue = (int) (Math.pow(data, 3) * 1000);\n\t\t\t\tif (Math.abs(data) < zone)\n\t\t\t\t\treturn 0;\n\t\t\t\telse\n\t\t\t\t\treturn testValue;\n\t\t\t} else\n\t\t\t{\n\t\t\t\tif (Math.abs(data) < zone)\n\t\t\t\t\treturn 0;\n\t\t\t\telse\n\t\t\t\t\treturn (int) (data * 1000);\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}",
"private double[] camerr(double r, int ibody){\r\n\t\t//% Range from Earth in m\r\n\t\t//double[] erange= {1069177850, 213835570, 71278520, 21383560, 13364720};\r\n\t\tdouble[] erange= {0,0,13364720,21383560,71278520,213835570,1069177850};\r\n\t\t//VectorN erange = new VectorN(erange_tmp);\r\n\t\t\r\n\t\t//% Range from Moon in m\r\n\t\t//double[] mrange = {291342820, 58268560, 19422850, 5826860, 3641790};\r\n\t\tdouble[] mrange = {1788000,1838000, 3641790,5826860,19422850,58268560,291342820};\r\n\t\t//VectorN mrange = new VectorN(mrange_tmp);\r\n\t\t\r\n\t\tdouble[] rv = new double[5];\r\n\t\tif (ibody == BODY_EARTH) //% Earth\r\n\t\t\trv=erange;\r\n\t\telse if (ibody == BODY_MOON) // % Moon\r\n\t\t\trv=mrange;\r\n\t\telse\r\n\t\t\tSystem.err.println(\"Invalid body flag\");\r\n\t\t\r\n\t\t\r\n\t\t//double[] angerr_rnd_deg= {0.0022, 0.011, 0.032, 0.105, 0.169};\r\n\t\tdouble[] angerr_rnd_deg= {0.47,0.44,0.169,0.105,0.032,0.011,0.0022};\r\n\t\t//double[] angerr_bias_deg= {biasflag*0.0046, biasflag*0.023, biasflag*0.070, biasflag*0.235, biasflag*0.375};\r\n\t\tdouble[] angerr_bias_deg= {biasflag*1.055,biasflag*0.98, biasflag*0.375,biasflag*0.235,biasflag*0.070,biasflag*0.023,biasflag*0.0046};\r\n\t\t\r\n\t\t//% Apollo numbers corresponding to 3km horizon sensing error\r\n\t\t//%angerr_rnd_deg= [ 0.0002 0.0008 0.0024 0.0080 0.0129]';\r\n\t\t\r\n\t\t//% Interpolate/extrapolate based on actual range\r\n\t\tInterpolator interp1 = new Interpolator(rv,angerr_rnd_deg);\r\n\t\tdouble arnd=MathUtils.DEG2RAD*(interp1.get_value(r));//interp1(rv,angerr_rnd_deg,r,'linear','extrap')*pi/180;\r\n\t\tinterp1 = new Interpolator(rv,angerr_bias_deg);\r\n\t\tdouble abias=MathUtils.DEG2RAD*(interp1.get_value(r));//interp1(rv,angerr_bias_deg,r,'linear','extrap')*pi/180;\r\n\t\t//*TODO watch this\r\n\t\t//arnd = 0;\r\n\t\tabias = 0;\r\n\t\tdouble[] out = {arnd, abias};\r\n\t\treturn out;\r\n\t}",
"public static byte[] getGoalTiles() {\n return GOAL_TILES;\n }",
"private void fetchTile() {\n\t\t\tif (tile.getRequest().isCancelled() || tile.isFinal()) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tMapSource source = tile.getRequest().getSource();\n\t\t\tProjObj proj = tile.getRequest().getProjection();\n\t\t\tfinal int ppd = tile.getRequest().getPPD();\n\t\t\t\n\t\t\tfor (int fuzzyPPD = ppd/2 ; fuzzyPPD > 1 ; fuzzyPPD /= 2){\t\t\t\t\n\t\t\t\tint ratio = ppd / fuzzyPPD;\n\t\t\t\t\n\t\t\t\t// A tile has 256 pixels on a side.\n\t\t\t\t// Using this method, we can't upscale data to be fuzzy if it's more than 256 times larger \n\t\t\t\t// than the area we are looking to fill. Upscaling data more than 16 times seems unlikely to provide\n\t\t\t\t// any real benefit to the user, so we will quit our search at this point\n\t\t\t\tif (ratio>16) break;\n\t\t\t\t\n\t\t\t\tString tileName = CacheManager.getTileName(\n\t\t\t\t\tsource.getName(), proj, fuzzyPPD,\n\t\t\t\t\ttile.getXtile()/ratio, tile.getYtile()/ratio,\n\t\t\t\t\tsource.hasNumericKeyword());\n\t\t\t\t\n\t\t\t\tBufferedImage tileImage = CacheManager.getTile(source, tileName);\n\t\t\t\t\n\t\t\t\tif (tileImage==null) {\t\t\t\t\t\t\t\t\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tint xtileindex = tile.getXtile() % ratio;\n\t\t\t\tint ytileindex = ratio - (tile.getYtile() % ratio) - 1;\n\t\t\t\t\n\t\t\t\tdouble fuzzyxstep = MapRetriever.tiler.getPixelWidth() / ratio;\n\t\t\t\tdouble fuzzyystep = MapRetriever.tiler.getPixelHeight() / ratio;\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\ttileImage = tileImage.getSubimage((int)(xtileindex * fuzzyxstep), (int)(ytileindex * fuzzyystep), (int)fuzzyxstep, (int)fuzzyystep);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tlog(e);\n\t\t\t\t\tlog(\"xtileindex:\"+xtileindex+\" fuzzyxstep:\"+fuzzyxstep+\" ytileindex:\"+ytileindex+\" fuzzyystep:\"+fuzzyystep);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tlong outputImageSize = (tileImage.getWidth()*ratio)*(tileImage.getHeight()*ratio);\n\t\t\t\tif (outputImageSize <= 0 || outputImageSize > Integer.MAX_VALUE){\n\t\t\t\t\tlog(\"Scaling tile from \"+fuzzyPPD+\" to \"+ppd+\" will result in image size overflow.\"+\n\t\t\t\t\t\t\t\" Stopping further search for lower PPDs for this tile.\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttileImage = CacheManager.scaleImage(tileImage, ratio);\n\t\t\t\t\n\t\t\t\tmyRetriever.fuzzyResponse(tile, tileImage);\n\t\t\t}\t\t\t\t\t\t\n\t\t}",
"private static void runNeedleSimulation() {\n\t\tint iterations = numbersOfIterations(new Scanner(System.in));\n\t\tint hits = needleSimulation(iterations);\n\t\tdouble pi = piCalculation(iterations, hits);\n\t\tSystem.out.println(pi);\n\t\t\n\t\t\n\t}",
"private void doCircle()\n\t{\n\t\tubisenseData = new UbisenseMockupData();\n\t\tDecimalFormat df = new DecimalFormat(\"#0,00\");\n\n\t\telapsedTime = 0;\n\t\t\n\t\tubisenseData.setTagID(Helper.DEFAULT_TAG_ID);\n\t\tubisenseData.setUnit(Helper.UBISENSE_UNIT);\n\t\tubisenseData.setOntology(Helper.LP_ONTOLOGY_URL);\n\t\tubisenseData.setVersion(Helper.UBISENSE_VERSION);\n\t\tubisenseData.setId(\"\");\n\t\tubisenseData.setSendTime(sendTime);\n\n\t\tlong millis = startDate.getMillis();\n\t\tmillis += offset.toStandardDuration().getMillis();\n//\t\tmillis += parentOffset.toStandardDuration().getMillis();\n\t\t\n\t\t//Radianten des Winkels berechnen\n\t\tdouble radiant = Math.toRadians(arc);\n\t\t\n\t\t// Distanz d berechnen, die auf dem Kreis zurückgelegt werden soll\n\t\tdouble d = Math.PI * radius * (arc / 180);\n\t\t\n\t\t// Zeit t [s] berechnen, die für die Distanz d unter gegebener Geschwindigkeit benötigt wird.\n\t\tdouble t = d / toolSpeed;\n\t\tdouble steps = Math.ceil(t) +1;\n\n\t\t//Startkoordinaten berechnen\n\t\tint startX, startY;\n\t\tstartX = x1;\n\t\tstartY = y1 + radius;\n\t\t\n\t\twhile(steps > 0 && !terminate)\n\t\t{\n\t\t\tdouble x,y, currentTime=0, currentArc = 0;\n\t\t\tif (t != 0)\n\t\t\tcurrentTime = elapsedTime / t;\n\n\t\t\tcurrentArc = radiant * currentTime;\n\t\t\t\n\t\t\tx = (startX - x1) * Math.cos(currentArc) - (startY - y1) * Math.sin(currentArc) + x1;\n\t\t\ty = (startX - x1) * Math.sin(currentArc) + (startY - y1) * Math.cos(currentArc) + y1;\n\n\t\t\tubisenseData.setPosition(new Point3D(\tDouble.parseDouble(df.format(x)),\n\t\t\t \tDouble.parseDouble(df.format(y)),\n\t\t\t\t\t\t\t\t\t\t\t\t\t1.6));\n\t\t\tubisenseData.setId(String.valueOf(Helper.getRandomInt()));\n\t\t\tubisenseData.setTime(millis + (long) (elapsedTime*SLEEP_INTERVAL));\n\t\t\t\n\t\t\tEntryEvent event = new EntryEvent(this);\n\t\t\tnotifyListeners(event);\n\t\t\telapsedTime++;\n\t\t\tif (elapsedTime > t)\n\t\t\t\telapsedTime = t;\n\t\t\t\n\t\t\tsteps--;\n\t\t\ttry\n\t\t\t{\n\t\t\t\tif (speed > 0)\n\t\t\t\t\tThread.sleep(SLEEP_INTERVAL/speed);\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}\n\t}",
"public gameWorld()\n { \n // Create a new world with 600x600 cells with a cell size of 1x1 pixels.\n super(600, 600, 1); \n \n addObject(new winSign(), 310, 300);\n addObject(new obscureDecorative(), 300, 400);\n addObject(new obscureDecorative(), 300, 240);\n \n for(int i = 1; i < 5; i++) {\n addObject(new catchArrow(i * 90), 125 * i, 100);\n }\n for (int i = 0; i < 12; i++) {\n addObject(new damageArrowCatch(), 50 * i + 25, 50); \n }\n \n \n //Spawning Interval\n\n if(timerInterval >= 10) {\n arrowNumber = Greenfoot.getRandomNumber(3);\n }\n if(arrowNumber == 0) {\n addObject(new upArrow(directionOfArrow[0], imageOfArrow[0]), 125, 590);\n arrowNumber = 5;\n }\n if(arrowNumber == 1) {\n addObject(new upArrow(directionOfArrow[1], imageOfArrow[1]), 125 * 2, 590);\n arrowNumber = 5;\n }\n if(arrowNumber == 2) {\n addObject(new upArrow(directionOfArrow[2], imageOfArrow[2]), 125 * 3, 590);\n arrowNumber = 5;\n }\n if( arrowNumber == 3) {\n addObject(new upArrow(directionOfArrow[3], imageOfArrow[3]), 125 * 4, 590);\n arrowNumber = 5;\n }\n \n \n\n \n }",
"double getStartH();",
"public static void main(String[] args) {\r\n\t\t//double lat = 36.149 + (0.001 * Math.random());\r\n\t\t//double lon = -86.800 + (0.001 * Math.random());\r\n\t\t\r\n\t\t// Note: The game area must already be set for this to work!\r\n\t\t\r\n\t\t// This puts a land mine in the middle of the parking lot\r\n\t\t// between ISIS and 21st.\r\n\t\tdouble lat = 36.14923059940338;\r\n\t\tdouble lon = -86.79988324642181;\r\n\t\tdouble rad = 5.0;\r\n\t\tLandMine lm = new LandMine(lat, lon, rad);\r\n\t\t//doLandMinePost(lm);\r\n\t\tdoLandMineRemove(lm);\r\n\t}",
"@Override\n\tprotected void execute() {\n\t\tdouble speed = Robot.oi.getSpeed();\n\t\tdouble turn = Robot.oi.getTurn();\n\t\tdouble leftSpeed;\n\t\tdouble rightSpeed;\n\n\t\tif (Robot.oi.getGyroReset()) {\n\t\t\tRobot.chassisSubsystem.resetGyroHeading();\n\t\t}\n\n\t\tif (Robot.oi.getGyroCalibrate()) {\n\t\t\tRobot.chassisSubsystem.calibrateGyro();\n\t\t}\n\n\t\t/**\n\t\t * If the chassisSubsystem says that we should be in high gear, switch\n\t\t * to high gear, otherwise, switch to low gear.\n\t\t */\n\t\tif (Robot.oi.getGearShiftButton() >= 0.5) {\n\t\t\tRobot.chassisSubsystem.setGear(Gear.HIGH);\n\t\t} else {\n\t\t\tRobot.chassisSubsystem.setGear(Gear.LOW);\n\t\t}\n\n\t\t\n\n\t\t/**\n\t\t * If the user is not turning, then follow the gyro using the GoStraight\n\t\t * command.\n\t\t */\n\t\t/*\n\t\t * if (Math.abs(turn) < 0.03) { Scheduler.getInstance().add(new\n\t\t * GoStraightCommand(Robot.chassisSubsystem.getCurrentAngle())); return;\n\t\t * }\n\t\t */\n\n\t\t/*\n\t\t * double defaultValue = 0; Robot.chassisSubsystem.resetGyroHeading();\n\t\t * double angle = Robot.oi.table.getNumber(\"angle\", defaultValue);\n\t\t * System.out.println(angle);\n\t\t * \n\t\t * if(Robot.oi.getAlignShotButton()) { Scheduler.getInstance().add(new\n\t\t * PivotToAngleCommand(angle)); return; }\n\t\t */\n\n\n\t\tdouble targetCenterX = 0;\n\t\tif (Robot.oi.getAutoAlignShotButton() && targetCenterX != RobotMap.NO_VISION_TARGET) {\n\t\t\tScheduler.getInstance().add(new AlignAndShootHighShotCommand(MatchPeriod.TELEOP));\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (Robot.oi.getManualAlignShotButton()) {\n\t\t\tScheduler.getInstance().add(new AlignAndShootHighShotCommand(MatchPeriod.TELEOP));\n\t\t\treturn;\n\t\t}\n\n\t\t// Use the driver input to set the speed and direction.\n\t\tif (Math.abs(speed) < 0.03) {\n\t\t\tleftSpeed = turn / 2.0;\n\t\t\trightSpeed = -turn / 2.0;\n\t\t} else {\n\t\t\tleftSpeed = (turn < 0.0) ? speed * (1.0 + turn) : speed;\n\t\t\trightSpeed = (turn < 0.0) ? speed : speed * (1.0 - turn);\n\t\t}\n\n\t\tRobot.chassisSubsystem.setSpeed(leftSpeed, rightSpeed);\n\t}",
"public int getGotoFloor();",
"public BattleSimulator findBattle(){\r\n\r\n List<Enemy> enemies = world.getEnemies();\r\n Character character = world.getCharacter();\r\n List<MovingEntity> activeStructures = world.getActiveStructures();\r\n List<MovingEntity> friendlyEntities = world.getFriendlyEntities();\r\n List<Ally> allies = world.getAllies();\r\n\r\n\r\n // Create potentialFighting list which begins with all enemies in the world\r\n ArrayList<MovingEntity> potentialFighting = new ArrayList<MovingEntity>(enemies);\r\n ArrayList<MovingEntity> fighters = new ArrayList<MovingEntity>();\r\n List<Pair<MovingEntity, Double>> pairEnemyDistance = new ArrayList<Pair<MovingEntity, Double>>();\r\n ArrayList<MovingEntity> structures = new ArrayList<MovingEntity>();\r\n\r\n // For each enemy in potentialFighting, find the distance from enemy to character \r\n // If character is in battle radius of enemy, add enemy to a pairEnemyDistance list, remove them from potentialFighting list\r\n for(MovingEntity enemy: enemies) {\r\n double distanceSquaredBR = inRangeOfCharacter(character, enemy, enemy.getBattleRadius());\r\n if(distanceSquaredBR >= 0){\r\n potentialFighting.remove(enemy);\r\n Pair<MovingEntity, Double> pairEnemy = new Pair<MovingEntity, Double>(enemy, distanceSquaredBR);\r\n pairEnemyDistance.add(pairEnemy);\r\n }\r\n }\r\n // if no enemies within battle radius, no battle happens\r\n if (pairEnemyDistance.size() == 0) {\r\n return null;\r\n \r\n // else a battle is about to begin!!!\r\n } else if(pairEnemyDistance.size() > 0) {\r\n // For remaining enemies in potentialFighting list, if fighters list size > 0 and if character is in support radius of that enemy\r\n // also add that enemy to pairEnemyDistance list\r\n for(MovingEntity enemy : potentialFighting){\r\n double distanceSquaredSR = inRangeOfCharacter(character, enemy, enemy.getSupportRadius());\r\n if(distanceSquaredSR >= 0){\r\n Pair<MovingEntity, Double> pairEnemy = new Pair<MovingEntity, Double>(enemy, distanceSquaredSR);\r\n pairEnemyDistance.add(pairEnemy);\r\n }\r\n }\r\n }\r\n\r\n // Sort pairEnemyDistance list by distance of enemy to character, so that the closest enemy is first, the furthest enemy is last\r\n Collections.sort(pairEnemyDistance, new Comparator<Pair<MovingEntity, Double>>() {\r\n @Override\r\n public int compare(final Pair<MovingEntity, Double> p1, final Pair<MovingEntity, Double> p2) {\r\n if(p1.getValue1() > p2.getValue1()) {\r\n return 1;\r\n } else {\r\n return -1;\r\n }\r\n }\r\n });\r\n\r\n // Take all enemies from sorted pairEnemyDistance and add to fighters list\r\n for(Pair<MovingEntity, Double> pairEnemy : pairEnemyDistance) {\r\n fighters.add(pairEnemy.getValue0());\r\n }\r\n \r\n // For each tower, find the distance from tower to character\r\n // If character is in the support radius of tower, add tower to structure list\r\n if(activeStructures.size() > 0){\r\n for(MovingEntity structure : activeStructures) {\r\n if(structure.getID().equals(\"TowerBattler\")) {\r\n double distanceSquaredSR = inRangeOfCharacter(character, structure, structure.getSupportRadius());\r\n if(distanceSquaredSR >= 0){\r\n structures.add(structure);\r\n }\r\n }\r\n }\r\n }\r\n // If character is in the support radius of friendly entities, add to fighters\r\n if(friendlyEntities.size() > 0){\r\n for(MovingEntity friendly : friendlyEntities) {\r\n double distanceSquaredSR = inRangeOfCharacter(character, friendly, friendly.getSupportRadius());\r\n if(distanceSquaredSR >= 0){\r\n fighters.add(friendly);\r\n }\r\n }\r\n }\r\n \r\n // Add all allies to fighters list\r\n for(Ally ally : allies) {\r\n fighters.add(ally);\r\n }\r\n\r\n // Construct BattleSimulator class with character, fighters, structures\r\n BattleSimulator battle = new BattleSimulator(character, fighters, structures);\r\n\r\n // battle is about to begin!\r\n return battle;\r\n }",
"protected void execute() {\r\n // read inputs\r\n double h_cmd = heightCmdFunct.getAsDouble(); //height above floor inches\r\n double l_cmd = extCmdFunct.getAsDouble(); //length from from pivot\r\n\r\n // If target is below pivot height, used for quadrant calcs\r\n boolean belowPiv = h_cmd < pivotHeight;\r\n h = Math.abs(pivotHeight - h_cmd); //h (inches) above or below piviot in mag\r\n \r\n //Roughly limit the extension based on game limits and robot geometry\r\n xProjection = MathUtil.limit(l_cmd, Robot.arm.MIN_PROJECTION, Robot.arm.MAX_PROJECTION);\r\n\r\n double tanRatio = (belowPiv) ? h / xProjection : xProjection / h;\r\n // Rotate to maintain height as projection changes\r\n double angle = Math.toDegrees(Math.atan(tanRatio));\r\n angle -= (belowPiv) ? 90.0 : 0.0;\r\n\r\n angle = MathUtil.limit(angle, Robot.arm.PHI_MIN, Robot.arm.PHI_MAX); \r\n \r\n double projLen= Math.sqrt( h*h + xProjection * xProjection); //total length of arm, from pivot point\r\n double ext = projLen - (Robot.arm.ARM_BASE_LENGTH + Robot.arm.WRIST_LENGTH); // extension required\r\n \r\n double compLen = Robot.arm.getCompLen(angle);\r\n\r\n //limit within range, TODO: do we need to account for phi/ext interaction here?\r\n ext = MathUtil.limit(ext, Robot.arm.EXTEND_MIN, Robot.arm.EXTEND_MAX);\r\n\r\n // Extend to allow for change in projection\r\n Robot.arm.setExtension(ext); //absolute ext needed projection\r\n Robot.arm.setAngle(angle); //angle required for height\r\n /*\r\n * Alternative extension calculation xProjection /\r\n * Math.cos(Robot.arm.getAngle()) - armInitialLength\r\n */\r\n }",
"public void SpiritBomb()\r\n {\r\n\r\n\t \r\n\t\tLocation loc = new Location(userRow+1, userCol);\r\n\t\tLocation loc1 = new Location(userRow+1, userCol1);\r\n\t\tLocation loc2 = new Location(userRow+1, userCol2);\r\n\t\tLocation loc3 = new Location(userRow+1, userCol3);\r\n\t\t\r\n\t\tLocation loc4 = new Location(userRow, userCol);\r\n\t\tLocation loc5 = new Location(userRow, userCol1);\r\n\t\tLocation loc6 = new Location(userRow, userCol2);\r\n\t\tLocation loc7 = new Location(userRow, userCol3);\r\n\t\t\r\n\t\tLocation loc8 = new Location(userRow-1, userCol);\r\n\t\tLocation loc9 = new Location(userRow-1, userCol1);\r\n\t\tLocation loc10 = new Location(userRow-1, userCol2);\r\n\t\tLocation loc11 = new Location(userRow-1, userCol3);\r\n\t\t\r\n\t\tLocation loc12 = new Location(userRow-2, userCol);\r\n\t\tLocation loc13= new Location(userRow-2, userCol1);\r\n\t\tLocation loc14 = new Location(userRow-2, userCol2);\r\n\t\tLocation loc15 = new Location(userRow-2, userCol3);\r\n\r\n\t \r\n\r\n\r\n\r\n\t\t\r\n\t\tLocation base1 = new Location(userRow,0);\r\n\t\t\r\n\t\t\tgrid.setImage(base1, \"FSpiritHold.png\");\r\n\t\t\t\r\n\t\tfor(int a = 0; a<9; a++) {\r\n\t\tif(userCol>0 && userCol3 !=15 && userCol2!=15 && userCol1!=15 && userCol!=15 && userRow>0)\r\n\t\t{\r\n\t\r\n\t\t\t Location next101 = new Location(userRow+1,userCol);\r\n\t\t\t Location next102 = new Location(userRow+1,userCol1);\r\n\t\t\t Location next103 = new Location(userRow+1,userCol2);\r\n\t\t\t Location next104 = new Location(userRow+1,userCol3);\r\n\r\n\t\t\t\tLocation next201 = new Location(userRow,userCol);\r\n\t\t\t\tLocation next202 = new Location(userRow,userCol1);\r\n\t\t\t\tLocation next203 = new Location(userRow,userCol2);\r\n\t\t\t\tLocation next204 = new Location(userRow,userCol3);\r\n\t\t\t\t\r\n\t\t\t\tLocation next301 = new Location(userRow-1,userCol);\r\n\t\t\t\tLocation next302 = new Location(userRow-1,userCol1);\r\n\t\t\t\tLocation next303 = new Location(userRow-1,userCol2);\r\n\t\t\t\tLocation next304 = new Location(userRow-1,userCol3);\r\n\t\t\t\t\r\n\t\t\t Location next401 = new Location(userRow-2,userCol);\r\n\t\t\t Location next402 = new Location(userRow-2,userCol1);\r\n\t\t\t Location next403 = new Location(userRow-2,userCol2);\r\n\t\t\t Location next404 = new Location(userRow-2,userCol3);\r\n\t\t\t userCol+=1;\r\n\t\t\t userCol1+=1;\r\n\t\t\t\tuserCol2+=1;\r\n\t\t\t\tuserCol3+=1;\r\n\t\t\t grid.setImage(next101, \"SB401.png\");\r\n\t\t\t grid.setImage(loc1, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next102, \"SB402.png\");\r\n\t\t\t grid.setImage(loc2, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next103, \"SB403.png\");\r\n\t\t\t grid.setImage(loc2, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next104, \"SB404.png\");\r\n\t\t\t grid.setImage(loc3, null);\r\n\r\n\t\t\t\t\r\n\t\t\t\tgrid.setImage(next201, \"SB301.png\");\r\n\t\t\t grid.setImage(loc4, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next202, \"SB302.png\");\r\n\t\t\t grid.setImage(loc5, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next203, \"SB303.png\");\r\n\t\t\t grid.setImage(loc6, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next204, \"SB304.png\");\r\n\t\t\t grid.setImage(loc7, null);\r\n\r\n\t\t\t\t\r\n\t\t\t\tgrid.setImage(next301, \"SB201.png\");\r\n\t\t\t grid.setImage(loc8, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next302, \"SB202.png\");\r\n\t\t\t grid.setImage(loc9, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next303, \"SB203.png\");\r\n\t\t\t grid.setImage(loc10, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next304, \"SB204.png\");\r\n\t\t\t grid.setImage(loc11, null);\r\n\r\n\t\t\t\t\r\n\t\t\t\tgrid.setImage(next401, \"SB101.png\");\r\n\t\t\t grid.setImage(loc12, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next402, \"SB102.png\");\r\n\t\t\t grid.setImage(loc13, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next403, \"SB103.png\");\r\n\t\t\t grid.setImage(loc14, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next404, \"SB104.png\");\r\n\t\t\t grid.setImage(loc15, null);\r\n\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t \r\n\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n }\r\n }",
"public interface Mobile\n{\n // Formatting constants\n public final static double WIRE = 100;\n public final static double UNIT = 10;\n public final static double GAP = 2;\n public final static double TOP = 10;\n public final static int WIDTH = 1200;\n public final static int HEIGHT = 800;\n\n /**\n * Draws this Mobile on g, beginning at point (x,y).\n */\n public void display (Graphics2D g, double x, double y);\n\n /**\n * Returns the total weight of all the Bobs in this Mobile.\n */\n public int weight ();\n\n /**\n * Reports whether all the Rods in this Mobile are completely horizontal. A Rod will be horizontal if the product of\n * its left length and the weight of its left Mobile equals the product of its right length and the weight of its\n * right Mobile.\n */\n public boolean isBalanced ();\n\n /**\n * Returns the length of the longest path through this Mobile. There is one path for every Bob in the Mobile. Each\n * path leads from the top of the Mobile to a Bob, and its length is the number of Rods encountered along the way\n * plus one.\n */\n public int depth ();\n\n /**\n * Returns the number of Bobs contained in this Mobile.\n */\n public int bobCount ();\n\n /**\n * Returns the number of Rods contained in this Mobile.\n */\n public int rodCount ();\n\n /**\n * Returns the length of the longest Rod contained in this Mobile. If there are no Rods, returns zero.\n */\n public int longestRod ();\n\n /**\n * Returns the weight of the heaviest Bob contained in this Mobile.\n */\n public int heaviestBob ();\n}",
"public static double getWeaponDamage(Item weapon, Skill attStrength) {\n/* 2348 */ if (weapon.isBodyPart() && weapon.getAuxData() != 100) {\n/* */ \n/* */ try {\n/* */ \n/* 2352 */ float f = Server.getInstance().getCreature(weapon.getOwnerId()).getCombatDamage(weapon);\n/* */ \n/* 2354 */ return (f + Server.rand.nextFloat() * f * 2.0F);\n/* */ }\n/* 2356 */ catch (NoSuchCreatureException nsc) {\n/* */ \n/* 2358 */ logger.log(Level.WARNING, \"Could not find Creature owner of weapon: \" + weapon + \" due to \" + nsc.getMessage(), (Throwable)nsc);\n/* */ \n/* */ }\n/* 2361 */ catch (NoSuchPlayerException nsp) {\n/* */ \n/* 2363 */ logger.log(Level.WARNING, \"Could not find Player owner of weapon: \" + weapon + \" due to \" + nsp.getMessage(), (Throwable)nsp);\n/* */ } \n/* */ }\n/* */ \n/* */ \n/* 2368 */ float base = 6.0F;\n/* 2369 */ if (weapon.isWeaponSword()) {\n/* */ \n/* 2371 */ base = 24.0F;\n/* */ }\n/* 2373 */ else if (weapon.isWeaponAxe()) {\n/* 2374 */ base = 30.0F;\n/* 2375 */ } else if (weapon.isWeaponPierce()) {\n/* 2376 */ base = 12.0F;\n/* 2377 */ } else if (weapon.isWeaponSlash()) {\n/* 2378 */ base = 18.0F;\n/* 2379 */ } else if (weapon.isWeaponCrush()) {\n/* 2380 */ base = 36.0F;\n/* 2381 */ } else if (weapon.isBodyPart() && weapon.getAuxData() == 100) {\n/* */ \n/* 2383 */ base = 6.0F;\n/* */ } \n/* 2385 */ if (weapon.isWood()) {\n/* 2386 */ base *= 0.1F;\n/* 2387 */ } else if (weapon.isTool()) {\n/* 2388 */ base *= 0.3F;\n/* */ } \n/* 2390 */ base = (float)(base * (1.0D + attStrength.getKnowledge(0.0D) / 100.0D));\n/* */ \n/* 2392 */ float randomizer = (50.0F + Server.rand.nextFloat() * 50.0F) / 100.0F;\n/* */ \n/* 2394 */ return base + (randomizer * base * 4.0F * weapon.getQualityLevel() * weapon.getDamagePercent()) / 10000.0D;\n/* */ }",
"public Image getBulletImg(){ \n return SpriteSheet.playerProjectileSprites[this.frameNumber]; \n }",
"@Test\n public void GivenTwoRobotsInLaserBeamThenOnlyClosestOneGetsHitByLaser() {\n int healthRobot1BeforeLaser = robot.getRobotHealthPoint();\n int healthRobot2BeforeLaser = robot2.getRobotHealthPoint();\n\n //fire lasers\n game.checkevent.checkLaserBeams(game.allLasers);\n\n //health after laser\n int healthrobot1afterlaser = robot.getRobotHealthPoint();\n int healthrobot2afterlaser = robot2.getRobotHealthPoint();\n\n //only the assert for robot close to laser should fail (this is intentional)\n assertNotEquals(healthRobot1BeforeLaser, healthrobot1afterlaser);\n assertEquals(healthRobot2BeforeLaser, healthrobot2afterlaser);\n }",
"private void intElementCoordinates() throws InvalidLevelCharacterException, NoGhostSpawnPointException, NoPacmanSpawnPointException, NoItemsException {\n\n\t\tint ps = 0;// player spawn point counter\n\t\tint gs = 0;// ghost spawn point counter\n\t\tint item = 0;// item counter\n\t\t\n\t\t\tfor (int i = 0; i < height; i++) {\n\t\t\t\tfor (int j = 0; j < width; j++) {\n\t\t\t\t\t// j*MAPDENSITY as x coordinate, i*MAPDENSITY as y\n\t\t\t\t\t// coordinate\n\t\t\t\t\tfloat[] xy = { j * MAPDENSITY, i * MAPDENSITY };\n\t\t\t\t\t// add coordinates in to right category\n\t\t\t\t\tif (mapElementStringArray[i][j].equals(\"X\")) {\n\t\t\t\t\t\tmapElementArray[i][j] = new Wall(new Vector2f(xy), getWallType(\n\t\t\t\t\t\t\t\ti, j));\n\t\t\t\t\t} else if (mapElementStringArray[i][j].equals(\" \")) {\n\t\t\t\t\t\tmapElementArray[i][j] = new Dot(new Vector2f(xy), getForksForPacman(i, j), getForksForGhost(i, j));\n\t\t\t\t\t\tdots.add((Dot)mapElementArray[i][j]);\n\t\t\t\t\t\titem++;\n\t\t\t\t\t} else if (mapElementStringArray[i][j].equals(\"P\")) {\n\t\t\t\t\t\tmapElementArray[i][j] = new PlayerSpawnPoint(new Vector2f(xy), getForksForPacman(i, j), getForksForGhost(i, j));\n\t\t\t\t\t\tplayerSpawnPoints.add((PlayerSpawnPoint)mapElementArray[i][j]);\n\t\t\t\t\t\taPlayerSpawnPointRow=i;\n\t\t\t\t\t\taPlayerSpawnPointCol=j;\n\t\t\t\t\t\tps++;\n\t\t\t\t\t} else if (mapElementStringArray[i][j].equals(\"G\")) {\n\t\t\t\t\t\tmapElementArray[i][j] = new GhostSpawnPoint(new Vector2f(xy),getForksForPacman(i, j), getForksForGhost(i, j));\n\t\t\t\t\t\tghostSpawnPoints.add((GhostSpawnPoint)mapElementArray[i][j]);\n\t\t\t\t\t\tgs++;\n\t\t\t\t\t} else if (mapElementStringArray[i][j].equals(\"B\"))\n\t\t\t\t\t\tmapElementArray[i][j] = new InvisibleWall(new Vector2f(xy), getForksForPacman(i, j), getForksForGhost(i, j));\n\t\t\t\t\telse if (mapElementStringArray[i][j].equals(\"S\")) {\n\t\t\t\t\t\tmapElementArray[i][j] = new SpeedUp(new Vector2f(xy), getForksForPacman(i, j), getForksForGhost(i, j));\n\t\t\t\t\t\tspeedUps.add((SpeedUp)mapElementArray[i][j]);\n\t\t\t\t\t\titem++;\n\t\t\t\t\t} else if (mapElementStringArray[i][j].equals(\"T\")){\n\t\t\t\t\t\tmapElementArray[i][j] = new Teleporter(new Vector2f(xy),getForksForPacman(i, j), getForksForGhost(i, j));\n\t\t\t\t\t\tteleporters.add((Teleporter)mapElementArray[i][j]);\n\t\t\t\t\t}\n\t\t\t\t\telse if (mapElementStringArray[i][j].equals(\"U\")) {\n\t\t\t\t\t\tmapElementArray[i][j] = new PowerUp(new Vector2f(xy), getForksForPacman(i, j), getForksForGhost(i, j));\n\t\t\t\t\t\tpowerUps.add((PowerUp)mapElementArray[i][j]);\n\t\t\t\t\t\titem++;\n\t\t\t\t\t} else\n\t\t\t\t\t\t// thrwo invalidLevelCharacterException\n\t\t\t\t\t\tthrow new InvalidLevelCharacterException(\n\t\t\t\t\t\t\t\tmapElementStringArray[i][j].charAt(0));\n\n\t\t\t\t}\n\t\t\t}\n\t\t\t// check for PacmanSpawnPoint, GhostSpawnPoint and item exceptions\n\t\t\tif (gs == 0)\n\t\t\t\tthrow new NoGhostSpawnPointException();\n\t\t\tif (ps == 0)\n\t\t\t\tthrow new NoPacmanSpawnPointException();\n\t\t\tif (item == 0)\n\t\t\t\tthrow new NoItemsException();\n\t\t\n\t}",
"private DPoint m2833m() {\r\n IPoint iPoint = new IPoint();\r\n this.f1769m.mo353a(this.f1761e.latitude, this.f1761e.longitude, iPoint);\r\n IPoint iPoint2 = new IPoint();\r\n this.f1769m.mo353a(this.f1762f.latitude, this.f1762f.longitude, iPoint2);\r\n IPoint iPoint3 = new IPoint();\r\n this.f1769m.mo353a(this.f1763g.latitude, this.f1763g.longitude, iPoint3);\r\n double d = (double) iPoint.f3639x;\r\n double d2 = (double) iPoint.f3640y;\r\n double d3 = (double) iPoint2.f3639x;\r\n double d4 = (double) iPoint2.f3640y;\r\n double d5 = (double) iPoint3.f3639x;\r\n double d6 = (double) iPoint3.f3640y;\r\n double d7 = (((d6 - d2) * ((((d4 * d4) - (d2 * d2)) + (d3 * d3)) - (d * d))) + ((d4 - d2) * ((((d2 * d2) - (d6 * d6)) + (d * d)) - (d5 * d5)))) / (((2.0d * (d3 - d)) * (d6 - d2)) - ((2.0d * (d5 - d)) * (d4 - d2)));\r\n double d8 = (((d5 - d) * ((((d3 * d3) - (d * d)) + (d4 * d4)) - (d2 * d2))) + ((d3 - d) * ((((d * d) - (d5 * d5)) + (d2 * d2)) - (d6 * d6)))) / (((2.0d * (d4 - d2)) * (d5 - d)) - ((2.0d * (d6 - d2)) * (d3 - d)));\r\n this.f1773q = Math.sqrt(((d - d7) * (d - d7)) + ((d2 - d8) * (d2 - d8)));\r\n this.f1774r = m2830a(d7, d8, d, d2);\r\n d = m2830a(d7, d8, d3, d4);\r\n this.f1775s = m2830a(d7, d8, d5, d6);\r\n if (this.f1774r < this.f1775s) {\r\n if (d <= this.f1774r || d >= this.f1775s) {\r\n this.f1775s -= 6.283185307179586d;\r\n }\r\n } else if (d <= this.f1775s || d >= this.f1774r) {\r\n this.f1775s += 6.283185307179586d;\r\n }\r\n return new DPoint(d7, d8);\r\n }"
]
| [
"0.5358244",
"0.5310314",
"0.5298187",
"0.5280286",
"0.5266653",
"0.5246535",
"0.5172831",
"0.5170391",
"0.5112689",
"0.5091677",
"0.50817245",
"0.5065841",
"0.50613517",
"0.5049327",
"0.50304013",
"0.49926108",
"0.49730226",
"0.49553087",
"0.49171406",
"0.48859686",
"0.48784593",
"0.48568583",
"0.4853989",
"0.48534077",
"0.4851358",
"0.48488045",
"0.48463175",
"0.48330465",
"0.48322776",
"0.48283094",
"0.48067534",
"0.48027351",
"0.48003793",
"0.47976467",
"0.47931603",
"0.47929084",
"0.47851032",
"0.47837377",
"0.47808",
"0.4767203",
"0.476652",
"0.4762864",
"0.4762053",
"0.4732835",
"0.47082868",
"0.46928138",
"0.46926528",
"0.46909583",
"0.46903077",
"0.46860173",
"0.46781582",
"0.4678106",
"0.46758884",
"0.46725383",
"0.4670502",
"0.46684316",
"0.46660617",
"0.46590525",
"0.4658331",
"0.46510747",
"0.46510556",
"0.46510306",
"0.46477675",
"0.46448642",
"0.46376014",
"0.46320322",
"0.46259272",
"0.46181232",
"0.4617951",
"0.46179152",
"0.46131265",
"0.46122584",
"0.46059674",
"0.4595939",
"0.4593775",
"0.45914483",
"0.45907712",
"0.45907623",
"0.45906615",
"0.4589672",
"0.45878258",
"0.45873213",
"0.4586996",
"0.45856097",
"0.45845842",
"0.45829013",
"0.45769995",
"0.45765206",
"0.45732275",
"0.4571972",
"0.45710427",
"0.45656466",
"0.4558177",
"0.45530453",
"0.45513287",
"0.45500493",
"0.45497483",
"0.45465448",
"0.45413247",
"0.45407087",
"0.4538351"
]
| 0.0 | -1 |
Get a launcher and missile Explicitly calculate where the missile ends up given angle PhysicsEngine will contain static methods to generate and get data Input values selected arbitrarily, outputs explicitly calculated | @Test
public void testXGivenT() {
double x1 = 0, x2 = 21.65, x3 = 43.30, x4 = 47.63;
double v0 = 25;
double theta = 30;
double t1 = 0, t2 = 1, t3 = 2, t4 = 2.2;
assertEquals(PhysicsEngine.findXPos(v0, theta, t1, 0), x1, DELTA);
assertEquals(PhysicsEngine.findXPos(v0, theta, t2, 0), x2, DELTA);
assertEquals(PhysicsEngine.findXPos(v0, theta, t3, 0), x3, DELTA);
assertEquals(PhysicsEngine.findXPos(v0, theta, t4, 0), x4, DELTA);
double x5 = 0, x6 = 21.02, x7 = 42.05, x8 = 46.25;
double v1 = 38.6;
double phi = 57;
assertEquals(PhysicsEngine.findXPos(v1, phi, t1, 0), x5, DELTA);
assertEquals(PhysicsEngine.findXPos(v1, phi, t2, 0), x6, DELTA);
assertEquals(PhysicsEngine.findXPos(v1, phi, t3, 0), x7, DELTA);
assertEquals(PhysicsEngine.findXPos(v1, phi, t4, 0), x8, DELTA);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int TakeStep()\n\t\t{\n\t\t// the eventual movement command is placed here\n\t\tVec2\tresult = new Vec2(0,0);\n\n\t\t// get the current time for timestamps\n\t\tlong\tcurr_time = abstract_robot.getTime();\n\n\n\t\t/*--- Get some sensor data ---*/\n\t\t// get vector to the ball\n\t\tVec2 ball = abstract_robot.getBall(curr_time);\n\n\t\t// get vector to our and their goal\n\t\tVec2 ourgoal = abstract_robot.getOurGoal(curr_time);\n\t\tVec2 theirgoal = abstract_robot.getOpponentsGoal(curr_time);\n\n\t\t// get a list of the positions of our teammates\n\t\tVec2[] teammates = abstract_robot.getTeammates(curr_time);\n\n\t\t// find the closest teammate\n\t\tVec2 closestteammate = new Vec2(99999,0);\n\t\tfor (int i=0; i< teammates.length; i++)\n\t\t\t{\n\t\t\tif (teammates[i].r < closestteammate.r)\n\t\t\t\tclosestteammate = teammates[i];\n\t\t\t}\n\n\n\t\t/*--- now compute some strategic places to go ---*/\n\t\t// compute a point one robot radius\n\t\t// behind the ball.\n\t\tVec2 kickspot = new Vec2(ball.x, ball.y);\n\t\tkickspot.sub(theirgoal);\n\t\tkickspot.setr(abstract_robot.RADIUS);\n\t\tkickspot.add(ball);\n\n\t\t// compute a point three robot radii\n\t\t// behind the ball.\n\t\tVec2 backspot = new Vec2(ball.x, ball.y);\n\t\tbackspot.sub(theirgoal);\n\t\tbackspot.setr(abstract_robot.RADIUS*5);\n\t\tbackspot.add(ball);\n\n\t\t// compute a north and south spot\n\t\tVec2 northspot = new Vec2(backspot.x,backspot.y+0.7);\n\t\tVec2 southspot = new Vec2(backspot.x,backspot.y-0.7);\n\n\t\t// compute a position between the ball and defended goal\n\t\tVec2 goaliepos = new Vec2(ourgoal.x + ball.x,\n\t\t\t\tourgoal.y + ball.y);\n\t\tgoaliepos.setr(goaliepos.r*0.5);\n\n\t\t// a direction away from the closest teammate.\n\t\tVec2 awayfromclosest = new Vec2(closestteammate.x,\n\t\t\t\tclosestteammate.y);\n\t\tawayfromclosest.sett(awayfromclosest.t + Math.PI);\n\n\n\t\t/*--- go to one of the places depending on player num ---*/\n\t\tint mynum = abstract_robot.getPlayerNumber(curr_time);\n\n\t\t/*--- Goalie ---*/\n\t\tif (mynum == 0)\n\t\t\t{\n\t\t\t// go to the goalie position if far from the ball\n\t\t\tif (ball.r > 0.5) \n\t\t\t\tresult = goaliepos;\n\t\t\t// otherwise go to kick it\n\t\t\telse if (ball.r > 0.1) \n\t\t\t\tresult = kickspot;\n\t\t\telse \n\t\t\t\tresult = ball;\n\t\t\t// keep away from others\n\t\t\tif (closestteammate.r < 0.3)\n\t\t\t\t{\n\t\t\t\tresult = awayfromclosest;\n\t\t\t\t}\n\t\t\t}\n\n\t\t/*--- midback ---*/\n\t\telse if (mynum == 1)\n\t\t\t{\n\t\t\t// go to a midback position if far from the ball\n\t\t\tif (ball.r > 0.5) \n\t\t\t\tresult = backspot;\n\t\t\t// otherwise go to kick it\n\t\t\telse if (ball.r > 0.30) \n\t\t\t\tresult = kickspot;\n\t\t\telse \n\t\t\t\tresult = ball;\n\t\t\t// keep away from others\n\t\t\tif (closestteammate.r < 0.3)\n\t\t\t\t{\n\t\t\t\tresult = awayfromclosest;\n\t\t\t\t}\n\t\t\t}\n\n\t\telse if (mynum == 2)\n\t\t\t{\n\t\t\t// go to a the northspot position if far from the ball\n\t\t\tif (ball.r > 0.5) \n\t\t\t\tresult = northspot;\n\t\t\t// otherwise go to kick it\n\t\t\telse if (ball.r > 0.30) \n\t\t\t\tresult = kickspot;\n\t\t\telse \n\t\t\t\tresult = ball;\n\t\t\t// keep away from others\n\t\t\tif (closestteammate.r < 0.3)\n\t\t\t\t{\n\t\t\t\tresult = awayfromclosest;\n\t\t\t\t}\n\t\t\t}\n\n\t\telse if (mynum == 4)\n\t\t\t{\n\t\t\t// go to a the northspot position if far from the ball\n\t\t\tif (ball.r > 0.5) \n\t\t\t\tresult = southspot;\n\t\t\t// otherwise go to kick it\n\t\t\telse if (ball.r > 0.3 )\n\t\t\t\tresult = kickspot;\n\t\t\telse \n\t\t\t\tresult = ball;\n\t\t\t// keep away from others\n\t\t\tif (closestteammate.r < 0.3)\n\t\t\t\t{\n\t\t\t\tresult = awayfromclosest;\n\t\t\t\t}\n\t\t\t}\n\n\t\t/*---Lead Forward ---*/\n\t\telse if (mynum == 3)\n\t\t\t{\n\t\t\t// if we are more than 4cm away from the ball\n\t\t\tif (ball.r > .3)\n\t\t\t\t// go to a good kicking position\n\t\t\t\tresult = kickspot;\n\t\t\telse\n\t\t\t\t// go to the ball\n\t\t\t\tresult = ball;\n\t\t\t}\n\n\n\t\t/*--- Send commands to actuators ---*/\n\t\t// set the heading\n\t\tabstract_robot.setSteerHeading(curr_time, result.t);\n\n\t\t// set speed at maximum\n\t\tabstract_robot.setSpeed(curr_time, 1.0);\n\n\t\t// kick it if we can\n\t\tif (abstract_robot.canKick(curr_time))\n\t\t\tabstract_robot.kick(curr_time);\n\n\t\t/*--- Send message to other robot ---*/\n\t\t// COMMUNICATION\n\t\t// if I can kick\n\t\tif (abstract_robot.canKick(curr_time))\n\t\t\t{\n\t\t\t// and I am robot #3\n\t\t\tif ((mynum==3))\n\t\t\t\t{\n\t\t\t\t// construct a message\n\t\t\t\tStringMessage m = new StringMessage();\n\t\t\t\tm.val = (new Integer(mynum)).toString();\n\t\t\t\tm.val = m.val.concat(\" can kick\");\n\n\t\t\t\t// send the message to robot 2\n\t\t\t\t// note: broadcast and multicast are also\n\t\t\t\t// available.\n\t\t\t\ttry{abstract_robot.unicast(2,m);}\n\t\t\t\tcatch(CommunicationException e){}\n\t\t\t\t}\n\t\t\t}\n\n\t\t/*--- Look for incoming messages ---*/\n\t\t//COMMUNICATION\n\t\twhile (messagesin.hasMoreElements())\n\t\t\t{\n\t\t\tStringMessage recvd = \n\t\t\t\t(StringMessage)messagesin.nextElement();\n\t\t\tSystem.out.println(mynum + \" received:\\n\" + recvd);\n\t\t\t}\n\n\t\t// tell the parent we're OK\n\t\treturn(CSSTAT_OK);\n\t\t}",
"public static void main(String [] args) {\n PPPoint pt1 = new PPPoint(0.0, 0.0);\n PPPoint pt2 = new PPPoint(0.0, 100.0);\n double lookAheadDist = 10.0;\n double targetVelocity = 0.5;\n\n PurePursuitCalc calc = new PurePursuitCalc(pt1, pt2, lookAheadDist, targetVelocity);\n double heading;\n double x = (args.length > 0) ? Double.parseDouble(args[0]) : 0.0;\n double y = (args.length > 1) ? Double.parseDouble(args[1]) : 0.0;\n final int numPoints = (args.length > 2) ? Integer.parseInt(args[2]) : 11;\n double maxAngle = (args.length > 3) ? Double.parseDouble(args[3]) : 20;\n double stepSize = maxAngle * 2.0 / ((double)numPoints - 1.0);\n\n for (int i = 0; i < numPoints; i++) {\n heading = -maxAngle + ((double)i * stepSize);\n double[] data = calc.calcVelocities(x, y, heading);\n double[] alldata = calc.getData();\n String msg = String.format(\"currX=%6.2f, currY=%6.2f, currHeading=%6.2f, desiredHeading=%6.2f, leftSetV=%6.2f, rightSetV=%6.2f\",\n alldata[0], alldata[1], alldata[2], alldata[3], alldata[4], alldata[5]);\n System.out.println(msg);\n }\n }",
"public static void main(String[] args) throws UsbException {\n\t\tDefenseGrid grid = DefenseGrid.getInstance();\n\t\t\n\t\t// perform initialization (zeroing) of each missile launcher in parallel\n\t\tgrid.initializeMissileLaunchers();\n\t\t\n\t\t// get an array of missile launchers to control\n\t\tMissileLauncher[] launchers = grid.getMissileLaunchers();\n\t\t\n\t\t// test each missile launchers ability to aim up, down, left, right, and fire\n\t\tif(launchers.length == 0){\n\t\t\tSystem.out.println(\"No USB Missile Launchers could not be found. Try disconnecting and reconnecting USB devices from port.\");\n\t\t} else {\n\t\t\tint launcherID = 0; // launcher's index\n\t\t\tfor(MissileLauncher ml : launchers){\n\t\t\t\tlauncherID++;\n\t\t\t\tSystem.out.println(\"[Launcher \" + launcherID + \"] Vertical Position: \" + ml.adjustVerticalPosition(500));\n\t\t\t\tSystem.out.println(\"[Launcher \" + launcherID + \"] Vertical Position: \" + ml.adjustVerticalPosition(-500));\n\t\t\t\tSystem.out.println(\"[Launcher \" + launcherID + \"] Vertical Position: \" + ml.adjustVerticalPosition(0));\n\t\t\t\tSystem.out.println(\"[Launcher \" + launcherID + \"] Horizontal Position: \" + ml.adjustHorizontalPosition(500));\n\t\t\t\tSystem.out.println(\"[Launcher \" + launcherID + \"] Horizontal Position: \" + ml.adjustHorizontalPosition(-500));\n\t\t\t\tSystem.out.println(\"[Launcher \" + launcherID + \"] Horizontal Position: \" + ml.adjustHorizontalPosition(0));\n\t\t\t\tSystem.out.println(\"[Launcher \" + launcherID + \"] Fired: \" + ml.fire());\n\t\t\t}\n\t\t}\n\t}",
"public static void main( String args[] )\n {\n double Ei = 500;\n double EPS = 10;\n double phi = 60;\n float mutS = 0.1f;\n float mutA = 0.2f;\n float gamma = 45;\n double energy = Ei - EPS;\n\n double self = SelfShielding( energy, Ei, phi, mutS, mutA, gamma );\n System.out.println( \"self shielding factor = \" + self );\n // result should be: 1.1944503488285683\n\n String filename = \"/usr2/HRCS_TEST/hrcs3084.run\";\n RunfileRetriever rr = new RunfileRetriever( filename );\n DataSet ds = rr.getDataSet(1);\n Operator ToEL = new SpectrometerTofToEnergyLoss( ds, 0, 0, 0 );\n ds = (DataSet)ToEL.getResult();\n new ViewManager( ds, IViewManager.IMAGE );\n\n Vector result = SelfShielding( ds, mutS, mutA, gamma, true );\n\n DataSet ss_ds_1 = (DataSet)result.elementAt(0); \n new ViewManager( ss_ds_1, IViewManager.IMAGE );\n\n DataSet ss_ds_2 = (DataSet)result.elementAt(1); \n new ViewManager( ss_ds_2, IViewManager.IMAGE );\n }",
"private void NoAirResistanceCalculator(double velocity, double launchAngle)\n\t{\n\t\t/*\n\t\t * Convert launch angle from degrees into radians\n\t\t * Convert velocity from mph to fps\n\t\t * Convert gravity to fps\n\t\t */\n\t\tlaunchAngle = (launchAngle * (Math.PI)) / 180;\n\t\tvelocity = velocity * 1.46667;\n\t\tgravity = gravity * 3.28084;\n\n\t\t// Calculate when the ball hits the ground\n\t\ttimeBallHitsGround = (2 * velocity * Math.sin(launchAngle)) / gravity;\n\n\t\t// Calculate max height (velocity_f = 0)\n\t\tmaxHeightTime = (velocity * Math.sin(launchAngle)) / gravity;\n\t\tmaxHeight = strikeHeight + (velocity * Math.sin(launchAngle) * maxHeightTime) - ((.5 * gravity) * (maxHeightTime * maxHeightTime));\n\n\t\t// Y Position: y = y_0 + (v_y)t + .5(-9.8)(t^2), v_y = (v_0)sin(theta)\n\t\tfor(double t = 0; t <= timeBallHitsGround + .1; t = t + timeIncrement)\n\t\t{\n\t\t\t// Math for y(t) position\n\t\t\tyPos = (velocity * Math.sin(launchAngle) * t) - ((.5 * gravity) * (t * t));\n\n\t\t\t// Add y position and time\n\t\t\tyPosList.add(yPos + strikeHeight);\n\t\t\ttimeList.add(t);\n\n\t\t}\n\n\t\t// X Position: x = x_0 + (v_x)t, v_x = (v_0)cos(theta)\n\t\tfor(int i = 0; i < timeList.size(); i++)\n\t\t{\n\t\t\t// Math for x(t) position\n\t\t\txPos = (velocity * Math.cos(launchAngle) * timeList.get(i));\n\n\t\t\t// Add x position\n\t\t\txPosList.add(xPos);\n\t\t}\n\t}",
"public int magicMissile();",
"private Array<Tile>[] walk() {\n float targetY = currentTile.y + 1;\n Vector2 previousTile = new Vector2(currentTile.x, currentTile.y);\n\n Array<Vector2> tiles = new Array<Vector2>();\n tiles.add(new Vector2(currentTile.x, currentTile.y));\n\n while(currentTile.y < targetY) {\n float rnd = random.nextFloat();\n\n if(rnd > 0.75f) { // up\n Array<Tile> grassRow = new Array<Tile>();\n Array<Tile> treeRow = new Array<Tile>();\n\n for(int x = 1; x <= 5; x++) {\n Vector2 vector = new Vector2(x, currentTile.y);\n\n GrassNEW grass = grassPool.obtain();\n grass.init(vector.x * GameVars.TILE_SIZE, vector.y * GameVars.TILE_SIZE);\n grassRow.add(grass);\n\n if(!tiles.contains(vector, false)) {\n if(random.nextFloat() > 0.3) {\n TreeNEW tree = treePool.obtain();\n tree.init(vector.x * GameVars.TILE_SIZE, vector.y * GameVars.TILE_SIZE);\n treeRow.add(tree);\n }\n } else {\n if(random.nextFloat() > 0.99) {\n Collectible power = new PowerUpSpikes(world, spikesTexture, vector.x * GameVars.TILE_SIZE, vector.y * GameVars.TILE_SIZE);\n collectibles.add(power);\n } else {\n if(random.nextFloat() > 0.5) {\n Coin coin = new Coin(world, coinTexture, vector.x * GameVars.TILE_SIZE, vector.y * GameVars.TILE_SIZE);\n collectibles.add(coin);\n }\n }\n }\n }\n\n currentTile.add(0, 1);\n\n Array<Tile>[] ret = new Array[2];\n ret[0] = grassRow;\n ret[1] = treeRow;\n\n return ret;\n } else if(rnd > 0.375) { // right\n if(currentTile.x < 5 && Math.abs(previousTile.x - currentTile.x) <= 2) {\n currentTile.add(1, 0);\n tiles.add(new Vector2(currentTile.x, currentTile.y));\n }\n } else { // left\n if(currentTile.x > 1 && Math.abs(previousTile.x - currentTile.x) <= 2) {\n currentTile.add(-1, 0);\n tiles.add(new Vector2(currentTile.x, currentTile.y));\n }\n }\n }\n\n return null; // will never happen\n }",
"public MissileLauncher getMissileLauncher() {\n\t\treturn this.missileLauncher;\n\t}",
"private static void runNeedleSimulation() {\n\t\tint iterations = numbersOfIterations(new Scanner(System.in));\n\t\tint hits = needleSimulation(iterations);\n\t\tdouble pi = piCalculation(iterations, hits);\n\t\tSystem.out.println(pi);\n\t\t\n\t\t\n\t}",
"public void getProbe () {\n double prxg;\n int index;\n double effaoa = effective_aoa();\n /* get variables in the generating plane */\n if (Math.abs(ypval) < .01) ypval = .05;\n getPoints(xpval,ypval);\n\n solver.getVel(lrg,lthg);\n loadProbe();\n\n pxg = lxgt;\n pyg = lygt;\n prg = lrgt;\n pthg = lthgt;\n pxm = lxmt;\n pym = lymt;\n /* smoke */\n if (pboflag == 3 ) {\n prxg = xpval;\n for (index =1; index <=POINTS_COUNT; ++ index) {\n getPoints(prxg,ypval);\n xg[19][index] = lxgt;\n yg[19][index] = lygt;\n rg[19][index] = lrgt;\n thg[19][index] = lthgt;\n xm[19][index] = lxmt;\n ym[19][index] = lymt;\n if (stall_model_type != STALL_MODEL_IDEAL_FLOW) { // stall model\n double apos = stall_model_type == STALL_MODEL_DFLT ? +10 : stall_model_apos;\n double aneg = stall_model_type == STALL_MODEL_DFLT ? -10 : stall_model_aneg;\n if (xpval > 0.0) {\n if (effaoa > apos && ypval > 0.0) { \n ym[19][index] = ym[19][1];\n } \n if (effaoa < aneg && ypval < 0.0) {\n ym[19][index] = ym[19][1];\n }\n }\n if (xpval < 0.0) {\n if (effaoa > apos && ypval > 0.0) { \n if (xm[19][index] > 0.0) {\n ym[19][index] = ym[19][index-1];\n }\n } \n if (effaoa < aneg && ypval < 0.0) {\n if (xm[19][index] > 0.0) {\n ym[19][index] = ym[19][index-1];\n }\n }\n }\n }\n solver.getVel(lrg,lthg);\n prxg = prxg + vxdir*STEP_X;\n }\n }\n return;\n }",
"private void AirResistanceCalculator(double velocity, double launchAngle)\n\t{\n\t\t/*\n\t\t * Convert launch angle from degrees into radians\n\t\t * Convert velocity from mph to mps\n\t\t * Do not convert gravity to fps\n\t\t * This one is different than noAirResis because it converts units at the end\n\t\t */\n\t\tlaunchAngle = (launchAngle * (Math.PI)) / 180;\n\t\tvelocity = velocity * 0.44704;\n\n\t\t// Max height and the time it takes to get to max height\n\t\tmaxHeightTime = (terminalVelocity / gravity) *\n\t\t\t\t(Math.atan((velocity * Math.sin(launchAngle)) / terminalVelocity));\n\t\ttop = Math.cos(Math.atan(((velocity * Math.sin(launchAngle)) / terminalVelocity)) -\n\t\t\t\t((gravity * maxHeightTime) / terminalVelocity));\n\t\tbottom = Math.cos(Math.atan((velocity * Math.sin(launchAngle)) / terminalVelocity));\n\t\tmaxHeight = ((terminalVelocity * terminalVelocity) / gravity) *\n\t\t\t\tMath.log(top / bottom);\n\n\t\t// Time it takes to hit ground\n\t\t// coh^-1(x) = ln(x + sqrt((x^2) - 1) x >= 1\n\t\tdouble poo = Math.exp((maxHeight * gravity) / (terminalVelocity * terminalVelocity));\n\t\ttimeBallHitsGround = (terminalVelocity / gravity) *\n\t\t\t\tMath.log(poo + Math.sqrt((poo * poo) - 1)) + maxHeightTime;\n\t\tSystem.out.println(\"TimeBallHitsGround: \" + timeBallHitsGround);\n\t\tSystem.out.println(\"MaxHeightTime \" + maxHeightTime);\n\n\n\t\t// Y Position, t2 is the new time that starts when the ball reaches max height\n\t\tfor(double t = 0, t2 = 0; t < timeBallHitsGround + .1; t = t + timeIncrement)\n\t\t{\n\t\t\tif(t <= maxHeightTime)\n\t\t\t{\n\t\t\t\t// 1 meter = 3.28084 ft\n\t\t\t\ttop = Math.cos(Math.atan(((velocity * Math.sin(launchAngle)) / terminalVelocity)) -\n\t\t\t\t\t\t((gravity * t) / terminalVelocity));\n\t\t\t\tbottom = Math.cos(Math.atan((velocity * Math.sin(launchAngle)) / terminalVelocity));\n\n\n\t\t\t\tyPos = (((terminalVelocity * terminalVelocity) / gravity) *\n\t\t\t\t\t\tMath.log(top / bottom)) * 3.28084;\n\t\t\t}\n\t\t\t// Drag changes directions as the ball falls down\n\t\t\telse\n\t\t\t{\n\t\t\t\t// 1 meter = 3.28084 ft\n\t\t\t\tyPos = (-((terminalVelocity * terminalVelocity) / gravity) *\n\t\t\t\t\t\t(Math.log((Math.cosh((gravity * t2) / terminalVelocity)))) + maxHeight) * 3.28084;\n\t\t\t\tSystem.out.println(\"YPos: \" + yPos + \" t: \" + t + \" t2: \" + t2);\n\t\t\t\tt2 = t2 + timeIncrement;\n\t\t\t}\n\n\n\t\t\t// Add y position and time\n\t\t\tyPosList.add(yPos + strikeHeight);\n\t\t\ttimeList.add(t);\n\t\t}\n\n\t\t// X Position\n\t\tfor(int i = 0; i < timeList.size(); i++)\n\t\t{\n\t\t\t// Math for x(t) position\n\t\t\t// 1 meter = 3.28084 ft\n\t\t\txPos = ((mass / b) * (Math.log(((b * velocity * Math.cos(launchAngle) * timeList.get(i)) + mass)\n\t\t\t\t\t/ mass))) * 3.28084;\n\n\t\t\t// Add x position\n\t\t\t// 1 meter = 3.28084 ft\n\t\t\txPosList.add(xPos);\n\t\t}\n\n\t\t// Convert the final stats to meters\n\t\tmaxHeight = maxHeight * 3.28084;\n\t}",
"public void calculateShooterInfo(double distance) {\n }",
"private void GetInput()\r\n {\r\n ///Implicit eroul nu trebuie sa se deplaseze daca nu este apasata o tasta\r\n xMove = 0;\r\n yMove = 0;\r\n\r\n ///Verificare apasare tasta \"sus\"\r\n if(refLink.GetKeyManager().up_arrow && !isJumping)\r\n {\r\n jumpDirection = -1;\r\n isJumping = true;\r\n jumpSpeed = 0;\r\n }\r\n /*\r\n ///Verificare apasare tasta \"jos\"\r\n if(refLink.GetKeyManager().down)\r\n {\r\n yMove = speed;\r\n }*/\r\n ///Verificare apasare tasta \"left\"\r\n if(refLink.GetKeyManager().left_arrow && x + xMove > 15)\r\n {\r\n xMove = -speed;\r\n }\r\n ///Verificare apasare tasta \"dreapta\"\r\n if(refLink.GetKeyManager().right_arrow && x + xMove < 900)\r\n {\r\n xMove = speed;\r\n }\r\n }",
"public Result call()\n {\n HashMap<RotamerPair,Double> tempMap = new HashMap<>();\n for ( Map.Entry<Rotamer,Rotamer> entry : work.entries() )\n {\n Rotamer rotamer1 = entry.getKey();\n Rotamer rotamer2 = entry.getValue();\n RotamerPair pair = new RotamerPair(rotamer1, rotamer2);\n if ( incompatiblePairs.contains(pair) )\n continue;\n \n //Atom extraAtom1 = null;\n //if ( rotamer1.description.indexOf(\"proline\") == -1 )\n // extraAtom1 = peptide.sequence.get(rotamer1.sequenceIndex).HN;\n \n //Atom extraAtom2 = null;\n //if ( rotamer2.description.indexOf(\"proline\") == -1 )\n // extraAtom2 = peptide.sequence.get(rotamer2.sequenceIndex).HN;\n \n //double energy = OPLScalculator.getInteractionEnergy(rotamer1, extraAtom1, rotamer2, extraAtom2);\n double energy = OPLScalculator.getInteractionEnergy(rotamer1, null, rotamer2, null);\n tempMap.put(pair,energy);\n }\n map.putAll(tempMap);\n return null;\n }",
"protected final String look(int direction, boolean steps) {\r\n \t\r\n \t//pay the LOOK_ENERGY_COST\r\n \tenergy = energy - Params.LOOK_ENERGY_COST;\r\n \tint look;\r\n \t//get the x and y coordinates of the critter\r\n \tint xCoord = this.x_coord;\r\n \tint yCoord = this.y_coord;\r\n \t\r\n \tif(steps == true)\r\n \t\tlook = 2; //look 2 steps\r\n \telse \r\n \t\tlook = 1; //look 1 step\r\n \t\r\n \t//get the coordinate position of the location to look\r\n \tswitch(direction) {\r\n \tcase 0:\r\n \t\txCoord += look; //straight right \r\n \t\tbreak;\r\n \t\t\r\n \tcase 1:\r\n \t\txCoord += look; //diagonally up and to the right\r\n \t\tyCoord -= look;\r\n \t\tbreak;\r\n \t\t\r\n \tcase 2:\r\n \t\tyCoord -= look; //straight up\r\n \t\tbreak;\r\n \t\t\r\n \tcase 3: \r\n \t\txCoord -= look; //diagonally up and to left\r\n \t\tyCoord -= look;\r\n \t\tbreak;\r\n \t\t\r\n \tcase 4:\r\n \t\txCoord -= look; //straight left\r\n \t\tbreak;\r\n \t\r\n \tcase 5:\r\n \t\txCoord -= look; //diagonally down and to left\r\n \t\tyCoord += look; \r\n \t\tbreak;\r\n \t\t\r\n \tcase 6:\r\n \t\tyCoord += look; //diagonally down\r\n \t\tbreak;\r\n \t\t\r\n \tcase 7:\r\n \t\txCoord += look; //diagonally down and to right\r\n \t\tyCoord += look;\r\n \t\tbreak;\r\n \t}\r\n \t\r\n \t//wrap-around world, need to correct coordinates\r\n \tif(xCoord > (Params.WORLD_WIDTH - 1))\r\n \t\txCoord %= Params.WORLD_WIDTH;\r\n \telse if(xCoord < 0)\r\n \t\txCoord += Params.WORLD_WIDTH;\r\n \tif(yCoord > (Params.WORLD_HEIGHT - 1))\r\n \t\tyCoord %= Params.WORLD_HEIGHT;\r\n \telse if(yCoord < 0)\r\n \t\tyCoord += Params.WORLD_HEIGHT;\r\n \r\n \t//Iterate through population hashMap\r\n \tIterator<String> positionIter = population.keySet().iterator();\r\n \t//Iterate through all of the position keys\r\n \twhile(positionIter.hasNext()) {\r\n \t\t//get the position key\r\n \t\tString position = positionIter.next();\r\n \t\t//get the critter list in that position\r\n \t\tArrayList<Critter> critterList = population.get(position);\r\n \t\t//iterate through the critters \r\n \t\tListIterator<Critter> currCritter = critterList.listIterator();\r\n \t\twhile(currCritter.hasNext()) {\r\n \t\t\t//get a critter\r\n \t\t\tCritter c = currCritter.next();\r\n \t\t\t//check whether each critter is in the position\r\n \t\t\tif(c.x_coord == xCoord && c.y_coord == yCoord) {\r\n \t\t\t\tif(c.getEnergy() >= 0) {\r\n \t\t\t\t\treturn c.toString();\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n \t\r\n \t//return null if the position is unoccupied\r\n \treturn null;\r\n }",
"private State calculatePM25(double longi, double lati) {\n Double breath = 0.0;\n Double density = PM25Density;\n boolean isConnected = ShortcutUtil.isNetworkAvailable(this);\n String inOutStr = aCache.getAsString(Const.Cache_Indoor_Outdoor);\n if(!ShortcutUtil.isStringOK(inOutStr)){\n inOutStr = String.valueOf(LocationService.Indoor);\n aCache.put(Const.Cache_Indoor_Outdoor,inOutStr);\n }\n inOutDoor = Integer.valueOf(inOutStr);\n /*double ratio;\n if (!isConnected) {\n ratio = this.getLastSevenDaysInOutRatio();\n FileUtil.appendStrToFile(DBRunTime,\"no network connection, using ratio == \"+ratio);\n density = ratio * density + (1-ratio)*density/3;\n FileUtil.appendStrToFile(DBRunTime,\"no network connection, using ratio to get density \"+density);\n if (ratio > 0.5) inOutDoor = LocationService.Indoor;\n else inOutDoor = LocationService.Outdoor;\n } else {\n if (inOutDoor == LocationService.Indoor) density /= 3;\n }*/\n\n double static_breath = ShortcutUtil.calStaticBreath(cacheUtil.getAsString(Const.Cache_User_Weight));\n\n if (static_breath == 0.0) {\n if(isBackground != null && isBackground.equals(bgStr))\n Toast.makeText(getApplicationContext(), Const.Info_Weight_Null, Toast.LENGTH_SHORT).show();\n static_breath = 6.6; // using the default one\n }\n if (mMotionStatus == Const.MotionStatus.STATIC) {\n breath = static_breath;\n } else if (mMotionStatus == Const.MotionStatus.WALK) {\n breath = static_breath * 2.1;\n } else if (mMotionStatus == Const.MotionStatus.RUN) {\n breath = static_breath * 6;\n }\n venVolToday += breath;\n breath = breath / 1000; //change L/min to m3/min\n PM25Today += density * breath;\n State state = new State(IDToday, aCache.getAsString(Const.Cache_User_Id), Long.toString(System.currentTimeMillis()),\n String.valueOf(longi),\n String.valueOf(lati),\n String.valueOf(inOutDoor),\n mMotionStatus == Const.MotionStatus.STATIC ? \"1\" : mMotionStatus == Const.MotionStatus.WALK ? \"2\" : \"3\",\n Integer.toString(numStepsForRecord), avg_rate, String.valueOf(venVolToday), density.toString(), String.valueOf(PM25Today), String.valueOf(PM25Source), 0, isConnected ? 1 : 0);\n numStepsForRecord = 0;\n return state;\n }",
"private int inputMap(Identifier id, float data)\n\t{\n\t\tif (id == Axis.RX)\n\t\t{\n\t\t\tif (linearityX == 1)\n\t\t\t{\n\n\t\t\t\tint testValue = (int) (Math.pow(data, 3) * 1000);\n\t\t\t\tif (Math.abs(data) < zone)\n\t\t\t\t\treturn 0;\n\t\t\t\telse\n\t\t\t\t\treturn testValue;\n\t\t\t} else\n\t\t\t{\n\t\t\t\tif (Math.abs(data) < zone)\n\t\t\t\t\treturn 0;\n\t\t\t\telse\n\t\t\t\t\treturn (int) (data * 1000);\n\t\t\t}\n\n\t\t} else if (id == Axis.RY)\n\t\t{\n\t\t\t// Right Stick Up and Down\n\t\t\tif (linearityY == 1)\n\t\t\t{\n\t\t\t\tint testValue = (int) (Math.pow(data, 3) * 1000);\n\t\t\t\tif (Math.abs(data) < zone)\n\t\t\t\t\treturn 0;\n\t\t\t\telse\n\t\t\t\t\treturn testValue;\n\t\t\t} else\n\t\t\t{\n\t\t\t\tif (Math.abs(data) < zone)\n\t\t\t\t\treturn 0;\n\t\t\t\telse\n\t\t\t\t\treturn (int) (data * 1000);\n\t\t\t}\n\t\t} else if (id == Axis.Z)\n\t\t{\n\t\t\t// Right Stick Up and Down\n\t\t\tif (linearityZ == 1)\n\t\t\t{\n\t\t\t\tint testValue = (int) (Math.pow(data, 3) * 1000);\n\t\t\t\tif (Math.abs(data) < zone)\n\t\t\t\t\treturn 0;\n\t\t\t\telse\n\t\t\t\t\treturn testValue;\n\t\t\t} else\n\t\t\t{\n\t\t\t\tif (Math.abs(data) < zone)\n\t\t\t\t\treturn 0;\n\t\t\t\telse\n\t\t\t\t\treturn (int) (data * 1000);\n\t\t\t}\n\t\t} else if (id == Axis.X)\n\t\t{\n\t\t\t// Right Stick Up and Down\n\t\t\tif (linearityX == 1)\n\t\t\t{\n\t\t\t\tint testValue = (int) (Math.pow(data, 3) * 1000);\n\t\t\t\tif (Math.abs(data) < zone)\n\t\t\t\t\treturn 0;\n\t\t\t\telse\n\t\t\t\t\treturn testValue;\n\t\t\t} else\n\t\t\t{\n\t\t\t\tif (Math.abs(data) < zone)\n\t\t\t\t\treturn 0;\n\t\t\t\telse\n\t\t\t\t\treturn (int) (data * 1000);\n\t\t\t}\n\t\t} else if (id == Axis.Y)\n\t\t{\n\t\t\t// Right Stick Up and Down\n\t\t\tif (linearityY == 1)\n\t\t\t{\n\t\t\t\tint testValue = (int) (Math.pow(data, 3) * 1000);\n\t\t\t\tif (Math.abs(data) < zone)\n\t\t\t\t\treturn 0;\n\t\t\t\telse\n\t\t\t\t\treturn testValue;\n\t\t\t} else\n\t\t\t{\n\t\t\t\tif (Math.abs(data) < zone)\n\t\t\t\t\treturn 0;\n\t\t\t\telse\n\t\t\t\t\treturn (int) (data * 1000);\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}",
"@Override\n\tprotected void execute() {\n\t\tdouble speed = Robot.oi.getSpeed();\n\t\tdouble turn = Robot.oi.getTurn();\n\t\tdouble leftSpeed;\n\t\tdouble rightSpeed;\n\n\t\tif (Robot.oi.getGyroReset()) {\n\t\t\tRobot.chassisSubsystem.resetGyroHeading();\n\t\t}\n\n\t\tif (Robot.oi.getGyroCalibrate()) {\n\t\t\tRobot.chassisSubsystem.calibrateGyro();\n\t\t}\n\n\t\t/**\n\t\t * If the chassisSubsystem says that we should be in high gear, switch\n\t\t * to high gear, otherwise, switch to low gear.\n\t\t */\n\t\tif (Robot.oi.getGearShiftButton() >= 0.5) {\n\t\t\tRobot.chassisSubsystem.setGear(Gear.HIGH);\n\t\t} else {\n\t\t\tRobot.chassisSubsystem.setGear(Gear.LOW);\n\t\t}\n\n\t\t\n\n\t\t/**\n\t\t * If the user is not turning, then follow the gyro using the GoStraight\n\t\t * command.\n\t\t */\n\t\t/*\n\t\t * if (Math.abs(turn) < 0.03) { Scheduler.getInstance().add(new\n\t\t * GoStraightCommand(Robot.chassisSubsystem.getCurrentAngle())); return;\n\t\t * }\n\t\t */\n\n\t\t/*\n\t\t * double defaultValue = 0; Robot.chassisSubsystem.resetGyroHeading();\n\t\t * double angle = Robot.oi.table.getNumber(\"angle\", defaultValue);\n\t\t * System.out.println(angle);\n\t\t * \n\t\t * if(Robot.oi.getAlignShotButton()) { Scheduler.getInstance().add(new\n\t\t * PivotToAngleCommand(angle)); return; }\n\t\t */\n\n\n\t\tdouble targetCenterX = 0;\n\t\tif (Robot.oi.getAutoAlignShotButton() && targetCenterX != RobotMap.NO_VISION_TARGET) {\n\t\t\tScheduler.getInstance().add(new AlignAndShootHighShotCommand(MatchPeriod.TELEOP));\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (Robot.oi.getManualAlignShotButton()) {\n\t\t\tScheduler.getInstance().add(new AlignAndShootHighShotCommand(MatchPeriod.TELEOP));\n\t\t\treturn;\n\t\t}\n\n\t\t// Use the driver input to set the speed and direction.\n\t\tif (Math.abs(speed) < 0.03) {\n\t\t\tleftSpeed = turn / 2.0;\n\t\t\trightSpeed = -turn / 2.0;\n\t\t} else {\n\t\t\tleftSpeed = (turn < 0.0) ? speed * (1.0 + turn) : speed;\n\t\t\trightSpeed = (turn < 0.0) ? speed : speed * (1.0 - turn);\n\t\t}\n\n\t\tRobot.chassisSubsystem.setSpeed(leftSpeed, rightSpeed);\n\t}",
"@Override\n protected void execute() {\n /*\n if (BuseSmartDashboard){\n double shooterRPMValue = SmartDashboard.getNumber(\"Shooter RPM\", 5000);\n Robot.shooter.setShooterRPM(shooterRPMValue);\n }\n else{\n Robot.shooter.setShooterRPM(RPM);\n }\n */\n Robot.shooter.setShooterRPM(RPM);\n\n \n SmartDashboard.putNumber(\"shooterRPM\", Robot.shooter.getShooterRPM() );\n if (Robot.shooter.getShooterRPM() >= RPM) {\n // We are at speed, Turn on feeders \n Robot.elevator.elevatorUp(0.4);\n Robot.hopper.hopperOut(0.3);\n Robot.intake.enableIntake(0.3);\n }\n\n }",
"public void defensive_act()\r\n\t{\r\n\t\tBullet closestBullet = IMAGINARY_BULLET;\r\n\t//\tBullet secondClosestBullet = IMAGINARY_BULLET;\r\n\t\t\r\n\t\tActor machines;\r\n\t\tEnumeration<Actor> opponent = ((MachineInfo)data.get(TankFrame.PLAYER_1)).getHashtable().elements();\r\n\t\twhile(opponent.hasMoreElements())\r\n\t\t{\r\n\t\t\tmachines = (Actor) opponent.nextElement();\r\n\t\t\tif(machines instanceof Bullet)\r\n\t\t\t{\r\n\t\t\t\tif(machines.getPoint().distance(getPoint()) < MIN_SHOOT_DISTANCE)\r\n\t\t\t\t{\r\n\t\t\t\t\tclosestBullet = (Bullet)machines;\r\n\t\t\t\t\tLine2D aim = new Line2D.Double(getCenterX(), getCenterY(), closestBullet.getPosX(), closestBullet.getPosY() );\r\n\t\t\t\t\tSystem.out.println(aim.getP1().distance(aim.getP2()));\r\n\t\t\t\t\tif(hasClearPath(aim) && aim.getP1().distance(aim.getP2()) < MIN_SHOOT_DISTANCE)\r\n\t\t\t\t\t\taimAndShoot(aim);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t/*\tif(machines.getPoint().distance(getPoint()) > secondClosestBullet.getPoint().distance(getPoint()) \r\n\t\t\t\t\t&& machines.getPoint().distance(getPoint()) < closestBullet.getPoint().distance(getPoint()))\r\n\t\t\t\t\tsecondClosestBullet = (Bullet)machines;*/\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t/*\r\n\t\t * Find the line\r\n\t\t */\r\n\t\t/*if(!closestBullet.equals(IMAGINARY_BULLET))\r\n\t\t{\r\n\t\t\tLine2D bulletPath = new Line2D(getLeftPoint(), closestBullet.getPoint());\r\n\t\t\tLine2D aim = new Line2D(getCenterX(), getCenterY(), (bulletPath.getX2()+bulletPath.getX1())/2,(bulletPath.getY2()+bulletPath.getY1())/2 );\r\n\t\t\tif(hasClearPath(aim) && aim.getP1().distance(aim.getP2()) < MIN_SHOOT_DISTANCE)\r\n\t\t\t\taimAndShoot(aim);\r\n\t\t\t/*bulletPath = new Line2D(getRightPoint(), closestBullet.getPoint());\r\n\t\t\taim = new Line2D(posX, posY, (bulletPath.getX2()+bulletPath.getX1())/2,(bulletPath.getY2()+bulletPath.getY1())/2 );\r\n\t\t\tif(hasClearPath(aim))\r\n\t\t\t\taimAndShoot(aim);\r\n\t\t\tbulletPath = new Line2D(getPoint(), closestBullet.getPoint());\r\n\t\t\taim = new Line2D(posX, posY, (bulletPath.getX2()+bulletPath.getX1())/2,(bulletPath.getY2()+bulletPath.getY1())/2 );\r\n\t\t\tif(hasClearPath(aim))\r\n\t\t\t\taimAndShoot(aim);*/\r\n\t\t\t\r\n\t\t//}\r\n\t/*\tif(!secondClosestBullet.equals(IMAGINARY_BULLET))\r\n\t\t{\r\n\t\t\tLine2D bulletPath = new Line2D(getLeftPoint(), secondClosestBullet.getPoint());\r\n\t\t\tLine2D aim = new Line2D(posX, posY, (bulletPath.getX2()+bulletPath.getX1())/2,(bulletPath.getY2()+bulletPath.getY1())/2 );\r\n\t\t\tif(hasClearPath(aim))\r\n\t\t\t\taimAndShoot(aim);\r\n\t\t}*/\r\n\r\n\t}",
"public static void render(Graphics g, Tile tile, Point pxCenterPoint, float value) {\n Point topLeft = new Point(pxCenterPoint.x - (tile.getImage().getWidth() / 2), pxCenterPoint.y - (tile.getImage().getHeight() / 2));\n if (value >= 0) {\n\n\n if (tile.getType() == \"Mountain\") {\n\n g.drawImage(GraphicAssets.col, topLeft.x, topLeft.y + 19 + 21, 60, tile.getImageHeight() / 2, null);\n g.drawImage(GraphicAssets.base, topLeft.x, topLeft.y + 19 + 19 + tile.getImageHeight() / 2, 60, 19, null);\n g.drawImage(tile.getImage(), topLeft.x, topLeft.y, tile.getImage().getWidth(), tile.getImage().getHeight(), null);\n\n } else if (tile.getType() == \"Water\" || tile.getType() == \"Grass\" || tile.getType() == \"Running\") {\n //\n //System.out.println(topLeft.y);\n g.drawImage(GraphicAssets.col, topLeft.x, topLeft.y + 10 + 19, 60, tile.getImageHeight() / 2, null);\n g.drawImage(GraphicAssets.base, topLeft.x, topLeft.y + 10 + 19 + tile.getImageHeight() / 2, 60, 19, null);\n g.drawImage(tile.getImage(), topLeft.x, topLeft.y + 10, tile.getImage().getWidth(), tile.getImage().getHeight(), null);\n } else {\n g.drawImage(GraphicAssets.col, topLeft.x, topLeft.y + 10 + 19, 60, tile.getImageHeight() / 2, null);\n g.drawImage(GraphicAssets.base, topLeft.x, topLeft.y + 10 + 19 + tile.getImageHeight() / 2, 60, 19, null);\n g.drawImage(tile.getImage(), topLeft.x, topLeft.y + 10, tile.getImage().getWidth(), tile.getImage().getHeight(), null);\n }\n if (tile.hasAreaEffect()) {\n areaEffectRenderer.render(g, tile.getAreaEffect(), topLeft);\n }\n\n if (tile.hasItem()) {\n for (Item item : tile.getItems()) {\n itemRenderer.render(g, item, topLeft);\n }\n }\n }\n }",
"protected void execute() {\r\n // read inputs\r\n double h_cmd = heightCmdFunct.getAsDouble(); //height above floor inches\r\n double l_cmd = extCmdFunct.getAsDouble(); //length from from pivot\r\n\r\n // If target is below pivot height, used for quadrant calcs\r\n boolean belowPiv = h_cmd < pivotHeight;\r\n h = Math.abs(pivotHeight - h_cmd); //h (inches) above or below piviot in mag\r\n \r\n //Roughly limit the extension based on game limits and robot geometry\r\n xProjection = MathUtil.limit(l_cmd, Robot.arm.MIN_PROJECTION, Robot.arm.MAX_PROJECTION);\r\n\r\n double tanRatio = (belowPiv) ? h / xProjection : xProjection / h;\r\n // Rotate to maintain height as projection changes\r\n double angle = Math.toDegrees(Math.atan(tanRatio));\r\n angle -= (belowPiv) ? 90.0 : 0.0;\r\n\r\n angle = MathUtil.limit(angle, Robot.arm.PHI_MIN, Robot.arm.PHI_MAX); \r\n \r\n double projLen= Math.sqrt( h*h + xProjection * xProjection); //total length of arm, from pivot point\r\n double ext = projLen - (Robot.arm.ARM_BASE_LENGTH + Robot.arm.WRIST_LENGTH); // extension required\r\n \r\n double compLen = Robot.arm.getCompLen(angle);\r\n\r\n //limit within range, TODO: do we need to account for phi/ext interaction here?\r\n ext = MathUtil.limit(ext, Robot.arm.EXTEND_MIN, Robot.arm.EXTEND_MAX);\r\n\r\n // Extend to allow for change in projection\r\n Robot.arm.setExtension(ext); //absolute ext needed projection\r\n Robot.arm.setAngle(angle); //angle required for height\r\n /*\r\n * Alternative extension calculation xProjection /\r\n * Math.cos(Robot.arm.getAngle()) - armInitialLength\r\n */\r\n }",
"public GameObject spawnCarrier(LogicEngine in_logicEngine, float in_x , CARRIER_TYPE in_type)\r\n\t{\n\t\tGameObject ship = new GameObject(\"data/\"+GameRenderer.dpiFolder+\"/thrusterboss.png\",in_x,LogicEngine.SCREEN_HEIGHT+64,30);\r\n\t\t\r\n\t\t\r\n\t\t//set animation frame\r\n\t\tship.i_animationFrame=4;\r\n\t\tship.i_animationFrameRow=0;\r\n\t\tship.i_animationFrameSizeWidth=32;\r\n\t\tship.i_animationFrameSizeHeight=132;\r\n\t\t\r\n\t\tSimplePathfollowing followPathBehaviour = new SimplePathfollowing();\r\n\t\t//pause at the first waypoint\r\n\t\tfollowPathBehaviour.waitAtWaypoint(1, 50);\r\n\t\t\r\n\t\tfollowPathBehaviour.setInfluence(1);\r\n\t\tfollowPathBehaviour.setAttribute(\"arrivedistance\", \"50\", null);\r\n\t\t\r\n\t\tfollowPathBehaviour.waitAtWaypoint(1, 300);\r\n\t\t\r\n\t\t//go straight down then split\r\n\t\tship.v.addWaypoint(new Point2d(in_x, LogicEngine.SCREEN_HEIGHT/1.5));\r\n\t\tship.v.addWaypoint(new Point2d(in_x,-100));\r\n\t\t\r\n\t\tCustomBehaviourStep b = new CustomBehaviourStep(followPathBehaviour);\r\n\t\t\r\n\t\t//turret\r\n\t\t//turret\r\n\t\tDrawable turret = new Drawable();\r\n\t\tturret.i_animationFrame = 6;\r\n\t\tturret.i_animationFrameSizeWidth=16;\r\n\t\tturret.i_animationFrameSizeHeight=16;\r\n\t\tturret.str_spritename = \"data/\"+GameRenderer.dpiFolder+\"/gravitonlevel.png\";\r\n\t\tturret.f_forceRotation = 90;\r\n\t\tship.shotHandler = new TurretShot(turret,\"data/\"+GameRenderer.dpiFolder+\"/redbullets.png\",6,5.0f);\r\n\t\tship.visibleBuffs.add(turret);\r\n\t\t\r\n\t\tship.v.setMaxForce(1);\r\n\t\tship.v.setMaxVel(1);\r\n\t\t\r\n\t\tship.stepHandlers.add(b);\r\n\t\t\r\n\t\tHitpointShipCollision s;\r\n\t\tif(!Difficulty.isHard())\r\n\t\t\t s = new HitpointShipCollision(ship, 160, 32);\r\n\t\telse\r\n\t\t\t s = new HitpointShipCollision(ship, 125, 32);\r\n\t\t\t\r\n\t\ts.setExplosion(Utils.getBossExplosion(ship));\r\n\t\tship.collisionHandler = s; \r\n\t\r\n\t\t//TODO:launch ships handler for shooting\r\n\t\tif(in_type == CARRIER_TYPE.PATHFINDERS_BOTH_SIDES)\r\n\t\t{\r\n\t\t\tship.stepHandlers.add(new LaunchShipsStep(pathFinder(true), 50, 5, 5,true));\r\n\t\t\tship.stepHandlers.add(new LaunchShipsStep(pathFinder(false), 50, 5, 5,false));\r\n\t\t}\r\n\t\telse\r\n\t\t\tif(in_type == CARRIER_TYPE.PATHFINDERS_RIGHT_ONLY)\r\n\t\t\t{\r\n\t\t\t\tship.stepHandlers.add(new LaunchShipsStep(pathFinder(true), 50, 5, 5,true));\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\tif(in_type == CARRIER_TYPE.PATHFINDERS_LEFT_ONLY)\r\n\t\t\t\t{\r\n\t\t\t\t\tship.stepHandlers.add(new LaunchShipsStep(pathFinder(false), 50, 5, 5,false));\r\n\t\t\t\t}\r\n\t\t\t\t\t\t \r\n\t\tship.allegiance = GameObject.ALLEGIANCES.ENEMIES;\r\n\t\t\r\n\t\tin_logicEngine.objectsEnemies.add(ship);\r\n\t\t\r\n\t\treturn ship;\r\n\t\r\n\t}",
"private TargetInformation findHighGoal(Mat image) {\r\n\t\tTargetInformation ret = new TargetInformation();\r\n\t\tret.targetingPeg = false;\r\n\t\t\r\n long[] xsums = sums(image, true);\r\n long[] ysums = sums(image, false);\r\n \r\n\t List<PeakLoc> xpeaks = findPeaks(xsums, 10);\r\n\t List<PeakLoc> ypeaks = findPeaks(ysums, 10);\r\n\r\n\t if (ypeaks.size() == 2 && xpeaks.size() > 0) {\r\n\t \tret.targetFound = true;\r\n\t \tret.x = (xpeaks.get(0).getStop() - xpeaks.get(0).getStart()) / 2;\r\n\t \tret.gap = ypeaks.get(1).getStart() - ypeaks.get(0).getStop();\r\n\t \tret.width = xpeaks.get(0).getStop() - xpeaks.get(0).getStart();\r\n\t \tret.height = ypeaks.get(1).getStop() - ypeaks.get(0).getStart();\r\n\t \tret.y = (ypeaks.get(0).getStop() + ypeaks.get(1).getStart())/2;\r\n\t \t\r\n\t \tdouble pixelsPerInch = ret.gap / highGoalGapInches;\r\n\t \tif (xpeaks.get(0).isTruePeak() && xpeaks.get(1).isTruePeak())\r\n\t \t{\r\n\t \t\tpixelsPerInch = (pixelsPerInch + ret.width / highGoalWidthInches) / 2;\r\n\t \t}\r\n\t \tif (ypeaks.get(0).isTruePeak())\r\n\t \t{\r\n\t \t\tif (xpeaks.get(0).isTruePeak() && xpeaks.get(1).isTruePeak())\r\n\t \t\t{\r\n\t \t\t\tpixelsPerInch = (pixelsPerInch * 2 + ret.width / highGoalHeightInches) / 3;\r\n\t \t\t}\r\n\t \t\telse\r\n\t \t\t{\r\n\t \t\t\tpixelsPerInch = (pixelsPerInch + ret.width / highGoalHeightInches) / 2;\r\n\t \t\t}\r\n\t \t} \t\r\n\t \t\r\n\t \tret.aimX = ret.x + (cameraOffsetInches - shooterOffsetInches) * pixelsPerInch;\r\n\t \t\r\n\t \tret.correctionAngle = (double)((ret.aimX - image.cols() / 2)) / pixelsPerXDegree;\r\n\t }\r\n\t else\r\n\t {\r\n\t \tret.targetFound = false;\r\n\t }\r\n\t \r\n\t return ret;\r\n\t}",
"protected void execute() {\n \n \t\n \t \n \t\n \n System.out.println((Timer.getFPGATimestamp()- starttime ) + \",\" + (RobotMap.motorLeftTwo.getEncPosition()) + \",\"\n + (RobotMap.motorLeftTwo.getEncVelocity()*600)/-4096 + \",\" + RobotMap.motorRightTwo.getEncPosition() + \",\" + (RobotMap.motorRightTwo.getEncVelocity()*600)/4096);\n \n /*if(endpoint > 0){\n cruiseVelocityLeft = (float) (this.initCruiseVelocityLeft+ angleorientation.getResult());\n cruiseVelocityRight = (float) (this.initCruiseVelocityRight - angleorientation.getResult());\n }\n if(endpoint <= 0){\n cruiseVelocityLeft = (float) (this.initCruiseVelocityLeft- angleorientation.getResult());\n cruiseVelocityRight = (float) (this.initCruiseVelocityRight + angleorientation.getResult());\n }*/\n System.out.println(this.motionMagicEndPoint*4096 + RobotMap.motorLeftTwo.getEncPosition() + \"l\");\n System.out.println(this.motionMagicEndPoint*4096 - RobotMap.motorRightTwo.getEncPosition() + \"r\");\n \n \n \t if(RobotMap.motorLeftTwo.getEncVelocity()!= velocityLeft)\n velocityLeft = RobotMap.motorLeftTwo.getEncVelocity(); \n velocityRight = RobotMap.motorRightTwo.getEncVelocity();\n SmartDashboard.putNumber(\"LeftWheelError\", (this.motionMagicEndPoint*4096 + RobotMap.motorLeftTwo.getEncPosition()));\n SmartDashboard.putNumber(\"RightWheelError\",(this.motionMagicEndPoint*4096 - RobotMap.motorRightTwo.getEncPosition()));\n SmartDashboard.putNumber(\"LeftWheelVelocity\", (RobotMap.motorLeftTwo.getEncVelocity())*600/4096);\n SmartDashboard.putNumber(\"RightWheelVelocity\",(RobotMap.motorRightTwo.getEncVelocity()*600)/4096);\n \n \n count++;\n \tangleorientation.updatePID(RobotMap.navx.getAngle());\n }",
"@Override\n public void teleopPeriodic() {\n \n boolean targetFound = false; \n int Xpos = -1; int Ypos = -1; int Height = -1; int Width = -1; Double objDist = -1.0; double []objAng = {-1.0,-1.0};\n\n //Getting the number of blocks found\n int blockCount = pixy.getCCC().getBlocks(false, Pixy2CCC.CCC_SIG1, 25);\n\t\tSystem.out.println(\"Found \" + blockCount + \" blocks!\"); // Reports number of blocks found\n\t\tif (blockCount <= 0) {\n System.err.println(\"No blocks found\");\n }\n ArrayList <Block> blocks = pixy.getCCC().getBlocks();\n Block largestBlock = null;\n\n //verifies the largest block and store it in largestBlock\n for (Block block:blocks){\n if (block.getSignature() == Pixy2CCC.CCC_SIG1) {\n\n\t\t\t\tif (largestBlock == null) {\n\t\t\t\t\tlargestBlock = block;\n\t\t\t\t} else if (block.getWidth() > largestBlock.getWidth()) {\n\t\t\t\t\tlargestBlock = block;\n }\n\t\t\t}\n }\n //loop\n while (pixy.getCCC().getBlocks(false, Pixy2CCC.CCC_SIG1, 25)>=0 && ButtonLB){\n\n if (largestBlock != null){\n targetFound = true; \n Xpos = largestBlock.getX();\n Ypos = largestBlock.getY();\n Height = largestBlock.getHeight();\n Width = largestBlock.getWidth();\n\n objDist = RobotMap.calculateDist((double)Height, (double)Width, (double)Xpos, (double)Ypos);\n objAng = RobotMap.calculateAngle(objDist, Xpos, Ypos);\n \n }\n //print out values to Dashboard\n SmartDashboard.putBoolean(\"Target found\", targetFound);\n SmartDashboard.putNumber (\"Object_X\", Xpos);\n SmartDashboard.putNumber (\"Object_Y\", Ypos);\n SmartDashboard.putNumber (\"Height\", Height);\n SmartDashboard.putNumber(\"Width\", Width);\n SmartDashboard.putNumber (\"Distance\", objDist);\n SmartDashboard.putNumber(\"X Angle\", objAng[0]);\n SmartDashboard.putNumber(\"Y Angle\", objAng[1]);\n }\n }",
"public GameObject spawnBomber(LogicEngine in_logicEngine){\n\t\tGameObject ship = new GameObject(\"data/\"+GameRenderer.dpiFolder+\"/bomber.png\",((float)LogicEngine.SCREEN_WIDTH)+50,LogicEngine.SCREEN_HEIGHT-50,0);\r\n\t\tship.i_animationFrameSizeHeight = 58;\r\n\t\tship.i_animationFrameSizeWidth = 58;\r\n\t\t\r\n\t\t//fly back and forth\r\n\t\tLoopWaypointsStep s = new LoopWaypointsStep();\r\n\t\ts.waypoints.add(new Point2d(-30,LogicEngine.SCREEN_HEIGHT-50));\r\n\t\ts.waypoints.add(new Point2d(LogicEngine.SCREEN_WIDTH+50,LogicEngine.SCREEN_HEIGHT-50));\r\n\t\t\r\n\t\tship.b_mirrorImageHorizontal = true;\r\n\t\t\r\n\t\tship.stepHandlers.add(s);\r\n\t\tship.v.setMaxForce(5.0f);\r\n\t\tship.v.setMaxVel(5.0f);\r\n\t\tship.allegiance = GameObject.ALLEGIANCES.ENEMIES;\r\n\r\n\r\n\t\t//tadpole bullets\r\n\t\tGameObject go_tadpole = this.spawnTadpole(in_logicEngine);\r\n\t\tgo_tadpole.stepHandlers.clear();\r\n\t\tFlyStraightStep fly = new FlyStraightStep(new Vector2d(0,-0.5f));\r\n\t\tfly.setIsAccelleration(true);\r\n\t\t\r\n\t\t\r\n\t\tif(Difficulty.isHard())\r\n\t\t{\tgo_tadpole.v.setMaxVel(5);\r\n\t\t\tgo_tadpole.v.setMaxForce(5);\r\n\t\t}\r\n\t\telse\r\n\t\t{\tgo_tadpole.v.setMaxVel(10);\r\n\t\t\tgo_tadpole.v.setMaxForce(5);\r\n\t\t}\r\n\t\tgo_tadpole.stepHandlers.add(fly);\r\n\t\tgo_tadpole.v.setVel(new Vector2d(-2.5f,0f));\r\n\t\t\r\n\t\t\r\n\t\t//bounce on hard and medium\r\n\t\tif(Difficulty.isHard() || Difficulty.isMedium())\r\n\t\t{\r\n\t\t\tBounceOfScreenEdgesStep bounce = new BounceOfScreenEdgesStep();\r\n\t\t\tbounce.b_sidesOnly = true;\r\n\t\t\tgo_tadpole.stepHandlers.add(bounce);\r\n\t\t}\r\n\t\t\r\n\t\t//drop bombs\r\n\t\tLaunchShipsStep launch = new LaunchShipsStep(go_tadpole, 20, 5, 3, true);\r\n\t\tlaunch.b_addToBullets = true;\r\n\t\tlaunch.b_forceVelocityChangeBasedOnParentMirror = true;\r\n\t\t\r\n\t\tship.stepHandlers.add(launch);\r\n\t\tship.rotateToV=true;\r\n\t\t\r\n\t\t//give it some hp\r\n\t\tHitpointShipCollision c = new HitpointShipCollision(ship, 50, 50f);\r\n\t\tc.setSimpleExplosion();\r\n\t\tship.collisionHandler = c;\r\n\t\t\r\n\t\tin_logicEngine.objectsEnemies.add(ship);\r\n\t\t\r\n\t\treturn ship;\r\n\t\r\n\t}",
"private double[] genHealthAndSpeed() {\n double multiplier = genMultiplier();\n double[] healthAndSpeed = new double[2]; //0 for health, 1 for speed\n healthAndSpeed[0] = (100+currentDifficulty)*multiplier;\n healthAndSpeed[1] = 2*(1+(1-multiplier));\n return healthAndSpeed;\n }",
"public interface AI {\n\n /**\n * Sets the new enemy position.\n * @param pos the new enemy position\n */\n void setEnemyPos(Point2D pos);\n\n /**\n * Returns the new position for the enemy to\n * move to.\n * @param target the position that wants to be tracked\n * @param pursuit the state in which the enemy is in\n * @param map\n * @return the position to move to\n */\n Point2D getNextMove(Point2D target, boolean pursuit, Set<Point2D> map);\n\n /**\n * Returns the new enemy rotation based on the\n * state in which the enemy is in.\n * @param target the position that wants to be tracked\n * @param pursuit the state in which the enemy is in\n * @return the angle that the enemy should face\n */\n double getRotation(Point2D target, boolean pursuit);\n\n /**\n * Returns if the enemy is in pursuit of the target\n * by calculating if the noise radius overlap with the\n * two.\n * @param target the position that wants to be tracked\n * @param noise the radius of the noise made by a player action\n * @return the state in which the enemy will be in\n * @see Player\n */\n boolean isInPursuit(Point2D target, double noise);\n\n /**\n * Returns if the enemy has the {@code target} in line of\n * sight and is close enough to get the enemy attention\n * to shoot.\n * @param target the position that wants to be tracked\n * @return the action that should be performed by the enemy\n */\n boolean isShooting(Point2D target);\n\n /**\n * Returns the collection of all position to check\n * if target is obscured by a wall used to JUnit\n * tests purpose.\n * @return the collections of all wall objects position\n */\n Set<Point2D> getWallSet();\n\n}",
"public TETile[][] interactWithInputString(String input) {\n // passed in as an argument, and return a 2D tile representation of the\n // world that would have been drawn if the same inputs had been given\n // to interactWithKeyboard().\n //\n // See proj3.byow.InputDemo for a demo of how you can make a nice clean interface\n // that works for many different input types.\n// TERenderer ter = new TERenderer();\n// ter.initialize(WIDTH, HEIGHT);\n//\n// Long result = Long.parseLong(input);\n// long seed = result;\n// GameWorld world = new GameWorld(seed);\n// for (int x = 0; x < WIDTH; x += 1) {\n// for (int y = 0; y < HEIGHT; y += 1) {\n// world.world[x][y] = Tileset.NOTHING;\n// }\n// }\n// world.buildManyRandomSq();\n//// ter.renderFrame(world.world);\n// return world.world;\n return takeActionIS(input);\n // passed in as an argument, and return a 2D tile representation of the\n // world that would have been drawn if the same inputs had been given\n // to interactWithKeyboard().\n //\n // See proj3.byow.InputDemo for a demo of how you can make a nice clean interface\n // that works for many different input types.\n// TERenderer ter = new TERenderer();\n// ter.initialize(WIDTH, HEIGHT);\n// String str = input;\n// String[] arrofString = str.split(\"\", input.length());\n// String num = \"\";\n// for (int i = 0; i < arrofString.length; i++) {\n// if ((i == 0 && arrofString[i].equals(\"N\") || arrofString[i].equals(\"n\"))) {\n// continue;\n// } else if (i == arrofString.length - 1) {\n// if (arrofString[i].equals(\"S\") || arrofString[i].equals(\"s\")) {\n// continue;\n// }\n// } else {\n// num += arrofString[i];\n// }\n// }\n//\n// Long result = Long.parseLong(num);\n// long seed = result;\n// GameWorld world = new GameWorld(seed);\n// for (int x = 0; x < WIDTH; x += 1) {\n// for (int y = 0; y < HEIGHT; y += 1) {\n// world.world[x][y] = Tileset.NOTHING;\n// }\n// }\n// world.buildManyRandomSq();\n//// ter.renderFrame(world.world);\n// return world.world;\n\n }",
"Entity getShooter();",
"@Override\n public void calEscalator(String lineCode, Integer plateEscalatorNum,\n List<Integer> exportNumber, List<Integer> transferOutNumber,\n Double walkSpeed, Double plateformLength,\n Double upEscalatorWidth, Double floorWidth,\n String stationNameCode, PressureTimeTypeEnum pressureTimeTypeEnum) {\n\n List<PressureLevelResult> pressureLevelResultList = new ArrayList<>();\n\n for ( int i = 0; i < 8; i++ ) {\n\n Integer w = exportNumber.get(i);\n\n // 有换乘的加上换乘数据\n if ( transferOutNumber.size() > 0 )\n w += transferOutNumber.get(i);\n\n // 15min内,每组楼梯和扶梯服务的乘客数\n Integer q = w / plateEscalatorNum;\n // 输入时间\n Double t0 = plateformLength / ( 2 * plateEscalatorNum * walkSpeed );\n // 输入率\n Double lamda = 2 * w * walkSpeed / plateformLength;\n // 自动扶梯通过能力\n Double cEscalator = 2.25;\n // 楼梯通过能力\n Double cFloor = 0.89;\n\n // 排队系统输出率\n Double u = cEscalator * upEscalatorWidth / plateEscalatorNum + cFloor * floorWidth / plateEscalatorNum;\n\n // 输出时间\n Double t1 = w / ( plateEscalatorNum * u );\n\n // 最大排队乘客数Q = q1 - q0\n Double qMax = lamda * t0 - u * t0;\n\n // 排队中最大延误时间 ts\n Double ts = t1 - t0;\n\n // 平均排队乘客数Q\n Double qAvg = 0.5 * ( lamda - u ) * t0;\n\n // 排队乘客总的延误时间D\n\n Double result = qAvg * ts / 60;\n\n System.out.println( \"排队乘客总的延误时间D \" + result );\n\n\n PressureLevelResult pressureLevelResult = getPressureLevelResult(lineCode, stationNameCode,\n i, result, calEscalatorLevel( result ), PressureTypeEnum.Escalator,\n pressureTimeTypeEnum);\n\n pressureLevelResultList.add( pressureLevelResult );\n\n }\n\n// escalatorMap.put( \"line\" + lineCode, resultList );\n\n // 删除原来的 暂时从简\n savePressureResultData(lineCode, stationNameCode,\n pressureLevelResultList, PressureTypeEnum.Escalator, pressureTimeTypeEnum);\n\n }",
"public Field.Fieldelements placeShotComputer() {\r\n int sizeX = this.fieldUser.getSizeX();\r\n int sizeY = this.fieldUser.getSizeY();\r\n \r\n // probability that a field contains a ship (not in percent, 1000 is best)\r\n double[][] probability = new double[sizeX][sizeY];\r\n double sumProbability = 0;\r\n \r\n for (int posX = 0; posX < sizeX; posX++) {\r\n for (int posY = 0; posY < sizeY; posY++) {\r\n // set probability for each field to 1\r\n probability[sizeX][sizeY] = 1.;\r\n \r\n // check neighbouring fields for hits and set probability to 1000\r\n if (Field.Fieldelements.HIT == fieldUser.getFieldStatus(posX, posY - 1) ||\r\n Field.Fieldelements.HIT == fieldUser.getFieldStatus(posX, posY + 1) ||\r\n Field.Fieldelements.HIT == fieldUser.getFieldStatus(posX - 1, posY) ||\r\n Field.Fieldelements.HIT == fieldUser.getFieldStatus(posX + 1, posY)) {\r\n probability[posX][posY] = 1000;\r\n }\r\n \r\n // 0 points if all fields above and below are SUNK or SHOT\r\n if ((Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX, posY - 1) || Field.Fieldelements.WATER == fieldUser.getFieldStatus(posX, posY - 1)) &&\r\n (Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX, posY + 1) || Field.Fieldelements.WATER == fieldUser.getFieldStatus(posX, posY + 1)) &&\r\n (Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX - 1, posY) || Field.Fieldelements.WATER == fieldUser.getFieldStatus(posX - 1, posY)) &&\r\n (Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX + 1, posY) || Field.Fieldelements.WATER == fieldUser.getFieldStatus(posX + 1, posY))\r\n ) {\r\n probability[posX][posY] = 0;\r\n }\r\n \r\n // 0 points if a neighbouring field is SUNK\r\n if (Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX - 1, posY - 1) ||\r\n Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX - 1, posY) ||\r\n Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX - 1, posY + 1) ||\r\n Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX, posY - 1) ||\r\n Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX, posY + 1) ||\r\n Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX + 1, posY - 1) ||\r\n Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX + 1, posY) ||\r\n Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX + 1, posY + 1)\r\n ) {\r\n probability[posX][posY] = 0;\r\n }\r\n \r\n // 0 points if top right, top left, bottom right or bottom left is HIT\r\n if (Field.Fieldelements.HIT == fieldUser.getFieldStatus(posX - 1, posY - 1) ||\r\n Field.Fieldelements.HIT == fieldUser.getFieldStatus(posX - 1, posY + 1) ||\r\n Field.Fieldelements.HIT == fieldUser.getFieldStatus(posX + 1, posY - 1) ||\r\n Field.Fieldelements.HIT == fieldUser.getFieldStatus(posX + 1, posY + 1)\r\n ) {\r\n probability[posX][posY] = 0;\r\n }\r\n \r\n // 0 points if a shot has already been placed\r\n if (Field.Fieldelements.WATER != fieldUser.getFieldStatus(posX, posY) &&\r\n Field.Fieldelements.SHIP != fieldUser.getFieldStatus(posX, posY)) {\r\n probability[posX][posY] = 0;\r\n }\r\n }\r\n }\r\n \r\n // calculate sum of all points\r\n // TODO check if probability must be smaller numbers\r\n for (int posX = 0; posX < sizeX; sizeX++) {\r\n for (int posY = 0; posY < sizeY; posY++) {\r\n sumProbability += probability[posX][posY];\r\n }\r\n }\r\n \r\n // random element\r\n Random random = new Random();\r\n sumProbability = random.nextInt((int) --sumProbability);\r\n sumProbability++; // must at least be 1\r\n int posY = -1;\r\n int posX = -1;\r\n while (posY < sizeY - 1 && sumProbability >= 0) {\r\n posY++;\r\n posX = -1;\r\n while (posX < sizeX && sumProbability >= 0) {\r\n posX++;\r\n sumProbability = sumProbability - probability[posX][posY];\r\n }\r\n }\r\n return fieldUser.shoot(posX, posY);\r\n }",
"Optional<UUID> getShooter(UUID projectile);",
"public static void main(String[] args) {\n MeepMeep mm = new MeepMeep(800)\n // Set field image\n .setBackground(MeepMeep.Background.FIELD_ULTIMATE_GOAL_DARK)\n // Set theme\n .setTheme(new ColorSchemeRedDark())\n // Background opacity from 0-1\n .setBackgroundAlpha(1f)\n // Set constraints: maxVel, maxAccel, maxAngVel, maxAngAccel, track width\n .setConstraints(99, 30, Math.toRadians(37.74), Math.toRadians(60), 37)\n .followTrajectorySequence(drive ->\n drive.trajectorySequenceBuilder(new Pose2d(-60, 48, 0))\n .lineTo(new Vector2d(56, 48))\n .addTemporalMarker(15.0,() -> {\n // do stuff\n })\n// .lineToConstantHeading(new Vector2d(56, 48))\n //drop wobble\n// .lineToConstantHeading(new Vector2d(56, 19))\n .addDisplacementMarker(() -> {\n // drop wobble goal\n //return Unit.INSTANCE;\n })\n .waitSeconds(1.5)\n // Get to wobble goal\n .lineToSplineHeading(new Pose2d(-12, 19, Math.toRadians(0)))\n // slowly approach wobble goal\n .lineTo(new Vector2d(-27, 19), new TranslationalVelocityConstraint(5))\n // grab wobble goal\n .addDisplacementMarker(() -> {\n // grab wobble goal\n //return Unit.INSTANCE;\n })\n .waitSeconds(2.0)\n .strafeTo(new Vector2d(56, 19))\n .lineToLinearHeading(new Pose2d(56, 36, Math.toRadians(-90)))\n .addDisplacementMarker(() -> {\n // drop wobble goal\n //return Unit.INSTANCE;\n })\n .strafeTo(new Vector2d(56, 30))\n .strafeTo(new Vector2d(12, 30))\n .waitSeconds(1.0)\n .build()\n )\n .start();\n\n/*\n\n .lineTo(new Vector2d(12, 48))\n .splineToConstantHeading(new Vector2d(12, 19), Math.toRadians(0))\n .splineToConstantHeading(new Vector2d(-18, 19), Math.toRadians(0))\n .lineTo(\n new Vector2d(-27, 19)\n// SampleMecanumDrive.getVelocityConstraint(slowerVelocity, DriveConstants.MAX_ANG_VEL, DriveConstants.TRACK_WIDTH),\n// SampleMecanumDrive.getAccelerationConstraint(DriveConstants.MAX_ACCEL)\n )\n .splineToConstantHeading(new Vector2d(12, 19), Math.toRadians(0))\n .splineToLinearHeading(new Pose2d(12, 36, Math.toRadians(-90)), Math.toRadians(0))\n .start()\n */\n }",
"@Override\r\n\tpublic Projectile getProjectile(int yield) {\r\n\t\treturn new BazookaProjectile(getWorm(), yield);\r\n\t}",
"public Pile getExhaustPile(){\n return piles.getExhaustPile();\n }",
"@SuppressWarnings(\"unused\")\n\tpublic void execute(){\n\t\tdouble mtrFrontRight;\n\t\tdouble mtrFrontLeft;\n\t\tdouble mtrBackRight;\n\t\tdouble mtrBackLeft;\n\t\t\n\t\tdouble speed = 3.0; //The variable we are assigning\n\t\tdouble yawHeading = 0; //Obtained from Robot class\n\t\t\n\t\tdouble getCurrentSetPoint = 0.0; //This Will be obtained via a variable set in the turn to heading class as it is obtained. (possible issues)\n\t\tdouble actualEncoderSetpoint; //Represents the value the encoder is actually at.\n\t\t\n\t\tdouble zeroHeading; //This is a weird one. it is there because of the odd difference calculations issue of say being 5 off of zero and heading being 355;\n\t\t\n\t\t\n\t\t//Switch structure stuff\n\t\tint forward = 0;\n\t\tint left = 1;\n\t\tint right = 2;\n\t\tint state = forward;\n\t\t\n\t\t\n\t\tif(getCurrentSetPoint == 0) {\n\t\t\tstate = forward;\n\t\t} else if(getCurrentSetPoint == 90) {\n\t\t\tstate = right;\n\t\t} else if(getCurrentSetPoint == 270) {\n\t\t\tstate = left;\n\t\t}\n\t\t\n\t\t//where the weirdness of zero heading comes into play.\n\t\tif(yawHeading > 180){\n\t\t\tzeroHeading = 360 - yawHeading;\n\t\t\tzeroHeading = -(zeroHeading);\n\t\t} else {\n\t\t\tzeroHeading = yawHeading;\n\t\t}\n\t\t\n\t\t//Here comes the fun math.\n\t\t// oh yeah and brackets are fun just saying.\n\t\t//try not to get cancer.\n\t\t\n\t\tswitch (state) {\n\t\t\t\n\t\t\tcase 0 :\n\t\t\t\tif(zeroHeading < -5) {\n\t\t\t\t\tmtrFrontRight = -(speed - ((-zeroHeading * Math.pow(10, -1)) * .3) );\n\t\t\t\t\tmtrBackRight = -(speed - ((-zeroHeading * Math.pow(10, -1)) * .3) );\n\t\t\t\t} else {\n\t\t\t\t\tmtrFrontRight = -speed;\n\t\t\t\t\tmtrBackRight = -speed;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(zeroHeading > 5) {\n\t\t\t\t\tmtrFrontLeft = speed - ((zeroHeading * Math.pow(10, -1)) * .3);\n\t\t\t\t\tmtrBackLeft = speed - ((zeroHeading * Math.pow(10, -1)) * .3);\n\t\t\t\t} else {\n\t\t\t\t\tmtrFrontLeft = speed;\n\t\t\t\t\tmtrBackLeft = speed;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\tcase 1 :\n\t\t\t\tif(zeroHeading > 5) {\n\t\t\t\t\t\tmtrBackRight = -(speed - ((zeroHeading * Math.pow(10, -1)) * .3) );\n\t\t\t\t\t\tmtrBackLeft = speed - ((zeroHeading * Math.pow(10, -1)) * .3);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmtrBackRight = -speed;\n\t\t\t\t\t\tmtrBackLeft = speed;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(zeroHeading < -5) {\n\t\t\t\t\t\tmtrFrontRight = -(speed - ((-zeroHeading * Math.pow(10, -1)) * .3) );\n\t\t\t\t\t\tmtrFrontLeft = speed - ((-zeroHeading * Math.pow(10, -1)) * .3);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmtrFrontRight = -speed;\n\t\t\t\t\t\tmtrFrontLeft = speed;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\tcase 2 : \n\t\t\t\tif(zeroHeading < -5) {\n\t\t\t\t\tmtrBackRight = -(speed - ((-zeroHeading * Math.pow(10, -1)) * .3) );\n\t\t\t\t\tmtrBackLeft = speed - ((-zeroHeading * Math.pow(10, -1)) * .3);\n\t\t\t\t} else {\n\t\t\t\t\tmtrBackRight = -speed;\n\t\t\t\t\tmtrBackLeft = speed;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(zeroHeading > 5) {\n\t\t\t\t\tmtrFrontRight = -(speed - ((zeroHeading * Math.pow(10, -1)) * .3) );\n\t\t\t\t\tmtrFrontLeft = speed - ((zeroHeading * Math.pow(10, -1)) * .3);\n\t\t\t\t} else {\n\t\t\t\t\tmtrFrontRight = -speed;\n\t\t\t\t\tmtrFrontLeft = speed;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t}\n\t}",
"protected long getAvailableData_EM() {\n long result = 0;\n IGregTechTileEntity baseMetaTileEntity = getBaseMetaTileEntity();\n Vec3Impl pos = new Vec3Impl(baseMetaTileEntity.getXCoord(), baseMetaTileEntity.getYCoord(), baseMetaTileEntity.getZCoord());\n for (GT_MetaTileEntity_Hatch_InputData in : eInputData) {\n if (in.q != null) {\n Long value = in.q.contentIfNotInTrace(pos);\n if (value != null) {\n result += value;\n }\n }\n }\n return result;\n }",
"public void spawnWanderingSeeker(LogicEngine in_logicEngine)\r\n\t{\n\t\tGameObject ship = new GameObject(\"data/\"+GameRenderer.dpiFolder+\"/triangle.png\",(float)LogicEngine.SCREEN_WIDTH*Math.random(),LogicEngine.SCREEN_HEIGHT-10,0);\r\n\t\t\t\t\r\n\t\t//set animation frame\r\n\t\tship.i_animationFrame=1;\r\n\t\tship.i_animationFrameRow=0;\r\n\t\tship.i_animationFrameSizeWidth=16;\r\n\t\tship.i_animationFrameSizeHeight=16;\r\n\t\t\r\n\t\t//wander \t\r\n\t\tCustomBehaviourStep cb = new CustomBehaviourStep(new Wander(-2.5,2.5,20,0.1));\r\n\t\tship.stepHandlers.add( cb);\r\n\t\t\r\n\t\t//chase player if on medium or hard\r\n\t\tif(Difficulty.difficulty == DIFFICULTY.MEDIUM || \r\n\t\t\t\tDifficulty.difficulty == DIFFICULTY.HARD)\r\n\t\t{\t\r\n\t\t\tSeekNearestPlayerStep sps = new SeekNearestPlayerStep(100);\r\n\t\t\tship.stepHandlers.add(sps);\r\n\t\t}\r\n\t\r\n\t\tship.stepHandlers.add(new FlyStraightStep(new Vector2d(0,-2)));\r\n\t\tship.collisionHandler = new DestroyIfEnemyCollision(ship, 10, true);\r\n\t\tship.v.setMaxForce(2);\r\n\t\tship.v.setMaxVel(2);\r\n\t\t\r\n\t\tship.allegiance = GameObject.ALLEGIANCES.ENEMIES;\r\n\t\t\r\n\t\tin_logicEngine.objectsEnemies.add(ship);\r\n\t\t\r\n\t}",
"public abstract double emissionFunction(double oilamount);",
"public abstract double emissionFunction(double oilamount);",
"public int[] shoot(){\n\t\tint[] shot = new int[2];\n\t\t@SuppressWarnings(\"resource\")\n\t\tScanner input = new Scanner(System.in);\n\t\t\n\t\tSystem.out.print(\"Column: \");\n\t\tshot[0] = input.nextInt() - 1;\n\t\tSystem.out.print(\"Row: \");\n\t\tshot[1] = input.nextInt() - 1;\n\t\t\n\t\treturn shot;\n\t}",
"public void spawnSateliteShip(LogicEngine in_logicEngine,float in_x)\r\n\t{\n\t\tGameObject ship = new GameObject(\"data/\"+GameRenderer.dpiFolder+\"/gravitonlevel.png\",in_x,LogicEngine.SCREEN_HEIGHT,1);\r\n\t\tship.i_animationFrameSizeWidth = 64;\r\n\t\tship.i_animationFrameSizeHeight = 32;\r\n\t\tship.i_animationFrame = 2;\r\n\t\tship.allegiance = GameObject.ALLEGIANCES.ENEMIES;\r\n\t\t\r\n\t\tship.v.setMaxForce(1.0f);\r\n\t\tship.v.setMaxVel(4.0f);\r\n\t\t\r\n\t\t\r\n\t\t//fly down\r\n\t\t//ship.stepHandlers.add( new FlyStraightStep(new Vector2d(0,-1f)));\r\n\t\t\r\n\t\tSimplePathfollowing followPathBehaviour = new SimplePathfollowing();\r\n\t\tfollowPathBehaviour.setInfluence(1);\r\n\t\tfollowPathBehaviour.setAttribute(\"arrivedistance\", \"10\", null);\r\n\t\t\r\n\t\t//add waypoints\r\n\t\tfor(int i=0 ; i< 20 ; i++)\r\n\t\t{\r\n\t\t\t\t\t\t\r\n\t\t\t//put in some edge ones too\r\n\t\t\tif(r.nextInt(6)%3==0)\r\n\t\t\t\tship.v.addWaypoint(new Point2d((int) LogicEngine.SCREEN_WIDTH * (i%2), LogicEngine.SCREEN_HEIGHT/1.5 + r.nextInt((int) LogicEngine.SCREEN_HEIGHT/5)));\r\n\t\t\telse\r\n\t\t\t\t//put in some random doublebacks etc\r\n\t\t\t\tship.v.addWaypoint(new Point2d(r.nextInt((int) LogicEngine.SCREEN_WIDTH), LogicEngine.SCREEN_HEIGHT/1.5 + r.nextInt((int) LogicEngine.SCREEN_HEIGHT/5)));\r\n\t\t}\r\n\t\tship.v.addWaypoint(new Point2d(LogicEngine.SCREEN_WIDTH/2, -100));\r\n\t\t\r\n\t\tif(Difficulty.isEasy())\r\n\t\t\tship.shotHandler = new BeamShot(50);\r\n\t\telse\r\n\t\tif(Difficulty.isMedium())\r\n\t\t\tship.shotHandler = new BeamShot(40);\r\n\t\telse\r\n\t\tif(Difficulty.isHard())\r\n\t\t\tship.shotHandler = new BeamShot(30);\r\n\t\t\r\n\t\tCustomBehaviourStep b = new CustomBehaviourStep(followPathBehaviour);\r\n\t\tship.stepHandlers.add(b);\r\n\t\t\r\n\t\t//destroy ships that get too close\r\n\t\tHitpointShipCollision hps = new HitpointShipCollision(ship, 10, 32);\r\n\t\thps.setSimpleExplosion();\r\n\t\t\r\n\t\tship.collisionHandler = hps; \r\n\t\t\r\n\t\tin_logicEngine.objectsEnemies.add(ship);\t\r\n\t\r\n\t}",
"private void calculateLocation()\r\n\t{\r\n\t\tdouble leftAngleSpeed \t= this.angleMeasurementLeft.getAngleSum() / ((double)this.angleMeasurementLeft.getDeltaT()/1000); //degree/seconds\r\n\t\tdouble rightAngleSpeed \t= this.angleMeasurementRight.getAngleSum() / ((double)this.angleMeasurementRight.getDeltaT()/1000); //degree/seconds\r\n\r\n\t\tdouble vLeft\t= (leftAngleSpeed * Math.PI * LEFT_WHEEL_RADIUS ) / 180 ; //velocity of left wheel in m/s\r\n\t\tdouble vRight\t= (rightAngleSpeed * Math.PI * RIGHT_WHEEL_RADIUS) / 180 ; //velocity of right wheel in m/s\t\t\r\n\t\tdouble w \t\t= (vRight - vLeft) / WHEEL_DISTANCE; //angular velocity of robot in rad/s\r\n\t\t\r\n\t\tDouble R \t= new Double(( WHEEL_DISTANCE / 2 ) * ( (vLeft + vRight) / (vRight - vLeft) ));\t\t\t\t\t\t\t\t\r\n\t\t\r\n\t\tdouble ICCx = 0;\r\n\t\tdouble ICCy = 0;\r\n\r\n\t\tdouble W_xResult \t\t= 0;\r\n\t\tdouble W_yResult \t\t= 0;\r\n\t\tdouble W_angleResult \t= 0;\r\n\t\t\r\n\t\tdouble E_xResult \t\t= 0;\r\n\t\tdouble E_yResult \t\t= 0;\r\n\t\tdouble E_angleResult \t= 0;\r\n\t\t\r\n\t\t//short axe = 0;\r\n\t\t\r\n\t\tdouble deltaT = ((double)this.angleMeasurementLeft.getDeltaT())/1000;\r\n\t\t\r\n\t\t// Odometry calculations\r\n\t\tif (R.isNaN()) \t\t\t\t//robot don't move\r\n\t\t{\r\n\t\t\tW_xResult\t\t= this.pose.getX();\r\n\t\t\tW_yResult\t\t= this.pose.getY();\r\n\t\t\tW_angleResult \t= this.pose.getHeading();\r\n\t\t} \r\n\t\telse if (R.isInfinite()) \t//robot moves straight forward/backward, vLeft==vRight\r\n\t\t{ \r\n\t\t\tW_xResult\t\t= this.pose.getX() + vLeft * Math.cos(this.pose.getHeading()) * deltaT;\r\n\t\t\tW_yResult\t\t= this.pose.getY() + vLeft * Math.sin(this.pose.getHeading()) * deltaT;\r\n\t\t\tW_angleResult \t= this.pose.getHeading();\r\n\t\t} \r\n\t\telse \r\n\t\t{\t\t\t\r\n\t\t\tICCx = this.pose.getX() - R.doubleValue() * Math.sin(this.pose.getHeading());\r\n\t\t\tICCy = this.pose.getY() + R.doubleValue() * Math.cos(this.pose.getHeading());\r\n\t\t\r\n\t\t\tW_xResult \t\t= Math.cos(w * deltaT) * (this.pose.getX()-ICCx) - Math.sin(w * deltaT) * (this.pose.getY() - ICCy) + ICCx;\r\n\t\t\tW_yResult \t\t= Math.sin(w * deltaT) * (this.pose.getX()-ICCx) + Math.cos(w * deltaT) * (this.pose.getY() - ICCy) + ICCy;\r\n\t\t\tW_angleResult \t= this.pose.getHeading() + w * deltaT;\r\n\t\t}\r\n\t\t\r\n\t\tthis.pose.setLocation((float)W_xResult, (float)W_yResult);\r\n\t\tthis.pose.setHeading((float)W_angleResult);\r\n\t\t\r\n\t\t// Conversion to grads\r\n\t\tW_angleResult = W_angleResult/Math.PI*180;\r\n\t\t\r\n\t\t// Get the heading axe\r\n\t\t//axe = getHeadingAxe();\r\n\t\tgetHeadingAxe();\r\n\t\t\r\n\t\t// Verify the coordinates and the heading angle\r\n\t\tif (Po_Corn == 1)\r\n\t\t{\r\n\t\t\tswitch (Po_CORNER_ID)\r\n\t\t\t{\r\n\t\t\t\tcase 0:\r\n\t\t\t\t\tE_xResult = 0;\r\n\t\t\t\t\tE_yResult = 0;\r\n\t\t\t\t\tPo_ExpAng = 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\tE_xResult = 1.8;\r\n\t\t\t\t\tE_yResult = 0.11;\r\n\t\t\t\t\tPo_ExpAng = 90;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tE_xResult = 1.6;\r\n\t\t\t\t\tE_yResult = 0.6;\r\n\t\t\t\t\tPo_ExpAng = 180;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\tE_xResult = 1.5;\r\n\t\t\t\t\tE_yResult = 0.45;\r\n\t\t\t\t\tPo_ExpAng = 270;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r\n\t\t\t\t\tE_xResult = 1.5;\r\n\t\t\t\t\tE_yResult = 0.3;\r\n\t\t\t\t\tPo_ExpAng = 180;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 5:\r\n\t\t\t\t\tE_xResult = 0.3;\r\n\t\t\t\t\tE_yResult = 0.3;\r\n\t\t\t\t\tPo_ExpAng = 90;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 6:\r\n\t\t\t\t\tE_xResult = 0.3;\r\n\t\t\t\t\tE_yResult = 0.6;\r\n\t\t\t\t\tPo_ExpAng = 180;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 7:\r\n\t\t\t\t\tE_xResult = 0;\r\n\t\t\t\t\tE_yResult = 0.6;\r\n\t\t\t\t\tPo_ExpAng = 270;\r\n\t\t\t\t\tbreak;\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tE_angleResult = W_angleResult;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tint block = 0;\r\n\t\t\t// white = 0, black = 2, grey = 1\r\n\t\t\tif ((lineSensorLeft == 0) && (lineSensorRight == 0) && (block == 0)) \t// Robot moves on the black line\r\n\t\t\t{\r\n\t\t\t\tswitch (Po_CORNER_ID)\t\t\t\t\t\t\t\t// Even numbers - x, Odd numbers - y\r\n\t\t\t\t{\r\n\t\t\t\tcase 0: \r\n\t\t\t\t\tif (this.pose.getX() < 1.6)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_yResult = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = W_angleResult;\r\n\t\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 1: \r\n\t\t\t\t\tif (this.pose.getY() < 0.4)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_xResult = 1.8;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = W_angleResult; \r\n\t\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tif (this.pose.getX() > 1.65)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_yResult = 0.6;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = W_angleResult;\r\n\t\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\tif (this.pose.getY() > 0.4)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_xResult = 1.5; \r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = W_angleResult; \r\n\t\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 4: \r\n\t\t\t\t\tif (this.pose.getX() > 0.4)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_yResult = 0.3;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = W_angleResult;\r\n\t\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 5:\r\n\t\t\t\t\tif (this.pose.getY() < 0.5)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_xResult = 0.3;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = W_angleResult; \r\n\t\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 6: \r\n\t\t\t\t\tif (this.pose.getX() > 0.1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_yResult = 0.6;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = W_angleResult;\r\n\t\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 7:\r\n\t\t\t\t\tif (this.pose.getY() > 0.1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_xResult = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = W_angleResult; \r\n\t\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tdefault: \r\n\t\t\t\t\tE_angleResult = W_angleResult;\r\n\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if(((lineSensorLeft == 0) && (lineSensorRight == 2)) || ((lineSensorLeft == 2) && (lineSensorRight == 0)))\r\n\t\t\t{\r\n\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\r\n\t \tif (W_angleResult >= TRSH_W)\r\n\t \t{\r\n\t \t\tE_angleResult = TRSH_W;\r\n\t \t}\r\n\t \telse if (W_angleResult >= (360 - TRSH_W))\r\n\t \t{\r\n\t \t\tE_angleResult = 360 - TRSH_W;\r\n\t \t}\r\n\t \telse\r\n\t \t{\r\n\t \t\tE_angleResult = W_angleResult;\r\n\t \t}\r\n\t \t\r\n\t \t// test\r\n\t \tE_angleResult = W_angleResult;\r\n\t\t\t}\r\n\t\t\telse if(((lineSensorLeft == 0) && (lineSensorRight == 1)) || ((lineSensorLeft == 1) && (lineSensorRight == 0)))\r\n\t\t\t{\r\n\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\r\n\t \tif (W_angleResult >= TRSH_G)\r\n\t \t{\r\n\t \t\tE_angleResult = TRSH_G;\r\n\t \t}\r\n\t \telse if (W_angleResult >= (360 - TRSH_G))\r\n\t \t{\r\n\t \t\tE_angleResult = 360 - TRSH_G;\r\n\t \t}\r\n\t \telse\r\n\t \t{\r\n\t \t\tE_angleResult = W_angleResult;\r\n\t \t}\r\n\t \t\r\n\t \t// test\r\n\t \tE_angleResult = W_angleResult;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\tE_angleResult = W_angleResult;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tLCD.drawString(\"AngRs: \" + (E_angleResult), 0, 7);\r\n\t\t\r\n\t\t// Conversion to rads\r\n\t\tW_angleResult = W_angleResult*Math.PI/180;\r\n\t\tE_angleResult = E_angleResult*Math.PI/180;\r\n\t\t\r\n\t\tif ((Po_CORNER_ID == 3) && (100*this.pose.getY() < 45))\r\n\t\t{\r\n\t\t\tE_angleResult = 3*Math.PI/180;;\r\n\t\t}\r\n\t\t\r\n\t\tthis.pose.setLocation((float)E_xResult, (float)E_yResult);\r\n\t\tthis.pose.setHeading((float)E_angleResult);\r\n\t\t\r\n\t\t/*\r\n\t\t// Integration deviation correction\r\n\t\tthis.pose.setLocation((float)(W_xResult), (float)(W_yResult + (0.01*22.4)/175));\r\n\t\tthis.pose.setHeading((float)((W_angleResult + 14/175)*Math.PI/180));\r\n\t\t*/\r\n\t}",
"public int getArmorPoint ()\r\n {\r\n return armorPoint;\r\n }",
"public double getUtility(double consumption);",
"@Override\n\tprotected BufferedImage getButtonImage(ArrayList<Double> phenotype, int width, int height,\n\t\t\tdouble[] inputMultipliers) {\n\t\tdouble[] doubleArray = ArrayUtil.doubleArrayFromList(phenotype);\n\t\tList<List<Integer>> level = levelListRepresentation(doubleArray);\n\t\t//sets the height and width for the rendered level to be placed on the button \n\t\tint width1 = LodeRunnerRenderUtil.RENDERED_IMAGE_WIDTH;\n\t\tint height1 = LodeRunnerRenderUtil.RENDERED_IMAGE_HEIGHT;\n\t\tBufferedImage image = null;\n\t\ttry {\n\t\t\t//if we are using the mapping with 7 tiles, other wise use 6 tiles \n\t\t\t// ACTUALLY: We can have extra unused tiles in the image array. Easier to have one method that keeps them all around\n\t\t\t//\t\t\tif(Parameters.parameters.booleanParameter(\"lodeRunnerDistinguishesSolidAndDiggableGround\")){\n\t\t\tList<Point> emptySpaces = LodeRunnerGANUtil.fillEmptyList(level);\n\t\t\tRandom rand = new Random(Double.doubleToLongBits(doubleArray[0]));\n\t\t\tLodeRunnerGANUtil.setSpawn(level, emptySpaces, rand);\n\t\t\tif(Parameters.parameters.booleanParameter(\"showInteractiveLodeRunnerSolutionPaths\")) {\n\t\t\t\tList<List<Integer>> originalLevel = ListUtil.deepCopyListOfLists(level);\n\t\t\t\tLodeRunnerState start = new LodeRunnerState(level);\n\t\t\t\t//\t\t\t\tSystem.out.println(level);\n\t\t\t\tSearch<LodeRunnerAction,LodeRunnerState> search = new AStarSearch<>(LodeRunnerState.manhattanToFarthestGold);\n\t\t\t\tHashSet<LodeRunnerState> mostRecentVisited = null;\n\t\t\t\tArrayList<LodeRunnerAction> actionSequence = null;\n\t\t\t\ttry {\n\t\t\t\t\t//tries to find a solution path to solve the level, tries as many time as specified by the last int parameter \n\t\t\t\t\t//represented by red x's in the visualization \n\t\t\t\t\tif(Parameters.parameters.integerParameter(\"interactiveLodeRunnerPathType\") == PATH_TYPE_ASTAR) {\n\t\t\t\t\t\t//\t\t\t\t\t\tSystem.out.println(level);\n\t\t\t\t\t\tactionSequence = ((AStarSearch<LodeRunnerAction, LodeRunnerState>) search).search(start, true, Parameters.parameters.integerParameter(\"aStarSearchBudget\"));\n\t\t\t\t\t} else if(Parameters.parameters.integerParameter(\"interactiveLodeRunnerPathType\") == PATH_TYPE_TSP){\n\t\t\t\t\t\tPair<ArrayList<LodeRunnerAction>, HashSet<LodeRunnerState>> tspInfo = LodeRunnerTSPUtil.getFullActionSequenceAndVisitedStatesTSPGreedySolution(originalLevel);\n\t\t\t\t\t\tactionSequence = tspInfo.t1;\n\t\t\t\t\t\tmostRecentVisited = tspInfo.t2;\n\t\t\t\t\t\t//System.out.println(\"actionSequence: \"+ actionSequence);\n\t\t\t\t\t\t//System.out.println(\"mostRecentVisited: \"+mostRecentVisited);\n\t\t\t\t\t} \n\t\t\t\t\telse throw new IllegalArgumentException(\"Parameter is not either 1 or 0\");\n\t\t\t\t} catch(IllegalStateException e) {\n\t\t\t\t\tSystem.out.println(\"search exceeded computation budget\");\n\t\t\t\t\t//e.printStackTrace();\n\t\t\t\t} catch(OutOfMemoryError e) {\n\t\t\t\t\tSystem.out.println(\"search ran out of memory\");\n\t\t\t\t\t//e.printStackTrace();\n\t\t\t\t} finally {\n\t\t\t\t\t// Even if search fails, still try to get visited states.\n\t\t\t\t\t// Need this here because A* fails with Exception\n\t\t\t\t\tif(Parameters.parameters.integerParameter(\"interactiveLodeRunnerPathType\") == PATH_TYPE_ASTAR) {\n\t\t\t\t\t\t//get all of the visited states, all of the x's are in this set but the white ones are not part of solution path \n\t\t\t\t\t\tmostRecentVisited = ((AStarSearch<LodeRunnerAction, LodeRunnerState>) search).getVisited();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\t//visualizes the points visited with red and whit x's\n\t\t\t\t\timage = LodeRunnerState.vizualizePath(level,mostRecentVisited,actionSequence,start);\n\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tSystem.out.println(\"Image could not be displayed\");\n\t\t\t\t\t//e.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(Parameters.parameters.booleanParameter(\"showInteractiveLodeRunnerIceCreamYouVisualization\")) {\n\t\t\t\tBufferedImage[] iceCreamYouImages = LodeRunnerRenderUtil.loadIceCreamYouTiles(LodeRunnerRenderUtil.ICE_CREAM_YOU_TILE_PATH);\n\t\t\t\timage = LodeRunnerRenderUtil.createIceCreamYouImage(level, LodeRunnerRenderUtil.ICE_CREAM_YOU_IMAGE_WIDTH, LodeRunnerRenderUtil.ICE_CREAM_YOU_IMAGE_HEIGHT, iceCreamYouImages);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tBufferedImage[] images = LodeRunnerRenderUtil.loadImagesNoSpawnTwoGround(LodeRunnerRenderUtil.LODE_RUNNER_TILE_PATH); //all tiles \n\t\t\t\timage = LodeRunnerRenderUtil.createBufferedImage(level,width1,height1, images);\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Image could not be displayed\");\n\t\t}\n\t\treturn image;\n\t}",
"public double[] robomove() {\n Limelight.setLedMode(Limelight.LightMode.iOn);\n \n double x = Limelight.getTx();\n double y = Limelight.getTy();\n double area = Limelight.getTa();\n\n float Kp = (float)SmartDashboard.getNumber(\"Kp_Limelight\", -0.03);//-0.06f;\n float min_command = (float)SmartDashboard.getNumber(\"min_command_limelight\", 0.01);//0.01f;\n\n double heading_error = -x;\n float steering_adjust = 0.0f;\n if (x > 1.0) {\n steering_adjust = (float) (Kp * heading_error - min_command);\n } else if (x < 1.0) {\n steering_adjust = (float) (Kp * heading_error + min_command);\n }\n\n if (steering_adjust < .01 && steering_adjust > -.01 && Limelight.isTarget()) {\n isDone = true;\n }\n\n if (Limelight.isTarget()){\n Robot.ledDrive.setLightsPattern(Robot.ledDrive.GREEN);\n } else{\n Robot.ledDrive.setLightsPattern(Robot.ledDrive.RED);\n }\n \n MathUtil.clamp(steering_adjust, -.3, .3);\n\n if (Math.abs(steering_adjust) < .1){\n steering_adjust = Math.signum(steering_adjust) * 0.1f;\n }\n\n return new double[] {(double) steering_adjust, (double) -steering_adjust};\n }",
"private double[] camerr(double r, int ibody){\r\n\t\t//% Range from Earth in m\r\n\t\t//double[] erange= {1069177850, 213835570, 71278520, 21383560, 13364720};\r\n\t\tdouble[] erange= {0,0,13364720,21383560,71278520,213835570,1069177850};\r\n\t\t//VectorN erange = new VectorN(erange_tmp);\r\n\t\t\r\n\t\t//% Range from Moon in m\r\n\t\t//double[] mrange = {291342820, 58268560, 19422850, 5826860, 3641790};\r\n\t\tdouble[] mrange = {1788000,1838000, 3641790,5826860,19422850,58268560,291342820};\r\n\t\t//VectorN mrange = new VectorN(mrange_tmp);\r\n\t\t\r\n\t\tdouble[] rv = new double[5];\r\n\t\tif (ibody == BODY_EARTH) //% Earth\r\n\t\t\trv=erange;\r\n\t\telse if (ibody == BODY_MOON) // % Moon\r\n\t\t\trv=mrange;\r\n\t\telse\r\n\t\t\tSystem.err.println(\"Invalid body flag\");\r\n\t\t\r\n\t\t\r\n\t\t//double[] angerr_rnd_deg= {0.0022, 0.011, 0.032, 0.105, 0.169};\r\n\t\tdouble[] angerr_rnd_deg= {0.47,0.44,0.169,0.105,0.032,0.011,0.0022};\r\n\t\t//double[] angerr_bias_deg= {biasflag*0.0046, biasflag*0.023, biasflag*0.070, biasflag*0.235, biasflag*0.375};\r\n\t\tdouble[] angerr_bias_deg= {biasflag*1.055,biasflag*0.98, biasflag*0.375,biasflag*0.235,biasflag*0.070,biasflag*0.023,biasflag*0.0046};\r\n\t\t\r\n\t\t//% Apollo numbers corresponding to 3km horizon sensing error\r\n\t\t//%angerr_rnd_deg= [ 0.0002 0.0008 0.0024 0.0080 0.0129]';\r\n\t\t\r\n\t\t//% Interpolate/extrapolate based on actual range\r\n\t\tInterpolator interp1 = new Interpolator(rv,angerr_rnd_deg);\r\n\t\tdouble arnd=MathUtils.DEG2RAD*(interp1.get_value(r));//interp1(rv,angerr_rnd_deg,r,'linear','extrap')*pi/180;\r\n\t\tinterp1 = new Interpolator(rv,angerr_bias_deg);\r\n\t\tdouble abias=MathUtils.DEG2RAD*(interp1.get_value(r));//interp1(rv,angerr_bias_deg,r,'linear','extrap')*pi/180;\r\n\t\t//*TODO watch this\r\n\t\t//arnd = 0;\r\n\t\tabias = 0;\r\n\t\tdouble[] out = {arnd, abias};\r\n\t\treturn out;\r\n\t}",
"protected Vector2 get_ray_fire_point() {\n Vector2 p = new Vector2(\n sprite.getX() + (sprite.getWidth() / 2),\n sprite.getY() + (sprite.getHeight()));\n\n Vector2 p1 = p.rotateAround(new Vector2(\n sprite.getX() + (sprite.getWidth() / 2),\n sprite.getY() + (sprite.getHeight() / 2)),\n sprite.getRotation());\n\n return p1;\n }",
"protected void execute() {\n timeRunning = timeSinceInitialized();\n if (!Robot.lifter2.getunder15()) {\n Robot.shooter.set(190);\n System.out.println(\"In position: \"+inPosition.get());\n } else {\n System.out.println(\"under angle don't shoot!\");\n }\n \n }",
"public void action() {\n\t\tsuppressed = false;\r\n\t\tpilot.setLinearSpeed(8);\r\n\t\tpilot.setLinearAcceleration(4);\r\n\t\tColorThread.updatePos = false;\r\n\t\tColorThread.updateCritical = false;\r\n\t\t//create a array to save the map information\r\n\t\tfor (int a = 0; a < 8; a++) {\r\n\t\t\tfor (int b = 0; b < 8; b++) {\r\n\t\t\t\trobot.probability[a][b] = -1;\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor (int a = 0; a < 8; a++) {\r\n\t\t\tfor (int b = 0; b < 8; b++) {\r\n\t\t\t\tif (a == 0 || a == 7 || b == 0 || b == 7) {\r\n\t\t\t\t\trobot.probability[a][b] = 100;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor (int a = 0; a < 6; a++) {\r\n\t\t\tfor (int b = 0; b < 6; b++) {\r\n\t\t\t\tif (robot.map[a][b].getOccupied() == 1) {\r\n\t\t\t\t\trobot.probability[a + 1][b + 1] = 100;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Step1: use ArrayList to save all of the probability situation.\r\n\t\tfloat front, left, right, back;\r\n\t\tfront = USThread.disSample[0];\r\n\t\trobot.setmotorM(90);\r\n\t\tDelay.msDelay(1000);\r\n\t\tleft = USThread.disSample[0];\r\n\t\trobot.setmotorM(-180);\r\n\t\tDelay.msDelay(1000);\r\n\t\tright = USThread.disSample[0];\r\n\t\trobot.setmotorM(90);\r\n\t\tDelay.msDelay(1000);\r\n\t\trobot.correctHeading(180);\r\n\t\tDelay.msDelay(1000);\r\n\t\tback = USThread.disSample[0];\r\n\t\trobot.correctHeading(180);\r\n\t\tfor (int a = 1; a < 7; a++) {\r\n\t\t\tfor (int b = 1; b < 7; b++) {\r\n\t\t\t\tif (robot.probability[a][b] == -1) {\r\n\t\t\t\t\tif (((robot.probability[a][b + 1] == 100 && front < 0.25)\r\n\t\t\t\t\t\t\t|| (robot.probability[a][b + 1] == -1 && front > 0.25))\r\n\t\t\t\t\t\t\t&& ((robot.probability[a + 1][b] == 100 && right < 0.25)\r\n\t\t\t\t\t\t\t\t\t|| (robot.probability[a + 1][b] == -1 && right > 0.25))\r\n\t\t\t\t\t\t\t&& ((robot.probability[a][b - 1] == 100 && back < 0.25)\r\n\t\t\t\t\t\t\t\t\t|| (robot.probability[a][b - 1] == -1 && back > 0.25))\r\n\t\t\t\t\t\t\t&& ((robot.probability[a - 1][b] == 100 && left < 0.25)\r\n\t\t\t\t\t\t\t\t\t|| (robot.probability[a - 1][b] == -1 && left > 0.25))) {\r\n\t\t\t\t\t\t//direction is north\r\n\t\t\t\t\t\trobot.listOfPro.add(new ProPoint(0, 0, a, b));\r\n\t\t\t\t\t\t//System.out.println(\"0 \"+a+\" \"+b);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (((robot.probability[a + 1][b] == 100 && front < 0.25)\r\n\t\t\t\t\t\t\t|| (robot.probability[a + 1][b] == -1 && front > 0.25))\r\n\t\t\t\t\t\t\t&& ((robot.probability[a][b - 1] == 100 && right < 0.25)\r\n\t\t\t\t\t\t\t\t\t|| (robot.probability[a][b - 1] == -1 && right > 0.25))\r\n\t\t\t\t\t\t\t&& ((robot.probability[a - 1][b] == 100 && back < 0.25)\r\n\t\t\t\t\t\t\t\t\t|| (robot.probability[a - 1][b] == -1 && back > 0.25))\r\n\t\t\t\t\t\t\t&& ((robot.probability[a][b + 1] == 100 && left < 0.25)\r\n\t\t\t\t\t\t\t\t\t|| (robot.probability[a][b + 1] == -1 && left > 0.25))) {\r\n\t\t\t\t\t\t// direction is east\r\n\t\t\t\t\t\trobot.listOfPro.add(new ProPoint(1, 0, a, b));\r\n\t\t\t\t\t\t//System.out.println(\"1 \"+a+\" \"+b);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (((robot.probability[a][b - 1] == 100 && front < 0.25)\r\n\t\t\t\t\t\t\t|| (robot.probability[a][b - 1] == -1 && front > 0.25))\r\n\t\t\t\t\t\t\t&& ((robot.probability[a - 1][b] == 100 && right < 0.25)\r\n\t\t\t\t\t\t\t\t\t|| (robot.probability[a - 1][b] == -1 && right > 0.25))\r\n\t\t\t\t\t\t\t&& ((robot.probability[a][b + 1] == 100 && back < 0.25)\r\n\t\t\t\t\t\t\t\t\t|| (robot.probability[a][b + 1] == -1 && back > 0.25))\r\n\t\t\t\t\t\t\t&& ((robot.probability[a + 1][b] == 100 && left < 0.25)\r\n\t\t\t\t\t\t\t\t\t|| (robot.probability[a + 1][b] == -1 && left > 0.25))) {\r\n\t\t\t\t\t\t// direction is sourth\r\n\t\t\t\t\t\trobot.listOfPro.add(new ProPoint(2, 0, a, b));\r\n\t\t\t\t\t\t//System.out.println(\"2 \"+a+\" \"+b);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (((robot.probability[a - 1][b] == 100 && front < 0.25)\r\n\t\t\t\t\t\t\t|| (robot.probability[a - 1][b] == -1 && front > 0.25))\r\n\t\t\t\t\t\t\t&& ((robot.probability[a][b + 1] == 100 && right < 0.25)\r\n\t\t\t\t\t\t\t\t\t|| (robot.probability[a][b + 1] == -1 && right > 0.25))\r\n\t\t\t\t\t\t\t&& ((robot.probability[a + 1][b] == 100 && back < 0.25)\r\n\t\t\t\t\t\t\t\t\t|| (robot.probability[a + 1][b] == -1 && back > 0.25))\r\n\t\t\t\t\t\t\t&& ((robot.probability[a][b - 1] == 100 && left < 0.25)\r\n\t\t\t\t\t\t\t\t\t|| (robot.probability[a][b - 1] == -1 && left > 0.25))) {\r\n\t\t\t\t\t\t// direction is west\r\n\t\t\t\t\t\trobot.listOfPro.add(new ProPoint(3, 0, a, b));\r\n\t\t\t\t\t\t//System.out.println(\"3 \"+a+\" \"+b);\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//Step 2: use loop to take control of robot walk and check the location correction\r\n\t\tboolean needLoop = true;\r\n\t\tint loopRound = 0;\r\n\t\twhile (needLoop) {\r\n\t\t\t// One of way to leave the loop is at the hospital\r\n\t\t\tif ((ColorThread.leftColSample[0] >= 0.2 && ColorThread.leftColSample[1] < 0.2\r\n\t\t\t\t\t&& ColorThread.leftColSample[1] >= 0.14 && ColorThread.leftColSample[2] <= 0.8)\r\n\t\t\t\t\t&& (ColorThread.rightColSample[0] >= 0.2 && ColorThread.rightColSample[1] < 0.2\r\n\t\t\t\t\t\t\t&& ColorThread.rightColSample[1] >= 0.11 && ColorThread.rightColSample[2] <= 0.08)) {\r\n\t\t\t\trobot.updatePosition(0, 0);\r\n\t\t\t\tint numOfAtYellow = 0;\r\n\t\t\t\tfor (int i = 0; i < robot.listOfPro.size(); i++) {\r\n\t\t\t\t\tif (robot.listOfPro.get(i).getNowX() == 1 && robot.listOfPro.get(i).getNowY() == 1) {\r\n\t\t\t\t\t\tnumOfAtYellow++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif(numOfAtYellow == 1) {\r\n\t\t\t\tfor (int i = 0; i < robot.listOfPro.size(); i++) {\r\n\t\t\t\t\tif (robot.listOfPro.get(i).getNowX() == 1 && robot.listOfPro.get(i).getNowY() == 1) {\r\n\t\t\t\t\t\tif (robot.listOfPro.get(i).getNowHeading() == 1) {\r\n\t\t\t\t\t\t\trobot.setDirection(false);\r\n\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 2) {\r\n\t\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 3) {\r\n\t\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// do not to set the heading, because the default value is 0.\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\t}else {\r\n\t\t\t\t\t//have two way to go to the yellow part\r\n\t\t\t\t\tfront = USThread.disSample[0];\r\n\t\t\t\t\trobot.setmotorM(90);\r\n\t\t\t\t\tDelay.msDelay(1000);\r\n\t\t\t\t\tleft = USThread.disSample[0];\r\n\t\t\t\t\trobot.setmotorM(-180);\r\n\t\t\t\t\tDelay.msDelay(1000);\r\n\t\t\t\t\tright = USThread.disSample[0];\r\n\t\t\t\t\trobot.setmotorM(90);\r\n\t\t\t\t\tDelay.msDelay(1000);\r\n\t\t\t\t\trobot.correctHeading(180);\r\n\t\t\t\t\tDelay.msDelay(1000);\r\n\t\t\t\t\tback = USThread.disSample[0];\r\n\t\t\t\t\trobot.correctHeading(180);\r\n\t\t\t\t\tDelay.msDelay(1000);\r\n\t\t\t\t\tif(front<0.25 && right<0.25 && left>0.25 && back>0.25) {\r\n\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t}else if(front<0.25 && right>0.25 && back>0.25 && left<0.25) {\r\n\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t}else if(front>0.25 && right>0.25 && back<0.25 && left<0.25) {\r\n\t\t\t\t\t\t// do not to set the heading, because the default value is 0.\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\trobot.setDirection(false);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tneedLoop = false;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t//Another way to leave the loop is the robot arrive the green cell.\r\n\t\t\tif ((ColorThread.leftColSample[0] <= 0.09 && ColorThread.leftColSample[1] >= 0.17\r\n\t\t\t\t\t&& ColorThread.leftColSample[2] <= 0.09)\r\n\t\t\t\t\t&& (ColorThread.rightColSample[0] <= 0.09 && ColorThread.rightColSample[1] >= 0.014\r\n\t\t\t\t\t\t\t&& ColorThread.rightColSample[2] <= 0.11)) {\r\n\t\t\t\trobot.updatePosition(5, 0);\r\n\t\t\t\tint numOfAtGreen = 0;\r\n\t\t\t\tfor (int i = 0; i < robot.listOfPro.size(); i++) {\r\n\t\t\t\t\tif (robot.listOfPro.get(i).getNowX() == 6 && robot.listOfPro.get(i).getNowY() == 1) {\r\n\t\t\t\t\t\tnumOfAtGreen++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif(numOfAtGreen==1) {\r\n\t\t\t\t\tfor (int i = 0; i < robot.listOfPro.size(); i++) {\r\n\t\t\t\t\t\tif (robot.listOfPro.get(i).getNowX() == 6 && robot.listOfPro.get(i).getNowY() == 1) {\r\n\t\t\t\t\t\t\tif (robot.listOfPro.get(i).getNowHeading() == 1) {\r\n\t\t\t\t\t\t\t\trobot.setDirection(false);\r\n\t\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 2) {\r\n\t\t\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 3) {\r\n\t\t\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// do not to set the heading, because the default value is 0.\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}else {\r\n\t\t\t\t\tfront = USThread.disSample[0];\r\n\t\t\t\t\trobot.setmotorM(90);\r\n\t\t\t\t\tDelay.msDelay(1000);\r\n\t\t\t\t\tleft = USThread.disSample[0];\r\n\t\t\t\t\trobot.setmotorM(-180);\r\n\t\t\t\t\tDelay.msDelay(1000);\r\n\t\t\t\t\tright = USThread.disSample[0];\r\n\t\t\t\t\trobot.setmotorM(90);\r\n\t\t\t\t\tDelay.msDelay(1000);\r\n\t\t\t\t\trobot.correctHeading(180);\r\n\t\t\t\t\tDelay.msDelay(1000);\r\n\t\t\t\t\tback = USThread.disSample[0];\r\n\t\t\t\t\trobot.correctHeading(180);\r\n\t\t\t\t\tDelay.msDelay(1000);\r\n\t\t\t\t\tif(front<0.25 && right<0.25 && left>0.25 && back>0.25) {\r\n\t\t\t\t\t\trobot.setDirection(false);\r\n\t\t\t\t\t}else if(front<0.25 && right>0.25 && back>0.25 && left<0.25) {\r\n\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t}else if(front>0.25 && right>0.25 && back<0.25 && left<0.25) {\r\n\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t// do not to set the heading, because the default value is 0.\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tneedLoop = false;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t//The third way of leave the loop is the robot have already know his position and direction.\r\n\t\t\tint maxStepNumber = 0;\r\n\t\t\tint numberOfMaxSteps = 0;\r\n\t\t\tfor (int i = 0; i < robot.listOfPro.size(); i++) {\r\n\t\t\t\tif (robot.listOfPro.get(i).getSteps() > maxStepNumber) {\r\n\t\t\t\t\tmaxStepNumber = robot.listOfPro.get(i).getSteps();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < robot.listOfPro.size(); i++) {\r\n\t\t\t\tif (robot.listOfPro.get(i).getSteps() == maxStepNumber) {\r\n\t\t\t\t\tnumberOfMaxSteps++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (numberOfMaxSteps == 1) {\r\n\t\t\t\tfor (int i = 0; i < robot.listOfPro.size(); i++) {\r\n\t\t\t\t\tif (robot.listOfPro.get(i).getSteps() == maxStepNumber) {\r\n\t\t\t\t\t\trobot.updatePosition(robot.listOfPro.get(i).getNowX() - 1,\r\n\t\t\t\t\t\t\t\trobot.listOfPro.get(i).getNowY() - 1);\r\n\t\t\t\t\t\tif (robot.listOfPro.get(i).getNowHeading() == 1) {\r\n\t\t\t\t\t\t\trobot.setDirection(false);\r\n\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 2) {\r\n\t\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 3) {\r\n\t\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// do not to set the heading, because the default value is 0.\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\tneedLoop = false;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t//The below part are the loops.\r\n\t\t\tfront = USThread.disSample[0];\r\n\t\t\trobot.setmotorM(90);\r\n\t\t\tDelay.msDelay(1000);\r\n\t\t\tleft = USThread.disSample[0];\r\n\t\t\trobot.setmotorM(-180);\r\n\t\t\tDelay.msDelay(1000);\r\n\t\t\tright = USThread.disSample[0];\r\n\t\t\trobot.setmotorM(90);\r\n\t\t\tDelay.msDelay(1000);\r\n\t\t\trobot.correctHeading(180);\r\n\t\t\tDelay.msDelay(1000);\r\n\t\t\tback = USThread.disSample[0];\r\n\t\t\trobot.correctHeading(180);\r\n\t\t\tDelay.msDelay(1000);\r\n\t\t\t// move\r\n\t\t\t\r\n\t\t\tif (front > 0.25) {\r\n\t\t\t\trobot.getPilot().travel(25);\r\n\t\t\t\tfor (int i = 0; i < robot.listOfPro.size(); i++) {\r\n\t\t\t\t\tif(robot.listOfPro.get(i).getSteps()==loopRound) {\r\n\t\t\t\t\t\tif (robot.listOfPro.get(i).getNowHeading() == 0) {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowY(robot.listOfPro.get(i).getNowY() + 1);\r\n\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 1) {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowX(robot.listOfPro.get(i).getNowX() + 1);\r\n\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 2) {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowY(robot.listOfPro.get(i).getNowY() - 1);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowX(robot.listOfPro.get(i).getNowX() - 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} else if (left > 0.25) {\r\n\t\t\t\trobot.correctHeading(-90);\r\n\t\t\t\trobot.getPilot().travel(25);\r\n\t\t\t\tfor (int i = 0; i < robot.listOfPro.size(); i++) {\r\n\t\t\t\t\tif(robot.listOfPro.get(i).getSteps()==loopRound) {\r\n\t\t\t\t\t\tif (robot.listOfPro.get(i).getNowHeading() == 0) {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowHeading(3);\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowX(robot.listOfPro.get(i).getNowX() - 1);\r\n\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 1) {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowHeading(0);\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowY(robot.listOfPro.get(i).getNowY() + 1);\r\n\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 2) {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowHeading(1);\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowX(robot.listOfPro.get(i).getNowX() + 1);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowHeading(2);\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowY(robot.listOfPro.get(i).getNowY() - 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} else if (right > 0.25) {\r\n\t\t\t\trobot.correctHeading(90);\r\n\t\t\t\trobot.getPilot().travel(25);\r\n\t\t\t\tfor (int i = 0; i < robot.listOfPro.size(); i++) {\r\n\t\t\t\t\tif(robot.listOfPro.get(i).getSteps()==loopRound) {\r\n\t\t\t\t\t\tif (robot.listOfPro.get(i).getNowHeading() == 0) {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowHeading(1);\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowX(robot.listOfPro.get(i).getNowX() + 1);\r\n\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 1) {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowHeading(2);\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowY(robot.listOfPro.get(i).getNowY() - 1);\r\n\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 2) {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowHeading(3);\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowX(robot.listOfPro.get(i).getNowX() - 1);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowHeading(0);\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowY(robot.listOfPro.get(i).getNowY() + 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} else {\r\n\t\t\t\trobot.correctHeading(180);\r\n\t\t\t\trobot.getPilot().travel(25);\r\n\t\t\t\tfor (int i = 0; i < robot.listOfPro.size(); i++) {\r\n\t\t\t\t\tif(robot.listOfPro.get(i).getSteps()==loopRound) {\r\n\t\t\t\t\t\tif (robot.listOfPro.get(i).getNowHeading() == 0) {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowHeading(2);\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowY(robot.listOfPro.get(i).getNowY() - 1);\r\n\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 1) {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowHeading(3);\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowX(robot.listOfPro.get(i).getNowX() - 1);\r\n\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 2) {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowHeading(0);\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowY(robot.listOfPro.get(i).getNowY() + 1);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowHeading(1);\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowX(robot.listOfPro.get(i).getNowX() + 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// It time to check the around situation\r\n\t\t\tfront = USThread.disSample[0];\r\n\t\t\trobot.setmotorM(90);\r\n\t\t\tDelay.msDelay(1000);\r\n\t\t\tleft = USThread.disSample[0];\r\n\t\t\trobot.setmotorM(-180);\r\n\t\t\tDelay.msDelay(1000);\r\n\t\t\tright = USThread.disSample[0];\r\n\t\t\trobot.setmotorM(90);\r\n\t\t\tDelay.msDelay(1000);\r\n\t\t\trobot.correctHeading(180);\r\n\t\t\tDelay.msDelay(1000);\r\n\t\t\tback = USThread.disSample[0];\r\n\t\t\trobot.correctHeading(180);\r\n\t\t\tDelay.msDelay(1000);\r\n\t\t\tfor (int i = 0; i < robot.listOfPro.size(); i++) {\r\n\t\t\t\t//System.out.println(robot.listOfPro.get(i).getSteps());\r\n\t\t\t\t\tif (robot.listOfPro.get(i).getNowHeading() == 0) {\r\n\t\t\t\t\t\tif (((front < 0.25\r\n\t\t\t\t\t\t\t\t&& robot.probability[robot.listOfPro.get(i).getNowX()][robot.listOfPro.get(i).getNowY()\r\n\t\t\t\t\t\t\t\t\t\t+ 1] == 100)\r\n\t\t\t\t\t\t\t\t|| (front > 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t.get(i).getNowY() + 1] == -1))\r\n\t\t\t\t\t\t\t\t\t\t&& ((left < 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()\r\n\t\t\t\t\t\t\t\t\t\t\t\t- 1][robot.listOfPro.get(i).getNowY()] == 100)\r\n\t\t\t\t\t\t\t\t|| (left > 0.25\r\n\t\t\t\t\t\t\t\t\t\t&& robot.probability[robot.listOfPro.get(i).getNowX() - 1][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t\t\t.get(i).getNowY()] == -1))\r\n\t\t\t\t\t\t\t\t\t\t&& ((right < 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()\r\n\t\t\t\t\t\t\t\t\t\t\t\t+ 1][robot.listOfPro.get(i).getNowY()] == 100)\r\n\t\t\t\t\t\t\t\t|| (right > 0.25\r\n\t\t\t\t\t\t\t\t\t\t&& robot.probability[robot.listOfPro.get(i).getNowX() + 1][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t\t\t.get(i).getNowY()] == -1))\r\n\t\t\t\t\t\t\t\t\t\t&& ((back < 0.25 && robot.probability[robot.listOfPro.get(i)\r\n\t\t\t\t\t\t\t\t\t\t\t\t.getNowX()][robot.listOfPro.get(i).getNowY() - 1] == 100)\r\n\t\t\t\t\t\t\t\t|| (back > 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t.get(i).getNowY() - 1] == -1))) {\r\n\t\t\t\t\t\t\t//It is correct when the robot have the same data information with estimate information\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setSteps(robot.listOfPro.get(i).getSteps() + 1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 1) {\r\n\t\t\t\t\t\tif (((left < 0.25\r\n\t\t\t\t\t\t\t\t&& robot.probability[robot.listOfPro.get(i).getNowX()][robot.listOfPro.get(i).getNowY()\r\n\t\t\t\t\t\t\t\t\t\t+ 1] == 100)\r\n\t\t\t\t\t\t\t\t|| (left > 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t.get(i).getNowY() + 1] == -1))\r\n\t\t\t\t\t\t\t\t\t\t&& ((back < 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()\r\n\t\t\t\t\t\t\t\t\t\t\t\t- 1][robot.listOfPro.get(i).getNowY()] == 100)\r\n\t\t\t\t\t\t\t\t|| (back > 0.25\r\n\t\t\t\t\t\t\t\t\t\t&& robot.probability[robot.listOfPro.get(i).getNowX() - 1][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t\t\t.get(i).getNowY()] == -1))\r\n\t\t\t\t\t\t\t\t\t\t&& ((front < 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()\r\n\t\t\t\t\t\t\t\t\t\t\t\t+ 1][robot.listOfPro.get(i).getNowY()] == 100)\r\n\t\t\t\t\t\t\t\t|| (front > 0.25\r\n\t\t\t\t\t\t\t\t\t\t&& robot.probability[robot.listOfPro.get(i).getNowX() + 1][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t\t\t.get(i).getNowY()] == -1))\r\n\t\t\t\t\t\t\t\t\t\t&& ((right < 0.25 && robot.probability[robot.listOfPro.get(i)\r\n\t\t\t\t\t\t\t\t\t\t\t\t.getNowX()][robot.listOfPro.get(i).getNowY() - 1] == 100)\r\n\t\t\t\t\t\t\t\t|| (right > 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t.get(i).getNowY() - 1] == -1))) {\r\n\t\t\t\t\t\t\t//It is correct when the robot have the same data information with estimate information\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setSteps(robot.listOfPro.get(i).getSteps() + 1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 2) {\r\n\t\t\t\t\t\tif (((back < 0.25\r\n\t\t\t\t\t\t\t\t&& robot.probability[robot.listOfPro.get(i).getNowX()][robot.listOfPro.get(i).getNowY()\r\n\t\t\t\t\t\t\t\t\t\t+ 1] == 100)\r\n\t\t\t\t\t\t\t\t|| (back > 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t.get(i).getNowY() + 1] == -1))\r\n\t\t\t\t\t\t\t\t\t\t&& ((right < 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()\r\n\t\t\t\t\t\t\t\t\t\t\t\t- 1][robot.listOfPro.get(i).getNowY()] == 100)\r\n\t\t\t\t\t\t\t\t|| (right > 0.25\r\n\t\t\t\t\t\t\t\t\t\t&& robot.probability[robot.listOfPro.get(i).getNowX() - 1][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t\t\t.get(i).getNowY()] == -1))\r\n\t\t\t\t\t\t\t\t\t\t&& ((left < 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()\r\n\t\t\t\t\t\t\t\t\t\t\t\t+ 1][robot.listOfPro.get(i).getNowY()] == 100)\r\n\t\t\t\t\t\t\t\t|| (left > 0.25\r\n\t\t\t\t\t\t\t\t\t\t&& robot.probability[robot.listOfPro.get(i).getNowX() + 1][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t\t\t.get(i).getNowY()] == -1))\r\n\t\t\t\t\t\t\t\t\t\t&& ((front < 0.25 && robot.probability[robot.listOfPro.get(i)\r\n\t\t\t\t\t\t\t\t\t\t\t\t.getNowX()][robot.listOfPro.get(i).getNowY() - 1] == 100)\r\n\t\t\t\t\t\t\t\t|| (front > 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t.get(i).getNowY() - 1] == -1))) {\r\n\t\t\t\t\t\t\t//It is correct when the robot have the same data information with estimate information\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setSteps(robot.listOfPro.get(i).getSteps() + 1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif (((right < 0.25\r\n\t\t\t\t\t\t\t\t&& robot.probability[robot.listOfPro.get(i).getNowX()][robot.listOfPro.get(i).getNowY()\r\n\t\t\t\t\t\t\t\t\t\t+ 1] == 100)\r\n\t\t\t\t\t\t\t\t|| (right > 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t.get(i).getNowY() + 1] == -1))\r\n\t\t\t\t\t\t\t\t\t\t&& ((front < 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()\r\n\t\t\t\t\t\t\t\t\t\t\t\t- 1][robot.listOfPro.get(i).getNowY()] == 100)\r\n\t\t\t\t\t\t\t\t|| (front > 0.25\r\n\t\t\t\t\t\t\t\t\t\t&& robot.probability[robot.listOfPro.get(i).getNowX() - 1][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t\t\t.get(i).getNowY()] == -1))\r\n\t\t\t\t\t\t\t\t\t\t&& ((back < 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()\r\n\t\t\t\t\t\t\t\t\t\t\t\t+ 1][robot.listOfPro.get(i).getNowY()] == 100)\r\n\t\t\t\t\t\t\t\t|| (back > 0.25\r\n\t\t\t\t\t\t\t\t\t\t&& robot.probability[robot.listOfPro.get(i).getNowX() + 1][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t\t\t.get(i).getNowY()] == -1))\r\n\t\t\t\t\t\t\t\t\t\t&& ((left < 0.25 && robot.probability[robot.listOfPro.get(i)\r\n\t\t\t\t\t\t\t\t\t\t\t\t.getNowX()][robot.listOfPro.get(i).getNowY() - 1] == 100)\r\n\t\t\t\t\t\t\t\t|| (left > 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t.get(i).getNowY() - 1] == -1))) {\r\n\t\t\t\t\t\t\t//It is correct when the robot have the same data information with estimate information\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setSteps(robot.listOfPro.get(i).getSteps() + 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\tloopRound++;\r\n\t\t}\r\n\t\t// if is out the while loop, it will find the heading and the position of robot right now.\r\n\t\t//Step 3: It is time to use wavefront to come back to the hospital\r\n\t\trobot.restoreDefault();\r\n\t\trobot.RunMode = 1;\r\n\t\tColorThread.updatePos = true;\r\n\t\tColorThread.updateCritical = true;\r\n\t}",
"public TETile[][] interactWithInputString(String input) {\n makeWorld();\n if (checkForLoad(input)) {\n String i = loadWorld();\n if (i.substring(0, 1).equals(\"k\")) {\n floorTile = Tileset.GRASS;\n i = i.substring(1);\n\n }\n interactWithInputString(i + input.substring(1));\n } else {\n //inputSeed = input;\n\n String seed = input.substring(1, input.indexOf('s'));\n Long seedVal = Long.parseLong(seed);\n String commands = input.substring(input.indexOf('s') + 1);\n Random r = new Random(seedVal);\n int numOfRooms = r.nextInt(7 * HEIGHT / 8) + 1;\n create(numOfRooms, r);\n createWalls();\n world[listOfRooms.get(0).p.x + ((listOfRooms.get(0).width) / 2)][listOfRooms.get(0).p.y\n + ((listOfRooms.get(0).height) / 2)] = Tileset.AVATAR;\n //world[listOfRooms.get(listOfRooms.size() - 1).p.x]\n // [listOfRooms.get(listOfRooms.size() - 1).p.y] = Tileset.FLOWER;\n avatarLocation = new Point((listOfRooms.get(0).p.x + ((listOfRooms.get(0).width) / 2)),\n listOfRooms.get(0).p.y + ((listOfRooms.get(0).height) / 2));\n //flowerLocation = new Point(listOfRooms.get(listOfRooms.size() - 1).p.x,\n // listOfRooms.get(listOfRooms.size() - 1).p.y);\n moveCharacters(commands);\n if (floorTile == Tileset.GRASS) {\n input = 'k' + input;\n }\n saveWorld(input);\n }\n return world;\n }",
"public double clubHit(){\n\tScanner scan = new Scanner(System.in);\n\tSystem.out.print(\"Choose a club (1-10): \");\n\tint club = scan.nextInt(); //user chooses a club\n\tSystem.out.print(\"Select power (1-10): \");\n\tint power = scan.nextInt(); //user chooses a power level\n\tdouble mean = mean(club); // the variable mean is assigned to the mean of the club that the user chose\n\tdouble stddev = stddev(club); //the variable stddev is assigned to the standard deviation of the club that the user chose\n\treturn nextDistance(mean, stddev, power); //the method nextDistance is called and then the value that it returns is returned to the main method where it is then assigned to the variable \"hit\"\n\t}",
"protected Unit target() {\n\t\tUnit closest = null; // this variable will contain the closest Unit\n\t\tDouble min = (double) projectile_range; // this will contain the lowest distance\n\t\tList<Entity> entities = level.getEntities();\n\n\t\tfor (int i = 0; i < entities.size(); i++) {\n\t\t\tEntity e = entities.get(i);\n\t\t\tUnit u = (Unit) e; // casts e to Unit\n\t\t\tif (u.equals(this)) continue; // discounts self\n\t\t\tif (u.UNIT_R != UNIT_G && u.UNIT_G != UNIT_R) continue; // discounts Units from own team\n\t\t\tif (!(e instanceof Unit)) continue; // discounts non-Unit entities\n\n\t\t\tdouble distance = MathMachine.distance((u.getX() - x), (u.getY() - y));\n\t\t\t/*\n\t\t\t * int r = 0; int g = 0; for (int y = 0; y < level.getHeight() * 16; y++) { for (int x = 0; x < level.getWidth() * 16; x++) { if (level.redPixels[x + y * level.getWidth() * 16] == true) r++; if (level.greenPixels[x + y * level.getWidth() * 16] == true )g++; System.out.println(\"r: \" + r + \", \" + g); } }\n\t\t\t */\n\t\t\tif (UNIT_R) { // if it is a red unit\n\t\t\t\tif (distance < min) {\n\t\t\t\t\tint xt = (int) Math.round(u.getX());\n\t\t\t\t\tint yt = (int) Math.round(u.getY());\n\t\t\t\t\tif (level.redPixels[(int) Math.round(xt + level.getWidth() * 16.0 * yt)]) {\n\t\t\t\t\t\tclosest = u;\n\t\t\t\t\t\tmin = distance;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (UNIT_G) { // if it is a green unit\n\t\t\t\tif (distance < min) {\n\t\t\t\t\tSystem.out.println(level.greenPixels[(int) Math.round(u.getX() + level.getWidth() * 16.0 * u.getY())]);\n\n\t\t\t\t\tif (level.greenPixels[(int) Math.round(u.getX() + level.getWidth() * 16.0 * u.getY())]) {\n\t\t\t\t\t\tclosest = u;\n\t\t\t\t\t\tmin = distance;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\treturn closest; // the program is fucked if null happens. just a headsup. hopefully you will remember if you get a null pointer exception.\n\t}",
"public static void main(String[] args) {\n\n List<Mine> mines = new ArrayList<>();\n mines.add(new CoalMine(40));\n mines.add(new CoalMine(40));\n mines.add(new CoalMine(40));\n mines.add(new CoalMine(40));\n mines.add(new UraniumMine(100));\n mines.add(new MoonMine(10));\n mines.add(new MoonMine(10));\n mines.add(new HadronCollider(1));\n\n List<EnergyPlant> energyPlants = new ArrayList<>();\n energyPlants.add(new CoalPlant(7));\n energyPlants.add(new CoalPlant(7));\n energyPlants.add(new SolarPlant(2));\n energyPlants.add(new SolarPlant(2));\n energyPlants.add(new NuclearPlant(10000));\n energyPlants.add(new NuclearPlant(10000));\n energyPlants.add(new FusionPlant(20000));\n energyPlants.add(new FusionPlant(20000));\n energyPlants.add(new AnnihilationPlant(25000));\n energyPlants.add(new AnnihilationPlant(25000));\n\n\n var simulation = new Simulation(null, mines, energyPlants);\n simulation.run();\n\n }",
"double CalcGaretz(double amount, double size, double sg, double time, double start_vol,\n \t\t\tint yeast_flocc, double AA) {\n \t\tdouble desired_ibu = CalcRager(amount, size, sg, time, AA);\n \t\tint elevation = 500; // elevation in feet - change for user setting\n \t\tdouble concentration_f = size / start_vol;\n \t\tdouble boil_gravity = (concentration_f * (sg - 1)) + 1;\n \t\tdouble gravity_f = ((boil_gravity - 1.050) / 0.2) + 1;\n \t\tdouble temp_f = (elevation / 550 * 0.02) + 1;\n \n \t\t// iterative loop, uses desired_ibu to define hopping_f, then seeds\n \t\t// itself\n \t\tdouble hopping_f, utilization, combined_f;\n \t\tdouble ibu = desired_ibu;\n \t\tint util_index;\n \t\tfor (int i = 0; i < 5; i++) { // iterate loop 5 times\n \t\t\thopping_f = ((concentration_f * desired_ibu) / 260) + 1;\n \t\t\tif (time > 50)\n \t\t\t\tutil_index = 10;\n \t\t\telse\n \t\t\t\tutil_index = (int) (time / 5.0);\n \t\t\tutilization = util[(util_index * 3) + yeast_flocc];\n \t\t\tcombined_f = gravity_f * temp_f * hopping_f;\n \t\t\tibu = (utilization * AA * amount * 0.749) / (size * combined_f);\n \t\t\tdesired_ibu = ibu;\n \t\t}\n \n \t\treturn ibu;\n \t}",
"public void execute() {\n\t\tdouble xPos = lateralDrive + axialDrive * DimensionConstants.ROBOT_WIDTH_TO_DIAGONAL_RATIO;\n\t\tdouble xNeg = lateralDrive - axialDrive * DimensionConstants.ROBOT_WIDTH_TO_DIAGONAL_RATIO;\n\t\tdouble yPos = longitudinalDrive + axialDrive * DimensionConstants.ROBOT_LENGTH_TO_DIAGONAL_RATIO;\n\t\tdouble yNeg = longitudinalDrive - axialDrive * DimensionConstants.ROBOT_LENGTH_TO_DIAGONAL_RATIO;\n\t\t\n\t\tdouble fld = MathUtilities.magnitude(xPos, yPos);\n\t\tdouble frd = MathUtilities.magnitude(xPos, yNeg);\n\t\tdouble bld = MathUtilities.magnitude(xNeg, yPos);\n\t\tdouble brd = MathUtilities.magnitude(xNeg, yNeg);\n\t\t\n\t\tdouble m = Math.max(MathUtilities.magnitude(lateralDrive, longitudinalDrive), Math.abs(axialDrive));\n\t\tdouble sx1, sy1, sx2;\n\t\tif (m != 0) {\n\t\t\tsx1 = lateralDrive/m;\n\t\t\tsy1 = longitudinalDrive/m;\n\t\t\tsx2 = axialDrive/m;\n\t\t}\n\t\telse {\n\t\t\tsx1 = 0;\n\t\t\tsy1 = 0;\n\t\t\tsx2 = 0;\n\t\t}\n\t\t\n\t\tdouble maxMag = MathUtilities.magnitude(Math.abs(sx1) + DimensionConstants.ROBOT_WIDTH_TO_DIAGONAL_RATIO*Math.abs(sx2),\n\t\t\t\tMath.abs(sy1) + DimensionConstants.ROBOT_LENGTH_TO_DIAGONAL_RATIO*Math.abs(sx2));\n\t\t\n\t\tif (maxMag != 0) {\n\t\t\tfld /= maxMag;\n\t\t\tfrd /= maxMag;\n\t\t\tbld /= maxMag;\n\t\t\tbrd /= maxMag;\n\t\t}\n\t\telse {\n\t\t\tfld = 0;\n\t\t\tfrd = 0;\n\t\t\tbld = 0;\n\t\t\tbrd = 0;\n\t\t}\n\t\t\n\t\tdouble fls = MathUtilities.angle(xPos, yPos);\n\t\tdouble frs = MathUtilities.angle(xPos, yNeg);\n\t\tdouble bls = MathUtilities.angle(xNeg, yPos);\n\t\tdouble brs = MathUtilities.angle(xNeg, yNeg);\n\t\t\n\t\tif((lateralDrive == 0 && longitudinalDrive == 0 && axialDrive == 0)){\n\t\t\tfls = flPivot.getTargetAngle();\n\t\t\tfrs = frPivot.getTargetAngle();\n\t\t\tbls = blPivot.getTargetAngle();\n\t\t\tbrs = brPivot.getTargetAngle();\n\t\t}\n\t\t\n\t\tsteerStrat.setFLDirection(fls);\n\t\tsteerStrat.setFRDirection(frs);\n\t\tsteerStrat.setBLDirection(bls);\n\t\tsteerStrat.setBRDirection(brs);\n\n\t\tdriveStrat.setFLDrive(fld);\n\t\tdriveStrat.setFRDrive(frd);\n\t\tdriveStrat.setBLDrive(bld);\n\t\tdriveStrat.setBRDrive(brd);\n\t\t\n\t\tsteerStrat.execute();\n\t\tdriveStrat.execute();\n\t}",
"public interface LocationsCalculation {\r\n\r\n /**\r\n * To get altitude on behalf of ranges supplied\r\n * \r\n * @param startRange\r\n * start range of altitude point\r\n * \r\n * @param endRange\r\n * end range of altitude point\r\n * \r\n * @return altitude\r\n */\r\n public double generateAltitude(Double startRange, Double endRange);\r\n\r\n /**\r\n * To get latitude on behalf of plus minus subranges supplied\r\n * \r\n * @param latitude\r\n * supplied by user as input\r\n * \r\n * @param plusMinusRange\r\n * subrange of supplied latitudes\r\n * \r\n * @return latitude\r\n */\r\n public double generateLatitude(double latitude, Double plusMinusRange);\r\n\r\n /**\r\n * To get longitude on behalf of plus minus subranges supplied\r\n * \r\n * @param longitude\r\n * supplied by user as input\r\n * \r\n * @param plusMinusRange\r\n * subrange of supplied longitude\r\n * \r\n * @return longitude\r\n */\r\n public double generateLongitude(double longitude, Double plusMinusRange);\r\n\r\n}",
"public abstract Double getMontant();",
"protected void calculatePathfindingGrid(Tile[] tiles) {\n \n if(tiles == null) {\n return;\n }\n \n /**\n * Problem:\n * Because the tile size used by the path finding engine will most likely be\n * different from that of the visual effect size, we have to\n * look at all the visual tiles and judge whether they are blocking of\n * particular kinds of unit.\n * \n * Algorithm:\n * For land, air and sea take a look at the number of blocking/non-blocking\n * tiles there are and if there is over 50% either way then that will be the\n * PathTiles result.\n */\n \n // First get the size of the map in PathTile(s)\n int rows = getActualHeightInTiles();\n int cols = getActualWidthInTiles();\n \n // Calculate the number of tiles to a PathTile\n int tilesPerActualTilesX = getActualTileWidth() / getTileWidth();\n int tilesPerActualTilesY = getActualTileHeight() / getTileHeight();\n int tileCount = tilesPerActualTilesX * tilesPerActualTilesY;\n \n int tileCols = getWidthInTiles();\n \n // Create an array\n mPathTiles = new PathTile[ rows * cols ];\n \n // Iterate through these tiles\n for(int x = 0; x < cols ; x++) {\n for(int y = 0; y < rows; y++) {\n \n // Setup some variables\n int blockSea, blockAir, blockLand;\n blockAir = blockLand = blockSea = 0;\n \n // Figure out the percentage of each block\n for(int tx = 0; tx < tilesPerActualTilesX; tx++) {\n for(int ty = 0; ty < tilesPerActualTilesY; ty++) {\n \n int tileX = (x * tilesPerActualTilesX) + tx;\n int tileY = (y * tilesPerActualTilesY) + ty;\n \n Tile thisTile = tiles[ (tileY * tileCols) + tileX ];\n \n if(thisTile.blockAir()) {\n blockAir++;\n }\n \n if(thisTile.blockLand()) {\n blockLand++;\n }\n \n if(thisTile.blockSea()) {\n blockSea++;\n }\n \n }\n }\n \n // Calculate percentage\n float a,b,c;\n a = (float)blockAir / (float)tileCount;\n b = (float)blockLand / (float)tileCount;\n c = (float)blockSea / (float)tileCount;\n \n // Set the new tile\n mPathTiles[ (y * cols) + x ] = new PathTile( (a >= .5f), (b >= .5f), (c >= .5f) );\n \n // System.out.println(\"Grid \" + ((y * cols) + x) + \" (\" + x + \", \" + y + \") Air: \" + a + \" Land: \" + b + \" Sea: \" + c);\n \n }\n }\n \n }",
"Vec3 getHomeCoords(IGeneticMob geneticMob);",
"public void Attack(){\n float randomx = (float)(Math.random()-0.5)*attackRange*GameView.instance.cameraSize/10;\n float randomy = (float)(Math.random()-0.5)*attackRange*GameView.instance.cameraSize/5;\n Vector2 target = GameView.instance.player.aimFor();\n float dx = target.x-creationPoint.x;\n float dy =target.y-creationPoint.y;\n float l= (float)Math.sqrt(dx*dx+dy*dy);\n dx = dx/l-((float)Math.random()-0.5f)/2;\n dy = dy/l-(float)(Math.random())/10;\n ProjectilePool.instance.shootArrow(creationPoint.x, creationPoint.y, 1, dx, dy, 3);\n }",
"private void fetchTile() {\n\t\t\tif (tile.getRequest().isCancelled() || tile.isFinal()) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tMapSource source = tile.getRequest().getSource();\n\t\t\tProjObj proj = tile.getRequest().getProjection();\n\t\t\tfinal int ppd = tile.getRequest().getPPD();\n\t\t\t\n\t\t\tfor (int fuzzyPPD = ppd/2 ; fuzzyPPD > 1 ; fuzzyPPD /= 2){\t\t\t\t\n\t\t\t\tint ratio = ppd / fuzzyPPD;\n\t\t\t\t\n\t\t\t\t// A tile has 256 pixels on a side.\n\t\t\t\t// Using this method, we can't upscale data to be fuzzy if it's more than 256 times larger \n\t\t\t\t// than the area we are looking to fill. Upscaling data more than 16 times seems unlikely to provide\n\t\t\t\t// any real benefit to the user, so we will quit our search at this point\n\t\t\t\tif (ratio>16) break;\n\t\t\t\t\n\t\t\t\tString tileName = CacheManager.getTileName(\n\t\t\t\t\tsource.getName(), proj, fuzzyPPD,\n\t\t\t\t\ttile.getXtile()/ratio, tile.getYtile()/ratio,\n\t\t\t\t\tsource.hasNumericKeyword());\n\t\t\t\t\n\t\t\t\tBufferedImage tileImage = CacheManager.getTile(source, tileName);\n\t\t\t\t\n\t\t\t\tif (tileImage==null) {\t\t\t\t\t\t\t\t\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tint xtileindex = tile.getXtile() % ratio;\n\t\t\t\tint ytileindex = ratio - (tile.getYtile() % ratio) - 1;\n\t\t\t\t\n\t\t\t\tdouble fuzzyxstep = MapRetriever.tiler.getPixelWidth() / ratio;\n\t\t\t\tdouble fuzzyystep = MapRetriever.tiler.getPixelHeight() / ratio;\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\ttileImage = tileImage.getSubimage((int)(xtileindex * fuzzyxstep), (int)(ytileindex * fuzzyystep), (int)fuzzyxstep, (int)fuzzyystep);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tlog(e);\n\t\t\t\t\tlog(\"xtileindex:\"+xtileindex+\" fuzzyxstep:\"+fuzzyxstep+\" ytileindex:\"+ytileindex+\" fuzzyystep:\"+fuzzyystep);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tlong outputImageSize = (tileImage.getWidth()*ratio)*(tileImage.getHeight()*ratio);\n\t\t\t\tif (outputImageSize <= 0 || outputImageSize > Integer.MAX_VALUE){\n\t\t\t\t\tlog(\"Scaling tile from \"+fuzzyPPD+\" to \"+ppd+\" will result in image size overflow.\"+\n\t\t\t\t\t\t\t\" Stopping further search for lower PPDs for this tile.\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttileImage = CacheManager.scaleImage(tileImage, ratio);\n\t\t\t\t\n\t\t\t\tmyRetriever.fuzzyResponse(tile, tileImage);\n\t\t\t}\t\t\t\t\t\t\n\t\t}",
"public static void main(String[] args) {\n //ask user to give you his car kilometerage\n //then return the mileage\n\n //why i have to take int?\n System.out.println(\"Please enter kms\");\n Scanner scanner= new Scanner(System.in);\n double kilometre = scanner.nextDouble();\n\n\n //we can pass hard coded values to method params\n //and variables that are of the same data type\n double mileAgeResult = getMeCarMileage(kilometre);\n System.out.println(mileAgeResult);\n\n }",
"public Shooter(Turret in_Turret, Indexer in_Indexer) {\n m_Turret = in_Turret;\n m_Indexer = in_Indexer;\n\n sparkMax1 = new CANSparkMax(RobotMap.ShooterSparkMax1, MotorType.kBrushless);//31\n sparkMax2 = new CANSparkMax(RobotMap.ShooterSparkMax2, MotorType.kBrushless);\n\n sparkMax1.restoreFactoryDefaults();\n sparkMax2.restoreFactoryDefaults();\n\n sparkMax2.follow(sparkMax1, true);\n\n pidController = sparkMax1.getPIDController();\n encoder = sparkMax1.getEncoder();\n\n // PID coefficients\n kP = 0.001; \n kI = 0;\n kD = 0.00002; \n kIz = 0; \n kFF = 0.00002; \n kMaxOutput = 1; \n kMinOutput = -1;\n maxRPM = 6550;\n minRPM = 4150;\n\n // set PID coefficients\n pidController.setP(kP);\n pidController.setI(kI);\n pidController.setD(kD);\n pidController.setIZone(kIz);\n pidController.setFF(kFF);\n pidController.setOutputRange(kMinOutput, kMaxOutput);\n\n SmartDashboard.putBoolean(\"shooter at rpm\", false);\n SmartDashboard.putNumber(\"shooter Desired velocity\", 0);\n SmartDashboard.putNumber(\"shooter Actual velocity\", encoder.getVelocity());\n SmartDashboard.putNumber(\"shooter distance\", 0);\n SmartDashboard.putNumber(\"shooter compensated rpms\", 0);\n SmartDashboard.putNumber(\"shooter expected rpms\", 0);\n\n }",
"public static void main(String[] args) {\r\n\t\t//double lat = 36.149 + (0.001 * Math.random());\r\n\t\t//double lon = -86.800 + (0.001 * Math.random());\r\n\t\t\r\n\t\t// Note: The game area must already be set for this to work!\r\n\t\t\r\n\t\t// This puts a land mine in the middle of the parking lot\r\n\t\t// between ISIS and 21st.\r\n\t\tdouble lat = 36.14923059940338;\r\n\t\tdouble lon = -86.79988324642181;\r\n\t\tdouble rad = 5.0;\r\n\t\tLandMine lm = new LandMine(lat, lon, rad);\r\n\t\t//doLandMinePost(lm);\r\n\t\tdoLandMineRemove(lm);\r\n\t}",
"public ParticleMesh getMissileTrail() {\r\n for (int x = 0, tSize = missileTrails.size(); x < tSize; x++) {\r\n ParticleMesh e = missileTrails.get(x);\r\n if (!e.isActive()) {\r\n e.getParticleController().setRepeatType(Controller.RT_WRAP);\r\n e.forceRespawn();\r\n return e;\r\n }\r\n }\r\n return createMissileTrail();\r\n }",
"public Pile getHandPile(){\n return piles.getHandPile();\n }",
"public TETile[][] interactWithInputString(String input) {\n\n // passed in as an argument, and return a 2D tile representation of the\n // world that would have been drawn if the same inputs had been given\n // to interactWithKeyboard().\n //\n // See proj3.byow.InputDemo for a demo of how you can make a nice clean interface\n // that works for many different input types.\n //String seedstring = input.substring(1, input.length() - 1);\n if (input.substring(0,1).equals(\"n\")) {\n String seed = \"\";\n String movements = \"\";\n for (int i = 0; i < input.length(); i++) {\n\n try { // I might be missing a step.\n int num = Integer.parseInt(input.substring(i, i + 1));\n seed += input.substring(i, i + 1);\n\n } catch (Exception e) {\n\n if ((input.substring(i, i+1).equals(\":\")) && input.substring(i, i+2).equals(\":q\")) {\n System.out.println(\"saved\");\n saveEditor(\"seed\", seed);\n saveEditor(\"movements\", movements);\n break;\n } else if (input.substring(i, i + 1).equals(\"w\") || input.substring(i, i + 1).equals(\"s\") || input.substring(i, i + 1).equals(\"a\")\n || input.substring(i, i + 1).equals(\"d\")) {\n movements += input.substring(i, i + 1);\n }\n }\n }\n\n\n load_and_move(seed,movements);\n ter.renderFrame(this.tiles);\n return this.tiles;\n }\n\n else if(input.substring(0, 1).equals(\"l\")) {\n File seed_file = new File(\"seed.txt\");\n File movements_file = new File(\"movements.txt\");\n String seed = loadEditor(seed_file);\n String movements = loadEditor(movements_file);\n this.rand = new Random(Long.parseLong(seed));\n for (int i = 0; i < input.length(); i++) {\n if ((input.substring(i, i+1).equals(\":\")) && input.substring(i, i+2).equals(\":q\")) {\n System.out.println(\"saved\");\n saveEditor( \"seed\", seed);\n saveEditor(\"movements\", movements);\n break;\n } else if (input.substring(i, i + 1).equals(\"w\") || input.substring(i, i + 1).equals(\"s\") || input.substring(i, i + 1).equals(\"a\")\n || input.substring(i, i + 1).equals(\"d\")) {\n movements += input.substring(i, i + 1);\n }\n }\n\n load_and_move(seed,movements);\n ter.renderFrame(this.tiles);\n return this.tiles;\n }\n else{\n return null;\n }\n\n }",
"public void getGSpeedAfterJumpLand() {\n if(jumpState == JumpState.STATE_JUMP_DOWN && angle < 45) {\n groundSpeed = xSpeed;\n }\n else if(jumpState == JumpState.STATE_JUMP_DOWN && angle == 45) {\n if(Math.abs(xSpeed) > ySpeed) {\n groundSpeed = xSpeed; \n }\n else {\n groundSpeed = ySpeed*0.5*-Math.signum(Math.sin(angle));\n } \n } \n jumpState = JumpState.STATE_NOJUMP;\n springState = SpringState.STATE_NOSPRING;\n }",
"private void initiateProjectile() {\n\t}",
"public static double getWeaponDamage(Item weapon, Skill attStrength) {\n/* 2348 */ if (weapon.isBodyPart() && weapon.getAuxData() != 100) {\n/* */ \n/* */ try {\n/* */ \n/* 2352 */ float f = Server.getInstance().getCreature(weapon.getOwnerId()).getCombatDamage(weapon);\n/* */ \n/* 2354 */ return (f + Server.rand.nextFloat() * f * 2.0F);\n/* */ }\n/* 2356 */ catch (NoSuchCreatureException nsc) {\n/* */ \n/* 2358 */ logger.log(Level.WARNING, \"Could not find Creature owner of weapon: \" + weapon + \" due to \" + nsc.getMessage(), (Throwable)nsc);\n/* */ \n/* */ }\n/* 2361 */ catch (NoSuchPlayerException nsp) {\n/* */ \n/* 2363 */ logger.log(Level.WARNING, \"Could not find Player owner of weapon: \" + weapon + \" due to \" + nsp.getMessage(), (Throwable)nsp);\n/* */ } \n/* */ }\n/* */ \n/* */ \n/* 2368 */ float base = 6.0F;\n/* 2369 */ if (weapon.isWeaponSword()) {\n/* */ \n/* 2371 */ base = 24.0F;\n/* */ }\n/* 2373 */ else if (weapon.isWeaponAxe()) {\n/* 2374 */ base = 30.0F;\n/* 2375 */ } else if (weapon.isWeaponPierce()) {\n/* 2376 */ base = 12.0F;\n/* 2377 */ } else if (weapon.isWeaponSlash()) {\n/* 2378 */ base = 18.0F;\n/* 2379 */ } else if (weapon.isWeaponCrush()) {\n/* 2380 */ base = 36.0F;\n/* 2381 */ } else if (weapon.isBodyPart() && weapon.getAuxData() == 100) {\n/* */ \n/* 2383 */ base = 6.0F;\n/* */ } \n/* 2385 */ if (weapon.isWood()) {\n/* 2386 */ base *= 0.1F;\n/* 2387 */ } else if (weapon.isTool()) {\n/* 2388 */ base *= 0.3F;\n/* */ } \n/* 2390 */ base = (float)(base * (1.0D + attStrength.getKnowledge(0.0D) / 100.0D));\n/* */ \n/* 2392 */ float randomizer = (50.0F + Server.rand.nextFloat() * 50.0F) / 100.0F;\n/* */ \n/* 2394 */ return base + (randomizer * base * 4.0F * weapon.getQualityLevel() * weapon.getDamagePercent()) / 10000.0D;\n/* */ }",
"public Tile diveBomb() {\n List<Tile> targets = this.findTargets();\n Tile us_tile = this.gb.get(this.us_head_x, this.us_head_y);\n LinkedList<Tile> shortestPath = null;\n\n // Chose the shortest path\n //System.out.println(\"HeadX: \" + this.us_head_x + \" HeadY: \" + this.us_head_y);\n //System.out.println(\"EnemyX: \" + this.enemy_head_x + \" EnemyY: \" + this.enemy_head_y);\n // System.out.println(\"Targets - \" + targets);\n for (Tile target : targets) {\n LinkedList<Tile> path = this.dk.path(us_tile, target, this.gb);\n\n if (path != null) { // means we couldn't reach the desired target\n // System.out.println(\"Path - \" + path);\n if (shortestPath == null) {\n shortestPath = path;\n } else if (path.size() < shortestPath.size()) {\n shortestPath = path;\n }\n }\n }\n // System.out.println(\"Shortest Path - \" + shortestPath);\n if (shortestPath == null) return us_tile;\n return shortestPath.get(1);\n }",
"public GameObject spawnBigBeamer(LogicEngine in_logicEngine) {\n\t\tGameObject ship = new GameObject(\"data/\"+GameRenderer.dpiFolder+\"/bigbeamer.png\",((float)LogicEngine.SCREEN_WIDTH/2),LogicEngine.SCREEN_HEIGHT+64,0);\r\n\t\tship.i_animationFrameSizeHeight = 115;\r\n\t\tship.i_animationFrameSizeWidth = 115;\r\n\t\t\r\n\t\t\r\n\t\tship.stepHandlers.add(new FlyStraightStep(new Vector2d(0,-1f)));\r\n\t\t\r\n\t\r\n\t\tship.v.setMaxForce(2.5f);\r\n\t\tship.v.setMaxVel(2.5f);\r\n\t\tship.allegiance = GameObject.ALLEGIANCES.ENEMIES;\r\n\t\t\r\n\t\tint i_shootEvery = 80;\r\n\t\t\r\n\t\tBeamShot b = new BeamShot(i_shootEvery);\r\n\t\t\r\n\t\tb.b_flare=false;\r\n\t\tb.f_offsetX=-40;\r\n\t\tb.f_offsetY=-30;\r\n\t\tb.i_delay = 40;\r\n\t\tb.i_beamWidth = 15;\r\n\t\t\r\n\t\tBeamShot b2 = new BeamShot(i_shootEvery);\r\n\t\tb2.b_flare=false;\r\n\t\tb2.f_offsetX=40;\r\n\t\tb2.f_offsetY=-30;\r\n\t\tb2.i_delay = 40+(i_shootEvery/2);\r\n\t\tb2.i_beamWidth = 15;\r\n\t\tb.nextBeam = b2;\r\n\t\t\r\n\t\tship.shootEverySteps=1;\r\n\t\tship.shotHandler = b;\r\n\t\t\r\n\t\tHitpointShipCollision c = new HitpointShipCollision(ship, 100, 50f);\r\n\t\t\r\n\t\tif(!Difficulty.isHard())\r\n\t\t\tc.f_numberOfHitpoints = 200;\r\n\t\tif(!Difficulty.isMedium())\r\n\t\t\tc.f_numberOfHitpoints = 160;\r\n\t\t\r\n\t\tc.setExplosion(Utils.getBossExplosion(ship));\r\n\t\tship.collisionHandler = c;\r\n\t\t\r\n\t\tin_logicEngine.objectsEnemies.add(ship);\r\n\t\t\r\n\t\treturn ship;\r\n\t}",
"public MineralLocation getMineralLocation(RobotOrientation orientation){\n MineralLocation absoluteLocation = MineralLocation.Center;\n //if tfod failed to init, just return center\n //otherwise, continue with detection\n if(!error) {\n List<Recognition> updatedRecognitions = tfod.getRecognitions();\n List<Recognition> filteredList = new ArrayList<Recognition>();\n\n /*for(Recognition recognition : updatedRecognitions){\n if(recognition.getHeight() < recognition.getImageHeight() * 3 / 11){\n filteredList.add(recognition);\n }\n }*/\n //Variabes to store two mins\n Recognition min1 = null;\n Recognition min2 = null;\n //Iterate through all minerals\n for(Recognition recognition : updatedRecognitions){\n double height = recognition.getHeight();\n if (min1 == null){\n min1 = recognition;\n }\n else if(min2 == null){\n min2 = recognition;\n }\n else if(height < min1.getHeight()){\n min1 = recognition;\n }\n else if(height < min2.getHeight()){\n min2 = recognition;\n }\n if (min1 != null && min2 != null){\n if(min1.getHeight() > min2.getHeight()){\n Recognition temp = min1;\n min1 = min2;\n min2 = temp;\n }\n }\n }\n filteredList.add(min1);\n filteredList.add(min2);\n int goldMineralX = -1;\n int silverMineral1X = -1;\n int silverMineral2X = -1;\n //Three Mineral Algorithm\n if(orientation == RobotOrientation.Center){\n for (Recognition recognition : filteredList) {\n if (recognition.getLabel().equals(LABEL_GOLD_MINERAL)) {\n goldMineralX = (int) recognition.getLeft();\n } else if (silverMineral1X == -1) {\n silverMineral1X = (int) recognition.getLeft();\n } else {\n silverMineral2X = (int) recognition.getLeft();\n }\n }\n if (goldMineralX != -1 && silverMineral1X != -1 && silverMineral2X != -1) {\n if (goldMineralX < silverMineral1X && goldMineralX < silverMineral2X) {\n return MineralLocation.Left;\n } else if (goldMineralX > silverMineral1X && goldMineralX > silverMineral2X) {\n return MineralLocation.Right;\n } else {\n return MineralLocation.Center;\n }\n }\n }\n else{//Two Mineral Algorithm\n //looks at each detected object, obtains \"the most\" gold and silver mineral\n float goldMineralConfidence = 0;\n float silverMineralConfidence = 0;\n for (Recognition recognition : updatedRecognitions) {\n String label = recognition.getLabel();\n float confidence = recognition.getConfidence();\n int location = (int) recognition.getLeft();\n if (label.equals(LABEL_GOLD_MINERAL)\n && confidence > goldMineralConfidence) {\n goldMineralX = location;\n goldMineralConfidence = confidence;\n } else if (label.equals(LABEL_SILVER_MINERAL)\n && confidence > silverMineralConfidence) {\n silverMineral1X = location;\n silverMineralConfidence = confidence;\n }\n }\n //using the two gold and silver object x locations,\n //obtains whether the gold mineral is on the relative left or the right\n boolean goldRelativeLeft;\n if (goldMineralX != -1 && silverMineral1X != -1) {\n if (goldMineralX < silverMineral1X) {\n goldRelativeLeft = true;\n } else {\n goldRelativeLeft = false;\n }\n // telemetry.addData(\"Relative\", goldRelativeLeft);\n //translates the relative location to an absolute location based off the orientation\n if (orientation == RobotOrientation.Left) {\n if (goldRelativeLeft) {\n absoluteLocation = MineralLocation.Left;\n } else {\n absoluteLocation = MineralLocation.Center;\n }\n //telemetry.addData(\"orientation\",absoluteLocation);\n } else {\n if (goldRelativeLeft) {\n absoluteLocation = MineralLocation.Center;\n } else {\n absoluteLocation = MineralLocation.Right;\n }\n // telemetry.addData(\"orientation\",\"fail\");\n }\n } //sees at least one silver (so not a reading from the wrong position, but no gold seen)\n else if(silverMineral1X != -1 && goldMineralX == -1){\n if(orientation == RobotOrientation.Left){\n absoluteLocation = MineralLocation.Right;\n }else if(orientation == RobotOrientation.Right){\n absoluteLocation = MineralLocation.Left;\n }\n }\n }\n\n }\n return absoluteLocation;\n }",
"public GameLogic() {\n this.display = createScreen();\n playerShipHealth = 30;\n enemyShipHealth = 20;\n playerShield = 1;\n enemyShield = 1;\n playerMissile = 10;\n enemyMissile = 5;\n\n isPlayerPilotDamaged = false;\n isPlayerGunLDamaged = false;\n isPlayerGunMDamaged = false;\n isPlayerShieldDamaged = false;\n isPlayerEngineDamaged = false;\n\n isEnemyPilotDamaged = false;\n isEnemyGunLDamaged = false;\n isEnemyGunMDamaged = false;\n isEnemyShieldDamaged = false;\n isEnemyEngineDamaged = false;\n\n playerEvasionPercent = .3;\n enemyEvasionPercent = .3;\n\n }",
"public Projectile[] fire() {\r\n /*\r\n * Hint, to get a spread, second parameter to Projectile() should\r\n * be something like (i - (NUM_CANNONS / 2)) * SPREAD\r\n */\r\n \r\n\t\tProjectile[] x = new Projectile[NUM_CANNONS];\r\n\t\tPosition p = new Position(pos.getX() + InvaderShip.SHIPS_Y / 2, pos.getY() - InvaderShip.SHIPS_X / 2);\r\n\t\tx[0] = new Projectile(p, (0 - (NUM_CANNONS / 2)) * SPREAD, -PROJECTILE_SPEED, -.01 );\r\n\t\t\r\n\t\t\r\n\t\treturn null;\r\n\t}",
"public FloorTile getGoalTile() {\r\n return goalTile;\r\n }",
"private void calculate() {\n\t\tSharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(this);\r\n\t\tString arrowSpeed = sharedPref.getString(SettingsActivity.ARROW_SPEED, DEFAULT_ARROW_SPEED+\"\"); \r\n\r\n\t\tfinal double mToYards = 0.9144;\r\n\t\tfinal int mToMm = 1000;\r\n\r\n\t\ttry {\r\n\t\t\tfinal double v = Double.parseDouble(arrowSpeed); // Velocity\r\n\r\n\t\t\tdouble d = Double.parseDouble(findSelectedEditText(findSelectedRadioButton(\r\n\t\t\t\t\tR.id.radioGroupDistance), \"Distance\").getText().toString()); // Distance\r\n\t\t\tdouble e = Double.parseDouble(findSelectedEditText(findSelectedRadioButton(\r\n\t\t\t\t\tR.id.radioGroupElevation), \"Elevation\").getText().toString()); //Elevation\r\n\r\n\t\t\tString distanceType = findSelectedRadioButton(R.id.radioGroupDistance).getText().toString();\r\n\t\t\tString elevationType = findSelectedRadioButton(R.id.radioGroupElevation).getText().toString();\r\n\r\n\t\t\tif (distanceType == \"Yards\") {\r\n\t\t\t\td *= mToYards;\r\n\t\t\t}\r\n\r\n\t\t\tif (elevationType.equals(\"Yards\")) {\r\n\t\t\t\te *= mToYards;\r\n\t\t\t} else if (elevationType.equals(\"Degrees\")) {\r\n\t\t\t\te = Math.toRadians(e);\r\n\t\t\t\te = d * Math.sin(e);\r\n\t\t\t} else if (elevationType.equals(\"Radians\")) {\r\n\t\t\t\te = d * Math.sin(e);\r\n\t\t\t}\r\n\r\n\r\n\t\t\tdouble da = Math.sqrt(Math.pow(d, 2) - Math.pow(e, 2)); // Calculates horizontal distance\r\n\r\n\t\t\tdouble radians = Math.atan((-Math.pow(v, 2) + Math.sqrt(Math.pow(v, 4) - Math.pow(g*d, 2)))/(g*d));\r\n\t\t\tdouble radians2 = Math.atan((-Math.pow(v, 2) + Math.sqrt(Math.pow(v, 4) + 2*e*g*Math.pow(v, 2) - Math.pow(g*da, 2)))/(g*da));\r\n\r\n\t\t\tdouble answer = -Math.tan(radians2-Math.asin(e/d)-radians);\r\n\t\t\tDecimalFormat df = new DecimalFormat(\"#.##\");\r\n\r\n\t\t\tString result = df.format(answer * mToMm) + \"mm\";\r\n\r\n\t\t\tif (answer > 0) {\r\n\t\t\t\tfindTextView(\"textViewDisplay\").setText(message + arrowSpeed + speedUnit + resultPositiveMessage + result);\r\n\t\t\t} else {\r\n\t\t\t\tfindTextView(\"textViewDisplay\").setText(message + arrowSpeed + speedUnit + resultNegativeMessage + result);\r\n\t\t\t}\r\n\r\n\t\t\t\r\n\t\t\tInputMethodManager inputManager = (InputMethodManager) getSystemService(Activity.INPUT_METHOD_SERVICE); \r\n\t\t\tinputManager.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);\r\n//\t\t\tInputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);\r\n//\t\t\timm.hideSoftInputFromWindow(this.getCurrentFocus().getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\tcT(\"Error Detected\");\r\n\t\t}\r\n\t}",
"@f0g\n @LauncherEventHide\n public void method_739(@NotNull f4u var1) {\n if (var1.c() == f41.field_2120 && !var1.c()) {\n if (this.c.player.dimension != 0) {\n ArrayList var2 = this.method_740();\n float var3 = 0.0F;\n Ref.ObjectRef var4 = new Ref.ObjectRef();\n var4.element = (BlockPos)null;\n float var5 = this.c.player.getHealth() + this.c.player.getAbsorptionAmount();\n BlockPos var6 = new BlockPos(this.c.player.getPositionVector());\n ArrayList var7 = new ArrayList();\n int var8 = var6.getX() - 10;\n int var9 = (int)((float)var6.getY() + this.c.player.getEyeHeight() - (float)10);\n int var10 = var6.getZ() - 10;\n int var11 = var6.getX() + 10;\n int var12 = (int)((float)var6.getY() + this.c.player.getEyeHeight() + (float)10);\n int var13 = var6.getZ() + 10;\n double var14 = ((Number)this.field_522.c()).doubleValue() * ((Number)this.field_522.c()).doubleValue();\n int var16 = var8;\n\n for(int var17 = var11; var16 < var17; ++var16) {\n int var18 = var9;\n\n for(int var19 = var12; var18 < var19; ++var18) {\n int var20 = var10;\n\n for(int var21 = var13; var20 < var21; ++var20) {\n BlockPos var22 = new BlockPos(var16, var18, var20);\n double var23 = this.c.player.posX - ((double)var22.getX() + 0.5D);\n double var25 = this.c.player.posY - ((double)var22.getY() + 0.5D) + 1.5D;\n double var27 = this.c.player.posZ - ((double)var22.getZ() + 0.5D);\n double var29 = var23 * var23 + var25 * var25 + var27 * var27;\n if (!(var29 > 36.0D) && !(var29 > var14)) {\n Block var31 = feg.method_1779(var22);\n if (!Intrinsics.areEqual((Object)var31, (Object)Blocks.AIR) && !(var31 instanceof BlockLiquid)) {\n if (var31 instanceof BlockBed) {\n float var46 = fdM.method_1882(var22, (EntityLivingBase)this.c.player);\n if (!(Boolean)this.field_523.c() || !(var46 >= var5 + (float)1)) {\n Iterator var34 = var2.iterator();\n\n while(var34.hasNext()) {\n EntityPlayer var33 = (EntityPlayer)var34.next();\n float var35 = fdM.method_1882(var22, (EntityLivingBase)var33);\n if (var35 >= var3) {\n var3 = var35;\n var4.element = var22;\n }\n }\n }\n } else if ((BlockPos)var4.element == null) {\n float[] var32 = few.method_1716().method_1736(var22, EnumFacing.UP);\n if (this.method_741(var22, var32[0])) {\n var7.add(var22);\n }\n }\n }\n }\n }\n }\n }\n\n Ref.ObjectRef var38;\n if ((BlockPos)var4.element != null) {\n var1.0();\n Ref.ObjectRef var37 = new Ref.ObjectRef();\n var37.element = few.method_1732((BlockPos)var4.element, true);\n var38 = new Ref.ObjectRef();\n var38.element = few.method_1716().method_1717((BlockPos)var4.element, (EnumFacing)var37.element);\n var1.method_3139(((fex)var38.element).method_2076().meth3());\n var1.method_3140(((fex)var38.element).method_2076().meth4());\n var1.method_3133((Consumer)(new f6k(this, var4, var37, var38)));\n } else {\n Ref.IntRef var36 = new Ref.IntRef();\n var36.element = fdX.field_1227.method_1839(Items.BED);\n if (var36.element != -1) {\n var38 = new Ref.ObjectRef();\n var38.element = (BlockPos)null;\n Iterator var41 = var7.iterator();\n\n while(true) {\n BlockPos var39;\n float var42;\n do {\n if (!var41.hasNext()) {\n if ((BlockPos)var38.element != null) {\n Ref.ObjectRef var40 = new Ref.ObjectRef();\n var40.element = few.method_1716().method_1717((BlockPos)var38.element, EnumFacing.UP);\n var1.0();\n var1.method_3139(((fex)var40.element).method_2076().meth3());\n var1.method_3140(((fex)var40.element).method_2076().meth4());\n var1.method_3133((Consumer)(new f6l(this, var36, var38, var40)));\n }\n\n return;\n }\n\n var39 = (BlockPos)var41.next();\n var42 = fdM.method_1882(var39, (EntityLivingBase)this.c.player);\n } while((Boolean)this.field_523.c() && var42 >= var5 + (float)1);\n\n Iterator var44 = var2.iterator();\n\n while(var44.hasNext()) {\n EntityPlayer var43 = (EntityPlayer)var44.next();\n float var45 = fdM.method_1882(var39, (EntityLivingBase)var43);\n if (var45 >= var3) {\n var3 = var45;\n var38.element = var39;\n }\n }\n }\n }\n }\n }\n }\n }",
"public Image getWalkB(int player, boolean ep) {if (player==1) return walkB1; else return walkB2;}",
"public static void main(String[] args) {\n\t\t\tColorSensor colorSensor = new ColorSensor(SensorPort.S3);\n\t\t\tcolorSensor.setRGBMode();\n\t\t\tColor rgb; \n\t\t\t\n\t\t\tEV3LargeRegulatedMotor motora = new EV3LargeRegulatedMotor (MotorPort.A);\n\t\t\tEV3LargeRegulatedMotor motorb = new EV3LargeRegulatedMotor (MotorPort.C);\n\t\t\tEV3TouchSensor touchsensor = new EV3TouchSensor (SensorPort.S2);\n\t\t\tEV3IRSensor irSensor = new EV3IRSensor (SensorPort.S1);\n\t\t\t\n\t\t\tWheel wheel1 = WheeledChassis.modelWheel(motora , 2.5).offset(-5.0);\n\t\t Wheel wheel2 = WheeledChassis.modelWheel(motorb , 2.5).offset(5.0);\n\t\t \n\t\t Chassis chassis = new WheeledChassis(new Wheel[] { wheel1, wheel2 }, WheeledChassis.TYPE_DIFFERENTIAL);\n\t\t\t\n\t\t\t\n\t\t\t//is pressed method? do we need to make float values and fetching samples?\n\t\t MovePilot pilot = new MovePilot(chassis);\n\t\t \n\t\t Button.waitForAnyPress(); \n\t\t \n\t\t\tdouble [] hsvmiddle = new double[3];\n\t\t\tdouble [] hsvfloor = new double [3];\n\t\t\tdouble [] hsvline = new double [3];\n\t\t\t\n\t\t\tdouble [] pickupColor = new double [3];\n\t\t\t\n\t\t\t\n\t\t\t\trgb = colorSensor.getColor();\n\t\t\t\thsvmiddle= RGBtoHSV(rgb);\n\t\t\t\t\n\t\t\t\t//rotate to the left to pickup wood color\n\t\t\t\tpilot.rotate(-20);\n\t\t\t\t\n\t\t\t\trgb = colorSensor.getColor();\n\t\t\t\thsvfloor= RGBtoHSV(rgb);\n\t\t\t\t\n\t\t\t\t//rotate to the right to pick up black line\n\t\t\t\tpilot.rotate(30);\n\t\t\t\t\n\t\t\t\trgb = colorSensor.getColor();\n\t\t\t\thsvline= RGBtoHSV(rgb);\n\t\t\t\t\n\t\t\t\t//rotate back to center\n\t\t\t\tpilot.rotate(-10);\n\t\t\t\n\t\t\twhile(Button.ESCAPE.isUp())\n\t\t\t{\n\t\t\t\trgb = colorSensor.getColor();\n\t\t\t\tpickupColor = RGBtoHSV(rgb);\n\t\t\t\t\n\t /*System.out.println(\"RGB = \"+\n\t \" [\" + rgb.getRed() + \",\" + rgb.getGreen() + \",\" + rgb.getBlue() \n\t +\"]\\n \" + \"HSV = \" + \"[ \" + hsv[0] + \",\" + hsv[1] + \",\" + hsv[2] + \",\" +\" ]\");\n\t\t\t\t//delay a second so we don't see so many outputs on the screen\n\t //need to apply to actual line following strategy*/\n\t\t\t\tDelay.msDelay(1000);\n\t\t\t\t\n\t\t\t\t//touch sensor info\n\t\t\t\tSampleProvider distance = touchsensor.getTouchMode();\n\t\t\t\tfloat[] sample = new float[1];\n\t\t\t\t\n\t\t\t\t//ir info\n\t\t\t\tfloat[] sample2 = new float[1];\n\t\t\t\t\n\t\t\t\tpilot.forward();\n\t\t\t\t\n\t\t\t\twhile (!Button.ESCAPE.isDown()) {\n\t\t\t\t\t//when the robot is on the wood it will rotate and fix itself back on the middle\n\t\t\t\t\t if ((((hsvfloor[0]-5)<pickupColor[0])&&((hsvfloor[0]+5>pickupColor[0])))) { \n\t\t\t\t\t\t System.out.println(\"floor\");\n\t\t\t\t\t\t\tpilot.rotate(-4); \n\t\t\t\t\t }\n\t\t\t\t\t //when the robot is on black it will rotate and fix its self back on the middle\n\t\t\t\t\t else if ((((hsvline[0]-5)<pickupColor[0])&&((hsvline[0]+5>pickupColor[0])))) {\n\t\t\t\t\t\t System.out.println(\"black line\");\n\t\t\t\t\t\t\tpilot.rotate(4);\n\t\t\t\t\t}\n\t\t\t\t\t //when the robot is in the middle, it will go forward\n\t\t\t\t\t else if ((((hsvmiddle[0]-5)<pickupColor[0])&&((hsvmiddle[0]+5>pickupColor[0])))) {\n\t\t\t\t\t\t System.out.println (\"middle\");\n\t\t\t\t\t\t pilot.forward();\n\t\t\t\t\t }\n\t\t\t\t\t \n\t\t\t\t\t //need to implement when the robot sees a new color (red) then it with turn or do as it is called to to\n\t\t\t\t\t /*else if ((((hsvred[0]-5)<pickupColor[0])&&((hsvred[0]+5>pickupColor[0])))) {\n\t\t\t\t\t\t \n //touch sensor code\n\t\t\t\t\t distance.fetchSample(sample, 0);\n\t\t\t\t\t\tif (sample[0]== 1) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//pilot.travel(-10);\n\t\t\t\t\t\t\t//pilot.rotate(-90);\n\t\t\t\t\t\t\t//pilot.travel(20);\n\t\t\t\t\t\t\t//pilot.rotate(90);\n\t\t\t\t\t\t\t//pilot.forward();\n\t\t\t\t\t\t}\n\n \n\t\t\t\t\t }*/\n\t\t\t\t\t \n\t\t\t\t\t //when the robot sees silver, then it should recognize that it is at the end of the maze and call to the stacking method to retrace its steps\n\t\t\t\t\t /*else if ((hsvsilver[0]-5<pickupcolor[0])&&(hsvsilver[0]+5<pickupcolor[0])){\n\t\t\t\t\t * end the maze and call the stacking method\n\t\t\t\t\t }*/\n\t\t\t\t\t \n\t\t\t\t\t \t\t\t\t\t\t\n\t\t\t\t\t//ir code\n\t\t\t\t\tdistance.fetchSample(sample, 0);\n\t\t\t\t\t\tif (sample2[0]<=18) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tpilot.travel(-10);\n\t\t\t\t\t\t\tpilot.rotate(-90);\n\t\t\t\t\t\t\tpilot.travel(20);\n\t\t\t\t\t\t\tpilot.rotate(90);\n\t\t\t\t\t\t\tpilot.forward();\n\t\t\t\t\t\t}\n\t\t\t\t\t \n\t\t\t}\n\t\t\t\t\n\t\t\t\t//add hsv for silver end of the maze, and add red for intersections\n\t\t\t\t/*if the robot sees red and cannot turn to the right (ir sensor) then go straight\n\t\t\t\t * \tthen if it cant go forward, turn around and when you get back to the red line then turn left\n\t\t\t\t * if the robot sees red and can turn right, then turn right\n\t\t\t\t * if the robot hits something in front of itself, then have the robot turn around to the right\t\t\t\t\n\t\t\t\t * \n\t\t\t\t */\n\t\t\t\t\n //intersection strategy\n /*if ((red color is sensed using the color sensor) && (ir sensor is activated (there is an obstacle))) {\n pilot.rotate(90); //turn left\n pilot.forward();\n }\n if (touch is pressed) {\n pilot.rotate(180); //turn all the way around\n pilot.forward();\n if (red color is sensed) {\n pilot.rotate(-90); //turn right\n }\n }\n if (touch is pressed) {\n pilot.rotate(180); //turn all the way around\n pilot.forward(); \n }\n \n if ((ir is pressed) && !(touch is pressed)) {\n pilot.rotate(90); //turn left\n if (touch is pressed) {\n pilot.rotate(-90);\n pop that sequence off the stack\n pilot.forward();\n }\n else { //touch is not pressed, no obstacles ahead\n pilot.forward();\n }\n }\n \n //25 is an arbitrary # that we are using to represent the max # of intersections\n for (i=1; i < 25; ++i) {\n //everything that's happening in the entire program has to be in this for loop\n Stack<String> stack = new Stack<String>();\n stack.push(\"i\"); //naming each sequence/intersection by its #\n printStack(stack);\n\n }\n //if we program the robot to turn left at intersections, the IR must be on the right\n //question box: how do we structure our code so that every part works together in unison?\n */\n\t\t\t\n\t\t\t\n\t\t\t\t \n\t\t\t\n\t\t\t//free up resources\n\t\t\tcolorSensor.close();\n\t\t\t\n\t\t}\n\n\t}",
"public HeroMissile(int x,int y, int a, int b)\n {\n _startingX = x;\n _startingY = y;\n _endPointX = a;\n _endPointY = b;\n _currentX = _startingX;\n _currentY = _startingY;\n movingDistance = 1;\n distance = calcDistance(_startingX, _startingY,_endPointX,_endPointY);\n remainingDistance = 0;\n }",
"@Override\n\tpublic double GetValue() {\n\t\tdouble spot = inputs.getSpot();\n\t\tdouble strike = inputs.getStrike();\n\t\tdouble vol = inputs.getVol();\n\t\tint noSteps=inputs.getNoSteps();\n\t\tdouble expiry=inputs.getExpiry();\n\t OptionType type=inputs.getType();\n\t ExerciseType exercise=inputs.getExercise();\n\t InterestRate interestRate=inputs.getR();\n\t\t\n\t double timestep = expiry/noSteps;\n\t double DF = Math.exp(-interestRate.GetRate(1.)*timestep);\n\t double temp1 = Math.exp((interestRate.GetRate(1.) + vol * vol)*timestep);\n\t double temp2 = 0.5 * (DF + temp1);\n\t double up = temp2 + Math.sqrt(temp2*temp2 - 1);\n\t double down = 1/ up;\n\t double probaUp = (Math.exp(interestRate.GetRate(1.) * timestep) - down)/(up -down) ;\n\t double probaDown = 1 - probaUp;\n\n\t //stock price tree\n\t\tstockPrice[0][0]=spot;\n\t for (int n = 1; n <= noSteps; n ++) {\n for (int j = n; j > 0; j--){\n \tstockPrice[j][n] = up * stockPrice[j-1][n-1];\n }\n \t\tstockPrice[0][n] = down * stockPrice[0][n-1];\n }\n\t \n\t //last column set payoffs\n\t\tfor (int j = 0; j <= noSteps; j++) {\n\t\t\t\tif(type.equals(OptionType.CALL)) {\n\t\t\t\t\tpayOff[j][noSteps] = Math.max(this.stockPrice[j][noSteps] - strike, .0);\n\t\t\t\t}else {\n\t\t\t\t\tpayOff[j][noSteps] = Math.max(strike - this.stockPrice[j][noSteps], .0);\n\t\t\t\t}\n\t\t}\n\n\t\t\n\t //payoff tree in backwardation\n\t \n\t for (int i = noSteps ; i >= 1; i--) {\n for (int j = 0; j <= i-1; j++) {\n\t \tif(exercise.equals(ExerciseType.AMERICAN)) { \n\t //American\t\n\t \t\tif(type.equals(OptionType.CALL)) {\n\t \t\t\t\tpayOff[j][i-1] = Math.max(DF * (probaUp * payOff[j+1][i] + probaDown * payOff[j][i]) ,\n\t \t\t\t\tMath.max(this.stockPrice[j][i-1] - strike, .0));\n\t \t\t\t\n\t \t\t}else \tpayOff[j][i-1] = Math.max(DF * (probaUp * payOff[j+1][i] + probaDown * payOff[j][i]) ,\n\t \t\t\t\tMath.max(strike - this.stockPrice[j][i-1] , .0));\n\t \t}else { \n\t \t\t\t//European put and call option\n\t \t\t\t\tpayOff[j][i-1] = DF * (probaUp * payOff[j+1][i] + probaDown * payOff[j][i]);\n\t }\n }\n }\n\t \n\t double deltaUp = (payOff[0][2]-payOff[1][2])/(stockPrice[0][2]-stockPrice[1][2]);\n\t double deltaDown = (payOff[1][2]-payOff[2][2])/(stockPrice[1][2]-stockPrice[2][2]);\n\t delta = (deltaUp + deltaDown) /2;\n\t gamma = (deltaUp-deltaDown)/((stockPrice[0][2]-stockPrice[2][2])/2);\n\t theta = (payOff[1][2]-payOff[0][0])/(365*2*timestep);//time in days\n\t \n\t long rounded = Math.round(payOff[0][0]*10000);\n\t return rounded/10000.0;\n\t}",
"@Override \n protected boolean collectShotData() {\n\n if(!hitWater){\n playerUiGroup.show();\n }\n\n currentShotInProcess = false;\n inputFlag = false;\n\n while (!inputFlag) {\n requestGraphicsUpdate();\n try {\n Thread.sleep(10);\n } catch(InterruptedException ex) {\n Thread.currentThread().interrupt();\n }\n }\n\n System.out.println(\"current shot input: \" + shotInput);\n\n playerUiGroup.hide();\n return true;\n /*if (arguments.length == 1 && arguments[0].equals(\"stop\")) {\n System.out.println(\"stop condition is recognized\");\n shootGroup.show();\n return false;\n }\n if (arguments.length == 2 && StringUtils.isNumeric(arguments[0]) && StringUtils.isNumeric(arguments[1])) {\n shotInput = new Vector2d(arguments[0], arguments[1]);\n System.out.println(\"input is recognized as valid\");\n return true;\n }\n System.out.println(\"invalid shot input, try again\");\n */\n\n //return collectShotData();\n }",
"public boolean[] getActionEx(Environment observation, boolean[] keys) {\n boolean[] action = getAction(observation);\n\n /*if (action == null) {\n System.out.println(\" ROBOT: no action!\");\n } else {\n System.out.print(\" ROBOT: \");\n int i;\n for (i = 0; i < 5; i++) {\n if (action[i])\n System.out.print(Keys.toString(i) + \" \");\n }\n System.out.println(\"\");\n }*/\n \n if (action == null) {\n //System.out.println(\"No action!\");\n manualOverride = true;\n }\n\n if (keys[Keys.LEFT] ||\n keys[Keys.RIGHT] ||\n keys[Keys.DOWN] ||\n keys[Keys.JUMP] ||\n keys[Keys.SPEED])\n {\n manualOverride = true;\n }\n\n if (keys[Keys.SPECIAL]) {\n manualOverride = false;\n }\n\n if (manualOverride)\n action = keys;\n\n /*System.out.println(String.format(\"Action:%s%s%s%s%s Real x:%f Real vx:%f\\n\" +\n \" Sim x:%f Sim vx:%f\",\n action[Keys.LEFT] ? \"L\" : \"-\",\n action[Keys.RIGHT] ? \"R\" : \"-\",\n action[Keys.DOWN] ? \"D\" : \"-\",\n action[Keys.JUMP] ? \"J\" : \"-\",\n action[Keys.SPEED] ? \"S\" : \"-\",\n pos.x, pos.vx, simulator.getX(), simulator.getVX()));*/\n\n /*if (simulator != null) {\n if (simulator.getX() != mario.x) {\n System.out.println(String.format(\"SIMULATION ERROR: x is %f, expected %f\",\n simulator.getX(), mario.x));\n //simulator.setX(pos.x);\n }\n if (simulator.getY() != mario.y) {\n System.out.println(String.format(\"SIMULATION ERROR: y is %f, expected %f\",\n simulator.getY(), mario.y));\n //simulator.setY(pos.y);\n }\n\n simulator.mario.diff(\"###\", mario);\n\n // TODO: also create and update another, single-stepped simulator here.\n // The result should match the continuously running one.\n MotionSimulator oneStep = new MotionSimulator(simulator.getScene(), simulator.mario);\n oneStep.mario.diff(\"Checkpoint 1: oneStep vs. simulator\", simulator.mario);\n \n simulator.update(action);\n // New simulator position will be checked next time around.\n\n oneStep.update(action);\n\n oneStep.mario.diff(\"Checkpoint 2: oneStep vs. simulator\", simulator.mario);\n\n if (oneStep.getX() != simulator.getX()) {\n System.out.println(String.format(\"ONE STEP ERROR: x is %f, expected %f\",\n oneStep.getX(), simulator.getX()));\n }\n if (oneStep.getY() != simulator.getY()) {\n System.out.println(String.format(\"ONE STEP ERROR: y is %f, expected %f\",\n oneStep.getY(), simulator.getY()));\n }\n }*/\n\n return action;\n }",
"public static void main(String[] args) {\n \tMetaData metaData = new MetaData();\n\t\tmetaData.startTiming();\n\t\t\n // Process the command line options\n Demo.getInput(args);\n \n // Run the simulation and print results\n ArrayFloatObjectPlate simulation = new ArrayFloatObjectPlate();\n simulation.runSimulation(dimension,(float)topEdgeTemp,(float)bottomEdgeTemp,(float)leftEdgeTemp,(float)rightEdgeTemp, metaData);\n \n // Print the meta data about the simulation\n metaData.print();\n }",
"void getMotionInfo(){\n double degreeDistance = Math.sqrt(Math.pow((startLat - endLat),2) + Math.pow((startLong - endLong),2));\n double R = 6378.137; // Radius of earth in KM\n double dLat = startLat * Math.PI / 180 - endLat* Math.PI / 180;\n dLat = Math.abs(dLat);\n double dLon = startLong * Math.PI / 180 - endLong* Math.PI / 180;\n dLon = Math.abs(dLon);\n double a = Math.sin(dLat / 2) * Math.sin(dLat / 2) +\n Math.cos(endLat * Math.PI / 180) * Math.cos(startLat* Math.PI / 180) *\n Math.sin(dLon / 2) * Math.sin(dLon / 2);\n double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n double distance;\n distance = R * c;\n distance = distance * 1000f;\n pathDistance = distance;\n degToMRatio = degreeDistance/distance;\n double angle = Math.atan(dLat/dLon);\n xCompMotion = Math.cos(angle);\n yCompMotion = Math.sin(angle);\n totalNumSteps = pathDistance/STEP_LENGTH;\n //Rounds number of steps to nearest whole number\n totalNumSteps = Math.round(totalNumSteps);\n }",
"public void displayUtilities() {\n double utility;\n int noOfRows = environment.getRows();\n int noOfColumns = environment.getColumns();\n\n for (int i = 0; i < noOfRows; i++) {\n for (int j = 0; j < noOfColumns; j++) {\n if(!environment.getTile(i, j).getTileType().equals(\"WALL\")) {\n utility = environmentUtilities[i][j].getUtility();\n System.out.println(\"(\"+i+\",\"+j+\")\"+utility);\n }\n }\n }\n }",
"public Missile(Shooter shooter, Point2D.Double start, double speed, double direction)\n {\n this.shooter = shooter;\n this.direction = direction;\n \n location = start;\n \n velocity = new Point2D.Double(-speed*Math.sin(direction), speed*Math.cos(direction));\n }",
"public void execute(String[] args) {\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tString formula = args[0];\n\t\t\tString C12_File = args[1];\n\t\t\tString C13_File = args[2];\n\t\t\tString N15_File = args[3];\n\t\t\tString sampled_element = args[4];\n\t\t\tint charge = new Integer(args[5]);\n\t\t\tdouble ppm = new Double(args[6]);\n\t\t\tboolean single_check = false;\n\t\t\tdouble ppm_val = ppm;\n\t\t\t//for (double ppm_val = 10; ppm_val <= 100; ppm_val = ppm_val + 10) {\n\t\t\t_ppm = ppm_val;\n\t\t\t\n\t\t\t\n\t\t\tString H2_OutFile = \"C:\\\\Users\\\\tshaw\\\\Desktop\\\\METABOLOMICS\\\\MISSILE\\\\Drew_MISSILE_Exp1_DataFitting\\\\Supplementary\\\\\" + formula + \"\\\\\" + formula + \"_Sampling_H2.txt\";\n\t\t\tString C12_OutFile = \"C:\\\\Users\\\\tshaw\\\\Desktop\\\\METABOLOMICS\\\\MISSILE\\\\Drew_MISSILE_Exp1_DataFitting\\\\Supplementary\\\\\" + formula + \"\\\\\" + formula + \"_Sampling_C12.txt\";\n\t\t\tString C13_OutFile = \"C:\\\\Users\\\\tshaw\\\\Desktop\\\\METABOLOMICS\\\\MISSILE\\\\Drew_MISSILE_Exp1_DataFitting\\\\Supplementary\\\\\" + formula + \"\\\\\" + formula + \"_Sampling_C13.txt\";\n\t\t\tString N15_OutFile = \"C:\\\\Users\\\\tshaw\\\\Desktop\\\\METABOLOMICS\\\\MISSILE\\\\Drew_MISSILE_Exp1_DataFitting\\\\Supplementary\\\\\" + formula + \"\\\\\" + formula + \"_Sampling_N15.txt\";\n\t\t\t\n\t\t\tdouble big_step = 0.05;\n\t\t\t\n\t\t\tint _charge = charge;\n\t\t\t\n\t\t\t//String formula = \"C100N29O36H147\"; // this looks the best\n\n\t\t\t//String formula = \"C100N29O28H274\";\n\t\t\t//String formula = \"C100N29O26S1H274\";\n\t\t\t//String formula = \"C100N29O24S2H274\"; // pretty close too\n\t\t\t//String formula = \"C100N29O34SH147\"; //\n\t\t\t//String formula = \"O9H290C100S9N29\"; // another candidate\n\t\t\t//String formula = \"C100N29O33S5H36\"; //\n\t\t\t//String formula = \"C100N29O21S7H163\";\n\t\t\t\n\t\t\t//\n\n\t\t\t//printTime();\n\t\t\t//IsotopePattern reference_pattern = getPeakInfo(\"C:\\\\Users\\\\tshaw\\\\Desktop\\\\METABOLOMICS\\\\MISSILE\\\\DataFitting\\\\C24H49NO7P_C12.peak\");\n\t\t\t//IsotopePattern reference_pattern = getPeakInfo(\"C:\\\\Users\\\\tshaw\\\\Desktop\\\\METABOLOMICS\\\\MISSILE\\\\DataFitting\\\\unknown_C12.peak\");\n\t\t\tIsotopePattern reference_pattern = getPeakInfo(C12_File);\n\t\t\t\n\t\t\treference_pattern = IsotopePatternManipulator.normalize(reference_pattern);\n\t\t\t\n\t\t\tdouble C12 = 0.9893;\n\t\t\tdouble N14 = 0.99632;\n\t\t\tdouble H1 = 0.999885;\n\t\t\t\n\t\t\tdouble simulated_C12 = -1;\n\t\t\tdouble simulated_N15 = -1;\n\t\t\tdouble simulated_C13 = -1;\n\t\t\tdouble simulated_H2 = -1;\n\t\t\tIsotopePattern query_pattern = null;\n\t\t\t\n\t\t\tif (single_check) {\n\t\t\t\tquery_pattern = calculate_pattern(formula, C12, N14, H1, _charge);\n\t\t\t\t\n\t\t\t\tfor (int i = 0; i < query_pattern.getNumberOfIsotopes(); i++) {\n\t\t\t\t\tIsotopeContainer container = query_pattern.getIsotope(i);\n\t\t\t\t\tSystem.out.println(container.getMass() + \"\\t\" + container.getIntensity());\n\t\t\t\t}\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t\t\n\t\t\tboolean check_C12 = false;\n\t\t\tboolean check_C13 = false;\n\t\t\tboolean check_H2 = false;\n\t\t\tboolean check_N15 = false;\n\t\t\tif (sampled_element.equals(\"C12\")) {\n\t\t\t\tcheck_C12 = true;\n\t\t\t}\n\t\t\tif (sampled_element.equals(\"C13\")) {\n\t\t\t\tcheck_C13 = true;\n\t\t\t}\n\t\t\tif (sampled_element.equals(\"N15\")) {\n\t\t\t\tcheck_N15 = true;\n\t\t\t}\n\t\t\tdouble step = 0.001;\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tif (check_H2) {\n\t\t\t\t\t\n\t\t\t\tboolean doOnce = true;\n\t\t\t\tdouble smallest = 0;\n\t\t\t\tdouble largest = 1;\n\t\t\t\tdouble prevIndex = 0;\n\t\t\t\tfor (double H1_sample = 0; H1_sample <= 1; H1_sample += big_step) {\n\t\t\t\t\t\n\t\t\t\t\tquery_pattern = calculate_pattern(formula, C12, N14, H1_sample, _charge);\n\t\t\t\t\t\n\t\t\t\t\t//System.out.println(\"Number of isotopes: \" + query_pattern.getNumberOfIsotopes());\n\t\t\t\t\tIsotopePatternSimilarity similarity = new IsotopePatternSimilarity();\n\t\t\t\t\tdouble similarity_score = similarity.compare(reference_pattern, query_pattern);\n\t\t\t\t\tif (similarity_score > 0) {\n\t\t\t\t\t\tif (doOnce) {\n\t\t\t\t\t\t\tsmallest = prevIndex;\n\t\t\t\t\t\t\tdoOnce = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlargest = H1_sample;\n\t\t\t\t\t}\n\t\t\t\t\tprevIndex = H1_sample;\n\t\t\t\t}\n\t\t\t\tlargest = largest + big_step;\n\t\t\t\tif (largest <= (1 - big_step)) {\n\t\t\t\t\tlargest += big_step;\n\t\t\t\t\tif (largest >= 1) {\n\t\t\t\t\t\tlargest = 1.0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tdouble max_score = 0;\n\t\t\t\tfor (double H1_sample = 0; H1_sample < smallest; H1_sample += step) {\n\t\t\t\t\tSystem.out.println(H1_sample + \"\\t\" + 0.0);\n\t\t\t\t}\n\t\t\t\tfor (double H1_sample = smallest; H1_sample <= largest; H1_sample += step) {\n\t\t\t\t\n\t\t\t\t\tquery_pattern = calculate_pattern(formula, C12, N14, H1_sample, _charge);\n\t\t\t\t\t\n\t\t\t\t\t//System.out.println(\"Number of isotopes: \" + query_pattern.getNumberOfIsotopes());\n\t\t\t\t\tIsotopePatternSimilarity similarity = new IsotopePatternSimilarity();\n\t\t\t\t\tdouble similarity_score = similarity.compare(reference_pattern, query_pattern);\n\t\t\t\t\tif (max_score < similarity_score) {\n\t\t\t\t\t\tmax_score = similarity_score;\n\t\t\t\t\t\tsimulated_H2 = H1_sample;\n\t\t\t\t\t}\n\t\t\t\t\t//System.out.println(similarity_score);\n\t\t\t\t\tSystem.out.println(H1_sample + \"\\t\" + similarity_score);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tfor (double H1_sample = largest + step; H1_sample <= 1.0; H1_sample += step) {\n\t\t\t\t\tSystem.out.println(H1_sample + \"\\t\" + 0.0);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (check_C13) {\n\t\t\t\treference_pattern = getPeakInfo(C13_File);\n\t\t\t\treference_pattern = IsotopePatternManipulator.normalize(reference_pattern);\n\t\t\t\t\n\t\t\t\tboolean doOnce = true;\n\t\t\t\tdouble smallest = 0;\n\t\t\t\tdouble largest = 1;\n\t\t\t\tdouble prevIndex = 0;\n\t\t\t\tfor (double C12_sample = 0; C12_sample <= 1; C12_sample += big_step) {\n\t\t\t\t\t\n\t\t\t\t\tquery_pattern = calculate_pattern(formula, C12_sample, N14, H1, _charge);\t\t\t\t\t\n\t\t\t\t\t//System.out.println(\"Number of isotopes: \" + query_pattern.getNumberOfIsotopes());\n\t\t\t\t\tIsotopePatternSimilarity similarity = new IsotopePatternSimilarity();\n\t\t\t\t\tdouble similarity_score = similarity.compare(reference_pattern, query_pattern);\n\t\t\t\t\tif (similarity_score > 0) {\n\t\t\t\t\t\tif (doOnce) {\n\t\t\t\t\t\t\tsmallest = prevIndex;\n\t\t\t\t\t\t\tdoOnce = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlargest = C12_sample;\n\t\t\t\t\t}\n\t\t\t\t\tprevIndex = C12_sample;\n\t\t\t\t}\n\t\t\t\tlargest = largest + big_step;\n\t\t\t\tif (largest <= 1 - big_step) {\n\t\t\t\t\tlargest += big_step;\n\t\t\t\t\tif (largest >= 1) {\n\t\t\t\t\t\tlargest = 1.0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tdouble max_score = 0;\n\t\t\t\tfor (double C12_sample = 0; C12_sample < smallest; C12_sample += step) {\n\t\t\t\t\tSystem.out.println(C12_sample + \"\\t\" + 0.0);\n\t\t\t\t}\n\t\t\t\tfor (double C12_sample = smallest; C12_sample <= largest; C12_sample += step) {\n\t\t\t\t\n\t\t\t\t\tquery_pattern = calculate_pattern(formula, C12_sample, N14, H1, _charge);\n\t\t\t\t\t\n\t\t\t\t\tIsotopePatternSimilarity similarity = new IsotopePatternSimilarity();\n\t\t\t\t\tdouble similarity_score = similarity.compare(reference_pattern, query_pattern);\n\t\t\t\t\tif (max_score < similarity_score) {\n\t\t\t\t\t\tmax_score = similarity_score;\n\t\t\t\t\t\tsimulated_C13 = C12_sample;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println((1 - C12_sample) + \"\\t\" + similarity_score);\n\t\t\t\t}\n\t\t\t\tfor (double C12_sample = largest + step; C12_sample <= 1.0; C12_sample += step) {\n\t\t\t\t\tSystem.out.println(C12_sample + \"\\t\" + 0.0);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif (check_N15) {\n\t\t\t\treference_pattern = getPeakInfo(N15_File);\n\t\t\t\treference_pattern = IsotopePatternManipulator.normalize(reference_pattern);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tboolean doOnce = true;\n\t\t\t\tdouble smallest = 0;\n\t\t\t\tdouble largest = 1;\n\t\t\t\tdouble prevIndex = 0;\n\t\t\t\tfor (double N14_sample = 0; N14_sample < smallest; N14_sample += step) {\n\t\t\t\t\tSystem.out.println(N14_sample + \"\\t\" + 0.0);\n\t\t\t\t}\n\t\t\t\tfor (double N14_sample = 0; N14_sample <= 1; N14_sample += big_step) {\n\t\t\t\t\t\n\t\t\t\t\tquery_pattern = calculate_pattern(formula, C12, N14_sample, H1, _charge);\n\t\t\t\t\t\n\t\t\t\t\t//System.out.println(\"Number of isotopes: \" + query_pattern.getNumberOfIsotopes());\n\t\t\t\t\tIsotopePatternSimilarity similarity = new IsotopePatternSimilarity();\n\t\t\t\t\tdouble similarity_score = similarity.compare(reference_pattern, query_pattern);\n\t\t\t\t\tif (similarity_score > 0) {\n\t\t\t\t\t\tif (doOnce) {\n\t\t\t\t\t\t\tsmallest = prevIndex;\n\t\t\t\t\t\t\tdoOnce = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlargest = N14_sample;\n\t\t\t\t\t}\n\t\t\t\t\tprevIndex = N14_sample;\n\t\t\t\t}\n\t\t\t\tlargest = largest + big_step;\n\t\t\t\tif (largest <= 1 - big_step) {\n\t\t\t\t\tlargest += big_step;\n\t\t\t\t\tif (largest >= 1) {\n\t\t\t\t\t\tlargest = 1.0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tdouble max_score = 0;\n\t\t\t\tfor (double N14_sample = smallest; N14_sample <= largest; N14_sample += step) {\n\t\t\t\t//double N14_sample = 0.01;\n\t\t\t\t\tquery_pattern = calculate_pattern(formula, C12, N14_sample, H1, _charge);\n\t\t\t\t\t\n\t\t\t\t\t//System.out.println(\"Number of isotopes: \" + query_pattern.getNumberOfIsotopes());\n\t\t\t\t\tIsotopePatternSimilarity similarity = new IsotopePatternSimilarity();\n\t\t\t\t\tdouble similarity_score = similarity.compare(reference_pattern, query_pattern);\n\t\t\t\t\tif (max_score < similarity_score) {\n\t\t\t\t\t\tmax_score = similarity_score;\n\t\t\t\t\t\tsimulated_N15 = N14_sample;\n\t\t\t\t\t}\n\t\t\t\t\t//System.out.println(similarity_score);\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(N14_sample + \"\\t\" + similarity_score);\n\t\t\t\t}\n\t\t\t\tfor (double N14_sample = largest + step; N14_sample <= 1.0; N14_sample += step) {\n\t\t\t\t\tSystem.out.println(N14_sample + \"\\t\" + 0.0);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (check_C12) {\n\t\t\t\treference_pattern = getPeakInfo(C12_File);\n\t\t\t\treference_pattern = IsotopePatternManipulator.normalize(reference_pattern);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tboolean doOnce = true;\n\t\t\t\tdouble smallest = 0;\n\t\t\t\tdouble largest = 1;\n\t\t\t\tdouble prevIndex = 0;\n\t\t\t\tfor (double C12_sample = 0; C12_sample <= 1; C12_sample += big_step) {\n\t\t\t\t\t\n\t\t\t\t\tquery_pattern = calculate_pattern(formula, C12_sample, N14, H1, _charge);\n\t\t\t\t\t\n\t\t\t\t\t//System.out.println(\"Number of isotopes: \" + query_pattern.getNumberOfIsotopes());\n\t\t\t\t\tIsotopePatternSimilarity similarity = new IsotopePatternSimilarity();\n\t\t\t\t\tdouble similarity_score = similarity.compare(reference_pattern, query_pattern);\n\t\t\t\t\tif (similarity_score > 0) {\n\t\t\t\t\t\tif (doOnce) {\n\t\t\t\t\t\t\tsmallest = prevIndex;\n\t\t\t\t\t\t\tdoOnce = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlargest = C12_sample;\n\t\t\t\t\t}\n\t\t\t\t\tprevIndex = C12_sample;\n\t\t\t\t}\n\t\t\t\tlargest = largest + big_step;\n\t\t\t\tif (largest <= 1 - big_step) {\n\t\t\t\t\tlargest += big_step;\n\t\t\t\t\tif (largest >= 1) {\n\t\t\t\t\t\tlargest = 1.0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tdouble max_score = 0;\n\t\t\t\tfor (double C12_sample = 0; C12_sample < smallest; C12_sample += step) {\n\t\t\t\t\tSystem.out.println(C12_sample + \"\\t\" + 0.0);\n\t\t\t\t}\n\t\t\t\tfor (double C12_sample = smallest; C12_sample <= largest; C12_sample += step) {\n\t\t\t\t\n\t\t\t\t\tquery_pattern = calculate_pattern(formula, C12_sample, N14, H1, _charge);\n\t\t\t\t\t\n\t\t\t\t\t//System.out.println(\"Number of isotopes: \" + query_pattern.getNumberOfIsotopes());\n\t\t\t\t\tIsotopePatternSimilarity similarity = new IsotopePatternSimilarity();\n\t\t\t\t\tdouble similarity_score = similarity.compare(reference_pattern, query_pattern);\n\t\t\t\t\tif (max_score < similarity_score) {\n\t\t\t\t\t\tmax_score = similarity_score;\n\t\t\t\t\t\tsimulated_C12 = C12_sample;\n\t\t\t\t\t}\n\t\t\t\t\t//System.out.println(similarity_score);\n\t\t\t\t\t//out.write(C12_sample + \"\\t\" + similarity_score + \"\\n\");\n\t\t\t\t\tSystem.out.println(C12_sample + \"\\t\" + similarity_score);\n\t\t\t\t}\n\t\t\t\tfor (double C12_sample = largest + step; C12_sample <= 1.0; C12_sample += step) {\n\t\t\t\t\tSystem.out.println(C12_sample + \"\\t\" + 0.0);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (sampled_element.equals(\"C12\")) {\n\t\t\t\tSystem.out.println(\"Simulated Result: \" + formula + \"\\tcharge:\" + _charge + \"\\tC12:\" + simulated_C12);\n\t\t\t} else if (sampled_element.equals(\"C13\")) {\n\t\t\t\tdouble result = (1 - simulated_C13);\n\t\t\t\tif (result < 0) {\n\t\t\t\t\tresult = 0;\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"Simulated Result: \" + formula + \"\\tcharge:\" + _charge + \"\\tC13:\" + result);\n\t\t\t} else if (sampled_element.equals(\"N15\")) {\n\t\t\t\tdouble result = (1 - simulated_N15);\n\t\t\t\tif (result < 0) {\n\t\t\t\t\tresult = 0;\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"Simulated Result: \" + formula + \"\\tcharge:\" + _charge + \"\\tN15:\" + result);\n\t\t\t}\n\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Override\n protected void execute() {\n SmartDashboard.putData(Robot.driveBase);\n SmartDashboard.putData(Robot.pneumaticsBase);\n SmartDashboard.putData(Robot.cargoIntake);\n SmartDashboard.putData(Robot.hatchPanelIntake);\n SmartDashboard.putData(Robot.climber);\n SmartDashboard.putNumber(\"x Joystick\", Robot.oi.getDriveX());\n SmartDashboard.putNumber(\"y Joystick\", Robot.oi.getDriveY());\n SmartDashboard.putNumber(\"z Joystick\", Robot.oi.getDriveZ());\n if (Robot.network.getContourInfo(DataType.area, 0) < Robot.network.getContourInfo(DataType.area, 1)) {\n SmartDashboard.putNumber(\"ratio\",\n Robot.network.getContourInfo(DataType.area, 0) / Robot.network.getContourInfo(DataType.area, 1));\n } else {\n SmartDashboard.putNumber(\"ratio\",\n Robot.network.getContourInfo(DataType.area, 1) / Robot.network.getContourInfo(DataType.area, 0));\n }\n }",
"public String getMissile() {\n return\n \" BB \\n\" +\n \" BB \\n\" +\n \" BB \\n\" +\n \" BB \\n\" +\n \" BB \\n\" +\n \" BB \\n\" +\n \" BBBB \\n\" +\n \" BBBBBB \\n\" +\n \" BB BB \\n\" +\n \" BB BB \\n\" +\n \" B B \\n\";\n\n }",
"public int getEstimation(Tile<T> current, Tile<T> target);",
"public void updateGrade() throws SimulationStopException{\r\n /*if(realtime){\r\n double[] pos1 = gps.getPos();\r\n \r\n double []pos2 = gps.getPos();\r\n double product = (6378100)*Math.PI/18000;\r\n grade = (pos1[2]-pos2[2])/\r\n Math.sqrt(Math.pow((pos1[1]-pos2[1])*product,2) +\r\n Math.pow((pos1[0]-pos2[0])*product,2));\r\n }*/\r\n if(time.isRunning()){\r\n\r\n try {\r\n \t//calculate grade\r\n \tif(index!=0){\r\n grade = ((roadData[altIndex][index] - roadData[altIndex][index-1])/\r\n (roadData[distIndex][index] - roadData[distIndex][index-1]));\r\n \t}\r\n \r\n // calculate orientation (used for wind and turns)\r\n /* Understandable version...\r\n * product = 60/0.5399555*1000\r\n *\r\n * distLat = (tempLat - lat)*product;\r\n * distLon = (tempLon - lon)*product*Math.cos((tempLat + lat)/2*Math.PI/180);\r\n * carAngle = atan(distLon/distLat) + PI/2\r\n * */\r\n \r\n carAngle = Math.atan((roadData[lonIndex][index]-roadData[lonIndex][index+1])\r\n \t\t*Math.cos((roadData[latIndex][index]+roadData[latIndex][index+1])/2*Math.PI/180)/\r\n (roadData[latIndex][index]-roadData[latIndex][index+1])) + Math.PI/2;\r\n while(carAngle>Math.PI*2){\r\n \tcarAngle-=Math.PI*2;\r\n }\r\n\r\n index++;\r\n segsLeft--;\r\n // if we hit a control point, stop for ctrlTimeLength seconds of time\r\n if(roadData[distIndex][index]>ctrlPts[ctrlIndex]&&ctrlIndex<=ctrlPts.length){\r\n time.ctrlPointHit(ctrlTimeLength);\r\n System.out.println(\"Control Point: \" + roadData[distIndex][index]);\r\n ctrlIndex++;\r\n }\r\n }\r\n catch (IndexOutOfBoundsException e) {\r\n throw new SimulationStopException(\"Simulation stopped at control point \"+ctrlIndex);\r\n // Is this message right!?\r\n }\r\n }\r\n }",
"void object_calculations_touch_ground(){\n\n if (down_angle < 0 && up_angle > 0)//base case\n {\n double temp = up_angle;\n up_angle = down_angle;\n down_angle = temp;\n base_case();\n } else if ((down_angle > 0 && up_angle > 0) && (down_angle < up_angle))//smaller object\n {\n double temp = up_angle;\n up_angle = down_angle;\n down_angle = temp;\n measure_small_object();\n } else if (up_angle < 0 && down_angle > 0)//base case\n base_case();\n else //smaller object\n measure_small_object();\n }",
"public double smilePos(){\r\n\r\n\t\treturn smile.getY();\r\n\r\n\t}",
"public GetInRangeAndAimCommand() {\n xController = new PIDController(0.1, 1e-4, 1);\n yController = new PIDController(-0.1, 1e-4, 1);\n xController.setSetpoint(0);\n yController.setSetpoint(0);\n // xController.\n drive = DrivetrainSubsystem.getInstance();\n limelight = Limelight.getInstance();\n // Use addRequirements() here to declare subsystem dependencies.\n addRequirements(drive);\n\n }",
"protected void execute() {\n \tdouble a = 0.5;\n \tdouble x = Robot.oi.getPilotAxis(Robot.oi.LOGITECH_F510_AXIS_RIGHT_STICK_X);\n \tdouble y = Robot.oi.getPilotAxis(Robot.oi.LOGITECH_F510_AXIS_LEFT_STICK_Y);\n \tx = 0.5*((a * Math.pow(x, 3)) + ((1-a) * x));\n \ty = a * Math.pow(y, 3) + (1-a) * y;\n \tdouble left = y + x;\n\t\tdouble right = y - x;\n\t\t\n\t\t// Apply values to motors\n\t\tRobot.chassis.setLeft(left);\n\t\tRobot.chassis.setRight(right);\n }"
]
| [
"0.52904373",
"0.5218703",
"0.51952726",
"0.5176604",
"0.51067525",
"0.5106723",
"0.50993925",
"0.5085039",
"0.50432146",
"0.5022543",
"0.5019229",
"0.49297902",
"0.489408",
"0.48673362",
"0.48557976",
"0.4825881",
"0.48123336",
"0.4809859",
"0.47979528",
"0.47964376",
"0.4761375",
"0.47531068",
"0.47393227",
"0.47361118",
"0.47242656",
"0.47166935",
"0.4714145",
"0.47044837",
"0.46994394",
"0.4697141",
"0.46916112",
"0.46831888",
"0.46819484",
"0.46802127",
"0.46764588",
"0.46692935",
"0.46621874",
"0.46552455",
"0.46306825",
"0.46302113",
"0.46051192",
"0.46051192",
"0.45918924",
"0.4586173",
"0.45853812",
"0.45787063",
"0.45783532",
"0.45705834",
"0.45687816",
"0.4554955",
"0.4552479",
"0.45484337",
"0.4539453",
"0.45394066",
"0.4539161",
"0.45352766",
"0.45340583",
"0.45327854",
"0.4528413",
"0.4527585",
"0.45247614",
"0.4522572",
"0.45186976",
"0.45136973",
"0.45129114",
"0.4505618",
"0.4501987",
"0.44987205",
"0.4490569",
"0.44887295",
"0.44844112",
"0.4473306",
"0.44729832",
"0.44723624",
"0.4471982",
"0.44718266",
"0.44695327",
"0.4464412",
"0.4461386",
"0.44584107",
"0.44575974",
"0.4455158",
"0.44485152",
"0.44458088",
"0.44436228",
"0.44417843",
"0.4438023",
"0.44221395",
"0.44180018",
"0.44139075",
"0.4413643",
"0.44113755",
"0.44113678",
"0.4409164",
"0.44086573",
"0.44074386",
"0.44055098",
"0.4403769",
"0.44026604",
"0.4402639",
"0.43975657"
]
| 0.0 | -1 |
Get a launcher and missile Explicitly calculate where the missile ends up given angle PhysicsEngine will contain static methods to generate and get data | @Test
public void testYGivenT() {
double y1 = 0, y2 = 7.6, y3 = 5.38, y4 = 3.76;
double v0 = 25;
double theta = 30;
double t1 = 0, t2 = 1, t3 = 2, t4 = 2.2;
assertEquals(PhysicsEngine.findYPos(v0, theta, t1, 0), y1, DELTA);
assertEquals(PhysicsEngine.findYPos(v0, theta, t2, 0), y2, DELTA);
assertEquals(PhysicsEngine.findYPos(v0, theta, t3, 0), y3, DELTA);
assertEquals(PhysicsEngine.findYPos(v0, theta, t4, 0), y4, DELTA);
double y5 = 0, y6 = 27.47, y7 = 45.13, y8 = 47.48;
double v1 = 38.6;
double phi = 57;
assertEquals(PhysicsEngine.findYPos(v1, phi, t1, 0), y5, DELTA);
assertEquals(PhysicsEngine.findYPos(v1, phi, t2, 0), y6, DELTA);
assertEquals(PhysicsEngine.findYPos(v1, phi, t3, 0), y7, DELTA);
assertEquals(PhysicsEngine.findYPos(v1, phi, t4, 0), y8, DELTA);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int TakeStep()\n\t\t{\n\t\t// the eventual movement command is placed here\n\t\tVec2\tresult = new Vec2(0,0);\n\n\t\t// get the current time for timestamps\n\t\tlong\tcurr_time = abstract_robot.getTime();\n\n\n\t\t/*--- Get some sensor data ---*/\n\t\t// get vector to the ball\n\t\tVec2 ball = abstract_robot.getBall(curr_time);\n\n\t\t// get vector to our and their goal\n\t\tVec2 ourgoal = abstract_robot.getOurGoal(curr_time);\n\t\tVec2 theirgoal = abstract_robot.getOpponentsGoal(curr_time);\n\n\t\t// get a list of the positions of our teammates\n\t\tVec2[] teammates = abstract_robot.getTeammates(curr_time);\n\n\t\t// find the closest teammate\n\t\tVec2 closestteammate = new Vec2(99999,0);\n\t\tfor (int i=0; i< teammates.length; i++)\n\t\t\t{\n\t\t\tif (teammates[i].r < closestteammate.r)\n\t\t\t\tclosestteammate = teammates[i];\n\t\t\t}\n\n\n\t\t/*--- now compute some strategic places to go ---*/\n\t\t// compute a point one robot radius\n\t\t// behind the ball.\n\t\tVec2 kickspot = new Vec2(ball.x, ball.y);\n\t\tkickspot.sub(theirgoal);\n\t\tkickspot.setr(abstract_robot.RADIUS);\n\t\tkickspot.add(ball);\n\n\t\t// compute a point three robot radii\n\t\t// behind the ball.\n\t\tVec2 backspot = new Vec2(ball.x, ball.y);\n\t\tbackspot.sub(theirgoal);\n\t\tbackspot.setr(abstract_robot.RADIUS*5);\n\t\tbackspot.add(ball);\n\n\t\t// compute a north and south spot\n\t\tVec2 northspot = new Vec2(backspot.x,backspot.y+0.7);\n\t\tVec2 southspot = new Vec2(backspot.x,backspot.y-0.7);\n\n\t\t// compute a position between the ball and defended goal\n\t\tVec2 goaliepos = new Vec2(ourgoal.x + ball.x,\n\t\t\t\tourgoal.y + ball.y);\n\t\tgoaliepos.setr(goaliepos.r*0.5);\n\n\t\t// a direction away from the closest teammate.\n\t\tVec2 awayfromclosest = new Vec2(closestteammate.x,\n\t\t\t\tclosestteammate.y);\n\t\tawayfromclosest.sett(awayfromclosest.t + Math.PI);\n\n\n\t\t/*--- go to one of the places depending on player num ---*/\n\t\tint mynum = abstract_robot.getPlayerNumber(curr_time);\n\n\t\t/*--- Goalie ---*/\n\t\tif (mynum == 0)\n\t\t\t{\n\t\t\t// go to the goalie position if far from the ball\n\t\t\tif (ball.r > 0.5) \n\t\t\t\tresult = goaliepos;\n\t\t\t// otherwise go to kick it\n\t\t\telse if (ball.r > 0.1) \n\t\t\t\tresult = kickspot;\n\t\t\telse \n\t\t\t\tresult = ball;\n\t\t\t// keep away from others\n\t\t\tif (closestteammate.r < 0.3)\n\t\t\t\t{\n\t\t\t\tresult = awayfromclosest;\n\t\t\t\t}\n\t\t\t}\n\n\t\t/*--- midback ---*/\n\t\telse if (mynum == 1)\n\t\t\t{\n\t\t\t// go to a midback position if far from the ball\n\t\t\tif (ball.r > 0.5) \n\t\t\t\tresult = backspot;\n\t\t\t// otherwise go to kick it\n\t\t\telse if (ball.r > 0.30) \n\t\t\t\tresult = kickspot;\n\t\t\telse \n\t\t\t\tresult = ball;\n\t\t\t// keep away from others\n\t\t\tif (closestteammate.r < 0.3)\n\t\t\t\t{\n\t\t\t\tresult = awayfromclosest;\n\t\t\t\t}\n\t\t\t}\n\n\t\telse if (mynum == 2)\n\t\t\t{\n\t\t\t// go to a the northspot position if far from the ball\n\t\t\tif (ball.r > 0.5) \n\t\t\t\tresult = northspot;\n\t\t\t// otherwise go to kick it\n\t\t\telse if (ball.r > 0.30) \n\t\t\t\tresult = kickspot;\n\t\t\telse \n\t\t\t\tresult = ball;\n\t\t\t// keep away from others\n\t\t\tif (closestteammate.r < 0.3)\n\t\t\t\t{\n\t\t\t\tresult = awayfromclosest;\n\t\t\t\t}\n\t\t\t}\n\n\t\telse if (mynum == 4)\n\t\t\t{\n\t\t\t// go to a the northspot position if far from the ball\n\t\t\tif (ball.r > 0.5) \n\t\t\t\tresult = southspot;\n\t\t\t// otherwise go to kick it\n\t\t\telse if (ball.r > 0.3 )\n\t\t\t\tresult = kickspot;\n\t\t\telse \n\t\t\t\tresult = ball;\n\t\t\t// keep away from others\n\t\t\tif (closestteammate.r < 0.3)\n\t\t\t\t{\n\t\t\t\tresult = awayfromclosest;\n\t\t\t\t}\n\t\t\t}\n\n\t\t/*---Lead Forward ---*/\n\t\telse if (mynum == 3)\n\t\t\t{\n\t\t\t// if we are more than 4cm away from the ball\n\t\t\tif (ball.r > .3)\n\t\t\t\t// go to a good kicking position\n\t\t\t\tresult = kickspot;\n\t\t\telse\n\t\t\t\t// go to the ball\n\t\t\t\tresult = ball;\n\t\t\t}\n\n\n\t\t/*--- Send commands to actuators ---*/\n\t\t// set the heading\n\t\tabstract_robot.setSteerHeading(curr_time, result.t);\n\n\t\t// set speed at maximum\n\t\tabstract_robot.setSpeed(curr_time, 1.0);\n\n\t\t// kick it if we can\n\t\tif (abstract_robot.canKick(curr_time))\n\t\t\tabstract_robot.kick(curr_time);\n\n\t\t/*--- Send message to other robot ---*/\n\t\t// COMMUNICATION\n\t\t// if I can kick\n\t\tif (abstract_robot.canKick(curr_time))\n\t\t\t{\n\t\t\t// and I am robot #3\n\t\t\tif ((mynum==3))\n\t\t\t\t{\n\t\t\t\t// construct a message\n\t\t\t\tStringMessage m = new StringMessage();\n\t\t\t\tm.val = (new Integer(mynum)).toString();\n\t\t\t\tm.val = m.val.concat(\" can kick\");\n\n\t\t\t\t// send the message to robot 2\n\t\t\t\t// note: broadcast and multicast are also\n\t\t\t\t// available.\n\t\t\t\ttry{abstract_robot.unicast(2,m);}\n\t\t\t\tcatch(CommunicationException e){}\n\t\t\t\t}\n\t\t\t}\n\n\t\t/*--- Look for incoming messages ---*/\n\t\t//COMMUNICATION\n\t\twhile (messagesin.hasMoreElements())\n\t\t\t{\n\t\t\tStringMessage recvd = \n\t\t\t\t(StringMessage)messagesin.nextElement();\n\t\t\tSystem.out.println(mynum + \" received:\\n\" + recvd);\n\t\t\t}\n\n\t\t// tell the parent we're OK\n\t\treturn(CSSTAT_OK);\n\t\t}",
"public MissileLauncher getMissileLauncher() {\n\t\treturn this.missileLauncher;\n\t}",
"private Array<Tile>[] walk() {\n float targetY = currentTile.y + 1;\n Vector2 previousTile = new Vector2(currentTile.x, currentTile.y);\n\n Array<Vector2> tiles = new Array<Vector2>();\n tiles.add(new Vector2(currentTile.x, currentTile.y));\n\n while(currentTile.y < targetY) {\n float rnd = random.nextFloat();\n\n if(rnd > 0.75f) { // up\n Array<Tile> grassRow = new Array<Tile>();\n Array<Tile> treeRow = new Array<Tile>();\n\n for(int x = 1; x <= 5; x++) {\n Vector2 vector = new Vector2(x, currentTile.y);\n\n GrassNEW grass = grassPool.obtain();\n grass.init(vector.x * GameVars.TILE_SIZE, vector.y * GameVars.TILE_SIZE);\n grassRow.add(grass);\n\n if(!tiles.contains(vector, false)) {\n if(random.nextFloat() > 0.3) {\n TreeNEW tree = treePool.obtain();\n tree.init(vector.x * GameVars.TILE_SIZE, vector.y * GameVars.TILE_SIZE);\n treeRow.add(tree);\n }\n } else {\n if(random.nextFloat() > 0.99) {\n Collectible power = new PowerUpSpikes(world, spikesTexture, vector.x * GameVars.TILE_SIZE, vector.y * GameVars.TILE_SIZE);\n collectibles.add(power);\n } else {\n if(random.nextFloat() > 0.5) {\n Coin coin = new Coin(world, coinTexture, vector.x * GameVars.TILE_SIZE, vector.y * GameVars.TILE_SIZE);\n collectibles.add(coin);\n }\n }\n }\n }\n\n currentTile.add(0, 1);\n\n Array<Tile>[] ret = new Array[2];\n ret[0] = grassRow;\n ret[1] = treeRow;\n\n return ret;\n } else if(rnd > 0.375) { // right\n if(currentTile.x < 5 && Math.abs(previousTile.x - currentTile.x) <= 2) {\n currentTile.add(1, 0);\n tiles.add(new Vector2(currentTile.x, currentTile.y));\n }\n } else { // left\n if(currentTile.x > 1 && Math.abs(previousTile.x - currentTile.x) <= 2) {\n currentTile.add(-1, 0);\n tiles.add(new Vector2(currentTile.x, currentTile.y));\n }\n }\n }\n\n return null; // will never happen\n }",
"public int magicMissile();",
"private void NoAirResistanceCalculator(double velocity, double launchAngle)\n\t{\n\t\t/*\n\t\t * Convert launch angle from degrees into radians\n\t\t * Convert velocity from mph to fps\n\t\t * Convert gravity to fps\n\t\t */\n\t\tlaunchAngle = (launchAngle * (Math.PI)) / 180;\n\t\tvelocity = velocity * 1.46667;\n\t\tgravity = gravity * 3.28084;\n\n\t\t// Calculate when the ball hits the ground\n\t\ttimeBallHitsGround = (2 * velocity * Math.sin(launchAngle)) / gravity;\n\n\t\t// Calculate max height (velocity_f = 0)\n\t\tmaxHeightTime = (velocity * Math.sin(launchAngle)) / gravity;\n\t\tmaxHeight = strikeHeight + (velocity * Math.sin(launchAngle) * maxHeightTime) - ((.5 * gravity) * (maxHeightTime * maxHeightTime));\n\n\t\t// Y Position: y = y_0 + (v_y)t + .5(-9.8)(t^2), v_y = (v_0)sin(theta)\n\t\tfor(double t = 0; t <= timeBallHitsGround + .1; t = t + timeIncrement)\n\t\t{\n\t\t\t// Math for y(t) position\n\t\t\tyPos = (velocity * Math.sin(launchAngle) * t) - ((.5 * gravity) * (t * t));\n\n\t\t\t// Add y position and time\n\t\t\tyPosList.add(yPos + strikeHeight);\n\t\t\ttimeList.add(t);\n\n\t\t}\n\n\t\t// X Position: x = x_0 + (v_x)t, v_x = (v_0)cos(theta)\n\t\tfor(int i = 0; i < timeList.size(); i++)\n\t\t{\n\t\t\t// Math for x(t) position\n\t\t\txPos = (velocity * Math.cos(launchAngle) * timeList.get(i));\n\n\t\t\t// Add x position\n\t\t\txPosList.add(xPos);\n\t\t}\n\t}",
"private void AirResistanceCalculator(double velocity, double launchAngle)\n\t{\n\t\t/*\n\t\t * Convert launch angle from degrees into radians\n\t\t * Convert velocity from mph to mps\n\t\t * Do not convert gravity to fps\n\t\t * This one is different than noAirResis because it converts units at the end\n\t\t */\n\t\tlaunchAngle = (launchAngle * (Math.PI)) / 180;\n\t\tvelocity = velocity * 0.44704;\n\n\t\t// Max height and the time it takes to get to max height\n\t\tmaxHeightTime = (terminalVelocity / gravity) *\n\t\t\t\t(Math.atan((velocity * Math.sin(launchAngle)) / terminalVelocity));\n\t\ttop = Math.cos(Math.atan(((velocity * Math.sin(launchAngle)) / terminalVelocity)) -\n\t\t\t\t((gravity * maxHeightTime) / terminalVelocity));\n\t\tbottom = Math.cos(Math.atan((velocity * Math.sin(launchAngle)) / terminalVelocity));\n\t\tmaxHeight = ((terminalVelocity * terminalVelocity) / gravity) *\n\t\t\t\tMath.log(top / bottom);\n\n\t\t// Time it takes to hit ground\n\t\t// coh^-1(x) = ln(x + sqrt((x^2) - 1) x >= 1\n\t\tdouble poo = Math.exp((maxHeight * gravity) / (terminalVelocity * terminalVelocity));\n\t\ttimeBallHitsGround = (terminalVelocity / gravity) *\n\t\t\t\tMath.log(poo + Math.sqrt((poo * poo) - 1)) + maxHeightTime;\n\t\tSystem.out.println(\"TimeBallHitsGround: \" + timeBallHitsGround);\n\t\tSystem.out.println(\"MaxHeightTime \" + maxHeightTime);\n\n\n\t\t// Y Position, t2 is the new time that starts when the ball reaches max height\n\t\tfor(double t = 0, t2 = 0; t < timeBallHitsGround + .1; t = t + timeIncrement)\n\t\t{\n\t\t\tif(t <= maxHeightTime)\n\t\t\t{\n\t\t\t\t// 1 meter = 3.28084 ft\n\t\t\t\ttop = Math.cos(Math.atan(((velocity * Math.sin(launchAngle)) / terminalVelocity)) -\n\t\t\t\t\t\t((gravity * t) / terminalVelocity));\n\t\t\t\tbottom = Math.cos(Math.atan((velocity * Math.sin(launchAngle)) / terminalVelocity));\n\n\n\t\t\t\tyPos = (((terminalVelocity * terminalVelocity) / gravity) *\n\t\t\t\t\t\tMath.log(top / bottom)) * 3.28084;\n\t\t\t}\n\t\t\t// Drag changes directions as the ball falls down\n\t\t\telse\n\t\t\t{\n\t\t\t\t// 1 meter = 3.28084 ft\n\t\t\t\tyPos = (-((terminalVelocity * terminalVelocity) / gravity) *\n\t\t\t\t\t\t(Math.log((Math.cosh((gravity * t2) / terminalVelocity)))) + maxHeight) * 3.28084;\n\t\t\t\tSystem.out.println(\"YPos: \" + yPos + \" t: \" + t + \" t2: \" + t2);\n\t\t\t\tt2 = t2 + timeIncrement;\n\t\t\t}\n\n\n\t\t\t// Add y position and time\n\t\t\tyPosList.add(yPos + strikeHeight);\n\t\t\ttimeList.add(t);\n\t\t}\n\n\t\t// X Position\n\t\tfor(int i = 0; i < timeList.size(); i++)\n\t\t{\n\t\t\t// Math for x(t) position\n\t\t\t// 1 meter = 3.28084 ft\n\t\t\txPos = ((mass / b) * (Math.log(((b * velocity * Math.cos(launchAngle) * timeList.get(i)) + mass)\n\t\t\t\t\t/ mass))) * 3.28084;\n\n\t\t\t// Add x position\n\t\t\t// 1 meter = 3.28084 ft\n\t\t\txPosList.add(xPos);\n\t\t}\n\n\t\t// Convert the final stats to meters\n\t\tmaxHeight = maxHeight * 3.28084;\n\t}",
"public void calculateShooterInfo(double distance) {\n }",
"public void getProbe () {\n double prxg;\n int index;\n double effaoa = effective_aoa();\n /* get variables in the generating plane */\n if (Math.abs(ypval) < .01) ypval = .05;\n getPoints(xpval,ypval);\n\n solver.getVel(lrg,lthg);\n loadProbe();\n\n pxg = lxgt;\n pyg = lygt;\n prg = lrgt;\n pthg = lthgt;\n pxm = lxmt;\n pym = lymt;\n /* smoke */\n if (pboflag == 3 ) {\n prxg = xpval;\n for (index =1; index <=POINTS_COUNT; ++ index) {\n getPoints(prxg,ypval);\n xg[19][index] = lxgt;\n yg[19][index] = lygt;\n rg[19][index] = lrgt;\n thg[19][index] = lthgt;\n xm[19][index] = lxmt;\n ym[19][index] = lymt;\n if (stall_model_type != STALL_MODEL_IDEAL_FLOW) { // stall model\n double apos = stall_model_type == STALL_MODEL_DFLT ? +10 : stall_model_apos;\n double aneg = stall_model_type == STALL_MODEL_DFLT ? -10 : stall_model_aneg;\n if (xpval > 0.0) {\n if (effaoa > apos && ypval > 0.0) { \n ym[19][index] = ym[19][1];\n } \n if (effaoa < aneg && ypval < 0.0) {\n ym[19][index] = ym[19][1];\n }\n }\n if (xpval < 0.0) {\n if (effaoa > apos && ypval > 0.0) { \n if (xm[19][index] > 0.0) {\n ym[19][index] = ym[19][index-1];\n }\n } \n if (effaoa < aneg && ypval < 0.0) {\n if (xm[19][index] > 0.0) {\n ym[19][index] = ym[19][index-1];\n }\n }\n }\n }\n solver.getVel(lrg,lthg);\n prxg = prxg + vxdir*STEP_X;\n }\n }\n return;\n }",
"protected final String look(int direction, boolean steps) {\r\n \t\r\n \t//pay the LOOK_ENERGY_COST\r\n \tenergy = energy - Params.LOOK_ENERGY_COST;\r\n \tint look;\r\n \t//get the x and y coordinates of the critter\r\n \tint xCoord = this.x_coord;\r\n \tint yCoord = this.y_coord;\r\n \t\r\n \tif(steps == true)\r\n \t\tlook = 2; //look 2 steps\r\n \telse \r\n \t\tlook = 1; //look 1 step\r\n \t\r\n \t//get the coordinate position of the location to look\r\n \tswitch(direction) {\r\n \tcase 0:\r\n \t\txCoord += look; //straight right \r\n \t\tbreak;\r\n \t\t\r\n \tcase 1:\r\n \t\txCoord += look; //diagonally up and to the right\r\n \t\tyCoord -= look;\r\n \t\tbreak;\r\n \t\t\r\n \tcase 2:\r\n \t\tyCoord -= look; //straight up\r\n \t\tbreak;\r\n \t\t\r\n \tcase 3: \r\n \t\txCoord -= look; //diagonally up and to left\r\n \t\tyCoord -= look;\r\n \t\tbreak;\r\n \t\t\r\n \tcase 4:\r\n \t\txCoord -= look; //straight left\r\n \t\tbreak;\r\n \t\r\n \tcase 5:\r\n \t\txCoord -= look; //diagonally down and to left\r\n \t\tyCoord += look; \r\n \t\tbreak;\r\n \t\t\r\n \tcase 6:\r\n \t\tyCoord += look; //diagonally down\r\n \t\tbreak;\r\n \t\t\r\n \tcase 7:\r\n \t\txCoord += look; //diagonally down and to right\r\n \t\tyCoord += look;\r\n \t\tbreak;\r\n \t}\r\n \t\r\n \t//wrap-around world, need to correct coordinates\r\n \tif(xCoord > (Params.WORLD_WIDTH - 1))\r\n \t\txCoord %= Params.WORLD_WIDTH;\r\n \telse if(xCoord < 0)\r\n \t\txCoord += Params.WORLD_WIDTH;\r\n \tif(yCoord > (Params.WORLD_HEIGHT - 1))\r\n \t\tyCoord %= Params.WORLD_HEIGHT;\r\n \telse if(yCoord < 0)\r\n \t\tyCoord += Params.WORLD_HEIGHT;\r\n \r\n \t//Iterate through population hashMap\r\n \tIterator<String> positionIter = population.keySet().iterator();\r\n \t//Iterate through all of the position keys\r\n \twhile(positionIter.hasNext()) {\r\n \t\t//get the position key\r\n \t\tString position = positionIter.next();\r\n \t\t//get the critter list in that position\r\n \t\tArrayList<Critter> critterList = population.get(position);\r\n \t\t//iterate through the critters \r\n \t\tListIterator<Critter> currCritter = critterList.listIterator();\r\n \t\twhile(currCritter.hasNext()) {\r\n \t\t\t//get a critter\r\n \t\t\tCritter c = currCritter.next();\r\n \t\t\t//check whether each critter is in the position\r\n \t\t\tif(c.x_coord == xCoord && c.y_coord == yCoord) {\r\n \t\t\t\tif(c.getEnergy() >= 0) {\r\n \t\t\t\t\treturn c.toString();\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n \t\r\n \t//return null if the position is unoccupied\r\n \treturn null;\r\n }",
"Entity getShooter();",
"public static void main(String[] args) throws UsbException {\n\t\tDefenseGrid grid = DefenseGrid.getInstance();\n\t\t\n\t\t// perform initialization (zeroing) of each missile launcher in parallel\n\t\tgrid.initializeMissileLaunchers();\n\t\t\n\t\t// get an array of missile launchers to control\n\t\tMissileLauncher[] launchers = grid.getMissileLaunchers();\n\t\t\n\t\t// test each missile launchers ability to aim up, down, left, right, and fire\n\t\tif(launchers.length == 0){\n\t\t\tSystem.out.println(\"No USB Missile Launchers could not be found. Try disconnecting and reconnecting USB devices from port.\");\n\t\t} else {\n\t\t\tint launcherID = 0; // launcher's index\n\t\t\tfor(MissileLauncher ml : launchers){\n\t\t\t\tlauncherID++;\n\t\t\t\tSystem.out.println(\"[Launcher \" + launcherID + \"] Vertical Position: \" + ml.adjustVerticalPosition(500));\n\t\t\t\tSystem.out.println(\"[Launcher \" + launcherID + \"] Vertical Position: \" + ml.adjustVerticalPosition(-500));\n\t\t\t\tSystem.out.println(\"[Launcher \" + launcherID + \"] Vertical Position: \" + ml.adjustVerticalPosition(0));\n\t\t\t\tSystem.out.println(\"[Launcher \" + launcherID + \"] Horizontal Position: \" + ml.adjustHorizontalPosition(500));\n\t\t\t\tSystem.out.println(\"[Launcher \" + launcherID + \"] Horizontal Position: \" + ml.adjustHorizontalPosition(-500));\n\t\t\t\tSystem.out.println(\"[Launcher \" + launcherID + \"] Horizontal Position: \" + ml.adjustHorizontalPosition(0));\n\t\t\t\tSystem.out.println(\"[Launcher \" + launcherID + \"] Fired: \" + ml.fire());\n\t\t\t}\n\t\t}\n\t}",
"Vec3 getHomeCoords(IGeneticMob geneticMob);",
"public GameObject spawnCarrier(LogicEngine in_logicEngine, float in_x , CARRIER_TYPE in_type)\r\n\t{\n\t\tGameObject ship = new GameObject(\"data/\"+GameRenderer.dpiFolder+\"/thrusterboss.png\",in_x,LogicEngine.SCREEN_HEIGHT+64,30);\r\n\t\t\r\n\t\t\r\n\t\t//set animation frame\r\n\t\tship.i_animationFrame=4;\r\n\t\tship.i_animationFrameRow=0;\r\n\t\tship.i_animationFrameSizeWidth=32;\r\n\t\tship.i_animationFrameSizeHeight=132;\r\n\t\t\r\n\t\tSimplePathfollowing followPathBehaviour = new SimplePathfollowing();\r\n\t\t//pause at the first waypoint\r\n\t\tfollowPathBehaviour.waitAtWaypoint(1, 50);\r\n\t\t\r\n\t\tfollowPathBehaviour.setInfluence(1);\r\n\t\tfollowPathBehaviour.setAttribute(\"arrivedistance\", \"50\", null);\r\n\t\t\r\n\t\tfollowPathBehaviour.waitAtWaypoint(1, 300);\r\n\t\t\r\n\t\t//go straight down then split\r\n\t\tship.v.addWaypoint(new Point2d(in_x, LogicEngine.SCREEN_HEIGHT/1.5));\r\n\t\tship.v.addWaypoint(new Point2d(in_x,-100));\r\n\t\t\r\n\t\tCustomBehaviourStep b = new CustomBehaviourStep(followPathBehaviour);\r\n\t\t\r\n\t\t//turret\r\n\t\t//turret\r\n\t\tDrawable turret = new Drawable();\r\n\t\tturret.i_animationFrame = 6;\r\n\t\tturret.i_animationFrameSizeWidth=16;\r\n\t\tturret.i_animationFrameSizeHeight=16;\r\n\t\tturret.str_spritename = \"data/\"+GameRenderer.dpiFolder+\"/gravitonlevel.png\";\r\n\t\tturret.f_forceRotation = 90;\r\n\t\tship.shotHandler = new TurretShot(turret,\"data/\"+GameRenderer.dpiFolder+\"/redbullets.png\",6,5.0f);\r\n\t\tship.visibleBuffs.add(turret);\r\n\t\t\r\n\t\tship.v.setMaxForce(1);\r\n\t\tship.v.setMaxVel(1);\r\n\t\t\r\n\t\tship.stepHandlers.add(b);\r\n\t\t\r\n\t\tHitpointShipCollision s;\r\n\t\tif(!Difficulty.isHard())\r\n\t\t\t s = new HitpointShipCollision(ship, 160, 32);\r\n\t\telse\r\n\t\t\t s = new HitpointShipCollision(ship, 125, 32);\r\n\t\t\t\r\n\t\ts.setExplosion(Utils.getBossExplosion(ship));\r\n\t\tship.collisionHandler = s; \r\n\t\r\n\t\t//TODO:launch ships handler for shooting\r\n\t\tif(in_type == CARRIER_TYPE.PATHFINDERS_BOTH_SIDES)\r\n\t\t{\r\n\t\t\tship.stepHandlers.add(new LaunchShipsStep(pathFinder(true), 50, 5, 5,true));\r\n\t\t\tship.stepHandlers.add(new LaunchShipsStep(pathFinder(false), 50, 5, 5,false));\r\n\t\t}\r\n\t\telse\r\n\t\t\tif(in_type == CARRIER_TYPE.PATHFINDERS_RIGHT_ONLY)\r\n\t\t\t{\r\n\t\t\t\tship.stepHandlers.add(new LaunchShipsStep(pathFinder(true), 50, 5, 5,true));\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\tif(in_type == CARRIER_TYPE.PATHFINDERS_LEFT_ONLY)\r\n\t\t\t\t{\r\n\t\t\t\t\tship.stepHandlers.add(new LaunchShipsStep(pathFinder(false), 50, 5, 5,false));\r\n\t\t\t\t}\r\n\t\t\t\t\t\t \r\n\t\tship.allegiance = GameObject.ALLEGIANCES.ENEMIES;\r\n\t\t\r\n\t\tin_logicEngine.objectsEnemies.add(ship);\r\n\t\t\r\n\t\treturn ship;\r\n\t\r\n\t}",
"protected Vector2 get_ray_fire_point() {\n Vector2 p = new Vector2(\n sprite.getX() + (sprite.getWidth() / 2),\n sprite.getY() + (sprite.getHeight()));\n\n Vector2 p1 = p.rotateAround(new Vector2(\n sprite.getX() + (sprite.getWidth() / 2),\n sprite.getY() + (sprite.getHeight() / 2)),\n sprite.getRotation());\n\n return p1;\n }",
"public void defensive_act()\r\n\t{\r\n\t\tBullet closestBullet = IMAGINARY_BULLET;\r\n\t//\tBullet secondClosestBullet = IMAGINARY_BULLET;\r\n\t\t\r\n\t\tActor machines;\r\n\t\tEnumeration<Actor> opponent = ((MachineInfo)data.get(TankFrame.PLAYER_1)).getHashtable().elements();\r\n\t\twhile(opponent.hasMoreElements())\r\n\t\t{\r\n\t\t\tmachines = (Actor) opponent.nextElement();\r\n\t\t\tif(machines instanceof Bullet)\r\n\t\t\t{\r\n\t\t\t\tif(machines.getPoint().distance(getPoint()) < MIN_SHOOT_DISTANCE)\r\n\t\t\t\t{\r\n\t\t\t\t\tclosestBullet = (Bullet)machines;\r\n\t\t\t\t\tLine2D aim = new Line2D.Double(getCenterX(), getCenterY(), closestBullet.getPosX(), closestBullet.getPosY() );\r\n\t\t\t\t\tSystem.out.println(aim.getP1().distance(aim.getP2()));\r\n\t\t\t\t\tif(hasClearPath(aim) && aim.getP1().distance(aim.getP2()) < MIN_SHOOT_DISTANCE)\r\n\t\t\t\t\t\taimAndShoot(aim);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t/*\tif(machines.getPoint().distance(getPoint()) > secondClosestBullet.getPoint().distance(getPoint()) \r\n\t\t\t\t\t&& machines.getPoint().distance(getPoint()) < closestBullet.getPoint().distance(getPoint()))\r\n\t\t\t\t\tsecondClosestBullet = (Bullet)machines;*/\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t/*\r\n\t\t * Find the line\r\n\t\t */\r\n\t\t/*if(!closestBullet.equals(IMAGINARY_BULLET))\r\n\t\t{\r\n\t\t\tLine2D bulletPath = new Line2D(getLeftPoint(), closestBullet.getPoint());\r\n\t\t\tLine2D aim = new Line2D(getCenterX(), getCenterY(), (bulletPath.getX2()+bulletPath.getX1())/2,(bulletPath.getY2()+bulletPath.getY1())/2 );\r\n\t\t\tif(hasClearPath(aim) && aim.getP1().distance(aim.getP2()) < MIN_SHOOT_DISTANCE)\r\n\t\t\t\taimAndShoot(aim);\r\n\t\t\t/*bulletPath = new Line2D(getRightPoint(), closestBullet.getPoint());\r\n\t\t\taim = new Line2D(posX, posY, (bulletPath.getX2()+bulletPath.getX1())/2,(bulletPath.getY2()+bulletPath.getY1())/2 );\r\n\t\t\tif(hasClearPath(aim))\r\n\t\t\t\taimAndShoot(aim);\r\n\t\t\tbulletPath = new Line2D(getPoint(), closestBullet.getPoint());\r\n\t\t\taim = new Line2D(posX, posY, (bulletPath.getX2()+bulletPath.getX1())/2,(bulletPath.getY2()+bulletPath.getY1())/2 );\r\n\t\t\tif(hasClearPath(aim))\r\n\t\t\t\taimAndShoot(aim);*/\r\n\t\t\t\r\n\t\t//}\r\n\t/*\tif(!secondClosestBullet.equals(IMAGINARY_BULLET))\r\n\t\t{\r\n\t\t\tLine2D bulletPath = new Line2D(getLeftPoint(), secondClosestBullet.getPoint());\r\n\t\t\tLine2D aim = new Line2D(posX, posY, (bulletPath.getX2()+bulletPath.getX1())/2,(bulletPath.getY2()+bulletPath.getY1())/2 );\r\n\t\t\tif(hasClearPath(aim))\r\n\t\t\t\taimAndShoot(aim);\r\n\t\t}*/\r\n\r\n\t}",
"public static void main(String [] args) {\n PPPoint pt1 = new PPPoint(0.0, 0.0);\n PPPoint pt2 = new PPPoint(0.0, 100.0);\n double lookAheadDist = 10.0;\n double targetVelocity = 0.5;\n\n PurePursuitCalc calc = new PurePursuitCalc(pt1, pt2, lookAheadDist, targetVelocity);\n double heading;\n double x = (args.length > 0) ? Double.parseDouble(args[0]) : 0.0;\n double y = (args.length > 1) ? Double.parseDouble(args[1]) : 0.0;\n final int numPoints = (args.length > 2) ? Integer.parseInt(args[2]) : 11;\n double maxAngle = (args.length > 3) ? Double.parseDouble(args[3]) : 20;\n double stepSize = maxAngle * 2.0 / ((double)numPoints - 1.0);\n\n for (int i = 0; i < numPoints; i++) {\n heading = -maxAngle + ((double)i * stepSize);\n double[] data = calc.calcVelocities(x, y, heading);\n double[] alldata = calc.getData();\n String msg = String.format(\"currX=%6.2f, currY=%6.2f, currHeading=%6.2f, desiredHeading=%6.2f, leftSetV=%6.2f, rightSetV=%6.2f\",\n alldata[0], alldata[1], alldata[2], alldata[3], alldata[4], alldata[5]);\n System.out.println(msg);\n }\n }",
"public GameObject spawnBomber(LogicEngine in_logicEngine){\n\t\tGameObject ship = new GameObject(\"data/\"+GameRenderer.dpiFolder+\"/bomber.png\",((float)LogicEngine.SCREEN_WIDTH)+50,LogicEngine.SCREEN_HEIGHT-50,0);\r\n\t\tship.i_animationFrameSizeHeight = 58;\r\n\t\tship.i_animationFrameSizeWidth = 58;\r\n\t\t\r\n\t\t//fly back and forth\r\n\t\tLoopWaypointsStep s = new LoopWaypointsStep();\r\n\t\ts.waypoints.add(new Point2d(-30,LogicEngine.SCREEN_HEIGHT-50));\r\n\t\ts.waypoints.add(new Point2d(LogicEngine.SCREEN_WIDTH+50,LogicEngine.SCREEN_HEIGHT-50));\r\n\t\t\r\n\t\tship.b_mirrorImageHorizontal = true;\r\n\t\t\r\n\t\tship.stepHandlers.add(s);\r\n\t\tship.v.setMaxForce(5.0f);\r\n\t\tship.v.setMaxVel(5.0f);\r\n\t\tship.allegiance = GameObject.ALLEGIANCES.ENEMIES;\r\n\r\n\r\n\t\t//tadpole bullets\r\n\t\tGameObject go_tadpole = this.spawnTadpole(in_logicEngine);\r\n\t\tgo_tadpole.stepHandlers.clear();\r\n\t\tFlyStraightStep fly = new FlyStraightStep(new Vector2d(0,-0.5f));\r\n\t\tfly.setIsAccelleration(true);\r\n\t\t\r\n\t\t\r\n\t\tif(Difficulty.isHard())\r\n\t\t{\tgo_tadpole.v.setMaxVel(5);\r\n\t\t\tgo_tadpole.v.setMaxForce(5);\r\n\t\t}\r\n\t\telse\r\n\t\t{\tgo_tadpole.v.setMaxVel(10);\r\n\t\t\tgo_tadpole.v.setMaxForce(5);\r\n\t\t}\r\n\t\tgo_tadpole.stepHandlers.add(fly);\r\n\t\tgo_tadpole.v.setVel(new Vector2d(-2.5f,0f));\r\n\t\t\r\n\t\t\r\n\t\t//bounce on hard and medium\r\n\t\tif(Difficulty.isHard() || Difficulty.isMedium())\r\n\t\t{\r\n\t\t\tBounceOfScreenEdgesStep bounce = new BounceOfScreenEdgesStep();\r\n\t\t\tbounce.b_sidesOnly = true;\r\n\t\t\tgo_tadpole.stepHandlers.add(bounce);\r\n\t\t}\r\n\t\t\r\n\t\t//drop bombs\r\n\t\tLaunchShipsStep launch = new LaunchShipsStep(go_tadpole, 20, 5, 3, true);\r\n\t\tlaunch.b_addToBullets = true;\r\n\t\tlaunch.b_forceVelocityChangeBasedOnParentMirror = true;\r\n\t\t\r\n\t\tship.stepHandlers.add(launch);\r\n\t\tship.rotateToV=true;\r\n\t\t\r\n\t\t//give it some hp\r\n\t\tHitpointShipCollision c = new HitpointShipCollision(ship, 50, 50f);\r\n\t\tc.setSimpleExplosion();\r\n\t\tship.collisionHandler = c;\r\n\t\t\r\n\t\tin_logicEngine.objectsEnemies.add(ship);\r\n\t\t\r\n\t\treturn ship;\r\n\t\r\n\t}",
"void getMotionInfo(){\n double degreeDistance = Math.sqrt(Math.pow((startLat - endLat),2) + Math.pow((startLong - endLong),2));\n double R = 6378.137; // Radius of earth in KM\n double dLat = startLat * Math.PI / 180 - endLat* Math.PI / 180;\n dLat = Math.abs(dLat);\n double dLon = startLong * Math.PI / 180 - endLong* Math.PI / 180;\n dLon = Math.abs(dLon);\n double a = Math.sin(dLat / 2) * Math.sin(dLat / 2) +\n Math.cos(endLat * Math.PI / 180) * Math.cos(startLat* Math.PI / 180) *\n Math.sin(dLon / 2) * Math.sin(dLon / 2);\n double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n double distance;\n distance = R * c;\n distance = distance * 1000f;\n pathDistance = distance;\n degToMRatio = degreeDistance/distance;\n double angle = Math.atan(dLat/dLon);\n xCompMotion = Math.cos(angle);\n yCompMotion = Math.sin(angle);\n totalNumSteps = pathDistance/STEP_LENGTH;\n //Rounds number of steps to nearest whole number\n totalNumSteps = Math.round(totalNumSteps);\n }",
"public static void main( String args[] )\n {\n double Ei = 500;\n double EPS = 10;\n double phi = 60;\n float mutS = 0.1f;\n float mutA = 0.2f;\n float gamma = 45;\n double energy = Ei - EPS;\n\n double self = SelfShielding( energy, Ei, phi, mutS, mutA, gamma );\n System.out.println( \"self shielding factor = \" + self );\n // result should be: 1.1944503488285683\n\n String filename = \"/usr2/HRCS_TEST/hrcs3084.run\";\n RunfileRetriever rr = new RunfileRetriever( filename );\n DataSet ds = rr.getDataSet(1);\n Operator ToEL = new SpectrometerTofToEnergyLoss( ds, 0, 0, 0 );\n ds = (DataSet)ToEL.getResult();\n new ViewManager( ds, IViewManager.IMAGE );\n\n Vector result = SelfShielding( ds, mutS, mutA, gamma, true );\n\n DataSet ss_ds_1 = (DataSet)result.elementAt(0); \n new ViewManager( ss_ds_1, IViewManager.IMAGE );\n\n DataSet ss_ds_2 = (DataSet)result.elementAt(1); \n new ViewManager( ss_ds_2, IViewManager.IMAGE );\n }",
"public Tile diveBomb() {\n List<Tile> targets = this.findTargets();\n Tile us_tile = this.gb.get(this.us_head_x, this.us_head_y);\n LinkedList<Tile> shortestPath = null;\n\n // Chose the shortest path\n //System.out.println(\"HeadX: \" + this.us_head_x + \" HeadY: \" + this.us_head_y);\n //System.out.println(\"EnemyX: \" + this.enemy_head_x + \" EnemyY: \" + this.enemy_head_y);\n // System.out.println(\"Targets - \" + targets);\n for (Tile target : targets) {\n LinkedList<Tile> path = this.dk.path(us_tile, target, this.gb);\n\n if (path != null) { // means we couldn't reach the desired target\n // System.out.println(\"Path - \" + path);\n if (shortestPath == null) {\n shortestPath = path;\n } else if (path.size() < shortestPath.size()) {\n shortestPath = path;\n }\n }\n }\n // System.out.println(\"Shortest Path - \" + shortestPath);\n if (shortestPath == null) return us_tile;\n return shortestPath.get(1);\n }",
"private State calculatePM25(double longi, double lati) {\n Double breath = 0.0;\n Double density = PM25Density;\n boolean isConnected = ShortcutUtil.isNetworkAvailable(this);\n String inOutStr = aCache.getAsString(Const.Cache_Indoor_Outdoor);\n if(!ShortcutUtil.isStringOK(inOutStr)){\n inOutStr = String.valueOf(LocationService.Indoor);\n aCache.put(Const.Cache_Indoor_Outdoor,inOutStr);\n }\n inOutDoor = Integer.valueOf(inOutStr);\n /*double ratio;\n if (!isConnected) {\n ratio = this.getLastSevenDaysInOutRatio();\n FileUtil.appendStrToFile(DBRunTime,\"no network connection, using ratio == \"+ratio);\n density = ratio * density + (1-ratio)*density/3;\n FileUtil.appendStrToFile(DBRunTime,\"no network connection, using ratio to get density \"+density);\n if (ratio > 0.5) inOutDoor = LocationService.Indoor;\n else inOutDoor = LocationService.Outdoor;\n } else {\n if (inOutDoor == LocationService.Indoor) density /= 3;\n }*/\n\n double static_breath = ShortcutUtil.calStaticBreath(cacheUtil.getAsString(Const.Cache_User_Weight));\n\n if (static_breath == 0.0) {\n if(isBackground != null && isBackground.equals(bgStr))\n Toast.makeText(getApplicationContext(), Const.Info_Weight_Null, Toast.LENGTH_SHORT).show();\n static_breath = 6.6; // using the default one\n }\n if (mMotionStatus == Const.MotionStatus.STATIC) {\n breath = static_breath;\n } else if (mMotionStatus == Const.MotionStatus.WALK) {\n breath = static_breath * 2.1;\n } else if (mMotionStatus == Const.MotionStatus.RUN) {\n breath = static_breath * 6;\n }\n venVolToday += breath;\n breath = breath / 1000; //change L/min to m3/min\n PM25Today += density * breath;\n State state = new State(IDToday, aCache.getAsString(Const.Cache_User_Id), Long.toString(System.currentTimeMillis()),\n String.valueOf(longi),\n String.valueOf(lati),\n String.valueOf(inOutDoor),\n mMotionStatus == Const.MotionStatus.STATIC ? \"1\" : mMotionStatus == Const.MotionStatus.WALK ? \"2\" : \"3\",\n Integer.toString(numStepsForRecord), avg_rate, String.valueOf(venVolToday), density.toString(), String.valueOf(PM25Today), String.valueOf(PM25Source), 0, isConnected ? 1 : 0);\n numStepsForRecord = 0;\n return state;\n }",
"protected Unit target() {\n\t\tUnit closest = null; // this variable will contain the closest Unit\n\t\tDouble min = (double) projectile_range; // this will contain the lowest distance\n\t\tList<Entity> entities = level.getEntities();\n\n\t\tfor (int i = 0; i < entities.size(); i++) {\n\t\t\tEntity e = entities.get(i);\n\t\t\tUnit u = (Unit) e; // casts e to Unit\n\t\t\tif (u.equals(this)) continue; // discounts self\n\t\t\tif (u.UNIT_R != UNIT_G && u.UNIT_G != UNIT_R) continue; // discounts Units from own team\n\t\t\tif (!(e instanceof Unit)) continue; // discounts non-Unit entities\n\n\t\t\tdouble distance = MathMachine.distance((u.getX() - x), (u.getY() - y));\n\t\t\t/*\n\t\t\t * int r = 0; int g = 0; for (int y = 0; y < level.getHeight() * 16; y++) { for (int x = 0; x < level.getWidth() * 16; x++) { if (level.redPixels[x + y * level.getWidth() * 16] == true) r++; if (level.greenPixels[x + y * level.getWidth() * 16] == true )g++; System.out.println(\"r: \" + r + \", \" + g); } }\n\t\t\t */\n\t\t\tif (UNIT_R) { // if it is a red unit\n\t\t\t\tif (distance < min) {\n\t\t\t\t\tint xt = (int) Math.round(u.getX());\n\t\t\t\t\tint yt = (int) Math.round(u.getY());\n\t\t\t\t\tif (level.redPixels[(int) Math.round(xt + level.getWidth() * 16.0 * yt)]) {\n\t\t\t\t\t\tclosest = u;\n\t\t\t\t\t\tmin = distance;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (UNIT_G) { // if it is a green unit\n\t\t\t\tif (distance < min) {\n\t\t\t\t\tSystem.out.println(level.greenPixels[(int) Math.round(u.getX() + level.getWidth() * 16.0 * u.getY())]);\n\n\t\t\t\t\tif (level.greenPixels[(int) Math.round(u.getX() + level.getWidth() * 16.0 * u.getY())]) {\n\t\t\t\t\t\tclosest = u;\n\t\t\t\t\t\tmin = distance;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\treturn closest; // the program is fucked if null happens. just a headsup. hopefully you will remember if you get a null pointer exception.\n\t}",
"public void spawnWanderingSeeker(LogicEngine in_logicEngine)\r\n\t{\n\t\tGameObject ship = new GameObject(\"data/\"+GameRenderer.dpiFolder+\"/triangle.png\",(float)LogicEngine.SCREEN_WIDTH*Math.random(),LogicEngine.SCREEN_HEIGHT-10,0);\r\n\t\t\t\t\r\n\t\t//set animation frame\r\n\t\tship.i_animationFrame=1;\r\n\t\tship.i_animationFrameRow=0;\r\n\t\tship.i_animationFrameSizeWidth=16;\r\n\t\tship.i_animationFrameSizeHeight=16;\r\n\t\t\r\n\t\t//wander \t\r\n\t\tCustomBehaviourStep cb = new CustomBehaviourStep(new Wander(-2.5,2.5,20,0.1));\r\n\t\tship.stepHandlers.add( cb);\r\n\t\t\r\n\t\t//chase player if on medium or hard\r\n\t\tif(Difficulty.difficulty == DIFFICULTY.MEDIUM || \r\n\t\t\t\tDifficulty.difficulty == DIFFICULTY.HARD)\r\n\t\t{\t\r\n\t\t\tSeekNearestPlayerStep sps = new SeekNearestPlayerStep(100);\r\n\t\t\tship.stepHandlers.add(sps);\r\n\t\t}\r\n\t\r\n\t\tship.stepHandlers.add(new FlyStraightStep(new Vector2d(0,-2)));\r\n\t\tship.collisionHandler = new DestroyIfEnemyCollision(ship, 10, true);\r\n\t\tship.v.setMaxForce(2);\r\n\t\tship.v.setMaxVel(2);\r\n\t\t\r\n\t\tship.allegiance = GameObject.ALLEGIANCES.ENEMIES;\r\n\t\t\r\n\t\tin_logicEngine.objectsEnemies.add(ship);\r\n\t\t\r\n\t}",
"void createLaser(float x, float y, int team, float angle, float damage) {\n exists = true;\n this.team = team;\n this.damage = damage;\n degrees = angle;\n positionX = x - midX;\n positionY = y - midY;\n centerPosX = positionX + midX;\n centerPosY = positionY + midY;\n }",
"public Field.Fieldelements placeShotComputer() {\r\n int sizeX = this.fieldUser.getSizeX();\r\n int sizeY = this.fieldUser.getSizeY();\r\n \r\n // probability that a field contains a ship (not in percent, 1000 is best)\r\n double[][] probability = new double[sizeX][sizeY];\r\n double sumProbability = 0;\r\n \r\n for (int posX = 0; posX < sizeX; posX++) {\r\n for (int posY = 0; posY < sizeY; posY++) {\r\n // set probability for each field to 1\r\n probability[sizeX][sizeY] = 1.;\r\n \r\n // check neighbouring fields for hits and set probability to 1000\r\n if (Field.Fieldelements.HIT == fieldUser.getFieldStatus(posX, posY - 1) ||\r\n Field.Fieldelements.HIT == fieldUser.getFieldStatus(posX, posY + 1) ||\r\n Field.Fieldelements.HIT == fieldUser.getFieldStatus(posX - 1, posY) ||\r\n Field.Fieldelements.HIT == fieldUser.getFieldStatus(posX + 1, posY)) {\r\n probability[posX][posY] = 1000;\r\n }\r\n \r\n // 0 points if all fields above and below are SUNK or SHOT\r\n if ((Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX, posY - 1) || Field.Fieldelements.WATER == fieldUser.getFieldStatus(posX, posY - 1)) &&\r\n (Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX, posY + 1) || Field.Fieldelements.WATER == fieldUser.getFieldStatus(posX, posY + 1)) &&\r\n (Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX - 1, posY) || Field.Fieldelements.WATER == fieldUser.getFieldStatus(posX - 1, posY)) &&\r\n (Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX + 1, posY) || Field.Fieldelements.WATER == fieldUser.getFieldStatus(posX + 1, posY))\r\n ) {\r\n probability[posX][posY] = 0;\r\n }\r\n \r\n // 0 points if a neighbouring field is SUNK\r\n if (Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX - 1, posY - 1) ||\r\n Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX - 1, posY) ||\r\n Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX - 1, posY + 1) ||\r\n Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX, posY - 1) ||\r\n Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX, posY + 1) ||\r\n Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX + 1, posY - 1) ||\r\n Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX + 1, posY) ||\r\n Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX + 1, posY + 1)\r\n ) {\r\n probability[posX][posY] = 0;\r\n }\r\n \r\n // 0 points if top right, top left, bottom right or bottom left is HIT\r\n if (Field.Fieldelements.HIT == fieldUser.getFieldStatus(posX - 1, posY - 1) ||\r\n Field.Fieldelements.HIT == fieldUser.getFieldStatus(posX - 1, posY + 1) ||\r\n Field.Fieldelements.HIT == fieldUser.getFieldStatus(posX + 1, posY - 1) ||\r\n Field.Fieldelements.HIT == fieldUser.getFieldStatus(posX + 1, posY + 1)\r\n ) {\r\n probability[posX][posY] = 0;\r\n }\r\n \r\n // 0 points if a shot has already been placed\r\n if (Field.Fieldelements.WATER != fieldUser.getFieldStatus(posX, posY) &&\r\n Field.Fieldelements.SHIP != fieldUser.getFieldStatus(posX, posY)) {\r\n probability[posX][posY] = 0;\r\n }\r\n }\r\n }\r\n \r\n // calculate sum of all points\r\n // TODO check if probability must be smaller numbers\r\n for (int posX = 0; posX < sizeX; sizeX++) {\r\n for (int posY = 0; posY < sizeY; posY++) {\r\n sumProbability += probability[posX][posY];\r\n }\r\n }\r\n \r\n // random element\r\n Random random = new Random();\r\n sumProbability = random.nextInt((int) --sumProbability);\r\n sumProbability++; // must at least be 1\r\n int posY = -1;\r\n int posX = -1;\r\n while (posY < sizeY - 1 && sumProbability >= 0) {\r\n posY++;\r\n posX = -1;\r\n while (posX < sizeX && sumProbability >= 0) {\r\n posX++;\r\n sumProbability = sumProbability - probability[posX][posY];\r\n }\r\n }\r\n return fieldUser.shoot(posX, posY);\r\n }",
"public MineralLocation getMineralLocation(RobotOrientation orientation){\n MineralLocation absoluteLocation = MineralLocation.Center;\n //if tfod failed to init, just return center\n //otherwise, continue with detection\n if(!error) {\n List<Recognition> updatedRecognitions = tfod.getRecognitions();\n List<Recognition> filteredList = new ArrayList<Recognition>();\n\n /*for(Recognition recognition : updatedRecognitions){\n if(recognition.getHeight() < recognition.getImageHeight() * 3 / 11){\n filteredList.add(recognition);\n }\n }*/\n //Variabes to store two mins\n Recognition min1 = null;\n Recognition min2 = null;\n //Iterate through all minerals\n for(Recognition recognition : updatedRecognitions){\n double height = recognition.getHeight();\n if (min1 == null){\n min1 = recognition;\n }\n else if(min2 == null){\n min2 = recognition;\n }\n else if(height < min1.getHeight()){\n min1 = recognition;\n }\n else if(height < min2.getHeight()){\n min2 = recognition;\n }\n if (min1 != null && min2 != null){\n if(min1.getHeight() > min2.getHeight()){\n Recognition temp = min1;\n min1 = min2;\n min2 = temp;\n }\n }\n }\n filteredList.add(min1);\n filteredList.add(min2);\n int goldMineralX = -1;\n int silverMineral1X = -1;\n int silverMineral2X = -1;\n //Three Mineral Algorithm\n if(orientation == RobotOrientation.Center){\n for (Recognition recognition : filteredList) {\n if (recognition.getLabel().equals(LABEL_GOLD_MINERAL)) {\n goldMineralX = (int) recognition.getLeft();\n } else if (silverMineral1X == -1) {\n silverMineral1X = (int) recognition.getLeft();\n } else {\n silverMineral2X = (int) recognition.getLeft();\n }\n }\n if (goldMineralX != -1 && silverMineral1X != -1 && silverMineral2X != -1) {\n if (goldMineralX < silverMineral1X && goldMineralX < silverMineral2X) {\n return MineralLocation.Left;\n } else if (goldMineralX > silverMineral1X && goldMineralX > silverMineral2X) {\n return MineralLocation.Right;\n } else {\n return MineralLocation.Center;\n }\n }\n }\n else{//Two Mineral Algorithm\n //looks at each detected object, obtains \"the most\" gold and silver mineral\n float goldMineralConfidence = 0;\n float silverMineralConfidence = 0;\n for (Recognition recognition : updatedRecognitions) {\n String label = recognition.getLabel();\n float confidence = recognition.getConfidence();\n int location = (int) recognition.getLeft();\n if (label.equals(LABEL_GOLD_MINERAL)\n && confidence > goldMineralConfidence) {\n goldMineralX = location;\n goldMineralConfidence = confidence;\n } else if (label.equals(LABEL_SILVER_MINERAL)\n && confidence > silverMineralConfidence) {\n silverMineral1X = location;\n silverMineralConfidence = confidence;\n }\n }\n //using the two gold and silver object x locations,\n //obtains whether the gold mineral is on the relative left or the right\n boolean goldRelativeLeft;\n if (goldMineralX != -1 && silverMineral1X != -1) {\n if (goldMineralX < silverMineral1X) {\n goldRelativeLeft = true;\n } else {\n goldRelativeLeft = false;\n }\n // telemetry.addData(\"Relative\", goldRelativeLeft);\n //translates the relative location to an absolute location based off the orientation\n if (orientation == RobotOrientation.Left) {\n if (goldRelativeLeft) {\n absoluteLocation = MineralLocation.Left;\n } else {\n absoluteLocation = MineralLocation.Center;\n }\n //telemetry.addData(\"orientation\",absoluteLocation);\n } else {\n if (goldRelativeLeft) {\n absoluteLocation = MineralLocation.Center;\n } else {\n absoluteLocation = MineralLocation.Right;\n }\n // telemetry.addData(\"orientation\",\"fail\");\n }\n } //sees at least one silver (so not a reading from the wrong position, but no gold seen)\n else if(silverMineral1X != -1 && goldMineralX == -1){\n if(orientation == RobotOrientation.Left){\n absoluteLocation = MineralLocation.Right;\n }else if(orientation == RobotOrientation.Right){\n absoluteLocation = MineralLocation.Left;\n }\n }\n }\n\n }\n return absoluteLocation;\n }",
"public void spawnSateliteShip(LogicEngine in_logicEngine,float in_x)\r\n\t{\n\t\tGameObject ship = new GameObject(\"data/\"+GameRenderer.dpiFolder+\"/gravitonlevel.png\",in_x,LogicEngine.SCREEN_HEIGHT,1);\r\n\t\tship.i_animationFrameSizeWidth = 64;\r\n\t\tship.i_animationFrameSizeHeight = 32;\r\n\t\tship.i_animationFrame = 2;\r\n\t\tship.allegiance = GameObject.ALLEGIANCES.ENEMIES;\r\n\t\t\r\n\t\tship.v.setMaxForce(1.0f);\r\n\t\tship.v.setMaxVel(4.0f);\r\n\t\t\r\n\t\t\r\n\t\t//fly down\r\n\t\t//ship.stepHandlers.add( new FlyStraightStep(new Vector2d(0,-1f)));\r\n\t\t\r\n\t\tSimplePathfollowing followPathBehaviour = new SimplePathfollowing();\r\n\t\tfollowPathBehaviour.setInfluence(1);\r\n\t\tfollowPathBehaviour.setAttribute(\"arrivedistance\", \"10\", null);\r\n\t\t\r\n\t\t//add waypoints\r\n\t\tfor(int i=0 ; i< 20 ; i++)\r\n\t\t{\r\n\t\t\t\t\t\t\r\n\t\t\t//put in some edge ones too\r\n\t\t\tif(r.nextInt(6)%3==0)\r\n\t\t\t\tship.v.addWaypoint(new Point2d((int) LogicEngine.SCREEN_WIDTH * (i%2), LogicEngine.SCREEN_HEIGHT/1.5 + r.nextInt((int) LogicEngine.SCREEN_HEIGHT/5)));\r\n\t\t\telse\r\n\t\t\t\t//put in some random doublebacks etc\r\n\t\t\t\tship.v.addWaypoint(new Point2d(r.nextInt((int) LogicEngine.SCREEN_WIDTH), LogicEngine.SCREEN_HEIGHT/1.5 + r.nextInt((int) LogicEngine.SCREEN_HEIGHT/5)));\r\n\t\t}\r\n\t\tship.v.addWaypoint(new Point2d(LogicEngine.SCREEN_WIDTH/2, -100));\r\n\t\t\r\n\t\tif(Difficulty.isEasy())\r\n\t\t\tship.shotHandler = new BeamShot(50);\r\n\t\telse\r\n\t\tif(Difficulty.isMedium())\r\n\t\t\tship.shotHandler = new BeamShot(40);\r\n\t\telse\r\n\t\tif(Difficulty.isHard())\r\n\t\t\tship.shotHandler = new BeamShot(30);\r\n\t\t\r\n\t\tCustomBehaviourStep b = new CustomBehaviourStep(followPathBehaviour);\r\n\t\tship.stepHandlers.add(b);\r\n\t\t\r\n\t\t//destroy ships that get too close\r\n\t\tHitpointShipCollision hps = new HitpointShipCollision(ship, 10, 32);\r\n\t\thps.setSimpleExplosion();\r\n\t\t\r\n\t\tship.collisionHandler = hps; \r\n\t\t\r\n\t\tin_logicEngine.objectsEnemies.add(ship);\t\r\n\t\r\n\t}",
"private TargetInformation findHighGoal(Mat image) {\r\n\t\tTargetInformation ret = new TargetInformation();\r\n\t\tret.targetingPeg = false;\r\n\t\t\r\n long[] xsums = sums(image, true);\r\n long[] ysums = sums(image, false);\r\n \r\n\t List<PeakLoc> xpeaks = findPeaks(xsums, 10);\r\n\t List<PeakLoc> ypeaks = findPeaks(ysums, 10);\r\n\r\n\t if (ypeaks.size() == 2 && xpeaks.size() > 0) {\r\n\t \tret.targetFound = true;\r\n\t \tret.x = (xpeaks.get(0).getStop() - xpeaks.get(0).getStart()) / 2;\r\n\t \tret.gap = ypeaks.get(1).getStart() - ypeaks.get(0).getStop();\r\n\t \tret.width = xpeaks.get(0).getStop() - xpeaks.get(0).getStart();\r\n\t \tret.height = ypeaks.get(1).getStop() - ypeaks.get(0).getStart();\r\n\t \tret.y = (ypeaks.get(0).getStop() + ypeaks.get(1).getStart())/2;\r\n\t \t\r\n\t \tdouble pixelsPerInch = ret.gap / highGoalGapInches;\r\n\t \tif (xpeaks.get(0).isTruePeak() && xpeaks.get(1).isTruePeak())\r\n\t \t{\r\n\t \t\tpixelsPerInch = (pixelsPerInch + ret.width / highGoalWidthInches) / 2;\r\n\t \t}\r\n\t \tif (ypeaks.get(0).isTruePeak())\r\n\t \t{\r\n\t \t\tif (xpeaks.get(0).isTruePeak() && xpeaks.get(1).isTruePeak())\r\n\t \t\t{\r\n\t \t\t\tpixelsPerInch = (pixelsPerInch * 2 + ret.width / highGoalHeightInches) / 3;\r\n\t \t\t}\r\n\t \t\telse\r\n\t \t\t{\r\n\t \t\t\tpixelsPerInch = (pixelsPerInch + ret.width / highGoalHeightInches) / 2;\r\n\t \t\t}\r\n\t \t} \t\r\n\t \t\r\n\t \tret.aimX = ret.x + (cameraOffsetInches - shooterOffsetInches) * pixelsPerInch;\r\n\t \t\r\n\t \tret.correctionAngle = (double)((ret.aimX - image.cols() / 2)) / pixelsPerXDegree;\r\n\t }\r\n\t else\r\n\t {\r\n\t \tret.targetFound = false;\r\n\t }\r\n\t \r\n\t return ret;\r\n\t}",
"public GameObject spawnBigBeamer(LogicEngine in_logicEngine) {\n\t\tGameObject ship = new GameObject(\"data/\"+GameRenderer.dpiFolder+\"/bigbeamer.png\",((float)LogicEngine.SCREEN_WIDTH/2),LogicEngine.SCREEN_HEIGHT+64,0);\r\n\t\tship.i_animationFrameSizeHeight = 115;\r\n\t\tship.i_animationFrameSizeWidth = 115;\r\n\t\t\r\n\t\t\r\n\t\tship.stepHandlers.add(new FlyStraightStep(new Vector2d(0,-1f)));\r\n\t\t\r\n\t\r\n\t\tship.v.setMaxForce(2.5f);\r\n\t\tship.v.setMaxVel(2.5f);\r\n\t\tship.allegiance = GameObject.ALLEGIANCES.ENEMIES;\r\n\t\t\r\n\t\tint i_shootEvery = 80;\r\n\t\t\r\n\t\tBeamShot b = new BeamShot(i_shootEvery);\r\n\t\t\r\n\t\tb.b_flare=false;\r\n\t\tb.f_offsetX=-40;\r\n\t\tb.f_offsetY=-30;\r\n\t\tb.i_delay = 40;\r\n\t\tb.i_beamWidth = 15;\r\n\t\t\r\n\t\tBeamShot b2 = new BeamShot(i_shootEvery);\r\n\t\tb2.b_flare=false;\r\n\t\tb2.f_offsetX=40;\r\n\t\tb2.f_offsetY=-30;\r\n\t\tb2.i_delay = 40+(i_shootEvery/2);\r\n\t\tb2.i_beamWidth = 15;\r\n\t\tb.nextBeam = b2;\r\n\t\t\r\n\t\tship.shootEverySteps=1;\r\n\t\tship.shotHandler = b;\r\n\t\t\r\n\t\tHitpointShipCollision c = new HitpointShipCollision(ship, 100, 50f);\r\n\t\t\r\n\t\tif(!Difficulty.isHard())\r\n\t\t\tc.f_numberOfHitpoints = 200;\r\n\t\tif(!Difficulty.isMedium())\r\n\t\t\tc.f_numberOfHitpoints = 160;\r\n\t\t\r\n\t\tc.setExplosion(Utils.getBossExplosion(ship));\r\n\t\tship.collisionHandler = c;\r\n\t\t\r\n\t\tin_logicEngine.objectsEnemies.add(ship);\r\n\t\t\r\n\t\treturn ship;\r\n\t}",
"Optional<UUID> getShooter(UUID projectile);",
"public Pile getExhaustPile(){\n return piles.getExhaustPile();\n }",
"public static void render(Graphics g, Tile tile, Point pxCenterPoint, float value) {\n Point topLeft = new Point(pxCenterPoint.x - (tile.getImage().getWidth() / 2), pxCenterPoint.y - (tile.getImage().getHeight() / 2));\n if (value >= 0) {\n\n\n if (tile.getType() == \"Mountain\") {\n\n g.drawImage(GraphicAssets.col, topLeft.x, topLeft.y + 19 + 21, 60, tile.getImageHeight() / 2, null);\n g.drawImage(GraphicAssets.base, topLeft.x, topLeft.y + 19 + 19 + tile.getImageHeight() / 2, 60, 19, null);\n g.drawImage(tile.getImage(), topLeft.x, topLeft.y, tile.getImage().getWidth(), tile.getImage().getHeight(), null);\n\n } else if (tile.getType() == \"Water\" || tile.getType() == \"Grass\" || tile.getType() == \"Running\") {\n //\n //System.out.println(topLeft.y);\n g.drawImage(GraphicAssets.col, topLeft.x, topLeft.y + 10 + 19, 60, tile.getImageHeight() / 2, null);\n g.drawImage(GraphicAssets.base, topLeft.x, topLeft.y + 10 + 19 + tile.getImageHeight() / 2, 60, 19, null);\n g.drawImage(tile.getImage(), topLeft.x, topLeft.y + 10, tile.getImage().getWidth(), tile.getImage().getHeight(), null);\n } else {\n g.drawImage(GraphicAssets.col, topLeft.x, topLeft.y + 10 + 19, 60, tile.getImageHeight() / 2, null);\n g.drawImage(GraphicAssets.base, topLeft.x, topLeft.y + 10 + 19 + tile.getImageHeight() / 2, 60, 19, null);\n g.drawImage(tile.getImage(), topLeft.x, topLeft.y + 10, tile.getImage().getWidth(), tile.getImage().getHeight(), null);\n }\n if (tile.hasAreaEffect()) {\n areaEffectRenderer.render(g, tile.getAreaEffect(), topLeft);\n }\n\n if (tile.hasItem()) {\n for (Item item : tile.getItems()) {\n itemRenderer.render(g, item, topLeft);\n }\n }\n }\n }",
"public int getArmorPoint ()\r\n {\r\n return armorPoint;\r\n }",
"@Override\n public void teleopPeriodic() {\n \n boolean targetFound = false; \n int Xpos = -1; int Ypos = -1; int Height = -1; int Width = -1; Double objDist = -1.0; double []objAng = {-1.0,-1.0};\n\n //Getting the number of blocks found\n int blockCount = pixy.getCCC().getBlocks(false, Pixy2CCC.CCC_SIG1, 25);\n\t\tSystem.out.println(\"Found \" + blockCount + \" blocks!\"); // Reports number of blocks found\n\t\tif (blockCount <= 0) {\n System.err.println(\"No blocks found\");\n }\n ArrayList <Block> blocks = pixy.getCCC().getBlocks();\n Block largestBlock = null;\n\n //verifies the largest block and store it in largestBlock\n for (Block block:blocks){\n if (block.getSignature() == Pixy2CCC.CCC_SIG1) {\n\n\t\t\t\tif (largestBlock == null) {\n\t\t\t\t\tlargestBlock = block;\n\t\t\t\t} else if (block.getWidth() > largestBlock.getWidth()) {\n\t\t\t\t\tlargestBlock = block;\n }\n\t\t\t}\n }\n //loop\n while (pixy.getCCC().getBlocks(false, Pixy2CCC.CCC_SIG1, 25)>=0 && ButtonLB){\n\n if (largestBlock != null){\n targetFound = true; \n Xpos = largestBlock.getX();\n Ypos = largestBlock.getY();\n Height = largestBlock.getHeight();\n Width = largestBlock.getWidth();\n\n objDist = RobotMap.calculateDist((double)Height, (double)Width, (double)Xpos, (double)Ypos);\n objAng = RobotMap.calculateAngle(objDist, Xpos, Ypos);\n \n }\n //print out values to Dashboard\n SmartDashboard.putBoolean(\"Target found\", targetFound);\n SmartDashboard.putNumber (\"Object_X\", Xpos);\n SmartDashboard.putNumber (\"Object_Y\", Ypos);\n SmartDashboard.putNumber (\"Height\", Height);\n SmartDashboard.putNumber(\"Width\", Width);\n SmartDashboard.putNumber (\"Distance\", objDist);\n SmartDashboard.putNumber(\"X Angle\", objAng[0]);\n SmartDashboard.putNumber(\"Y Angle\", objAng[1]);\n }\n }",
"@Override\r\n\tpublic Projectile getProjectile(int yield) {\r\n\t\treturn new BazookaProjectile(getWorm(), yield);\r\n\t}",
"public static void main(String[] args) {\n MeepMeep mm = new MeepMeep(800)\n // Set field image\n .setBackground(MeepMeep.Background.FIELD_ULTIMATE_GOAL_DARK)\n // Set theme\n .setTheme(new ColorSchemeRedDark())\n // Background opacity from 0-1\n .setBackgroundAlpha(1f)\n // Set constraints: maxVel, maxAccel, maxAngVel, maxAngAccel, track width\n .setConstraints(99, 30, Math.toRadians(37.74), Math.toRadians(60), 37)\n .followTrajectorySequence(drive ->\n drive.trajectorySequenceBuilder(new Pose2d(-60, 48, 0))\n .lineTo(new Vector2d(56, 48))\n .addTemporalMarker(15.0,() -> {\n // do stuff\n })\n// .lineToConstantHeading(new Vector2d(56, 48))\n //drop wobble\n// .lineToConstantHeading(new Vector2d(56, 19))\n .addDisplacementMarker(() -> {\n // drop wobble goal\n //return Unit.INSTANCE;\n })\n .waitSeconds(1.5)\n // Get to wobble goal\n .lineToSplineHeading(new Pose2d(-12, 19, Math.toRadians(0)))\n // slowly approach wobble goal\n .lineTo(new Vector2d(-27, 19), new TranslationalVelocityConstraint(5))\n // grab wobble goal\n .addDisplacementMarker(() -> {\n // grab wobble goal\n //return Unit.INSTANCE;\n })\n .waitSeconds(2.0)\n .strafeTo(new Vector2d(56, 19))\n .lineToLinearHeading(new Pose2d(56, 36, Math.toRadians(-90)))\n .addDisplacementMarker(() -> {\n // drop wobble goal\n //return Unit.INSTANCE;\n })\n .strafeTo(new Vector2d(56, 30))\n .strafeTo(new Vector2d(12, 30))\n .waitSeconds(1.0)\n .build()\n )\n .start();\n\n/*\n\n .lineTo(new Vector2d(12, 48))\n .splineToConstantHeading(new Vector2d(12, 19), Math.toRadians(0))\n .splineToConstantHeading(new Vector2d(-18, 19), Math.toRadians(0))\n .lineTo(\n new Vector2d(-27, 19)\n// SampleMecanumDrive.getVelocityConstraint(slowerVelocity, DriveConstants.MAX_ANG_VEL, DriveConstants.TRACK_WIDTH),\n// SampleMecanumDrive.getAccelerationConstraint(DriveConstants.MAX_ACCEL)\n )\n .splineToConstantHeading(new Vector2d(12, 19), Math.toRadians(0))\n .splineToLinearHeading(new Pose2d(12, 36, Math.toRadians(-90)), Math.toRadians(0))\n .start()\n */\n }",
"public ParticleMesh getMissileTrail() {\r\n for (int x = 0, tSize = missileTrails.size(); x < tSize; x++) {\r\n ParticleMesh e = missileTrails.get(x);\r\n if (!e.isActive()) {\r\n e.getParticleController().setRepeatType(Controller.RT_WRAP);\r\n e.forceRespawn();\r\n return e;\r\n }\r\n }\r\n return createMissileTrail();\r\n }",
"private void calculateLocation()\r\n\t{\r\n\t\tdouble leftAngleSpeed \t= this.angleMeasurementLeft.getAngleSum() / ((double)this.angleMeasurementLeft.getDeltaT()/1000); //degree/seconds\r\n\t\tdouble rightAngleSpeed \t= this.angleMeasurementRight.getAngleSum() / ((double)this.angleMeasurementRight.getDeltaT()/1000); //degree/seconds\r\n\r\n\t\tdouble vLeft\t= (leftAngleSpeed * Math.PI * LEFT_WHEEL_RADIUS ) / 180 ; //velocity of left wheel in m/s\r\n\t\tdouble vRight\t= (rightAngleSpeed * Math.PI * RIGHT_WHEEL_RADIUS) / 180 ; //velocity of right wheel in m/s\t\t\r\n\t\tdouble w \t\t= (vRight - vLeft) / WHEEL_DISTANCE; //angular velocity of robot in rad/s\r\n\t\t\r\n\t\tDouble R \t= new Double(( WHEEL_DISTANCE / 2 ) * ( (vLeft + vRight) / (vRight - vLeft) ));\t\t\t\t\t\t\t\t\r\n\t\t\r\n\t\tdouble ICCx = 0;\r\n\t\tdouble ICCy = 0;\r\n\r\n\t\tdouble W_xResult \t\t= 0;\r\n\t\tdouble W_yResult \t\t= 0;\r\n\t\tdouble W_angleResult \t= 0;\r\n\t\t\r\n\t\tdouble E_xResult \t\t= 0;\r\n\t\tdouble E_yResult \t\t= 0;\r\n\t\tdouble E_angleResult \t= 0;\r\n\t\t\r\n\t\t//short axe = 0;\r\n\t\t\r\n\t\tdouble deltaT = ((double)this.angleMeasurementLeft.getDeltaT())/1000;\r\n\t\t\r\n\t\t// Odometry calculations\r\n\t\tif (R.isNaN()) \t\t\t\t//robot don't move\r\n\t\t{\r\n\t\t\tW_xResult\t\t= this.pose.getX();\r\n\t\t\tW_yResult\t\t= this.pose.getY();\r\n\t\t\tW_angleResult \t= this.pose.getHeading();\r\n\t\t} \r\n\t\telse if (R.isInfinite()) \t//robot moves straight forward/backward, vLeft==vRight\r\n\t\t{ \r\n\t\t\tW_xResult\t\t= this.pose.getX() + vLeft * Math.cos(this.pose.getHeading()) * deltaT;\r\n\t\t\tW_yResult\t\t= this.pose.getY() + vLeft * Math.sin(this.pose.getHeading()) * deltaT;\r\n\t\t\tW_angleResult \t= this.pose.getHeading();\r\n\t\t} \r\n\t\telse \r\n\t\t{\t\t\t\r\n\t\t\tICCx = this.pose.getX() - R.doubleValue() * Math.sin(this.pose.getHeading());\r\n\t\t\tICCy = this.pose.getY() + R.doubleValue() * Math.cos(this.pose.getHeading());\r\n\t\t\r\n\t\t\tW_xResult \t\t= Math.cos(w * deltaT) * (this.pose.getX()-ICCx) - Math.sin(w * deltaT) * (this.pose.getY() - ICCy) + ICCx;\r\n\t\t\tW_yResult \t\t= Math.sin(w * deltaT) * (this.pose.getX()-ICCx) + Math.cos(w * deltaT) * (this.pose.getY() - ICCy) + ICCy;\r\n\t\t\tW_angleResult \t= this.pose.getHeading() + w * deltaT;\r\n\t\t}\r\n\t\t\r\n\t\tthis.pose.setLocation((float)W_xResult, (float)W_yResult);\r\n\t\tthis.pose.setHeading((float)W_angleResult);\r\n\t\t\r\n\t\t// Conversion to grads\r\n\t\tW_angleResult = W_angleResult/Math.PI*180;\r\n\t\t\r\n\t\t// Get the heading axe\r\n\t\t//axe = getHeadingAxe();\r\n\t\tgetHeadingAxe();\r\n\t\t\r\n\t\t// Verify the coordinates and the heading angle\r\n\t\tif (Po_Corn == 1)\r\n\t\t{\r\n\t\t\tswitch (Po_CORNER_ID)\r\n\t\t\t{\r\n\t\t\t\tcase 0:\r\n\t\t\t\t\tE_xResult = 0;\r\n\t\t\t\t\tE_yResult = 0;\r\n\t\t\t\t\tPo_ExpAng = 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\tE_xResult = 1.8;\r\n\t\t\t\t\tE_yResult = 0.11;\r\n\t\t\t\t\tPo_ExpAng = 90;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tE_xResult = 1.6;\r\n\t\t\t\t\tE_yResult = 0.6;\r\n\t\t\t\t\tPo_ExpAng = 180;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\tE_xResult = 1.5;\r\n\t\t\t\t\tE_yResult = 0.45;\r\n\t\t\t\t\tPo_ExpAng = 270;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r\n\t\t\t\t\tE_xResult = 1.5;\r\n\t\t\t\t\tE_yResult = 0.3;\r\n\t\t\t\t\tPo_ExpAng = 180;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 5:\r\n\t\t\t\t\tE_xResult = 0.3;\r\n\t\t\t\t\tE_yResult = 0.3;\r\n\t\t\t\t\tPo_ExpAng = 90;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 6:\r\n\t\t\t\t\tE_xResult = 0.3;\r\n\t\t\t\t\tE_yResult = 0.6;\r\n\t\t\t\t\tPo_ExpAng = 180;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 7:\r\n\t\t\t\t\tE_xResult = 0;\r\n\t\t\t\t\tE_yResult = 0.6;\r\n\t\t\t\t\tPo_ExpAng = 270;\r\n\t\t\t\t\tbreak;\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tE_angleResult = W_angleResult;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tint block = 0;\r\n\t\t\t// white = 0, black = 2, grey = 1\r\n\t\t\tif ((lineSensorLeft == 0) && (lineSensorRight == 0) && (block == 0)) \t// Robot moves on the black line\r\n\t\t\t{\r\n\t\t\t\tswitch (Po_CORNER_ID)\t\t\t\t\t\t\t\t// Even numbers - x, Odd numbers - y\r\n\t\t\t\t{\r\n\t\t\t\tcase 0: \r\n\t\t\t\t\tif (this.pose.getX() < 1.6)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_yResult = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = W_angleResult;\r\n\t\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 1: \r\n\t\t\t\t\tif (this.pose.getY() < 0.4)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_xResult = 1.8;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = W_angleResult; \r\n\t\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tif (this.pose.getX() > 1.65)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_yResult = 0.6;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = W_angleResult;\r\n\t\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\tif (this.pose.getY() > 0.4)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_xResult = 1.5; \r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = W_angleResult; \r\n\t\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 4: \r\n\t\t\t\t\tif (this.pose.getX() > 0.4)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_yResult = 0.3;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = W_angleResult;\r\n\t\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 5:\r\n\t\t\t\t\tif (this.pose.getY() < 0.5)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_xResult = 0.3;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = W_angleResult; \r\n\t\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 6: \r\n\t\t\t\t\tif (this.pose.getX() > 0.1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_yResult = 0.6;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = W_angleResult;\r\n\t\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 7:\r\n\t\t\t\t\tif (this.pose.getY() > 0.1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_xResult = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = W_angleResult; \r\n\t\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tdefault: \r\n\t\t\t\t\tE_angleResult = W_angleResult;\r\n\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if(((lineSensorLeft == 0) && (lineSensorRight == 2)) || ((lineSensorLeft == 2) && (lineSensorRight == 0)))\r\n\t\t\t{\r\n\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\r\n\t \tif (W_angleResult >= TRSH_W)\r\n\t \t{\r\n\t \t\tE_angleResult = TRSH_W;\r\n\t \t}\r\n\t \telse if (W_angleResult >= (360 - TRSH_W))\r\n\t \t{\r\n\t \t\tE_angleResult = 360 - TRSH_W;\r\n\t \t}\r\n\t \telse\r\n\t \t{\r\n\t \t\tE_angleResult = W_angleResult;\r\n\t \t}\r\n\t \t\r\n\t \t// test\r\n\t \tE_angleResult = W_angleResult;\r\n\t\t\t}\r\n\t\t\telse if(((lineSensorLeft == 0) && (lineSensorRight == 1)) || ((lineSensorLeft == 1) && (lineSensorRight == 0)))\r\n\t\t\t{\r\n\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\r\n\t \tif (W_angleResult >= TRSH_G)\r\n\t \t{\r\n\t \t\tE_angleResult = TRSH_G;\r\n\t \t}\r\n\t \telse if (W_angleResult >= (360 - TRSH_G))\r\n\t \t{\r\n\t \t\tE_angleResult = 360 - TRSH_G;\r\n\t \t}\r\n\t \telse\r\n\t \t{\r\n\t \t\tE_angleResult = W_angleResult;\r\n\t \t}\r\n\t \t\r\n\t \t// test\r\n\t \tE_angleResult = W_angleResult;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\tE_angleResult = W_angleResult;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tLCD.drawString(\"AngRs: \" + (E_angleResult), 0, 7);\r\n\t\t\r\n\t\t// Conversion to rads\r\n\t\tW_angleResult = W_angleResult*Math.PI/180;\r\n\t\tE_angleResult = E_angleResult*Math.PI/180;\r\n\t\t\r\n\t\tif ((Po_CORNER_ID == 3) && (100*this.pose.getY() < 45))\r\n\t\t{\r\n\t\t\tE_angleResult = 3*Math.PI/180;;\r\n\t\t}\r\n\t\t\r\n\t\tthis.pose.setLocation((float)E_xResult, (float)E_yResult);\r\n\t\tthis.pose.setHeading((float)E_angleResult);\r\n\t\t\r\n\t\t/*\r\n\t\t// Integration deviation correction\r\n\t\tthis.pose.setLocation((float)(W_xResult), (float)(W_yResult + (0.01*22.4)/175));\r\n\t\tthis.pose.setHeading((float)((W_angleResult + 14/175)*Math.PI/180));\r\n\t\t*/\r\n\t}",
"public Pile getHandPile(){\n return piles.getHandPile();\n }",
"public Result call()\n {\n HashMap<RotamerPair,Double> tempMap = new HashMap<>();\n for ( Map.Entry<Rotamer,Rotamer> entry : work.entries() )\n {\n Rotamer rotamer1 = entry.getKey();\n Rotamer rotamer2 = entry.getValue();\n RotamerPair pair = new RotamerPair(rotamer1, rotamer2);\n if ( incompatiblePairs.contains(pair) )\n continue;\n \n //Atom extraAtom1 = null;\n //if ( rotamer1.description.indexOf(\"proline\") == -1 )\n // extraAtom1 = peptide.sequence.get(rotamer1.sequenceIndex).HN;\n \n //Atom extraAtom2 = null;\n //if ( rotamer2.description.indexOf(\"proline\") == -1 )\n // extraAtom2 = peptide.sequence.get(rotamer2.sequenceIndex).HN;\n \n //double energy = OPLScalculator.getInteractionEnergy(rotamer1, extraAtom1, rotamer2, extraAtom2);\n double energy = OPLScalculator.getInteractionEnergy(rotamer1, null, rotamer2, null);\n tempMap.put(pair,energy);\n }\n map.putAll(tempMap);\n return null;\n }",
"protected void calculatePathfindingGrid(Tile[] tiles) {\n \n if(tiles == null) {\n return;\n }\n \n /**\n * Problem:\n * Because the tile size used by the path finding engine will most likely be\n * different from that of the visual effect size, we have to\n * look at all the visual tiles and judge whether they are blocking of\n * particular kinds of unit.\n * \n * Algorithm:\n * For land, air and sea take a look at the number of blocking/non-blocking\n * tiles there are and if there is over 50% either way then that will be the\n * PathTiles result.\n */\n \n // First get the size of the map in PathTile(s)\n int rows = getActualHeightInTiles();\n int cols = getActualWidthInTiles();\n \n // Calculate the number of tiles to a PathTile\n int tilesPerActualTilesX = getActualTileWidth() / getTileWidth();\n int tilesPerActualTilesY = getActualTileHeight() / getTileHeight();\n int tileCount = tilesPerActualTilesX * tilesPerActualTilesY;\n \n int tileCols = getWidthInTiles();\n \n // Create an array\n mPathTiles = new PathTile[ rows * cols ];\n \n // Iterate through these tiles\n for(int x = 0; x < cols ; x++) {\n for(int y = 0; y < rows; y++) {\n \n // Setup some variables\n int blockSea, blockAir, blockLand;\n blockAir = blockLand = blockSea = 0;\n \n // Figure out the percentage of each block\n for(int tx = 0; tx < tilesPerActualTilesX; tx++) {\n for(int ty = 0; ty < tilesPerActualTilesY; ty++) {\n \n int tileX = (x * tilesPerActualTilesX) + tx;\n int tileY = (y * tilesPerActualTilesY) + ty;\n \n Tile thisTile = tiles[ (tileY * tileCols) + tileX ];\n \n if(thisTile.blockAir()) {\n blockAir++;\n }\n \n if(thisTile.blockLand()) {\n blockLand++;\n }\n \n if(thisTile.blockSea()) {\n blockSea++;\n }\n \n }\n }\n \n // Calculate percentage\n float a,b,c;\n a = (float)blockAir / (float)tileCount;\n b = (float)blockLand / (float)tileCount;\n c = (float)blockSea / (float)tileCount;\n \n // Set the new tile\n mPathTiles[ (y * cols) + x ] = new PathTile( (a >= .5f), (b >= .5f), (c >= .5f) );\n \n // System.out.println(\"Grid \" + ((y * cols) + x) + \" (\" + x + \", \" + y + \") Air: \" + a + \" Land: \" + b + \" Sea: \" + c);\n \n }\n }\n \n }",
"public interface AI {\n\n /**\n * Sets the new enemy position.\n * @param pos the new enemy position\n */\n void setEnemyPos(Point2D pos);\n\n /**\n * Returns the new position for the enemy to\n * move to.\n * @param target the position that wants to be tracked\n * @param pursuit the state in which the enemy is in\n * @param map\n * @return the position to move to\n */\n Point2D getNextMove(Point2D target, boolean pursuit, Set<Point2D> map);\n\n /**\n * Returns the new enemy rotation based on the\n * state in which the enemy is in.\n * @param target the position that wants to be tracked\n * @param pursuit the state in which the enemy is in\n * @return the angle that the enemy should face\n */\n double getRotation(Point2D target, boolean pursuit);\n\n /**\n * Returns if the enemy is in pursuit of the target\n * by calculating if the noise radius overlap with the\n * two.\n * @param target the position that wants to be tracked\n * @param noise the radius of the noise made by a player action\n * @return the state in which the enemy will be in\n * @see Player\n */\n boolean isInPursuit(Point2D target, double noise);\n\n /**\n * Returns if the enemy has the {@code target} in line of\n * sight and is close enough to get the enemy attention\n * to shoot.\n * @param target the position that wants to be tracked\n * @return the action that should be performed by the enemy\n */\n boolean isShooting(Point2D target);\n\n /**\n * Returns the collection of all position to check\n * if target is obscured by a wall used to JUnit\n * tests purpose.\n * @return the collections of all wall objects position\n */\n Set<Point2D> getWallSet();\n\n}",
"public double smilePos(){\r\n\r\n\t\treturn smile.getY();\r\n\r\n\t}",
"public String getMissile() {\n return\n \" BB \\n\" +\n \" BB \\n\" +\n \" BB \\n\" +\n \" BB \\n\" +\n \" BB \\n\" +\n \" BB \\n\" +\n \" BBBB \\n\" +\n \" BBBBBB \\n\" +\n \" BB BB \\n\" +\n \" BB BB \\n\" +\n \" B B \\n\";\n\n }",
"public FloorTile getGoalTile() {\r\n return goalTile;\r\n }",
"protected void execute() {\n \n \t\n \t \n \t\n \n System.out.println((Timer.getFPGATimestamp()- starttime ) + \",\" + (RobotMap.motorLeftTwo.getEncPosition()) + \",\"\n + (RobotMap.motorLeftTwo.getEncVelocity()*600)/-4096 + \",\" + RobotMap.motorRightTwo.getEncPosition() + \",\" + (RobotMap.motorRightTwo.getEncVelocity()*600)/4096);\n \n /*if(endpoint > 0){\n cruiseVelocityLeft = (float) (this.initCruiseVelocityLeft+ angleorientation.getResult());\n cruiseVelocityRight = (float) (this.initCruiseVelocityRight - angleorientation.getResult());\n }\n if(endpoint <= 0){\n cruiseVelocityLeft = (float) (this.initCruiseVelocityLeft- angleorientation.getResult());\n cruiseVelocityRight = (float) (this.initCruiseVelocityRight + angleorientation.getResult());\n }*/\n System.out.println(this.motionMagicEndPoint*4096 + RobotMap.motorLeftTwo.getEncPosition() + \"l\");\n System.out.println(this.motionMagicEndPoint*4096 - RobotMap.motorRightTwo.getEncPosition() + \"r\");\n \n \n \t if(RobotMap.motorLeftTwo.getEncVelocity()!= velocityLeft)\n velocityLeft = RobotMap.motorLeftTwo.getEncVelocity(); \n velocityRight = RobotMap.motorRightTwo.getEncVelocity();\n SmartDashboard.putNumber(\"LeftWheelError\", (this.motionMagicEndPoint*4096 + RobotMap.motorLeftTwo.getEncPosition()));\n SmartDashboard.putNumber(\"RightWheelError\",(this.motionMagicEndPoint*4096 - RobotMap.motorRightTwo.getEncPosition()));\n SmartDashboard.putNumber(\"LeftWheelVelocity\", (RobotMap.motorLeftTwo.getEncVelocity())*600/4096);\n SmartDashboard.putNumber(\"RightWheelVelocity\",(RobotMap.motorRightTwo.getEncVelocity()*600)/4096);\n \n \n count++;\n \tangleorientation.updatePID(RobotMap.navx.getAngle());\n }",
"public void act() \n {\n age += 1;\n \n RandomTerrain world = (RandomTerrain)getWorld();\n \n int centreX = getX();\n \n int leftX = centreX - WHEEL_BASE;\n int rightX = centreX + WHEEL_BASE;\n \n int leftY = world.getTerrainHeight(leftX) - WHEEL_RADIUS;\n int rightY = world.getTerrainHeight(rightX) - WHEEL_RADIUS;\n \n double angle = Math.atan2(rightY - leftY, WHEEL_BASE * 2);\n \n /*\n {\n int midY = (leftY + rightY) / 2;\n leftY = midY + (int)(-WHEEL_BASE * Math.sin(angle));\n rightY = midY + (int)(WHEEL_BASE * Math.sin(angle));\n }\n */\n \n exactX += velocity * Math.cos(Math.max(-Math.PI/4, Math.min(Math.PI/4, angle)));\n \n setLocation((int)exactX, (leftY + rightY) / 2);\n \n GreenfootImage img = new GreenfootImage(WHEEL_BASE * 3, WHEEL_BASE * 3);\n img.setColor(java.awt.Color.RED);\n \n int leftWheelX = (img.getWidth()/2) - WHEEL_BASE;\n int rightWheelX = (img.getWidth()/2) + WHEEL_BASE;\n int leftWheelY = leftY - getY() + (img.getHeight()/2);\n int rightWheelY = rightY - getY() + (img.getHeight()/2);\n \n drawWheel(img, leftWheelX, leftWheelY);\n drawWheel(img, rightWheelX, rightWheelY);\n \n int perpX = (int)(WHEEL_BASE * Math.cos(angle - Math.PI/2));\n int perpY = (int)(WHEEL_BASE * Math.sin(angle - Math.PI/2));\n \n int[] xs = new int[] {leftWheelX, leftWheelX + perpX, rightWheelX + perpX, rightWheelX};\n int[] ys = new int[] {leftWheelY, leftWheelY + perpY, rightWheelY + perpY, rightWheelY};\n \n img.fillPolygon(xs, ys, 4);\n \n setImage(img);\n \n if ((exactX < 0 && velocity < 0 )|| (exactX >= getWorld().getWidth() && velocity > 0))\n {\n getWorld().removeObject(this);\n }\n }",
"public XYPoint getSnakeHeadStartLocation();",
"private final Item createPileItem(Item posItem, boolean starting) {\n/* */ try {\n/* 4519 */ Item pileItem = ItemFactory.createItem(177, 60.0F, null);\n/* */ \n/* 4521 */ float newXPos = ((this.tilex << 2) + 1) + Server.rand.nextFloat() * 2.0F;\n/* 4522 */ float newYPos = ((this.tiley << 2) + 1) + Server.rand.nextFloat() * 2.0F;\n/* */ \n/* 4524 */ float height = posItem.getPosZ();\n/* 4525 */ if (Server.getSecondsUptime() > 0) {\n/* 4526 */ height = Zones.calculatePosZ(newXPos, newYPos, this, isOnSurface(), false, posItem\n/* 4527 */ .getPosZ(), null, posItem.onBridge());\n/* */ }\n/* */ \n/* */ \n/* */ \n/* 4532 */ pileItem.setPos(newXPos, newYPos, height, posItem\n/* 4533 */ .getRotation(), posItem.getBridgeId());\n/* */ \n/* 4535 */ pileItem.setZoneId(this.zone.getId(), this.surfaced);\n/* 4536 */ int data = posItem.getTemplateId();\n/* 4537 */ pileItem.setData1(data);\n/* 4538 */ byte material = 0;\n/* 4539 */ boolean multipleMaterials = false;\n/* */ \n/* */ \n/* */ \n/* 4543 */ if (this.vitems != null)\n/* */ {\n/* 4545 */ for (Item item : this.vitems.getAllItemsAsArray()) {\n/* */ \n/* 4547 */ if (!item.isDecoration() && item.getFloorLevel() == pileItem.getFloorLevel()) {\n/* */ \n/* 4549 */ if (!starting)\n/* 4550 */ sendRemoveItem(item, false); \n/* 4551 */ if (!multipleMaterials)\n/* */ {\n/* */ \n/* */ \n/* 4555 */ if (item.getMaterial() != material)\n/* */ {\n/* 4557 */ if (material == 0) {\n/* */ \n/* */ \n/* */ \n/* 4561 */ material = item.getMaterial();\n/* */ \n/* */ \n/* */ \n/* */ }\n/* */ else {\n/* */ \n/* */ \n/* */ \n/* 4570 */ material = 0;\n/* 4571 */ multipleMaterials = true;\n/* */ } \n/* */ }\n/* */ }\n/* 4575 */ if (!item.equals(posItem))\n/* 4576 */ pileItem.insertItem(item, true); \n/* 4577 */ if (data != -1 && item.getTemplateId() != data) {\n/* */ \n/* 4579 */ pileItem.setData1(-1);\n/* 4580 */ data = -1;\n/* */ } \n/* */ } \n/* */ } \n/* */ }\n/* 4585 */ String name = pileItem.getName();\n/* 4586 */ String modelname = pileItem.getModelName();\n/* 4587 */ if (data != -1) {\n/* */ \n/* 4589 */ ItemTemplate template = ItemTemplateFactory.getInstance().getTemplate(data);\n/* 4590 */ String tname = template.getName();\n/* 4591 */ name = \"Pile of \" + template.sizeString + tname;\n/* 4592 */ if (material == 0) {\n/* 4593 */ pileItem.setMaterial(template.getMaterial());\n/* */ } else {\n/* 4595 */ pileItem.setMaterial(material);\n/* 4596 */ } StringBuilder build = new StringBuilder();\n/* 4597 */ build.append(pileItem.getTemplate().getModelName());\n/* 4598 */ build.append(tname);\n/* 4599 */ build.append(\".\");\n/* 4600 */ build.append(MaterialUtilities.getMaterialString(material));\n/* 4601 */ modelname = build.toString().replaceAll(\" \", \"\").trim();\n/* 4602 */ pileItem.setName(name);\n/* */ } \n/* */ \n/* */ \n/* 4606 */ if (!starting && this.watchers != null)\n/* */ {\n/* 4608 */ for (VirtualZone vz : getWatchers()) {\n/* */ \n/* */ \n/* */ try {\n/* 4612 */ if (vz.isVisible(pileItem, this)) {\n/* */ \n/* 4614 */ boolean onGroundLevel = true;\n/* 4615 */ if (pileItem.getFloorLevel() > 0) {\n/* 4616 */ onGroundLevel = false;\n/* */ \n/* */ }\n/* 4619 */ else if ((getFloors(0, 0)).length > 0) {\n/* 4620 */ onGroundLevel = false;\n/* */ } \n/* 4622 */ vz.addItem(pileItem, this, onGroundLevel);\n/* 4623 */ if (data != -1) {\n/* 4624 */ vz.renameItem(pileItem, name, modelname);\n/* */ }\n/* */ } \n/* 4627 */ } catch (Exception e) {\n/* */ \n/* 4629 */ logger.log(Level.WARNING, e.getMessage(), e);\n/* */ } \n/* */ } \n/* */ }\n/* 4633 */ return pileItem;\n/* */ }\n/* 4635 */ catch (FailedException fe) {\n/* */ \n/* 4637 */ logger.log(Level.WARNING, fe.getMessage(), (Throwable)fe);\n/* */ }\n/* 4639 */ catch (NoSuchTemplateException nst) {\n/* */ \n/* 4641 */ logger.log(Level.WARNING, nst.getMessage(), (Throwable)nst);\n/* */ } \n/* 4643 */ return null;\n/* */ }",
"public void getGSpeedAfterJumpLand() {\n if(jumpState == JumpState.STATE_JUMP_DOWN && angle < 45) {\n groundSpeed = xSpeed;\n }\n else if(jumpState == JumpState.STATE_JUMP_DOWN && angle == 45) {\n if(Math.abs(xSpeed) > ySpeed) {\n groundSpeed = xSpeed; \n }\n else {\n groundSpeed = ySpeed*0.5*-Math.signum(Math.sin(angle));\n } \n } \n jumpState = JumpState.STATE_NOJUMP;\n springState = SpringState.STATE_NOSPRING;\n }",
"protected long getAvailableData_EM() {\n long result = 0;\n IGregTechTileEntity baseMetaTileEntity = getBaseMetaTileEntity();\n Vec3Impl pos = new Vec3Impl(baseMetaTileEntity.getXCoord(), baseMetaTileEntity.getYCoord(), baseMetaTileEntity.getZCoord());\n for (GT_MetaTileEntity_Hatch_InputData in : eInputData) {\n if (in.q != null) {\n Long value = in.q.contentIfNotInTrace(pos);\n if (value != null) {\n result += value;\n }\n }\n }\n return result;\n }",
"public static void createInfluenceMap(Spaceship predator, Spaceship prey) {\n mapWidth = Constants.screenWidth / CELL_SIZE;\n mapHeight = Constants.screenHeight / CELL_SIZE;\n influenceMap = new double[mapWidth][mapHeight];\n lowestValue = Double.MAX_VALUE;\n highestValue = -Double.MAX_VALUE;\n\n Vector2d cellCenter = new Vector2d();\n for (int y = 0; y < mapHeight; y++) {\n for (int x = 0; x < mapWidth; x++) {\n cellCenter.set(CELL_SIZE * (x + 0.5), CELL_SIZE * (y + 0.5));\n double dist = cellCenter.dist(prey.pos);\n // use exponential dropoff instead of linear dropoff\n //double value = 5 + Math.log1p(dist) * -1;\n double value = (MAX_DIST - dist)/MAX_DIST;\n influenceMap[x][y] += value;\n }\n }\n\n // go through map and establish ranges\n for (int y = 0; y < mapHeight; y++) {\n for (int x = 0; x < mapWidth; x++) {\n double value = influenceMap[x][y];\n if (value > highestValue) highestValue = value;\n if (value < lowestValue) lowestValue = value;\n }\n }\n\n }",
"private void setupEnemySpawnPoints() {\n float ring = ProtectConstants.VIEWPORT_WIDTH / 2 + (ProtectConstants.GAME_OBJECT_SIZE * 2);\n float angle = 18; // start angle\n for(int i = 1; i < ProtectConstants.COLUMNS + 1; i++){\n enemySpawnPoints.add(divideCircle(ring, angle));\n angle += 360 / ProtectConstants.COLUMNS;\n }\n enemySpawnPoints.shuffle();\n }",
"private void initiateProjectile() {\n\t}",
"public static BodyImage getWalkImage() {return walkImage;}",
"public float[] GetStartPosition(int playerId)\r\n/* 515: */ {\r\n/* 516:621 */ for (int x = 0; x < getWidthInTiles(); x++) {\r\n/* 517:623 */ for (int y = 0; y < getHeightInTiles(); y++) {\r\n/* 518:625 */ if (tilePlayerPlacable(x, y, playerId)) {\r\n/* 519:627 */ return new float[] { x, y };\r\n/* 520: */ }\r\n/* 521: */ }\r\n/* 522: */ }\r\n/* 523:631 */ return new float[] { 0.0F, 0.0F };\r\n/* 524: */ }",
"private ParticleMesh createMissileTrail() {\r\n ParticleMesh pMesh = ParticleFactory.buildParticles(\"tail\", 200,\r\n ParticleType.Quad);\r\n pMesh.setEmissionDirection(new Vector3f(1, 1, 1));\r\n pMesh.setInitialVelocity(0);\r\n pMesh.setStartSize(1f);\r\n pMesh.setEndSize(3.45f);\r\n pMesh.setMinimumLifeTime(500);\r\n pMesh.setMaximumLifeTime(500);\r\n pMesh.setStartColor(ColorRGBA.lightGray.clone());\r\n pMesh.setEndColor(ColorRGBA.black.clone());\r\n pMesh.setParticleSpinSpeed(180 * FastMath.DEG_TO_RAD);\r\n pMesh.getParticleController().setControlFlow(true);\r\n// pMesh.setReleaseRate(500);\r\n pMesh.forceRespawn();\r\n \r\n pMesh.setModelBound(new BoundingBox());\r\n pMesh.updateModelBound();\r\n pMesh.setCullHint(Spatial.CullHint.Never);\r\n\r\n // removes the missile from the scene after the particle trail has died\r\n pMesh.getParticleController().addListener(new OnDeadListener());\r\n pMesh.setRenderState(ts);\r\n pMesh.setRenderState(bs);\r\n pMesh.setRenderState(zs);\r\n \r\n missileTrails.add(pMesh);\r\n \r\n return pMesh;\r\n }",
"private void setup()\n {\n // TO STUDENTS: Add, revise, or remove methods as needed to define your own game's world\n //addLeftGround();\n //addFences();\n //addMetalPlateSteps();\n addClouds();\n addEnemy();\n addCoin();\n //addRightGround();\n // add a metal plate\n for(int i=0; i<=3; i+=1)\n {\n //location\n int x = 10 * TILE_SIZE + HALF_TILE_SIZE;\n int y = HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=3; i+=1)\n {\n //location\n int x = 11 * TILE_SIZE + HALF_TILE_SIZE;\n int y = HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=4; i+=1)\n {\n //location\n int x = 10 * TILE_SIZE + HALF_TILE_SIZE;\n int y = 10 * TILE_SIZE + HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=4; i+=1)\n {\n //location\n int x = 11 * TILE_SIZE + HALF_TILE_SIZE;\n int y = 10 * TILE_SIZE + HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=1; i+=1)\n {\n //location\n int x = 17 * TILE_SIZE + HALF_TILE_SIZE;\n int y = HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=1; i+=1)\n {\n //location\n int x = 18 * TILE_SIZE + HALF_TILE_SIZE;\n int y = HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=7; i+=1)\n {\n //location\n int x = 17 * TILE_SIZE + HALF_TILE_SIZE;\n int y = 7 * TILE_SIZE + HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=7; i+=1)\n {\n //location\n int x = 18 * TILE_SIZE + HALF_TILE_SIZE;\n int y = 7 * TILE_SIZE + HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=3; i+=1)\n {\n //location\n int x = 24 * TILE_SIZE + HALF_TILE_SIZE;\n int y = HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=3; i+=1)\n {\n //location\n int x = 25 * TILE_SIZE + HALF_TILE_SIZE;\n int y = HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=5; i+=1)\n {\n //location\n int x = 24 * TILE_SIZE + HALF_TILE_SIZE;\n int y = 10 * TILE_SIZE + HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=5; i+=1)\n {\n //location\n int x = 25 * TILE_SIZE + HALF_TILE_SIZE;\n int y = 10 * TILE_SIZE + HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=6; i+=1)\n {\n //location\n int x = 31 * TILE_SIZE + HALF_TILE_SIZE;\n int y = HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n }\n\n // add a metal plate\n for(int i=0; i<=6; i+=1)\n {\n //location\n int x = 32 * TILE_SIZE + HALF_TILE_SIZE;\n int y = HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n }\n\n // add a metal plate\n for(int i=0; i<=1; i+=1)\n {\n //location\n int x = 31 * TILE_SIZE + HALF_TILE_SIZE;\n int y = 13 * TILE_SIZE + HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=1; i+=1)\n {\n //location\n int x = 32 * TILE_SIZE + HALF_TILE_SIZE;\n int y = 13 * TILE_SIZE + HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=1; i+=1)\n {\n //location\n int x = 42 * TILE_SIZE + HALF_TILE_SIZE;\n int y = HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=1; i+=1)\n {\n //location\n int x = 43 * TILE_SIZE + HALF_TILE_SIZE;\n int y = HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=6; i+=1)\n {\n //location\n int x = 42 * TILE_SIZE + HALF_TILE_SIZE;\n int y = 8 * TILE_SIZE + HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=6; i+=1)\n {\n //location\n int x = 43 * TILE_SIZE + HALF_TILE_SIZE;\n int y = 8 * TILE_SIZE + HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=4; i+=1)\n {\n //location\n int x = 47 * TILE_SIZE + HALF_TILE_SIZE;\n int y = HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=4; i+=1)\n {\n //location\n int x = 48 * TILE_SIZE + HALF_TILE_SIZE;\n int y = HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=5; i+=1)\n {\n //location\n int x = 47 * TILE_SIZE + HALF_TILE_SIZE;\n int y = 10 * TILE_SIZE + HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=5; i+=1)\n {\n //location\n int x = 48 * TILE_SIZE + HALF_TILE_SIZE;\n int y = 10 * TILE_SIZE + HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=2; i+=1)\n {\n //location\n int x = 52 * TILE_SIZE + HALF_TILE_SIZE;\n int y = HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=2; i+=1)\n {\n //location\n int x = 53 * TILE_SIZE + HALF_TILE_SIZE;\n int y = HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=6; i+=1)\n {\n //location\n int x = 52 * TILE_SIZE + HALF_TILE_SIZE;\n int y = 8 * TILE_SIZE + HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n // add a metal plate\n for(int i=0; i<=6; i+=1)\n {\n //location\n int x = 53 * TILE_SIZE + HALF_TILE_SIZE;\n int y = 8 * TILE_SIZE + HALF_TILE_SIZE + i * TILE_SIZE;\n\n MetalPlate plate = new MetalPlate(x,y);\n addObject(plate, x, y);\n } \n\n addHero();\n }",
"public String toString() {\n\t\treturn \"Missile Launcher dir = \" + this.getDirection();\n\t}",
"public void physics(double rate){\n\t\tfloat nextTop=0;\r\n\t\tif(getContained()==null){\r\n\t\t\tint year=Main.world.timeline.getTerra();\r\n\r\n\t\t\tgx=(int)Math.floor(x);\r\n\t\t\tgy=(int)Math.floor(y);\r\n\t\t\tif(gx<0){\r\n\t\t\t\tgx=0;\r\n\t\t\t}\r\n\t\t\tif(gy<0){\r\n\t\t\t\tgy=0;\r\n\t\t\t}\r\n\t\t\tMain.world.contacts(this);\r\n\t\t\tif(getTopObjects()>0){\r\n\t\t\t\ttop=getTopObjects();\r\n\t\t\t}else{\r\n\t\t\t\ttop=(Main.world.land.getHigh(year,gx,gy));\r\n\t\t\t}\r\n\r\n\t\t\tif(dx<pit){\r\n\t\t\t\tdx=pit;\r\n\t\t\t}\r\n\t\t\tif(dy<pit){\r\n\t\t\t\tdy=pit;\r\n\t\t\t}\r\n\t\t\tfloat mm=Main.level.getStats().getSize()-pit;\r\n\t\t\tif(dx>mm ){\r\n\t\t\t\tdx=mm;\r\n\t\t\t}\r\n\t\t\tif(dy>mm ){\r\n\t\t\t\tdy=mm;\r\n\t\t\t}\r\n\r\n\t\t\tnextTop=Main.world.land.getHigh(year,(int)Math.floor(dx), (int)Math.floor(dy));\r\n\t\t}else{\r\n\t\t\tfloat smx=getContained().boundsx;\r\n\t\t\tfloat smy=getContained().boundsy;\r\n\t\t\tfloat emx=getContained().boundex;\r\n\t\t\tfloat emy=getContained().boundey;\r\n\r\n\t\t\tif(dx<smx){\r\n\t\t\t\tdx=smx;\r\n\t\t\t}else if(dx>emx){\r\n\t\t\t\tdx=emx;\r\n\t\t\t}\r\n\r\n\t\t\tif(dy<smy){\r\n\t\t\t\tdy=smy;\r\n\t\t\t}else if(dy>emy){\r\n\t\t\t\tdy=emy;\r\n\t\t\t}\r\n\t\t\tgetContained().innerTouch(this);\r\n\t\t}\r\n\r\n\t\tint m=Main.level.getStats().getSize()-1;\r\n\t\tpz=z;\r\n\t\tz+=vz*rate;\r\n\t\tfloat hz=z-top;\r\n\t\tif(z<-2){\r\n\t\t\tz=-2;\r\n\t\t\tfallDamage();\r\n\t\t}\r\n\t\tif(hz>0){\r\n\t\t\tif(submerged()){\r\n\t\t\t\tvz-=UserData.getWaterGravity()*rate;\r\n\t\t\t\tif(vz<-1){\r\n\t\t\t\t\tvz=-1;\r\n\t\t\t\t}\r\n\t\t\t\tfloat zu=Main.world.land.getWaterHigh(gx,gy);\r\n\t\t\t\tfloat z1=zu;\r\n\t\t\t\tfloat z2=zu;\r\n\t\t\t\tfloat z3=zu;\r\n\t\t\t\tfloat z4=zu;\r\n\r\n\t\t\t\tif(gx>0){\r\n\t\t\t\t\tz1=Main.world.land.getWaterHigh(gx-1,gy);\r\n\t\t\t\t}\r\n\t\t\t\tif(gx<m){\r\n\t\t\t\t\tz2=Main.world.land.getWaterHigh(gx+1,gy);\r\n\t\t\t\t}\r\n\t\t\t\tif(gy>0){\r\n\t\t\t\t\tz3=Main.world.land.getWaterHigh(gx,gy-1);\r\n\t\t\t\t}\r\n\t\t\t\tif(gy<m){\r\n\t\t\t\t\tz4=Main.world.land.getWaterHigh(gx,gy+1);\r\n\t\t\t\t}\r\n\t\t\t\tif(z1>zu){\r\n\t\t\t\t\tvx+=rate;\r\n\t\t\t\t}\r\n\t\t\t\tif(z2>zu){\r\n\t\t\t\t\tvx-=rate;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(z3>zu){\r\n\t\t\t\t\tvy+=rate;\r\n\t\t\t\t}\r\n\t\t\t\tif(z4>zu){\r\n\t\t\t\t\tvy-=rate;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tvz-=UserData.getGravity()*rate;\r\n\t\t\t}\r\n\t\t\tgrounded=false;//vz>=-0.02;\r\n\t\t}else{\r\n\t\t\tif(!grounded){\r\n\t\t\t\tgrounded=true;\r\n\t\t\t\tland();\r\n\r\n\t\t\t}\r\n\t\t\tvz=0;\r\n\t\t\tz=top;\r\n\t\t}\r\n\r\n\t\tdx+=vx*rate;\r\n\t\tdy+=vy*rate;\r\n\r\n\t\tfloat sz=nextTop-z;\r\n\t\tfloat sx=(float) (rate*(dx-x)/5f);\r\n\t\tfloat sy=(float) (rate*(dy-y)/5f);\r\n\r\n\t\tif(sz<=stepHeight && Math.abs(vx)<0.01f && Math.abs(vy)<0.01f){\r\n\t\t\tpx=x;\r\n\t\t\tpy=y;\r\n\t\t\tx+=sx;\r\n\t\t\ty+=sy;\r\n\t\t}else{\r\n\t\t\tdx=x;\r\n\t\t\tdy=y;\r\n\t\t}\r\n\t\tif(Math.abs(sx)<0.006 &&Math.abs(sy)<0.006){\r\n\t\t\tmoving=false;\r\n\t\t}else{\r\n\t\t\tmoving=true;\r\n\t\t}\r\n\t}",
"public Projectile[] fire() {\r\n /*\r\n * Hint, to get a spread, second parameter to Projectile() should\r\n * be something like (i - (NUM_CANNONS / 2)) * SPREAD\r\n */\r\n \r\n\t\tProjectile[] x = new Projectile[NUM_CANNONS];\r\n\t\tPosition p = new Position(pos.getX() + InvaderShip.SHIPS_Y / 2, pos.getY() - InvaderShip.SHIPS_X / 2);\r\n\t\tx[0] = new Projectile(p, (0 - (NUM_CANNONS / 2)) * SPREAD, -PROJECTILE_SPEED, -.01 );\r\n\t\t\r\n\t\t\r\n\t\treturn null;\r\n\t}",
"public Missile(Shooter shooter, Point2D.Double start, double speed, double direction)\n {\n this.shooter = shooter;\n this.direction = direction;\n \n location = start;\n \n velocity = new Point2D.Double(-speed*Math.sin(direction), speed*Math.cos(direction));\n }",
"public void onUsingTick(ItemStack stack, EntityLivingBase player, int count) {\n/* 108 */ List<EntityItem> stuff = EntityUtils.getEntitiesInRange(player.field_70170_p, player.field_70165_t, player.field_70163_u, player.field_70161_v, player, EntityItem.class, 10.0D);\n/* */ \n/* */ \n/* 111 */ if (stuff != null && stuff.size() > 0)\n/* */ {\n/* 113 */ for (EntityItem e : stuff) {\n/* 114 */ if (!e.field_70128_L) {\n/* */ \n/* 116 */ double d6 = e.field_70165_t - player.field_70165_t;\n/* 117 */ double d8 = e.field_70163_u - player.field_70163_u + (player.field_70131_O / 2.0F);\n/* 118 */ double d10 = e.field_70161_v - player.field_70161_v;\n/* 119 */ double d11 = MathHelper.func_76133_a(d6 * d6 + d8 * d8 + d10 * d10);\n/* 120 */ d6 /= d11;\n/* 121 */ d8 /= d11;\n/* 122 */ d10 /= d11;\n/* 123 */ double d13 = 0.3D;\n/* 124 */ e.field_70159_w -= d6 * d13;\n/* 125 */ e.field_70181_x -= d8 * d13 - 0.1D;\n/* 126 */ e.field_70179_y -= d10 * d13;\n/* 127 */ if (e.field_70159_w > 0.25D) e.field_70159_w = 0.25D; \n/* 128 */ if (e.field_70159_w < -0.25D) e.field_70159_w = -0.25D; \n/* 129 */ if (e.field_70181_x > 0.25D) e.field_70181_x = 0.25D; \n/* 130 */ if (e.field_70181_x < -0.25D) e.field_70181_x = -0.25D; \n/* 131 */ if (e.field_70179_y > 0.25D) e.field_70179_y = 0.25D; \n/* 132 */ if (e.field_70179_y < -0.25D) e.field_70179_y = -0.25D; \n/* 133 */ if (player.field_70170_p.field_72995_K) {\n/* 134 */ FXDispatcher.INSTANCE.crucibleBubble((float)e.field_70165_t + (player.field_70170_p.field_73012_v\n/* 135 */ .nextFloat() - player.field_70170_p.field_73012_v.nextFloat()) * 0.2F, (float)e.field_70163_u + e.field_70131_O + (player.field_70170_p.field_73012_v\n/* 136 */ .nextFloat() - player.field_70170_p.field_73012_v.nextFloat()) * 0.2F, (float)e.field_70161_v + (player.field_70170_p.field_73012_v\n/* 137 */ .nextFloat() - player.field_70170_p.field_73012_v.nextFloat()) * 0.2F, 0.33F, 0.33F, 1.0F);\n/* */ }\n/* */ } \n/* */ } \n/* */ }\n/* */ }",
"public HeroMissile(int x,int y, int a, int b)\n {\n _startingX = x;\n _startingY = y;\n _endPointX = a;\n _endPointY = b;\n _currentX = _startingX;\n _currentY = _startingY;\n movingDistance = 1;\n distance = calcDistance(_startingX, _startingY,_endPointX,_endPointY);\n remainingDistance = 0;\n }",
"public Pile getDrawPile(){\n return piles.getDrawPile();\n }",
"public void Attack(){\n float randomx = (float)(Math.random()-0.5)*attackRange*GameView.instance.cameraSize/10;\n float randomy = (float)(Math.random()-0.5)*attackRange*GameView.instance.cameraSize/5;\n Vector2 target = GameView.instance.player.aimFor();\n float dx = target.x-creationPoint.x;\n float dy =target.y-creationPoint.y;\n float l= (float)Math.sqrt(dx*dx+dy*dy);\n dx = dx/l-((float)Math.random()-0.5f)/2;\n dy = dy/l-(float)(Math.random())/10;\n ProjectilePool.instance.shootArrow(creationPoint.x, creationPoint.y, 1, dx, dy, 3);\n }",
"public Image getWalkB(int player, boolean ep) {if (player==1) return walkB1; else return walkB2;}",
"private static Image getAttackPoint()\n\t{\n\t\ttry {\n\t\t\treturn ImageIO.read(new File(guiDirectory + attack));\n\t\t} catch (IOException ioe) {\n\t\t}\n\t\treturn null;\n\t}",
"private double getDistance() {\n\t\tfinal double h2 = 86.7;\n\t\t// h1: height of top of camera\n\t\tfinal double h1 = 17.6;\n\n\t\t// a1: angle of camera (relative to chasis)\n\t\tfinal double a1 = 36.175;\n\t\t// a2: angle of target relative to a1\n\t\tfinal double a2 = ty.getDouble(0.0);\n\n\t\t// distance: distance from camera to base of target\n\t\tfinal double distance = ((h2 - h1) / Math.tan(Math.toRadians(a1 + a2)));\n\n\t\tfinal double d = Math.sqrt(Math.pow(h2 - h1, 2) + Math.pow(distance, 2));\n\t\tSmartDashboard.putNumber(\"Py Distance\", d);\n\n\t\treturn (distance);\n\n\t}",
"@f0g\n @LauncherEventHide\n public void method_739(@NotNull f4u var1) {\n if (var1.c() == f41.field_2120 && !var1.c()) {\n if (this.c.player.dimension != 0) {\n ArrayList var2 = this.method_740();\n float var3 = 0.0F;\n Ref.ObjectRef var4 = new Ref.ObjectRef();\n var4.element = (BlockPos)null;\n float var5 = this.c.player.getHealth() + this.c.player.getAbsorptionAmount();\n BlockPos var6 = new BlockPos(this.c.player.getPositionVector());\n ArrayList var7 = new ArrayList();\n int var8 = var6.getX() - 10;\n int var9 = (int)((float)var6.getY() + this.c.player.getEyeHeight() - (float)10);\n int var10 = var6.getZ() - 10;\n int var11 = var6.getX() + 10;\n int var12 = (int)((float)var6.getY() + this.c.player.getEyeHeight() + (float)10);\n int var13 = var6.getZ() + 10;\n double var14 = ((Number)this.field_522.c()).doubleValue() * ((Number)this.field_522.c()).doubleValue();\n int var16 = var8;\n\n for(int var17 = var11; var16 < var17; ++var16) {\n int var18 = var9;\n\n for(int var19 = var12; var18 < var19; ++var18) {\n int var20 = var10;\n\n for(int var21 = var13; var20 < var21; ++var20) {\n BlockPos var22 = new BlockPos(var16, var18, var20);\n double var23 = this.c.player.posX - ((double)var22.getX() + 0.5D);\n double var25 = this.c.player.posY - ((double)var22.getY() + 0.5D) + 1.5D;\n double var27 = this.c.player.posZ - ((double)var22.getZ() + 0.5D);\n double var29 = var23 * var23 + var25 * var25 + var27 * var27;\n if (!(var29 > 36.0D) && !(var29 > var14)) {\n Block var31 = feg.method_1779(var22);\n if (!Intrinsics.areEqual((Object)var31, (Object)Blocks.AIR) && !(var31 instanceof BlockLiquid)) {\n if (var31 instanceof BlockBed) {\n float var46 = fdM.method_1882(var22, (EntityLivingBase)this.c.player);\n if (!(Boolean)this.field_523.c() || !(var46 >= var5 + (float)1)) {\n Iterator var34 = var2.iterator();\n\n while(var34.hasNext()) {\n EntityPlayer var33 = (EntityPlayer)var34.next();\n float var35 = fdM.method_1882(var22, (EntityLivingBase)var33);\n if (var35 >= var3) {\n var3 = var35;\n var4.element = var22;\n }\n }\n }\n } else if ((BlockPos)var4.element == null) {\n float[] var32 = few.method_1716().method_1736(var22, EnumFacing.UP);\n if (this.method_741(var22, var32[0])) {\n var7.add(var22);\n }\n }\n }\n }\n }\n }\n }\n\n Ref.ObjectRef var38;\n if ((BlockPos)var4.element != null) {\n var1.0();\n Ref.ObjectRef var37 = new Ref.ObjectRef();\n var37.element = few.method_1732((BlockPos)var4.element, true);\n var38 = new Ref.ObjectRef();\n var38.element = few.method_1716().method_1717((BlockPos)var4.element, (EnumFacing)var37.element);\n var1.method_3139(((fex)var38.element).method_2076().meth3());\n var1.method_3140(((fex)var38.element).method_2076().meth4());\n var1.method_3133((Consumer)(new f6k(this, var4, var37, var38)));\n } else {\n Ref.IntRef var36 = new Ref.IntRef();\n var36.element = fdX.field_1227.method_1839(Items.BED);\n if (var36.element != -1) {\n var38 = new Ref.ObjectRef();\n var38.element = (BlockPos)null;\n Iterator var41 = var7.iterator();\n\n while(true) {\n BlockPos var39;\n float var42;\n do {\n if (!var41.hasNext()) {\n if ((BlockPos)var38.element != null) {\n Ref.ObjectRef var40 = new Ref.ObjectRef();\n var40.element = few.method_1716().method_1717((BlockPos)var38.element, EnumFacing.UP);\n var1.0();\n var1.method_3139(((fex)var40.element).method_2076().meth3());\n var1.method_3140(((fex)var40.element).method_2076().meth4());\n var1.method_3133((Consumer)(new f6l(this, var36, var38, var40)));\n }\n\n return;\n }\n\n var39 = (BlockPos)var41.next();\n var42 = fdM.method_1882(var39, (EntityLivingBase)this.c.player);\n } while((Boolean)this.field_523.c() && var42 >= var5 + (float)1);\n\n Iterator var44 = var2.iterator();\n\n while(var44.hasNext()) {\n EntityPlayer var43 = (EntityPlayer)var44.next();\n float var45 = fdM.method_1882(var39, (EntityLivingBase)var43);\n if (var45 >= var3) {\n var3 = var45;\n var38.element = var39;\n }\n }\n }\n }\n }\n }\n }\n }",
"void object_calculations_touch_ground(){\n\n if (down_angle < 0 && up_angle > 0)//base case\n {\n double temp = up_angle;\n up_angle = down_angle;\n down_angle = temp;\n base_case();\n } else if ((down_angle > 0 && up_angle > 0) && (down_angle < up_angle))//smaller object\n {\n double temp = up_angle;\n up_angle = down_angle;\n down_angle = temp;\n measure_small_object();\n } else if (up_angle < 0 && down_angle > 0)//base case\n base_case();\n else //smaller object\n measure_small_object();\n }",
"private double[] genHealthAndSpeed() {\n double multiplier = genMultiplier();\n double[] healthAndSpeed = new double[2]; //0 for health, 1 for speed\n healthAndSpeed[0] = (100+currentDifficulty)*multiplier;\n healthAndSpeed[1] = 2*(1+(1-multiplier));\n return healthAndSpeed;\n }",
"private static float[] findNewPosition(Cell cell){\n int cA = cell.angleInDegree+90;\n cA = (cA>360) ? cA-360 : (cA<0) ? cA+360 : cA;\n angs[0] = cA;\n angs[1] = (cA+180>360) ? cA+180-360 : (cA+180<0) ? cA+180+360 : cA+180;\n\n //define position of new cell based on angle\n float angRad = (float) Math.toRadians(angs[1]);\n pos[0]=(float) (cell.x+2*Pars.rad*(Math.cos(angRad)));\n pos[1]=(float) (cell.y+2*Pars.rad*(Math.sin(angRad)));\n\n //check that cell in not outside of tissue\n int hX=Functions.getHexCoordinates('x',pos[0], pos[1],Pars.numPointsW,Pars.numPointsH,Pars.hexSide,Pars.hexDiag);\n int hY=Functions.getHexCoordinates('y',pos[0], pos[1],Pars.numPointsW,Pars.numPointsH,Pars.hexSide,Pars.hexDiag);\n while(Field.noMatter[hX][hY]){\n //if outside of tissue, try another angle\n cA=diceRoller.nextInt(360);\n angs[0] = cA;\n angs[1] = (cA+180>360) ? cA+180-360 : (cA+180<0) ? cA+180+360 : cA+180;\n\n //redefine cell position\n angRad = (float) Math.toRadians(angs[1]);\n pos[0]=(float) (cell.x+2*Pars.rad*(Math.cos(angRad)));\n pos[1]=(float) (cell.y+2*Pars.rad*(Math.sin(angRad)));\n\n //update hex mesh point to check within tissue\n hX=Functions.getHexCoordinates('x',pos[0], pos[1],Pars.numPointsW,Pars.numPointsH,Pars.hexSide,Pars.hexDiag);\n hY=Functions.getHexCoordinates('y',pos[0], pos[1],Pars.numPointsW,Pars.numPointsH,Pars.hexSide,Pars.hexDiag);\n }\n\n return pos;\n }",
"public Projectile getArrow() {\r\n return entity;\r\n }",
"public void execute() {\n\t\tdouble xPos = lateralDrive + axialDrive * DimensionConstants.ROBOT_WIDTH_TO_DIAGONAL_RATIO;\n\t\tdouble xNeg = lateralDrive - axialDrive * DimensionConstants.ROBOT_WIDTH_TO_DIAGONAL_RATIO;\n\t\tdouble yPos = longitudinalDrive + axialDrive * DimensionConstants.ROBOT_LENGTH_TO_DIAGONAL_RATIO;\n\t\tdouble yNeg = longitudinalDrive - axialDrive * DimensionConstants.ROBOT_LENGTH_TO_DIAGONAL_RATIO;\n\t\t\n\t\tdouble fld = MathUtilities.magnitude(xPos, yPos);\n\t\tdouble frd = MathUtilities.magnitude(xPos, yNeg);\n\t\tdouble bld = MathUtilities.magnitude(xNeg, yPos);\n\t\tdouble brd = MathUtilities.magnitude(xNeg, yNeg);\n\t\t\n\t\tdouble m = Math.max(MathUtilities.magnitude(lateralDrive, longitudinalDrive), Math.abs(axialDrive));\n\t\tdouble sx1, sy1, sx2;\n\t\tif (m != 0) {\n\t\t\tsx1 = lateralDrive/m;\n\t\t\tsy1 = longitudinalDrive/m;\n\t\t\tsx2 = axialDrive/m;\n\t\t}\n\t\telse {\n\t\t\tsx1 = 0;\n\t\t\tsy1 = 0;\n\t\t\tsx2 = 0;\n\t\t}\n\t\t\n\t\tdouble maxMag = MathUtilities.magnitude(Math.abs(sx1) + DimensionConstants.ROBOT_WIDTH_TO_DIAGONAL_RATIO*Math.abs(sx2),\n\t\t\t\tMath.abs(sy1) + DimensionConstants.ROBOT_LENGTH_TO_DIAGONAL_RATIO*Math.abs(sx2));\n\t\t\n\t\tif (maxMag != 0) {\n\t\t\tfld /= maxMag;\n\t\t\tfrd /= maxMag;\n\t\t\tbld /= maxMag;\n\t\t\tbrd /= maxMag;\n\t\t}\n\t\telse {\n\t\t\tfld = 0;\n\t\t\tfrd = 0;\n\t\t\tbld = 0;\n\t\t\tbrd = 0;\n\t\t}\n\t\t\n\t\tdouble fls = MathUtilities.angle(xPos, yPos);\n\t\tdouble frs = MathUtilities.angle(xPos, yNeg);\n\t\tdouble bls = MathUtilities.angle(xNeg, yPos);\n\t\tdouble brs = MathUtilities.angle(xNeg, yNeg);\n\t\t\n\t\tif((lateralDrive == 0 && longitudinalDrive == 0 && axialDrive == 0)){\n\t\t\tfls = flPivot.getTargetAngle();\n\t\t\tfrs = frPivot.getTargetAngle();\n\t\t\tbls = blPivot.getTargetAngle();\n\t\t\tbrs = brPivot.getTargetAngle();\n\t\t}\n\t\t\n\t\tsteerStrat.setFLDirection(fls);\n\t\tsteerStrat.setFRDirection(frs);\n\t\tsteerStrat.setBLDirection(bls);\n\t\tsteerStrat.setBRDirection(brs);\n\n\t\tdriveStrat.setFLDrive(fld);\n\t\tdriveStrat.setFRDrive(frd);\n\t\tdriveStrat.setBLDrive(bld);\n\t\tdriveStrat.setBRDrive(brd);\n\t\t\n\t\tsteerStrat.execute();\n\t\tdriveStrat.execute();\n\t}",
"public void displayUtilities() {\n double utility;\n int noOfRows = environment.getRows();\n int noOfColumns = environment.getColumns();\n\n for (int i = 0; i < noOfRows; i++) {\n for (int j = 0; j < noOfColumns; j++) {\n if(!environment.getTile(i, j).getTileType().equals(\"WALL\")) {\n utility = environmentUtilities[i][j].getUtility();\n System.out.println(\"(\"+i+\",\"+j+\")\"+utility);\n }\n }\n }\n }",
"ArrayList<Integer> getStepCounterTileY();",
"public Coords getJumpPathHighestPoint() {\n Coords highestCoords = null;\n int highestElevation = 0;\n for (MoveStep step : steps) {\n if (getGame().getBoard().getHex(step.getPosition()).getLevel() > highestElevation) {\n highestElevation = step.getElevation();\n highestCoords = step.getPosition();\n }\n }\n return highestCoords;\n }",
"protected IProjectile getProjectileEntity(World par1World, IPosition par2IPosition)\n {\n \tEntityBrick brick = new EntityBrick(par1World, par2IPosition.getX(), par2IPosition.getY(), par2IPosition.getZ());\n \tbrick.dispensed = true;\n \treturn brick; \n }",
"ILogo getMugShot();",
"private int inputMap(Identifier id, float data)\n\t{\n\t\tif (id == Axis.RX)\n\t\t{\n\t\t\tif (linearityX == 1)\n\t\t\t{\n\n\t\t\t\tint testValue = (int) (Math.pow(data, 3) * 1000);\n\t\t\t\tif (Math.abs(data) < zone)\n\t\t\t\t\treturn 0;\n\t\t\t\telse\n\t\t\t\t\treturn testValue;\n\t\t\t} else\n\t\t\t{\n\t\t\t\tif (Math.abs(data) < zone)\n\t\t\t\t\treturn 0;\n\t\t\t\telse\n\t\t\t\t\treturn (int) (data * 1000);\n\t\t\t}\n\n\t\t} else if (id == Axis.RY)\n\t\t{\n\t\t\t// Right Stick Up and Down\n\t\t\tif (linearityY == 1)\n\t\t\t{\n\t\t\t\tint testValue = (int) (Math.pow(data, 3) * 1000);\n\t\t\t\tif (Math.abs(data) < zone)\n\t\t\t\t\treturn 0;\n\t\t\t\telse\n\t\t\t\t\treturn testValue;\n\t\t\t} else\n\t\t\t{\n\t\t\t\tif (Math.abs(data) < zone)\n\t\t\t\t\treturn 0;\n\t\t\t\telse\n\t\t\t\t\treturn (int) (data * 1000);\n\t\t\t}\n\t\t} else if (id == Axis.Z)\n\t\t{\n\t\t\t// Right Stick Up and Down\n\t\t\tif (linearityZ == 1)\n\t\t\t{\n\t\t\t\tint testValue = (int) (Math.pow(data, 3) * 1000);\n\t\t\t\tif (Math.abs(data) < zone)\n\t\t\t\t\treturn 0;\n\t\t\t\telse\n\t\t\t\t\treturn testValue;\n\t\t\t} else\n\t\t\t{\n\t\t\t\tif (Math.abs(data) < zone)\n\t\t\t\t\treturn 0;\n\t\t\t\telse\n\t\t\t\t\treturn (int) (data * 1000);\n\t\t\t}\n\t\t} else if (id == Axis.X)\n\t\t{\n\t\t\t// Right Stick Up and Down\n\t\t\tif (linearityX == 1)\n\t\t\t{\n\t\t\t\tint testValue = (int) (Math.pow(data, 3) * 1000);\n\t\t\t\tif (Math.abs(data) < zone)\n\t\t\t\t\treturn 0;\n\t\t\t\telse\n\t\t\t\t\treturn testValue;\n\t\t\t} else\n\t\t\t{\n\t\t\t\tif (Math.abs(data) < zone)\n\t\t\t\t\treturn 0;\n\t\t\t\telse\n\t\t\t\t\treturn (int) (data * 1000);\n\t\t\t}\n\t\t} else if (id == Axis.Y)\n\t\t{\n\t\t\t// Right Stick Up and Down\n\t\t\tif (linearityY == 1)\n\t\t\t{\n\t\t\t\tint testValue = (int) (Math.pow(data, 3) * 1000);\n\t\t\t\tif (Math.abs(data) < zone)\n\t\t\t\t\treturn 0;\n\t\t\t\telse\n\t\t\t\t\treturn testValue;\n\t\t\t} else\n\t\t\t{\n\t\t\t\tif (Math.abs(data) < zone)\n\t\t\t\t\treturn 0;\n\t\t\t\telse\n\t\t\t\t\treturn (int) (data * 1000);\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}",
"private Alien3 shootbottom() {\n\t\tAlien3 shooter = alien3[choose()];\n\t\tif (shooter == null) return shootbottom();\n\t\telse if (shooter.Destroyed) return shootbottom();\n\t\telse return shooter;\n\t}",
"private double[] camerr(double r, int ibody){\r\n\t\t//% Range from Earth in m\r\n\t\t//double[] erange= {1069177850, 213835570, 71278520, 21383560, 13364720};\r\n\t\tdouble[] erange= {0,0,13364720,21383560,71278520,213835570,1069177850};\r\n\t\t//VectorN erange = new VectorN(erange_tmp);\r\n\t\t\r\n\t\t//% Range from Moon in m\r\n\t\t//double[] mrange = {291342820, 58268560, 19422850, 5826860, 3641790};\r\n\t\tdouble[] mrange = {1788000,1838000, 3641790,5826860,19422850,58268560,291342820};\r\n\t\t//VectorN mrange = new VectorN(mrange_tmp);\r\n\t\t\r\n\t\tdouble[] rv = new double[5];\r\n\t\tif (ibody == BODY_EARTH) //% Earth\r\n\t\t\trv=erange;\r\n\t\telse if (ibody == BODY_MOON) // % Moon\r\n\t\t\trv=mrange;\r\n\t\telse\r\n\t\t\tSystem.err.println(\"Invalid body flag\");\r\n\t\t\r\n\t\t\r\n\t\t//double[] angerr_rnd_deg= {0.0022, 0.011, 0.032, 0.105, 0.169};\r\n\t\tdouble[] angerr_rnd_deg= {0.47,0.44,0.169,0.105,0.032,0.011,0.0022};\r\n\t\t//double[] angerr_bias_deg= {biasflag*0.0046, biasflag*0.023, biasflag*0.070, biasflag*0.235, biasflag*0.375};\r\n\t\tdouble[] angerr_bias_deg= {biasflag*1.055,biasflag*0.98, biasflag*0.375,biasflag*0.235,biasflag*0.070,biasflag*0.023,biasflag*0.0046};\r\n\t\t\r\n\t\t//% Apollo numbers corresponding to 3km horizon sensing error\r\n\t\t//%angerr_rnd_deg= [ 0.0002 0.0008 0.0024 0.0080 0.0129]';\r\n\t\t\r\n\t\t//% Interpolate/extrapolate based on actual range\r\n\t\tInterpolator interp1 = new Interpolator(rv,angerr_rnd_deg);\r\n\t\tdouble arnd=MathUtils.DEG2RAD*(interp1.get_value(r));//interp1(rv,angerr_rnd_deg,r,'linear','extrap')*pi/180;\r\n\t\tinterp1 = new Interpolator(rv,angerr_bias_deg);\r\n\t\tdouble abias=MathUtils.DEG2RAD*(interp1.get_value(r));//interp1(rv,angerr_bias_deg,r,'linear','extrap')*pi/180;\r\n\t\t//*TODO watch this\r\n\t\t//arnd = 0;\r\n\t\tabias = 0;\r\n\t\tdouble[] out = {arnd, abias};\r\n\t\treturn out;\r\n\t}",
"public static byte[] getGoalTiles() {\n return GOAL_TILES;\n }",
"private void fetchTile() {\n\t\t\tif (tile.getRequest().isCancelled() || tile.isFinal()) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tMapSource source = tile.getRequest().getSource();\n\t\t\tProjObj proj = tile.getRequest().getProjection();\n\t\t\tfinal int ppd = tile.getRequest().getPPD();\n\t\t\t\n\t\t\tfor (int fuzzyPPD = ppd/2 ; fuzzyPPD > 1 ; fuzzyPPD /= 2){\t\t\t\t\n\t\t\t\tint ratio = ppd / fuzzyPPD;\n\t\t\t\t\n\t\t\t\t// A tile has 256 pixels on a side.\n\t\t\t\t// Using this method, we can't upscale data to be fuzzy if it's more than 256 times larger \n\t\t\t\t// than the area we are looking to fill. Upscaling data more than 16 times seems unlikely to provide\n\t\t\t\t// any real benefit to the user, so we will quit our search at this point\n\t\t\t\tif (ratio>16) break;\n\t\t\t\t\n\t\t\t\tString tileName = CacheManager.getTileName(\n\t\t\t\t\tsource.getName(), proj, fuzzyPPD,\n\t\t\t\t\ttile.getXtile()/ratio, tile.getYtile()/ratio,\n\t\t\t\t\tsource.hasNumericKeyword());\n\t\t\t\t\n\t\t\t\tBufferedImage tileImage = CacheManager.getTile(source, tileName);\n\t\t\t\t\n\t\t\t\tif (tileImage==null) {\t\t\t\t\t\t\t\t\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tint xtileindex = tile.getXtile() % ratio;\n\t\t\t\tint ytileindex = ratio - (tile.getYtile() % ratio) - 1;\n\t\t\t\t\n\t\t\t\tdouble fuzzyxstep = MapRetriever.tiler.getPixelWidth() / ratio;\n\t\t\t\tdouble fuzzyystep = MapRetriever.tiler.getPixelHeight() / ratio;\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\ttileImage = tileImage.getSubimage((int)(xtileindex * fuzzyxstep), (int)(ytileindex * fuzzyystep), (int)fuzzyxstep, (int)fuzzyystep);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tlog(e);\n\t\t\t\t\tlog(\"xtileindex:\"+xtileindex+\" fuzzyxstep:\"+fuzzyxstep+\" ytileindex:\"+ytileindex+\" fuzzyystep:\"+fuzzyystep);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tlong outputImageSize = (tileImage.getWidth()*ratio)*(tileImage.getHeight()*ratio);\n\t\t\t\tif (outputImageSize <= 0 || outputImageSize > Integer.MAX_VALUE){\n\t\t\t\t\tlog(\"Scaling tile from \"+fuzzyPPD+\" to \"+ppd+\" will result in image size overflow.\"+\n\t\t\t\t\t\t\t\" Stopping further search for lower PPDs for this tile.\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttileImage = CacheManager.scaleImage(tileImage, ratio);\n\t\t\t\t\n\t\t\t\tmyRetriever.fuzzyResponse(tile, tileImage);\n\t\t\t}\t\t\t\t\t\t\n\t\t}",
"private static void runNeedleSimulation() {\n\t\tint iterations = numbersOfIterations(new Scanner(System.in));\n\t\tint hits = needleSimulation(iterations);\n\t\tdouble pi = piCalculation(iterations, hits);\n\t\tSystem.out.println(pi);\n\t\t\n\t\t\n\t}",
"private void doCircle()\n\t{\n\t\tubisenseData = new UbisenseMockupData();\n\t\tDecimalFormat df = new DecimalFormat(\"#0,00\");\n\n\t\telapsedTime = 0;\n\t\t\n\t\tubisenseData.setTagID(Helper.DEFAULT_TAG_ID);\n\t\tubisenseData.setUnit(Helper.UBISENSE_UNIT);\n\t\tubisenseData.setOntology(Helper.LP_ONTOLOGY_URL);\n\t\tubisenseData.setVersion(Helper.UBISENSE_VERSION);\n\t\tubisenseData.setId(\"\");\n\t\tubisenseData.setSendTime(sendTime);\n\n\t\tlong millis = startDate.getMillis();\n\t\tmillis += offset.toStandardDuration().getMillis();\n//\t\tmillis += parentOffset.toStandardDuration().getMillis();\n\t\t\n\t\t//Radianten des Winkels berechnen\n\t\tdouble radiant = Math.toRadians(arc);\n\t\t\n\t\t// Distanz d berechnen, die auf dem Kreis zurückgelegt werden soll\n\t\tdouble d = Math.PI * radius * (arc / 180);\n\t\t\n\t\t// Zeit t [s] berechnen, die für die Distanz d unter gegebener Geschwindigkeit benötigt wird.\n\t\tdouble t = d / toolSpeed;\n\t\tdouble steps = Math.ceil(t) +1;\n\n\t\t//Startkoordinaten berechnen\n\t\tint startX, startY;\n\t\tstartX = x1;\n\t\tstartY = y1 + radius;\n\t\t\n\t\twhile(steps > 0 && !terminate)\n\t\t{\n\t\t\tdouble x,y, currentTime=0, currentArc = 0;\n\t\t\tif (t != 0)\n\t\t\tcurrentTime = elapsedTime / t;\n\n\t\t\tcurrentArc = radiant * currentTime;\n\t\t\t\n\t\t\tx = (startX - x1) * Math.cos(currentArc) - (startY - y1) * Math.sin(currentArc) + x1;\n\t\t\ty = (startX - x1) * Math.sin(currentArc) + (startY - y1) * Math.cos(currentArc) + y1;\n\n\t\t\tubisenseData.setPosition(new Point3D(\tDouble.parseDouble(df.format(x)),\n\t\t\t \tDouble.parseDouble(df.format(y)),\n\t\t\t\t\t\t\t\t\t\t\t\t\t1.6));\n\t\t\tubisenseData.setId(String.valueOf(Helper.getRandomInt()));\n\t\t\tubisenseData.setTime(millis + (long) (elapsedTime*SLEEP_INTERVAL));\n\t\t\t\n\t\t\tEntryEvent event = new EntryEvent(this);\n\t\t\tnotifyListeners(event);\n\t\t\telapsedTime++;\n\t\t\tif (elapsedTime > t)\n\t\t\t\telapsedTime = t;\n\t\t\t\n\t\t\tsteps--;\n\t\t\ttry\n\t\t\t{\n\t\t\t\tif (speed > 0)\n\t\t\t\t\tThread.sleep(SLEEP_INTERVAL/speed);\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}\n\t}",
"public gameWorld()\n { \n // Create a new world with 600x600 cells with a cell size of 1x1 pixels.\n super(600, 600, 1); \n \n addObject(new winSign(), 310, 300);\n addObject(new obscureDecorative(), 300, 400);\n addObject(new obscureDecorative(), 300, 240);\n \n for(int i = 1; i < 5; i++) {\n addObject(new catchArrow(i * 90), 125 * i, 100);\n }\n for (int i = 0; i < 12; i++) {\n addObject(new damageArrowCatch(), 50 * i + 25, 50); \n }\n \n \n //Spawning Interval\n\n if(timerInterval >= 10) {\n arrowNumber = Greenfoot.getRandomNumber(3);\n }\n if(arrowNumber == 0) {\n addObject(new upArrow(directionOfArrow[0], imageOfArrow[0]), 125, 590);\n arrowNumber = 5;\n }\n if(arrowNumber == 1) {\n addObject(new upArrow(directionOfArrow[1], imageOfArrow[1]), 125 * 2, 590);\n arrowNumber = 5;\n }\n if(arrowNumber == 2) {\n addObject(new upArrow(directionOfArrow[2], imageOfArrow[2]), 125 * 3, 590);\n arrowNumber = 5;\n }\n if( arrowNumber == 3) {\n addObject(new upArrow(directionOfArrow[3], imageOfArrow[3]), 125 * 4, 590);\n arrowNumber = 5;\n }\n \n \n\n \n }",
"double getStartH();",
"@Override\n\tprotected void execute() {\n\t\tdouble speed = Robot.oi.getSpeed();\n\t\tdouble turn = Robot.oi.getTurn();\n\t\tdouble leftSpeed;\n\t\tdouble rightSpeed;\n\n\t\tif (Robot.oi.getGyroReset()) {\n\t\t\tRobot.chassisSubsystem.resetGyroHeading();\n\t\t}\n\n\t\tif (Robot.oi.getGyroCalibrate()) {\n\t\t\tRobot.chassisSubsystem.calibrateGyro();\n\t\t}\n\n\t\t/**\n\t\t * If the chassisSubsystem says that we should be in high gear, switch\n\t\t * to high gear, otherwise, switch to low gear.\n\t\t */\n\t\tif (Robot.oi.getGearShiftButton() >= 0.5) {\n\t\t\tRobot.chassisSubsystem.setGear(Gear.HIGH);\n\t\t} else {\n\t\t\tRobot.chassisSubsystem.setGear(Gear.LOW);\n\t\t}\n\n\t\t\n\n\t\t/**\n\t\t * If the user is not turning, then follow the gyro using the GoStraight\n\t\t * command.\n\t\t */\n\t\t/*\n\t\t * if (Math.abs(turn) < 0.03) { Scheduler.getInstance().add(new\n\t\t * GoStraightCommand(Robot.chassisSubsystem.getCurrentAngle())); return;\n\t\t * }\n\t\t */\n\n\t\t/*\n\t\t * double defaultValue = 0; Robot.chassisSubsystem.resetGyroHeading();\n\t\t * double angle = Robot.oi.table.getNumber(\"angle\", defaultValue);\n\t\t * System.out.println(angle);\n\t\t * \n\t\t * if(Robot.oi.getAlignShotButton()) { Scheduler.getInstance().add(new\n\t\t * PivotToAngleCommand(angle)); return; }\n\t\t */\n\n\n\t\tdouble targetCenterX = 0;\n\t\tif (Robot.oi.getAutoAlignShotButton() && targetCenterX != RobotMap.NO_VISION_TARGET) {\n\t\t\tScheduler.getInstance().add(new AlignAndShootHighShotCommand(MatchPeriod.TELEOP));\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (Robot.oi.getManualAlignShotButton()) {\n\t\t\tScheduler.getInstance().add(new AlignAndShootHighShotCommand(MatchPeriod.TELEOP));\n\t\t\treturn;\n\t\t}\n\n\t\t// Use the driver input to set the speed and direction.\n\t\tif (Math.abs(speed) < 0.03) {\n\t\t\tleftSpeed = turn / 2.0;\n\t\t\trightSpeed = -turn / 2.0;\n\t\t} else {\n\t\t\tleftSpeed = (turn < 0.0) ? speed * (1.0 + turn) : speed;\n\t\t\trightSpeed = (turn < 0.0) ? speed : speed * (1.0 - turn);\n\t\t}\n\n\t\tRobot.chassisSubsystem.setSpeed(leftSpeed, rightSpeed);\n\t}",
"public static void main(String[] args) {\r\n\t\t//double lat = 36.149 + (0.001 * Math.random());\r\n\t\t//double lon = -86.800 + (0.001 * Math.random());\r\n\t\t\r\n\t\t// Note: The game area must already be set for this to work!\r\n\t\t\r\n\t\t// This puts a land mine in the middle of the parking lot\r\n\t\t// between ISIS and 21st.\r\n\t\tdouble lat = 36.14923059940338;\r\n\t\tdouble lon = -86.79988324642181;\r\n\t\tdouble rad = 5.0;\r\n\t\tLandMine lm = new LandMine(lat, lon, rad);\r\n\t\t//doLandMinePost(lm);\r\n\t\tdoLandMineRemove(lm);\r\n\t}",
"public int getGotoFloor();",
"public BattleSimulator findBattle(){\r\n\r\n List<Enemy> enemies = world.getEnemies();\r\n Character character = world.getCharacter();\r\n List<MovingEntity> activeStructures = world.getActiveStructures();\r\n List<MovingEntity> friendlyEntities = world.getFriendlyEntities();\r\n List<Ally> allies = world.getAllies();\r\n\r\n\r\n // Create potentialFighting list which begins with all enemies in the world\r\n ArrayList<MovingEntity> potentialFighting = new ArrayList<MovingEntity>(enemies);\r\n ArrayList<MovingEntity> fighters = new ArrayList<MovingEntity>();\r\n List<Pair<MovingEntity, Double>> pairEnemyDistance = new ArrayList<Pair<MovingEntity, Double>>();\r\n ArrayList<MovingEntity> structures = new ArrayList<MovingEntity>();\r\n\r\n // For each enemy in potentialFighting, find the distance from enemy to character \r\n // If character is in battle radius of enemy, add enemy to a pairEnemyDistance list, remove them from potentialFighting list\r\n for(MovingEntity enemy: enemies) {\r\n double distanceSquaredBR = inRangeOfCharacter(character, enemy, enemy.getBattleRadius());\r\n if(distanceSquaredBR >= 0){\r\n potentialFighting.remove(enemy);\r\n Pair<MovingEntity, Double> pairEnemy = new Pair<MovingEntity, Double>(enemy, distanceSquaredBR);\r\n pairEnemyDistance.add(pairEnemy);\r\n }\r\n }\r\n // if no enemies within battle radius, no battle happens\r\n if (pairEnemyDistance.size() == 0) {\r\n return null;\r\n \r\n // else a battle is about to begin!!!\r\n } else if(pairEnemyDistance.size() > 0) {\r\n // For remaining enemies in potentialFighting list, if fighters list size > 0 and if character is in support radius of that enemy\r\n // also add that enemy to pairEnemyDistance list\r\n for(MovingEntity enemy : potentialFighting){\r\n double distanceSquaredSR = inRangeOfCharacter(character, enemy, enemy.getSupportRadius());\r\n if(distanceSquaredSR >= 0){\r\n Pair<MovingEntity, Double> pairEnemy = new Pair<MovingEntity, Double>(enemy, distanceSquaredSR);\r\n pairEnemyDistance.add(pairEnemy);\r\n }\r\n }\r\n }\r\n\r\n // Sort pairEnemyDistance list by distance of enemy to character, so that the closest enemy is first, the furthest enemy is last\r\n Collections.sort(pairEnemyDistance, new Comparator<Pair<MovingEntity, Double>>() {\r\n @Override\r\n public int compare(final Pair<MovingEntity, Double> p1, final Pair<MovingEntity, Double> p2) {\r\n if(p1.getValue1() > p2.getValue1()) {\r\n return 1;\r\n } else {\r\n return -1;\r\n }\r\n }\r\n });\r\n\r\n // Take all enemies from sorted pairEnemyDistance and add to fighters list\r\n for(Pair<MovingEntity, Double> pairEnemy : pairEnemyDistance) {\r\n fighters.add(pairEnemy.getValue0());\r\n }\r\n \r\n // For each tower, find the distance from tower to character\r\n // If character is in the support radius of tower, add tower to structure list\r\n if(activeStructures.size() > 0){\r\n for(MovingEntity structure : activeStructures) {\r\n if(structure.getID().equals(\"TowerBattler\")) {\r\n double distanceSquaredSR = inRangeOfCharacter(character, structure, structure.getSupportRadius());\r\n if(distanceSquaredSR >= 0){\r\n structures.add(structure);\r\n }\r\n }\r\n }\r\n }\r\n // If character is in the support radius of friendly entities, add to fighters\r\n if(friendlyEntities.size() > 0){\r\n for(MovingEntity friendly : friendlyEntities) {\r\n double distanceSquaredSR = inRangeOfCharacter(character, friendly, friendly.getSupportRadius());\r\n if(distanceSquaredSR >= 0){\r\n fighters.add(friendly);\r\n }\r\n }\r\n }\r\n \r\n // Add all allies to fighters list\r\n for(Ally ally : allies) {\r\n fighters.add(ally);\r\n }\r\n\r\n // Construct BattleSimulator class with character, fighters, structures\r\n BattleSimulator battle = new BattleSimulator(character, fighters, structures);\r\n\r\n // battle is about to begin!\r\n return battle;\r\n }",
"protected void execute() {\r\n // read inputs\r\n double h_cmd = heightCmdFunct.getAsDouble(); //height above floor inches\r\n double l_cmd = extCmdFunct.getAsDouble(); //length from from pivot\r\n\r\n // If target is below pivot height, used for quadrant calcs\r\n boolean belowPiv = h_cmd < pivotHeight;\r\n h = Math.abs(pivotHeight - h_cmd); //h (inches) above or below piviot in mag\r\n \r\n //Roughly limit the extension based on game limits and robot geometry\r\n xProjection = MathUtil.limit(l_cmd, Robot.arm.MIN_PROJECTION, Robot.arm.MAX_PROJECTION);\r\n\r\n double tanRatio = (belowPiv) ? h / xProjection : xProjection / h;\r\n // Rotate to maintain height as projection changes\r\n double angle = Math.toDegrees(Math.atan(tanRatio));\r\n angle -= (belowPiv) ? 90.0 : 0.0;\r\n\r\n angle = MathUtil.limit(angle, Robot.arm.PHI_MIN, Robot.arm.PHI_MAX); \r\n \r\n double projLen= Math.sqrt( h*h + xProjection * xProjection); //total length of arm, from pivot point\r\n double ext = projLen - (Robot.arm.ARM_BASE_LENGTH + Robot.arm.WRIST_LENGTH); // extension required\r\n \r\n double compLen = Robot.arm.getCompLen(angle);\r\n\r\n //limit within range, TODO: do we need to account for phi/ext interaction here?\r\n ext = MathUtil.limit(ext, Robot.arm.EXTEND_MIN, Robot.arm.EXTEND_MAX);\r\n\r\n // Extend to allow for change in projection\r\n Robot.arm.setExtension(ext); //absolute ext needed projection\r\n Robot.arm.setAngle(angle); //angle required for height\r\n /*\r\n * Alternative extension calculation xProjection /\r\n * Math.cos(Robot.arm.getAngle()) - armInitialLength\r\n */\r\n }",
"public void SpiritBomb()\r\n {\r\n\r\n\t \r\n\t\tLocation loc = new Location(userRow+1, userCol);\r\n\t\tLocation loc1 = new Location(userRow+1, userCol1);\r\n\t\tLocation loc2 = new Location(userRow+1, userCol2);\r\n\t\tLocation loc3 = new Location(userRow+1, userCol3);\r\n\t\t\r\n\t\tLocation loc4 = new Location(userRow, userCol);\r\n\t\tLocation loc5 = new Location(userRow, userCol1);\r\n\t\tLocation loc6 = new Location(userRow, userCol2);\r\n\t\tLocation loc7 = new Location(userRow, userCol3);\r\n\t\t\r\n\t\tLocation loc8 = new Location(userRow-1, userCol);\r\n\t\tLocation loc9 = new Location(userRow-1, userCol1);\r\n\t\tLocation loc10 = new Location(userRow-1, userCol2);\r\n\t\tLocation loc11 = new Location(userRow-1, userCol3);\r\n\t\t\r\n\t\tLocation loc12 = new Location(userRow-2, userCol);\r\n\t\tLocation loc13= new Location(userRow-2, userCol1);\r\n\t\tLocation loc14 = new Location(userRow-2, userCol2);\r\n\t\tLocation loc15 = new Location(userRow-2, userCol3);\r\n\r\n\t \r\n\r\n\r\n\r\n\t\t\r\n\t\tLocation base1 = new Location(userRow,0);\r\n\t\t\r\n\t\t\tgrid.setImage(base1, \"FSpiritHold.png\");\r\n\t\t\t\r\n\t\tfor(int a = 0; a<9; a++) {\r\n\t\tif(userCol>0 && userCol3 !=15 && userCol2!=15 && userCol1!=15 && userCol!=15 && userRow>0)\r\n\t\t{\r\n\t\r\n\t\t\t Location next101 = new Location(userRow+1,userCol);\r\n\t\t\t Location next102 = new Location(userRow+1,userCol1);\r\n\t\t\t Location next103 = new Location(userRow+1,userCol2);\r\n\t\t\t Location next104 = new Location(userRow+1,userCol3);\r\n\r\n\t\t\t\tLocation next201 = new Location(userRow,userCol);\r\n\t\t\t\tLocation next202 = new Location(userRow,userCol1);\r\n\t\t\t\tLocation next203 = new Location(userRow,userCol2);\r\n\t\t\t\tLocation next204 = new Location(userRow,userCol3);\r\n\t\t\t\t\r\n\t\t\t\tLocation next301 = new Location(userRow-1,userCol);\r\n\t\t\t\tLocation next302 = new Location(userRow-1,userCol1);\r\n\t\t\t\tLocation next303 = new Location(userRow-1,userCol2);\r\n\t\t\t\tLocation next304 = new Location(userRow-1,userCol3);\r\n\t\t\t\t\r\n\t\t\t Location next401 = new Location(userRow-2,userCol);\r\n\t\t\t Location next402 = new Location(userRow-2,userCol1);\r\n\t\t\t Location next403 = new Location(userRow-2,userCol2);\r\n\t\t\t Location next404 = new Location(userRow-2,userCol3);\r\n\t\t\t userCol+=1;\r\n\t\t\t userCol1+=1;\r\n\t\t\t\tuserCol2+=1;\r\n\t\t\t\tuserCol3+=1;\r\n\t\t\t grid.setImage(next101, \"SB401.png\");\r\n\t\t\t grid.setImage(loc1, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next102, \"SB402.png\");\r\n\t\t\t grid.setImage(loc2, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next103, \"SB403.png\");\r\n\t\t\t grid.setImage(loc2, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next104, \"SB404.png\");\r\n\t\t\t grid.setImage(loc3, null);\r\n\r\n\t\t\t\t\r\n\t\t\t\tgrid.setImage(next201, \"SB301.png\");\r\n\t\t\t grid.setImage(loc4, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next202, \"SB302.png\");\r\n\t\t\t grid.setImage(loc5, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next203, \"SB303.png\");\r\n\t\t\t grid.setImage(loc6, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next204, \"SB304.png\");\r\n\t\t\t grid.setImage(loc7, null);\r\n\r\n\t\t\t\t\r\n\t\t\t\tgrid.setImage(next301, \"SB201.png\");\r\n\t\t\t grid.setImage(loc8, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next302, \"SB202.png\");\r\n\t\t\t grid.setImage(loc9, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next303, \"SB203.png\");\r\n\t\t\t grid.setImage(loc10, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next304, \"SB204.png\");\r\n\t\t\t grid.setImage(loc11, null);\r\n\r\n\t\t\t\t\r\n\t\t\t\tgrid.setImage(next401, \"SB101.png\");\r\n\t\t\t grid.setImage(loc12, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next402, \"SB102.png\");\r\n\t\t\t grid.setImage(loc13, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next403, \"SB103.png\");\r\n\t\t\t grid.setImage(loc14, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next404, \"SB104.png\");\r\n\t\t\t grid.setImage(loc15, null);\r\n\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t \r\n\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n }\r\n }",
"public interface Mobile\n{\n // Formatting constants\n public final static double WIRE = 100;\n public final static double UNIT = 10;\n public final static double GAP = 2;\n public final static double TOP = 10;\n public final static int WIDTH = 1200;\n public final static int HEIGHT = 800;\n\n /**\n * Draws this Mobile on g, beginning at point (x,y).\n */\n public void display (Graphics2D g, double x, double y);\n\n /**\n * Returns the total weight of all the Bobs in this Mobile.\n */\n public int weight ();\n\n /**\n * Reports whether all the Rods in this Mobile are completely horizontal. A Rod will be horizontal if the product of\n * its left length and the weight of its left Mobile equals the product of its right length and the weight of its\n * right Mobile.\n */\n public boolean isBalanced ();\n\n /**\n * Returns the length of the longest path through this Mobile. There is one path for every Bob in the Mobile. Each\n * path leads from the top of the Mobile to a Bob, and its length is the number of Rods encountered along the way\n * plus one.\n */\n public int depth ();\n\n /**\n * Returns the number of Bobs contained in this Mobile.\n */\n public int bobCount ();\n\n /**\n * Returns the number of Rods contained in this Mobile.\n */\n public int rodCount ();\n\n /**\n * Returns the length of the longest Rod contained in this Mobile. If there are no Rods, returns zero.\n */\n public int longestRod ();\n\n /**\n * Returns the weight of the heaviest Bob contained in this Mobile.\n */\n public int heaviestBob ();\n}",
"public static double getWeaponDamage(Item weapon, Skill attStrength) {\n/* 2348 */ if (weapon.isBodyPart() && weapon.getAuxData() != 100) {\n/* */ \n/* */ try {\n/* */ \n/* 2352 */ float f = Server.getInstance().getCreature(weapon.getOwnerId()).getCombatDamage(weapon);\n/* */ \n/* 2354 */ return (f + Server.rand.nextFloat() * f * 2.0F);\n/* */ }\n/* 2356 */ catch (NoSuchCreatureException nsc) {\n/* */ \n/* 2358 */ logger.log(Level.WARNING, \"Could not find Creature owner of weapon: \" + weapon + \" due to \" + nsc.getMessage(), (Throwable)nsc);\n/* */ \n/* */ }\n/* 2361 */ catch (NoSuchPlayerException nsp) {\n/* */ \n/* 2363 */ logger.log(Level.WARNING, \"Could not find Player owner of weapon: \" + weapon + \" due to \" + nsp.getMessage(), (Throwable)nsp);\n/* */ } \n/* */ }\n/* */ \n/* */ \n/* 2368 */ float base = 6.0F;\n/* 2369 */ if (weapon.isWeaponSword()) {\n/* */ \n/* 2371 */ base = 24.0F;\n/* */ }\n/* 2373 */ else if (weapon.isWeaponAxe()) {\n/* 2374 */ base = 30.0F;\n/* 2375 */ } else if (weapon.isWeaponPierce()) {\n/* 2376 */ base = 12.0F;\n/* 2377 */ } else if (weapon.isWeaponSlash()) {\n/* 2378 */ base = 18.0F;\n/* 2379 */ } else if (weapon.isWeaponCrush()) {\n/* 2380 */ base = 36.0F;\n/* 2381 */ } else if (weapon.isBodyPart() && weapon.getAuxData() == 100) {\n/* */ \n/* 2383 */ base = 6.0F;\n/* */ } \n/* 2385 */ if (weapon.isWood()) {\n/* 2386 */ base *= 0.1F;\n/* 2387 */ } else if (weapon.isTool()) {\n/* 2388 */ base *= 0.3F;\n/* */ } \n/* 2390 */ base = (float)(base * (1.0D + attStrength.getKnowledge(0.0D) / 100.0D));\n/* */ \n/* 2392 */ float randomizer = (50.0F + Server.rand.nextFloat() * 50.0F) / 100.0F;\n/* */ \n/* 2394 */ return base + (randomizer * base * 4.0F * weapon.getQualityLevel() * weapon.getDamagePercent()) / 10000.0D;\n/* */ }",
"public Image getBulletImg(){ \n return SpriteSheet.playerProjectileSprites[this.frameNumber]; \n }",
"private void intElementCoordinates() throws InvalidLevelCharacterException, NoGhostSpawnPointException, NoPacmanSpawnPointException, NoItemsException {\n\n\t\tint ps = 0;// player spawn point counter\n\t\tint gs = 0;// ghost spawn point counter\n\t\tint item = 0;// item counter\n\t\t\n\t\t\tfor (int i = 0; i < height; i++) {\n\t\t\t\tfor (int j = 0; j < width; j++) {\n\t\t\t\t\t// j*MAPDENSITY as x coordinate, i*MAPDENSITY as y\n\t\t\t\t\t// coordinate\n\t\t\t\t\tfloat[] xy = { j * MAPDENSITY, i * MAPDENSITY };\n\t\t\t\t\t// add coordinates in to right category\n\t\t\t\t\tif (mapElementStringArray[i][j].equals(\"X\")) {\n\t\t\t\t\t\tmapElementArray[i][j] = new Wall(new Vector2f(xy), getWallType(\n\t\t\t\t\t\t\t\ti, j));\n\t\t\t\t\t} else if (mapElementStringArray[i][j].equals(\" \")) {\n\t\t\t\t\t\tmapElementArray[i][j] = new Dot(new Vector2f(xy), getForksForPacman(i, j), getForksForGhost(i, j));\n\t\t\t\t\t\tdots.add((Dot)mapElementArray[i][j]);\n\t\t\t\t\t\titem++;\n\t\t\t\t\t} else if (mapElementStringArray[i][j].equals(\"P\")) {\n\t\t\t\t\t\tmapElementArray[i][j] = new PlayerSpawnPoint(new Vector2f(xy), getForksForPacman(i, j), getForksForGhost(i, j));\n\t\t\t\t\t\tplayerSpawnPoints.add((PlayerSpawnPoint)mapElementArray[i][j]);\n\t\t\t\t\t\taPlayerSpawnPointRow=i;\n\t\t\t\t\t\taPlayerSpawnPointCol=j;\n\t\t\t\t\t\tps++;\n\t\t\t\t\t} else if (mapElementStringArray[i][j].equals(\"G\")) {\n\t\t\t\t\t\tmapElementArray[i][j] = new GhostSpawnPoint(new Vector2f(xy),getForksForPacman(i, j), getForksForGhost(i, j));\n\t\t\t\t\t\tghostSpawnPoints.add((GhostSpawnPoint)mapElementArray[i][j]);\n\t\t\t\t\t\tgs++;\n\t\t\t\t\t} else if (mapElementStringArray[i][j].equals(\"B\"))\n\t\t\t\t\t\tmapElementArray[i][j] = new InvisibleWall(new Vector2f(xy), getForksForPacman(i, j), getForksForGhost(i, j));\n\t\t\t\t\telse if (mapElementStringArray[i][j].equals(\"S\")) {\n\t\t\t\t\t\tmapElementArray[i][j] = new SpeedUp(new Vector2f(xy), getForksForPacman(i, j), getForksForGhost(i, j));\n\t\t\t\t\t\tspeedUps.add((SpeedUp)mapElementArray[i][j]);\n\t\t\t\t\t\titem++;\n\t\t\t\t\t} else if (mapElementStringArray[i][j].equals(\"T\")){\n\t\t\t\t\t\tmapElementArray[i][j] = new Teleporter(new Vector2f(xy),getForksForPacman(i, j), getForksForGhost(i, j));\n\t\t\t\t\t\tteleporters.add((Teleporter)mapElementArray[i][j]);\n\t\t\t\t\t}\n\t\t\t\t\telse if (mapElementStringArray[i][j].equals(\"U\")) {\n\t\t\t\t\t\tmapElementArray[i][j] = new PowerUp(new Vector2f(xy), getForksForPacman(i, j), getForksForGhost(i, j));\n\t\t\t\t\t\tpowerUps.add((PowerUp)mapElementArray[i][j]);\n\t\t\t\t\t\titem++;\n\t\t\t\t\t} else\n\t\t\t\t\t\t// thrwo invalidLevelCharacterException\n\t\t\t\t\t\tthrow new InvalidLevelCharacterException(\n\t\t\t\t\t\t\t\tmapElementStringArray[i][j].charAt(0));\n\n\t\t\t\t}\n\t\t\t}\n\t\t\t// check for PacmanSpawnPoint, GhostSpawnPoint and item exceptions\n\t\t\tif (gs == 0)\n\t\t\t\tthrow new NoGhostSpawnPointException();\n\t\t\tif (ps == 0)\n\t\t\t\tthrow new NoPacmanSpawnPointException();\n\t\t\tif (item == 0)\n\t\t\t\tthrow new NoItemsException();\n\t\t\n\t}",
"@Test\n public void GivenTwoRobotsInLaserBeamThenOnlyClosestOneGetsHitByLaser() {\n int healthRobot1BeforeLaser = robot.getRobotHealthPoint();\n int healthRobot2BeforeLaser = robot2.getRobotHealthPoint();\n\n //fire lasers\n game.checkevent.checkLaserBeams(game.allLasers);\n\n //health after laser\n int healthrobot1afterlaser = robot.getRobotHealthPoint();\n int healthrobot2afterlaser = robot2.getRobotHealthPoint();\n\n //only the assert for robot close to laser should fail (this is intentional)\n assertNotEquals(healthRobot1BeforeLaser, healthrobot1afterlaser);\n assertEquals(healthRobot2BeforeLaser, healthrobot2afterlaser);\n }",
"private Vector2 findTarget() \r\n\t{\r\n\t\tVector2 tempVector = new Vector2(1,1);\r\n\t\ttempVector.setLength(Constants.RANGEDSPEED); //TODO make so it can be changed when level difficulty increases\r\n\t\ttempVector.setAngle(rotation + 90);\r\n\t\treturn tempVector;\r\n\t}"
]
| [
"0.5359452",
"0.5307889",
"0.5298095",
"0.52792805",
"0.526764",
"0.5246826",
"0.5172644",
"0.51711285",
"0.51138306",
"0.5091563",
"0.50794834",
"0.5068024",
"0.5061401",
"0.504986",
"0.50309193",
"0.49926198",
"0.49727386",
"0.49580175",
"0.49157947",
"0.48836675",
"0.48792216",
"0.4857416",
"0.48535758",
"0.4853509",
"0.48521993",
"0.48488745",
"0.4846181",
"0.48331967",
"0.48327598",
"0.48280287",
"0.4805268",
"0.4804164",
"0.48018572",
"0.47979048",
"0.47919837",
"0.4791953",
"0.47841167",
"0.47831404",
"0.47827163",
"0.4768388",
"0.47668904",
"0.4763612",
"0.47619638",
"0.47319922",
"0.47088102",
"0.4693234",
"0.46932212",
"0.46921796",
"0.4691839",
"0.4687438",
"0.46782812",
"0.4677523",
"0.4675756",
"0.46723607",
"0.4670869",
"0.46676207",
"0.46673328",
"0.46586785",
"0.46580446",
"0.4651711",
"0.46501404",
"0.4650052",
"0.46478534",
"0.46444646",
"0.4637911",
"0.46310875",
"0.46273988",
"0.4619147",
"0.4618595",
"0.46168566",
"0.4614418",
"0.46132913",
"0.46082467",
"0.45968065",
"0.45942408",
"0.45923418",
"0.4592134",
"0.45915678",
"0.45913088",
"0.45902607",
"0.45892105",
"0.4586767",
"0.45864752",
"0.4585623",
"0.45843408",
"0.4581917",
"0.45777142",
"0.45766473",
"0.45738366",
"0.4572231",
"0.45701978",
"0.45677447",
"0.45597702",
"0.45531946",
"0.4551693",
"0.45507285",
"0.45489416",
"0.45480618",
"0.4542686",
"0.45417994",
"0.45391098"
]
| 0.0 | -1 |
Returns the name of the main component registered from JavaScript. This is used to schedule rendering of the component. | @Override
protected String getMainComponentName() {
return "SuperMart";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getComponentName();",
"String getComponentName();",
"BaseComponent getComponentName();",
"String componentTypeName();",
"protected String getComponentName() {\n return (component == null) ? \"*No Name*\" : component.toString();\n }",
"String constructComponentName() {\n return base + nameCounter++;\n }",
"public String getComponentName() {\n\t\treturn componentName;\n\t}",
"public abstract Component getComponentByName(String name);",
"@VisibleForTesting\n ComponentName getComponentName() {\n return mComponentName;\n }",
"public ComponentName getComponentName() {\n return mInternal.getComponentName();\n }",
"@Override\n\tpublic String getComponentDefinition() {\n\t\tString component = \"\\n\\tWebElement submit_\" + getComponentName() + \" = driver.findElement(\"\n\t\t\t\t+ getSearchIdentifierString() + \");\";\n\t\tif (getAction() != null && (getAction().equals(\"click\") || getAction().equals(\"submit\"))) {\n\t\t\tcomponent += \"\\n\\tsubmit_\" + getComponentName() + \".submit();\";\n\n\t\t}\n\t\tcomponent += \"\\n\\tThread.sleep(1000);\";\n\t\treturn component;\n\t}",
"public JawbComponent getMainComponent () {\n return null;\n }",
"@Key(\"application.component\")\n\tString applicationComponent();",
"String constructComponentName() {\n synchronized (Button.class) {\n return base + nameCounter++;\n }\n }",
"public QName getComponentName() {\n return _componentName;\n }",
"public String getComponent() {\r\n\t\treturn component;\r\n\t}",
"public String getComponentType() { \n return \"com.sun.faces.AjaxZone\"; \n }",
"public String getComponent() {\n return this.component;\n }",
"public int getComponentID() {\n return COMPONENT_ID;\n }",
"public String getName() {\n if (name == null && !nameExplicitlySet) {\n synchronized(this) {\n if (name == null && !nameExplicitlySet)\n name = constructComponentName();\n }\n }\n return name;\n }",
"private String getJiraTestCaseComponent() {\n component = name.replace(\"TC - \", \"\");\n component = component.substring(0, component.indexOf(\":\"));\n return component;\n }",
"public String getComponentId();",
"@Override\n public String getName() {\n return REACT_CLASS;\n }",
"@JSProperty\n String getName();",
"public String getComponentId() {\n \t\treturn componentId;\n \t}",
"public String getIdentification() {\n return \"richfaces-selenium-script-id\" + this.javaScript.hashCode();\n }",
"public UUID getComponentId();",
"@Override\n public abstract String getComponentType();",
"public JComponent getComponent() {\n return getGradleUI().getComponent();\n }",
"public String getCustomPowerComponentName(int componentId) {\n return mPowerComponents.getCustomPowerComponentName(componentId);\n }",
"public String getComponentName(ItemStack item) \t{ return tag(item) ? item.stackTagCompound.getString(\"componentName\") : null; }",
"java.lang.String getInstanceName();",
"public String getName() {\r\n\t\treturn GDAssemblerUI.getText(UI_TEXT);\r\n\t}",
"@JSProperty(\"className\")\n @Nullable\n String getClassName();",
"private String generateComponentName(String currentName, String fileName, int depth){\n if (depth == 0) return \"\";\n if (currentName.isEmpty()) return fileName;\n return currentName + \".\" + fileName;\n }",
"public interface GetComponentName_callback extends Callback {\r\n\t\tint apply(Pointer pchRenderModelName, int unComponentIndex, Pointer pchComponentName, int unComponentNameLen);\r\n\t}",
"public String getMapComponentClassName() {\n return m_mapComponentClassName;\n }",
"public String getTitleComponent(){\n return titleComponent;\n }",
"public String getCurrentFrameName()\n\t{\n\t\tJavascriptExecutor jsExecutor = (JavascriptExecutor)driver;\n\t\treturn (jsExecutor.executeScript(\"return self.name\")).toString();\n\t}",
"public String componentName(int index) {\n\treturn(comp[index]);\n }",
"public static String getJNITypeName(String finalComponent, int dimensions) {\n \t\tStringBuffer jni = new StringBuffer(finalComponent.length()+dimensions+2);\n \t\twhile (dimensions-- > 0) {\n \t\t\tjni.append('[');\n \t\t}\n \t\t\n \t\tString shortSig = (String) MapTypes.MAP_TYPENAME_TO_SHORTSIG.get(finalComponent);\n \t\tif (shortSig == null) {\n \t\t\tjni.append('L');\n \t\t\tjni.append(finalComponent);\n \t\t\tjni.append(';');\n \t\t} else {\n \t\t\tjni.append(shortSig);\n \t\t}\n \t\t\n \t\treturn jni.toString();\n \t}",
"private String name() {\r\n return cls.getSimpleName() + '.' + mth;\r\n }",
"public int mainComponent() {\n\t\treturn resizable ? MAIN_COMPONENT_RESIZABLE : MAIN_COMPONENT_FIXED; // interfaces\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// move\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// with\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// resizing\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// on\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 7\n\t}",
"protected String getName() {\n\t\tfinal String tmpName = getClass().getSimpleName();\n\t\tif (tmpName.length() == 0) {\n\t\t\t// anonymous class\n\t\t\treturn \"???\";//createAlgorithm(replanningContext).getClass().getSimpleName();\n\t\t}\n\n\t\treturn tmpName;\n\t}",
"protected Component generateComp(String compName) {\n\t\treturn null;\n\t}",
"@Override\n public String getName() {\n final String name = getClass().getName();\n final int lastDollar = name.lastIndexOf('$');\n return name.substring(lastDollar + 1);\n }",
"public String getRuntimeName() {\r\n\t\tfinal StringBuffer runtimeName = new StringBuffer();\r\n\t\tfinal String name = this.getName();\r\n\t\tfinal Package packagee = this.getPackage();\r\n\t\tfinal String packageName = null == packagee ? null : packagee.getName();\r\n\t\tString nameLessPackageName = name;\r\n\r\n\t\tif (false == Tester.isNullOrEmpty(packageName)) {\r\n\t\t\truntimeName.append(packageName);\r\n\t\t\truntimeName.append('.');\r\n\r\n\t\t\tnameLessPackageName = name.substring(packageName.length() + 1);\r\n\t\t}\r\n\r\n\t\tnameLessPackageName = nameLessPackageName.replace('.', '$');\r\n\t\truntimeName.append(nameLessPackageName);\r\n\r\n\t\treturn runtimeName.toString();\r\n\t}",
"public JComponent getMainComponent() {\n\t return mainPanel;\n\t}",
"public String getName() {\n return this.widgetName;\n }",
"public abstract void updateMainComponents(String component);",
"public static String getName() {\n\t\treturn _asmFileStr;\n\t}",
"public String getScriptName() {\n if (scriptName != null) {\n return scriptName;\n }\n\n String contextPath = getContextPath();\n if (contextPath == null) contextPath = \"\";\n return scriptName = contextPath.equals(\"/\") ? \"\" : contextPath;\n }",
"public String getStartName() {// TODO remove\n\t\treturn this.getClass().getSimpleName();\n\t}",
"public static Object getComponentInstance(String name, ServletContext sc) {\r\n\t\tContainerWrapper containerWrapper = scf.findContainer(new ServletContextWrapper(sc));\r\n\t\tif (!containerWrapper.isStart()) {\r\n\t\t\tDebug.logError(\"JdonFramework not yet started, please try later \", module);\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn containerWrapper.lookup(name);\r\n\t}",
"public Component getTabComponent();",
"public String getCodaComponent() {\n return codaComponent;\n }",
"public ComponentLabel getComponentLabel() {\n\t\treturn componentLabel;\n\t}",
"public String getName() {\r\n \treturn this.getClass().getName();\r\n }",
"public String getCustomLoaderName();",
"public String getName() {\n // defaults to class name\n String className = getClass().getName();\n return className.substring(className.lastIndexOf(\".\")+1);\n }",
"public void setComponentName(ComponentName name);",
"Component createComponent();",
"Component createComponent();",
"ComponentBuilder named(String label);",
"public Component getSelf(ExecutionCtrl exec);",
"@Override\n public AbstractProcess getComponent(String name)\n {\n return components.get(name);\n }",
"Component getComponent() {\n/* 224 */ return this.component;\n/* */ }",
"@Override\n public String getName() {\n return this.getClass().getSimpleName();\n }",
"public String getName() {\r\n try {\r\n return PirolPlugInMessages.getString(this.getShortClassName());\r\n } catch (RuntimeException e) {\r\n return super.getName();\r\n }\r\n\r\n }",
"String getObjectName();",
"public Component getComponent() {\n return component;\n }",
"public <S> ComponentInstance<S> getComponentInstance();",
"java.lang.String getCodeName();",
"public String mo12985l_() {\n return getClass().getName();\n }",
"public Component getComponent() {\n\treturn component;\n}",
"@Override\n protected String getMainComponentName() {\n return \"AwesomeCeiling\";\n }",
"protected String xCB() { return ScheduledJobCB.class.getName(); }",
"public static Object getComponentInstance(String name, HttpServletRequest request) {\r\n\t\tServletContext sc = request.getSession().getServletContext();\r\n\t\tContainerWrapper containerWrapper = scf.findContainer(new ServletContextWrapper(sc));\r\n\t\tif (!containerWrapper.isStart()) {\r\n\t\t\tDebug.logError(\"JdonFramework not yet started, please try later \", module);\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn containerWrapper.lookup(name);\r\n\t}",
"public String getImplementationName();",
"public AppComponent component(){\n return mComponent;\n }",
"public org.apache.axis.types.Token getComponentID() {\n return componentID;\n }",
"@Override\n protected String getMainComponentName() {\n return \"main\";\n }",
"String getComponentAppId();",
"@Override\n\tpublic String getShinyStringServerScript() {\n\t\treturn null;\n\t}",
"public Component getComponent(String name) {\n Optional<Component> component = elements.getComponent(name);\n\n if(component.isPresent()) {\n return component.get();\n } else {\n Assert.fail(\"Missing component \" + name);\n return null;\n }\n\n }",
"public String getProgramName()\r\n \t{\r\n \t\treturn m_program.m_csSimpleName;\r\n \t}",
"public static ApplicationComponent component() {\n return instance().applicationComponent;\n }",
"String getOutputName();",
"public final String getName() {\n /// Since we plan to have only one wizard for each class, we use the name of the class.\n return this.getClass().getSimpleName();\n }",
"public void onModuleLoad() {\n VueGWT.init();\n\n // Inject JS Components\n HTMLScriptElement scriptElement =\n (HTMLScriptElement) DomGlobal.document.createElement(\"script\");\n scriptElement.text = JsFilesResources.INSTANCE.jsComponents().getText();\n DomGlobal.document.body.appendChild(scriptElement);\n\n MelisandreComponentClientBundle.INSTANCE.melisandreComponentStyle().ensureInjected();\n Vue.customElement(\"animal-selector\", AnimalSelectorComponentFactory.get());\n\n VueGwtExamplesService.initExamples();\n }",
"public String getScriptName() {\n\t\treturn scriptName;\n\t}",
"public static String getName() {\n\t\treturn ProjectMain._name;\n\t}",
"public String getCompilerClassName();",
"private JComponent buildName() {\n name = new JTextField();\n name.setText(group.getName());\n return name;\n }",
"public String getName () {\n return impl.getName ();\n }",
"JComponent getRenderComponent();",
"public String getNomComplet() {\r\n\t\treturn nomComplet;\r\n\t}",
"String getId(IApiComponent component) throws CoreException {\n StringBuffer buffer = new StringBuffer();\n //$NON-NLS-1$\n buffer.append(component.getSymbolicName()).append(\" \").append('(').append(component.getVersion()).append(')');\n return buffer.toString();\n }",
"public String getIdentifier() {\n\t\treturn config.getUIName()+\"[\"+getIndex()+\"]\";\n\t}",
"public void setComponent(String componentName1) {\n this.component = componentName1;\n }",
"public String getName() {\n return className;\n }"
]
| [
"0.7161835",
"0.7161835",
"0.6536757",
"0.63777333",
"0.637735",
"0.61579037",
"0.605598",
"0.6037055",
"0.60323364",
"0.60271394",
"0.6012061",
"0.5983412",
"0.5946779",
"0.59447646",
"0.5937091",
"0.5907285",
"0.58902663",
"0.5788154",
"0.5768198",
"0.56955856",
"0.56048936",
"0.55989486",
"0.5525931",
"0.5490194",
"0.54813457",
"0.538475",
"0.535966",
"0.5352806",
"0.53087693",
"0.5305976",
"0.52824473",
"0.5259265",
"0.5241375",
"0.5215945",
"0.52062017",
"0.52018076",
"0.5189696",
"0.5187627",
"0.518492",
"0.5177745",
"0.51772994",
"0.5175471",
"0.516566",
"0.5164837",
"0.5164557",
"0.51522136",
"0.51303434",
"0.51163054",
"0.5088976",
"0.5068195",
"0.5060077",
"0.5057774",
"0.50546026",
"0.5046417",
"0.50325286",
"0.5025939",
"0.50133145",
"0.5003038",
"0.49949738",
"0.49891776",
"0.49890426",
"0.49885106",
"0.49885106",
"0.49852166",
"0.49821407",
"0.49769837",
"0.49723655",
"0.4969455",
"0.49671435",
"0.49610212",
"0.4959867",
"0.49583933",
"0.4957533",
"0.49539384",
"0.49527833",
"0.49511874",
"0.4942789",
"0.4941833",
"0.49366012",
"0.49353927",
"0.49267066",
"0.49259666",
"0.49225378",
"0.49217218",
"0.49141583",
"0.49045685",
"0.49034712",
"0.48997942",
"0.48931125",
"0.4883863",
"0.48827878",
"0.48774236",
"0.48706958",
"0.48653135",
"0.48322335",
"0.4827879",
"0.48178327",
"0.48133695",
"0.4810723",
"0.48065934",
"0.48055837"
]
| 0.0 | -1 |
Returns an approximation of the maximum length of a message on this protocol. This must be either the same as or less than the maximum size of a message that can be sent with this protocol. | public int getProtocolDelimitedLength(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getMAX_LENGTH_MESSAGE() {\n\t\treturn MAX_LENGTH_MESSAGE;\n\t}",
"public final int getMessageSize() {\n if (length == UNKNOWN_LENGTH) {\n throw new ProtocolException();\n }\n\n return length;\n }",
"public Integer getMaxLength() { \n\t\treturn getMaxLengthElement().getValue();\n\t}",
"public int getMaxLength() {\r\n return _maxLength;\r\n }",
"long getFullMessageLength();",
"public Integer getMaxLength() {\n\t\treturn maxLength;\n\t}",
"public int getMaxLength() {\n return maxLength;\n }",
"public int getMaxLength() {\r\n return MAX_LENGTH;\r\n }",
"public int getLength() {\r\n\t\treturn messageData.length;\r\n\t}",
"public int maxLen() {\n if (compositions == null) {\n return Math.max(maxLen(getAllele(0)), maxLen(getAllele(1)));\n } else {\n if (compositions.isEmpty())\n return 0;\n int maxLen = compositions.get(0).maxLen();\n for (Variant c : compositions) {\n maxLen = Math.max(maxLen, c.maxLen());\n }\n return maxLen;\n }\n }",
"public int getMaxLength(){\n return this.maxLength;\n }",
"public int getMaxLength() {\r\n\t\treturn fieldMaxLength;\r\n\t}",
"private int getMaxSize() {\r\n return PropUtils.getValue(sizeLimitProp, DEFAULT_MAX_SIZE);\r\n }",
"public GiftCardProductQuery messageMaxLength() {\n startField(\"message_max_length\");\n\n return this;\n }",
"public int getMaxSize()\n {\n return m_MaxSize;\n }",
"public int getMaxLength();",
"public Integer maxLength() {\n return this.maxLength;\n }",
"public long maxResponseLength() {\n return get(MAX_RESPONSE_LENGTH);\n }",
"public int getMaximumSize() {\n return maximumSize;\n }",
"public Integer maxMessages();",
"public int getMaxSize() {\n return maxSize_;\n }",
"public int getMaxSize() {\n return maxSize_;\n }",
"public int getMaxSize() {\n return maxSize;\n }",
"public int getMaxSize() {\n return maxSize;\n }",
"public int getMaxSize() {\n return maxSize;\n }",
"public int getMaxSize() {\n return maxSize_;\n }",
"public int getMaxSize() {\n return maxSize_;\n }",
"public int getMaximalSize() {\n return maximalSize;\n }",
"public abstract long getMaxSize();",
"public int getMaxCommunityLength() {\n return maxCommunityLength;\n }",
"public int maximumSizeInBytes() {\n return maximumSizeInBytes;\n }",
"public abstract int getMaxLength();",
"public int getMaxChainLength(){\r\n return maxChainLength;\r\n }",
"public int getMaxSize(){\n return maxSize;\n }",
"public long maxSize() {\n\t\treturn maxSize;\n\t}",
"public final String getMaxLengthAttribute() {\n return getAttributeValue(\"maxlength\");\n }",
"public int getMaxParamValueLength() {\r\n return maxParamValueLength;\r\n }",
"public String getSizeMessage() {\n\t\treturn sizeMessage;\n\t}",
"public int getMaxLength() {\n return GtkEntry.getMaxLength(this);\n }",
"int getMaxSize();",
"public int getPayloadLength() {\n return buffer.limit() - 12;\n }",
"public abstract int getMessageSize();",
"public int getLength()\n {\n return encryptionDictionary.getInt( \"Length\", 40 );\n }",
"public int getMaxKeyLength()\n\t{\n\t\treturn maxKeyLen;\n\t}",
"protected abstract int getMaxDesiredSize();",
"public static int getMaxSize(){\n\t\treturn 2* 4;\n\t}",
"public long getLength() {\n try {\n Long temp = (Long)replyHeaders.getHeader(HeaderSet.LENGTH);\n\n if (temp == null) {\n return -1;\n } else {\n return temp.longValue();\n }\n } catch (IOException e) {\n return -1;\n }\n }",
"public long getMaximumFileLength() {\n return (httpFileUploadManager == null)\n ? 0 : httpFileUploadManager.getDefaultUploadService().getMaxFileSize();\n }",
"public int getPacketLength() {\n return TfsConstant.INT_SIZE * 3 + failServer.size() * TfsConstant.LONG_SIZE;\n }",
"int getMaxCharSize();",
"public int getLength() {\n return mySize.getLength();\n }",
"public int getMaxResponseSize() {\n return maxResponseSize;\n }",
"public static int size_max() {\n return (8 / 8);\n }",
"public Long maxSizeInMegabytes() {\n return this.maxSizeInMegabytes;\n }",
"public int maxSize()\n {\n return maxSize;\n }",
"Long payloadLength();",
"public Integer getMaxTokenLength() {\n return this.maxTokenLength;\n }",
"public long getBodySize() {\n\t\t\tif (this.headers.containsKey(\"content-length\")) {\n\t\t\t\treturn Long.parseLong(this.headers.get(\"content-length\"));\n\t\t\t} else if (this.splitbyte < this.rlen) {\n\t\t\t\treturn this.rlen - this.splitbyte;\n\t\t\t}\n\t\t\treturn 0;\n\t\t}",
"public int getMaxBufferSize() {\r\n return maxBufferSize;\r\n }",
"@JSProperty\n int getMaxLength();",
"public int getReceiveBufferSize()\r\n/* 99: */ {\r\n/* 100: */ try\r\n/* 101: */ {\r\n/* 102:131 */ return this.javaSocket.getReceiveBufferSize();\r\n/* 103: */ }\r\n/* 104: */ catch (SocketException e)\r\n/* 105: */ {\r\n/* 106:133 */ throw new ChannelException(e);\r\n/* 107: */ }\r\n/* 108: */ }",
"public int getMaxSize()\r\n\t{\r\n\t\tSystem.out.print(\"The Max size of the Array is \");\r\n\t\treturn MAXSIZE;\r\n\t}",
"public int getMaxBufferSize() {\n return maxBufferSize;\n }",
"public double getMaxVehicleLength() {\n return Math.max(maxCarLength, maxTruckLength);\n }",
"public int getSizeLimit() {\n\t\treturn sizeLimit;\n\t}",
"public long length() {\n\tint nBits;\n\tlong x, y;\n\tlong length = 7 + Math.max(minBitsS(toFixed(getTranslateX())),\n\t\t\t\t minBitsS(toFixed(getTranslateY())));\n\tif (hasScale()) {\n\t length += 5 + Math.max(minBitsS(toFixed(getScaleX())),\n\t\t\t\t minBitsS(toFixed(getScaleY())));\n\t}\n\tif (hasRotate()) {\n\t length += 5 + Math.max(minBitsS(toFixed(getRotate1())),\n\t\t\t\t minBitsS(toFixed(getRotate2())));\n\t}\n\treturn length;\n }",
"public int getMaxSize(){\n\t\treturn ds.length;\n\t}",
"public int getMaxListLength();",
"public int getSize() {\n return this.serialize().limit();\n }",
"int getTotalLength() {\n int totalLength = convertMultipleBytesToPositiveInt(mPacket[IP_TOTAL_LENGTH_HIGH_BYTE_INDEX],\n mPacket[IP_TOTAL_LENGTH_LOW_BYTE_INDEX]);\n return totalLength;\n }",
"public long getSize() {\n\t\treturn this.payloadSize; // UTF-16 => 2 bytes per character\n\t}",
"public long getMaximumFileSize()\r\n\t{\r\n\t\treturn maxFileSize;\r\n\t}",
"public Dimension getMaximumSize()\n {\n return new Dimension(32767, 32767);\n }",
"public IntegerDt getMaxLengthElement() { \n\t\tif (myMaxLength == null) {\n\t\t\tmyMaxLength = new IntegerDt();\n\t\t}\n\t\treturn myMaxLength;\n\t}",
"long countMessageLengthTill(long maxLength) throws IllegalStateException;",
"public native static int getMaximumMTU() throws IOException,IllegalArgumentException;",
"public abstract int getMaxIntermediateSize();",
"public long getMaximum() {\n\t\treturn this._max;\n\t}",
"public int getMessageIdBufferSize() {\r\n\t\treturn msgIdBufferSize;\r\n\t}",
"public int getLongestRepeatedSubstringLength()\r\n {\r\n return maxLength;\r\n }",
"private int zzMaxBufferLen() {\n return Integer.MAX_VALUE;\n }",
"private int zzMaxBufferLen() {\n return Integer.MAX_VALUE;\n }",
"final public int getMaxPrecision()\n {\n return ComponentUtils.resolveInteger(getProperty(MAX_PRECISION_KEY), 0);\n }",
"long getMaxFileSizeBytes();",
"public synchronized int getUpperSizeLimit() {\n \t\treturn upper;\n \t}",
"public double getMaxWidth() throws PDFNetException {\n/* 657 */ return GetMaxWidth(this.a);\n/* */ }",
"public int getReceiveBufferSize() {\n return soRcvBuf;\n }",
"protected int supportedMessageParamLength() {\n return MessageUtils.DB2_JCC_MAX_EXCEPTION_PARAM_LENGTH;\n }",
"public int getMaxSqlLength() {\r\n return maxSqlLength;\r\n }",
"public int getLength() {\n\t\treturn length & 0xffff;\n\t}",
"BigInteger getLength();",
"public int getMaxHeight() {\n return Integer.MAX_VALUE;\n }",
"public int getMaximumValue() {\n/* 359 */ return Math.min(32767, (this.c.getMaximumSize()).width);\n/* */ }",
"@java.lang.Override\n public long getMaxEnvelopeQueueSize() {\n return maxEnvelopeQueueSize_;\n }",
"public int getMaxHeight() {\n\t\treturn maxHeight;\n\t\t//Quickly return the stored max height info\n\t}",
"public int getMaxFieldSize() throws SQLException {\n return currentPreparedStatement.getMaxFieldSize();\n }",
"public long getLength();",
"public long getLength();",
"public int getMaximumCapacity() { // get the max capacity\n\t\treturn maximumCapacity;\n\t}",
"protected static long getMaxUploadSize() {\n return maxUploadSize;\n }"
]
| [
"0.7439861",
"0.7410109",
"0.737004",
"0.7347283",
"0.7342466",
"0.73155373",
"0.72565585",
"0.72357106",
"0.70457923",
"0.7033617",
"0.7025088",
"0.7001564",
"0.69850314",
"0.69656885",
"0.6934461",
"0.69014996",
"0.68936336",
"0.68785757",
"0.684608",
"0.68012667",
"0.6775934",
"0.6775934",
"0.67652243",
"0.67652243",
"0.67652243",
"0.6737159",
"0.6735583",
"0.66822356",
"0.66128355",
"0.66004807",
"0.6590359",
"0.6554557",
"0.6549408",
"0.64887273",
"0.6487944",
"0.64693964",
"0.64604187",
"0.6428464",
"0.64211905",
"0.6404741",
"0.63880765",
"0.63684",
"0.63495433",
"0.63466674",
"0.6328025",
"0.6305551",
"0.6292835",
"0.62873524",
"0.62731045",
"0.62664753",
"0.6255167",
"0.6246822",
"0.6243768",
"0.6241751",
"0.62148213",
"0.6202301",
"0.6190055",
"0.6164984",
"0.6161157",
"0.6158115",
"0.61501",
"0.61361927",
"0.6133963",
"0.6107008",
"0.6097322",
"0.6093385",
"0.60921574",
"0.6082885",
"0.60819143",
"0.60786",
"0.60754657",
"0.6061116",
"0.6051623",
"0.6043751",
"0.6041602",
"0.6027942",
"0.60273844",
"0.60077393",
"0.6001896",
"0.6000504",
"0.59838814",
"0.59838814",
"0.5982025",
"0.59769267",
"0.5962773",
"0.5960379",
"0.5952893",
"0.5937408",
"0.59366614",
"0.59286654",
"0.5924609",
"0.5909636",
"0.58995646",
"0.5889257",
"0.58883554",
"0.5877945",
"0.5876903",
"0.5876903",
"0.5875199",
"0.5869491"
]
| 0.58691114 | 100 |
Kicks the specified user off of the specified channel, if the user has priviliges needed to kick the user. | public void kick(String channel, String user, String reason); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void kick(String user, String channel)\n\t{\n\t\tkick(user, channel, null);\n\t}",
"public void kick(String user, String channel, String reason)\n\t{\n\t\tsendRaw(\"KICK \" + channel + \" \" + user + (reason != null ? \" :\" + reason : \"\"));\n\t}",
"void kick(String user);",
"public abstract void kickUser(String nickname, String reason);",
"public void run(Message message, Object[] args) {\r\n\t\tif (!message.getMember().hasPermission(Permission.KICK_MEMBERS)) {\r\n\t\t\tmessage.getChannel().sendMessage(\"You do not have the `KICK_MEMBERS` permission.\");\r\n\t\t}\r\n\t\tif (message.getMentionedUsers().isEmpty()) {\r\n message.getChannel().sendMessage(\"You must mention 1 or more Users to be kicked!\").queue();\r\n }\r\n else {\r\n Guild guild = message.getGuild();\r\n Member selfMember = guild.getSelfMember(); \r\n\r\n if (!selfMember.hasPermission(Permission.KICK_MEMBERS)) {\r\n \tmessage.getChannel().sendMessage(\"Sorry! I don't have permission to kick members in this Guild!\").queue();\r\n return;\r\n }\r\n\r\n List<User> mentionedUsers = message.getMentionedUsers();\r\n for (User user : mentionedUsers) {\r\n Member member = guild.getMember(user);\r\n \r\n if (!selfMember.canInteract(member)) {\r\n \tmessage.getChannel().sendMessage(\"Cannot kick member: \" + member.getEffectiveName() +\", they are higher \" + \"in the hierarchy than I am!\").queue();\r\n continue; //Continue to the next mentioned user to be kicked.\r\n }\r\n\r\n guild.getController().kick(member).queue(\r\n \tsuccess -> message.getChannel().sendMessage(\"Kicked \" + member.getEffectiveName() + \"! Cya!\").queue(),\r\n error -> {\t\r\n if (error instanceof PermissionException) {\r\n // PermissionException pe = (PermissionException) error;\r\n // Permission missingPermission = pe.getPermission();\r\n message.getChannel().sendMessage(\"PermissionError kicking [\" + member.getEffectiveName()\r\n + \"]: \" + error.getMessage()).queue();\r\n }\r\n else {\r\n \tmessage.getChannel().sendMessage(\"Unknown error while kicking [\" + member.getEffectiveName()\r\n + \"]: \" + \"<\" + error.getClass().getSimpleName() + \">: \" + error.getMessage()).queue();\r\n }\r\n });\r\n }\r\n }\r\n\t}",
"private void handleMangerKickUserOut() {\n String userName = EventMessageParser.extractUserName(this.message);\n SocketConnection targetConnection = SocketManager.getInstance()\n .getUserConnection(userName);\n targetConnection.send(this.message);\n }",
"public void kick(Player presser,Player kicked)\r\n\t{\r\n\t\tclientQueue.offer(new Action(getLobby().getID(),presser,kicked,Action.KICK));\r\n\t}",
"public void kickPlayer ( String message ) {\n\t\texecute ( handle -> handle.kickPlayer ( message ) );\n\t}",
"private void channelPrivilegedUserUpdate() {\n String userKey = builder.getPersonalUser().getUserKey();\n if (channel.getPrivilegedUsers().size() != 0) {\n ArrayList<String> members = new ArrayList<>();\n for (User user : channel.getPrivilegedUsers()) {\n members.add(user.getId());\n }\n String[] membersArray = members.toArray(new String[0]);\n // send update to server\n restClient.updateChannel(server.getId(), channel.getCategories().getId(), channel.getId(), userKey,\n channel.getName(), channel.isPrivilege(), membersArray, response -> {\n });\n } else {\n channel.setPrivilege(false);\n restClient.updateChannel(server.getId(), channel.getCategories().getId(), channel.getId(), userKey,\n channel.getName(), false, null, response -> {\n });\n }\n }",
"private void UserJoinChannel(ClientData d)\n\t{\n\t\tApplicationManager.textChat.writeLog(d.ClientName + \" Join to \" + currentChannel.ChannelName);\n\t\tSendMessage(null, MessageType.channelInfo);\n\n\t}",
"public static void kickPlayer(){\n\t\t// remove player\n\t\tplayers.get(curr).kick();\n\t\t// decrement number of players\n\t\tnumPlayers--;\n\t\t// update players on the board\n\t\tboard.updatePlayers(players);\n\t\tSystem.out.println(\"Kicked \"+players.get(curr).getColorName()+\" player.\");\n\t}",
"boolean unblockUser(User user);",
"public void handleCommand() {\n\t\tif (Client.isLoggedIn() == false)\n\t\t\treturn;\n\t\t\n\t\tClientUser user = Client.getUserByName(argument);\n\t\tif (user == Client.getThisUser()) {\n\t\t\tSystem.err.println(\"Trying to remove this user? This should never happen!\");\n\t\t}\n\t\tif (user != null) {\n\t\t\tClient.removeUser(user);\n\t\t\tClient.getMainWindow().getMainChatPanel().displayInfo(user.getName() + \" has logged off!\");\n\t\t} else {\n\t\t\tSystem.err.println(\"cquit used with a non-exisitng username!\");\n\t\t}\n\t}",
"public void kick();",
"private void removePrivilegedUser(ActionEvent actionEvent) {\n if (removeUserMenu.getSelectionModel().getSelectedItem() != null) {\n for (User user : server.getUser()) {\n if (user.getName().equals(removeUserMenu.getSelectionModel().getSelectedItem())) {\n selectedRemoveUser = user;\n }\n }\n // remove selected user from channel as privileged\n channel.withoutPrivilegedUsers(selectedRemoveUser);\n // update removeMenu\n removeUserMenu.getItems().clear();\n for (User user : server.getUser()) {\n if (user.getPrivileged().contains(channel)) {\n removeUserMenu.getItems().add(user.getName());\n }\n }\n // update addMenu\n addUserMenu.getItems().clear();\n for (User user : server.getUser()) {\n if (!user.getPrivileged().contains(channel)) {\n addUserMenu.getItems().add(user.getName());\n }\n }\n channelPrivilegedUserUpdate();\n }\n }",
"@EventHandler\n public void onServerKick(ServerKickEvent event) {\n // check if its a \"fresh\" connection\n if (event.getPlayer().getServer() == null)\n return;\n\n if (event.getKickedFrom().getName().equals(Config.target)) {\n // Move Player back to the queue\n try {\n mutex.acquire();\n String reason = BaseComponent.toLegacyText(event.getKickReasonComponent());\n ProxiedPlayer player = event.getPlayer();\n\n // lost connection -> disconnected\n if (reason.toLowerCase().contains(\"banned\")) {\n // if banned don't add back to the queue;\n player.disconnect(event.getKickReasonComponent());\n } else if (!reason.toLowerCase().contains(\"lost connection\")) {\n // add to the queue again since the player did not left the queue and the event is not triggered\n if (event.getPlayer().getServer().getInfo() == ProxyServer.getInstance().getServerInfo(Config.queue)) {\n playersQueue.add(player);\n Main.log(\"onServerKick\", \"§3§b\" + player.toString() + \"§3 was added to the §b\" + Config.queue + \"§3. Queue count is \" + playersQueue.size() + \". Kicked count is \" + (kickedPlayers.size() + 1) + \".\");\n }\n\n // if config is not set to kick or if the server was kicked while connecting\n if(!Config.kick || event.getPlayer().getServer().getInfo() == ProxyServer.getInstance().getServerInfo(Config.queue)) {\n // cancel kick and send back to the queue\n event.setCancelled(true);\n event.setCancelServer(ProxyServer.getInstance().getServerInfo(Config.queue));\n\n player.sendMessage(TextComponent.fromLegacyText(\"§6You were sent back to the queue for: §c\" + reason + \"§r\"));\n Main.log(\"onServerKick\", \"§3§b\" + player.toString() + \"§3 was sent back to §b\" + Config.queue + \"§3 after a kick (\" + reason + \"§3). Kicked count is \" + (kickedPlayers.size() + 1) + \".\");\n\n kickedPlayers.put(player, Instant.now().getEpochSecond());\n }\n else {\n // kick the player if the event was not cancelled\n Main.log(\"onServerKick\", \"§3§b\" + player.toString() + \"§3 was kicked for \" + reason + \"§3.\");\n }\n }\n } catch (InterruptedException e1) {\n e1.printStackTrace();\n } finally {\n mutex.release();\n }\n }\n }",
"@Override\n public void executeCommand(MessageChannel channel, Message msg) {\n\n UserManagement userManager = UserManagement.getINSTANCE();\n\n // Checks if the author is a registered user and exists in the database.\n if (!userManager.userIsRegistered(msg.getAuthor().getId())) {\n channel.sendMessage(\"You are not even registered.\\nPlease use `!register` first to execute this command.\").queue();\n msg.addReaction(\"U+274C\").queue();\n return;\n }\n\n // Checks if the user is erasable. If not, replies with feedback message.\n if (!userManager.delete(msg.getAuthor().getId())) {\n channel.sendMessage(\"Unfortunately we could not unregister you.\").queue();\n return;\n }\n\n // If the unregister was successful, replies with feedback message.\n channel.sendMessage(\"The unregister was successful!\").queue();\n msg.addReaction(\"U+1F44B\").queue();\n }",
"public synchronized void pokeClient(ClientThread sender, String recipientNickname) throws IOException {\n \tif (userExists(recipientNickname)) {\n nicknamesToClients.get(recipientNickname).writeToClient(sender.getNickname() + \" poked you!\");\n log(sender.getNickname() + \" pokes the s$%# out of \" + recipientNickname);\n }\n }",
"public abstract boolean kickPlayerOutOfTheGame(int game_id, String username) throws SQLException;",
"public void kickPlayer(int playerId)\n {\n //call Client Controller kickPlayer method with the id of the selected\n //player\n // Guard against this\n if (playerId >= 0)\n {\n clientController.kickPlayer(playerId);\n }\n }",
"@Override\n public void disconnect(Channel channel)\n {\n Log.e(\"Dudu_SDK\",\n \"disconnect \" + ((user == null) ? \"true\" : user.getUserid()));\n close(false);\n isConnected = false;\n reconnect();\n Log.e(\"Dudu_SDK\",\n \"connectCallBack==null \" + (connectCallBack == null));\n if (connectCallBack != null)\n connectCallBack.disconnect(channel);\n }",
"private void UserDisconnectChannel(ClientData d)\n\t{\n\t\tApplicationManager.textChat.writeLog(d.ClientName + \" Quit \" + currentChannel.ChannelName);\n\t\tSendMessage(null, MessageType.channelInfo);\n\n\t}",
"boolean blockUser(User user);",
"public\tvoid\tuserJoined(UIRosterEntry user)\n\t{\n\t\t\n\t\tNewChatPanel panel = this.getDiscussionPanel();\n\t\n\t\tString joinedUserName = user.getDisplayName();\n\t\tString joinedUserId = user.getUserId();\n\t\t\n\t\tString senderId = this.rosterModel.getCurrentActivePresenter().getUserId();\n\t\tString senderName = this.rosterModel.getCurrentActivePresenter().getDisplayName();\n\t\t\n\t\t//Window.alert(\"senderId = \"+senderId+\":senderName:\"+senderName);\n\t\t//Window.alert(\"User Joined:joinedUserName :\"+joinedUserName+\":joinedUser Status:\"+user.getJoinedStatus());\n\t\t//Window.alert(\"lastUserJoined = \"+lastUserJoined);\n\t\tif((joinedUserId != senderId ) && (joinedUserId != lastUserJoined ) && (senderName != \"Not Available\") && (joinedUserId != me.getUserId()) && (!user.getJoinedStatus()))\n\t\t{\n\t\t//\tpanel.receiveChatMessage(\"\", sender,joinedUser + \" has joined the conference\");\n\t \t String s = ConferenceGlobals.getDisplayString(\"user_joined_message\",\"has joined the dimdim web meeting.\");\n\t \t //Window.alert(\"adding \"+s);\n\t\t\tpanel.receiveWelcomeMessage(joinedUserName + \" \"+s);\n\t\t\tlastUserJoined = joinedUserId;\n\t\t}\n\t\telse if((joinedUserId == senderId) && lastUserJoined == null && (joinedUserId != lastUserJoined))\n\t\t{\n\t \t String s = ConferenceGlobals.getDisplayString(\"user_welcome_message\",\"Welcome to the Dimdim Web Meeting.\");\n\t \t //Window.alert(\"adding welcom message...\");\n\t\t\tpanel.receiveWelcomeMessage(s);\n\t\t\tlastUserJoined = joinedUserId;\n\t\t}\n\t}",
"public int stopUser(int userId, boolean force, IStopUserCallback callback) {\n int stopUsersLU;\n if (this.mInjector.checkCallingPermission(\"android.permission.INTERACT_ACROSS_USERS_FULL\") != 0) {\n String msg = \"Permission Denial: switchUser() from pid=\" + Binder.getCallingPid() + \", uid=\" + Binder.getCallingUid() + \" requires \" + \"android.permission.INTERACT_ACROSS_USERS_FULL\";\n Slog.w(\"ActivityManager\", msg);\n throw new SecurityException(msg);\n } else if (userId < 0 || userId == 0) {\n throw new IllegalArgumentException(\"Can't stop system user \" + userId);\n } else {\n enforceShellRestriction(\"no_debugging_features\", userId);\n synchronized (this.mLock) {\n stopUsersLU = stopUsersLU(userId, force, callback);\n }\n return stopUsersLU;\n }\n }",
"@Override\n public boolean removeUser(Socket userSocket, IUser user) {\n if (this.chatUsers.containsKey(userSocket)) {\n this.chatUsers.remove(userSocket);\n notifyUsers(this.chatName,\n \"User \" + user.getName() + \" has left the chat.\");\n return true;\n }\n return false;\n }",
"void join(User user);",
"public void muteUser(User user, int seconds) {\n bot.getCreditsFile().set(\"Mutes.\" + user.getId() + \".Name\", user.getName());\n bot.getCreditsFile().set(\"Mutes.\" + user.getId() + \".Mute\", seconds);\n data.saveFile(bot.getCreditsFile(), \"credits\");\n GuildUtils.controller().modifyMemberRoles(GuildUtils.guild().getMember(user), Collections.singleton(Roles.MUTED), Collections.emptySet()).queue();\n }",
"public boolean isKicked() throws RemoteException {\r\n return kicked;\r\n }",
"public void removeUser(Client user) {\n usersConnected.remove(user.getName());\n }",
"@Override\n\tpublic User getChannel() {\n\t\treturn null;\n\t}",
"public void partChannel(String channel, String reason);",
"@PreAuthorize(\"hasRole('superman')\")\n\tpublic abstract boolean updateChannel(Channel channel);",
"void unblock(User user) throws RepositoryException;",
"public void disableUser(String userId) {\n\t\t\r\n\t}",
"@Override\r\n public void onPrivmsg(User user, Channel channel, String message) {\r\n if (channel == null || !channel.getName().equals(\"#it06\")) {\r\n return;\r\n }\r\n for (String s : message.split(\" \")) {\r\n /* check if the message contains a username, if so: change the message */\r\n /* to something in the blacklist */\r\n for (User u : channel.getUsers().keySet()) {\r\n if (s.contains(u.getNickname())) {\r\n s = \"hej\";\r\n }\r\n }\r\n \r\n /* if the message is in the blacklist, go to the next one */\r\n if (blackList.contains(s)) {\r\n continue;\r\n }\r\n \r\n /* do we have this word in our \"vocabulary\" (old), else we check google */\r\n String t;\r\n if (old.containsKey(s)) {\r\n t = old.get(s);\r\n } else {\r\n t = getSuggestion(s);\r\n }\r\n old.put(s, t);\r\n \r\n /* if we have found a suggestion, print it to the channel */\r\n if (t != null) {\r\n channel.sendPrivmsg(t);\r\n }\r\n }\r\n }",
"public abstract void revokeModerator(String nickname);",
"public boolean removePlayer(String user){ \r\n\t\t//TODO //What does this mean in the context of the game? do we stop the game? do we check if \r\n\t\t//there is the right number of players...\r\n\t\tif(userToRole.containsKey(user)){\r\n\t\t\tString rid = userToRole.get(user);\r\n\t\t\troleToUser.remove(rid,user);\r\n\t\t\tlog.info(\"removed \" + user + \" from roleToUser\");\r\n\t\t\tInteger x = roleCount.get(rid);\r\n\t\t\troleCount.put(rid,x - 1);\r\n\t\t\tlog.info(\"removed \" + user + \" from roleCount\");\r\n\t\t\tuserReady.remove(user);\r\n\t\t\tlog.info (\"removed \" + user + \" from userReady\");\r\n\t\t\t//Do we want to stop the game, pause the game...\t\r\n\t\t\tsetGameState(GAMESTATE.STOP);\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"public void updateCooldown(User u) {\r\n\t\tfor (int i = 0; i < Main.Bot.cooldown.size(); i++) \r\n\t\t\tif (Main.Bot.cooldown.get(i).hasUser(u) && Main.Bot.cooldown.get(i).t - System.currentTimeMillis() <= 0) \r\n\t\t\t\tMain.Bot.cooldown.remove(i);\r\n\t\t\t\r\n\t\t\r\n\t}",
"protected boolean processChannelTell(String username, String titles, int channelNumber, String message){return false;}",
"private void joinChannel() {\n // Get the User Id for the current user\n final String userId = mUser.getUid();\n // User Id set to 0 for auto handling by Agora\n int uid = 0;\n // Token object\n RtcTokenBuilder token = new RtcTokenBuilder();\n // Time stamp used for length of token\n int timestamp = (int)(System.currentTimeMillis() / 1000 + expirationTimeInSeconds);\n\n String uId = Objects.requireNonNull(mAuth.getCurrentUser()).getUid();\n\n addCallToDb(uId); // Add current user to db for active calls\n\n try {\n // Create a token using Agora Sdk\n agora_token = token.buildTokenWithUid(getString(R.string.agora_app_id), getString(R.string.agora_app_certificate),\n channelName, uid, RtcTokenBuilder.Role.Role_Publisher, timestamp);\n } catch (Exception e) {\n e.printStackTrace();\n }\n // Join the channel with the given token and channel name\n mRtcEngine.joinChannel(agora_token, channelName, \"\", uid);\n }",
"public void joinChannel() {\n String userId = AuthenticationSingleton.getAdaptedInstance().getUid();\n String token1 = generateToken(userId);\n mRtcEngine.setAudioProfile(Constants.AUDIO_SCENARIO_SHOWROOM, Constants.AUDIO_SCENARIO_GAME_STREAMING);\n int joinStatus = mRtcEngine.joinChannelWithUserAccount(token1, appointment.getId(), userId);\n if (joinStatus == SUCCESS_CODE) {\n appointment.addInCallUser(new DatabaseUser(userId));\n }\n }",
"public void kickStart() {\n startLobby();\n }",
"public void removeUser(User user) {\n for (ChatContext chatContext: chatContexts) {\n if (chatContext.removeUser(user)) {\n //Dissolve the chat\n removeContext(chatContext);\n break;\n }\n }\n }",
"private void addPrivilegedUser(ActionEvent actionEvent) {\n if (addUserMenu.getSelectionModel().getSelectedItem() != null) {\n for (User user : server.getUser()) {\n if (user.getName().equals(addUserMenu.getSelectionModel().getSelectedItem())) {\n selectedAddUser = user;\n }\n }\n // set selected user to channel as privileged\n channel.withPrivilegedUsers(selectedAddUser);\n // update addMenu\n addUserMenu.getItems().clear();\n for (User user : server.getUser()) {\n if (!user.getPrivileged().contains(channel)) {\n addUserMenu.getItems().add(user.getName());\n }\n }\n // update removeMenu\n removeUserMenu.getItems().clear();\n for (User user : server.getUser()) {\n if (user.getPrivileged().contains(channel)) {\n removeUserMenu.getItems().add(user.getName());\n }\n }\n channelPrivilegedUserUpdate();\n }\n }",
"public synchronized boolean removeUser(ClientThread client) {\n if (client != null && !client.getNickname().isEmpty()) {\n\t \tclients.remove(client);\n\t nicknamesToClients.remove(client.getNickname());\n\t try {\n\t onClientLogout(client);\n\t } catch (final IOException e) {\n\t e.printStackTrace();\n\t }\n\t clientThreadsSem.release();\n\t return true;\n } else {\n \treturn false;\n }\n }",
"private boolean cekUser(String user){\n return user.equals(Preferences.getRegisteredUser(getBaseContext()));\n }",
"void removeUser(String uid);",
"public void removeUserFromChat(String otherUsername){\n String guiTitle = gui.getTitle();\n guiTitle = guiTitle.replace(\" \" + otherUsername + \" \", \"\");\n gui.setTitle(guiTitle);\n availableUsers.add(username);\n gui.addUserToDropDown(otherUsername);\n userStatuses.remove(otherUsername);\n refreshTypingStatuses(otherUsername);\n gui.addUserExitedMessage(otherUsername);\n }",
"public boolean hasNoCooldown(User u) {\r\n\t\tfor (int i = 0; i < Main.Bot.cooldown.size(); i++) \r\n\t\t\tif (Main.Bot.cooldown.get(i).hasUser(u))\r\n\t\t\t\treturn false;\r\n\t\t\r\n\t\treturn true;\r\n\t}",
"public void joinChannel(String chName) {\n\t\tstdGroup.fireEventStatus(new StatusEvent(this,\"Joining channel \"+ chName + \"..wait...\"));\n\t\tmkChannel(chName, \"\",userName , emailAddress);\n\t}",
"public void myChannelPressed(View view) {\n\n Intent myChannelIntent = new Intent(AllChannelListActivity.this, UserChannelActivity.class);\n\n myChannelIntent.putExtra(\"userName\", userName);\n startActivity(myChannelIntent);\n\n finish();\n }",
"public void finishUserStopping(int userId, UserState uss) {\n int i = userId;\n final UserState userState = uss;\n Intent shutdownIntent = new Intent(\"android.intent.action.ACTION_SHUTDOWN\");\n shutdownIntent.putExtra(\"android.intent.extra.SHUTDOWN_USERSPACE_ONLY\", true);\n IIntentReceiver shutdownReceiver = new IIntentReceiver.Stub() {\n public void performReceive(Intent intent, int resultCode, String data, Bundle extras, boolean ordered, boolean sticky, int sendingUser) {\n UserController.this.mHandler.post(new Runnable() {\n public void run() {\n UserController.this.finishUserStopped(userState);\n }\n });\n }\n };\n synchronized (this.mLock) {\n try {\n if (userState.state != 4) {\n try {\n } catch (Throwable th) {\n th = th;\n Intent intent = shutdownIntent;\n while (true) {\n try {\n break;\n } catch (Throwable th2) {\n th = th2;\n }\n }\n throw th;\n }\n } else {\n userState.setState(5);\n this.mInjector.getUserManagerInternal().setUserState(i, userState.state);\n this.mInjector.batteryStatsServiceNoteEvent(16391, Integer.toString(userId), i);\n this.mInjector.getSystemServiceManager().stopUser(i);\n Intent intent2 = shutdownIntent;\n this.mInjector.broadcastIntent(shutdownIntent, null, shutdownReceiver, 0, null, null, null, -1, null, true, false, ActivityManagerService.MY_PID, 1000, userId);\n }\n } catch (Throwable th3) {\n th = th3;\n Intent intent3 = shutdownIntent;\n while (true) {\n break;\n }\n throw th;\n }\n }\n }",
"@Override\n\tpublic void useChannel(ICommunicationChannel channelToUse) {\n\t\t\n\t}",
"@Override\n\tpublic void useChannel(ICommunicationChannel channelToUse) {\n\t\t\n\t}",
"public void leaveChannel() {\n mRtcEngine.leaveChannel();\n appointment.removeOfCall(new DatabaseUser(MainUser.getMainUser().getId()));\n }",
"@Override\r\n public void onUserSet(final GenericDevice dev, final PDeviceHolder devh, final PUserHolder u) {\n mHandlerThread.runOnMe(new Runnable() {\r\n @Override\r\n public void run() {\r\n mStatusReceiver.onUserSet(dev, devh, u);\r\n }\r\n });\r\n }",
"public void removeUser(User user) throws UserManagementException;",
"public void skipTurn(String username) {\n if(username.equals(this.username) && !(client.getPlayer() instanceof ComputerPlayer)) {\n JOptionPane.showMessageDialog(frame, \"You skipped your turn!\");\n } else if (!(client.getPlayer() instanceof ComputerPlayer)) {\n JOptionPane.showMessageDialog(frame, username + \" skipped his turn\");\n\n }\n }",
"static synchronized void RemoveUser(ClientHandler user)\r\n {\r\n users.remove(user);\r\n if(users.size() == 0)\r\n {\r\n try {\r\n chatLogWriter.close();\r\n chatLog.delete();\r\n System.out.println(\"!!! Waiting for the next connection... !!!\\n\\n\");\r\n } catch (Exception e)\r\n {\r\n System.out.println(\"Unable to close file!\");\r\n System.exit(1);\r\n }\r\n }\r\n }",
"@Override\n public void removeListner(_User user) throws RemoteException {\n this.ListenerClient.remove(user);\n this.ListenerClient.forEach(new BiConsumer<_User, _ClientListener>() {\n @Override\n public void accept(_User user, _ClientListener clientListener) {\n try {\n Logger.getGlobal().log(Level.INFO,\"User \" + user.getLogin() + \" leave the private chat\");\n } catch (RemoteException e) {\n e.printStackTrace();\n }\n }\n });\n }",
"public void deleteUser(ExternalUser userMakingRequest, String userId);",
"public static void deleteUser() {\n try {\n buildSocket();\n ClientService.sendMessageToServer(connectionToServer, ClientService.deleteUser());\n closeSocket();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"@Override\r\n public void userRemovedOnServer(User user) throws RemoteException, SQLException\r\n {\r\n property.firePropertyChange(\"userRemoved\", null, user);\r\n }",
"public void continueUserSwitch(UserState uss, int oldUserId, int newUserId) {\n Slog.d(\"ActivityManager\", \"Continue user switch oldUser #\" + oldUserId + \", newUser #\" + newUserId);\n if (this.mUserSwitchUiEnabled) {\n this.mInjector.getWindowManager().stopFreezingScreen();\n }\n uss.switching = false;\n this.mHandler.removeMessages(80);\n this.mHandler.sendMessage(this.mHandler.obtainMessage(80, newUserId, 0));\n stopGuestOrEphemeralUserIfBackground(oldUserId);\n stopBackgroundUsersIfEnforced(oldUserId);\n }",
"public void disconnectUser(User user) {\n connect();\n\n try {\n doStream.writeUTF(\"DISCONNECT\");\n doStream.writeUTF(user.getUserName());\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n disconnect();\n }",
"public void assignAuthorisedUser(final boolean val) {\n authorisedUser = val;\n }",
"public abstract void revokeMembership(String nickname);",
"void remove(User user) throws AccessControlException;",
"public void finishUserUnlocked(UserState uss) {\n UserState userState = uss;\n int userId = userState.mHandle.getIdentifier();\n if (StorageManager.isUserKeyUnlocked(userId)) {\n synchronized (this.mLock) {\n try {\n if (this.mStartedUsers.get(userState.mHandle.getIdentifier()) != userState) {\n try {\n } catch (Throwable th) {\n th = th;\n int i = userId;\n while (true) {\n try {\n break;\n } catch (Throwable th2) {\n th = th2;\n }\n }\n throw th;\n }\n } else if (!userState.setState(2, 3)) {\n }\n } catch (Throwable th3) {\n th = th3;\n int i2 = userId;\n while (true) {\n break;\n }\n throw th;\n }\n }\n }\n }",
"public boolean switchUser(int targetUserId) {\n enforceShellRestriction(\"no_debugging_features\", targetUserId);\n int currentUserId = getCurrentUserId();\n UserInfo targetUserInfo = getUserInfo(targetUserId);\n if (targetUserId == currentUserId) {\n Slog.i(\"ActivityManager\", \"user #\" + targetUserId + \" is already the current user\");\n return true;\n } else if (targetUserInfo == null) {\n Slog.w(\"ActivityManager\", \"No user info for user #\" + targetUserId);\n return false;\n } else if (!targetUserInfo.supportsSwitchTo()) {\n Slog.w(\"ActivityManager\", \"Cannot switch to User #\" + targetUserId + \": not supported\");\n return false;\n } else if (targetUserInfo.isManagedProfile()) {\n Slog.w(\"ActivityManager\", \"Cannot switch to User #\" + targetUserId + \": not a full user\");\n return false;\n } else {\n synchronized (this.mLock) {\n this.mTargetUserId = targetUserId;\n }\n UserInfo currentUserInfo = getUserInfo(this.mCurrentUserId);\n boolean isHiddenSpaceSwitch = this.mInjector.mService.mHwAMSEx.isHiddenSpaceSwitch(currentUserInfo, targetUserInfo);\n this.misHiddenSpaceSwitch = isHiddenSpaceSwitch;\n if (!this.mUserSwitchUiEnabled || isHiddenSpaceSwitch) {\n if (isHiddenSpaceSwitch) {\n long ident = Binder.clearCallingIdentity();\n try {\n this.mInjector.cleanAppForHiddenSpace();\n } finally {\n Binder.restoreCallingIdentity(ident);\n }\n }\n this.mHandler.removeMessages(START_USER_SWITCH_FG_MSG);\n this.mHandler.sendMessage(this.mHandler.obtainMessage(START_USER_SWITCH_FG_MSG, targetUserId, 0));\n } else {\n Pair<UserInfo, UserInfo> userNames = new Pair<>(currentUserInfo, targetUserInfo);\n this.mUiHandler.removeMessages(1000);\n this.mUiHandler.sendMessage(this.mHandler.obtainMessage(1000, userNames));\n }\n return true;\n }\n }",
"public void startUserInForeground(int targetUserId) {\n if (!startUser(targetUserId, true)) {\n this.mInjector.getWindowManager().setSwitchingUser(false);\n }\n }",
"public boolean checkUser(String room, String username) {\n return ((GroupChatPanel)grouptabs.get(room)).checkUser(username);\n }",
"public synchronized void sendPrivateMessageToPlayer(Player player, String message) {\n SlackUser user;\n if (isTestingMode) {\n user = session.findUserByUserName(testingModeUserName);\n } else {\n user = session.findUserByUserName(player.getUserName());\n }\n SlackMessageHandle<SlackChannelReply> openDirectHandle = session.openDirectMessageChannel(user);\n SlackChannel directChannel = openDirectHandle.getReply().getSlackChannel();\n session.sendMessage(directChannel, message, null);\n }",
"public void consume (User user) {\n \n for (StoredPower theirStoredPower : user.superPowers) {\n StoredPower myStoredPower = getOrCreateStoredPower(theirStoredPower.power);\n myStoredPower.used += theirStoredPower.used;\n \n // dont regift the icebreakers you get for free\n if (theirStoredPower.power == Power.ICE_BREAKER) {\n int add = Math.max(0, theirStoredPower.available - INITIAL_ICE_BREAKERS);\n myStoredPower.available += add;\n } else if (theirStoredPower.power == Power.KARMA) {\n int add = Math.max(0, theirStoredPower.available - INITIAL_KARMA);\n myStoredPower.available += add; \n } else {\n myStoredPower.available += theirStoredPower.available;\n }\n myStoredPower.level = Math.max(myStoredPower.level, theirStoredPower.level);\n myStoredPower.save();\n }\n \n for (Integer i : user.getSeenIceBreakers()) {\n this.addSeenIceBreaker(i);\n }\n \n for (KarmaKube k : user.getKubes()) {\n k.recipient_id = this.id;\n k.save(); \n }\n \n for (Long group_id : UserExclusion.userGroups(user.id)) {\n new UserExclusion(this.id, group_id);\n }\n \n this.coinCount += user.coinCount;\n this.coinsEarned += user.coinsEarned;\n this.chatTime += user.chatTime; \t\n this.messageCount += user.messageCount;\n this.gotMessageCount += user.gotMessageCount;\n this.joinCount += user.joinCount;\n this.offersMadeCount += user.offersMadeCount; \t\t\n this.offersReceivedCount += user.offersReceivedCount; \t\n this.revealCount += user.revealCount;\n this.save();\n \n user.delete();\n\t}",
"public void OnKickConfCallback(int nReason);",
"protected void onJoin(String channel, String sender, String login, String hostname) {}",
"public Image getKick(int player, boolean ep) {if (player==1) return kick1; else return kick2;}",
"void setPassedUser(User passedUser);",
"@Override\n\tpublic void removeMember(User user) throws Exception {\n\n\t}",
"public void removeOrDisconnectClient(String mqttClientChannelID, String unSubscribedTopic, String username,\n SubscriptionEvent action) throws MQTTException {\n\n log.info(\"Disconnecting channel for clientID: \" + mqttClientChannelID);\n\n Collection<MQTTSubscription> topicSubscriptionList;\n MQTTopics mqtTopics = topicSubscriptions.get(mqttClientChannelID);\n\n if (null != mqtTopics) {\n if (null == unSubscribedTopic) {\n //this means we need to remove all subscriptions relevant for the channel\n topicSubscriptionList = mqtTopics.getAllSubscriptionsForChannel();\n } else {\n topicSubscriptionList = new ArrayList<>();\n topicSubscriptionList.add(mqtTopics.getSubscription(unSubscribedTopic));\n }\n\n for (MQTTSubscription subscription : topicSubscriptionList) {\n //Will get the topic name bound for subscription\n String topic = subscription.getTopicName();\n //Will remove the subscriber off the list\n mqtTopics.removeSubscriber(topic);\n String subscriberChannelID = subscription.getSubscriberChannelID();\n UUID subscriberChannel = subscription.getSubscriptionChannel();\n boolean isCleanSession = subscription.isCleanSession();\n QOSLevel qos = subscription.getQOSLevel();\n //The corresponding subscription created cluster wide will be topic name and the local channel id\n //Will remove the subscriber cluster wide\n try {\n //Will indicate the disconnection of the topic\n if (action == SubscriptionEvent.DISCONNECT && MQTTUtils.isDurable(isCleanSession, qos.getValue())) {\n connector.disconnectSubscriber(this, topic, username, subscriberChannelID, subscriberChannel,\n isCleanSession, mqttClientChannelID, qos);\n } else {\n //If un-subscribed we need to remove the subscription off\n connector.removeSubscriber(this, topic, username, subscriberChannelID, subscriberChannel,\n isCleanSession, mqttClientChannelID, qos);\n }\n if (log.isDebugEnabled()) {\n final String message = \"Subscription with cluster id \" + subscriberChannelID + \" disconnected \" +\n \"from topic \" + topic;\n log.debug(message);\n }\n\n } catch (MQTTException ex) {\n //Should re state the connection of the subscriber back to the map\n mqtTopics.addSubscriber(unSubscribedTopic, subscription);\n final String error = \"Error occurred while removing the subscription \" + mqttClientChannelID;\n log.error(error, ex);\n throw ex;\n }\n }\n\n //Finally will check if there're any relevant subscriptions for the topic\n //If there arn't we could remove the entry\n if(mqtTopics.getAllSubscriptionsForChannel().isEmpty()){\n topicSubscriptions.remove(mqttClientChannelID);\n }\n } else {\n //If the connection is publisher based\n UUID publisherID = connector.removePublisher(mqttClientChannelID);\n if (null == publisherID) {\n log.warn(\"A subscriber or a publisher with Connection with id \" + mqttClientChannelID + \" cannot be \" +\n \"found to disconnect.\");\n }\n }\n }",
"private void doUnchokes() { \n\n\t\t// logic below is either 1 second or 10 secondly, bail out early id neither\n\n\t\tif( !UploadSlotManager.AUTO_SLOT_ENABLE ) {\t\t //manual per-torrent unchoke slot mode\n\n\t\t\tif( mainloop_loop_count % MAINLOOP_ONE_SECOND_INTERVAL != 0 ) { \n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfinal int max_to_unchoke = adapter.getMaxUploads(); //how many simultaneous uploads we should consider\n\t\t\tfinal ArrayList peer_transports = peer_transports_cow;\n\n\t\t\t//determine proper unchoker\n\t\t\tif( seeding_mode ) {\n\t\t\t\tif( unchoker == null || !(unchoker.isSeedingUnchoker()) ) {\n\t\t\t\t\tunchoker = UnchokerFactory.getSingleton().getUnchoker( true );\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif( unchoker == null || unchoker.isSeedingUnchoker()) {\n\t\t\t\t\tunchoker = UnchokerFactory.getSingleton().getUnchoker( false );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t\t//do main choke/unchoke update every 10 secs\n\t\t\t\n\t\t\tif ( mainloop_loop_count % MAINLOOP_TEN_SECOND_INTERVAL == 0 ){\n\n\t\t\t\tfinal boolean refresh = mainloop_loop_count % MAINLOOP_THIRTY_SECOND_INTERVAL == 0;\n\n\t\t\t\tunchoker.calculateUnchokes( max_to_unchoke, peer_transports, refresh, adapter.hasPriorityConnection());\n\n\t\t\t\tArrayList\tchokes \t\t= unchoker.getChokes();\n\t\t\t\tArrayList\tunchokes\t= unchoker.getUnchokes();\n\t\t\t\t\n\t\t\t\taddFastUnchokes( unchokes );\n\t\t\t\t\n\t\t\t\tUnchokerUtil.performChokes( chokes, unchokes );\n\t\t\t\t\n\t\t\t}else if ( mainloop_loop_count % MAINLOOP_ONE_SECOND_INTERVAL == 0 ) { //do quick unchoke check every 1 sec\n\n\t\t\t\tArrayList unchokes = unchoker.getImmediateUnchokes( max_to_unchoke, peer_transports );\n\n\t\t\t\taddFastUnchokes( unchokes );\n\t\t\t\t\n\t\t\t\tUnchokerUtil.performChokes( null, unchokes );\n\t\t\t}\n\t\t}\n\t}",
"User canceledUserRegistration(User user) throws LogicException;",
"void ban(String user);",
"public void removeUser (ChatContext chatContext, User user) {\n if (chatContext.removeUser(user)) {\n removeContext(chatContext);\n }\n }",
"@Override\n\tpublic void sudo(User user)\n\t{\n\t\tthis.user = user;\n\t}",
"public void revokeAccess(CommandSender sender, String[] args) {\n if (sender instanceof Player && ( ((Player) sender).hasPermission(\"mf.revokeaccess\") || ((Player) sender).hasPermission(\"mf.default\")) ) {\n\n Player player = (Player) sender;\n\n if (args.length > 1) {\n if (args[1].equalsIgnoreCase(\"cancel\")) {\n if (main.playersRevokingAccess.containsKey(player.getName())) {\n main.playersRevokingAccess.remove(player.getName());\n player.sendMessage(ChatColor.GREEN + \"Cancelled!\");\n return;\n }\n }\n }\n else {\n player.sendMessage(ChatColor.RED + \"Usage: /mf revokeaccess (player-name)\");\n return;\n }\n\n if (!main.playersRevokingAccess.containsKey(player.getName())) {\n main.playersRevokingAccess.put(player.getName(), args[1]);\n player.sendMessage(ChatColor.GREEN + \"Right click a locked block to revoke this player's access to it! Type '/mf revokeaccess cancel' to cancel!\");\n }\n else {\n player.sendMessage(ChatColor.RED + \"You have already entered this command! Type '/mf revokeaccess cancel' to cancel!\");\n }\n\n }\n\n }",
"public int restartUser(int userId, final boolean foreground) {\n return stopUser(userId, true, new IStopUserCallback.Stub() {\n public void userStopped(int userId) {\n UserController.this.mHandler.post(new Runnable(userId, foreground) {\n private final /* synthetic */ int f$1;\n private final /* synthetic */ boolean f$2;\n\n {\n this.f$1 = r2;\n this.f$2 = r3;\n }\n\n public final void run() {\n UserController.this.startUser(this.f$1, this.f$2);\n }\n });\n }\n\n public void userStopAborted(int userId) {\n }\n });\n }",
"public void setCmUser(final CmUser cmUser) {\n\t\tthis.cmUser = cmUser;\n\t}",
"public void sendContinueUserSwitchLU(UserState uss, int oldUserId, int newUserId) {\n this.mCurWaitingUserSwitchCallbacks = null;\n this.mHandler.removeMessages(30);\n this.mHandler.sendMessage(this.mHandler.obtainMessage(20, oldUserId, newUserId, uss));\n }",
"@Override\n public void onUserOffline(int uid, int reason) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n System.out.println(\"User offline\");\n onRemoteUserLeft();\n }\n });\n }",
"User getPlayerTurn() throws RemoteException;",
"public void ban(User other)\n {\n other.setBanned(true);\n }",
"void switchUser(@NonNull UserAccessToken currentToken, @NonNull String targetUserId, @Nullable String groupId, @Nullable ResponseCallback<UserAccessToken> callback);",
"public void deleteUser(Integer uid);",
"protected void missingChannel(SKU sku, String fullID) throws IOException {\r\n User.tell(User.CODE_MISSING_CHANNEL,Text.get(Format.class,\"e8a\",new Object[] { sku.toString(), getShortName() }),\r\n sku,Text.get(Format.class,\"e8b\",new Object[] { fullID }));\r\n throw (IOException) new IOException(Text.get(Format.class,\"e7\",new Object[] { sku.toString(), getShortName() }))\r\n .initCause(new ToldException(new LocalException(LocalStatus.CODE_ERR_ORD_CHANNEL)));\r\n }",
"public void setChannel(PowerChannel channel) {\n this.channel = channel;\n }",
"public void clientWasRemoved(ChannelId channelId);",
"public void process(Client user, Login msg) throws IOException, Exception {\n\n synchronized (user) {\n String userName = msg.getMessage();\n\n if (!usersConnected.containsKey(userName)) {\n user.setName(userName);\n user.setConnected(true);\n usersConnected.put(userName, user);\n bradcast(new Login(userName));\n } else {\n user.sendMessage(new Logout(Destination.SERVER.name(), userName));\n user.close();\n }\n }\n\n if (user.isConnected()) {\n user.sendMessage(new UserList(Destination.SERVER.name(), user.getName(), Type.USER_LIST, getClientUsersMap()));\n }\n }",
"@Override\n public void channelDisconnected(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception {\n ctx.getChannel().getRemoteAddress();\n System.out.println(ctx.getChannel().getRemoteAddress()+\" Disconnected..\");\n Client user = ServerTools.getClientByChannel(ctx.getChannel());\n if(Server.live_clients.contains(user)){\n Server.live_clients.remove(user);\n System.out.println(\"User removed\");\n }\n }"
]
| [
"0.7777384",
"0.7601229",
"0.70490867",
"0.6457023",
"0.6140004",
"0.61363465",
"0.59541506",
"0.5849011",
"0.560602",
"0.55782145",
"0.55742174",
"0.55604553",
"0.5467322",
"0.54473567",
"0.537071",
"0.51789254",
"0.5163876",
"0.51368064",
"0.5080264",
"0.50663817",
"0.5018443",
"0.49931738",
"0.4986051",
"0.49431595",
"0.49388492",
"0.4917319",
"0.4849921",
"0.4789911",
"0.4789788",
"0.47854352",
"0.4781381",
"0.4752788",
"0.47503316",
"0.47403762",
"0.47258797",
"0.4722704",
"0.46946377",
"0.4693926",
"0.4684498",
"0.4675333",
"0.46655867",
"0.4663166",
"0.46400476",
"0.46266282",
"0.46124777",
"0.4600664",
"0.45902553",
"0.4589224",
"0.45822227",
"0.45618957",
"0.4558306",
"0.4553904",
"0.45429125",
"0.45357022",
"0.45357022",
"0.45190454",
"0.45121735",
"0.45097297",
"0.45052063",
"0.45011216",
"0.4493472",
"0.44814965",
"0.44781342",
"0.4463712",
"0.44619986",
"0.44551152",
"0.44539392",
"0.4451076",
"0.44490308",
"0.4444089",
"0.44403127",
"0.44316337",
"0.44311652",
"0.44235772",
"0.44164154",
"0.4414558",
"0.4412786",
"0.44068563",
"0.44030917",
"0.44011825",
"0.43976817",
"0.4393314",
"0.43930614",
"0.43847537",
"0.4383444",
"0.4381044",
"0.43795288",
"0.43779612",
"0.43762144",
"0.4373204",
"0.4371456",
"0.43700448",
"0.43691894",
"0.4367411",
"0.43661267",
"0.43656135",
"0.4363775",
"0.4363091",
"0.43532056",
"0.43512753"
]
| 0.7853436 | 0 |
Sets a particular mode string at a channel. The specified mode may contain several actual mode strings; for example, to give operator privileges to the user with nickname "jcp" at the channel "test", this method could be called with the arguments "test", "+o jcp". Protocols other than IRC should interpret the mode string and translate it in some manner to the protocol's concepts. | public void setMode(String channel, String mode); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Builder setMode(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000100;\n mode_ = value;\n onChanged();\n return this;\n }",
"public void setMode(String mode) \n\t{\n\t\tthis.mode = string2Octal(mode);\n\t}",
"public void setMode(final String mode) {\n this.mode = checkEmpty(mode);\n }",
"public void setMode(String mode) {\n this.mode = mode;\n }",
"public void setMode(String mode){\n\t\tthis.mode=mode;\n\t}",
"public final void setCurrentMode(final String mode) {\n mCurrentMode = mode;\n }",
"public void setMode(String mode) {\n this.mode = mode == null ? null : mode.trim();\n }",
"public void setMode(short mode)\n\t{\n\t\tthis.mode = mode;\n\t}",
"private void setPortletMode(PortletURL url, String mode) {\n \n try {\n if (mode.equalsIgnoreCase(Modes._edit)) {\n \n url.setPortletMode(PortletMode.EDIT);\n \n } else if (mode.equalsIgnoreCase(Modes._view)) {\n \n url.setPortletMode(PortletMode.VIEW);\n \n } else if (mode.equalsIgnoreCase(Modes._help)) {\n \n url.setPortletMode(PortletMode.HELP);\n \n } else if (mode.equalsIgnoreCase(Modes._preview)) {\n \n url.setPortletMode(PortletMode.VIEW);\n \n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n \n }",
"public void setModeinfo( String modeinfo )\n {\n this.modeinfo = modeinfo;\n }",
"public void setMode(int mode) {\r\n\t\tthis.mode = mode;\r\n\t}",
"public void setMode(int mode){\n mMode = mode;\n }",
"void changeMode(int mode);",
"public void setMode(int mode) {\n this.mode = mode;\n }",
"public void setMode(int mode)\r\n {\r\n \r\n setMode_0(nativeObj, mode);\r\n \r\n return;\r\n }",
"public void setGameMode(char mode) throws IllegalArgumentException {\n if (mode != 'c' && mode != 'C' && mode != 'p' && mode != 'P') {\n throw new IllegalArgumentException(\"Invalid Input: \" + mode);\n }\n if (mode == 'c' || mode == 'C') {\n gameMode = 0;\n } else {\n gameMode = 1;\n }\n }",
"boolean setMode(int mode);",
"public void setMode(String mode) {\n if (\"null\".equals(mode)) {\n mode = null;\n }\n\n if (mode == null || mode.equals(MODE_VALUE_GEOSPATIAL)) {\n this.mode = mode;\n } else {\n throw new AppEngineConfigException(\"Invalid mode: '\" + mode);\n }\n }",
"public static void setCurrentMode(Modes mode){\n\t\tcurrentMode = mode;\n\t}",
"public void setMode(String mode) {\n\t\tgetStateHelper().put(OutputSourceCodePropertyKeys.mode, mode);\n\t}",
"public void setMode(InteractMode newMode) {\r\n\t\tcurrentMode = newMode;\r\n\t\tlastModeSwitch = System.currentTimeMillis();\r\n\t}",
"public void setCategory (String mode) { category = mode; }",
"public void setMode(int i) {\r\n\t\t_mode = i;\r\n\t}",
"@JsonProperty(\"mode\")\n public void setMode(String mode) {\n this.mode = mode;\n }",
"public void setMode(String value) {\n _avTable.set(ATTR_MODE, value);\n }",
"public com.google.protobuf.ByteString\n getModeBytes() {\n java.lang.Object ref = mode_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n mode_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public void setMode(String[] args) {\n\t\t\tfor (String arg : args) {\n\t\t\t\tif (arg.equals(\"-i\")) {\n\t\t\t\t\tthis.mode = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}",
"public void setMetrMode(final int[] mode) {\n\t\tif (mode==null || mode.length!=4) {\n\t\t\tthrow new IllegalArgumentException(\"Invalide metrology mode\");\n\t\t}\n\t\tThread t = new Thread(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\tString modeStr=\"[\"+mode[0]+\", \"+mode[1]+\", \"+mode[2]+\", \"+mode[3]+\"]\";\n\t\t\t\ttry {\n\t\t\t\t\tlogger.log(AcsLogLevel.DEBUG,\"Setting metrology mode to \"+modeStr);\n\t\t\t\t\tmount.SET_METR_MODE(mode);\n\t\t\t\t\tlogger.log(AcsLogLevel.DEBUG,\"Metrology mode set to \"+modeStr);\n\t\t\t\t} catch (Throwable t) {\n\t\t\t\t\tAcsJMetrologyEx ex = new AcsJMetrologyEx(t);\n\t\t\t\t\tex.setAntennatype(AntennaType.VERTEX.description);\n\t\t\t\t\tex.setOperation(\"Invalid metrology mode\");\n\t\t\t\t\tnotifier.commandExecuted(0,\"Set Vertex metr mode to \"+modeStr,\"Error from remote component while setting metrology mode to \"+modeStr,ex);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tt.setDaemon(true);\n\t\tt.setName(\"Vertex:setMetrMode\");\n\t\tt.start();\n\t}",
"public void setModele(java.lang.String modele) {\n this.modele = modele;\n }",
"@Override\n\tpublic void setMode(int mode) {\n\t\t\n\t}",
"public void setMode(int inMode) {\n mode = inMode;\n }",
"public java.lang.String getMode() {\n java.lang.Object ref = mode_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n mode_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public com.google.protobuf.ByteString\n getModeBytes() {\n java.lang.Object ref = mode_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n mode_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public java.lang.String getMode() {\n java.lang.Object ref = mode_;\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 mode_ = s;\n }\n return s;\n }\n }",
"public void setMode(WhichVariables mode)\n\t{\n\t\tif (!mode.equals(m_mode))\n\t\t{\n\t\t\tm_mode = mode;\n\t\t\tm_viewer.refresh();\n\t\t}\n\t}",
"public void setMode(int i){\n\tgameMode = i;\n }",
"java.lang.String getMode();",
"public void setModeId(Integer modeId) {\n this.modeId = modeId;\n }",
"protected ModeFlags updateModesFromOptions(ThreadContext context, RubyHash options, ModeFlags modes) {\n if (options == null || options.isNil()) return modes;\n \n Ruby runtime = context.getRuntime();\n \n if (options.containsKey(runtime.newSymbol(\"mode\"))) {\n modes = parseModes19(context, options.fastARef(runtime.newSymbol(\"mode\")).asString());\n }\n \n // This duplicates the non-error behavior of MRI 1.9: the\n // :binmode option is ORed in with other options. It does\n // not obliterate what came before.\n \n if (options.containsKey(runtime.newSymbol(\"binmode\")) &&\n options.fastARef(runtime.newSymbol(\"binmode\")).isTrue()) {\n try {\n modes = new ModeFlags(modes.getFlags() | ModeFlags.BINARY);\n } catch (InvalidValueException e) {\n /* n.b., this should be unreachable\n because we are changing neither read-only nor append\n */\n throw getRuntime().newErrnoEINVALError();\n }\n }\n \n // This duplicates the non-error behavior of MRI 1.9: the\n // :binmode option is ORed in with other options. It does\n // not obliterate what came before.\n \n if (options.containsKey(runtime.newSymbol(\"binmode\")) &&\n options.fastARef(runtime.newSymbol(\"binmode\")).isTrue()) {\n try {\n modes = new ModeFlags(modes.getFlags() | ModeFlags.BINARY);\n } catch (InvalidValueException e) {\n /* n.b., this should be unreachable\n because we are changing neither read-only nor append\n */\n throw getRuntime().newErrnoEINVALError();\n }\n }\n \n // FIXME: check how ruby 1.9 handles this\n \n // if (rubyOptions.containsKey(runtime.newSymbol(\"textmode\")) &&\n // rubyOptions.fastARef(runtime.newSymbol(\"textmode\")).isTrue()) {\n // try {\n // modes = getIOModes(runtime, \"t\");\n // } catch (InvalidValueException e) {\n // throw getRuntime().newErrnoEINVALError();\n // }\n // }\n //\n // if (rubyOptions.containsKey(runtime.newSymbol(\"binmode\")) &&\n // rubyOptions.fastARef(runtime.newSymbol(\"binmode\")).isTrue()) {\n // try {\n // modes = getIOModes(runtime, \"b\");\n // } catch (InvalidValueException e) {\n // throw getRuntime().newErrnoEINVALError();\n // }\n // }\n \n return modes;\n }",
"public void setMode(int mode) {\n \t\treset();\n \t}",
"public final void setGameMode(int mode)\n {\n switch (mode) {\n case WildLifeGame.MODE_CONSOLE:\n modeConsole = true;\n break;\n case WildLifeGame.MODE_WINDOW:\n modeConsole = false;\n break;\n }\n if (modeConsole) {\n System.out.println(\"Le jeu fonctionne en mode console...\");\n }\n }",
"public void setPortMode(String mode){\r\n\t\tthis.portMode=mode;\r\n\t\tif(!portMode.equals(\"floating\")){\r\n\t\t\tthis.currentPort=(new Integer(portMode)).intValue();\r\n\t\t}\r\n\t}",
"public void setMode(int mode) {\r\n this.mode = mode;\r\n setSleeping(mode == MODE_EMPTY);\r\n repaint();\r\n }",
"public void setMode(boolean value) {\n this.mode = value;\n }",
"public void changePlayerMode(PlayerMode p) {\n\t\t\r\n\t\tplayerMode = p;\r\n\t\tif (playerMode != PlayerMode.manual) decideMakeAutomaicMove();\r\n\t\t\r\n\t\t\r\n\t}",
"public Builder setMode(int mode){\n mMode = mode;\n return this;\n }",
"private void __selectMode(Gamemode mode) throws IOException {\n Game game = new Game(mode);\n MainApp.setGameState(game);\n MainApp.setRoot(Views.TOPIC);\n }",
"public Builder setModeBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000100;\n mode_ = value;\n onChanged();\n return this;\n }",
"public void setMode(DcMotor.RunMode mode) {\n lDrive.setMode(mode);\n rDrive.setMode(mode);\n }",
"public String getMode(){\r\n\t\treturn mode;\r\n\t}",
"public void setMode(int m) {\n if (m == LIST || m == EXTRACT)\n mode = m;\n }",
"public void setMode(SwerveMode newMode) {\n\t\tSmartDashboard.putString(\"mode\", newMode.toString());\n // Re-enable SwerveModules after mode changed from Disabled\n if (mode == SwerveMode.Disabled) {\n for (SwerveModule mod: modules) {\n mod.enable();\n }\n }\n mode = newMode;\n int index = 0; // Used for iteration\n switch(newMode) {\n case Disabled:\n for (SwerveModule mod: modules) {\n mod.setSpeed(0);\n mod.disable();\n }\n break;\n case FrontDriveBackDrive:\n for (SwerveModule mod: modules) {\n mod.unlockSetpoint();\n mod.setSetpoint(RobotMap.forwardSetpoint);\n }\n break;\n case FrontDriveBackLock:\n for (SwerveModule mod: modules) {\n if (index < 2) {\n mod.unlockSetpoint();\n mod.setSetpoint(RobotMap.forwardSetpoint);\n }\n else {\n mod.unlockSetpoint();\n\n mod.lockSetpoint(RobotMap.forwardSetpoint);\n }\n index++;\n }\n break;\n case FrontLockBackDrive:\n for (SwerveModule mod: modules) {\n if (index > 1) {\n mod.unlockSetpoint();\n }\n else {\n mod.unlockSetpoint();\n\n mod.lockSetpoint(RobotMap.forwardSetpoint);\n }\n index++;\n }\n break;\n case StrafeLeft:\n for (SwerveModule mod: modules) {\n \t\tmod.unlockSetpoint();\n mod.lockSetpoint(RobotMap.leftSetpoint);\n }\n break;\n case StrafeRight:\n for (SwerveModule mod: modules) {\n \t\tmod.unlockSetpoint();\n mod.lockSetpoint(RobotMap.rightSetpoint);\n }\n break;\n default:\n break;\n\n }\n}",
"public final void setCurrentModeUI(final String modeUI) {\n mCurrentModeUI = modeUI;\n }",
"public Builder setChannel(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000200;\n channel_ = value;\n onChanged();\n return this;\n }",
"public void setMode(DcMotor.RunMode mode) {\n leftFront.setMode(mode);\n leftRear.setMode(mode);\n rightFront.setMode(mode);\n rightRear.setMode(mode);\n }",
"public void setDoblyMode (String mode) {\n int i = Integer.parseInt(mode);\n if (i >= 0 && i <= 3) {\n writeSysfs(AUIDO_DSP_AC3_DRC, \"drcmode\" + \" \" + mode);\n } else {\n writeSysfs(AUIDO_DSP_AC3_DRC, \"drcmode\" + \" \" + \"2\");\n }\n }",
"public com.anychart.scales.ScatterTicks mode(String mode) {\n APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + \".mode(%s);\", wrapQuotes(mode)));\n\n return this;\n }",
"@Override\n public void setMode(RunMode mode) {\n\n }",
"private static void SetMode() {\n Enum[] modes = {Mode.SINGLEPLAYER, Mode.MULTIPLAYER};\r\n // setting GameMode by passing in array to validator which will prompt what Enum is wanted\r\n Game.GameMode = (Mode) Validator.Mode(modes);\r\n }",
"protected void setMode(int bitIndex, boolean value) {\n modes.set(bitIndex, value);\n }",
"public void setWmode(String wmode) {\n\t\tthis.wmode = wmode;\n\t\tthis.handleConfig(\"wmode\", wmode);\n\t}",
"public void setMode(int mode0) {\n\t\t// invalid mode?\n\t\tint mode = mode0;\n\t\tif (mode != MODE_IMAGES && mode != MODE_GEOGEBRA\n\t\t\t\t&& mode != MODE_GEOGEBRA_SAVE && mode != MODE_DATA) {\n\t\t\tLog.debug(\n\t\t\t\t\t\"Invalid file chooser mode, MODE_GEOGEBRA used as default.\");\n\t\t\tmode = MODE_GEOGEBRA;\n\t\t}\n\n\t\t// do not perform any unnecessary actions\n\t\tif (this.currentMode == mode) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (mode == MODE_GEOGEBRA) { // load/save ggb, ggt etc. files\n\t\t\tsetMultiSelectionEnabled(true);\n\t\t} else { // load images\n\t\t\tsetMultiSelectionEnabled(false);\n\t\t}\n\n\t\t// set the preview panel type: image, data or ?\n\t\tpreviewPanel.setPreviewPanelType(mode);\n\n\t\t// TODO apply mode specific settings..\n\n\t\tthis.currentMode = mode;\n\t}",
"public void changeConfigurationMode(EditorMode mode) {\n\t\tif (mode == EditorMode.scripterMode) {\n\t\t\tassistant.setContentAssistProcessor(new ScripterAssistProcessor(),\n\t\t\t\t\tIDocument.DEFAULT_CONTENT_TYPE);\n\t\t\tscriptScanner.changeSetOfKeywords(EditorMode.scripterMode);\n\t\t}\n\t\tif (mode == EditorMode.combinerMode) {\n\t\t\tassistant.setContentAssistProcessor(new CombinerAssistProcessor(),\n\t\t\t\t\tIDocument.DEFAULT_CONTENT_TYPE);\n\t\t\tscriptScanner.changeSetOfKeywords(EditorMode.combinerMode);\n\t\t}\n\t}",
"public void setModelo(String Modelo) {\n this.Modelo = Modelo;\n }",
"public String getMode() {\n return mode;\n }",
"public String getMode() {\n return mode;\n }",
"private static native void setMode_0(long nativeObj, int mode);",
"public void setMode(UploadMode mode) {\n this.mode = mode;\n }",
"public String getMode() {\n\n return mode;\n\n }",
"public void setMode(int newMode) {\n\t\tint oldMode = mode; \n\t\tmode = newMode;\n\t\tif(mode != REPAIR_MODE || mode != SELL_MODE) \n\t\t\tlblMouse.setText(\"\");\n\t\tif(mode == REPAIR_MODE) \n\t\t\tlblMouse.setText(\"REPAIR\");\n\t\telse if(mode == SELL_MODE) \n\t\t\tlblMouse.setText(\"SELL\"); \n\t\tif(mode == PAUSE_MODE) { \n\t\t\tlblPause.setVisible(true);\n\t\t\tgameEngine.togglePaused();\n\t\t\t//gameEngine.stopRender(); \n\t\t\tdoTrapThread = false;\n\t\t\tdoMonsterThread = false;\n\t\t\tdoMapThread = false;\n\t\t\tgameHud.toggleButtons();\n\t\t}\n\t\tif(oldMode == PAUSE_MODE && mode != PAUSE_MODE) {\n\t\t\tgameHud.toggleButtons();\n\t\t\tgameEngine.togglePaused();\n\t\t\t//gameEngine.startRender();\n\t\t\tdoTrapThread = true;\n\t\t\tdoMonsterThread = true;\n\t\t\tdoMapThread = true;\n\t\t\tlblPause.setVisible(false);\n\t\t}\n\t\t\n\t\tif(oldMode == BUY_MODE && mode != BUY_MODE) {\n\t\t\t//purchase = null;\n\t\t\t\n\t\t}\n\t\t\n\t}",
"public void setSupportMode(int mode) {\n // skip to avoid useless operation\n if (mSupportMode == mode) return;\n\n if (mode == MODE_AUTOMOTIVE) {\n mSupportMode = MODE_AUTOMOTIVE;\n setupAutomotiveMode();\n } else if (mode == MODE_ONE_MULTIILINE_TEXTVIEW) {\n mSupportMode = MODE_ONE_MULTIILINE_TEXTVIEW;\n if (null != mPrimaryView) {\n mPrimaryView.setState(ActionBarTextView.PRIMARY_MULTILINE_ONLY);\n }\n setSecondaryVisibility(View.GONE);\n\n } else {\n mSupportMode = MODE_DEFAULT;\n }\n getDefaultHeight();\n adjustPrimaryState();\n adjustSecondaryState();\n }",
"public String getMode()\n {\n return mode;\n }",
"public void setMode(Mode type) {\n this.mode = type;\n if (type == Mode.THREE_STATE)\n value = null;\n else\n value = false;\n }",
"public void setMode(final int type) {\r\n\t\tif (current != null) {\r\n\t\t\tcurrent.setMode(type);\r\n\t\t\telementView.repaint();\r\n\t\t\tnotifyModificationListeners();\r\n\t\t}\r\n\t}",
"public void setMode(\n @Pattern(regexp = \"FIXED_WIDTH_RECORD|DELIMITED_RECORD\", flags = Pattern.Flag.CASE_INSENSITIVE) String mode)\n {\n this.mode = RECORD_READER_MODE.valueOf(mode.toUpperCase());\n }",
"public Builder setChannel(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n channel_ = value;\n onChanged();\n return this;\n }",
"public void setDisplayMode(final int mode) {\n if (mode != this.displayMode) {\n this.displayMode = mode;\n this.gridPanel.setLayout(new GridLayout(0,\n this.displayMode == CONT_FACING ? 2 : 1));\n reload();\n }\n }",
"void setMode(SolvingMode solvingMode);",
"@Override\r\n\tpublic void changePlayerMode(PlayerMode mode) {\r\n\t\tthis.playerMode = mode;\r\n\t\tdecideMakeAutomaticMove();\r\n\t}",
"public void setShipMode(String value) {\n setAttributeInternal(SHIPMODE, value);\n }",
"private void sendModeChanged(\n SimulcastMode newMode, SimulcastMode oldMode)\n {\n if (newMode == null)\n {\n // Now, why would you want to do that?\n sendMode = null;\n logger.debug(\"Setting simulcastMode to null.\");\n return;\n }\n else if (newMode == SimulcastMode.REWRITING)\n {\n logger.debug(\"Setting simulcastMode to rewriting mode.\");\n sendMode = new RewritingSendMode(this);\n }\n else if (newMode == SimulcastMode.SWITCHING)\n {\n logger.debug(\"Setting simulcastMode to switching mode.\");\n sendMode = new SwitchingSendMode(this);\n }\n\n this.sendMode.receive(targetOrder);\n }",
"void setMotorsMode(DcMotor.RunMode runMode);",
"public final void setModeEntity(final ReturnModeXct cModeEntity) {\n\t\tthis.modeEntity = cModeEntity.toString();\n\t}",
"public void setModeOfConveyance (java.lang.String modeOfConveyance) {\n\t\tthis.modeOfConveyance = modeOfConveyance;\n\t}",
"static void ChangeServerMode(String serverMode, String hostname){\n Socket socket;\n BufferedReader fromServer;\n PrintStream toServer;\n String textFromServer;\n\n try {\n // open connection to JokeServer admin client on port#: 5050\n // this is the admin port on the server\n socket = new Socket(hostname, 5050);\n\n // open input/output streams for socket to server\n fromServer = new BufferedReader(new InputStreamReader(socket.getInputStream()));\n toServer = new PrintStream(socket.getOutputStream());\n\n // send the server mode and log it\n JokeClientAdmin.Logger(\"Changing JokeServer Mode to: \" + serverMode);\n toServer.println(serverMode.toLowerCase());\n toServer.flush();\n\n // read response from server and block while waiting for other connections from clients\n // will only read 1-3 lines of output from the server at a time\n for (int i = 1; i <=3; i++){\n textFromServer = fromServer.readLine();\n if (textFromServer != null){\n System.out.println(\"\\nServer response: \"+ textFromServer);\n JokeClientAdmin.Logger(\"Server response: \"+ textFromServer);\n }\n }\n // close socket once communication has completed or user ends session\n socket.close();\n }\n catch (IOException exception) {\n System.out.println(\"Socket error\");\n exception.printStackTrace();\n }\n }",
"public void setCellAccessModeValue(YangString cellAccessModeValue)\n throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"cell-access-mode\",\n cellAccessModeValue,\n childrenNames());\n }",
"@Override\n\tpublic String getMode() {\n\t\treturn this.mode;\n\t}",
"private void _setMode(String name) {\n Mode oldValue = getMode();\n setMode(Mode.getMode(name, oldValue));\n }",
"public static String getMode() {\n\t\treturn \"rs232 mode get\" + delimiter + \"rs232 mode get \";\n\t}",
"public void saveSettingsMode(int value) {\n SQLiteDatabase database = getReadableDatabase();\n\n String query = \"UPDATE Setting SET Mode = \" + value;\n\n database.execSQL(query);\n }",
"public final void setRoom(com.mendix.systemwideinterfaces.core.IContext context, java.lang.String room)\r\n\t{\r\n\t\tgetMendixObject().setValue(context, MemberNames.Room.toString(), room);\r\n\t}",
"Main(String mode) {\n if (mode.equals(\"game\")) {\n createGameMode();\n } else {\n createSimulatorMode();\n }\n }",
"public void setMatchMode(StringMatchMode matchMode) {\r\n\t\tthis.matchMode = matchMode;\r\n\t}",
"public void setModelo(String modelo) {\n\t\tthis.modelo = modelo;\n\t}",
"public void setMode(int mode) {\r\n switch (mode) {\r\n case CentroidUserObject.VARIANCES_MODE:\r\n setDrawVariances(true);\r\n setDrawValues(false);\r\n break;\r\n case CentroidUserObject.VALUES_MODE:\r\n setDrawVariances(false);\r\n setDrawValues(true);\r\n break;\r\n }\r\n }",
"public final void mT__43() throws RecognitionException {\n try {\n int _type = T__43;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // InternalUniMapperGenerator.g:22:7: ( 'mode' )\n // InternalUniMapperGenerator.g:22:9: 'mode'\n {\n match(\"mode\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"public String getMode()\n {\n return mode.toString();\n }",
"private void handleType(String mode) {\n if (mode.toUpperCase().equals(\"A\")) {\n transferMode = transferType.ASCII;\n sendMsgToClient(\"200 OK\");\n } else if (mode.toUpperCase().equals(\"I\")) {\n transferMode = transferType.BINARY;\n sendMsgToClient(\"200 OK\");\n } else\n sendMsgToClient(\"504 Not OK\");\n ;\n\n }",
"public void setMode(int mode) {\n if (currentEventHandler != null) {\n currentEventHandler.setActive(false);\n }\n\n switch (mode) {\n case ADD_MODE: currentEventHandler = addEventHandler;\n canvas.setCursor(Cursor.getPredefinedCursor(Cursor.CROSSHAIR_CURSOR));\n break;\n case PAN_MODE: currentEventHandler = panEventHandler;\n canvas.setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR));\n break;\n case REMOVE_MODE: currentEventHandler = removeEventHandler;\n canvas.setCursor(Cursor.getPredefinedCursor(Cursor.CROSSHAIR_CURSOR));\n break;\n case AUTO_MODE: currentEventHandler = autoEventHandler;\n canvas.setCursor(Cursor.getPredefinedCursor(Cursor.CROSSHAIR_CURSOR));\n break;\n }\n\n if (currentEventHandler != null) {\n currentEventHandler.setActive(true);\n }\n }",
"public abstract OpenMode getMode() throws MessagingException;"
]
| [
"0.697594",
"0.6788939",
"0.67678267",
"0.65855914",
"0.65727496",
"0.6436192",
"0.64239675",
"0.62484175",
"0.6196236",
"0.6063364",
"0.6063058",
"0.6052166",
"0.6045839",
"0.60366553",
"0.5997485",
"0.5993648",
"0.5983368",
"0.595941",
"0.5844439",
"0.58301103",
"0.58274573",
"0.5773791",
"0.5738117",
"0.57356375",
"0.5699551",
"0.56865656",
"0.5651097",
"0.5645854",
"0.5645455",
"0.5621821",
"0.5599137",
"0.55140555",
"0.55099833",
"0.55012286",
"0.5440678",
"0.54402417",
"0.5405032",
"0.53762543",
"0.53743035",
"0.537147",
"0.5359204",
"0.53215206",
"0.5299256",
"0.52838606",
"0.52759856",
"0.52366537",
"0.5178469",
"0.51685643",
"0.5162677",
"0.5160673",
"0.5159562",
"0.51156914",
"0.5091486",
"0.50914484",
"0.5079533",
"0.506712",
"0.5060738",
"0.50156385",
"0.5011216",
"0.49786994",
"0.49733683",
"0.49583068",
"0.4946948",
"0.49413958",
"0.4919314",
"0.4919314",
"0.49161816",
"0.49036562",
"0.49004135",
"0.48911414",
"0.48683",
"0.4857461",
"0.4853022",
"0.48376876",
"0.4832203",
"0.48155695",
"0.48109853",
"0.47955224",
"0.47743884",
"0.4754122",
"0.4754122",
"0.47489938",
"0.47467703",
"0.47348735",
"0.4733858",
"0.47234222",
"0.47201443",
"0.47167355",
"0.46940753",
"0.4692209",
"0.4689819",
"0.468907",
"0.46869266",
"0.46813947",
"0.46759558",
"0.46538416",
"0.46416622",
"0.46310794",
"0.46288356",
"0.46274486"
]
| 0.7900372 | 0 |
Returns true if this protocol is currently connected to the server, false if it is not. | public boolean isConnected(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isConnected() {\n\t\treturn sock != null;\n\t}",
"public boolean isConnected() {\n return (this.session != null && this.session.isConnected());\n }",
"public boolean isConnected() {\n if (client == null) {\n return false;\n }\n return client.isConnected();\n }",
"public boolean isConnected() {\n if (mState == STATE_CONNECTED) {\n return true;\n }\n return false;\n }",
"public boolean isConnected() {\n\t\treturn conn != null;\n\t}",
"public boolean isConnected() {\n return mConnectionSocket.isConnected() && !mConnectionSocket.isClosed();\n }",
"public boolean isConnected() {\n return connectionSocket.isConnected();\n }",
"@Override\n public boolean isConnected() {\n boolean result = false;\n synchronized (CONN_SYNC) {\n result = ((system != null) && system.isConnected());\n }\n return result;\n }",
"public boolean isConnected() {\r\n\t\treturn backend != null;\r\n\t}",
"public static boolean isConnected() { return irc != null && irc.isConnected(); }",
"public static boolean isConnected() {\n return (getCon() != null);\n }",
"public boolean isConnected() {\n\t\t\treturn (m_soundManager instanceof RemoteSoundManager);\n\t\t}",
"public boolean isConnected() {\n\t\treturn this.isConnected;\n\t}",
"public boolean connectionActive() {\n\t\tif (socketConnection == null) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn socketConnection.isConnected();\n\t\t}\n\t}",
"public boolean isConnected() {\n return isConnected;\n }",
"public boolean isConnected()\n {\n return isConnected;\n }",
"private boolean isConnected() {\n\t\treturn (this.serverConnection!=null); \n }",
"public boolean isConnected(){\r\n\t\treturn connected;\r\n\t}",
"protected boolean isConnected() {\n\t\tif (channel == null) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn channel.isOpen();\n\t\t}\n\t}",
"public boolean isConnected() {\n\t\treturn connected;\n\t}",
"public boolean isConnected() {\n\t\treturn connected;\n\t}",
"public boolean isConnected() {\n return this.connected;\n }",
"public boolean isConnected() {\n return this.connected;\n }",
"public final boolean isConnected() {\n\t\t// retornamos si existe una conexion\n\t\treturn this.getConnection() != null;\n\t}",
"public boolean isConnected()\n {\n return connectionId != GatewayProcess.NO_CONNECTION_ID;\n }",
"public boolean isConnected()\n {\n return connected;\n }",
"public boolean isConnected() {\n return connected;\n }",
"public boolean isConnected() {\n return connected;\n }",
"public boolean isConnected() {\n return connected;\n }",
"public boolean isConnected() {\n return connected;\n }",
"public boolean isConnected() {\n return connected;\n }",
"public boolean isConnected() {\r\n return connected;\r\n }",
"public boolean isConnected() {\n\t\tif (m == null) return false;\n\t\telse return true;\n\t}",
"public boolean isConnected() {\n \t\treturn connected;\n \t}",
"public boolean isConnected() {\n PublishSubscriber<T> c = state.current;\n return c.connected && !c.done && !c.isDisposed();\n }",
"public boolean isConnecting ()\r\n\t{\r\n\t\tsynchronized (this)\r\n\t\t{\r\n\t\t\treturn _roboCOM!=null;\r\n\t\t}\r\n\t}",
"public boolean isConnected() {\r\n\treturn connected;\r\n }",
"public boolean isConnecting() {\n PublishSubscriber<T> c = state.current;\n return c.connecting && !c.connected && !c.done && !c.isDisposed();\n }",
"public boolean isConnected() {\n return (this.bluetoothSocket != null);\n }",
"public boolean isConnected(){\n return isConnected;\n }",
"public boolean isConnected() {\n boolean status = false;\n try {\n status = connection != null && !connection.isClosed();\n } catch (SQLException ex) {\n LOGGER.log(Level.SEVERE, \"Unable to check connection status: {0}\", ex);\n }\n\n return status;\n }",
"public boolean isConnected() {\n return mConnected;\n }",
"public boolean isConnected() {\n HiLog.info(LOG_LABEL, \"isConnected: %{public}b\", new Object[]{Boolean.valueOf(this.mIsConnected)});\n return this.mIsConnected;\n }",
"public static boolean isConnected()\r\n\t{\r\n\t\t return Globals.connected ;\r\n\t}",
"private boolean isConnected() {\n if (skylinkConnection != null) {\n return skylinkConnection.isConnected();\n }\n return false;\n }",
"public boolean isConnected(){\n return connected;\n }",
"public boolean getIsConnected() {\n return isConnected;\n }",
"public static boolean hasConnected() {\n return sHasConnected;\n }",
"boolean isConnected();",
"boolean isConnected();",
"boolean isConnected();",
"boolean isConnected();",
"boolean isConnected();",
"boolean isConnected();",
"boolean isConnected();",
"boolean isConnected();",
"public boolean isConnectedToRemoteDevice() {\n return mConnectionManager.isConnected();\n }",
"public boolean isConnecting() {\n if (mState == STATE_CONNECTING) {\n return true;\n }\n return false;\n }",
"public boolean isConnected() {\n return dataChannel != null && dataChannel.isConnected();\n }",
"public boolean isConnected() {\n\t\treturn juraMqttClient != null && juraMqttClient.isConnected();\n\t}",
"public boolean isConnected() {\n\t\tfinal String METHOD = \"isConnected\";\n\t\tboolean connected = false;\n\t\tif (mqttAsyncClient != null) {\n\t\t\tconnected = mqttAsyncClient.isConnected();\n\t\t} else if (mqttClient != null) {\n\t\t\tconnected = mqttClient.isConnected();\n\t\t}\n\t\tLoggerUtility.log(Level.FINEST, CLASS_NAME, METHOD, \"Connected(\" + connected + \")\");\n\t\treturn connected;\n\t}",
"public boolean isOnline()\n\t{\t\t\n\t\treturn chatConnection.isConnected();\n\t}",
"public static boolean isConnected() {\r\n\t\treturn dfl != null;\r\n\t}",
"@Override\n public boolean isConnected()\n {\n return connected;\n }",
"@Override\n public boolean isConnected() {\n return connected;\n }",
"public boolean isConnected() {\n ConnectivityManager manager = (ConnectivityManager)getSystemService(CONNECTIVITY_SERVICE);\n NetworkInfo info = manager.getActiveNetworkInfo();\n if (info != null && info.isConnected()) {\n return true;\n } else {\n return false;\n }\n }",
"boolean isConnected() {\n \t\tif (fConnected == null)\n \t\t\treturn false;\n \t\treturn !fConnected.isEmpty();\n \t}",
"public boolean isNetworkConnected() {\n NetworkInfo networkInfo = this.mNetInfo;\n return networkInfo != null && networkInfo.isConnectedOrConnecting();\n }",
"public boolean isConnected() {\n \tContext context = this.getApplicationContext();\n \t/** Create, if not exists, the preference GraviolaMOB. */\n SharedPreferences settings = context.getSharedPreferences(\"GraviolaMOB\", MODE_PRIVATE);\n /** Check the preference connectivity and return false if is not set. */\n return settings.getBoolean(\"connectivity\", false);\n }",
"public boolean isStartConnected() {\r\n return startConnected;\r\n }",
"@Override\n public boolean isOnline() {\n if(mSocket != null && mSocket.isConnected())\n return true;\n return false;\n }",
"public boolean CheckConnected() {\n return (tcp.Status() == TCP._CONNECTED);\n }",
"public boolean isConnected() {\n\t\treturn isCreated() && mqttClient.isConnected();\n\t}",
"public boolean isConnectedToGame() {\n return this.isConnectedToGame;\n }",
"private boolean isConnected() {\n if (mStarted && mClient != null && !mClient.isConnected()) {\n Log.e(LOG_TAG, \"MQTT Client not connected.\");\n if (DEBUG) {\n\tLog.e(LOG_TAG, \"isConnected[mStarted:\" + mStarted + \", mClient:\" + mClient + \"]\");\n }\n }\n\n return mClient != null && (mStarted && mClient.isConnected());\n }",
"private boolean isConnected() {\n try {\n return (conn != null) && conn.isValid(0);\n } catch (SQLException ex) {\n Logger.getLogger(DB.class.getName()).log(Level.SEVERE, null, ex);\n }\n return false;\n }",
"@Override\r\n\tpublic boolean isConnected() {\n\t\treturn false;\r\n\t}",
"public boolean isConnectionActive(){\n return this.connectionActive;\n }",
"protected abstract boolean isConnected();",
"public boolean isConnectionActive ()\r\n\t{\r\n\t\tsynchronized (this)\r\n\t\t{\r\n\t\t\treturn _bbCanSend;\r\n\t\t}\r\n\t}",
"public boolean isConnected() {\n return (chord != null);\n }",
"private Boolean isConnected() {\r\n ConnectivityManager cm = (ConnectivityManager) this.getSystemService(Context.CONNECTIVITY_SERVICE);\r\n NetworkInfo activeNetwork = cm.getActiveNetworkInfo();\r\n Boolean isConnected = activeNetwork != null && activeNetwork.isConnectedOrConnecting();\r\n return isConnected;\r\n }",
"@Override\n\tpublic boolean isConnected() {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isConnected() {\n\t\treturn false;\n\t}",
"private boolean isOpened() {\n if (mIpcChannel != null && mIpcChannel.isOpened()) {\n return true;\n }\n\n return false;\n }",
"private boolean isNetworkConnected() {\n NetworkHelper networkHelper = new NetworkHelper(mContext);\n if (networkHelper != null) {\n return networkHelper.isNetworkConnected();\n }\n return false;\n }",
"public boolean isConnected() {\n return metricDB.isConnected();\n }",
"public Boolean connected() {\n return this.connected;\n }",
"private boolean checkConnection() {\n return isConnected = ConnectionReceiver.isConnected();\n }",
"private boolean checkConnection() {\n return isConnected = ConnectionReceiver.isConnected();\n }",
"public boolean isRunning() {\n return this.runningThread != null && !serverSocket.isClosed();\n }",
"public boolean isConnectable(){\n\t\tif((System.currentTimeMillis() - this.lastTry) > retryBackoff){\n\t\t\tthis.lastTry = System.currentTimeMillis();\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\r\n\tpublic boolean isConnected(String remoteName) {\n\t\treturn objectServerInputPort.isConnected(remoteName);\r\n\t}",
"@Override\r\n\tpublic boolean isOpen() {\r\n\t\t//\r\n\t\treturn this.socket.isOpen();\r\n\t}",
"private boolean ifNet() {\n \t\t\n \t\tConnectivityManager connectivity = (ConnectivityManager) this\n \t\t\t\t.getSystemService(Context.CONNECTIVITY_SERVICE);\n \t\tif (connectivity != null) {\n \t\t\tNetworkInfo[] info = connectivity.getAllNetworkInfo();\n \t\t\tif (info != null)\n \t\t\t\tfor (int i = 0; i < info.length; i++)\n \t\t\t\t\tif (info[i].getState() == NetworkInfo.State.CONNECTED) {\n \t\t\t\t\t\treturn true;\n \t\t\t\t\t}\n\n \t\t}\n \t\treturn false;\n \t}",
"public static boolean isConnected(Context context){\n NetworkInfo info = Connectivity.getNetworkInfo(context);\n return (info != null && info.isConnected());\n }"
]
| [
"0.8148568",
"0.8043641",
"0.8026652",
"0.7946129",
"0.7913394",
"0.7904011",
"0.7899492",
"0.7855106",
"0.78426826",
"0.78092676",
"0.7790466",
"0.7781345",
"0.77771103",
"0.7775139",
"0.7766768",
"0.77443266",
"0.7743927",
"0.77404064",
"0.7737569",
"0.76976323",
"0.76976323",
"0.7652293",
"0.7652293",
"0.76507664",
"0.7626622",
"0.7623627",
"0.76232666",
"0.76232666",
"0.76232666",
"0.76232666",
"0.76232666",
"0.7618923",
"0.760921",
"0.7598975",
"0.7588841",
"0.7537841",
"0.7517871",
"0.7512916",
"0.74867",
"0.74772495",
"0.7471552",
"0.7470397",
"0.74433774",
"0.7442311",
"0.740458",
"0.7400113",
"0.7374191",
"0.735596",
"0.73522544",
"0.73522544",
"0.73522544",
"0.73522544",
"0.73522544",
"0.73522544",
"0.73522544",
"0.73522544",
"0.73410356",
"0.73032945",
"0.73023236",
"0.7300062",
"0.72898114",
"0.72871214",
"0.7240091",
"0.7180208",
"0.71654654",
"0.7130136",
"0.7125249",
"0.71199024",
"0.7112167",
"0.7106325",
"0.7083593",
"0.70747834",
"0.70718396",
"0.7059649",
"0.7029232",
"0.70063996",
"0.69784003",
"0.6963633",
"0.6959892",
"0.6940577",
"0.6924353",
"0.69241035",
"0.6885572",
"0.6885572",
"0.68828684",
"0.68812805",
"0.686481",
"0.6836775",
"0.6767316",
"0.6767316",
"0.6758131",
"0.6746839",
"0.67440516",
"0.6709561",
"0.67045057",
"0.6701398"
]
| 0.7645499 | 27 |
TODO: consider adding getActualServer() which, for example, when connecting to irc.freenode.net might return "brown.freenode.net" Instructs the protocol to leave a particular channel. This can be asynchronous; IE it doesn't need to cause the channel list to be updated immediately. | public void partChannel(String channel, String reason); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void channelDisconnected(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception {\n ctx.getChannel().getRemoteAddress();\n System.out.println(ctx.getChannel().getRemoteAddress()+\" Disconnected..\");\n Client user = ServerTools.getClientByChannel(ctx.getChannel());\n if(Server.live_clients.contains(user)){\n Server.live_clients.remove(user);\n System.out.println(\"User removed\");\n }\n }",
"public void connectionLost(String channelID);",
"void serverLostConnection();",
"@Override\r\n\t\t\t\tpublic void onServerDisconnect() {\n\t\t\t\t}",
"@Override\r\n\t\t\t\tpublic void onServerDisconnect() {\n\t\t\t\t\tSystem.out.println(\"CONNECTION HAS BEEN LOST.\");\r\n\t\t\t\t}",
"public void onClientDisconnected(Channel channel);",
"private void closeServer() {\n\t\tif (listener != null && !listener.isClosed()) {\n\t\t\ttry {\n\t\t\t\tfor (String name : ConnectedClients.keySet()) {\n\t\t\t\t\tSystem.out.println(\"key: \" + name);\n\t\t\t\t\tArrayList<Object> ClientData = new ArrayList<Object>();\n\t\t\t\t\tClientData = ConnectedClients.get(name);\n\t\t\t\t\tDataOutputStream send = (DataOutputStream) ClientData.get(1);\n\t\t\t\t\tsend.writeUTF(\"SERVER DOWN\");\n\n\t\t\t\t}\n\t\t\t\t//close the socket \n\t\t\t\tlistener.close();\n\n\t\t\t} catch (IOException e) {\n\t\t\t\t// e.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"@SideOnly(Side.CLIENT)\n private void channelEndClient()\n {\n }",
"public void disconnectedFrom(ServerDescriptor desc);",
"@Override\n public void channelClosed(ChannelHandlerContext ctx, ChannelStateEvent e) {\n Client client = (Client) ctx.getChannel().getAttachment();\n Player player = client.getPlayer();\n if (player != null && !player.destroyed()) {\n player.destroy(false);\n }\n if(engine.getClients().contains(client)) {\n \tSystem.out.println(\"Remove client\");\n \tengine.removeClient(client);\n }\n }",
"void leave(Client client);",
"java.lang.String getChannel();",
"public void leaveServer()\n\t{\n\t\ttry {\n\t\t\tSocket toServer = new Socket(server, directorySocket);\n\t\t\tObjectOutputStream outToServer = new ObjectOutputStream(toServer.getOutputStream());\n\n\t\t\tServerMessage m = new ServerMessage();\n\t\t\tm.setCommand(LEAVE);\n\t\t\tm.setUser(new UserBean(this.hostName,this.userName, ipAddress)); //Username could be null but shouldn't read it on server\n\n\t\t\toutToServer.writeObject(m);\n\t\t\t\n\n\t\t} catch (UnknownHostException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Override\n \tpublic String connectionReceived(NetLoginHandler netHandler, INetworkManager manager)\n \t{\n \t\treturn null;\n \t}",
"@Override\n\t\t\tpublic void onDisconnectRemoteNode(String url) {\t\t\t\t\n\t\t\t}",
"@Override\r\n\t\t\t\tpublic void onClientDisconnect(ServerConnection sc) {\n\t\t\t\t}",
"public SocketChannel getChannel() { return null; }",
"public void disconnect(){\n\t\tfor (NodeInfo peerInfo : peerList) {\r\n\t\t\t// send leave to peer\r\n\t\t\tsend(\"0114 LEAVE \" + ip + \" \" + port, peerInfo.getIp(), peerInfo.getPort());\r\n\t\t\t\r\n\t\t\tfor (NodeInfo peerInfo2 : peerList) {\r\n\t\t\t\tif (!peerInfo.equals(peerInfo2)) {\r\n\t\t\t\t\tString joinString = \"0114 JOIN \" + peerInfo2.getIp() + \" \" + peerInfo2.getPort();\r\n\t\t\t\t\t\r\n\t\t\t\t\tsend(joinString, peerInfo.getIp(), peerInfo.getPort());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\tunRegisterBootstrapServer(serverIp, serverPort, ip, port, username);\r\n\t\t\tapp.printInfo(\"Node disconnected from server....\");\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\t//socket = null;\r\n\t}",
"public void disconnectFromServer(boolean sendDisconnectToServer) {\n if (chatClientMainReceiver == null & sendDisconnectToServer){\n JOptionPane.showMessageDialog(null, \"You are not connected to a server\", Env.ChatClientMessageBoxTitle, JOptionPane.ERROR_MESSAGE);\n return;\n }\n if (sendDisconnectToServer) {\n sendDisconnectToServer();\n }\n try {\n socket.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n socket = null;\n try {\n chatClientMainReceiver.socket.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n chatClientMainReceiver.socket = null;\n try {\n chatClientMainReceiver.stop();\n }catch (Exception ex){\n ex.printStackTrace();\n }\n chatClientMainReceiver = null;\n chatClientController.appendToPane(new Date(System.currentTimeMillis()) + \": Disconnected from server\", \"RED\", null);\n }",
"public void shutdown(){\n CommunicationChannel com = new CommunicationChannel (serverHostName, serverPortNumb);\n Object[] params = new Object[0];\n Object[] state_fields = new Object[0];\n \n Message m_toServer = new Message(99, params, 0, state_fields, 0, null); \n \n while (!com.open ()){ \n \ttry{ \n \t\tThread.currentThread ();\n \t\tThread.sleep ((long) (10));\n \t}\n \tcatch (InterruptedException e) {}\n }\n com.writeObject (m_toServer);\n com.close ();\n }",
"@Test\n public void testServerChannelClosedAbruptly() throws Exception {\n var channel = new EmbeddedServerChannel();\n\n server = getServer(channel.newSucceededFuture(), true);\n\n channel.close();\n\n assertTrue(server.getBossGroup().isShuttingDown());\n assertTrue(server.getWorkerGroup().isShuttingDown());\n }",
"public void clientWasRemoved(ChannelId channelId);",
"@Override\n public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception {\n// If the event indicates that\n// the handshake was successful removes the HttpRequestHandler from the\n// ChannelPipeline because no further HTTP messages will be received\n if (evt instanceof WebSocketServerProtocolHandler.HandshakeComplete) {\n ctx.pipeline().remove(HttpRequestHandler.class);\n //通道组的所有通道的写操作,简化了一个通道组里面所有通道的写操作,然后把当前通道也加入通道组\n group.writeAndFlush(\"clent \" + ctx.channel() + \"joined!\");\n group.add(ctx.channel());\n } else {\n super.userEventTriggered(ctx, evt);\n }\n }",
"private void leaveChannel() {\n // Leave the current channel\n mRtcEngine.leaveChannel();\n }",
"void clientDisconnected(Client client, DisconnectInfo info);",
"public abstract void OnDisconnect(int sock);",
"void disconnect(String reason);",
"@Override\n\tpublic void onGuildMemberLeave(GuildMemberLeaveEvent event) {\n\t\tupdateChannel(event.getGuild());\n\t}",
"void onConnectionRemoved(SocketConnection connection);",
"public void disconnectedFromHost();",
"public void leaveChannel() {\n mRtcEngine.leaveChannel();\n appointment.removeOfCall(new DatabaseUser(MainUser.getMainUser().getId()));\n }",
"public void serverWasShutdown();",
"@Override\n public void channelInactive(ChannelHandlerContext ctx) throws Exception {\n logger.debug(\"client {} inactive\", Connection.this);\n if (!isInitialized || isClosed()) {\n errorOutAllHandler(new TransportException(address, \"Channel has been closed\"));\n // we still want to force so that the future completes\n Connection.this.closeAsync().force();\n } else {\n defunct(new TransportException(address, \"Channel has been closed\"));\n }\n }",
"public void socketDisconnected(PacketChannel pc, boolean failed);",
"SocketChannel getChannel();",
"public void sendeLobby();",
"void disconnectedPlayerMessage(String name);",
"void finish(Channel channel, Object msg);",
"@Override\n\t\tpublic void operationComplete(ChannelFuture future) throws Exception {\n\t\t\tSystem.out.println(\"Channel closed\");\n\t\t\t// @TODO if lost, try to re-establish the connection\n\t\t}",
"@Override\n public void onChannelDisconnected() {\n ConnectionManager.getInstance().setDisconnectNow(true);\n ((P2PListener)activity).onAfterDisconnect();\n }",
"void channelInactive() throws Exception;",
"void channelInactive() throws Exception;",
"public void disconnected(String reason) {}",
"@Override\r\n\t\t\t\tpublic void onClientDisconnect(ServerConnection sc) {\n\t\t\t\t\tSystem.out.println(\"CLIENT DISCONNECTED FROM SERVER.\");\r\n\t\t\t\t}",
"private boolean handleChannelListChanged(String line){\n Matcher matcher = USER_CHANNELS_LIST_CHANGES.matcher(line);\n \n\n if (!matcher.matches()){\n return false;\n }\n\n int channelNumber = Integer.parseInt(matcher.group(1));\n //System.out.println(\"NUMBER = \" + channelNumber);\n String change = matcher.group(2);\n //System.out.println(\"CHANGE = \" + change);\n //System.out.println(\">>> CHANGE LINE RECEIVED FROM SERVER!!!\");\n if (!processChannelListChanged(change, channelNumber)){\n processLine(line);\n }\n\n return true;\n }",
"@Override\n\tpublic void channelInactive(ChannelHandlerContext ctx) throws Exception {\n\t\tsuper.channelInactive(ctx);\n\t\tif(connectListener != null) {\n\t\t\tconnectListener.onDisconnect(ctx.channel());\n\t\t}\n\t}",
"public synchronized void disconnect()\r\n\t\t{\r\n\t\tif (state == RUNNING)\r\n\t\t stop();\r\n\t\tif (state == CLOSING_DOWN)\r\n\t\t {\r\n // Close the server socket\t\t \r\n try {\r\n \t\tserverSocket.close();\r\n \t}\r\n catch (IOException e)\r\n {\r\n }\r\n \r\n \t\t// flag the server as stopped\r\n \t\tstate = STOPPED;\r\n\t\t }\r\n\t\t}",
"public void onPeerConnectionClosed();",
"public void whoisChannels(String nick, List<String> channels);",
"public abstract void quitServer();",
"@Override\n\tpublic void listenerClosed(ConnectionListenerEvent evt) {\n\t\t\n\t}",
"@Override\n\tpublic void handlerRemoved(ChannelHandlerContext ctx) throws Exception {\n\t\tSystem.out.println(\"user leave:\" + ctx.name());\n\t}",
"public void updateChannel(String channel) {\n Log.d(\"BC\", \"update channel \" + channel);\n long startTime = 0l;\n long endTime = 0l;\n Cursor cursor = getContentResolver().query(\n ChannelData.BROKEN_CONTENT_URI,\n null,\n null,\n new String[]{channel},\n null\n );\n if (cursor.getCount() > 0) {\n if (cursor.moveToFirst()) {\n startTime = cursor.getLong(cursor.getColumnIndex(\n ChannelData.PARENT\n ));\n endTime = cursor.getLong(cursor.getColumnIndex(\n ChannelData.ITEM_ID\n ));\n }\n Log.w(TAG, \"Found broken threads in \" + channel + \", \"\n + new Date(startTime) + \" / \"+ new Date(endTime));\n }\n cursor.close();\n cursor = getContentResolver().query(\n Roster.CONTENT_URI,\n new String[]{Roster.LAST_UPDATED},\n \"jid=?\",\n new String[]{channel},\n null\n );\n if (cursor.getCount() == 1) {\n cursor.moveToFirst();\n startTime = cursor.getLong(\n cursor.getColumnIndex(Roster.LAST_UPDATED));\n IQ iq = new ChannelFetch(channel, startTime);\n try {\n send(iq);\n } catch (RemoteException e) {\n e.printStackTrace();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n cursor.close();\n DiscoverInfo info = new DiscoverInfo();\n info.setNode(channel);\n info.setType(org.jivesoftware.smack.packet.IQ.Type.GET);\n info.setTo(\"broadcaster.buddycloud.com\");\n try {\n send(info);\n } catch (InterruptedException e) {\n e.printStackTrace(System.err);\n } catch (RemoteException e) {\n e.printStackTrace();\n }\n }",
"@Override\r\n\tpublic void onServerDown() {\n\t\tString res=name + \" recived a notification\";\r\n\t\tLOGGER.info(res);\r\n\t\t\r\n\t}",
"public void disconnect(){\n\n\t\tserverConnection.disconnect();\n\t}",
"@FunctionalInterface\npublic interface ConnectionLostListener {\n\n /**\n * Called when a connection is list\n * \n * @param channelID The ID of the channel that had the connection lost\n */\n public void connectionLost(String channelID);\n\n}",
"@DSComment(\"Private Method\")\n @DSBan(DSCat.PRIVATE_METHOD)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:59:45.597 -0500\", hash_original_method = \"6CA7282E928AA840C6D25E995C5EBFEA\", hash_generated_method = \"EE2364AE0179C423F2BD973FF5B92F49\")\n \nprivate void replyDisconnected(int status) {\n Message msg = mSrcHandler.obtainMessage(CMD_CHANNEL_DISCONNECTED);\n msg.arg1 = status;\n msg.obj = this;\n msg.replyTo = mDstMessenger;\n mSrcHandler.sendMessage(msg);\n }",
"private void UserDisconnectChannel(ClientData d)\n\t{\n\t\tApplicationManager.textChat.writeLog(d.ClientName + \" Quit \" + currentChannel.ChannelName);\n\t\tSendMessage(null, MessageType.channelInfo);\n\n\t}",
"public void notifyClosedConnection (COPSPdpOSReqStateMan man, COPSError error);",
"String getServerConnectionChannelName();",
"public void sayGoodbye(){\n Waiter w = (Waiter) Thread.currentThread();\n CommunicationChannel com = new CommunicationChannel(serverHostName, serverPortNumb);\n Object[] params = new Object[0];\n \tObject[] state_fields = new Object[3];\n state_fields[0] = w.getWaiterID();\n \tstate_fields[1] = w.getWaiterState();\n\n Message m_toServer = new Message(5, params, 0, state_fields, 2, null); \n Message m_fromServer;\n\n while (!com.open ()){ \n \ttry{ \n \t\tThread.currentThread ();\n \t\tThread.sleep ((long) (10));\n \t}\n \tcatch (InterruptedException e) {}\n }\n \n com.writeObject (m_toServer);\n \n m_fromServer = (Message) com.readObject(); \n\n w.setState((int) m_fromServer.getStateFields()[1]);\n w.setCanGoHome();\n com.close ();\n }",
"@Override\n\tpublic void removeServer(String arg0) {\n\n\t}",
"public void sendResponse(){\n\n //DropItPacket dropPkt = new DropItPacket(Constants.PONG.toString());\n // Send out a dropit Packet\n Channel channel = e.getChannel();\n ChannelFuture channelFuture = Channels.future(e.getChannel());\n ChannelEvent responseEvent = new DownstreamMessageEvent(channel, channelFuture, packet, channel.getRemoteAddress());\n// System.out.println(\"===== sending to\" + channel.getRemoteAddress().toString());\n try{\n ctx.sendDownstream(responseEvent);\n }catch (Exception ex){\n System.out.println(\"Node: \" + fileServer.getNode().getPort() + \" sending to\"+\n channel.getRemoteAddress().toString() +\"failed! \" + ex.toString());\n }\n }",
"protected void onJoin(String channel, String sender, String login, String hostname) {}",
"public void endGame() {\r\n\t\tthis.gameStarted = false;\r\n\t\tthis.sendMessages = false;\r\n\t\tthis.centralServer.removeServer(this);\r\n\t}",
"public static opCode logoutUser()\n {\n Operation request = new Operation(username);\n request.setPassword(password);\n request.setCode(opCode.LOGOUT);\n\n sendReq(clientSocketChannel,request);\n\n //chiudo socket del client\n if(clientSocketChannel != null)\n {\n try { clientSocketChannel.close(); }\n catch(IOException ioe)\n {\n System.err.println(\"Error in closing clientSocketChannel\");\n ioe.printStackTrace();\n }\n }\n\n //interrompo il thread degli inviti\n if(inviteThread != null)\n inviteThread.interrupt();\n\n\n //chiudo socket degli inviti\n if(inviteSocketChannel != null)\n {\n try { inviteSocketChannel.close(); }\n catch(IOException ioe)\n {\n System.err.println(\"Error in closing inviteSocketChannel\");\n ioe.printStackTrace();\n }\n }\n\n //mando un messaggio agli altri utenti, per notificare la mia disconnessione\n Utils.sendChatMessage(username, \"left the chat\", TuringPanel.editingFileAddress,null);\n\n //interrompo il thread della chat\n if(chatThread != null)\n chatThread.interrupt();\n\n\n return opCode.OP_OK;\n }",
"EzyChannel getChannel();",
"private void handleMangerKickUserOut() {\n String userName = EventMessageParser.extractUserName(this.message);\n SocketConnection targetConnection = SocketManager.getInstance()\n .getUserConnection(userName);\n targetConnection.send(this.message);\n }",
"@Override\n public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) {\n cause.printStackTrace();\n ChannelFuture close = ctx.close();\n close.addListener((ChannelFutureListener) future -> System.out.println(\"server channel closed!!!\"));\n }",
"@Override\n\tpublic void onDisconnectDone(ConnectEvent arg0) {\n\t\t\n\t}",
"@Override\n public void channelDisconnected(ChannelHandlerContext ctx, ChannelStateEvent e) {\n log.error(\"Input Stream {} : Channel Disconnected - Stream Engine RTS process!\", name);\n channelAtomicReference.set(null);\n }",
"@Override\n\tpublic void channelInactive(ChannelHandlerContext ctx) throws Exception {\n\t\tLog.i(\"MySocketHandler\", \"channelInactive\");\n\t\tsuper.channelInactive(ctx);\n\t}",
"public void serverStop() {\n\t\tJOptionPane.showMessageDialog(dlg, \"与服务器失去连接\");\n\t\tserver = null;\n\t\tconnectAction.setEnabled(false);\n\t\t\n\t}",
"public void handleDisconnect(){\r\n consoleAppend(this.getName() + \" disconnected.\");\r\n clientThreads.remove(getIndex(this.getName()));\r\n sendToAll(this.getName() + \" disconnected.\");\r\n sendCTToAll(new ControlToken(ControlToken.REMOVECODE, this.getName()));\r\n }",
"public Channel method_4090() {\n return null;\n }",
"private void disconnect() {\n System.out.println(String.format(\"連線中斷,%s\",\n clientSocket.getRemoteSocketAddress()));\n final int delete = thisPlayer.id - 1;\n player[delete] = null;\n empty.push(delete);\n }",
"@Override\n\t\t\tpublic void onNetworkDisconnected() {\n\t\t\t\t\n\t\t\t}",
"public void testChannelHopping() throws RemoteException {\n List<Channel> channelList = mBinder.getChannelList();\n for(Channel channel : channelList) {\n mBinder.joinChannel(channel.getId());\n }\n try {\n Thread.sleep(TEST_OBSERVATION_DELAY);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }",
"public static void disconnect() {\r\n if (isConnected()) {\r\n listener.interrupt();\r\n timerThread.interrupt();\r\n keepAliveThread.interrupt();\r\n db.writeDatabase();\r\n ObjectIO.writeObjectToFile(cmdPath, cmd);\r\n tc.stopCommands();\r\n ObjectIO.writeObjectToFile(tcPath, tc);\r\n try {\r\n irc.close();\r\n }\r\n catch (IOException e) { /* Shouldn't happen */ }\r\n }\r\n irc = null;\r\n }",
"private void resolveServer(RegisteredServer serverInfo) {\n if (serverInfo.getPlayersConnected().size() > 0) {\n return;\n }\n /* TODO REDO CODE FOR VELOCITY\n serverInfo.ping((result, error) -> {\n if (error != null) {\n //Means that server is not responding : OFFLINE\n\n\n Debug.print(\"[ServerManager] Attempting to re-resolve offline server \" + serverInfo.getName() + \"...\");\n\n Debug.print(\"[ServerManager] Resolving old host \" + serverInfo.getAddress().getAddress() + \":\" + serverInfo.getAddress().getPort());\n\n InetSocketAddress newAddress = new InetSocketAddress(domains.get(serverInfo.getName()).address, Integer.parseInt(domains.get(serverInfo.getName()).port));\n RegisteredServer newsi = ProxyServer.getInstance().constructServerInfo(serverInfo.getName(), newAddress, serverInfo.getMotd(), false);\n\n Debug.print(\"[ServerManager] New host is \" + newAddress.getAddress() + \":\" + newAddress.getPort());\n\n ProxyServer.getInstance().getServers().remove(serverInfo.getName());\n ProxyServer.getInstance().getServers().put(newsi.getName(), newsi);\n\n Debug.print(\"[ServerManager] Re-resolved server \" + serverInfo.getName() + \".\");\n }\n });*/\n }",
"public Channel method_4121() {\n return null;\n }",
"void onDisconnect( String errorMsg );",
"@Override\n public void connectionLost() {\n }",
"public void disconnect() {}",
"void onDisconnectSuccess();",
"@Override\r\n \tpublic void clientDisconnectedCallback(RoMClient client) {\r\n \t\tthis.disconnectClient(client);\r\n \t}",
"public void exit(){\n Student s = (Student) Thread.currentThread();\n\n \tCommunicationChannel com = new CommunicationChannel (serverHostName, serverPortNumb);\n \tObject[] params = new Object[0];\n \tObject[] state_fields = new Object[2];\n \tstate_fields[0] = s.getID();\n \tstate_fields[1] = s.getStudentState();\n \t\n Message m_toServer = new Message(10, params, 0, state_fields, 2, null); \n Message m_fromServer; \n \n while (!com.open ()){ \n \ttry{ \n \t\tThread.currentThread ();\n \t\tThread.sleep ((long) (10));\n \t}\n \tcatch (InterruptedException e) {}\n }\n \n com.writeObject (m_toServer);\n \n m_fromServer = (Message) com.readObject(); \n \n s.setState((int) m_fromServer.getStateFields()[1]);\n \n com.close ();\n }",
"@Override\n\tprotected void onNetworkDisConnected() {\n\n\t}",
"@Override\n public MinecraftServerEntity call(MinecraftServerEntity server) {\n if (server.getDetailedStatus() == MinecraftServer.DetailedStatus.OFFLINE && server.getOfflineSince() == 0) {\n //If the server has gone offline, we update the offline since.\n server.setOfflineSince(server.getLastUpdateTime());\n //We set the boolean to true if the application is running since status are update in real-time on the UI.\n server.setHasOfflineStatusBeenSeen(bindCount > 0);\n }\n return server;\n }",
"public void sendEndGame (){\n connect();\n try{\n doStream.writeUTF(\"GAME_STOP\");\n doStream.writeUTF(currentUser.getUserName());\n } catch (IOException e){\n e.printStackTrace();\n }\n disconnect();\n }",
"default void disconnect() { }",
"public java.lang.String getChannel() {\n java.lang.Object ref = channel_;\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 channel_ = s;\n return s;\n }\n }",
"@Override\r\n\tpublic void onChannelSuccess() {\n\t\t\r\n\t}",
"public void getServerResponse() {\n\t\twhile (true) {\n\t\t\ttheMessage = readObject.readMessage();\n\t\t\tif (theMessage != null) {\n\t\t\t\tSystem.out.println(\"Server response is: \" + theMessage.getChoice());\n\t\t\t\tswitchBoard(theMessage.getChoice(), theMessage);\n\t\t\t}\n\t\t}\n\t}",
"private void handleWhiteboardCleared() {\n for (SocketConnection tobeNotified : SocketManager.getInstance()\n .getNotManagerConnectionList()) {\n tobeNotified.send(this.message);\n }\n }",
"public void previousChannel() {\n String json = new Gson().toJson(new TelevisionModel(TelevisionModel.Action.PREVIOUS_CHANNEL));\n String a = sendMessage(json);\n TelevisionModel teleM = new Gson().fromJson(a, TelevisionModel.class);\n System.out.println(\"Client Received \" + json);\n\n if (teleM.getAction() == TelevisionModel.Action.PREVIOUS_CHANNEL) {\n isSwitchingPrevious = teleM.getValue();\n ui.updateArea(teleM.getMessage());\n };\n }",
"interface DisconnectCallback {\n\n /**\n * Method called after disconnect from the net will be performed successfully.\n */\n void onDisconnectSuccess();\n\n /**\n * Method called after disconnect from the net will not be performed for some reasons.\n */\n void onDisconnectFailure();\n\n }",
"public java.lang.String getChannel() {\n java.lang.Object ref = channel_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n channel_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"protected void handleDisconnect()\n {\n RemotingRMIClientSocketFactory.removeLocalConfiguration(locator);\n }",
"public java.lang.String getChannel() {\n java.lang.Object ref = channel_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n channel_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"private void disconnectFromServer() {\n\t\ttry {\n\t\t\tsocket.close();\n\t\t}\n\t\tcatch(IOException e) {\n\t\t\tSystem.out.println(\"CLIENT: Cannot disconnect from server\");\n\t\t}\n\t}"
]
| [
"0.6377686",
"0.6215662",
"0.6164682",
"0.6057163",
"0.6026051",
"0.6009679",
"0.5793157",
"0.57450527",
"0.57377255",
"0.5599327",
"0.55453885",
"0.5532149",
"0.5521391",
"0.5513775",
"0.5498573",
"0.5494836",
"0.5476539",
"0.5475345",
"0.5470866",
"0.54620415",
"0.5458717",
"0.54485404",
"0.54425496",
"0.54402655",
"0.53998375",
"0.5391961",
"0.53897274",
"0.53894275",
"0.53852594",
"0.5366127",
"0.5362342",
"0.5353577",
"0.5351083",
"0.5314792",
"0.53120166",
"0.5297607",
"0.5290841",
"0.5279131",
"0.5251717",
"0.524635",
"0.52372557",
"0.52372557",
"0.52342695",
"0.5232631",
"0.5227907",
"0.52273756",
"0.52239376",
"0.52142227",
"0.5194899",
"0.5180418",
"0.5173041",
"0.5170593",
"0.51594096",
"0.5157508",
"0.51511294",
"0.51509655",
"0.51487243",
"0.5144288",
"0.51394635",
"0.5122953",
"0.51165044",
"0.51080185",
"0.5106465",
"0.5098557",
"0.5088276",
"0.50866693",
"0.5084269",
"0.5081197",
"0.50794876",
"0.50783354",
"0.5077378",
"0.5072086",
"0.5066206",
"0.5060796",
"0.50551707",
"0.5051304",
"0.5046037",
"0.5042739",
"0.5041734",
"0.5037951",
"0.5037037",
"0.5034947",
"0.5033336",
"0.5025776",
"0.50133157",
"0.5008947",
"0.5007952",
"0.5007431",
"0.5006484",
"0.5005202",
"0.4998112",
"0.4998077",
"0.49909452",
"0.49890625",
"0.49867424",
"0.4983504",
"0.49684072",
"0.4968215",
"0.49662307",
"0.49635565",
"0.4963152"
]
| 0.0 | -1 |
Instructs this protocol to disconnect from the server it is connected to. If the server supports a disconnect reason, then the supplied reason should be used. | public void disconnect(String message); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void disconnect(String reason);",
"public void onDisconnect(IChatComponent reason) {\n\t\tlogger.info(this.getConnectionInfo() + \" lost connection: \" + reason.getUnformattedText());\n\t}",
"public void disconnected(String reason) {}",
"public void disconnectedFrom(ServerDescriptor desc);",
"public void disconnect(ClientAddress clientAddress, InetSocketAddress reconnect, Integer delay);",
"void onDisconnect(DisconnectReason reason, String errorMessage);",
"public void disconnectPeer(lnrpc.Rpc.DisconnectPeerRequest request,\n io.grpc.stub.StreamObserver<lnrpc.Rpc.DisconnectPeerResponse> responseObserver) {\n asyncUnimplementedUnaryCall(getDisconnectPeerMethod(), responseObserver);\n }",
"public void disconnect ()\n {\n org.omg.CORBA.portable.InputStream $in = null;\n try {\n org.omg.CORBA.portable.OutputStream $out = _request (\"disconnect\", true);\n $in = _invoke ($out);\n return;\n } catch (org.omg.CORBA.portable.ApplicationException $ex) {\n $in = $ex.getInputStream ();\n String _id = $ex.getId ();\n throw new org.omg.CORBA.MARSHAL (_id);\n } catch (org.omg.CORBA.portable.RemarshalException $rm) {\n disconnect ( );\n } finally {\n _releaseReply ($in);\n }\n }",
"public void disconnectPeer(lnrpc.Rpc.DisconnectPeerRequest request,\n io.grpc.stub.StreamObserver<lnrpc.Rpc.DisconnectPeerResponse> responseObserver) {\n asyncUnaryCall(\n getChannel().newCall(getDisconnectPeerMethod(), getCallOptions()), request, responseObserver);\n }",
"public void disconnect(ClientAddress clientAddress);",
"public void disconnect(){\n\n\t\tserverConnection.disconnect();\n\t}",
"@Override\n\tpublic void playerDisconnected(String playerID, DisconnectReason reason) {\n\t}",
"void disconnected(MqttClient client, Throwable cause, boolean reconnecting);",
"public void doDisconnect() {\n Debug.logInfo(\"MQTT Disconnecting clientId[\" + client.getClientId() + \"] of [\" + client.getServerURI() + \"] ... \", MODULE);\n\n IMqttActionListener discListener = new IMqttActionListener() {\n public void onSuccess(IMqttToken asyncActionToken) {\n Debug.logInfo(\"Disconnect Completed\", MODULE);\n state = DISCONNECTED;\n carryOn();\n }\n\n public void onFailure(IMqttToken asyncActionToken, Throwable exception) {\n ex = exception;\n state = ERROR;\n Debug.logError(\"Disconnect failed\" + exception, MODULE);\n carryOn();\n }\n\n public void carryOn() {\n synchronized (caller) {\n donext = true;\n caller.notifyAll();\n }\n }\n };\n\n try {\n client.disconnect(null, null);\n } catch (MqttException e) {\n state = ERROR;\n donext = true;\n ex = e;\n }\n }",
"public void socketDisconnected(PacketChannel pc, boolean failed);",
"protected abstract void disconnect(UUID[] players, String reason, IntConsumer response);",
"public void disconnectFromServer(boolean sendDisconnectToServer) {\n if (chatClientMainReceiver == null & sendDisconnectToServer){\n JOptionPane.showMessageDialog(null, \"You are not connected to a server\", Env.ChatClientMessageBoxTitle, JOptionPane.ERROR_MESSAGE);\n return;\n }\n if (sendDisconnectToServer) {\n sendDisconnectToServer();\n }\n try {\n socket.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n socket = null;\n try {\n chatClientMainReceiver.socket.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n chatClientMainReceiver.socket = null;\n try {\n chatClientMainReceiver.stop();\n }catch (Exception ex){\n ex.printStackTrace();\n }\n chatClientMainReceiver = null;\n chatClientController.appendToPane(new Date(System.currentTimeMillis()) + \": Disconnected from server\", \"RED\", null);\n }",
"void clientDisconnected(Client client, DisconnectInfo info);",
"public Reply\tdisconnect() throws ThingsException, InterruptedException ;",
"public lnrpc.Rpc.DisconnectPeerResponse disconnectPeer(lnrpc.Rpc.DisconnectPeerRequest request) {\n return blockingUnaryCall(\n getChannel(), getDisconnectPeerMethod(), getCallOptions(), request);\n }",
"public void disconnect() {\n if (serverSocket != null) {\n try {\n serverSocket.close();\n Log.i(TAG, \"ServerSocket closed\");\n } catch (IOException e) {\n Log.e(TAG, \"Error closing the serverSocket\");\n }\n }\n\n sendDisconnectionMessage();\n\n // FIXME - Change this into a message sent it listener\n // Wait 2 seconds to disconnection message was sent\n Handler handler = new Handler();\n handler.postDelayed(new Runnable() {\n public void run() {\n WiFiDirectUtils.clearServiceRequest(wiFiP2PInstance);\n WiFiDirectUtils.stopPeerDiscovering(wiFiP2PInstance);\n WiFiDirectUtils.removeGroup(wiFiP2PInstance);\n\n serverSocket = null;\n isRegistered = false;\n clientsConnected.clear();\n }\n }, 2000);\n }",
"@SubscribeEvent\n public void onFMLNetworkClientDisconnectionFromServer(ClientDisconnectionFromServerEvent event) {\n hypixel = false;\n bedwars = false;\n }",
"public CompletionStage<Void> disconnect() {\n\t\treturn this.finConnection.sendMessage(\"disconnect-from-channel\", FinBeanUtils.toJsonObject(this.routingInfo)).thenAccept(ack->{\n\t\t\tif (!ack.isSuccess()) {\n\t\t\t\tthrow new RuntimeException(\"error disconnecting channel client, reason: \" + ack.getReason());\n\t\t\t}\n\t\t});\n\t}",
"public void disconnect() {\n SocketWrapper.getInstance(mContext).disConnect();\n }",
"void onDisconnect( String errorMsg );",
"public synchronized void disconnect()\r\n\t\t{\r\n\t\tif (state == RUNNING)\r\n\t\t stop();\r\n\t\tif (state == CLOSING_DOWN)\r\n\t\t {\r\n // Close the server socket\t\t \r\n try {\r\n \t\tserverSocket.close();\r\n \t}\r\n catch (IOException e)\r\n {\r\n }\r\n \r\n \t\t// flag the server as stopped\r\n \t\tstate = STOPPED;\r\n\t\t }\r\n\t\t}",
"public void disconnect() {\n\t\tfinal String METHOD = \"disconnect\";\n\t\tLoggerUtility.fine(CLASS_NAME, METHOD, \"Disconnecting from the IBM Watson IoT Platform ...\");\n\t\ttry {\n\t\t\tthis.disconnectRequested = true;\n\t\t\tmqttAsyncClient.disconnect();\n\t\t\tLoggerUtility.info(CLASS_NAME, METHOD, \"Successfully disconnected \"\n\t\t\t\t\t+ \"from the IBM Watson IoT Platform\");\n\t\t} catch (MqttException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void disconnectFromAudio() {\n String json = new Gson().toJson(new TelevisionModel(TelevisionModel.Action.DISCONNECT));\n String a = sendMessage(json);\n TelevisionModel teleM = new Gson().fromJson(a, TelevisionModel.class);\n System.out.println(\"Client Received \" + json);\n\n if (teleM.getAction() == TelevisionModel.Action.DISCONNECT) {\n isDisconnecting = teleM.getValue();\n ui.updateArea(teleM.getMessage());\n };\n }",
"public void sendDisconnect() {\n\t\tString bye = (username + \": :Disconnect\");\n\n\t\ttry {\n\n\t\t\t// print string\n\t\t\twriter.println(bye);\n\n\t\t\t// flush the stream\n\t\t\twriter.flush();\n\n\t\t} catch (Exception e) {\n\t\t\t// print if exception is caught\n\t\t\ttextAreaChat.append(\"Could not send Disconnect message.\\n\");\n\n\t\t}\n\t}",
"void disconnectArtist(UUID requestId) throws\n ArtistDisconnectingFailedException,\n ConnectionRequestNotFoundException;",
"private void disconnectFromServer() {\n\t\ttry {\n\t\t\tsocket.close();\n\t\t}\n\t\tcatch(IOException e) {\n\t\t\tSystem.out.println(\"CLIENT: Cannot disconnect from server\");\n\t\t}\n\t}",
"@Override\r\n\t\t\t\tpublic void onClientDisconnect(ServerConnection sc) {\n\t\t\t\t}",
"public com.google.common.util.concurrent.ListenableFuture<lnrpc.Rpc.DisconnectPeerResponse> disconnectPeer(\n lnrpc.Rpc.DisconnectPeerRequest request) {\n return futureUnaryCall(\n getChannel().newCall(getDisconnectPeerMethod(), getCallOptions()), request);\n }",
"@Override\r\n\t\t\t\tpublic void onClientDisconnect(ServerConnection sc) {\n\t\t\t\t\tSystem.out.println(\"CLIENT DISCONNECTED FROM SERVER.\");\r\n\t\t\t\t}",
"public void onDisconnect(HeaderSet req, HeaderSet resp) {\r\n if(req == null)\r\n return;\r\n try {\r\n //clientBluetoothAddress = req.getHeader(HeaderSet.NAME).toString();\r\n Object reqType = req.getHeader(HeaderSets.REQUEST_TYPE);\r\n if(reqType == null)\r\n return;\r\n if (reqType.toString().equals(Types.REQUEST_DISCONNECT)) {\r\n parent.removeClient(clientBluetoothAddress);\r\n //AlertDisplayer.showAlert(\"Disconnected\", \"btADDR : \" +clientBluetoothAddress,parent.gui.getDisplay(),parent.gui.getList());\r\n }\r\n \r\n } catch (IOException e) {\r\n System.err.println(\"Exception in DataTransaction.onConnect()\");\r\n \r\n }\r\n }",
"public void sendDisconnectToServer(){\n try {\n if (socket == null){\n JOptionPane.showMessageDialog(null, \"SSLSocket is not connected to server. Connect before sending username.\",Env.ChatClientMessageBoxTitle, JOptionPane.ERROR_MESSAGE);\n return;\n }\n PrintWriter writer = new PrintWriter(new OutputStreamWriter(socket.getOutputStream(), \"UTF-8\"), true);\n writer.println(passUtil.toHexString(\"disconnect-me\"));\n writer.flush();\n System.out.println(\"Sent disconnect message to server\");\n } catch (Exception ex){\n ex.printStackTrace();\n if (ex.toString().toLowerCase().contains(\"socket output is already shutdown\")){\n disconnectFromServer(false);\n }\n JOptionPane.showMessageDialog(null, \"Error sending disconnect message: \" + ex.toString(),Env.ChatClientMessageBoxTitle, JOptionPane.ERROR_MESSAGE);\n }\n }",
"protected void sendDisconnect(PeerConnection pConn) {\r\n\r\n Message msg = new Message();\r\n // The request simply includes the local peer advertisement.\r\n try {\r\n msg.replaceMessageElement(\"jxta\", new TextDocumentMessageElement(DisconnectRequest, getPeerAdvertisementDoc(), null));\r\n pConn.sendMessage(msg, pName, pParam);\r\n } catch (Exception e) {\r\n if (LOG.isEnabledFor(Priority.WARN)) {\r\n LOG.warn(\"sendDisconnect failed\", e);\r\n }\r\n }\r\n }",
"public void disconnect() {\n try {\n Socket socket = new Socket(\"127.0.0.1\",33333);\n ObjectOutputStream outputStream = new ObjectOutputStream(socket.getOutputStream());\n clientMain.clientData[1] = \"no\";\n outputStream.writeObject(clientMain.clientData);\n\n clientMain.showConnectionPage();\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public void disconnect()\n {\n isConnected = false;\n }",
"public void disconnect() {\r\n\t\tif (connected.get()) {\r\n\t\t\tserverConnection.getConnection().requestDestToDisconnect(true);\r\n\t\t\tconnected.set(false);\r\n\t\t}\r\n\t}",
"@Override\r\n\t\t\t\tpublic void onServerDisconnect() {\n\t\t\t\t}",
"public abstract void OnDisconnect(int sock);",
"public void disconnect(StompMessageStateCallback callback) {\n\t\tLOGGER.debug(\"disconnecting...\");\n\n\t\tclientHandler.sendFrame(channel, new DisconnectFrame(), callback);\n\n\t\t// Wait until all messages are flushed before closing the channel.\n\t\tif (channelFuture != null) {\n\t\t\tchannelFuture.awaitUninterruptibly();\n\t\t}\n\n\t\tif (channel != null && channel.isOpen()) {\n\t\t\t// Close the connection. Make sure the close operation ends because\n\t\t\t// all I/O operations are asynchronous in Netty.\n\t\t\tchannel.close().awaitUninterruptibly();\n\t\t}\n\n\t\tif (clientBootstrap != null) {\n\t\t\t// Shut down all thread pools to exit.\n\t\t\tclientBootstrap.releaseExternalResources();\n\t\t}\n\n\t\tLOGGER.debug(\"disconnected\");\n\t}",
"private void replyToPeerClose(final int code, final String reason) {\n Runnable replierClose = new NamedRunnable(\"OkHttp %s WebSocket Close Reply\", name) {\n @Override protected void execute() {\n if (writerClosed.compareAndSet(false, true)) {\n try {\n writer.writeClose(code, reason);\n } catch (IOException t) {\n Platform.get().log(Platform.INFO, \"Unable to send close reply in response to peer close.\", t);\n }\n }\n\n quietlyCloseConnection();\n }\n };\n synchronized (replier) {\n if (!isShutdown) {\n replier.execute(replierClose);\n }\n }\n }",
"protected void disconnect() {\n\t\tif (false == DOM.getElementPropertyBoolean(this.getFrame(), \"__connected\")) {\r\n\t\t\tthis.onUnableToConnect();\r\n\t\t} else {\r\n\t\t\tthis.restart();\r\n\t\t}\r\n\t}",
"public void handleDisconnect(){\r\n consoleAppend(this.getName() + \" disconnected.\");\r\n clientThreads.remove(getIndex(this.getName()));\r\n sendToAll(this.getName() + \" disconnected.\");\r\n sendCTToAll(new ControlToken(ControlToken.REMOVECODE, this.getName()));\r\n }",
"public void cancelDisconnect() {\n if (manager != null) {\n if (device == null\n || device.status == WifiP2pDevice.CONNECTED) {\n disconnect();\n } else if (device.status == WifiP2pDevice.AVAILABLE\n || device.status == WifiP2pDevice.INVITED) {\n manager.cancelConnect(channel, new WifiP2pManager.ActionListener() {\n\n @Override\n public void onSuccess() {\n }\n\n @Override\n public void onFailure(int reasonCode) {\n }\n });\n }\n }\n }",
"@Override\n public void Disconnect() {\n bReConnect = true;\n }",
"public void disconnect( ) {\n disconnect( \"\" );\n }",
"public LWTRTPdu disConnectRsp() throws IncorrectTransitionException;",
"private void closeConnection(final String reason) {\n closeConnection(new VertxException(reason).fillInStackTrace());\n }",
"void onDisconnectFailure();",
"void endNegotiation(String reason);",
"public void disconnect() {}",
"private void disconnect( String msg ) {\n if ( mReceiveThread != null )\n mReceiveThread.interrupt();\n\n try {\n if ( !mConnectionSocket.isClosed() ) {\n mConnectionSocket.close();\n }\n } catch (IOException e) {\n Log.e ( LOG_TAG, e.getMessage() );\n }\n\n if ( mDisconnectCallback != null )\n mDisconnectCallback.onDisconnect( msg );\n }",
"interface Disconnect extends RconConnectionEvent {}",
"public void disconnect()\n {\n \tLog.d(TAG, \"disconnect\");\n\n \tif(this.isConnected) {\n \t\t// Disable the client connection if have service\n \t\tif(mLedService != null) {\n \t\t\tthis.disable();\n \t\t}\n \t\t\n \t\t// Unbind service\n mContext.unbindService(mServiceConnection);\n \n this.isConnected = false;\n \t}\n }",
"public void disconnect() {\n try {\n client.disconnect(null, null);\n } catch (MqttException e) {\n Debug.logError(e, MODULE);\n }\n }",
"public void disconnect(boolean sendQuitCommand)\n \t\t\tthrows IllegalStateException, IOException, JHGDException {\n \t\tif (!connected) {\n \t\t\tthrow new IllegalStateException(\"Client not connected\");\n \t\t}\n \n \t\tif (sendQuitCommand) {\n \t\t\tsendLineCommand(\"bye\");\n \n \t\t\tString returnMessage = (String) input.readLine();\n \t\t\t// System.out.println(\"closeConnection - returned: \"+returnMessage);\n \t\t\tif (checkServerResponse(returnMessage) != HGDConsts.SUCCESS) {\n \t\t\t\tthrow new JHGDException(returnMessage.substring(returnMessage\n \t\t\t\t\t\t.indexOf('|') + 1));\n \t\t\t}\n \t\t}\n \n \t\t// close the socket and clean the flags\n \t\tcloseSocket();\n \n \t\t// Set the flags\n \t\tconnected = false;\n \t\tauthenticated = false;\n \t\tusername = null;\n \t\tpassword = null;\n \t\thost = null;\n \t\tport = 0;\n \n \t}",
"public void disconnect(){\n\t\tfor (NodeInfo peerInfo : peerList) {\r\n\t\t\t// send leave to peer\r\n\t\t\tsend(\"0114 LEAVE \" + ip + \" \" + port, peerInfo.getIp(), peerInfo.getPort());\r\n\t\t\t\r\n\t\t\tfor (NodeInfo peerInfo2 : peerList) {\r\n\t\t\t\tif (!peerInfo.equals(peerInfo2)) {\r\n\t\t\t\t\tString joinString = \"0114 JOIN \" + peerInfo2.getIp() + \" \" + peerInfo2.getPort();\r\n\t\t\t\t\t\r\n\t\t\t\t\tsend(joinString, peerInfo.getIp(), peerInfo.getPort());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\tunRegisterBootstrapServer(serverIp, serverPort, ip, port, username);\r\n\t\t\tapp.printInfo(\"Node disconnected from server....\");\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\t//socket = null;\r\n\t}",
"protected void processDisconnect() {\n\t\tconnected.set(false);\n\t\tsenderChannel = null;\n\t}",
"protected void handleDisconnect()\n {\n RemotingRMIClientSocketFactory.removeLocalConfiguration(locator);\n }",
"void disconnect() throws CCommException, IllegalStateException;",
"public void disconnect() {\n\t\ttry {\n\t\t\tconn.close();\n\t\t\tSystem.out.println(\"切断された/Disconnected\");\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"接続エラーが発生しました/Connection Close Error Occured\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void disconnectConvo() {\n convo = null;\n setConnStatus(false);\n }",
"protected void doDisconnect() throws Exception {\n/* 696 */ if (!this.metadata.hasDisconnect()) {\n/* 697 */ doClose();\n/* */ }\n/* */ }",
"public void receiveResultDisconnect(\r\n\t\t\tcom.autometrics.analytics.v9.j2ee.webservices.v1_0.DisconnectResponse result) {\r\n\t}",
"@Override\n public abstract void disconnect();",
"public void disconnect()\r\n\t{\r\n\t\ttry {\r\n\t\t\tconnection_.close();\r\n\t\t} catch (IOException e) {} // How can closing a connection fail?\r\n\t\t\r\n\t}",
"@Override\r\n\tpublic void onClose(int code, String reason, boolean remote) {\n\t\tSystem.out.println(\"Connection closed by \"\r\n\t\t\t\t+ (remote ? \"remote peer\" : \"us\"));\r\n\t}",
"@Override\r\n\tpublic void disconnect();",
"void onDisconnect();",
"void onDisconnect();",
"public void disconnect();",
"public void disconnect();",
"public void disconnect();",
"public void disconnect();",
"public void mDisconnect() {\n try {\n if (oOutput!=null){\n oOutput.close();\n oOutput=null;}\n if (oInput!=null){\n oInput.close();\n oInput=null;}\n if (oSocket!=null) {\n if (oSocket.isConnected())\n mMsgLog(5,\"Disconnected\");\n oSocket.close();\n oSocket = null;\n }\n if (oDevice!=null){\n oDevice=null;\n }\n } catch (IOException e) {\n mErrMsg(\"Err:\"+e.toString());\n }\n mStateSet(kBT_Disconnected);\n }",
"public interface OnDisconnectListener {\n\n /**\n * Called when client disconnects.\n * @param errorMsg if error caused desconnection, this contains error description.\n */\n void onDisconnect( String errorMsg );\n }",
"abstract protected void onDisconnection();",
"public void disconnect() {\n try {\n if (socket != null)\n socket.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n isConnected = false;\n }",
"public Builder setDisconnect(boolean value) {\n bitField0_ |= 0x00000008;\n disconnect_ = value;\n onChanged();\n return this;\n }",
"protected void onDisconnect() {}",
"public void disconnected(Service service, String localConnectorName, int peerId) {\n \n }",
"void disconnect() throws TransportException;",
"public void disconnect() {if(mEnable) mBS.disconnect();}",
"public void disconnect() {\n \ttry {\n \t\tctx.unbindService(apiConnection);\n } catch(IllegalArgumentException e) {\n \t// Nothing to do\n }\n }",
"public void disconnect() {\t\n\t\t\n\t\ttry {\n\t\t\tconnection.close();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tSystem.out.println(\"Disconnected\");\n\t}",
"public void disconnectFromRemoteDevice() {\n if (debugging)\n Log.d(TAG, \"disconnect FromRemote Device\");\n if (mConnectionManager != null && mConnectionManager.socketStillAlive()) {\n mConnectionManager.closeSocket();\n setState(EBluetoothStates.DISCONNECTED);\n }\n }",
"public void disconnect(){\n\t\tif(player!=null){\n\t\t\tplayer.getConnection().close();\n\t\t\t\n\t\t\t// we get no disconnect signal if we close the connection ourself\n\t\t\tnotifyHandlers(MessageFlag.DISCONNECTED);\n\t\t}\n\t}",
"public void lambda$null$2$OculusLinkDisconnectedDialog() {\n if (this.mRegisteredObserver != 0) {\n setPendingSyntheticButtonClick(new DialogButton(\"cancel\"));\n }\n }",
"public void disconnect() {\n\t\t\n\t}",
"@Disconnect\n public void disconnected(AtmosphereResourceEvent event){\n if (event.isCancelled()) {\n logger.info(\"User:\" + event.getResource().uuid() + \" unexpectedly disconnected\");\n } else if (event.isClosedByClient()) {\n logger.info(\"User:\" + event.getResource().uuid() + \" closed the connection\");\n }\n }",
"@Override\n\tpublic void onClose( int code, String reason, boolean remote ) {\n\t\tlogger.info( \"Connection closed by \" + ( remote ? \"remote peer\" : \"us\" ) + \", reason: \"+reason );\n\t}",
"interface DisconnectCallback {\n\n /**\n * Method called after disconnect from the net will be performed successfully.\n */\n void onDisconnectSuccess();\n\n /**\n * Method called after disconnect from the net will not be performed for some reasons.\n */\n void onDisconnectFailure();\n\n }",
"public void disconnect() {\n\t\tdisconnect(true);\n\t}",
"public void disconnect() throws IOException {\r\n socket.close();\r\n System.out.println(\"Disconnected\");\r\n }",
"public void disconnect() throws IOException;",
"@Override\n\tpublic void disconnect(ChannelHandlerContext ctx, ChannelPromise promise) throws Exception {\n\t\tLog.i(\"MySocketHandler\", \"disconnect\");\n\t\tsuper.disconnect(ctx, promise);\n\t}",
"@Override\n\tpublic void onClose( int code, String reason, boolean remote ) {\n\t\tlog.info(\"Connection closed by \" + ( remote ? \"remote peer\" : \"us\" ) );\n\t}"
]
| [
"0.69692856",
"0.6787104",
"0.6598666",
"0.64103603",
"0.6358098",
"0.62161744",
"0.6063684",
"0.5911496",
"0.5902974",
"0.58520186",
"0.5813996",
"0.5675706",
"0.5546414",
"0.5531619",
"0.5517905",
"0.55147016",
"0.55024755",
"0.5500675",
"0.5486601",
"0.5469188",
"0.54674804",
"0.5459454",
"0.54467404",
"0.54432315",
"0.54236466",
"0.54223543",
"0.54203284",
"0.5393418",
"0.5386217",
"0.5368963",
"0.5344198",
"0.5342312",
"0.53058237",
"0.53012794",
"0.529769",
"0.52897763",
"0.52692324",
"0.5259224",
"0.5253152",
"0.5244759",
"0.5244064",
"0.5224507",
"0.5220942",
"0.5216019",
"0.5180407",
"0.51760477",
"0.51670414",
"0.5166495",
"0.51629627",
"0.5156764",
"0.514751",
"0.51353806",
"0.513463",
"0.5126201",
"0.5108645",
"0.51065814",
"0.50998986",
"0.5097844",
"0.5082568",
"0.508205",
"0.50748557",
"0.50607485",
"0.50400484",
"0.5038286",
"0.50262594",
"0.5022294",
"0.50200784",
"0.50195634",
"0.50164396",
"0.5014692",
"0.50102776",
"0.49943474",
"0.49943474",
"0.49904144",
"0.49904144",
"0.49904144",
"0.49904144",
"0.49902347",
"0.49862432",
"0.49818224",
"0.49780032",
"0.49762833",
"0.4974552",
"0.49718398",
"0.49685186",
"0.4955429",
"0.49537438",
"0.49502754",
"0.49384013",
"0.4933658",
"0.49233937",
"0.4915175",
"0.4914227",
"0.49032077",
"0.4892748",
"0.48925883",
"0.48893845",
"0.48804167",
"0.48732334",
"0.48710802"
]
| 0.57383394 | 11 |
If this protocol supports message delaying, then this returns the number of messages that have not yet been sent because of the enforced delay. | public int getOutgoingQueueSize(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getDelayCount() {\r\n return delayCount;\r\n }",
"int getNetTransferMsgsCount();",
"int getMessagesCount();",
"int getMessagesCount();",
"int getMessagesCount();",
"private int getNumSent() {\n\t\tint ret = 0;\n\t\tfor (int x=0; x<_sentPackets.getSize(); x++) {\n\t\t\tif (_sentPackets.bitAt(x)) {\n\t\t\t\tret++;\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t}",
"public int countTransmission(){\n\t\treturn this.curPackets.size();\n\t}",
"int getMsgCount();",
"int getMsgCount();",
"@Override\n\tpublic int numberOfMessages() {\n\t\treturn 0;\n\t}",
"public int getNumDelayedUpdates() {\n return (Integer) getProperty(\"numDelayedUpdates\");\n }",
"int getMessageCount();",
"int getMessageCount();",
"int getMessageCount();",
"int getMessageCount();",
"int getMessageCount();",
"public int getMessagesCount() {\n return messages_.size();\n }",
"private int getMessageCount() {\r\n return mMessages.length;\r\n }",
"@Override\n public int numberOfMessages() {\n return messages.size();\n }",
"public int getDelayCounter() {\n return delayCounter;\n }",
"public int getNetTransferMsgsCount() {\n if (netTransferMsgsBuilder_ == null) {\n return netTransferMsgs_.size();\n } else {\n return netTransferMsgsBuilder_.getCount();\n }\n }",
"public int getMessagesCount() {\n return messages_.size();\n }",
"public int getMsgCount() {\n return instance.getMsgCount();\n }",
"public int getMsgCount() {\n return instance.getMsgCount();\n }",
"public long getPendingMessageCount() {\n return (long) this.incUpdateQueue.size();\n }",
"public static int getOnGoingSends() {\n return onGoingSends.get() + sendQueue.size();\n }",
"public int getNetTransferMsgsCount() {\n return netTransferMsgs_.size();\n }",
"public int getMessageCount() {\n return message_.size();\n }",
"public int getMessageCount() {\n return message_.size();\n }",
"public int getMessageCount() {\n return message_.size();\n }",
"public int getMessageCount() {\n return message_.size();\n }",
"public int getMessageCount() {\n return message_.size();\n }",
"public int getMsgCount() {\n return msg_.size();\n }",
"public int getMsgCount() {\n return msg_.size();\n }",
"public int getMessagesSent() {\n return this.messagesSent;\n }",
"public static int getPendingRequests() {\n\t\treturn writeQueue.size() + requestsBeingSending.intValue();\n\t}",
"public int getNumAnnouncements(){\n return message.length;\n }",
"public int getNewMessageCount() {\n return messages.size() + droppedMessages.size();\n }",
"long countMessageLengthTill(long maxLength) throws IllegalStateException;",
"int getDeliveredCount();",
"public synchronized int messageCount() {\n \tfinal Query q = mDB.query();\n q.constrain(MessageReference.class);\n q.descend(\"mBoard\").constrain(this).identity();\n return q.execute().size();\n }",
"public Integer getMessageCount() {\r\n return messageCount;\r\n }",
"public int getDeliveredCount() {\n return delivered_.size();\n }",
"public int getDataMessagesSent() {\n\t\tint contador = 0;\n\t\tfor (Contacto c : currentUser.getContacts()) {\n\t\t\tcontador += (c.getMsgsByUser(currentUser.getId()));\n\t\t}\n\t\treturn contador;\n\t}",
"public int getMessagesCount() {\n if (messagesBuilder_ == null) {\n return messages_.size();\n } else {\n return messagesBuilder_.getCount();\n }\n }",
"public long getMessageNackCount() {\n return messageMetrics.nacks.get();\n }",
"public int getDataMessagesReceived() {\n\t\tint contador = 0;\n\t\tfor (Contacto c : currentUser.getContacts()) {\n\t\t\tcontador += (c.getMessages().size() - c.getMsgsByUser(currentUser.getId()));\n\t\t}\n\t\treturn contador;\n\t}",
"int getEnqueuedBlockRequestsNumber() {\n int count = 0;\n for (StdPeerMessage pm : sendQueue) {\n if (pm.type == StdPeerMessage.REQUEST) {\n count++;\n }\n }\n return count;\n }",
"public int getDeliveredCount() {\n if (deliveredBuilder_ == null) {\n return delivered_.size();\n } else {\n return deliveredBuilder_.getCount();\n }\n }",
"long getReceivedEventsCount();",
"public int getMessagesCount() {\n if (messagesBuilder_ == null) {\n return messages_.size();\n } else {\n return messagesBuilder_.getCount();\n }\n }",
"public int waitForMessages() throws InterruptedException {\n return waitForMessages(40, null);\n }",
"public int getMessageCount() {\n if (messageBuilder_ == null) {\n return message_.size();\n } else {\n return messageBuilder_.getCount();\n }\n }",
"public int getMessageCount() {\n if (messageBuilder_ == null) {\n return message_.size();\n } else {\n return messageBuilder_.getCount();\n }\n }",
"public int getMessageCount() {\n if (messageBuilder_ == null) {\n return message_.size();\n } else {\n return messageBuilder_.getCount();\n }\n }",
"public int getMessageCount() {\n if (messageBuilder_ == null) {\n return message_.size();\n } else {\n return messageBuilder_.getCount();\n }\n }",
"public int getMessageCount() {\n if (messageBuilder_ == null) {\n return message_.size();\n } else {\n return messageBuilder_.getCount();\n }\n }",
"public int getScheduledMessageCount() throws Exception\n {\n return destination.queue.getScheduledMessageCount();\n }",
"public final int getPendingCount()\n/* */ {\n/* 508 */ return this.pending;\n/* */ }",
"public synchronized int getMessageCount() {\n return _references.size();\n }",
"String getMaximumRedeliveryDelay();",
"public AsyncResult<Integer> requestNumberOfMessages() {\r\n ServiceDiscoveryManager serviceDiscoveryManager = xmppSession.getManager(ServiceDiscoveryManager.class);\r\n return serviceDiscoveryManager.discoverInformation(null, OfflineMessage.NAMESPACE).thenApply(infoDiscovery -> {\r\n if (!infoDiscovery.getExtensions().isEmpty()) {\r\n DataForm dataForm = infoDiscovery.getExtensions().get(0);\r\n if (dataForm != null) {\r\n for (DataForm.Field field : dataForm.getFields()) {\r\n if (\"number_of_messages\".equals(field.getVar())) {\r\n String numberOfMessages = field.getValues().get(0);\r\n return Integer.valueOf(numberOfMessages);\r\n }\r\n }\r\n }\r\n }\r\n return 0;\r\n });\r\n }",
"@Nonnegative\n @CheckReturnValue\n public abstract int getRemainingRequests();",
"public org.apache.axis.types.UnsignedInt getDelay() {\n return delay;\n }",
"public long getMessageReceivedCount() {\n return messageMetrics.received.get();\n }",
"public int getDelayTime()\n\t{\n\t\treturn delayTime;\n\t}",
"public int getMissedCallsCount();",
"public int getDelay()\r\n {\r\n return this.delay;\r\n }",
"public final int size()\n\t{\n\t\tif (messages == null)\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn messages.size();\n\t\t}\n\t}",
"public int our_packetsLost(){ //For a group call, should take an input ID, should be UPDATED\n return this.our_packs_lost;\n }",
"int getMaximumDelay();",
"public int getMessageIdCount() {\n return instance.getMessageIdCount();\n }",
"public Long getLostPackets() {\n return lostPackets;\n }",
"@Override\r\n\tpublic int selectMessageCount() {\n\t\treturn messageMapper.selectMessageCount();\r\n\t}",
"public int getDelay() {\r\n\t\treturn delay;\r\n\t}",
"public int getNumberOfRegisteredMessages() {\n return registeredMessages.size();\n }",
"public int getDelay() {\r\n return delay;\r\n }",
"public int getDelay()\n {\n return delay;\n }",
"public static int countReceivedBytes() {\n\tint sum = 0;\n\n\tfor (Class<? extends TrackedMessage> messageClassType : TrackedMessage.messagesSent\n\t\t.keySet())\n\t sum += TrackedMessage.countSentBytes(messageClassType);\n\n\treturn sum;\n }",
"public native long getSentPacketCount()\n throws IOException, IllegalArgumentException;",
"public long getMessageAckCount() {\n return messageMetrics.acks.get();\n }",
"public void incMessagesSent() {\n this.messagesSent++;\n }",
"public int getDelay() {\n return delay;\n }",
"public int remain() {\n if (sendbuffer == null) {\n return 0;\n }\n return sendbuffer.remaining();\n }",
"public int getDelay() {\n\t\treturn delay;\n\t}",
"public static int countReceivedMessages() {\n\tint sum = 0;\n\n\tfor (Class<? extends TrackedMessage> messageClassType : TrackedMessage.messagesSent\n\t\t.keySet())\n\t sum += TrackedMessage.countReceivedMessages(messageClassType);\n\n\treturn sum;\n }",
"String getRedeliveryDelay();",
"public native long getNoRoomDiscardedPacketCount()\n throws IOException, IllegalArgumentException;",
"public Integer getTolerableDelay() {\n\t\treturn tolerableDelay;\n\t}",
"public static int countSentMessages() {\n\tint sum = 0;\n\n\tfor (Class<? extends TrackedMessage> messageClassType : TrackedMessage.messagesSent\n\t\t.keySet())\n\t sum += TrackedMessage.countSentMessages(messageClassType);\n\n\treturn sum;\n }",
"private int blockingDialogDelay()\r\n/* */ {\r\n/* 313 */ Integer delay = null;\r\n/* 314 */ String key = \"BlockingDialogTimer.delay\";\r\n/* 315 */ ApplicationAction action = getAction();\r\n/* 316 */ if (action != null) {\r\n/* 317 */ ResourceMap actionResourceMap = action.getResourceMap();\r\n/* 318 */ String actionName = action.getName();\r\n/* 319 */ delay = actionResourceMap.getInteger(actionName + \".\" + key);\r\n/* */ }\r\n/* 321 */ ResourceMap taskResourceMap = getTask().getResourceMap();\r\n/* 322 */ if ((delay == null) && (taskResourceMap != null)) {\r\n/* 323 */ delay = taskResourceMap.getInteger(key);\r\n/* */ }\r\n/* 325 */ return delay == null ? 0 : delay.intValue();\r\n/* */ }",
"public long getDelay();",
"public int latencyMsgsPerSec()\n\t{\n\t\treturn _latencyMsgsPerSec;\n\t}",
"public int getMessageIdCount() {\n return messageId_.size();\n }",
"public static int countUnseenMessagesFromAppliance() {\r\n\t\t// System.out.println(\"CustomerBAL.countUnseenMessagesFromAppliance()\");\r\n\t\tint count = 0;\r\n\r\n\t\ttry (Connection connection = Connect.getConnection();) {\r\n\t\t\tif (connection != null) {\r\n\t\t\t\tCallableStatement prepareCall = connection\r\n\t\t\t\t\t\t.prepareCall(\"{CALL count_unseen_status_messages_from_appliance()}\");\r\n\t\t\t\tResultSet resultSet = prepareCall.executeQuery();\r\n\t\t\t\t// End Stored Procedure\r\n\t\t\t\twhile (resultSet.next()) {\r\n\t\t\t\t\tcount = resultSet.getInt(1);\r\n\t\t\t\t}\r\n\t\t\t\t// rs.close();\r\n\t\t\t\t// con.close();\r\n\t\t\t\tconnection.close();\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn count;\r\n\r\n\t}",
"public long getInMsgs() {\n return inMsgs.get();\n }",
"public int totalMsgsPerSec()\n\t{\n\t\treturn _totalMsgsPerSec;\n\t}",
"public Long getSentPackets() {\n\t\treturn sentPackets;\n\t}",
"@Override\n\tpublic int getMessageCounter() {\n\t\treturn counter;\n\t}",
"public int getAlertMessageTimeRemaining()\n {\n return this.alert_message_time_remaining;\n }",
"org.jboss.mq.server.MessageCounter[] getMessageCounter() throws java.lang.Exception;"
]
| [
"0.69046015",
"0.6359932",
"0.63404644",
"0.63404644",
"0.63404644",
"0.6230387",
"0.6229444",
"0.6222579",
"0.6222579",
"0.6187712",
"0.61438143",
"0.6100211",
"0.6100211",
"0.6100211",
"0.6100211",
"0.6100211",
"0.6099517",
"0.6099146",
"0.60835916",
"0.6081844",
"0.6066123",
"0.6038451",
"0.6024889",
"0.6024889",
"0.5994285",
"0.5990085",
"0.5985171",
"0.59819525",
"0.59819525",
"0.59819525",
"0.59819525",
"0.59819525",
"0.59755605",
"0.59755605",
"0.5968474",
"0.59547466",
"0.59279597",
"0.59217775",
"0.58929485",
"0.5885809",
"0.58670175",
"0.5862752",
"0.58573246",
"0.58530545",
"0.58524704",
"0.58318913",
"0.58252966",
"0.5805901",
"0.58002675",
"0.57836866",
"0.5782482",
"0.57684827",
"0.5759506",
"0.5759506",
"0.5759506",
"0.5759506",
"0.5759506",
"0.5753903",
"0.5696176",
"0.56870925",
"0.5666468",
"0.565984",
"0.5652946",
"0.5640385",
"0.5630531",
"0.5629327",
"0.5623262",
"0.5605234",
"0.5602322",
"0.5597736",
"0.5587019",
"0.55735385",
"0.55560213",
"0.555396",
"0.55446124",
"0.5544345",
"0.55438036",
"0.55383795",
"0.552649",
"0.5520707",
"0.55089074",
"0.5503009",
"0.54969174",
"0.5496736",
"0.5492378",
"0.5483457",
"0.5483217",
"0.5480893",
"0.5479622",
"0.5478023",
"0.5464072",
"0.5457249",
"0.54528594",
"0.54471517",
"0.544425",
"0.5441193",
"0.5432935",
"0.5426817",
"0.54214317",
"0.54185253",
"0.54129046"
]
| 0.0 | -1 |
Sets the topic for the specified channel. This should do nothing if the bot doesn't have privileges to set the topic on a server. | public void setTopic(String channel, String topic); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setTopic(String channel, String topic)\n\t{\n\t\tsendRaw(\"TOPIC \" + channel + \" \" + topic);\n\t}",
"public static void setTopic(String channelId, String topic) {\n if (channelId == null) {\n throw new IllegalArgumentException(\"Channel id cannot be null\");\n }\n if (topic == null) {\n throw new IllegalArgumentException(\"topic cannot be null\");\n }\n if (Loader.jda != null) {\n TextChannel channel = Loader.jda.getTextChannelById(channelId);\n if (channel != null) {\n channel.getManager().setTopic(topic).queue();\n } else if (Loader.debug) {\n Loader.instance.getLogger().error(\"setTopic: TextChannel is null: \" + channelId);\n }\n } else if (Loader.debug) {\n Loader.instance.getLogger().error(\"setTopic: JDA is null\");\n }\n }",
"public void setTopic(String channelName, String topic) {\n try {\n SlackChannel channel = this.slackChannelFromName(channelName);\n this.session.setChannelTopic(channel, topic);\n } catch (ChannelNotFoundException exception) {\n System.err.println(exception.getMessage());\n }\n }",
"public static void setTopic(String topic) {\n setTopic(Loader.channelId, topic);\n }",
"void setTopic(String topic);",
"private void setChannel(String channel){\n put(SlackParamsConstants.CHANNEL, channel);\n }",
"public void setTopic(String v) {\n if (MetadataUGWD_Type.featOkTst && ((MetadataUGWD_Type)jcasType).casFeat_topic == null)\n jcasType.jcas.throwFeatMissing(\"topic\", \"de.aitools.ie.uima.type.argumentation.MetadataUGWD\");\n jcasType.ll_cas.ll_setStringValue(addr, ((MetadataUGWD_Type)jcasType).casFeatCode_topic, v);}",
"protected void onTopic(String channel, String topic, String setBy, long date, boolean changed) {}",
"public Builder setTopic(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n topic_ = value;\n onChanged();\n return this;\n }",
"public void setChannel(String channel) {\r\n this.channel = channel == null ? null : channel.trim();\r\n }",
"public void setChannel(String channel) {\n\t\tthis.channel = channel == null ? null : channel.trim();\n\t}",
"public void setTopic( String topic ) {\n this.topic = topic;\n }",
"public ServerScheduledEventBuilder setChannel(ServerVoiceChannel channel) {\n delegate.setChannelId(channel.getId());\n return this;\n }",
"public void setTopic(Topic topic) {\n this.topic = topic;\n }",
"public void setTopic(String topic) {\n this.topic = topic;\n }",
"public void setTopic(String topic) {\n\t\tthis.topic = topic;\n\t}",
"public void setTopic(String topic) {\n\t\tthis.topic = topic;\n\t}",
"public Builder setTopic(long value) {\n \n topic_ = value;\n onChanged();\n return this;\n }",
"public void setChannel(String channel) {\n\t\tthis.channel = channel;\n\t}",
"public void setChannel(Channel channel)\n {\n this.channel = channel;\n }",
"public void SetChannel(int channel);",
"public boolean setSupportChannel(TextChannel channel, boolean announce) {\n\t\tif (getGuild() == null || channel == null || !channel.getGuild().equals(getGuild())) { return false; }\n\t\tsupportChannel = channel;\n\t\tif (announce) {\n\t\t\tsupportChannel.sendMessage(\"Now listening to this channel for ticket requests\")\n\t\t\t\t\t.queue(msg -> QueueHelper.queueLater(msg.delete(), QueueHelper.SHORT));\n\t\t}\n\t\tconfig.save();\n\t\tif (!config.isLoading()) { TMEventManager.departmentChange(this, ChangeType.Dept.CHANNEL); }\n\t\treturn true;\n\t}",
"public abstract void updateTopic(String topic);",
"public void createTopic(String topic) {\n\n\t}",
"public Channel(String topic) {\n super(topic);\n this.topic = topic;\n this.messages = new HashSet<>();\n }",
"public void setChannelName(String channel)\n {\n mChannelName = channel;\n }",
"public void setMode(String channel, String mode);",
"public void setChannel(Channel channel)\n {\n if (this.channel != null)\n {\n this.channel.setGateway(null);\n }\n\n this.channel = channel;\n if (channel != null)\n {\n channel.setGateway(gatewayRouter.getGateway());\n }\n\n gatewayRouter.setGatewayCallback(channel);\n }",
"public void kick(String channel, String user, String reason);",
"public void kick(String user, String channel)\n\t{\n\t\tkick(user, channel, null);\n\t}",
"public void goToNotificationSettings(String channel) {\n Intent i = new Intent(Settings.ACTION_CHANNEL_NOTIFICATION_SETTINGS);\n i.putExtra(Settings.EXTRA_APP_PACKAGE, getPackageName());\n i.putExtra(Settings.EXTRA_CHANNEL_ID, channel);\n startActivity(i);\n }",
"public boolean topic(String owner, String repo, String topic) {\n return apiClient.put(String.format(\"/repos/%s/%s/topics/%s\", owner, repo, topic)).isOk();\n }",
"public void setChannel(org.apache.axis.types.UnsignedInt channel) {\n this.channel = channel;\n }",
"@Override\n\t\t\t\tpublic void selectTopic(String topic) {\n\t\t\t\t\t\tsendData(\"<select><username>\" + username +\"</username><topic>\" + topic + \"</topic></select>\");\n\t\t\t\t}",
"public Builder setChannel(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n channel_ = value;\n onChanged();\n return this;\n }",
"public void partChannel(String channel, String reason);",
"public void putChannel(NotificationsChannel notiChannel) throws Exception;",
"@PreAuthorize(\"hasRole('superman')\")\n\tpublic abstract boolean updateChannel(Channel channel);",
"public void setManualChannel(String manualChannel) {\r\n this.manualChannel = manualChannel == null ? null : manualChannel.trim();\r\n }",
"public void setChannel(PowerChannel channel) {\n this.channel = channel;\n }",
"public void setTopicHandle(String topicHandle) {\n this.topicHandle = topicHandle;\n }",
"void setChannel(EzyChannel channel);",
"@objid (\"590a2bf3-2953-41dc-8b02-1f07ac23249c\")\n void setChannel(Link value);",
"public void putTopic(Topic topic) {\n\t\ttopics.add(topic) ;\n\t}",
"@Override\n\t\t\t\tpublic void addTopic(String topic) {\n\t\t\t\t\t\tsendData(\"<new><name>\" + topic +\"</name></new>\");\n\t\t\t\t}",
"public Builder setChannelToken(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n channelToken_ = value;\n onChanged();\n return this;\n }",
"public Builder setChannelToken(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n channelToken_ = value;\n onChanged();\n return this;\n }",
"public YouTubeVideo setAuthor(YouTubeChannel author) {\n this.channelId = null;\n this.author = author;\n return this;\n }",
"private synchronized void setCurrentChannel(String currentChannel) {\n\n this.currentChannel = currentChannel;\n }",
"public void createNewTopic() {\n try {\n forumService.createNewTopic(\n newTopicName.trim(),\n TopicCategory.OTHER,\n currentUser,\n cloudOfTopic);\n } catch (Exception e) {\n logger.error(ExceptionUtils.getStackTrace(e));\n }\n newTopicName = \"\";\n refreshForumState();\n }",
"public void part(String channel)\n\t{\n\t\tsendRaw(\"PART \" + channel);\n\t}",
"void startHelloSender(Channel channel);",
"public static <TResource extends Document> void setResource(Channel channel, final LimeUri limeUri, final Node from, final TResource resource) throws IOException, InterruptedException, TimeoutException {\n if (channel == null) {\n throw new IllegalArgumentException(\"channel\");\n }\n if (limeUri == null) {\n throw new IllegalArgumentException(\"limeUri\");\n }\n if (resource == null) {\n throw new IllegalArgumentException(\"resource\");\n }\n\n final Command requestCommand = new Command(EnvelopeId.newId()) {{\n setMethod(CommandMethod.SET);\n setResource(resource);\n setFrom(from);\n setUri(limeUri);\n }};\n\n Command responseCommand = processCommand(channel, requestCommand);\n if (responseCommand.getStatus() != Command.CommandStatus.SUCCESS) {\n throw new LimeException(responseCommand.getReason());\n }\n }",
"@Override\r\n\tpublic void changeChannel(int channel) {\n\t\tSystem.out.println(\"채널을 바꾸다\");\r\n\t}",
"public Builder setChannel(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000200;\n channel_ = value;\n onChanged();\n return this;\n }",
"public void setChannel(Byte channel) {\n this.channel = channel;\n }",
"@Test\n public void testTopicAccessControl() {\n // set permissions\n PermissionData data = new PermissionData(true, false, false, true);\n pms.configureTopicPermissions(testUser, category, data);\n\n // test access control\n assertTrue(accessControlService.canViewTopics(category), \"Test user should be able to view topic in category!\");\n assertTrue(accessControlService.canAddTopic(category), \"Test user should be able to create topics in category!\");\n assertFalse(accessControlService.canEditTopic(topic), \"Test user should not be able to edit topics in category!\");\n assertFalse(accessControlService.canRemoveTopic(topic), \"Test user should not be able to remove topics in category!\");\n }",
"private void subscribeToTopic(String topic) {\n try {\n mqttAndroidClient.subscribe(topic, 0, null, new IMqttActionListener() {\n @Override\n public void onSuccess(IMqttToken asyncActionToken) {\n Log.w(\"MQTT\",\"Subscribed!\");\n }\n\n @Override\n public void onFailure(IMqttToken asyncActionToken, Throwable exception) {\n Log.w(\"MQTT\", \"Subscribe fail!\");\n }\n });\n } catch (MqttException ex) {\n System.err.println(\"Exception whilst subscribing\");\n ex.printStackTrace();\n }\n }",
"public String getTopic() {\n return this.topic;\n }",
"public Builder setChannelId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n channelId_ = value;\n onChanged();\n return this;\n }",
"public ServerScheduledEventBuilder setChannelId(Long channelId) {\n delegate.setChannelId(channelId);\n return this;\n }",
"public void setChannel(SubscribableChannel messageChannel) {\n\t\tthis.messageChannel = messageChannel;\n\t}",
"public void editTopic(WebDriver driver) {\n \n try {\n Thread.sleep(15000);\n } catch (InterruptedException ex) {\n Logger.getLogger(BaseballPage.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n WebElement searchBox = waitForVisibilityOfElement(driver, searchField);\n searchBox.clear();\n searchBox.sendKeys(help.getTitle());\n WebElement search = waitForElement(driver, searchBtn);\n search.click();\n \n WebElement titleName_ = waitForVisibilityOfElement(driver, titleName);\n titleName_.click();\n \n WebElement editBtn = waitForElement(driver, edit);\n editBtn.click();\n \n WebElement tit = waitForVisibilityOfElement(driver, title);\n tit.clear();\n String text = sendText(driver, tit);\n help.setTitle(text);\n System.out.println(\"New Topic Title: \" + text);\n\n WebElement textArea = waitForVisibilityOfElement(driver, textarea);\n textArea.clear();\n String txt = FillData.getRandomText();\n textArea.sendKeys(txt);\n System.out.println(\"New Textarea text: \" + txt);\n \n clickOnElement(driver, send);\n \n Select select = new Select(waitForVisibilityOfElement(driver, jumpTo));\n select.selectByValue(\"f36\");\n clickOnElement(driver, goBtn);\n \n }",
"public void sendMessageToJavaServer(JSONObject json, SSLSocketChannel channel) {\n\t\t\tsendMessageToJavaServer(json.toString(), channel);\n\t\t}",
"public Builder clearTopic() {\n \n topic_ = getDefaultInstance().getTopic();\n onChanged();\n return this;\n }",
"private void addChannelToFavorites(String channel) {\r\n channel = prepareChannel(channel);\r\n if (channel != null) {\r\n settings.setAdd(FAVORITES_SETTING, channel);\r\n }\r\n }",
"public void destroyTopic(String topic) {\n\n\t}",
"OutgoingStream<T> withTopic(String topic);",
"public Builder setTopicBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n topic_ = value;\n onChanged();\n return this;\n }",
"public void setTopicName(final String topicName) {\n this.topicName = Optional.ofNullable(topicName);\n }",
"@Test()\n public void doTestWithNormalPermission() throws Exception {\n doTestChangeTopic(\"publisher\", \"123\");\n }",
"public String getTopic() {\n return topic;\n }",
"public String getTopic() {\n return topic;\n }",
"@Override\n\tpublic void channelParted(String channel) {\n\t}",
"public void updateTopic(Topic topic, String id) {\n\t\tif (Objects.nonNull(getTopic(id)))\n\t\t\ttopicRepository.save(topic);\n\t}",
"public String getTopic() {\n\t\treturn topic;\n\t}",
"@Override\n\tpublic void setCluster(java.lang.String cluster) {\n\t\t_scienceApp.setCluster(cluster);\n\t}",
"public void onChannel(String channel, String title, String subtitle);",
"public static void MessageChannel(String message, TextChannel channel) {\n\t\tchannel.sendMessage(message).queue();\n\t}",
"public void kick(String user, String channel, String reason)\n\t{\n\t\tsendRaw(\"KICK \" + channel + \" \" + user + (reason != null ? \" :\" + reason : \"\"));\n\t}",
"@Override\n public void updateTopicAccess(String userId, String topicId) {\n\n\t}",
"@Test()\n public void doTestWithSuperPermission() throws Exception {\n doTestChangeTopic(\"admin\", \"123\");\n }",
"public void setChannelId(String channelId)\n {\n this.channelId = channelId;\n }",
"public void subscribe(final Topic topic) {\r\n new Thread(new Runnable() {\r\n public void run() {\r\n int attempts = 0;\r\n while(++attempts < 20){\r\n try {\r\n if(server.addSubscriber((PubSubAgent.this.agentID), topic)){\r\n subscriberTopics.add(topic);\r\n System.out.print(\"Subscribed.\");\r\n return;\r\n }\r\n } catch (RemoteException e) {\r\n System.err.println(\"Could not connect to server. Retrying...\");\r\n try {\r\n Thread.sleep(1200);\r\n } catch (InterruptedException ex) {\r\n ex.printStackTrace();\r\n }\r\n }\r\n }\r\n System.err.println(\"Couldn't subscribe to \" + topic.getTopicID() + \" - \" + topic.getTopicName());\r\n }\r\n }).start();\r\n }",
"public void setChannel(@EntityInstance int i, @IntRange(from = 0, to = 3) int channel) {\n nSetChannel(mNativeObject, i, channel);\n }",
"public void setSocketChannel(SocketChannel socketChannel);",
"public boolean setTicketCategory(Category category) {\n\t\tif (getGuild() == null || category == null || !category.getGuild().equals(getGuild())) { return false; }\n\t\tticketCategory = category;\n\t\tconfig.save();\n\t\tif (!config.isLoading()) { TMEventManager.departmentChange(this, ChangeType.Dept.CATEGORY); }\n\t\treturn true;\n\t}",
"@Override\r\n\tpublic int updateTopic(Topic topic) throws SQLException {\n\t\treturn 0;\r\n\t}",
"public boolean setPosition(int channel, int x, int y) {\n if (position[channel] == null) {\n position[channel] = new Point(x, y);\n return true;\n } else {\n position[channel].setLocation(x, y);\n return false;\n }\n }",
"public void publish(@NonNull final Topic topic, @NonNull final Message message){\n topic.addMessage(message);\n System.out.println(message.getMsg()+\" published to \"+topic.getTopicName());\n topic_Handler_Map.get(topic.getTopicId()).publish();\n }",
"public static <TResource extends Document> void setResource(Channel channel, final LimeUri limeUri, final TResource resource) throws IOException, InterruptedException, TimeoutException {\n setResource(channel, limeUri, null, resource);\n }",
"public void send(String providedTopic,V msg);",
"public void tell(int channel, String msg, Object... args) {\n if (args.length > 0) {\n msg = MessageFormat.format(msg, args);\n }\n sendQuietly(\"tell {0} {1}\", channel, msg);\n }",
"private void removeChannelFromFavorites(String channel) {\r\n channel = prepareChannel(channel);\r\n if (channel != null) {\r\n settings.listRemove(FAVORITES_SETTING, channel);\r\n }\r\n }",
"public void deleteDiscussionTopic(IDiscussionTopic topic)\n throws OculusException;",
"public void sendMessageToUsers(JSONObject json, SSLSocketChannel channel) {\n\t\t\tsendMessageToUsers(json.toString(), channel);\n\t\t}",
"@Override\n\tpublic void saveTopic(String categoryId, String forumId, Topic topic,\n\t\t\tboolean isNew, boolean isMove, MessageBuilder messageBuilder)\n\t\t\tthrows Exception {\n\n\t}",
"private synchronized String prepareChannel(String channel) {\r\n if (channel == null || channel.isEmpty()) {\r\n return null;\r\n }\r\n if (channel.startsWith(\"#\")) {\r\n channel = channel.substring(1);\r\n if (channel.isEmpty()) {\r\n return null;\r\n }\r\n }\r\n return channel;\r\n }",
"public void deleteTopic(String nume) throws RemoteException;",
"public void setChannelId(String channelId) {\n this.channelId = channelId;\n }"
]
| [
"0.7804585",
"0.6875425",
"0.6604521",
"0.63432634",
"0.614293",
"0.6041565",
"0.6027727",
"0.5851976",
"0.5788113",
"0.5648962",
"0.5642668",
"0.5590179",
"0.5560566",
"0.554477",
"0.5470334",
"0.53808576",
"0.53808576",
"0.5353575",
"0.53165925",
"0.5212598",
"0.5167657",
"0.51546794",
"0.5023016",
"0.4999751",
"0.4960433",
"0.49388123",
"0.49326548",
"0.49263468",
"0.48981258",
"0.48747274",
"0.48433584",
"0.48293304",
"0.47997046",
"0.478505",
"0.4776423",
"0.47300377",
"0.46835852",
"0.46814707",
"0.46752065",
"0.4662487",
"0.46247637",
"0.46167785",
"0.46129006",
"0.461143",
"0.45986313",
"0.45434976",
"0.45434976",
"0.45381913",
"0.45233843",
"0.44992608",
"0.44985196",
"0.4483616",
"0.44771558",
"0.44733638",
"0.44649363",
"0.44513685",
"0.44357112",
"0.44203347",
"0.44195488",
"0.4416552",
"0.44164962",
"0.4413558",
"0.44104522",
"0.4409909",
"0.44025642",
"0.43902785",
"0.43863675",
"0.43810606",
"0.43807292",
"0.43732455",
"0.43628153",
"0.43534237",
"0.43532532",
"0.4351536",
"0.43460223",
"0.4342265",
"0.43410507",
"0.4318399",
"0.43012255",
"0.42935178",
"0.42870033",
"0.42836782",
"0.42798355",
"0.4278347",
"0.42782345",
"0.42707038",
"0.42652735",
"0.42640895",
"0.42617562",
"0.42320055",
"0.42316654",
"0.4230194",
"0.42293653",
"0.42259014",
"0.42204967",
"0.42092922",
"0.4195179",
"0.41783863",
"0.41627032",
"0.41618112"
]
| 0.7944958 | 0 |
Changes the bot's nick to the new nickname specified. This generally should not persist through a reconnect. If this protocol does not support nickname changing, this should do nothing. | public void changeNick(String newnick); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public IRCSocketManager setNick(String nick)\n\t{\n\t\tif (nick == null)\n\t\t{\n\t\t\tthrow new IllegalArgumentException(\"Nick cannot be null.\");\n\t\t}\n\t\tthis._nick = nick;\n\t\t// Before attempting a send operation, we have to make sure we're actually\n\t\t// connected to a server, and that the bot's connect() method has been called.\n\t\tif (!isConnected())\n\t\t{\n\t\t\t// Return back to the caller, we shouldn't try and set the nick on the server if\n\t\t\t// we're not connected to one.\n\t\t\treturn this;\n\t\t}\n\t\tsendRaw(\"NICK \" + _nick);\n\t\treturn this;\n\t}",
"public void setNick(String nick) {\n this.nick = nick;\n }",
"public void setNickname(String nickname) {\r\n this.nickname = nickname;\r\n }",
"public void setNickname(String nickname) {\n this.nickname = nickname;\n }",
"public void setNickname(String nickname) {\n this.nickname = nickname;\n }",
"public void setNickName(String nickName) {\n\t\tthis.nickName = nickName;\n\t}",
"public void setNick(String nick) {\n\t\tthis.nick = nick;\n\t}",
"public void setNickName(String nickName) {\n this.nickName = nickName == null ? null : nickName.trim();\n }",
"public void setNickName(String nickName) {\n this.nickName = nickName == null ? null : nickName.trim();\n }",
"public void setNickName(String nickName) {\n this.nickName = nickName == null ? null : nickName.trim();\n }",
"public void setNickName(String nickName) {\n this.nickName = nickName == null ? null : nickName.trim();\n }",
"public void setNickName(String nickName) {\n this.nickName = nickName == null ? null : nickName.trim();\n }",
"public void setNickName(String nickName) {\r\n this.nickName = nickName == null ? null : nickName.trim();\r\n }",
"public void setNick(String nick) {\r\n this.nick = nick == null ? null : nick.trim();\r\n }",
"protected void setLocalNickname(final String nick) {\n this.nick = nick;\n }",
"public void setNickname(String nickname) {\n this.nickname = nickname == null ? null : nickname.trim();\n }",
"public void setNickname(String nickname) {\n this.nickname = nickname == null ? null : nickname.trim();\n }",
"public void setNickname(String nickname) {\n this.nickname = nickname == null ? null : nickname.trim();\n }",
"public void setNickname(String nickname) {\n this.nickname = nickname == null ? null : nickname.trim();\n }",
"public void setNickname(String nickname) {\n this.nickname = nickname == null ? null : nickname.trim();\n }",
"public void setNickname(String nickname) {\n\t\tthis.nickname = nickname == null ? null : nickname.trim();\n\t}",
"public void setUserNick(String userNick) {\r\n this.userNick = userNick;\r\n }",
"public Builder setNickname(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n nickname_ = value;\n onChanged();\n return this;\n }",
"public String getnick() {\n return nickname;\n }",
"public void updateNickname(Account account, NicknameForm nicknameForm) {\n account.setNickname(nicknameForm.getNickname());\n accountRepository.save(account);\n login(account);\n }",
"public Builder setNickname(com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n nickname_ = value;\n onChanged();\n return this;\n }",
"public void setNickname(java.lang.String param) {\n localNicknameTracker = true;\n\n this.localNickname = param;\n }",
"@Override\n public void nick_name(String nick){\n ///Pregunta el nombres y el usuario le asigna\n nickName= nick;\n nombre=nickName;\n }",
"public String getNickName() {\r\n return nickName;\r\n }",
"public String getNick() {\r\n return nick;\r\n }",
"public java.lang.String getNickname() {\n java.lang.Object ref = nickname_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n nickname_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public String getNickname() {\n return nickname;\n }",
"public com.google.protobuf.ByteString\n getNicknameBytes() {\n java.lang.Object ref = nickname_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n nickname_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public String getNickname() {\r\n return nickname;\r\n }",
"public Builder setNickname(com.google.protobuf.StringValue value) {\n if (nicknameBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n nickname_ = value;\n onChanged();\n } else {\n nicknameBuilder_.setMessage(value);\n }\n\n return this;\n }",
"public String getNick() {\n\t\treturn nick;\n\t}",
"public String getNick() {\n\t\treturn nick;\n\t}",
"public String getNickname() {\n return nickname;\n }",
"public String getNickname() {\n return nickname;\n }",
"public String getNickname() {\n return nickname;\n }",
"public String getNickname() {\n return nickname;\n }",
"public String getNickname() {\n return nickname;\n }",
"public String getNickname() {\n return nickname;\n }",
"public String getNickname() {\n return nickname;\n }",
"public String getNickname() {\n return nickname;\n }",
"public String getNickname() {\n return nickname;\n }",
"public String getNickname() {\n return nickname;\n }",
"public String getNickName() {\n return nickName;\n }",
"public String getNickName() {\n return nickName;\n }",
"public String getNickName() {\n return nickName;\n }",
"public String getNickName() {\n return nickName;\n }",
"public String getNickName() {\n return nickName;\n }",
"public String getNickName() {\n return nickName;\n }",
"@java.lang.Override\n public com.google.protobuf.StringValue getNickname() {\n return nickname_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : nickname_;\n }",
"public Builder setNicknameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n nickname_ = value;\n onChanged();\n return this;\n }",
"@java.lang.Override\n public java.lang.String getNickname() {\n java.lang.Object ref = nickname_;\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 nickname_ = s;\n return s;\n }\n }",
"public void setNickUsuario(String nickUsuario) {\r\n this.nickUsuario = nickUsuario;\r\n }",
"public String getNickName()\r\n {\r\n\treturn nickName;\r\n }",
"public String getNickName()\r\n {\r\n\treturn nickName;\r\n }",
"public com.google.protobuf.ByteString getNickname() {\n return nickname_;\n }",
"public String getNick()\n\t{\n\t\treturn _nick;\n\t}",
"public Builder setNickname(\n com.google.protobuf.StringValue.Builder builderForValue) {\n if (nicknameBuilder_ == null) {\n nickname_ = builderForValue.build();\n onChanged();\n } else {\n nicknameBuilder_.setMessage(builderForValue.build());\n }\n\n return this;\n }",
"@java.lang.Override\n public com.google.protobuf.ByteString\n getNicknameBytes() {\n java.lang.Object ref = nickname_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n nickname_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public com.google.protobuf.ByteString getNickname() {\n return nickname_;\n }",
"public abstract void kickUser(String nickname, String reason);",
"java.lang.String getNick();",
"java.lang.String getNick();",
"public com.google.protobuf.StringValue getNickname() {\n if (nicknameBuilder_ == null) {\n return nickname_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : nickname_;\n } else {\n return nicknameBuilder_.getMessage();\n }\n }",
"java.lang.String getNickname();",
"private void reconnectKnownPlayer(String nickname, VirtualView vv) {\n gameManager.getLobbyManager().reconnectPlayer(nickname, vv);\n }",
"private void tryNickname(NicknameEvent nicknameEvent) {\n if(connectionChoice == 1) {\n if(nicknameEvent.isFirstTime()){\n //Usare amazon checkip per rmi, settare la proprietà del sistema\n try {\n remoteReference = (ClientInterfaceRMI) UnicastRemoteObject.exportObject(this, 0);\n } catch (ExportException ignore) {\n //if the object is already exported then do nothing\n } catch (RemoteException e) {\n System.err.println(CONNECTION_ERROR + e.getMessage() + \"!\");\n }\n }\n\n try {\n server.addClient(remoteReference);\n } catch (RemoteException e) {\n System.err.println(CONNECTION_ERROR + e.getMessage() + \"!\");\n } catch (IllegalArgumentException e) {\n System.out.println(e.getMessage());\n setChanged();\n notifyObservers(new ConnectionEstablishedEvent(false));\n }\n } else {\n try {\n server.notify(nicknameEvent);\n }\n catch (RemoteException e) {\n System.out.println(\"This should never happen!\");\n }\n }\n }",
"public com.google.protobuf.StringValueOrBuilder getNicknameOrBuilder() {\n if (nicknameBuilder_ != null) {\n return nicknameBuilder_.getMessageOrBuilder();\n } else {\n return nickname_ == null ?\n com.google.protobuf.StringValue.getDefaultInstance() : nickname_;\n }\n }",
"public void setCurrentPlayer(String nick) {\n\n for (int i = 0; i < nicknames.size(); i++)\n if (nicknames.get(i).getText().equals(nick)) {\n nicknames.get(i).setForeground(new Color(199, 0, 0));\n nicknames.get(i).setFont(currentPlayerFont);\n }else{\n\n nicknames.get(i).setForeground(Color.BLACK);\n nicknames.get(i).setFont(notCurrentPlayerFont);\n }\n\n }",
"public String getNickname();",
"com.google.protobuf.ByteString\n getNickBytes();",
"com.google.protobuf.ByteString\n getNickBytes();",
"@Column(length = 100, nullable = false, unique = true)\n\tpublic String getNickName() {\n\t\treturn nickName;\n\t}",
"public String getUserNickname()\n {\n if (nickName == null)\n nickName =\n provider.getInfoRetreiver().getNickName(\n provider.getAccountID().getUserID());\n\n return nickName;\n }",
"public void setContactNick(String contactNick) {\n this.contactNick = contactNick;\n }",
"@Column(length = 50, nullable = false, unique = true)\n public String getNick() {\n return nick;\n }",
"com.google.protobuf.ByteString getNickname();",
"public void setNickels(int n)\n {\n\tthis.nickels = n;\n\tchangeChecker();\n }",
"public String getUserNick() {\r\n return userNick;\r\n }",
"public String getNickname() throws RemoteException{\n return this.nickname;\n }",
"@Override\n public void nickChanged(NickChangeEvent e) {\n synchronized (this.scheduledLogons) {\n AutoLogonRunnable alr = this.scheduledLogons.get(e.getOldUser().getNickName());\n \n if (alr != null) {\n alr.cancel();\n this.scheduledLogons.remove(e.getOldUser().getNickName());\n logger.debug(\"Auto logon for \" + e.getOldUser() + \" canceled\");\n }\n \n User u = this.userManager.getUser(e.getNewUser().getNickName());\n if (u != null && !this.userManager.isSignedOn(u)) {\n this.scheduleAutoLogon(e.getNewUser().getNickName());\n }\n }\n }",
"public void whoisRealname(String nick, String realname);",
"public java.lang.String getNickname() {\n return localNickname;\n }",
"public Builder setFromNick(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n fromNick_ = value;\n onChanged();\n return this;\n }",
"@java.lang.Override\n public com.google.protobuf.StringValueOrBuilder getNicknameOrBuilder() {\n return getNickname();\n }",
"public void onWho(String nick, String account) {\n users.put(nick, account);\n }",
"public String getFromNick() {\n Object ref = fromNick_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n fromNick_ = s;\n return s;\n }\n }",
"public String getNickname() {\r\n return insertMode ? \"\" : stringValue(CONTACTS_NICKNAME);\r\n }",
"public String getFromNick() {\n Object ref = fromNick_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n fromNick_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }",
"protected void changeSocketUsername(String oldUsername, String newUsername) {\n\t\tUserSocket us = this.getSocket(oldUsername);\n\t\tif (us != null) {\n\t\t\tus.username = newUsername;\n\t\t\tthis.mapSockets.remove(oldUsername);\n\t\t\tthis.mapSockets.put(newUsername,us);\n\t\t}\n\t}",
"public void sendAlreadyChatting(String nickTo){\r\n\t\tString message=\"303&\"+nickTo;\r\n\t\tsendDatagramPacket(message);\r\n\t}",
"public String getNickname() throws RemoteException {\n \n\treturn this.nickname;\n\t\t\t }",
"public abstract void grantMembership(String nickname);",
"@ApiModelProperty(value = \"昵称\")\n\tpublic String getNickname() {\n\t\treturn nickname;\n\t}",
"public com.google.protobuf.ByteString\n getFromNickBytes() {\n Object ref = fromNick_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n fromNick_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public void askInfoOnPlayer(int n, String nickname) throws IOException, InterruptedException{}"
]
| [
"0.7535434",
"0.7316038",
"0.7298696",
"0.7244827",
"0.7244827",
"0.71853495",
"0.7150383",
"0.7063479",
"0.7063479",
"0.7063479",
"0.7063479",
"0.7063479",
"0.7055271",
"0.7032646",
"0.69496006",
"0.69449955",
"0.69449955",
"0.69449955",
"0.69449955",
"0.69449955",
"0.68625575",
"0.67888075",
"0.67152643",
"0.6698287",
"0.6654949",
"0.6633906",
"0.6593853",
"0.65244997",
"0.64800084",
"0.64789855",
"0.64546657",
"0.6454057",
"0.6451378",
"0.6446108",
"0.6437838",
"0.64306873",
"0.64306873",
"0.64241767",
"0.64241767",
"0.64241767",
"0.64241767",
"0.64241767",
"0.64241767",
"0.64241767",
"0.64241767",
"0.64241767",
"0.64241767",
"0.64125663",
"0.64125663",
"0.64125663",
"0.64125663",
"0.64125663",
"0.64125663",
"0.6355148",
"0.6315088",
"0.6314654",
"0.6292035",
"0.6270426",
"0.6270426",
"0.61967367",
"0.61960495",
"0.61822015",
"0.6181712",
"0.61498195",
"0.6141754",
"0.6117497",
"0.6117497",
"0.6101864",
"0.6074784",
"0.60357964",
"0.60250145",
"0.5914627",
"0.59054303",
"0.58907026",
"0.58845335",
"0.58845335",
"0.58622015",
"0.5855975",
"0.58495957",
"0.58371913",
"0.581426",
"0.579539",
"0.57907003",
"0.57632655",
"0.5758951",
"0.5756072",
"0.57263625",
"0.56828564",
"0.5672835",
"0.56387204",
"0.56050116",
"0.5592847",
"0.55834514",
"0.55792314",
"0.5573658",
"0.55619645",
"0.555592",
"0.555253",
"0.5545508",
"0.5538369"
]
| 0.8243592 | 0 |
Execute a protocolspecific function. | public void processProtocolFunction(Sink sink, ArgumentList arguments,
FactContext context); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract void doCommand(String command);",
"protected abstract DispatchOutcome dispatchCommand(CommandEnvelope cmd);",
"public final void execute(Protocol protocol ) throws CommandExecuteException {\n\t\tthis.execute(protocol, DEFAULT_COMMAND_TIMEOUT );\n\t}",
"abstract public void execute(FunctionContext context) throws Exception;",
"public abstract Object executeGeneric(VirtualFrame frame);",
"public abstract int execute();",
"public abstract void execute();",
"public abstract void execute();",
"public abstract void execute();",
"public abstract void call();",
"void execute(Handler handler, Callback callback);",
"public void doCall(){\n CalculatorPayload operation = newContent();\n\n ((PBFTClient)getProtocol()).syncCall(operation);\n }",
"abstract void exec();",
"public static void invoke(String function, Object... args) {\n ClientInvocation invocation = new ClientInvocation((String) null, function, args);\n WebSocketHandler.send(invocation);\n }",
"public final void beginExecute(Protocol protocol) {\n\t\tbeginExecute( protocol, protocol.getDefaultResultHandler() );\n\t}",
"public Object invoke(ByteQue fun, Class<?> retType) throws IOException, UnsupportedOperationException {\n socket.getOutputStream().write(new SendData(fun).toArray());\n RecvBuf recv = new RecvBuf();\n byte[] buf = new byte[1024];\n while (true) {\n if (recv.size() != null && recv.size() == recv.len()) {\n break;\n }\n int read = socket.getInputStream().read(buf);\n if (read > 0) {\n recv.append(buf, read);\n } else {\n close();\n throw new UnsupportedOperationException(\"remote connection has been disconnected\");\n }\n }\n ByteQue ret = recv.byteQue();\n String msg = (String) ret.pop(String.class);\n if (msg != null) {\n throw new UnsupportedOperationException(msg);\n }\n if (retType != null && retType != Void.TYPE) {\n return ret.pop(retType);\n }\n return null;\n }",
"public abstract int evalFunction(Player nodePlayer);",
"abstract /*package*/ Object executeRVMFunction(Function func, IValue[] posArgs, Map<String,IValue> kwArgs);",
"IfaceSpecial getCallSpecial(IfaceProgramPoint pt,IfaceMethod fm);",
"public interface iCommand {\n void execute(String peerId, JSONObject payload) throws JSONException;\n}",
"public interface RequestExecute {\n\n public String execute(Object... args) throws Exception;\n\n}",
"public abstract void operation();",
"public interface Callable {\n void call(String name, String telNumber);\n}",
"public interface Protocol {\n\n void startup();\n}",
"@Override\n public BaseResponse callFunction(EdmFunctionImport funcDesc, Map<String, OFunctionParameter> params, QueryInfo queryInfo) {\n _log.error(\"callFunction(\" + funcDesc + \", \" + params + \", \" + queryInfo);\n Map.Entry<EdmFunctionImport,ServiceOperationHandler> descriptor = _functionDescriptors.get(funcDesc.getName());\n if (descriptor != null) {\n return descriptor.getValue().execute(funcDesc, params, queryInfo);\n }\n return super.callFunction(funcDesc, params, queryInfo);\n }",
"public void dispatchProtocolI(DSMPBaseProto proto, \n DSMPBaseHandler handlerIn, \n boolean doDispatch) \n throws InvalidProtocolException {\n \n int meetingid, participantid, inviteid, loginid;\n String name;\n \n byte opcode = proto.getOpcode();\n byte flags = proto.getFlags();\n byte handle = proto.getHandle();\n proto.resetCursor();\n \n DSMPHandler handler = (DSMPHandler)handlerIn;\n \n if (printdebug && dodebug && redispatch) {\n try {\n if (pdbg == null) {\n pdbg = (DSMPDispatchBase)DSMPSTDispatchBase.class.newInstance();\n }\n pdbg.setRedispatch(false);\n pdbg.setDebug(true);\n ((DSMPSTDispatchBase)pdbg).setToneItDown(toneitdown);\n \n pdbg.dispatchProtocolI(proto, null, true);\n proto.resetCursor();\n } catch(Throwable tttt) {\n System.out.println(\"Error dispatching DebugProtocol =>\");\n tttt.printStackTrace(System.out);\n }\n proto.resetCursor();\n }\n \n if (DSMPGenerator.isReply(opcode)) {\n boolean success = (flags & (byte)0x01) != 0;\n if (!success) {\n short errorcode = proto.getShort();\n String errorString = proto.getString8();\n \n proto.verifyCursorDone();\n if (doDispatch) {\n switch(opcode) {\n case DSMPGenerator.OP_LOGIN_REPLY:\n fireLoginReplyError(handler, flags, handle,\n errorcode, errorString);\n break;\n case DSMPGenerator.OP_LOGOUT_REPLY:\n fireLogoutReplyError(handler, flags, handle,\n errorcode, errorString);\n break;\n case DSMPGenerator.OP_STARTMEETING_REPLY:\n fireStartMeetingReplyError(handler, flags, handle,\n errorcode, \n errorString);\n break;\n case DSMPGenerator.OP_LEAVEMEETING_REPLY:\n fireLeaveMeetingReplyError(handler, flags, handle,\n errorcode, \n errorString);\n break;\n case DSMPGenerator.OP_ENDMEETING_REPLY:\n fireEndMeetingReplyError(handler, flags, handle,\n errorcode, \n errorString);\n break;\n case DSMPGenerator.OP_CREATEINVITATION_REPLY:\n fireCreateInvitationReplyError(handler, flags, handle,\n errorcode, \n errorString);\n break;\n case DSMPGenerator.OP_JOINMEETING_REPLY:\n fireJoinMeetingReplyError(handler, flags, handle,\n errorcode, \n errorString);\n break;\n case DSMPGenerator.OP_DROPINVITEE_REPLY:\n fireDropInviteeReplyError(handler, flags, handle,\n errorcode, \n errorString);\n break;\n case DSMPGenerator.OP_IMAGERESIZE_REPLY:\n fireImageResizeReplyError(handler, flags, handle,\n errorcode, \n errorString);\n break;\n case DSMPGenerator.OP_CHATMESSAGE_REPLY:\n fireChatMessageReplyError(handler, flags, handle,\n errorcode, \n errorString);\n break;\n case DSMPGenerator.OP_MODIFYCONTROL_REPLY:\n fireModifyControlReplyError(handler, flags, handle,\n errorcode, \n errorString);\n break;\n case DSMPGenerator.OP_GETALLMEETINGS_REPLY:\n fireGetAllMeetingsReplyError(handler, flags, handle,\n errorcode, \n errorString);\n break;\n case DSMPGenerator.OP_TRANSFERMODERATOR_REPLY:\n fireTransferModeratorReplyError(handler, flags, handle,\n errorcode, \n errorString);\n break;\n case DSMPGenerator.OP_ASSIGNOWNERSHIP_REPLY:\n fireAssignOwnershipReplyError(handler, flags, handle,\n errorcode, \n errorString);\n break;\n case DSMPGenerator.OP_STARTSHARE_REPLY:\n fireStartShareReplyError(handler, flags, handle,\n errorcode, \n errorString);\n break;\n case DSMPGenerator.OP_STOPSHARE_REPLY:\n fireStopShareReplyError(handler, flags, handle,\n errorcode, \n errorString);\n break;\n \n case DSMPGenerator.OP_CREATE_GROUP_REPLY: {\n fireCreateGroupReplyError(handler, flags, \n handle, errorcode, \n errorString);\n break;\n }\n case DSMPGenerator.OP_DELETE_GROUP_REPLY: {\n fireDeleteGroupReplyError(handler, flags, \n handle, errorcode, \n errorString);\n break;\n }\n case DSMPGenerator.OP_MODIFY_GROUP_ACL_REPLY: {\n fireModifyGroupAclReplyError(handler, flags, \n handle, errorcode, \n errorString);\n break;\n }\n case DSMPGenerator.OP_MODIFY_GROUP_ATTRIBUTES_REPLY: {\n fireModifyGroupAttributeReplyError(handler, flags, \n handle, errorcode, \n errorString);\n break;\n }\n case DSMPGenerator.OP_QUERY_GROUPS_REPLY: {\n fireQueryGroupsReplyError(handler, flags, \n handle, errorcode, \n errorString);\n break;\n }\n case DSMPGenerator.OP_PLACECALL_REPLY: {\n firePlaceCallReplyError(handler, flags, \n handle, errorcode, \n errorString);\n break;\n }\n case DSMPGenerator.OP_ACCEPTCALL_REPLY: {\n fireAcceptCallReplyError(handler, flags, \n handle, errorcode, \n errorString);\n break;\n }\n case DSMPGenerator.OP_QUERY_MEETING_OPTIONS_REPLY: {\n fireQueryMeetingOptionsReplyError(handler, flags, \n handle, errorcode, \n errorString);\n \n break;\n }\n case DSMPGenerator.OP_SET_MEETING_OPTIONS_REPLY: {\n fireSetMeetingOptionsReplyError(handler, flags, \n handle, errorcode, \n errorString);\n break;\n }\n case DSMPGenerator.OP_GET_MEETING_URL_REPLY: {\n fireGetMeetingURLReplyError(handler, flags, \n handle, errorcode, \n errorString);\n \n break;\n } \n }\n }\n } else {\n switch(opcode) {\n case DSMPGenerator.OP_LOGIN_REPLY: {\n Vector v = new Vector();\n loginid = proto.getInteger();\n String user = proto.getString16();\n String company = proto.getString16();\n int nump = proto.getInteger();\n for(int i=0; i < nump; i++) {\n v.addElement(proto.getString16());\n }\n proto.verifyCursorDone();\n if (doDispatch) {\n fireLoginReply(handler, flags, handle,\n loginid, user, company, v);\n }\n break;\n }\n case DSMPGenerator.OP_LOGOUT_REPLY:\n proto.verifyCursorDone();\n if (doDispatch) {\n fireLogoutReply(handler, flags, handle);\n }\n break;\n case DSMPGenerator.OP_STARTMEETING_REPLY:\n meetingid = proto.getInteger();\n participantid = proto.getInteger();\n proto.verifyCursorDone();\n if (doDispatch) {\n fireStartMeetingReply(handler, flags, handle,\n meetingid,\n participantid);\n }\n break;\n case DSMPGenerator.OP_LEAVEMEETING_REPLY:\n proto.verifyCursorDone();\n if (doDispatch) {\n fireLeaveMeetingReply(handler, flags, handle);\n }\n break;\n case DSMPGenerator.OP_ENDMEETING_REPLY:\n proto.verifyCursorDone();\n if (doDispatch) {\n fireEndMeetingReply(handler, flags, handle);\n }\n break;\n case DSMPGenerator.OP_CREATEINVITATION_REPLY:\n inviteid = proto.getInteger();\n proto.verifyCursorDone();\n if (doDispatch) {\n fireCreateInvitationReply(handler, flags, handle,\n inviteid);\n }\n break;\n case DSMPGenerator.OP_JOINMEETING_REPLY:\n meetingid = proto.getInteger();\n participantid = proto.getInteger();\n proto.verifyCursorDone();\n if (doDispatch) {\n fireJoinMeetingReply(handler, flags, handle,\n meetingid,\n participantid);\n }\n break;\n case DSMPGenerator.OP_DROPINVITEE_REPLY:\n proto.verifyCursorDone();\n if (doDispatch) {\n fireDropInviteeReply(handler, flags, handle);\n }\n break;\n case DSMPGenerator.OP_IMAGERESIZE_REPLY:\n proto.verifyCursorDone();\n if (doDispatch) {\n fireImageResizeReply(handler, flags, handle);\n }\n break;\n case DSMPGenerator.OP_CHATMESSAGE_REPLY:\n proto.verifyCursorDone();\n if (doDispatch) {\n fireChatMessageReply(handler, flags, handle);\n }\n break;\n case DSMPGenerator.OP_MODIFYCONTROL_REPLY:\n proto.verifyCursorDone();\n if (doDispatch) {\n fireModifyControlReply(handler, flags, handle);\n }\n break;\n case DSMPGenerator.OP_GETALLMEETINGS_REPLY: {\n int numm = proto.getUnsignedShort();\n Vector v = new Vector(); \n for(int i=0; i < numm; i++) {\n inviteid = proto.getInteger();\n loginid = proto.getInteger();\n byte inviteType = proto.getByte();\n meetingid = proto.getInteger();\n String title = proto.getString8(); \n String owner = proto.getString8(); \n String classification = proto.getString8(); \n v.addElement(new DSMPMeeting(inviteid, \n loginid,\n inviteType,\n meetingid, \n title,\n owner,\n classification));\n }\n \n proto.verifyCursorDone();\n if (doDispatch) {\n fireGetAllMeetingsReply(handler, flags, handle, v);\n }\n break;\n }\n \n case DSMPGenerator.OP_TRANSFERMODERATOR_REPLY:\n proto.verifyCursorDone();\n if (doDispatch) {\n fireTransferModeratorReply(handler, flags, handle);\n }\n break;\n case DSMPGenerator.OP_ASSIGNOWNERSHIP_REPLY:\n proto.verifyCursorDone();\n if (doDispatch) {\n fireAssignOwnershipReply(handler, flags, handle);\n }\n break;\n case DSMPGenerator.OP_STARTSHARE_REPLY:\n proto.verifyCursorDone();\n if (doDispatch) {\n fireStartShareReply(handler, flags, handle);\n }\n break;\n case DSMPGenerator.OP_STOPSHARE_REPLY:\n proto.verifyCursorDone();\n if (doDispatch) {\n fireStopShareReply(handler, flags, handle);\n }\n break;\n case DSMPGenerator.OP_CREATE_GROUP_REPLY: {\n proto.verifyCursorDone();\n if (doDispatch) {\n fireCreateGroupReply(handler, flags, handle);\n }\n break;\n }\n case DSMPGenerator.OP_DELETE_GROUP_REPLY: {\n proto.verifyCursorDone();\n if (doDispatch) {\n fireDeleteGroupReply(handler, flags, handle);\n }\n break;\n }\n case DSMPGenerator.OP_MODIFY_GROUP_ACL_REPLY: {\n proto.verifyCursorDone();\n if (doDispatch) {\n fireModifyGroupAclReply(handler, flags, handle);\n }\n break;\n }\n case DSMPGenerator.OP_MODIFY_GROUP_ATTRIBUTES_REPLY: {\n proto.verifyCursorDone();\n if (doDispatch) {\n fireModifyGroupAttributeReply(handler, flags, handle);\n }\n break;\n }\n case DSMPGenerator.OP_QUERY_GROUPS_REPLY: {\n int numgrps = proto.get3ByteInteger();\n Vector vec = new Vector();\n while(numgrps-- > 0) {\n GroupInfo gi = new GroupInfo();\n gi.setGroupName(proto.getString16());\n gi.setGroupOwner(proto.getString16());\n gi.setGroupCompany(proto.getString16());\n gi.setGroupCreated(proto.getLong());\n gi.setGroupVisibility(proto.getByte());\n gi.setGroupListability(proto.getByte());\n byte lflags = proto.getByte();\n \n int nummem = proto.get3ByteInteger();\n Vector members = gi.getGroupMembers();\n while(nummem-- > 0) {\n members.addElement(proto.getString16());\n }\n gi.setGroupMembers(members);\n gi.setGroupMembersValid((lflags & (byte)1) != (byte)0);\n \n int numacc = proto.get3ByteInteger();\n Vector access = gi.getGroupAccess();\n while(numacc-- > 0) {\n access.addElement(proto.getString16());\n }\n gi.setGroupAccess(access);\n gi.setGroupAccessValid((lflags & (byte)2) != (byte)0);\n \n vec.addElement(gi);\n }\n proto.verifyCursorDone();\n if (doDispatch) {\n boolean memberIncluded = (flags & (byte)1) != (byte)0;\n boolean accessIncluded = (flags & (byte)2) != (byte)0;\n fireQueryGroupsReply(handler, flags, handle, \n memberIncluded, accessIncluded,\n vec);\n }\n break;\n \n }\n \n case DSMPGenerator.OP_PLACECALL_REPLY: {\n proto.verifyCursorDone();\n if (doDispatch) {\n firePlaceCallReply(handler, flags, handle);\n }\n break;\n }\n case DSMPGenerator.OP_ACCEPTCALL_REPLY: {\n proto.verifyCursorDone();\n if (doDispatch) {\n fireAcceptCallReply(handler, flags, handle);\n }\n break;\n }\n case DSMPGenerator.OP_QUERY_MEETING_OPTIONS_REPLY: {\n meetingid = proto.getInteger();\n short numopts = proto.getShort();\n Hashtable options = new Hashtable();\n \n for(int i=0; i < numopts; i++) {\n String key = proto.getString8();\n String val = proto.getString16();\n options.put(key, val);\n }\n \n proto.verifyCursorDone();\n if (doDispatch) {\n fireQueryMeetingOptionsReply(handler, flags, handle,\n meetingid, options);\n }\n break;\n }\n case DSMPGenerator.OP_SET_MEETING_OPTIONS_REPLY: {\n proto.verifyCursorDone();\n if (doDispatch) {\n fireSetMeetingOptionsReply(handler, flags, handle);\n }\n break;\n }\n case DSMPGenerator.OP_GET_MEETING_URL_REPLY: {\n meetingid = proto.getInteger();\n String url = proto.getString16();\n proto.verifyCursorDone();\n if (doDispatch) {\n fireGetMeetingURLReply(handler, flags, handle, \n meetingid, url);\n }\n break;\n } \n }\n }\n } else if (DSMPGenerator.isError(opcode)) {\n meetingid = proto.getInteger();\n short errorcode = proto.getShort();\n String errorString = proto.getString8();\n proto.verifyCursorDone();\n if (doDispatch) {\n switch(opcode) {\n case DSMPGenerator.OP_FRAMEUPDATE_ERROR:\n fireFrameUpdateError(handler, flags, handle, meetingid,\n errorcode, errorString);\n break;\n case DSMPGenerator.OP_KEYUPDATE_ERROR:\n fireKeyUpdateError(handler, flags, handle, meetingid,\n errorcode, errorString);\n break;\n case DSMPGenerator.OP_MOUSEUPDATE_ERROR:\n fireMouseUpdateError(handler, flags, handle, meetingid,\n errorcode, errorString);\n break;\n case DSMPGenerator.OP_FRAMEEND_ERROR:\n fireFrameEndError(handler, flags, handle, meetingid,\n errorcode, errorString);\n break;\n case DSMPGenerator.OP_FROZENMODE_ERROR:\n fireFrozenModeError(handler, flags, handle, meetingid,\n errorcode, errorString);\n break;\n }\n }\n } else if (DSMPGenerator.isEvent(opcode)) {\n byte inviteType;\n switch(opcode) {\n case DSMPGenerator.OP_ENDMEETING_EVENT:\n meetingid = proto.getInteger();\n proto.verifyCursorDone();\n if (doDispatch) {\n fireEndMeetingEvent(handler, flags, handle, meetingid);\n }\n break;\n case DSMPGenerator.OP_NEWINVITATION_EVENT:\n meetingid = proto.getInteger();\n inviteid = proto.getInteger();\n inviteType = proto.getByte();\n name = proto.getString8();\n proto.verifyCursorDone();\n if (doDispatch) {\n fireNewInvitationEvent(handler, flags, handle, meetingid,\n inviteid, inviteType, name);\n }\n break;\n case DSMPGenerator.OP_JOINEDMEETING_EVENT:\n meetingid = proto.getInteger();\n inviteid = proto.getInteger();\n participantid = proto.getInteger();\n loginid = proto.getInteger();\n inviteType = proto.getByte();\n name = proto.getString8();\n proto.verifyCursorDone();\n if (doDispatch) {\n fireJoinedMeetingEvent(handler, flags, handle, meetingid,\n inviteid, participantid, loginid, \n inviteType, name);\n }\n break;\n case DSMPGenerator.OP_DROPPED_EVENT:\n meetingid = proto.getInteger();\n inviteid = proto.getInteger();\n participantid = proto.getInteger();\n proto.verifyCursorDone();\n if (doDispatch) {\n fireDroppedEvent(handler, flags, handle, meetingid,\n inviteid, participantid, \n (flags & (byte)0x01) != 0,\n (flags & (byte)0x02) != 0);\n }\n break;\n case DSMPGenerator.OP_IMAGERESIZE_EVENT: {\n short x, y, w, h;\n meetingid = proto.getInteger();\n x = proto.getShort();\n y = proto.getShort();\n w = proto.getShort();\n h = proto.getShort();\n proto.verifyCursorDone();\n if (doDispatch) {\n fireImageResizeEvent(handler, flags, handle, meetingid, \n x, y, w, h);\n }\n break;\n }\n case DSMPGenerator.OP_FRAMEUPDATE_EVENT: {\n short x, y, w, h;\n meetingid = proto.getExtraInt();\n x = proto.getShort();\n y = proto.getShort();\n w = proto.getShort();\n h = proto.getShort();\n CompressInfo ci = proto.getDataAtCursor();\n proto.verifyCursorDone();\n if (doDispatch) {\n boolean compressed = (flags & (byte)0x01) != 0;\n if (compressed) {\n try {\n cpress.setStartDeCompressionSize(20000);\n ci = cpress.decompress(ci.buf, ci.ofs, ci.len);\n compressed = false;\n } catch(DataFormatException de) {\n System.out.println(\"Error decompressing!!\");\n }\n }\n \n// System.out.println(\"VQ = \" + proto.getVirtualQuadrant());\n \n fireFrameUpdateEvent(handler, flags, handle, meetingid, \n x, y, w, h, compressed, \n ci.buf, ci.ofs, ci.len);\n }\n break;\n }\n case DSMPGenerator.OP_MULTIFRAMEUPDATE_EVENT: {\n short x, y, w, h;\n meetingid = proto.getExtraInt();\n CompressInfo ci = proto.getDataAtCursor();\n proto.verifyCursorDone();\n if (doDispatch) {\n \n boolean compressed = (flags & (byte)0x01) != 0;\n \n if (compressed) {\n try {\n cpress.setStartDeCompressionSize(164000);\n ci = cpress.decompress(ci.buf, ci.ofs, ci.len);\n \n compressed = false;\n } catch(DataFormatException de) {\n System.out.println(\"Error decompressing!!\");\n throw new InvalidProtocolException(\"Decompress error\");\n }\n }\n \n // 1. Verify that each item IS an OP_FRAME_UPDATE\n // 2. Convert the COMMAND to EVENT (opcode change)\n // 3. verify that the meetingid's match\n // 4. dispatch the event\n try {\n int ofs = ci.ofs + 4; // Skip that useless numFrames\n int endofs = ci.ofs + ci.len;\n while(ofs < endofs) {\n DSMPProto nproto = new DSMPProto();\n ofs = nproto.readAll(ci.buf, ofs, 9999999);\n if (nproto.getOpcode() != \n DSMPGenerator.OP_FRAMEUPDATE) {\n throw \n new InvalidProtocolException(\"MFUE != opcode\");\n }\n \n if (nproto.getInteger() != meetingid) {\n throw \n new InvalidProtocolException(\"MFUE != meetid\");\n }\n \n nproto.addMaskToFlags(DSMPGenerator.FLAGS_BIT1);\n nproto.setOpcode(DSMPGenerator.OP_FRAMEUPDATE_EVENT);\n nproto.resetCursor();\n dispatchProtocol(nproto, handler);\n }\n } catch(ArrayIndexOutOfBoundsException abe) {\n throw new InvalidProtocolException(\"Bad MFE\");\n }\n }\n break;\n }\n case DSMPGenerator.OP_CHATMESSAGE_EVENT: {\n meetingid = proto.getInteger();\n participantid = proto.getInteger();\n int toid = proto.getInteger();\n String str = proto.getString16();\n proto.verifyCursorDone();\n if (doDispatch) {\n fireChatMessageEvent(handler, flags, handle, meetingid,\n participantid, toid, str,\n (flags & (byte)0x01) != 0);\n }\n break;\n }\n case DSMPGenerator.OP_CONTROL_EVENT:\n meetingid = proto.getInteger();\n participantid = proto.getInteger();\n proto.verifyCursorDone();\n if (doDispatch) {\n fireControlEvent(handler, flags, handle, meetingid, \n participantid);\n }\n break;\n case DSMPGenerator.OP_MOUSEUPDATE_EVENT: {\n short x, y;\n byte button;\n meetingid = proto.getInteger();\n button = proto.getByte();\n x = proto.getShort();\n y = proto.getShort();\n participantid = proto.getInteger();\n boolean buttonEv = (flags & (byte)0x01) != 0;\n boolean pressRelease = (flags & (byte)0x02) != 0;\n boolean realMotion = (flags & (byte)0x04) != 0;\n proto.verifyCursorDone();\n if (doDispatch) {\n fireMouseUpdateEvent(handler, flags, handle, meetingid, \n buttonEv, pressRelease, realMotion,\n button, x, y, participantid);\n }\n break;\n }\n case DSMPGenerator.OP_KEYUPDATE_EVENT: {\n short x, y;\n int javakeysym;\n meetingid = proto.getInteger();\n x = proto.getShort();\n y = proto.getShort();\n javakeysym = proto.getInteger();\n participantid = proto.getInteger();\n boolean pressRelease = (flags & (byte)0x01) != 0;\n boolean keyCodeOrChar = (flags & (byte)0x02) != 0;\n proto.verifyCursorDone();\n if (doDispatch) {\n fireKeyUpdateEvent(handler, flags, handle, meetingid, \n pressRelease, keyCodeOrChar, \n x, y, javakeysym, participantid);\n }\n break;\n }\n case DSMPGenerator.OP_FRAMEEND_EVENT:\n meetingid = proto.getInteger();\n proto.verifyCursorDone();\n if (doDispatch) {\n fireFrameEndEvent(handler, flags, handle, meetingid);\n }\n break;\n case DSMPGenerator.OP_FROZENMODE_EVENT:\n meetingid = proto.getInteger();\n proto.verifyCursorDone();\n if (doDispatch) {\n boolean v = (flags & (byte)0x01) != 0; // frozen or not\n fireFrozenModeEvent(handler, flags, handle, meetingid, v);\n }\n break;\n \n case DSMPGenerator.OP_MODERATORCHANGE_EVENT: {\n meetingid = proto.getInteger();\n int fromid = proto.getInteger();\n int toid = proto.getInteger();\n proto.verifyCursorDone();\n if (doDispatch) {\n fireModeratorChangeEvent(handler, flags, handle, \n meetingid, fromid, toid);\n }\n break;\n }\n case DSMPGenerator.OP_OWNERCHANGE_EVENT: {\n meetingid = proto.getInteger();\n participantid = proto.getInteger();\n proto.verifyCursorDone();\n if (doDispatch) {\n fireOwnershipChangeEvent(handler, flags, handle,\n meetingid, participantid, \n (((int)flags) & 1) != 0);\n }\n break;\n }\n case DSMPGenerator.OP_STARTSHARE_EVENT: {\n meetingid = proto.getInteger();\n proto.verifyCursorDone();\n if (doDispatch) {\n fireStartShareEvent(handler, flags, handle, meetingid);\n }\n break;\n }\n case DSMPGenerator.OP_STOPSHARE_EVENT: {\n meetingid = proto.getInteger();\n proto.verifyCursorDone();\n if (doDispatch) {\n fireStopShareEvent(handler, flags, handle, meetingid);\n }\n break;\n }\n \n case DSMPGenerator.OP_PLACECALL_EVENT: {\n meetingid = proto.getInteger();\n int partid = proto.getInteger();\n String userid = proto.getString8();\n String company = proto.getString8();\n String salt = proto.getString8();\n proto.verifyCursorDone();\n if (doDispatch) {\n firePlaceCallEvent(handler, flags, handle, \n meetingid, partid, userid, \n company, salt);\n }\n break;\n }\n case DSMPGenerator.OP_ACCEPTCALL_EVENT: {\n meetingid = proto.getInteger();\n int partid = proto.getInteger();\n String userid = proto.getString8();\n String company = proto.getString8();\n proto.verifyCursorDone();\n if (doDispatch) {\n fireAcceptCallEvent(handler, flags, handle, \n meetingid, partid, userid, \n company);\n }\n break;\n }\n case DSMPGenerator.OP_MEETING_OPTION_EVENT: {\n meetingid = proto.getInteger();\n String key = proto.getString8();\n String val = proto.getString16();\n \n proto.verifyCursorDone();\n if (doDispatch) {\n fireMeetingOptionEvent(handler, flags, handle,\n meetingid, key, val);\n }\n break;\n }\n \n } \n } else if (DSMPGenerator.isCommand(opcode)) {\n \n switch(opcode) {\n case DSMPGenerator.OP_LOGIN: {\n String tokenUser = proto.getString16();\n String pw = proto.getString8();\n proto.verifyCursorDone();\n if (doDispatch) {\n if ((flags & (byte)0x01) != 0) {\n fireLoginCommandToken(handler, flags, handle, tokenUser);\n } else {\n fireLoginCommandUserPW(handler, flags, handle, \n tokenUser, pw);\n }\n }\n break;\n }\n case DSMPGenerator.OP_LOGOUT: {\n proto.verifyCursorDone();\n if (doDispatch) {\n fireLogoutCommand(handler, flags, handle);\n }\n break;\n }\n case DSMPGenerator.OP_STARTMEETING: {\n String title = proto.getString8();\n String pw = proto.getString8();\n String cls = proto.getString8();\n proto.verifyCursorDone();\n if (doDispatch) {\n fireStartMeetingCommand(handler, flags, handle, \n title, pw, cls);\n }\n break;\n }\n case DSMPGenerator.OP_LEAVEMEETING: {\n meetingid = proto.getInteger();\n proto.verifyCursorDone();\n if (doDispatch) {\n fireLeaveMeetingCommand(handler, flags, handle, meetingid);\n }\n break;\n }\n case DSMPGenerator.OP_ENDMEETING: {\n meetingid = proto.getInteger();\n proto.verifyCursorDone();\n if (doDispatch) {\n fireEndMeetingCommand(handler, flags, handle, meetingid);\n }\n break;\n }\n \n case DSMPGenerator.OP_CREATEINVITATION: {\n meetingid = proto.getInteger();\n byte inviteType = proto.getByte();\n name = proto.getString8();\n proto.verifyCursorDone();\n if (doDispatch) {\n fireCreateInvitationCommand(handler, flags, handle, \n meetingid, inviteType,\n name);\n }\n break;\n }\n case DSMPGenerator.OP_JOINMEETING: {\n meetingid = proto.getInteger();\n proto.verifyCursorDone();\n if (doDispatch) {\n fireJoinMeetingCommand(handler, flags, handle, meetingid);\n }\n break;\n }\n \n case DSMPGenerator.OP_DROPINVITEE: {\n meetingid = proto.getInteger();\n inviteid = proto.getInteger();\n participantid = proto.getInteger();\n boolean dropInvite = (flags & (byte)0x01) != 0;\n boolean dropParticipant = (flags & (byte)0x02) != 0;\n proto.verifyCursorDone();\n if (doDispatch) {\n fireDropInviteeCommand(handler, flags, handle, meetingid, \n dropInvite, inviteid,\n dropParticipant, participantid);\n }\n break;\n }\n \n case DSMPGenerator.OP_IMAGERESIZE: {\n short x, y, w, h;\n meetingid = proto.getInteger();\n x = proto.getShort();\n y = proto.getShort();\n w = proto.getShort();\n h = proto.getShort();\n proto.verifyCursorDone();\n if (doDispatch) {\n fireImageResizeCommand(handler, flags, handle, meetingid,\n x, y, w, h);\n }\n break;\n }\n case DSMPGenerator.OP_CHATMESSAGE: {\n meetingid = proto.getInteger();\n int toid = proto.getInteger();\n String msg = proto.getString16();\n boolean unicast = (flags & (byte)0x01) != 0;\n proto.verifyCursorDone();\n if (doDispatch) {\n fireChatMessageCommand(handler, flags, handle, meetingid, \n toid, msg, unicast);\n }\n break;\n }\n case DSMPGenerator.OP_MODIFYCONTROL: {\n meetingid = proto.getInteger();\n participantid = proto.getInteger();\n boolean addRemove = (flags & (byte)0x01) != 0;\n boolean forceAdd = (flags & (byte)0x02) != 0;\n proto.verifyCursorDone();\n if (doDispatch) {\n fireModifyControlCommand(handler, flags, handle, meetingid, \n participantid, addRemove, forceAdd);\n }\n break;\n }\n case DSMPGenerator.OP_GETALLMEETINGS: {\n proto.verifyCursorDone();\n if (doDispatch) {\n fireGetAllMeetingsCommand(handler, flags, handle);\n }\n break;\n }\n case DSMPGenerator.OP_MOUSEUPDATE: {\n short x, y;\n byte button;\n meetingid = proto.getInteger();\n button = proto.getByte();\n x = proto.getShort();\n y = proto.getShort();\n boolean buttonEv = (flags & (byte)0x01) != 0;\n boolean pressRelease = (flags & (byte)0x02) != 0;\n boolean realMotion = (flags & (byte)0x04) != 0;\n proto.verifyCursorDone();\n if (doDispatch) {\n fireMouseUpdateCommand(handler, flags, handle, meetingid, \n buttonEv, pressRelease, realMotion,\n button, x, y);\n }\n break;\n }\n case DSMPGenerator.OP_KEYUPDATE: {\n short x, y;\n int javakeysym;\n meetingid = proto.getInteger();\n x = proto.getShort();\n y = proto.getShort();\n javakeysym = proto.getInteger();\n boolean pressRelease = (flags & (byte)0x01) != 0;\n boolean keyCodeOrChar = (flags & (byte)0x02) != 0;\n proto.verifyCursorDone();\n if (doDispatch) {\n fireKeyUpdateCommand(handler, flags, handle, meetingid, \n pressRelease, keyCodeOrChar, x, y, \n javakeysym);\n }\n break;\n }\n \n case DSMPGenerator.OP_FRAMEUPDATE: {\n short x, y, w, h;\n meetingid = proto.getExtraInt();\n x = proto.getShort();\n y = proto.getShort();\n w = proto.getShort();\n h = proto.getShort();\n CompressInfo ci = proto.getDataAtCursor();\n proto.verifyCursorDone();\n if (doDispatch) {\n fireFrameUpdateCommand(handler, flags, handle, \n meetingid, x, y, w, h,\n (flags & (byte)0x01) != 0, ci.buf,\n ci.ofs, ci.len);\n }\n break;\n }\n case DSMPGenerator.OP_MULTIFRAMEUPDATE: {\n meetingid = proto.getExtraInt();\n int numframes = proto.getInteger();\n CompressInfo ci = proto.getDataAtCursor();\n proto.verifyCursorDone();\n if (doDispatch) {\n fireMultiFrameUpdateCommand(handler, flags, handle, \n (flags & (byte)0x01) != 0, \n meetingid, proto);\n }\n break;\n }\n case DSMPGenerator.OP_FRAMEEND:\n meetingid = proto.getInteger();\n proto.verifyCursorDone();\n if (doDispatch) {\n fireFrameEnd(handler, flags, handle, meetingid);\n }\n break;\n \n case DSMPGenerator.OP_FROZENMODE:\n meetingid = proto.getInteger();\n proto.verifyCursorDone();\n if (doDispatch) {\n boolean frozen = (flags & (byte)0x01) != 0;\n fireFrozenMode(handler, flags, handle, meetingid, frozen);\n }\n break;\n \n case DSMPGenerator.OP_PROTOCOLREST:\n proto.verifyCursorDone();\n if (doDispatch) {\n fireProtocolRest(handler, flags, handle);\n }\n break;\n \n case DSMPGenerator.OP_TRANSFERMODERATOR:\n meetingid = proto.getInteger();\n participantid = proto.getInteger();\n proto.verifyCursorDone();\n if (doDispatch) {\n fireTransferModeratorCommand(handler, flags, handle,\n meetingid, participantid);\n }\n break;\n case DSMPGenerator.OP_ASSIGNOWNERSHIP:\n meetingid = proto.getInteger();\n participantid = proto.getInteger();\n proto.verifyCursorDone();\n if (doDispatch) {\n boolean addOrRemove = (flags & (byte)0x01) != 0;\n fireAssignOwnershipCommand(handler, flags, handle,\n meetingid, participantid, \n addOrRemove);\n }\n break;\n case DSMPGenerator.OP_STARTSHARE:\n meetingid = proto.getInteger();\n proto.verifyCursorDone();\n if (doDispatch) {\n fireStartShareCommand(handler, flags, handle, meetingid);\n }\n break;\n case DSMPGenerator.OP_STOPSHARE:\n meetingid = proto.getInteger();\n proto.verifyCursorDone();\n if (doDispatch) {\n fireStopShareCommand(handler, flags, handle, meetingid);\n }\n break;\n \n case DSMPGenerator.OP_CREATE_GROUP: {\n String group = proto.getString16().toLowerCase();\n byte visibility = proto.getByte();\n byte listability = proto.getByte();\n proto.verifyCursorDone();\n if (doDispatch) {\n fireCreateGroupCommand(handler, flags, handle, \n group, visibility, listability);\n }\n break;\n }\n case DSMPGenerator.OP_DELETE_GROUP: {\n String group = proto.getString16().toLowerCase();\n proto.verifyCursorDone();\n if (doDispatch) {\n fireDeleteGroupCommand(handler, flags, handle, \n group);\n }\n break;\n }\n case DSMPGenerator.OP_MODIFY_GROUP_ACL: {\n String group = proto.getString16().toLowerCase();\n String usern = proto.getString16().toLowerCase();\n proto.verifyCursorDone();\n if (doDispatch) {\n fireModifyGroupAclCommand(handler, flags, handle, \n (flags & (byte)1) != (byte)0,\n (flags & (byte)2) != (byte)0,\n group, usern);\n }\n break;\n }\n case DSMPGenerator.OP_MODIFY_GROUP_ATTRIBUTES: {\n String group = proto.getString16().toLowerCase();\n byte visibility = proto.getByte();\n byte listability = proto.getByte();\n proto.verifyCursorDone();\n if (doDispatch) {\n fireModifyGroupAttributeCommand(handler, flags, handle, \n group, visibility,\n listability);\n }\n break;\n }\n case DSMPGenerator.OP_QUERY_GROUPS: {\n String group = proto.getString16().toLowerCase();\n proto.verifyCursorDone();\n if (doDispatch) {\n fireQueryGroupsCommand(handler, flags, handle, \n (flags & (byte)1) != (byte)0,\n (flags & (byte)2) != (byte)0,\n (flags & (byte)4) != (byte)0,\n group);\n }\n break;\n }\n \n case DSMPGenerator.OP_PLACECALL: {\n meetingid = proto.getInteger();\n String userid = proto.getString8();\n String password = proto.getString8();\n proto.verifyCursorDone();\n if (doDispatch) {\n firePlaceCallCommand(handler, flags, handle, \n (flags & (byte)1) != 0,\n meetingid, userid, password);\n }\n break;\n }\n case DSMPGenerator.OP_ACCEPTCALL: {\n meetingid = proto.getInteger();\n int callerid = proto.getInteger();\n String salt = proto.getString8();\n proto.verifyCursorDone();\n if (doDispatch) {\n fireAcceptCallCommand(handler, flags, handle,\n meetingid, callerid, salt);\n }\n break;\n }\n case DSMPGenerator.OP_QUERY_MEETING_OPTIONS: {\n meetingid = proto.getInteger();\n String specificOpt = proto.getString8();\n \n proto.verifyCursorDone();\n if (doDispatch) {\n fireQueryMeetingOptionsCommand(handler, flags, handle,\n flags != 0, \n meetingid, specificOpt);\n }\n break;\n }\n case DSMPGenerator.OP_SET_MEETING_OPTIONS: {\n meetingid = proto.getInteger();\n short numOpts = proto.getShort();\n \n Hashtable options = new Hashtable();\n for(int i=0; i < numOpts; i++) {\n String key = proto.getString8();\n String val = proto.getString16();\n options.put(key, val);\n }\n proto.verifyCursorDone();\n if (doDispatch) {\n fireSetMeetingOptionsCommand(handler, flags, handle,\n meetingid, options);\n }\n break;\n }\n case DSMPGenerator.OP_GET_MEETING_URL: {\n meetingid = proto.getInteger();\n proto.verifyCursorDone();\n if (doDispatch) {\n fireGetMeetingURLCommand(handler, flags, handle, \n (flags & (byte)1) != 0,\n (flags & (byte)2) != 0,\n (flags & (byte)4) != 0,\n meetingid);\n }\n break;\n }\n \n \n }\n \n } else {\n throw new InvalidProtocolException(opcode + \": Bad Opcode\");\n }\n }",
"private Response execute_work(Request request){\n if (request.getFname().equals(\"tellmenow\")){\n int returnValue = tellMeNow();\n }\n else if(request.getFname().equals(\"countPrimes\")){\n int returnValue = countPrimes(request.getArgs()[0]);\n }\n else if(request.getFname().equals(\"418Oracle\")){\n int returnValue = oracle418();\n }\n else{\n System.out.println(\"[Worker\"+String.valueOf(this.id)+\"] WARNING function name not recognized, dropping request\");\n }\n\n return new Response(id,request.getId(),request.getFname(),0);//0 meaning ok!\n }",
"org.omg.CORBA.portable.OutputStream try_invoke(java.lang.String method, org.omg.CORBA.portable.InputStream input,\r\n org.omg.CORBA.portable.ResponseHandler handler) throws X;",
"void execute(VirtualFrame frame);",
"public abstract void executeVoid(VirtualFrame frame);",
"void execute();",
"void execute();",
"void execute();",
"void execute();",
"void execute();",
"void execute();",
"void execute();",
"void call();",
"public void execute();",
"public void execute();",
"public void execute();",
"public void execute();",
"protected abstract void execute();",
"public interface ProxyInterface {\n public String execute();\n\n public String execute0();\n}",
"static public interface FunctionHandler\r\n {\r\n public double evaluateFunction(String nam, ArgParser args) throws ArithmeticException;\r\n }",
"public void handleCommand(String command);",
"@Override\n public void process(Serializable msg) {\n ((Command) msg).execute(arg);\n }",
"private LoanProtocol processProtocol(LoanProtocol protocol)\n\t{\n\t\tswitch (protocol.getType())\n\t\t{\n\t\t// if it's a requesting protocol, then generate answer for it\n\t\tcase RequestLoan:\n\t\t\treturn generateAnswer(protocol);\n\t\t\t// if it's an answer from another server, then calculate\n\t\t\t// how many loan the user has on the other server\n\t\tcase LoanAnswer:\n\t\t\tif (protocol.getUser() != null)\n\t\t\t{\n\t\t\t\tm_usedAmount += protocol.getUser().getLoanAmount();\n\t\t\t}\n\t\t\tm_lock.countDown();\n\t\t\treturn null;\n\t\tcase ValidateAdmin:\n\t\t\tboolean result = m_server.validateAdminUser(protocol.getUser().getUsr(), protocol\n\t\t\t\t\t.getUser().getPassword());\n\t\t\tLoanProtocol l = new LoanProtocol(\"\", protocol.getHost(), protocol.getPort(), null,\n\t\t\t\t\tnull);\n\t\t\tl.setResult(result);\n\t\t\treturn l;\n\t\tcase Transfer:\n\t\t\treturn ProcessTransferRequest(protocol);\n\n\t\tcase TransferAnswer:\n\t\t\treturn ProcessTransferAnswer(protocol);\n\t\tcase RollBack:\n\t\t\treturn processRollback(protocol);\n\t\t\t// commit that everything is ok, so now we can release the transfer\n\t\t\t// lock\n\t\tcase Commit:\n\t\t\ttransferLock.countDown();\n\t\t\tshouldRollback = false;\n\t\t\treturn null;\n\t\tdefault:\n\t\t\treturn null;\n\t\t}\n\t}",
"public interface PhoneFunctions\n{\n public String makePhoneCall();\n public String receiveCall();\n public String receiveText();\n public String sendText();\n\n\n}",
"protected abstract void executeHelper();",
"public interface HelloOperations \n{\n String echoString (String mesg);\n}",
"protected abstract void execute(INPUT input);",
"public int execute();",
"static void perform_call(String passed){\n\t\tint type = type_of_call(passed);\n\t\tswitch(type){\n\t\tcase 1:\n\t\t\tcall_without_condition(passed);\n\t\t\tbreak;\n\t\t}\n\t}",
"public void Execute() {\n\n }",
"void transmit(String protocol, String message);",
"public interface Operation {\n\tpublic Message doOperation(Message message);\n\n}",
"public GamePlay executeStrategy(String method_name, GamePlay game_play) {\n\t\tif (method_name.equalsIgnoreCase(\"REINFORCE\")) {\n\t\t\tthis.strategy.reinforce(game_play);\n\t\t} else if (method_name.equalsIgnoreCase(\"ATTACK\")) {\n\t\t\tthis.strategy.attack(game_play);\n\t\t} else if (method_name.equalsIgnoreCase(\"FORTIFY\")) {\n\t\t\tthis.strategy.fortify(game_play);\n\t\t}\n\n\t\treturn game_play;\n\t}",
"default void execOperation(UUID operationId,\n Map<String, String> properties,\n OperationFeedback feedback,\n ProtocolGateway protocolGateway) {\n this.execOperation(operationId, properties, feedback);\n }",
"public void simpleCommunication(String communication);",
"@Test\n public void testExecute() throws Exception {\n ((FakeTransportHandler) tlsContext.getTransportHandler())\n .setFetchableByte(new byte[] { 0x15, 0x03, 0x02, 0x01 });\n\n action.execute(state);\n assertTrue(action.isExecuted());\n }",
"void processCommand (String command, ZMsg msg);",
"@Override\n\tprotected void runProtocol() throws AtmException\n\t{\n\t\ttrace(\"runProtocol()\");\n\t\twhileConnected();\n\t}",
"public void dispatch();",
"public abstract void runOperation();",
"public void exec(PyObject code) {\n }",
"<C, R> void dispatch( CommandMessage<C> command, CommandCallback<? super C, ? super R> callback );",
"public void execute (T target);",
"public interface RequestFunction {}",
"private void handleInvocationCommand() throws IOException, ClassNotFoundException {\r\n final Object context = m_in.readObject();\r\n final String handle = (String) m_in.readObject();\r\n final String methodName = (String) m_in.readObject();\r\n final Class[] paramTypes = (Class[]) m_in.readObject();\r\n final Object[] args = (Object[]) m_in.readObject();\r\n Object result = null;\r\n try {\r\n result = m_invoker.invoke(handle, methodName, paramTypes, args, context);\r\n } catch (Exception e) {\r\n result = e;\r\n }\r\n m_out.writeObject(result);\r\n m_out.flush();\r\n }",
"void invoke(Map<String, Object> data, String sender);",
"protected void send(O operation)\n {\n }",
"public abstract Object eval();",
"protected abstract String invoke(HttpServletRequest request) throws DriverException, WorkflowException;",
"public interface Response {\n\n /**\n * Run user-defined code for defined responses\n * @param data The data sent by the client/server\n * @param socket The socket for the client/server\n */\n public abstract void run(Data data, Socket socket);\n}",
"abstract protected void execute();",
"public interface Command {\r\n String execute(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException;\r\n}",
"public void execute() throws ProtocolException\n {\n protocol.addEventListener(this);\n\n try\n {\n // Loop forever\n while (true)\n {\n // Send command\n protocol.sendPlayAt(slot, track);\n \n // Wait for complete\n if (complete.attempt(10000))\n {\n // All done\n return;\n }\n\n LoggerSingleton.logDebugCoarse(this.getClass(), \"execute\", \"retry\");\n }\n }\n catch (InterruptedException e)\n {\n // Clear interruption and translate\n Thread.currentThread().interrupt();\n throw new ProtocolException(e.toString());\n }\n finally\n {\n // Alway bind the protocol\n protocol.removeEventListener(this);\n }\n }",
"public abstract void callback(Instruction instruction);",
"public interface Protocol {\n\n <T> void export(String interfaceName, Class<T> clazz) throws Exception;\n\n <T> Invoker<T> refer(Class<T> type, URL url) throws Exception;\n\n}",
"public void registerProtocol(Protocol protocol);",
"static private void callFunc(Object plugin, String func, Context con, Modules mods, IRCInterface irc)\n {\n Class coreClass = plugin.getClass();\n try\n {\n if( coreClass != null )\n {\n Method tempMethod = coreClass.getDeclaredMethod(func,new Class[]\n { Context.class, Modules.class, IRCInterface.class });\n \n Object[] objectArray = new Object[3];\n \n objectArray[0] = con;\n objectArray[1] = mods;\n objectArray[2] = irc;\n \n tempMethod.invoke(plugin,objectArray);\n }\n }\n catch( Exception e )\n {\n // Cause can apparently be null in some situations.\n if( e.getCause() != null && e.getCause().getClass() == SecurityException.class )\n {\n irc.sendContextMessage(con,\"Security exception: \" + e.getCause());\n }\n System.out.println(\"Exception in calling plugin function: \" + e);\n e.printStackTrace();\n e.printStackTrace();\n // What exactly do we do here? We _know_ we'return going to get these.\n }\n }",
"public void execute(Command command, T component);",
"public abstract Object execute(Class clazz, Object[] args) throws IOException;",
"public interface Command {\n\t public String execute(String[] request);\n}",
"public Object invoke(String name, Object... args) throws Exception;",
"public interface Command {\n public void execute(Integer value);\n}",
"public String execute(SOAPMessage message) throws FIFException;",
"public native int execute(String name);",
"public interface ImplPacketHandler {\n\n public void handlePacket(Packet packet);\n}",
"private synchronized void handleCallPacket() {\n int index = 0;\n try {\n index = this.getInteger();\n this.checkFunction(\"List\");\n }\n catch (MathLinkException e) {\n this.handleCleanException(e);\n return;\n }\n if (index != 14) {\n this.lastExceptionDuringCallPacketHandling = null;\n }\n try {\n StdLink.setup(this);\n StdLink.lastPktWasAllowUIComputations(false);\n this.clearInterrupt();\n switch (index) {\n case 1: {\n this.callJava();\n return;\n }\n case 2: {\n this.loadClass();\n return;\n }\n case 3: {\n this.throwFromMathematica();\n return;\n }\n case 4: {\n this.releaseInstance();\n return;\n }\n case 5: {\n this.val();\n return;\n }\n case 6: {\n this.callOnLoadClass();\n return;\n }\n case 7: {\n this.callOnUnloadClass();\n return;\n }\n case 8: {\n this.setComplexCls();\n return;\n }\n case 9: {\n this.reflect();\n return;\n }\n case 10: {\n this.showInFront();\n return;\n }\n case 11: {\n this.sameObjectQ();\n return;\n }\n case 12: {\n this.instanceOf();\n return;\n }\n case 13: {\n this.allowRaggedArrays();\n return;\n }\n case 14: {\n this.getException();\n return;\n }\n case 15: {\n this.connectToFEServer();\n return;\n }\n case 16: {\n this.disconnectToFEServer();\n return;\n }\n case 17: {\n this.peekClasses();\n return;\n }\n case 18: {\n this.peekObjects();\n return;\n }\n case 21: {\n this.setUserDir();\n return;\n }\n case 19: {\n this.getClassPath();\n return;\n }\n case 20: {\n this.addToClassPath();\n return;\n }\n case 23: {\n this.uiThreadWaiting();\n return;\n }\n case 22: {\n this.allowUIComputations();\n return;\n }\n case 24: {\n this.yieldTime();\n return;\n }\n case 25: {\n this.getConsole();\n return;\n }\n case 26: {\n this.extraLinks(true);\n return;\n }\n case 27: {\n this.getWindowID();\n return;\n }\n case 28: {\n this.addTitleChangeListener();\n return;\n }\n case 29: {\n this.setVMName();\n return;\n }\n case 30: {\n this.setException();\n break;\n }\n }\n return;\n }\n catch (Exception e) {\n this.lastExceptionDuringCallPacketHandling = e;\n return;\n }\n finally {\n StdLink.remove();\n this.clearError();\n this.newPacket();\n try {\n this.endPacket();\n this.flush();\n }\n catch (MathLinkException ee) {}\n }\n }",
"public void passiveFunction() {}",
"abstract void runRoutine();",
"void run(AnswerType parameter);",
"public interface Command{\n public void execute();\n\n}",
"static public void doCommand(Object plugin, String command, Context con, Modules mods, IRCInterface irc)\n {\n System.out.println(\"Calling method command\" + command);\n callFunc(plugin, \"command\" + command,con,mods,irc);\n }",
"public final void beginExecute(Protocol protocol, ReplyHandler replyHandler ) {\n\t\tbeginExecute( protocol, replyHandler, protocol.getDefaultReplyExecutor() );\n\t}",
"Answer perform(final String event);",
"public abstract T execute() throws Exception;",
"@Override\n\tpublic Response invoke(ChaincodeStub stub) {\n\t\ttry {\n\t\t\t_logger.info(\"Invoke java simple chaincode\");\n\t\t\tString func = stub.getFunction();\n\t\t\tList<String> params = stub.getParameters();\n\n\t\t\tif (func.equals(\"queryCar\")) {\n\t\t\t\treturn queryCar(stub, params);\n\t\t\t}\n\t\t\tif (func.equals(\"initLedger\")) {\n\t\t\t\treturn initLedger(stub, params);\n\t\t\t}\n\t\t\tif (func.equals(\"createCar\")) {\n\t\t\t\treturn createCar(stub, params);\n\t\t\t}\n\t\t\tif (func.equals(\"queryAllCars\")) {\n\t\t\t\treturn queryAllCars(stub, params);\n\t\t\t}\n\t\t\tif (func.equals(\"changeCarOwner\")) {\n\t\t\t\treturn changeCarOwner(stub, params);\n\t\t\t}\n\n\t\t\treturn newErrorResponse(\"Received unknown function \" + func + \" invocation\");\n\t\t}\n\t\tcatch (Throwable e) {\n\t\t\treturn newErrorResponse(e);\n\t\t}\n\t}"
]
| [
"0.5775995",
"0.5670791",
"0.56622344",
"0.5661608",
"0.5649805",
"0.56376505",
"0.5533083",
"0.5533083",
"0.5533083",
"0.5489526",
"0.54756904",
"0.54583997",
"0.54278904",
"0.5406986",
"0.53961676",
"0.5395821",
"0.53832877",
"0.538141",
"0.5381383",
"0.5363574",
"0.5324128",
"0.532105",
"0.5319007",
"0.5313026",
"0.53062934",
"0.530381",
"0.53006613",
"0.5292093",
"0.5291824",
"0.52885514",
"0.5280397",
"0.5280397",
"0.5280397",
"0.5280397",
"0.5280397",
"0.5280397",
"0.5280397",
"0.5277788",
"0.52653337",
"0.52653337",
"0.52653337",
"0.52653337",
"0.5258152",
"0.52569854",
"0.52532995",
"0.524708",
"0.5245547",
"0.5236897",
"0.5229718",
"0.5228801",
"0.52268815",
"0.52250016",
"0.5216182",
"0.520662",
"0.5204571",
"0.5202818",
"0.519894",
"0.5192011",
"0.5188328",
"0.5181066",
"0.51798683",
"0.5179176",
"0.5179172",
"0.51777965",
"0.5174269",
"0.51688313",
"0.5168134",
"0.51599824",
"0.5158472",
"0.51521647",
"0.5137408",
"0.5130309",
"0.51273566",
"0.51221263",
"0.51144713",
"0.5112932",
"0.51110315",
"0.5106254",
"0.5103679",
"0.51000774",
"0.50969034",
"0.50959784",
"0.50858873",
"0.5078847",
"0.50772554",
"0.5072083",
"0.50653213",
"0.50595886",
"0.5055471",
"0.5055337",
"0.50539565",
"0.5051488",
"0.5042281",
"0.5040924",
"0.504028",
"0.5038067",
"0.50314033",
"0.50306284",
"0.5023373",
"0.50227576"
]
| 0.6145962 | 0 |
Called once when JZBot is about to discard this connection. No other methods will ever be called on this connection again. Unless some unusual circumstance occurs, this will always be preceded by a call to disconnect(). | public void discard(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void processDisconnect() {\n\t\tconnected.set(false);\n\t\tsenderChannel = null;\n\t}",
"abstract protected void onDisconnection();",
"public void disconnect()\n {\n isConnected = false;\n }",
"protected void onDisconnect() {}",
"public void disconnect() {\n SocketWrapper.getInstance(mContext).disConnect();\n }",
"public void disconnect() {\n\t\tdisconnect(true);\n\t}",
"protected void processDisconnection(){}",
"@Override\n public void Disconnect() {\n bReConnect = true;\n }",
"@Override\n public void disconnect() {\n super.disconnect();\n if (playStateSubscription != null) {\n playStateSubscription.unsubscribe();\n playStateSubscription = null;\n }\n connected = false;\n }",
"public void disconnectConvo() {\n convo = null;\n setConnStatus(false);\n }",
"public void disconnect() {\r\n\t\tsuper.disconnect();\r\n\t}",
"public void disconnect() {}",
"public void disconnect(){\n\n\t\tserverConnection.disconnect();\n\t}",
"public void disconnect() {\n\t\tdisconnect(null);\n\t}",
"public void disconnect(){\n\t\tif(player!=null){\n\t\t\tplayer.getConnection().close();\n\t\t\t\n\t\t\t// we get no disconnect signal if we close the connection ourself\n\t\t\tnotifyHandlers(MessageFlag.DISCONNECTED);\n\t\t}\n\t}",
"@Override\r\n\t\tpublic void onDisconnect(Connection connection) {\n\r\n\t\t}",
"public void disconnect() {\n\t\tif (con.isConnected()) {\n\t\t\tcon.disconnect();\n\t\t}\n\t}",
"public void disconnect() {\n if (this.mIsConnected) {\n disconnectCallAppAbility();\n this.mRemote = null;\n this.mIsConnected = false;\n return;\n }\n HiLog.error(LOG_LABEL, \"Already disconnected, ignoring request.\", new Object[0]);\n }",
"public final void disconnect() {\n synchronized (this.lock) {\n if (this.zzbur != null) {\n this.zzbur.disconnect();\n this.zzbur = null;\n Binder.flushPendingCommands();\n }\n }\n }",
"protected void kill() {\n disconnect = true;\n }",
"public void disconnect() {\r\n\t\tif (connected.get()) {\r\n\t\t\tserverConnection.getConnection().requestDestToDisconnect(true);\r\n\t\t\tconnected.set(false);\r\n\t\t}\r\n\t}",
"public void disconnect() {\n\t\t\n\t}",
"public void disconnect()\n {\n this.uri = null;\n this.userAddress = null;\n this.password = null;\n connected = false;\n }",
"@Override\n\tpublic void disconnect() {\n\t\t\n\t}",
"@Override\n\tpublic void disconnect() {\n\t\t\n\t}",
"@Override\n\tpublic void disconnect() {\n\n\t}",
"@Override\n\tpublic void disconnect() {\n\n\t}",
"private void disconnect() {\n activityRunning = false;\n MRTClient.getInstance().doHangup();\n MRTClient.getInstance().removeClientListener(this);\n\n finish();\n }",
"public void disconnect() {\n if (logger.isActivated()) {\n logger.info(\"Network access disconnected\");\n }\n ipAddress = null;\n }",
"final public void disconnect() {\n \n _input.removeInputConnection();\n _output.removeConnection(this);\n\n \n }",
"@Override\n\tpublic boolean disconnect() {\n\t\treturn false;\n\t}",
"protected void disconnect() {\n\t\tif (false == DOM.getElementPropertyBoolean(this.getFrame(), \"__connected\")) {\r\n\t\t\tthis.onUnableToConnect();\r\n\t\t} else {\r\n\t\t\tthis.restart();\r\n\t\t}\r\n\t}",
"public void disconnect() {\n\t\tif (_connection != null) {\n\t\t\ttry {\n\t\t\t\twhile (!_connection.isClosed()) {\n\t\t\t\t\t_connection.close();\n\t\t\t\t}\n\t\t\t} catch (Exception e) { /* ignore close errors */\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"public void disconnect() {if(mEnable) mBS.disconnect();}",
"@Override\r\n\tpublic void disconnect();",
"public void handleDisconnect(){\r\n consoleAppend(this.getName() + \" disconnected.\");\r\n clientThreads.remove(getIndex(this.getName()));\r\n sendToAll(this.getName() + \" disconnected.\");\r\n sendCTToAll(new ControlToken(ControlToken.REMOVECODE, this.getName()));\r\n }",
"public void disconnected(String reason) {}",
"void onDisconnect();",
"void onDisconnect();",
"public void disconnect()\n {\n \tLog.d(TAG, \"disconnect\");\n\n \tif(this.isConnected) {\n \t\t// Disable the client connection if have service\n \t\tif(mLedService != null) {\n \t\t\tthis.disable();\n \t\t}\n \t\t\n \t\t// Unbind service\n mContext.unbindService(mServiceConnection);\n \n this.isConnected = false;\n \t}\n }",
"public void disconnect()\r\n\t{\r\n\t\ttry {\r\n\t\t\tconnection_.close();\r\n\t\t} catch (IOException e) {} // How can closing a connection fail?\r\n\t\t\r\n\t}",
"@Override\n\t\tpublic void disconnected() {\n\t\t\tsuper.disconnected();\n\t\t}",
"public static void disconnect() {\n if (AppSettings.bluetoothConnection != null) \n \tAppSettings.bluetoothConnection.stop();\n\t}",
"public void disconnect( ) {\n disconnect( \"\" );\n }",
"protected void disconnect() {\n try {\n if (connection != null) {\n connection.close();\n }\n connection = null;\n queryRunner = null;\n thread = null;\n queries = null;\n } catch (SQLException ex) {\n Logger.getGlobal().log(Level.WARNING, ex.getMessage(), ex);\n }\n }",
"public static void disconnect()\n\t{\n\t\tTASK_LIST.add(ArduinoComms::disconnectInternal);\n\t\tTASK_LIST.add(ArduinoComms::notifyDisconnected);\n\t\t//TODO if waiting at socket.connect from connect() notify the tread\n\t}",
"public static void disconnect() {\r\n if (isConnected()) {\r\n listener.interrupt();\r\n timerThread.interrupt();\r\n keepAliveThread.interrupt();\r\n db.writeDatabase();\r\n ObjectIO.writeObjectToFile(cmdPath, cmd);\r\n tc.stopCommands();\r\n ObjectIO.writeObjectToFile(tcPath, tc);\r\n try {\r\n irc.close();\r\n }\r\n catch (IOException e) { /* Shouldn't happen */ }\r\n }\r\n irc = null;\r\n }",
"protected void handleDisconnect()\n {\n RemotingRMIClientSocketFactory.removeLocalConfiguration(locator);\n }",
"public void disconnect()\n\t{\n\t\toriginal = null;\n\t\tsource = null;\n\t\tl10n = null;\n\t}",
"@Override\n public void disconnect() {\n\n }",
"private void disconnect() {\n System.out.println(String.format(\"連線中斷,%s\",\n clientSocket.getRemoteSocketAddress()));\n final int delete = thisPlayer.id - 1;\n player[delete] = null;\n empty.push(delete);\n }",
"protected void afterDisconnect() {\n // Empty implementation.\n }",
"public void disconnect() {\n if (serverSocket != null) {\n try {\n serverSocket.close();\n Log.i(TAG, \"ServerSocket closed\");\n } catch (IOException e) {\n Log.e(TAG, \"Error closing the serverSocket\");\n }\n }\n\n sendDisconnectionMessage();\n\n // FIXME - Change this into a message sent it listener\n // Wait 2 seconds to disconnection message was sent\n Handler handler = new Handler();\n handler.postDelayed(new Runnable() {\n public void run() {\n WiFiDirectUtils.clearServiceRequest(wiFiP2PInstance);\n WiFiDirectUtils.stopPeerDiscovering(wiFiP2PInstance);\n WiFiDirectUtils.removeGroup(wiFiP2PInstance);\n\n serverSocket = null;\n isRegistered = false;\n clientsConnected.clear();\n }\n }, 2000);\n }",
"protected void beforeDisconnect() {\n // Empty implementation.\n }",
"@Override\n public void disconnect() throws IOException\n {\n super.disconnect();\n _reader = null;\n __writer = null;\n _replyLines.clear();\n setState(IMAPState.DISCONNECTED_STATE);\n }",
"@Override\r\n\t\t\t\tpublic void onClientDisconnect(ServerConnection sc) {\n\t\t\t\t}",
"public void disconnect() {\r\n\t\trunning = false;\r\n\t}",
"public void disconnected(XMPPConnection connection) {}",
"public void disconnect();",
"public void disconnect();",
"public void disconnect();",
"public void disconnect();",
"public void disconnect() {\n if (connectCount.decrementAndGet() == 0) {\n LOG.trace(\"Disconnecting JGroupsraft Channel {}\", getEndpointUri());\n resolvedRaftHandle.channel().disconnect();\n }\n }",
"public void disconnect() {\n try {\n client.disconnect(null, null);\n } catch (MqttException e) {\n Debug.logError(e, MODULE);\n }\n }",
"void disconnect() {\n connector.disconnect();\n // Unregister from activity lifecycle tracking\n application.unregisterActivityLifecycleCallbacks(activityLifecycleTracker);\n getEcologyLooper().quit();\n }",
"public void disconnect() {\n SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(mApplicationContext);\n prefs.edit().putBoolean(\"xmpp_logged_in\", false).commit();\n\n if (mConnection != null) {\n mConnection.disconnect();\n }\n\n mConnection = null;\n // Unregister the message broadcast receiver.\n if (uiThreadMessageReceiver != null) {\n mApplicationContext.unregisterReceiver(uiThreadMessageReceiver);\n uiThreadMessageReceiver = null;\n }\n }",
"protected void disconnected() {\n\t\tthis.model.setClient(null);\n\t}",
"public void cancel() {\r\n try {\r\n btSocket.close();\r\n isConnected = false;\r\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context);\r\n SharedPreferences.Editor edit = preferences.edit();\r\n edit.putBoolean(\"Connection\", isConnected);\r\n edit.apply();\r\n } catch (IOException e) {\r\n Log.d(\"TAG\", \"Could not close the client socket\");\r\n }\r\n }",
"public void disconnect() {\n\t\tif (sock != null) {\n\t\t\ttry {\n\t\t\t\tsock.close();\n\t\t\t} catch (IOException ioe) {\n\t\t\t} finally {\n\t\t\t\tsock = null;\n\t\t\t}\n\t\t}\n\t\toutStream.reset();\n\t\tdisconnected();\n\t}",
"@Override\n\tpublic void channelInactive(ChannelHandlerContext ctx) throws Exception {\n\t\tsuper.channelInactive(ctx);\n\t\tif(connectListener != null) {\n\t\t\tconnectListener.onDisconnect(ctx.channel());\n\t\t}\n\t}",
"public void disconnect() {\n\t\ttry {\n\t\t\tconn.close();\n\t\t\tSystem.out.println(\"切断された/Disconnected\");\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"接続エラーが発生しました/Connection Close Error Occured\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private void connectionClosed() {\n if (this.state != SessionState.DISCONNECTING) {\n // this came unexpected\n connectionClosed(new VertxException(\"Connection closed\"));\n }\n }",
"@Override\r\n\t\t\t\tpublic void onServerDisconnect() {\n\t\t\t\t}",
"@Override\r\n\t\t\t\tpublic void onServerDisconnect() {\n\t\t\t\t\tSystem.out.println(\"CONNECTION HAS BEEN LOST.\");\r\n\t\t\t\t}",
"public void disconnect() {\n try {\n if (socket != null)\n socket.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n isConnected = false;\n }",
"public void disconnect() {\t\n\t\t\n\t\ttry {\n\t\t\tconnection.close();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tSystem.out.println(\"Disconnected\");\n\t}",
"public void disconnect() {\n watchDog.terminate();\n synchronized (sync) {\n if (!connections.isEmpty()) {\n while (connections.size() > 0) {\n ThreadConnection tconn = connections.pop();\n try {\n tconn.conn.rollback();\n tconn.conn.close();\n } catch (SQLException e) {\n }\n }\n }\n }\n this.setChanged();\n this.notifyObservers(\"disconnect\");\n }",
"@Override\n public abstract void disconnect();",
"private void disconnect()\r\n\t{\r\n\t\tif (theSocket != null)\r\n\t\t{\r\n\t\t\ttheSocket.transmit(\"Disconnecting\");\r\n\t\t\twriteLine(\"Disconnecting...\", 0);\r\n\t\t\twriteLine(\"Closing socket\", 0);\r\n\t\t\ttheSocket.close();\r\n\t\t\ttheSocket = null;\r\n\t\t}\r\n\t\tif (theSocket == null)\r\n\t\t{\r\n\t\t\twriteLine(\"The Socket is null\", 0);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\twriteLine(\"We have now disconnected\", 0);\r\n\t\t}\r\n\t\trunning = false;\r\n\t}",
"public void disconnect() throws OOBException {\n \t\tsession.disconnect();\n \t}",
"@Override\n public void disconnect() throws IOException\n {\n super.disconnect();\n reader = null;\n writer = null;\n lastReplyLine = null;\n replyLines.setSize(0);\n //设置为退出状态\n setState(DISCONNECTED_STATE);\n }",
"private void disconnect() {\n\n if (inStream != null) {\n try {inStream.close();} catch (Exception e) { e.printStackTrace(); }\n }\n\n if (outStream != null) {\n try {outStream.close();} catch (Exception e) { e.printStackTrace(); }\n }\n\n if (socket != null) {\n try {socket.close();} catch (Exception e) { e.printStackTrace(); }\n }\n }",
"public boolean disconnect() {\r\n\t\t\r\n\t\tString message;\r\n\t\t//ENTER YOUR CODE TO DISCONNECT\r\n\t\tif (isChatSessionOpened()){\r\n\t\t\tsendChatClosure();\r\n\t\t}\r\n\t\t\r\n\t\tmessage= \"106\";\r\n\t\tsendDatagramPacket(message);\r\n\t\t\r\n\t\tthis.connectedUser = null;\r\n\t\tthis.chatReceiver = null;\r\n\t\t\r\n\t\t\r\n\t\treturn true;\r\n\t}",
"public static void disconnect() {\n \t\tconnPool.stop();\n \t}",
"@Override\n public void onChannelDisconnected() {\n ConnectionManager.getInstance().setDisconnectNow(true);\n ((P2PListener)activity).onAfterDisconnect();\n }",
"public void disconnectSensor() {\n try {\n resultConnection.releaseAccess();\n } catch (NullPointerException ignored) {\n }\n }",
"void disconnect(String reason);",
"@Override\n\tprotected boolean handleDisconnect(Connection conn) {\n\t\treturn true;\n\t}",
"public void disconnect() {\n \ttry {\n \t\tctx.unbindService(apiConnection);\n } catch(IllegalArgumentException e) {\n \t// Nothing to do\n }\n }",
"public void disconnect() {\n\n try {\n if (inputStream != null) {\n inputStream.close();\n }\n\n if (outputStream != null) {\n outputStream.close();\n }\n\n if (socket != null ) {\n socket.close();\n connected = socket.isClosed();\n }\n } catch (IOException e) {\n logger.error(\"S7Client error [disconnect]: \" + e);\n }\n }",
"public void disconnect ()\n {\n org.omg.CORBA.portable.InputStream $in = null;\n try {\n org.omg.CORBA.portable.OutputStream $out = _request (\"disconnect\", true);\n $in = _invoke ($out);\n return;\n } catch (org.omg.CORBA.portable.ApplicationException $ex) {\n $in = $ex.getInputStream ();\n String _id = $ex.getId ();\n throw new org.omg.CORBA.MARSHAL (_id);\n } catch (org.omg.CORBA.portable.RemarshalException $rm) {\n disconnect ( );\n } finally {\n _releaseReply ($in);\n }\n }",
"@Override\n\tprotected void onNetworkDisConnected() {\n\n\t}",
"public void disconnect() {\n\t\tMessage quitMessage = Message.makeQuitMessage(getUserName());\n\t\tsocketConnection.print(quitMessage);\n\t\tKeyboardScanner.close();\n\t}",
"@Override\r\n\t\t\t\tpublic void onClientDisconnect(ServerConnection sc) {\n\t\t\t\t\tSystem.out.println(\"CLIENT DISCONNECTED FROM SERVER.\");\r\n\t\t\t\t}",
"public CompletionStage<Void> disconnect() {\n\t\treturn this.finConnection.sendMessage(\"disconnect-from-channel\", FinBeanUtils.toJsonObject(this.routingInfo)).thenAccept(ack->{\n\t\t\tif (!ack.isSuccess()) {\n\t\t\t\tthrow new RuntimeException(\"error disconnecting channel client, reason: \" + ack.getReason());\n\t\t\t}\n\t\t});\n\t}",
"protected void connectionClosed() {}",
"protected void discard() {\r\n discarded = true;\r\n onDiscard();\r\n }",
"public void mDisconnect() {\n try {\n if (oOutput!=null){\n oOutput.close();\n oOutput=null;}\n if (oInput!=null){\n oInput.close();\n oInput=null;}\n if (oSocket!=null) {\n if (oSocket.isConnected())\n mMsgLog(5,\"Disconnected\");\n oSocket.close();\n oSocket = null;\n }\n if (oDevice!=null){\n oDevice=null;\n }\n } catch (IOException e) {\n mErrMsg(\"Err:\"+e.toString());\n }\n mStateSet(kBT_Disconnected);\n }",
"public void disconnectedFromHost();",
"public void disconnect()\n\t\tthrows Exception\n\t{\n\t\tif (dcsConnector == null)\n\t\t\treturn;\n\t\t\t\n\t\tString bl = getBeamline();\n\n\t\t// Remove this client as listener\n\t\tdcsConnector.removeListener(this);\n\t\tdcsConnector = null;\n\t\tWebiceLogger.info(\"Client \" + getUser() + \" disconnected from beamline \" + bl);\n\t}",
"protected final void disconnect() {\n\t\trunning = false;\n\t\ttry {\n\t\t\tif (out != null)\n\t\t\t\tout.close();\n\t\t\tif (in != null)\n\t\t\t\tin.close();\n\t\t\tsocket.close();\n\t\t} catch (IOException e) {e.printStackTrace();}\n\t}"
]
| [
"0.79654104",
"0.77414614",
"0.77207667",
"0.7648665",
"0.7573049",
"0.7570506",
"0.75434357",
"0.75285023",
"0.75226223",
"0.75164294",
"0.7474041",
"0.74685675",
"0.7423299",
"0.74205804",
"0.739844",
"0.7372661",
"0.73621434",
"0.73552483",
"0.73451495",
"0.7344683",
"0.73092926",
"0.7304616",
"0.7276761",
"0.72738075",
"0.72738075",
"0.72324324",
"0.72324324",
"0.7230187",
"0.7210428",
"0.7169416",
"0.71517885",
"0.71446514",
"0.7123387",
"0.7113674",
"0.7096641",
"0.7087529",
"0.70866644",
"0.7084846",
"0.7084846",
"0.70842755",
"0.7083304",
"0.7077066",
"0.7052404",
"0.7051781",
"0.705062",
"0.70447946",
"0.7042959",
"0.7042654",
"0.7040539",
"0.7034254",
"0.70270914",
"0.7003948",
"0.70026046",
"0.700257",
"0.6987284",
"0.6979075",
"0.6977771",
"0.6974997",
"0.6973774",
"0.6973774",
"0.6973774",
"0.6973774",
"0.6938875",
"0.6926256",
"0.69184023",
"0.6915377",
"0.6901401",
"0.6901278",
"0.69012046",
"0.68967426",
"0.6884178",
"0.6883988",
"0.6881776",
"0.68796426",
"0.6868676",
"0.686433",
"0.6861517",
"0.6857225",
"0.6844794",
"0.68371814",
"0.6828157",
"0.6818332",
"0.68175006",
"0.6812211",
"0.6809303",
"0.6803017",
"0.68006736",
"0.6791813",
"0.67902946",
"0.678853",
"0.6759613",
"0.67590594",
"0.6756817",
"0.6741899",
"0.67259365",
"0.6719514",
"0.6711997",
"0.6708287",
"0.6707321",
"0.6703551",
"0.6697406"
]
| 0.0 | -1 |
Returns true if this protocol is one that prefers long responses to be pastebinned, false if it would prefer some other means, such as multiple messages, to be used. For example, IRC prefers pastebin posts, but BZFlag does not as it's quite difficult to copy a URL from within a BZFlag client and view it. | public boolean likesPastebin(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected boolean supportsLongerLDStrings() {\n // The fix for DERBY-5236 went into the 10.8 branch after the first\n // release off that branch. The DRDA maintenance version was bumped\n // to 1 when the fix went in (the third argument in the call to\n // greaterThanOrEqualTo() refers to that maintenance version, not to\n // the third digit of the product's version number).\n return clientType == DNC_CLIENT && greaterThanOrEqualTo(10, 8, 1);\n }",
"public boolean hasResponseLink() {\n return fieldSetFlags()[7];\n }",
"private boolean isLongPulling(HttpServletRequest req) {\n return req.getHeader(Constants.PULLING_TIMEOUT_HEADER) != null;\n }",
"private static boolean m151985b(C32724ad adVar, Proxy.Type type) {\n return !adVar.mo132325g() && type == Proxy.Type.HTTP;\n }",
"public boolean isShare() {\n return (option >> 5 & 1) == 1;\n }",
"private boolean preferChunked() {\n return isSecure()\n || isGzip()\n || ctx.pipeline().channel().getClass().getName().startsWith(\"IOUring\");\n }",
"private boolean moreServerContent() {\n Stopwatch stopwatch = Stopwatch.createStarted();\n boolean moreDataAvailable;\n try {\n if (resIterator == null) {\n return false;\n }\n moreDataAvailable = resIterator.hasNext();\n recordSuccessMetric(MESSAGE_LATENCY_MS, stopwatch.elapsed(MILLISECONDS));\n } catch (Exception e) {\n recordErrorMetric(MESSAGE_LATENCY_MS, stopwatch.elapsed(MILLISECONDS), e);\n throw e;\n }\n if (!moreDataAvailable) {\n cancelCurrentRequest();\n }\n return moreDataAvailable;\n }",
"protected boolean validateServerResume() {\r\n\t\tHttpURLConnection connection = null;\r\n\t\tboolean isSupported = false;\r\n\t\t\r\n\t\ttry {\r\n\t\t\t// Open connection\r\n\t\t\tconnection = (HttpURLConnection) dURL.openConnection();\r\n\t\t\tconnection.setConnectTimeout(10000);\r\n\t\t\tconnection.setRequestProperty(\"Range\", \"bytes=10-20\");\r\n\t\t\tconnection.connect();\r\n\r\n\t\t\t// HTTP/206: Partial Content: Support multiple simultaneous streams\r\n\t\t\tif (connection.getResponseCode() == 206) {\r\n\t\t\t\tisSupported = true;\r\n\r\n\t\t\t\t// System debugs\r\n\t\t\t\tSystem.out.println(\"Server support resume\");\r\n\t\t\t}\r\n\r\n\t\t} catch (IOException e) {\r\n\t\t\terror();\r\n\t\t\t\r\n\t\t\t// System debugs\r\n\t\t\tSystem.err.println(\"ERROR: Can not connect to server\");\r\n\t\t} finally {\r\n\t\t\tif (connection != null)\r\n\t\t\t\tconnection.disconnect();\r\n\t\t}\r\n\t\t\r\n\t\treturn isSupported;\r\n\t}",
"public boolean hasLongNames() {\n return ((bitField0_ & 0x00000010) == 0x00000010);\n }",
"boolean isResponseBuffered()\n {\n return configfile.buffering_response;\n }",
"private boolean m43013b(int responseCode) {\n if (responseCode == 200 || responseCode == 202 || responseCode == 206) {\n return true;\n }\n return false;\n }",
"public boolean hasLongNames() {\n return ((bitField0_ & 0x00000010) == 0x00000010);\n }",
"boolean hasHadithUrl();",
"boolean hasHadithBookUrl();",
"boolean canRequestChunk();",
"public boolean isChunked() {\n/* 101 */ return this.chunked;\n/* */ }",
"public boolean isShouldEncodeUrls() {\n return mShouldEncodeUrls;\n }",
"boolean getReturnPartialResponses();",
"@Override\n\tpublic boolean isShortListed() {\n\t\treturn _candidate.isShortListed();\n\t}",
"boolean hasReply();",
"public Boolean canBorrowBook() {\n\t\tif (loans.size() >= getLoanLimit()) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"public boolean hasResponseServer() {\n return fieldSetFlags()[6];\n }",
"public boolean echoLimiterEnabled();",
"private Boolean canHaveContent(){\n\t\t\treturn (getRequestType() == RequestType.POST || getRequestType() == RequestType.PUT);\n\t\t}",
"public boolean hasLongValue() {\n return ((bitField0_ & 0x00000020) == 0x00000020);\n }",
"public boolean hasLongValue() {\n return ((bitField0_ & 0x00000020) == 0x00000020);\n }",
"boolean hasProtocol();",
"public boolean isKeepAlive(){\n if(contains(\"Connection\")) {\n return !contains(\"Connection\", \"close\");\n } else if(getMajor() > 1) {\n return true; \n } else if(getMajor() == 1) {\n return getMinor() > 0;\n }\n return false;\n }",
"boolean hasLongNames();",
"public boolean canDisplayAwayMessage() {\n long now = System.currentTimeMillis();\n\n if (this.playerAwayMsgTimeStamp + PlayerImpl.AWAY_MSG_DISPLAY_PERIOD < now) {\n this.playerAwayMsgTimeStamp = now;\n return true;\n }\n\n return false;\n }",
"public boolean isFromAuthoritative()\n {\n if ((this.flag & 0x0400) == 0)\n {\n // not from a authoritative server\n return false;\n }\n\n else return true;\n }",
"boolean hasChunkResponse();",
"public boolean hasProtocol() {\n return protocolBuilder_ != null || protocol_ != null;\n }",
"public boolean hasURL() {\n return fieldSetFlags()[2];\n }",
"public boolean hasReplicateResponse() {\n return replicateResponseBuilder_ != null || replicateResponse_ != null;\n }",
"public boolean isLargeStraight(){\n // TODO\n return false;\n }",
"public boolean canShare();",
"boolean hasReplicateResponse();",
"boolean isAllInDownloadedArea();",
"public boolean isLong() {\n return _isLong;\n }",
"boolean isInDownloadedArea();",
"public boolean mo43872l() {\n return ((String) this.f42902g.get(C13822a.Domain)).endsWith(\"in-addr.arpa\");\n }",
"@EnsuresNonNullIf(expression = \"allowPartial\", result = false)\n public boolean isAllowPartial() {\n // Default (and standard behavior) is to allow partial windows.\n return allowPartial == null\n || allowPartial.booleanValue();\n }",
"public boolean longDescriptionHasSeenBefore(){\n return longDescriptionviewer;\n }",
"boolean hasEmbeddingTokenLow();",
"boolean hasEmbeddingTokenLow();",
"public boolean hasResponseMessage() {\n return ((bitField0_ & 0x00002000) == 0x00002000);\n }",
"public boolean isBroly() {\n\t\treturn Broly;\n\t}",
"boolean hasEmbeddingTokenHigh();",
"boolean hasEmbeddingTokenHigh();",
"@Override\n public boolean isNeedShowBOTPRule() {\n \treturn true;\n }",
"public boolean hasResponseMessage() {\n return ((bitField0_ & 0x00002000) == 0x00002000);\n }",
"private boolean responseAvailable() {\n return (responseBody != null) || (responseStream != null);\n }",
"private synchronized boolean webhookMaxed(String clientId) {\n return webhookCount(clientId) > this.maxJobsPerClient ? true : false;\n }",
"public boolean accept(String url) {\n\t\t\t\tif (url.startsWith(\"http://bbs.nju.edu.cn/bbsdoc\"))\n\t\t\t\t\treturn true;\n\t\t\t\telse\n\t\t\t\t\treturn false;\n\t\t\t}",
"public boolean hasResponseTimeSec() {\n return ((bitField0_ & 0x00000800) == 0x00000800);\n }",
"@Override\n\tpublic boolean CheckStreamingLike(String mail) {\n\t\treturn false;\n\t}",
"public boolean isLongRange() {\n\t\treturn this.ordinal() >= 2 && this.ordinal() <= 4;\n\t}",
"public boolean hasResponseTimeSec() {\n return ((bitField0_ & 0x00000800) == 0x00000800);\n }",
"public boolean mo7249a(HttpURLConnection httpURLConnection) {\n return httpURLConnection.getResponseCode() == 200;\n }",
"public boolean hasChunkResponse() {\n return chunkResponseBuilder_ != null || chunkResponse_ != null;\n }",
"public boolean isTooManyRequests() {\n if (this.getCode() != null && this.getCode() == CODE_TOO_MANY_REQUESTS) {\n return true;\n }\n return false;\n }",
"public final boolean getHasContent() {\n return this.url != null;\n }",
"boolean hasChunkSize();",
"boolean hasBiddingStrategy();",
"protected boolean activatePasteMetadata()\r\n {\r\n if (!hasViewMask(VIEW_MASK_ENABLE_PASTE_METADATA))\r\n {\r\n return false;\r\n }\r\n\r\n OwClipboard clipboard = ((OwMainAppContext) getContext()).getClipboard();\r\n switch (clipboard.getContentType())\r\n {\r\n case OwClipboard.CONTENT_TYPE_OW_OBJECT:\r\n return clipboard.getContent().size() == 1;\r\n\r\n case OwClipboard.CONTENT_TYPE_OW_FIELD:\r\n return clipboard.getContent().size() > 0;\r\n\r\n default:\r\n return false;\r\n }\r\n\r\n }",
"boolean hasStoreChunkResponse();",
"private boolean readResponse() throws IOException {\n replyHeaders.responseCode = socketInput.read();\n int packetLength = socketInput.read();\n packetLength = (packetLength << 8) + socketInput.read();\n\n if (packetLength > OBEXConstants.MAX_PACKET_SIZE_INT) {\n if (exceptionMessage != null) {\n abort();\n }\n throw new IOException(\"Received a packet that was too big\");\n }\n\n if (packetLength > BASE_PACKET_LENGTH) {\n int dataLength = packetLength - BASE_PACKET_LENGTH;\n byte[] data = new byte[dataLength];\n int readLength = socketInput.read(data);\n if (readLength != dataLength) {\n throw new IOException(\"Received a packet without data as decalred length\");\n }\n byte[] body = OBEXHelper.updateHeaderSet(replyHeaders, data);\n\n if (body != null) {\n privateInput.writeBytes(body, 1);\n\n /*\n * Determine if a body (0x48) header or an end of body (0x49)\n * was received. If we received an end of body and\n * a response code of OBEX_HTTP_OK, then the operation should\n * end.\n */\n if ((body[0] == 0x49) && (replyHeaders.responseCode == ResponseCodes.OBEX_HTTP_OK)) {\n return false;\n }\n }\n }\n\n if (replyHeaders.responseCode == OBEXConstants.OBEX_HTTP_CONTINUE) {\n return true;\n } else {\n return false;\n }\n }",
"public boolean isAllowPartialRetryRequests() {\n\t\treturn false;\n\t}",
"public boolean hasMoreDiscussions();",
"default boolean isSwear() {\n return meta(\"nlpcraft:nlp:swear\");\n }",
"@ApiModelProperty(value = \"If true, the request waits (long-polls) until the user responds to the prompt or more than 10 minutes pass. Defaults to false.\")\n public Boolean getLongPoll() {\n return longPoll;\n }",
"private boolean checkOrigin(InetSocketAddress remoteAddress, boolean isSecured) {\n try {\n if (GlobalSettingsAndNotifier.singleton.getSetting(\"RESTRICT_SECURE\").equals(\"true\") && !isSecured) {\n return false;\n }\n String mode = GlobalSettingsAndNotifier.singleton.getSetting(\"NET_ORIGIN\");\n if (mode.equals(\"NO_RESTRICTIONS\")) {\n return true;\n }\n String a = remoteAddress.getAddress().toString().split(\"/\")[1];\n String add = a.split(\":\")[0];\n if (add == null) {\n add = a;\n }\n System.out.println(add);\n String[] parts = null;\n if (add.contains(\"-\")) {\n\n parts = add.split(\"-\");\n }\n if (add.contains('.' + \"\")) {\n\n parts = add.split(\"\\\\.\");\n }\n\n if (parts == null) {\n\n return false;\n }\n if (parts.length != 4) {\n\n return false;\n }\n final int[] remote = new int[]{Integer.parseInt(parts[0]), Integer.parseInt(parts[1]), Integer.parseInt(parts[2]), Integer.parseInt(parts[3])};\n if (mode.equals(\"RESTRICT_LAN\")) {\n return networkAddressRange.isOnLAN(remote);\n }\n Iterator<networkAddressRange> inar = GlobalSettingsAndNotifier.singleton.permited.iterator();\n System.out.println(\"NrOf rules \" + GlobalSettingsAndNotifier.singleton.permited.size());\n while (inar.hasNext()) {\n\n networkAddressRange n = inar.next();\n System.out.println(\"Check\" + n.getNetworkForHumans());\n n.getAction();\n switch (n.isAllowed(new int[]{Integer.parseInt(parts[0]), Integer.parseInt(parts[1]), Integer.parseInt(parts[2]), Integer.parseInt(parts[3])}, isSecured)) {\n case 1:\n return true;\n case -1:\n return false;\n\n }\n }\n } catch (Exception ex) {\n System.out.println(ex.toString());\n\n }\n\n if (GlobalSettingsAndNotifier.singleton.getSetting(\"IMPLICIT_ALLOW\").equalsIgnoreCase(\"true\")) {\n\n return true;\n }\n\n return false;\n }",
"public static boolean m60273d(C15966s c15966s) {\n if (c15966s.m60553a().m60527b().equals(\"HEAD\")) {\n return false;\n }\n int c = c15966s.m60555c();\n if (((c >= 100 && c < Callback.DEFAULT_DRAG_ANIMATION_DURATION) || c == 204 || c == 304) && C15925d.m60264a(c15966s) == -1) {\n if (\"chunked\".equalsIgnoreCase(c15966s.m60551a(\"Transfer-Encoding\")) == null) {\n return false;\n }\n }\n return true;\n }",
"boolean hasPlainTransferFrom();",
"private boolean tienePermiso(String urlStr){\n return true;\n }",
"public boolean isRemotlyQueued()\r\n {\r\n return statusObj.value == STATUS_CANDIDATE_REMOTLY_QUEUED;\r\n }",
"public boolean isOtherOption() {\n return (alias.indexOf(Constants.MULTIPLE_QUESTION_OTHER_START_STRING) > 0);\n }",
"@java.lang.Override\n public boolean hasReplicateResponse() {\n return replicateResponse_ != null;\n }",
"public boolean hasBody() {\n /*\n * For response, a message-body is explicitly forbidden in responses to HEAD requests\n * a message-body is explicitly forbidden in 1xx (informational), 204 (no content), and 304 (not modified)\n * responses\n */\n int code = statusLine.code();\n return !(code >= 100 && code < 200 || code == 204 || code == 304);\n }",
"public boolean isMessageReadFully() {\r\n\t\t\r\n\t\tCharBuffer charBuffer = byteBuffer.asCharBuffer();\r\n\t\tint limit = charBuffer.limit();\r\n\t\tString protocolMessage = null;\r\n\t\t//Check if the last char is ~ indicating the end of the message which also \r\n\t\t//indicates that the message is fully read\r\n\t\tif (charBuffer.get(limit) == '~') {\r\n\t\t\tprotocolMessage = charBuffer.toString();\r\n\t\t\tSystem.out.println(\"Protocol Message: \" + protocolMessage);\r\n\t\t\t//clear the buffer\r\n\t\t\tbyteBuffer.clear();\r\n\t\t\t//Decode the message into portions\r\n\t\t\tdecode(protocolMessage);\r\n\t\t\treturn true;\r\n\t\t} else\r\n\t\t\treturn false;\r\n\t\t\r\n\t\t\r\n\t}",
"public static boolean m16888b(String str) {\n if (str.startsWith(\"tel:\") || str.startsWith(\"voicemail:\") || str.startsWith(\"sms:\") || str.startsWith(\"mailto:\") || str.startsWith(\"geo:\") || str.startsWith(\"google.streetview:\")) {\n return true;\n }\n try {\n new URL(str);\n return false;\n } catch (MalformedURLException e) {\n StringBuilder sb = new StringBuilder(\"Failed to open Url: \");\n sb.append(str);\n IAlog.m18023d(sb.toString());\n return true;\n }\n }",
"public boolean hasResponseStreaming()\n {\n return responseStreaming;\n }",
"public boolean isDownloading()\r\n {\r\n return statusObj.value == STATUS_CANDIDATE_DOWNLOADING;\r\n }",
"public boolean hasUrl() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"public boolean isReplicateUpdatesViaCopy() {\r\n\r\n if (LOG.isLoggable(Level.FINEST)) {\r\n LOG.finest(\"isReplicateUpdatesViaCopy ( ) called \");\r\n }\r\n\r\n return replicateUpdatesViaCopy;\r\n }",
"private boolean isThereMoreData() {\n return nextUrl != null;\n }",
"public boolean isShowPartialY() { return _showPartialY; }",
"public boolean isBungeePingSave() {\n return getBoolean(\"bungee-ping-save\", true);\n }",
"public boolean isLong() {\n return field.getJavaType() == FieldDescriptor.JavaType.LONG && !isInt52();\n }",
"public boolean getIsLimited() {\r\n return !(this.accessLimitations != null && this.accessLimitations.contains(\"UNL\"));\r\n }",
"boolean hasDownloadResponse();",
"boolean getLongNames();",
"public boolean isPrivate() {\n\t\t// refer to RFC 1918\n // 10/8 prefix\n // 172.16/12 prefix (172.16.0.0 – 172.31.255.255)\n // 192.168/16 prefix\n\t\tIPv4AddressSegment seg0 = getSegment(0);\n\t\tIPv4AddressSegment seg1 = getSegment(1);\n\t\treturn seg0.matches(10)\n\t\t\t|| seg0.matches(172) && seg1.matchesWithPrefixMask(16, 4)\n\t\t\t|| seg0.matches(192) && seg1.matches(168);\n\t}",
"public boolean getAutolink()\r\n {\r\n return (m_autolink);\r\n }",
"public Boolean isPunishment() {\n return (Boolean) get(\"punishment\");\n }",
"public boolean hasUrl() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }",
"public boolean hasHealMyChunk() {\n return msgCase_ == 13;\n }",
"public boolean hasAllowedByRobotsTXT() {\n return fieldSetFlags()[0];\n }",
"public boolean isNowrap()\n {\n return this.nowrap;\n }"
]
| [
"0.554395",
"0.55414826",
"0.5498193",
"0.53906226",
"0.52590495",
"0.5220749",
"0.5188391",
"0.5127776",
"0.51266265",
"0.51173156",
"0.5115936",
"0.5111368",
"0.50936407",
"0.5091472",
"0.5054201",
"0.504405",
"0.5036109",
"0.49955156",
"0.49936143",
"0.4986838",
"0.49846068",
"0.4941897",
"0.49372953",
"0.49327734",
"0.49313897",
"0.4926384",
"0.49217555",
"0.49135262",
"0.48992655",
"0.48827103",
"0.48797914",
"0.48786542",
"0.48694837",
"0.48684368",
"0.4851085",
"0.48500082",
"0.48434055",
"0.48189276",
"0.48015282",
"0.4798841",
"0.4798177",
"0.47744647",
"0.4771758",
"0.47655416",
"0.47655413",
"0.47655413",
"0.47626436",
"0.47492957",
"0.47450045",
"0.47450045",
"0.47416264",
"0.47341642",
"0.4723953",
"0.47214952",
"0.47136697",
"0.4702262",
"0.46997714",
"0.46986595",
"0.46966162",
"0.46951452",
"0.46908775",
"0.46843392",
"0.46830094",
"0.4682633",
"0.46790627",
"0.4676022",
"0.4670128",
"0.46659464",
"0.46626452",
"0.4661376",
"0.46536762",
"0.46490493",
"0.4647566",
"0.46397707",
"0.46328744",
"0.46296766",
"0.46244377",
"0.46221283",
"0.46211419",
"0.46203852",
"0.46082348",
"0.46078163",
"0.45992288",
"0.4597571",
"0.4594652",
"0.45872998",
"0.45861885",
"0.45843953",
"0.45839167",
"0.4580173",
"0.45790514",
"0.45788005",
"0.4575745",
"0.45738807",
"0.45707527",
"0.45660517",
"0.45657745",
"0.45604372",
"0.4558322",
"0.45550162"
]
| 0.52325547 | 5 |
/ Method that allow to start the motion of the pacmans inside the GameZone (canvas). | public void movePacmans() {
try {
gz.redraw();
}
catch(NullPointerException npe) {
gz.pauseGame();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void startMovement();",
"public void Start() \r\n {\r\n // Set the canvas as the current phone's screen\r\n mDisplay.setCurrent(this);\r\n\r\n // we call our own initialize function to setup all game objects\r\n GameInitialize();\r\n\r\n // Here we setup the thread and start it\r\n Thread thread = new Thread(this);\r\n thread.start();\r\n }",
"public void startMovingToTarget() \r\n {\n movingToTarget = true;\r\n }",
"public void start() {\n\t\tthis.obstacleController.start();\n\t}",
"public void startGame() {\n\t\timages = new ImageContainer();\n\t\ttimer = new Timer(15, this);\n\t\ttimer.setRepeats(true);\n\t\tlevelStartTimer = new Timer(2000, this);\n\t\thighScore = new HighScore();\n\t\tpacmanAnimation = new PacmanAnimation(images.pacman, new int[] { 3, 2,\n\t\t\t\t0, 1, 2 });\n\t\tactualLevel = 1;\n\t\tinitNewLevel();\n\t}",
"public void start(){\n getBoard();\n prepareBoard();\n renderBoard();\n }",
"public void startMoving ()\n {\n if (canMove()) {\n ((Mobile)_actor).setDirection(_actor.getRotation());\n _actor.set(Mobile.MOVING);\n }\n }",
"public void start() {\n\t\tint pixelNum = 0;\n\n\t\tfor (int y = 0; y < camera.height(); y++) {\n\t\t\tfor (int x = 0; x < camera.width(); x++) {\n\t\t\t\tcamera.setPixel(pixelNum++, trace(camera.shootRay(x, y)));\n\t\t\t}\n\t\t}\n\n\t\tcamera.writePPM();\n\t}",
"public void go()\n {\n for( int i = 0; i<3; i++)m[i].setSpeed(720);\n step();\n for( int i = 0; i<3; i++)m[i].regulateSpeed(false);\n step();\n }",
"public void startExecuting()\n\t{\n\t\tdouble d0 = this.leapTarget.xCoord - this.entity.posX;\n\t\tdouble d1 = this.leapTarget.zCoord - this.entity.posZ;\n\t\tfloat f = MathHelper.sqrt(d0 * d0 + d1 * d1);\n\t\tthis.entity.motionX += (d0 / (double)f * 0.5D * 0.800000011920929D + this.entity.motionX * 0.20000000298023224D)/2;\n\t\tthis.entity.motionZ += (d1 / (double)f * 0.5D * 0.800000011920929D + this.entity.motionZ * 0.20000000298023224D)/2;\n\t\tthis.entity.motionY = (double)this.leapMotionY;\n\t}",
"private void canonMotion() {\n leftToRightAnimation(canon, 1000);\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n if (!clickable)\n canonMotion();\n }\n }, 2000);\n }",
"public void start() {\n isStarted = true;\n clearBoard();\n newPiece();\n }",
"public void start()\r\n\t{\r\n\t\tif (state == State.STOPPED) {\r\n\t\t\tstate = State.EXITING;\r\n\t\t\tsetSprite(\"pedestrians/\"+spriteName);\r\n\t\t}\r\n\t\t//if the pedestrian is in the entering state, and never stops, it won't go into the exiting phase.\r\n\t\telse if ( state == State.ENTERING) {\r\n\t\t\tif(isInArea(lane.getStoppingArea())){\r\n\t\t\t\tstate = State.EXITING;\r\n\t\t\t}\r\n\t\t}\r\n\t\tsetSpeed(speed);\r\n\t}",
"public void begin() {\n\n JLabel header = new JLabel(\"Reflecting Pond Control Panel\");\n run = new JButton(\"Run\");\n run.addActionListener(this);\n run.setActionCommand(\"run\");\n pause = new JButton(\"Pause\");\n pause.addActionListener(this);\n pause.setActionCommand(\"pause\");\n clear = new JButton(\"Clear Ripples\");\n clear.addActionListener(this);\n clear.setActionCommand(\"clear\");\n\n speed = 50;\n speedLabel = new JLabel(\"The speed is \" + speed);\n speedController = new JSlider(JSlider.HORIZONTAL,1,100,50);\n speedController.addChangeListener(this);\n\n JPanel northPanel = new JPanel();\n JPanel northPanel2 = new JPanel();\n JPanel southPanel = new JPanel();\n southPanel.add(speedLabel);\n southPanel.add(speedController);\n northPanel.add(header);\n northPanel2.add(run);\n northPanel2.add(pause);\n northPanel2.add(clear);\n\n JPanel gridPanel = new JPanel();\n gridPanel.setLayout(new GridLayout(2,1));\n gridPanel.add(northPanel);\n gridPanel.add(northPanel2);\n\n this.add(gridPanel, BorderLayout.NORTH);\n this.add(southPanel, BorderLayout.SOUTH);\n\n\n canvas.addMouseListener(this);\n canvas.addMouseMotionListener(this);\n\n this.validate();\n\n movingRipples = true;\n\n // create an instance of class PondQuadrants\n pond = new PondQuadrants( canvas );\n }",
"public void superPacman(){\n setSuperPacman(true);\n\n for(VisualObject v : Map.visualObjects){\n if(v.getClass().getGenericSuperclass() == Fantome.class){\n ((Fantome)v).changeSpriteAnimation(\"./data/SpriteMouvement/FantomePeur/\");\n ((Fantome)v).initAnimation();\n }\n }\n new Thread(() -> {\n //mettre la nouvelle image du superpacman\n try {\n TimeUnit.SECONDS.sleep(10);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n setSuperPacman(false);\n for(VisualObject v : Map.getVisualObjects()){\n if(v.getClass().getGenericSuperclass() == Fantome.class){\n ((Fantome)v).initSpriteAnimation();\n ((Fantome)v).initAnimation();\n }\n }\n }).start();\n\n }",
"protected void execute()\n\t{\n\t\tdouble speed = Robot.oi.getActuatorSpeed();\n\t\t// Treat a zone around the center position as zero to prevent fluctuating\n\t\t// motor speeds when the joystick is at rest in the center position.\n\t\tRobot.linearActuator.setSpeed(Math.abs(speed) >= .1 ? speed : 0);\n\t}",
"public void act() \n {\n if(getY()>=30 && !cambia)\n {\n direccion = -1;\n }\n else\n {\n cambia = true;\n }\n if(getY() <= getWorld().getHeight()-30 && cambia)\n {\n direccion = 1;\n }\n else\n {\n cambia = false;\n }\n \n setLocation(getX(),getY()+(velocidad*direccion));\n reglas();\n ataque();\n \n \n \n }",
"@Override\n public void start() {\n\n\n // IF YOU ARE NOT USING THE AUTO MODE\n\n /*\n\n runtime.reset();\n\n ElapsedTime time = new ElapsedTime();\n\n time.reset();\n\n while (time.time() < 1) {\n\n armMotor.setPower(0.5);\n\n }\n\n armMotor.setPower(0);\n\n // get the grabbers ready to grip the blocks\n leftGrab.setPosition(0.9);\n rightGrab.setPosition(0.1);\n\n /*\n time.reset();\n\n while(time.time() < 0.6) {\n\n armMotor.setPower(-0.5);\n\n }\n\n */\n\n\n }",
"public void start() {\n\t\tcanvas.createBufferStrategy(2);\n\t\tbuffer = canvas.getBufferStrategy();\n\t\tthread = new Thread(this);\n\t\tthread.start();\n\t}",
"public void start()\n {\n mover.start();\n }",
"private void startGame() {\r\n setGrid();\r\n setSnake();\r\n newPowerUp();\r\n timer.start();\r\n }",
"public void start() {\n initGUI();\n initDemo();\n\n float target = 1000 / 60.0f;\n float frameAverage = target;\n long lastFrame = System.currentTimeMillis();\n float yield = 10000f;\n float damping = 0.1f;\n\n while (running) {\n // adaptive timing loop from Master Onyx\n long timeNow = System.currentTimeMillis();\n frameAverage = (frameAverage * 10 + (timeNow - lastFrame)) / 11;\n lastFrame = timeNow;\n\n yield += yield * ((target / frameAverage) - 1) * damping + 0.05f;\n\n for (int i = 0; i < yield; i++) {\n Thread.yield();\n }\n\n update();\n\n // render\n Graphics2D g = (Graphics2D) strategy.getDrawGraphics();\n g.setColor(background);\n g.fillRect(0, 0, 500, 500);\n\n draw(g);\n renderGUI(g);\n g.dispose();\n strategy.show();\n }\n }",
"public void startGame() {\n running = true;\n\n Thread t = new Thread(animator);\n t.start();\n\n }",
"public void startClick() {\n if(!isRunning){\n startButton.setText(\"Pause\");\n isRunning = true;\n isMovable = false;\n board.finalizeBoard();\n setFocusTraversable(true);\n aliveLabel.setText(Integer.toString(board.getCellsAlive()));\n draw();\n timeline.play();\n }else{\n startButton.setText(\"Start\");\n isRunning = false;\n isMovable = false;\n board.finalizeBoard();\n setFocusTraversable(true);\n aliveLabel.setText(Integer.toString(board.getCellsAlive()));\n draw();\n timeline.pause();\n }\n }",
"@Override\r\n public void act() \r\n {\n int posx = this.getX();\r\n int posy = this.getY();\r\n //calculamos las nuevas coordenadas\r\n int nuevox = posx + incx;\r\n int nuevoy = posy + incy;\r\n \r\n //accedemos al mundo para conocer su tamaño\r\n World mundo = this.getWorld();\r\n if(nuevox > mundo.getWidth())//rebota lado derecho\r\n {\r\n incx = -incx;\r\n }\r\n if(nuevoy > mundo.getHeight())//rebota en la parte de abajo\r\n {\r\n incy = -incy;\r\n }\r\n \r\n if(nuevoy < 0)//rebota arriba\r\n {\r\n incy = -incy;\r\n }\r\n if(nuevox < 0)//rebota izquierda\r\n {\r\n incx = -incx;\r\n }\r\n //cambiamos de posicion a la pelota\r\n this.setLocation(nuevox,nuevoy);\r\n }",
"@Override\n public void execute() {\n drivetrain.set(ControlMode.MotionMagic, targetDistance, targetDistance);\n }",
"@Override\n\tpublic void start()\n\t{\n\t\tarena = \"scenarios/boxpushing/arena/pioneer.controller.arena.txt\"; \n\n\t\t\n\t\tschedule.reset();\n\n\t\tsuper.start();\n\n\t\tresetBehavior();\n\n\t}",
"@Override\n\tprotected void startEverything() {\n\t\ttracker.dropAllTracks();\n\t\tcreateAssistedTracker(maxIterations,4);\n\t\tdistortAlg = new MotionMosaicPointKey<I,T>(trackerModel,fitModel,40,0.3,pruneThreshold,0.8);\n\t\tT initTran = ConvertTransform_F64.convert(createInitialTransform(), fitModel.createInstance());\n\t\tdistortAlg.setInitialTransform(initTran);\n\t\ttotalKeyFrames = 0;\n\t\tmotionRender.clear();\n\n\t\tstartWorkerThread();\n\t}",
"void start () {\n System.out.println(\"Starting the game\");\n score = 0;\n updateScore();\n stepDelay = startingSpeed;\n isFalling = false;\n gameOver = false;\n board.clear();\n board.clearTemp();\n setNormalSpeed();\n spawnNewPiece();\n updateView();\n resetLoop();\n }",
"public void startGame() \n\t{\n\t\tgamePanel.startGame();\n\t}",
"public void startGame() {\n\t\ttank1.create(20, 530, 0, 0);\n\t\ttank1.setDefaults();\n\t\ttank2.create(960, 530, 0, 0);\n\t\ttank2.setDefaults();\n\t\tobjects.add(tank1);\n\t\tobjects.add(tank2);\n\t\tground = new Groundmod2((int) (Math.random() * 4));\n\t\tturn = Turn.PLAYER1;\n\t\tgrabFocus();\n\t}",
"void startClipJump();",
"private void initPlayModeController() {\n playMode.setOnMouseClicked(event -> {\n MasterMindMain mm = null;\n try { mm = new MasterMindMain(); }\n catch (Exception e) { e.printStackTrace(); }\n mm.start(SimulatorMain.stage);\n });\n playMode.setOnMouseEntered(event -> { playMode.setGraphic(new Circle(5)); });\n playMode.setOnMouseExited(event -> { playMode.setGraphic(null); });\n }",
"public void start(){\n isRunning = true;\n\n // This is where the magic happens\n Thread loop = new Thread(){\n\t\t\tpublic void run(){\n\t\t final double targetHertz = 30; // target updates per second\n\t\t final double updateTime = 1e9 / targetHertz; // target time between updates\n\t\t final int maxUpdates = 5; // max updates before a render is forced\n\t\t \n\t\t final double targetFps = 60; // target frames per second (fps)\n\t\t final double renderTime = 1e9 / targetFps; // target time between renders\n\t\t \n\t\t double lastUpdate = System.nanoTime();\n\t\t double lastRender = System.nanoTime();\n\n\t\t while (isRunning){\n\t\t \tdouble now = System.nanoTime();\n\t\t \t\n\t\t \tint updates = 0;\n\t\t \twhile (now - lastUpdate > updateTime && updates < maxUpdates){ // Update the game as much as possible before drawing\n\t\t \t\tgamePanel.update();\n\t\t \t\tlastUpdate += updateTime;\n\t\t \t\tupdates++;\n\t\t \t}\n\t\t \t\n\t\t \tif (now - lastUpdate > updateTime){ // Compensate for really long updates\n\t\t \t\tlastUpdate = now - updateTime;\n\t\t \t}\n\t\t \t\n\t\t \t// Draw the game\n\t\t \tgamePanel.repaint();\n\t\t \tlastRender = now;\n\t\t \t\n\t\t \t// kill some time until next draw\n\t\t \t\n\t\t \twhile (now - lastRender < renderTime && now - lastUpdate < updateTime){\n\t\t \t\tThread.yield();\n\t\t \t\t\n\t\t \t\ttry { Thread.sleep(1);} catch (Exception e) { }\n\t\t \t\t\n\t\t \t\tnow = System.nanoTime();\n\t\t \t}\n\t\t }\n\t\t\t}\n\t\t};\n\t\tloop.start();\n }",
"@Override\n\tpublic void gameStarted() {\n\t\tupdatePosition(0,0,0);\n//\t\tstartSendingPositionsThread();\n\t}",
"public void start(){\n\t\tthis.timer.start();\n\t\t\n\t\t/*this.BGM.play();\t//make it play once we have the background after the game start\n\t\tthis.BGM.loop(1);\t//make it loop constantly\n\t\t\n\t\t//once we start the BGM, start calculating the time\n\t\t//we minus this.time because if the game is restarted, we want to adjust the time displayed\n\t\t//on the label since the paused time does not account\n\t\tthis.startTime = System.nanoTime() - this.time;\t//in nanoTime*/\n\t\t\n\t\tthis.stop = false;\n\t}",
"public void run() {\n gf = addGameFrame(\"Pacman\", displayW, displayH);\n }",
"public void sampleDemo()\n {\n // sample demo\n machine.resetMachine();\n \n PinballObject obj1 = new Pinball1(50, 200, -10, 6, Color.RED, 10, machine);\n PinballObject obj2 = new PinballObject(100, 300, 2, 4, Color.BLUE, 55, machine);\n PinballObject obj3 = new PinballObject(450, 125, -2, -2, Color.YELLOW, 40, machine);\n PinballObject obj4 = new PinballObject(100, 200, 4, -4, Color.MAGENTA, 25, machine);\n \n while(machine.getRunning())\n {\n machine.pauseMachine(); // small delay\n obj1.move();\n obj2.move();\n obj3.move();\n obj4.move();\n }\n }",
"void start() {\n myGameOver = false;\n myDisplay.setCurrent(this);\n repaint();\n }",
"void moveToStart();",
"public void act() \n {\n // Add your action code here.\n /*\n if ( pixelsMoved >= 20 )\n {\n moving = false;\n pixelsMoved = 0;\n }\n */\n if ( moving )\n {\n move(1);\n pixelsMoved++;\n \n if ( pixelsMoved >= 20 )\n {\n setMoving( false );\n }\n }\n }",
"private void startSpawning()\n {\n MAUtils.setSpawnFlags(plugin, world, 1, allowMonsters, allowAnimals);\n \n // Start the spawnThread.\n spawnThread = new MASpawnThread(plugin, this);\n spawnTaskId = Bukkit.getServer().getScheduler().scheduleSyncRepeatingTask(plugin, spawnThread, waveDelay, (!waveClear) ? waveInterval : 60);\n }",
"public void start(){\r\n\t\tcantStop.getGameBoard().startNewTurn();\r\n\t\tallowNewRoll();\r\n\t}",
"public void start() {\n enemyTimeline.play();\n }",
"public void start(){\n\t\tthis.lastUpdate = System.currentTimeMillis();\n\t\tthis.millisIntoFrame=0;\n\t\tthis.currentFrame=0;\n\t}",
"public void act() \n {\n movement();\n }",
"private void startMapCreater() {\n\t\tNavigator navi = new Navigator(pilot);\n\t\tnavi.addWaypoint(0,0);\n\t\tnavi.addWaypoint(0,5000);\n\t\tBehavior forward = new Forward(navi);\n\t\tBehavior ultrasonic = new UltrasonicSensor(ultrasonicSensorAdaptor,pilot, sonicWheel,dis,dos,navi);\n\t\tBehavior stopEverything = new StopRobot(Button.ESCAPE);\n\t\tBehavior[] behaiverArray = {forward, ultrasonic, stopEverything};\n\t\tarb = new Arbitrator(behaiverArray);\n\t\t\n\t arb.go();\n\t\t\n\t}",
"public void incrementPoints(){\n nbPointsMap++;\n if(getNbPointsMap()==getNbPointsMapMax()){\n ConclusionPacman conclusion = new ConclusionPacman(stage,true,nbPoints.get(), this);\n }\n }",
"public void starteSpiel(ActionEvent actionEvent) {\n System.out.println(\"Started\");\n //https://www.programcreek.com/java-api-examples/?api=javafx.animation.AnimationTimer\n //60 fps\n new AnimationTimer() {\n public void handle(long currentNanoTime) {\n // calculate time since last update.\n moveBall();\n }\n }.start(); // Was diese?\n\n\n }",
"public void movement()\n\t{\n\t\tballoonY = balloonY + speedBalloonY1;\n\t\tif(balloonY > 700)\n\t\t{\n\t\t\tballoonY = -50;\n\t\t\tballoonX = (gen.nextInt(900)-75);\n\t\t}\n\t\tballoon2Y = balloon2Y + speedBalloonY2;\n\t\tif(balloon2Y > 700)\n\t\t{\n\t\t\tballoon2Y = -50;\n\t\t\tballoon2X = (gen.nextInt(900)-75);\n\t\t}\n\t\tballoon3Y = balloon3Y + speedBalloonY3;\n\t\tif(balloon3Y > 700)\n\t\t{\n\t\t\tballoon3Y = -50;\n\t\t\tballoon3X = (gen.nextInt(900)-75);\n\t\t}\n\t\tballoon4Y = balloon4Y + speedBalloonY4;\n\t\tif(balloon4Y > 700)\n\t\t{\n\t\t\tballoon4Y = -50;\n\t\t\tballoon4X = (gen.nextInt(900)-75);\n\t\t}\n\t\t\n\t\tballoon5Y = balloon5Y + speedBalloonY5;\n\t\tif(balloon5Y > 700)\n\t\t{\n\t\t\tballoon5Y = -50;\n\t\t\tballoon5X = (gen.nextInt(900)-75);\n\t\t}\n\t}",
"private void initialSetup() {\n\t\tcaretTimer = new Timeline(new KeyFrame(Duration.millis(GlobalAppSettings.caretBlinkRate), new EventHandler<ActionEvent>(){\r\n\t\t\t@Override\r\n\t\t public void handle(ActionEvent event) {\r\n\t\t\t\tisCaretVisible = !isCaretVisible;\t\t\t\t\r\n\t\t\t\tif(caretParagraph!= null && caretIndex == anchor) {\r\n\t\t\t\t\ttextModifyFacade.getLineViewWithIndex(caretIndex).getColumnView().getDocumentView().refreshOverlay();\r\n\t\t\t\t}\r\n\t\t }\r\n\t\t}));\r\n\t\tcaretTimer.setCycleCount(-1);\r\n\t\tcaretTimer.play();\r\n\t\t\r\n\t\tcaretMovementTimer = new Timeline(new KeyFrame(Duration.millis(GlobalAppSettings.fastDeviceFrameMillis), new EventHandler<ActionEvent>(){\r\n\t\t\t@Override\r\n\t\t public void handle(ActionEvent event) {\r\n\t\t\t\ttotalDestination += GlobalAppSettings.fastDeviceFrameMillis;\r\n\t\t\t\tscreenX = interpolation.apply(startX, destinationX, totalDestination / GlobalAppSettings.caretMovementTime);\r\n\t\t\t\tscreenY = interpolation.apply(startY, destinationY, totalDestination / GlobalAppSettings.caretMovementTime);\r\n\t\t\t\tif(totalDestination > GlobalAppSettings.caretMovementTime){\r\n\t\t\t\t\tscreenX = destinationX;\r\n\t\t\t\t\tscreenY = destinationY;\r\n\t\t\t\t\tcaretMovementTimer.stop();\r\n\t\t\t\t\ttotalDestination = 0;\r\n\t\t\t\t}\r\n\t\t\t\tif(caretParagraph!= null && caretIndex == anchor) {\r\n\t\t\t\t\ttextModifyFacade.getLineViewWithIndex(caretIndex).getColumnView().getDocumentView().refreshOverlay();\r\n\t\t\t\t}\r\n\t\t }\r\n\t\t}));\r\n\t\tcaretMovementTimer.setCycleCount(-1);\r\n\t\t\r\n\t\tcaretIndex = 0;\r\n\t\tanchor = 0;\r\n\t}",
"public void act() \n {\n \n checkKey();\n platformAbove();\n \n animationCounter++;\n checkFall();\n }",
"public void start() {\n\t\tThread start = new Thread(){\n\t\t\tpublic void run(){\n\t\t\t\t//mientras Alive sea= true va a ejecutar el hilo\n\t\t\t\twhile(_alive){\n\t\t\t\ttry {\n\t\t\t\t\tThread.sleep(1000);\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\t/**\n\t\t\t\t * Variable temporal que va a ser igual a la posicion actual en X+1 pixel que avanza\n\t\t\t\t * Si se pasa del máximo permitido se detiene el hilo\n\t\t\t\t */\n\t\t\t\tint temp_x = _pos_X + velocidad_X;\n\t\t\t\tif(temp_x < max_PosX && temp_x > min_PosX){\n\t\t\t\t\tsetChange();\n\t\t\t\t\t_pos_X = temp_x;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\telse{\n\t\t\t\t\t_alive = false;\n\t\t\t\t}\n\t\t\t\t/**\n\t\t\t\t * Variable temporal que va a ser igual a la posicion actual en Y+1 pixel que avanza\n\t\t\t\t * Si se pasa del máximo permitido se detiene el hilo\n\t\t\t\t */\n\t\t\t\tint temp_y = _pos_Y + velocidad_Y;\n\t\t\t\tif (temp_y > max_PosY && temp_y <min_PosY){\n\t\t\t\t\t_pos_Y = temp_y;\n\t\t\t\t\tsetChange();\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t_alive = false;\n\t\t\t\t}\n\t\t\t\t\n\n\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t};\n\t\t//Inicia el hilo\n\t\tstart.start();\n\t\t\n\t}",
"public abstract void startTape();",
"public void act(){\n if (alive) {\n x = x + vx * dt;\n vx = vx * (1. - daempfung); //Luftwiderstand, eventuell muss dass nur in der Spielerklasse implementiert\n //werden, damit die Pilze nicht abgebremst werden.\n if (bewegung == Bewegung.fallen) {\n y = y + vy * dt;\n vy = vy + g * dt;\n }\n }\n }",
"public void basicMotion() {\r\n\t\tPVector v = behavior.behavior(obj.getMotion());\r\n\t\tobj.getMotion().setVelocity(v);\r\n\t\t\r\n\t\tobj.getMotion().kinematicUpdate();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tfloat x = obj.getMotion().getPosition().x;\r\n\t\tfloat y = obj.getMotion().getPosition().y;\r\n\t\tif(y <= turnCornerMin ) {\r\n\t\t\tbehavior.setDest(turnCornerMax,turnCornerMin);\r\n\t\t\t\t\r\n\t\t}\r\n\t\tif(x >= turnCornerMax) {\r\n\t\t\tbehavior.setDest(turnCornerMax, turnCornerMax);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tif(y >= turnCornerMax) {\r\n\t\t\tbehavior.setDest(turnCornerMin, turnCornerMax);\r\n\t\t}\r\n\t\t\r\n\t\tif(x < turnCornerMin) {\r\n\t\t\treturn;\r\n\t\t\t\r\n\t\t}\r\n\t\t\t\r\n\t\tobj.updateObjKinematics(x, y, obj.getMotion().getOrientation());\r\n\t}",
"private void startGame() {\r\n\t\tthis.gameMap.startGame();\r\n\t}",
"private void init() {\n\t\tcircle.init();\n\n\t\tcircle.startCircle();\n\t\tboard.startUpdating();\n\t}",
"public void plan()\n {\n turnRight();\n while(isFrontClear())\n {\n while(isBrainHere()) {\n takeBrain();\n }\n move();\n }\n \n if (isBrainHere()) {\n takeBrain();\n }\n \n turnRight();\n if (!isFrontClear()) {\n turnAround();\n }\n \n goCenter();\n \n turnAround();\n move();\n win();\n }",
"private void pointWalkBehavior() {\n\t\tif (moving) {\n\t\t\tif (remainingSteps > 0) {\n\t\t\t\tupdatePixels(action);\n\t\t\t\tremainingSteps -= speed;\n\t\t\t} else {\n\t\t\t\tupdateCoordinate(action, false);\n\t\t\t\tif (coordX != endPoint.x || coordY != endPoint.y) {\n\t\t\t\t\tif (validMoveEh(action)) {\n\t\t\t\t\t\tremainingSteps = STEP_SIZE;\n\t\t\t\t\t\tupdateCoordinate(action, true);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmoving = false;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tcurrentImage = stopAnimation(action);\n\t\t\t\t\tpointWalking = false;\n\t\t\t\t\tmoving = false;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tif (validMoveEh(action)) {\n\t\t\t\tmoving = true;\n\t\t\t\tremainingSteps = STEP_SIZE;\n\t\t\t\tupdateCoordinate(action, true);\n\t\t\t\tcurrentImage = startAnimation(action);\n\t\t\t}\n\t\t}\n\t}",
"private void initParameters(Canvas canvas) {\n hasInitialized = true;\n Random random = new Random();\n int unitY = canvas.getHeight() / 4;\n int x1 = 0;\n if (random.nextBoolean()) {\n x1 = canvas.getWidth();\n this.moveTo(random.nextInt(canvas.getWidth() / 4) + canvas.getWidth() / 4, -getHeight());\n } else {\n this.moveTo(random.nextInt(canvas.getWidth() / 4) + canvas.getWidth() / 2, -getHeight());\n }\n int x2 = canvas.getWidth() - x1;\n int x3 = x1;\n int y1 = random.nextInt(unitY) + unitY;\n int y2 = y1 + unitY;\n int y3 = y1 + 3 * unitY;\n\n m1 = computeMovement((int) getX(), (int) getY(), x1, y1);\n m2 = computeMovement(x1, y1, x2, y2);\n m3 = computeMovement(x2, y2, x3, y3);\n }",
"private void start(){\n character.fillEnergy();\n piles.getDrawPile().shuffle();\n for(int i = 1 ; i <= 5 ; i++ ){\n piles.drawCard();\n }\n effectHandler.startFight();\n\n }",
"public void start()\n {\n animator = new Thread(this);\n animator.start();\n }",
"void startAnimation();",
"@Override\n public void start() {\n runtime.reset();\n\n telemetry.addData(\"Instructions:\", \"To increase or decrease the shooter speed, use A button to decrease\" +\n \"speed and B button to increase speed. Use the right and left bumper to control the intake. To change \" +\n \"the intake speed, use d-pad down to decrease the speed and dpad up to increase the speed. The normal driving \" +\n \"should work as normal. Both speeds are initialized to .5, and you should be able to read that in the telemetry \" +\n \"once you start the program :) buena suerte\");\n telemetry.update();\n }",
"public void startGame() {\n\t\tgameStart = true;\n\t\tfor(int i = 0; i < 5; i++) {\n\t\t\tenemys[i] = new Enemy(1 + (-i * 164), 192, pacman, 64, 64, 2.5, 0.0, 50);\n\t\t}\n\t\tfor(int i = 2; i < 10; i++) {\n\t\t\tenemys[i] = new Enemy(-100 + (-i * 164), 192, msPacman, 64, 64, 2.5, 0.0, 75);\n\t\t}\n\t\t\n\t\trepaint();\n\t}",
"private void startGame() {\n gameCountDownTimer = getGameTimer();\n gameCountDownTimer.start();\n animateBalloonView(balloon1, true);\n animateBalloonView(balloon2, true);\n animateBalloonView(balloon3, true);\n animateBalloonView(balloon4, true);\n animateBalloonView(balloon5, true);\n currentScreenGameState = GameState.PLAYING;\n String controlButtonTitle = getResources().getString(R.string.pause_btn);\n conttroler.setText(controlButtonTitle);\n setCurrentScreenCover();\n invalidateOptionsMenu();\n }",
"private void movementPhase() {\n ClickObserver.getInstance().setCreatureFlag(\"\");\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n GUI.getDoneButton().setDisable(false);\n TheCupGUI.update();\n Board.removeCovers();\n }\n });\n for (Player p : playerList) {\n \tplayer = p;\n player.flipAllUp();\n\t ClickObserver.getInstance().setActivePlayer(player);\n\t ClickObserver.getInstance().setCreatureFlag(\"Movement: SelectMovers\");\n\t InfoPanel.uncover(player.getName());\n\t if (p.getHexesWithPiece().size() > 0) {\n\t \tClickObserver.getInstance().setClickedTerrain(p.getHexesWithPiece().get(0));\n\t }\n\t pause();\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n \tClickObserver.getInstance().whenTerrainClicked();\n \t GUI.getHelpText().setText(\"Movement Phase: \" + player.getName()\n + \", Move your armies\");\n \t Game.getRackGui().setOwner(player);\n }\n });\n\t \n\t while (isPaused) {\n \ttry { Thread.sleep(100); } catch( Exception e ){ return; } \n\t }\n\t InfoPanel.cover(player.getName());\n player.flipAllDown();\n }\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n GUI.getDoneButton().setDisable(true);\n }\n });\n ClickObserver.getInstance().setCreatureFlag(\"\");\n }",
"public Jump() {\n try {\n myCanvas = new JumpCanvas(this);\n myCanvas.addCommand(myExitCommand);\n myCanvas.addCommand(myMusicCommand);\n myCanvas.addCommand(myPauseCommand);\n myCanvas.setCommandListener(this);\n } catch (Exception e) {\n errorMsg(e);\n }\n }",
"public void startTurn() {\n nMovesBeforeGrabbing = 1;\n nMovesBeforeShooting = 0;\n\n if (damages.size() > 2)\n nMovesBeforeGrabbing = 2;\n\n if (damages.size() > 5)\n nMovesBeforeShooting = 1;\n\n playerStatus.isActive = true;\n }",
"public void startExecuting() {\n\t\t\tRandom random = this.parentEntity.getRNG();\n\t\t\tdouble d0 = this.parentEntity.posX + (double)((random.nextFloat() * 2.0F - 1.0F) * 16.0F);\n\t\t\tdouble d1 = this.parentEntity.posY + (double)((random.nextFloat() * 2.0F - 1.0F) * 16.0F);\n\t\t\tdouble d2 = this.parentEntity.posZ + (double)((random.nextFloat() * 2.0F - 1.0F) * 16.0F);\n\t\t\tthis.parentEntity.getMoveHelper().setMoveTo(d0, d1, d2, 0.3D);\n\t\t}",
"@Override\n public void init_loop() {\n hookPosDeg = HOOK_UP;\n clawPosDeg = CLAW_OPEN;\n hookPos = map(hookPosDeg, HOOK_MIN_POS_DEG, HOOK_MAX_POS_DEG, HOOK_MIN_POS, HOOK_MAX_POS);\n clawPos = map(clawPosDeg, CLAW_MIN_POS_DEG, CLAW_MAX_POS_DEG, CLAW_MIN_POS, CLAW_MAX_POS);\n hook.setPosition(hookPos);\n claw.setPosition(clawPos);\n\n// armTarget = ARM_CENTER;\n// arm.setTargetPosition(armTarget);\n// arm.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n// arm.setPower(.3);\n }",
"@Override\n public void movement() {\n if (isAlive()) {\n //Prüfung ob A oder die linke Pfeiltaste gedrückt ist\n if (Keyboard.isKeyDown(KeyEvent.VK_LEFT) || Keyboard.isKeyDown(KeyEvent.VK_A)) {\n //Änder die X Position um den speed wert nach link (verkleinert sie)\n setPosX(getPosX() - getSpeed());\n //Prüft ob der Spieler den linken Rand des Fensters erreicht hat\n if (getPosX() <= 0) {\n //Setzt die X Position des Spielers an den Rand des Fensters zurück\n setPosX(0);\n }\n }\n //Prüfung ob D oder die rechte Pfeiltaste gedrückt ist\n if (Keyboard.isKeyDown(KeyEvent.VK_RIGHT) || Keyboard.isKeyDown(KeyEvent.VK_D)) {\n //Änder die X Position um den speed wert nach rechts (vergrößert sie)\n setPosX(getPosX() + getSpeed());\n //Prüft ob der Spieler den rechten Rand des Fensters erreicht hat\n if (getPosX() >= Renderer.getWindowSizeX() - getWight() - 7) {\n //Setzt die X Position des Spielers an den Rand des Fensters zurück\n setPosX(Renderer.getWindowSizeX() - getWight() - 7);\n }\n }\n //Aktualsiert die Hitbox\n setBounds();\n }\n }",
"public void startGame() {\r\n this.setupGame();\r\n }",
"public JPanelStartMafiaGame() {\n initComponents();\n\n }",
"@Override\n public void start() {\n this.mob.getNavigation().startMovingTo(\n this.mob.getPositionTarget().getX(),\n this.mob.getPositionTarget().getY(),\n this.mob.getPositionTarget().getZ(),\n this.speed\n );\n }",
"public void startGame() {\n\t\tif (chordImpl.getPredecessorID().compareTo(chordImpl.getID()) > 0) {\n\t\t\tGUIMessageQueue.getInstance().addMessage(\"I Start!\");\n\t\t\tshoot();\n\t\t}\n\t}",
"public void ghostMovementController() {\n TimerTask taskScapeGhost = new TimerTask() {\n @Override\n public void run() {\n if (!pacman.isEatable()) {\n for (Ghost ghost : ghosts) {\n //ruta de escape\n if (ghost.doesExist()) {\n ghost.searchRouteGhost(pacman);\n }\n seconds++;\n }\n repaint();\n }\n if (seconds > TIME_TO_CHANGE_GHOST) {\n pacman.setEatable();\n for (Ghost ghost : ghosts) {\n //ruta de escape\n if (ghost.doesExist()) {\n ghost.setEatable(false);\n }\n }\n }\n }\n };\n TimerTask task = new TimerTask() {\n @Override\n public void run() {\n if (pacman.isEatable()) {\n for (Ghost ghost : ghosts) {\n if (ghost.doesExist()) {\n ghost.searchRouteGhost(pacman);\n }\n }\n repaint();\n } else {\n for (Ghost ghost : ghosts) {\n if (!ghost.doesExist()) {\n ghost.setEatable(false);\n ghost.live();\n ghost.searchRouteGhost(pacman);\n }\n }\n repaint();\n }\n }\n };\n timer.schedule(taskScapeGhost, DELAY_TIMER, PERIOD_TIMER_GHOST);\n timer.schedule(task, DELAY_TIMER, PERIOD_TIMER);\n }",
"public void act() \n {\n\n if(isTouching(Car.class))\n {\n Lap = Lap + 1;\n if ((Lap % 11) == 0)\n {\n String lap = Integer.toString(Lap / 11);\n\n getWorld().showText(lap, 450, 30);\n getWorld().showText(\"Lap:\", 400, 30);\n }\n } \n if (Lap == 47)\n {\n Greenfoot.stop();\n getWorld().showText(\"GameOver\",250,250);\n }\n }",
"public void onStart() {\n super.onStart();\n this.mZxingview.startCamera();\n this.mZxingview.startSpotAndShowRect();\n }",
"public void start(){\n //Set pausing to false\n pausing = false;\n next();\n }",
"protected void execute() {\n \tshooterWheel.shooterWheelSpeedControllerAft.Pause();\n \tshooterWheel.shooterWheelSpeedControllerFwd.Pause();\n \t\n }",
"private void setupGame() {\n \tdrawBricks();\n \tdrawPaddle();\n \tdrawBall(); \t\n \tsetInitialBallVelocity();\n }",
"public void act() \n {\n World myWorld = getWorld();\n \n Mapa mapa = (Mapa)myWorld;\n \n EnergiaMedicZ vidaMZ = mapa.getEnergiaMedicZ();\n \n EnergiaGuerriZ vidaGZ = mapa.getEnergiaGuerriZ();\n \n EnergiaConstrucZ vidaCZ = mapa.getEnergiaConstrucZ();\n \n GasZerg gasZ = mapa.getGasZerg();\n \n CristalZerg cristalZ = mapa.getCristalZerg();\n \n BunkerZerg bunkerZ = mapa.getBunkerZerg();\n \n Mina1 mina1 = mapa.getMina1();\n Mina2 mina2 = mapa.getMina2();\n Mina3 mina3 = mapa.getMina3();\n \n \n //movimiento del personaje\n if(Greenfoot.isKeyDown(\"b\")){\n if(Greenfoot.isKeyDown(\"d\")){\n if(getX()<1000){\n setLocation(getX()+1,getY());\n }\n }\n if(Greenfoot.isKeyDown(\"a\")){\n if(getX()<1000){\n setLocation(getX()-1,getY());\n }\n }\n if(Greenfoot.isKeyDown(\"w\")){\n if(getY()<600){\n setLocation(getX(),getY()-1);\n }\n }\n if(Greenfoot.isKeyDown(\"s\")){\n if(getY()<600){\n setLocation(getX(),getY()+1);}\n }\n }\n else if(Greenfoot.isKeyDown(\"z\")){\n if(Greenfoot.isKeyDown(\"d\")){\n if(getX()<1000){\n setLocation(getX()+1,getY());\n }\n }\n if(Greenfoot.isKeyDown(\"a\")){\n if(getX()<1000){\n setLocation(getX()-1,getY());\n }\n }\n if(Greenfoot.isKeyDown(\"w\")){\n if(getY()<600){\n setLocation(getX(),getY()-1);\n }\n }\n if(Greenfoot.isKeyDown(\"s\")){\n if(getY()<600){\n setLocation(getX(),getY()+1);}\n }}\n //encuentro con objeto\n \n if(isTouching(Arbol.class) && Greenfoot.isKeyDown(\"d\"))\n {\n setLocation(getX()-1,getY());\n }\n if(isTouching(Arbol.class) && Greenfoot.isKeyDown(\"a\"))\n {\n setLocation(getX()+1,getY());\n }\n if(isTouching(Arbol.class) && Greenfoot.isKeyDown(\"w\"))\n {\n setLocation(getX(),getY()+1);\n }\n if(isTouching(Arbol.class) && Greenfoot.isKeyDown(\"s\"))\n {\n setLocation(getX(),getY()-1);\n }\n \n \n //probabilida de daño al enemigo\n \n if(isTouching(MedicTerran.class) && Greenfoot.getRandomNumber(100)==3)\n {\n \n vidaCZ.removervidaCZ();\n \n }\n \n if(isTouching(ConstructorTerran.class) && (Greenfoot.getRandomNumber(100)==3 ||\n Greenfoot.getRandomNumber(100)==2||Greenfoot.getRandomNumber(100)==1))\n {\n \n vidaCZ.removervidaCZ();\n \n }\n if(isTouching(GuerreroTerran.class) && (Greenfoot.getRandomNumber(100)==3||\n Greenfoot.getRandomNumber(100)==2||Greenfoot.getRandomNumber(100)==1||Greenfoot.getRandomNumber(100)==4||Greenfoot.getRandomNumber(100)==5))\n {\n \n vidaCZ.removervidaCZ();\n \n }\n \n \n \n //encuentro con Bunker\n \n \n if(isTouching(BunkerMedicoZ.class)&& Greenfoot.isKeyDown(\"d\"))\n {\n setLocation(getX()-1,getY());\n }\n \n if(isTouching(BunkerMedicoZ.class)&& Greenfoot.isKeyDown(\"a\"))\n {\n setLocation(getX()+1,getY());\n }\n \n if(isTouching(BunkerMedicoZ.class)&& Greenfoot.isKeyDown(\"w\"))\n {\n setLocation(getX(),getY()+1);\n }\n \n if(isTouching(BunkerMedicoZ.class)&& Greenfoot.isKeyDown(\"s\"))\n \n {\n setLocation(getX(),getY()-1);\n }\n \n //AccionesUnicas\n \n if(isTouching(YacimientoDeGas.class) && gasZ.gasZ < 100)\n {\n \n gasZ.addGasZ();\n \n }\n \n \n if(isTouching(Mina1.class) && cristalZ.cristalZ < 20) {\n \n cristalZ.addCristalZ();\n mina1.removemina1();\n \n }\n \n if(isTouching(Mina2.class) && cristalZ.cristalZ < 20) {\n \n cristalZ.addCristalZ();\n mina2.removemina2();\n \n }\n \n if(isTouching(Mina3.class) && cristalZ.cristalZ < 20) {\n \n cristalZ.addCristalZ();\n mina3.removemina3();\n \n }\n \n \n if(isTouching(DepositoZ.class) && gasZ.gasZ > 4 && bunkerZ.bunkerZ() < 400){\n \n gasZ.removeGasZ();\n bunkerZ.addbunkerZ();\n }\n \n if(isTouching(DepositoZ.class) && cristalZ.cristalZ() > 0 && bunkerZ.bunkerZ() < 400 ){\n \n cristalZ.removeCristalZ();\n bunkerZ.addbunkerZ();\n }\n \n //determinar si la vida llega a 0\n \n if( vidaCZ.vidaCZ <= 0 )\n {\n \n getWorld().removeObjects(getWorld().getObjects(EnergiaConstrucZ.class)); \n \n getWorld().removeObjects(getWorld().getObjects(ConstructorZerg.class));\n \n EnergiaZerg energiaZ = mapa.getEnergiaZerg(); \n \n energiaZ.removenergiaCZ();\n }\n \n if( mina1.mina1() == 0 ){\n \n getWorld().removeObjects(getWorld().getObjects(Mina1.class)); \n \n getWorld().removeObjects(getWorld().getObjects(Cristal1.class));\n \n }\n \n if( mina2.mina2() == 0 ){\n \n getWorld().removeObjects(getWorld().getObjects(Mina2.class)); \n \n getWorld().removeObjects(getWorld().getObjects(Cristal2.class));\n \n }\n \n if( mina3.mina3() == 0 ){\n \n getWorld().removeObjects(getWorld().getObjects(Mina3.class)); \n \n getWorld().removeObjects(getWorld().getObjects(Cristal3.class));\n \n }\n \n \n}",
"@Override\n public void startExecuting()\n {\n this.entity.getNavigator().tryMoveToXYZ(this.xPosition, this.yPosition, this.zPosition, this.speed);\n }",
"@Override\n public void start() {\n\n runtime.reset();\n currentSpeedRight = 0.0;\n currentSpeedLeft = 0.0;\n // currentSpeedArm = 0.0;\n currentLiftSpeed = 0.0;\n robot.rearTouch.setMode(DigitalChannel.Mode.INPUT);\n }",
"public void startAnimation() {\n animationStart = System.currentTimeMillis();\n }",
"public static void spielstart() {\n\n\t\tThread thread = new Thread() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tgameboard = new GameFrame();\n\n\t\t\t}\n\t\t};\n\n\t\tthread.start();\n\n\t}",
"@Override\n public void next(){\n balls.translate();\n majGui();\n }",
"public void act() \n {\n setLocation(getX() + Hur_Speed, getY());\n }",
"public void start() {\n\tanimator = new Thread(this);\n\tanimator.setName(\"erly_boid:::swarm intelligence\");\n\terlang =new Thread(co);\n\terlang.start();\n\tanimator.start();\n \n \n \t\n }",
"public void startGame(){\n\n\t\tGame.updatePlayer(players.get(curr));\n\t\tGameBoard gb = new GameBoard();\n\t\tthis.registerObserver(gb);\n\t\tgb.update(this, board);\n\n\t}",
"void startUpdate();",
"private void start() {\n GameStateManager gameStateManager = new GameStateManager();\n JPanel jPanel = gameStateManager.getGameState().getJPanel();\n jPanel.setVisible(true);\n GUI gui = GUI.getInstance();\n gui.setjPanel(jPanel);\n gui.addKeyListener(gameStateManager);\n GameStateObserver gameStateObserver = new GameStateObserver(gameStateManager,gui);\n gameStateManager.addObserver(gameStateObserver);\n }",
"public void draw_Pacman(boolean b) {\n if (b) {\n mazeEditor.mazeDrawMode = DRAW_PACMAN_START_TILE;\n\n Tog1.setState(false); \n Tog2.setState(false); \n Tog3.setState(false); \n Tog4.setState(false);\n Tog6.setState(false);\n Tog7.setState(false);\n }\n }",
"public void OnStart(){\n\t\t//create the random space background and put its priority behind everything else\n\t\tswitch ((int) (Math.random() * 3)){\n\t\t\tcase 0:\n\t\t\t\tbackground = new Background(R.drawable.spaceback_med,new Point(0,0),-1);\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tbackground = new Background(R.drawable.spaceback_asteroids,new Point(0,0),-1);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tbackground = new Background(R.drawable.spaceback_nebula,new Point(0,0),-1);\n\t\t\t\tbreak;\n\t\t}\n\t\t//generate asteroids\n\t\tinitAsteroids((int)(Math.random()*3));\n\t\t//create a border for the background (draw on top)\n\t\tnew Border(background,1000);\n\t\t//create the player\n\t\tplayer = new Player(new Point(-300,300), 1);\n\t\t//create a target reticule for the player\n\t\ttarget = new Target(player);\n\t\t\n\t\t//load sounds\n\t\tGameState.State().LoadSound(R.raw.shoot, \"shoot\");\n\t\tGameState.State().LoadSound(R.raw.accelerate, \"accelerate\");\n\t\tGameState.State().LoadSound(R.raw.engine, \"engine\");\n\t\tGameState.State().LoadSound(R.raw.explosion, \"explosion\");\n\t\tGameState.State().LoadSound(R.raw.death, \"death\");\n\t\t\n\t\thasStarted = true;\n\t\t\n\t\trespawnCount = 0.0f;\n\t\trespawnTime = 4f;\n\t}",
"private PacMan initPacMan() {\r\n PacMan pacMan = new PacMan(new Point(384, 256), Constants.NORMAL_SPEED, Constants.LEFT);\r\n addListener(Constants.PACMAN, pacMan);\r\n return pacMan;\r\n }",
"private void moveBall() {\n\t\tball.move(vx,vy);\n\t\tpause(10);\t\n\t\t\n\t}",
"protected void initialize() {\n\t\tpid.setSetpoint((goalRotation + Robot.imu.getHeading() + 360) % 360);\n\t\tpid.enable();\n\t}",
"public void start()\r\n\t{\r\n\t\t//build scene\r\n\t\tsetupWorld();\r\n\t \r\n\t\t//setup interfae\r\n\t RightClickMenuListener rightClickMenuListener = new RightClickMenuListener();\r\n\t\trightClickMenu = new JPopupMenu();\r\n\t\tJMenuItem menuItem = new JMenuItem(\"Delete Node\");\r\n\t menuItem.addActionListener(this);\r\n\t rightClickMenu.add(menuItem);\r\n\t \r\n\t this.addMouseListener(rightClickMenuListener);\r\n\t\tthis.addMouseListener(this);\r\n\t this.addMouseMotionListener(this);\r\n\t\tthis.addKeyListener(this);\r\n\t\tthis.setFocusable(true);\r\n\t\tthis.requestFocus();\r\n\t\t\r\n\t\t\r\n\t\t//start the game loop\r\n\t\tint delay = 16;//16ms = 60fps\r\n\t\tlastTime = System.nanoTime();\r\n\t\twhile(GameVars.isRunning)\r\n\t\t{\r\n\t\t\t//update fps once per second\r\n\t\t\t//http://stackoverflow.com/a/20769932 for fps counter\r\n\t\t\tif(System.nanoTime()-lastTime > 1000000000)\r\n\t\t\t{\r\n\t\t\t\tfps = (int)(fpsCounter*1000000000./(System.nanoTime() - lastTime));\r\n\t\t\t\tlastTime = System.nanoTime();\r\n\t\t\t\tfpsCounter = 0;\r\n\t\t\t\t//delay = (int)(1000./fps - 1.);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//delay simulation to set fps\r\n\t\t\ttry {\r\n\t\t\t\tThread.sleep(delay);\r\n\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//update motion and interactions\r\n\t\t\tupdateMotion();\r\n\t\t\tcheckForCollisions();\r\n\t\t\t//aSquare.checkForInteractions();\r\n\t\t\t\t\r\n\t\t\tfor(Person p:people)\r\n\t\t\t\tp.updatePhysics();\r\n\t\t\t\r\n\t\t\t//redraw image each frame\r\n\t\t\tthis.repaint();\r\n\t\t}\r\n\t}"
]
| [
"0.63544625",
"0.6161291",
"0.61014396",
"0.60750127",
"0.60451996",
"0.6004923",
"0.6000418",
"0.59943503",
"0.5989276",
"0.59833586",
"0.592693",
"0.5923949",
"0.59160244",
"0.5908619",
"0.58605206",
"0.584057",
"0.58358544",
"0.58257914",
"0.5808569",
"0.579584",
"0.57921576",
"0.5790764",
"0.5789187",
"0.57867473",
"0.5764048",
"0.5753474",
"0.57349426",
"0.5726564",
"0.57090586",
"0.5704309",
"0.57033324",
"0.5691155",
"0.569055",
"0.56797016",
"0.56776",
"0.56763446",
"0.5667293",
"0.56468666",
"0.5625844",
"0.56177574",
"0.561277",
"0.56118983",
"0.56051433",
"0.56016165",
"0.5592231",
"0.5590969",
"0.5581792",
"0.5579671",
"0.5579323",
"0.5576072",
"0.55739135",
"0.55705905",
"0.55683804",
"0.5565731",
"0.55596244",
"0.5553581",
"0.55489117",
"0.5540967",
"0.5540167",
"0.5535739",
"0.5534966",
"0.55284816",
"0.552821",
"0.5524656",
"0.5519221",
"0.55178314",
"0.551637",
"0.55120385",
"0.55119437",
"0.5511704",
"0.55092084",
"0.55059624",
"0.55048203",
"0.5503752",
"0.54898024",
"0.5488004",
"0.5487176",
"0.54840857",
"0.5475957",
"0.54728615",
"0.54709744",
"0.5461443",
"0.5459334",
"0.5457403",
"0.5456863",
"0.5453003",
"0.54520565",
"0.5451801",
"0.54479873",
"0.5443152",
"0.54429317",
"0.5439633",
"0.5435868",
"0.54302627",
"0.5430082",
"0.5429317",
"0.5427703",
"0.54218423",
"0.5420011",
"0.54199487"
]
| 0.6803306 | 0 |
/ Method that allow to stop the motion of the pacmans (close their threads) and close the window. | public void stopApplication() {
windowOpened = false;
Platform.exit();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void stop() {\r\n\t\tif (!running)\r\n\t\t\treturn;\r\n\t\trunning = false;\r\n\t\ttry {\r\n\t\t\tthread.join();//ends thread to close program correctly\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.exit(0);//closes canvas\r\n\t\t}\r\n\t}",
"public synchronized void stop() {\n\t\tif (!running)\n\t\t\treturn;\n\t\ttry {\n\t\t\toptions.save();\n\t\t\twindow.dispose();\n\t\t\trunning = false;\n\t\t\tthread.join();\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t\tSystem.exit(1);\n\t}",
"public void closeClick() {\n timeline.stop();\n threadWorker.shutDownExecutor();\n Platform.exit();\n }",
"public void quit()\r\n {\r\n brokerage.logout(this);\r\n myWindow = null;\r\n }",
"@Override\n public void windowClosing(WindowEvent e) {\n new Thread(new Runnable() {\n public void run() {\n pcu.setDone();\n camera.getDriver().cleanUp();\n frame.setVisible(false);\n frame.dispose();\n }\n }).start();\n }",
"@Override\n public void windowClosing(WindowEvent e) {\n new Thread(new Runnable() {\n\n public void run() {\n animator.stop();\n System.exit(0);\n }\n }).start();\n }",
"@Override\n public void windowClosing(WindowEvent e) {\n new Thread(new Runnable() {\n\n public void run() {\n animator.stop();\n System.exit(0);\n }\n }).start();\n }",
"@Override\n public void windowClosing(WindowEvent e) {\n new Thread(new Runnable() {\n\n public void run() {\n animator.stop();\n System.exit(0);\n }\n }).start();\n }",
"@Override\n public void windowClosing(WindowEvent e) {\n new Thread(new Runnable() {\n\n public void run() {\n animator.stop();\n System.exit(0);\n }\n }).start();\n }",
"@Override\n public void windowClosing(WindowEvent e) {\n new Thread() {\n @Override\n public void run() {\n \n if (animator != null && animator.isStarted()) {\n animator.stop();\n }\n if (fpsMonitor != null) { \n fpsMonitor.stop();\n }\n \n try {\n SwingUtilities.invokeAndWait (new Runnable() {\n @Override\n public void run () {\n viewer.dispose ();\n }\n });\n }\n catch (InvocationTargetException e) {\n }\n catch (InterruptedException e) {\n }\n \n closed = true;\n }\n }.start();\n }",
"@Override\n public void windowClosing(WindowEvent e) {\n new Thread(new Runnable() {\n public void run() {\n animator.stop();\n System.exit(0);\n }\n }).start();\n }",
"public void windowClosing(WindowEvent e) {\n new Thread(new Runnable() {\n public void run() {\n animator.stop();\n System.exit(0);\n }\n }).start();\n }",
"public void windowClosing(WindowEvent e) {\n new Thread(new Runnable() {\n public void run() {\n if (animator.isAnimating())\n \t\t animator.stop();\n System.exit(0);\n }\n }).start();\n }",
"public void stop() {\r\n\t\t//If the program has an error this will stop the program\r\n\t\ttry {\r\n\t\t\trunning = false;\r\n\t\t\tg.dispose();\r\n\t\t\tthread.join();\r\n\t\t\tSystem.exit(0);\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public void stopThread(){\r\n\t\tthis.p.destroy();\r\n\t\ttry {\r\n\t\t\tinput.close();\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tthis.stop();\r\n\t}",
"public void closeAllWindow() {\n\t\tthis.dispose();\n\t\tSystem.exit(0);\n\t}",
"@Override\n public void windowClosing(WindowEvent e) {\n new Thread() {\n @Override\n public void run() {\n if (animator.isStarted()) animator.stop();\n System.exit(0);\n }\n }.start();\n }",
"@Override\n public void windowClosing(WindowEvent e) {\n new Thread() {\n @Override\n public void run() {\n if (animator.isStarted()) animator.stop();\n System.exit(0);\n }\n }.start();\n }",
"private void closeMainStage(){\r\n serialConnection.closeSerialConnection();//zamkniecie polaczenai serialowego i wyczyszczenie zasobow\r\n controlThreadRunFlag = false;//zastopowanie wątku kontrolnego\r\n closeAllAutomaticSendThreads(automaticSendThreadArraylist);//zamkniecie wszystkich watkow automatycznej wiadomości\r\n System.gc();//poinformowanie maszyny wirtualnej o usunieciu referencji na nieuzywane obiekty\r\n Platform.exit();//zamkniecie apliakcji - DO ZMIANY !!!!!!!!!!!!!!!!\r\n }",
"private void kill () {\n\t\t/*if (savingDlg != null) savingDlg.dispose();\n\t\tdialog.dispose();*/\n\t\tEngine.kill();\n\t}",
"private void onClose(WindowEvent windowEvent) {\n this.stopSlideshow();\n }",
"public void close()\n {\n\n window.close();\n try\n {\n screen.close();\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n }",
"public static void kill(){\r\n\t\tDisplay.destroy();//create Display\r\n\t\tMouse.destroy();//create Mouse\r\n\t\tKeyboard.destroy();//create Keyboard\r\n\t}",
"public void windowClosing(WindowEvent e) {\n\t\t\t\tif(thread != null && thread.isAlive()) {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tthread.suspend();\r\n\t\t\t\t\t\tthread.interrupt();\r\n\t\t\t\t\t\tthread.stop();\r\n\t\t\t\t\t} catch(Error er) {\r\n\t\t\t\t\t} catch(Exception ex) {}\r\n\t\t\t\t}\r\n\r\n\t\t\t\texample.stop();\r\n\t\t\t\tdispose();\r\n\t\t\t}",
"public synchronized void close() {\n \t\trecallThreads();\n \n \t\tsetSize(0, 0);\n \t\t/* Notify everyone waiting for a thread */\n \t\tnotifyAll();\n \n \t\t// destroy the threadgroup, will never go away otherwise\n \t\ttry {\n \t\t\t// Need to set it to a daemon first otherwise it will not be destroyed\n \t\t\tsetDaemon(true);\n \t\t\tdestroy();\n \t\t} catch (Exception e) {\n \t\t\t// TODO: consider logging\n \t\t}\n \t}",
"private void closeProgram()\n {\n window.close();\n }",
"public void terminate() {\n screen.closeScreen();\n }",
"public void windowClosing(java.awt.event.WindowEvent we) {\n foilboard.stop();\n foilboard.destroy();\n System.exit(0);\n }",
"private void end() {\r\n isRunning = false;\r\n if( mineField.exploder.isRunning() ) mineField.exploder.stop();\r\n if( settingsOpen ) settingsFrame.dispose();\r\n }",
"private void thisWindowClosing()\n {\n // Keep track of the fact that we're in the act of closing this window\n m_bClosing = true;\n\n // Need to explicitly release the focus which in turn will cause any\n // listeners to unregister from this agent (is its still alive).\n // Otherwise our listeners will\n // still be registered and will try to display output in windows that\n // are disposed.\n // This has the potential to deadlock (waiting to issue unregister calls\n // while we're running) so we put\n // it in a separate thread to avoid that.\n Thread clearFocus = new Thread(() -> clearAgentFocus(false));\n clearFocus.start();\n\n // DJP: Experiment\n // if (this.getDocument().getNumberFrames() > 1)\n // this.setAgentFocus(null);\n\n // Record the current window positions as properties,\n // which we can then save.\n RecordWindowPositions();\n\n // Save current layout file\n saveCurrentLayoutFile();\n\n // Save the user's preferences to the properties file.\n try\n {\n this.getAppProperties().Save();\n }\n catch (Throwable t)\n {\n edu.umich.soar.debugger.general.Debug\n .println(\"Error saving properties file: \" + t.getMessage());\n }\n\n // Remove us from the list of active frames\n this.getDocument().removeFrame(this);\n\n // Dispose of all of the colors we created\n for (Color mColor : m_Colors) {\n Color color = mColor;\n color.dispose();\n }\n\n if (m_TextFont != null)\n m_TextFont.dispose();\n\n // Exit the app if we're the last frame\n if (this.getDocument().getNumberFrames() == 0)\n {\n getDocument().close(true);\n }\n }",
"private void closeThread() {\n running = false;\n }",
"public void stop() {\n setClosedLoopControl(false);\n }",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void exit() {\r\n\t\tdispose();\r\n\t}",
"public void killTarea() {\r\n\t\tsuper.cancel();\r\n\t}",
"void exitSession()\n\t{\n\t\t// clear out our watchpoint list and displays\n\t\t// keep breakpoints around so that we can try to reapply them if we reconnect\n\t\tm_displays.clear();\n\t\tm_watchpoints.clear();\n\n\t\tif (m_fileInfo != null)\n\t\t\tm_fileInfo.unbind();\n\n\t\tif (m_session != null)\n\t\t\tm_session.terminate();\n\n\t\tm_session = null;\n\t\tm_fileInfo = null;\n\t}",
"@Override\n public void stop() throws Exception {\n mapView.dispose();\n map.dispose();\n System.exit(0);\n\n }",
"public void quit() {\r\n\t\trunning = false;\r\n\t\tt= null;\r\n\t}",
"public boolean stop();",
"public void stop() {\n\tanimator = null;\n\toffImage = null;\n\toffGraphics = null;\n }",
"@Override\n public void bailOut() {\n debug.println(\"bailOut: called\");\n\n UpdateThread upt = getUpdateThread();\n if (upt != null) upt.endLoop();\n\n // When we are stealing a previous RtDisplay's connection, we don't\n // want to shut it down. The makeRtDisplay() \"steal\" version handles\n // setting this to null.\n if (ss != null)\n ss.close();\n\n timeThread.kill();\n if (audioThread != null)\n audioThread.kill();\n\n setVisible(false);\n\n // inform all the children window that the parent has died (plots/lists)\n for (RtStatusListener i : watchers) {\n i.sourceDied();\n }\n\n // kill the parent frame\n if (parentFrame != null)\n parentFrame.dispose();\n\n // notify the RTDManager that we're dead\n manager.removeDisplay(this);\n }",
"public void stop()\n {\n _panel.cleanup();\n _appContext.cleanup();\n }",
"public void stop() {\n\t\tthis.close(this.btcomm);\n\t}",
"public native final void stopPreview();",
"private void closeButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_closeButtonActionPerformed\n Simulation.stopSimulation();\n CloudSim.abruptallyTerminate();\n \n dispose();\n }",
"public void windowClosing(WindowEvent e) {\n\t\t\t\tnew Thread(new Runnable() {\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tanimator.stop();\n\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t}\n\t\t\t\t}).start();\n\t\t\t}",
"@Override public void close() {\n\t\tthis.timer.cancel();\n\t\tthis.motionStream.removeListener(this);\n\t}",
"public void stop()\n {\n mover.stop();\n }",
"public void jBtnStop_actionPerformed(ActionEvent e3) {\n\t\tSystem.exit(0);\r\n\t\tcontentPane.setVisible(false);\r\n\t\t;\r\n\t}",
"private void pararCancion() {\n clip.stop();\n clip.close();\n clip = null;\n }",
"public void stop()\r\n {\r\n breakoutAnimator = null;\r\n }",
"public void stop() {\n System.out.println(\"STOP!\");\n xp.stop();\n }",
"public void stopTask()\n {\n viewer.stopViewer(); \n }",
"protected void end() {\n Robot.wedge.stop();\r\n Robot.driveTrain.stop();\r\n Robot.ballIntake.stop();\r\n }",
"public void close()\n {\n setVisible (false);\n dispose();\n }",
"private void exit() {\n this.isRunning = false;\n }",
"public static void closeMe() {\n window.close();\n }",
"void stop();",
"void stop();",
"void stop();",
"void stop();",
"void stop();",
"void stop();",
"void stop();",
"void stop();",
"void stop();",
"void stop();",
"void stop();",
"void stop();",
"void stop();",
"void stop();",
"void stop();",
"void stop();",
"void stop();",
"@Override\n\t\t\t\t\tpublic void windowClosing(WindowEvent e) {\n\t\t\t\t\t\tsetStillRunning(false);\n\t\t\t\t\t}",
"private void stop(){\n\t\tisstop = true;\n\t\tif(ddaemon!=null){\n\t\t\tddaemon.setStop(true);\n\t\t\tddaemon = null;\n\t\t}\n\t\tif(ndaemon!=null){\n\t\t\tndaemon.setStop(true);\n\t\t\tndaemon = null;\n\t\t}\n\t\t// si on ne doit pas garder les dicoms on les supprime\n\t\tif(DicomWorkerClient.DICOMDIR!=null){\n\t\t\ttry {\n\t\t\t\tFileUtils.deleteDirectory(DicomWorkerClient.DICOMDIR.toFile());\n\t\t\t} catch (IOException e) {\n\t\t\t\tWindowManager.mwLogger.log(Level.SEVERE, \"Directory deletion exception\",e);\n\t\t\t}\n\t\t\tDicomWorkerClient.DICOMDIR=null;\n\t\t}\n\t\tif(statusThread!=null){\n\t\t\tsetLock(false);\n\t\t\tgetLblStatus().setText(\"\");\n\t\t\tprogressPanel.setVisible(false);\n\t\t\tstatusThread.stop();\n\t\t\tstatusThread = null;\n\t\t}\n\t}",
"public void stopping();",
"@Override\n public void stop() {\n animatorThread = null;\n\n //Get rid of the objects necessary for double buffering.\n offGraphics = null;\n offImage = null;\n }",
"public void stop(BundleContext context)\n {\n m_shapetracker.close();\n m_frame.setVisible(false);\n m_frame.dispose();\n }",
"public void closeWindows() {\n\n waitingForPlayers.setVisible(false);\n bonusTilePane.setVisible(false);\n chooseCostPane.setVisible(false);\n payToObtainPane.setVisible(false);\n chooseEffectPane.setVisible(false);\n choosePrivilegePane.setVisible(false);\n chooseWorkersPane.setVisible(false);\n prayPane.setVisible(false);\n yourTurnPane.setVisible(false);\n suspendedPane.setVisible(false);\n yourTurnPane.setVisible(false);\n throwDicesPane.setVisible(false);\n bonusActionPane.setVisible(false);\n\n }",
"public void exit()\r\n\t{\r\n\t\tmainFrame.exit();\r\n\t}",
"public void finishedWindow() {\n\t\tgameManager.closePiratesEventScreen(this, route);\n\t}",
"public void finalizeViewer()\n {\n viewer.stopViewer();\n\n // check whether star tasks still is running ! \n if (startTask.isAlive() == true)\n startTask.interruptAll(); // send interrupt signal\n \n // Wait 1s. \n try\n {\n Thread.sleep(1000);\n }\n catch (InterruptedException e)\n {\n e.printStackTrace();\n }\n \n viewer.disposeViewer();\n \n // check parent frame:\n if (viewer.getViewContext().getStartInStandaloneWindow()==true)\n {\n Frame frame=getViewerFrame(viewer); \n \n if (frame != null)\n {\n frame.dispose();\n }\n }\n }",
"public void stop(){\n quit = true;\n }",
"public void stop() {\r\n\t\tif (FormsContext.isFormsServicesApp()) {\r\n\t\t\tList<String> newOpenWindows = new LWWindowOperator().getWindowTitles();\r\n\r\n\t\t\t// check if a window was closed\r\n\t\t\tif (newOpenWindows.size() < initialOpenLWWindows.size()) {\r\n\t\t\t\tFormsContext.resetContext();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// check for new windows\r\n\t\t\tfor (String name : newOpenWindows) {\r\n\t\t\t\tif (!initialOpenLWWindows.contains(name)) {\r\n\t\t\t\t\t// there is a new window open\r\n\t\t\t\t\tLogger.info(\"Found new window '\" + name + \"', autosetting context to new window.\");\r\n\t\t\t\t\tnew LWWindowOperator().setWindowAsContext(name);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}",
"@Override\n\tpublic void close() {\n\t\tframe = null;\n\t\tclassic = null;\n\t\trace = null;\n\t\tbuild = null;\n\t\tbt_classic = null;\n\t\tbt_race = null;\n\t\tbt_build = null;\n\t\tGameView.VIEW.removeDialog();\n\t}"
]
| [
"0.7289412",
"0.69683623",
"0.69451183",
"0.68545926",
"0.6792221",
"0.6759056",
"0.6759056",
"0.6759056",
"0.6759056",
"0.67564154",
"0.67270184",
"0.66254044",
"0.65931976",
"0.65818083",
"0.65527046",
"0.6507683",
"0.65023035",
"0.65023035",
"0.6459135",
"0.6444705",
"0.64171654",
"0.6414724",
"0.6412426",
"0.6406805",
"0.63975424",
"0.6369689",
"0.6364472",
"0.6348979",
"0.63399684",
"0.6333697",
"0.6326792",
"0.63255817",
"0.6309407",
"0.6309407",
"0.6309407",
"0.6309407",
"0.6309407",
"0.6309407",
"0.6309407",
"0.6309407",
"0.6309407",
"0.6309407",
"0.6309407",
"0.6309407",
"0.6309407",
"0.6309407",
"0.6309407",
"0.630335",
"0.63032216",
"0.6268715",
"0.6263346",
"0.62615114",
"0.6249185",
"0.6246541",
"0.62258893",
"0.6215717",
"0.62100184",
"0.62096685",
"0.6209636",
"0.62048155",
"0.6198501",
"0.6197934",
"0.6177453",
"0.61669976",
"0.6166114",
"0.61651886",
"0.6155469",
"0.6145571",
"0.6143783",
"0.61406535",
"0.61404127",
"0.61373097",
"0.61373097",
"0.61373097",
"0.61373097",
"0.61373097",
"0.61373097",
"0.61373097",
"0.61373097",
"0.61373097",
"0.61373097",
"0.61373097",
"0.61373097",
"0.61373097",
"0.61373097",
"0.61373097",
"0.61373097",
"0.61373097",
"0.61173356",
"0.6114163",
"0.61070776",
"0.61000234",
"0.60809237",
"0.6077316",
"0.6068064",
"0.6063564",
"0.6056585",
"0.60554945",
"0.60445356",
"0.603954"
]
| 0.6455256 | 19 |
/ Method that allow to indicates if the window is opened or not. | public boolean isOpened() {
return windowOpened;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean isOpened();",
"boolean isPopUpOpened();",
"public boolean isOpened() {\n return false;\n }",
"public boolean isOpened() {\r\n return opened != null;\r\n }",
"public boolean isOpened() {\n return opened;\n }",
"public boolean isOpened() {\n return opened;\n }",
"public boolean isOpened() {\n\t\treturn mCurrentState == STATE.OPENED;\n\t}",
"boolean isNilSearchWindowStart();",
"@Override\n public boolean isActive(W window) {\n return true;\n }",
"public boolean isOpened()\n {\n \n boolean retVal = isOpened_0(nativeObj);\n \n return retVal;\n }",
"public boolean isOpened(){\n return chestProgressLevel==1;\n }",
"public boolean isOpened() {\r\n\t\treturn this.opened;\r\n\t}",
"boolean isOpen();",
"boolean isOpen();",
"private native static boolean is_open_in_window(int clientSite);",
"protected boolean hasModalWindow() {\n return false;\n }",
"boolean isSetSearchWindowStart();",
"boolean isOpened() throws Exception;",
"public void ifWin() {\n WinMenu.setVisible(true);\n }",
"public boolean isSingleWindow() {\n return singleWindow;\n }",
"public boolean isOpen();",
"public boolean isOpen();",
"public static boolean isWindowClosed() {\n\t\treturn windowClosed;\n\t}",
"boolean isReadyForShowing();",
"public void windowOpened(WindowEvent e) { }",
"public boolean isStartAsModal();",
"boolean isWindowStateSupported(int state);",
"@Override public void windowOpened(WindowEvent evt) { }",
"@Override public void windowOpened(WindowEvent evt) { }",
"public void windowOpened (WindowEvent we) { }",
"public void windowOpened(WindowEvent event) { }",
"public boolean isShown(){\r\n return shown;\r\n }",
"public boolean IsOpen() {\r\n return GoodOpen;\r\n }",
"public boolean isOpen() {\n if (this.open) {\n return false;\n } else {\n return true;\n }\n }",
"boolean isAlwaysOnTop();",
"@Override\r\n public void windowOpened(WindowEvent e) {\n }",
"@Override\n public boolean isShown() {\n return super.isShown();\n }",
"public void windowOpened(WindowEvent e) {\n\t}",
"public boolean open() {\n\n return true;\n }",
"public boolean isCloseRequested(){\n return glfwWindowShouldClose(handle);\n }",
"@Override\n\tpublic void windowOpened(WindowEvent arg0)\n\t{\n\t\t\n\t}",
"@Override\n\tpublic void windowOpened(WindowEvent arg0)\n\t{\n\t\t\n\t}",
"@Override\n public void windowOpened(WindowEvent we) {\n }",
"private boolean isInGameWindow(){\n if (currPos.x > Window.getWidth() || currPos.y > Window.getHeight()){\n return false;\n }\n return true;\n }",
"@Override\n\tpublic void windowOpened(WindowEvent arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void windowOpened(WindowEvent arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void windowOpened(WindowEvent arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void windowOpened(WindowEvent arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void windowOpened(WindowEvent arg0) {\n\t\t\n\t}",
"public void windowOpened(WindowEvent e) {\n\r\n\t}",
"@Override\n public void windowOpened(WindowEvent e) {\n }",
"@Override\n public void windowOpened(WindowEvent e) {\n }",
"@Override\n public void windowOpened(WindowEvent e) {\n }",
"@Override\n public void windowOpened(WindowEvent e) {\n }",
"@Override\n public void windowOpened(WindowEvent e) {\n }",
"@Override\n public void windowOpened(WindowEvent e) {\n }",
"@Override\n public void windowOpened(WindowEvent e) {\n }",
"@Override\n public void windowOpened(WindowEvent e) {\n }",
"@Override\n public void windowOpened(WindowEvent e) {\n }",
"@Override\n public void windowOpened(WindowEvent e) {\n }",
"@Override\n public void windowOpened(WindowEvent e) {\n }",
"@Override\n public void windowOpened(WindowEvent e) {\n }",
"@Override\n public void windowOpened(WindowEvent e) {\n }",
"@Override\n public void windowOpened(WindowEvent e) {\n }",
"@Override\n public void windowOpened(WindowEvent e) {\n }",
"@Override\n public void windowOpened(WindowEvent e) {\n }",
"@Override\n public void windowOpened(WindowEvent e) {\n }",
"@Override\n public void windowOpened(WindowEvent e) {\n }",
"@Override\n public void windowOpened(WindowEvent e) {\n }",
"@Override\n public void windowOpened(WindowEvent e) {\n }",
"@Override\n public void windowOpened(WindowEvent e) {\n }",
"@Override\r\n\tpublic void windowOpened(WindowEvent arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void windowOpened(WindowEvent arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void windowOpened(WindowEvent arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void windowOpened(WindowEvent arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void windowOpened(WindowEvent arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void windowOpened(WindowEvent arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void windowOpened(WindowEvent arg0) {\n\t\t\r\n\t}",
"@Override\n public void windowOpened(WindowEvent e)\n {\n\n }",
"@Override\n\tpublic void windowOpened(WindowEvent arg0) {\n\n\t}",
"@Override\n\tpublic void windowOpened(WindowEvent e) {\n\t}",
"@Override\n public void windowOpened(WindowEvent e) {\n \n }",
"public boolean getIsOpen() {\n return this.is_open;\n }",
"public boolean isWin() {\n return win;\n }",
"@Override\n\tpublic void windowOpened(WindowEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void windowOpened(WindowEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void windowOpened(WindowEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void windowOpened(WindowEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void windowOpened(WindowEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void windowOpened(WindowEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void windowOpened(WindowEvent e) {\n\t\t\n\t}",
"public void check_openfile_window_Presence() throws InterruptedException {\r\n\t\tdriver.switchTo().activeElement();\r\n\t\tWebElement openfile_window = driver.findElementByName(\"How do you want to open this file?\");\r\n\t\tThread.sleep(3000);\r\n\t\t// return IsElementVisibleStatus(openfile_window);\r\n\t\tWebElement openfile_Adobe = driver.findElementByName(\"Adobe Reader\");\r\n\t\tclickOn(openfile_Adobe);\r\n\t\tWebElement ConfirmButton_ok = driver.findElementByAccessibilityId(\"ConfirmButton\");\r\n\t\tclickOn(ConfirmButton_ok);\r\n\t\tdriver.switchTo().activeElement();\r\n\t}",
"@Override\n\tpublic boolean isOpen() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic void windowOpened(WindowEvent e)\n\t{\n\n\t}",
"@Override\n\t\tpublic void windowOpened(WindowEvent arg0) {\n\t\t\t\n\t\t}",
"@Override\r\n\tpublic void windowOpened(WindowEvent e) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void windowOpened(WindowEvent e) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void windowOpened(WindowEvent e) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void windowOpened(WindowEvent e) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void windowOpened(WindowEvent e) {\n\t\t\r\n\t}"
]
| [
"0.77356154",
"0.7605769",
"0.74511194",
"0.71471035",
"0.6937439",
"0.69293594",
"0.69021195",
"0.6898926",
"0.6875523",
"0.68753546",
"0.6866246",
"0.68630296",
"0.6853215",
"0.6853215",
"0.6838757",
"0.68045694",
"0.6804539",
"0.6803316",
"0.67828923",
"0.6742814",
"0.6713013",
"0.6713013",
"0.66882354",
"0.6665729",
"0.6656084",
"0.6653823",
"0.66408765",
"0.66045934",
"0.66045934",
"0.6580734",
"0.65507126",
"0.6500537",
"0.64932364",
"0.6456169",
"0.64546037",
"0.6435187",
"0.64337784",
"0.64250153",
"0.64190215",
"0.6407553",
"0.64065635",
"0.64065635",
"0.6394706",
"0.6390505",
"0.63848525",
"0.63848525",
"0.63848525",
"0.63848525",
"0.63848525",
"0.6383553",
"0.6381214",
"0.6381214",
"0.6381214",
"0.6381214",
"0.6381214",
"0.6381214",
"0.6381214",
"0.6381214",
"0.6381214",
"0.6381214",
"0.6381214",
"0.6381214",
"0.6381214",
"0.6381214",
"0.6381214",
"0.6381214",
"0.6381214",
"0.6381214",
"0.6381214",
"0.6381214",
"0.6381214",
"0.63788027",
"0.63788027",
"0.63788027",
"0.63788027",
"0.63788027",
"0.63788027",
"0.63788027",
"0.6360943",
"0.6360306",
"0.63585025",
"0.63347316",
"0.63336134",
"0.632582",
"0.6318089",
"0.6318089",
"0.6318089",
"0.6318089",
"0.6318089",
"0.6318089",
"0.6318089",
"0.63161445",
"0.63104427",
"0.63088065",
"0.6303509",
"0.6295855",
"0.6295855",
"0.6295855",
"0.6295855",
"0.6295855"
]
| 0.80925995 | 0 |
/ Method that allow to obtain an object of Canvas type. | public Canvas getGameZone() {
return gz;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"GameCanvas getCanvas();",
"public interface Canvas {\n\tpublic String LABEL_CHANGE = \"label_change_property\";\n\t/**\n\t * @return name of Canvas or an empty String by default. MAY NOT BE NULL.\n\t */\n\tpublic String getName();\n\t/**\n\t * @return color of Canvas or null by default\n\t */\n\tpublic Color getColor();\n\t/**\n\t * @return the JComponent representation of this Canvas. MAY NOT BE NULL.\n\t */\n\tpublic JComponent getJComponent();\n\t/**\n\t * If this canvas is to be highlighted (because it might\n\t * have focus for example), then getHighlight should return\n\t * the color of that highlight. Otherwise, it should\n\t * return null\n\t * @return highlighting color or null by default.\n\t */\n\tpublic Color getHighlight();\n}",
"public Canvas getCanvas()\n {\n return canvas;\n }",
"public Canvas getCanvas(){\n return canvas;\n }",
"public Canvas getCanvas()\n\t{\n\t\treturn canvas;\n\t}",
"public Canvas getCanvas() {\n return canvas;\n }",
"public Canvas getCanvas() {\n\t\treturn canvas;\n\t}",
"public Canvas getCanvas() {\n return mCanvas;\n }",
"@Override\n\tpublic CSSCanvas getCanvas() {\n\t\tif (targetMedium == null) {\n\t\t\treturn null;\n\t\t}\n\t\tif (canvases.containsKey(targetMedium)) {\n\t\t\treturn canvases.get(targetMedium);\n\t\t}\n\t\tCSSCanvas canvas;\n\t\tDeviceFactory df = getStyleSheetFactory().getDeviceFactory();\n\t\tif (df != null) {\n\t\t\tcanvas = df.createCanvas(targetMedium, this);\n\t\t\tcanvases.put(targetMedium, canvas);\n\t\t} else {\n\t\t\tcanvas = null;\n\t\t}\n\t\treturn canvas;\n\t}",
"public static VecCanvas getCanvas(){\n if (instance == null)\n instance = new VecCanvas();\n return instance;\n }",
"public ICanvas getDefaultCanvas() {\n\t\tif (defaultCanvas==null) {\n\t\t\ttry {\n\t\t\t\tdefaultCanvas = (ICanvas) getObjectInstance(\"com.console.springernature.paint.model.Canvas\");\n\t\t\t\tif (defaultCanvas!=null) {\n\t\t\t\t\tif (defaultDevice==null) {\n\t\t\t\t\t\tthis.getDefaultDevice();\n\t\t\t\t\t}\n\t\t\t\t\tif (defaultDevice!=null) {\n\t\t\t\t\t\tthis.getDefaultDevice();\n\t\t\t\t\t\tdefaultCanvas.assignDevice(defaultDevice);\n\t\t\t\t\t\tdefaultDevice.addCommandListener(defaultCanvas);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tlogger.warn(\"(Custom Event) Unable to associate the default device ...\");\n\t\t\t\t\t\tdefaultCanvas = null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (ClassCastException e) {\n\t\t\t\tlogger.error(\"(ClassCastException) Unable to instanziate the default canvas ...\", e);\n\t\t\t} catch (Throwable e) {\n\t\t\t\tlogger.error(\"(Generic Exception) Unable to instanziate the default canvas ...\", e);\n\t\t\t}\n\t\t}\n\t\treturn defaultCanvas;\n\t}",
"public ICanvas getNamedCanvas(String simpleName, IDevice device) {\n\t\ttry {\n\t\t\tICanvas canvas = (ICanvas) getObjectInstance(\"com.console.springernature.paint.model.\"+simpleName);\n\t\t\tif (device!=null) {\n\t\t\t\tcanvas.assignDevice(device);\n\t\t\t\tdevice.addCommandListener(canvas);\n\t\t\t\treturn canvas;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlogger.warn(\"(Custom Event) Unable to associate the given device to the canvas : \"+simpleName+\" ...\");\n\t\t\t\treturn null;\n\t\t\t}\n\t\t} catch (ClassCastException e) {\n\t\t\tlogger.error(\"(ClassCastException) Unable to instanziate the named canvas : \"+simpleName+\" ...\", e);\n\t\t} catch (Throwable e) {\n\t\t\tlogger.error(\"(Generic Exception) Unable to instanziate the named canvas : \"+simpleName+\" ...\", e);\n\t\t}\n\t\treturn null;\n\t}",
"public interface CanvasLite {\n public void drawRect(float l, float t, float r, float b, Paint paint);\n public void drawCircle(float x, float y, float r, Paint paint);\n public void drawColor(int color, PorterDuff.Mode mode);\n public void drawBitmap(Bitmap bitmap, Rect src, RectF dst, Paint paint);\n public void drawBitmap(Bitmap bitmap, Matrix matrix, Paint paint);\n\n public void drawTo(Canvas drawCanvas, float left, float top, Paint paint, boolean dirtyOnly);\n public Bitmap toBitmap();\n public void recycleBitmaps();\n public int getWidth();\n public int getHeight();\n}",
"public GameCanvas getCanvas() {\n\t\treturn canvas;\n\t}",
"public abstract void mo3998c(Canvas canvas);",
"public abstract void mo3997b(Canvas canvas);",
"private Canvas createCanvas(IFramework framework, MouseListener listener) {\r\n\tCanvas canvas = new Canvas(framework);\r\n\tcanvas.setBackground(Color.white);\r\n\tcanvas.addMouseListener(listener);\r\n\treturn canvas;\r\n }",
"public abstract void mo3995a(Canvas canvas);",
"private void newCanvas() {\n\t\timgCanvas = new ImageCanvas(1000, 563);\n\t\t//canvasJP.add(imgCanvas);\n\t}",
"public ImageCanvas getImageCanvas() {\n return ic;\n }",
"public Canvas3D getMBCanvas()\r\n {\r\n \tCanvas3D c = mb.getMBCanvas3D();\r\n \treturn c;\r\n }",
"public Canvas canvas() {\n Canvas canvas = new Canvas(getLowerBound(), getUpperBound());\n canvas.add(this);\n return canvas;\n }",
"public Object getGuiObject();",
"public interface Display {\n\n public void display(Canvas canvas);\n\n}",
"void drawOnCanvas(@NonNull Canvas canvas) ;",
"public Long getCanvasId() {\n return this.canvasId;\n }",
"Dimension getCanvasDimension();",
"private JPanel createCanvas() {\n return new JPanel() {\n\n @Override\n protected void paintComponent(Graphics g) {\n super.paintComponent(g);\n element.drawMe((Graphics2D) g);\n }\n\n };\n }",
"public Object getGraphicsCreator(Graphics g);",
"public interface Drawable<M> {\r\n\r\n /**\r\n * Draws this Drawable object on the graphics context that is passed as an\r\n * argument.\r\n *\r\n * @param context The drawable graphics context.\r\n */\r\n void draw(GraphicsContext context);\r\n\r\n /**\r\n * Gets the model assosciated with this Drawable.\r\n *\r\n * @return This model, may be null if none specified.\r\n */\r\n M getModel();\r\n\r\n /**\r\n * Gets the GameCanvas on which this drawable is placed.\r\n *\r\n * @return The GameCanvas, not null, on which this drawable is placed.\r\n */\r\n GameCanvas getCanvas();\r\n\r\n}",
"protected abstract ToolbarEngine getInstanceOfToolbar();",
"public Canvas(IFramework framework) {\r\n\t this.framework = framework;\r\n\t this.data = framework.getData();\r\n\t this.maxRatio = framework.getDisplayMenu().getMaxRatioScale();\r\n\t this.minRatio = framework.getDisplayMenu().getMinRatioScale();\r\n\t}",
"@Override\n\tpublic String getCanvasID() {\n\t\treturn getID();\n\t}",
"public interface DoodleCanvas {\n\n\t/**\n\t * Visualizes any Object inside the caller, either using draw Method of the\n\t * object itself (if existing) or does a default drawing. Should only be\n\t * called from another draw Method.\n\t * \n\t * @param Object\n\t * o\n\t */\n\tpublic abstract void draw(Object o);\n\n\t/**\n\t * Visualizes any Object with few details, either using\n\t * <code>summarizeOn()</code> Method of the object itself (if existing) or\n\t * does a default drawing.\n\t * \n\t * @param Object\n\t * o\n\t */\n\tpublic abstract void drawSimplified(Object o);\n\n\t/**\n\t * Jump to a new line with the virtual cursor, staying in the same column.\n\t */\n\tpublic abstract void newLine();\n\n\t/**\n\t * Jump to a new column with the virtual cursor, i.e. create a new column on\n\t * the right side of the last one.\n\t */\n\tpublic abstract void newColumn();\n\n}",
"@Override\n public void draw(ItemObjectType itemType) {\n GraphicsContext gc = myCanvas.getGraphicsContext2D();\n int width = (int)myCanvas.getWidth();\n int height = (int)myCanvas.getHeight();\n switch (myType){\n case PIT:\n gc.clearRect(0,0,width,height);\n gc.drawImage(mainView.imageLoader.getImage(\"pit\", width,height),0,0);\n break;\n case CLOSEDDOOR:\n gc.clearRect(0,0,width,height);\n gc.drawImage(mainView.imageLoader.getImage(\"closeddoor\", width,height),0,0);\n break;\n case OPENEDDOOR:\n gc.clearRect(0,0,width,height);\n gc.drawImage(mainView.imageLoader.getImage(\"openeddoor\", width,height),0,0);\n break;\n case SCALE:\n gc.clearRect(0,0,width,height);\n gc.drawImage(mainView.imageLoader.getImage(\"scale_floor\", width,height),0,0);\n gc.drawImage(mainView.imageLoader.getImage(\"scale\", width/2.0,height/2.0),width/4.0,height/4.0);\n break;\n case WALL:\n gc.clearRect(0,0,width,height);\n gc.drawImage(mainView.imageLoader.getImage(\"wall\", width,height),0,0);\n break;\n case SPECIALWALL:\n gc.clearRect(0,0,width,height);\n gc.drawImage(mainView.imageLoader.getImage(\"specialwall\", width,height),0,0);\n break;\n case FLOOR:\n gc.clearRect(0,0,width,height);\n gc.drawImage(mainView.imageLoader.getImage(\"floor\", width,height),0,0);\n break;\n default:\n System.out.println(\"Gond van a kirajzolasnal\");\n break;\n }\n\n if(itemType != null) {\n switch (itemType) {\n case BOX:\n gc.drawImage(mainView.imageLoader.getImage(\"box\", width / 2.0, height / 2.0), width / 4.0, height / 4.0);\n break;\n case ZPM:\n gc.drawImage(mainView.imageLoader.getImage(\"zpm\", width, height), 0, 0);\n break;\n default:\n\n break;\n }\n }\n }",
"@SuppressWarnings(\"unchecked\")\n\tpublic Class getObjectType()\n\t{\n\t\tObject obj = getObject();\n\t\tif (obj == null)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\treturn obj.getClass();\n\t}",
"public void draw(Canvas canvas);",
"public void draw(Canvas canvas);",
"@Override\n public Class<?> getObjectType() {\n return this.type;\n }",
"Unit infantryUnit(Canvas canvas ,String name);",
"public static Chart getChart(String type){\n\t\tChart chart = new Chart(Quality.Advanced, type);\r\n\t\tchart.getView().setBackgroundColor(Color.BLACK);\r\n\t\tchart.getView().setAxeSquared(true);\r\n\t\tchart.getAxeLayout().setGridColor(Color.WHITE);\r\n\t\tchart.getAxeLayout().setFaceDisplayed(false);\r\n\t\taddLight( chart, new Coord3d(0,-100,100));\r\n\t\tsceneHisto(chart);\t\t\r\n\t\treturn chart;\r\n\t}",
"@Override\r\n\tpublic void draw(final Canvas canvas) {\n\r\n\t}",
"public static Object getAdapter(Object sourceObject, Class adapterType) {\r\n \tAssert.isNotNull(adapterType);\r\n if (sourceObject == null) {\r\n return null;\r\n }\r\n if (adapterType.isInstance(sourceObject)) {\r\n return sourceObject;\r\n }\r\n\r\n if (sourceObject instanceof IAdaptable) {\r\n IAdaptable adaptable = (IAdaptable) sourceObject;\r\n\r\n Object result = adaptable.getAdapter(adapterType);\r\n if (result != null) {\r\n // Sanity-check\r\n Assert.isTrue(adapterType.isInstance(result));\r\n return result;\r\n }\r\n } \r\n \r\n if (!(sourceObject instanceof PlatformObject)) {\r\n Object result = Platform.getAdapterManager().getAdapter(sourceObject, adapterType);\r\n if (result != null) {\r\n return result;\r\n }\r\n }\r\n\r\n return null;\r\n }",
"public GraphicsContext getGraphicsContext2D(){\n return canvas.getGraphicsContext2D();\n }",
"public void b(Canvas paramCanvas) {\n }",
"public ImageCanvas() {\r\n super();\r\n }",
"public GateCanvas(int type_param)\n {\n super();\n // setBackgroundColor( );\n type = type_param;\n inverted = false;\n // setSize(24, 24);\n setVisible(true);\n }",
"RakudoObject type_object_for(ThreadContext tc, RakudoObject how);",
"public abstract void draw(java.awt.Graphics canvas);",
"@Override\n public Class<Object> getObjectType() {\n return Object.class;\n }",
"public Class getContextType();",
"public Object getObject();",
"public void setCanvas(Canvas canvas) {\r\n\t\tthis.canvas = canvas;\r\n\t}",
"static HTMLCanvasElement getCanvasElementReadyToRenderImage(Image image) {\n HTMLCanvasElement canvasElement = getOrCreateCanvasElementAssociatedWithImage(image);\n if (image.isPeerCanvasDirty()) {\n ImageData imageData = ImageDataHelper.getImageDataAssociatedWithImage(image);\n if (imageData != null)\n Context2DHelper.getCanvasContext2D(canvasElement).putImageData(imageData, 0, 0);\n image.setPeerCanvasDirty(false);\n }\n return canvasElement;\n }",
"public FacePamphletCanvas() {\n\t}",
"@NativeType(\"bgfx_renderer_type_t\")\n public static int bgfx_get_renderer_type() {\n long __functionAddress = Functions.get_renderer_type;\n return invokeI(__functionAddress);\n }",
"public Widget asWidget();",
"public vtkCanvas getVtkCanvas(){\n\t\treturn renWin;\n\t}",
"public abstract void draw(Object o);",
"public CanvasAWT(Graphics2D graphic){\r\n\t\ttarget = graphic;\r\n\t}",
"private void createCanvasAndFrame(){\n image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);\n canvas = new Canvas();\n Dimension dimension = new Dimension((int)(width*scale), (int)(height*scale));\n canvas.setPreferredSize(dimension);\n canvas.setMaximumSize(dimension);\n canvas.setMinimumSize(dimension);\n\n frame = new JFrame(title);\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.setLayout(new BorderLayout());\n frame.add(canvas, BorderLayout.CENTER);\n frame.pack();\n frame.setLocationRelativeTo(null);\n frame.setResizable(false);\n frame.setVisible(true);\n\n canvas.createBufferStrategy(2);\n bufferStrategy = canvas.getBufferStrategy();\n graphics = bufferStrategy.getDrawGraphics();\n }",
"public Class getType();",
"public CanvasCriteriaTypeMap()\r\n\t{\r\n\r\n\t}",
"public static vtkCanvas createDummyCanvas(vtkActor actor)\n\t{\n\t\tfinal vtkCanvas canvas = new vtkCanvas()\n\t\t{\n\n\t\t\t/** Workaround for http://www.vtk.org/Bug/view.php?id=6268 */\n\t\t\t@Override\n\t\t\tpublic void setSize(int x, int y)\n\t\t\t{\n\t\t\t\tsuper.setSize(x, y);\n\t\t\t\tLock();\n\t\t\t\trw.SetSize(x, y);\n\t\t\t\tiren.SetSize(x, y);\n\t\t\t\tiren.ConfigureEvent();\n\t\t\t\tUnLock();\n\t\t\t}\n\t\t};\n\t\t// a renderer for the data\n\t\tfinal vtkRenderer ren1 = canvas.GetRenderer();\n\n\t\tren1.AddActor(actor);\n\t\t// background color white\n\t\tren1.SetBackground(1, 1, 1);\n\t\t// Make the canvas resizable with a splitter\n\t\t//layout\n\t\tcanvas.setMinimumSize(new Dimension(0, 0));\n\t\tcanvas.setPreferredSize(new Dimension(0, 0));\n\t\tren1.ResetCamera();\n\t\treturn canvas;\n\t}",
"public MenuCanvas() {\n\n //CR 14694\n imageDisplay = new ImageDisplay();\n iCaptureImage = new CaptureImageAudio(this);\n iImageMenu = new CustomMenu(this);\n\n //#if KEYPAD\n //|JG|iKeyHandler = ObjectBuilderFactory.getKeyHandler();\n //|JG|iKeyHandler.setCanvasHandler(this);\n //#endif\n iCustomPopup = new CustomPopup(this);\n iMenu = new CustomMenu(this);\n \n bannerHandler = new CustomBanner(this);\n textboxSize = (short)(8 + CustomCanvas.font.getHeight());\n }",
"protected Drawing createDrawing() {\n return new StandardDrawing();\n }",
"public static DefaultListModel<String> getCanvasListModel() {\n return canvasListModel;\n }",
"@Override\n\tpublic void draw(Canvas canvas) {\n\n\t}",
"private VerticalLayout getCanvas() {\n return new VerticalLayout();\n }",
"public interface OnCanvasCallback {\n void onSingleTap();\n\n void onDownDispear();\n\n void setUndoEnable(boolean enable);\n void setRecoverEnable(boolean enable);\n}",
"public interface View {\n\n public void Update();\n public void Clear(String scopeName);\n\n public ViewScope getMainView();\n public ViewScope getCanvasView();\n public ViewScope getToolbarView();\n public ViewScope getTopMenuView();\n\n public void drawRectangle(String viewName, Rectangle rectangle, int pos_x, int pos_y, double scale);\n public void drawRectangle(String viewName, Rectangle rectangle, int pos_x, int pos_y);\n public void drawRectangle(String viewName, Rectangle rectangle, double scale);\n public void drawRectangle(String viewName, Rectangle rectangle);\n public void drawPolygon(String viewName, Polygon polygon, int pos_x, int pos_y, double scale);\n public void drawImage(String viewName, String path, int pos_x, int pos_y, int width, int height);\n public void drawText(String viewName, String text, int x, int y, int size);\n\n}",
"@Override\n\tpublic void draw(Canvas canvas) {\n\t\t\n\t}",
"public final native String getType() /*-{\n return this.getType();\n }-*/;",
"public Object getObject() ;",
"public Type<O> getObjectType()\n\t{\n\t\treturn this.getSettings().getObjectType();\n\t}",
"@Override\n\tpublic void draw(Graphics canvas) {}",
"public abstract Object getUnderlyingObject();",
"@Override\n\tpublic Type getType() {\n\t\treturn heldObj.getType();\n\t}",
"private VecCanvas(){\n MouseAdapter mouse = new CanvasMouse();\n this.addMouseListener(mouse);\n this.addMouseMotionListener(mouse);\n setupKeyBindings();\n }",
"public Graphics2D getGraphics(){\n\t\ttry {\n\t\t\treturn (Graphics2D)this.getBufferStrategy().getDrawGraphics();\n\t\t} catch (Exception ex1) {\n\t\t\treturn null;\n\t\t}\n\t}",
"public Dimension getCanvasSize() {\n return transformManager.getCanvasSize();\n }",
"DummyCanvas() {\n super(null);\n // super(null); ----------------ADDED TO COMPILE -----------------------------------------\n }",
"Object getObject();",
"Object getObject();",
"Object getObject();",
"Object getObject();",
"public interface TDrawable\n{\n /** Sets the isDrawn state */\n public void setDrawn(boolean b);\n \n /** if true the Object will be drawn */\n public boolean isDrawn();\n \n /**\n * The optimized commands required to update the objects vizualization, \n * this expects the underlying visualization objects have been created\n * and any calculations are complete. It may be restricted to methods \n * that only operate in the rendering thread.\n */\n public void render();\n}",
"public Object getAdapter(Object adaptableObject, Class adapterType) {\n \t\tif (IWorkbenchAdapter.class == adapterType) {\n \t\t\treturn getWorkbenchAdapter(adaptableObject);\n \t\t}\n \t\t\n \t\tif(IDeferredWorkbenchAdapter.class == adapterType) {\n \t\t\t Object o = getWorkbenchAdapter(adaptableObject);\n \t\t\t if(o != null && o instanceof IDeferredWorkbenchAdapter) {\n \t\t\t \treturn o;\n \t\t\t }\n \t\t\t return null;\n \t\t}\t\t\n \t\t\n \t\tif (IPropertySource.class == adapterType) {\n \t\t\treturn getPropertySource(adaptableObject);\n \t\t}\n \t\t\n \t\tif (IHistoryPageSource.class == adapterType){\n \t\t\treturn historyParticipant;\n \t\t}\n \t\t\n \t\tif (ITeamStateProvider.class == adapterType) {\n \t\t\tsynchronized (this) {\n \t\t\t\tif (teamStateProvider == null)\n \t\t\t\t\tteamStateProvider = new CVSTeamStateProvider(CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber());\n \t\t\t}\n \t\t\treturn teamStateProvider;\n \t\t}\n \t\t\n \t\treturn null;\n \t}",
"public interface GameObject {\n public void draw(Canvas canvas);\n public void update();\n}",
"public Object createObject() {\n return klass.__call__().__tojava__(interfaceType);\n }",
"public Shape getRenderObject(\n )\n {return renderObject;}",
"public FreeColGameObjectType getType() {\n return this;\n }",
"public Canvas() {\n this.addGLEventListener(this);\n valuesB = new ArrayList<>();\n resultadoICPClasico = new ArrayList<>();\n }",
"interface DrawingController {\n \n public void redraw(Graphics g);\n \n public void setCanvas(DrawingCanvas canvas); \n}",
"private EnlargeCanvas() {\n }",
"PlotAreaType createPlotAreaType();",
"public void _getDiagramType() {\n result = true;\n\n String stype = oObj.getDiagramType();\n log.println(\"Current Diagram Type is \" + stype);\n result = (stype.startsWith(\"com.sun.star.chart.\"));\n\n tRes.tested(\"getDiagramType()\", result);\n }",
"public static JSONSchemaObjectEditorUI getEditorFor(JSONSchemaObject schemaObject) {\n if(isInitialized)\n initialize();\n if(schemaObject.getSerializationId() != null) {\n Class<? extends JSONSchemaObjectEditorUI> result = registeredEditors.getOrDefault(schemaObject.getSerializationId(), null);\n if(result != null) {\n try {\n return result.getConstructor(JSONSchemaObject.class).newInstance(schemaObject);\n } catch (Exception e) {\n e.printStackTrace();\n throw new RuntimeException(e);\n }\n }\n }\n return new DefaultJSONSchemaObjectEditorUI(schemaObject);\n }",
"ShapeType getShapeType();",
"public T caseClosureSurfaceType(ClosureSurfaceType object) {\n\t\treturn null;\n\t}",
"Class<?> type();"
]
| [
"0.67081654",
"0.6575427",
"0.6476902",
"0.6441102",
"0.6383915",
"0.63219917",
"0.62890935",
"0.62700486",
"0.62470233",
"0.61236805",
"0.6060601",
"0.59153366",
"0.58959115",
"0.57520175",
"0.56810504",
"0.55586207",
"0.555626",
"0.55505425",
"0.5463871",
"0.54450184",
"0.54141366",
"0.53143543",
"0.5277969",
"0.5241104",
"0.52054447",
"0.5186259",
"0.51616323",
"0.51584995",
"0.51573384",
"0.5156319",
"0.5146692",
"0.5131315",
"0.5064431",
"0.5063602",
"0.5034548",
"0.5015655",
"0.50131315",
"0.50131315",
"0.50008816",
"0.4982114",
"0.49713036",
"0.49464035",
"0.49422637",
"0.49315023",
"0.49211982",
"0.49201542",
"0.4911192",
"0.48912057",
"0.48689285",
"0.48670247",
"0.48517877",
"0.4826309",
"0.48190567",
"0.47851533",
"0.47816154",
"0.47791836",
"0.47549456",
"0.4750691",
"0.47482494",
"0.47381672",
"0.47333187",
"0.4730866",
"0.4723186",
"0.47196048",
"0.4716449",
"0.47129273",
"0.47095916",
"0.46972674",
"0.4690317",
"0.46894753",
"0.4680151",
"0.46736303",
"0.46662962",
"0.46617523",
"0.46579194",
"0.46389562",
"0.46325672",
"0.46207199",
"0.4620339",
"0.4617253",
"0.4599771",
"0.45982483",
"0.45935404",
"0.45935404",
"0.45935404",
"0.45935404",
"0.4592491",
"0.4590685",
"0.45882335",
"0.45872998",
"0.45868003",
"0.4584799",
"0.4583381",
"0.45825103",
"0.45805418",
"0.45784712",
"0.45775253",
"0.4576725",
"0.4575541",
"0.45752087",
"0.4570936"
]
| 0.0 | -1 |
/ Method that allows to call the method continueGame() through an event. | @FXML
public void continueGame(ActionEvent event) {
gz.continueGame();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void actionPerformed(ActionEvent e){\n\t\t\tstartGame();\n\t\t}",
"private void continueGame() {\n System.out.println(\"\\n\" + \"Do you want to play more games or quit?\\n\" + \"1. Lotto\\n\" + \"2. Small Lotto\\n\" + \"3. Quit\");\n input = scanner.next();\n changeGame();\n }",
"void onStartGameRequested();",
"public void handleNewGameEvent(ActionEvent event) {\n\t\tgame.startNewGame();\n\t}",
"private static void continueGame()\r\n\t{\r\n\t\tString name = \"\";\r\n\t\twhile(true)\r\n\t\t{\r\n\t\t\tname = scan(\"Write the name of your game: \");\r\n\t\t\t\r\n\t\t\tif(GameManager.instance().players().contains(name)) break;\r\n\t\t}\r\n\t\t\r\n\t\tGameManager.instance().setCurrentPlayer(name);\r\n\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\tGameManager.instance().loadGame();\r\n\t\t}\r\n\t\tcatch (FileNotFoundException e)\r\n\t\t{\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\t//e.printStackTrace();\r\n\t\t\tSystem.out.println(\"Something happened\");\r\n\t\t}\r\n\t}",
"public void pressNewGame() {\n }",
"public void actionPerformed(ActionEvent e) {\n \t\t\t\tscreen.game.skip();\n \t\t\t}",
"void gameStarted();",
"void gameStarted();",
"public void actionPerformed(ActionEvent e) {\n\t\t\t\tjoinGame();\n\t\t\t}",
"private void StartGameButtonActionPerformed(java.awt.event.ActionEvent evt) {\n StartGame();\n }",
"void gameResumed();",
"public void onClick(View v) {\n \tm_main.gameContinue();\n }",
"@Override\n\t\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\n\t\t\t\t\t\t\t\t\t\tint which) {\n\t\t\t\t\t\t\t\t\tstartGame();\n\t\t\t\t\t\t\t\t}",
"@Override\r\n\t\tpublic void actionPerformed(ActionEvent event) {\n\t\t\t\r\n\t\t\tif (event.getSource() == newGameButton) {\r\n\t\t\t\tframeStack.startGame();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}",
"public Game startGame(Game game);",
"void resumeGame(String playerName) throws GameServiceException;",
"public void gameEnded() {}",
"public void RestartGame()\n {\n \n }",
"void pauseGame() {\n myGamePause = true;\n }",
"synchronized void resumeGame() {\n myGamePause = false;\n this.notify();\n }",
"private void playTurn()\n {\n try\n {\n XMLHandler.saveGame(game, GAME_CLONE_PATH);\n }\n catch(IOException | JAXBException | SAXException ex)\n {\n // TODO... ConsoleUtils.message(\"An internal save error has occured, terminating current game\");\n gameEnded = true;\n return;\n }\n \n moveCycle();\n \n if (!game.validateGame()) \n {\n IllegalBoardPenalty();\n }\n \n String gameOverMessage = game.isGameOver();\n if (gameOverMessage != null) \n {\n //TODO: ConsoleUtils.message(gameOverMessage);\n gameEnded = true;\n }\n \n game.switchPlayer();\n }",
"public void executeLeftGame() {\r\n //COME BACK TO THIS\r\n }",
"public void gameRunning()\n{\n}",
"public abstract void onSolvedGame();",
"void askStartGame();",
"synchronized void resumeGame() {\n myShouldPause = false;\n notify();\n }",
"synchronized void resumeGame() {\n myShouldPause = false;\n notify();\n }",
"@Override\r\n public int playGameLoop() {\r\n return 0;\r\n }",
"public void playGame() {\n\t\t\r\n\t\t\r\n\t\twhile (!theModel.isGameOver()) {\r\n\t\t\tplayRoundOne();\r\n\t\t}\r\n\t\t\r\n\t}",
"@Override\n public void handle(Event event) {\n secondPlayer();\n }",
"public void startNewGame();",
"void startGame();",
"void startGame();",
"void startGame();",
"public void startGame() {\n status = Status.COMPLETE;\n }",
"public void startOppTurn(GameState state) {\n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n\n Object clicked = e.getSource();\n\n if (clicked == next_turn){\n NextTurn();\n }\n if (clicked == next_game){\n NextGame();\n }\n if (clicked == go_back){\n GoBack();\n }\n if (clicked == prev_game){\n PrevGame();\n }\n if (clicked == prev_turn){\n PrevTurn();\n }\n }",
"public void resumeGame() {\n\t\t\tif (extended)\n\t\t\t\textendTimer.start();//restart timer if thats relevant\n\t\t\tpause=false;//turn off all flags for pause/stop\n\t\t\tstopped = false;\n\t\t}",
"@Override\n public void clicked(InputEvent event, float x, float y) {\n audioManager.playEvilBunnieGod();\n audioManager.setNewState(State.IDLE);\n manager.setScreen(new GameplayScreen(manager, 1));\n }",
"@FXML\n\tpublic void pauseGame(ActionEvent event) {\n\t\tgz.pauseGame();\n\t}",
"@Override\n\tpublic void onGameStopped(String arg0, String arg1) {\n\t\t\n\t}",
"void pauseGame() {\n myShouldPause = true;\n }",
"void pauseGame() {\n myShouldPause = true;\n }",
"public void handleEvent(GameEvent<S, A> e) {\n\t\t\r\n\t\tif (playerId == e.getState().getTurn() && !game.isFinished()){\r\n\t\t\tif (playerMode != PlayerMode.manual && (e.getType() == GameEvent.EventType.Info || e.getType() == GameEvent.EventType.Change)) {\r\n\t\t\t\tdecideMakeAutomaicMove();\r\n\t\t\t}\r\n\r\n\t\t\telse if (e.getType() == GameEvent.EventType.Start){\r\n\t\t\t\tif (playerMode == PlayerMode.random) makeRandomMove();\r\n\t\t\t\telse if (playerMode == PlayerMode.smart) makeSmartMove();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\n public void beginGame() {\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 }",
"public void playTurn() {\r\n\r\n }",
"void gameFinished();",
"@Override\n\tpublic void gameStopped() {\n\t}",
"public void takeTurn(){\r\n //Handled by GameWindow buttons\r\n }",
"@Override\n\tpublic void onGameStarted(String arg0, String arg1, String arg2) {\n\t\t\n\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif(e.getSource()==btn_pause) {\n\t\t\n\t\t\tgamePause();\n\t\t}\n\t\tif(e.getSource()==btn_continue) {\n\t\t\tgameContinue();\n\t\t}\n\t\tif(e.getSource()==btn_restart) {\n\t\t\tgameResTart();\n\t\t}\n\t\tif(e.getSource()==btn_rank) {\n\t\t\tgameRank();\n\t\t}\n\t\tif(e.getSource()==btn_admin) {\n\t\t\tgameAdmin();\n\t\t}\n\t\t\n\t}",
"public void playAgain();",
"public void resume() {\n playing = true;\n gameThread = new Thread(this);\n gameThread.start();\n }",
"public void actionPerformed(ActionEvent e) {\n\t\tupdateGame();\n\t}",
"private void resumeGame() {\n\n gameCountDownTimer = getGameTimer();\n gameCountDownTimer.start();\n if(globalAnimatorMap != null && !globalAnimatorMap.isEmpty() && globalAnimatorMap.size() > 0) {\n for (Map.Entry<Integer, AnimatorSet> entry : globalAnimatorMap.entrySet()) {\n AnimatorSet animatorSet = entry.getValue();\n if (animatorSet != null) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {\n if (animatorSet.isPaused()) {\n animatorSet.resume();\n }\n } else {\n animatorSet.start();\n }\n }\n }\n }else{\n animateBalloonView(balloon1,false);\n animateBalloonView(balloon2,false);\n animateBalloonView(balloon3,false);\n animateBalloonView(balloon4,false);\n animateBalloonView(balloon5,false);\n }\n String controlButtonTitle = getResources().getString(R.string.pause_btn);\n conttroler.setText(controlButtonTitle);\n currentScreenGameState = GameState.PLAYING;\n setCurrentScreenCover();\n invalidateOptionsMenu();\n }",
"public void resume() {\n playing = true;\n gameThread = new Thread(this);\n gameThread.start();\n }",
"public void startGame() {\n loadPlayersIntoQueueOfTurns();\n nextPlayerInTurn();\n eventListener.addEventObject(new RoundEvent(EventNamesConstants.GameStarted));\n }",
"public void gameComplete() {\n if (soundToggle == true) {\n gameComplete.start();\n } // if\n }",
"public void handleEndTurn(ActionEvent event){\n sender.sendInput(\"end turn\");\n }",
"protected void newGameClicked(ActionEvent e) {\n startNewGame();\n }",
"public abstract void RunOnGameOpen();",
"private void inGame() {\n\n if (!ingame) {\n timer.stop();\n\n }\n }",
"public void notifyEvent(Event event) {\n _brain.getGameManager().takeAction(event);\n }",
"@Override\n\t\tpublic void actionPerformed(ActionEvent e)\n\t\t{\n\t\t\tif (game.getPlayerID() == -1)\n\t\t\t{\n\t\t\t\tclearMsgArea();\n\t\t\t\tgame.makeConnection();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tprintMsg(\"You're already in the game.\\n\");\n\t\t\t}\n\t\t\t/*\n\t\t\tBigTwoDeck ndeck = new BigTwoDeck();\n\t\t\tndeck.shuffle();\n\t\t\tgame.start(ndeck);\n\t\t\t*/\n\n\t\t}",
"void onEDHGameStart();",
"@Override\n public void actionPerformed(ActionEvent actionEvent) {\n try {\n startGameByLevel(1);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }",
"public void play() {\n\n showIntro();\n startGame();\n\n }",
"void onNewGame();",
"void onClickNextTurn();",
"public final void playGame() {\n\t\tSystem.out.println(\"Welcome to \"+nameOfGame+\"!\");\n\t\tsetup(numberOfPlayers);\n\t\tfor(int i = 0; !isGameOver(); i = (i+1) % numberOfPlayers) {\n\t\t\ttakeTurn(i+1);\n\t\t}\n\t\tfinishGame();\n\t}",
"@Override\n public void run() {\n if(mGame.getmGameStatus() == Game.GameStatus.ONGOING){\n\n // If turn was toggled:\n if(mGame.getmCurrentlyPlaying() != opponentPiece) {\n\n // Updating colors for profile areas:\n mPlayerProfileArea.setBackgroundResource(R.drawable.user_area_green);\n mPlayerUsername.setBackgroundResource(R.color.colorGreenDarkAlpha);\n mOpponentProfileArea.setBackgroundResource(R.drawable.user_area_gray);\n mOpponentUsername.setBackgroundResource(R.color.colorGrayDarkAlpha);\n\n // Now Player should make a move:\n showGuidelines();\n mIsAllowedToPlay = true;\n\n }\n\n // Otherwise, opponent gets another turn:\n else{\n makeAIMove();\n }\n\n }\n\n else{ // Otherwise (game has ended)\n handleGameEnding();\n }\n\n }",
"public void startGame() \n\t{\n\t\tgamePanel.startGame();\n\t}",
"@Override\n public void actionPerformed(ActionEvent actionEvent) {\n try {\n startGameByLevel(2);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }",
"public void playerFinishedGoNext() {\n\t\t// If game is over we don't want to switch turn.\n\t\tif (!isOver()) {\n\t\t\tswitchTurn();\n\t\t}\n\t}",
"@Override\n\tpublic void resume() {\n\t\tGdx.app.log(\"GameScreen\", \"resume called\"); \n\t}",
"public void startGame() {\r\n this.setupGame();\r\n }",
"private void playGame() {\n do {\n new Round(this);\n } while (!winner.isPresent());\n }",
"private void runStartEvent(StartEvent event, Player player){\n\t\tif(event.getPrerequisite() == null || (event.getPrerequisite() != null \r\n\t\t\t\t&& event.getPrerequisite().check(player))){\r\n\t\t\trunEvent(event, player);\r\n\t\t}\r\n\t}",
"@Override\n // Could call like runGame in here? Then show new game state?\n public void actionPerformed(ActionEvent e) {\n\n if (e.getSource() == move1.buttonObj) {\n move1.buttonObj.setText(\"The button has been clicked\");\n }\n\n }",
"public void gameLoop() {\n while (!d_TournamentEnded) {\n d_CurrentPhase.run();\n }\n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n controller.gameOver();\n }",
"public void play() {\r\n\r\n gamestate.startGame();\r\n\r\n while (!quit) {\r\n\r\n if (newGame) {\r\n gamestate.startGame();\r\n turn = 0;\r\n finished = true;\r\n newGame = false;\r\n }\r\n\r\n while (!gamestate.gameOver()) {\r\n\r\n if (newGame) {\r\n break;\r\n }\r\n\r\n turn++;\r\n display.displayBoard();\r\n\r\n if (turn % 2 == 1) {\r\n player1.makeMove(gamestate);\r\n } else {\r\n player2.makeMove(gamestate);\r\n }\r\n\r\n }\r\n\r\n if (finished) {\r\n\r\n display.displayBoard();\r\n\r\n switch (gamestate.getWinner()) {\r\n case Connect4GameState.RED:\r\n System.out.println(\"R wins\");\r\n break;\r\n case Connect4GameState.YELLOW:\r\n System.out.println(\"Y wins\");\r\n break;\r\n default:\r\n System.out.println(\"No one wins\");\r\n }\r\n\r\n finished = false;\r\n\r\n }\r\n\r\n if (display instanceof Connect4ConsoleDisplay) {\r\n quit = true;\r\n }\r\n\r\n }\r\n\r\n }",
"public void actionPerformed( ActionEvent e )\n {\n \tObject source = e.getSource();\n \t\n \tif( (JButton)source == exit )\n \t{\n \t\t//Exit the application\n \t\tSystem.exit( 0 );\n \t}\n \telse if( (JButton)source == restart )\n \t{\n \t\tString message = \"Are you sure you want to restart?\";\n \t\t\n \tint n = JOptionPane.showConfirmDialog(\n \t\t frame,\n \t\t message,\n \t\t \"Restart game\",\n \t\t JOptionPane.YES_NO_OPTION );\n \tif( n == JOptionPane.YES_OPTION )\n \t\t//Restart the game\n \t\trestart();\n \t}\n \telse if( (JButton)source == pause )\n \t{\n \t\t//Change the game start\n \t\tpaused = !paused;\n \t\t\n \t\t//If the game is paused now\n \t\tif( paused )\n \t\t{\n \t\t\t//Stop the timer\n \t\t\tt.pause();\n \t\t\t\n \t\t\t//Don't let the player see the grid\n \t\t\tguiGrid.setVisible( false );\n \t\t\tfor( int r = 0; r < BOARD_SIZE; r++ )\n \t\t\t{\n \t\t\t\tfor( int c = 0; c < BOARD_SIZE; c++ )\n \t\t\t\t{\n \t\t\t\t\tgridButtons[r][c].setText( \"\" );\n \t\t\t\t}\n \t\t\t}\n \t\t\tpause.setText( \"Unpause\" );\n \t\t}\n \t\telse\n \t\t{\n \t\t\tt.unpause();\n \t\t\tguiGrid.setVisible( true );\n \t\t\tfor( int r = 0; r < BOARD_SIZE; r++ )\n \t\t\t{\n \t\t\t\tfor( int c = 0; c < BOARD_SIZE; c++ )\n \t\t\t\t{\n \t\t\t\t\tgridButtons[r][c].setText( Character.toString( g.charAt( r, c ) ) );\n \t\t\t\t}\n \t\t\t}\n \t\t\tpause.setText( \"Pause\" );\n \t\t}\n \t}\n \telse if( (JButton)source == submitWord )\n \t{\n \t\tif( guess.equals( \"\" ) )\n \t\t{\n \t\t\tmessagesLabel.setText( \"Enter a word!\" );\n \t\t}\n \t\telse if( exists( guess ) )\n \t\t{\n \t\t\tmessagesLabel.setText( \"You've used \" + guess + \"!\" );\n \t\t}\n \t\telse\n \t\t{\n \t\t\tif( guess.length() < 3 )\n \t\t\t{\n \t\t\t\tmessagesLabel.setText( \"Must be >= 3 letters.\" );\n \t\t\t}\n \t\t\telse\n \t\t\t{\n\t\t \t\tif( g.hasWord( guess ) )\n\t\t \t\t{\n\t\t \t\t\t//Add to the score\n\t\t \t\t\tif( guess.length() <= 3 )\n\t\t \t\t\t\tscore += 1;\n\t\t \t\t\telse if( guess.length() == 4 )\n\t\t \t\t\t\tscore += 2;\n\t\t \t\t\telse if( guess.length() == 5 )\n\t\t \t\t\t\tscore += 3;\n\t\t \t\t\telse if( guess.length() == 6 )\n\t\t \t\t\t\tscore += 5;\n\t\t \t\t\telse\n\t\t \t\t\t\tscore += 8;\n\t\t \t\t\tscoreLabel.setText( \"Score: \" + Integer.toString( score ) );\n\t\t \t\t\t\n\t\t \t\t\tmessagesLabel.setText( guess + \" is a word!\" );\n\t\t \t\t\tfoundWordsArea.insert( guess + \"\\n\", 0 );\n\t\t \t\t\tfoundWords.add( guess );\n\t\t \t\t\tfoundWordsAmount++;\n\t\t \t\t}\n\t\t \t\telse\n\t\t \t\t{\n\t\t \t\t\tmessagesLabel.setText( guess + \" is not a word!\" );\n\t\t \t\t}\n \t\t\t}\n \t\t}\n \t\t\n \t\t//Always set the word to blank when the press submit word\n \t\tremoveWord();\n \t\t\n \t}\n \telse if( (JButton)source == newWord )\n \t{\n \t\tremoveWord();\n \t}\n \t\n \t//Check all of the grid buttons and see if they were clicked\n \tfor( int i = 0; i < BOARD_SIZE; i++ )\n \t{\n \t\tfor( int j = 0; j < BOARD_SIZE; j++ )\n \t\t{\n \t\t\tif( (JButton)source == gridButtons[i][j] )\n \t\t\t{\n \t\t\t\tif( ( ( lastRow != -1 && lastColumn != -1 ) && ( Math.abs( lastRow - i ) <= 1 && Math.abs( lastColumn - j ) <= 1 && !used[i][j] ) )\n \t\t\t\t\t\t|| ( lastRow == -1 && lastColumn == -1 ) )\n \t\t\t\t{\n\t \t\t\t\t\tguessWordArea.insert( Character.toString( g.charAt( i, j ) ), guess.length() );\n\t \t\t\t\t\tguess += g.charAt( i, j );\n\t \t\t\t\t\tlastRow = i;\n\t \t\t\t\tlastColumn = j;\n\t \t\t\t\tused[i][j] = true;\n\t \t\t\t\tgridButtons[i][j].setBackground( new Color( 122, 122, 122 ) );\n \t\t\t\t}\n \t\t\t\telse\n\t\t\t\t\t\tJOptionPane.showMessageDialog( null, \"Invalid move\" );\n \t\t\t\t\n \t\t\t\t//There is only one button that could have been clicked\n \t\t\t\tbreak;\n \t\t\t}\n \t\t}\n \t}\n }",
"public void advanceGame() {\n\t\tthis.status = Status.Active;\n\t\tthis.currentSuggestion = null;\n\t\tfor(User u : this.players) {\n\t\t\tu.availableActions.remove(ACTION.Wait);\n\t\t\tu.availableActions.remove(ACTION.Disprove);\n\t\t}\n\t\t\n\t\t// Next player can always move\n\t\tUser nextPlayer = null;\n\t\tdo {\n\t\t\tnextPlayer = getFollowingPlayer(this, this.getCurrentPlayer());\n\t\t\tif (nextPlayer.isActive) {\n\t\t\t\tnextPlayer.availableActions.add(ACTION.Move);\n\t\t\t\tif (this.board.getLocation(nextPlayer.character).isRoom) {\n\t\t\t\t\tnextPlayer.availableActions.add(ACTION.Accuse);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcurrentMove++;\n\t\t} while (!nextPlayer.isActive);\n\t\t\n\t\tif (activeUserCount(this) == 1) {\n\t\t\t// Last player remaining is the winner (by default)\n\t\t\tthis.status = Status.Complete;\n\t\t\tmessages.add(String.format(\"[ %s ] has won the game (by default)!\", nextPlayer.name));\n\t\t}\n\t}",
"void addSimultaneousEvent(GameEvent event);",
"@Override\n\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\tsuper.mousePressed(e);\n\t\t\tint key = e.getButton();\n\t\t\tint y = e.getY();\n\t\t\tif (key == MouseEvent.BUTTON3 && y < Constants.BOTTOM - 40) {\n\t\t\t\tif (!isGamePaused && isGameActive) {\n\t\t\t\t\tpauseGame(\"PAUSE\");\n\t\t\t\t\tpaintThread.suspendThread(50);\n\n\t\t\t\t} else if (isGamePaused && isGameActive) {\n\t\t\t\t\tresumeGame();\n\t\t\t\t} else {\n\t\t\t\t\tstartGame();\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"public void actionPerformed (ActionEvent e) {\n\t \t\t\tint currTurn=whosTurn(numPlayers);\n\t \t\t\tremoveAllImages(numPlayers, tile, frame3); \n\t \t\t\tendTurn(numPlayers); //prints out turn ended & next player\n\t \t\t\tif(currTurn==1){ //have to update variable so next player can go\n\t \t\t\t\tturnSeed=2;\n\t \t\t\t}\n\t \t\t\telse {\n\t \t\t\t\tturnSeed=1;\n\t \t\t\t}\n\t \t\t}",
"@Override\r\n\tpublic void keyPressed(KeyEvent e) {\n\t\tif(e.getKeyCode()==e.VK_R){\r\n\t\t\tif(GAME_STATE.equals(\"WON\")) game.setScreen(new StartScreen(game));\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void onBattlePaused(BattlePausedEvent event) {\n\t\tsuper.onBattlePaused(event);\n\t}",
"public void playSoundGameWon() {\n\t\tcompletedGameSound.play();\n\t}",
"private void resume() { player.resume();}",
"public abstract void onLostGame();",
"private void randomEventPhase() {\n ClickObserver.getInstance().setTerrainFlag(\"RandomEvents\");\n ArrayList<Piece> randomEvents = new ArrayList<Piece>();\n\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n Game.getHelpText().setText(\"Random Event Phase. Players may now play 1 Random Event from their racks.\");\n }\n });\n\n try { Thread.sleep(2000); } catch(Exception e) { return; }\n\n for (Player p : playerList) {\n player = p;\n doneClicked = false;\n ClickObserver.getInstance().setActivePlayer(player);\n\n pause();\n\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n TheCupGUI.update();\n Game.getRackGui().setOwner(player);\n }\n });\n\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n Game.getHelpText().setText(player.getName() + \", you may now play one of your Random Events.\");\n }\n });\n\n while (isPaused) {\n while (!doneClicked) {\n if (randomEventFlag) {\n System.out.println(randomEvent.getName());\n ((RandomEvent)randomEvent).performAbility();\n break;\n }\n \n try { Thread.sleep(100); } catch( Exception e ){ return; }\n }\n try { Thread.sleep(100); } catch( Exception e ){ return; }\n }\n randomEventFlag = false;\n randomEvent = null;\n }\n ClickObserver.getInstance().setTerrainFlag(\"\"); \n }",
"@Override\n protected void onResume() {\n super.onResume();\n Log.d(TAG, \"onResume\");\n\n game();\n }",
"public void finishGame(){\r\n\t\t\t\tgameStarted = false;\r\n\t\t\t}",
"@Override\n protected void result(Object object) {\n gamePaused = false;\n }",
"@Override\n protected void result(Object object) {\n gamePaused = false;\n }",
"private void resume()\r\n {\r\n player.resume();\r\n }"
]
| [
"0.67710054",
"0.6724244",
"0.6688027",
"0.6669019",
"0.65893453",
"0.6588405",
"0.6579742",
"0.6549639",
"0.6549639",
"0.65408736",
"0.6443054",
"0.64310735",
"0.6330328",
"0.6322294",
"0.6321139",
"0.6318528",
"0.63175577",
"0.6309456",
"0.62998515",
"0.62977016",
"0.62739927",
"0.6245106",
"0.62449324",
"0.62430924",
"0.62273145",
"0.6207526",
"0.6202169",
"0.6202169",
"0.61949766",
"0.6147177",
"0.6144706",
"0.61309975",
"0.61135393",
"0.61135393",
"0.61135393",
"0.61112696",
"0.6109583",
"0.6102868",
"0.61017007",
"0.60990465",
"0.6096335",
"0.6089307",
"0.6063041",
"0.6063041",
"0.60548663",
"0.6050135",
"0.60425276",
"0.6038053",
"0.6037753",
"0.60346806",
"0.603339",
"0.6033335",
"0.60303545",
"0.60285795",
"0.6017031",
"0.601555",
"0.6011296",
"0.599794",
"0.599",
"0.5985713",
"0.5970475",
"0.5970457",
"0.5966059",
"0.5955154",
"0.5954154",
"0.5951353",
"0.59408844",
"0.5939964",
"0.5939551",
"0.5927613",
"0.5927572",
"0.59262854",
"0.59175724",
"0.5912156",
"0.5909558",
"0.5900925",
"0.58968437",
"0.58968073",
"0.5893358",
"0.58821785",
"0.58793",
"0.58769405",
"0.5869161",
"0.5869083",
"0.5864525",
"0.5854355",
"0.5851081",
"0.5850916",
"0.5847971",
"0.5847678",
"0.5845305",
"0.5844861",
"0.5844432",
"0.58365726",
"0.5831226",
"0.58303624",
"0.58269846",
"0.58259225",
"0.58259225",
"0.58199966"
]
| 0.7324746 | 0 |
/ Method that allows to call the method pauseGame() through an event. | @FXML
public void pauseGame(ActionEvent event) {
gz.pauseGame();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void pauseGame() {\n myGamePause = true;\n }",
"void pauseGame() {\n myShouldPause = true;\n }",
"void pauseGame() {\n myShouldPause = true;\n }",
"@Override\n\tpublic void pause() \n\t{\n\t\tif (state_Game==GAME_READY) \n\t\t{\n\t\t\tstate_Game=GAME_PAUSED;\n\t\t}\n\t}",
"@Override\n\tpublic void pause() {\n\t\tGdx.app.log(\"GameScreen\", \"pause called\");\n\t}",
"private void pause() { player.pause();}",
"public static void pauseGame() {\r\n\t\tif(paused) {\r\n\t\t\tgui.restoreMenu();\r\n\t\t}else {\r\n\t\t\tgui.setMenu(new PauseMenu(), false);\r\n\t\t}\r\n\t\tpaused = !paused;//flip state\r\n\t}",
"private void pause()\r\n {\r\n player.pause();\r\n }",
"public void pauseGame() {\n paused = true;\r\n cam.zoom = worldWidth/screenWidth;\r\n boundCamera();\r\n topHud.setPauseButtonCanDraw(false);\r\n gameHud.setCanPress(false);\r\n\r\n playButton.setDrawable(!(win || lose));\r\n homeButton.setDrawable(true);\r\n restartButton.setDrawable(true);\r\n\r\n playButton.setCanPress(true);\r\n homeButton.setCanPress(true);\r\n restartButton.setCanPress(true);\r\n\r\n bindInput(pauseProcessors);\r\n\r\n timeGap = centralTimer - timer;\r\n }",
"public abstract void pause();",
"public abstract void pause();",
"void pauseGame() {\n try {\n myGamePause = true;\n myPlayer.stop();\n // when the application pauses the game, resources\n // are supposed to be released, so we close the\n // player and throw it away.\n myPlayer.close();\n myPlayer = null;\n } catch (Exception e) {\n // the music isn't necessary, so we ignore exceptions.\n }\n }",
"private void pauseGame() {\n\t\ttimer.cancel();\n\t}",
"protected void pause(){}",
"public void pause() {\r\n\t\tSystem.out.println(\"Paused game\");\r\n\t\tthis.timeline.pause();\r\n\t\tisPaused = true;\r\n\t\tpauseMenu.setVisible(true);\r\n\t}",
"@Override\n public void pause() {\n Gdx.app.log(TAG, \"Paused\");\n }",
"@Override\n\tpublic void pause() {\n\t\tAction(Director.ACTION_PAUSE);\n\t}",
"protected abstract boolean pause();",
"public void pause() {\r\n\t\tif (logger.isDebugEnabled())\r\n\t\t\tlogger.debug(\"Pause\");\r\n\t\t\r\n\t\t// Start game\r\n\t\tif (state == GameState.CREATED) {\r\n\t\t\t// Change state\r\n\t\t\tstate = GameState.PAUSED;\r\n\t\t\t\r\n\t\t\t// Start scheduling thread\r\n\t\t\tstart();\r\n\t\t} else if (state != GameState.STOPPED) {\r\n\t\t\t// Change state\r\n\t\t\tstate = GameState.PAUSED;\r\n\t\t}\r\n\t}",
"public void pauseGame(boolean state) {\r\n paused = state;\r\n }",
"public void pause() {\n }",
"public void pause() {}",
"public void pause();",
"public void pause();",
"public void pause();",
"public void pause_press(View view){\n //blur background\n blurEffect();\n //pause the game\n if (mSpaceGame.getState() instanceof SpaceGame.PausedGame){\n //mSpaceGame.setState(new SpaceGame.RunningGame());\n }else {\n mSpaceGame.setState(SpaceGame.PAUSED_STATE);\n }\n //start popup window\n Intent i = new Intent(SpaceActivity.this,Pop.class);\n i.putExtra(\"insignal\",\"pause\");\n startActivityForResult(i,0);\n overridePendingTransition(R.anim.zoom_in,R.anim.zoom_out);\n }",
"public void pauseAndContinue(){\n if(gamePaused == true){ return; }\n gamePaused = true;\n timeRuunableThread.setPause(gamePaused);\n music.stopPlayingAudio(\"All\");\n jf_Pause = new JFrame(\"Game is paused\");\n jf_Pause.setSize(new Dimension(350, 120));\n jf_Pause.setLocation(400, 400);\n jf_Pause.setBackground(PauseColor);\n jf_Pause.setLayout(new GridLayout(2, 1));\n JLabel jl_Pause = new JLabel(\" Game is paused; click button or press ESC to continue.\");\n JPanel jp_Pause = new JPanel();\n JButton jb_Pause = new JButton(\"Continue\");\n jb_Pause.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent actionEvent) {\n gamePaused = false;\n if(muteMusic == false){\n music.playAudio(\"LevelMusic\");\n }\n musicName = \"LevelMusic\";\n timeRuunableThread.setPause(gamePaused);\n jf_Pause.dispose();\n }\n });\n\n jb_Pause.addKeyListener(new KeyListener() {\n @Override\n public void keyTyped(KeyEvent keyEvent) { }\n\n @Override\n public void keyPressed(KeyEvent e) {\n if(e.getKeyCode() == KeyEvent.VK_ESCAPE){\n gamePaused = false;\n timeRuunableThread.setPause(gamePaused);\n jf_Pause.dispose();\n if(muteMusic == false){\n music.playAudio(musicName);\n }\n }\n }\n\n @Override\n public void keyReleased(KeyEvent keyEvent) { }\n });\n jp_Pause.add(jb_Pause);\n jf_Pause.add(jl_Pause);\n jf_Pause.add(jp_Pause);\n jf_Pause.addKeyListener(new KeyListener() {\n @Override\n public void keyTyped(KeyEvent e) {\n if(e.getKeyCode() == KeyEvent.VK_ESCAPE){\n gamePaused = false;\n timeRuunableThread.setPause(gamePaused);\n jf_Pause.dispose();\n }\n }\n\n @Override\n public void keyPressed(KeyEvent keyEvent) { }\n\n @Override\n public void keyReleased(KeyEvent keyEvent) { }\n });\n jf_Pause.setVisible(true);\n jf_Pause.setFocusable(false);\n }",
"@Test\n\tpublic void testPauseGame() {\n\t\t\n\t\tSystem.out.println(\"\\nTest case : Game paused (alert window shown)\");\n\n\t\tWorld test = new StageScene() ;\n\t\t\n\t\ttest.start() ;\n\t\t\n\t\t((StageScene) test).playStageMusic();\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\ttest.fireEvent(new KeyEvent(KeyEvent.KEY_PRESSED,KeyCode.ESCAPE.toString(), KeyCode.ESCAPE.toString(), KeyCode.ESCAPE, false, false, false, false));\n\t\t} catch (IllegalStateException e) {\n\t\t\t\n\t\t\tSystem.out.println(\"IllegalStateException is thrown\");\n\t\t\tSystem.out.println(\"Alert window is detected , game is paused\");\n\t\t}\n\t}",
"protected abstract void onPause();",
"private void btnPauseActionPerformed(java.awt.event.ActionEvent evt) {\n pause();\n }",
"@Override\n protected void onPause() {\n super.onPause();\n\n // Tell the gameView pause method to execute\n gameView.pause();\n }",
"@Override\n protected void onPause() {\n super.onPause();\n\n // Tell the gameView pause method to execute\n gameView.pause();\n }",
"@Override\n protected void onPause() {\n super.onPause();\n\n // Tell the gameView pause method to execute\n gameView.pause();\n }",
"public static void pauseGame() {\r\n\t\tfor (MovingUnit mu : _players) {\r\n\t\t\t((WinningInterface) mu).pauseUnit();\r\n\t\t}\r\n\t}",
"public void pausePlayer(){\n this.stopRadio();\n }",
"@Override\n protected void onPause() {\n super.onPause();\n\n //Execute the game view's pause method\n gameEngine.pause();\n }",
"public void pauseApp()\r\n\t{\n\t}",
"public void Pause();",
"public void pause() {\n\t\tpostEvent(new IpcEvent(SimulationEvents.EVENT_TYPE_PAUSE, this, null));\n\t}",
"public void pauseGames(){\n for(Game g:Games){\n if(g.pause)\n g.pause=false;\n else\n g.pause=true;\n }\n }",
"public void pause() {\n running = false;\n try {\n gameThread.join();\n } catch (InterruptedException e) {\n // Error\n }\n }",
"public void pauseXlet()\n {\n //(...)\n }",
"synchronized void resumeGame() {\n myGamePause = false;\n this.notify();\n }",
"@Override\n\tpublic void pause() \n\t{\n\n\t}",
"@Override\n\tpublic void pause()\n\t{\n\n\t}",
"synchronized void resumeGame() {\n myShouldPause = false;\n notify();\n }",
"synchronized void resumeGame() {\n myShouldPause = false;\n notify();\n }",
"public void pause() {\r\n\t}",
"public void onPauseButtonClick(View view) {\n\t\tLog.i(LOG_TAG, \"onPauseButtonClick\");\n\t\t\n\t\tif(!this.gameController.isTimerStarted()) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tfinal long timeLeft = this.gameController.getTimerDurationRemaining();\n\t\tthis.gameController.pauseTimer();\n\n\t\tDialogInterface.OnClickListener dialogClickListener = new DialogInterface.OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\n\t\t\t\tgameController.restartTimer(timeLeft);\n\t\t\t}\n\t\t};\n\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n\n\t\tLayoutInflater inflater = this.getLayoutInflater();\n\n\t\tbuilder.setView(inflater.inflate(R.layout.dialog_paused_game, null))\n\t\t\t\t.setPositiveButton(\"OK\", dialogClickListener);\n\n\t\tbuilder.setCancelable(false);\n\n\t\tbuilder.show();\n\t}",
"@Override\n\tpublic void onBattlePaused(BattlePausedEvent event) {\n\t\tsuper.onBattlePaused(event);\n\t}",
"void gameResumed();",
"@Override\n\tpublic void pause() {\n\t\t\n\t}",
"@Override\n\tpublic void pause() {\n\t\t\n\t}",
"@Override\n\tpublic void pause() {\n\t\t\n\t}",
"@Override\n\tpublic void pause() {\n\t\t\n\t}",
"@Override\n\tpublic void pause() {\n\t\t\n\t}",
"@Override\n\tpublic void pause() {\n\t\t\n\t}",
"@Override\n\tpublic void pause() {\n\t\t\n\t}",
"@Override\n\tpublic void pause() {\n\t\t\n\t}",
"@Override\n\tpublic void pause() {\n\t\t\n\t}",
"@Override\n\tpublic void pause() {\n\t\t\n\t}",
"@Override\n\tpublic void pause() {\n\t\t\n\t}",
"@Override\n\tpublic void pause() {\n\t\t\n\t}",
"@Override\n\tpublic void pause() {\n\t\t\n\t}",
"@Override\n\tpublic void pause() {\n\t\t\n\t}",
"@Override\n\tpublic void pause() {\n\t\t\n\t}",
"@Override\n\tpublic void pause() {\n\t\t\n\t}",
"@Override\n\tpublic void pause() {\n\t\t\n\t}",
"@Override\n\tpublic void pause() {\n\t\t\n\t}",
"@Override\n\tpublic void pause() {\n\t\t\n\t}",
"@Override\n\tpublic void pause() {\n\t\t\n\t}",
"@Override\n\tpublic void pause() {\n\t\t\n\t}",
"@Override\n\tpublic void pause() {\n\t\t\n\t}",
"@Override\n\tpublic void pause() {\n\t\t\n\t}",
"@Override\n\tpublic void pause() {\n\t\t\n\t}",
"@Override\n\tpublic void pause() {\n\t\t\n\t}",
"@Override\n\tpublic void pause() {\n\t\t\n\t}",
"@Override\n\tpublic void pause() {\n\t\t\n\t}",
"void pause();",
"void pause();",
"void pause();",
"void pause();",
"@Override\r\n public void pause() {}",
"@Override\r\n public void pause() {\r\n\r\n }",
"@Override\r\n public void pause() {\r\n\r\n }",
"@Override\n\tpublic void pause() {\n\t}",
"@Override\n\tpublic void pause() {\n\t}",
"@Override\n\tpublic void pause() {\n\t}",
"@Override\n\tpublic void pause() {\n\t}",
"@Override\n\tpublic void pause() {\n\t}",
"@Override\n\tpublic void pause() {\n\t}",
"@Override\n\tpublic void pause() {\n\t}",
"@Override\r\n public void pause() {\n }",
"@Override\r\n public void pause() {\n }",
"@Override\r\n public void pause() {\n }",
"@Override\n public void pause() {\n }",
"@Override\n public void pause() {\n }",
"@Override\n public void pause() {\n }",
"@Override\n public void pause() {\n }",
"@Override\n public void pause() {\n }"
]
| [
"0.7641623",
"0.74371165",
"0.74371165",
"0.723334",
"0.722979",
"0.71654516",
"0.71309996",
"0.7097211",
"0.70635486",
"0.69715184",
"0.69715184",
"0.68742967",
"0.6865858",
"0.68605345",
"0.6856649",
"0.6837482",
"0.68161327",
"0.677994",
"0.6768102",
"0.6747122",
"0.67084706",
"0.6692478",
"0.6686752",
"0.6686752",
"0.6686752",
"0.66722983",
"0.6671261",
"0.66569364",
"0.6654352",
"0.66493434",
"0.66479826",
"0.66479826",
"0.66479826",
"0.66381764",
"0.66030556",
"0.6599598",
"0.6582198",
"0.6581442",
"0.6570638",
"0.6545373",
"0.65376776",
"0.6531824",
"0.6530951",
"0.6523777",
"0.6520102",
"0.6511242",
"0.6511242",
"0.647237",
"0.64687973",
"0.64669716",
"0.64552706",
"0.6443714",
"0.6443714",
"0.6443714",
"0.6443714",
"0.6443714",
"0.6443714",
"0.6443714",
"0.6443714",
"0.6443714",
"0.6443714",
"0.6443714",
"0.6443714",
"0.6443714",
"0.6443714",
"0.6443714",
"0.6443714",
"0.6443714",
"0.6443714",
"0.6443714",
"0.6443714",
"0.6443714",
"0.6443714",
"0.6443714",
"0.6443714",
"0.6443714",
"0.6443714",
"0.6443714",
"0.6442454",
"0.6442454",
"0.6442454",
"0.6442454",
"0.6436216",
"0.6422367",
"0.6422367",
"0.6412824",
"0.6412824",
"0.6412824",
"0.6412824",
"0.6412824",
"0.6412824",
"0.6412824",
"0.63979936",
"0.63979936",
"0.63979936",
"0.63944435",
"0.63944435",
"0.63944435",
"0.63944435",
"0.63944435"
]
| 0.74369884 | 3 |
/ Method that allow to set an object of Canvas type. | public void setGameZone(GameZone gz) {
this.gz = gz;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setCanvas(Canvas canvas) {\r\n\t\tthis.canvas = canvas;\r\n\t}",
"public interface Canvas {\n\tpublic String LABEL_CHANGE = \"label_change_property\";\n\t/**\n\t * @return name of Canvas or an empty String by default. MAY NOT BE NULL.\n\t */\n\tpublic String getName();\n\t/**\n\t * @return color of Canvas or null by default\n\t */\n\tpublic Color getColor();\n\t/**\n\t * @return the JComponent representation of this Canvas. MAY NOT BE NULL.\n\t */\n\tpublic JComponent getJComponent();\n\t/**\n\t * If this canvas is to be highlighted (because it might\n\t * have focus for example), then getHighlight should return\n\t * the color of that highlight. Otherwise, it should\n\t * return null\n\t * @return highlighting color or null by default.\n\t */\n\tpublic Color getHighlight();\n}",
"@Override\n\tpublic void setPaintType(int type) {\n\t\tthis.shapeType = type;\n\t}",
"public void setGuiObject(Object guiObject);",
"public final native void setType(String type) /*-{\n this.setType(type);\n }-*/;",
"public void setCanvas(GameCanvas canvas) {\n\t\tthis.canvas = canvas;\n\t\tthis.scale.x = canvas.getWidth()/bounds.getWidth();\n\t\tthis.scale.y = canvas.getHeight()/bounds.getHeight();\n\t}",
"public void setType(Object type)\r\n {\r\n\tthis.type = type;\r\n }",
"public GateCanvas(int type_param)\n {\n super();\n // setBackgroundColor( );\n type = type_param;\n inverted = false;\n // setSize(24, 24);\n setVisible(true);\n }",
"public abstract void mo3995a(Canvas canvas);",
"public abstract void mo3997b(Canvas canvas);",
"public abstract void mo3998c(Canvas canvas);",
"public void setType(ShapeType ty) {\n\t\t\ttype.set(ty);\n\t\t}",
"public void setCanvasPane(CanvasPane cp) {\n if(cp instanceof GraphPane) {\n super.setCanvasPane(cp);\n }\n else {\n String err = \"samJGraph can only except display panes of type GraphPane.\";\n throw (new IllegalArgumentException(err));\n }\n }",
"@Override\n public void setObject(Object arg0)\n {\n \n }",
"@Override\n\tpublic void setType(Type t) {\n\t\theldObj.setType(t);\n\t}",
"public void setBrushType(BrushType brushType){\r\n _brushType = brushType;\r\n }",
"public void setBrushType(BrushType brushType){\r\n _brushType = brushType;\r\n }",
"public void setObject(T object)\n\t{\n\t\tthis.object = object;\n\t}",
"private void newCanvas() {\n\t\timgCanvas = new ImageCanvas(1000, 563);\n\t\t//canvasJP.add(imgCanvas);\n\t}",
"public CanvasAWT(Graphics2D graphic){\r\n\t\ttarget = graphic;\r\n\t}",
"private void setSoftwareLayerType()\r\n {\r\n if (setLayerTypeMethod == null)\r\n return;\r\n\r\n try {\r\n int LAYER_TYPE_SOFTWARE = View.class.getField(\"LAYER_TYPE_SOFTWARE\")\r\n .getInt(new View(getContext()));\r\n setLayerTypeMethod.invoke(this, LAYER_TYPE_SOFTWARE, null);\r\n }\r\n catch (Exception e) {\r\n Log.w(\"SVGImageView\", \"Unexpected failure calling setLayerType\", e);\r\n }\r\n }",
"public void setClassObject(Object obj)\n\n {\n\n this.classObject = obj;\n\n }",
"void setType(Type type)\n {\n this.type = type;\n }",
"public abstract void setType();",
"public Canvas getCanvas(){\n return canvas;\n }",
"void drawOnCanvas(@NonNull Canvas canvas) ;",
"@Test\n public void testGetSetType()\n {\n try\n {\n Square s = new Square();\n\n assertEquals(Square.squareType.REGULAR, s.getType());\n\n s.setType(Square.squareType.DB_WORD);\n assertEquals(Square.squareType.DB_WORD, s.getType());\n\n s.setType(Square.squareType.DB_LETTER);\n assertEquals(Square.squareType.DB_LETTER, s.getType());\n\n s.setType(Square.squareType.STAR);\n assertEquals(Square.squareType.STAR, s.getType());\n\n s.setType(Square.squareType.TR_WORD);\n assertEquals(Square.squareType.TR_WORD, s.getType());\n\n s.setType(Square.squareType.TR_LETTER);\n assertEquals(Square.squareType.TR_LETTER, s.getType());\n }\n catch(Exception ex)\n {\n ex.printStackTrace();\n fail(\"No exception should be thrown when setting the type of the object\");\n }\n }",
"public void\t\tsetConfiguration(Object obj);",
"public void setType(Type t) {\n type = t;\n }",
"@Override\r\n\tpublic void draw(final Canvas canvas) {\n\r\n\t}",
"protected void setTypeId(String typeId) {\n\t\tcontext.getElement().setAttribute(\"typeId\", \"org.csstudio.opibuilder.widgets.\" + typeId);\n\t}",
"public void setBrushType(BrushType brushType) {\r\n _brushType = brushType;\r\n }",
"public\tvoid setobject(object obj) {\r\n\t\t oop.value=obj.value;\r\n\t\t oop.size=obj.size;\r\n\t\t \r\n\t}",
"public Canvas(IFramework framework) {\r\n\t this.framework = framework;\r\n\t this.data = framework.getData();\r\n\t this.maxRatio = framework.getDisplayMenu().getMaxRatioScale();\r\n\t this.minRatio = framework.getDisplayMenu().getMinRatioScale();\r\n\t}",
"public T set(T obj);",
"public void setObject(XSerial obj);",
"public void setObjectClass(Class objectAPI)\n {\n _objectClass = objectAPI;\n }",
"public void setChartType(ChartType chartType) {\r\n setAttribute(\"chartType\", chartType == null ? null : chartType.getValue(), true);\r\n }",
"protected abstract void setShapes();",
"@Override\n public void draw(ItemObjectType itemType) {\n GraphicsContext gc = myCanvas.getGraphicsContext2D();\n int width = (int)myCanvas.getWidth();\n int height = (int)myCanvas.getHeight();\n switch (myType){\n case PIT:\n gc.clearRect(0,0,width,height);\n gc.drawImage(mainView.imageLoader.getImage(\"pit\", width,height),0,0);\n break;\n case CLOSEDDOOR:\n gc.clearRect(0,0,width,height);\n gc.drawImage(mainView.imageLoader.getImage(\"closeddoor\", width,height),0,0);\n break;\n case OPENEDDOOR:\n gc.clearRect(0,0,width,height);\n gc.drawImage(mainView.imageLoader.getImage(\"openeddoor\", width,height),0,0);\n break;\n case SCALE:\n gc.clearRect(0,0,width,height);\n gc.drawImage(mainView.imageLoader.getImage(\"scale_floor\", width,height),0,0);\n gc.drawImage(mainView.imageLoader.getImage(\"scale\", width/2.0,height/2.0),width/4.0,height/4.0);\n break;\n case WALL:\n gc.clearRect(0,0,width,height);\n gc.drawImage(mainView.imageLoader.getImage(\"wall\", width,height),0,0);\n break;\n case SPECIALWALL:\n gc.clearRect(0,0,width,height);\n gc.drawImage(mainView.imageLoader.getImage(\"specialwall\", width,height),0,0);\n break;\n case FLOOR:\n gc.clearRect(0,0,width,height);\n gc.drawImage(mainView.imageLoader.getImage(\"floor\", width,height),0,0);\n break;\n default:\n System.out.println(\"Gond van a kirajzolasnal\");\n break;\n }\n\n if(itemType != null) {\n switch (itemType) {\n case BOX:\n gc.drawImage(mainView.imageLoader.getImage(\"box\", width / 2.0, height / 2.0), width / 4.0, height / 4.0);\n break;\n case ZPM:\n gc.drawImage(mainView.imageLoader.getImage(\"zpm\", width, height), 0, 0);\n break;\n default:\n\n break;\n }\n }\n }",
"public ColourBinPanel(CameraCanvas canvas)\r\n\t{\r\n\t\tmCameraCanvas = canvas;\r\n\t\tmBinSet = new FeatureWidgetRadioManager();\r\n\t}",
"public void setType(String type);",
"public void setType(String type);",
"public void setType(String type);",
"public void b(Canvas paramCanvas) {\n }",
"void setObject(int index, Object value, int sqlType, int scale)\n throws SQLException;",
"void setGraphicsCreator(Graphics g, Object creator);",
"public void setObjtype(short newValue) {\n\tthis.objtype = newValue;\n}",
"public void setObject(Object aObject) {\r\n\t\tthis.object = aObject;\r\n\t}",
"public void setShapeType(ShapeType shapeType) {\n }",
"public SignalCanvas() {\n\t\tsuper();\n\t}",
"void setObjectType(String objectType);",
"public void setObject(Object obj) {\n\tObject bean = ((AxBridgeObject)obj).getJavaObject();\n\ttry {\n\t Class cls = bInfo.getBeanDescriptor().getCustomizerClass();\n\t if(cls != null) {\n\t\tcustomizer = (Customizer)cls.newInstance();\n\t\tcomp = (Component)customizer;\n\t\tcustomizer.setObject(bean);\n\t }\n\t \n\t //If no customizer, try property editors\n\t if(comp == null) {\n\t\tPropertyDescriptor[] pds = bInfo.getPropertyDescriptors();\n\t\tfor(int i=0;i<pds.length;i++) {\n\t\t cls = pds[i].getPropertyEditorClass();\n\t\t if(cls != null) {\n\t\t\t//System.out.println(cls.toString() + i);\n\t\t\tpropEditor = (PropertyEditor)cls.newInstance();\n\t\t\tif(propEditor.supportsCustomEditor()) {\n\t\t\t comp = propEditor.getCustomEditor();\n\t\t\t propEditor.setValue(bean);\n\t\t\t break;\n\t\t\t}\n\t\t }\n\t\t}\n\t }\n\t} catch(Throwable e) {\n\t e.printStackTrace();\n\t}\n }",
"public abstract void setContentObject(Object object);",
"public final native void setObjectType(String type) /*-{\n\t\tthis.beanName = type;\n\t}-*/;",
"public void setType( Type type ) {\n assert type != null;\n this.type = type;\n }",
"void setClassType(String classType);",
"public final native void setObjectType(String type) /*-{\n\t\t\tthis.beanName = type;\n\t\t}-*/;",
"@Override\n void draw(Canvas canvas) {\n canvas.drawBitmap(appearance, getX(), getY(), null);\n }",
"public void setType(Class type) {\n\t this.type = type;\n\t }",
"public void setAnyType(java.lang.Object param) {\n this.localAnyType = param;\n }",
"public void setType(Type t) {\n\t\ttype = t;\n\t}",
"public ImageCanvas() {\r\n super();\r\n }",
"void setDataType(int type );",
"public void associate(Object obj, Class type);",
"private EnlargeCanvas() {\n }",
"@Override\n\tpublic void draw(Canvas canvas) {\n\n\t}",
"public void setClazz(String clazz);",
"public void setShape(Info shape) {\n \n }",
"@Override\n public void setWidget(Object arg0)\n {\n \n }",
"void setType(java.lang.String type);",
"@JsProperty(name = \"type\")\n public native void setType(String value);",
"interface DrawingController {\n \n public void redraw(Graphics g);\n \n public void setCanvas(DrawingCanvas canvas); \n}",
"void setRendererType(String rendererType);",
"@JSProperty(\"type\")\n void setType(Type value);",
"public void setType(type type) {\r\n\t\tthis.Type = type;\r\n\t}",
"public CanvasEditor(Shape initialShape) { //shape constructor\n\t\t\n\t\tthis.currentShape = initialShape;\n\t\t\n\t\t\n\t}",
"public void setType(String name){\n\t\ttype = name;\n\t}",
"public interface CanvasLite {\n public void drawRect(float l, float t, float r, float b, Paint paint);\n public void drawCircle(float x, float y, float r, Paint paint);\n public void drawColor(int color, PorterDuff.Mode mode);\n public void drawBitmap(Bitmap bitmap, Rect src, RectF dst, Paint paint);\n public void drawBitmap(Bitmap bitmap, Matrix matrix, Paint paint);\n\n public void drawTo(Canvas drawCanvas, float left, float top, Paint paint, boolean dirtyOnly);\n public Bitmap toBitmap();\n public void recycleBitmaps();\n public int getWidth();\n public int getHeight();\n}",
"public void setShapes(Object shapes) {\r\n this.shapes = shapes;\r\n }",
"protected void setJavaClass(Class type) {\n this._class = type;\n }",
"public Canvas getCanvas()\n {\n return canvas;\n }",
"public void setStaticType(Class type);",
"@Override\r\n public void setObject(String object) {\n }",
"public void setMode(final int type) {\r\n\t\tif (current != null) {\r\n\t\t\tcurrent.setMode(type);\r\n\t\t\telementView.repaint();\r\n\t\t\tnotifyModificationListeners();\r\n\t\t}\r\n\t}",
"@Override\n public void setLayerType(int layerType, android.graphics.Paint paint) {\n super.setLayerType(layerType, paint);\n }",
"@Override\n\tpublic void draw(Canvas canvas) {\n\t\t\n\t}",
"public void set_as_bezier() {\n surface_type = 1;\n }",
"public void setObjectClass(Class objectClass) {\n this.objectClass = objectClass;\n }",
"public void setDrawingCap(CAP cap);",
"@Override\n\tpublic void update(MySubject sb) {\n\t\tcanvas = (MyCanvas) sb;\n\n\t}",
"GameCanvas getCanvas();",
"final public void setType(String type)\n {\n setProperty(TYPE_KEY, (type));\n }",
"@Override\n\tpublic void setValue(Object object) {\n\n\t}",
"void setObject(String id, Object data);",
"public void setOwner(RMParentShape anObj) { _owner = anObj; }",
"public void setType(Type type){\n\t\tthis.type = type;\n\t}",
"public void draw(Canvas canvas);",
"public void draw(Canvas canvas);",
"CallbackCanvas(Life3D midlet) {\n mymidlet = midlet;\n }",
"@Override\n\tpublic void setValue(Object object) {\n\t\t\n\t}"
]
| [
"0.67079884",
"0.5946625",
"0.5853167",
"0.5847403",
"0.5708568",
"0.5689498",
"0.5580337",
"0.55756015",
"0.5543585",
"0.55194885",
"0.5512037",
"0.5450745",
"0.544701",
"0.5446701",
"0.54364157",
"0.5435789",
"0.5435789",
"0.5404306",
"0.5353601",
"0.5346063",
"0.53363234",
"0.53023857",
"0.5296376",
"0.52840626",
"0.5274627",
"0.5272888",
"0.52592105",
"0.52555805",
"0.5252527",
"0.5248305",
"0.52309895",
"0.5213134",
"0.5193189",
"0.5189472",
"0.5185444",
"0.51804125",
"0.51570255",
"0.51459455",
"0.51413447",
"0.51335317",
"0.5121919",
"0.5118985",
"0.5118985",
"0.5118985",
"0.5116969",
"0.5116642",
"0.5116461",
"0.511538",
"0.5111124",
"0.5110242",
"0.5109781",
"0.5103816",
"0.5100828",
"0.50922847",
"0.5091268",
"0.50887144",
"0.50822556",
"0.508024",
"0.5079126",
"0.50751203",
"0.50747114",
"0.50732285",
"0.507287",
"0.5048859",
"0.5040953",
"0.50318086",
"0.5029005",
"0.5028358",
"0.50236505",
"0.49972728",
"0.49951795",
"0.4992688",
"0.4989427",
"0.4980257",
"0.4978538",
"0.4970825",
"0.49644804",
"0.49639797",
"0.49590302",
"0.49541596",
"0.49510264",
"0.49474704",
"0.49404708",
"0.49280208",
"0.49260345",
"0.49182877",
"0.49173626",
"0.49112302",
"0.49071884",
"0.49071467",
"0.49054465",
"0.49038848",
"0.49019933",
"0.4883559",
"0.4878594",
"0.486386",
"0.4861513",
"0.4859863",
"0.4859863",
"0.48581594",
"0.48550907"
]
| 0.0 | -1 |
Singleton mySingleton = new Singleton.getInstance(); | public static void main(String[] args) {
Singleton mySingleton = new Singleton();
mySingleton.getInstance();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static void useSingleton(){\n\t\tSingleton singleton = Singleton.getInstance();\n\t\tprint(\"singleton\", singleton);\n\t}",
"private Singleton(){\n }",
"private Singleton(){}",
"private Singleton() { }",
"public static Singleton getInstance( ) {\n return singleton;\n }",
"public static Singleton getInstance( ) {\n return singleton;\n }",
"private SingletonSample() {}",
"public static MySingleton getInstance() {\r\n\t\tif(instance==null){\r\n\t\t\tinstance= new MySingleton();\r\n\t\t}\r\n\t\treturn instance;\r\n\t}",
"public static synchronized Singleton getInstance(){\n if(instance == null){\n instance = new Singleton();\n }\n return instance;\n }",
"private Singleton() {\n\t}",
"public static Singleton getInstance(){\n if(instance == null)\n {\n synchronized (Singleton.class) {\n if (instance == null) {\n instance = new Singleton();\n Log.d(\"***\", \"made new Singleton\");\n }\n }\n }\n return instance;\n }",
"public static synchronized Singleton getInstance() {\n\t\tif(instance ==null) {\n\t\t\tinstance= new Singleton();\n\t\t\t\n\t\t}\n\t\treturn instance;\n\t}",
"public static Singleton getInstance() {\t\t//getInstance nam omogucava da instanciramo klasu jedinstveno ako vec nismo!\r\n\t\tif (instance == null) {\t\t\t\t\t// inace nam vraca instancu ako je vec napravljena!\r\n\t\t\tinstance = new Singleton();\r\n\t\t}\r\n\t\treturn instance;\r\n\t}",
"private Singleton()\n\t\t{\n\t\t}",
"public static Singleton getInstance() {\n return SingletonHolder.SINGLETON_INSTANCE;\n }",
"private MySingleton() {\r\n\t\tSystem.out.println(\"Only 1 object will be created\");\r\n\t}",
"public static Singleton getInstance() {\n return mSing;\n }",
"private SingletonObject() {\n\n\t}",
"public static Singleton getInstance() {\n\t\tif (_instance == null) {\n\t\t\t_instance = new Singleton();\n\t\t}\n\t\treturn _instance;\n\t}",
"private SingletonEager(){\n \n }",
"public static Singleton getInstance() {\n if (instance == null) {\n synchronized (Singleton.class){\n if (instance == null) {\n instance = new Singleton();\n }\n }\n }\n return instance;\n }",
"public static synchronized Singleton getInstanceTS() {\n\t\tif (_instance == null) {\n\t\t\t_instance = new Singleton();\n\t\t}\n\t\treturn _instance;\n\t}",
"public static synchronized SingletonImpl getSingleton() {\n\t\t\n\t\tif(mySingleton == null){\n\t\t\tmySingleton = new SingletonImpl();\n\t\t}\n\t\treturn mySingleton;\n\t}",
"private SingletonSigar(){}",
"private LoggerSingleton() {\n\n }",
"public static Singleton print(String param)\n {\n return new Singleton();\n}",
"private SingletonDoubleCheck() {}",
"private J2_Singleton() {}",
"public static LazyInitializedSingleton getInstance(){ // method for create/return Object\n if(instance == null){//if instance null?\n instance = new LazyInitializedSingleton();//create new Object\n }\n return instance; // return early created object\n }",
"private LazySingleton(){}",
"private static void createSingletonObject() {\n\t\tSingleton s1 = Singleton.getInstance();\n\t\tSingleton s2 = Singleton.getInstance();\n\n\t\tprint(\"S1\", s1);\n\t\tprint(\"S2\", s2);\n\t}",
"private Singleton() {\n if (instance != null){\n throw new RuntimeException(\"Use getInstance() to create Singleton\");\n }\n }",
"public static Singleton getInstance()\r\n\t{\r\n\t\t// check if the instance is already created or not, required only for lazy init\r\n\t\tif (instance == null)\r\n\t\t\tinstance = new Singleton();\r\n\t\treturn instance;\r\n\t}",
"public static SingletonEager get_instance(){\n }",
"public static Singleton getInstance() {\n\t //Je-li promenna instance null, tak se vytvori objekt\n\t if (instance == null) {\n\t instance = new Singleton();\n\t }\n\t //Vratime jedinacka\n\t return instance;\n\t }",
"public static Singleton getInstance() {\n\n if (_instance == null) {\n synchronized (Singleton.class) {\n if (_instance == null)\n _instance = new Singleton();\n }\n }\n return _instance;\n }",
"private SingletonH() {\n System.out.println(Thread.currentThread().getName()\n + \": creating SingletonH\");\n }",
"public static synchronized MultiThreadedSingleton getInstance() {\n\t\t//Lazy instantiation using double locking mechanism.\n\t\tif (singleton == null) {\n\t\t\tsynchronized (MultiThreadedSingleton.class) {\n\t\t\t\tif (singleton == null) {\n\t\t\t\t\tsimulateRandomActivity();\n\t\t\t\t\tsingleton = new MultiThreadedSingleton();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tlogger.info(\"created singleton: \" + singleton);\n\t\treturn singleton;\n\t}",
"public static SingleObject getInstance(){\n return instance;\n }",
"public static SingletonClass getInstance() {\n\t\tif(singletonObj == null){\n\t\t\tsingletonObj = new SingletonClass();\n\t\t}\n\t\treturn singletonObj;\n\t}",
"public static Singleton instance() {\n return Holder.instance;\n }",
"public static ChatSingleton getInstance( ) {\n return singleton;\n }",
"public boolean isSingleton()\n\t{\n\t\treturn true;\n\t}",
"private SingletonClass() {\n x = 10;\n }",
"public static LazySingleton getInstance()\n {\n // Check null\n if (instance == null)\n instance = new LazySingleton();\n return instance;\n\n }",
"private SingletonClass() {\n objects = new ArrayList<>();\n }",
"public static Replica1Singleton getInstance() {\r\n\t\tif (instance==null){\r\n\t\t/*System.err.println(\"Istanza creata\");*/\r\n\t\tinstance = new Replica1Singleton();\r\n\t\t}\r\n\t\treturn instance;\r\n\t\r\n\t}",
"private SingletonAR() {\n System.out.println(Thread.currentThread().getName()\n + \": creating SingletonAR\");\n }",
"public static SingleObject getInstance(){\n\t\treturn instance;\n\t}",
"synchronized public static SampletypeManager getInstance()\n {\n return singleton;\n }",
"public static SingleObject getInstance()\r\n {\r\n return instance;\r\n }",
"public static synchronized ThreadSafeSingleton getInstance() {\n\t\tif (instance == null) {\n\t\t\tinstance = new ThreadSafeSingleton();\n\t\t}\n\t\treturn instance;\n\t}",
"public static utilitys getInstance(){\n\r\n\t\treturn instance;\r\n\t}",
"private SingletonClass()\n {\n s = \"Hello I am a string part of Singleton class\";\n }",
"@SuppressWarnings(\"unchecked\")\n public static <T> Singleton<T> instance() {\n // Return the singleton instance from the SingletonHolder.\n return (Singleton<T>) SingletonHolder.INSTANCE;\n }",
"public static MySingleTon getInstance(){\n if(myObj == null){\n myObj = new MySingleTon();\n }\n return myObj;\n }",
"private InnerClassSingleton(){}",
"private static Session getInstance() {\n return SingletonHolder.INSTANCE;\n }",
"@Override\n public boolean isSingleton() {\n return false;\n }",
"public static synchronized ThreadSafeSingleton getInstance() {\n\t\tif (null == instance) {\n\t\t\tinstance = new ThreadSafeSingleton();\n\t\t}\n\n\t\treturn instance;\n\t}",
"public static SingletonEager getInstance()\n {\n return instance;\n }",
"public static Boolean getSingleton() {\r\n\t\treturn singleton;\r\n\t}",
"String getSingletonName();",
"public boolean isSingleton() {\n\t\treturn false;\r\n\t}",
"public static J2_Singleton getInstance() {\n\t\tif(singletonInstance == null ) {\n\t\t\tsynchronized(J2_Singleton.class) {\n\t\t\t\tif(singletonInstance == null) {\n\t\t\t\t\tsingletonInstance = new J2_Singleton();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn singletonInstance;\n\t}",
"private EagerInitializedSingleton() {\n\t}",
"private EagerInitializedSingleton() {\n\t}",
"public static synchronized SingletonThreadSave getInstance(){\n if(uniqueThreadSaveInstance == null){\n uniqueThreadSaveInstance = new SingletonThreadSave();\n }\n return uniqueThreadSaveInstance;\n }",
"T getInstance();",
"public boolean isSingleton() {\n\t\treturn false;\n\t}",
"public static SingletonClass getInstance() {\n if (instance == null) {\n instance = new SingletonClass();\n }\n return instance;\n }",
"private Singleton()\r\n\t{\r\n\t\tSystem.out.println(\"1st instance of class Singleton created\");\r\n\t\tstr = \"Constructor init\";\r\n\t}",
"public synchronized static SynchronizedMethodSingleton getInstance()\n\t{\n\t\tif ( instance == null )\n\t\t{\n\t\t\tinstance = new SynchronizedMethodSingleton();\n\t\t}\n\t\treturn instance;\n\t}",
"public static synchronized Singleton getInstance() {\n\t\tif (mContext == null) {\n\t\t\tthrow new IllegalArgumentException(\"Impossible to get the instance. This class must be initialized before\");\n\t\t}\n\n\t\tif (instance == null) {\n\t\t\tinstance = new Singleton();\n\t\t}\n\n\t\treturn instance;\n\t}",
"public static void main(String[] args){\n\n DbSingleton instance = DbSingleton.getInstance();\n\n //DbSingleton test = new DbSingleton();\n DbSingleton instance2 = DbSingleton.getInstance();\n\n System.out.println(instance);\n System.out.println(instance2);\n\n }",
"@Override\n public T getInstance() {\n return instance;\n }",
"synchronized public static PreferenceManager getInstance()\n {\n return singleton;\n }",
"public static ThreadSafeSingleton getInstanceWithDoubleCheck() {\n\t\tif (instance == null) {\n\t\t\tsynchronized (ThreadSafeSingleton.class) {\n\t\t\t\tif (instance == null) {\n\t\t\t\t\tinstance = new ThreadSafeSingleton();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn instance;\n\t}",
"public static MainActivity getInstance(){\n\t\treturn instance;\n\t}",
"public static User getInstance(){\n if(singleton == null){\n singleton = new User();\n }\n return singleton;\n }",
"public static Main getInstance() {\r\n return instance;\r\n }",
"private LazySingleton() {\n if (null != INSTANCE) {\n throw new InstantiationError(\"Instance creation not allowed\");\n }\n }",
"public static synchronized LazyLoadingSingleton getInstanceSynchronized() {\n\t\tif (INSTANCE == null) {\n\t\t\tINSTANCE = new LazyLoadingSingleton();\n\t\t}\n\t\treturn INSTANCE;\n\t}",
"public static LazyLoadingSingleton getInstaceWithoutThreadSafty() {\n\t\tif (INSTANCE == null) {\n\t\t\tINSTANCE = new LazyLoadingSingleton();\n\t\t}\n\t\treturn INSTANCE;\n\t}",
"public DPSingletonLazyLoading getInstance(){ //not synchronize whole method. Instance oluşmuş olsa bile sürekli burada bekleme olur.\r\n\t\tif (instance == null){//check\r\n\t\t\tsynchronized(DPSingletonLazyLoading.class){ //critical section code NOT SYNCRONIZED(this) !!\r\n\t\t\t\tif (instance == null){ //double check\r\n\t\t\t\t\tinstance = new DPSingletonLazyLoading();//We are creating instance lazily at the time of the first request comes.\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn instance;\r\n\t}",
"public static HierarchyFactory getSingleton ()\n {\n return HierarchyFactorySingleton._singleton;\n }",
"public static InspectorManager getInstance() {\n if (instance==null) instance = new InspectorManager();\n return instance;\n}",
"public static Main getInstance() {\n return instance;\n }",
"public static SingletonTextureFactory getInstance(){\n\t\treturn instance;\n\t}",
"public static void main(String[] args) {\n ClassicSingleton singleton = ClassicSingleton.getInstance();\n ClassicSingleton singleton1 = ClassicSingleton.getInstance();\n\n }",
"@SuppressWarnings(\"unchecked\")\n public static <T> Singleton<T> instance() {\n // Atomically set the reference's value to a new singleton iff\n // the current value is null. This constructor will most likely\n // be called more than once if instance() is called from\n // multiple threads, but only the first one is used.\n sSingletonAR\n .updateAndGet(u ->\n u != null ? u : new SingletonAR<T>());\n\n // Return the singleton's current value.\n return (Singleton<T>) sSingletonAR.get();\n }",
"public static void main(String[] args) throws IOException, ClassNotFoundException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException {\n\n Class objectClass = LazyMethodSingleton.class;\n\n Constructor constructor = objectClass.getDeclaredConstructor();\n constructor.setAccessible(true);\n\n LazyMethodSingleton instance = LazyMethodSingleton.getInstance();\n LazyMethodSingleton newInstance = (LazyMethodSingleton) constructor.newInstance();\n\n// HungrySingleton instance = HungrySingleton.getInstance();\n// HungrySingleton newInstance = (HungrySingleton) constructor.newInstance();\n\n// LazyStaticInnerClassSingleton instance = LazyStaticInnerClassSingleton.getInstance();\n// LazyStaticInnerClassSingleton newInstance = (LazyStaticInnerClassSingleton) constructor.newInstance();\n\n System.out.println(instance);\n System.out.println(newInstance);\n System.out.println(instance == newInstance);\n\n\n\n\n }",
"public static CZSZApplication_bak getInstance() {\n return theSingletonInstance;\n }",
"public static SingletonDoubleCheck getInstance() {\n\t\tif (_instance == null) {\n\t\t\tsynchronized (SingletonDoubleCheck.class) {\n\t\t\t\tif (_instance == null) {\n\t\t\t\t\t_instance = new SingletonDoubleCheck();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn _instance;\n\t}",
"public static ThreadSafe getInstaceDoubleChecking(){\n if(instance==null){\n synchronized (ThreadSafe.class) {\n if (instance==null) {\n instance = new ThreadSafe();\n }\n }\n }\n return instance;\n }",
"@Test\n public void TestSingletonInitialization() {\n\t\tassertSame(SingletonClass.getInstance(), SingletonClass.getInstance());\n }",
"public static RCProxy instance(){\n\t\treturn SingletonHolder.INSTANCE;\n\t}",
"synchronized public static InstitutionManager getInstance()\n {\n return singleton;\n }",
"public static CarSingleton2 getInstance() {\n\t\treturn singleton_instance;\n\t}",
"private static synchronized void createInstance() {\r\n\t\tif (instance == null)\r\n\t\t\tinstance = new LOCFacade();\r\n\t}"
]
| [
"0.8543256",
"0.84338844",
"0.8278974",
"0.8259153",
"0.8152955",
"0.8140648",
"0.8101117",
"0.8078374",
"0.80545753",
"0.8010599",
"0.7995398",
"0.7938639",
"0.78081685",
"0.780187",
"0.77711654",
"0.7750039",
"0.7739279",
"0.76588845",
"0.76413876",
"0.763706",
"0.7633044",
"0.75843567",
"0.7567557",
"0.7473124",
"0.7435986",
"0.7435868",
"0.743004",
"0.7429771",
"0.7418674",
"0.74126524",
"0.7412081",
"0.74083996",
"0.74037325",
"0.7388958",
"0.7379028",
"0.73631704",
"0.7355916",
"0.7351192",
"0.7350107",
"0.73143065",
"0.7271753",
"0.72565454",
"0.723623",
"0.7225744",
"0.7214694",
"0.7206302",
"0.7205693",
"0.7200534",
"0.7189305",
"0.71815014",
"0.71714854",
"0.71591973",
"0.7145113",
"0.71376246",
"0.7125118",
"0.7101993",
"0.71009535",
"0.7072244",
"0.7052412",
"0.7043945",
"0.70423114",
"0.7037907",
"0.7034142",
"0.7027127",
"0.70250934",
"0.7020445",
"0.7020445",
"0.7008572",
"0.7003464",
"0.7002263",
"0.6989394",
"0.6980243",
"0.6977912",
"0.694646",
"0.6918691",
"0.6888243",
"0.6884403",
"0.688335",
"0.6873289",
"0.6867196",
"0.68630564",
"0.6862685",
"0.685131",
"0.68444794",
"0.684375",
"0.68350226",
"0.6832629",
"0.6818432",
"0.68026364",
"0.6802183",
"0.6768397",
"0.6763277",
"0.67600775",
"0.6756598",
"0.6723208",
"0.67207885",
"0.6720144",
"0.6718608",
"0.67181605",
"0.67095274"
]
| 0.7182265 | 49 |
pass user protocol (what else ?? ) | public boolean isUserAuthorized(String userName) throws Exception {
HDFSNameNodeComponentManager componentManager = HDFSNameNodeComponentManager.getInstance();
boolean isUserexist = componentManager.getRealmForCurrentTenant().getUserStoreManager().isExistingUser(userName);
List<String> userRoles = Arrays.asList(componentManager.getRealmForCurrentTenant().getUserStoreManager().getRoleListOfUser(userName));
//get protocol list
//authorize user to protocol
if (isUserexist) {
return true;
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getProtocol();",
"public void setProtocol (java.lang.String protocol) {\r\n this.protocol = protocol;\r\n }",
"public void setProtocol(String protocol) {\n this.protocol = protocol;\n }",
"public void setProtocol(Protocol protocol)\n \t{\n \t\tthis.protocol = protocol;\n \t}",
"public void setProtocol(String protocol) {\n m_Protocol = protocol;\n }",
"public void setProtocol(String protocol) {\n this.protocol = protocol;\n }",
"public java.lang.String getProtocol () {\r\n return protocol;\r\n }",
"public void setProtocol(Protocol protocol) {\n\t\tthis.protocol = protocol;\n\t}",
"public String protocol() {\n return this.protocol;\n }",
"public Protocol getProtocol();",
"public int getProtocol() {\n return protocol;\n }",
"public void setProtocol(String a_protocol)\n\t{\n\t\tif (!isValidProtocol(a_protocol))\n\t\t{\n\t\t\tif (isValidHostname(getHost()))\n\t\t\t{\n\t\t\t\tLogHolder.log(LogLevel.NOTICE, LogType.NET, \"Host \" + getHost() + \" has listener with \" +\n\t\t\t\t\t\t\t \"invalid protocol '\" + a_protocol + \"'!\");\n\t\t\t}\n\t\t\tm_iProtocolType = PROTOCOL_TYPE_RAW_TCP;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tm_iProtocolType = recognizeProtocol(a_protocol);\n\t\t}\n\t}",
"public String getProtocol() {\n return protocol;\n }",
"public String getProtocol() {\n return this.protocol;\n }",
"void transmit(String protocol, String message);",
"java.lang.String getPass();",
"java.lang.String getPass();",
"public String getProtocol() {\n return m_Protocol;\n }",
"public void setProtocol(java.lang.String protocol)\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(PROTOCOL$0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(PROTOCOL$0);\n }\n target.setStringValue(protocol);\n }\n }",
"public final String getProtocol() {\n return protocol;\n }",
"public void registerProtocol(Protocol protocol);",
"String getPass();",
"default String protocol() {\n return (String) metadata().get(\"x-server-protocol\");\n }",
"public static int getProtocol() {\n\t\treturn 0;\n\t}",
"public Protocol getProtocol()\n \t{\n \t\treturn protocol;\n \t}",
"private native static int shout_set_protocol(long shoutInstancePtr, int protocol);",
"@Override\n\t\tpublic String getProtocol() {\n\t\t\treturn null;\n\t\t}",
"public String protocolInitializationString(){\n //subclass should implement\n return \"HTTP/\"+major+\".\"+minor+ \" \"+ code + \" \" +reason();\n }",
"public Protocol protocol()\r\n/* 74: */ {\r\n/* 75:169 */ return this.protocol;\r\n/* 76: */ }",
"public void setProtocol(int a_protocol)\n\t{\n\t\tif (!isValidProtocol(a_protocol))\n\t\t{\n\t\t\tif (isValidHostname(getHost()))\n\t\t\t{\n\t\t\t\tLogHolder.log(LogLevel.NOTICE, LogType.NET, \"Host \" + getHost() + \" has listener with \" +\n\t\t\t\t\t\t\t \"invalid protocol '\" + a_protocol + \"'!\");\n\t\t\t}\n\t\t\tm_iProtocolType = PROTOCOL_TYPE_RAW_TCP;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tm_iProtocolType = recognizeProtocol(a_protocol);\n\t\t}\n\t}",
"public void setProtocol(String value) {\n setAttributeInternal(PROTOCOL, value);\n }",
"public String getProtocol()\n {\n ASPManager mgr = getASPManager();\n String protocol = mgr.getAspRequest().getScheme();\n\n if(mgr.isDifferentApplicationPath())\n {\n int host_no = mgr.getCurrentHostIndex()+1;\n String[] data =Str.split((String)configfile.hosts.get(host_no+\"\"),\",\");\n \n if(!\"NONE\".equals(data[0]))\n protocol = data[0];\n }\n\n return protocol;\n }",
"public static String getProtocol() {\n return DEFAULT_PROTOCOL;\n }",
"public String getProtocol() {\n return (String)getAttributeInternal(PROTOCOL);\n }",
"@Override\n\tpublic String getProtocol() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String getProtocol() {\n\t\treturn null;\n\t}",
"Password getPsw();",
"protected static int recognizeProtocol(int a_protocol)\n\t{\n\t\tif (a_protocol == PROTOCOL_TYPE_HTTP ||\n\t\t\ta_protocol == PROTOCOL_TYPE_HTTPS ||\n\t\t\ta_protocol == PROTOCOL_TYPE_RAW_TCP ||\n\t\t\ta_protocol == PROTOCOL_TYPE_SOCKS)\n\t\t{\n\t\t\treturn a_protocol;\n\t\t}\n\t\treturn PROTOCOL_TYPE_UNKNOWN;\n\t}",
"public String getProtocol() {\n String protocol = getPropertyAsString(PROTOCOL);\n if (protocol == null || protocol.length() == 0 ) {\n return DEFAULT_PROTOCOL;\n }\n return protocol;\n }",
"public String getProtocolId();",
"public void printProtocol()\n\t{\n\t\tString commands[] = {\"A\", \"UID\", \"S\", \"F\"};\n\t\t\n\t\tHashtable<String, String> commandDescription = new Hashtable<String, String>();\n\t\tHashtable<String, String> subStringCommands = new Hashtable<String, String>();\n\t\tcommandDescription.put(\"A\", \"Sends audio data using _ as a regex\");\n\t\tcommandDescription.put(\"UID\", \"Specifies the user's id so that the Network.Server may verify it\");\n\t\tcommandDescription.put(\"S\", \"Specifies server commands.\");\n\t\tcommandDescription.put(\"F\", \"Specifies audio format.\");\n\t\tsubStringCommands.put(\"A\", \"No commands\");\n\t\tsubStringCommands.put(\"UID\", \"No sub commands\");\n\t\tsubStringCommands.put(\"S\", \"Sub commands are: \\nclose - Closes the server.\\ndisconnect - Disconnects the client from the server.\\nclumpSize {int}\");\n\t\tsubStringCommands.put(\"F\", \"Split Audio specifications between spaces. The ordering is {float SampleRate, int sampleSizeInBits, int channels, int frameSize, float frameRate\");\n\t\t\n\t\tfor (String str: commands)\n\t\t{\n\t\t\tSystem.out.printf(\"Command format:\\n %s.xxxxxxx\\n\", str);\n\t\t\tSystem.out.printf(\"Command %s\\n Description: %s \\n sub commands %s\\n\", str, commandDescription.get(str),subStringCommands.get(str));\n\t\t\t\n\t\t}\n\t}",
"public interface UserAgent {\n\n// csci4311.chat.CLIUserAgent, which\n// implements\n// the\n// csci4311.chat.UserAgent\n// interface,\n\n// The csci4311.chat.CLIUserAgent class must only implement user interaction, and no\n// protocol details.\n\n //No protocol details\n// public void startReadWriteOperation();\n\n public void packetReceiver(Socket socket);\n public void packetSender(Socket socket,String clientName);\n\n}",
"private void parseProtocol(String protocol) {\n try (Scanner sc = new Scanner(protocol)) {\n //parse first line\n this.method = Method.valueOf(sc.next());\n this.url = sc.next();\n String httpVersion = sc.next();\n this.version = Double.parseDouble(httpVersion.substring(5));\n\n while (sc.hasNext(\".+:\")) {\n String header = sc.next();\n header = header.substring(0, header.indexOf(':'));\n String value = sc.next() + sc.nextLine();\n this.headings.put(header, value);\n }\n }\n\n }",
"public interface Protocol {\n\n\n /**\n * Get the last line of text, which has been read from the socket.\n * @return the last line of text, which has been read from the socket.\n */\n String getCurrentLine();\n\n /**\n * Write to the Socket.\n * @param line to write to the socket.\n */\n void putLine(String line);\n\n /**\n * Change the state of the protocol.\n * @param state new state of the protocol.\n */\n void setState(State state);\n\n /**\n * Get the current state of the protocol.\n * @return the current state of the protocol.\n */\n State getState();\n\n\n}",
"public String getProtocol() {\n String protocol = getPropertyAsString(PROTOCOL);\n if (protocol == null || protocol.length() == 0) {\n return DEFAULT_PROTOCOL;\n }\n return protocol;\n }",
"public ProtocolType getProtocol() {\n return protocol;\n }",
"public Protocol getProtocol(String sName);",
"String getUser();",
"String getUser();",
"private LoanProtocol ProcessTransferRequest(LoanProtocol protocol)\n\t{\n\t\t// only change the type of the protocol to answer\n\t\tprotocol.setType(messageType.TransferAnswer);\n\t\treturn protocol;\n\t}",
"public void xsetProtocol(org.apache.xmlbeans.XmlString protocol)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(PROTOCOL$0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(PROTOCOL$0);\n }\n target.set(protocol);\n }\n }",
"public String getType() {\n\t\treturn \"protocol\";\n\t}",
"public void setU_PASS( String U_PASS )\n {\n this.U_PASS = U_PASS;\n }",
"public interface PasswordHandler {\n\n void changePassword(String username, String password);\n\n void encodeAll();\n\n}",
"public String get_snmpauthprotocol()\r\n\t{\r\n\t\treturn this.snmpauthprotocol;\r\n\t}",
"java.lang.String getProtocolId();",
"public void logon() throws IOException, GeneralSecurityException {\n String line;\n char response;\n\n if (state != State.CONNECTED) {\n connect();\n }\n\n socketOut.write('0');\n socketOut.flush();\n socketOut.write(VERSION.getBytes());\n socketOut.write('\\n');\n socketOut.write(GETCOMMAND.getBytes());\n socketOut.write('\\n');\n socketOut.write(USERNAME.getBytes());\n socketOut.write(username.getBytes());\n socketOut.write('\\n');\n socketOut.write(PASSPHRASE.getBytes());\n socketOut.write(new String(passphrase).getBytes());\n socketOut.write('\\n');\n socketOut.write(LIFETIME.getBytes());\n socketOut.write(Integer.toString(lifetime).getBytes());\n socketOut.write('\\n');\n if (credname != null) {\n socketOut.write(CREDNAME.getBytes());\n socketOut.write(credname.getBytes());\n socketOut.write('\\n');\n }\n socketOut.flush();\n\n line = readLine(socketIn);\n if (line == null) {\n throw new EOFException();\n }\n if (!line.equals(VERSION)) {\n throw new ProtocolException(\"bad MyProxy protocol VERSION string: \"\n + line);\n }\n line = readLine(socketIn);\n if (line == null) {\n throw new EOFException();\n }\n if (!line.startsWith(RESPONSE)\n || line.length() != RESPONSE.length() + 1) {\n throw new ProtocolException(\n \"bad MyProxy protocol RESPONSE string: \" + line);\n }\n response = line.charAt(RESPONSE.length());\n if (response == '1') {\n StringBuffer errString;\n\n errString = new StringBuffer(\"MyProxy logon failed\");\n while ((line = readLine(socketIn)) != null) {\n if (line.startsWith(ERROR)) {\n errString.append('\\n');\n errString.append(line.substring(ERROR.length()));\n }\n }\n throw new FailedLoginException(errString.toString());\n } else if (response == '2') {\n throw new ProtocolException(\n \"MyProxy authorization RESPONSE not implemented\");\n } else if (response != '0') {\n throw new ProtocolException(\n \"unknown MyProxy protocol RESPONSE string: \" + line);\n }\n while ((line = readLine(socketIn)) != null) {\n if (line.startsWith(TRUSTROOTS)) {\n String filenameList = line.substring(TRUSTROOTS.length());\n trustrootFilenames = filenameList.split(\",\");\n trustrootData = new String[trustrootFilenames.length];\n for (int i = 0; i < trustrootFilenames.length; i++) {\n String lineStart = \"FILEDATA_\" + trustrootFilenames[i]\n + \"=\";\n line = readLine(socketIn);\n if (line == null) {\n throw new EOFException();\n }\n if (!line.startsWith(lineStart)) {\n throw new ProtocolException(\n \"bad MyProxy protocol RESPONSE: expecting \"\n + lineStart + \" but received \" + line);\n }\n trustrootData[i] = new String(Base64.decode(line\n .substring(lineStart.length())));\n }\n }\n }\n state = State.LOGGEDON;\n }",
"private Protocol getProtocol(String scheme) {\r\n Protocol protocol = Protocol.valueOf(scheme);\r\n if (protocol == null) {\r\n protocol = new Protocol(scheme);\r\n }\r\n return protocol;\r\n }",
"private String setProtocolNumber() {\n\t\tRandom rnd = new Random();\n\t\treturn Integer.toString(rnd.nextInt(999999));\n\t}",
"public String getUserCommand();",
"public Protocol getProtocol() {\n\t\treturn protocol;\n\t}",
"String login(String string2, String string3) throws IOException {\n Protocol protocol = this;\n synchronized (protocol) {\n Response response;\n String string4 = this.apopChallenge;\n String string5 = null;\n if (string4 != null) {\n string5 = this.getDigest(string3);\n }\n if (this.apopChallenge != null && string5 != null) {\n response = this.simpleCommand(\"APOP \" + string2 + \" \" + string5);\n } else {\n Response response2 = this.simpleCommand(\"USER \" + string2);\n if (!response2.ok) {\n if (response2.data == null) return \"USER command failed\";\n return response2.data;\n }\n response = this.simpleCommand(\"PASS \" + string3);\n }\n if (response.ok) return null;\n if (response.data == null) return \"login failed\";\n return response.data;\n }\n }",
"java.lang.String getUser();",
"public String getRequestProtocol(){\n return this.requestProtocol;\n }",
"protected static void setURL(PURL u, String protocol, String host, int port,\n\t\t String authority, String userInfo, String path,\n String query, String ref) {\n\n\t// ensure that no one can reset the protocol on a given URL.\n u.set(u.getProtocol(), host, port, authority, userInfo, path, query, ref);\n }",
"public String getProtocol() throws SdpParseException {\n\t\treturn getProto();\n\t}",
"@Override\n protected String inferProtocol() {\n return \"http\";\n }",
"private String lookupPassword(String user) {\n\treturn \"happy8\";\r\n\t}",
"boolean hasProtocol();",
"public int getProtocol()\n\t{\n\t\treturn m_iProtocolType;\n\t}",
"public void login(String addr, String port, String user){\n if (state != State.NOCONNECTION){\n Log.d(\"State\", state.toString());\n return;\n }\n if (user.length() < 3){\n Log.d(\"Username\", \"length too short\");\n return; //BAD HUMAN!!!\n }\n _user = user;\n try {\n mConnection = new NetworkingConnection(new MyResponseVisitor(), addr, port);\n state = State.HASCONNECTION;\n } catch (UnknownHostException e){\n e.printStackTrace();\n //there is an unknown host aka ur IP is wrong bish\n Log.d(\"Bad IP address\", addr);\n state = State.NOCONNECTION;\n }\n //make the error handler somewher\n INetworkingConnection.OnErrorSend handleErr = new INetworkingConnection.OnErrorSend(){\n public void onError(@NonNull Throwable err){\n err.printStackTrace();\n }\n };\n //send the login request somewhere(???)\n LoginRequest loginReq = new LoginRequest(user);\n mConnection.send(loginReq, handleErr).execute();\n state = State.ATTEMPTEDLOGIN;\n }",
"@DOMSupport(DomLevel.ONE)\r\n @Property String getProtocol();",
"public Builder protocol(String protocol) {\n\t\t\tthis.protocol = protocol;\n\t\t\treturn this;\n\t\t}",
"public void sendOtp(String medium) {\n\r\n }",
"@Override \n public void commandLogin(String userName, String password)\n {\n }",
"InputPromptTransmitter getInputPromptTransmitter();",
"public static void main(String[] args) {\n\t\tString url = \"http://hell.com/?pw=8936,id='fsfds'\";\n\t\t\n\t\tint location = url.indexOf(\"pw=\");\n\t\tString str2 = url.substring(location+7);\n\t\tString str1 = url.substring(0,location+3);\n\t\tSystem.out.println(str1+\"****\"+str2);\n\t\t\n\t}",
"public String getProtocol(int i) {\n return getStringProperty(\"conn.protocol\" + i);\n }",
"public String getProtocolName()\n {\n return Resources.getString(\"plugin.dictaccregwizz.PROTOCOL_NAME\");\n }",
"public void setProtocolID(int pid) {\n m_ProtocolID = pid;\n // setChanged(true);\n }",
"String getUserInput();",
"public String get_snmpprivprotocol()\r\n\t{\r\n\t\treturn this.snmpprivprotocol;\r\n\t}",
"private Protocol() {}",
"@Override\n \tpublic String connectionReceived(NetLoginHandler netHandler, INetworkManager manager)\n \t{\n \t\treturn null;\n \t}",
"public abstract String getUser();",
"public interface IRCUser\n{\n public String getNick();\n\n public String getLogin();\n\n public String getHost();\n}",
"public void setUser_mac(java.lang.String newUser_mac);",
"public NetworkProtocol getProtocol() {\n return _protocol;\n }",
"public UserCon(Socket newSocket)\n\t{\n\t\tconnSocket = newSocket;\n\t\ttry {\n\t\t\tinFromClient = new BufferedReader(new InputStreamReader(connSocket.getInputStream()));\n\t\t\toutToClient = connSocket.getOutputStream();\n\t\t\tcs = ConnState.LOGIN;\n\t\t\tpageLength = 20;\n\t\t\tprompt = \"{W[{r%h{R/{r%H {Rhp{W] [{c%m{C/{c%M {Cmn{W] [{g%s{G/{g%S {Gst{W] [{cEx{C: {c%e{W] %l{x^/\";\n\t\t\tbprompt = \"{W[{r%h{R/{r%H {Rhp{W] [{c%m{C/{c%M {Cmn{W] [{g%s{G/{g%S {Gst{W] [{cEx{C: {c%e{W] %l^/{wFighting %O{W: {R%P%% {C%N%% {G%I%% {w--> {x\";\n\t\t\tfor (String s : Flags.userPrefs)\n\t\t\t\tprefs.put(s, false);\n\t\t\tprefs.put(\"prompt\", true);\n\t\t\tfor (Board b : boards)\n\t\t\t\tlastRead.put(b, (long)0);\n\t\t\tString tempName = \"\";\n\t\t\tboolean askForName = false;\n\t\t\tboolean createdNewChar = false;\n\n\t\t\tsendln(\"^/\"\n\t\t\t\t+\" AAAAAA AAAA GGG GGG AAAAAA AAAA PPPPPPPPPPP EEEEEEEEE^/\"\n\t\t\t\t+\" AAA AAAAAA GGGG GGGG AAA AAAAAA PPPPPPPPPPPPP E EEEEE EEEE^/\" \n\t\t\t\t+\"AAA AAAA GG, GGGG AAA AAAA PP PPP EEE EEE^/\"\n\t\t\t\t+\"AAA AAA GGG GGG AAA AAA PP PP EEE EEE^/\"\n\t\t\t\t+\"AAA AAAA GG GG AAA AAAA PP PP EEE EEE^/\"\n\t\t\t\t+\"AAA AAAA G GG AAA AAAA PP PP EEE EEE^/\"\n\t\t\t\t+\"AAA AAAA GGGG AAA AAAA PPP PPP EEE EEE^/\"\n\t\t\t\t+\" AAA AAAAAAAA GGG AAA AAAAAAAA PP PPP.P EEE EEE^/\"\n\t\t\t\t+\" AAAAAAA AAAAA GG AAAAAAA AAAAA .PP PPP EEE EEE^/\"\n\t\t\t\t+\" GG EE^/\"\n\t\t\t\t+\" GG Agape: EE^/\"\n\t\t\t\t+\" GGG The New Covenant EEE^/\"\n\t\t\t\t+\"^/\");\n\t\t\tdo {\n\t\t\t\taskForName = false;\n\t\t\t\ttempName = prompt(\"Enter your name, or type 'new' to create a new character.\");\n\t\t\t\tif (tempName.trim().length() < 1)\n\t\t\t\t{\n\t\t\t\t\taskForName = true;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (tempName.equalsIgnoreCase(\"new\") || !Database.nameTaken(tempName))\n\t\t\t\t{\n\t\t\t\t\tif (Moban.hasMatch(\"ban\", \"\", connSocket.getInetAddress().getHostName()))\n\t\t\t\t\t{\n\t\t\t\t\t\tsendln(\"This location has been banned from connecting to Agape. If you have\");\n\t\t\t\t\t\tsendln(\"never connected from this location before, please visit our website\");\n\t\t\t\t\t\tsendln(\"at www.agapemud.org and <insert instructions here>.\");\n\t\t\t\t\t\tsysLog(\"justice\", \"Connection from banned site: \"+connSocket.getInetAddress().getHostName());\n\t\t\t\t\t\tcloseSocket();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tfor (UserCon cs : conns)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (cs.hasPermission(\"staff\"))\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\tif (cs.host1.equals(connSocket.getInetAddress().getHostName())\n\t\t\t\t\t\t\t&& !Moban.hasMatch(\"multok\", cs.ch.name, cs.host1)\n\t\t\t\t\t\t\t&& !cs.hasPermission(\"staff\"))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tsendln(\"Another character is already logged in from the same connection you're using.\");\n\t\t\t\t\t\t\tsendln(\"If you were playing on a character but were disconnected or did not quit using\");\n\t\t\t\t\t\t\tsendln(\"the 'quit' command, please log back on to that character and 'quit' before\");\n\t\t\t\t\t\t\tsendln(\"logging on with a different character.\");\n\t\t\t\t\t\t\tsendln(\"\");\n\t\t\t\t\t\t\tsendln(\"Note that multiplaying (using multiple characters at the same time) is not\");\n\t\t\t\t\t\t\tsendln(\"permitted on Agape. If there is more than one person at your connection who\");\n\t\t\t\t\t\t\tsendln(\"would like the play the game, please speak with a staff member or send an\");\n\t\t\t\t\t\t\tsendln(\"e-mail to [email protected] including your character's name.\");\n\t\t\t\t\t\t\tcloseSocket();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\n\t\t\t\t\t// Ask for the character's new name until they enter a valid one.\n\t\t\t\t\tchansOff.add(\"ministry\");\n\t\t\t\t\tchansOff.add(\"vulgar\");\n\t\t\t\t\tString newName = \"\";\n\t\t\t\t\tRace newCharRace = null;\n\t\t\t\t\tCharClass newCharClass = null;\n\t\t\t\t\tString newSex = \"\";\n\t\t\t\t\tboolean validName = false;\n\t\t\t\t\t\n\t\t\t\t\tif (!tempName.equalsIgnoreCase(\"new\"))\n\t\t\t\t\t{\n\t\t\t\t\t\tString makeNewChar = \"\";\n\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\tif (makeNewChar.length() > 0)\n\t\t\t\t\t\t\t\tsendln(\"Please enter 'y' or 'n'.\");\n\t\t\n\t\t\t\t\t\t\tmakeNewChar = prompt(\"^/That name isn't familiar. Would you like to create a new character? (y/n)\").toLowerCase();\n\t\t\t\t\t\t} while (!makeNewChar.equals(\"y\") && !makeNewChar.equals(\"n\"));\n\t\t\t\t\t\tif (makeNewChar.equals(\"n\"))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\taskForName = true;\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\tif (!validateName(tempName))\n\t\t\t\t\t\t\tvalidName = false;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tnewName = tempName;\n\t\t\t\t\t\t\tvalidName = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\twhile (!validName)\n\t\t\t\t\t{\n\t\t\t\t\t\tnewName = prompt(\"Please choose a name for your new character:\").trim();\n\t\n\t\t\t\t\t\tif (newName.length() == 0)\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (!validateName(newName))\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tnewName = newName.substring(0, 1).toUpperCase()+newName.substring(1);\n\t\t\t\t\tsysLog(\"connections\", \"New character: \"+newName+\" (\"+connSocket.getInetAddress().getHostName()+\")\");\n\t\t\t\t\tsendln(\"^/^/^/ Welcome to the game, \"+newName+\"! Before you can begin playing,^/\"+\n\t\t\t\t\t\t \" you need to set up your character and basic preferences.^/^/\");\n\t\n\t\t\t\t\t// Ask for a password until a valid one is entered.\n\t\t\t\t\tString newPassword = \"\";\n\t\t\t\t\twhile (true)\n\t\t\t\t\t{\n\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\tif (newPassword.length() > 0 && newPassword.length() < 5)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tsendln(\"Your password must be at least five characters long.\");\n\t\t\t\t\t\t\t\tsendln(\"\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tnewPassword = prompt(\"Please choose a password: \", false);\n\t\t\t\t\t\t} while (newPassword.length() < 5);\n\t\t\t\t\t\tString newPassword2 = prompt(\"Please enter the password again to confirm it: \", false);\n\t\t\t\t\t\tif (newPassword.equals(newPassword2))\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\t\tsendln(\"^/^/The passwords don't match. Note that the password is case-sensitive.^/\");\n\t\t\t\t\t}\n\t\t\t\t\tsendln(\"^/^/ Your password has been set. No staff member will ever ask for your password.^/\"+\n\t\t\t\t\t\t\t\" Please help us keep the game secure - never share your password!\");\n\t\t\t\t\tprompt(\"^/^/Push enter to continue...\");\n\t\n\t\t\t\t\t// Ask for a Y/N answer to color mode.\n\t\t\t\t\tprefs.put(\"ansi\", true);\n\t\t\t\t\tString newAnsi = \"\";\n\t\t\t\t\tsendln(\"^/ {W**** {GTesting {Bcolor {Cmode{W! {W****{x\");\n\t\t\t\t\tsendln(\" If the above line displays correctly (with colors),\"+\n\t\t\t\t\t\t \"^/ your terminal supports color mode.\");\n\t\t\t\t\tdo {\n\t\t\t\t\t\tif (newAnsi.length() > 0)\n\t\t\t\t\t\t\tsendln(\"Please enter 'y' or 'n'.\");\n\t\n\t\t\t\t\t\tnewAnsi = prompt(\"^/Would you like to turn color mode on? (y/n)\").toLowerCase();\n\t\t\t\t\t} while (!newAnsi.equals(\"y\") && !newAnsi.equals(\"n\"));\n\t\t\t\t\tif (newAnsi.equals(\"n\"))\n\t\t\t\t\t\tprefs.put(\"ansi\", false);\n\t\t\t\t\t\n\t\t\t\t\t// Ask for the user's previous MUDding experience.\n\t\t\t\t\tboolean askedForPrevExp = false;\n\t\t\t\t\tprevExp = 0;\n\t\t\t\t\tdo {\n\t\t\t\t\t\tif (askedForPrevExp)\n\t\t\t\t\t\t\tsendln(\"That's not a valid selection. Please enter }H'}h1}H'{x, }H'}h2}H'{x, }H'}h3}H'{x, or }H'}h4}H'{x.\");\n\t\t\t\t\t\tsendln(\"\");\n\t\t\t\t\t\tsendln(\"Please choose the option that best describes your previous gaming experience.\");\n\t\t\t\t\t\tsendln(\"This selection will determine what kind of tutorials and helpful information\");\n\t\t\t\t\t\tsendln(\"is displayed to you as you learn about the game.\");\n\t\t\t\t\t\tsendln(\"\");\n\t\t\t\t\t\tsendln(\"}H( }h1}H) }ILittle or no experience with role playing games. (World of Warcraft, etc.)\");\n\t\t\t\t\t\tsendln(\"}H( }h2}H) }IFamiliar with RPGs, but little or no experience playing a MUD.\");\n\t\t\t\t\t\tsendln(\"}H( }h3}H) }IFamiliar with MUDs, but new to Agape.\");\n\t\t\t\t\t\tsendln(\"}H( }h4}H) }IFamiliar with Agape.{x\");\n\t\t\t\t\t\tprevExp = Fmt.getInt(prompt(\"\"));\n\t\t\t\t\t\tif (prevExp < 1 || prevExp > 4)\n\t\t\t\t\t\t\tprevExp = 0;\n\t\t\t\t\t\taskedForPrevExp = true;\n\t\t\t\t\t} while (prevExp == 0);\n\t\t\t\t\t\n\t\t\t\t\t// Ask for a sex until a valid one is entered.\n\t\t\t\t\tdo {\n\t\t\t\t\t\tif (newSex.length() > 0)\n\t\t\t\t\t\t\tsendln(\"Please enter }H'}hm}H'{x or }H'}hf}H'{x.\");\n\t\t\t\t\t\tsendln(\"\");\n\t\t\t\t\t\tnewSex = prompt(\"Is your new character male or female? }H(}hm}H/}hf}H){x\");\n\t\t\t\t\t} while (!newSex.equalsIgnoreCase(\"m\") && !newSex.equalsIgnoreCase(\"f\"));\n\t\t\t\t\tif (newSex.equalsIgnoreCase(\"m\"))\n\t\t\t\t\t\tnewSex = \"m\";\n\t\t\t\t\telse\n\t\t\t\t\t\tnewSex = \"f\";\n\t\n\t\t\t\t\t// Build the class prompt.\n\t\t\t\t\tString classPrompt = \"^/The following classes are available to you:^/^/\";\n\t\t\t\t\tclassPrompt = classPrompt+\" }mCleric }M: }NMany healing spells, solid offensive spells. Some melee skills.^/\";\n\t\t\t\t\tclassPrompt = classPrompt+\" }mMage }M: }NPowerful offensive spellcaster. Very poor melee ability.^/\";\n\t\t\t\t\tclassPrompt = classPrompt+\" }mFighter}M: }NA durable, straightforward, and versatile melee combat class.^/\";\n\t\t\t\t\tclassPrompt = classPrompt+\" }mRogue }M: }NLight melee class with many combat moves. Can sneak and use poisons.^/{x\";\n\t\t\t\t\tclassPrompt = classPrompt+\"^/Enter the name of your desired class, or }H'}hhelp }H<}iclass}H>'{x for more information.\";\n\t\t\t\t\t\n\t\t\t\t\tsendln(\"^/^/^/^/^/\");\n\t\t\t\t\tsendln(\"While there are many classes in Agape, you'll start by selecting one of\");\n\t\t\t\t\tsendln(\"four base classes. This will determine the fundamental set of skills which\");\n\t\t\t\t\tsendln(\"your character can use, as well as which higher-level classes you'll have\");\n\t\t\t\t\tsendln(\"access to later in the game.\");\n\t\t\t\t\tsendln(\"\");\n\t\t\t\t\tsendln(\"{W** {RNOTE{x: Each class provides a very different gameplay experience. If you're\");\n\t\t\t\t\tsendln(\" new to MUDs or role playing games, you may want to take a few minutes\");\n\t\t\t\t\tsendln(\" to read about our classes on our website: }hwww.agapemud.org/classes{x\");\n\t\t\t\t\t// Ask for a class until a valid one is entered.\n\t\t\t\t\twhile (true)\n\t\t\t\t\t{\n\t\t\t\t\t\tString newClass = prompt(classPrompt).toLowerCase().trim();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (newClass.length() == 0)\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\tif (newClass.startsWith(\"help\") && newClass.split(\" \", 2).length > 1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tInfoCommands.doHelp(this, newClass.split(\" \", 2)[1]);\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor (CharClass cl : MudMain.classes)\n\t\t\t\t\t\t\tif (cl.name.toLowerCase().startsWith(newClass) && cl.parent == 0)\n\t\t\t\t\t\t\t\tif (prompt(\"You have selected '\"+cl.name+\"'. Is this correct? (Y/N)\").toLowerCase().startsWith(\"y\"))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tnewCharClass = cl;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\n\t\t\t\t\t\tif (newCharClass != null)\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tsendln(\"That's not a valid class.\");\n\t\t\t\t\t}\n\n\t\t\t\t\t// Build the racegroup prompt text.\n\t\t\t\t\tString raceGroupPrompt = \"\";\n\t\t\t\t\tString raceGroupsAdded = \" \";\n\t\t\t\t\tArrayList<String> rgst = new ArrayList<String>();\n\t\t\t\t\tfor (Race r : MudMain.races)\n\t\t\t\t\t\tif (r.racegroup.length() > 0 && !rgst.contains(r.racegroup))\n\t\t\t\t\t\t\trgst.add(r.racegroup);\n\t\t\t\t\tCollections.sort(rgst);\n\t\t\t\t\traceGroupPrompt = \"^/The following race groups are available to you:^/^/\"+Fmt.defaultTextColumns(rgst.toArray(new String[0]))+\"^/^/Enter the name of your desired race group, or }H'}hhelp }H<}irace group}H>'{x for^/more information.\";\n\t\t\t\t\t\n\t\t\t\t\tsendln(\"^/^/^/^/^/\");\n\t\t\t\t\tsendln(\"Agape offers many different races, but these are divided into six groups of\");\n\t\t\t\t\tsendln(\"races. You'll choose your race group first, and then choose the specific\");\n\t\t\t\t\tsendln(\"race you wish to play as. Your character's race will determine how well you\");\n\t\t\t\t\tsendln(\"can use different kinds of abilities. Some races also receive special, unique\");\n\t\t\t\t\tsendln(\"abilities beyond those offered by your class.\");\n\t\t\t\t\tsendln(\"\");\n\t\t\t\t\tsendln(\"{W** {RNOTE{x: It is important to pick a race with traits that match your class well.\");\n\t\t\t\t\tsendln(\" Check the class recommendations section of race help files to find out\");\n\t\t\t\t\tsendln(\" if a race would fit your class well.\");\n\t\t\t\t\tsendln(\" This information is also available at: }hwww.agapemud.org/races{x\");\n\t\t\t\t\t// Ask for a racegroup until a valid one is entered.\n\t\t\t\t\twhile (true)\n\t\t\t\t\t{\n\t\t\t\t\t\tString newRaceGroup = prompt(raceGroupPrompt).toLowerCase().trim();\n\t\t\t\t\t\tif (newRaceGroup.length() == 0)\n\t\t\t\t\t\t\tcontinue;\n\t\n\t\t\t\t\t\t// Allow the user to view help files from this prompt.\n\t\t\t\t\t\tif (newRaceGroup.startsWith(\"help\") && newRaceGroup.split(\" \", 2).length > 1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tInfoCommands.doHelp(this, newRaceGroup.split(\" \", 2)[1]);\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\t// Look for a racegroup match. Found one? Then ask for a race.\n\t\t\t\t\t\tString newRace = \"\";\n\t\t\t\t\t\tfor (Race r : MudMain.races)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (r.racegroup.toLowerCase().startsWith(newRaceGroup) && rgst.contains(r.racegroup))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// Build the race prompt for the chosen racegroup.\n\t\t\t\t\t\t\t\tArrayList<String> rst = new ArrayList<String>();\n\t\t\t\t\t\t\t\tString racePrompt = \"^/The following races are available within the \"+r.racegroup+\" group:^/^/\";\n\t\t\t\t\t\t\t\tfor (Race r2 : MudMain.races)\n\t\t\t\t\t\t\t\t\tif (r2.racegroup.equals(r.racegroup))\n\t\t\t\t\t\t\t\t\t\trst.add(r2.name);\n\t\t\t\t\t\t\t\tCollections.sort(rst);\n\t\t\t\t\t\t\t\tracePrompt = racePrompt+Fmt.defaultTextColumns(rst.toArray(new String[0]))+\"^/^/You may enter }H'}hback}H'{x to choose another racegroup.^/Enter the name of your desired race, or }H'}hhelp }H<}irace}H>'{x for more information.\";\n\t\n\t\t\t\t\t\t\t\twhile (true)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tnewRace = prompt(racePrompt).toLowerCase().trim();\n\t\t\t\t\n\t\t\t\t\t\t\t\t\tif (newRace.length() == 0)\n\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\tif (newRace.startsWith(\"help\") && newRace.split(\" \", 2).length > 1)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tInfoCommands.doHelp(this, newRace.split(\" \", 2)[1]);\n\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif (newRace.equals(\"back\"))\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tfor (Race r2 : MudMain.races)\n\t\t\t\t\t\t\t\t\t\tif (r2.name.toLowerCase().startsWith(newRace) && rst.contains(r2.name))\n\t\t\t\t\t\t\t\t\t\t\tif (prompt(\"You have selected '\"+r2.name+\"'. Is this correct? (Y/N)\").toLowerCase().startsWith(\"y\"))\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tnewCharRace = r2;\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\tif (newCharRace != null || newRace.equals(\"back\"))\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tsendln(\"That's not a valid race.\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (newCharRace != null || newRace.equals(\"back\"))\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (newCharRace != null)\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tsendln(\"That's not a valid race group.\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Get the user's real name.\n\t\t\t\t\trealname = prompt(\"^/What is your real name? To leave it blank, just push enter.\");\n\t\n\t\t\t\t\t// Ask for the user's e-mail address.\n\t\t\t\t\temail = prompt(\"^/Your e-mail address can be hidden from other players,^/\"+\n\t\t\t\t\t\t\t\t \" and we will not share it with other entities.^/^/\"+\n\t\t\t\t\t\t\t\t \"What is your e-mail address? To leave it blank, just push enter.\");\n\t\n\t\t\t\t\t// Ask for a Y/N answer to e-mail sharing.\n\t\t\t\t\tString newShowEmail = \"\";\n\t\t\t\t\tdo {\n\t\t\t\t\t\tif (newShowEmail.length() > 0)\n\t\t\t\t\t\t\tsendln(\"Please enter }H'}hy}H'{x or }H'}hn}H'{x.\");\n\t\t\t\t\t\tnewShowEmail = prompt(\"^/Would you like your e-mail address to be visible to other players? }H(}hy}H/}hn}H){x\").toLowerCase();\n\t\t\t\t\t} while (!newShowEmail.equals(\"y\") && !newShowEmail.equals(\"n\"));\n\t\t\t\t\tif (newShowEmail.equals(\"y\"))\n\t\t\t\t\t\tprefs.put(\"showemail\", true);\n\t\t\t\t\t\n\t\t\t\t\tprompt(\"^/To change any of these settings, type }H'}hhelp preference}H'{x.^/Push enter to continue...\");\n\t\n\t\t\t\t\t// Create the character, save the account, and reload both to obtain IDs.\n\t\t\t\t\tid = Database.newAccount(newPassword);\n\t\t\t\t\thost3 = connSocket.getInetAddress().getHostName();\n\t\t\t\t\tch = new CharData(this, true);\n\t\t\t\t\tch.name = newName;\n\t\t\t\t\tch.shortName = newName;\n\t\t\t\t\tch.charRace = newCharRace;\n\t\t\t\t\tch.charClass = newCharClass;\n\t\t\t\t\tch.sex = newSex;\n\t\t\t\t\tch.currentRoom = rooms.get(0);\n\t\t\t\t\tch.initializeValues();\n\t\t\t\t\tch.gold = 100;\n\t\t\t\t\tch.bank = 250;\n\t\t\t\t\tch.save();\n\t\t\t\t\tch = new CharData(this, true);\n\t\n\t\t\t\t\tDatabase.saveAccount(this);\n\t\n\t\t\t\t\tcreatedNewChar = true;\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\tif (Database.checkLogin(tempName, prompt(\"Enter your password: \", false)))\n\t\t\t\t\t{\n\t\t\t\t\t\tif (Moban.hasMatch(\"ban\", \"\", connSocket.getInetAddress().getHostName()))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tsendln(\"This location has been banned from connecting to Agape. If you have\");\n\t\t\t\t\t\t\tsendln(\"never connected from this location before, please visit our website\");\n\t\t\t\t\t\t\tsendln(\"at www.agapemud.org and <insert instructions here>.\");\n\t\t\t\t\t\t\tsysLog(\"connections\", \"Connection from banned site: \"+tempName+\" at \"+connSocket.getInetAddress().getHostName());\n\t\t\t\t\t\t\tcloseSocket();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (Moban.hasMatch(\"ban\", tempName, \"\"))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tsendln(\"Your character has been banned from connecting to Agape. If you would\");\n\t\t\t\t\t\t\tsendln(\"like to appeal this ban, please visit our website at www.agapemud.org\");\n\t\t\t\t\t\t\tsendln(\"and <insert instructions here>.\");\n\t\t\t\t\t\t\tsysLog(\"connections\", \"Connection from banned character: \"+tempName+\" at \"+connSocket.getInetAddress().getHostName());\n\t\t\t\t\t\t\tcloseSocket();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\tDatabase.loadAccount(this, tempName);\n\t\t\t\t\t\tif (checkDuplicates(tempName))\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tsysLog(\"connections\", \"Invalid password: \"+tempName+\" (\"+connSocket.getInetAddress().getHostName()+\")\");\n\t\t\t\t\t\tsendln(\"^/Invalid password.^/\");\n\t\t\t\t\t\tcloseSocket();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} while (askForName);\n\t\t\t\n\t\t\tif (ch == null || createdNewChar)\n\t\t\t{\n\t\t\t\tif (ch == null)\n\t\t\t\t\tch = new CharData(this, true);\n\n\t\t\t\twriting = new BoardMessage(ch.shortName);\n\t\t\t\tsysLog(\"connections\", \"Connected: \"+ch.shortName+\" (\"+connSocket.getInetAddress().getHostName()+\")\");\n\n\t\t\t\tsendln(\"^/\");\n\t\t\t\tInfoCommands.doHelp(this, \"motd\");\n\t\t\t\tprompt(\"^/Push enter to continue...\");\n\t\t\t\t\n\t\t\t\tInfoCommands.doBoards(this, \"\");\n\t\t\t\tprompt(\"^/Push enter to continue...\");\n\t\t\t\t\n\t\t\t\tlastPrompt = -40;\n\t\t\t\tconns.add(this);\n\t\t\t\tRoomCommands.doLook(this, \"\");\n\t\t\t\tif (createdNewChar)\n\t\t\t\t{\n\t\t\t\t\tsendToAllExcept(ch.name+\", a new player, has connected.\");\n\t\t\t\t\tsendln(\"You enter the game as \"+ch.name+\", a young adventurer!\");\n\t\t\t\t} else {\n\t\t\t\t\tsendToAllExcept(ch.name+\" has connected.\");\n\t\t\t\t\tsendln(\"^/{gWelcome to Agape, {Y\"+ch.name+\"{g!{x\");\n\t\t\t\t}\n\t\t\t\tlastPrompt = 2;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tsysLog(\"connections\", \"Reconnected: \"+ch.shortName+\" (\"+connSocket.getInetAddress().getHostName()+\")\");\n\t\t\t\tsendln(\"Reconnecting...\");\n\t\t\t}\n\n\t\t\tch.save();\n\t\t\tcs = ConnState.PLAYING;\n\t\t\tsaveable = true;\n\n\t\t\tif (!conns.contains(this))\n\t\t\t\tconns.add(this);\n\n\t\t\tif (checkDuplicates(tempName))\n\t\t\t{\n\t\t\t\tconns.remove(this);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (!host1.equals(connSocket.getInetAddress().getHostName()))\n\t\t\t{\n\t\t\t\thost2 = host1;\n\t\t\t\thost1 = connSocket.getInetAddress().getHostName();\n\t\t\t\tDatabase.saveAccount(this);\n\t\t\t}\n\t\t} catch (Exception e) {}\n\t}",
"public void set_snmpauthprotocol(String snmpauthprotocol)\r\n\t{\r\n\t\tthis.snmpauthprotocol = snmpauthprotocol;\r\n\t}",
"public void setRequestProtocol(String requestProtocol){\n this.requestProtocol = requestProtocol;\n }",
"ProtocolSelector getProtocolSelector();",
"public String getU_PASS()\n {\n return this.U_PASS;\n }",
"public ProtocolEnum getProtocol() {\n return protocol;\n }",
"public ProtocolTypes protocol() {\n return this.protocol;\n }",
"@Override\r\n\t@Test(groups = {\"function\",\"setting\"} ) \r\n\tpublic boolean checkProtocol() {\n\t\tboolean flag = oTest.checkProtocol();\r\n\t\tAssertion.verifyEquals(flag, true);\r\n\t\treturn false;\r\n\t}",
"String promptSecureString();",
"String getUserPassword();",
"@Override\n\tpublic String getProtocolName() {\n\t\treturn null;\n\t}",
"private static void sendRequestUserValidation(PrintWriter pw, String method, Boolean requestFileFlag, Boolean bodyFlag) {\n pw.print(method + \" /\");\n if (requestFileFlag) {\n pw.print(\"UserValidation/\");\n }\n pw.print(\" HTTP/1.1\\r\\n\");\n //request headers formation.\n pw.print(\"Host: localhost\\r\\n\\r\\n\");\n //request body formation.\n if (bodyFlag) {\n StringBuilder uvb = new StringBuilder();\n uvb.append(\"8\");\n uvb.append(System.getProperty(\"line.separator\"));\n uvb.append(\"Julia\");\n uvb.append(System.getProperty(\"line.separator\"));\n uvb.append(\"Samantha\");\n uvb.append(System.getProperty(\"line.separator\"));\n uvb.append(\"Samantha_21\");\n uvb.append(System.getProperty(\"line.separator\"));\n uvb.append(\"1Samantha\");\n uvb.append(System.getProperty(\"line.separator\"));\n uvb.append(\"Samantha?10_2A\");\n uvb.append(System.getProperty(\"line.separator\"));\n uvb.append(\"JuliaZ007\");\n uvb.append(System.getProperty(\"line.separator\"));\n uvb.append(\"Julia@007\");\n uvb.append(System.getProperty(\"line.separator\"));\n uvb.append(\"_Julia007\");\n uvb.append(System.getProperty(\"line.separator\"));\n\n\n pw.print(uvb.toString());\n System.out.println(uvb.toString());\n }\n pw.flush();\n }",
"public static String getBiblioPass() {\n\t\treturn \"pass\";\n\t}"
]
| [
"0.66656035",
"0.65858173",
"0.63896525",
"0.6334455",
"0.6303884",
"0.62345576",
"0.6020655",
"0.59739155",
"0.59718335",
"0.5942258",
"0.5916736",
"0.58977836",
"0.58625996",
"0.5855528",
"0.5832789",
"0.58178705",
"0.58178705",
"0.5815808",
"0.5794103",
"0.57656914",
"0.56899595",
"0.5673776",
"0.56498957",
"0.5646463",
"0.56319666",
"0.56204623",
"0.56203055",
"0.55996484",
"0.55963534",
"0.5588652",
"0.5563472",
"0.55558646",
"0.553493",
"0.55085075",
"0.55067825",
"0.55067825",
"0.54905003",
"0.5483142",
"0.5462156",
"0.5448548",
"0.54452497",
"0.54432154",
"0.54422104",
"0.541627",
"0.54140955",
"0.54042083",
"0.5393888",
"0.5393767",
"0.5393767",
"0.53848845",
"0.53754985",
"0.53730386",
"0.53656554",
"0.5365277",
"0.53594965",
"0.5346734",
"0.53460354",
"0.5334776",
"0.5298406",
"0.5284201",
"0.5279369",
"0.52793217",
"0.52788174",
"0.5276797",
"0.52714944",
"0.5261955",
"0.5242758",
"0.52392924",
"0.5239011",
"0.52214324",
"0.5217715",
"0.5209289",
"0.5202855",
"0.5197378",
"0.5197179",
"0.51932377",
"0.5191344",
"0.5189666",
"0.5186713",
"0.5180673",
"0.5162024",
"0.5154905",
"0.5154059",
"0.51534367",
"0.513855",
"0.513721",
"0.5135811",
"0.5135519",
"0.5131892",
"0.51289827",
"0.51280576",
"0.5127955",
"0.5126601",
"0.51256037",
"0.51101196",
"0.5097949",
"0.5090188",
"0.5089251",
"0.50876325",
"0.5085174",
"0.508138"
]
| 0.0 | -1 |
Constructor de la clase Profesor | public Profesor (String apellidos, String nombre, String nif, Persona.sexo genero, int edad, int expediente){
this.apellidos = apellidos;
this.nombre = nombre;
this.nif = nif;
this.genero = genero;
this.edad = edad;
this.expediente = expediente;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Propuestas() {}",
"public Produto() {}",
"public Prova() {}",
"public Plato(){\n\t\t\n\t}",
"public Propiedad(){\n\t}",
"public prueba()\r\n {\r\n }",
"public Pasien() {\r\n }",
"public Perro() {\n// super(\"No define\", \"NN\", 0); en caso el constructor de animal tenga parametros\n this.pelaje = \"corto\";\n }",
"public AntrianPasien() {\r\n\r\n }",
"public Produit() {\n }",
"public Produit() {\n\t\tsuper();\n\t}",
"public Professor()\n\t{\n\t\t//stuff\n\t}",
"public Persona(){\n \n }",
"public Persona(){\n \n }",
"protected ProvinciaList() {\n\t\tsuper();\n\t\t// TODO Auto-generated constructor stub\n\t}",
"public Persona() {\n\t}",
"public Persona() {\n \t\n }",
"public PapelBean() {\n }",
"public Alojamiento() {\r\n\t}",
"public Promo(){\n}",
"public Producto() {\r\n }",
"public SlanjePoruke() {\n }",
"public Caso_de_uso () {\n }",
"public Carrera(){\n }",
"public Producto (){\n\n }",
"public Corso() {\n\n }",
"public MPaciente() {\r\n\t}",
"public Persona() {\n }",
"public Properties(){\n\n }",
"public Purp() {\n }",
"Constructor() {\r\n\t\t \r\n\t }",
"public ProdutoDTO()\n {\n super();\n }",
"public PersonaFisica() {}",
"public Postoj() {}",
"public Pitonyak_09_02() {\r\n }",
"public Constructor(){\n\t\t\n\t}",
"Petunia() {\r\n\t\t}",
"public Candidatura (){\n \n }",
"public Curso() {\r\n }",
"public Profesor(String nombre, String direccion, String telefono, String email, String despacho, int salario,\n\t\t\tGregorianCalendar fecha, String tutoria, int categoria) {\n\t\tsuper(nombre, direccion, telefono, email, despacho, salario, fecha);\n\t\tthis.tutoria = tutoria;\n\t\tthis.categoria = categoria;\n\t}",
"public Troco() {\n }",
"public TParametrosVOImpl() {\r\n }",
"public PSRelation()\n {\n }",
"public Poem(){}",
"public ValorVariavel() {\r\n }",
"public RptPotonganGaji() {\n }",
"public Potencial() {\r\n }",
"public Persona() {\n\t\t// TODO Auto-generated constructor stub\n\t}",
"public Phl() {\n }",
"public ControllerProtagonista() {\n\t}",
"public Vehiculo() {\r\n }",
"public PowerMethodParameter() {\r\n\t\t\r\n\t\t//constructor fara parametru, utilizat in cazul in care utilizatorul nu introduce\r\n\t\t//fisierul sursa si nici fiesierul destinatie ca parametrii in linia de comanda\r\n\t\tSystem.out.println(\"****The constructor without parameters PowerMethodParameter has been called****\");\r\n\t\tSystem.out.println(\"You did not specify the input file and the output file\");\r\n\t\t\r\n\t}",
"public Partage() {\n }",
"public ProductosBean() {\r\n }",
"public Clade() {}",
"public ControladorPrueba() {\r\n }",
"public Puntaje() {\n nombre = \"\";\n puntos = 0;\n }",
"public Cgg_jur_anticipo(){}",
"public Respuesta() {\n }",
"public Casa() { \n \n /* Cuando se crea la casa, tambien se debe crear la puerta */\n \n laPuerta = new Puerta();\n \n /* se pone la letra F por que son de tipo float */\n laPuerta.setAncho(2.3F);\n laPuerta.setAlto(1.5F);\n \n }",
"public Chauffeur() {\r\n\t}",
"public Exercicio(){\n \n }",
"public Cohete() {\n\n\t}",
"public Libro() {\r\n }",
"public BrihaspatiProFile() {\n }",
"public PessoaTest() {\n pessoa.setNome(\"Thiago\");\n pessoa.setSobrenome(\"Cury\"); \n pessoa.setIdade(36); \n }",
"public CCuenta()\n {\n }",
"public AfiliadoVista() {\r\n }",
"public Funcionario() {\r\n\t\t\r\n\t}",
"private QuadradoPerfeito() {\n }",
"public MorteSubita() {\n }",
"public Particle() {\n\t}",
"public Promo(String n){\nnom = n;\n}",
"public Productos() {\n super();\n // TODO Auto-generated constructor stub\n }",
"protected Asignatura()\r\n\t{}",
"public Commune() {\n\t\tsuper();\n\t\t// TODO Auto-generated constructor stub\n\t}",
"public ProfesorDAOImpl() {\n super();\n }",
"public LecturaPorEvento() \r\n {\r\n }",
"public ordenProduccion() {\r\n initComponents();\r\n }",
"public Notifica(){}",
"public Valvula(){}",
"public Odontologo() {\n }",
"public Plato(String nombre, String descripcion){\n\t\tthis.nombre=nombre;\n\t\tthis.descripcion=descripcion;\n\t}",
"public Producto() {\r\n\t\tsuper();\r\n\t\tID = getIDnuevoProducto();\r\n\t\tnombre = \"\";\r\n\t\tvendedor = \"\";\r\n\t\tprecio = 0;\r\n\t\tcantidad = 0;\r\n\t\tenVenta = false;\r\n\t\tdescripcion = \"\";\r\n\t\tcategorias = new Categoria();\r\n\t\tcaracteristicas = null;//TODO CORREGIR\r\n\t}",
"public Livro() {\n\n\t}",
"public Facturacion() {\n }",
"public Parameters() {\n\t}",
"public Produto(int id_p, int barcode, String categoria, String descricao,\r\n\t\t\tint unidade, BigDecimal custo, BigDecimal mlucro) {\r\n\t\tthis.id_p = id_p;\r\n\t\tthis.barcode = barcode;\r\n\t\tthis.categoria = categoria;\r\n\t\tthis.descricao = descricao;\r\n\t\tthis.unidade = unidade;\r\n\t\tthis.custo = custo;\r\n\t\tthis.mlucro = mlucro;\r\n\t}",
"public PersonaVO() {\n }",
"public Commande() {\n }",
"public Parametros() {\r\n semilla = SEMILLA_DEFECTO;\r\n numeroPistas = NUMERO_PISTAS_DEFECTO;\r\n duracionSlot = DURACION_SLOT_DEFECTO;\r\n frecuencia = FRECUENCIA_DEFECTO;\r\n duracionMedia = DURACION_MEDIA_DEFECTO;\r\n duracionDesviacion = DURACION_DESVIACION_DEFECTO;\r\n duracionMinima = DURACION_MINIMA_DEFECTO;\r\n demoraMedia = DEMORA_MEDIA_DEFECTO;\r\n demoraDesviacion = DEMORA_DESVIACION_DEFECTO;\r\n }",
"public Aritmetica(){ }",
"public Busca(){\n }",
"public Classe() {\r\n }",
"public Estado() {\r\n }",
"public CorreoElectronico() {\n }",
"public Nota() {\n }",
"public BaseParameters(){\r\n\t}",
"public Propiedad(int pNumFinca, String pModalidad, double pAreaTerreno, double pValorMetroCuadrado,\n double pValorFiscal, String pProvincia, String pCanton, String pDistrito, String pDirExacta,\n String pTipo, String pEstado, double pPrecio) {\n this();\n numFinca = pNumFinca;\n areaTerreno = pAreaTerreno;\n valorMetroCuadrado = pValorMetroCuadrado;\n valorFiscal = pValorFiscal;\n modalidad = pModalidad;\n provincia = pProvincia;\n canton = pCanton;\n distrito = pDistrito;\n dirExacta = pDirExacta;\n tipo = pTipo;\n estado = pEstado;\n precio = pPrecio;\n }",
"protected Persona (String nombre,String apellido, String fechaNac){\r\n this.nombre = nombre;\r\n this.apellido = apellido;\r\n this.fechaNac = fechaNac;\r\n }"
]
| [
"0.80720496",
"0.79997337",
"0.78777766",
"0.7804193",
"0.7588094",
"0.7513225",
"0.7263177",
"0.72457147",
"0.7157117",
"0.7119436",
"0.7108439",
"0.70692146",
"0.7044133",
"0.7044133",
"0.7018538",
"0.70165485",
"0.701459",
"0.6992835",
"0.69889283",
"0.6987126",
"0.69694495",
"0.6960215",
"0.695085",
"0.69402236",
"0.69382393",
"0.691631",
"0.68979424",
"0.6891319",
"0.68846256",
"0.6865933",
"0.6857781",
"0.6851389",
"0.68478936",
"0.68429166",
"0.6834637",
"0.68340087",
"0.68254745",
"0.681558",
"0.6813105",
"0.6799058",
"0.6789528",
"0.67788696",
"0.67562145",
"0.67556554",
"0.6751728",
"0.67466074",
"0.6744118",
"0.674326",
"0.67215127",
"0.67149353",
"0.67070043",
"0.670072",
"0.66992337",
"0.6693014",
"0.6689414",
"0.66791517",
"0.6652289",
"0.664919",
"0.663927",
"0.66380113",
"0.66374654",
"0.66322225",
"0.6626674",
"0.6618888",
"0.6609481",
"0.6604866",
"0.65951777",
"0.65799654",
"0.6572819",
"0.6570432",
"0.6567242",
"0.65618426",
"0.65593255",
"0.6553567",
"0.654756",
"0.65409297",
"0.65399164",
"0.6539781",
"0.6535751",
"0.65205073",
"0.6520253",
"0.6514424",
"0.65119684",
"0.65055937",
"0.64978623",
"0.6493656",
"0.64896375",
"0.648814",
"0.6487565",
"0.64864236",
"0.648547",
"0.6480145",
"0.6475141",
"0.6471491",
"0.64598894",
"0.6459615",
"0.64587945",
"0.6454386",
"0.6452038",
"0.645072"
]
| 0.66458297 | 58 |
A predicate to determine if a Jira version should be become a GitHub Milestone, e.g. the version "Waiting for Triage", used in SPR becomes the label "status: waitingfortriage" and not a milestone. | public interface MilestoneFilter extends Predicate<JiraVersion> {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public java.lang.String getMilestone() {\n return milestone;\n }",
"public void milestone1(int num) {\n if (num % 2 == 0)\n System.out.println(\"Even\");\n else\n System.out.println(\"Odd\");\n }",
"public String getMilestoneId()\n {\n String milestoneId;\n //---------------------\n milestoneId = \"ninguna\";\n\n\n if(\n (!Blackboard.firstMilestoneAccomplished) &&\n (beliefs.puzzle[0][0] == 1) &&\n (beliefs.puzzle[0][1] == 2) &&\n (beliefs.puzzle[0][2] == 3) &&\n (beliefs.puzzle[0][3] == 4)\n )\n {\n milestoneId = \"primeraMilestone\";\n }//end if\n\n if(\n (!Blackboard.secondMilestoneAccomplished) &&\n (beliefs.puzzle[0][0] == 1) &&\n (beliefs.puzzle[0][1] == 2) &&\n (beliefs.puzzle[0][2] == 3) &&\n (beliefs.puzzle[0][3] == 4) &&\n (beliefs.puzzle[1][0] == 5) &&\n (beliefs.puzzle[1][1] == 6) &&\n (beliefs.puzzle[1][2] == 7) &&\n (beliefs.puzzle[1][3] == 8)\n )\n {\n milestoneId = \"segundaMilestone\";\n }//end if\n\n if(\n (!Blackboard.thirdMilestoneAccomplished) &&\n (beliefs.puzzle[0][0] == 1) &&\n (beliefs.puzzle[0][1] == 2) &&\n (beliefs.puzzle[0][2] == 3) &&\n (beliefs.puzzle[0][3] == 4) &&\n (beliefs.puzzle[1][0] == 5) &&\n (beliefs.puzzle[1][1] == 6) &&\n (beliefs.puzzle[1][2] == 7) &&\n (beliefs.puzzle[1][3] == 8) &&\n (beliefs.puzzle[2][0] == 9) &&\n (beliefs.puzzle[3][0] == 13)\n )\n {\n milestoneId = \"terceraMilestone\";\n }//end if\n\n if(\n (!Blackboard.finalMilestoneAccomplished) &&\n (beliefs.puzzle[0][0] == 1) &&\n (beliefs.puzzle[0][1] == 2) &&\n (beliefs.puzzle[0][2] == 3) &&\n (beliefs.puzzle[0][3] == 4) &&\n (beliefs.puzzle[1][0] == 5) &&\n (beliefs.puzzle[1][1] == 6) &&\n (beliefs.puzzle[1][2] == 7) &&\n (beliefs.puzzle[1][3] == 8) &&\n (beliefs.puzzle[2][0] == 9) &&\n (beliefs.puzzle[2][1] == 10) &&\n (beliefs.puzzle[2][2] == 11) &&\n (beliefs.puzzle[2][3] == 12) &&\n (beliefs.puzzle[3][0] == 13) &&\n (beliefs.puzzle[3][1] == 14) &&\n (beliefs.puzzle[3][2] == 15)\n )\n {\n milestoneId = \"finalMilestone\";\n }//end if\n\n return milestoneId;\n }",
"private boolean firstMilestoneAccomplished()\n {\n if(\n (beliefs.puzzle[0][0] == 1) &&\n (beliefs.puzzle[0][1] == 2) &&\n (beliefs.puzzle[0][2] == 3) &&\n (beliefs.puzzle[0][3] == 4)\n )\n return true;\n else\n return false;\n }",
"public interface Version {\n\n /**\n * Check if this version is a major version.\n * \n * @return true if major version, false if it is a minor version\n */\n boolean isMajor();\n\n /**\n * Check if this version is a private working copy.\n * \n * @return true if it a PWC, false if not\n */\n boolean isPwc();\n\n /**\n * make the private working copy an official version.\n * \n * @param isMajor\n * true if major version, false if it is a minor version\n */\n void commit(boolean isMajor);\n\n /**\n * Set the check.in comment.\n * \n * @param comment\n * check-in comment\n */\n void setCheckinComment(String comment);\n\n /**\n * Get the check-in comment.\n * \n * @return check-in comment\n */\n String getCheckinComment();\n\n /**\n * Get the version label.\n * \n * @return the version label\n */\n String getVersionLabel();\n\n /**\n * Get the versioned document (parent) of this version.\n * \n * @return versioned document\n */\n VersionedDocument getParentDocument();\n}",
"private boolean finalMilestoneAccomplished()\n {\n if( (firstMilestoneAccomplished()) &&\n (secondMilestoneAccomplished()) &&\n (thirdMilestoneAccomplished()) &&\n (beliefs.puzzle[2][1] == 10) &&\n (beliefs.puzzle[2][2] == 11) &&\n (beliefs.puzzle[2][3] == 12) &&\n (beliefs.puzzle[3][1] == 14) &&\n (beliefs.puzzle[3][2] == 15)\n\n )\n return true;\n else\n return false;\n }",
"public void setMilestone(java.lang.String milestone) {\n this.milestone = milestone;\n }",
"public void checkMilestones()\n {\n if(\n (beliefs.puzzle[0][0] == 1) &&\n (beliefs.puzzle[0][1] == 2) &&\n (beliefs.puzzle[0][2] == 3) &&\n (beliefs.puzzle[0][3] == 4)\n )\n {\n Blackboard.firstMilestoneAccomplished = true;\n }//end if\n\n if(\n (beliefs.puzzle[0][0] == 1) &&\n (beliefs.puzzle[0][1] == 2) &&\n (beliefs.puzzle[0][2] == 3) &&\n (beliefs.puzzle[0][3] == 4) &&\n (beliefs.puzzle[1][0] == 5) &&\n (beliefs.puzzle[1][1] == 6) &&\n (beliefs.puzzle[1][2] == 7) &&\n (beliefs.puzzle[1][3] == 8)\n )\n {\n Blackboard.secondMilestoneAccomplished = true;\n }//end if\n\n if(\n (beliefs.puzzle[0][0] == 1) &&\n (beliefs.puzzle[0][1] == 2) &&\n (beliefs.puzzle[0][2] == 3) &&\n (beliefs.puzzle[0][3] == 4) &&\n (beliefs.puzzle[1][0] == 5) &&\n (beliefs.puzzle[1][1] == 6) &&\n (beliefs.puzzle[1][2] == 7) &&\n (beliefs.puzzle[1][3] == 8) &&\n (beliefs.puzzle[2][0] == 9) &&\n (beliefs.puzzle[3][0] == 13)\n )\n {\n Blackboard.thirdMilestoneAccomplished = true;\n }//end if\n\n if(\n (beliefs.puzzle[0][0] == 1) &&\n (beliefs.puzzle[0][1] == 2) &&\n (beliefs.puzzle[0][2] == 3) &&\n (beliefs.puzzle[0][3] == 4) &&\n (beliefs.puzzle[1][0] == 5) &&\n (beliefs.puzzle[1][1] == 6) &&\n (beliefs.puzzle[1][2] == 7) &&\n (beliefs.puzzle[1][3] == 8) &&\n (beliefs.puzzle[2][0] == 9) &&\n (beliefs.puzzle[2][1] == 10) &&\n (beliefs.puzzle[2][2] == 11) &&\n (beliefs.puzzle[2][3] == 12) &&\n (beliefs.puzzle[3][0] == 13) &&\n (beliefs.puzzle[3][1] == 14) &&\n (beliefs.puzzle[3][2] == 15)\n )\n {\n Blackboard.finalMilestoneAccomplished = true;\n }//end if\n }",
"private boolean secondMilestoneAccomplished()\n {\n if( (firstMilestoneAccomplished()) &&\n (beliefs.puzzle[1][0] == 5) &&\n (beliefs.puzzle[1][1] == 6) &&\n (beliefs.puzzle[1][2] == 7) &&\n (beliefs.puzzle[1][3] == 8)\n )\n return true;\n else\n return false;\n }",
"private String statusOf(GitHubProject project) {\n return String.format(\"[%s](%s/%s.md)\",\n project.ratingValue()\n .map(RatingValue::label)\n .map(OssRulesOfPlayRatingMarkdownFormatter::formatted)\n .orElse(\"UNKNOWN\"),\n project.organization().name(),\n project.name());\n }",
"public interface WorkflowTransitionTabProvider\n{\n Iterable<WorkflowTransitionTab> getTabs(ActionDescriptor action, JiraWorkflow workflow);\n\n @Nullable\n String getTabContentHtml(String panelKey, ActionDescriptor action, JiraWorkflow workflow);\n\n class WorkflowTransitionTab\n {\n private final String label;\n private final String count;\n private final WebPanelModuleDescriptor module;\n\n public WorkflowTransitionTab(final String label, final String count, final WebPanelModuleDescriptor module)\n {\n this.label = label;\n this.count = count;\n this.module = module;\n }\n\n public String getLabel()\n {\n return label;\n }\n\n public String getCount()\n {\n return count;\n }\n\n public WebPanelModuleDescriptor getModule()\n {\n return module;\n }\n }\n}",
"public FullVersion MprisVersion();",
"@Test\n public void testCreateLatestMajorOnPreviousMajorIfItFailsOnMajorVersion8() {\n deployWithModelForLatestMajorVersionFailing(8);\n }",
"boolean hasMinor();",
"public boolean evaluateMCVersion(String operand, String version);",
"public Boolean isTeamMember(final Artifact artifact);",
"private boolean thirdMilestoneAccomplished()\n {\n if( (firstMilestoneAccomplished()) &&\n (secondMilestoneAccomplished()) &&\n (beliefs.puzzle[2][0] == 9) &&\n (beliefs.puzzle[3][0] == 13)\n )\n return true;\n else\n return false;\n }",
"public String validateStatusBeforeFutureStatus(MaintenanceRequest mrq, String status){\n\t\tMaintenanceRequestStatus currentStatus = convertPOStatus(mrq.getMaintReqStatus());\n\t\tMaintenanceRequestStatus futureStatus = convertPOStatus(status);\n\t\tString message = \"\";\n\t\t\n\t\tif(currentStatus != null && futureStatus != null){\n\t\t\tif(currentStatus.getSortOrder() >= futureStatus.getSortOrder()){\n\t\t\t\tmessage = \"This PO has already reached \" + futureStatus.getDescription() + \" status\";\n\t\t\t}\n\t\t}\n\t\treturn message;\n\t}",
"@AnonymousAllowed\n private boolean checkUPMVersion() {\n boolean result = false;\n Plugin plugin = pluginAccessor\n .getPlugin(\"com.atlassian.upm.atlassian-universal-plugin-manager-plugin\");\n if (plugin == null) {\n result = false;\n } else {\n Version upmVersion = Versions.fromPlugin(plugin, false);\n String upmVersion_str = upmVersion.toString();\n StringTokenizer st = new StringTokenizer(upmVersion_str, \".\");\n int first_index = Integer.parseInt((String) st.nextElement());\n if (first_index >= 2) {\n result = true;\n }\n }\n return result;\n }",
"public void testGitHub() {\n\t}",
"@Test\n public void destiny2GetPublicMilestonesTest() {\n InlineResponse20057 response = api.destiny2GetPublicMilestones();\n\n // TODO: test validations\n }",
"@Test\n public void testSemanticVersion_withBuildMetadata() throws Exception{\n SemanticVersion version = SemanticVersion.createFromVersionString(\"1.2.3+ignore.me.plz\");\n assertThat(version.majorVersion()).isEqualTo(1);\n assertThat(version.minorVersion()).isEqualTo(Optional.of(2));\n assertThat(version.patchVersion()).isEqualTo(Optional.of(3));\n }",
"public interface IWorkflowStatus {\n\t/**\n\t * @return the type\n\t */\n\tpublic WorkflowEvent getType();\n\t/**\n\t * @param type the type to set\n\t */\n\tpublic void setType(WorkflowEvent event);\n\t/**\n\t * @return the topic\n\t */\n\tpublic String getTopic();\n\t/**\n\t * @param topic the topic to set\n\t */\n\tpublic void setTopic(String topic);\n\t/**\n\t * @return the attempt\n\t */\n\tpublic int getAttempt();\n\t/**\n\t * @param attempt the attempt to set\n\t */\n\tpublic void setAttempt(int attempt);\n\t/**\n\t * @return the lecturer\n\t */\n\tpublic String getLecturer();\n\t/**\n\t * @param lecturer the lecturer to set\n\t */\n\tpublic void setLecturer(String lecturer);\n\t/**\n\t * @return the secondExaminer\n\t */\n\tpublic String getSecondExaminer();\n\t/**\n\t * @param secondExaminer the secondExaminer to set\n\t */\n\tpublic void setSecondExaminer(String examinar);\n\t/**\n\t * @return the dateOfIssue\n\t */\n\tpublic String getDateOfIssue();\n\t/**\n\t * @param dateOfIssue the dateOfIssue to set\n\t */\n\tpublic void setDateOfIssue(String date);\n\t/**\n\t * @return the deadline\n\t */\n\tpublic String getDeadline();\n\t/**\n\t * @param deadline the deadline to set\n\t */\n\tpublic void setDeadline(String deadline);\n\t/**\n\t * @return the overtime\n\t */\n\tpublic int getOvertime();\n\t/**\n\t * @param overtime the overtime to set\n\t */\n\tpublic void setOvertime(int overtime);\n\t/**\n\t * @return the dateOfHandOver\n\t */\n\tpublic String getDateOfHandOver();\n\t/**\n\t * @param dateOfHandOver the dateOfHandOver to set\n\t */\n\tpublic void setDateOfHandOver(String date);\n\t/**\n\t * @return the resultFileUploadState\n\t */\n\tpublic WorkflowStatusEnum getResultFileUploadState();\n\t/**\n\t * @param resultFileUploadState the resultFileUploadState to set\n\t */\n\tpublic void setResultFileUploadState(WorkflowStatusEnum phase);\n\t/**\n\t * @return the workFlowState\n\t */\n\tpublic String getWorkFlowState();\n\t/**\n\t * @param workFlowState the workFlowState to set\n\t */\n\tpublic void setWorkFlowState(String workFlowState);\n}",
"public boolean hasNewVersion() {\n String newVersion = newVersionName();\r\n if(TextUtils.isEmpty(newVersion)) {\r\n return false;\r\n }\r\n\r\n if(newVersion.indexOf('.') == -1) {\r\n return false;\r\n }\r\n String[] newVerNums = newVersion.split(\"\\\\.\");\r\n if(newVerNums.length != 2) {\r\n return false;\r\n }\r\n\r\n int newMajorVersion = 0;\r\n try {\r\n newMajorVersion = Integer.valueOf(newVerNums[0]);\r\n } catch (NumberFormatException e) {\r\n e.printStackTrace();\r\n return false;\r\n }\r\n\r\n int newMinorVersion = 0;\r\n\r\n try {\r\n newMinorVersion = Integer.valueOf(newVerNums[1]);\r\n } catch (NumberFormatException e) {\r\n e.printStackTrace();\r\n return false;\r\n }\r\n\r\n if(newMajorVersion > mMajorVersion) {\r\n Log.i(LOG_TAG, \"find new major version update + \" + newVersionUrl());\r\n return true;\r\n } else if(newMajorVersion == mMajorVersion) {\r\n if(newMinorVersion > mMinorVersion) {\r\n Log.i(LOG_TAG, \"find new minor version update + \" + newVersionUrl());\r\n return true;\r\n }\r\n }\r\n Log.i(LOG_TAG, \"no new version found.\");\r\n\r\n return false;\r\n }",
"@Then(\"^story is displayed in the project page$\")\n public void newStoryNameIsDisplayedInTheProjectPage() {\n assertion.assertTrue(project.isVisibleStory(helper.getStoryVariable()));\n }",
"boolean hasVersionNumber();",
"private void assertFuzzyMaintenaceReleaseCase(String attrName, String version, boolean in) throws ServiceException {\n boolean check = in ? am.inVersion(attrName, version) : am.beforeVersion(attrName, version);\n Assert.assertTrue(check);\n }",
"public boolean compareMonth(String date){\n\n LocalDateTime providedDate = LocalDateTime.parse(date, dateTimeFormatter);\n LocalDateTime currentPlusOneMonth = current.plusMonths(1);\n\n if(providedDate.isBefore(current)){\n return false;\n }if(providedDate.isAfter(currentPlusOneMonth)){\n return false;\n }\n\n return true;\n\n }",
"public void setMilestonesSet(List<CompletedMilestone> list) {\r\n milestonesSet = list;\r\n }",
"public boolean isFirstVersion();",
"public boolean mo31259n(E e) {\n mo29893b(e, 1);\n return true;\n }",
"public boolean isMonth(String input){\r\n if(!isInteger(input)) return false;\r\n int month = Integer.parseInt(input);\r\n if(12 < month) return false;\r\n return true;\r\n }",
"boolean hasVersion();",
"boolean hasVersion();",
"boolean isMajor();",
"@Test\n public void isWarning_does_not_warn_if_project_is_closed() {\n when(expirationBefore.getExpirationPercent()).thenReturn(Optional.of(89));\n when(expirationAfter.getExpirationPercent()).thenReturn(Optional.of(96));\n when(project.isClosed()).thenReturn(true);\n\n // when\n boolean completionWarning = expirationThresholdViolationIndicator.isWarning(\"some-uuid\");\n\n // then\n assertFalse(completionWarning);\n }",
"public boolean isLastVersion();",
"boolean isNewSolution();",
"private boolean shouldIncludeCommitment(Commitment aCommitment)\n {\n int i;\n int j;\n String direction;\n StringTokenizer tokenizer;\n String commitmentType;\n boolean shouldInclude;\n int token;\n //----------------\n\n shouldInclude = true;\n tokenizer = new StringTokenizer(aCommitment.predicate,\"(, )\");\n commitmentType = tokenizer.nextToken();\n i = Integer.valueOf(tokenizer.nextToken());\n j = Integer.valueOf(tokenizer.nextToken());\n direction = tokenizer.nextToken();\n token = beliefs.puzzle[i][j];\n\n // Reglas de ESTRATEGIA\n // donde no se consideran compromisos que no convienen\n ///////////////////////////////////////////////////////\n\n\n // si el token 1 ya est? en posici?n, no moverlo\n if(\n (token == 1) && (beliefs.puzzle[0][0] == 1)\n )\n shouldInclude = false;\n //end if\n\n\n // si el token es 2 y ya est?n 1 y 2 en posici?n, no moverlo\n if(\n ((token == 2) && (beliefs.puzzle[0][1] == 2)) &&\n (beliefs.puzzle[0][0] == 1)\n )\n shouldInclude = false;\n //end if\n\n // si la primera l?nea est? colocada,\n // no mover ninguno de sus tokens\n if(\n (firstMilestoneAccomplished()) &&\n ((token == 1) || (token == 2) || (token == 3) || (token == 4))\n )\n shouldInclude = false;\n //end if\n\n\n // si el 5 y la primera l?nea est?n colocados,\n // no mover el 5\n if(\n (firstMilestoneAccomplished()) &&\n (token == 5) && (beliefs.puzzle[1][0] == 5)\n )\n shouldInclude = false;\n //end if\n\n\n // el token es 6, y la primera linea, el 5 y el 6\n // ya est?n en su posici?n, no moverlo\n if(\n (firstMilestoneAccomplished()) &&\n ((token == 6) && (beliefs.puzzle[1][1] == 6)) &&\n (beliefs.puzzle[1][0] == 5)\n )\n shouldInclude = false;\n //end if\n\n // si la primera y segunda l?neas est?n colocadas,\n // no mover ninguno de los tokens de la segunda l?nea\n if(\n (firstMilestoneAccomplished()) &&\n (secondMilestoneAccomplished()) &&\n ((token == 5) || (token == 6) || (token == 7) || (token == 8))\n )\n shouldInclude = false;\n //end if\n\n // si la primera y segunda l?neas est?n colocadas,\n // y tambien 9 y 13, no mover los tokens de segunda linea ni 9 ni 13\n if(\n (firstMilestoneAccomplished()) &&\n (secondMilestoneAccomplished()) &&\n (thirdMilestoneAccomplished()) &&\n ((token == 5) || (token == 6) || (token == 7) || (token == 8)|| (token == 9) || (token == 13))\n )\n shouldInclude = false;\n //end if\n\n return shouldInclude;\n }",
"public UiLabelsFactory getMinorLabels() {\n if (getMinorLabels == null)\n getMinorLabels = new UiLabelsFactory(jsBase + \".minorLabels()\");\n\n return getMinorLabels;\n }",
"public static String checkVersion() {\n GhostMute plugin = getPlugin(GhostMute.class);\n String cVersion;\n String lineWithVersion;\n try {\n URL githubUrl = new URL(\"https://raw.githubusercontent.com/Rsl1122/GhostMute/master/GhostMute/src/plugin.yml\");\n lineWithVersion = \"\";\n Scanner websiteScanner = new Scanner(githubUrl.openStream());\n while (websiteScanner.hasNextLine()) {\n String line = websiteScanner.nextLine();\n if (line.toLowerCase().contains(\"version\")) {\n lineWithVersion = line;\n break;\n }\n }\n String versionString = lineWithVersion.split(\": \")[1];\n int newestVersionNumber = parseVersionNumber(versionString);\n cVersion = plugin.getDescription().getVersion();\n int currentVersionNumber = parseVersionNumber(cVersion);\n if (newestVersionNumber > currentVersionNumber) {\n return \"New Version (\" + versionString + \") is availible at https://www.spigotmc.org/resources/ghostmute-fake-blocked-messages.33880/\";\n } else {\n return \"You're running the latest version\";\n }\n } catch (Exception e) {\n plugin.logError(\"Failed to compare versions.\");\n }\n return \"Failed to get newest version number.\";\n }",
"@Override\n\tpublic boolean isIsJuniorMatch() {\n\t\treturn _esfTournament.isIsJuniorMatch();\n\t}",
"@Test\n public void testWantedVersionIsRequiredAlsoWhenThereIsAnOlderMajorThatDoesNotFailModelBuilding() {\n int oldMajor = 7;\n int newMajor = 8;\n Version wantedVersion = new Version(newMajor, 1, 2);\n Version oldVersion = new Version(oldMajor, 2, 3);\n List<Host> hosts = createHosts(9, oldVersion.toFullString());\n\n CountingModelFactory oldFactory = createHostedModelFactory(oldVersion);\n ModelFactory newFactory = createFailingModelFactory(wantedVersion);\n List<ModelFactory> modelFactories = List.of(oldFactory, newFactory);\n\n DeployTester tester = createTester(hosts, modelFactories, prodZone);\n\n // Not OK when failing version is requested.\n assertEquals(\"Invalid application\",\n assertThrows(IllegalArgumentException.class,\n () -> tester.deployApp(\"src/test/apps/hosted/\", wantedVersion.toFullString()))\n .getMessage());\n\n // OK when older version is requested.\n tester.deployApp(\"src/test/apps/hosted/\", oldVersion.toFullString());\n assertEquals(9, tester.getAllocatedHostsOf(tester.applicationId()).getHosts().size());\n\n // Check >0 not ==0 as the session watcher thread is running and will redeploy models in the background\n assertTrue(oldFactory.creationCount() > 0);\n }",
"boolean hasCurrentVersion();",
"boolean _is_a(String repositoryIdentifier);",
"public static boolean isMatrixType( ProjectDTO type )\n {\n return \"hudson.matrix.MatrixProject\".equals( type.getType() ); //$NON-NLS-1$\n }",
"public interface IStatusLineDataModel extends IDataModel {\r\n\r\n\t/**\r\n\t * Checks if there are unsaved changes or not\r\n\t * \r\n\t * @return whether there are unsaved changes or not\r\n\t * \r\n\t * @author Fabian Toth\r\n\t */\r\n\t@Override\r\n\tboolean hasUnsavedChanges();\r\n\r\n\t/**\r\n\t * Getter for the projectName.\r\n\t * \r\n\t * @return projectName\r\n\t * \r\n\t * @author Sebastian Sieber\r\n\t */\r\n\t@Override\r\n\tString getProjectName();\r\n}",
"public Token getModuleVersion()\n {\n // ie: use Module 'x'\n if (!getToken(OperatorToken.class, 3).isNull())\n {\n return Token.NULL;\n }\n\n return getToken(NumberToken.class, 2);\n }",
"boolean isWorkflowStatusCanBeChanged(TaskItemModel taskItem) throws AAException, RemoteException;",
"@Test\n public void testitMNG1021() throws Exception {\n File testDir = ResourceExtractor.simpleExtractResources(getClass(), \"/mng-1021\");\n Verifier verifier = newVerifier(testDir.getAbsolutePath());\n verifier.setAutoclean(false);\n verifier.deleteDirectory(\"repo\");\n verifier.deleteArtifacts(\"org.apache.maven.its.mng1021\");\n verifier.addCliArgument(\"initialize\");\n verifier.execute();\n verifier.verifyErrorFreeLog();\n\n verifier.verifyArtifactPresent(\"org.apache.maven.its.mng1021\", \"test\", \"1-SNAPSHOT\", \"pom\");\n verifier.verifyArtifactPresent(\"org.apache.maven.its.mng1021\", \"test\", \"1-SNAPSHOT\", \"jar\");\n\n String dir = \"repo/org/apache/maven/its/mng1021/test/\";\n String snapshot = getSnapshotVersion(new File(testDir, dir + \"1-SNAPSHOT\"));\n assertTrue(snapshot, snapshot.endsWith(\"-1\"));\n\n verifier.verifyFilePresent(dir + \"maven-metadata.xml\");\n verifier.verifyFilePresent(dir + \"maven-metadata.xml.md5\");\n verifier.verifyFilePresent(dir + \"maven-metadata.xml.sha1\");\n verifier.verifyFilePresent(dir + \"1-SNAPSHOT/maven-metadata.xml\");\n verifier.verifyFilePresent(dir + \"1-SNAPSHOT/maven-metadata.xml.md5\");\n verifier.verifyFilePresent(dir + \"1-SNAPSHOT/maven-metadata.xml.sha1\");\n verifier.verifyFilePresent(dir + \"1-SNAPSHOT/test-\" + snapshot + \".pom\");\n verifier.verifyFilePresent(dir + \"1-SNAPSHOT/test-\" + snapshot + \".pom.md5\");\n verifier.verifyFilePresent(dir + \"1-SNAPSHOT/test-\" + snapshot + \".pom.sha1\");\n verifier.verifyFilePresent(dir + \"1-SNAPSHOT/test-\" + snapshot + \".jar\");\n verifier.verifyFilePresent(dir + \"1-SNAPSHOT/test-\" + snapshot + \".jar.md5\");\n verifier.verifyFilePresent(dir + \"1-SNAPSHOT/test-\" + snapshot + \".jar.sha1\");\n verifier.verifyFilePresent(dir + \"1-SNAPSHOT/test-\" + snapshot + \"-it.jar\");\n verifier.verifyFilePresent(dir + \"1-SNAPSHOT/test-\" + snapshot + \"-it.jar.md5\");\n verifier.verifyFilePresent(dir + \"1-SNAPSHOT/test-\" + snapshot + \"-it.jar.sha1\");\n }",
"public String processGithubNotifications(GithubNotification[] githubNotifications){\n if(githubNotifications.length > 0)\n return \"You go a new Github Notification\";\n else\n return null;\n }",
"String getModuleVersionNumber();",
"@Test\n public void testCanReadGitRevision() throws Exception {\n MatcherAssert.assertThat(\n new TestJenkins().jobs().findByName(\n \"test-parametrised-job\"\n ).next().builds().findByNumber(\"#4\").next().details().gitRevision(),\n new IsEqual<>(\"3d21ea7072da134395eedbc7a07bf0f00cfabf97\")\n );\n }",
"public boolean isNewerVersionAvailable() {\n\t\tString url = \"https://raw.githubusercontent.com/kleekru/RoboTarPC/master/currentversion\";\n\t\tLOG.info(\"checking for new version at address: {}\", url);\n\t\tthis.remoteVersion = getRemoteVersion(url);\n\t\treturn isNewerVersion(remoteVersion);\n\t}",
"@Test\n\tpublic void testValidAddMaven() throws InvalidManifestException, IllegalAccessException, InvocationTargetException {\n\t\t// test with a valid dummy string for a maven add\n\t\tString[] args = new String(\"add -repo dummyrepo -cmt dummycommit -br dummybranch -mvnv 0.0-DUMMY\").split(\" \");\n\t\tVersionManifest m = (VersionManifest)createManifestMethod.invoke(null, new Object[] { args });\n\n\t\t// Should not throw\n\t\tvalidateAddMethod.invoke(null, m);\n\t}",
"static boolean VersionDeclVersion(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"VersionDeclVersion\")) return false;\n if (!nextTokenIs(b, K_VERSION)) return false;\n boolean r, p;\n Marker m = enter_section_(b, l, _NONE_);\n r = consumeToken(b, K_VERSION);\n p = r; // pin = 1\n r = r && report_error_(b, Version(b, l + 1));\n r = p && VersionDeclVersion_2(b, l + 1) && r;\n exit_section_(b, l, m, r, p, null);\n return r || p;\n }",
"public void setOpeningVersion(TicketJira ticket, List<ReleaseJira> releases, ReleaseJira fv) {\r\n\t\t\r\n\t\tDate creationDate = ticket.getCreationDate();\r\n\t\t\r\n\t\tString openingVersionName = \"\";\r\n\t\tReleaseJira openingVersion = null;\r\n\t\tDate futureDate = DateCreator.getFutureDate();\r\n\t\tfor (ReleaseJira release: releases) {\r\n\t\t\t//cond1 considera solo le release (non strettamente) successive alla data di creazione del ticket\r\n\t\t\t//cond2 permette di aggiornare il risultato alla più vecchia release che soddisfa cond1\r\n\t\t\tboolean cond1 = creationDate.compareTo(release.getReleaseDate()) <= 0;\r\n\t\t\tboolean cond2 = release.getReleaseDate().before(futureDate);\r\n\t\t\tif(cond1 && cond2) {\r\n\t\t\t\topeningVersion = release;\r\n\t\t\t\tfutureDate = release.getReleaseDate();\r\n\t\t\t\topeningVersionName = release.getName();\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tif(openingVersion == null) {\r\n\t\t\t\tthrow new NullPointerException(\"Opening Version null\");\r\n\t\t\t} else if(openingVersion.getReleaseDate().after(fv.getReleaseDate())) {\r\n\t\t\t\tov = fv.getName();\r\n\t\t\t} else {\r\n\t\t\t\tov = openingVersionName;\r\n\t\t\t}\r\n\t\t} catch (NullPointerException e) {\r\n\t\t\tmylogger.log(Level.SEVERE, \"Opening Version null\");\r\n\t\t\tSystem.exit(0);\r\n\t\t}\r\n\t}",
"boolean isSetStatus();",
"@Then(\"^Validate project table against pivotal project$\")\n public void allInformationOfPivotalTrackerProjectsShouldBeDisplayedInProjectTableWidgetOfMach() {\n JsonPath jsonPath = resources.getResponse().jsonPath();\n// assertEquals(jsonPath.get(\"name\"), tableProjectValues.get(\"name\"));\n// assertEquals(jsonPath.get(\"current_iteration_number\"), tableProjectValues.get(\"current_iteration\"));\n// assertEquals(jsonPath.get(\"week_start_day\"), tableProjectValues.get(\"week_start_date\"));\n assertEquals(jsonPath.get(\"name\"), \"AT01 project-01\");\n assertEquals(jsonPath.get(\"week_start_day\"), \"Monday\");\n }",
"public abstract String majorVersion();",
"public interface VersionManager {\n\n /**\n * Sleeping versions\n * @return list of versions or empty list\n */\n public List<Version> getUnreleasedVersions();\n\n /**\n * Released versions\n * @return list of versions or empty list\n */\n public List<Version> getReleasedVersions();\n\n /**\n * Create new version for next development iteration\n * @param versionValue version number\n */\n public Version createVersion(String versionValue);\n\n /**\n * Release version (set as closed)\n * @param versionValue version number\n */\n public void releaseVersion(String versionValue);\n\n}",
"String getVersionLabel();",
"@Then(\"^the status code is (\\\\d+)$\")\npublic void the_status_code_is(int arg1) throws Throwable {\n throw new PendingException();\n}",
"public interface Change {\n\n int getSortingNumber();\n\n @Nonnull\n List<String> getLabels();\n\n @Nonnull\n String getVersion();\n}",
"private boolean updateRepChanges(boolean sync) {\r\n\t\t\r\n\t\ttry {\t\t\t\t\r\n\t\t\t// get repository header since we need count of versions \r\n\t\t\t// i.e. headVersionNum\r\n\t\t\tString status = \"Status: [ACTION - Update Repository]...\";\r\n\t\t\t\r\n\t\t\tstatusBar.setText(status+\"Loading repository header to find headVersionNumber\");\r\n\t\t\tboolean existsRep = this.loadRepositoryHeader();\r\n\t\t\tif (!existsRep) {\r\n\t\t\t\tif (DEBUG) System.out.println(\"NOT FOUND\");\r\n\t\t\t\t// update from local Swoop log anyway if uri matches ontURI\r\n\t\t\t\tthis.updateRepFromLog(new URI(this.repBaseOntFld.getText()));\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tstatusBar.setText(status+\"HeadVersionNum=\"+this.headVersionNumber);\r\n\t\t\r\n\t\t\t// note: all version commits have been made to URLs:\r\n\t\t\t// repositoryURL+\"#1\"...\"#headVersionNum\"\r\n\t\t\t// so iterate through versionCommits and see if value is null, implying it hasn't been updated\r\n\t\t\tfor (int ctr=1; ctr<=this.headVersionNumber; ctr++) {\r\n\t\t\t\tif (versionNodes[ctr]==null) {\r\n\t\t\t\t\t// form URI using ctr\r\n\t\t\t\t\tURI versionURI = new URI(this.repositoryURI+\"#\"+ctr);\r\n\t\t\t\t\tstatusBar.setText(status+\"Updating version at \"+versionURI);\r\n\t\t\t\t\tSet commitSet = client.findAnnotations(versionURI);\r\n\t\t\t\t\t// get single Description (version) at URI\r\n\t\t\t\t\tDescription version = (Description) commitSet.iterator().next();\r\n\t\t\t\t\tversionDescriptions[ctr] = version;\r\n\t\t\t\t\tTreeTableNode mainNode = this.parseSingleCommit(version);\r\n\t\t\t\t\t// set params on mainNode\r\n\t\t\t\t\tmainNode.swoopChange.isOnRepository = true;\r\n\t\t\t\t\tmainNode.location = version.getLocation();\r\n\t\t\t\t\tversionNodes[ctr] = mainNode;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// also if advanced is off, update from local copy as well\r\n//\t\t\tif (!advanced) {\r\n//\t\t\t\tthis.updateRepFromLog(new URI(this.repBaseOntFld.getText()));\r\n//\t\t\t}\r\n\t\t\t\r\n\t\t\t// resort all nodes under root\r\n\t\t\tthis.refreshRepTreeTable(true);\r\n\t\t\t\r\n\t\t\t// update version repository cache\r\n\t\t\tswoopModel.updateVersionRepository(repositoryURI, versionDescriptions);\r\n\t\t\t\r\n\t\t\t// if sync is true, commit all changes to the synchronized ontology\r\n\t\t\tif (sync) {\r\n\t\t\t\tstatusBar.setText(status+\"Synching with Local Swoop Ontology\");\r\n\t\t\t\tthis.commitOntChanges(true);\t\t\t\t\r\n\t\t\t}\r\n\t\t\tstatusBar.setText(status+\"DONE\");\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tcatch (Exception ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public Version getClosestRelease() {\n\n for (Version version : projectVersions) {\n Date releaseDate = version.getReleaseDate();\n if (releaseDate != null && releaseDate.compareTo(this.getIssue().getCreated()) > 0) {\n return version;\n }\n }\n\n return NO_RELEASE;\n }",
"interface WithBranch {\n /**\n * Specifies the branch property: The repo branch of the source control..\n *\n * @param branch The repo branch of the source control.\n * @return the next definition stage.\n */\n Update withBranch(String branch);\n }",
"Boolean repositoryUrlIsValid(URL repositoryUrl);",
"Optional<GitHubInstant> date();",
"protected Modification handleEntry(List historyEntry) {\n // Ignore unusual labels of directories which cause parsing errors that \n // look like this:\n //\n // ***** built *****\n // Version 4\n // Label: \"autobuild_test\"\n // User: Etucker Date: 6/26/01 Time: 11:53a\n // Labeled\n if ((historyEntry.size() > 4) && \n (((String) historyEntry.get(4)).startsWith(\"Labeled\"))) {\n return null;\n }\n \n \t\tModification mod = new Modification();\n String nameAndDateLine = (String) historyEntry.get(2);\n \t\tmod.userName = parseUser(nameAndDateLine);\n \t\tmod.modifiedTime = parseDate(nameAndDateLine);\n \n String folderLine = (String) historyEntry.get(0);\n String fileLine = (String) historyEntry.get(3);\n \t\tif (fileLine.startsWith(\"Checked in\")) {\n \t\t\tmod.type = \"checkin\";\n \t\t\tmod.comment = parseComment(historyEntry);\n \t\t\tmod.fileName = folderLine.substring(7, folderLine.indexOf(\" *\"));\n \t\t\tmod.folderName = fileLine.substring(12);\n \t\t} else if (fileLine.endsWith(\"Created\")) {\n mod.type = \"create\";\n } else {\n \t\t\tmod.folderName = folderLine.substring(7, folderLine.indexOf(\" *\"));\n int lastSpace = fileLine.lastIndexOf(\" \");\n if ( lastSpace != -1 ) {\n mod.fileName = fileLine.substring(0, lastSpace);\n } else {\n mod.fileName = fileLine;\n }\n \n if (fileLine.endsWith(\"added\")) {\n \t\t\t\tmod.type = \"add\";\n \t\t\t} else if (fileLine.endsWith(\"deleted\")) {\n \t\t\t\tmod.type = \"delete\";\n \t\t\t} else if (fileLine.endsWith(\"recovered\")) {\n \t\t\t\tmod.type = \"recover\";\n \t\t\t} else if (fileLine.endsWith(\"shared\")) {\n mod.type = \"branch\";\n }\n \t\t}\n \n \t\tif (_propertyOnDelete != null && \"delete\".equals(mod.type)) {\n _properties.put(_propertyOnDelete, \"true\");\n \t\t}\n \n if (_property != null) {\n \t\t_properties.put(_property, \"true\");\n }\n \n return mod;\n \t}",
"@Override\n public boolean equals(Object o) {\n if (this == o) {\n return true;\n }\n if (!(o instanceof StudyMilestone)) {\n return false;\n }\n return id != null && id.equals(((StudyMilestone) o).id);\n }",
"private LCSRevisableEntity createRevisableEntry(LCSProduct product, LCSSKU lcsSKu,\n\t\t\tString materialNumber, String sizedefVR, String sourceVersion,\n\t\t\tString costsheetVersion, String specVersion, String sourceName, String costName,\n\t\t\tString specName, String nrfCode, String styleNumber, String materialDescription,\n\t\t\tString IBTINSTOREMONTH,Collection bomMOAStringColl) throws WTException , WTPropertyVetoException {\n\t\t\n\t\tLCSRevisableEntityLogic revisableEntityLogic = new LCSRevisableEntityLogic();\n\t\t\n\t\tLCSRevisableEntity createRevEntity=null;\n\n\t\tLCSLog.debug(CLASSNAME+\"createRevisableEntry(), this is a fresh entry\");\n\t\t\n\t\tFlexType IBTFlexType = FlexTypeCache\n\t\t.getFlexTypeFromPath(LFIBTConstants.ibtMaterialPath);\n\t\t\n\t\tLCSRevisableEntity ibtMaterialRevObj = LCSRevisableEntity.newLCSRevisableEntity();;\n\t\tString revId = \"\";\n\t\t// Create Blank Revisable Entity Object for the productId\n\t\t\n\t\t\n\t\t//revModel.load(FormatHelper.getObjectId(this.getRevObj()));\n\t\t// create a new model in order to create a new revisable entity.\n\t\t//LCSRevisableEntityClientModel ibtRevEntityModel = new LCSRevisableEntityClientModel();\n\t\t//ibtRevEntityModel.set\n\t\t//ibtRevEntityModel.load(FormatHelper.getObjectId(rev));\n\t\t// set the flextype to ibtRevEntityModel sub type\n\t\tibtMaterialRevObj.setFlexType(IBTFlexType);\n\t\t//System.out.println(\"****************Inside setFlexType ***********************\");\n\t\t//ibtMaterialRevObj.setRevisableEntityName(FormatHelper.format(materialNumber\n\t\t\t//\t+ dateFormat.format(Calendar.getInstance().getTime())));\n\t\t// set the product att in revisable entity child type\n\t\tibtMaterialRevObj.setValue(LFIBTConstants.IBTPRODUCT, product);\n\n\t\t//PLM-170 Adding product ID change\n\t\tString prodId = String.valueOf(((Double)product.getProductARevId()).intValue());\n\t\tibtMaterialRevObj.setValue(LFIBTConstants.IBTPRODUCTID, prodId);\n\t\t//PLM-170 Adding product ID change\n\n\t\t//System.out.println(\"****************Inside product ***********************\"+product);\n\n\t\t// setting the divison att for sap material. \n\t\t// This will drive the ACL functionality.\n\t\tString division = (String) season.getValue(divisionKey);\n\t\tLCSLog.debug(\"division -- \" + division);\n\t\t// setting division att in ibtRevEntityModel\n\t\tibtMaterialRevObj.setValue(\"lfDivision\", division);\n\n\t\t// set the colorway att in revisable entity child type\n\t\tibtMaterialRevObj.setValue(LFIBTConstants.IBTCOLORWAY, lcsSKu);\n\n\t\t// set the size definition version Id\n\t\tibtMaterialRevObj.setValue(LFIBTConstants.IBTMASTERGRID, sizedefVR);\n\t\t// set the sourcing-config version\n\t\tibtMaterialRevObj.setValue(LFIBTConstants.IBTSOURCINGCONFIG, sourceVersion);\n\t\t// set the cost-sheet version\n\t\tibtMaterialRevObj.setValue(LFIBTConstants.IBTCOSTSHEET, costsheetVersion);\n\t\t\n\t\tibtMaterialRevObj.setValue(LFIBTConstants.IBTSPECIFICATION, specVersion);\n\t\tibtMaterialRevObj.setValue(LFIBTConstants.STAGINSPECNAME, specName);\n\t\t// set the source name that is used in the staging area\n\t\tibtMaterialRevObj.setValue(LFIBTConstants.IBTSTAGINGSOURCENAME, sourceName);\n\t\t// set the cost-sheet name to that is entered in staging area\n\t\tibtMaterialRevObj.setValue(LFIBTConstants.IBTSTAGINGCOSTSHEETNAME, costName);\n\t\t//Added for 7.6\n\t\tif (FormatHelper.hasContent(LFIBTConstants.IBTMATERIALSTATUS)) {\n\t\t\tibtMaterialRevObj.setValue(LFIBTConstants.IBTMATERIALSTATUS,\n\t\t\t\t\"Create\");\n\t\t}\n\t\tibtMaterialRevObj.setValue(LFIBTConstants.IBTCOSTSHEETSTATUS,\"Sent\");\n\t\t\n\t\t//Added for 7.6\n\t \t//Create BOM MOA Rows..\n\t\t//LFIBTUtil.setBOMMOARows(ibtRevEntityModel, \"lfIBTBOMDetails\", bomMOAStringColl,\"create\");\n\t\t// set the NRF code.\n\t\tibtMaterialRevObj.setValue(LFIBTConstants.IBTNRFCODE, nrfCode);\n\t\t// set style number\n\t\t// Build 6.14\n\t\tibtMaterialRevObj.setValue(LFIBTConstants.IBTSTYLENUMBER, styleNumber);\n\t\t// set material description\n\t\tibtMaterialRevObj.setValue(LFIBTConstants.IBTMATERIALDESC,\n\t\t\t\tmaterialDescription);\n\n\t\t// set In strore Month\n\t\tibtMaterialRevObj.setValue(LFIBTConstants.IBTINSTOREMONTH, IBTINSTOREMONTH);\n\t\t// set SAP material number\n\t\tibtMaterialRevObj.setValue(LFIBTConstants.IBTMATERIALNUMBER, materialNumber);\n\t\t// set the season att\n\t\tibtMaterialRevObj.setValue(LFIBTConstants.IBTMASTERSEASON, this.season);\n\n\t\t// set the boolean value to checked. This check is needed for the\n\t\t// plugin to pick up the revisable entity\n\t\t//ibtRevEntityModel.setValue(LFIBTConstants.IBTUPDATECHECK, Boolean.TRUE);\n\t\t// set the master object\n\t\tibtMaterialRevObj.setValue(\"lfIBTMaster\", this.masterRevEntity);\n\t\t\n\t//\tSystem.out.println(\"****************Inside 11111111 ***********************\");\n\n\t\t\n\t\t\n\t\tLCSRevisableEntity ibtMaterialRev = (LCSRevisableEntity)revisableEntityLogic.saveRevisableEntity(ibtMaterialRevObj);\n\t\t\n\t\t// masterModel.save();\n\t\t\n\t\t//createRevEntity=ibtRevEntityModel.getBusinessObject();\n\t\t//LCSLog.debug(\"slave created : -- \" + ibtMaterialRevObj);\n\t\t\n\t\tLCSLog.debug(CLASSNAME+\"createRevisableEntry(),Calling setBOMMOARows()\");\n\t\tLFIBTUtil.setBOMMOARows(ibtMaterialRev, \"lfIBTBOMDetails\", bomMOAStringColl, \"create\");\n\t\tLCSLog.debug(CLASSNAME+\"createRevisableEntry(),slave created : -- \" + ibtMaterialRev);\n return ibtMaterialRev;\n\t}",
"public static PerformOperation isPrime() {\n return (num) -> {\n if (num < 2) { return false; }\n if (num == 2) { return true; }\n if (num % 2 == 0) { return false; }\n if (num < 9) { return true; }\n\n int max = (int) Math.sqrt(num);\n for (int i = 3; i <= max; i+=2) {\n if (num % i == 0) { return false; };\n }\n return true;\n };\n }",
"@Mapper(componentModel = \"spring\", uses = {})\npublic interface MilestoneMapper extends EntityMapper<MilestoneDTO, Milestone> {\n\n\n\n default Milestone fromId(Long id) {\n if (id == null) {\n return null;\n }\n Milestone milestone = new Milestone();\n milestone.setId(id);\n return milestone;\n }\n}",
"@WorkflowAction(loggable = false)\n public boolean isModified()\n throws WorkflowException, MappingException, RepositoryException, RemoteException;",
"public boolean checkDatePickerChangeMonth(String actionLink, boolean isNextMonth, boolean isNewToDoPage) {\n boolean result = true;\n String beforeTitle = \"\";\n String afterTitle = \"\";\n try {\n // If isNewToDoPage = true :verify in add new to-do page | isNewToDoPage = false, verify in to-do list page\n if (isNewToDoPage) {\n waitForClickableOfElement(eleIdDueDate, \"Due date text box\");\n eleIdDueDate.click();\n } else {\n waitForClickableOfElement(eleToDoNewRowDueDateText.get(0), \"Select due date text box\");\n eleToDoNewRowDueDateText.get(0).click();\n }\n\n waitForVisibleElement(eleDataPickerTitle, \"Date picker title\");\n //Get tile date picker before click next or previous link\n beforeTitle = eleDataPickerTitle.getText();\n\n // If isNextMonth = true : click on Next link in date picker |\n // isNextMonth = false, click on Prev link in date picker\n if (!isNextMonth) {\n waitForClickableOfElement(elePrevDataPickerLink, \"Previous date picker link\");\n elePrevDataPickerLink.click();\n } else {\n waitForClickableOfElement(eleNextDataPickerLink, \"Next date picker link\");\n eleNextDataPickerLink.click();\n }\n\n //Get tile date picker after click next or previous link\n afterTitle = eleDataPickerTitle.getText();\n result = beforeTitle.equals(afterTitle);\n\n //If result = true : before and after value as same --> data picker not work\n if (result) {\n NXGReports.addStep(\"TestScript Failed: Date picker is change \" + actionLink + \" month\", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n return false;\n }\n\n NXGReports.addStep(\"Date picker is change \" + actionLink + \" month\", LogAs.PASSED, null);\n } catch (AssertionError e) {\n AbstractService.sStatusCnt++;\n NXGReports.addStep(\"TestScript Failed: Date picker is change \" + actionLink + \" month\", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n return false;\n }\n return true;\n }",
"@Override\n public Optional<GradleBuildUpdateProposal> apply(GradleBuild build,\n GradleProject project, GradleModuleDependency dependency) {\n var coords = ResolverGroupArtifact.from(dependency.getGroup(), dependency.getName());\n\n var version = ResolverVersionSpecification.from(dependency.getVersionSpec().getValue());\n Optional<ResolverArtifactVersion> optionalPinnedVersion = version.asPinnedVersion();\n if (optionalPinnedVersion.isEmpty()) {\n // the version is not pinned (e.g. it's a range)\n // another update-adaptor should be concerned with pinning versions\n return Optional.empty();\n }\n\n var artifacts = dependency.getArtifacts().stream()\n .map(artifact -> ResolverArtifact.from(artifact.getClassifier(), artifact.getExtension()))\n .collect(Collectors.toSet());\n\n var repositories = project.getRepositories().items()\n .map(repo -> ResolverMavenRepository.from(repo.getId(), repo.getUrl()))\n .collect(Collectors.toList());\n\n // many update strategies are possible\n // 1. update to latest minor\n // 2. update first to latest incremental (with auto-merge?), next iteration update to latest minor\n // 3. major ?\n\n // those strategies could be extracted in separate objects in the future\n // (once we do, is it possible to make those strategies independent from maven/ivy/... ?)\n // the result could be wrapped in an object and passed to DependencyVersionUpdate ?\n\n // for now, we hardcode (1) - update to latest minor\n var minorVersionRange = MavenVersionRange.getMinorVersionRange(optionalPinnedVersion.get());\n var versionRangeQueryResult = this.mavenResolver\n .resolveVersionRange(coords, minorVersionRange, artifacts, repositories);\n\n return versionRangeQueryResult.getHighestVersion()\n .map(newVersion -> new DependencyVersionUpdateProposal(build, project, dependency, newVersion));\n\n }",
"public static boolean Lifecycle(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"Lifecycle\")) return false;\n if (!nextTokenIs(b, JB_TOKEN_LIFECYCLE)) return false;\n boolean r, p;\n Marker m = enter_section_(b, l, _NONE_, null);\n r = consumeToken(b, JB_TOKEN_LIFECYCLE);\n p = r; // pin = 1\n r = r && report_error_(b, WhiteSpace(b, l + 1));\n r = p && report_error_(b, Lifecycle_2(b, l + 1)) && r;\n r = p && report_error_(b, WhiteSpace(b, l + 1)) && r;\n r = p && Lifecycle_4(b, l + 1) && r;\n exit_section_(b, l, m, JB_LIFECYCLE, r, p, null);\n return r || p;\n }",
"@Test\n public void testCanReadNumber() throws Exception {\n MatcherAssert.assertThat(\n new TestJenkins().jobs().iterator().next().builds().iterator()\n .next().number(), new IsEqual<>(\"#1\")\n );\n }",
"public static boolean MarklogicNumberNodeTest(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"MarklogicNumberNodeTest\")) return false;\n if (!nextTokenIs(b, K_NUMBER_NODE)) return false;\n boolean r, p;\n Marker m = enter_section_(b, l, _NONE_, MARKLOGIC_NUMBER_NODE_TEST, null);\n r = consumeTokens(b, 2, K_NUMBER_NODE, L_PAR);\n p = r; // pin = 2\n r = r && report_error_(b, MarklogicNumberNodeTest_2(b, l + 1));\n r = p && consumeToken(b, R_PAR) && r;\n exit_section_(b, l, m, r, p, null);\n return r || p;\n }",
"public boolean isNew( ContinuumProject project )\n throws ContinuumStoreException\n {\n Iterator it = store.getBuildsForProject( project.getId(), 0, 0 );\n\n if ( !it.hasNext() )\n {\n return true;\n }\n\n it.next();\n\n if ( it.hasNext() )\n {\n return false;\n }\n\n return true;\n }",
"private static boolean isMonthPresent(List<Months> liMon, String month) {\r\n\r\n\t\tboolean flag = false;\r\n\r\n\t\tfor (Months m : liMon) {\r\n\r\n\t\t\tif (m.toString().equals(month)) {\r\n\t\t\t\tSystem.out.println(\"Month exist\");\r\n\t\t\t\tflag = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn flag;\r\n\t}",
"abstract int minor();",
"String getRepoType();",
"int getIssueType();",
"@Override\n public void onMasterBranchVersionChange(String newVersion, String oldVersion, JGitFlowInfo flow) throws MavenJGitFlowExtensionException\n {\n try\n {\n Git git = flow.git();\n\n //get the README.md file\n File readmeFile = new File(flow.getProjectRoot(), README_MD);\n\n //do the replacement\n //NOTE: This is not performant or scalable. It's only here for example purposes.\n String readmeContent = Files.toString(readmeFile, Charsets.UTF_8);\n String newContent = readmeContent.replace(oldVersion, newVersion);\n\n Files.write(newContent, readmeFile, Charsets.UTF_8);\n\n //now commit the change\n JGitFlowCommitHelper.commitAllChanges(flow, \"updating version in README.md\");\n\n }\n catch (Exception e)\n {\n throw new MavenJGitFlowExtensionException(\"Error updating \" + README_MD + \" file!\", e);\n }\n }",
"@Test(expected = IllegalArgumentException.class)\n public void testGetExpensesByTypeAndMonthInFuture() {\n\tString type = \"MONTHLY\";\n\tYearMonth yearMonth = YearMonth.of(2016, 12);\n\texpenseManager.getExpensesByTypeAndMonth(type, yearMonth);\n }",
"@Test\n public void testifyMajor() throws InterruptedException {\n onView(withId(R.id.Major)).check(matches(isDisplayed()));\n\n }",
"boolean isBranchTaken();",
"@Test(priority=4)\n\tpublic void validatePredictNiftyInContestPage3()\n\t{\n\t\tAssert.assertTrue(c.openForParticipationTitile.getText().equalsIgnoreCase(\"Open For Participation\"));\n\t/*\tDate date = new Date();\n\t\tSimpleDateFormat formatter = new SimpleDateFormat(\"dd MMM\");\n\t\tString strDate = formatter.format(date);*/\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tcalendar.add(Calendar.DATE, 1);\n\t\tDate date1 = calendar.getTime();\n\t\tFormat formatter1= new SimpleDateFormat(\"dd MMM\");\n\t\tString tomDate = formatter1.format(date1);\n\t\tSoftAssert s=new SoftAssert();\n\t\ts.assertTrue(c.dateForOpenForParticipation.getText().equals(tomDate.split(\" \")[0]));\n\t\ts.assertTrue(c.monthForOpenForParticipation.getText().equals(tomDate.split(\" \")[1]));\n\t\ts.assertAll();\n\t}",
"public interface FormValidator {\r\n\r\n /**\r\n * Performs on-the-fly validation of the form field 'name'.\r\n *\r\n * @param value This parameter receives the value that the user has typed.\r\n * @return Indicates the outcome of the validation. This is sent to the\r\n * browser.\r\n */\r\n default FormValidation doCheckArtifactId(@QueryParameter String value) {\r\n if (value.length() == 0)\r\n return FormValidation.error(\"Please set an ArtifactId!\");\r\n return FormValidation.ok();\r\n }\r\n\r\n default FormValidation doCheckGroupId(@QueryParameter String value) {\r\n if (value.length() == 0)\r\n return FormValidation.error(\"Please set a GroupId!\");\r\n return FormValidation.ok();\r\n }\r\n\r\n default FormValidation doCheckVersion(@QueryParameter String value) {\r\n if (value.length() == 0)\r\n return FormValidation\r\n .error(\"Please set a Version for your artifact!\");\r\n return FormValidation.ok();\r\n }\r\n\r\n default FormValidation doCheckStagingRepository(\r\n @QueryParameter String value) {\r\n return checkURI(value);\r\n }\r\n\r\n default FormValidation doCheckReleaseRepository(\r\n @QueryParameter String value) {\r\n return checkURI(value);\r\n }\r\n\r\n /**\r\n * This method checks originally the URL if it is valid. On the way to\r\n * support tokens this behavior is build out. It will be reactivated\r\n * after a general refactoring for better token macro support.\r\n * <p>\r\n * TODO implment a URL validation which works with token macro plugin\r\n *\r\n * @param value\r\n * @return\r\n */\r\n default FormValidation checkURI(String value) {\r\n if (value.length() == 0) {\r\n return FormValidation\r\n .error(\"Please set an URL for the staging repository!\");\r\n }\r\n return FormValidation.ok();\r\n }\r\n\r\n /**\r\n * Generates LisBoxModel for available Repository systems\r\n *\r\n * @return available Promoters as ListBoxModel\r\n */\r\n default ListBoxModel doFillPromoterClassItems() {\r\n ListBoxModel promoterModel = new ListBoxModel();\r\n for (Promotor promotor : Jenkins.getInstance()\r\n .getExtensionList(Promotor.class)) {\r\n promoterModel.add(promotor.getDescriptor().getDisplayName(), promotor\r\n .getClass().getCanonicalName());\r\n }\r\n\r\n return promoterModel;\r\n }\r\n\r\n}",
"public AppiumGithubScreen openAppiumGitHub() {\n\t\tgithubLink.click();\n\t\treturn new AppiumGithubScreen(driver);\n\t}",
"@Value.Immutable\n@GithubStyle\n@JsonSerialize(as = ImmutableAuthor.class)\n@JsonDeserialize(as = ImmutableAuthor.class)\npublic interface Author {\n\n /** The name of the author. */\n @Nullable\n String name();\n\n /** The email of the author. */\n Optional<String> email();\n\n /** The username of the author, not always set. */\n Optional<String> username();\n\n /** Date when action occurred. */\n Optional<GitHubInstant> date();\n}",
"Status validate(RevisionInternal newRev, RevisionInternal prevRev, String parentRevID);",
"private static boolean moduloThreeResolver(GroupArtifactVersion artifact) {\n return firstLeadingNumber(artifact).map(x -> x % 3 == 1).orElse(false);\n }",
"public interface ForkRequestInterface\n{\n /**\n * @return The name the owner would like to call the forked repository.\n */\n @JsonProperty(\"repoName\")\n public String getNewRepoName();\n\n /**\n * @return The CRSID of the user making the fork request.\n */\n @JsonProperty(\"userName\")\n public String getUserName();\n\n /**\n * @return The name of the repository to be forked.\n */\n @JsonProperty(\"upstream\")\n public String getRepoName();\n}",
"@Override\n public boolean showPanel(Issue issue, ApplicationUser remoteUser) {\n\n if (issue.isSubTask()){\n return false;\n }else{\n return true;\n }\n\n }",
"public static boolean instanceHasNewVersion(Object instance) {\n\n Class<?> classVersion = versions.get(instance.getClass().getName()\n .hashCode());\n\n if (DEBUG)\n System.out.println(\"instanceHasNewVersion: Class version = \"\n + classVersion);\n\n // The class has no new versions\n if (classVersion == null)\n return false;\n\n // Use reflection to obtain version object (that is added at load-time).\n Object newVersion = null;\n try {\n newVersion = instance.getClass().getField(\"_newVersion\")\n .get(instance);\n } catch (Exception e) {\n throw new RuntimeException(e.getMessage(), e);\n }\n\n // The class has a new version, but this instance does not, or the new\n // version of this instance is not of the\n // same class that the new version of its class\n if ((classVersion != null && newVersion == null)\n || (classVersion != newVersion.getClass()))\n return true;\n\n return false;\n }",
"@Override\n public MethodOutcome renameRootOutcome() {\n return new MethodOutcome(MethodOutcome.Type.RETURNS_FALSE);\n }",
"public void testGetBlogForMonth() {\n MonthlyBlog monthlyBlog = rootBlog.getBlogForMonth(2003, 4);\n assertNotNull(monthlyBlog);\n assertEquals(2003, monthlyBlog.getYearlyBlog().getYear());\n assertEquals(4, monthlyBlog.getMonth());\n }"
]
| [
"0.5012916",
"0.4989775",
"0.4923347",
"0.49086714",
"0.47433305",
"0.4735359",
"0.47126567",
"0.46692884",
"0.45925474",
"0.4426588",
"0.44205847",
"0.4396643",
"0.43904874",
"0.43710175",
"0.43379852",
"0.4331942",
"0.43130502",
"0.43088937",
"0.42783806",
"0.42174113",
"0.4204397",
"0.41943148",
"0.4177905",
"0.41709745",
"0.41537133",
"0.41208258",
"0.4093113",
"0.4085236",
"0.40685833",
"0.4059515",
"0.40546364",
"0.40384427",
"0.40294904",
"0.40294904",
"0.402425",
"0.40173614",
"0.40092382",
"0.4003446",
"0.4000697",
"0.399873",
"0.39874718",
"0.3973081",
"0.395785",
"0.39135954",
"0.39058924",
"0.38908756",
"0.38616946",
"0.38597074",
"0.38542542",
"0.3849972",
"0.3849188",
"0.3848986",
"0.3846028",
"0.38199392",
"0.38152474",
"0.38127565",
"0.38117206",
"0.38108423",
"0.380956",
"0.38090783",
"0.3799639",
"0.37892705",
"0.37811348",
"0.37784964",
"0.37772074",
"0.37743616",
"0.3772444",
"0.3763863",
"0.3750972",
"0.37397334",
"0.37345186",
"0.37317142",
"0.37310353",
"0.37272006",
"0.37230435",
"0.37210262",
"0.3720112",
"0.37176713",
"0.37151945",
"0.3713577",
"0.3708557",
"0.37078792",
"0.3705939",
"0.37026244",
"0.3701351",
"0.3699479",
"0.36932427",
"0.36931667",
"0.36918017",
"0.36917573",
"0.36839685",
"0.36820692",
"0.36811733",
"0.3680417",
"0.367976",
"0.36794913",
"0.36784416",
"0.36693698",
"0.36642638",
"0.36601964"
]
| 0.55479413 | 0 |
Metodo che consente di leggere il contenuto di un pacchetto | static protected void readContent(DatagramPacket dp) throws IOException {
ByteArrayInputStream biStream = new ByteArrayInputStream(dp.getData(), 0, dp.getLength());
DataInputStream diStream = new DataInputStream(biStream);
message = diStream.readUTF();
System.out.println("Messaggio ricevuto: "+message);
readMessage();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public CetakPenjualan() {\n initComponents();\ntampilDataPen();\nthis.setResizable(false);\n }",
"public InterfazdelJuego() {\n super(\"Batalla de acorazados 1.0\");\n initComponents();\n stickers=new JLabel[10][10];\n setLocationRelativeTo(null);\n llenarMapa();\n cajaDeTexto.setBackground(Color.BLACK);\n cajaDeTexto.setForeground(Color.CYAN);\n \n \n }",
"public MovimientoPantallaCocina() {\n initComponents();\n \n //COLOCAR FONOD EN LA PANTALLA PARA LA COCINA\n try{\n pnlOrdenes.setBorder(new ImagenCocina());\n } catch (IOException e){\n Logger.getLogger(MovimientoPantallaCocina.class.getName()).log(Level.SEVERE, null, e);\n }\n \n //VISUALIZAR TODAS LAS ORDENES ACTIVAS\n hilo p = new hilo(\"ordenes\");\n p.start();\n }",
"public TelaFimDeJogo() {\n initComponents();\n gerenciador.pegaJogadorDaRodada();\n mensagemBaixo.setForeground(gerenciador.pegaJogadorDaRodada().getColor());\n mensagemCima.setForeground(gerenciador.pegaJogadorDaRodada().getColor());\n mensagemCima.setText(\"PARABÉNS JOGADOR \" + gerenciador.pegaJogadorDaRodada().getNomeCor().toUpperCase() + \", VOCÊ VENCEU!!\");\n }",
"public TicketCambio() {\n initComponents();\n parteticket();\n TxtCabezera1.setText(Cabezera1);\n TxtCabezera2.setText(Cabezera2);\n TxtCabezera3.setText(Cabezera3);\n TxtCabezera4.setText(Cabezera4);\n TxtCabezera5.setText(Cabezera5);\n this.setResizable(false); \n TxtPie1.setText(Pie1);\n TxtPie2.setText(Pie2);\n TxtPie3.setText(Pie3);\n TxtPie4.setText(Pie4);\n TxtPie5.setText(Pie5); \n }",
"public Ventana() {\n initComponents();\n this.tipos.add(GD_C);\n this.tipos.add(GD_S);\n this.tipos.add(GND_C);\n this.tipos.add(GND_S);\n this.panel.setArea_text(text);\n\n }",
"public ventanaServidor () { //Constructor\n setBounds(500,200,400,300); //define ubicacion en x, y , ancho, alto del cuadro\n JPanel lamina2 = new JPanel ();\n lamina2.setLayout(new BorderLayout());\n setResizable(false); //evitar que la ventana se redimencione\n setTitle(\"Servidor\");\n setVisible(true); //mostrar en pantalla\n \n \n }",
"public void visualizzaCampo(){\r\n\t\tInputOutput.stampaCampo(nome, descrizione, obbligatorio);\r\n\t}",
"public Colaborador() {\n\n this.setUndecorated(true);\n initComponents();\n this.setLocationRelativeTo(null);\n transparenciButton();\n }",
"public void montarPainelSuperior() {\n\t\ttimer = new Temporizador();//INICIA O TEMPORIZADOR\r\n\t\tJPanel painelSuperior = new JPanel();\r\n\t\t\r\n\t\tpainelSuperior.setBounds(12, 11, 738, 55);\r\n\t\tpainelSuperior.setOpaque(false);\r\n\t\tlayeredPane.add(painelSuperior);\r\n\t\tbotaoSair = new JButton(\"MENU\");\r\n\t\tbotaoSair.setFont(new Font(\"Tahoma\", Font.BOLD, 11));\r\n\t\tbotaoSair.addActionListener(this);\r\n\t\tlblNumeroBombas = new JLabel();\r\n\t\tlblNumeroBombas.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblNumeroBombas.setFont(timer.getFont());\r\n\t\tlblNumeroBombas.setForeground(Color.ORANGE);\r\n\t\tlblNumeroBombas.setIcon(iconContador);\r\n\t\t\r\n\t\tbtnIa = new JButton(\"AJUDA\");\r\n\t\tbtnIa.setIcon(iconIa);\r\n\t\tbtnIa.setOpaque(false);\r\n\t\tbtnIa.setContentAreaFilled(false);\r\n\t\tbtnIa.setBorder(BorderFactory.createLineBorder(Color.ORANGE, 2));\r\n\t\tbtnIa.addActionListener(this);\r\n\r\n\t\tGroupLayout gl_painelSuperior = new GroupLayout(painelSuperior);\r\n\t\tgl_painelSuperior.setHorizontalGroup(\r\n\t\t\tgl_painelSuperior.createParallelGroup(Alignment.TRAILING)\r\n\t\t\t\t.addGroup(gl_painelSuperior.createSequentialGroup()\r\n\t\t\t\t\t.addContainerGap()\r\n\t\t\t\t\t.addComponent(botaoSair)\r\n\t\t\t\t\t.addGap(35)\r\n\t\t\t\t\t.addComponent(btnIa, GroupLayout.PREFERRED_SIZE, 112, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 113, Short.MAX_VALUE)\r\n\t\t\t\t\t.addComponent(timer, GroupLayout.PREFERRED_SIZE, 84, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t.addGap(168)\r\n\t\t\t\t\t.addComponent(lblNumeroBombas, GroupLayout.PREFERRED_SIZE, 97, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t.addGap(62))\r\n\t\t);\r\n\t\tgl_painelSuperior.setVerticalGroup(\r\n\t\t\tgl_painelSuperior.createParallelGroup(Alignment.TRAILING)\r\n\t\t\t\t.addGroup(gl_painelSuperior.createSequentialGroup()\r\n\t\t\t\t\t.addGap(4)\r\n\t\t\t\t\t.addComponent(timer, GroupLayout.PREFERRED_SIZE, 50, Short.MAX_VALUE)\r\n\t\t\t\t\t.addGap(4))\r\n\t\t\t\t.addGroup(gl_painelSuperior.createSequentialGroup()\r\n\t\t\t\t\t.addGap(5)\r\n\t\t\t\t\t.addComponent(botaoSair, GroupLayout.DEFAULT_SIZE, 45, Short.MAX_VALUE)\r\n\t\t\t\t\t.addGap(8))\r\n\t\t\t\t.addGroup(gl_painelSuperior.createSequentialGroup()\r\n\t\t\t\t\t.addGap(5)\r\n\t\t\t\t\t.addComponent(lblNumeroBombas, GroupLayout.DEFAULT_SIZE, 53, Short.MAX_VALUE))\r\n\t\t\t\t.addGroup(Alignment.LEADING, gl_painelSuperior.createSequentialGroup()\r\n\t\t\t\t\t.addGap(9)\r\n\t\t\t\t\t.addComponent(btnIa, GroupLayout.PREFERRED_SIZE, 36, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t.addContainerGap(13, Short.MAX_VALUE))\r\n\t\t);\r\n\t\tpainelSuperior.setLayout(gl_painelSuperior);\r\n\t}",
"private void colocar(){\n setLayout(s);\n eleccion = new BarraEleccion(imagenes,textos);\n eleccion.setLayout(new GridLayout(4,4));\n eleccion.setBorder(BorderFactory.createTitledBorder(\n BorderFactory.createBevelBorder(5), \"SELECCIONA EL MAGUEY\",\n TitledBorder.CENTER, TitledBorder.TOP,new Font(\"Helvetica\",Font.BOLD,15),Color.WHITE));\n eleccion.setFondoImagen(imgFond);\n etqAlcohol = new JLabel(\"SELECCIONA EL GRADO DE ALCOHOL\");\n etqAlcohol.setFont(new Font(\"Helvetica\", Font.BOLD, 14));\n etqAlcohol.setForeground(Color.WHITE);\n alcohol = new JComboBox<>();\n etqTipo = new JLabel(\"SELECCIONA EL TIPO DE MEZCAL\");\n etqTipo.setFont(new Font(\"Helvetica\", Font.BOLD, 14));\n etqTipo.setForeground(Color.WHITE);\n tipo = new JComboBox<>();\n btnRegistrar = new JButton();\n btnRegistrar.setFont(new Font(\"Sylfaen\", Font.BOLD, 17));\n btnRegistrar.setText(\"Registrar\");\n btnRegistrar.setHorizontalAlignment(SwingConstants.CENTER);\n btnRegistrar.setActionCommand(\"registrar\");\n add(eleccion);\n add(etqAlcohol);\n add(alcohol);\n add(etqTipo);\n add(tipo);\n add(btnRegistrar);\n iniciarVistas();\n }",
"void iniciaDesenho(){\r\n \r\n \r\n GPSplt.setStroke(new BasicStroke(5f, BasicStroke.CAP_ROUND,BasicStroke.JOIN_MITER));\r\n GPSplt.setLineColor(new Color(0,28,28));\r\n //GPSplt.setSize(935,555);\r\n GPSplt.setSize(983,465);\r\n GPSplt.setBackground(new Color(255,255,51));\r\n GPSplt.setLocation(10,34);\r\n //jPanel1.add(GPSplt); \r\n //jPanel1.setSize(600,500);\r\n getContentPane().add(GPSplt);\r\n GPSplt.paintAll(GPSplt.getGraphics());\r\n GPSGoogle.setVisible(false);\r\n \r\n \r\n // Mostrar Figura de Fundo ...\r\n if (CbMapa.isSelected()==true) {\r\n Mostra.setText(Mostra.getText()+\"\\n\"+\"MapaAtivo\");\r\n Mostra.setCaretPosition(Mostra.getText().length() );\r\n \r\n }\r\n \r\n repaint();\r\n \r\n }",
"private void dibujarFondo() {\n\t\t\n\t\tgrilla.setBackground(new Background(new BackgroundFill(Color.LIGHTGREEN, null, null)));\n\t\tgrilla.setBorder(crearBorde());\n\t\tgrilla.setPadding(new Insets(10));\n\t\tgrilla.setCenterShape(true);\n\t\t\n\t\tpanel.setCenter(grilla);\n\t}",
"public CadastrarNota() {\n initComponents();\n setLocationRelativeTo(this);\n setTitle(\"Cadastro de Alunos\");\n setResizable(false);\n Atualizar();\n }",
"public logistica_4() {\n initComponents();\n setLocationRelativeTo(null);// pantalla central\n setResizable(false);//desactivar maximisar\n setTitle(\"Mundo Biz S.A.S\");//titulo de pantalla\n }",
"public void crearVentana3(){\n \n marco = new JFrame(\"ventana\");\n panel = new JPanel();\n boton = new JButton(\"boton 1\");\n boton2 = new JButton(\"boton 2\");\n etiqueta = new JLabel(\"\");\n liTexto = new JTextField(30);\n \n \n //le damos caracteristicas a a los componentes\n marco.setSize(900, 500);\n panel.setSize(800, 400);\n panel.setBackground(Color.cyan);\n etiqueta.setText(\"Nome\");\n \n etiqueta.setBounds(50, 100, 50, 10);\n \n liTexto.setBounds(100, 100, 300, 20);\n liTexto.setText(\"Nombre?\");\n \n boton.setBounds(200, 300, 100, 50);\n boton2.setBounds(400, 300, 100,50);\n \n\n \n panel.setLayout(null);\n \n\n //engadimos os componenetes\n panel.add(etiqueta);\n panel.add(liTexto);\n panel.add(boton);\n panel.add(boton2);\n marco.add(panel);\n \n \n marco.setVisible(true);\n marco.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n \n }",
"void LienaDivisoria(){\r\n \t\r\n VerticalLayout LayoutLineaDivisoria = new VerticalLayout();\r\n LayoutLineaDivisoria.setWidth(\"1024px\");\r\n LayoutLineaDivisoria.setHeight(\"5px\");\r\n LayoutLineaDivisoria.setStyleName(EstiloCSS + \"LayoutLineaDicisoria\");\r\n layout.addComponent(LayoutLineaDivisoria, \"left: 0px; top: 450px;\"); \r\n\r\n }",
"private GUIAltaHabitacion() {\r\n\t initComponents();\r\n\t }",
"public void iniciar(){\n vistaCarrera.setTitle(\"Nueva Carrera\");\n vistaCarrera.setLocationRelativeTo(null);\n }",
"@Override\r\n public void prenderVehiculo() {\r\n System.out.println(\"___________________________________________________\");\r\n System.out.println(\"prender Jet\");\r\n }",
"public FrmLeerCodigoBarras(java.awt.Frame parent, boolean modal,String accion) {\n super(parent,\"Codigo de barras\", modal);\n this.parent = parent;\n initComponents();\n this.turno = Main.getInstance().getTurnoActual();\n this.accion = accion;\n this.estacionamiento = Main.getInstance().getEstacionamiento();\n this.getContentPane().setBackground(Color.white);\n pack();\n id =\"\";\n if(accion.equals(\"COBRO\")){\n lblMensaje.setText(\"Coloca el boleto en el sensor\");\n }else if(accion.equals(\"CANCELAR\")){\n lblMensaje.setText(\"Coloca el boleto en el sensor\");\n }else if(accion.equals(\"RECIBO\")){\n lblMensaje.setText(\"Coloca el boleto en el sensor\");\n }else if(accion.equals(\"PERDIDO\")){\n lblMensaje.setText(\"Coloca la contra en el sensor\");\n }else if(accion.equals(\"CONTRA\")){\n lblMensaje.setText(\"Coloca la contra en el sensor\");\n }else if(accion.equals(\"ENTRADA\")){\n lblMensaje.setText(\"Coloca tu gafet contra en el sensor\");\n }else{\n lblMensaje.setText(\"Coloca el codigo\");\n }\n \n\n if(!Configuracion.getInstancia().getTerminal().equals(Configuracion.CLIENTE)){\n this.lblBienvenido.setVisible(false);\n }\n setLocationRelativeTo(parent);\n setVisible(true);\n }",
"void Comunicasiones() { \t\r\n /* Comunicacion */\r\n Button dComunicacion01 = new Button();\r\n dComunicacion01.setWidth(\"73px\");\r\n dComunicacion01.setHeight(\"47px\");\r\n dComunicacion01.setIcon(ByosImagenes.icon[133]);\r\n dComunicacion01.setStyleName(EstiloCSS + \"BotonComunicacion\");\r\n layout.addComponent(dComunicacion01, \"left: 661px; top: 403px;\"); \r\n\r\n /* Comunicacion */\r\n Button iComunicacion01 = new Button();\r\n iComunicacion01.setWidth(\"73px\");\r\n iComunicacion01.setHeight(\"47px\");\r\n iComunicacion01.setIcon(ByosImagenes.icon[132]);\r\n iComunicacion01.setStyleName(EstiloCSS + \"BotonComunicacion\");\r\n layout.addComponent(iComunicacion01, \"left: 287px; top: 403px;\"); \r\n \r\n }",
"private void criaCabecalho() {\r\n\t\tJLabel cabecalho = new JLabel(\"Cadastro de Homem\");\r\n\t\tcabecalho.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tcabecalho.setFont(new Font(\"Arial\", Font.PLAIN, 16));\r\n\t\tcabecalho.setForeground(Color.BLACK);\r\n\t\tcabecalho.setBounds(111, 41, 241, 33);\r\n\t\tpainelPrincipal.add(cabecalho);\r\n\t}",
"public MuestraColores() {\n\t\tenableEvents(64L);\n\t\ttry {\n\t\t\tUIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tinitialize();\n\t}",
"public void aapne() {\n trykketPaa = true;\n setBackground(new Background(new BackgroundFill(Color.LIGHTGRAY, CornerRadii.EMPTY, Insets.EMPTY)));\n if (bombe) {\n setText(\"x\");\n Color moerkeregroenn = Color.rgb(86, 130, 3, 0.5);\n setBackground(new Background(new BackgroundFill(moerkeregroenn, CornerRadii.EMPTY, Insets.EMPTY)));\n } else if (bombeNaboer == 0) {\n setText(\" \");\n } else {\n setText(bombeNaboer + \"\");\n if (bombeNaboer == 1) {\n setTextFill(Color.BLUE);\n } else if (bombeNaboer == 2) {\n setTextFill(Color.GREEN);\n } else if (bombeNaboer == 3) {\n setTextFill(Color.RED);\n } else if (bombeNaboer == 4) {\n setTextFill(Color.DARKBLUE);\n } else if (bombeNaboer == 5) {\n setTextFill(Color.BROWN);\n } else if (bombeNaboer == 6) {\n setTextFill(Color.DARKCYAN);\n }\n }\n }",
"public DividirConta() {\n initComponents();\n }",
"public Parte() {\n\n \n \n initComponents();\n \n \n this.setResizable(false);\n fondo imagen =new fondo();\n String imagenes=imagen.fond();\n \n ((JPanel)getContentPane()).setOpaque(false);\n ImageIcon uno=new ImageIcon(this.getClass().getResource(imagenes));\n JLabel fondo= new JLabel(); \n fondo.setIcon(uno);\n getLayeredPane().add(fondo, JLayeredPane.FRAME_CONTENT_LAYER);\n fondo.setBounds(0,0,uno.getIconWidth(),uno.getIconHeight());\n\n this.setSize(900,700);\n \n\n \n Date now = new Date(System.currentTimeMillis());\n SimpleDateFormat date = new SimpleDateFormat(\"dd-MM-yyyy\");\n SimpleDateFormat hour = new SimpleDateFormat(\"HH:mm:ss\");\n this.jLabel32.setText(date.format(now));\n this.jLabel33.setText(hour.format(now));\n \n\n \n try{\n Statement st = cn.createStatement();\n ResultSet rs = st.executeQuery(\"SELECT * FROM variable WHERE id='1'\");\n \n String usu=\"\";\n \n while(rs.next()){\n usu=rs.getString(2);\n }\n JLnombreUSU.setText(usu);\n \n \n \n \n }catch(Exception e){\n \n System.out.println(\"auditoria\"+e);\n }\n \n PdfPA.setVisible(false);\n PrintPA.setVisible(false);\n \n PdfPM.setVisible(false);\n PrintPM.setVisible(false);\n \n PdfPS.setVisible(false);\n PrintPS.setVisible(false);\n \n pdfPD.setVisible(false);\n PrintPD.setVisible(false);\n \n \n \n \n \n \n \n \n\n\n\n }",
"public void credito() \n {\n LabelCredito.removeAll();\n int witdh = LabelCredito.getWidth();\n int height = LabelCredito.getHeight();\n LabelCredito.setLayout(new BorderLayout());\n titulo.setPreferredSize(new Dimension(witdh, height));\n LabelCredito.add(\"Center\", titulo);\n LabelCredito.updateUI();\n LabelCredito.validate();\n }",
"public void paintComponent(Graphics g){\n\t\t\n\t\t// chama paintComponent para assegurar que o painel é exibido corretamente\n\t\tsuper.paintComponent(g);\n\t\tint width = getWidth(); // largura total \n\t\tint height = getHeight(); // altura total\n\t\tint meio1 = (width/2);\n\t\tint meio2 = (height/2);\n\t\t// desenha uma linha a partir do canto superior esquerdo até o inferior direito\n\t\tg.drawLine(0, 0, width, height);\n\n\t\t// desenha uma linha a partir do canto inferior esquerdo até o superior direito\n\t\tg.drawLine(0, height, width, 0);\n\t\t\n\t\t// A parte, cria uma linha Horizontal\n\t\tg.drawLine(0, meio2, width, meio2);\n\t\t// A parte, cria uma linha Vertical\n\t\tg.drawLine(meio1, 0, meio1, height);\n\t\t\n\t}",
"public void affichageLabyrinthe () {\n\t\t//Affiche le nombre de coups actuel sur la console et sur la fenetre graphique\n\t\tSystem.out.println(\"Nombre de coups : \" + this.laby.getNbCoups() + \"\\n\");\t\t\n\t\tthis.enTete.setText(\"Nombre de coups : \" + this.laby.getNbCoups());\n\n\t\t//Affichage dans la fenêtre et dans la console du labyrinthe case par case, et quand la case est celle ou se trouve le mineur, affiche ce dernier\n\t\tfor (int i = 0 ; i < this.laby.getHauteur() ; i++) {\n\t\t\tString ligne = new String();\n\t\t\tfor (int j = 0 ; j < this.laby.getLargeur() ; j++) {\n\t\t\t\tif (i != this.laby.getMineur().getY() || j != this.laby.getMineur().getX()) {\n\t\t\t\t\tligne = ligne + this.laby.getLabyrinthe()[i][j].graphismeCase();\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis.laby.getLabyrinthe()[i][j]=new Case();\n\t\t\t\t\tligne = ligne + this.laby.getMineur().graphismeMineur();\n\t\t\t\t}\t\t\t\t\n\t\t\t\tif (grille.getComponentCount() < this.laby.getLargeur()*this.laby.getHauteur()) {\n\t\t\t\t\tgrille.add(new JLabel());\n\t\t\t\t\t((JLabel)grille.getComponents()[i*this.laby.getLargeur()+j]).setIcon(this.laby.getLabyrinthe()[i][j].imageCase(themeJeu));\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(ligne);\n\t\t}\n\t\t((JLabel)grille.getComponents()[this.laby.getMineur().getY()*this.laby.getLargeur()+this.laby.getMineur().getX()]).setIcon(this.laby.getMineur().imageCase(themeJeu));\n\t}",
"public TelaAbigo() {\n initComponents();\n setLocationRelativeTo(null);\n setResizable(false);\n }",
"public void Circulo() {\r\n Circulo crc = new Circulo();\r\n crc.setBounds(0, 0, 765, 588);\r\n crc.setResizable(false);\r\n crc.setVisible(true);\r\n crc.setLocationRelativeTo(null);\r\n ImageIcon fig = new ImageIcon(\"src/images/figurative.png\");\r\n crc.setIconImage(fig.getImage());\r\n }",
"public Conteo() {\n initComponents();\n }",
"public void touche() {\n if (theme==0) { //Changer les couleurs ici et dans Option\n couleurNote1=0xff00FF00;\n couleurNote2=0xffFF0000;\n couleurNote3=0xffFFFF00;\n couleurNote4=0xff0000FF;\n }\n if (theme==1) {\n couleurNote1=0xffFF0000;\n couleurNote2=0xffFFFF00;\n couleurNote3=0xff0081FF;\n couleurNote4=0xff973EFF;\n }\n if (theme==2) {\n couleurNote1=0xff8FF5F2;\n couleurNote2=0xffFAACE3;\n couleurNote3=0xffF5E8A6;\n couleurNote4=0xffD9F074;\n }\n if (theme==3) {\n couleurNote1=0xffD4AF37;\n couleurNote2=0xffD4AF37;\n couleurNote3=0xffD4AF37;\n couleurNote4=0xffD4AF37;\n }\n\n if (theme==4) {\n couleurNote1=PApplet.parseInt(random(0xff000000, 0xffFFFFFF));\n couleurNote2=PApplet.parseInt(random(0xff000000, 0xffFFFFFF));\n couleurNote3=PApplet.parseInt(random(0xff000000, 0xffFFFFFF));\n couleurNote4=PApplet.parseInt(random(0xff000000, 0xffFFFFFF));\n }\n //#3F48CC\n\n if (touche1) {\n cc1=0xffFFFFFF;\n } else cc1=couleurNote1;\n fill(cc1);\n rect(420, 593, taille+14, taille+13);\n\n if (touche2) {\n cc2=0xffFFFFFF;\n } else cc2=couleurNote2;\n fill(cc2);\n rect(490, 593, taille+14, taille+13);\n\n if (touche3) {\n cc3=0xffFFFFFF;\n } else cc3=couleurNote3;\n fill(cc3);\n rect(560, 593, taille+14, taille+13);\n\n if (touche4) {\n cc4=0xffFFFFFF;\n } else cc4=couleurNote4;\n fill(cc4);\n rect(630, 593, taille+14, taille+13);\n}",
"public void paintComponent(Graphics g) {\n System.out.println(\"Component\");\n redessine(g);\n\n \n if(couleur==3) {\n\t\tg.setColor(Color.blue);\n\t}\n\tif(couleur==4) {\n\t\tg.setColor(Color.white);\n\t}\n\tif(couleur==2) {\n\t\tg.setColor(Color.green);\n\t}\n\tif(couleur==1) {\n\t\tg.setColor(Color.red);\n\t}\n if (dessina == \"Carre\") {\n \tRectangle rectangle = new Rectangle(this.x3,this.y3,this.longueur3,this.largeur3,this.couleur,this.remplir);\n figureCree.add(rectangle);\n rectangle.dessiner(g);\n \n\n }\n if (dessina == \"Trait\") {\n \t\n trait trait = new trait(this.x2,this.y2,this.longueur4,this.angle,this.couleur);\n figureCree.add(trait);\n trait.dessiner(g);\n \n }\n\n if (dessina == \"Cercle\") {\n Cercle cercle = new Cercle(this.x,this.y,this.longueur,this.largeur,this.couleur,this.remplir);\n figureCree.add(cercle);\n cercle.dessiner(g);\n \n System.out.println(figureCree.toString());\n\n }\n\n if (dessina == \"Triangle\") {\n \t\n \tTriangle triangle = new Triangle(this.x4,this.y4,this.x5,this.y5,this.x6,this.y6,this.couleur,this.remplir);\n figureCree.add(triangle);\n triangle.dessiner(g);\n \n }\n if (dessina == \"Texte\") {\n \tTexte texte = new Texte(this.chaine,this.x7,this.y7,this.couleur);\n \t\n figureCree.add(texte);\n texte.dessiner(g);\n \n\n }\n \n \n if (dessina ==\"Polygone\") {\n \n \tPolygone polygone = new Polygone(xpoints, ypoints,this.couleur,this.remplir,this.Nbpoints) ;\n\t\tfigureCree.add(polygone);\n \tpolygone.dessiner(g);\n \tNbpoints = 0;\n \txpoints= new int[5000];\n \typoints =new int[5000];\n }\n\n if (dessina == \"Breset\") {\n \tg.setColor(Color.white);\n \tg.fillRect(0, 0, this.getWidth(), this.getHeight());\n \tthis.figureCree.clear();\n \n\t\tSystem.out.println(figureCree.toString()+\"Larraylist\");\n }\n\n \n \n }",
"@Override\r\n\tpublic void horario() {\n\t\t\r\n\t}",
"public RegistroClientesGUI(){\n initComponents();\n obtenerSedes();\n \n //No olvidar agregar esto para agregarle las animaciones\n this.setLocationRelativeTo(null);\n\n this.setTitle(\"Empleados\");\n this.setResizable(false);\n \n \n }",
"public frame1() {\n initComponents();\n cs = new Esqueleto(jLabel1.getGraphics());\n Caminar= cs.caminardoAbajo();\n Caminar.start();\n x=0;\n }",
"private void hacerCuadro()\n {\n frame = new JFrame(calc.getTitulo());\n \n JPanel contenedor = (JPanel)frame.getContentPane();\n contenedor.setLayout(new BorderLayout(8, 8));\n contenedor.setBorder(new EmptyBorder( 10, 10, 10, 10));\n\n visor = new JTextField();\n contenedor.add(visor, BorderLayout.NORTH);\n\n JPanel panelDeBotones = new JPanel(new GridLayout(4, 4));\n agregarBoton(panelDeBotones, \"7\");\n agregarBoton(panelDeBotones, \"8\");\n agregarBoton(panelDeBotones, \"9\");\n agregarBoton(panelDeBotones, \"C\");\n \n agregarBoton(panelDeBotones, \"4\");\n agregarBoton(panelDeBotones, \"5\");\n agregarBoton(panelDeBotones, \"6\");\n agregarBoton(panelDeBotones, \"?\");\n \n agregarBoton(panelDeBotones, \"1\");\n agregarBoton(panelDeBotones, \"2\");\n agregarBoton(panelDeBotones, \"3\");\n panelDeBotones.add(new JLabel(\" \"));\n \n agregarBoton(panelDeBotones, \"0\");\n agregarBoton(panelDeBotones, \"+\");\n agregarBoton(panelDeBotones, \"-\");\n agregarBoton(panelDeBotones, \"=\");\n \n contenedor.add(panelDeBotones, BorderLayout.CENTER);\n\n status = new JLabel(calc.getAutor());\n contenedor.add(status, BorderLayout.SOUTH);\n\n frame.pack();\n }",
"private void inicializarComponentes() {\n\n\n comenzar = new JButton(devolverImagenButton(\"comenzar\", \"png\", 300, 300));\n comenzar.setRolloverIcon(devolverImagenButton(\"comenzar1\", \"png\", 300, 300));\n comenzar.setBackground(Color.WHITE);\n comenzar.setBorder(null);\n comenzar.setActionCommand(\"COMENZAR\");\n comenzar.setBounds(335, 450, 240, 100);\n add(comenzar);\n\n l1 = new JLabel();\n devolverImagenLabel(\"Bienvenido\", \"gif\", 900, 700, l1);\n l1.setBounds(0, 0, 900, 700);\n add(l1);\n\n }",
"public pnl_Gestionar_info_laboratorio() {\n initComponents();\n listar_info_lab.setSelected(true);\n new CambiaPanel(panel_contenedor, new paneles_de_paneles.de_gestionar_info_laboratorio_listar());\n pnl_Gestionar_contrato.color_performed(listar_info_lab,add_info_lab);\n }",
"public PrincipalGUIOpcional() {\r\n initComponents();\r\n AtributosGUI.setColoresEstandar();\r\n codigoInicial();\r\n }",
"public Janela() {\n visor.setFont(new Font(\"monospaced\", Font.PLAIN, 12));\n JPanel botoes = new JPanel();\n JPanel novol = new JPanel();\n //grid botoes\n botoes.setLayout(new GridLayout(1, 4));\n //texto botoes\n String texto[] = {\"Novo labirinto\", \"Abrir labirinto\", \"Salvar labirinto\", \"Executar labirinto\"};\n\n TratadoraDeMouse tratadorDeMouse = new TratadoraDeMouse();\n\n //criacao dos botoes\n for (int i = 0; i < this.botao.length; i++) {\n this.botao[i] = new JButton(texto[i]);\n\n this.botao[i].setActionCommand(texto[i]);\n this.botao[i].addActionListener(tratadorDeMouse);\n\n \t//cor no botao\n this.botao[i].setContentAreaFilled(false);\n this.botao[i].setOpaque(true);\n this.botao[i].setBackground(new java.awt.Color(166, 255, 193));\n \n //fonte do botao\n this.botao[i].setForeground(new java.awt.Color(0, 0, 0));\n botoes.add(this.botao[i]);\n }\n botao[3].setEnabled(false);\n\n //Area do log\n log.setEditable(false);\n log.setForeground(Color.red);\n log.setFont(log.getFont().deriveFont(Font.BOLD));\n log.setLineWrap(true);\n log.setWrapStyleWord(true);\n log.setBackground(new java.awt.Color(212, 212, 212));\n\n //interface\n JFrame janela = new JFrame(\"Labirinto\");\n janela.setSize(700, 450);\n janela.getContentPane().setLayout(new BorderLayout());\n\n //Definindo localizacao\n janela.add(novol, BorderLayout.NORTH);\n\t\t\t\n novol.setLayout(new BorderLayout());\n novol.add(this.info, BorderLayout.NORTH);\n novol.add(botoes, BorderLayout.CENTER);\n\t\t\t\n janela.add(this.visor, BorderLayout.CENTER);\n janela.add(this.log, BorderLayout.SOUTH);\n\n JScrollPane scroll = new JScrollPane(visor);\n scroll.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);\n janela.getContentPane().add(scroll);\n\n janela.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n janela.setVisible(true);\n }",
"public Controlador(){\n\t\tcuadricula = new Cuadricula();\n\t\tpanel = new Panel();\n\t\t\n\t\tnew JPanel();\n\t\t\n\t\tsetLayout(new BorderLayout());\n\t\t\n\t\tadd(cuadricula, BorderLayout.CENTER);\n\t\tadd(panel, BorderLayout.SOUTH);\n\t\t\n\t\tgetDensidad().addActionListener(new Oyente());\n\t\tgetBotonColor().addActionListener(new Oyente());\n\t\tgetBotonEmpezar().addActionListener(new Oyente());\n\t\tgetBotonFinalizar().addActionListener(new Oyente());\n\t\tgetBotonTodo().addActionListener(new Oyente());\n\t\tgetBotonPausar().addActionListener(new Oyente());\n\t\tgetBotonReanudar().addActionListener(new Oyente());\n\t\tgetBotonPausar().addActionListener(new Oyente());\n\t\tgetBotonPaso().addActionListener(new Oyente());\n\t}",
"public Ventana(){\r\n\t\t\r\n\t\tsuper.setTitle(\"Operaciones\");\r\n\t\tsuper.setSize(320, 480);\r\n\t\tsuper.setDefaultCloseOperation(EXIT_ON_CLOSE); //para el botón de cerrar\r\n\t\tcargarControles();\r\n\t}",
"public balik_turleri() {\n initComponents();\n Toolkit toolkit = getToolkit();\n Dimension dim = toolkit.getScreenSize();\n setLocation(dim.width/2-this.getSize().width/2, dim.height/2-this.getSize().height/2);\n setTitle(\"Balık Türleri Ekranı\");\n }",
"public rplorcamentoTelaCadGastos() {\n initComponents();\n }",
"public InterfazBienvenida() {\n\n initComponents();\n setLocationRelativeTo(null);\n\n this.ButtonBuscarImagen.putClientProperty(SubstanceLookAndFeel.BUTTON_SHAPER_PROPERTY, new StandardButtonShaper());\n this.ButtonIndexarImagen.putClientProperty(SubstanceLookAndFeel.BUTTON_SHAPER_PROPERTY, new StandardButtonShaper());\n this.ButtonComoFunciona.putClientProperty(SubstanceLookAndFeel.BUTTON_SHAPER_PROPERTY, new StandardButtonShaper());\n }",
"public CadastroComplemento() {\n initComponents();\n \n }",
"public VentanaFichaMedica() {\n initComponents(); \n setSize(1195, 545);\n setIcon();\n setLocationRelativeTo(null);\n setResizable(false);\n cargar(\"\");\n setTitle(\"LISTA DE FICHAS MÉDICAS\");\n inicar(); \n }",
"public PanelCicloEscolar() {\n initComponents();\n }",
"public Geradordesenha() {\n initComponents();\n this.setResizable(false);\n this.setLocationRelativeTo(null);\n }",
"private void montaJanela() {\n JPanel painelLista = new JPanel(new BorderLayout());\n painelLista.setBorder(BorderFactory.createTitledBorder(\"Contatos\"));\n listaContatos.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n painelLista.add(new JScrollPane(listaContatos), BorderLayout.CENTER);\n \n // Criando um painel com os botões sob a lista\n JButton botaoAdicionar = new JButton(new ImageIcon(getClass().getResource(ICONE_ADICIONA)));\n JButton botaoRemover = new JButton(new ImageIcon(getClass().getResource(ICONE_REMOVE)));\n JPanel painelBotoes = new JPanel(new GridLayout(1, 2));\n painelBotoes.add(botaoAdicionar);\n painelBotoes.add(botaoRemover);\n painelLista.add(painelBotoes, BorderLayout.SOUTH);\n \n // Criando um painel com o nome\n JPanel painelNome = new JPanel(new BorderLayout());\n painelNome.add(new JLabel(\"Nome:\"), BorderLayout.WEST); \n campoNome.setEnabled(false);\n painelNome.add(campoNome, BorderLayout.CENTER);\n \n // Criando um painel com o telefone\n JPanel painelTelefone = new JPanel(new BorderLayout());\n painelTelefone.add(new JLabel(\"Telefone:\"), BorderLayout.WEST);\n campoTelefone.setEnabled(false);\n painelTelefone.add(campoTelefone, BorderLayout.CENTER);\n \n // Criando um painel que contem tanto o nome quanto o telefone\n JPanel painelCampos = new JPanel(new GridLayout(2, 1));\n painelCampos.add(painelNome);\n painelCampos.add(painelTelefone);\n \n // Criando um painel com os detalhes\n JPanel painelDetalhes = new JPanel(new BorderLayout());\n painelDetalhes.setBorder(BorderFactory.createTitledBorder(\"Detalhes\"));\n campoDetalhes.setEnabled(false);\n painelDetalhes.add(new JScrollPane(campoDetalhes), BorderLayout.CENTER);\n\n // Criando um painel central que combina os campos de texto, a área de texto e os botões\n JPanel painelCentral = new JPanel(new BorderLayout());\n painelCentral.add(painelCampos, BorderLayout.NORTH);\n painelCentral.add(painelDetalhes, BorderLayout.CENTER);\n \n // Criando um painel do tipo split, que combina a lista com os demais componentes\n JSplitPane painelPrincipal = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, painelLista, painelCentral);\n painelPrincipal.setDividerLocation(200);\n this.setContentPane(painelPrincipal);\n\n // Configurando os listeners\n listaContatos.addListSelectionListener(new ControleCarregar(listaContatos, campoNome, campoTelefone, campoDetalhes));\n botaoAdicionar.addActionListener(new ControleAdicionar(contatos)); \n botaoRemover.addActionListener(new ControleRemover(listaContatos, contatos));\n ControleSalvar salvar = new ControleSalvar(listaContatos, campoNome, campoTelefone, campoDetalhes);\n campoNome.addKeyListener(salvar);\n campoTelefone.addKeyListener(salvar);\n campoDetalhes.addKeyListener(salvar);\n this.addWindowListener(new ControlePersistencia(contatos));\n\n // Configuration a janela\n this.pack();\n this.setSize(800, 600);\n this.setLocationRelativeTo(null);\n this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); \n }",
"private MenuServicios(){\n super(\"Gym Manager Servicios a Socios\");\n setBackground(Color.WHITE);\n\tgetContentPane().setLayout(null);\n setResizable(false);\n\tsetDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);\n pack();\n\tsetSize(942,592);\n\tsetLocationRelativeTo(null);\n image_path = \"jar:\" + getClass().getProtectionDomain().getCodeSource().\n getLocation().toString() + \"!/imagenes/\";\n \n jdpFondo = new JDesktopPane();\n jdpFondo.setBackground(Color.WHITE);\n jtpcContenedor = new JXTaskPaneContainer();\n jtpPanel = new JXTaskPane();\n jtpPanel2 = new JXTaskPane();\n jpnlPanelPrincilal = new JPanel();\n jpnlPanelPrincilal.setBackground(Color.WHITE);\n jtpcContenedor.setBackground(Color.LIGHT_GRAY);\n \n paginaInicio();\n crearComponentes();\n addToPanel();\n accionComponentes();\n \n }",
"private void dibujarMarcador() {\n\n\t\tText tituloMarcador = new Text(\"Marcador\");\n\t\ttituloMarcador.setFont(new Font(16));\n\n\t\tText tituloJuega = new Text(\"Juega\");\n\t\ttituloJuega.setFont(new Font(16));\n\t\t\n\t\tcantidadFichasNegras = new Label();\n\t\tcantidadFichasBlancas = new Label();\n\t\tjugadorActual = new Label();\n\n\t\tGridPane marcador = new GridPane();\n\t\tmarcador.setAlignment(Pos.TOP_CENTER);\n\t\tmarcador.setHgap(20);\n\t\tmarcador.setVgap(20);\n\t\tmarcador.setPadding(new Insets(20));\n\t\tmarcador.add(tituloMarcador, 0, 0, 2, 1);\n\t\tmarcador.add(new Label(\"Negras :\"), 0, 1);\n\t\tmarcador.add(cantidadFichasNegras, 1, 1);\n\t\tmarcador.add(new Label(\"Blancas :\"), 0, 2);\n\t\tmarcador.add(cantidadFichasBlancas, 1, 2);\n\t\tmarcador.add(tituloJuega, 0, 3, 2, 1);\n\t\tmarcador.add(jugadorActual, 0, 4, 2, 1);\n\n\t\tpanel.setPadding(new Insets(5));\n\t\tpanel.setRight(marcador);\n\t}",
"public Egresos() {\n this.setUndecorated(true);\n initComponents();\n }",
"@Override\n public void disegna(Graphics g){\n \n //Disegna solo se l'oggetto è attivo\n if(attivo){\n \n //Scelgo il font\n g.setFont(new Font(\"German\", Font.BOLD, 50));\n //Disegno una cornice con triplo rettangolo\n g.setColor(Color.white);\n g.drawRect(this.punto.x - 10, this.punto.y - 44, larghezza_countdown, altezza_countdown);\n g.setColor(Color.black);\n g.drawRect(this.punto.x - 11, this.punto.y - 45, larghezza_countdown+2, altezza_countdown+2);\n g.setColor(Color.white);\n g.drawRect(this.punto.x - 12, this.punto.y - 46, larghezza_countdown+4, altezza_countdown+4);\n \n //Setto il testo nel formato \"timer\"\n setTesto();\n \n //Disegno il testo\n g.drawString(this.testo, this.punto.x, this.punto.y);\n \n //Scelgo il font\n g.setFont(new Font(\"German\", Font.BOLD, 50));\n //Disegno una cornice con triplo rettangolo\n g.setColor(Color.white);\n g.drawRect(this.punto.x - 10 + 450, this.punto.y - 44, larghezza_countdown + 98, altezza_countdown);\n g.setColor(Color.black);\n g.drawRect(this.punto.x - 11 + 450, this.punto.y - 45, larghezza_countdown+2 + 98, altezza_countdown+2);\n g.setColor(Color.white);\n g.drawRect(this.punto.x - 12 + 450, this.punto.y - 46, larghezza_countdown+4 + 98, altezza_countdown+4);\n \n //Disegno il testo\n g.drawString(this.livello, this.punto.x + 450, this.punto.y);\n \n }\n \n }",
"private void criaInterface() {\n\t\tColor azul = new Color(212, 212, 240);\n\n\t\tpainelMetadado.setLayout(null);\n\t\tpainelMetadado.setBackground(azul);\n\n\t\tmetadadoLabel = FactoryInterface.createJLabel(10, 3, 157, 30);\n\t\tpainelMetadado.add(metadadoLabel);\n\n\t\tbotaoAdicionar = FactoryInterface.createJButton(520, 3, 30, 30);\n\t\tbotaoAdicionar.setIcon(FactoryInterface.criarImageIcon(Imagem.ADICIONAR));\n\t\tbotaoAdicionar.setToolTipText(Sap.ADICIONAR.get(Sap.TERMO.get()));\n\t\tpainelMetadado.add(botaoAdicionar);\n\n\t\tbotaoEscolha = FactoryInterface.createJButton(560, 3, 30, 30);\n\t\tbotaoEscolha.setIcon(FactoryInterface.criarImageIcon(Imagem.VOLTAR_PRETO));\n\t\tbotaoEscolha.setToolTipText(Sap.ESCOLHER.get(Sap.TERMO.get()));\n\t\tbotaoEscolha.setEnabled(false);\n\t\tpainelMetadado.add(botaoEscolha);\n\n\t\talterarModo(false);\n\t\tatribuirAcoes();\n\t}",
"public Cifrador(Manejador m){\n manejador = m;\n setTitle(\"Cifrador\");\n setResizable(false);\n setBounds(400,100, 400, 400);\n iniciarComponentes();\n setDefaultCloseOperation(EXIT_ON_CLOSE);\n\n }",
"public Punto_venta() {\n initComponents();\n }",
"public void arreglarBoton()\r\n\t{\r\n\t\tthis.setBorder(BorderFactory.createLineBorder(Color.white, 4));\r\n\t\tthis.setFont(new Font(\"Arial\", Font.BOLD, 17));\r\n\t}",
"private void renderObjetos() {\n \tcpPrincipal.add(_cPrincipal);\n\n _cPrincipal.add(rPrincipal);\n rPrincipal.add(cLabels);\n rPrincipal.add(cTexts);\n \n //rPrincipal.setBorder(new Border(1, Color.BLUE,Border.STYLE_DASHED));\n \n _cPrincipal.add(rMensaje);\n _cPrincipal.add(rBotones); \n \n cLabels.add(lApellido);\n cLabels.add(lNombres);\n cLabels.add(lDocNum);\n cLabels.add(lTelefono);\n cLabels.add(lCelular);\n //cLabels.add(lRazonSocial);\n \n cTexts.add(tApellido);\n cTexts.add(tNombres); \n cTexts.add(tDoc);\n cTexts.add(tTelefono);\n cTexts.add(tCelular);\n //cTexts.add(tRazonSocial); \n \n rMensaje.add(lMensaje);\n\n ApplicationInstance.getActive().setFocusedComponent(tApellido);\n \n }",
"public void luoKomponentit(Container c) {\n farmer.fillArea(100, 100);\r\n Kuuntelija kuunt = new Kuuntelija(farmer);\r\n farmer.addMouseListener(kuunt);\r\n\r\n c.add(farmer, BorderLayout.CENTER);\r\n\r\n JPanel controlPanel = new JPanel();\r\n controlPanel.setLayout(new GridLayout(1, 5));\r\n\r\n JButton nappi = new JButton(\"Aloita\");\r\n JButton clrBtn = new JButton(\"tyhjennä\");\r\n JButton nxt = new JButton(\"seuraava\");\r\n JComboBox vari = teeVariValitsija();\r\n JTextField gen = new JTextField(\"Generation: 0\");\r\n gen.setEditable(false);\r\n\r\n vari.addActionListener(new VariKuuntelija());\r\n\r\n NappiKuuntelija k = new NappiKuuntelija(farmer, kuunt, nappi, clrBtn, nxt, gen);\r\n nappi.addActionListener(k);\r\n clrBtn.addActionListener(k);\r\n nxt.addActionListener(k);\r\n\r\n controlPanel.add(gen);\r\n controlPanel.add(nappi);\r\n controlPanel.add(clrBtn);\r\n controlPanel.add(nxt);\r\n controlPanel.add(vari);\r\n\r\n c.add(controlPanel, BorderLayout.SOUTH);\r\n\r\n }",
"public Libreta() {\n\n this.setUndecorated(true);\n initComponents();\n this.setLocationRelativeTo(null);\n transparenciButton();\n }",
"public void afficherLfu() {\n\t\tint nbrCols = listEtapeLfu.size();\n\t\tint nbrRows = 0;\n\t\tfor(ArrayList<ProcessusLfu> list: listEtapeLfu) {\n\t\t\tif(list.size() > nbrRows) nbrRows = list.size(); \n\t\t}\n\t\taddColsRows(resultPane, nbrCols+1, nbrRows);\n\t\taddPanelForResult(resultPane);\n\t\t\n\t\tresultPane.setStyle(\"-fx-background-color: #23CFDC\");\n\n\t\t// Affichage du résultat\n\t\tfor(int i=0; i< listEtapeLfu.size();i++) {\n\t\t\tArrayList<ProcessusLfu> list = listEtapeLfu.get(i); \n\t\t\tfor(int j=0; j<list.size(); j++) {\n\t\t\t\tProcessusLfu p = list.get(j); \n\t\t\t\tLabel label = new Label(\"\" + p.getValue());\n\n\t\t\t\tresultPane.add(label, i+1, j);\n\t\t\t\tGridPane.setHalignment(label, HPos.CENTER);\n\n\t\t\t}\n\t\t}\n\t\tresultPane.setVisible(true);\n\t\tgenere = true;\n\t}",
"public Gui_lectura_consumo() {\n initComponents();\n centrarform();\n consumo_capturado.setEditable(false);\n limpiarCajas();\n \n \n }",
"public void anuncio() {\n\n\t\tapp.image(pantallaEncontrado, 197, 115, 300, 150);\n\n\t\tapp.image(botonContinuar, 253, 285);\n\n\t}",
"public void infoBase()\n {\n this.menu.setBackground(new java.awt.Color(179, 204, 204));\n this.menu.setOpaque(true);\n \n this.semaine.setBackground(new java.awt.Color(224, 235, 235));\n this.semaine.setOpaque(true);\n \n ImageIcon cours_icon = new ImageIcon(new ImageIcon(\"src/Icones/book.png\").getImage().getScaledInstance(20, 20, Image.SCALE_DEFAULT));\n mes_cours = new JButton(\"Cours\", cours_icon);\n this.iconFont(mes_cours);\n\n ImageIcon search_icon = new ImageIcon(new ImageIcon(\"src/Icones/search.png\").getImage().getScaledInstance(20, 20, Image.SCALE_DEFAULT));\n rechercher = new JButton(\"Rechercher\", search_icon);\n this.iconFont(rechercher);\n\n ImageIcon delete_icon = new ImageIcon(new ImageIcon(\"src/Icones/quit.png\").getImage().getScaledInstance(20, 20, Image.SCALE_DEFAULT));\n this.annule = new JButton(\"Cours annulé(s)\", delete_icon);\n this.iconFont(annule);\n\n ImageIcon report_icon = new ImageIcon(new ImageIcon(\"src/Icones/report.png\").getImage().getScaledInstance(20, 20, Image.SCALE_DEFAULT));\n this.report = new JButton(\"Reporting\", report_icon);\n this.iconFont(report);\n\n ImageIcon recap_icon = new ImageIcon(new ImageIcon(\"src/Icones/news-admin.png\").getImage().getScaledInstance(20, 20, Image.SCALE_DEFAULT));\n this.summary = new JButton(\"Récapitulatif des cours\", recap_icon);\n this.iconFont(summary);\n \n ImageIcon logout_icon = new ImageIcon(new ImageIcon(\"src/Icones/logout.png\").getImage().getScaledInstance(20, 20, Image.SCALE_DEFAULT));\n this.logout = new JButton(\"Se déconnecter\", logout_icon);\n this.iconFont(logout);\n \n ///Affiche le numéro de semaine\n Calendar cal = new GregorianCalendar();\n Date d = new Date();\n cal.setTime(d);\n\n this.num_semaine = cal.get(Calendar.WEEK_OF_YEAR); //Numéro de semaine actuel\n\n JLabel week = new JLabel(\"SEMAINE\");\n f = week.getFont();\n week.setFont(f.deriveFont(f.getStyle() | Font.BOLD));\n semaine.add(week);\n this.week_button = new ArrayList();\n \n //On ajoute les 52 boutons pour chaque numéro de semaine\n for (int i = 0; i < 52; i++) {\n week_button.add(new JButton(Integer.toString(i + 1))); //Dans la arrayList\n semaine.add(week_button.get(i)); //Dans la toolbar\n if (i == num_semaine) { //Si égal à la semaine actuelle\n week_button.get(i - 1).setBackground(Color.red);\n week_button.get(i - 1).setOpaque(true);\n }\n\n }\n JPanel toolbars = new JPanel(new GridLayout(0, 1));\n toolbars.add(menu);\n toolbars.add(semaine);\n\n this.add(toolbars, BorderLayout.NORTH);\n\n String mesInfos = \"HYPERPLANNING 2019-2020\";\n \n info = new JLabel(mesInfos, JLabel.CENTER);\n info.setPreferredSize(new Dimension(20,50));\n info.setBackground( new java.awt.Color(153, 230, 230));\n info.setOpaque(true);\n info.setFont(new Font(\"Verdana\", Font.PLAIN, 18));\n\n this.add(info, BorderLayout.SOUTH);\n\n this.add(panel);\n panel.setLayout(new OverlayLayout(panel));\n this.panel.setBackground(new java.awt.Color(112, 219, 219));\n this.panel.setOpaque(true);\n\n this.setVisible(true);\n }",
"@Override\n\t\t\tprotected void paintComponent(Graphics g) {\n\t\t\t\tsuper.paintComponent(g);\n\t\t\t\tfor (int i = 0; i < inc.length; i++) {\n\t\t\t\t\tg.setColor(new Color(220 - i * 50, 220 - i * 50, 220 - i * 50));\n\t\t\t\t\tg.fillOval(inc[i][0], inc[i][1], 30, 30);\n\t\t\t\t}\n\t\t\t\tg.setColor(Color.yellow);\n\t\t\t\tg.fillOval(x, h, 30, 30);\n\n\t\t\t\t// 장애물\n\t\t\t\tg.setColor(Color.red);\n\t\t\t\tg.fillRect(0, 480, 800, 20);\n\t\t\t\tg.fillRect(400, 200, 50, 300);\n\t\t\t\tg.fillRect(300, 350, 100, 30);\n\t\t\t\t//\n\t\t\t\tGraphics2D g2 = bi.createGraphics();\n//\t\t\t\tthis.paintAll(g2);\n\t\t\t}",
"protected void paintComponent(Graphics g) {\r\n\t\tsuper.paintComponent(g);\r\n\r\n\t\t\r\n\t\tInsets ins = this.getInsets();\r\n\t\tint varX = ins.left+5;\r\n\t\tint varY = ins.top+5;\r\n\r\n\t\tif ( pozicijaIgraca.equals(\"gore\")){\t\t\t\r\n\t\t\tfor(Card karta : karte){\r\n\t\t\t\tkarta.moveTo(varX, varY);\r\n\t\t\t\tkarta.draw(g, this);\r\n\t\t\t\tvarX = varX + karta.getWidth()+5;\r\n\t\t\t}\r\n\t\t\tg.setColor(Color.RED);\r\n\t\t\tg.drawString(imeIgraca, varX - 120, varY + 100);\r\n\t\t} else {\r\n\t\t\tfor(Card karta : karte){\r\n\t\t\t\tkarta.moveTo(varX, varY);\r\n\t\t\t\tkarta.draw(g, this);\r\n\t\t\t\tvarX = varX + karta.getWidth()/2;\r\n\t\t\t\tvarY = varY + karta.getHeight()/10;\r\n\t\t\t}\r\n\t\t\tg.setColor(Color.RED);\r\n\t\t\tg.drawString(imeIgraca, varX - 100 , varY + 90);\r\n\t\t}\r\n\t\t\r\n\r\n\t}",
"public lineas() {\n initComponents();\n \n }",
"private void addComponents() {\n\t\t\n\t\t// prima riga di lettere\n\t\tfor (int i = 0; i < 10; i++)\n\t\t\tadd(letterLabel(i));\n\t\t\t\n\t\t/* la scacchiera ha l'oringine 0,0 in basso a sinistra\n\t\t * mentre la griglia si riempie di elementi dall'alto\n\t\t * percio' il for delle x (j) cresce mentre popoliamo le celle (bottoni)\n\t\t * mentre il for delle y (i) decresce man mano che passiamo di riga in riga */\n\t\tfor (int i = 7; i >= 0; i--)\n\t\t\tfor (int j = 0; j < 10; j++) {\n\t\t\t\tif (j == 0 || j == 9)\n\t\t\t\t\tadd(numberLabel(i + 1));\n\t\t\t\telse\n\t\t\t\t\tadd(buttons[j - 1][i]);\n\t\t\t}\n\t\t\n\t\t// ultima riga (uguale alla prima)\n\t\tfor (int i = 0; i < 10; i++)\n\t\t\tadd(letterLabel(i));\n\t}",
"public void finalizarJuego(){\n eliminarLetrasAusentes(); \n deshabilitarGlobos(); \n Platform.runLater(()->{\n onRoot.getChildren().clear();\n Pane Over = new Pane();\n ImageView ini = new ImageView(new Image(CONSTANTES.RUTA_IMGS+\"BG_IJ02.png\"));\n Label ltitulo = new Label(\"TIME'S OVER\");\n ltitulo.setTextFill(Color.WHITE);\n ltitulo.setFont(CONSTANTES.FUENTE); \n Pane seguir = Utilities.boton(\"Seguir\");\n seguir.setLayoutX(500);\n seguir.setLayoutY(290); \n seguir.setOnMouseClicked(e->{\n VistaJuego2 vj2= new VistaJuego2(juego);\n Utilities.transition(root,vj2.getRoot());\n });\n ltitulo.setLayoutX(150);\n ltitulo.setLayoutY(30);\n ScrollPane scrollp= paneLetrasObtenidas();\n \n Over.setLayoutX(100);\n Over.setLayoutY(-500);\n \n HBox h= new HBox();\n h.setLayoutX(100);\n h.setLayoutY(90);\n Label l1;\n Label l2;\n l1= new Label(\"Letras\");\n l2= new Label (\"Stock\"); \n l1.setTextFill(Color.WHITE);\n l2.setTextFill(Color.WHITE);\n \n try {\n Font f = Font.loadFont(new FileInputStream(new File(\"src/myFonts/Top_p2.ttf\")), 24);\n l1.setFont(f);\n l2.setFont(f);\n } catch (FileNotFoundException ex) {\n Logger.getLogger(VistaJuego1.class.getName()).log(Level.SEVERE, null, ex);\n Utilities.reportError(ex);\n }\n h.getChildren().addAll(l1,l2);\n h.setSpacing(60);\n Over.getChildren().addAll(ini,ltitulo,h,scrollp,seguir);\n Utilities.bajarCartel(onRoot, Over, 200); \n \n }); \n }",
"private void visualizaPersonajes() {\r\n\r\n\t\t// Recogemos nuestro personaje y comprobamos su personaje para mostrar una\r\n\t\t// imagen u\r\n\t\t// otra.\r\n\t\tthis.personaje = DatabaseOperaciones.getPersonaje();\r\n\r\n\t\tString clase = (personaje == null) ? null : personaje.getClass().toString().substring(24);\r\n\r\n\t\tif (clase != null) {\r\n\r\n\t\t\tthis.character1.setStyle(\"visibility: visible;\" + \"-fx-background-image: url('\"\r\n\t\t\t\t\t+ this.personaje.getAspecto() + \"'); \" + \"-fx-background-size: cover;\");\r\n\r\n\t\t}\r\n\r\n\t\telse {\r\n\r\n\t\t\tthis.character1.setStyle(\"visibility: hidden;\");\r\n\t\t}\r\n\r\n\t\tcompruebaPersonajes();\r\n\t}",
"@Override\n\tpublic void paint(Graphics g) {\n\t\tsuper.paint(g);\n\t\t\n\t\tsetBackground(Color.white); // Imposto il colore di sfondo\n\t\tsetForeground(Color.black); // Imposto il colore dell'etichetta\n\t}",
"public Consultar_Cita() {\n initComponents();\n this.setLocationRelativeTo(null);\n mostrartabla(\"\");\n //Llenar();\n }",
"public void iniciarPartida() {\n\t\tJuego juegoActual = controladorJuego.getJuego();\n\t\t// Recuperamos Tablero de juego para obtener las dimensiones\n\t\tTablero tableroActual = juegoActual.getTablero();\n\n\t\t// Creamos el layout para introducir la matriz con las casillas\n\t\tthis.setLayout(new BorderLayout());\n\t\tpaneltablero = new JPanel(new GridLayout(tableroActual.getNumFilas(), tableroActual.getNumCols()));\n\t\tthis.add(paneltablero);\n\n\t\t// Creamos la matriz de JButton que nos permetira interacctuar\n\t\ttablero = new JButton[tableroActual.getNumFilas()][tableroActual.getNumCols()];\n\t\tfor (int x = 0; x < tableroActual.getNumFilas(); x++) {\n\t\t\tfor (int y = 0; y < tableroActual.getNumCols(); y++) {\n\t\t\t\ttablero[x][y] = new JButton();\n\t\t\t\ttablero[x][y].setName(\"Casilla\");\n\t\t\t\ttablero[x][y].setPreferredSize(new Dimension(32, 32));\n\t\t\t\ttablero[x][y].addMouseListener((MouseListener) this.getControladorJuego());\n\t\t\t\tpaneltablero.add(tablero[x][y]);\n\t\t\t}\n\t\t}\n\t\t\n\t\tbarraMenu();\n\n\t\tventana.setContentPane(this);\n\t\tventana.setResizable(false);\n\t\tventana.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tventana.pack();\n\t\tventana.setVisible(true);\n\t}",
"private void creaPannelli() {\n /* variabili e costanti locali di lavoro */\n Pannello pan;\n\n try { // prova ad eseguire il codice\n\n /* pannello date */\n pan = this.creaPanDate();\n this.addPannello(pan);\n\n /* pannello coperti */\n PanCoperti panCoperti = new PanCoperti();\n this.setPanCoperti(panCoperti);\n this.addPannello(panCoperti);\n\n\n /* pannello placeholder per il Navigatore risultati */\n /* il navigatore vi viene inserito in fase di inizializzazione */\n pan = new PannelloFlusso(Layout.ORIENTAMENTO_ORIZZONTALE);\n this.setPanNavigatore(pan);\n this.addPannello(pan);\n\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n } // fine del blocco try-catch\n\n }",
"private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setTitle(\"..:FSO-TP1:..\");\n\t\tframe.setResizable(false);\n\t\tframe.getContentPane().setBackground(Color.BLACK);\n\t\tframe.setBounds(100, 100, 658, 585);\n\t\tframe.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t\tframe.setLocationRelativeTo(null);\n\n\t\tJPanel panelConeccao = new JPanel();\n\t\tpanelConeccao.setBorder(\n\t\t\t\tnew TitledBorder(null, \"CONEC\\u00C7\\u00C3O\", TitledBorder.LEFT, TitledBorder.TOP, null, Color.WHITE));\n\t\tpanelConeccao.setBackground(Color.BLACK);\n\t\tpanelConeccao.setBounds(10, 10, 630, 79);\n\t\tframe.getContentPane().add(panelConeccao);\n\t\tpanelConeccao.setLayout(null);\n\n\t\tJLabel lblNomeRobot = new JLabel(\"Nome\");\n\t\tlblNomeRobot.setHorizontalAlignment(SwingConstants.LEFT);\n\t\tlblNomeRobot.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\n\t\tlblNomeRobot.setForeground(Color.WHITE);\n\t\tlblNomeRobot.setBounds(53, 22, 47, 40);\n\t\tpanelConeccao.add(lblNomeRobot);\n\n\t\ttxtNomeRobot = new JTextField();\n\t\ttxtNomeRobot.addFocusListener(new FocusAdapter() {\n\t\t\t@Override\n\t\t\tpublic void focusLost(FocusEvent e) {\n\t\t\t\tname = txtNomeRobot.getText();\n\t\t\t\tif (name.length() > 0) {\n\t\t\t\t\ttxtNomeRobot.setBackground(Color.WHITE);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\ttxtNomeRobot.addKeyListener(new KeyAdapter() {\n\t\t\t@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tif (e.getKeyChar() == KeyEvent.VK_ENTER) {\n\t\t\t\t\tname = txtNomeRobot.getText();\n\t\t\t\t\tif (name.length() > 0) {\n\t\t\t\t\t\ttxtNomeRobot.setBackground(Color.WHITE);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\ttxtNomeRobot.setHorizontalAlignment(SwingConstants.CENTER);\n\t\ttxtNomeRobot.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\n\t\ttxtNomeRobot.setBounds(110, 32, 226, 21);\n\t\tpanelConeccao.add(txtNomeRobot);\n\t\ttxtNomeRobot.setColumns(10);\n\n\t\tbtnConectar = new JButton(\"Ligar\");\n\t\tbtnConectar.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tconnectRobot();\n\t\t\t\t} catch (InterruptedException e1) {\n\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnConectar.setToolTipText(\"Ligar Gestor\");\n\t\tbtnConectar.setEnabled(true);\n\t\tbtnConectar.setFont(new Font(\"Tahoma\", Font.PLAIN, 10));\n\t\tbtnConectar.setBounds(471, 31, 112, 19);\n\t\tpanelConeccao.add(btnConectar);\n\n\t\tlblConectado = new JLabel(\"\");\n\t\tlblConectado.setBackground(Color.RED);\n\t\tlblConectado.setOpaque(true);\n\t\tlblConectado.setForeground(Color.RED);\n\t\tlblConectado.setBounds(471, 52, 112, 3);\n\t\tpanelConeccao.add(lblConectado);\n\n\t\tJPanel panelRobot = new JPanel();\n\t\tpanelRobot.setBorder(new TitledBorder(\n\t\t\t\tnew EtchedBorder(EtchedBorder.LOWERED, new Color(255, 255, 255), new Color(160, 160, 160)), \"ROBOT\",\n\t\t\t\tTitledBorder.LEFT, TitledBorder.TOP, null, new Color(255, 255, 255)));\n\t\tpanelRobot.setBackground(Color.BLACK);\n\t\tpanelRobot.setBounds(10, 99, 630, 214);\n\t\tframe.getContentPane().add(panelRobot);\n\t\tpanelRobot.setLayout(null);\n\n\t\tJLabel lblDistancia = new JLabel(\"Dist\\u00E2ncia\");\n\t\tlblDistancia.setHorizontalAlignment(SwingConstants.LEFT);\n\t\tlblDistancia.setForeground(Color.WHITE);\n\t\tlblDistancia.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\n\t\tlblDistancia.setBounds(10, 33, 60, 50);\n\t\tpanelRobot.add(lblDistancia);\n\n\t\tJLabel lblAngulo = new JLabel(\"\\u00C2ngulo\");\n\t\tlblAngulo.setHorizontalAlignment(SwingConstants.LEFT);\n\t\tlblAngulo.setForeground(Color.WHITE);\n\t\tlblAngulo.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\n\t\tlblAngulo.setBounds(10, 93, 60, 50);\n\t\tpanelRobot.add(lblAngulo);\n\n\t\tJLabel lblRaio = new JLabel(\"Raio\");\n\t\tlblRaio.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\n\t\tlblRaio.setForeground(Color.WHITE);\n\t\tlblRaio.setBounds(10, 153, 60, 50);\n\t\tpanelRobot.add(lblRaio);\n\n\t\ttxtDistance = new JTextField();\n\t\ttxtDistance.setHorizontalAlignment(SwingConstants.CENTER);\n\t\ttxtDistance.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\n\t\ttxtDistance.setBounds(80, 49, 76, 19);\n\t\tpanelRobot.add(txtDistance);\n\t\ttxtDistance.setColumns(10);\n\n\t\ttxtAngle = new JTextField();\n\t\ttxtAngle.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\n\t\ttxtAngle.setHorizontalAlignment(SwingConstants.CENTER);\n\t\ttxtAngle.setBounds(80, 111, 76, 19);\n\t\tpanelRobot.add(txtAngle);\n\t\ttxtAngle.setColumns(10);\n\n\t\ttxtRadius = new JTextField();\n\t\ttxtRadius.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\n\t\ttxtRadius.setHorizontalAlignment(SwingConstants.CENTER);\n\t\ttxtRadius.setBounds(80, 171, 76, 19);\n\t\tpanelRobot.add(txtRadius);\n\t\ttxtRadius.setColumns(10);\n\n\t\tJButton btnAvancar = new JButton(\"Avan\\u00E7ar\");\n\t\tbtnAvancar.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdistance = Integer.parseInt(txtDistance.getText());\n\t\t\t\tmove(false);\n\t\t\t}\n\t\t});\n\t\tbtnAvancar.setFont(new Font(\"Tahoma\", Font.PLAIN, 10));\n\t\tbtnAvancar.setBounds(272, 44, 76, 32);\n\t\tpanelRobot.add(btnAvancar);\n\n\t\tJButton btnParar = new JButton(\"Parar\");\n\t\tbtnParar.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\tstopMove();\n\t\t\t}\n\t\t});\n\t\tbtnParar.setFont(new Font(\"Tahoma\", Font.PLAIN, 10));\n\t\tbtnParar.setBounds(272, 104, 76, 32);\n\t\tpanelRobot.add(btnParar);\n\n\t\tJButton btnRecuar = new JButton(\"Recuar\");\n\t\tbtnRecuar.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\tdistance = Integer.parseInt(txtDistance.getText());\n\t\t\t\tmove(true);\n\t\t\t}\n\t\t});\n\t\tbtnRecuar.setFont(new Font(\"Tahoma\", Font.PLAIN, 10));\n\n\t\tbtnRecuar.setBounds(272, 164, 76, 32);\n\t\tpanelRobot.add(btnRecuar);\n\n\t\tJButton btnEsquerda = new JButton(\"Esquerda\");\n\t\tbtnEsquerda.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\tradius = Integer.parseInt(txtRadius.getText());\n\t\t\t\tangle = Integer.parseInt(txtAngle.getText());\n\t\t\t\tturn(false);\n\t\t\t}\n\t\t});\n\t\tbtnEsquerda.setFont(new Font(\"Tahoma\", Font.PLAIN, 10));\n\t\tbtnEsquerda.setBounds(173, 104, 76, 32);\n\t\tpanelRobot.add(btnEsquerda);\n\n\t\tJButton btnDireita = new JButton(\"Direita\");\n\t\tbtnDireita.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\tradius = Integer.parseInt(txtRadius.getText());\n\t\t\t\tangle = Integer.parseInt(txtAngle.getText());\n\t\t\t\tturn(true);\n\t\t\t}\n\t\t});\n\t\tbtnDireita.setFont(new Font(\"Tahoma\", Font.PLAIN, 10));\n\t\tbtnDireita.setBounds(371, 104, 76, 32);\n\t\tpanelRobot.add(btnDireita);\n\n\t\tJLabel lblOffsetEsq = new JLabel(\"Offset Esquerdo\");\n\t\tlblOffsetEsq.setVerticalAlignment(SwingConstants.TOP);\n\t\tlblOffsetEsq.setForeground(Color.WHITE);\n\t\tlblOffsetEsq.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\n\t\tlblOffsetEsq.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlblOffsetEsq.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);\n\t\tlblOffsetEsq.setBounds(155, 20, 113, 19);\n\t\tpanelRobot.add(lblOffsetEsq);\n\n\t\ttxtOffsetLeft = new JTextField();\n\t\ttxtOffsetLeft.setHorizontalAlignment(SwingConstants.CENTER);\n\t\ttxtOffsetLeft.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\n\t\ttxtOffsetLeft.setBounds(173, 49, 76, 19);\n\t\tpanelRobot.add(txtOffsetLeft);\n\t\ttxtOffsetLeft.setColumns(10);\n\n\t\ttxtOffsetRight = new JTextField();\n\t\ttxtOffsetRight.setHorizontalAlignment(SwingConstants.CENTER);\n\t\ttxtOffsetRight.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\n\t\ttxtOffsetRight.setBounds(371, 49, 76, 19);\n\t\tpanelRobot.add(txtOffsetRight);\n\t\ttxtOffsetRight.setColumns(10);\n\n\t\tJLabel lblOffsetDrt = new JLabel(\"Offset Direito\");\n\t\tlblOffsetDrt.setForeground(Color.WHITE);\n\t\tlblOffsetDrt.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\n\t\tlblOffsetDrt.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlblOffsetDrt.setVerticalAlignment(SwingConstants.TOP);\n\t\tlblOffsetDrt.setBounds(359, 20, 95, 19);\n\t\tpanelRobot.add(lblOffsetDrt);\n\n\t\tJPanel panel = new JPanel();\n\t\tpanel.setForeground(Color.WHITE);\n\t\tpanel.setBackground(Color.BLACK);\n\t\tpanel.setBorder(new TitledBorder(UIManager.getBorder(\"TitledBorder.border\"), \"Comportamentos\",\n\t\t\t\tTitledBorder.LEADING, TitledBorder.TOP, null, new Color(255, 255, 255)));\n\t\tpanel.setBounds(464, 33, 145, 153);\n\t\tpanelRobot.add(panel);\n\t\tpanel.setLayout(null);\n\n\t\tchckbxEvitar = new JCheckBox(\"Evitar\");\n\t\tchckbxEvitar.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\tif (chckbxEvitar.isSelected() && robotOn) {\n\t\t\t\t\tevitar.Start();\n\t\t\t\t} else {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tevitar.Stop();\n\t\t\t\t\t} catch (InterruptedException e1) {\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tchckbxEvitar.setBounds(6, 68, 81, 21);\n\t\tpanel.add(chckbxEvitar);\n\t\tchckbxEvitar.setEnabled(true);\n\t\tchckbxEvitar.setForeground(Color.WHITE);\n\t\tchckbxEvitar.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\n\t\tchckbxEvitar.setBackground(Color.BLACK);\n\n\t\tchckbxVaguear = new JCheckBox(\"Vaguear\");\n\t\tchckbxVaguear.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\tif (chckbxVaguear.isSelected() && robotOn) {\n\t\t\t\t\tvaguear.Start();\n\t\t\t\t\tvaguear.setIsRunning(true);\n\t\t\t\t} else {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tvaguear.Stop();\n\t\t\t\t\t\tvaguear.setIsRunning(false);\n\t\t\t\t\t} catch (InterruptedException e1) {\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t});\n\t\tchckbxVaguear.setBounds(6, 33, 81, 21);\n\t\tpanel.add(chckbxVaguear);\n\t\tchckbxVaguear.setEnabled(true);\n\t\tchckbxVaguear.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\n\t\tchckbxVaguear.setForeground(Color.WHITE);\n\t\tchckbxVaguear.setBackground(Color.BLACK);\n\n\t\tchckbxFugir = new JCheckBox(\"Fugir\");\n\t\tchckbxFugir.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\tif (chckbxFugir.isSelected() && robotOn) {\n\t\t\t\t\tfugir.Start();\n\t\t\t\t} else {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfugir.Stop();\n\t\t\t\t\t} catch (InterruptedException e1) {\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tchckbxFugir.setBounds(6, 105, 81, 21);\n\t\tpanel.add(chckbxFugir);\n\t\tchckbxFugir.setForeground(Color.WHITE);\n\t\tchckbxFugir.setBackground(Color.BLACK);\n\t\tchckbxFugir.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\n\n\t\tJPanel panelLogging = new JPanel();\n\t\tpanelLogging\n\t\t\t\t.setBorder(new TitledBorder(null, \"LOGGING\", TitledBorder.LEFT, TitledBorder.TOP, null, Color.WHITE));\n\t\tpanelLogging.setBackground(Color.BLACK);\n\t\tpanelLogging.setBounds(10, 323, 630, 228);\n\t\tframe.getContentPane().add(panelLogging);\n\t\tpanelLogging.setLayout(null);\n\n\t\tchckbxCheckLogging = new JCheckBox(\"Ativar Logger\");\n\t\tchckbxCheckLogging.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\tif (chckbxCheckLogging.isSelected()) {\n\t\t\t\t\ttxtrLogging.setEnabled(true);\n\t\t\t\t} else {\n\t\t\t\t\ttxtrLogging.setEnabled(false);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tchckbxCheckLogging.setSelected(true);\n\t\tchckbxCheckLogging.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\n\t\tchckbxCheckLogging.setForeground(Color.WHITE);\n\t\tchckbxCheckLogging.setBackground(Color.BLACK);\n\t\tchckbxCheckLogging.setBounds(6, 17, 157, 27);\n\t\tpanelLogging.add(chckbxCheckLogging);\n\n\t\tJButton btnClearLogging = new JButton(\"Limpar Logger\");\n\t\tbtnClearLogging.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\tclearLog();\n\t\t\t}\n\t\t});\n\t\tbtnClearLogging.setFont(new Font(\"Tahoma\", Font.PLAIN, 10));\n\t\tbtnClearLogging.setBounds(510, 22, 110, 21);\n\t\tpanelLogging.add(btnClearLogging);\n\n\t\tJScrollPane spLogging = new JScrollPane();\n\t\tspLogging.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\n\t\tspLogging.setBackground(Color.BLACK);\n\t\tspLogging.setBounds(10, 50, 610, 168);\n\t\tpanelLogging.add(spLogging);\n\n\t\ttxtrLogging = new JTextArea();\n\t\ttxtrLogging.setEditable(false);\n\t\ttxtrLogging.setLineWrap(true);\n\t\tspLogging.setViewportView(txtrLogging);\n\t}",
"public jPanelBuscarImagen() {\n initComponents();\n\n this.jButtonExaminar01.putClientProperty(SubstanceLookAndFeel.BUTTON_SHAPER_PROPERTY, new StandardButtonShaper());\n this.jButtonExaminar02.putClientProperty(SubstanceLookAndFeel.BUTTON_SHAPER_PROPERTY, new StandardButtonShaper());\n this.jButtonLimpiar.putClientProperty(SubstanceLookAndFeel.BUTTON_SHAPER_PROPERTY, new StandardButtonShaper());\n this.jButtonBuscar.putClientProperty(SubstanceLookAndFeel.BUTTON_SHAPER_PROPERTY, new StandardButtonShaper());\n this.jButtonGuardar.putClientProperty(SubstanceLookAndFeel.BUTTON_SHAPER_PROPERTY, new StandardButtonShaper());\n this.jButtonEliminar.putClientProperty(SubstanceLookAndFeel.BUTTON_SHAPER_PROPERTY, new StandardButtonShaper());\n this.jButtonModificarMetadata.putClientProperty(SubstanceLookAndFeel.BUTTON_SHAPER_PROPERTY, new StandardButtonShaper());\n\n this.iconInformation.setToolTipText(\"<html><h3>Acerca de Resultados:</h3> Los resultados que se consideran similares son los <br>que no sobrepasan el valor de 150 en su distancia.</html>\");\n this.iconInformationFiltro.setToolTipText(\"<html><h3>Acerca de Filtro:</h3> Esta opción permite acotar los resultados de la búsqueda <br>\"\n + \"debido a que para que una imagen sea similar a la ingresada, <br>\" + \"necesariamente debe tener al menos cuatro regiones iguales. <br><br> Aplicar Filtro puede modificar la cantidad de resultados deseados.</html>\");\n this.iconInformationAlgorit.setToolTipText(\"<html><h3>Acerca de Algoritmos:</h3> Si desea obtener mayor información sobre los algoritmos aplicados en el sistema <br>puede revisar la información del sistema, que se encuentra \"\n + \"presente en la opción <br>\\\"¿Cómo Funciona?\\\" ubicada en la barra de opciones en la parte izquierda.</html>\");\n\n ToolTipManager.sharedInstance().setDismissDelay(90000);\n ToolTipManager.sharedInstance().setInitialDelay(5);\n\n ColorjTextArea = this.jTextRutaImagen.getForeground();\n\n this.jTextRutaImagen.setText(\"Seleccionar Imagen menor a 3MB\");\n this.jTextRutaImagen.setForeground(Color.GRAY);\n this.jTextDondeBuscar.setText(\"Seleccionar Directorio con Imágenes\");\n this.jTextDondeBuscar.setForeground(Color.GRAY);\n\n this.jComboBoxNumResult.removeAllItems();\n this.jComboBoxNumResult.addItem(\"0\");\n this.jComboBoxNumResult.setSelectedIndex(0);\n\n this.jCheckBoxFiltro.setEnabled(false);\n\n this.jButtonGuardar.setEnabled(false);\n this.jButtonEliminar.setEnabled(false);\n this.jButtonModificarMetadata.setEnabled(false);\n\n jlabelColor = this.jLabel4.getForeground();\n\n cambiarPanel = (CardLayout) panelContenedor.getLayout();\n cambiarPanel(\"cardLista\");\n\n jLabelLista.setForeground(Color.BLACK);\n jLabelLista.setFont(new Font(\"Calibri\", Font.BOLD, 18));\n jLabelError.setVisible(false);\n\n this.imagenCheck_1.setVisible(false);\n this.imagenCheck_2.setVisible(false);\n\n cargarComboBox();\n\n jTextFieldDistanciaText.setVisible(false);\n\n this.jButtonBuscar.setEnabled(false);\n }",
"public cifraDeCesar() {\n initComponents();\n this.setLocationRelativeTo(null);\n// this.setExtendedState(MAXIMIZED_BOTH);\n this.setTitle(\"Alex - Cifra de Cesar\");\n configAll();\n }",
"protected abstract void iniciarLayout();",
"public NovaContaFisica() {\n initComponents();\n }",
"public TelaContaUnica() {\n initComponents();\n }",
"public ListaColores() {\n initComponents();\n buscaColor();\n\n }",
"public ConsumoViaCep() {\n initComponents();\n }",
"public void iniciarComponentes() {\n btnSalir = new JButton(\"SALIR\");\n btnSaludo = new JButton(\"SALUDO\");\n \n btnSalir.setForeground(Color.RED);\n btnSaludo.setForeground(Color.BLUE);\n \n btnSalir.setPreferredSize(new Dimension(100, 60));\n btnSaludo.setPreferredSize(new Dimension(100, 60));\n \n //Creamos y aplicamos el layout para que salgan de laico\n FlowLayout fl = new FlowLayout(FlowLayout.CENTER);\n setLayout(fl);\n \n //Y metemos los botones y sus funciones\n add(btnSaludo);\n //Función en la clase Ventana\n \n add(btnSalir);\n btnSalir.addActionListener(e->salir());\n \n //Ahora vamos a separar los botones, de puede de dos maneras\n //De este modo crea una distancia fija entre los 2 cuando reescalemos\n add(Box.createRigidArea(new Dimension(15, 0)));\n //En este otro la distancia va variando\n add(Box.createGlue());\n \n }",
"public Captacion() {\n initComponents();\n this.setLocationRelativeTo(null);\n ((JPanel)getContentPane()).setOpaque(false);\n ImageIcon imagen = new ImageIcon(this.getClass().getResource(\"/Img/fondo.jpg\"));\n JLabel label = new JLabel();\n label.setIcon(imagen);\n getLayeredPane().add(label, JLayeredPane.FRAME_CONTENT_LAYER);\n label.setBounds(0, 0, imagen.getIconWidth(), imagen.getIconHeight());\n setResizable(false);\n setSize(1400, 800);\n setLocationRelativeTo(null);\n \n \n }",
"public CifrarDescifrarSimple(MainUI padre) {\n initComponents();\n setLangLabels();\n wpadre=padre;\n setHelp();\n this.setResizable(false);\n }",
"public GuiStart()\r\n \r\n {\r\n \r\n super(\"Transfer-Client \" + Conf.VERSION);\r\n \r\n // -----------------------------------------//\r\n // Icon, Frame-Zentrierung, Exit-Operation //\r\n // -----------------------------------------//\r\n \r\n this.setIconImage(Conf.IMAGE_FOR_ICON);\r\n \r\n // Frame-Zentrierung\r\n this.setSize(WIDTH, HEIGHT);\r\n Dimension frameSize = getSize();\r\n Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\r\n int x = (screenSize.width - frameSize.width) / 2;\r\n int y = (screenSize.height - frameSize.height) / 2;\r\n this.setLocation(x, y);\r\n \r\n // Exit-Operation definieren\r\n this.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);\r\n \r\n JPanel panel = new JPanel();\r\n panel.setBorder(new EmptyBorder(20, 20, 20, 20));\r\n panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));\r\n \r\n // --------------//\r\n // Inneres Panel //\r\n // --------------//\r\n JPanel innerpanel = new JPanel();\r\n FlowLayout flowlayout = new FlowLayout(FlowLayout.LEFT,5,5);\r\n innerpanel.setLayout(flowlayout);\r\n \r\n // ---------------------------------------------//\r\n // Inneres Panel: Linke Seite: Bild hinzufuegen //\r\n // ---------------------------------------------//\r\n JLabel bild = new JLabel(Conf.IMAGE_ICON_LOGO);\r\n innerpanel.add(bild);\r\n \r\n \r\n // ----------------------------------------------//\r\n // Inneres Panel: Rechte Seite: Text hinzufuegen //\r\n // ----------------------------------------------//\r\n //Panel fuer Text1 und Text2\r\n JPanel textpanel = new JPanel();\r\n GridLayout gridlayout = new GridLayout(4,1); //Es sind 4 Texte untereinander.\r\n textpanel.setLayout(gridlayout);\r\n \r\n //Titelzeile\r\n JLabel titel = new JLabel(\"Initialization\");\r\n Font font_titel = new Font(\"Sans Serif\", Font.BOLD, 16);\r\n titel.setFont(font_titel);\r\n textpanel.add(titel);\r\n \r\n //Erste Textzeile: Statusfeld 1\r\n Font font_status = new Font(\"Sans Serif\", Font.PLAIN, 12);\r\n this.statusfield1 = new JLabel(\"\"); \r\n this.statusfield1.setFont(font_status);\r\n textpanel.add(this.statusfield1);\r\n \r\n //Zweite Textzeile: Statusfeld 2\r\n this.statusfield2 = new JLabel(\"\");\r\n this.statusfield2.setFont(font_status);\r\n textpanel.add(this.statusfield2);\r\n \r\n //Dritte Textzeile: Statusfeld 3\r\n this.statusfield3 = new JLabel(\"\");\r\n this.statusfield3.setFont(font_status);\r\n textpanel.add(this.statusfield3);\r\n \r\n innerpanel.add(textpanel);\r\n \r\n // ----------------------------------------------//\r\n // Inneres Panel dem aeusseren Panel hinzufuegen //\r\n // ----------------------------------------------//\r\n panel.add(innerpanel);\r\n \r\n // Zwischenraum\r\n JLabel empty = new JLabel(\"\");\r\n panel.add(empty);\r\n \r\n // ------------//\r\n // GUI-Objekt //\r\n // ------------//\r\n this.setContentPane(panel);\r\n this.setResizable(false);\r\n this.setVisible(true);\r\n \r\n }",
"public Ventana() {\n initComponents();\n\n\n \n botonWeb1 = new botones.BotonWeb();\n botonWeb2 = new botones.BotonWeb();\n botonWeb3 = new botones.BotonWeb();\n splash = new javax.swing.JLabel();\n\n setIconifiable(true);\n setMaximizable(true);\n setResizable(true);\n setPreferredSize(new java.awt.Dimension(1358, 652));\n getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n botonWeb1.setBackground(new java.awt.Color(255, 51, 153));\n botonWeb1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/imagenes/soportetecnico.png\"))); // NOI18N\n botonWeb1.setLink(\"http://www.estadistico10.pe.hu\");\n getContentPane().add(botonWeb1, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 11, 442, 120));\n\n botonWeb2.setBackground(new java.awt.Color(255, 51, 153));\n botonWeb2.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/imagenes/quienessomos.png\"))); // NOI18N\n botonWeb2.setLink(\"http://www.estadistico10.pe.hu\");\n getContentPane().add(botonWeb2, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 137, 442, 130));\n\n botonWeb3.setBackground(new java.awt.Color(255, 51, 102));\n botonWeb3.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/imagenes/errorreportar.png\"))); // NOI18N\n botonWeb3.setLink(\"http://www.estadistico10.pe.hu\");\n getContentPane().add(botonWeb3, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 285, 442, 120));\n\n splash.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/ImagenesMenu/fondosplash.PNG\"))); // NOI18N\n getContentPane().add(splash, new org.netbeans.lib.awtextra.AbsoluteConstraints(540, 120, 710, 470));\n\n pack();\n }",
"public Fenetre() {\n super(\"Mahjong\");\n this.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);\n this.addWindowListener(this);\n\n gestionnaireJoueurs = new GestionnaireJoueur();\n gestionnaireJoueurs.chargerJoueurs();\n\n container = new JPanel();\n container.setLayout(new CardLayout());\n\n menu = new MenuPrincipal(this);\n container.add(menu, \"Menu\");\n\n interfaceDeJeu = new InterfaceDeJeu(this);\n container.add(interfaceDeJeu, \"Interface\");\n\n ecranSelectionJoueur = new SelectionJoueur(this);\n container.add(ecranSelectionJoueur, \"EcranSelectionJoueur\");\n\n classement = new ClassementJoueurs(this);\n container.add(classement, \"Classement\");\n\n this.setContentPane(container);\n this.setMinimumSize(new Dimension(AfficheurDePlateau.LARGEUR_TUILE * 15 + 150, AfficheurDePlateau.HAUTEUR_TUILE * 15));\n this.setVisible(true);\n }",
"public TELASOBRE1() {\n initComponents();\n \n this.setLocationRelativeTo(null);\n \n \n \n }",
"public VistaCompletaSolicitud() {\r\n initComponents();\r\n this.setLocationRelativeTo(this);\r\n }",
"public data_kelahiran() {\n initComponents();\n ((javax.swing.plaf.basic.BasicInternalFrameUI)this.getUI()).setNorthPane(null);\n autonumber();\n data_tabel();\n lebarKolom();\n \n \n \n }",
"public void pridajPane() {\n\t\tmojPane.setAlignment(Pos.CENTER);\n\n\t\tmojPane.getChildren().addAll(informacia, vyberPredmetov, tabulkaZiak);\n\t}",
"private void initializeTecnico() {\r\n\t\t\r\n\t\tcontroleAtividade = new ControleAtividade();\r\n\t\t\r\n\t\tframe = new JFrame();\r\n\t\tframe.setBounds(100, 100, 640, 480);\r\n\t\tframe.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\r\n\t\t\r\n\t\tframe.setTitle(\"Avaliar atividade pendente\");\r\n\t\t\r\n\t\tJPanel panel = new JPanel();\r\n\t\tGroupLayout groupLayout = new GroupLayout(frame.getContentPane());\r\n\t\tgroupLayout.setHorizontalGroup(\r\n\t\t\tgroupLayout.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t.addComponent(panel, Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 624, Short.MAX_VALUE)\r\n\t\t);\r\n\t\tgroupLayout.setVerticalGroup(\r\n\t\t\tgroupLayout.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t.addComponent(panel, Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 442, Short.MAX_VALUE)\r\n\t\t);\r\n\t\t\r\n\t\t//TODO Popular a lista dinamicamente;\r\n\t\t\r\n\t\tlist = new JList();\r\n\t\t\r\n\t\tList<Atividade> atividadesPendentes = controleAtividade.recuperarAtividades(Status.PENDENTE);\t\t\r\n\t\tatividadesPendentesArray = new Atividade[atividadesPendentes.size()];\r\n\t\t\r\n\t\t\r\n\t\tfor(int i = 0; i < atividadesPendentesArray.length; i++)\r\n\t\t\tatividadesPendentesArray[i] = (Atividade) atividadesPendentes.get(i);\r\n\r\n\t\t\r\n\t\tlist.setListData(atividadesPendentesArray);\r\n\t\t\r\n\t\tlist.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\r\n\t\t\t\t\r\n\t\t\t\t//TODO Seria interessante passar o controle como parametro, afim de usa-lo no listener dos botoes;\r\n\t\t\t\tif(atividadesPendentesArray.length > 0) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tAtividade atividade = (Atividade) list.getSelectedValue();\r\n\t\t\t\t\t\r\n\t\t\t\t\tjanelaDeDecisao = new ViewDecisaoAtividadesPendentes(atividade);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJLabel lblAtividadesPendendentes = new JLabel(\"Atividades pendentes:\");\r\n\t\t\r\n\t\tbtnFechar = new JButton(\"Fechar\");\r\n\t\t\r\n\t\tbtnFechar.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\r\n\t\t\t\t\r\n\t\t\t\t//TODO Seria interessante passar o controle como parametro, afim de usa-lo no listener dos botoes;\r\n\t\t\t\tframe.dispose();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tGroupLayout gl_panel = new GroupLayout(panel);\r\n\t\tgl_panel.setHorizontalGroup(\r\n\t\t\tgl_panel.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t.addGroup(gl_panel.createSequentialGroup()\r\n\t\t\t\t\t.addContainerGap()\r\n\t\t\t\t\t.addGroup(gl_panel.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t\t\t.addComponent(list, Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 604, Short.MAX_VALUE)\r\n\t\t\t\t\t\t.addComponent(lblAtividadesPendendentes)\r\n\t\t\t\t\t\t.addComponent(btnFechar, Alignment.TRAILING))\r\n\t\t\t\t\t.addContainerGap())\r\n\t\t);\r\n\t\tgl_panel.setVerticalGroup(\r\n\t\t\tgl_panel.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t.addGroup(gl_panel.createSequentialGroup()\r\n\t\t\t\t\t.addGap(23)\r\n\t\t\t\t\t.addComponent(lblAtividadesPendendentes)\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 26, Short.MAX_VALUE)\r\n\t\t\t\t\t.addComponent(list, GroupLayout.PREFERRED_SIZE, 338, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.UNRELATED)\r\n\t\t\t\t\t.addComponent(btnFechar)\r\n\t\t\t\t\t.addGap(7))\r\n\t\t);\r\n\t\tpanel.setLayout(gl_panel);\r\n\t\tframe.getContentPane().setLayout(groupLayout);\r\n\t}",
"private void geometry()\n\t\t{\n\t\t\t// JComponent : Instanciation\n\t\tthis.jPanelAction = new JPanelAction();\n\t\tthis.jPanelCommande = new JPanelCommande(jPanelAction);\n\n\t\t\t// Layout : Specification\n\t\t\t{\n\t\t\tBorderLayout borderLayout = new BorderLayout();\n\t\t\tsetLayout(borderLayout);\n\n\t\t\t// flowlayout.setHgap(20);\n\t\t\t// flowlayout.setVgap(20);\n\t\t\t}\n\n\t\t// JComponent : add\n\t\tthis.add(this.jPanelAction, BorderLayout.CENTER);\n\t\tthis.add(this.jPanelCommande, BorderLayout.SOUTH);\n\t\t}",
"public ChConj(String metodo)\n {\n vtn = this;\n initComponents();\n setLocationRelativeTo(null);\n Shape forma = new RoundRectangle2D.Double(0, 0, this.getBounds().width, this.getBounds().height, 30, 30);\n vtn.setShape(forma);\n RSEffectFade.setFadeWindowIn(this, 30, 0.1f);\n lblMod.setText(\"Modo seleccionado: \" + metodo);\n // 248 limite de frente\n // 6 limite atras\n if (metodo.equals(\"auto\"))\n {\n lblMod.setText(\"Modo seleccionado: automatico\");\n lblTitulo.setText(\"Aleatorizando conjunto de numeros\");\n txtConjunto.setEditable(false);\n }\n if (metodo.equals(\"manual\"))\n {\n btnHiloR.setVisible(false);\n btnHiloRKill.setVisible(false);\n }\n }",
"public CadastroLivro() {\n dv.passaCamposComEnter(this);\n initComponents();\n }",
"void objek() {\n getContentPane().setLayout(null);\n getContentPane().add(text1);\n getContentPane().add(bt1);\n getContentPane().add(bt2);\n getContentPane().add(bt3);\n getContentPane().add(bt4);\n getContentPane().add(bt5);\n getContentPane().add(bt6);\n getContentPane().add(bt7);\n getContentPane().add(bt8);\n getContentPane().add(bt9);\n getContentPane().add(bt10);\n getContentPane().add(bt11);\n getContentPane().add(bt12);\n getContentPane().add(bt13);\n getContentPane().add(bt14);\n getContentPane().add(bt15);\n getContentPane().add(bt16);\n \n text1.setBounds(50, 8, 190, 30);\n \n bt1.setBounds(50, 40, 40, 40);\n bt2.setBounds(100, 40, 40, 40);\n bt3.setBounds(150, 40, 40, 40);\n bt4.setBounds(200, 40, 40, 40);\n \n bt5.setBounds(50, 90, 40, 40);\n bt6.setBounds(100, 90, 40, 40);\n bt7.setBounds(150, 90, 40, 40);\n bt8.setBounds(200, 90, 40, 40);\n \n bt9.setBounds(50, 140, 40, 40);\n bt10.setBounds(100, 140, 40, 40);\n bt11.setBounds(150, 140, 40, 40);\n bt12.setBounds(200, 140, 40, 40);\n \n bt13.setBounds(50, 190, 40, 40);\n bt14.setBounds(100, 190, 40, 40);\n bt15.setBounds(150, 190, 40, 40);\n bt16.setBounds(200, 190, 40, 40);\n \n bt1.setBackground(Color.BLUE);\n bt2.setBackground(Color.CYAN);\n bt3.setBackground(Color.DARK_GRAY);\n bt4.setBackground(Color.GREEN);\n bt5.setBackground(Color.LIGHT_GRAY);\n bt6.setBackground(Color.MAGENTA);\n bt7.setBackground(Color.ORANGE);\n bt8.setBackground(Color.PINK);\n bt9.setBackground(Color.RED);\n bt10.setBackground(Color.WHITE);\n bt11.setBackground(Color.YELLOW);\n bt12.setBackground(Color.BLUE);\n bt13.setBackground(Color.DARK_GRAY);\n bt14.setBackground(Color.CYAN);\n bt15.setBackground(Color.MAGENTA);\n bt16.setBackground(Color.RED);\n \n setVisible(true);\n }"
]
| [
"0.68594456",
"0.68486834",
"0.68362176",
"0.6593465",
"0.6528472",
"0.65043783",
"0.646813",
"0.64642686",
"0.6427956",
"0.64121735",
"0.6394784",
"0.63916737",
"0.6391493",
"0.6389823",
"0.6389139",
"0.6379709",
"0.63495976",
"0.63475275",
"0.6338039",
"0.6327317",
"0.6320089",
"0.63127625",
"0.6309983",
"0.62916625",
"0.6286467",
"0.6276412",
"0.62761825",
"0.62683463",
"0.62658536",
"0.62556887",
"0.6252065",
"0.62439",
"0.62430996",
"0.62268233",
"0.62131155",
"0.62099546",
"0.6206885",
"0.62068164",
"0.62054694",
"0.62028253",
"0.6196363",
"0.61954135",
"0.6191452",
"0.61862475",
"0.6182513",
"0.61794144",
"0.61769843",
"0.617463",
"0.61725324",
"0.6170786",
"0.61566395",
"0.6155907",
"0.61544895",
"0.6153409",
"0.61488193",
"0.6145229",
"0.6144684",
"0.6137336",
"0.61338264",
"0.61289114",
"0.6128753",
"0.61256653",
"0.61220616",
"0.6120925",
"0.61198777",
"0.61198753",
"0.6117378",
"0.6114967",
"0.6114802",
"0.611221",
"0.61091065",
"0.61050797",
"0.6104033",
"0.61007726",
"0.60976005",
"0.60888815",
"0.6087093",
"0.608515",
"0.6084495",
"0.6082309",
"0.6076457",
"0.607444",
"0.60733443",
"0.6072697",
"0.6070199",
"0.6067183",
"0.6062589",
"0.606136",
"0.60595524",
"0.6053092",
"0.60488003",
"0.6047907",
"0.6045724",
"0.6044988",
"0.6043106",
"0.60415965",
"0.60411954",
"0.6038516",
"0.60370827",
"0.6036571",
"0.6035967"
]
| 0.0 | -1 |
Metodo che consente di leggere i campi di un messaggio | static private void readMessage(){
index = 0;
code = 0;
firstParam = "";
secondParam = "";
thirdParam = "";
StringTokenizer st = new StringTokenizer(message, "_");
String c = st.nextToken();
index = Integer.parseInt(c);
c = st.nextToken();
code = Integer.parseInt(c);
System.out.println("ClientMessageReader: il codice del messaggio ricevuto è "+code);
// ||(code == Parameters.START_PLAYBACK)
if((code == Parameters.START_OFF)|| (code == Parameters.FILES_RESPONSE))
{
firstParam = st.nextToken();
}
if(code == Parameters.CONFIRM_REQUEST)
{
firstParam = st.nextToken();
System.out.println("CONFIRM_REQUEST firstParam: "+firstParam);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void limpiarCampos(){\n\n\t\tcampoInicio.setText(\"yyyy-mm-dd\");\n\t\tcampoInicio.setForeground(new Color(111,111,111));\n\t\tcampoFinal.setText(\"yyyy-mm-dd\");\n\t\tcampoFinal.setForeground(new Color(111,111,111));\n\n\t}",
"public void sendMessage() {\n String userMessage = textMessage.getText();\n if (!userMessage.isBlank()) {//проверяю а есть ли что то в текстовом поле\n textMessage.clear();//очищаю текстовое поле на форме\n\n //пока оставлю\n //sb.append(userMessage).append(\"\\n\");\n\n //в общее поле добавляю сообщение\n areaMessage.appendText(userMessage+\"\\n\");\n }\n\n }",
"public void limparCampos() {\n\t\tcodigoField.setText(\"\");\n\t\tdescricaoField.setText(\"\");\n\t\tcodigoField.setEditable(true);\n\t\tBorder border = BorderFactory.createLineBorder(Color.RED);\n\t\tcodigoField.setBorder(border);\n\t\tcodigoField.requestFocus();\n\t\tBorder border1 = BorderFactory.createLineBorder(Color.BLACK);\n\t\tdescricaoField.setBorder(border1);\n\t\t\n\t\t\n\t}",
"public void visualizzaCampo(){\r\n\t\tInputOutput.stampaCampo(nome, descrizione, obbligatorio);\r\n\t}",
"private String formulerMonNom() {\n\t return \"Je m'appelle \" + this.nom; // appel de la propriété nom\n\t }",
"String getFormFieldDescription();",
"@Override\n public String getMessage() {\n String chuoi=\"\";\n if (maCD.length()!=5)\n chuoi=\"MaCD bao gom 5 ki tu\";\n else if (soBaiHat<10)\n chuoi=\"So bai hat phai lon hon 10 bai\";\n return\n chuoi;\n }",
"public String visualizzaCampo(){\n\t\tString info= new String(\"Nome: \"+ nome +\"\\n\" +\"Descrizione: \" + descrizione+ \"\\n\"+ \"Obbligatoria: \" + obbligatorio +\"\\n\");\n\t\treturn info;\n\t}",
"public void limpaTextFields() {\n tfMatricula.setText(\"\");\n tfNome.setText(\"\");\n tfDataNascimento.setText(\"\");\n tfTelefone.setText(\"\");\n tfSalario.setText(\"\");\n }",
"void mostrarAtributos() {\n\t\tString mensaje = \"nombre=\" + nombre + \", apellido=\" + apellido + \", tipoDocumento=\" + tipoDocumento\n\t\t\t\t+ \", numeroDocumento=\" + numeroDocumento + \", edad=\" + edad + \" y es \"\n\t\t\t\t+ (edad >= 18 ? \"mayor de edad\" : \"menor de edad\");\n\t\tSystem.out.println(mensaje);\n\t}",
"private void limpaCampos() {\n txtNome.setText(\"\");\n txtRG.setText(\"\");\n txtFCpf.setText(\"\");\n txtFNascimento.setText(\"\");\n txtEmail.setText(\"\");\n txtFCelular.setText(\"\");\n txtFTelefone.setText(\"\");\n txtRua.setText(\"\");\n txtComplemento.setText(\"\");\n txtFCep.setText(\"\");\n txtBairro.setText(\"\");\n txtCidade.setText(\"\");\n }",
"private void setupMessage() {\n \tmessage = new GLabel(\"\");\n \tmessage.setFont(\"SansSerif-12\");\n }",
"public String comunica() {\r\n// ritorna una stringa\r\n// posso usare il metodo astratto \r\n return msg + AggiungiQualcosa();\r\n }",
"private void limpaCampos() {\r\n\t\tnome.setText(\"\");\r\n\t\tsituacao.setSelectedIndex(0);\r\n\t\tidade.setText(\"\");\r\n\t\terroNome.setText(\"\");\r\n\t\terroIdade.setText(\"\");\r\n\t}",
"private void limpiarCampos() {\n\t\tthis.campoClave.setText(\"\");\n\t\tthis.campoClaveNueva.setText(\"\");\n\t\tthis.campoClaveRepita.setText(\"\");\n\t}",
"public void m() {\n String str;\n d a2 = d.a((Context) this);\n int c2 = a2.c();\n String d2 = a2.d();\n if (c2 > 0 && !TextUtils.isEmpty(d2)) {\n a2.a();\n this.f6131d.setVisibility(0);\n if (c2 > 1) {\n str = getString(R.string.recently_reject_message, new Object[]{d2, Integer.valueOf(c2)});\n } else {\n str = getString(R.string.recently_reject_message_one, new Object[]{d2});\n }\n this.e.setText(str);\n }\n }",
"public void mensagemErroCadastro() {\n\t\tJOptionPane.showMessageDialog(null, \"Erro!\\nVerifique se todos os campos estão preenchidos.\"\n\t\t\t\t+ \"\\nVerifique se os dados em formato numérico são números.\"\n\t\t\t\t+ \"\\nVerifique se as datas foram inseridas corretamente.\" + \"\\nNão use vírgulas ','. Use pontos!\", null,\n\t\t\t\tJOptionPane.ERROR_MESSAGE);\n\t}",
"@Override\r\n public String AggiungiQualcosa() {\r\n// ritorna una stringa\r\n// perché qui ho informazioni in più\r\n return \"\\ne capace di cuocere il pollo\";\r\n }",
"private void limpiarCampos() {\n campoNombre.setText(\"\");\n campoNumLibro.setText(\"\");\n campoNumPagina.setText(\"\");\n }",
"void prosegui(String messaggio);",
"private static void setData() {\n attributeDisplaySeq = new ArrayList<String>();\n attributeDisplaySeq.add(\"email\");\n\n signUpFieldsC2O = new HashMap<String, String>();\n signUpFieldsC2O.put(\"Email\",\"email\");\n\n\n signUpFieldsO2C = new HashMap<String, String>();\n signUpFieldsO2C.put(\"email\", \"Email\");\n\n\n }",
"String validateCampo (String name, String email, String password){\n String campos;\n campos = name !=null && name.trim().length()>0? \"\" : \"\\n\" + campoName.getHint() + \"\\n\";\n campos += email !=null && email.trim().length()>0? \"\" :campoEmail.getHint() + \"\\n\";\n campos += password !=null && password.trim().length()>0?\"\" : campoPassword.getHint() + \"\\n\";\n campos += bitmaphoto !=null?\"\":\"Imagen\";\n return campos;\n }",
"public void LimpiarCampos() {\n\n txtIdAsignarPer.setText(\"\");\n txtNombreusu.setText(\"\");\n pswConfCont.setText(\"\");\n combPerf.setSelectedItem(\"\");\n pswContra.setText(\"\");\n txtDocumento.setText(\"\");\n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n txtNameC.setText(\"\");\n txtNumC.setText(\"\");\n txtTelC.setText(\"\");\n txtEmailC.setText(\"\");\n txtRueC.setText(\"\");\n txtVilleC.setText(\"\");\n txtCPC.setText(\"\");\n txtPwdC.setText(\"\");\n txtRePwdC.setText(\"\");\n txtCB.setText(\"\");\n //Définir l'étiquette d'information sur vide\n lbIMsgC.setText(\"\");\n\n }",
"public static void validation() {\n\t\tif ((!textFieldName.getText().isEmpty()) && (!textField_FirstName.getText().isEmpty())\n\t\t\t\t&& (!textField_Town.getText().isEmpty()) && (!textField_Town.getText().isEmpty())) {\n\n\t\t\tif ((isValidEmailAddress(textField_Email.getText()) == true)) {\n\t\t\t\ttextField_Email.setBackground(Color.white);\n\t\t\t\tif ((force(textField_Mtp.getText()) > 82)) {\n\t\t\t\t\ttextField_Mtp.setBackground(Color.white);\n\t\t\t\t\tactionGiveServeur();\n\n\t\t\t\t} else {\n\t\t\t\t\tshowMessageDialog(null, \"Votre mot de passe est trop faible\");\n\t\t\t\t\ttextField_Mtp.setText(\"Mot de passe trop simple : changer le \");\n\t\t\t\t\ttextField_Mtp.setBackground(Color.RED);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\ttextField_Email.setText(\"Email invalide\");\n\t\t\t\ttextField_Email.setBackground(Color.RED);\n\t\t\t\tshowMessageDialog(null, \"Email est invalide\");\n\t\t\t}\n\t\t} else {\n\n\t\t\tshowMessageDialog(null, \"Certain champs sont vide !\");\n\t\t}\n\t}",
"@Override\r\n public String AggiungiQualcosa() {\r\n// ritorna una stringa\r\n// perché qui ho informazioni in più\r\n return \"\\ne capace di friggere un uovo\";\r\n }",
"public void limparCampos() {\n\n // Limpa todos formularios.\n textoNome.setText(\"\");\n textoCPF.setText(\"\");\n comboGenero.setSelectedIndex(0);\n textoDataDeNascimento.setText(\"\");\n textoEnderecoLogradouro.setText(\"\");\n textoBairro.setText(\"\");\n textoComplemento.setText(\"\");\n textoNumero.setText(\"\");\n textoEmail.setText(\"\");\n textoTelefone.setText(\"\");\n textoCelular.setText(\"\");\n textoCEP.setText(\"\");\n textoDD_Celular.setText(\"\");\n textoDD_Telefone.setText(\"\");\n Icon imagemPerfil = new ImageIcon(\"src\\\\br\\\\com\\\\Grupo07\\\\Imagens\\\\perfil.jpg\");\n imagemCliente.setIcon(imagemPerfil);\n\n }",
"public String dameDescripcion(){\n return \"Este empleado tiene un id = \"+getId()+\" con un sueldo de \"+getSueldo();\n }",
"public String toString (){\r\n \r\n String mensaje=\"El rey color \"+color_rey+\" esta en la fila \"+posicion_rey.fila+\" y columna \"+posicion_rey.columna+\".\";\r\n \r\n return mensaje;\r\n \r\n }",
"@Override\n public void showEmptyFieldsValidationError() {\n showError(R.string.product_config_empty_fields_validation_error);\n }",
"String sayHI(String msg){\n return msg + \"juga nama saya\" + this.nama;\n }",
"public void limpiarCamposFormBusqueda() {\n\t}",
"@Override//sobrescribir metodo\n public String getDescripcion(){\n return hamburguesa.getDescripcion()+\" + lechuga\";//retorna descripcion del oobj hamburguesa y le agrega +lechuga\n }",
"ChildMessage(){\n\t\t\ttext = CLICK_TO_EDIT;\t\t\t\t\t\t\t\t// Set to Header default\n\t\t\tnamesText = CLICK_TO_ADD_NAMES;\t\t\t\t\t\t// Set to Header default\n\t\t\tnumbers = new HashMap<String,Integer>();\t\t\t// init numbers to none\n\t\t}",
"@Override\n public String getMessage(){\n \n }",
"public void escribirDato(String dato) \r\n\t{\r\n\t\tJOptionPane.showMessageDialog(null, dato, \"Título del Message Dialog\", JOptionPane.INFORMATION_MESSAGE);\r\n\t}",
"public String getMessage() {\n return super.getMessage()+\"\\n error code=\"+error_code+\" error value=\"+error_value; //$NON-NLS-1$ //$NON-NLS-2$\n }",
"public void letras() {\n caracteres = 32 - txtMensaje.getText().length(); //Indica la catidad de carcteres\n //disponibles. En el LCD solo se permite imprimir 32 caracteres.\n\n if (caracteres <= 0) { //Si la cantidad de caracteres se ha agotado... \n lbCaracteres.setText(\"Caracteres disponibles: 0\"); //Se imprime que la cantidad de \n //caracteres disponibles es 0\n String cadena = \"\"; //Se declara la variable que guardará el mensaje a enviar\n cadena = txtMensaje.getText(); //Se asigna el texto del TextField a la variable cadena\n cadena = cadena.substring(0, 32); //Se evita que por alguna razón la variable contenga\n //más de 32 caracteres, utilizando el substring que crea un string a partir de uno mayor.\n txtMensaje.setText(cadena); //se regresa la cadena con 32 caracteres al TextField\n } else {\n //Si la cantidad de caracteres disponibles es ayor a 0 solamente se imprimirá la cantidad\n //de caracteres disponibles\n lbCaracteres.setText(\"Caracteres disponibles: \" + (caracteres));\n }\n }",
"void setMessage(char msg[], char attribs[]) {\n copyString(msg, statusLine, 1, MESSAGE_LENGTH);\n notifyDisplay();\n }",
"@Override\r\n\tpublic String getMessage() {\n\t\treturn \"홀수입력 !!\";\r\n\t}",
"protected String formatField() {\n \tif(!updated) return \"No record set.\";\n \t\n \tif(firstFieldP.getText() != null && lastFieldP.getText() != null) {\n\t \tfirstNameString = firstFieldP.getText();\n\t \tlastNameString = lastFieldP.getText();\n \t} else\t{\n \tfirstNameString = firstFieldC.getText();\n \tlastNameString = lastFieldC.getText();\n \ttribeString = tribeField.getText();\t\n \t}\n\n \tStringBuffer sb = new StringBuffer();\n \tsb.append(\"<html><p align=center>\");\n \tsb.append(firstNameString);\n \tsb.append(\" \");\n \tsb.append(lastNameString);\n \tsb.append(\"<br>\");\n \tsb.append(tribeString);\n \tsb.append(\"</p></html>\");\n \t\n \treturn sb.toString(); \t\n }",
"interface ViewMessages {\n\n String ENTER= \"Enter\";\n String FIRST_NAME = \"first name\";\n String LAST_NAME = \"last name\";\n String LOGIN = \"login\";\n String EMAIL = \"email\";\n String PHONE= \"phone\";\n String CITY= \"city\";\n String APPARTMENT_NUMBER= \"appartment number\";\n String HOUSE_NUMBER= \"house number\";\n String STREET= \"street\";\n String WRONG_INPUT = \"Wrong input.\";\n String RESULT = \"Your note\";\n String WRONG_LOGIN = \"Login is already used.\";\n\n\n}",
"String getMessage()\n\t{\n\t\tString message = \"\";\n\t\tfor(int i =0;i<4;i++)\n\t\t{\n\t\t\tmessage = message + String.valueOf(listePeg[i].getColor());\n\t\t}\n\t\treturn message;\n\t}",
"public void writeMassege() {\n m = ChatClient.message;\n jtaChatHistory.setText(\"You : \" + m);\n //writeMassageServer();\n }",
"@Override\n\tpublic void message() {\n\t\tSystem.out.println(\"스마트폰으로 문자하기\");\n\t}",
"private void tutorial(){\n\t\tString msg = \"[Space] = Inicia e pausa o jogo depois de iniciado.\";\n\t\tmsg += \"\\n[Seta esquerda] = Move o paddle para a esquerda.\";\n\t\tmsg += \"\\n[Seta direita] = Move o paddle para a direita.\";\n\t\tmsg += \"\\n[I] = Abre a janela de informaçoes.\";\n\t\tmsg += \"\\n[R] = Reinicia o jogo.\";\n\t\tJOptionPane.showMessageDialog(null, \"\"+msg, \"Informaçoes\", JOptionPane.INFORMATION_MESSAGE);\n\t}",
"public void updatePropertyFields()\n {\n amountLabel .setText(retrieveText(\"AmountLabel\", amountLabel));\n reasonCodeLabel .setText(retrieveText(\"ReasonCodeLabel\", reasonCodeLabel));\n paidToLabel .setText(retrieveText(\"PaidToLabel\", paidToLabel));\n employeeIDLabel .setText(retrieveText(\"EmployeeIDLabel\", employeeIDLabel));\n addressLine1Label.setText(retrieveText(\"AddressLine1Label\", addressLine1Label));\n addressLine2Label.setText(retrieveText(\"AddressLine2Label\", addressLine2Label));\n addressLine3Label.setText(retrieveText(\"AddressLine3Label\", addressLine3Label));\n approvalCodeLabel.setText(retrieveText(\"ApprovalCodeLabel\", approvalCodeLabel));\n commentLabel .setText(retrieveText(\"CommentLabel\", commentLabel));\n\n amountField .setLabel(amountLabel);\n reasonCodeField .setLabel(reasonCodeLabel);\n paidToField .setLabel(paidToLabel);\n employeeIDField .setLabel(employeeIDLabel);\n addressLine1Field.setLabel(addressLine1Label);\n addressLine2Field.setLabel(addressLine2Label);\n addressLine3Field.setLabel(addressLine3Label);\n approvalCodeField.setLabel(approvalCodeLabel);\n commentField .setLabel(commentLabel);\n }",
"private void displayEmailFields() {\n FieldRelatedLabel emailLabel = new FieldRelatedLabel(\"Email\", 750, 270);\n\n invalidEmailLabel = new InvalidFormEntryLabel(\"Email must follow the format:\\[email protected]\", 910, 290, false);\n\n emailTF = new TextField();\n emailTF.relocate(750, 300);\n emailTF.textProperty().addListener(e->{FormValidatorPokeMongo.handleEmail(emailTF, invalidEmailLabel); });\n\n sceneNodes.getChildren().addAll(emailLabel, invalidEmailLabel, emailTF);\n }",
"private void popularTextFields(Promocao promocaoAntigo2) {\n\t\ttextFieldNome.setText(promocaoAntigo2.getNome());\n\t\ttextFieldDescricao.setText(promocaoAntigo2.getDescricao());\n\n\t}",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel7 = new javax.swing.JLabel();\n batiment = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n nom = new javax.swing.JTextField();\n jButton1 = new javax.swing.JButton();\n numero = new javax.swing.JTextField();\n jLabel3 = new javax.swing.JLabel();\n etage = new javax.swing.JTextField();\n jLabel1 = new javax.swing.JLabel();\n bat = new javax.swing.JTextField();\n jLabel4 = new javax.swing.JLabel();\n id = new javax.swing.JTextField();\n lMessage = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n\n jLabel7.setFont(new java.awt.Font(\"Calibri\", 0, 36)); // NOI18N\n jLabel7.setText(\"MOFICATION SALLE\");\n\n batiment.setText(\"Batiment\");\n\n jLabel2.setText(\"Nom Salle\");\n\n nom.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n nomActionPerformed(evt);\n }\n });\n\n jButton1.setText(\"Modifier\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n numero.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n numeroActionPerformed(evt);\n }\n });\n\n jLabel3.setText(\"Numéro\");\n\n jLabel1.setText(\"Etage\");\n\n bat.setEditable(false);\n bat.setBackground(new java.awt.Color(204, 204, 204));\n\n jLabel4.setText(\"ID\");\n\n id.setEditable(false);\n id.setBackground(new java.awt.Color(204, 204, 204));\n\n lMessage.setFont(new java.awt.Font(\"Calibri\", 0, 13)); // NOI18N\n lMessage.setForeground(new java.awt.Color(255, 0, 0));\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 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(99, 99, 99)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel4)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel3)\n .addComponent(jLabel2)\n .addComponent(jLabel1)\n .addComponent(batiment)))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createSequentialGroup()\n .addGap(18, 18, 18)\n .addComponent(id))\n .addGroup(layout.createSequentialGroup()\n .addGap(19, 19, 19)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton1)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(nom)\n .addComponent(numero)\n .addComponent(etage, javax.swing.GroupLayout.DEFAULT_SIZE, 87, Short.MAX_VALUE)\n .addComponent(bat))))))\n .addComponent(lMessage, javax.swing.GroupLayout.PREFERRED_SIZE, 276, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(layout.createSequentialGroup()\n .addGap(54, 54, 54)\n .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 355, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(56, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(11, 11, 11)\n .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(id, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(batiment)\n .addComponent(bat, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(nom, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(numero, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1)\n .addComponent(etage, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(lMessage, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton1)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n pack();\n setLocationRelativeTo(null);\n }",
"public void setDescripcion(String p) { this.descripcion = p; }",
"private void carregaInformacoes() {\n Pessoa pessoa = (Pessoa) getIntent().getExtras().getSerializable(\"pessoa\");\n edtNome.setText(pessoa.getNome());\n edtEmail.setText(pessoa.getEmail());\n edtTelefone.setText(pessoa.getTelefone());\n edtIdade.setText(pessoa.getIdade());\n edtCPF.setText(pessoa.getCpf());\n }",
"@Override\n public String descripcion() {\n return \"Viaje incentivo que te envia la empresa \" + empresa;\n }",
"private void ImproperFillOutException() {\n JOptionPane.showMessageDialog(null, \"Fill out the form properly\");\n }",
"@Override\n public void buildPersonalidad() {\n this.personaje.setPersonalidad(\"Pacientes y estrategas.\");\n }",
"@Override\n\t\tpublic void setInvalidMess(String errmess) {\n\n\t\t}",
"public void limpiar() {\r\n\t\t\t\tid.setText(\"\");\r\n\t\t\t\ttitulo.setText(\"\");\r\n\t\t\t\tdirector.setText(\"\");\r\n\t\t\t\tidCliente.setText(\"\");\r\n\t\t\t}",
"public void afficherMessage () {\r\n System.out.println(\"(\"+valeur+\", \"+type+\")\"); \r\n }",
"public Validador() {\n this.msgGeral = \"\";\n }",
"public impresionCorreo() {\n initComponents();\n txtCorreo.setText(correoCliente);\n }",
"public Validador(String msgGeral) {\n this.msgGeral = msgGeral + \": \";\n }",
"public void setMensaje(String mensaje)\r\n/* 638: */ {\r\n/* 639:714 */ this.mensaje = mensaje;\r\n/* 640: */ }",
"void stampaMessaggio(String messaggio);",
"public String messageRenvoyeeUI (int num){\r\n\t\t\r\n\t\tswitch(num){\r\n\t\t\tcase 5 : return \"-\\n\";\r\n\t\t\t\t\r\n\t\t\tcase 4 : return \"-\\n\";\r\n\t\t\t\r\n\t\t\tcase 3 : return \"-Echec de l'enregistrement des RDV\\n\";\r\n\t\t\t\r\n\t\t\tcase 2 : return \"-Enregistrement des RDV terminé\\n\";\r\n\t\t\t\r\n\t\t\tcase -1 : return \"-Un moniteur doit être selectionné pour le RDV surligné.\\n\";\r\n\t\t\t\r\n\t\t\tcase -2 : return \"-La durée du RDV surligné présente un format invalide pour son enregistrement.\\n\";\r\n\t\t\t\r\n\t\t\tcase -3 : return \"-L'horaire du RDV surligné présente un format invalide pour son enregistrement.\\n\";\r\n\t\t\t\r\n\t\t\tcase -4 : return \"-La date de RDV surligné ne peut pas être antérieur à la date actuelle\\n\";\r\n\t\t\t\r\n\t\t\tcase -5 : return \"-La date de RDV surligné présente un format invalide pour son enregistrement.\";\r\n\t\t\t\r\n\t\t\tcase -6 : return \"-L'horaire du RDV surligné est invalide : les heures sont compris entre \"+AUTO_ECOLE_OUVERTURE+\"h et \"+AUTO_ECOLE_FERMETURE+\"h\\n\";\r\n\t\t\t\r\n\t\t\tcase -7 : return \"-L'horaire du RDV surligné est invalide : les minutes sont compris entre 0 et 59.\\n\";\r\n\t\t\t\r\n\t\t\tcase -8 : return \"-Le RDV surligné est chevauché par un autre RDV.\\n\";\r\n\t\t\t\r\n\t\t\tcase -9 : return \"-\"+msgIntegriteMoniteur+\"\\n\";\r\n\t\t}\r\n\t\t\r\n\t\treturn \"\";\r\n\t\t\r\n\t}",
"public String showInfoMedi(){\n\t\tString msg = \"\";\n\n\t\tmsg += \"NOMBRE DE LA MEDICINA: \"+name+\"\\n\";\n\t\tmsg += \"LA DOSIS: \"+dose+\"\\n\";\n\t\tmsg += \"COSTO POR DOSIS: \"+doseCost+\"\\n\";\n\t\tmsg += \"FRECUENCIA QUE ESTA DEBE SER APLICADA: \"+frecuency+\"\\n\";\n\n\t\treturn msg;\n\t}",
"public boolean validarCampos(Admin admin) {\r\n\t\tStringBuilder inconsistencias = new StringBuilder();\r\n\t\tif (admin.getNome().equals(\"\") || admin.getNome() == null) {\r\n\t\t\tinconsistencias.append(\"\\n Campo Nome obrigatório\");\r\n\t\t}\r\n\t\tif (admin.getSobrenome().equals(\"\") || admin.getSobrenome() == null) {\r\n\t\t\tinconsistencias.append(\"\\n Campo Sobrenome obrigatório\");\r\n\t\t}\r\n\t\tif (admin.getUsuario().equals(\"\") || admin.getUsuario() == null) {\r\n\t\t\tinconsistencias.append(\"\\n Campo Usuario obrigatório\");\r\n\t\t}\r\n\t\tif (admin.getEmail().equals(\"\") || admin.getEmail() == null) {\r\n\t\t\tinconsistencias.append(\"\\n Campo Email obrigatório\");\r\n\t\t}\r\n\t\tif (admin.getCpf().equals(\"\") || admin.getCpf() == null) {\r\n\t\t\tinconsistencias.append(\"\\n Campo CPF obrigatório\");\r\n\t\t}\r\n\t\tif (admin.getSenha().equals(\"\") || admin.getSenha() == null) {\r\n\t\t\tinconsistencias.append(\"\\n Campo Senha obrigatório\");\r\n\t\t}\r\n\t\tif (admin.getConfirmarSenha().equals(\"\") || admin.getConfirmarSenha() == null) {\r\n\t\t\tinconsistencias.append(\"\\n Campo Confirmar Senha obrigatório\");\r\n\t\t}\r\n\t\tif (admin.getDataNascimento() == null) {\r\n\t\t\tinconsistencias.append(\"\\n Campo Data obrigatório\");\r\n\t\t}\r\n\t\tif (inconsistencias.length() == 0) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\tSystem.out.println(inconsistencias.toString());\r\n//\t\t\tlbMsg.setVisible(true);\r\n\t\t\tlbMsg.setText(inconsistencias.toString());\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t}",
"public String GeneralForm() {\n return \"==================================================================================================================\" + \"\\n\" +\n \"city humidity description wind coordination\" + \"\\n\" +\n \"==================================================================================================================\";\n\n }",
"public void limpiarCampos()\n {\n jtfNumero.setText(\"\");\n jtfNombre.setText(\"\");\n jtfSaldo.setText(\"\");\n this.jbEliminar.setEnabled(false);\n }",
"private void initFields(){\n labels.put(\"patientID\", new JLabel(\"Patient ID:\"));\n labels.put(\"newOwed\", new JLabel(\"New Owed:\"));\n \n fields.put(\"patientID\", new JTextField());\n fields.put(\"newOwed\", new JTextField());\n }",
"@Override\r\n public String receita() {\n return \"Misturar os ingredientes; bater no liquidificador; colocar na máquina de waffle por 10m\";\r\n }",
"public void setDescripcion(String s) { this.descripcion = s; }",
"public Modify_MAIL() {\n initComponents();\n }",
"private void mostrarInformacionP(){\n System.out.println(\"Nombre: \"+this.nombre);\n System.out.println(\"Sexo: \"+ this.sexo);\n System.out.println(\"Edad: \" + edad);\n\n }",
"public void addTextFieldsAndLabels(){\n this.add(this.firstLabel);\n this.add(firstNameField);\n this.add(this.secondLabel);\n this.add(lastNameField);\n }",
"public void RealizarDiagnostico() {\n\t\tSystem.out.println(\"realizar dicho diagnostico con los sintomas presentados por el paciente\");\r\n\t}",
"public void motif_zone(){\n\n JLabel lbl_Motif = new JLabel(\"Motif du Rapport :\");\n lbl_Motif.setBounds(40, 130, 119, 16);\n add(lbl_Motif);\n\n motif_content = new JTextField();\n motif_content.setBounds(200, 130, 200, 22);\n motif_content.setText(rapport_visite.elementAt(DAO_Rapport.indice)[4]);\n motif_content.setEditable(false);\n add(motif_content);\n\n\n\n }",
"public abstract String getTipForTextField();",
"@Override\r\n\tpublic String falar() {\r\n\t\treturn \"[ \"+getNome()+\" ] Sou Um Professor\";\r\n\t}",
"public void limparCamposOutPut(){\n lblDisciplina.setText(\"\");\n lblAssunto.setText(\"\");\n lblDescricao.setText(\"\");\n imagemRecebidaEnunciado.setImage(imageDefault);\n imagemRecebidaResposta.setImage(imageDefault);\n }",
"private String getMessage(){\n\t\t\treturn textArea.getText();\n\t}",
"private String geraMensagem(Mensagem msg) {\n\t\treturn new StringBuilder()\n\t\t\t.append(msg.remetente.nome)\n\t\t\t.append(\" enviou para \")\n\t\t\t.append(msg.destinatario.nome)\n\t\t\t.append(\" uma mensagem suspeita.\")\n\t\t\t.toString();\n\t}",
"private String getMessageDaide(){\n\t\tString message;\n\t\tmessage = \"Bonjour et bienvenue dans votre application de Gestion de l'amortissement.\\n\\n\" +\n\t\t\"Pour pouvoir generer un tableau d'amortissement il vous faudra connaitre au\\nminimum \" +\n\t\t\"3 valeurs coherentes les unes avec les autres parmis : \\n\" +\n\t\t\" - le montant emprunte\\n\" +\n\t\t\" - le taux d'emprunt\\n\" +\n\t\t\" - la duree du remboursement\\n\" +\n\t\t\" - l'annuitee maximale\\n\\n\" +\n\t\t\"Cependant, si vous souhaitez generer un tableau a partir de 4 valeurs, \\ncelles-ci devront\" +\n\t\t\" etre strictement exactes, au risque de produire une erreur.\\n\\n\" +\n\t\t\"Veuillez ensuite saisir vos valeurs ainsi que le type de remboursement \\nqui vous \" +\n\t\t\"convient puis cliquez sur valider pour generer le tableau \\nd'amortissement, ainsi que la \" +\n\t\t\"valeur inconnue si vous n'en aviez saisi que 3.\\n\\n\" +\n\t\t\"Vous avez de plus la possibilite d'exporter votre tableau d'amortissement au \\nformat Excel (.xls)\" +\n\t\t\"grace au bouton Export.\";\n\t\treturn message;\n\t}",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n MessageTXT = new javax.swing.JTextField();\n jLabel1 = new javax.swing.JLabel();\n jButton1 = new javax.swing.JButton();\n jScrollPane1 = new javax.swing.JScrollPane();\n GelenTXT = new javax.swing.JTextArea();\n jLabel2 = new javax.swing.JLabel();\n KonuTXT = new javax.swing.JTextField();\n DurumLBL = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabel1.setText(\"Mesaj\");\n\n jButton1.setText(\"Gonder\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n GelenTXT.setColumns(20);\n GelenTXT.setRows(5);\n jScrollPane1.setViewportView(GelenTXT);\n\n jLabel2.setText(\"Konu\");\n\n KonuTXT.setText(\"HaydutTemp\");\n\n DurumLBL.setFont(new java.awt.Font(\"Monospaced\", 2, 12)); // NOI18N\n DurumLBL.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n DurumLBL.setText(\"durum\");\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 .addComponent(jScrollPane1)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(MessageTXT, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jButton1))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(KonuTXT, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))))\n .addComponent(DurumLBL, javax.swing.GroupLayout.DEFAULT_SIZE, 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 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(KonuTXT, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(MessageTXT, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton1))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 25, Short.MAX_VALUE)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 135, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(DurumLBL)\n .addGap(13, 13, 13))\n );\n\n pack();\n }",
"String getFormFieldLabel();",
"@Override\r\n protected void populateView(View v, ChatMesso model, int position) {\n TextView messageText,messageUser,messageTime;\r\n messageText=(TextView)v.findViewById(R.id.message_text);\r\n messageUser=(TextView)v.findViewById(R.id.message_user);\r\n messageTime=(TextView)v.findViewById(R.id.message_time);\r\n\r\n messageText.setText(model.getMessageText());\r\n messageUser.setText(model.getMessageUser());\r\n messageTime.setText(DateFormat.format(\"dd-MM-yyyy (HH:mm:ss)\", model.getMessageTime()));\r\n\r\n }",
"private TextField getTxt_desc() {\n\t\treturn txt_desc;\n\t}",
"private JTextField initializeMessageField() {\r\n\t\t// create the message field.\r\n\t\tmessageField = new JTextField();\r\n\t\treturn messageField;\r\n\t}",
"@Override\n \t\t\t\tpublic void modifyText(ModifyEvent e) {\n \t\t\t\t\tString result = fp.getValidator().validate(text.getText());\n \t\t\t\t\tif (result == null)\n \t\t\t\t\t\tdecorator.hide();\n \t\t\t\t\telse {\n \t\t\t\t\t\tdecorator.setDescriptionText(result);\n \t\t\t\t\t\tdecorator.show();\n \t\t\t\t\t}\n \t\t\t\t\tupdateState();\n \t\t\t\t}",
"private void limparcampos() {\n tfarea.setText(\"\");\n tfbairro.setText(\"\");\n tfcgc.setText(\"\");\n tfemail.setText(\"\");\n tfendereco.setText(\"\");\n tffone.setText(\"\");\n tfincra.setText(\"\");\n tfnomefan.setText(\"\");\n tfnomefan.setText(\"\");\n tfnomefan.setText(\"\");\n tfproprietario.setText(\"\");\n tfrazao.setText(\"\");\n combocidade.setSelectedItem(\"\");\n combounimedida.setSelectedItem(\"\");\n\n }",
"public MessageConfirm(String msgContent, int formType) {\n \n this.formType = formType;\n \n initComponents();\n \n jLabel_msg.setText(msgContent); \n\n // formType : 0-default, 1-dangnhap, 2-changepw/resetpw, 3-qlhoadonxuat/nhap, 4-qlnhanvien/phanquyen, 5-qlsanpham, 6-report, 7-main/setting\n switch (formType) {\n case 1:\n jPanel1.setBackground(new Color(108, 58, 167));\n jPanel1.setBorder(new LineBorder(new Color(0, 204, 204)));\n jLabel_close.setBackground(new Color(108, 58, 167));\n jButtonOK.setBackground(new Color(108, 58, 167));\n jButtonOK.setBorder(new LineBorder(new Color(0, 204, 204)));\n jButtonCancel.setBackground(new Color(108, 58, 167));\n jButtonCancel.setBorder(new LineBorder(new Color(0, 204, 204)));\n break;\n case 2:\n jPanel1.setBackground(new Color(36, 47, 65));\n jPanel1.setBorder(new LineBorder(new Color(255, 255, 255)));\n jLabel_close.setBackground(new Color(36, 47, 65));\n jButtonOK.setBackground(new Color(36, 47, 65));\n jButtonOK.setBorder(new LineBorder(new Color(255, 255, 255)));\n jButtonCancel.setBackground(new Color(36, 47, 65));\n jButtonCancel.setBorder(new LineBorder(new Color(255, 255, 255)));\n break;\n case 3:\n jPanel1.setBackground(new Color(73, 61, 128));\n jPanel1.setBorder(new LineBorder(new Color(147, 122, 255)));\n jLabel_close.setBackground(new Color(73, 61, 128));\n jButtonOK.setBackground(new Color(73, 61, 128));\n jButtonOK.setBorder(new LineBorder(new Color(147, 122, 255)));\n jButtonCancel.setBackground(new Color(73, 61, 128));\n jButtonCancel.setBorder(new LineBorder(new Color(147, 122, 255)));\n break;\n case 4:\n jPanel1.setBackground(new Color(56, 53, 140));\n jPanel1.setBorder(new LineBorder(new Color(139, 137, 217)));\n jLabel_close.setBackground(new Color(56, 53, 140));\n jButtonOK.setBackground(new Color(56, 53, 140));\n jButtonOK.setBorder(new LineBorder(new Color(139, 137, 217)));\n jButtonCancel.setBackground(new Color(56, 53, 140));\n jButtonCancel.setBorder(new LineBorder(new Color(139, 137, 217)));\n break;\n case 5:\n jPanel1.setBackground(new Color(3, 140, 90));\n jPanel1.setBorder(new LineBorder(new Color(1, 198, 83)));\n jLabel_close.setBackground(new Color(3, 140, 90));\n jButtonOK.setBackground(new Color(3, 140, 90));\n jButtonOK.setBorder(new LineBorder(new Color(1, 198, 83)));\n jButtonCancel.setBackground(new Color(3, 140, 90));\n jButtonCancel.setBorder(new LineBorder(new Color(1, 198, 83)));\n break;\n case 6:\n jPanel1.setBackground(new Color(247, 249, 250));\n jPanel1.setBorder(new LineBorder(new Color(139, 137, 217)));\n jLabel_close.setBackground(new Color(247, 249, 250));\n jButtonOK.setBackground(new Color(247, 249, 250));\n jButtonOK.setBorder(new LineBorder(new Color(139, 137, 217)));\n jButtonCancel.setBackground(new Color(247, 249, 250));\n jButtonCancel.setBorder(new LineBorder(new Color(139, 137, 217)));\n break;\n case 7:\n jPanel1.setBackground(new Color(34, 41, 50));\n jPanel1.setBorder(new LineBorder(new Color(147, 122, 255)));\n jLabel_close.setBackground(new Color(34, 41, 50));\n jButtonOK.setBackground(new Color(34, 41, 50));\n jButtonOK.setBorder(new LineBorder(new Color(147, 122, 255)));\n jButtonCancel.setBackground(new Color(34, 41, 50));\n jButtonCancel.setBorder(new LineBorder(new Color(147, 122, 255)));\n break;\n default:\n }\n }",
"public void praticien_zone(){\n\n JLabel lbl_Praticien = new JLabel(\"Praticien :\");\n lbl_Praticien.setBounds(40, 50, 119, 16);\n add(lbl_Praticien);\n\n\n\n JTextField praticien = new JTextField();\n praticien.setBounds(200, 50, 200, 22);\n praticien.setEditable(false);\n try {\n praticien.setText((DAO_Praticien.nomPraticien(rapport_visite.elementAt(DAO_Rapport.indice)[1])));\n } catch (SQLException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n add(praticien);\n\n }",
"public FrmTelefone() {\n initComponents();\n // preencherTabela(\"\\\"select * from telefone order by id_telefone\\\")\");\n try {\n MaskFormatter form = new MaskFormatter(\"(##)####-####\");\n jFormattedTextFieldNum.setFormatterFactory(new DefaultFormatterFactory(form));\n \n \n \n } catch (ParseException ex) {\n JOptionPane.showMessageDialog(null, \"erros ao mostrar dados\" + ex); \n \n }\n }",
"private void buildFields() {\r\n buildField(txtPizzaName, GUIResource.getLabel(DIALOG, NAME_PIZZA), 0);\r\n buildField(txtCustomerName, GUIResource.getLabel(DIALOG, NAME_CUSTOMER), 1);\r\n buildField(txtPhone, GUIResource.getLabel(DIALOG, PHONE), 2);\r\n buildField(txtEmail, GUIResource.getLabel(DIALOG, EMAIL), 3);\r\n }",
"private void initialisationChampMessage() {\n messageArea = new JTextArea();\n messageArea.setLineWrap(true);\n messageArea.setWrapStyleWord(true);\n messageArea.setOpaque(false);\n messageArea.setBackground(COULEUR_VIDE);\n messageArea.setFont(FONT_TEXTE);\n messageArea.setBorder(BorderFactory.createEmptyBorder(GRANDEUR_BORDURE_VIDE, GRANDEUR_BORDURE_VIDE,\n GRANDEUR_BORDURE_VIDE, GRANDEUR_BORDURE_VIDE));\n dimTotal = calculerDimensionTotalMessage(this.message);\n messageArea.setSize((int) dimTotal.getWidth() + GRANDEUR_BORDURE_VIDE * 2,\n (int) dimTotal.getHeight() + GRANDEUR_BORDURE_VIDE * 2);\n messageArea.append(this.message);\n }",
"public void majInformation (String typeMessage, String moduleMessage, String corpsMessage) {\n Date date = new Date();\n listMessageInfo.addFirst(dateFormat.format(date)+\" - \"+typeMessage+\" - \"+moduleMessage+\" - \"+corpsMessage);\n }",
"default String getRequiredMessage() {\n return null;\n }",
"public List<String> passwordMessageValidations() {\n name.sendKeys(\"Karan Prinja\");\n email.sendKeys(\"[email protected]\");\n password.sendKeys(\"12345678\");\n helperMethods.waitForWebElement(smallPassword, 30);\n String sosoPassword = smallPassword.getText();\n password.clear();\n password.sendKeys(\"Randomer12345678\");\n helperMethods.waitForWebElement(smallPassword, 30);\n String goodPassword = smallPassword.getText();\n List<String> passwordValidationText = new ArrayList<>();\n passwordValidationText.add(sosoPassword);\n passwordValidationText.add(goodPassword);\n return passwordValidationText;\n }",
"@Override\r\n public void actionPerformed(ActionEvent e) {\n String texto = tf.getText();\r\n //lo seteo como texto en el Label\r\n lab.setText(texto);\r\n //refresco los componentes de la ventana\r\n validate();\r\n //combierto a mayuscula el texto del textfield\r\n tf.setText(texto.toUpperCase());\r\n //lo selecciono todo\r\n tf.selectAll();\r\n }",
"private JTextField getTextFieldDescription() {\r\n JTextField textFieldDescription = makeJTextField(1, 100, 130, 200, 25);\r\n textFieldDescription.setName(\"Desc\");\r\n return textFieldDescription;\r\n }",
"private void updateValidationMessages()\r\n {\r\n String errorMessage = myModel.getErrorMessage();\r\n String warningMessage = myModel.getWarningMessage();\r\n\r\n if (StringUtils.isNotEmpty(errorMessage))\r\n {\r\n myValidator.setValidationResult(ValidationStatus.ERROR, errorMessage);\r\n }\r\n else if (StringUtils.isNotEmpty(warningMessage))\r\n {\r\n myValidator.setValidationResult(ValidationStatus.WARNING, warningMessage);\r\n }\r\n else\r\n {\r\n myValidator.setValidationResult(ValidationStatus.VALID, null);\r\n }\r\n }",
"public CadastrarNota() {\n initComponents();\n setLocationRelativeTo(this);\n setTitle(\"Cadastro de Alunos\");\n setResizable(false);\n Atualizar();\n }"
]
| [
"0.6408345",
"0.6369793",
"0.6231847",
"0.60895944",
"0.60654354",
"0.60366505",
"0.6010596",
"0.5967624",
"0.5860302",
"0.58368224",
"0.5830377",
"0.58174044",
"0.58077365",
"0.5732685",
"0.5730541",
"0.5716292",
"0.5710994",
"0.570413",
"0.56969935",
"0.5654012",
"0.56076145",
"0.5594659",
"0.5589514",
"0.557999",
"0.55773365",
"0.5563795",
"0.55596954",
"0.55074054",
"0.5506714",
"0.5506519",
"0.54975945",
"0.5495232",
"0.54892385",
"0.5483048",
"0.5466273",
"0.5464945",
"0.5454508",
"0.54468656",
"0.5445329",
"0.54321533",
"0.54298735",
"0.5428448",
"0.5426565",
"0.54204494",
"0.54088306",
"0.5404932",
"0.5400347",
"0.5399563",
"0.5397481",
"0.53973913",
"0.53906536",
"0.53886986",
"0.5387191",
"0.53846204",
"0.5383664",
"0.536833",
"0.53674006",
"0.5352202",
"0.53506875",
"0.53475416",
"0.5346911",
"0.53432393",
"0.533663",
"0.5331493",
"0.5329201",
"0.5323168",
"0.53171396",
"0.53154284",
"0.5304304",
"0.53040254",
"0.5303874",
"0.52996695",
"0.52992904",
"0.5296313",
"0.52948284",
"0.5293611",
"0.5290055",
"0.52867067",
"0.52830285",
"0.5279178",
"0.52749926",
"0.52743614",
"0.52733403",
"0.5270086",
"0.5266054",
"0.5259323",
"0.5257732",
"0.5255324",
"0.5251839",
"0.5246991",
"0.52459174",
"0.5238448",
"0.5236784",
"0.52366775",
"0.5228377",
"0.52273655",
"0.52213705",
"0.5219458",
"0.5210665",
"0.52090645",
"0.5203235"
]
| 0.0 | -1 |
TODO Autogenerated method stub | @Override
public Object mapRow(ResultSet rs, int arg1) throws SQLException {
VoltDegree vd = new VoltDegree();
vd.setVolt(rs.getString("VOLT"));
vd.setVoltCode(rs.getString("VOLT_CODE"));
return vd;
} | {
"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 |
Description: User: JianHuangsh Date: 20180314 Time: 18:55 | public interface IContractMgtService {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void mo55254a() {\n }",
"private static String getStamp() {\n\t\t\t return new SimpleDateFormat(\"yyyyMMddHHmmss\").format(new Date());\r\n\t\t}",
"public void mo21877s() {\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 }",
"public java.lang.String getTimeStamp(){\r\n return localTimeStamp;\r\n }",
"public void autoDetails() {\n\t\t\r\n\t}",
"public void mo4359a() {\n }",
"public void mo21878t() {\n }",
"public void mo21795T() {\n }",
"public Date getCreateTime()\n/* */ {\n/* 177 */ return this.createTime;\n/* */ }",
"public void mo21794S() {\n }",
"public void mo6081a() {\n }",
"public void mo12930a() {\n }",
"public String getBeginTime() {\n/* 28 */ return this.beginTime;\n/* */ }",
"public void mo21783H() {\n }",
"public void mo21787L() {\n }",
"public void mo1531a() {\n }",
"public long getDate()\r\n/* 204: */ {\r\n/* 205:309 */ return getFirstDate(\"Date\");\r\n/* 206: */ }",
"private long now() {\n\treturn System.currentTimeMillis();\n }",
"public void mo3376r() {\n }",
"private void m50366E() {\n }",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"public void mo3749d() {\n }",
"public final void mo51373a() {\n }",
"public void mo21793R() {\n }",
"public String getBeginTime(){return beginTime;}",
"public void mo21825b() {\n }",
"public void mo44053a() {\n }",
"public void mo21785J() {\n }",
"public int getTime() { return _time; }",
"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}",
"@Override\r\n\tpublic void description() {\n\t\tSystem.out.println(\"Seorang yang mengendarai kendaraan dan bekerja\");\r\n\t}",
"public void mo115188a() {\n }",
"public void mo21779D() {\n }",
"public void mo21791P() {\n }",
"public static void shoInfo() {\n\t\tSystem.out.println(description);\n\t \n\t}",
"@Override\n public String getResumeDate() {\n return operate_time;\n }",
"public long getTotalTime() {\n/* 73 */ return this.totalTime;\n/* */ }",
"public void mo21879u() {\n }",
"public void mo9233aH() {\n }",
"public void mo115190b() {\n }",
"public static String getInfo() {\n/* 327 */ return \"\";\n/* */ }",
"public Date getDateCreated(){return DATE_CREATED;}",
"public void mo3370l() {\n }",
"public void mo56167c() {\n }",
"private void getUserInfo() {\n\t}",
"public void mo12628c() {\n }",
"public void mo21788M() {\n }",
"public Date getCreateDate()\r\n/* */ {\r\n/* 158 */ return this.createDate;\r\n/* */ }",
"long getTimeBoltHBoltE();",
"public void mo97908d() {\n }",
"public static void listing5_14() {\n }",
"@Override \n\t public String getDescription() {\n\t \t return \"(*.MXD)\"; \n\t }",
"public void method_4270() {}",
"public void mo21782G() {\n }",
"public void mo23018c() {\n this.f26122b.edit().putLong(\"last.last.show.attend\", System.currentTimeMillis()).apply();\n }",
"public void mo9848a() {\n }",
"private String getTimestamp() {\n return Calendar.getInstance().getTime().toString();\n }",
"public void mo23813b() {\n }",
"public abstract long mo9743h();",
"public String getDate(){ return this.start_date;}",
"public String getDescription()\n/* */ {\n/* 74 */ return this.description;\n/* */ }",
"protected void mo6255a() {\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}",
"public void mo21792Q() {\n }",
"@Override\n public String getEndInfo() {\n return null;\n //return dateFormatter.stringFromDate(checkOutTime!)\n }",
"public Date getSOHTimestamp() {\r\n/* 265 */ return this._SOHTimestamp;\r\n/* */ }",
"private void getDateForAnalysisReport() {\n \tArrayList<Object> answer = new ArrayList<>();\n\t\tanswer.add(\"performingAnActivityTracking\");\n\t\tanswer.add(\"/getActivityData\");\n\t\tString star = reportStartDate.getValue().toString();\n\t\tString end = reportEndDate.getValue().toString();\n\t\tanswer.add(star);\n\t\tanswer.add(end);\n\t\t\n\t\tchs.client.handleMessageFromClientUI(answer);\n\t}",
"String timeCreated();",
"private stendhal() {\n\t}",
"private void getStatus() {\n\t\t\n\t}",
"@Override\n public Date getCreated()\n {\n return null;\n }",
"@NonNull\n public String toString(){\n return this.hora+\":\"+this.minutos+\" \"+this.segundos+\" Sec \"+this.dia+\"/\"+this.mes+\"/\"+this.anno;\n }",
"public void mo21789N() {\n }",
"public History() {\n\tthis.timestampMinute = new Date();\n\tthis.status = false;\n\n }",
"private void kk12() {\n\n\t}",
"public void mo2470d() {\n }",
"public void mo21880v() {\n }",
"@Override\n\tpublic String getExtraInformation() {\n\t\tDateTimeFormatter fmt = DateTimeFormat.forPattern(\"dd-MM-yyyy HH:mm\");\n\t\treturn \"Deadline: \" + fmt.print(this.getDeadLine());\n\t}",
"@Override\n public void date()\n {\n }",
"public void mo5382o() {\n }",
"public String getUsername()\r\n/* 11: */ {\r\n/* 12:30 */ return this.username;\r\n/* 13: */ }",
"private String msg3() {\n return(\"[\" + (System.currentTimeMillis() - system_start_time) + \"] \");\n }",
"public void mo21786K() {\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}",
"public void mo15790b() {\n long a = C4472i3.m15480a();\n String str = f11337e;\n StringBuilder sb = new StringBuilder();\n sb.append(\"Messaging session stopped. Adding new messaging session timestamp: \");\n sb.append(a);\n C1557c.m7458a(str, sb.toString());\n this.f11338a.edit().putLong(\"messaging_session_timestamp\", a).apply();\n this.f11341d = false;\n }",
"public void mo5248a() {\n }",
"public long getTime(){\n return this.time;\n }",
"long getTimeBoltBBoltC();",
"public abstract String mo13682d();",
"zzang mo29839S() throws RemoteException;",
"String timeModified();",
"public void mo2471e() {\n }",
"public long getTimeStamp() {return timeStamp;}"
]
| [
"0.58537936",
"0.58367586",
"0.5813197",
"0.5802934",
"0.5802934",
"0.5802934",
"0.5802934",
"0.5802934",
"0.5802934",
"0.5802934",
"0.5759669",
"0.5749691",
"0.5729107",
"0.56963795",
"0.5662626",
"0.5656726",
"0.5622697",
"0.55971074",
"0.55609256",
"0.55473363",
"0.554534",
"0.5543024",
"0.5523643",
"0.5515274",
"0.55023515",
"0.5489853",
"0.54832304",
"0.54758555",
"0.5473192",
"0.54594815",
"0.54389805",
"0.54287297",
"0.5426825",
"0.54256624",
"0.5421609",
"0.5417441",
"0.5415248",
"0.5409982",
"0.54095733",
"0.54006636",
"0.540045",
"0.53885764",
"0.5386877",
"0.5381853",
"0.5379603",
"0.53760105",
"0.5374842",
"0.5374602",
"0.5373018",
"0.5372683",
"0.5363474",
"0.5357718",
"0.5354438",
"0.5336418",
"0.53347284",
"0.53298503",
"0.5323782",
"0.53165644",
"0.53123146",
"0.5310049",
"0.53098357",
"0.53022116",
"0.5296566",
"0.52908534",
"0.52899593",
"0.52847886",
"0.52834344",
"0.52833515",
"0.5281633",
"0.5278334",
"0.52741045",
"0.5273168",
"0.5271648",
"0.52656466",
"0.52603453",
"0.5259228",
"0.52588516",
"0.5253382",
"0.5249305",
"0.5248789",
"0.5248333",
"0.5246792",
"0.5242406",
"0.5240681",
"0.5235644",
"0.5232991",
"0.5221104",
"0.52184534",
"0.52183723",
"0.5213425",
"0.5212697",
"0.5212432",
"0.5208554",
"0.52026176",
"0.5199348",
"0.5195283",
"0.5194128",
"0.5192651",
"0.5187159",
"0.5186764",
"0.5186665"
]
| 0.0 | -1 |
Make the constructor private so its only accessible to members of the class. | private AirforceOne_lazy() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Foo() {\n\t\tSystem.out.println(\"Private Constructor.\");\n\t}",
"@SuppressWarnings(\"unused\")\r\n\tprivate Person() {\r\n\t}",
"@Override\n public boolean getAllowPrivateConstructors()\n {\n \treturn allowPrivateConstructors;\n }",
"private ATCres() {\r\n // prevent to instantiate this class\r\n }",
"private Consts(){\n //this prevents even the native class from \n //calling this ctor as well :\n throw new AssertionError();\n }",
"private ChainingMethods() {\n // private constructor\n\n }",
"private MigrationInstantiationUtil() {\n\t\tthrow new IllegalAccessError();\n\t}",
"private Topography()\n\t{\n\t\tthrow new IllegalStateException(\"This is an utility class, it can not be instantiated\");\n\t}",
"private Utils()\n {\n // Private constructor to prevent instantiation\n }",
"private Utility() {\n throw new IllegalAccessError();\n }",
"private Rekenhulp()\n\t{\n\t}",
"private DPSingletonLazyLoading(){\r\n\t\tthrow new RuntimeException();//You can still access private constructor by reflection and calling setAccessible(true)\r\n\t}",
"private DarthSidious(){\n }",
"@Test\n public void testPrivateCtor() throws Exception {\n Constructor<?> privateCtor = Helper.class.getDeclaredConstructors()[0];\n assertTrue(Modifier.isPrivate(privateCtor.getModifiers()));\n privateCtor.setAccessible(true);\n privateCtor.newInstance(new Object[] {});\n }",
"private Security() { }",
"private SystemInfo() {\r\n // forbid object construction \r\n }",
"private AccessorModels() {\n // Private constructor to prevent instantiation\n }",
"private Validate(){\n //private empty constructor to prevent object initiation\n }",
"private PrivatePerson(String name, int age) {\n super(name, age);\n }",
"private Constantes() {\r\n\t\t// No way\r\n\t}",
"public StubPrivateConstructorPair() {\r\n this(null, null);\r\n }",
"private Util()\n {\n // Empty default ctor, defined to override access scope.\n }",
"@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }",
"private Validations() {\n\t\tthrow new IllegalAccessError(\"Shouldn't be instantiated.\");\n\t}",
"private PermissionUtil() {\n throw new IllegalStateException(\"you can't instantiate PermissionUtil!\");\n }",
"private Utils() {\n\t}",
"private Utils() {\n\t}",
"private PropertyAccess() {\n\t\tsuper();\n\t}",
"private Instantiation(){}",
"@DSComment(\"Private Method\")\n @DSBan(DSCat.PRIVATE_METHOD)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:32:41.996 -0500\", hash_original_method = \"CB9D9CAF93B6F7C6AC078700B30D5B3A\", hash_generated_method = \"6EEF3712392D06942F0E7086316BBAB4\")\n \n private void nativeConstructor(){\n }",
"private SimpleRepository() {\n \t\t// private ct to disallow external object creation\n \t}",
"private CommonMethods() {\n }",
"private Mocks() { }",
"private Public() {\n super(\"public\", null);\n }",
"private QcTestRunner()\n\t{\n\t\t// To prevent external instantiation of this class\n\t}",
"private Utility() {\n\t}",
"private SecurityConsts()\r\n\t{\r\n\r\n\t}",
"private void __sep__Constructors__() {}",
"private Marinator() {\n }",
"private Marinator() {\n }",
"private Helper() {\r\n // do nothing\r\n }",
"private Ex() {\n }",
"private Driver(){\n }",
"private TMCourse() {\n\t}",
"private Utils() {\n }",
"private Utils() {\n }",
"private Utils() {\n }",
"private Utils() {\n }",
"private Utils() {\n }",
"private MApi() {}",
"private Log()\n {\n //Hides implicit constructor.\n }",
"private PluginUtils() {\n\t\t//\t\tthrow new IllegalAccessError(\"Don't instantiate me. I'm a utility class!\");\n\t}",
"private Cat() {\n\t\t\n\t}",
"private Server()\n\t{\n\t}",
"private ExampleVersion() {\n throw new UnsupportedOperationException(\"Illegal constructor call.\");\n }",
"private Utils() {}",
"private Utils() {}",
"private Utils() {}",
"private Utils() {}",
"private TagCacheManager(){\n //AssertionError不是必须的. 但它可以避免不小心在类的内部调用构造器. 保证该类在任何情况下都不会被实例化.\n //see 《Effective Java》 2nd\n throw new AssertionError(\"No \" + getClass().getName() + \" instances for you!\");\n }",
"private Settings()\n {}",
"@SuppressWarnings(\"unused\")\n\tprivate Filter() {\n\n\t}",
"private Const() {\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 InterpreterDependencyChecks() {\r\n\t\t// Hides default constructor\r\n\t}",
"@SuppressWarnings(\"unused\")\n private Booking() {\n }",
"public T instantiatePrivate() throws NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException {\n Constructor<T> constructor = clazz.getDeclaredConstructor();\n constructor.setAccessible(true);\n return constructor.newInstance();\n }",
"private HailstoneSequence(){ // This private constructor hides the implicit public one\r\n\r\n}",
"private Service() {}",
"private AcceleoLibrariesEclipseUtil() {\n \t\t// hides constructor\n \t}",
"private Listener() {\r\n // unused\r\n }",
"private UtilityKlasse() {\n\n }",
"private InstanceUtil() {\n }",
"private PuzzleConstants() {\n // not called\n }",
"private Board() {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// A private board constructor to ensure only one is created\n\t\tsuper();\n\t}",
"@Override\n public boolean isPrivate() {\n return true;\n }",
"private UserCourseCourse() {\n\t}",
"private ClassUtil() {}",
"private StubPrivateConstructorPair(Object firstObject, Object secondObject) {\r\n super(firstObject, secondObject);\r\n }",
"private Driver() {\n\n }",
"private WebXmlIo()\n {\n // Voluntarily empty constructor as utility classes should not have a public or default\n // constructor\n }",
"private S3Utils() {\n throw new UnsupportedOperationException(\"This class cannot be instantiated\");\n }",
"private CheckingTools() {\r\n super();\r\n }",
"private Message(){\n // default constructor\n }",
"private User() {}",
"private Singleton2A(){\n\t\tif(instance != null){\n\t\t\tthrow new RuntimeException(\"One instance already created cant create other\");\n\t\t}\t\t\n\t\tSystem.out.println(\"I am private constructor\");\n\t}",
"private SparkseeUtils()\n {\n /*\n * Intentionally left empty.\n */\n }",
"private ImmutableByHavingOnlyAPrivateConstructorUsingTheBuilderPattern (String field) {\n this.field = field;\n }",
"private Singleton() {\n\t}",
"private AccessList() {\r\n\r\n }",
"private Util() {\n }",
"private ClassProxy() {\n }",
"private Supervisor() {\r\n\t}",
"private TetrisMain() {\r\n //prevents instantiation\r\n }",
"private GuiUtils()\r\n {\r\n // Private constructor to prevent instantiation\r\n }",
"private Source() {\n throw new AssertionError(\"This class should not be instantiated.\");\n }",
"private FlashCardConstants() {\n throw new AssertionError(\"Constructor should never be called for this class\");\n }",
"private TechniqueStatesModels() {\n // Private constructor to prevent instantiation\n }",
"private FlowExecutorUtils()\r\n {\r\n // Private constructor to prevent instantiation\r\n }",
"protected SecurityObject() {\n\t\t// Used by JPA provider.\n\n\t\tLOGGER.debug(\"SecurityObject#co\");\n\t}",
"private PropertiesLoader() {\r\n\t\t// not instantiable\r\n\t}"
]
| [
"0.7464921",
"0.7292126",
"0.7167056",
"0.71235496",
"0.71222717",
"0.7110426",
"0.70799196",
"0.7066012",
"0.7047868",
"0.703622",
"0.70214134",
"0.6986681",
"0.6976317",
"0.69677556",
"0.693966",
"0.69305754",
"0.69157183",
"0.68830085",
"0.6877783",
"0.68764174",
"0.6876283",
"0.6865712",
"0.6845691",
"0.6831118",
"0.6817777",
"0.6816981",
"0.6816981",
"0.6812827",
"0.6792285",
"0.6777141",
"0.6773917",
"0.6697946",
"0.6670679",
"0.6660381",
"0.6640214",
"0.66334724",
"0.6632463",
"0.6626316",
"0.66080666",
"0.66080666",
"0.6599664",
"0.6597289",
"0.65745795",
"0.65729785",
"0.65715027",
"0.65715027",
"0.65715027",
"0.65715027",
"0.65715027",
"0.6564949",
"0.65634924",
"0.6541777",
"0.6538741",
"0.6535147",
"0.6510111",
"0.64902925",
"0.64902925",
"0.64902925",
"0.64902925",
"0.64868516",
"0.6482133",
"0.648005",
"0.6477275",
"0.64743674",
"0.64728975",
"0.6470743",
"0.64696467",
"0.645101",
"0.64449346",
"0.64432263",
"0.6438771",
"0.6436809",
"0.6436054",
"0.64333457",
"0.64332557",
"0.64206374",
"0.640687",
"0.6397636",
"0.63961405",
"0.6394783",
"0.6394118",
"0.63917667",
"0.6381667",
"0.6370737",
"0.6367162",
"0.6367015",
"0.6362322",
"0.636027",
"0.63528115",
"0.6345657",
"0.63357157",
"0.6333672",
"0.63334954",
"0.63332945",
"0.6331968",
"0.6329154",
"0.632612",
"0.6322102",
"0.63082945",
"0.63082474",
"0.6307994"
]
| 0.0 | -1 |
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor. | @SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
setResizable(false);
athensPic = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
btnBack = new javax.swing.JButton();
lbAddCus = new javax.swing.JLabel();
lbName = new javax.swing.JLabel();
lbphone = new javax.swing.JLabel();
lbAddr = new javax.swing.JLabel();
tfName = new javax.swing.JTextField();
tfPhone = new javax.swing.JTextField();
tfAddr = new javax.swing.JTextField();
Action btnAddCusAction = new btnAddCustomerAction("Add New Customer", tfName, tfAddr, tfPhone);
btnAddCus = new javax.swing.JButton(btnAddCusAction);
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
athensPic.setIcon(new javax.swing.ImageIcon(getClass().getResource("/athens_stock/res/athens.jpg"))); // NOI18N
jLabel2.setFont(new java.awt.Font("Lucida Grande", 0, 20)); // NOI18N
jLabel2.setText("Stock Management System");
btnBack.setText("Home");
lbAddCus.setFont(new java.awt.Font("Lucida Grande", 1, 24)); // NOI18N
lbAddCus.setText("Add Customer");
lbName.setText("Name :");
lbphone.setText("Phone number :");
btnAddCus.setFont(new java.awt.Font("Lucida Grande", 0, 18)); // NOI18N
btnAddCus.setText("Add new customer");
lbAddr.setText("Address :");
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(152, 152, 152))
.addGroup(layout.createSequentialGroup()
.addGap(151, 151, 151)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addGroup(layout.createSequentialGroup()
.addComponent(lbName)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(tfName))
.addGroup(layout.createSequentialGroup()
.addComponent(lbphone)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(tfPhone))
.addComponent(lbAddr)
.addComponent(tfAddr, javax.swing.GroupLayout.PREFERRED_SIZE, 266, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED))))
.addGroup(layout.createSequentialGroup()
.addGap(181, 181, 181)
.addComponent(btnAddCus))
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(25, 25, 25)
.addComponent(athensPic))
.addGroup(layout.createSequentialGroup()
.addGap(52, 52, 52)
.addComponent(btnBack)))
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(18, 18, 18)
.addComponent(jLabel2))
.addGroup(layout.createSequentialGroup()
.addGap(47, 47, 47)
.addComponent(lbAddCus)))))
.addContainerGap(157, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(15, 15, 15)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(7, 7, 7)
.addComponent(jLabel2)
.addGap(18, 18, 18)
.addComponent(lbAddCus)
.addGap(41, 41, 41)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING))
.addGap(20, 20, 20)
.addGap(20, 20, 20)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(lbName)
.addComponent(tfName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(20, 20, 20)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(lbphone)
.addComponent(tfPhone, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(20, 20, 20)
.addComponent(lbAddr)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(tfAddr, javax.swing.GroupLayout.PREFERRED_SIZE, 78, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addGap(18, 18, 18)
.addComponent(btnAddCus)
.addContainerGap(145, Short.MAX_VALUE))
.addGroup(layout.createSequentialGroup()
.addComponent(athensPic, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(btnBack)
.addGap(0, 0, Short.MAX_VALUE))))
);
pack();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Form() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public frmRectangulo() {\n initComponents();\n }",
"public form() {\n initComponents();\n }",
"public AdjointForm() {\n initComponents();\n setDefaultCloseOperation(HIDE_ON_CLOSE);\n }",
"public FormListRemarking() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n \n }",
"public FormPemilihan() {\n initComponents();\n }",
"public GUIForm() { \n initComponents();\n }",
"public FrameForm() {\n initComponents();\n }",
"public TorneoForm() {\n initComponents();\n }",
"public FormCompra() {\n initComponents();\n }",
"public muveletek() {\n initComponents();\n }",
"public Interfax_D() {\n initComponents();\n }",
"public quanlixe_form() {\n initComponents();\n }",
"public SettingsForm() {\n initComponents();\n }",
"public Soru1() {\n initComponents();\n }",
"public RegistrationForm() {\n initComponents();\n this.setLocationRelativeTo(null);\n }",
"public FMainForm() {\n initComponents();\n this.setResizable(false);\n setLocationRelativeTo(null);\n }",
"public soal2GUI() {\n initComponents();\n }",
"public EindopdrachtGUI() {\n initComponents();\n }",
"public MechanicForm() {\n initComponents();\n }",
"public AddDocumentLineForm(java.awt.Frame parent) {\n super(parent);\n initComponents();\n myInit();\n }",
"public BloodDonationGUI() {\n initComponents();\n }",
"public quotaGUI() {\n initComponents();\n }",
"public PatientUI() {\n initComponents();\n }",
"public Customer_Form() {\n initComponents();\n setSize(890,740);\n \n \n }",
"public Oddeven() {\n initComponents();\n }",
"public myForm() {\n\t\t\tinitComponents();\n\t\t}",
"public Magasin() {\n initComponents();\n }",
"public intrebarea() {\n initComponents();\n }",
"public RadioUI()\n {\n initComponents();\n }",
"public ZobrazUdalost() {\n initComponents();\n }",
"public NewCustomerGUI() {\n initComponents();\n }",
"public FormUtama() {\n initComponents();\n }",
"public p0() {\n initComponents();\n }",
"public INFORMACION() {\n initComponents();\n this.setLocationRelativeTo(null); \n }",
"public ProgramForm() {\n setLookAndFeel();\n initComponents();\n }",
"public AmountReleasedCommentsForm() {\r\n initComponents();\r\n }",
"public form2() {\n initComponents();\n }",
"public kunde() {\n initComponents();\n }",
"public MainForm() {\n\t\tsuper(\"Hospital\", List.IMPLICIT);\n\n\t\tstartComponents();\n\t}",
"public LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }",
"public MusteriEkle() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n setRequestFocusEnabled(false);\n setVerifyInputWhenFocusTarget(false);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 465, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 357, Short.MAX_VALUE)\n );\n }",
"public frmMain() {\n initComponents();\n }",
"public frmMain() {\n initComponents();\n }",
"public DESHBORDPANAL() {\n initComponents();\n }",
"public frmVenda() {\n initComponents();\n }",
"public GUIForm() {\n initComponents();\n inputField.setText(NO_FILE_SELECTED);\n outputField.setText(NO_FILE_SELECTED);\n progressLabel.setBackground(INFO);\n progressLabel.setText(SELECT_FILE);\n }",
"public Botonera() {\n initComponents();\n }",
"public FrmMenu() {\n initComponents();\n }",
"public OffertoryGUI() {\n initComponents();\n setTypes();\n }",
"public JFFornecedores() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setBackground(new java.awt.Color(255, 255, 255));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 983, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 769, Short.MAX_VALUE)\n );\n\n pack();\n }",
"public vpemesanan1() {\n initComponents();\n }",
"public EnterDetailsGUI() {\n initComponents();\n }",
"public Kost() {\n initComponents();\n }",
"public frmacceso() {\n initComponents();\n }",
"public FormHorarioSSE() {\n initComponents();\n }",
"public UploadForm() {\n initComponents();\n }",
"public HW3() {\n initComponents();\n }",
"public Managing_Staff_Main_Form() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(null);\n\n pack();\n }",
"public sinavlar2() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }",
"public P0405() {\n initComponents();\n }",
"public MiFrame2() {\n initComponents();\n }",
"public IssueBookForm() {\n initComponents();\n }",
"public Choose1() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n\n String oldAuthor = prefs.get(\"AUTHOR\", \"\");\n if(oldAuthor != null) {\n this.authorTextField.setText(oldAuthor);\n }\n String oldBook = prefs.get(\"BOOK\", \"\");\n if(oldBook != null) {\n this.bookTextField.setText(oldBook);\n }\n String oldDisc = prefs.get(\"DISC\", \"\");\n if(oldDisc != null) {\n try {\n int oldDiscNum = Integer.parseInt(oldDisc);\n oldDiscNum++;\n this.discNumberTextField.setText(Integer.toString(oldDiscNum));\n } catch (Exception ex) {\n this.discNumberTextField.setText(oldDisc);\n }\n this.bookTextField.setText(oldBook);\n }\n\n\n }",
"public GUI_StudentInfo() {\n initComponents();\n }",
"public Lihat_Dokter_Keseluruhan() {\n initComponents();\n }",
"public JFrmPrincipal() {\n initComponents();\n }",
"public bt526() {\n initComponents();\n }",
"public Pemilihan_Dokter() {\n initComponents();\n }",
"public Ablak() {\n initComponents();\n }",
"@Override\n\tprotected void initUi() {\n\t\t\n\t}",
"@SuppressWarnings(\"unchecked\")\n\t// <editor-fold defaultstate=\"collapsed\" desc=\"Generated\n\t// Code\">//GEN-BEGIN:initComponents\n\tprivate void initComponents() {\n\n\t\tlabel1 = new java.awt.Label();\n\t\tlabel2 = new java.awt.Label();\n\t\tlabel3 = new java.awt.Label();\n\t\tlabel4 = new java.awt.Label();\n\t\tlabel5 = new java.awt.Label();\n\t\tlabel6 = new java.awt.Label();\n\t\tlabel7 = new java.awt.Label();\n\t\tlabel8 = new java.awt.Label();\n\t\tlabel9 = new java.awt.Label();\n\t\tlabel10 = new java.awt.Label();\n\t\ttextField1 = new java.awt.TextField();\n\t\ttextField2 = new java.awt.TextField();\n\t\tlabel14 = new java.awt.Label();\n\t\tlabel15 = new java.awt.Label();\n\t\tlabel16 = new java.awt.Label();\n\t\ttextField3 = new java.awt.TextField();\n\t\ttextField4 = new java.awt.TextField();\n\t\ttextField5 = new java.awt.TextField();\n\t\tlabel17 = new java.awt.Label();\n\t\tlabel18 = new java.awt.Label();\n\t\tlabel19 = new java.awt.Label();\n\t\tlabel20 = new java.awt.Label();\n\t\tlabel21 = new java.awt.Label();\n\t\tlabel22 = new java.awt.Label();\n\t\ttextField6 = new java.awt.TextField();\n\t\ttextField7 = new java.awt.TextField();\n\t\ttextField8 = new java.awt.TextField();\n\t\tlabel23 = new java.awt.Label();\n\t\ttextField9 = new java.awt.TextField();\n\t\ttextField10 = new java.awt.TextField();\n\t\ttextField11 = new java.awt.TextField();\n\t\ttextField12 = new java.awt.TextField();\n\t\tlabel24 = new java.awt.Label();\n\t\tlabel25 = new java.awt.Label();\n\t\tlabel26 = new java.awt.Label();\n\t\tlabel27 = new java.awt.Label();\n\t\tlabel28 = new java.awt.Label();\n\t\tlabel30 = new java.awt.Label();\n\t\tlabel31 = new java.awt.Label();\n\t\tlabel32 = new java.awt.Label();\n\t\tjButton1 = new javax.swing.JButton();\n\n\t\tlabel1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel1.setText(\"It seems that some of the buttons on the ATM machine are not working!\");\n\n\t\tlabel2.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel2.setText(\"Unfortunately these numbers are exactly what Professor has to use to type in his password.\");\n\n\t\tlabel3.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel3.setText(\n\t\t\t\t\"If you want to eat tonight, you have to help him out and construct the numbers of the password with the working buttons and math operators.\");\n\n\t\tlabel4.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tlabel4.setText(\"Denver's Password: 2792\");\n\n\t\tlabel5.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel5.setText(\"import java.util.Scanner;\\n\");\n\n\t\tlabel6.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel6.setText(\"public class ATM{\");\n\n\t\tlabel7.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel7.setText(\"public static void main(String[] args){\");\n\n\t\tlabel8.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel8.setText(\"System.out.print(\");\n\n\t\tlabel9.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel9.setText(\" -\");\n\n\t\tlabel10.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel10.setText(\");\");\n\n\t\ttextField1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\ttextField1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tlabel14.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel14.setText(\"System.out.print( (\");\n\n\t\tlabel15.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel15.setText(\"System.out.print(\");\n\n\t\tlabel16.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel16.setText(\"System.out.print( ( (\");\n\n\t\tlabel17.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel17.setText(\")\");\n\n\t\tlabel18.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel18.setText(\" +\");\n\n\t\tlabel19.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel19.setText(\");\");\n\n\t\tlabel20.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel20.setText(\" /\");\n\n\t\tlabel21.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel21.setText(\" %\");\n\n\t\tlabel22.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel22.setText(\" +\");\n\n\t\tlabel23.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel23.setText(\");\");\n\n\t\tlabel24.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel24.setText(\" +\");\n\n\t\tlabel25.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel25.setText(\" /\");\n\n\t\tlabel26.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel26.setText(\" *\");\n\n\t\tlabel27.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\t\tlabel27.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel27.setText(\")\");\n\n\t\tlabel28.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel28.setText(\")\");\n\n\t\tlabel30.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel30.setText(\"}\");\n\n\t\tlabel31.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel31.setText(\"}\");\n\n\t\tlabel32.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel32.setText(\");\");\n\n\t\tjButton1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tjButton1.setText(\"Check\");\n\t\tjButton1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tjButton1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tjavax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n\t\tlayout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(28).addGroup(layout\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING).addComponent(getDoneButton()).addComponent(jButton1)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, 774, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addGap(92).addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15, GroupLayout.PREFERRED_SIZE, 145,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(2)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(37))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(174)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(7)))\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label23, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20).addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(23).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel10, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16, GroupLayout.PREFERRED_SIZE, 177,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));\n\t\tlayout.setVerticalGroup(\n\t\t\t\tlayout.createParallelGroup(Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup().addGroup(layout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(19)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(78)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(76)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(75)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(27))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel23,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(29)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))))\n\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t.addGap(30)\n\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(25)\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(26).addComponent(jButton1).addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(getDoneButton()).addContainerGap(23, Short.MAX_VALUE)));\n\t\tthis.setLayout(layout);\n\n\t\tlabel16.getAccessibleContext().setAccessibleName(\"System.out.print( ( (\");\n\t\tlabel17.getAccessibleContext().setAccessibleName(\"\");\n\t\tlabel18.getAccessibleContext().setAccessibleName(\" +\");\n\t}",
"public Pregunta23() {\n initComponents();\n }",
"public FormMenuUser() {\n super(\"Form Menu User\");\n initComponents();\n }",
"public AvtekOkno() {\n initComponents();\n }",
"public busdet() {\n initComponents();\n }",
"public ViewPrescriptionForm() {\n initComponents();\n }",
"public Ventaform() {\n initComponents();\n }",
"public Kuis2() {\n initComponents();\n }",
"public POS1() {\n initComponents();\n }",
"public CreateAccount_GUI() {\n initComponents();\n }",
"public Carrera() {\n initComponents();\n }",
"public EqGUI() {\n initComponents();\n }",
"public JFriau() {\n initComponents();\n this.setLocationRelativeTo(null);\n this.setTitle(\"BuNus - Budaya Nusantara\");\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setBackground(new java.awt.Color(204, 204, 204));\n setMinimumSize(new java.awt.Dimension(1, 1));\n setPreferredSize(new java.awt.Dimension(760, 402));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 750, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n }",
"public nokno() {\n initComponents();\n }",
"public dokter() {\n initComponents();\n }",
"public ConverterGUI() {\n initComponents();\n }",
"public hitungan() {\n initComponents();\n }",
"public Modify() {\n initComponents();\n }",
"public frmAddIncidencias() {\n initComponents();\n }",
"public CovidGUI(){\n initComponents();\n }"
]
| [
"0.7319545",
"0.7290502",
"0.7290502",
"0.7290502",
"0.72860676",
"0.7248135",
"0.72132677",
"0.7208833",
"0.7195503",
"0.71899074",
"0.71839535",
"0.7159182",
"0.71478266",
"0.7092896",
"0.7081379",
"0.70575553",
"0.6987028",
"0.69771224",
"0.69548094",
"0.6954804",
"0.6944984",
"0.69433",
"0.6935649",
"0.6931387",
"0.69282216",
"0.69249195",
"0.692455",
"0.69117403",
"0.6911153",
"0.6893859",
"0.68920463",
"0.68919104",
"0.6891608",
"0.68891317",
"0.68831974",
"0.6883143",
"0.6881249",
"0.68787843",
"0.6876025",
"0.687342",
"0.6871333",
"0.68591744",
"0.6856189",
"0.6856037",
"0.6855238",
"0.68541014",
"0.6853768",
"0.68520343",
"0.68520343",
"0.6844646",
"0.6836612",
"0.68363905",
"0.6829627",
"0.6829148",
"0.6827062",
"0.6824523",
"0.682284",
"0.6817001",
"0.6816606",
"0.681108",
"0.68091875",
"0.6808922",
"0.68088245",
"0.6808036",
"0.68024796",
"0.67942286",
"0.6793646",
"0.67930925",
"0.6791919",
"0.6789854",
"0.67891467",
"0.6787902",
"0.6781361",
"0.67667276",
"0.6766539",
"0.67650723",
"0.67572254",
"0.67562306",
"0.6753446",
"0.6752014",
"0.6741438",
"0.67400557",
"0.6737919",
"0.6736807",
"0.6733911",
"0.6727176",
"0.67266273",
"0.67207855",
"0.67158854",
"0.67158085",
"0.67151874",
"0.67088103",
"0.6707628",
"0.67036915",
"0.67019117",
"0.6701068",
"0.66991204",
"0.66989684",
"0.6695414",
"0.66907936",
"0.6689225"
]
| 0.0 | -1 |
Convert some amount in this currency to another currency. | public float convertTo(Currency newCurrency, float amount){
return amount * getConversionRateTo(newCurrency);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public ConversionResultDto convert(String sourceCurrency, String targetCurrency, BigDecimal sourceCurrencyAmount) {\n BigDecimal exchangeRate = fxRatesService.getPairExchangeRate(sourceCurrency, targetCurrency);\n BigDecimal targetCurrencyAmount = sourceCurrencyAmount.multiply(exchangeRate).setScale(ratesScale, RoundingMode.DOWN);\n log.trace(\"Conversion Saved: {} {} --> {} {}\", sourceCurrencyAmount, sourceCurrency, targetCurrencyAmount, targetCurrency);\n ConversionTransaction transactionEntity = conversionTransactionRepository.save(ConversionTransaction.builder()\n .sourceCurrency(sourceCurrency)\n .sourceAmount(sourceCurrencyAmount)\n .targetCurrency(targetCurrency)\n .exchangeRate(exchangeRate)\n .resultAmount(targetCurrencyAmount)\n .build());\n\n return transactionMapper.conversionEntityToResult(transactionEntity);\n }",
"public BigDecimal convert(\n String targetCurrency,\n String sourceCurrency,\n BigDecimal amount)\n {\n if (!exchangeRates.containsKey(targetCurrency))\n throw new IllegalArgumentException(\"Target currency is not registered.\");\n\n if (!exchangeRates.containsKey(sourceCurrency))\n throw new IllegalArgumentException(\"Source currency is not registered.\");\n\n BigDecimal targetRate = exchangeRates.get(targetCurrency);\n BigDecimal sourceRate = exchangeRates.get(sourceCurrency);\n\n BigDecimal baseAmount = amount.multiply(sourceRate);\n BigDecimal targetAmount = baseAmount.divide(targetRate, scale, roundingMode);\n\n return targetAmount;\n }",
"public BigDecimal convertCurrency(BigDecimal amount, Currency from, Currency to)\n\t\t\tthrows CurrencyNotSupportedException, JSONException, StorageException, EndpointException, ServiceException {\n\t\tCurrencyConverter converter = new CurrencyConverterBuilder().strategy(Strategy.YAHOO_FINANCE_FILESTORE)\n\t\t\t\t.buildConverter();\n\n\t\t// set the refresh rate to set timer to update new exchange rates\n\t\tconverter.setRefreshRateSeconds(86400);\n\n\t\t// convert between currencies\n\t\t// general format of conversion is convertCurrency(amount, fromCurrency,\n\t\t// toCurrency)\n\t\t// example conversion of 100 USD to EUR is:\n\t\tBigDecimal convertedAmount = converter.convertCurrency(amount, from, Currency.USD);\n\t\t\n\t\tLOGGER.info(\"Converted amount : \" + (convertedAmount != null ? convertedAmount.doubleValue() : \"null\"));\n\n\t\treturn convertedAmount;\n\n\t}",
"public static Currency convert(Currency cur, String typeTo) throws CurrencyException {\r\n\t\tCurrency.checkType(typeTo);\r\n\t\t\r\n\t\tCurrency result = new Currency(typeTo);\r\n\t\tif(cur.getType().equals(typeTo)) {\r\n\t\t\tthrow new CurrencyException(\"Can not convert currency \" + typeTo + \" to itself.\");\r\n\t\t}\r\n\t\t\r\n\t\treturn result.setValue(cur.getValue() * m_rt.getRate(cur.getType(), typeTo));\r\n\t}",
"@Override\n\tpublic CurrencyConversionBean getCoversionAmount(Double amount, String fromcurrency, String tocurrency) {\n\t\treturn new CurrencyConversionBean(amount, fromcurrency,tocurrency);\n\t}",
"public Money convertToMoney(float amount) {\n return new Money(amount);\n }",
"public void conversion(double amount, Currency convertTo) {\n\t\tDollar dollar = new Dollar();\n\t\tif(dollar.getClass().getName() == convertTo.getClass().getName()) {\n\t\t\tSystem.out.println(\"Rupee to Dollar\"+(amount*0.014));\n\t\t}\n\t\tEuro euro= new Euro();\n\t\tif(euro.getClass().getName() == convertTo.getClass().getName()) {\n\t\t\tSystem.out.println(\"Rupee to Euro\"+(amount*0.012));\n\t\t}\n\t}",
"public double change(String currencyFrom, String currencyTo, double amount)\r\n\t\t\tthrows RemoteException, IllegalArgumentException;",
"@Override\n public Amount getConvertedAmount(Amount from, Currency toCurrency) \n throws CurrencyLookupException, ValueOutOfRangeException {\n BigDecimal value = from.getValue();\n if (value.doubleValue() < 0 || value.doubleValue() > 1000000000) {\n throw new ValueOutOfRangeException(\n \"Value must a non-negative number less than one billion\", value);\n }\n BigDecimal rate = getConversionRate(from.getCurrency(), toCurrency);\n Amount amt = new Amount(rate.multiply(from.getValue()), toCurrency);\n return amt;\n }",
"public double convert(double amount, Unit u);",
"@GetMapping(\"/{fromCurrency}/{toCurrency}/{fromAmount}\")\n\tpublic ResponseEntity<CurrencyDto> getConvertedCurrency(@PathVariable(\"fromCurrency\") String fromCurrency, @PathVariable(\"toCurrency\") String toCurrency, @PathVariable(\"fromAmount\") Double fromAmount) {\n\t\tCurrencyDto currencyDto = currencyService.getConvertedCurrency(fromCurrency, toCurrency, fromAmount);\n\t\treturn ResponseEntity.ok().body(currencyDto);\n\t}",
"@Override\n\tpublic Price convertToCurrency(Price price, Currency currency) {\n if (price == null || currency == null) {\n throw new IllegalArgumentException(\"Price or currency is null\");\n }\n\n\t\tBigDecimal convertRate = CurrencyRateUtils.getCurrencyRate(price.getCurrency(), currency);\n if (convertRate == null) {\n convertRate = BigDecimal.ONE;\n }\n\n BigDecimal newPrice = price.getValue().multiply(convertRate).setScale(2, RoundingMode.HALF_UP);\n price.setValue(newPrice);\n\n return price;\n\t}",
"private void convertAmount() {\r\n\t\tSystem.out.println(\"Select the currency to convert FROM.\");\r\n\t\tString currencyCodeFrom = signalThreeLetters();\r\n\t\tif (currencyCodeFrom == null){\r\n\t\t\treturn;\r\n }\r\n\t\tSystem.out.println(\"Select the currency to convert TO.\");\r\n\t\tString currencyCodeTo = signalThreeLetters();\r\n\t\tif (currencyCodeTo == null){\r\n\t\t\treturn;\r\n }\r\n //needed if-else to check if currencies is null. As currencies.getCurrencyByCode doesn't work if currencies is initially null\r\n\t\t//also if both currencies are not in the system it will say both currencies are not in the system instead of one of them\r\n if (currencies == null){\r\n \tSystem.out.println(\"\\\"\" + currencyCodeFrom +\"\\\" and \\\"\"+ currencyCodeTo+ \"\\\" is not on the system. Returning to menu.\");\r\n \treturn;}\r\n else {Currency currencyFrom = currencies.getCurrencyByCode(currencyCodeFrom);\r\n Currency currencyTo = currencies.getCurrencyByCode(currencyCodeTo);\r\n if (currencyFrom == null & currencyTo == null){\r\n \tSystem.out.println(\"\\\"\" + currencyCodeFrom +\"\\\" and \\\"\"+ currencyCodeTo+ \"\\\" is not on the system. Returning to menu.\");\r\n \treturn;}\r\n \r\n if (currencyFrom == null) {\r\n \tSystem.out.println(\"\\\"\" + currencyCodeFrom + \"\\\" is not on the system. Returning to menu.\");\r\n \treturn;}\r\n \r\n if (currencyTo == null) {\r\n \tSystem.out.println(\"\\\"\" + currencyCodeTo + \"\\\" is not on the system. Returning to menu.\");\r\n \treturn;\r\n }\r\n System.out.println();\r\n System.out.print(\"How many \" + currencyCodeFrom + \" would you like to convert to \" + currencyCodeTo + \"? Amount: \");\r\n String amountStr = keyboardInput.getLine();\r\n Amount amount = new Amount(currencyFrom, Double.parseDouble(amountStr));\r\n System.out.println();\r\n System.out.printf(\"%.2f %s = %.2f %s\", amount.getAmount(), amount.getCurrency().getCode(), \r\n amount.getAmountIn(currencyTo), currencyTo.getCode());\r\n System.out.println(); \r\n //Next line below(line167) is invokes my overloaded method\r\n System.out.println(amount.getAmountIn(currencyTo, currencyFrom));\r\n System.out.println(); \r\n \r\n\t}\r\n}",
"private BigDecimal getConversion(String toCurrency) {\n Map<String, String> urlPathVariable = new HashMap<>();\n urlPathVariable.put(\"from\", baseCurrency);\n urlPathVariable.put(\"to\", toCurrency);\n\n ResponseEntity<CurrencyConversion> responseEntity = restTemplate.getForEntity(\"http://currency-conversion/api/v1/from/{from}/to/{to}\", CurrencyConversion.class, urlPathVariable);\n return responseEntity.getBody().getConversionRate();\n }",
"private void getCurrencyConversion(String fromCurrency, String toCurrency, final String currencyValueToConvert) {\n String url = this.apiBaseUrl + \"/currency/convert/\" + currencyValueToConvert + \"/from/\" + fromCurrency + \"/to/\" + toCurrency;\n\n makeApiRequest(url);\n }",
"public static String convert(String currencyfrom, String currencyto,List<Time> times, Double amount){\n if(currencyfrom.equals(currencyto)){\n return String.format(\"%.2f\",amount);\n }\n if(times.size() > 0) { // if the time list is empty return null\n times.sort((i, j) -> i.getDate().compareTo(j.getDate())); // sort time list by its date from old to new\n for (int i = times.size()-1; i >= 0; i-=1) { // search time object from new to old\n for (int j = 0; j < times.get(i).getExchanges().size(); j += 1) { // check whether the exchange rete between these 2 currencies in this time object\n if (times.get(i).getExchanges().get(j).getFromCurrency().getName().equals(currencyfrom) && times.get(i).getExchanges().get(j).getToCurrency().getName().equals(currencyto)) {\n return String.format(\"%.2f\", amount * times.get(i).getExchanges().get(j).getRate());\n }\n }\n return \"No such exchange rate between \" + currencyfrom + \" and \" + currencyto;// if the corresponding exchange rate is not found in all time object\n }\n\n }\n return null;\n }",
"private void convert()\n {\n if (choiceBox.getValue().equals(\"US-Dollar\"))\n {\n try\n {\n double euro = DEC2FORMAT.parse(txtEuro.getText()).doubleValue();\n double dollar = currencyConverter.euroToDollar(euro);\n txtYen.setText(DEC2FORMAT.format(dollar));\n }\n catch (ParseException e)\n {\n System.out.println(e.getMessage());\n }\n }\n else\n {\n try\n {\n double euro = DEC2FORMAT.parse(txtEuro.getText()).doubleValue();\n double yen = currencyConverter.euroToYen(euro);\n txtYen.setText(DEC2FORMAT.format(yen));\n }\n catch (ParseException e)\n {\n System.out.println(e.getMessage());\n }\n }\n }",
"@Test\n\tpublic void testConvertCreditsToAmount() {\n\t\tsmsBillingImpl.convertAmountToCredits(testAmount);\n\n\t\t// Not sure how to test this properly.\n\t}",
"public BigDecimal convert(String fromCode, BigDecimal fromValue, String toCode)\n {\n if (fromCode.equals(toCode)) return fromValue; // Because conversion rates are not accurate\n\n return fromValue.divide(currencyRates.get(fromCode), 2, RoundingMode.HALF_UP).multiply(currencyRates.get(toCode));\n }",
"public abstract R convertedTo(Currency resultCurrency, ScenarioFxRateProvider rateProvider);",
"private static int convertToCents(String amount) {\n\n /* First check if the format of the amount is correct */\n if(!validAmount(amount)) {\n return -1;\n }\n\n /* Look for the dot (if there is one), to separate cents from dollars */\n int dotIdx = amount.indexOf('.');\n\n /* Calculate the number of cents */\n int numCents = 0;\n if(dotIdx != -1){\n for(int i = dotIdx+1; i < Math.min(dotIdx+3, amount.length()); i++){\n numCents = numCents*10 + amount.charAt(i) - '0';\n }\n if(numCents < 10){\n numCents *= 10;\n }\n }\n\n /* Calculate the number of dollars */\n if(dotIdx == -1){\n dotIdx = amount.length();\n }\n int numDollars = 0;\n for(int i = 0; i < dotIdx; i++){\n if(Character.isDigit(amount.charAt(i))){\n numDollars = numDollars*10 + amount.charAt(i) - '0';\n }\n }\n\n if (numDollars >= 100000) { return -2; }\n\n return numDollars*100 + numCents;\n }",
"private void updateMoney() {\n balance = mysql.getMoney(customerNumber);\n balanceConverted = (float) balance / 100.00;\n }",
"public ResponseCurrencyConversionBo converCurrency() {\n\n ResponseCurrencyConversionBo responseCurrencyConversionBo = new ResponseCurrencyConversionBo();\n\n try {\n long startTime = System.nanoTime();\n HttpClient client = HttpClientBuilder.create().build();\n String url = myPropertiesReader.getPropertyValue(\"unitconvertersUrl\");\n url = MessageFormat.format(url, requestCurrencyConversionBo.getSourceCountryCurrency(),requestCurrencyConversionBo.getTargetCountryCurrency());\n HttpGet post = new HttpGet(url);\n\n HttpResponse response = client.execute(post);\n if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {\n\n BufferedReader rd = new BufferedReader(new InputStreamReader(response.getEntity().getContent()));\n\n String finalResult = \"\";\n StringBuffer result = new StringBuffer();\n String line = \"\";\n while ((line = rd.readLine()) != null) {\n result.append(line);\n }\n\n finalResult = result.toString();\n log.info(finalResult);\n String currencyRate = finalResult.substring(finalResult.indexOf(\"<p class=\\\"bigtext\\\">\"),finalResult.lastIndexOf(\"<p class=\\\"bigtext\\\">\"));\n log.info(currencyRate);\n currencyRate = currencyRate.replace(\"<p class=\\\"bigtext\\\">\",\"\").replace(\"</p>\",\"\");\n log.info(currencyRate);\n String[] currencyRateSplitByBR = currencyRate.split(\"<br>\");\n log.info(currencyRateSplitByBR[0]);\n String finalCurrencyRate = currencyRateSplitByBR[0].split(\"=\")[1].replaceAll(\"[a-zA-Z]\", \"\").trim();\n log.info(finalCurrencyRate);\n responseCurrencyConversionBo.setCurrencyRate(finalCurrencyRate);\n }\n } catch (Exception e) {\n e.printStackTrace();\n log.error(e.getMessage());\n }\n\n return responseCurrencyConversionBo;\n }",
"public Money(BigDecimal amount, Currency currency) {\n this.amount = amount.setScale(2, RoundingMode.HALF_UP);\n this.currency = currency;\n }",
"public void setCurrency2(BigDecimal newCurrency2) {\n\tcurrency2 = newCurrency2;\n}",
"public void transferTo(double dollarAmount) {\r\n\t\tthis.accountBalance = this.accountBalance + dollarAmount;\r\n\t}",
"private String convertNanoToLocalCurrency(String amount) {\n if (amount.equals(\"0.\")) {\n return amount;\n } else {\n return localCurrencyPrice != null ?\n formatLocalCurrency(new BigDecimal(sanitizeNoCommas(amount))\n .multiply(localCurrencyPrice, MathContext.DECIMAL64)) : \"0.0\";\n }\n }",
"Currency getCurrency();",
"@PutMapping(\"/{fromWalletId}/exchange\")\n public ResponseEntity<Wallet> exchangeCurrency(@PathVariable(name = \"fromWalletId\") String fromWalletId,\n @RequestParam(name = \"toWalletId\", required = false) String toWalletId,\n @RequestBody @Valid WalletEntryTransaction walletEntryTransaction) {\n return ResponseEntity\n .ok()\n .body(walletService.exchange(fromWalletId, toWalletId, walletEntryTransaction));\n }",
"@Override\r\n\tpublic double calculate(String fromCurrency, String toCurrency,\r\n\t\t\tLong quantity) {\r\n\t\tcurrFxRatesGraph = exchngRateMapping.getCurrencyFxRatesGraph();\r\n\t\tdouble calcValue=0.00;\r\n\t\tGraphPath<String, Double> graphPath=null;\r\n\t\ttry {\r\n\t\t\tgraphPath = DijkstraShortestPath.findPathBetween(currFxRatesGraph, fromCurrency, toCurrency);\r\n\t\t\tif ( graphPath == null) {\r\n\t\t\t\tthrow new NoConversionMatchFoundException(\"No conversion pairing found for pair \"+fromCurrency+\" and \"+toCurrency);\r\n\t\t\t}else {\r\n\t\t\t\tList<Double> listOfpath = graphPath.getEdgeList();\r\n\t\t\t\t\r\n\t\t\t\tBigDecimal rate = new BigDecimal(1.00);\r\n\t\t\t\tfor (Double edge : listOfpath) {\r\n\t\t\t\t\trate = rate.multiply(BigDecimal.valueOf(edge.doubleValue()));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tcalcValue = rate.multiply(BigDecimal.valueOf(quantity)).doubleValue();\r\n\t\t\t\t\r\n\t\t\t\tString precision = currencyPrecisionConfig.getProp().getProperty(toCurrency);\r\n\t\t\t\t\r\n\t\t\t\tif(!isInvalidPrecision(precision)) {\r\n\t\t\t\t\tString frmtCalcValue = fmt.format(\"%.\"+precision+\"f\", calcValue).toString();\r\n\t\t\t\t\t\r\n\t\t\t\t\tcalcValue = Double.parseDouble(frmtCalcValue);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tlog.error(\"Precision value for currency \"+toCurrency+\" is invalid,please check \");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}catch(NoConversionMatchFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}catch(IllegalArgumentException e) {\r\n\t\t\tlog.error(\"Invalid Currency passed for calculation, Please look for option 1 & 2 to add currencies and pair in system\");\r\n\t\t}catch(Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\treturn calcValue;\r\n\t}",
"public Currency getCurrency2() {\n return _underlyingForex.getCurrency2();\n }",
"public void currencyConvertBeforeCreation() throws FortnoxException {\n\n\t\tif (isDefaultAccountingCurrency()) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// First make sure that this payment isn't booked\n\t\tif (this.voucherNumber!=null) {\n\t\t\tthrow new FortnoxException(\"Not allowed to currency convert a booked payment\");\n\t\t}\n\t\t\n\t\tif (!hasWriteOffs() && !hasAmountCurrency()) {\n\t\t\t// There's no currency amount specified to convert\n\t\t\tthrow new FortnoxException(\"There's no amount currency to convert\");\n\t\t}\n\n\t\tif (!hasCurrencyRate()) {\n\t\t\tthrow new FortnoxException(\"There's no currency rate set on the payment\");\n\t\t}\n\n\t\t// Currency convert amount(s) on write-offs\n\t\tcurrencyConvertWriteOffAmounts();\n\t\t\n\t\t// Currency convert main amount\n\t\tthis.amount = this.amountCurrency * this.currencyRate;\n\t\t\n\t}",
"@GetMapping(\"/currency-converter/from/{fromCurrency}/to/{toCurrency}/quantity/{quantity}\")\n public CurrencyConversionBean convertCurrency(@PathVariable String fromCurrency,\n @PathVariable String toCurrency,\n @PathVariable BigDecimal quantity) {\n Map<String, String> uriVariables = new HashMap<>();\n uriVariables.put(\"fromCurrency\", fromCurrency);\n uriVariables.put(\"toCurrency\", toCurrency);\n\n ResponseEntity<CurrencyConversionBean> responseEntity = new RestTemplate().getForEntity(\n \"http://localhost:8000/currency-exchange/from/{fromCurrency}/to/{toCurrency}\",\n CurrencyConversionBean.class,\n uriVariables);\n\n CurrencyConversionBean response = responseEntity.getBody();\n\n // Using Feign to solve the complex code ssee method below\n\n System.out.println(response.getTotalCalculatedAmount());\n System.out.println(response.getId());\n System.out.println(response.getFromCurrency());\n\n return new CurrencyConversionBean(\n response.getId(),\n fromCurrency,\n toCurrency,\n response.getConversionMultiple(),\n quantity,\n quantity.multiply(response.getConversionMultiple()),\n response.getPort());\n }",
"public String centsToDollar() {\n return partieEntier + \".\" +\n String.format(\"%02d\", partieFractionnaire) + \"$\";\n }",
"@Override\n public Number convert(final Number value) {\n return c2.convert(c1.convert(value));\n }",
"public abstract R convertedTo(Currency reportingCurrency, CalculationMarketData marketData);",
"@PostMapping(path = \"/conversions/ktoc\")\n public ResponseEntity convertKelvinToCelsius(@Valid @RequestBody @Nullable ConversionRequest amount) {\n if (amount == null || amount.getAmount() == null) {\n return new ResponseEntity(null , HttpStatus.INTERNAL_SERVER_ERROR);\n }\n return new ResponseEntity(amount.getAmount().add(ConverterConstants.KELVIN_TO_CELSIUS).setScale(2, RoundingMode.HALF_UP), HttpStatus.OK);\n }",
"public void setCurrency1(BigDecimal newCurrency1) {\n\tcurrency1 = newCurrency1;\n}",
"public MoneyRecMoneyConverter(double amount)\r\n\t{\r\n\t\tthis.amount = amount;\r\n\t}",
"@SOAPMethod(\"ConversionRate\")\n String conversionRate(@SOAPProperty(\"FromCurrency\") String fromCurrency,\n @SOAPProperty(\"ToCurrency\") String toCurrency);",
"public Conversion execute(Long userID, String originCurrency, String destinationCurrency, BigDecimal value) {\n Conversion conversion = getExchangeRate.execute(originCurrency, destinationCurrency);\n conversion.setOriginCurrency(originCurrency);\n conversion.setOriginAmount(value);\n conversion.setDestinationCurrency(destinationCurrency);\n conversion.setDestinationAmount(conversion.getExchangeRate().multiply(conversion.getOriginAmount()));\n conversion.setUserID(userID);\n conversionRepository.save(conversion);\n return conversion;\n }",
"void setCurrency(Currency currency);",
"public interface CurrencyConvertible<R> {\n\n /**\n * Returns a copy of the object with any currency amounts converted into the reporting currency.\n *\n * @param reportingCurrency the currency into which all currency amounts should be converted\n * @param marketData market data for multiple scenarios containing any FX rates needed to perform the conversion\n * @return a copy of the object with any currency amounts converted into the reporting currency\n */\n public abstract R convertedTo(Currency reportingCurrency, CalculationMarketData marketData);\n\n}",
"public String conversion() {\n try {\n transactionFailure = null;\n amountConverted = converterFacade.conversion(fromCurrencyCode,\n toCurrencyCode, amountToConvert);\n } catch (Exception e) {\n handleException(e);\n }\n return jsf22Bugfix();\n }",
"public Currency getCurrency1() {\n return _underlyingForex.getCurrency1();\n }",
"public int transfer(String fromAccNum, String toAccNum, double amount) {\n String output; \n\n Account fromAcc = bank.retrieveAccount(fromAccNum); \n Account toAcc = bank.retrieveAccount(toAccNum);\n\n if (fromAcc.getBalance() >= amount) {\n fromAcc.deduct(amount);\n toAcc.add(amount); \n \n return 0;\n }\n return -1; \n\n\n }",
"public interface CurrencyExchangeInterface {\n float changeCurrency(float price, Currency $toConvert);\n}",
"String getTradeCurrency();",
"public Currency(String country,double value, double valueUSD){\n this.country = country;\n this.value = value;\n this.valueUSD = valueUSD;\n}",
"public BigDecimal getCurrency2() {\n\treturn currency2;\n}",
"@GetMapping(\"/currency-converter-feign/from/{fromCurrency}/to/{toCurrency}/quantity/{quantity}\")\n public CurrencyConversionBean convertCurrencyFeign(@PathVariable String fromCurrency,\n @PathVariable String toCurrency,\n @PathVariable BigDecimal quantity) {\n\n // Use the proxy to get data from the currency exchange service\n CurrencyConversionBean response = proxy.retrieveExchangeValue(fromCurrency, toCurrency);\n\n logger.info(\"{}\", response);\n\n return new CurrencyConversionBean(\n response.getId(),\n fromCurrency,\n toCurrency,\n response.getConversionMultiple(),\n quantity,\n quantity.multiply(response.getConversionMultiple()),\n response.getPort());\n }",
"public BigDecimal getConversionRate(Currency fromCurrency, Currency toCurrency) \n throws CurrencyLookupException {\n verifyNonNullArg(fromCurrency, \"fromCurrency\");\n verifyNonNullArg(toCurrency, \"toCurrency\");\n BigDecimal numDollarsFrom = getUSDPerUnitOf(fromCurrency);\n BigDecimal numDollarsTo = getUSDPerUnitOf(toCurrency);\n return numDollarsFrom.divide(numDollarsTo, new MathContext(2, RoundingMode.HALF_UP));\n }",
"private static Number convert(Number value, UnitConverter cvtr,\r\n \t\t\tMathContext ctx) {\r\n \t\tif (cvtr instanceof RationalConverter) { // Try converting through Field\r\n \t\t\t\t\t\t\t\t\t\t\t\t\t// methods.\r\n \t\t\tRationalConverter rCvtr = (RationalConverter) cvtr;\r\n \t\t\tBigInteger dividend = rCvtr.getDividend();\r\n \t\t\tBigInteger divisor = rCvtr.getDivisor();\r\n \t\t\tif (dividend.abs().compareTo(BigInteger.valueOf(Long.MAX_VALUE)) > 0)\r\n \t\t\t\tthrow new ArithmeticException(\"Multiplier overflow\"); //$NON-NLS-1$\r\n \t\t\tif (divisor.compareTo(BigInteger.valueOf(Long.MAX_VALUE)) > 0)\r\n \t\t\t\tthrow new ArithmeticException(\"Divisor overflow\"); //$NON-NLS-1$\r\n\t\t\tif (value instanceof BigInteger || value instanceof Long || value instanceof Integer) {\r\n\t\t\t\treturn (value.longValue() * dividend.longValue())\r\n \t\t\t\t\t/ (divisor.longValue());\r\n\t\t\t} else {\r\n\t\t\t\treturn (value.doubleValue() * dividend.doubleValue())\r\n\t\t\t\t\t/ (divisor.doubleValue());\r\n\t\t\t\t// TODO use actual BigDecimal methods for BigDecimal\r\n\t\t\t}\r\n \t\t} else if (cvtr instanceof AbstractConverter.Compound\r\n \t\t\t\t&& cvtr.isLinear()) { // Do it in two parts.\r\n \t\t\tAbstractConverter.Compound compound = (AbstractConverter.Compound) cvtr;\r\n \t\t\tNumber firstConversion = convert(value, compound.getRight(), ctx);\r\n \t\t\tNumber secondConversion = convert(firstConversion,\r\n \t\t\t\t\tcompound.getLeft(), ctx);\r\n \t\t\treturn secondConversion;\r\n \t\t} else { // Try using BigDecimal as intermediate.\r\n \t\t\tBigDecimal decimalValue = BigDecimal.valueOf(value.doubleValue());\r\n \t\t\tBigDecimal newValue = cvtr.convert(decimalValue, ctx);\r\n \t\t\treturn newValue;\r\n \t\t\t// if (((FieldNumber)value) instanceof Decimal)\r\n \t\t\t// return (N)((FieldNumber)Decimal.valueOf(newValue));\r\n \t\t\t// if (((FieldNumber)value) instanceof Float64)\r\n \t\t\t// return (N)((FieldNumber)Float64.valueOf(newValue.doubleValue()));\r\n \t\t\t// throw new ArithmeticException(\r\n \t\t\t// \"Generic amount conversion not implemented for amount of type \" +\r\n \t\t\t// value.getClass());\r\n \t\t}\r\n \t}",
"double requestCurrentRate(String fromCurrency,\n String toCurrency);",
"public Decimal toDecimalForm() {\n return amount.movePoint(-2);\n }",
"@Override\n public double convert(final double value) {\n return c2.convert(c1.convert(value));\n }",
"private String currencyFormat(BigDecimal amount) {\n return NumberFormat.getCurrencyInstance(getLocalCurrency().getLocale()).format(amount);\n }",
"public interface ICurrencyExchangeService {\n/**\n * Requests the current exchange rate from one currency\n * to another.\n * @param fromCurrency the original Currency\n * @param toCurrency the 'destination' or final Currency\n * @return the currency exchange rate\n */\n\n double requestCurrentRate(String fromCurrency,\n String toCurrency);\n}",
"Uom getOrigCurrencyUom();",
"public void setCurrency(CurrencyVO newCurrency) {\n\tcurrency = newCurrency;\n}",
"@GetMapping(\"/currency-converter/from/{from}/to/{to}/quantity/{quantity}\")\n\tpublic CurrencyConversionBean convertCurrency(@PathVariable String from, @PathVariable String to,@PathVariable BigDecimal quantity) {\n\t\ttry {\n\t\tMap<String,String> requestVariable=new HashMap<String,String>();\n\t\trequestVariable.put(\"from\", from);\n\t\trequestVariable.put(\"to\", to);\n\t\t\n\t\tResponseEntity<CurrencyConversionBean> responseEntity = new RestTemplate().\n\t\t\t\tgetForEntity(\"http://localhost:8001/currency-exchange/from/{from}/to/{to}\", CurrencyConversionBean.class,requestVariable);\n\t\t\n\t\tCurrencyConversionBean response = responseEntity.getBody();\n\t\tSystem.out.println(\"------------response:-\"+response);\n\t\tCurrencyConversionBean currencyConversionBean=new CurrencyConversionBean(response.getId(),from,to,response.getConversionMultiple(),quantity,quantity.multiply(response.getConversionMultiple()),response.getPort());\n\n\t\treturn currencyConversionBean;\n\t\t\n\t\t}catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\n\t\treturn null;\n\t}",
"@GetMapping(\"/currency-converter-feign/from/{from}/to/{to}/quantity/{quantity}\")\n\tpublic CurrencyConversionBean convertCurrencyFeign(@PathVariable String from, @PathVariable String to,\n\t\t\t@PathVariable BigDecimal quantity) {\n\t\ttry {\n\t\tCurrencyConversionBean response = proxy.retrieveExchangeValue(from, to);\n\t\tSystem.out.println(\"Response from Currency Exchange Service:- \"+response);\n\t\t\n\t\tCurrencyConversionBean currencyConversionBean=new CurrencyConversionBean(response.getId(), from, to, response.getConversionMultiple(), quantity,\n\t\t\t\tquantity.multiply(response.getConversionMultiple()), response.getPort());\n\t\tSystem.out.println(\"Result from Currency Conversion service:- \"+currencyConversionBean);\n\t\treturn currencyConversionBean;\n\t\t}catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}",
"@Override\npublic Currency getCurrency() {\n\treturn balance.getCurrency();\n}",
"public Price currencyCode(String currencyCode) {\n this.currencyCode = currencyCode;\n return this;\n }",
"public Money convert(Money money, Currency currency) throws NoSuchExchangeRateException {\n\n if (money.currency == currency) {\n return money;\n }else {\n Option<CurrencyExchangeRate> rate = directRateFor(money.currency, currency);\n if (!rate.isEmpty()) {\n return rate.get().convert(money);\n } else {\n if (allowIndirectConversions) {\n Option<CurrencyExchangeRate> crossRate = indirectRateFor(money.currency, currency);\n if (!crossRate.isEmpty()) {\n return crossRate.get().convert(money);\n } else {\n throw new NoSuchExchangeRateException(String.format(\"Rate for currency pair %s / %s)\", money.currency, currency));\n }\n }\n }\n }\n throw new NoSuchExchangeRateException(String.format(\"Rate for currency pair %s / %s)\", money.currency, currency)); \n }",
"public void transferMoney(float amount, String transferToNumber) {}",
"@Override\n\tpublic CurrencyConversionBean calculateConversionAmount(CurrencyConversionRequest currencyConversionRequestRequest) {\n\t\treturn new CurrencyConversionBean(currencyConversionRequestRequest.getAmount(), currencyConversionRequestRequest.getFromcurrency(),currencyConversionRequestRequest.getToCurrency());\n\t}",
"Uom getCurrencyUom();",
"public static String formatCurrency( double amt ) {\n return formatCurrency( amt, 2 );\n }",
"public MoneyTransfer(BigDecimal amount, Long sourceAccountId, Long targetAccountId) {\n this.amount = amount;\n this.sourceAccountId = sourceAccountId;\n this.targetAccountId = targetAccountId;\n }",
"public interface FxConversionService {\n\n /**\n * This will convert the Base Currency into it's Term Currency and multiply the amount.\n *\n * @param baseCurrencyCode {@link String} the Base Currency Code\n * @param termCurrencyCode {@link String} the Term Currency Code\n * @param amount {@link Double} the amount to be converted\n *\n * @return {@link BigDecimal} the converted amount.\n * */\n BigDecimal convert(String baseCurrencyCode, String termCurrencyCode, BigDecimal amount);\n}",
"public interface ExchangeRateService {\n BigDecimal exchange(Currency curr1, Currency curr2, BigDecimal amount);\n}",
"public double depositInto(double amount)\r\n {\r\n _balance += amount;\r\n\r\n return _balance;\r\n }",
"public void setCurrency(CurrencyUnit currency) {\r\n this.currency = currency;\r\n }",
"public BigDecimal getCurrency1() {\n\treturn currency1;\n}",
"String getSettlementCurrency();",
"public CurrencyTransferResponse(CurrencyTransferResponse other) {\n if (other.isSetStatus()) {\n this.status = other.status;\n }\n if (other.isSetDescription()) {\n this.description = other.description;\n }\n if (other.isSetSourceCharged()) {\n this.sourceCharged = new CurrencyAmount(other.sourceCharged);\n }\n if (other.isSetTargetDeposit()) {\n this.targetDeposit = new CurrencyAmount(other.targetDeposit);\n }\n }",
"public static void setReferenceCurrency(Currency currency) {\n REFERENCE.set(currency);\n TO_REFERENCE.clear();\n TO_REFERENCE.put(currency.getCode(), 1.0);\n }",
"public void setCurrency(Currency usd) {\n\t\t\n\t}",
"public Currency getCurrency();",
"public Builder mergeCurrency(Pokemon.Currency value) {\n if (currencyBuilder_ == null) {\n if (((bitField0_ & 0x00000400) == 0x00000400) &&\n currency_ != Pokemon.Currency.getDefaultInstance()) {\n currency_ =\n Pokemon.Currency.newBuilder(currency_).mergeFrom(value).buildPartial();\n } else {\n currency_ = value;\n }\n onChanged();\n } else {\n currencyBuilder_.mergeFrom(value);\n }\n bitField0_ |= 0x00000400;\n return this;\n }",
"public boolean changeAmountBy(Money Other);",
"private Account debitAmount(String accountNumber, BigDecimal amt) throws TransferServiceException\n\t{\n\t\tAccount account = repository.findByAccountNumber(accountNumber);\n\t\tisAccountValid(account);\n\t\taccount.setBalance(getBalance(accountNumber).subtract(amt));\n\t\treturn account;\n\t}",
"@Deprecated\n/* */ public double convert(double amount, LengthUnit otherUnit) {\n/* 45 */ Dx Dx2 = new Dx(amount, otherUnit);\n/* 46 */ return Dx2.convertTo(this).getValue();\n/* */ }",
"double getMoney();",
"public void makeTrans(final double newAmount) {\n this.amount = newAmount;\n balance = balance + amount;\n }",
"@Test\n\tpublic void testConvertAmountToCredits() {\n\t\tdouble amount = smsBillingImpl.convertCreditsToAmount(testCredits);\n\t\tdouble credits = smsBillingImpl.convertAmountToCredits(amount);\n\t\tAssert.assertTrue(credits == testCredits);\n\t}",
"private double usdToBitcoin(double usd) {\n return usd/(usd + 120);\n }",
"public String getCurrency() {\n return this.currency;\n }",
"private Integer toAmountCents(final BigDecimal input) {\n return input.multiply(ONE_HUNDRED).intValue();\n }",
"public static double converToDolar(double quantity, String currency){\n //MXN(mexicanos) COP(colombiano) ARG\n switch (currency){\n case \"MXN\":\n quantity = quantity*0.052;\n break;\n case \"COP\":\n quantity=quantity*0.00031;\n break;\n case \"ARG\":\n quantity = quantity*0.011;\n break;\n\n }\n return quantity;\n }",
"@Override\n public String toString() {\n return \"\" + currency + amount;\n }",
"public void setCurrency(String currency) {\n this.currency = currency;\n }",
"public void setCurrency(String currency) {\n this.currency = currency;\n }",
"public String getCurrency1() {\r\n\t\treturn currency1;\r\n\t}",
"public double calcDollarAmount(double euroAmount, double exchangeRate) {\n return Math.ceil(euroAmount * exchangeRate * 100) / 100;\n\n }",
"protected BigDecimal vatAmountFromNet(BigDecimal netAmount) {\r\n\t\treturn netAmount.multiply((vatRate.add(BigDecimal.ONE)));\r\n\t}",
"@PostMapping(path = \"/conversions/ctoc\")\n public ResponseEntity convertCelsiusToKelvin(@Valid @RequestBody @Nullable ConversionRequest amount) {\n if (amount == null || amount.getAmount() == null) {\n return new ResponseEntity(null , HttpStatus.INTERNAL_SERVER_ERROR);\n }\n return new ResponseEntity(amount.getAmount().subtract(ConverterConstants.KELVIN_TO_CELSIUS).setScale(2, RoundingMode.HALF_UP), HttpStatus.OK);\n }",
"public void setCurrencyID(String value) {\n this.currencyID = value;\n }",
"public double pay(double amountPaid,String currency){\n \n saleDTO = sale.createSaleDTO();\n paymentDTO = new PaymentDTO(amountPaid,currency);\n double change = Math.round((paymentDTO.getAmountPaid() - saleDTO.getTotalPrice()) * 100.0) / 100.0;\n\n cashRegister.updateAmountInRegister(amountPaid - change);\n return change;\n\n }"
]
| [
"0.680981",
"0.6669819",
"0.6628894",
"0.6617617",
"0.64961064",
"0.6484248",
"0.6389443",
"0.6377734",
"0.63483715",
"0.6247515",
"0.6230378",
"0.61945105",
"0.6168611",
"0.6153063",
"0.61444354",
"0.6117326",
"0.60470796",
"0.6013369",
"0.60031366",
"0.5975377",
"0.5962197",
"0.5956794",
"0.586058",
"0.58488435",
"0.5844924",
"0.5819449",
"0.5798588",
"0.5796664",
"0.5783911",
"0.5782228",
"0.5768937",
"0.5748867",
"0.5746081",
"0.57132816",
"0.5672233",
"0.5667144",
"0.5664482",
"0.56623155",
"0.5611781",
"0.56095386",
"0.55861866",
"0.5544086",
"0.5522591",
"0.5509827",
"0.55041903",
"0.55021006",
"0.5500866",
"0.5500532",
"0.55001324",
"0.5499394",
"0.5497476",
"0.5484909",
"0.5466336",
"0.54580325",
"0.54345894",
"0.5430601",
"0.5426642",
"0.5422788",
"0.5393408",
"0.5379164",
"0.53775907",
"0.53759915",
"0.5371126",
"0.5350377",
"0.5346871",
"0.53441983",
"0.5338372",
"0.53373194",
"0.53343123",
"0.5332305",
"0.53084075",
"0.5301562",
"0.5299536",
"0.52989995",
"0.5297523",
"0.5290982",
"0.5284632",
"0.5282293",
"0.5278175",
"0.5274376",
"0.52631444",
"0.5253926",
"0.52499515",
"0.5249043",
"0.5241272",
"0.5241191",
"0.52267957",
"0.52255327",
"0.5221265",
"0.5218856",
"0.52180773",
"0.5207767",
"0.5202484",
"0.5202484",
"0.51922125",
"0.518434",
"0.51680565",
"0.5162982",
"0.51552945",
"0.51548666"
]
| 0.69905895 | 0 |
Format a some amount to a string representation of that amount. | public String format(float amount, boolean includeSymbol) {
DecimalFormat decimalFormat = new DecimalFormat();
decimalFormat.setGroupingUsed(false);
decimalFormat.setMaximumFractionDigits(precision);
String formattedAmount = decimalFormat.format(amount);
if(includeSymbol)
formattedAmount = symbol + formattedAmount;
return formattedAmount;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String format(double balance);",
"protected static String getAmountFormat(String amount) {\n\t\tStringBuilder strBind = new StringBuilder(amount);\n\t\tstrBind.append(\".00\");\n\t\treturn strBind.toString();\n\t}",
"private String getFormattedAmount(final BigDecimal amount) {\n final java.text.DecimalFormat decFormat = new java.text.DecimalFormat(\"0.00\");\n return \"$\" + decFormat.format(amount);\n }",
"public static String formatAmount(double amount)throws Exception {\n\tNumberFormat formatter = NumberFormat.getCurrencyInstance(Locale.US);\n\treturn formatter.format(amount);\n }",
"public static String formatCurrency( double amt ) {\n return formatCurrency( amt, 2 );\n }",
"public String formatMoney(BigDecimal amount) {\n String result = \"\";\n if (amount != null) {\n try {\n result = moneyFormat.valueToString(amount);\n } catch (ParseException ex) {\n }\n }\n return result;\n }",
"public String format(double number);",
"public static String formatQuantity(int quantity) {\n return formatQuantity((double) quantity);\n }",
"public static String formatQuantity(Double quantity) {\n if (quantity == null)\n return \"\";\n else\n return formatQuantity(quantity.doubleValue());\n }",
"public static String formatQuantity(double quantity) {\n return quantityDecimalFormat.format(quantity);\n }",
"public static String formatDoubleAmount(double amount){\n NumberFormat formatter = new DecimalFormat(\"$#,###,##0.00;($#,###,##0.00)\");\n return formatter.format(amount); \n }",
"public static String getFormattedAmount(double amount) {\n DecimalFormat df = new DecimalFormat(\".00\");\n String formattedAmount = df.format(amount).replaceAll(\",\", \"\")\n .replaceAll(\"\\\\.\", \"\");\n return formattedAmount;\n }",
"private String currencyFormat(BigDecimal amount) {\n return NumberFormat.getCurrencyInstance(getLocalCurrency().getLocale()).format(amount);\n }",
"public static String format(double amount) {\n DecimalFormat formatter = new DecimalFormat(\"#,##0.00\");\n String formatted = formatter.format(amount);\n\n if (formatted.endsWith(\".\")) {\n formatted = formatted.substring(0, formatted.length() - 1);\n }\n\n return Common.formatted(formatted, Constants.Nodes.Major.getStringList(), Constants.Nodes.Minor.getStringList());\n }",
"public String getAmountString() {\n return amount + \"\";\n }",
"@Override\n public String toString() {\n return \"\" + currency + amount;\n }",
"public static String formatMoney(BigDecimal value) {\n if (value != null) {\n return DEFAULT_DECIMAL_FORMAT.format(value);\n }\n return \"R$ -\";\n }",
"private String formatNumber(BigDecimal num) {\n return num.toPlainString();\n }",
"private static String convertToFormat(int number) {\n int cents = number%100;\n number /= 100;\n return \"$\" + String.valueOf(number) + \".\" + String.valueOf(cents);\n }",
"public String floatToString(float amount){\n return Float.toString(amount);\n }",
"public static String formatQuantity(Integer quantity) {\n if (quantity == null)\n return \"\";\n else\n return formatQuantity(quantity.doubleValue());\n }",
"public static String formatQuantity(Float quantity) {\n if (quantity == null)\n return \"\";\n else\n return formatQuantity(quantity.doubleValue());\n }",
"public static String formatCurrency(double amt) {\n\t\tNumberFormat formatter = NumberFormat.getCurrencyInstance();\n\t\treturn formatter.format(amt);\n\t}",
"R format(O value);",
"public String format(Object value);",
"@Override\n public String toString() {\n return name+\" : \"+ CommonUtils.formatCurrency(amount);\n }",
"public static String formatQuantity(long quantity) {\n return formatQuantity((double) quantity);\n }",
"public static String formatQuantity(float quantity) {\n return formatQuantity((double) quantity);\n }",
"private String moneyFormat(String money)\n {\n if(money.indexOf('.') == -1)\n {\n return \"$\" + money;\n }\n else\n {\n String dec = money.substring(money.indexOf('.')+1 , money.length());\n if(dec.length() == 1)\n {\n return \"$\" + money.substring(0, money.indexOf('.')+1) + dec + \"0\";\n }\n else\n {\n return \"$\" + money.substring(0, money.indexOf('.')+1) + dec.substring(0,2);\n }\n }\n }",
"public static String amountToStr(long amount) {\r\n String amountStr = Long.toString(amount);\r\n int taille, reste, three;\r\n String montantStr = \"\", montant = amountStr + \"\";\r\n taille = montant.length();\r\n three = taille - 3;\r\n\r\n while (taille > 3) {\r\n reste = taille - 3;\r\n montantStr = montant.substring(reste, taille) + \" \" + montantStr;\r\n montant = montant.substring(0, reste);\r\n taille = montant.length();\r\n }\r\n montantStr = montant.substring(0, taille) + \" \" + montantStr;\r\n return montantStr;\r\n }",
"protected abstract String format();",
"String format(T value);",
"public static String formatQuantity(Long quantity) {\n if (quantity == null)\n return \"\";\n else\n return formatQuantity(quantity.doubleValue());\n }",
"public static String formatPrice(Double price) {\n if (price == null) return \"\";\n return formatPrice(price.doubleValue());\n }",
"@Override\n\tpublic String toString() {\n\t\treturn amount + \" \" + currency; \n\t}",
"private String formatAmount(int roomNum) {\n\t\tint total = getHotel().getRoom(roomNum).getTotalBeds();\n\t\treturn String.format(\"| Total Beds:\\t|\\t%s\\t\\t\\t\\t|\", total);\n\t}",
"private String nanoFormat(String amount) {\n BigDecimal amountBigDecimal;\n try {\n amountBigDecimal = new BigDecimal(sanitizeNoCommas(amount));\n } catch(NumberFormatException e) {\n return amount;\n }\n\n if (amountBigDecimal.compareTo(new BigDecimal(0)) == 0) {\n return amount;\n } else {\n String decimal;\n String whole;\n String[] split = amount.split(\"\\\\.\");\n if (split.length > 1) {\n // keep decimal length at 10 total\n whole = split[0];\n decimal = split[1];\n decimal = decimal.substring(0, Math.min(decimal.length(), MAX_NANO_DISPLAY_LENGTH));\n\n // add commas to the whole amount\n if (whole.length() > 0) {\n DecimalFormat df = new DecimalFormat(\"#,###\");\n whole = df.format(new BigDecimal(sanitizeNoCommas(whole)));\n }\n\n amount = whole + \".\" + decimal;\n } else if (split.length == 1) {\n // no decimals yet, so just add commas\n DecimalFormat df = new DecimalFormat(\"#,###\");\n amount = df.format(new BigDecimal(sanitizeNoCommas(amount)));\n }\n return amount;\n }\n }",
"private String format(double number, NFRuleSet ruleSet)\n/* */ {\n/* 1731 */ StringBuffer result = new StringBuffer();\n/* 1732 */ ruleSet.format(number, result, 0);\n/* 1733 */ postProcess(result, ruleSet);\n/* 1734 */ return result.toString();\n/* */ }",
"public StringBuffer format(com.ibm.icu.math.BigDecimal number, StringBuffer toAppendTo, FieldPosition pos)\n/* */ {\n/* 1162 */ return format(number.doubleValue(), toAppendTo, pos);\n/* */ }",
"private String getFormattedPrice(double unformattedPrice) {\n String formattedData = String.format(\"%.02f\", unformattedPrice);\n return formattedData;\n }",
"private String formatUsNumber(Editable text) {\n\t\tStringBuilder cashAmountBuilder = null;\n\t\tString USCurrencyFormat = text.toString();\n//\t\tif (!text.toString().matches(\"^\\\\$(\\\\d{1,3}(\\\\,\\\\d{3})*|(\\\\d+))(\\\\.\\\\d{2})?$\")) { \n\t\t\tString userInput = \"\" + text.toString().replaceAll(\"[^\\\\d]\", \"\");\n\t\t\tcashAmountBuilder = new StringBuilder(userInput);\n\n\t\t\twhile (cashAmountBuilder.length() > 3 && cashAmountBuilder.charAt(0) == '0') {\n\t\t\t\tcashAmountBuilder.deleteCharAt(0);\n\t\t\t}\n\t\t\twhile (cashAmountBuilder.length() < 3) {\n\t\t\t\tcashAmountBuilder.insert(0, '0');\n\t\t\t}\n\t\t\tcashAmountBuilder.insert(cashAmountBuilder.length() - 2, '.');\n\t\t\tUSCurrencyFormat = cashAmountBuilder.toString();\n\t\t\tUSCurrencyFormat = Util.getdoubleUSPriceFormat(Double.parseDouble(USCurrencyFormat));\n\n//\t\t}\n\t\tif(\"0.00\".equals(USCurrencyFormat)){\n\t\t\treturn \"\";\n\t\t}\n\t\tif(!USCurrencyFormat.contains(\"$\"))\n\t\t\treturn \"$\"+USCurrencyFormat;\n\t\treturn USCurrencyFormat;\n\t}",
"@Override\n protected String formatValue(Object value) {\n String formatted = \"float\".equals(format) ? formatWithDigits(value, this.digits) : String.valueOf(value);\n return formatted + \" \" + this.unitText;\n }",
"private static String formatCost(double cost) {\n\t\tif (cost <= 1d)\n\t\t\treturn new Double(cost).toString();\n\n\t\treturn \"NaN\";\n\t}",
"@Override\n public String toString () {\n DecimalFormat df= new DecimalFormat(\"####0.00\");\n return \"- $\"+df.format(amount) + \" |\" + entryType.getTypeName() + \"| \" + enterTime;\n }",
"public abstract String format(T t);",
"public String payFormat(double pay){\n String pattern = \"###,###,##0.00\";\n DecimalFormat maxTwoDecimals = new DecimalFormat(pattern);\n return maxTwoDecimals.format(pay);\n }",
"@Override\n public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {\n int number = ((Number) obj).intValue();\n return new StringBuffer(\"$\" + number);\n }",
"public static String formatAmountValue(String amount) {\r\n\t\tif(amount!=null){\r\n\t\t\t\t// Remove commas from the amount\r\n\t\t\t\tamount = amount.replaceAll(\",\", \"\");\r\n\t\t\t\t// Remove dollar sign from amount\r\n\t\t\t\tamount = amount.replaceAll(\"$\", \"\");\r\n\t\t\t\t\r\n\t\t\t\t// Remove double quotes\r\n\t\t\t\tamount = amount.replaceAll(\"\\\"\", \"\");\r\n\t\t\t\t// Remove single quotes\r\n\t\t\t\tamount = amount.replaceAll(\"\\'\", \"\");\r\n\t\t }\r\n\t\treturn amount;\r\n\t}",
"public static String formatPrice(double price) {\n return priceDecimalFormat.format(price);\n }",
"@VTID(8)\r\n java.lang.String format();",
"public StringBuffer format(BigInteger number, StringBuffer toAppendTo, FieldPosition pos)\n/* */ {\n/* 1137 */ return format(new com.ibm.icu.math.BigDecimal(number), toAppendTo, pos);\n/* */ }",
"public String formatNumber( Number nNumber )\r\n\t{\r\n\t\treturn\tdf.format( nNumber.doubleValue() );\r\n\t}",
"public StringBuffer format(java.math.BigDecimal number, StringBuffer toAppendTo, FieldPosition pos)\n/* */ {\n/* 1149 */ return format(new com.ibm.icu.math.BigDecimal(number), toAppendTo, pos);\n/* */ }",
"private static String format2(double d) {\n return new DecimalFormat(\"#.00\").format(d);\n }",
"public static String decimalNumberFormat(BigDecimal subsidyFullAmountExact) {\n\t\tDecimalFormat numberFormat = new DecimalFormat(\"###,###.##\");\n\t\treturn numberFormat.format(subsidyFullAmountExact.longValue());\n\t}",
"public static String FormatNumber(int i) {\n\t\ttry {\n\t\t\tif (i >= 0 && i < 10)\n\t\t\t\treturn \"0\" + i;\n\t\t\telse\n\t\t\t\treturn \"\" + i;\n\t\t} catch (Exception e) {\n\t\t\treturn \"\";\n\t\t}\n\t}",
"public String getDollarString()\n\t{\n\t\treturn String.format(\"%01.2f\", (float)CurrentValue/100.0f);\n\t}",
"public static String formatValue(final long l) {\n return (l > 1_000_000) ? String.format(\"%.2fm\", ((double) l / 1_000_000))\n : (l > 1000) ? String.format(\"%.1fk\", ((double) l / 1000))\n : l + \"\";\n }",
"public String toString() {\n return \"$\"+getDollars() +\".\"+ getCents();\n }",
"public static void main(String[] args){\n NumberFormat currency = NumberFormat.getCurrencyInstance();\n String result =currency.format(123456.789);//A method for formatting values\n System.out.println(result);\n }",
"public String format(int value) {\n\t\t\tmArgs[0] = value;\n\t\t\tmBuilder.delete(0, mBuilder.length());\n\t\t\tmFmt.format(\"%02d\", mArgs);\n\t\t\treturn mFmt.toString();\n\t\t}",
"@Override\n public String toString() {\n String printString;\n if (cents == 0) {\n printString = String.format(\"$%d.00\", dollars);\n } else {\n printString = String.format(\"$%d.%d\", dollars, cents);\n }\n return printString;\n }",
"private String format(long number, NFRuleSet ruleSet)\n/* */ {\n/* 1756 */ StringBuffer result = new StringBuffer();\n/* 1757 */ ruleSet.format(number, result, 0);\n/* 1758 */ postProcess(result, ruleSet);\n/* 1759 */ return result.toString();\n/* */ }",
"@Override\n public String toString (int num)\n {\n String format = \"Weekly pay for %s, %s employee id %s is $%.2f\\n\";\n return String.format(format, this.getLastName(), this.getFirstName(), this.getId(), this.calculatePay());\n }",
"public static String formatNumber(double num) {\n\t\tNumberFormat.getNumberInstance(Locale.US).format(35634646);\n\t\tNumberFormat formatter = NumberFormat.getNumberInstance(Locale.US);\n\t\treturn formatter.format(num);\n\t}",
"public static String formatWhole(int x) {\n return String.format(\"%,d\", x);\n }",
"public static String formatNumber(double number) {\n String pattern = \"###,###\";\n DecimalFormat myFormatter = new DecimalFormat(pattern);\n String output = myFormatter.format(number);\n return output;\n }",
"public static String formatMoney(BigInteger valueInCents) {\n return formatMoney(MathUtil.divide(new BigDecimal(valueInCents), MathUtil.HUNDRED));\n }",
"public static String getDisplayCurrencyFormatSimple(double val) {\n\n\t\tjava.text.NumberFormat format = new java.text.DecimalFormat(\"#.##\");\n\t\tformat.setMaximumFractionDigits(2);\n\n\t\treturn format.format(val);\n\n\t}",
"@Override\n\tpublic String toString() {\n\t\tdouble value = getValue();\n\t\tint round = (int)(value* 1000);\n\t\tvalue = ((double)round)/1000; \n\t\tif (value >= 0)\n\t\t\treturn \"+\" + value;\n\t\telse\n\t\t\treturn \"\" + value;\n\t}",
"private static String formatDouble(final double value) {\n\t\treturn String.format(\"%.5f\", value);\n\t}",
"public static String toCoinFormat(Object obj) {\r\n\t\ttry {\r\n\t\t\twhile (obj.toString().length() < 4) {\r\n\t\t\t\tobj = \"0\" + obj;\r\n\t\t\t}\r\n\t\t\tString objStr = obj.toString();\r\n\t\t\tint length = objStr.length();\r\n\t\t\tString yuan = objStr.substring(0, length - 2);\r\n\t\t\tif (yuan.equals(\"00\")) {\r\n\t\t\t\tyuan = \"0\";\r\n\t\t\t} else if (yuan.length() > 1 && yuan.substring(0, 1).equals(\"0\")) {\r\n\t\t\t\tyuan = yuan.substring(1, yuan.length());\r\n\t\t\t}\r\n\t\t\tString fen = objStr.substring(length - 2, length);\r\n\t\t\tif (fen.equals(\"00\")) {\r\n\t\t\t\tfen = \"\";\r\n\t\t\t} else if (fen.length() == 2 && fen.substring(1, 2).equals(\"0\")) {\r\n\t\t\t\tfen = \".\" + fen.substring(0, 1);\r\n\t\t\t} else {\r\n\t\t\t\tfen = \".\" + fen;\r\n\t\t\t}\r\n\t\t\treturn yuan + fen;\r\n\t\t} catch (Exception a) {\r\n\t\t\treturn \"0\";\r\n\t\t}\r\n\t}",
"@Override\n public String pay(int amount) {\n return (amount +\" paid with credit/debit card.\");\n }",
"protected String formatValue (Object value)\n {\n return String.valueOf(value);\n }",
"private String format(double number) {\r\n boolean farAway = (number != 0.0d && Math.abs(number) < 0.01d) ||\r\n Math.abs(number) > 99.0d;\r\n return (farAway ? secondFormatter : mainFormatter).format(number);\r\n }",
"public static String formatAmountInCents(long amountInCents)\r\n\t{\n\t\treturn Currency.getInstance(\"EUR\").getSymbol() + \" \" + penniesToString(amountInCents);\r\n\t}",
"public static String format(long value) {\n if (value == Long.MIN_VALUE)\n {\n return format(Long.MIN_VALUE + 1);\n }\n // Negative value, should not be used\n if (value < 0)\n {\n return \"-\" + format(-value);\n }\n // Value doesn't need to be truncated\n if (value < 1000)\n {\n return Long.toString(value); //deal with easy case\n }\n\n // Retrieve the suffix to put at the end of the string, and the divideBy value to trunc the value\n Map.Entry<Long, String> e = suffixes.floorEntry(value);\n Long divideBy = e.getKey();\n String suffix = e.getValue();\n\n long truncated = value / (divideBy / 10); //the number part of the output times 10\n boolean hasDecimal = truncated < 100 && (truncated / 10d) != (truncated / 10);\n if (hasDecimal) {\n return (truncated / 10d) + suffix;\n }\n else {\n return (truncated / 10) + suffix;\n }\n }",
"public String toString(Locale locale, boolean displayHTML) {\n NumberFormat nf = NumberFormat.getCurrencyInstance(locale);\n nf.setCurrency(getCurrency());\n String s = nf.format(getAmount());\n\n if (displayHTML) {\n s = StringEscapeUtils.escapeHtml(s);\n }\n return s;\n }",
"public static String format(double value) {\n \tif(Double.valueOf(value).equals(Double.NaN)) return \"NaN\";\n \t\n if (value == 0) {\n return basicFormat.format(value);\n } else if (Math.abs(value) < 1E-4 || Math.abs(value) > 1E6)\n return scienceFormat.format(value);\n else\n return basicFormat.format(value);\n }",
"public String toDisplay(){\n\t\treturn String.format(\"%s | %c | %.2f | %.2f\",name ,gender ,taxableIncome ,taxAmount);\n\t}",
"public String format(TemporalAccessor temporal) {\n StringBuilder buf = new StringBuilder(32);\n formatTo(temporal, buf);\n return buf.toString();\n }",
"static String formatValue(long value) {\n if (value > 1_000_000) {\n return String.format(\"%dM\", value / 1_000_000);\n } else {\n return Long.toString(value);\n }\n }",
"private static String curencyFormatterString(Float value) {\n\t\treturn NumberFormat.getCurrencyInstance().format(value).replace(\"$\", \"\");\n\t}",
"public String toString() {\r\n\t\tDecimalFormat f = new DecimalFormat(\"#0.00\");\r\n\t\treturn \"Account Number: \" + this.getAccountNumber() + \" balance in your Current account is: \" + f.format(this.getAmount());\r\n\t}",
"private String formatMagnitude(double magnitude) {\n DecimalFormat magnitudeFormat = new DecimalFormat(\"0.0\");\n return magnitudeFormat.format(magnitude);\n }",
"public String getFormatTotal (){\r\n DecimalFormat formatter = new DecimalFormat(\"$###,###.00\");\r\n String formatTotal = formatter.format(total);\r\n return formatTotal; \r\n }",
"public String CurrencyFormatter(double val) {\n\n\n NumberFormat nf = NumberFormat.getCurrencyInstance();\n DecimalFormatSymbols decimalFormatSymbols = ((DecimalFormat) nf).getDecimalFormatSymbols();\n decimalFormatSymbols.setCurrencySymbol(\"\");\n ((DecimalFormat) nf).setDecimalFormatSymbols(decimalFormatSymbols);\n String ft=nf.format(val).trim();\n return ft;\n\n }",
"public String convertAmount(long num) {\n String sign = \"\";\n if (num == 0){\n return \"zero\"; \n }\n else if (num < 0) {\n // if number negative, making it as positive number and saving the sign in the variable\n num = -num;\n sign = \"Negative\";\n }\n \n String inWords = \"\";\n int place = 0;\n \n // do this for every set of 3 digits from right till your left with northing\n do {\n // get the right most 3 numbers \n long n = num % 1000;\n // check if it not 0\n if (n != 0){\n // call the changeUptoThousand for the 3 digit number\n String s = changeUptoThousand((int) n);\n // add the appropriate word from thousand \n inWords = s + specialdigitNames[place] + inWords;\n }\n place++;\n //change the number leaving the right most 3 digits whic are processed above\n num /= 1000;\n } \n while (num > 0);\n // add the sign and the number\n return (sign + inWords).trim();\n }",
"public static String doubleFormat(double d) {\n return (d == (long) d) ? (String.valueOf((int)d)) : (String.format(\"%s\",d));\n }",
"public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition ignore)\n/* */ {\n/* 1101 */ toAppendTo.append(format(number, this.defaultRuleSet));\n/* 1102 */ return toAppendTo;\n/* */ }",
"public String toStringAlt() {\n\t\t\n\t\tStringBuilder sb = new StringBuilder(\"$\");\n\t\tFormatter f = new Formatter(sb);\n\t\tf.format(\"%.2f\", cost);\n\t\tf.close();\n\t\tsb.append(\" \")\n\t\t .append(make).append(\" \")\n\t\t .append(model).append(\" for day \")\n\t\t .append(startDay.getDay())\n\t\t .append(\" to day \")\n\t\t .append(endDay.getDay());\n\t\treturn sb.toString();\n\t\t\n\t}",
"void format();",
"private String formatPrice(BigDecimal adjustedListPrice) {\n\t\tif (adjustedListPrice != null) {\n\t\t\tNumberFormat currencyFormatter = NumberFormat\n\t\t\t\t\t.getCurrencyInstance(Locale.US);\n\n\t\t\treturn currencyFormatter.format(adjustedListPrice);\n\n\t\t}\n\t\treturn null;\n\t}",
"public String getFormattedPrice() {\n NumberFormat ukFormat = NumberFormat.getCurrencyInstance(Locale.UK);\n ukFormat.setMinimumFractionDigits(2);\n ukFormat.setMaximumFractionDigits(2);\n BigDecimal result = new BigDecimal(\"0.00\");\n if (baseSize != null) {\n result = baseSize.getPrice();\n Double multiplier = baseSize.getMultiplier();\n for (ToppingEntity topping : toppings) {\n topping.setMultiplier(multiplier);\n result = result.add(topping.getPrice());\n }\n }\n return ukFormat.format(result.doubleValue());\n }",
"public static String formatCryptocoin(Object number) {\n Objects.requireNonNull(number);\n NumberFormat format = NumberFormat.getNumberInstance();\n format.setMaximumFractionDigits(8);\n format.setMinimumFractionDigits(8);\n\n return format.format(number);\n }",
"public static String format(String account) {\n return Accounts.get(account).getHoldings().toString();\n }",
"String getFormattedString(IRenamable f);",
"public String stringFormatter(int inputNumber)\r\n\t{\r\n\t\tString format = String.format(\"%%0%dd\", 2);\r\n\t\treturn String.format(format, inputNumber);\r\n\t}",
"public static String formatNumberStyle(int n) {\n double result;\n if(n < 1000) {\n return \"\"+n;\n } else if(n >= 1000 && n < 1000000) {\n result = round(((double) n)/1000, 1);\n return (result + \"k\");\n } else if(n >= 1000000) {\n result = round(((double) n)/1000000, 1);\n return (result + \"m\");\n }\n return \"\"+n;\n }",
"public java.lang.String toString() {\n\t\tString s=\"\";\n\t\ts+=String.format(\"%.2f\", weight);\n\t\t//s+=Double.toString(weight);\n\t\ts+=\" lbs. @ \";\n\t\ts+=DessertShoppe.cents2dollarsAndCents(price_per_pound);\n\t\ts+=\" /lb.\\t \\n\";\n\t\ts+=String.format(\"%-25s%6s\\n\",name, DessertShoppe.cents2dollarsAndCents(this.getCost()));\n\t\treturn s;\n\t}"
]
| [
"0.73605055",
"0.72966504",
"0.72119147",
"0.7028182",
"0.70271444",
"0.693574",
"0.6874169",
"0.67356193",
"0.66600364",
"0.66575855",
"0.6645301",
"0.6627716",
"0.66133964",
"0.6610347",
"0.6579561",
"0.65787196",
"0.6544294",
"0.6497326",
"0.6447256",
"0.6441925",
"0.6419064",
"0.6403688",
"0.64028764",
"0.63836443",
"0.6359594",
"0.63566196",
"0.6318629",
"0.6301349",
"0.62656856",
"0.62456924",
"0.62429976",
"0.62137675",
"0.62078846",
"0.6171007",
"0.61536443",
"0.61180913",
"0.61099535",
"0.61057144",
"0.6085788",
"0.6051873",
"0.6033896",
"0.60294616",
"0.6027818",
"0.59965944",
"0.5983741",
"0.5970789",
"0.5969883",
"0.5939658",
"0.59176785",
"0.5914618",
"0.5881103",
"0.5863739",
"0.5860236",
"0.5827307",
"0.581467",
"0.5788796",
"0.57755107",
"0.57748973",
"0.5772712",
"0.57546794",
"0.57487017",
"0.5737029",
"0.57321966",
"0.57153535",
"0.570015",
"0.56996113",
"0.5693218",
"0.5687713",
"0.5683064",
"0.56689197",
"0.5660853",
"0.5652744",
"0.5651592",
"0.5635499",
"0.56308043",
"0.5620113",
"0.5618316",
"0.56153095",
"0.56143034",
"0.56065774",
"0.5600898",
"0.56004125",
"0.5575634",
"0.5573549",
"0.5564755",
"0.55602604",
"0.5559901",
"0.55515444",
"0.55418086",
"0.5539557",
"0.5534578",
"0.5530238",
"0.55236286",
"0.5506293",
"0.5502541",
"0.5499884",
"0.54964805",
"0.54959404",
"0.5495266",
"0.5492156"
]
| 0.6865599 | 7 |
Constructor to set up the controller sets up the view and modelStore sets up the onclicks listeners set up the appointment and patient data | public DoctorUIController(Models modelStore, String UserID) {
this.modelStore = modelStore;
this.DoctorView = new DoctorUI();
DoctorView.setVisible(true);
DoctorView.setTxtDoctorID(UserID);
setUpOnClicks();
setUpAppointment();
setUpPatients();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Appointment()\r\n {\r\n // cView = new CalendarEventView(\"appointmentView\");\r\n }",
"public AppointmentInformationView(Controller controller, Appointment appointment, String title) {\n super(controller);\n super.hourTextField.setText(\"\" + Integer.toString(appointment.getHour()));\n super.minuteTextField.setText(\"\" + Integer.toString(appointment.getMinute()));\n super.weekNumberTextField.setText(\"\" + Integer.toString(controller.getCurrentWeek().getWeekNumber()));\n super.customerTextField.setText(\"\" + appointment.getCustomer());\n super.durationTextField.setText(\"\" + Integer.toString((appointment.getDurationInMinutes())));\n super.phoneNumberTextField.setText(\"\" + Integer.toString(appointment.getPhoneNumber()));\n super.dayComboBox.setValue(appointment.getAppointmentDay());\n super.employeeComboBox.setValue(appointment.getEmployee());\n super.serviceComboBox.setValue(appointment.getService());\n\n super.saveButton.setVisible(false);\n Button editButton = new Button(\"Rediger\");\n editButton.setPrefWidth(100);\n Button deleteButton = new Button(\"Slet\");\n deleteButton.setPrefWidth(100);\n super.saveButton.setPrefWidth(100);\n super.gridpane4.getChildren().addAll(editButton, deleteButton);\n super.gridpane4.setConstraints(editButton, 21,0);\n super.gridpane4.setConstraints(deleteButton, 22,0);\n super.gridpane4.setConstraints(super.saveButton, 20,0);\n DisableOrEnableFields();\n\n Button finishButton = new Button(\"Til kassen\");\n finishButton.setPrefWidth(200);\n super.gridpane4.setConstraints(finishButton, 0,0);\n super.gridpane4.getChildren().add(finishButton);\n\n editButton.setOnAction(e -> {\n DisableOrEnableFields();\n super.saveButton.setVisible(true);\n editButton.setVisible(false);\n deleteButton.setVisible(false);\n super.gridpane4.setConstraints(editButton, 20,0);\n super.gridpane4.setConstraints(deleteButton, 21,0);\n super.gridpane4.setConstraints(super.saveButton, 22,0);\n finishButton.setVisible(false);\n\n super.saveButton.setOnAction(e1 -> {\n controller.OverWriteAppointment(appointment, hourTextField.getText(), minuteTextField.getText(),\n weekNumberTextField.getText(), dayComboBox.getValue(), durationTextField.getText(),\n employeeComboBox.getValue(), customerTextField.getText(), phoneNumberTextField.getText(), serviceComboBox.getValue());\n DisableOrEnableFields();\n super.saveButton.setVisible(false);\n editButton.setVisible(true);\n deleteButton.setVisible(true);\n finishButton.setVisible(true);\n\n\n super.gridpane4.setConstraints(editButton, 21,0);\n super.gridpane4.setConstraints(deleteButton, 22,0);\n super.gridpane4.setConstraints(super.saveButton, 20,0);\n\n });\n\n });\n\n deleteButton.setOnAction(e -> {\n super.window.close();\n controller.DeleteAppointment(appointment);\n\n });\n }",
"public HMS_Appointments() {\n initComponents();\n FillDoctorName();\n appointment_table();\n }",
"public Controller() {\n\t\t//Set the file to null as default\n\t\tprojectFile = null;\n\t\t\n\t\t//Set the action log\n\t\tactionLog = new ActionLog(this);\n\t\t\n\t\t//Set the selected instrument ID\n\t\tselectedInstrumentID = 0;\n\t\t\n\t\t//Set the gson reader/writer\n\t\tgson = new GsonBuilder()\n\t\t\t\t.setPrettyPrinting()\n\t\t\t\t.create();\n\t\t\n\t\t//Set the File Chooser\n\t\tfileChooser = new FileChooser();\n\t\t\n\t\tfileChooser.setTitle(\"Save Project\");\n\t\t\n\t\tfileChooser.getExtensionFilters().add(new ExtensionFilter(\"JSON\", \"*.json\"));\n\t\t\t\t\n\t\t//Set note frequencies\n\t\tnoteFrequencies = new double[]{-1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0};\n\t\t\n\t\t//Set selected notes\n\t\tselectedNotes = new Button[] {null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null};\n\t}",
"@Override\n public void initialize(URL url, ResourceBundle rb) {\n customers.setValue(\"Customer\");\n setData();\n try {\n getCustomerNames();\n } catch (SQLException ex) {\n Logger.getLogger(NewAppointmentController.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n saveBtn.setOnAction((ActionEvent e) -> {\n if (\"Customer\".equalsIgnoreCase(customers.getValue().toString()) || title.getLength() == 0 || description.getLength() == 0 \n || location.getLength() == 0 || urlText.getLength() == 0 || startHour.getValue().toString() == null || startMin.getValue().toString() == null \n || endHour.getValue() == null || endMin.getValue() == null || startAMPM.getValue() == null || endAMPM.getValue() == null) {\n System.out.println(\"A field isn't filled out\");\n Alert error = new Alert(Alert.AlertType.WARNING);\n error.setTitle(\"Error\");\n error.setContentText(\"Make sure all fields are filled out.\");\n error.showAndWait();\n return;\n } else {\n selectedCustomer = customers.getValue().toString();\n String selectedDate = datePicker.getValue().format(DateTimeFormatter.ofPattern(\"yyyy-MM-dd\"));\n String startTime = startHour.getValue().toString() + \":\" + startMin.getValue().toString();\n String endTime = endHour.getValue().toString() + \":\" + endMin.getValue().toString();\n LocalTime startTimeParse = LocalTime.parse(startTime + \" \" + startAMPM.getValue().toString(), DateTimeFormatter.ofPattern(\"hh:mm a\"));\n LocalTime endTimeParse = LocalTime.parse(endTime + \" \" + endAMPM.getValue().toString(), DateTimeFormatter.ofPattern(\"hh:mm a\")); \n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd hh:mm a\");\n try {\n assert !startTimeParse.isBefore(businessOpenTime):\"Not valid 1\";\n assert !startTimeParse.isAfter(businessCloseTime):\"Not valid 2\";\n assert !endTimeParse.isBefore(businessOpenTime):\"Not valid 3\";\n assert !endTimeParse.isAfter(businessCloseTime):\"Not valid 4\";\n appointmentStart = sdf.parse(selectedDate + \" \" + startTime + \" \" + startAMPM.getValue().toString());\n appointmentEnd = sdf.parse(selectedDate + \" \" + endTime + \" \" + endAMPM.getValue().toString());\n appointmentStarts = new Timestamp(appointmentStart.getTime());\n appointmentEnds = new Timestamp(appointmentEnd.getTime());\n\n if (!checkForOverlappingTimes(appointmentStart, appointmentEnd) || \n appointmentStarts.after(appointmentEnds)) {\n Alert error = new Alert(Alert.AlertType.WARNING);\n error.setTitle(\"Error\");\n error.setContentText(\"The appointment times are either overlapping another appointment or\"\n + \"the end time is before start time\");\n error.showAndWait();\n return;\n } else {\n try {\n setAppointment();\n } catch (SQLException ex) {\n Logger.getLogger(NewAppointmentController.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n } catch (ParseException | SQLException ex) {\n Logger.getLogger(NewAppointmentController.class.getName()).log(Level.SEVERE, null, ex);\n } catch (AssertionError d) {\n String message = d.getMessage();\n System.out.println(message);\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\n alert.setTitle(null);\n alert.setHeaderText(null);\n alert.setContentText(\"Your appointment times are outside of business hours\");\n Optional<ButtonType> result = alert.showAndWait();\n return;\n }\n }\n \n Parent window;\n try {\n window = FXMLLoader.load(getClass().getResource(\"CalendarView.fxml\"));\n Stage mainStage;\n mainStage = Main.parentWindow;\n mainStage.getScene().setRoot(window);\n mainStage.sizeToScene();\n } catch (IOException ex) {\n Logger.getLogger(CalendarViewController.class.getName()).log(Level.SEVERE, null, ex);\n }\n });\n \n cancelBtn.setOnAction((ActionEvent e) -> {\n Parent window;\n try {\n window = FXMLLoader.load(getClass().getResource(\"CalendarView.fxml\"));\n Stage mainStage;\n mainStage = Main.parentWindow;\n mainStage.getScene().setRoot(window);\n mainStage.sizeToScene();\n } catch (IOException ex) {\n Logger.getLogger(CalendarViewController.class.getName()).log(Level.SEVERE, null, ex);\n }\n });\n }",
"public AgendaController(){\n setService(new JavaServiceFacade());\n setActividadRegistrar(new CalendarActivityClinica());\n setModel(new CalendarModelClinica());\n if(this.isPermisoAgendaPersonal()){\n setUsuarioAgenda(LoginController.getUsuarioLogged());\n }\n generarActividades();\n setListaPacientes(service.getPacienteFindAll());\n setListaUsuarios(service.getUsuarioFindAll());\n setMensajeRegistrar(\"\");\n setMensajeEditar(\"\");\n }",
"@Override\r\n public void initialize(URL url, ResourceBundle rb) {\r\n\r\n appointments = FXCollections.observableArrayList();\r\n customers = FXCollections.observableArrayList();\r\n\r\n //Get the user's login name and display it. \r\n usernameLabel.setText(user.getUserName());\r\n try {\r\n\r\n } catch (Exception ex) {\r\n Logger.getLogger(MainScreenController.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n //G. Write two or more lambda expressions to make your program more efficient, justifying the use of each lambda expression with an in-line comment. \r\n //************LAMBDAS FOR APPOINTMENT TABLEVIEW COLUMNS*************************\r\n\r\n //Lines 152-194 are lambda expressions that generate the table columns for the table views. \r\n DateTimeFormatter tdtf = DateTimeFormatter.ofPattern(\"HH:mm\");\r\n startTimeColumn.setCellValueFactory(cellData -> {\r\n return new SimpleStringProperty(tdtf.format(cellData.getValue().getStartTime()));\r\n });\r\n\r\n endTimeColumn.setCellValueFactory(cellData -> {\r\n return new SimpleStringProperty(tdtf.format(cellData.getValue().getEndTime()));\r\n });\r\n\r\n appointmentTypeColumn.setCellValueFactory(cellData -> {\r\n return cellData.getValue().getAppointmentType();\r\n });\r\n\r\n appointmentCustomerCol.setCellValueFactory(cellData -> {\r\n return cellData.getValue().getAssociatedCustomer();\r\n });\r\n\r\n DateTimeFormatter dformat = DateTimeFormatter.ofPattern(\"YYYY-MM-dd\");\r\n dateColumn.setCellValueFactory(cellData -> {\r\n return new SimpleStringProperty(dformat.format(cellData.getValue().getStartTime()));\r\n });\r\n //*************LAMBDAS FOR CUSTOMER TABLEVIEW COLUMNS**********************\r\n\r\n column_Customer_Name.setCellValueFactory(cellData -> {\r\n return cellData.getValue().getCustomerName();\r\n });\r\n\r\n column_Customer_Address.setCellValueFactory(cellData -> {\r\n return cellData.getValue().getCustomerAddress();\r\n });\r\n\r\n column_Customer_Phone.setCellValueFactory(cellData -> {\r\n return cellData.getValue().getCustomerPhoneNumber();\r\n });\r\n\r\n column_Customer_City.setCellValueFactory(cellData -> {\r\n return cellData.getValue().getCustomerCity();\r\n });\r\n\r\n column_Customer_Country.setCellValueFactory(cellData -> {\r\n return cellData.getValue().getCustomerCountry();\r\n });\r\n\r\n try {\r\n\r\n appointments.clear();\r\n appointments.addAll(AppointmentImplementation.getAppointmentData());\r\n\r\n customerTable.getItems().clear();\r\n customerTable.getItems().addAll(customers);\r\n customerTable.setItems(customers);\r\n customers.addAll(CustomerImplementation.getCustomerData());\r\n\r\n table.setItems(appointments);\r\n\r\n //SECTION H: WRITE CODE TO ALERT USER IF AN APPOINTMENT IS WITHIN 15 MINUTES OF USER'S LOGIN\r\n Appointment appts = apptAlert(appointments);\r\n\r\n DateTimeFormatter tformat = DateTimeFormatter.ofPattern(\"HH:mm\");\r\n if (appts != null) {\r\n Alert alert = new Alert(AlertType.INFORMATION);\r\n alert.setHeaderText(\"Upcoming appointment\");\r\n alert.setContentText(\"You have an appointment with client \" + appts.getAssociatedCustomer().get() + \" \" + \" at\" + tformat.format(appts.getStartTime()));\r\n alert.showAndWait();\r\n System.out.println(\"apptAlert\");\r\n }\r\n } catch (SQLException ex) {\r\n ex.printStackTrace();\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n\r\n }",
"public Controller() {\n this.model = new ModelFacade();\n this.view = new ViewFacade();\n }",
"public Appointment() {\r\n\t\t\t\r\n\t\t}",
"@FXML\n public void OAMonthView(ActionEvent event) {\n Appointment.clearMonthlyAppointment();\n Appointment.setMonthAppointments();\n Appointments.setItems(Appointment.getMonthAppointments());\n\n }",
"private EventController()\n {\n events = new ArrayList<>();\n currentCalendar = Calendar.getInstance();\n }",
"private void setUpViewModels(){\n EventViewModelFactory factory = new EventViewModelFactory(mDatabase, mEventId);\n EventViewModel eventViewModel =\n ViewModelProviders.of(this, factory).get(EventViewModel.class);\n //Uses view model to get category list\n //listener is called any time the categories are changed or updated\n eventViewModel.getCategoryList().observe(this, new Observer<List<Category>>() {\n @Override\n public void onChanged(List<Category> categories) {\n mCategories = new ArrayList<>(categories);\n setUpSpinner(); //sets up spinner if categories change\n }\n });\n\n //creates a new Factory with database and current time\n AddScheduledEventViewModelFactory eventFactory =\n new AddScheduledEventViewModelFactory(mDatabase, Calendar.getInstance().getTimeInMillis());\n AddScheduledEventViewModel addScheduledEventViewModel =\n ViewModelProviders.of(this, eventFactory).get(AddScheduledEventViewModel.class);\n //attaches listener to events list\n addScheduledEventViewModel.getEvents().observe(this, new Observer<List<Event>>() {\n @Override\n public void onChanged(List<Event> events) {\n //updates the events that are given to mScheduler\n if(mScheduler == null){\n mScheduler = new Scheduler(events, Calendar.getInstance(), null);\n } else mScheduler.setEvents(events);\n }\n });\n }",
"public void init(){\n\t\t//Makes the view\n\t\tsetUpView();\n\n\t\t//Make the controller. Links the action listeners to the view\n\t\tnew Controller(this);\n\t\t\n\t\t//Initilize the array list\n\t\tgameInput = new ArrayList<Integer>();\n\t\tuserInput = new ArrayList<Integer>();\n\t\thighScore = new HighScoreArrayList();\n\t}",
"private void setAppointment(Appointment appointment) {\n appointment.setCustomerId(customerNameTxt.getSelectionModel().getSelectedItem().getId());\n appointment.setTitle(titleTxt.getText());\n appointment.setDescription(descriptionTxt.getText());\n appointment.setLocation(locationTxt.getText());\n appointment.setContact(contactTxt.getText());\n appointment.setType(typeTxt.getText());\n appointment.setUrl(urlTxt.getText());\n\n // format times\n // Date formatter for date picker and time combo boxes\n final DateTimeFormatter dateFormatter = DateTimeFormatter.ofPattern(\"yyyy-MM-dd\");\n final DateTimeFormatter timeFormatter = DateTimeFormatter.ofPattern(\"hh:mm:ss\");\n LocalTime startTime = startTxt.getSelectionModel().getSelectedItem();\n LocalTime endTime = startTime.plusMinutes(endTxt.getSelectionModel().getSelectedItem());\n\n if (datePicker.getValue() != null && startTime != null && endTime != null) {\n appointment.setStart(Timestamp.valueOf(dateFormatter.format(datePicker.getValue()) + \" \" + timeFormatter.format(startTime)));\n appointment.setEnd(Timestamp.valueOf(dateFormatter.format(datePicker.getValue()) + \" \" + timeFormatter.format(endTime)));\n } else {\n Alert a = new Alert(Alert.AlertType.INFORMATION, \"You must select a date, start time, and end time.\");\n a.showAndWait();\n }\n }",
"private void initialiseController() \r\n {\r\n defaultVectors();\r\n if(grantsByPIForm == null) \r\n {\r\n grantsByPIForm = new GrantsByPIForm(); //(Component) parent,modal);\r\n }\r\n grantsByPIForm.descriptionLabel.setText(UnitName);\r\n grantsByPIForm.descriptionLabel.setFont(new Font(\"SansSerif\",Font.BOLD,14));\r\n queryEngine = QueryEngine.getInstance();\r\n coeusMessageResources = CoeusMessageResources.getInstance();\r\n registerComponents();\r\n try {\r\n setFormData(null);\r\n }\r\n catch(Exception e) {\r\n e.printStackTrace(System.out);\r\n }\r\n }",
"public ContestantController(User theUser, ContestDatabaseManager theContestDBManager, EntryDatabaseManager theEntryDBManager, View theView) {\n\t\tmyUser = theUser;\n\t\tmyContestDBManager = theContestDBManager;\n\t\tmyEntryDBManager = theEntryDBManager;\n\t\tmyView = theView;\n\t\tviewHistory = new LinkedList<>();\n\t\tsetupBackFunctionality();\n\t\tsetupListView();\t\t\n\t}",
"private void init()\n\t{\n\t\tsetModel(new Model(Id.model, this, null));\n\t\tsetEnviroment(new Enviroment(Id.enviroment, this, model()));\n\t\tsetVaccinationCenter(new VaccinationCenter(Id.vaccinationCenter, this, model()));\n\t\tsetCanteen(new Canteen(Id.canteen, this, vaccinationCenter()));\n\t\tsetRegistration(new Registration(Id.registration, this, vaccinationCenter()));\n\t\tsetExamination(new Examination(Id.examination, this, vaccinationCenter()));\n\t\tsetVaccination(new Vaccination(Id.vaccination, this, vaccinationCenter()));\n\t\tsetWaitingRoom(new WaitingRoom(Id.waitingRoom, this, vaccinationCenter()));\n\t\tsetSyringes(new Syringes(Id.syringes, this, vaccination()));\n\t}",
"public attendance() {\n initComponents();\n setDate();\n controller = new AttendanceController();\n getAllEmployees();\n generateAttendanceId();\n aIdtxt.setVisible(false);\n }",
"public PatientController(PatientView view, UserModel userModel, Session session, ArrayList<UserModel> users){\r\n\t\tthis.view = view;\r\n\t\tthis.model = userModel;\r\n\t\tthis.users = users;\r\n\t\tthis.session = session;\r\n\t}",
"MainPresenter(MainContract.View view) {\n this.view = view;\n model = new AmicableModel();\n }",
"public New_appointment() {\n initComponents();\n }",
"private void init(){\n\n //Load component in the good variables\n spin_day = (Spinner)findViewById(R.id.spinner_day_hospa);\n spin_start = (Spinner)findViewById(R.id.spinner_start_hospa);\n spin_end = (Spinner)findViewById(R.id.spinner_end_hospa);\n spin_service = (Spinner)findViewById(R.id.spinner_service_hospa);\n\n btn_Appointment = (Button)findViewById(R.id.btn_app_hospa);\n\n lv_availability = (ListView)findViewById(R.id.lv_availability_hospa);\n lv_Appointment = (ListView)findViewById(R.id.lv_Appointment_hospa);\n\n tv_main = (TextView)findViewById(R.id.tv_main_hospa);\n\n tv_main.setText(\"Create Appointment with\\n\" + this.companyName);\n\n //Load the days\n loadDays();\n loadHours();\n loadSpinnerDays();\n loadSpinnerHours();\n callEventListener();\n loadListView();\n loadAppointmentList();\n loadSpinnerFromDB();\n }",
"public Controller(ViewIF view) {\n\t\tthis.view = view;\n\t\tthis.dao = new DAO();\n\t\tthis.stats = new Statistics(this.dao);\n\t\tthis.gameStarted = false;\n\t}",
"@Override\n public void initialize(URL url, ResourceBundle rb) {\n gsd = GlobalDataStore.getInstance();\n loggedInUser = gsd.getLoggedInUser();\n Date date = new Date();\n Calendar cal = Calendar.getInstance();\n cal.setTime(date);\n month = cal.get(Calendar.MONTH);\n month++; \n year = cal.get(Calendar.YEAR);\n week = cal.get(Calendar.WEEK_OF_YEAR);\n\n try {\n getByMonthAppts(month, year); \n } catch (Exception e) {\n e.printStackTrace();\n }\n \n viewByMonth.setOnAction((ActionEvent event) -> {\n\n try {\n \n getByMonthAppts(month, year);\n } catch (Exception e) {\n System.err.println(e);\n }\n \n }); \n \n viewByWeek.setOnAction((ActionEvent event) -> {\n try {\n getByWeekAppts(week, year);\n } catch (Exception e) {\n }\n });\n \n incrementWeekMonth.setOnAction((ActionEvent event) -> {\n if (isMonthlyView)\n if (month == 12) {\n month = 1;\n year++;\n getByMonthAppts(month, year);}\n else {month++;\n getByMonthAppts(month, year);\n }\n \n else {\n if (week == 52) {\n week = 1;\n year++;\n }\n else {\n week++;\n }\n try { \n getByWeekAppts(week, year);\n } catch (Exception e) {\n week--;\n e.printStackTrace();\n }\n }\n \n });\n \n \n \n decrementWeekMonth.setOnAction((ActionEvent event) -> {\n if (isMonthlyView)\n \n if (month == 1) {\n month = 12;\n year--;\n getByMonthAppts(month, year);}\n else {\n month--;\n getByMonthAppts(month, year);\n }\n else {\n if (week == 1) {\n week = 52;\n year--;\n }\n else {\n week--;\n }\n try { \n getByWeekAppts(week, year);\n } catch (Exception e) {\n week++;\n e.printStackTrace();\n }\n }\n \n });\n \n addNewAppt.setOnAction((ActionEvent event) -> {\n\n try {\n Control c = Control.getInstance();\n \n Stage stage = c.getStage();\n c.SetStage(stage);\n c.SetPane(\"newAppt\"); \n\t\t\t\t\n } catch (Exception e1) {\n System.err.println(e1);\n \n }\n });\n \n\n }",
"@Override\n\tpublic void takeAppointment() {\n\t\tsearchByMobile();\n\t\tif (count == 0) {\n\t\t\tnew ManagerServiceImplementation().addPatient();\n\t\t}\n\t\tnew DoctorServiceImplementation().showDoctorDetails();\n\t\tSystem.out.println(\"Enter doctor's ID:\");\n\t\tString dID = UtilityClinic.readString();\n\t\tfor (int i = 0; i < UtilityClinic.docJson.size(); i++) {\n\t\t\tJSONObject obj = (JSONObject) UtilityClinic.docJson.get(i);\n\t\t\tif (obj.get(\"Doctor's ID\").toString().equals(dID)) {\n\t\t\t\tif (UtilityClinic.docWisePatCounter.isEmpty()) {\n\t\t\t\t\tfor (int j = 0; j < UtilityClinic.docJson.size(); j++) {\n\t\t\t\t\t\tUtilityClinic.docWisePatCounter.add(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (UtilityClinic.docWisePatCounter.get(i) < 5) {\n\t\t\t\t\tnew Appointment(obj.get(\"Doctor's name\").toString(), dID, pName, pId,\n\t\t\t\t\t\t\tobj.get(\"Availibility time\").toString());\n\t\t\t\t\tUtilityClinic.docWisePatCounter.add(i, UtilityClinic.docWisePatCounter.get(i) + 1);\n\n\t\t\t\t\tif (UtilityClinic.appFile == null) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tutil.accessExistingAppJson();\n\t\t\t\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t\t\t\tutil.createAppJson();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tutil.readFromAppJson(util.appFile);\n\t\t\t\t\tJSONObject appObject = new JSONObject();\n\t\t\t\t\tAppointment app = new Appointment(obj.get(\"Doctor's name\").toString(), dID, pName, pId,\n\t\t\t\t\t\t\tobj.get(\"Availibility time\").toString());\n\t\t\t\t\tappObject.put(\"Patient's name\", app.getPatientName());\n\t\t\t\t\tappObject.put(\"Patient's ID\", app.getPatientId());\n\t\t\t\t\tappObject.put(\"Doctor's name\", app.getDoctorName());\n\t\t\t\t\tappObject.put(\"Doctor's ID\", app.getDoctorId());\n\t\t\t\t\tappObject.put(\"Time stamp\", app.getTime());\n\t\t\t\t\tUtilityClinic.appJson.add(appObject);\n\t\t\t\t\tutil.writetoJson(UtilityClinic.appJson, util.getAppFileName());\n\t\t\t\t\tutil.readFromAppJson(util.getAppFileName());\n\t\t\t\t\tSystem.out.println(\"Appointment done.....\\n\\n\");\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"Sorry!!! Doctor is not available....Please try on next day.\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public EditAppointment() {\r\n\t\tsuper();\r\n\t}",
"public AnalysisPresenter(AnalysisEventListener viewAction){\n this.viewAction = viewAction;\n screens = new ArrayList<Screen>();\n sequence = -1;\n lastQuestionId = 0;\n mcqMap = new HashMap<Integer, MCQ>();\n }",
"public Controller() {\n model = new Model();\n comboBox = new ChannelComboBox();\n initView();\n new ChannelWorker().execute();\n timer = new Timer();\n }",
"Main ()\n\t{\n\t\tview = new View ();\t\t\n\t\tmodel = new Model(view);\n\t\tcontroller = new Controller(model, view);\n\t}",
"public Appointment(int appointmentId, int customerId, int userId, String title, String description, String location, String contact, String apptType, String url, LocalDateTime startDate,\r\n LocalDateTime endDate) {\r\n this.appointmentId = new SimpleIntegerProperty(appointmentId);\r\n this.customerId = new SimpleIntegerProperty(customerId);\r\n this.userId = new SimpleIntegerProperty(userId);\r\n this.title = new SimpleStringProperty(title);\r\n this.apptType = new SimpleStringProperty(apptType);\r\n this.location = new SimpleStringProperty(location);\r\n this.contact = new SimpleStringProperty(contact);\r\n this.url = new SimpleStringProperty(url);\r\n this.startLocalDateTime = startDate;\r\n this.endLocalDateTime = endDate;\r\n this.description = new SimpleStringProperty(description);\r\n }",
"public PatientView() throws IOException {\r\n \t\tsetTitle(\"Medical Manager\");\r\n \t\t// Ensures the panel closes when you press the close button\r\n \t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n \t\t\r\n \t\t// Opening size\r\n \t\tsetBounds(100, 100, 838, 609);\r\n \t\t\r\n \t\t// Base panel of the application\r\n \t\tcontentPane = new JPanel();\r\n \t\tcontentPane.setBorder(new EmptyBorder(5, 5, 5, 5));\r\n \t\tcontentPane.setLayout(card); // Card layout to access the other components such as Patient or About\r\n \r\n \t\tsetContentPane(contentPane);\r\n \t\t\r\n \t\t// Place the menu on the content pane\r\n \t\tplaceMenu();\r\n \t\t\r\n \t\t// Instantiate the welcome panel\r\n \t\tmakeWelcomePanel();\r\n \t\t\r\n \t\t// Instantiate the patient panel\r\n \t\tmakePatientPanel();\r\n \t\t\r\n \t\t// Bootstrap the event handlers\r\n \t\tactionTime();\r\n \t\t\r\n \t\t// Set the standard write directory - possibly add settings to change where this is\r\n \t\tDatabase.setWriteDirectory(System.getProperty(\"user.home\") + \"\\\\My Documents\\\\Medical Manager\\\\\");\r\n \t\t\r\n \t\t// Set the standard file that is written to\r\n \t\tDatabase.setFile(\"patients.txt\");\r\n \t\t\r\n \t\t// Create the directory and file if it isn't already there\r\n \t\tDatabase.prepareFile();\r\n \t\t\r\n\t\tnew Test();\r\n \t\t\r\n \t\t// Read all the patients from the file dumping them into an array list for use later\r\n \t\tDatabase.readAllPatientsFromFile();\r\n\t\tSystem.out.println(Database.linSearch(patientArray, 0).getFullName());\r\n \t}",
"public Application() {\n\t\tinitComponents();\n\t\tthis.service = new PacienteService();\n\t\tthis.AtualizarTabelaPacientes();\n\t\tthis.sexo = this.rd_nao_informado.getText();\n\t\tthis.cb_estados.setSelectedIndex(24);\n\t}",
"public Appointment() {\n initComponents();\n con=connectionDB.DBconnection();\n update_table();\n \n \n }",
"public testDatabaseAppController()\n\t{\n\t\tdataController = new testDatabaseController(this);\n\t\tqueryList = new ArrayList<QueryInfo>();\n\t\tappFrame = new testDatabaseFrame(this);\n\t}",
"public Appointment(String appointmentTypeIn, String customerNameIn, String dateIn)\n {\n //id = id + 1;\n appointmentType = appointmentTypeIn;\n customerName = customerNameIn;\n appointmentDate = dateIn;\n appointmentDetails = \"\";\n }",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n viewModel = ViewModelProviders.of(this).get(TimeTableViewModel.class);\n SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);\n days = prefs.getInt(\"timetableSize\", getResources().getInteger(R.integer.timetableDaysDefault));\n viewModel.setNumDays(days);\n\n setContentView(R.layout.activity_timetable);\n popup = new TimetablePopupView(this);\n setupUIViews();\n setupListView();\n\n FloatingActionButton fab = findViewById(R.id.fabNewAppointmentButton);\n fab.setOnClickListener(v -> {\n Intent intent = new Intent(this, NewAppointmentActivity.class);\n startActivity(intent);\n });\n\n setSupportActionBar(findViewById(R.id.toolbarTimetable));\n drawerLayout = findViewById(R.id.drawerLayout_timetable);\n NavigationView navView = findViewById(R.id.nav_view);\n navView.setNavigationItemSelectedListener(new NavigationListener(TimeTableActivity.this, drawerLayout));\n ImageButton navButton = findViewById(R.id.navButton_timetable);\n navButton.setOnClickListener(new NavigationButtonListener(drawerLayout));\n }",
"private void initViewModel() {\n ViewModelFactory viewModelFactoryGo4Lunch = DI.getViewModelFactory();\n appViewModel = ViewModelProviders.of(this, viewModelFactoryGo4Lunch).get(AppViewModel.class);\n getRestaurantList();\n }",
"public STDataController(Context context) {\n personNames = new ArrayList<String>();\n personIds = new ArrayList<String>();\n personPhotos = new ArrayList<Bitmap>();\n personSelections = new ArrayList<HashSet<Integer>>();\n \n menuItemNames = new ArrayList<String>();\n menuItemPrices = new ArrayList<Double>();\n \n this.context = context;\n }",
"@Override\n protected void init() {\n viewModel.setNavigator(this);\n setUp();\n subscribeToLiveData();\n\n setUpNotificationUi();\n setUpNotification();\n\n setUpAds();\n\n viewModel.start(getCurrentVersionOfApp());\n }",
"public InscricaoView() {\n initComponents();\n\n controller.carregarInscricoes();\n controller.carregarOficinas();\n controller.carregarPessoas();\n\n doBindings();\n firstButton.doClick();\n }",
"public Appointments(){\n\t\tsetDate(0);\n\t\tsetTime(0);\n\t\tsetClient(null);\n\t\tappointmentStatus = false;\n\t}",
"public PatientView(PatientController controller) {\n\t\tthis.controller = controller;\n\t\tthis.clear = controller.getRole();\n\t\tthis.setTop(controller.getRole());\n\t\tinitGUI();\n\t}",
"public FilmController(){\r\n // Create a new ArrayList which will store ALL the films the cinema can show\r\n this.cinema_film_list = new ArrayList<Film>();\r\n this.film_database_controller = new FilmDatabaseController();\r\n }",
"public DomeinController() {\r\n DAOFactory.initFactory();\r\n gebruikerRepository = new GebruikerRepository();\r\n presentatieRepository = new PresentatieRepository();\r\n inschrijvingRepository = new InschrijvingRepository();\r\n campusRepository = new CampusRepository();\r\n lokaalRepository = new LokaalRepository();\r\n gastRepository = new GastRepository();\r\n bpCoordinator = gebruikerRepository.getBpCoordinator();\r\n }",
"private void init() {\n //set view to presenter\n presenter.setView(this, service);\n\n setupView();\n }",
"public End_User_0_Controller() {\r\n\t\t// primaryStage = Users_Page_Controller.primaryStage;\r\n\t\t// this.Storeinfo = primaryStage.getTitle();\r\n\t}",
"public Controller()\r\n\t{\r\n\t\tview = new View();\r\n\t}",
"public EmailDataController() {\n super();\n this.emailData = new EmailData();\n this.emailDataList = new ArrayList<>();\n }",
"@FXML\n public void OAUpdateAppointment(ActionEvent event) {\n\n try {\n FXMLLoader fxmlLoader = new FXMLLoader();\n fxmlLoader.setLocation(getClass().getResource(\"/View/UpdateAppointment.fxml\"));\n Parent add = fxmlLoader.load();\n UpdateAppointmentController updateAppointment = fxmlLoader.getController();\n Appointment appointment = Appointments.getSelectionModel().getSelectedItem();\n int ID = appointment.getAppointmentID();\n Appointment app = DBQuery.retrieveAppointment(ID);\n updateAppointment.receiveAppointment(app);\n Stage stage = new Stage();\n stage.setScene(new Scene(add));\n stage.show();\n\n\n }catch (IOException | NullPointerException e){\n System.out.println(e);\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setTitle(\"Error\");\n alert.setHeaderText(\"No appointment selected.\");\n alert.setContentText(\"Please select a appointment to update.\");\n alert.showAndWait();}\n }",
"private void initializeExerciseControllers() {\n trAddExercise = ExerciseControllersFactory.createTrAddExercise();\n trDeleteExercise = ExerciseControllersFactory.createTrDeleteExercise();\n trUpdateExercise = ExerciseControllersFactory.createTrUpdateExercise();\n trAddWalk = ExerciseControllersFactory.createTrAddWalk();\n trGetAllWalks = ExerciseControllersFactory.createTrGetAllWalks();\n trGetAllExercises = ExerciseControllersFactory.createTrGetAllExercises();\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n // Create object of CalendarInteraction class\n CalendarInteraction mCalHelper = new CalendarInteraction(getActivity());\n appointmentGetter = new AppointmentGetter();\n\n\n // Retrieve data from the calender via the CalendarHelper Class\n Cursor data = mCalHelper.getData();\n\n // Create an arraylist of AppointModels\n ArrayList<AppointModel> appointmentList = new ArrayList<>();\n\n if (data != null){\n while (data.moveToNext())\n {\n appointModel = appointmentGetter.getData(data);\n // Add the appointment model to the arraylist\n appointmentList.add(appointModel);\n }\n\n data.close();\n\n }\n\n\n // Close off the cursor\n\n // Maak de adapter hier\n AppointModel appointModel_data[] = new AppointModel[appointmentList.size()];\n\n // Create the adapter\n appointAdapter = new AppointAdapter(listener,\n R.layout.appoint_list_layout, appointModel_data);\n\n // Keep track of amount of models\n\n // Create an array of objects filled with the models from the AppointModel\n // arraylist. This array will then be used in conjunction with the appointAdapter\n // to create the list of appointments\n\n\n\n for (AppointModel a : appointmentList) {\n appointModel_data[count] = new AppointModel(\n a.getEventID(),\n a.getTime(),\n a.getDate(),\n a.getAppointName(),\n a.getWardName(),\n a.getDoctorName()\n );\n\n count += 1;\n }\n\n\n\n\n }",
"public InputCVEmployeeCertificationView() {\n initComponents();\n setDefaultCondition();\n getRidTheBar();\n }",
"public Mark_Attendance() {\n initComponents();\n empolyee_Controller=new Empolyee_Controller();\n attendance_Contorller=new Attendance_Contorller();\n grade_Controller=new Grade_Controller();\n setLocationRelativeTo(null);\n setDate();\n setTime();\n Textattendanceid1.setText(\" \");\n try {\n loadEmployeeNIC();\n setid();\n } catch (ClassNotFoundException | SQLException ex) {\n Logger.getLogger(Mark_Attendance.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"public AppointmentTM() {\n }",
"public void initView() {\n\t\t view.initView(model);\t \n\t }",
"public Appointment() {\n ID = null;\n name = \"\";\n place = \"\";\n doctorID = null;\n date = new GregorianCalendar();\n date.setTime(new Date());\n\n int year = date.get(Calendar.YEAR);\n int month = date.get(Calendar.MONTH);\n int day = date.get(Calendar.DAY_OF_YEAR);\n int hour = date.get(Calendar.HOUR);\n int minute = date.get(Calendar.MINUTE);\n int second = date.get(Calendar.SECOND);\n int ms = date.get(Calendar.MILLISECOND);\n int id = (year + month + day + hour + minute + second + ms);\n this.setID(id);\n }",
"public void setupAppointments() {\n\n\t\t// // remember for animation\n\t\t// final List<AbstractClusteredDayAppointmentPane>\n\t\t// lOldClusteredDayAppointmentPanes = new\n\t\t// ArrayList<AbstractClusteredDayAppointmentPane>(\n\t\t// clusteredAppointmentPanes);\n\t\t// final List<WholedayAppointmentPane> lOldWholedayAppointmentPanes =\n\t\t// new ArrayList<WholedayAppointmentPane>(\n\t\t// wholedayAppointmentPanes);\n\t\t//\n\t\t// // clear\n\t\t// clusteredAppointmentPanes.clear();\n\t\t// wholedayAppointmentPanes.clear();\n\t\t// if (calendarObjectProperty.get() == null) {\n\t\t// return;\n\t\t// }\n\t\t//\n\t\t// // scan all appointments and filter the ones for this day\n\t\t// for (Agenda.Appointment lAppointment : getSkinnable().appointments())\n\t\t// {\n\t\t//\n\t\t// // different panes depending on the appointment time\n\t\t// if (lAppointment.isWholeDay()) {\n\t\t//\n\t\t// // if appointment falls on the same date as this day pane\n\t\t// if (isSameDay(calendarObjectProperty.get(),\n\t\t// lAppointment.getStartTime())) {\n\t\t// WholedayAppointmentPane lAppointmentPane = new\n\t\t// WholedayAppointmentPane(\n\t\t// lAppointment, this);\n\t\t// wholedayAppointmentPanes.add(lAppointmentPane);\n\t\t// lAppointmentPane.setId(lAppointmentPane.getClass()\n\t\t// .getSimpleName() + wholedayAppointmentPanes.size());\n\t\t// }\n\t\t// } else if (lAppointment.getEndTime() == null) {\n\t\t//\n\t\t// // an not-wholeday appointment without an enddate is a task\n\t\t// if (isSameDay(calendarObjectProperty.get(),\n\t\t// lAppointment.getStartTime())) {\n\t\t// TaskAppointmentPane lAppointmentPane = new TaskAppointmentPane(\n\t\t// lAppointment, this);\n\t\t// clusteredAppointmentPanes.add(lAppointmentPane);\n\t\t// lAppointmentPane\n\t\t// .setId(lAppointmentPane.getClass().getSimpleName()\n\t\t// + clusteredAppointmentPanes.size());\n\t\t// }\n\t\t// } else {\n\t\t// // appointments may span multiple days, but the appointment pane\n\t\t// // will clamp the start and end date\n\t\t// RegularAppointmentPane lAppointmentPane = new RegularAppointmentPane(\n\t\t// lAppointment, this);\n\t\t//\n\t\t// // check if the appointment falls in the same day as this day\n\t\t// // pane\n\t\t// if (isSameDay(calendarObjectProperty.get(),\n\t\t// lAppointmentPane.start)\n\t\t// && isSameDay(calendarObjectProperty.get(),\n\t\t// lAppointmentPane.end)) {\n\t\t// clusteredAppointmentPanes.add(lAppointmentPane);\n\t\t// lAppointmentPane\n\t\t// .setId(lAppointmentPane.getClass().getSimpleName()\n\t\t// + clusteredAppointmentPanes.size());\n\t\t// }\n\t\t// }\n\t\t// }\n\t\t//\n\t\t// // sort on start time and then decreasing duration\n\t\t// Collections.sort(clusteredAppointmentPanes,\n\t\t// new Comparator<AbstractDayAppointmentPane>() {\n\t\t// @Override\n\t\t// public int compare(AbstractDayAppointmentPane o1,\n\t\t// AbstractDayAppointmentPane o2) {\n\t\t// if (o1.startAsString.equals(o2.startAsString) == false) {\n\t\t// return o1.startAsString.compareTo(o2.startAsString);\n\t\t// }\n\t\t// return o1.durationInMS > o2.durationInMS ? -1 : 1;\n\t\t// }\n\t\t// });\n\t\t//\n\t\t// // start placing appointments in the tracks\n\t\t// AbstractClusteredDayAppointmentPane lClusterOwner = null;\n\t\t// for (AbstractClusteredDayAppointmentPane lAppointmentPane :\n\t\t// clusteredAppointmentPanes) {\n\t\t// // if there is no cluster owner\n\t\t// if (lClusterOwner == null) {\n\t\t//\n\t\t// // than the current becomes an owner\n\t\t// // only create a minimal cluster, because it will be setup fully\n\t\t// // in the code below\n\t\t// lClusterOwner = lAppointmentPane;\n\t\t// lClusterOwner.clusterTracks = new\n\t\t// ArrayList<List<AbstractClusteredDayAppointmentPane>>();\n\t\t// }\n\t\t//\n\t\t// // in which track should it be added\n\t\t// int lTrackNr = determineTrackWhereAppointmentCanBeAdded(\n\t\t// lClusterOwner.clusterTracks, lAppointmentPane);\n\t\t// // if it can be added to track 0, then we have a \"situation\". Track\n\t\t// // 0 could mean\n\t\t// // - we must start a new cluster\n\t\t// // - the appointment is still linked to the running cluster by means\n\t\t// // of a linking appointment in the higher tracks\n\t\t// if (lTrackNr == 0) {\n\t\t//\n\t\t// // So let's see if there is a linking appointment higher up\n\t\t// boolean lOverlaps = false;\n\t\t// for (int i = 1; i < lClusterOwner.clusterTracks.size()\n\t\t// && lOverlaps == false; i++) {\n\t\t// lOverlaps =\n\t\t// checkIfTheAppointmentOverlapsAnAppointmentAlreadyInThisTrack(\n\t\t// lClusterOwner.clusterTracks, i, lAppointmentPane);\n\t\t// }\n\t\t//\n\t\t// // if it does not overlap, we start a new cluster\n\t\t// if (lOverlaps == false) {\n\t\t// lClusterOwner = lAppointmentPane;\n\t\t// lClusterOwner.clusterMembers = new\n\t\t// ArrayList<AbstractClusteredDayAppointmentPane>();\n\t\t// lClusterOwner.clusterTracks = new\n\t\t// ArrayList<List<AbstractClusteredDayAppointmentPane>>();\n\t\t// lClusterOwner.clusterTracks\n\t\t// .add(new ArrayList<AbstractClusteredDayAppointmentPane>());\n\t\t// }\n\t\t// }\n\t\t//\n\t\t// // add it to the track (and setup all other cluster data)\n\t\t// lClusterOwner.clusterMembers.add(lAppointmentPane);\n\t\t// lClusterOwner.clusterTracks.get(lTrackNr).add(lAppointmentPane);\n\t\t// lAppointmentPane.clusterOwner = lClusterOwner;\n\t\t// lAppointmentPane.clusterTrackIdx = lTrackNr;\n\t\t// // for debug System.out.println(\"----\"); for (int i = 0; i <\n\t\t// // lClusterOwner.clusterTracks.size(); i++) { System.out.println(i +\n\t\t// // \": \" + lClusterOwner.clusterTracks.get(i) ); }\n\t\t// // System.out.println(\"----\");\n\t\t// }\n\t\t//\n\t\t// // laying out the appointments is fairly complex, so we use listeners\n\t\t// // and a relayout method instead of binding\n\t\t// relayout();\n\t\t//\n\t\t// // and swap the appointments; old ones out, new ones in\n\t\t// // TODO: animation? we could move the old appointments to the\n\t\t// equivalent\n\t\t// // positions on the drag pane, then animate them to their new\n\t\t// positions,\n\t\t// // remove the old, and insert the new ones.\n\t\t// // however, this needs to be cross-days, so it cannot be done here\n\t\t// (this\n\t\t// // is only one day), but after the complete setupAppointments()\n\t\t// getChildren().removeAll(lOldClusteredDayAppointmentPanes);\n\t\t// getChildren().removeAll(lOldWholedayAppointmentPanes);\n\t\t// getChildren().addAll(wholedayAppointmentPanes);\n\t\t// getChildren().addAll(clusteredAppointmentPanes);\n\t\t//\n\t\t// // we're done, now have the header updated\n\t\t// dayHeaderPane.setupAppointments();\n\t}",
"private void init()\n {\n // Add listeners to the view\n addEventListeners();\n addSelectionChangeListeners();\n\n // Add listeners to the model\n addBackgroundImageHandler();\n addFrameWidgetHandler();\n addWidgetShapeChangeHandler();\n\n project.addHandler(this,\n Project.DesignChange.class,\n new AlertHandler()\n {\n\n public void handleAlert(EventObject alert)\n {\n Project.DesignChange chg =\n (Project.DesignChange) alert;\n\n if ((! chg.isAdd) &&\n (chg.element == design))\n {\n closeOpenController();\n }\n }\n });\n\n design.addHandler(this,\n Design.FrameChange.class,\n new AlertHandler()\n {\n\n public void handleAlert(EventObject alert)\n {\n Design.FrameChange chg =\n (Design.FrameChange) alert;\n\n if ((! chg.isAdd) &&\n (chg.element == frame))\n {\n closeOpenController();\n }\n }\n });\n\n design.addHandler(this,\n Design.DeviceTypeChange.class,\n new AlertHandler()\n {\n\n public void handleAlert(EventObject alert)\n {\n Set<DeviceType> dts =\n design.getDeviceTypes();\n int deviceTypes =\n DeviceType.buildDeviceSet(dts);\n\n view.resetDeviceTypes(deviceTypes);\n }\n });\n\n // Add listeners to rename events on project and design\n frame.addHandler(this, NameChangeAlert.class, renameHandler);\n design.addHandler(this,\n NameChangeAlert.class,\n renameHandler);\n\n // Some items should always be enabled.\n // Should be the last call in the constructor\n setInitiallyEnabled(true);\n }",
"public Controller()\n\t{\n\t\ttheParser = new Parser();\n\t\tstarList = theParser.getStars();\n\t\tmessierList = theParser.getMessierObjects();\n\t\tmoon = new Moon(\"moon\");\n\t\tsun = new Sun(\"sun\");\n\t\tconstellationList = theParser.getConstellations();\n\t\tplanetList = new ArrayList<Planet>();\n\t\ttheCalculator = new Calculator();\n\t\tepoch2000JD = 2451545.0;\n\t}",
"PersonalDetailsController(){\n hrDB=new HRDatabase();\n }",
"public CalendarFrame()\n\t{\n\t\tmodel = new Model();\n\t\tcontroller = new ControllerPanel(model);\n\t\tview = new MonthlyView(model);\n\t\tmodel.attach(view);\n\n\t\tthis.setSize(1500, 700);\n\t\tadd(controller, BorderLayout.NORTH);\n\t\tadd(view, BorderLayout.CENTER);\n\t\tsetBackground(Color.WHITE);\n\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t// pack();\n\t\tsetVisible(true);\n\t}",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_add_assignment); //inflates layout\n initViews(); //initializes views\n\n //gets instance for database\n mDatabase = EventDatabase.getInstance(this);\n\n //sets date and time formatters\n mDateFormatter = DateFormat.getDateInstance(DateFormat.LONG);\n mTimeFormatter = new SimpleDateFormat(\"h:mm a\");\n\n //gets time from INSTANCE_TIME if the activity is being recreated after being suddenly closed\n if(savedInstanceState != null && savedInstanceState.containsKey(INSTANCE_TIME)){\n long selectedTime = savedInstanceState.getLong(INSTANCE_TIME);\n Calendar temp = Calendar.getInstance();\n temp.setTimeInMillis(selectedTime);\n mDueDateCalendar = temp;\n } else mDueDateCalendar = Calendar.getInstance(); //if not, the default due date is the current time\n\n setDateTimeViews(); //sets mDueDate and mDueTime depending on the mDueDateCalendar\n\n //gets mEventId from bundle\n if (savedInstanceState != null && savedInstanceState.containsKey(INSTANCE_EVENT_ID)) {\n mEventId = savedInstanceState.getInt(INSTANCE_EVENT_ID, DEFAULT_EVENT_ID);\n }\n\n //gets the intent used to start the Activity\n Intent intent = getIntent();\n //checks if an event id was given to the class\n if(intent != null && intent.hasExtra(EXTRA_EVENT_ID)){\n if(mEventId == DEFAULT_EVENT_ID){\n mEventId = intent.getIntExtra(EXTRA_EVENT_ID, DEFAULT_EVENT_ID);\n //uses viewmodel factory to create a new event view model with database and id\n EventViewModelFactory factory = new EventViewModelFactory(mDatabase, mEventId);\n final EventViewModel eventViewModel =\n ViewModelProviders.of(this, factory).get(EventViewModel.class);\n //attaches listener to event\n eventViewModel.getEvent().observe(this, new Observer<Event>() {\n @Override\n public void onChanged(Event event) {\n mEvent = event;\n eventViewModel.getEvent().removeObserver(this);\n populateUI(event);\n }\n });\n }\n }\n //sets up view models\n setUpViewModels();\n //sets on click listeners to mDueDate and mDueTime TextViews\n setOnClickListeners();\n }",
"public VentaMainView() {\n initComponents();\n controlador = new VentaController();\n this.setLocationRelativeTo(null);\n cargarCategorias();\n cargarArticulos();\n }",
"public AlunoView() {\n initComponents();\n bus = new AlunoBus();\n }",
"public Appointment(int appointmentId, int customerId, int userId, String title, String apptType, String location, String contact, String url, Timestamp startTimeStamp,\r\n Timestamp endTimeStamp, String description) {\r\n this.appointmentId = new SimpleIntegerProperty(appointmentId);\r\n this.customerId = new SimpleIntegerProperty(customerId);\r\n this.userId = new SimpleIntegerProperty(userId);\r\n this.title = new SimpleStringProperty(title);\r\n this.apptType = new SimpleStringProperty(apptType);\r\n this.location = new SimpleStringProperty(location);\r\n this.contact = new SimpleStringProperty(contact);\r\n this.url = new SimpleStringProperty(url);\r\n this.startTimeStamp = startTimeStamp;\r\n this.endTimeStamp = endTimeStamp;\r\n this.description = new SimpleStringProperty(description);\r\n }",
"@When(\"^I navigate to Appointment Requests page$\")\n\tpublic void patient_navigates_to_appointment_request_page() throws Throwable {\n \tappt = new ApptBean();\n \t\n \tAssert.assertTrue(appt != null);\n \t\t\n\t}",
"public Controller()\n {\n // Create initial queues and stations\n q0 = new Queue(); //registration q\n \n // p[arameters are id of station, 4 queues, completed q)\n s0 = new Station(0, q0, q1, q2, q3, qx);\n \n //Student soiurce ss is an actor\n \n actors = new ArrayList<>(); \n actors.add(s0); // add all Actor implementors\n //actors.add(myStudentSorce);\n }",
"public QuizController()\n {\n quiz = new Quiz();\n quizList = new ArrayList<Quiz>();\n quizEJB = new QuizEJB();\n }",
"public EpisodeController(){\n\t\t//intentionally empty, I think\n\t}",
"public SessionController() {\n model = new MovieBookingModel();\n Thread t = new Thread(model); //start model thread to notify observers\n t.start();\n \n setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n setSize(500, 400);\n }",
"public Appointment() {\n this(DSL.name(\"appointment\"), null);\n }",
"private void initializeMealsControllers() {\n trNewPetMeal = MealsControllersFactory.createTrNewPetMeal();\n trObtainAllPetMeals = MealsControllersFactory.createTrObtainAllPetMeals();\n trDeleteMeal = MealsControllersFactory.createTrDeleteMeal();\n trUpdateMeal = MealsControllersFactory.createTrUpdateMeal();\n }",
"private void initializeViewAndControls() {\r\n txtEmail.setText(\"Email - \"+ AppConstants.ADMIN_EMAIL);\r\n txtCustomerCarePhone.setText(\"Customer Care - \"+ AppConstants.CUSTOMER_CARE_NUMBER);\r\n txtTollFreePhone.setText(\"Toll Free - \"+ AppConstants.TOLL_FREE_NUMBER);\r\n }",
"private void initializeEventControllers() {\n trNewPersonalEvent = EventControllersFactory.createTrNewPersonalEvent();\n trDeletePersonalEvent = EventControllersFactory.createTrDeletePersonalEvent();\n trNewPeriodicNotification = EventControllersFactory.createTrNewPeriodicNotification();\n trDeletePeriodicNotification = EventControllersFactory.createTrDeletePeriodicNotification();\n }",
"public EvaluationFormController()\n\t{\n\t\tDispatcher.addHandler(AddCheckAssignmentRequest.class.getCanonicalName(), this);\n\t}",
"@FXML\n void OnActionViewAllAppointments(ActionEvent event) {\n getTableData();\n MSAppointmentsTableView.setItems(allAppointments);\n }",
"private void setUpVC() {\n\t\tinitializePackageModel();\n\t\tinitializeRootLayout();\n\t\tinitializeStepCountView();\n\t\tinitializeButtonToScanForBluetoothDevices();\n\t\tinitializeButtonToSendCommands();\n\t\taddAllViewsToRootLayout();\n\t\tinitializeUARTControlFragmentInterface();\n\t\tsetListenerOnLaunchScanForBluetoothDevices();\n\t\tsetListenerOnButtonToSendCommands();\n\t}",
"@Override\n public void Create() {\n initView();\n initData();\n }",
"public lectManage() {\n initComponents();\n tableComponents();\n viewSchedule();\n }",
"public NationalController() {\n try {\n national = new National();\n isDisplayBtnConfirm = false;\n lstNational = DataUtil.getData(NationalModel.class, \"getAllNational\");\n if (!lstNational.isEmpty()) {\n mselectedNational = new National(lstNational.get(0));\n national = new National(lstNational.get(0));\n isSelectedApp = true;\n } else {\n isSelectedApp = false;\n mselectedNational = new National();\n }\n } catch (Exception ex) {\n SystemLogger.getLogger().error(ex);\n ClientMessage.logErr(ex.getMessage());\n }\n }",
"public ViewBookings() {\n initComponents();\n showCBooking();\n showBookingH();\n \n }",
"public void actionPerformed(java.awt.event.ActionEvent event) {\n\n // Figure out which button was clicked\n String menuItemClicked = event.getActionCommand();\n\n // create the controller which will open the correct form (refer to the controller constructor\n // methods do determine which Dao classes need to be passed to the controller constructors)\n if (menuItemClicked.equals(\"Add Classroom\")) {\n InputClassroomFormController inputController = new InputClassroomFormController(classroomDao);\n } else if (menuItemClicked.equals(\"List Classrooms\")) {\n ReportClassroomController reportController = new ReportClassroomController(classroomDao);\n } else if (menuItemClicked.equals(\"Save Data\")) {\n ClassroomIO.writeJSONFile(fileLocation, classroomDao);\n CourseIO.writeJSONFile(fileLocation, courseDao);\n FacultyIO.writeJSONFile(fileLocation, facultyDao);\n StudentIO.writeJSONFile(fileLocation, studentDao);\n ClassroomIO.writeSerializedFile(fileLocation, classroomDao);\n CourseIO.writeSerializedFile(fileLocation, courseDao);\n FacultyIO.writeSerializedFile(fileLocation, facultyDao);\n StudentIO.writeSerializedFile(fileLocation, studentDao);\n } else if (menuItemClicked.equals(\"Load Data\")) {\n //classroomDao.setListOfClassrooms(ClassroomIO.readJSONFile(fileLocation));\n //courseDao.setListOfCourses(CourseIO.readJSONFile(fileLocation));\n //facultyDao.setListOfFaculty(FacultyIO.readJSONFile(fileLocation));\n //studentDao.setListOfStudents(StudentIO.readJSONFile(fileLocation));\n classroomDao.setListOfClassrooms(ClassroomIO.readSerializedFile(fileLocation));\n courseDao.setListOfCourses(CourseIO.readSerializedFile(fileLocation));\n facultyDao.setListOfFaculty(FacultyIO.readSerializedFile(fileLocation));\n studentDao.setListOfStudents(StudentIO.readSerializedFile(fileLocation));\n } else if (menuItemClicked.equals(\"Add Course\")) {\n InputCourseController inputController = new InputCourseController(courseDao, classroomDao);\n } else if (menuItemClicked.equals(\"List Courses\")) {\n ReportCourseController reportController = new ReportCourseController(courseDao);\n } else if (menuItemClicked.equals(\"Add Faculty\")) {\n InputFacultyFormController inputController = new InputFacultyFormController(facultyDao, courseDao);\n } else if (menuItemClicked.equals(\"List Faculty\")) {\n ReportFacultyController reportController = new ReportFacultyController(facultyDao);\n } else if (menuItemClicked.equals(\"Add Student\")) {\n InputStudentFormController inputController = new InputStudentFormController(studentDao, courseDao);\n } else if (menuItemClicked.equals(\"List Students\")) {\n ReportStudentController reportController = new ReportStudentController(studentDao);\n } else if (menuItemClicked.equals(\"Exit\")) {\n System.exit(0);\n }\n }",
"public GameController() {\r\n\t\tsuper();\r\n\t\tthis.model = Main.getModel();\r\n\t\tthis.player = this.model.getPlayer();\r\n\t\tthis.timeline = this.model.getIndefiniteTimeline();\r\n\t}",
"public ImportTestsController() {\n App app = App.getInstance();\n Company company = app.getCompany();\n clientStore = company.getClientStore();\n authFacade = company.getAuthFacade();\n testStore = company.getTestStore();\n testTypeStore = company.getTestTypeStore();\n parameterStore = company.getParameterStore();\n clinicalStore = company.getClinicalStore();\n }",
"public ViewModel(TableHomeFrame tableHomeFrame){\n dbActions = new Model();\n this.tableHomeFrame = tableHomeFrame;\n calculations = new Calculations();\n }",
"public detalleInventarioController() {\n }",
"private void setupView() {\n //TODO Enter animation\n\n //setup button\n recordButtonToggle(true);\n resetButtonToggle(false);\n playButtonToggle(false);\n submitButtonToggle(false);\n\n tvChronometer.setText(getString(R.string.dummy_00_00));\n\n tvEmptyHistory.setVisibility(View.VISIBLE);\n item_one.setVisibility(View.INVISIBLE);\n item_two.setVisibility(View.INVISIBLE);\n\n pbCircle.setSmoothPercent(0.0f);\n\n //setup TextView\n Bundle bundle = this.getArguments();\n if (bundle != null) {\n\n String surahName = bundle.getString(Constants.AYAT_SURAHNAME);\n String subAyat = bundle.getString(Constants.AYAT_SUBAYAT);\n String ayatId = bundle.getString(Constants.AYAT_ID);\n\n if (!TextUtils.isEmpty(surahName) && !TextUtils.isEmpty(subAyat) &&!TextUtils.isEmpty(ayatId)) {\n //Set surah name\n tvSurahName.setText(surahName);\n\n //Set surah ayat\n tvVerse.setText(subAyat);\n\n //Save id in model\n presenter.setSurahId(ayatId);\n\n //Save sub ayat in model\n presenter.setAyat(subAyat);\n } else {\n activity.onBackPressed();\n }\n\n //Save surahName for output recording location\n String outputFileName = utils.trimSurahNameToFileName(tvSurahName.getText().toString());\n presenter.setAudioFileName(outputFileName);\n presenter.setSurahName(tvSurahName.getText().toString());\n\n presenter.initializedRecorder();\n\n //Get recite time from server\n presenter.processGetReciteTime(ayatId);\n } else {\n activity.onBackPressed();\n }\n\n //Setup folder for recording\n //TODO Ask for permission!\n boolean folder = new FileManager().createdReciteFolder();\n if (!folder) {\n //Unsuccessful create folder\n utils.getToast(activity, getString(R.string.error_create_folder));\n //disable record button\n recordButtonToggle(false);\n }\n }",
"private LessonController() {\n\t\tview = LessonPanel.getLessonPanel();\n\t\tview.clearPhraseTabelContent();\n\t\t//initAllPhrases();\n\t\taddALlListeners();\n\n\t\t//view.setVisible(true);\n\t}",
"@FXML\n public void OAWeekView(ActionEvent event) {\n Appointment.clearWeeklyAppointments();\n Appointment.setWeekAppointments();\n Appointments.setItems(Appointment.getWeekAppointments());\n }",
"public ViewDataIn() {\n initComponents();\n }",
"public Viewemployeeexpenditure() {\n initComponents();\n view1();\n \n }",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tnew EmployeeView().init();\r\n\t\t\t}",
"public AdminMainView() {\n initComponents();\n setComponent(new SearchEmployeeView(), mainPanel);\n }",
"public AppointmentRequestStepDefs (UserDataShared sharedUser){\n\t\tthis.authController = new AuthDAO(TestDAOFactory.getTestInstance());\n\t\tthis.sharedUser = sharedUser;\n\t\t\n\t}",
"private void initializeAppointmentsTab() {\r\n\r\n appTab = new JPanel(new GridBagLayout());\r\n appTab.setBackground(MainGUI.backgroundColor);\r\n appTab.setBorder(BorderFactory.createLineBorder(Color.BLACK, 1));\r\n appointmentConstraints = new GridBagConstraints();\r\n\r\n app_chooseDateAndTimeLabel = new JLabel(\"Select Date and Time For Appointment\");\r\n app_instructionLabel = new JLabel(\"(Search a patient first)\");\r\n app_patientNameLabel = new JLabel(\"Patient Name:\");\r\n app_lookUpAppointmentLabel = new JLabel(\"Look Up Patient's Existing Appointment\");\r\n\r\n app_chooseDateAndTimeLabel.setFont(new java.awt.Font(app_chooseDateAndTimeLabel.getFont().getFontName(), Font.PLAIN, 30));\r\n app_instructionLabel.setFont(new java.awt.Font(app_chooseDateAndTimeLabel.getFont().getFontName(), Font.PLAIN, 20));\r\n app_lookUpAppointmentLabel.setFont(new java.awt.Font(app_lookUpAppointmentLabel.getFont().getFontName(), Font.PLAIN, 25));\r\n\r\n app_chooseDateAndTimeLabel.setForeground(MainGUI.fontColor);\r\n app_instructionLabel.setForeground(MainGUI.fontColor);\r\n app_patientNameLabel.setForeground(MainGUI.fontColor);\r\n app_lookUpAppointmentLabel.setForeground(MainGUI.fontColor);\r\n\r\n datePicker = createDatePicker(true);\r\n timePicker = createTimePicker();\r\n\r\n app_patientNameTextField = new JTextField(12);\r\n app_patientNameTextField.setEditable(false);\r\n app_patientNameTextField.setBackground(Color.white);\r\n app_lookUpAppointmentTextField = new JTextField(15);\r\n app_lookUpAppointmentTextField.setEditable(false);\r\n app_lookUpAppointmentTextField.setBackground(Color.white);\r\n\r\n app_requestAppointmentButton = new JButton(\"Request Appointment\");\r\n app_cancelAppointmentButton = new JButton(\"Cancel Appointment\");\r\n app_lookUpAppointmentButton = new JButton(\"Look Up Appointment\");\r\n\r\n app_requestAppointmentButton.setForeground(MainGUI.fontColor);\r\n app_cancelAppointmentButton.setForeground(MainGUI.fontColor);\r\n app_lookUpAppointmentButton.setForeground(MainGUI.fontColor);\r\n\r\n // add components to appointments panel\r\n\r\n // appointments directions label\r\n appointmentConstraints.gridx = 10;\r\n appointmentConstraints.gridy = 10;\r\n appointmentConstraints.weightx = 1;\r\n appointmentConstraints.weighty = 0.2;\r\n appointmentConstraints.anchor = GridBagConstraints.NORTH;\r\n appointmentConstraints.insets = new Insets(20, 0, 0, 0);\r\n appTab.add(app_chooseDateAndTimeLabel, appointmentConstraints);\r\n\r\n // add instruction label\r\n appointmentConstraints.insets = new Insets(50, 0, 0, 0);\r\n appTab.add(app_instructionLabel, appointmentConstraints);\r\n\r\n // add patient name label\r\n appointmentConstraints.anchor = GridBagConstraints.NORTHEAST;\r\n appointmentConstraints.insets = new Insets(10, 0, 0, 40);\r\n appTab.add(app_patientNameLabel, appointmentConstraints);\r\n\r\n // add patient name textfield\r\n appointmentConstraints.insets = new Insets(35, 0, 0, 10);\r\n appTab.add(app_patientNameTextField, appointmentConstraints);\r\n\r\n // add date picker\r\n appointmentConstraints.gridy = 20;\r\n appointmentConstraints.weightx = 0;\r\n appointmentConstraints.anchor = GridBagConstraints.CENTER;\r\n appointmentConstraints.insets = new Insets(20, 0, 0, 110);\r\n appTab.add(datePicker, appointmentConstraints);\r\n\r\n // add time picker\r\n appointmentConstraints.insets = new Insets(20, 160, 0, 0);\r\n appTab.add(timePicker, appointmentConstraints);\r\n\r\n // add request appointment button\r\n appointmentConstraints.gridy = 30;\r\n appointmentConstraints.weighty = 1;\r\n appointmentConstraints.ipady = 10;\r\n appointmentConstraints.anchor = GridBagConstraints.NORTH;\r\n appointmentConstraints.insets = new Insets(30, 0, 0, 170);\r\n appTab.add(app_requestAppointmentButton, appointmentConstraints);\r\n\r\n // add cancel appointment button\r\n appointmentConstraints.ipady = 10;\r\n appointmentConstraints.insets = new Insets(30, 170, 0, 0);\r\n appTab.add(app_cancelAppointmentButton, appointmentConstraints);\r\n\r\n // add lookup appointment label\r\n appointmentConstraints.ipady = 0;\r\n appointmentConstraints.gridy = 40;\r\n appointmentConstraints.weighty = 0.2;\r\n appointmentConstraints.insets = new Insets(0, 0, 0, 0);\r\n appTab.add(app_lookUpAppointmentLabel, appointmentConstraints);\r\n\r\n // add lookup appt button\r\n appointmentConstraints.ipady = 10;\r\n appointmentConstraints.weighty = 1;\r\n appointmentConstraints.gridy = 50;\r\n appointmentConstraints.insets = new Insets(0, 0, 0, 195);\r\n appTab.add(app_lookUpAppointmentButton, appointmentConstraints);\r\n\r\n // add lookup appt text field\r\n appointmentConstraints.ipady = 5;\r\n appointmentConstraints.insets = new Insets(5, 180, 0, 0);\r\n appTab.add(app_lookUpAppointmentTextField, appointmentConstraints);\r\n\r\n }",
"@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tString date = AppDateField.getText();\n\t\tString Time = AppTimeField.getText();\t\n\t\tString Name = AppPatNameField.getText();\n\t\tString Surname = AppPatSurnameField.getText();\n\t\tint Id = Integer.parseInt(AppPatIdField.getText());\n\t\tString Doctor = AppDocNameField.getText();\n\t\tString Service = (String) SelectTask.getSelectedItem();\n\t\t\n\t\tDBH db = new DBH();\n\t\t\n\t\tString sql = \"INSERT INTO `Narnia_Hospital`.`Appointments` (`Appointment_Date`, `Appointment_Time`, `AppPat_Name`, `AppPat_Surname`, `AppPatId`, `AppDoctor`, `AppService`) VALUES ('\"+date+\"','\"+Time+\"','\"+Name+\"','\"+Surname+\"','\"+Id+\"','\"+Doctor+\"','\"+Service+\"')\"; \n\t\t\n\t\t\n\t\tResultSet rs = null;\n\t\t\n\t\ttry{\n\t\t rs = db.executeCall(sql);\n \t\t\n\t\t while(rs.next()){\n\t\t\t \n\t\t\t Appointment A1 = new Appointment();\n\t\t\t \n\t\t\t A1.setAppDate (date);\n\t\t\t A1.setAppTime(Time);\n\t\t\t A1.setPatientName(Name);\n\t\t\t A1.setPatientSurname(Surname);\n\t\t\t A1.setPatId(Id);\n\t\t\t A1.setDoctorName(Doctor);\n\t\t\t A1.setServiceRequired(Service);\n\t\t\t \n\t\t\t \n\t\t\t \t\n\t\t\t\t }\n\t\t\t \n\t\t \n\t\t \n\t\t \n\t\t}catch (Exception ex){}\n\t\t\n\t\t//Offers the option to create a new one or leave this screen.\n\t\t\n\t\tJOptionPane.showMessageDialog(this, \"Appointment Registered!\");\n\t\t\n\t\t int n = JOptionPane.showConfirmDialog(this,\"Do you want to add another appointment?\", \"Message Selected\", JOptionPane.YES_NO_OPTION);\n\t\t\t\n\t\t if (n == 0){ \n\t\t\t this.setVisible(false);\n\t\t\t new NewAppointment();\n\t\t\t\n\t\t} else if (n == 1){\n\t\t\t this.setVisible(false);\n\t\t\t new SecretaryScreen();\n\t\t}\n\t\t\n\t}",
"public BookView() {\n initComponents();\n setLocationRelativeTo(null);\n setTitle(\"Livaria Paris - Editora\");\n dataBase = new DataBase();\n dataBase.insertBook();\n fillTable(dataBase.getBooks());\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jScrollPane1 = new javax.swing.JScrollPane();\n table_appointment = new javax.swing.JTable();\n date_appointment = new javax.swing.JTextField();\n status_appointment = new javax.swing.JTextField();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n patient_id_appointment = new javax.swing.JLabel();\n patient_name_appointment = new javax.swing.JLabel();\n doctor_appointment = new javax.swing.JTextField();\n jLabel7 = new javax.swing.JLabel();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jLabel5 = new javax.swing.JLabel();\n id_appointment = new javax.swing.JLabel();\n jButton3 = new javax.swing.JButton();\n jMenuBar1 = new javax.swing.JMenuBar();\n jMenu1 = new javax.swing.JMenu();\n jMenuItem1 = new javax.swing.JMenuItem();\n jMenu2 = new javax.swing.JMenu();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n\n table_appointment.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null}\n },\n new String [] {\n \"Title 1\", \"Title 2\", \"Title 3\", \"Title 4\"\n }\n ));\n table_appointment.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n table_appointmentMouseClicked(evt);\n }\n });\n jScrollPane1.setViewportView(table_appointment);\n\n jLabel1.setText(\"Date\");\n\n jLabel2.setText(\"Status\");\n\n jLabel3.setText(\"Patient ID\");\n\n jLabel4.setText(\"Patient name\");\n\n doctor_appointment.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyReleased(java.awt.event.KeyEvent evt) {\n doctor_appointmentKeyReleased(evt);\n }\n });\n\n jLabel7.setText(\"Doctor ID\");\n\n jButton1.setText(\"Save\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jButton2.setText(\"Cancel\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n jLabel5.setText(\"Appointment ID\");\n\n jButton3.setText(\"Add\");\n jButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3ActionPerformed(evt);\n }\n });\n\n jMenu1.setText(\"File\");\n\n jMenuItem1.setText(\"Main menu\");\n jMenuItem1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem1ActionPerformed(evt);\n }\n });\n jMenu1.add(jMenuItem1);\n\n jMenuBar1.add(jMenu1);\n\n jMenu2.setText(\"Edit\");\n jMenuBar1.add(jMenu2);\n\n setJMenuBar(jMenuBar1);\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(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(doctor_appointment, javax.swing.GroupLayout.PREFERRED_SIZE, 170, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(28, 28, 28)\n .addComponent(jLabel7))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1)\n .addComponent(jLabel2)\n .addComponent(jLabel4)\n .addComponent(jLabel3))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(date_appointment)\n .addComponent(status_appointment)\n .addComponent(patient_name_appointment, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(patient_id_appointment, javax.swing.GroupLayout.PREFERRED_SIZE, 165, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 53, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel5)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(id_appointment, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 38, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(88, 88, 88)))\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 574, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 351, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(19, 19, 19)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(doctor_appointment, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel7))\n .addGap(35, 35, 35)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jLabel5)\n .addGap(27, 27, 27))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(id_appointment, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(patient_id_appointment, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel4)\n .addGap(12, 12, 12))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(patient_name_appointment, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(date_appointment, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel1))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(status_appointment, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(26, 26, 26)\n .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(44, Short.MAX_VALUE))\n );\n\n pack();\n }",
"public Controller(IView view) {\n\t\tengine = new Engine(this);\n\t\tclock = new Clock();\n\t\tsoundEmettor = new SoundEmettor();\n\t\tthis.view = view;\n\t}",
"public MainController() {\n\t\tcontroller = new Controller(this);\n\t}"
]
| [
"0.68191457",
"0.65318775",
"0.6329409",
"0.6280315",
"0.6258441",
"0.59760636",
"0.59089637",
"0.5878966",
"0.58712256",
"0.58462197",
"0.5840675",
"0.5834722",
"0.5801454",
"0.5786706",
"0.57663727",
"0.57627827",
"0.57479215",
"0.5745717",
"0.5745212",
"0.5733129",
"0.5720454",
"0.571919",
"0.5706675",
"0.5700583",
"0.569809",
"0.5690469",
"0.5687192",
"0.5686199",
"0.5677725",
"0.5674373",
"0.5670842",
"0.5654938",
"0.5648664",
"0.5623361",
"0.56165946",
"0.5613833",
"0.5612113",
"0.5611675",
"0.5599953",
"0.5599325",
"0.5595121",
"0.5593022",
"0.55888677",
"0.5587905",
"0.55854565",
"0.5578832",
"0.557108",
"0.5558834",
"0.5557069",
"0.55533683",
"0.5549182",
"0.5548803",
"0.5540772",
"0.5525026",
"0.5521951",
"0.55211115",
"0.5515121",
"0.548381",
"0.54835886",
"0.5473669",
"0.5452811",
"0.54510856",
"0.5447022",
"0.54212135",
"0.541261",
"0.541242",
"0.5391609",
"0.53895557",
"0.5383961",
"0.5383426",
"0.5377229",
"0.5374343",
"0.536901",
"0.5350933",
"0.53480446",
"0.5340006",
"0.53390783",
"0.5327683",
"0.53253317",
"0.53234255",
"0.5320834",
"0.53205997",
"0.53195614",
"0.5316128",
"0.5312135",
"0.53103834",
"0.53102756",
"0.5307077",
"0.53013456",
"0.52959484",
"0.52934515",
"0.5286101",
"0.5271795",
"0.5268427",
"0.5264412",
"0.5263373",
"0.5262974",
"0.52622175",
"0.526179",
"0.5259884"
]
| 0.6057242 | 5 |
Save the model to file calls the writeFile object to write the models to the file | public void saveData(){
file.executeAction(modelStore);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void saveToFile(File file, Model model) throws IOException;",
"void save() {\n gameModelPoDao.saveToFile(file.getAbsolutePath(), gameModelPo);\n }",
"public void save(){\r\n\t\t//System.out.println(\"call save\");\r\n\t\tmodel.printDoc();\r\n\t}",
"public void saveModel(File model_file) throws Exception{\n\t\t// Write model to file\n\t\t//System.out.println(mClassifier.getClass());\n\t\tSystem.out.println(\"Saving Trained Model. Please wait.\");\n\t\tif(mClassifier instanceof DynamicLMClassifier){\n\t\t\tFileOutputStream fileOut = new FileOutputStream(model_file);\n\t ObjectOutputStream objOut = new ObjectOutputStream(fileOut);\n\t ((DynamicLMClassifier<NGramProcessLM>) mClassifier).compileTo(objOut);\n\t objOut.close();\n\t System.out.println(\"Saving Trained Model. Complete.\");\n\t\t}else{\n\t\t\tthrow new Exception(\"Cannot compile a non dynamic traning set\");\n\t\t}\n\t}",
"public void save() throws Exception{\n\t\tFileOutputStream saveFile = new FileOutputStream(Config.languageModelFile);\n\t\tObjectOutputStream save = new ObjectOutputStream(saveFile);\n\t\tsave.writeObject(lm_);\n\t\tsave.close();\n\t}",
"public void save() throws Exception {\n FileOutputStream saveFile = new FileOutputStream(Config.languageModelFile);\n ObjectOutputStream save = new ObjectOutputStream(saveFile);\n save.writeObject(this);\n save.close();\n }",
"public void saveToStream(OutputStream stream, Model model);",
"public void saveModel() {\n\t}",
"void saveAs() {\n writeFile.Export();\n }",
"protected void modelWrite(){\r\n\t\tthis.model.write(System.out);\r\n\t\tSystem.out.println(\"\\n -- model write finished --\\n\");\r\n\t\t\r\n\t}",
"public void saveModel(String filePath) {\n\n\t\tFile parentFile = new File(filePath).getParentFile();\n\t\tif (parentFile != null && !parentFile.exists()) {\n\t\t\tparentFile.mkdirs();\n\t\t}\n\n\t\ttry {\n\t\t\tObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(filePath));\n\t\t\toos.writeObject(new HMMModel(pi, A, B));\n\t\t\toos.close();\n\t\t\tSystem.out.println(\"Model saved.\");\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"@Override\r\n\tpublic void serialize(Model model, OutputStream outputStream) {\n\t\tResourceSet resourceSet = new ResourceSetImpl();\r\n\r\n\t\t// Register the default resource factory -- only needed for stand-alone!\r\n\t\tresourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put(\r\n\t\t\t Resource.Factory.Registry.DEFAULT_EXTENSION, new XMIResourceFactoryImpl()\r\n\t\t);\r\n\r\n\t\t// Get the URI of the model file.\r\n\t\t//URI uri = URI.createFileURI(new File(\"mylibrary.xmi\").getAbsolutePath());\r\n\t\tURI uri = URI.createURI(SPAGOBI_MODEL_URI);\r\n\t\t \r\n\t\t// Create a resource for this file.\r\n\t\tResource resource = resourceSet.createResource(uri);\r\n\t\t \r\n\t\t// Add the book and writer objects to the contents.\r\n\t\tresource.getContents().add(model);\r\n\t\r\n\t\t// Save the contents of the resource to the file system.\r\n\t\ttry {\r\n\t\t\t//resource.save(Collections.EMPTY_MAP);\r\n\t\t\tresource.save(outputStream, Collections.EMPTY_MAP);\r\n\t\t} catch (IOException e) {\r\n\t\t throw new RuntimeException(\"Impossible to serialize model [\" + model.getName() + \"]\", e);\r\n\t\t}\t\r\n\t}",
"public void save() throws FileNotFoundException, IOException, ClassNotFoundException ;",
"public interface ModelWriter {\n\t\n\t/**\n\t * Writes a model to a file.\n\t * \n\t * @param file\n\t * the file to write the model to.\n\t * @param model\n\t * the model to write.\n\t */\n\tpublic void saveToFile(File file, Model model) throws IOException;\n\n\t/**\n\t * Writes a model to a stream.\n\t * \n\t * @param stream\n\t * the stream to write the model to.\n\t * @param model\n\t * the model to write.\n\t */\n\tpublic void saveToStream(OutputStream stream, Model model);\n\n}",
"public void saveModel(String outFile) {\n\t\ttry {\n\t\t\tmodel.write(new FileWriter(outFile), \"RDF/XML\");\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void saveModelAs() {\r\n \t\t// Updates station positions into data structure\r\n \t\tupdateStationPositions();\r\n \t\tint status = modelLoader.saveModel(model, mainWindow, null);\r\n \t\tswitch (status) {\r\n \t\t\tcase ModelLoader.SUCCESS:\r\n \t\t\t\tmodel.resetSaveState();\r\n \t\t\t\topenedArchive = modelLoader.getSelectedFile();\r\n \t\t\t\tmainWindow.updateTitle(openedArchive.getName());\r\n \t\t\t\tbreak;\r\n \t\t\tcase ModelLoader.FAILURE:\r\n \t\t\t\tshowErrorMessage(modelLoader.getFailureMotivation());\r\n \t\t\t\tbreak;\r\n \t\t}\r\n \t}",
"public void saveModel() {\r\n \t\tif (openedArchive == null) {\r\n \t\t\tsaveModelAs();\r\n \t\t\treturn;\r\n \t\t}\r\n \r\n \t\t// Updates station positions into data structure\r\n \t\tupdateStationPositions();\r\n \t\tint status = modelLoader.saveModel(model, mainWindow, openedArchive);\r\n \t\tswitch (status) {\r\n \t\t\tcase ModelLoader.SUCCESS:\r\n \t\t\t\tmodel.resetSaveState();\r\n \t\t\t\tmainWindow.updateTitle(openedArchive.getName());\r\n \t\t\t\tbreak;\r\n \t\t\tcase ModelLoader.FAILURE:\r\n \t\t\t\tshowErrorMessage(modelLoader.getFailureMotivation());\r\n \t\t\t\tbreak;\r\n \t\t}\r\n \t}",
"public void save() {\t\n\t\n\t\n\t}",
"public void save() {\n JAXB.marshal(this, new File(fileName));\n }",
"synchronized public void saveToFile() {\n try {\n saveObjToFile(this, saveFilePath);\n } catch (IOException e) {\n e.printStackTrace();\n log(\"error saving resource to file\");\n }\n }",
"public void run() {\n\t\t\t\t\t\tFile tempFile;\n\t\t\t\t\t\tif (tempFileStack.size() >= numberOfFiles)\n\t\t\t\t\t\t\ttempFile = (File) tempFileStack.remove(0); // pop\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\ttempFile = File.createTempFile(\n\t\t\t\t\t\t\t\t\t\t\"FM_\"\n\t\t\t\t\t\t\t\t\t\t\t\t+ ((model.toString() == null) ? \"unnamed\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: model.toString()),\n\t\t\t\t\t\t\t\t\t\tfreemind.main.FreeMindCommon.FREEMIND_FILE_EXTENSION,\n\t\t\t\t\t\t\t\t\t\tpathToStore);\n\t\t\t\t\t\t\t\tif (filesShouldBeDeletedAfterShutdown)\n\t\t\t\t\t\t\t\t\ttempFile.deleteOnExit();\n\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\tSystem.err\n\t\t\t\t\t\t\t\t\t\t.println(\"Error in automatic MindMapMapModel.save(): \"\n\t\t\t\t\t\t\t\t\t\t\t\t+ e.getMessage());\n\t\t\t\t\t\t\t\tfreemind.main.Resources.getInstance()\n\t\t\t\t\t\t\t\t\t\t.logException(e);\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tmodel.saveInternal(tempFile, true /* =internal call */);\n\t\t\t\t\t\t\tmodel.getFrame()\n\t\t\t\t\t\t\t\t\t.out(Resources\n\t\t\t\t\t\t\t\t\t\t\t.getInstance()\n\t\t\t\t\t\t\t\t\t\t\t.format(\"automatically_save_message\",\n\t\t\t\t\t\t\t\t\t\t\t\t\tnew Object[] { tempFile\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.toString() }));\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\tSystem.err\n\t\t\t\t\t\t\t\t\t.println(\"Error in automatic MindMapMapModel.save(): \"\n\t\t\t\t\t\t\t\t\t\t\t+ e.getMessage());\n\t\t\t\t\t\t\tfreemind.main.Resources.getInstance().logException(\n\t\t\t\t\t\t\t\t\te);\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttempFileStack.add(tempFile); // add at the back.\n\t\t\t\t\t}",
"public void saveModel() {\n\n }",
"public void save() {\n\t\tWriteFile data = new WriteFile( this.name + \".txt\" );\n\t\ttry {\n\t\t\t data.writeToFile(this.toString());\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\tSystem.out.println(\"Couldn't print to file\");\n\t\t}\n\t}",
"void save() throws IOException, ParserConfigurationException, TransformerConfigurationException;",
"void save();",
"void save();",
"void save();",
"public void save(){\n\t\tlowresModelManager.save();\n\t}",
"public static void saveStory(StoryModel storyModel){\n try {\n File file = new File(getFilePath(storyModel.getStoryId()));\n file.createNewFile();\n FileOutputStream fos;\n fos = new FileOutputStream(file);\n ObjectOutputStream oos = new ObjectOutputStream(fos);\n oos.writeObject(storyModel);\n oos.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"@Override\n\tpublic void save(Object o, String file) {\n\t\t\n\t}",
"private void save(ComputationGraph net) throws Exception {\r\n ModelSerializer.writeModel(net, locationToSave, saveUpdater);\r\n }",
"protected void writeFile(Document model, FileWriter writer)\n throws IOException, Exception {\n writer.loadTemplate();\n\n String className = model.getDocumentElement().getAttribute(\"name\");\n writer.createOutFile(null, className); //pass in null as the package\n\n // use the global resolver\n writer.parse(model, resolver);\n }",
"public void save() {\n\t\t// Register the XMI resource factory for the .xmi extension\n\t\tResource.Factory.Registry reg = Resource.Factory.Registry.INSTANCE;\n\t\tMap<String, Object> m = reg.getExtensionToFactoryMap();\n\t\tm.put(\"xmi\", new XMIResourceFactoryImpl());\n\n\t\t// Obtain a new resource set\n\t\tResourceSet resSet = new ResourceSetImpl();\n\n\t\t// Create a resource\n\t\tResource resource = resSet.createResource(this.targetURI);\n\n\t\t// Get the first model element and cast it to the right type\n\t\tresource.getContents().add(targetRootBlock);\n\n\t\t// Now save the content.\n\t\tMap<String, Object> options = new HashMap<String, Object>();\n\t\toptions.put(XMIResource.OPTION_ENCODING, \"UTF-8\");\n\t\ttry {\n\t\t\tresource.save(options);\n\t\t} catch (IOException e) {\n\t\t\tLOGGER.error(\"IOException when trying to save to \" + this.targetURI);\n\t\t}\n\n\t\tif (LOGGER.isInfoEnabled()) {\n\t\t\tLOGGER.info(\"Saved Shapes model to \" + this.targetURI);\n\t\t}\n\t}",
"public void save();",
"public void save();",
"public void save();",
"public void save();",
"public void saveToFile()\n\t{\t\n\t\tsetCourseToFileString(courseToFileString);\n\t\t\ttry \n\t {\n\t FileWriter fw = new FileWriter(fileName);\n\t fw.write (this.getCourseToFileString ( ));\n\t for(Student b : this.getStudents ( ))\t \t\n\t \tfw.write(b.toFileString ( ));\n\t \tfw.close ( );\n\t } \n\t catch (Exception ex) \n\t {\n\t ex.printStackTrace();\n\t }\n\t\t\tthis.saveNeed = false;\n\n\t}",
"public abstract void saveToFile(PrintWriter out);",
"public void saveToFile() {\n FileOutputStream fos = null;\n try {\n //write the object into file\n fos = new FileOutputStream(file);\n ObjectOutputStream oos = new ObjectOutputStream(fos);\n oos.writeObject(travelGUI.getTravelAgent());\n oos.flush();\n oos.close();\n }\n catch (IOException ioe) {\n System.out.println(ioe.getMessage());\n if (fos != null) {\n try {\n fos.close();\n }\n catch (IOException ioe2) {\n System.out.println(ioe2.getMessage());\n }\n }\n return;\n }\n finally {\n if (fos != null) {\n try {\n fos.close();\n }\n catch (IOException ioe2) {\n System.out.println(ioe2.getMessage());\n }\n }\n }\n if (fos != null) {\n try {\n fos.close();\n }\n catch (IOException ioe2) {\n System.out.println(ioe2.getMessage());\n }\n }\n }",
"public void Save() {\n try {\n ObjectOutputStream objUt = new ObjectOutputStream(\n new FileOutputStream(\"sparfil.txt\"));\n objUt.writeObject(this);\n } catch(Exception e) {\n System.out.println(e);}\n }",
"public void save() throws TransformerException {\n\t\tgenerator.saveToFile(saveLocation);\n\t}",
"public void save() {\n }",
"@Override\n\tpublic void save() {\n\t\t\n\t\tFile savingDirectory = new File(savingFolder());\n\t\t\n\t\tif( !savingDirectory.isDirectory() ) {\n\t\t\tsavingDirectory.mkdirs();\n\t\t}\n\t\t\n\t\t\n\t\t//Create the file if it's necessary. The file is based on the name of the item. two items in the same directory shouldn't have the same name.\n\t\t\n\t\tFile savingFile = new File(savingDirectory, getIdentifier());\n\t\t\n\t\tif( !savingFile.exists() ) {\n\t\t\t\n\t\t\ttry {\n\t\t\t\tsavingFile.createNewFile();\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.err.println(\"the following item couldn't be saved: \" + getIdentifier());\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\n\t\t}\n\n\t\t\n\t\t//generate the savingTextLine and print it in the savingFile. the previous content is erased when the PrintWriter is created.\n\t\t\n\t\tString text = generateSavingTextLine();\n\n\t\ttry {\n\t\t\tPrintWriter printer = new PrintWriter(savingFile);\n\t\t\tprinter.write(text);\t\t\t\n\t\t\tprinter.close();\n\t\t\t\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t\tsave();\n\t\t} \n\t}",
"public abstract void save(FileWriter fw) throws IOException;",
"@Override\n\tpublic void save(String file_name) {\n\t\tserialize(file_name);\n\t}",
"void save(String fileName) throws IOException, TransformerConfigurationException, ParserConfigurationException;",
"public void save(final IPath path) throws IOException {\r\n\t\t// This sets the model as contents in a new resource when using save as.\r\n\t\ttry {\r\n\t\t\tresource = resourceSet.getResource(URI.createPlatformResourceURI(\r\n\t\t\t\t\tpath.toString(), true), true);\r\n\t\t} catch (final Exception e) {\r\n\t\t\t// FIXME eigentlich sollte getResource schon eine Resource erzeugen\r\n\t\t\tresource = resourceSet.createResource(URI\r\n\t\t\t\t\t.createPlatformResourceURI(path.toString(), true));\r\n\t\t\tAssert.isTrue(false, \"Unerwartete Codeausführung.\");\r\n\t\t}\r\n\t\trecursiveSetNamesIfUnset(models);\r\n\t\tresource.getContents().clear();\r\n\t\tresource.getContents().addAll(models);\r\n\t\tfinal Map<String, Boolean> options = new HashMap<String, Boolean>();\r\n\t\toptions.put(XMLResource.OPTION_DECLARE_XML, Boolean.TRUE);\r\n\t\tresource.save(options);\r\n\t}",
"public void save () {\n // Make sure the workspace folder exist\n createFolder(this.pathToWorkspaceFolder);\n\n // Write the serialized Flow object\n System.out.println(\"Saving\");\n try (FileWriter file = new FileWriter(this.pathToWorkspaceFolder.toString() + \"/\" + FLOW_FILE_NAME)) {\n file.write(flow.serialize());\n System.out.println(\"Successfully Copied Flow \" + flow.getId() + \" to File :)\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"private void saveInFile() {\n\t\tthis.deleteFile();\n\t\tfor (CounterModel obj : counterListModel.getCounterList()) {\n\t\t\ttry {\n\t\t\t\tGson gson = new Gson();\n\t\t\t\tif (obj.getCounterName().equals(counterModel.getCounterName())) {\n\t\t\t\t\tobj = counterModel;\n\t\t\t\t}\n\t\t\t\tString json = gson.toJson(obj) +'\\n';\n\t\t\t\tFileOutputStream fos = openFileOutput(FILENAME,\n\t\t\t\t\t\tContext.MODE_APPEND);\n\t\t\t\tfos.write(json.getBytes());\n\t\t\t\tfos.close();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\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}",
"public void saveModel(ModelClass model) throws StorageIOException {\n try {\n Dao<ModelDB, String> modelDao = this.databaseHelper.getDao(ModelDB.class);\n\n ModelDB modelEntity = classToDB(model);\n modelDao.createOrUpdate(modelEntity);\n \n } catch (SQLException e) {\n throw new StorageIOException(\"Failed to save model\", e);\n }\n }",
"public boolean save(Data model);",
"public boolean save() {\n\t\treturn save(_file);\n\t}",
"public Base save(Base model) throws IOException {\n\t\tif (model.getID().equals(\"\")) {\n\t\t\treturn Core.create(model, getHttpMethodExecutor());\n\t\t} else {\n\t\t\treturn Core.update(model, getHttpMethodExecutor());\n\t\t}\n\n\t}",
"void saveDocument(SingleDocumentModel model, Path newPath);",
"@Override\n public void setSaveFile(File file)\n {\n \n }",
"public void saveModel(IModel model, CommonTree modelDescriptor,\n String directory, String extension, boolean trim)\n {\n\n ICodeGenerator generator = CodeGeneratorFactory.getCodeGenerator(extension);\n\n if (generator == null)\n {\n if (LOGGER.isWarnEnabled())\n LOGGER.warn(\"Could not find a code generator for \" + extension);\n return;\n }\n\n String destination = null;\n try\n {\n /*\n * ok, now let's create the directory\n */\n File root = new File(getRuntime().getWorkingDirectory(),\n directory);\n destination = root.getCanonicalPath();\n\n if (!root.exists()) root.mkdirs();\n\n File toBeWritten = new File(root, model.getName() + \".\" + extension);\n destination = toBeWritten.getCanonicalPath();\n\n PrintWriter pw = new PrintWriter(new BufferedWriter(new FileWriter(\n toBeWritten)));\n\n /*\n * now before we dump we should make sure that the buffer contents are\n * written\n */\n\n /*\n * we dump the full model\n */\n for (StringBuilder line : generator.generate(modelDescriptor, trim))\n pw.println(line.toString());\n\n pw.flush();\n pw.close();\n }\n catch (Exception ioe)\n {\n LOGGER\n .error(\"Could not write \" + model + \" to \" + destination + \" \", ioe);\n }\n }",
"void save(File file);",
"@Override\n\tpublic void save() {\n\t\t\n\t}",
"@Override\n\tpublic void save() {\n\t\t\n\t}",
"public void save(File filename) throws IOException {\n FileOutputStream fos = new FileOutputStream(filename);\n ObjectOutputStream oos = new ObjectOutputStream(fos);\n oos.writeObject(this);\n oos.close();\n }",
"@Override\r\n\tpublic void save() throws SaveException {\n\t\t\r\n\t}",
"@Override\n public void save(final String filename) throws IOException {\n Filer.getInstance().save(this, DGraphIOFactory.getInstance(), filename);\n }",
"public void save(){\n try{\n Date date = new Date();\n \n PrintWriter writer = new PrintWriter(\"data.MBM\", \"UTF-8\");\n \n writer.println(\"version:\"+MBMDriver.version);\n writer.println(\"numworlds:\" + worlds.size());\n writer.println(\"lastclosed:\" + date.toString());\n writer.println(\"outDir:\"+outputDir.toPath());\n \n for(int i = 0; i < worlds.size(); i++){\n \n writer.println(\"MBMWORLD:\"+worlds.get(i).getWorldFile().getName()+\":\"+worlds.get(i).getName()+\":\"+worlds.get(i).getWorldFile().toPath()+\":\"+worlds.get(i).getLastBackupDate());\n }\n \n writer.close();\n }catch(FileNotFoundException e){\n System.out.println(\"ERROR: Failed to Find File\");\n }catch(UnsupportedEncodingException e){\n System.out.println(\"ERROR: Unsupported Encoding Exception\");\n }\n }",
"public void save() throws Exception {\n // create a File object for the output file\n File outputFile = new File(MinuteUpdater.mapDir, this.fileName);\n // outputFile.mkdirs();\n outputFile.createNewFile();\n FileOutputStream fileOutputStream = new FileOutputStream(outputFile);\n ObjectOutputStream objectOutputStream = new ObjectOutputStream(fileOutputStream);\n\n objectOutputStream.writeObject(this);\n objectOutputStream.close();\n }",
"protected void save() {\n close();\n if(saveAction != null) {\n saveAction.accept(getObject());\n }\n }",
"public void save() {\n UTILS.write(FILE.getAbsolutePath(), data);\n }",
"private void serialize() {\r\n if (newFile) {\r\n this.newFile = this.serializeAs();\r\n } else if (!newFile && !path.equals(\"\")) {\r\n sr.save(this.path);\r\n }\r\n }",
"private void saveResourceFile()\r\n\t{\t\r\n\t\tFile file = null;\r\n\t\tFileWriter fw = null;\r\n\t\t//File complete = null;//New file for the completed list\r\n\t\t//FileWriter fw2 = null;//Can't use the same filewriter to do both the end task and the complted products.\r\n\t\ttry{\r\n\t\t\tfile = new File(outFileName);\r\n\t\t\tfile.createNewFile();\r\n\t\t\tfw = new FileWriter(outFileName,true);\r\n\t\t\tfor(FactoryObject object : mFObjects)\r\n\t\t\t{\r\n\t\t\t\tif(object instanceof FactoryReporter) {\r\n\t\t\t\t\t((FactoryReporter)object).report(fw);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (IOException ioe) {\r\n\t\t\tSystem.out.println(ioe.getMessage());\r\n\t\t\tif(file != null) {\r\n\t\t\t\tfile.delete();\r\n\t\t\t}\r\n\t\t} finally {\r\n\t\t\tif(fw != null) {\r\n\t\t\t\ttry{\r\n\t\t\t\t\tfw.close();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\tSystem.out.println(\"Failed to close the filewriter!\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\n public void save() {\n \n }",
"@Override\n\tpublic void doSaveAs() {\n\n\t}",
"void saveToFile() {\n\t\ttry {\n\t\t\tFile directory = GameApplication.getInstance().getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS);\n\t\t\tFile target = new File(directory, FILE_NAME);\n\t\t\tif (!target.exists()) {\n\t\t\t\ttarget.createNewFile();\n\t\t\t}\n\t\t\tJsonWriter writer = new JsonWriter(new FileWriter(target));\n\t\t\twriter.setIndent(\" \");\n\t\t\twriter.beginArray();\n\t\t\tfor (Scoreboard scoreboard : scoreboards.values()) {\n\t\t\t\twriteScoreboard(writer, scoreboard);\n\t\t\t}\n\t\t\twriter.endArray();\n\t\t\twriter.flush();\n\t\t\twriter.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private void save() throws FileNotFoundException {\n\t\tm.write(new FileOutputStream(OUTPUT), \"RDF/XML\");\n\t}",
"public void save(String fileName) throws IOException;",
"@Override\n\tpublic void save() {\n\t\tSystem.out.println(\"save method\");\n\t}",
"private static void saveChanges() throws IOException{\n\t\twriteToStudentsFile(); //copy all the StudentDetails objects in ALL_STUDENTS and write them to the students.txt file\n\t\twriteToBooksFile(); //copy all the BookDetails objects in ALL_BOOKS and write them to the books.txt file\n\t\tSystem.out.println(\"All Changes Successfully Saved!\");\n\t\tSystem.out.println(\"Thanks for using the Library Management System\");\n\t}",
"@Override\r\n\tpublic void save() {\n\r\n\t}",
"@Override\r\n\tpublic void save() {\n\r\n\t}",
"public void autoSave(){\n\t\ttry {\n\t\t\t//read in file\n\t\t\tFile file = new File(System.getProperty(\"user.dir\")+\"/Default.scalcsave\");\n\t\t\tObjectOutputStream output = new ObjectOutputStream(new FileOutputStream(file));\n\t\t\toutput.writeObject(SaveFile.getSaveFile());\n\t\t\toutput.close();\n\t\t\tSystem.out.println(\"Save Success\");\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Override\n\tpublic void doSaveAs() {\n\t}",
"@Override\n public void Save() {\n\t \n }",
"void save(String fileName);",
"@Override\n public void save()\n {\n \n }",
"public static void serialize(String filePath) throws IOException {\n if (filePath == null) {\n throw new IllegalArgumentException(\"Filepath cannot be null\");\n }\n\n List<Object> toSave = new ArrayList<>();\n toSave.add(models);\n if (userData != null) {\n toSave.add(userData);\n }\n\n try {\n FileOutputStream fos = new FileOutputStream(filePath, false);\n ObjectOutputStream out = new ObjectOutputStream(fos);\n out.writeObject(toSave);\n\n out.flush();\n out.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void save(OutputStream os) throws IOException;",
"public void doSave() {\n WaveformLoader.doSave(waveform, WaveformLoader.scalingForSavingFile);\n }",
"public static void save()\n\t{\n writeMap();\n\t}",
"private void save() {\n File personFile = mainApp.getFilmFilePath();\n if (personFile != null) {\n mainApp.saveFilmDataToFile(personFile);\n } else {\n saveAs();\n }\n }",
"private void saveToFile(){\n this.currentMarkovChain.setMarkovName(this.txtMarkovChainName.getText());\n saveMarkovToCSVFileInformation();\n \n //Save to file\n Result result = DigPopGUIUtilityClass.saveDigPopGUIInformationSaveFile(\n this.digPopGUIInformation,\n this.digPopGUIInformation.getFilePath());\n }",
"@Override\n public boolean save(String file) {\n boolean ans = false;\n ObjectOutputStream oos;\n try {\n FileOutputStream fileOut = new FileOutputStream(file, true);\n oos = new ObjectOutputStream(fileOut);\n oos.writeObject(this);\n ans= true;\n }\n catch (FileNotFoundException e) {\n e.printStackTrace(); }\n catch (IOException e) {e.printStackTrace();}\n return ans;\n }",
"public void saveModel(Path file) throws IOException {\n try (PrintStream stream = new PrintStream(file.toString())) {\n for (int k = 0; k < numberOfTopics; k++) {\n for (int w = 0; w < sizeOfVocabulary; w++)\n stream.format(\"%05d \", wordCountByTopicAndTerm[k][w]);\n stream.println();\n }\n } catch (FileNotFoundException e) {\n throw new IOException(e);\n }\n }",
"void writeScenario(ScenarioModel model, OutputStream outputStream) throws ModelSerializationException, ModelConversionException;",
"public void writeStoryModel(SEModel model, File location, boolean backup) {\r\n\t\tthis.writeData(model, location, IoMode.STORY, backup);\r\n\t}",
"public void save() {\n CSVWriter csvWriter = new CSVWriter();\n csvWriter.writeToTalks(\"phase1/src/Resources/Talks.csv\", this.getTalkManager()); //Not implemented yet\n }",
"@Override\n public void save() {\n\n }",
"public void saveMatrixIO() {\n qMatrixFile.saveToFile(getQMatrix());\n sMatrixFile.saveToFile(getSMatrix());\n }",
"public void processSaveAndClose() {\n\n\t\tPrintWriter writer = null;\n\t\ttry {\n\t\t\ttry {\n\t\t\t\twriter = new PrintWriter(classesOutFile);\n\n\t\t\t\tint i = 0;\n\t\t\t\tfor (FitnessClass fc: fitnessClass) {\n\n\t\t\t\t\tif (fc == null) {\n\t\t\t\t\t\ti++;\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\tString fileOutput = fc.toStringClassesOut();\n\t\t\t\t\t\twriter.print(fileOutput);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\tfinally {\n\n\t\t\t\tif (writer != null) {\n\t\t\t\t\twriter.close();\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t} \t\n\t\t}\n\t\tcatch (IOException ioe) {\n\t\t\tJOptionPane.showMessageDialog(null, \"File not found\",\n\t\t\t\t\t\"Error\", JOptionPane.ERROR_MESSAGE);\n\n\t\t}\t\t\t\t\n\n\t}",
"private void saveSettings() {\n SettingsModel settingsModel = new SettingsModel();\n settingsModel.saveState(NJNPStartActivity.this);\n\n File NJNPSettingsDirectory = new File(NJNPConstants.DIRECTORY_PATH + NJNPConstants.SETTINGS_FOLDER);\n NJNPSettingsDirectory.mkdirs();\n\n File file = new File(NJNPSettingsDirectory.getPath(), NJNPConstants.SETTINGS_FILE_NAME);\n\n FileOutputStream fos = null;\n ObjectOutputStream os = null;\n try {\n fos = new FileOutputStream(file);\n os = new ObjectOutputStream(fos);\n os.writeObject(settingsModel);\n os.close();\n fos.close();\n } catch (FileNotFoundException e) {\n Log.e(NJNP_ACTIVITY_TAG, \"File not found exception when saving settings: \" + e.getMessage());\n } catch (IOException e) {\n Log.e(NJNP_ACTIVITY_TAG, \"IO Exception when saving settings: \" + e.getMessage());\n }\n\n }",
"private void writeToFile(E entity){\n try (BufferedWriter bw = new BufferedWriter(new FileWriter(this.fileName,true))) {\n bw.write(entity.toFile());\n bw.newLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void saveModel(VolunteerModel model) {\n facadeDAO.saveVolunteerModelToFile(model);\n }"
]
| [
"0.83828676",
"0.7580919",
"0.74406695",
"0.74174935",
"0.72859895",
"0.71029663",
"0.702883",
"0.69986117",
"0.69375473",
"0.6934774",
"0.68544537",
"0.6806082",
"0.68039507",
"0.6798674",
"0.67970437",
"0.67882144",
"0.67622966",
"0.66964763",
"0.6673501",
"0.6643564",
"0.6622055",
"0.66093343",
"0.6557192",
"0.65357465",
"0.6516694",
"0.6516694",
"0.6516694",
"0.65135014",
"0.65034753",
"0.6489002",
"0.64639664",
"0.64490306",
"0.643291",
"0.64295095",
"0.64295095",
"0.64295095",
"0.64295095",
"0.63953656",
"0.6379079",
"0.63729256",
"0.63712454",
"0.6359756",
"0.6348361",
"0.6335289",
"0.6316961",
"0.6312824",
"0.6291815",
"0.62910974",
"0.627858",
"0.627258",
"0.62711525",
"0.62596524",
"0.62498",
"0.6242653",
"0.6241488",
"0.62289363",
"0.62267685",
"0.62253743",
"0.6222032",
"0.6222032",
"0.6199116",
"0.6197746",
"0.61973286",
"0.6197064",
"0.61935455",
"0.6192654",
"0.6174",
"0.6142538",
"0.6123187",
"0.6110803",
"0.61095667",
"0.6100117",
"0.60947156",
"0.60873884",
"0.6076474",
"0.60743165",
"0.6070077",
"0.6070077",
"0.6070038",
"0.6045081",
"0.6043223",
"0.60403144",
"0.6036546",
"0.6036081",
"0.6031423",
"0.6031404",
"0.6028527",
"0.6028274",
"0.60258204",
"0.6009763",
"0.599069",
"0.5990564",
"0.5986349",
"0.59844935",
"0.5982777",
"0.59761906",
"0.59733874",
"0.5964494",
"0.5952549",
"0.59453946"
]
| 0.7074372 | 6 |
prevents from crashing if date is less than 10 | public String checkDateDay(Date aDate){
if (aDate.getDate() < 10) {
String newDate = "0" + Integer.toString(aDate.getDate());
return newDate;
}
return Integer.toString(aDate.getDate());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void checkForValidDate(String dateTime) {\n\n int daysOfMonth[] = {31,28,31,30,31,30,31,31,30,31,30,31};\n\n Timestamp now = new Timestamp(new java.util.Date().getTime());\n Timestamp date = Timestamp.valueOf(startDateTime);\n if (date.after(now)) {\n outputError(lineCount + \" - Fatal - \" +\n \"Date / Time later than today's date : \" +\n startDateTime + \" : \" + station.getStationId(\"\"));\n } // if (date.after(now))\n\n StringTokenizer t = new StringTokenizer(dateTime, \"- :.\");\n int year = Integer.parseInt(t.nextToken());\n int month = Integer.parseInt(t.nextToken());\n int day = Integer.parseInt(t.nextToken());\n int hour = Integer.parseInt(t.nextToken());\n int minute = Integer.parseInt(t.nextToken());\n boolean isLeapYear = ((year % 4 == 0) && (year % 100 != 0) || (year % 400 == 0));\n if (isLeapYear) daysOfMonth[1] += 1;\n if (year < 1850) {\n outputError(lineCount + \" - Fatal - \" +\n \"Year before 1850 : \" +\n startDateTime + \" : \" + station.getStationId(\"\"));\n } // if (year < 1850)\n\n if (month > 12) {\n outputError(lineCount + \" - Fatal - \" +\n \"Month invalid ( > 12) : \" +\n startDateTime + \" : \" + station.getStationId(\"\"));\n } // if (month > 12)\n\n if (day > daysOfMonth[month-1]) {\n outputError(lineCount + \" - Fatal - \" +\n \"Day invalid ( > no of days in month) : \" +\n startDateTime + \" : \" + station.getStationId(\"\"));\n } // if (day > (daysOfMonth[month-1])\n\n if (hour > 23) {\n outputError(lineCount + \" - Fatal - \" +\n \"Hour invalid ( > 23) : \" +\n startDateTime + \" : \" + station.getStationId(\"\"));\n } // if (hour > 23)\n\n if (minute > 59) {\n outputError(lineCount + \" - Fatal - \" +\n \"Minute invalid ( > 59) : \" +\n startDateTime + \" : \" + station.getStationId(\"\"));\n } // if (minute > 59)\n\n }",
"private boolean exceededDateListLimit() {\n final int MAX_DATE_PARSE = 2;\n return dateList.size() > MAX_DATE_PARSE;\n }",
"private void checksOldExpense() {\n DateUtils dateUtils = new DateUtils();\n\n // Breaking date string from date base\n String[] expenseDate = dateDue.getText().toString().split(\"-\");\n\n if((Integer.parseInt(expenseDate[GET_MONTH]) < Integer.parseInt(dateUtils.currentMonth))\n && (Integer.parseInt(expenseDate[GET_YEAR]) <= Integer.parseInt(dateUtils.currentYear))){\n\n }\n }",
"public void checkDate() throws InvalidDateException {\n Date todayDate = new Date();\n if (!todayDate.after(date)) {\n throw new InvalidDateException(\"Date is from the future!\");\n }\n }",
"private static void checkDate(String date) {\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\n if (!date.matches(RegexPattern.DATE_PATTERN)) {\n throw new DaoException(ExceptionMessage.getMessage(ExceptionMessage.DATE_PATTERN_ERROR));\n }\n try {\n Date formatDate = simpleDateFormat.parse(date);\n if (formatDate.getTime() + TIME_IN_DAY < new Date().getTime()) {\n throw new DaoException(\"Date must be in Future\");\n }\n } catch (ParseException ex) {\n throw new DaoException(ex.getMessage());\n }\n }",
"private boolean checkValidDay() {\n return numDays >= 0 && numDays <= 7;\n }",
"@Test\n public void testDateRangeInvalidDate() throws Exception {\n Map<String, String> fields = new HashMap<String, String>();\n fields.put(\"generatedTimestamp\", \"foo\");\n \n this.addSingleDayDateRange.invoke(this.lockService, fields);\n \n Assert.assertEquals(\"should not have changed time field \" + fields.get(\"generatedTimestamp\"),\n \"foo\", fields.get(\"generatedTimestamp\"));\n }",
"public void date_not_before_createdAt_date(FacesContext context, UIComponent comp, Object value) {\n if (charge.getCreatedAt() != null) {\n Date paidAt = (Date) value;\n\n if (paidAt != null) {\n if (paidAt.before(charge.getCreatedAt())) {\n FacesMessage FMessage = new FacesMessage(FacesMessage.SEVERITY_ERROR, message.translate(\"msg.error\"), message.translate(\"msg.validation.notBeforeCreatedAt\"));\n throw new ValidatorException(FMessage);\n }\n }\n }\n }",
"@Test\n public void testDateRangeValidDate() throws Exception {\n Map<String, String> fields = new HashMap<String, String>();\n fields.put(\"generatedTimestamp\", \"12/31/1981\");\n \n this.addSingleDayDateRange.invoke(this.lockService, fields);\n \n Assert.assertEquals(\"does not contain valid date range \" + fields.get(\"generatedTimestamp\"),\n \"12/31/1981..01/01/1982\", fields.get(\"generatedTimestamp\"));\n }",
"public static void isValidDate(LocalDate date) throws ValidationException {\n\t\tLocalDate today = LocalDate.now();\n\t\tif (date.isBefore(today)) {\n\t\t\tthrow new ValidationException(\"Date cannot be past date\");\n\t\t}\n\t}",
"public static void restrictDatePickerToOlder(DatePicker datePicker) {\r\n // Sets up a restricton for choosable dates:\r\n Callback<DatePicker, DateCell> dayCellFactory = dp -> new DateCell()\r\n {\r\n @Override\r\n public void updateItem(LocalDate item, boolean empty)\r\n {\r\n super.updateItem(item, empty);\r\n // Only allow dates that are older than current dates:\r\n if(item.isAfter(LocalDate.now()))\r\n { // Sets the background color of the invalid dates to a pink/red color:\r\n setStyle(\"-fx-background-color: #ffc0cb;\");\r\n // Disables them, so they can not be picked:\r\n setDisable(true);\r\n }\r\n }\r\n };\r\n // Apply these restrictions to our DatePicker\r\n datePicker.setDayCellFactory(dayCellFactory);\r\n // Set prompt text:\r\n datePicker.setPromptText(\"dd/MM/yyyy\");\r\n }",
"private boolean isOutdatedDate(LocalDate date) {\n return date.isBefore(LocalDate.now());\n }",
"private void validateDate() {\n if (dtpSightingDate.isEmpty()) {\n dtpSightingDate.setErrorMessage(\"This field cannot be left empty.\");\n dtpSightingDate.setInvalid(true);\n removeValidity();\n }\n // Check that the selected date is after research began (range check)\n else if (!validator.checkDateAfterMin(dtpSightingDate.getValue())) {\n dtpSightingDate.setErrorMessage(\"Please enter from \" + researchDetails.MIN_DATE + \" and afterwards. This is when the research period began.\");\n dtpSightingDate.setInvalid(true);\n removeValidity();\n }\n // Check that the selected date is not in the future (range check / logic check)\n else if (!validator.checkDateNotInFuture(dtpSightingDate.getValue())) {\n dtpSightingDate.setErrorMessage(\"Please enter a date from today or before. Sighting date cannot be in the future.\");\n dtpSightingDate.setInvalid(true);\n removeValidity();\n }\n }",
"private boolean checkdates(java.util.Date date,java.util.Date date2)\n\t{\n\t\tif (date==null||date2==null) return true;\n\t\tif (!date.after(date2)&&!date.before(date2))return true;\n\t\treturn date.before(date2);\n\t}",
"protected void beforeTimeSlices()\n\t\tthrows DbCompException\n\t{\n dates = new ArrayList<Date>();\n\t}",
"@Test(expected = IllegalDateException.class)\n\tpublic void testBookStartDateInPast() throws Exception {\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.add(Calendar.HOUR, -2);\n\t\t// start is current date - 2\n\t\tDate invalidStartDate = cal.getTime();\n\t\tbookingManagement.book(USER_ID, Arrays.asList(room1.getId()), invalidStartDate, validEndDate);\n\t}",
"public static void printDateTimeErr() {\n printLine();\n System.out.println(\" Oops! Please enter your date in the yyyy-mm-dd format\\n\");\n printLine();\n }",
"public static void birthdateValidation(Date birthdate) throws Exception {\n if (birthdate.after(new Date())) {\n throw new Exception(\"Your birth date cannot be in the future\");\n }\n }",
"public void validateStartDate(Date value)\n {\n \n if (value != null)\n {\n OADBTransaction transaction = getOADBTransaction();\n\n // Note that we want to truncate these values to allow for the possibility\n // that we're trying to set them to be the same day. Calling \n // dateValue( ) does not include time. Were we to want the time element,\n // we would call timestampValue(). Finally, you cannot compare \n // oracle.jbo.domain.Date objects directly. Instead, convert the value to \n // a long as shown.\n \n long sysdate = transaction.getCurrentDBDate().dateValue().getTime();\n long startDate = value.dateValue().getTime();\n\n if (startDate < sysdate)\n {\n throw new OAAttrValException(OAException.TYP_ENTITY_OBJECT,\n getEntityDef().getFullName(), // EO name\n getPrimaryKey(), // EO PK\n \"StartDate\", // Attribute Name\n value, // Attribute value\n \"AK\", // Message product short name\n \"FWK_TBX_T_START_DATE_PAST\"); // Message name\n } \n }\n \n }",
"private static boolean dateValid(int[] time ) { \r\n\t\tfor ( int i = 0 ; i < time.length; i++) \r\n\t\t\tif (time[i] >2400 || time[i] < 0 ) \r\n\t\t\t\treturn false;\r\n\t\treturn true;\t\t\r\n\t}",
"public boolean isDate(Date date){\r\n if((new Date()).getTime() < date.getTime()) return false;\r\n return true;\r\n }",
"public boolean checkDate(){\n Calendar c = Calendar.getInstance();\n Date currentDate = new Date(c.get(Calendar.DAY_OF_MONTH),c.get(Calendar.MONTH)+1, c.get(Calendar.YEAR));\n return (isEqualOther(currentDate) || !isEarlyThanOther(currentDate));\n\n }",
"public static void PurchaseOrder_SearchPage_InvalidDate_Val(List<HashMap<String, String>> data) {\n\t\tWebdriverWait.findElement(\"id\", \"minDate_i18n\").sendKeys(data.get(8).get(\"Column1\"));\n\t\tWebdriverWait.findElement(\"id\", \"maxDate_i18n\").sendKeys(data.get(7).get(\"Column1\"));\n\t\tWebdriverWait.findElement(\"xpath\", \"//*[@value='Search']\").click();\n\n\t\tString PO_ThruDate = WebdriverWait.findElement(\"xpath\", \"//*[@id= 'content-messages']/div/ul/li[1]\").getText();\n\t\tPO_PurchaseOrder_softAssert.assertThat(PO_ThruDate).isEqualTo(data.get(21).get(\"Column2\"));\n\t}",
"@SuppressWarnings(\"unchecked\")\n @Test\n public void insertOldDate() throws ServletException, IOException {\n final String finalDate = \"2007-12-03\";\n final String requestId = \"1\";\n initialize(finalDate, requestId);\n servlet.doPost(request, response);\n assertEquals(\"Invalid date! Date must be in the future!\",\n ((Map<String, Object>) request.getAttribute(\"viewModel\")).get(\"errorMessage\"));\n }",
"@Test\n public void testGetDailyListingFromFileSystemInvalidDate() {\n ListingFileHelper instance = new ListingFileHelper();\n\n TimeZone.setDefault(TimeZone.getTimeZone(\"Europe/London\"));\n GregorianCalendar calendar = new GregorianCalendar(2009, 0, 1);\n List<Listing> result = instance.getDailyListingFromFileSystem(new Date(calendar.getTimeInMillis()));\n \n assertTrue(result.isEmpty());\n }",
"public void searchByBeforeDate(long date, final int limit) throws IOException {\n final IndexSearcher indexSearcher = new IndexSearcher(reader);\n\n Query q = NumericRangeQuery.newLongRange(\"creationDate\", 0L, date, true, true);\n System.out.println(\"Type of query: \" + q.getClass().getSimpleName());\n\n final TopDocs search = indexSearcher.search(q, limit);\n final ScoreDoc[] hits = search.scoreDocs;\n showHits(hits);\n }",
"public boolean checkPastDate(boolean said)\n {\n try\n {\n if( date==null ){\n if(this.getDateString()!=null) date = DateHelper.stringToDate(this.getDateString());\n if(super.isMandatory() && date==null)\n {\n message = FacesHelper.getBundleMessage(\"validator_dateformat\", new Object[]{Constants.CommonFormat.DATE_FORMAT_TIP});\n return false;\n } }\n\n }\n catch (Exception e)\n {\n message = FacesHelper.getBundleMessage(\"validator_dateformat\", new Object[]{Constants.CommonFormat.DATE_FORMAT_TIP});\n return false;\n }\n\n if(date==null)\n {\n if(said)\n {\n super.setMessage(\"Date is no correct\");\n }\n return false;\n }\n if(!date.before(currentDate))\n {\n if(said)\n {\n super.setMessage(\"Date is no correct\");\n }\n return false;\n\n }\n else\n {\n return true;\n }\n }",
"private boolean validateDateAndTime(String date) {\n boolean isValid;\n Calendar prevDay;\n\n if(date != null && !date.isEmpty() && date.length() < MIN_DATE_LEN) {\n isValid = false;\n } else {\n prevDay = Calendar.getInstance(Locale.CANADA);\n prevDay.add(Calendar.DATE, -1); // All days valid from one day in the past\n Calendar cal = DateUtility.convertToDateObj(date);\n isValid = cal != null && cal.after(prevDay);\n }\n\n return isValid;\n }",
"private boolean hasDateThreshold() {\r\n if (entity.getExpirationDate() == null) {\r\n return false;\r\n }\r\n Calendar calendar = Calendar.getInstance();\r\n calendar.add(Calendar.MONTH, 1);\r\n if (entity.getExpirationDate().before(calendar.getTime())) {\r\n return true;\r\n }\r\n return false;\r\n }",
"public boolean validateDate(String date) {\n\n\t\tDate enteredDate = null;\n\t\ttry {\n\t\t\tSimpleDateFormat format = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\t\tenteredDate = format.parse(date);\n\t\t} catch (ParseException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tDate currentDate = new Date();\n\t\treturn enteredDate.before(currentDate);\n\t}",
"@Test\n public void testDateRangeNoDate() throws Exception {\n Map<String, String> fields = new HashMap<String, String>();\n this.addSingleDayDateRange.invoke(this.lockService, fields);\n \n Assert.assertNull(\"should not contain a time \" + fields.get(\"generatedTimestamp\"), fields.get(\"generatedTimestamp\"));\n }",
"private void removeOlderGigs() {\n\t\tCalendar cal = Calendar.getInstance();\r\n\t\tint currentHr = cal.get(Calendar.HOUR_OF_DAY);\r\n\t\t\r\n\t\tif ((currentHr >= 0 && currentHr <= 7)) {\r\n\t\t\t//Log.d(TAG, \"deleting older gigs\");\r\n\t\t\tmGigsDbHelper.deleteOlderGigs();\r\n\t\t}\r\n\t\t\r\n\t}",
"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 boolean validateDate(TradeModel tradeModel)\n {\n int i = tradeModel.getMaturityDate().compareTo(LocalDate.now());\n if (i<0)\n return false;\n else\n return true;\n }",
"void validateDates(ComponentSystemEvent event);",
"public static void printReadFileDateError() {\n System.out.println(Message.READ_FILE_DATE_ERROR);\n }",
"@Test\n public void testV4HeaderDateValidationFailure() {\n LocalDate now = LocalDate.now();\n String dateStr = \"\";\n assertThrows(MalformedResourceException.class,\n () -> testRequestWithSpecificDate(dateStr));\n\n // Case 2: Date after yesterday.\n String dateStr2 = DATE_FORMATTER.format(now.plus(2, DAYS));\n assertThrows(MalformedResourceException.class,\n () -> testRequestWithSpecificDate(dateStr2));\n\n // Case 3: Date before yesterday.\n String dateStr3 = DATE_FORMATTER.format(now.minus(2, DAYS));\n assertThrows(MalformedResourceException.class,\n () -> testRequestWithSpecificDate(dateStr3));\n\n // Case 4: Invalid date format\n String dateStr4 = now.toString();\n assertThrows(MalformedResourceException.class,\n () -> testRequestWithSpecificDate(dateStr4));\n }",
"private void checkDateBounds(PortfolioRecord portRecord) {\n List<DataPoint> history = portRecord.getHistory();\n\n if (!userSetDates) {\n fromDateBound = null;\n toDateBound = null;\n }\n\n if (history.size() > 0) {\n LocalDate minDate = history.get(0).getDate();\n LocalDate maxDate = history.get(history.size() - 1).getDate();\n\n if (fromDateBound == null && toDateBound == null) {\n fromDateBound = minDate;\n toDateBound = maxDate;\n } else if (toDateBound.compareTo(maxDate) < 0) {\n toDateBound = maxDate;\n }\n } else {\n fromDateBound = null;\n toDateBound = null;\n userSetDates = false;\n }\n }",
"public void setNotBefore(java.util.Date r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: com.android.org.bouncycastle.x509.X509V1CertificateGenerator.setNotBefore(java.util.Date):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.org.bouncycastle.x509.X509V1CertificateGenerator.setNotBefore(java.util.Date):void\");\n }",
"public void setInvalidDate(Date invalidDate) {\n this.invalidDate = invalidDate;\n }",
"public boolean isValidDate(String valD) { //Checks if date is in proper format\n String valDWithoutSpace = valD.replaceAll(\"\\\\s\", \"\");\n return valDWithoutSpace.length() == 8;\n}",
"public boolean DateValidation(String date, String startTime, String currentTime) {\n\n boolean state = false;\n\n //String x = dateChooser.getDate().toString();\n String Hyear = date.substring(24, 28); // get user input date\n String Hmonth = monthToCompare(date);\n String Hdate = date.substring(8, 10);\n String stHr = startTime.substring(0, 2);\n String stMin = startTime.substring(3, 5);\n\n int userYr, userMnth, userDate, userHour, userMin = 0;\n userYr = Integer.parseInt(Hyear); // conversion of user entered year to int\n userMnth = Integer.parseInt(Hmonth);\n userDate = Integer.parseInt(Hdate);\n userHour = Integer.parseInt(stHr);\n userMin = Integer.parseInt(stMin);\n\n String yyr = currentTime.substring(0, 4); // get currrent year from the string f\n String mmnth = currentTime.substring(5, 7);\n String ddt = currentTime.substring(8, 10); // get current date from the string f\n String hours = currentTime.substring(11, 13);\n String mins = currentTime.substring(14, 16);\n\n int yr, mnth, dt, shr, smin = 0;\n yr = Integer.parseInt(yyr); // convert current year from string to int\n mnth = Integer.parseInt(mmnth);\n dt = Integer.parseInt(ddt);\n shr = Integer.parseInt(hours);\n smin = Integer.parseInt(mins);\n\n if ((userYr == yr) || (userYr > yr)) { // if user entered year is the current year or future year, ok \n if (((userYr == yr) && (userMnth >= mnth)) || ((userYr > yr) && (userMnth >= mnth)) || ((userYr > yr) && (userMnth < mnth))) {\n if (((userYr == yr) && (userMnth >= mnth) && (userDate >= dt)) || ((userYr == yr) && (userMnth > mnth) && (userDate < dt)) || ((userYr == yr) && (userMnth > mnth) && (userDate >= dt))\n || ((userYr > yr) && (userMnth >= mnth) && (userDate >= dt)) || ((userYr > yr) && (userMnth >= mnth) && (userDate < dt))\n || ((userYr > yr) && (userMnth < mnth) && (userDate >= dt)) || ((userYr > yr) && (userMnth < mnth) && (userDate < dt))) {\n if (((userYr == yr) && (userMnth == mnth) && (userDate >= dt) && (userHour >= shr)) || ((userYr == yr) && (userMnth == mnth) && (userDate > dt) && (userHour < shr))\n || ((userYr == yr) && (userMnth > mnth) && (userDate > dt) && (userHour >= shr)) || ((userYr == yr) && (userMnth > mnth) && (userDate < dt) && (userHour >= shr))\n || ((userYr == yr) && (userMnth > mnth) && (userDate < dt) && (userHour < shr)) || ((userYr == yr) && (userMnth > mnth) && (userDate > dt) && (userHour < shr))\n || ((userYr > yr) && (userMnth < mnth) && (userDate >= dt) && (userHour >= shr)) || ((userYr > yr) && (userMnth < mnth) && (userDate < dt) && (userHour >= shr))\n || ((userYr > yr) && (userMnth >= mnth) && (userDate >= dt) && (userHour >= shr)) || ((userYr > yr) && (userMnth >= mnth) && (userDate < dt) && (userHour >= shr))\n || ((userYr > yr) && (userMnth < mnth) && (userDate >= dt) && (userHour < shr)) || ((userYr > yr) && (userMnth >= mnth) && (userDate >= dt) && (userHour < shr))\n || ((userYr > yr) && (userMnth >= mnth) && (userDate < dt) && (userHour < shr)) || ((userYr > yr) && (userMnth < mnth) && (userDate < dt) && (userHour < shr))) {\n if (((userYr == yr) && (userMnth == mnth) && (userDate == dt) && (userHour == shr) && (userMin >= smin)) || ((userYr == yr) && (userMnth == mnth) && (userDate == dt) && (userHour >= shr) && (userMin >= smin))\n || ((userYr == yr) && (userMnth == mnth) && (userDate == dt) && (userHour > shr) && (userMin < smin)) || ((userYr == yr) && (userMnth == mnth) && (userDate > dt) && (userHour >= shr) && (userMin >= smin))\n || ((userYr == yr) && (userMnth == mnth) && (userDate > dt) && (userHour < shr) && (userMin >= smin)) || ((userYr == yr) && (userMnth == mnth) && (userDate > dt) && (userHour >= shr) && (userMin < smin))\n || ((userYr == yr) && (userMnth == mnth) && (userDate > dt) && (userHour < shr) && (userMin < smin)) || ((userYr == yr) && (userMnth > mnth) && (userDate > dt) && (userHour >= shr) && (userMin >= smin))\n || ((userYr == yr) && (userMnth > mnth) && (userDate > dt) && (userHour >= shr) && (userMin < smin)) || ((userYr == yr) && (userMnth > mnth) && (userDate > dt) && (userHour < shr) && (userMin >= smin))\n || ((userYr == yr) && (userMnth > mnth) && (userDate < dt) && (userHour >= shr) && (userMin >= smin)) || ((userYr == yr) && (userMnth > mnth) && (userDate < dt) && (userHour >= shr) && (userMin < smin))\n || ((userYr == yr) && (userMnth > mnth) && (userDate < dt) && (userHour < shr) && (userMin >= smin)) || ((userYr == yr) && (userMnth > mnth) && (userDate < dt) && (userHour < shr) && (userMin < smin))\n || ((userYr == yr) && (userMnth > mnth) && (userDate > dt) && (userHour < shr) && (userMin < smin)) || ((userYr > yr) && (userMnth >= mnth) && (userDate >= dt) && (userHour >= shr) && (userMin >= smin))\n || ((userYr > yr) && (userMnth >= mnth) && (userDate >= dt) && (userHour >= shr) && (userMin < smin)) || ((userYr > yr) && (userMnth >= mnth) && (userDate >= dt) && (userHour < shr) && (userMin >= smin))\n || ((userYr > yr) && (userMnth >= mnth) && (userDate >= dt) && (userHour < shr) && (userMin < smin)) || ((userYr > yr) && (userMnth >= mnth) && (userDate < dt) && (userHour >= shr) && (userMin >= smin))\n || ((userYr > yr) && (userMnth >= mnth) && (userDate < dt) && (userHour >= shr) && (userMin < smin)) || ((userYr > yr) && (userMnth >= mnth) && (userDate < dt) && (userHour < shr) && (userMin >= smin))\n || ((userYr > yr) && (userMnth >= mnth) && (userDate < dt) && (userHour < shr) && (userMin < smin)) || ((userYr > yr) && (userMnth < mnth) && (userDate >= dt) && (userHour >= shr) && (userMin >= smin))\n || ((userYr > yr) && (userMnth < mnth) && (userDate >= dt) && (userHour >= shr) && (userMin < smin)) || ((userYr > yr) && (userMnth < mnth) && (userDate >= dt) && (userHour < shr) && (userMin >= smin))\n || ((userYr > yr) && (userMnth < mnth) && (userDate >= dt) && (userHour < shr) && (userMin < smin)) || ((userYr > yr) && (userMnth < mnth) && (userDate < dt) && (userHour >= shr) && (userMin >= smin))\n || ((userYr > yr) && (userMnth < mnth) && (userDate < dt) && (userHour >= shr) && (userMin < smin)) || ((userYr > yr) && (userMnth < mnth) && (userDate < dt) && (userHour < shr) && (userMin >= smin))\n || ((userYr > yr) && (userMnth < mnth) && (userDate < dt) && (userHour < shr) && (userMin < smin))) {\n state = true;\n } else {\n JOptionPane.showMessageDialog(null, \"Invalid time!\");\n state = false;\n }\n\n } else {\n JOptionPane.showMessageDialog(null, \"Invalid time!\");\n state = false;\n }\n\n } else {\n JOptionPane.showMessageDialog(null, \"Invalid day!\");\n state = false;\n }\n\n } else {\n JOptionPane.showMessageDialog(null, \"Invalid month!\");\n state = false;\n }\n } else {// if the user entered year is already passed\n JOptionPane.showMessageDialog(null, \"Invalid year\");\n state = false;\n }\n return state;\n }",
"public boolean checkDate() {\n\t\tboolean cd = checkDate(this.year, this.month, this.day, this.hour);\n\t\treturn cd;\n\t}",
"protected final boolean ok_date (int year, int month, int day)\n {\n return ((year >= FIRST_YEAR) &&\n (1 <= month && month <= getLastMonthOfYear(year)) &&\n (1 <= day && day <= getLengthOfMonth (year, month)));\n }",
"private void validateRequest(CustomerStockRequest customerStockRequest) {\n\n if (customerStockRequest.getSelectedDate() == null) {\n throw new CustomerException(\"You must enter a date\");\n }\n\n LocalDate earliestDate = stockTradingLedgerRepository.findEarliestDateOnLedger();\n if (customerStockRequest.getSelectedDate().isBefore(earliestDate)) {\n throw new CustomerException(\"You must enter a date after the earliest date on the stock ledger which is \" + earliestDate);\n }\n\n if (customerStockRequest.getSelectedDate().isAfter(LocalDate.now())) {\n throw new CustomerException(\"You must must not enter a date in the future\");\n }\n }",
"void timeCheck() throws Exception{\n\t\tif(arrival<time_check)\n\t\tthrow new Exception(\"Arrival time should be non-descending\");\n\t}",
"public void validateStartDateAndTime(String date){\n setStartDateAndTimeValid(validateDateAndTime(date));\n }",
"private static void checkForParsableDate(AnalysisResults.Builder analysisBuilder) {\n Stream<String> dates =\n getTokensFromRawText(analysisBuilder.getRawText().get()).filter(ReceiptAnalysis::isDate);\n // Assume that the first date on the receipt is the transaction date.\n Optional<String> firstDate = dates.findFirst();\n\n firstDate.ifPresent(date -> ReceiptAnalysis.addDateIfValid(analysisBuilder, date));\n }",
"public void checkErrorMsgForEventCreationWithPastStartDate(EcpCoreLSProgram ecpCoreLSProgram)\n throws ParseException;",
"public boolean isTooOld(){\n\t\tgetOlder();\n\t\treturn age >= maxAge;\n\t}",
"@Test(expected = IllegalArgumentException.class)\r\n public void testIncorrectMonth() {\r\n SimpleDate d1 = new SimpleDate(\"-3/1/1700\");\r\n }",
"public boolean lessThan(MyDate other){\t\n \t\tif (other.year > year){\n \t\t\treturn true;\n \t\t}\n \t\telse if (other.year == year){\n \t\t\tif (other.month > month){\n \t\t\t\treturn true;\n \t\t\t}\n \t\t\telse if (other.month == month){\n \t\t\t\tif (other.day > day){\n \t\t\t\t\treturn true;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n\n \t\treturn false;\n\t}",
"public boolean validateDate() {\r\n\t\tDate now = new Date();\r\n\t\t// expire date should be in the future\r\n\t\tif (now.compareTo(getExpireDate()) != -1)\r\n\t\t\treturn false;\r\n\t\treturn true;\r\n\t}",
"private void checkDate(String strDate, LocalDate localDate) {\n if (Integer.parseInt(strDate.substring(0, 4)) != localDate.getYear()\n || Integer.parseInt(strDate.substring(5, 7)) != localDate.getMonthValue()\n || Integer.parseInt(strDate.substring(8,10)) != localDate.getDayOfMonth()) {\n throw new IllegalArgumentException(\"Illegal date: date dose not exist.\");\n }\n }",
"@Test(expected = IllegalArgumentException.class)\r\n public void testIncorrectYear() {\r\n SimpleDate d1 = new SimpleDate(\"3/1/1700\");\r\n }",
"public boolean checkReservationDateFromToday(String resMonth, String resDay, String resYear){\n int daysDiff,monthDiff,yearDiff; //date difference\n int monthToday,dayToday,yearToday; //date today\n int monthReserved,dayReserved,yearReserved; //date of reservation\n \n //date of reservation\n String sMonth,sDay,sYear;\n sMonth = resMonth;\n sDay = resDay;\n sYear = resYear;\n \n getCurrentDate(); //call to get current date\n \n boolean dateValid = false;\n sMonth = convertMonthToDigit(sMonth); //convert string month to string number\n \n monthToday = parseInt(month);\n dayToday = parseInt(day);\n yearToday = parseInt(year);\n \n //convert to integer\n monthReserved = parseInt(sMonth);\n dayReserved = parseInt(sDay);\n yearReserved = parseInt(sYear);\n \n //get the difference\n monthDiff = monthReserved - monthToday;\n daysDiff = dayReserved - dayToday;\n yearDiff = yearReserved - yearToday;\n \n System.out.println(\"startMonth: \"+ sMonth);\n System.out.println(\"yearDiff: \" + yearDiff);\n System.out.println(\"daysDiff: \" + daysDiff);\n System.out.println(\"monthDiff: \" + monthDiff);\n \n if(yearDiff > 0){ //next year\n return true;\n }\n \n if(yearDiff == 0){ //this year\n if(monthDiff >= 0){\n if(monthDiff == 0 && daysDiff == 0){ //cannot reserve room on the day\n //invalid day, the date is today\n dateValid = false;\n System.out.println(\"reservation day must not today.\");\n }else if(monthDiff==0 && daysDiff < 0){ // same month today, invalid day diff\n dateValid = false; \n System.out.println(\"reservation day must not in the past\");\n }else if(monthDiff>0 && daysDiff < 0){ //not the same month today, accept negative day diff\n dateValid = true;\n }else{ //the same month and valid future day\n dateValid = true;\n }\n }else{\n //invalid month\n System.out.println(\"reservation month must not in the past.\");\n }\n }else{\n //invalid year\n System.out.println(\"reservation year must not in the past.\");\n }\n \n return dateValid;\n }",
"public void setDate(int date){\n this.date = date;\n }",
"private boolean checkDate(String date) {\n return date.matches(regexDate);\n }",
"public ExceptionDate(){\n\t\tsuper();\n\t}",
"public static void valDate() {\n Scanner input = new Scanner(System.in);\n try {\n LocalDate dateObj = LocalDate.parse(date);\n } catch (DateTimeParseException ex) {\n System.err.println(\"Invalid date, please insert a valid date with pattern yyyy-MM-dd\");\n date = input.next();\n valDate();\n }\n }",
"public static void printEmptyDeadlineDateError() {\n botSpeak(Message.EMPTY_DEADLINE_DATE_ERROR);\n }",
"public boolean isBefore(Date date2)\n {\n if (year < date2.year)\n return true;\n else if (year == date2.year && month < date2.month)\n return true;\n else if (year == date2.year && month == date2.month && day < date2.day)\n return true;\n else if (year == date2.year && month == date2.month && day == date2.day\n && hour < date2.hour)\n return true;\n else if (year == date2.year && month == date2.month && day == date2.day\n && hour == date2.hour && minute < date2.minute)\n return true;\n else\n return false;\n }",
"public void setValidFrom(Date validFrom);",
"@Test\r\n public void testIsExpiredToday_ExpirationDateToday_ExpirationDateEarlierTime() {\r\n doTest(TEST_DATE_2_TODAY, TEST_DATE_1_TODAY, false);\r\n }",
"public Calendar setReservationDate(){\n\t\t\n\t\t\n\t\tint currentMonth = Calendar.getInstance().get(Calendar.MONTH)+1; //Month starts from zero in Java\n\t\tint currentYear = Calendar.getInstance().get(Calendar.YEAR);\n\t\tint currentDate = Calendar.getInstance().get(Calendar.DAY_OF_MONTH);\n\t\tint currentHour = Calendar.getInstance().get(Calendar.HOUR_OF_DAY);\n\t\tint currentMinute = Calendar.getInstance().get(Calendar.MINUTE);\n\t\t\n\t\t\n\t\tSystem.out.println(\"Current Year \"+ currentYear );\n\t\tSystem.out.println(\"Current Month \"+ currentMonth );\n\t\tSystem.out.println(\"Today's date \"+ currentDate );\n\t\tSystem.out.println(\"Current Hour \"+ currentHour );\n\t\tSystem.out.println(\"Current Minute \"+ currentMinute );\n\t\tSystem.out.println(\"\\t---\\t---\\t---\\t---\\t---\");\n\t\tint inputMonth, inputYear, inputDate, inputHour, inputMinute;\n\t\t\n\t\tCalendar reserveDate = Calendar.getInstance();\n\t\t\n\t\tSystem.out.print(\"Enter the year: \");\n\t\tinputYear = scan.nextInt();\n\t\tscan.nextLine();\n\t\t\n\t\twhile( inputYear < currentYear){\n\t\t\tSystem.out.println(\"Old year entry is not allowed !\\n\");\n\t\t\tSystem.out.print(\"Enter the year: \");\n\t\t\tinputYear = scan.nextInt();\n\t\t\tscan.nextLine();\n\t\t}\t\n\t\treserveDate.set(Calendar.YEAR,inputYear); \n\t\n\t\tSystem.out.print(\"Enter the month: \");\n\t\tinputMonth = scan.nextInt();\t\n\t\tscan.nextLine();\n\t\t\n\t\twhile (inputMonth < 1 || inputMonth > 12){\n\t\t\tSystem.out.println(\"Invalid Month entry!\");\n\t\t\tSystem.out.print(\"Enter the month again: \");\n\t\t\tinputMonth = scan.nextInt();\n\t\t\tscan.nextLine();\n\t\t}\n\t\t\n\t\twhile((inputMonth < currentMonth) && (inputYear == currentYear)){\n\t\t\t\t\t\n\t\t\tSystem.out.println(\"Old month entry is not allowed !\\n\");\n\t\t\tSystem.out.print(\"Enter the month: \");\n\t\t\tinputMonth = scan.nextInt();\n\t\t\tscan.nextLine();\n\t\t\t\n\t\t}\n\t\treserveDate.set(Calendar.MONTH,inputMonth-1);//MONTH is from 0 to 11.\n\t\t\n\t\tSystem.out.print(\"Enter the date for reservation: \");\n\t\tinputDate = scan.nextInt();\n\t\tscan.nextLine();\n\t\t\n\t\twhile( inputDate < 1 || inputDate > 31){\n\t\t\tSystem.out.println(\"Invalid date entry!\");\n\t\t\tSystem.out.print(\"Enter the date again: \");\n\t\t\tinputDate = scan.nextInt();\n\t\t\tscan.nextLine();\n\t\t}\n\t\t\n\t\twhile((inputDate < currentDate) && (inputMonth == currentMonth)&&(inputYear==currentYear)){\n\t\t\tSystem.out.println(\"Past Day is not allowed!\\n\");\n\t\t\tSystem.out.print(\"Enter the date for reservation: \");\n\t\t\tinputDate = scan.nextInt();\n\t\t\tscan.nextLine();\n\t\t}\n\t\treserveDate.set(Calendar.DAY_OF_MONTH,inputDate);\n\t\t\n\t\tSystem.out.print(\"Enter hour (24-hr format): \");\n\t\tinputHour = scan.nextInt();\n\t\tscan.nextLine();\n\t\t\n\t\twhile( inputHour < 0 || inputHour > 23){\n\t\t\tSystem.out.println(\"Invalid hour entry!\");\n\t\t\tSystem.out.print(\"Enter the hour again: \");\n\t\t\tinputHour = scan.nextInt();\n\t\t\tscan.nextLine();\n\t\t}\n\t\t\n\t\twhile(inputHour < currentHour && inputDate == currentDate&&inputMonth == currentMonth&&inputYear==currentYear){\n\t\t\t\n\t\t\tif (inputHour < 0 && inputHour > 23){\n\t\t\t\tSystem.out.println(\"Invalid Hour entry\");\n\t\t\t}\n\t\t\telse{\n\t\t\t\tSystem.out.println(\"Past hour is not allowed!\\n\");\n\t\t\t\tSystem.out.print(\"Enter hour (24-hr format): \");\n\t\t\t\tinputHour = scan.nextInt();\n\t\t\t\tscan.nextLine();\n\t\t\t}\n\t\t}\n\t\treserveDate.set(Calendar.HOUR_OF_DAY,inputHour); //This uses 24 hour clock\n\t\t\n\t\tSystem.out.print(\"Enter minute: \");\n\t\tinputMinute = scan.nextInt();\n\t\tscan.nextLine();\n\t\t\n\t\twhile(inputMinute < 0 || inputMinute > 59){\n\t\t\tSystem.out.println(\"Invalid Minute entry\");\n\t\t\tSystem.out.print(\"Enter minute again: \");\n\t\t\tinputMinute = scan.nextInt();\n\t\t\tscan.nextLine();\n\t\t}\n\t\t\n\t\twhile((inputMinute-currentMinute) <= 0 && inputHour == currentHour){\n\t\t\t\n\t\t\t//System.out.println(\"Reservation can only be made 30 minutes earlier or invalid input !\");\n\t\t\tSystem.out.print(\"Invalid minute\");\n\t\t\tSystem.out.print(\"Enter minute again: \");\n\t\t\tinputMinute = scan.nextInt();\t\n\t\t\tscan.nextLine();\n\t\t}\n\t\t\n\t\treserveDate.set(Calendar.MINUTE,inputMinute);\n\t\tSystem.out.println(\"Date Reserved!\");\n\t\treturn reserveDate;\n\t}",
"private boolean checkTime(){\n\t\treturn false;\r\n\t}",
"public static boolean isPastDue(Date date) {\n\t\tthrow new IllegalStateException(\"no database connection\");\r\n\t}",
"private int check15Days(DateInfo date) {\r\n\t\t// creates cd calender stores date stored in CD\r\n\t\tint totalCD, cdMonth, cdDay, cdYear;\r\n\t\tDateInfo maturityDate = new DateInfo(super.getDate());\r\n\t\tint totalTrans, tMonth, tDay, tYear;\r\n\r\n\t\tint mature= maturityDate.getMatureLength();\r\n\t\tCalendar cD = Calendar.getInstance();\r\n\t\tcD.clear();\r\n\t\tcD.set(Calendar.MONTH, maturityDate.getMonth());\r\n\t\tcD.set(Calendar.YEAR, maturityDate.getYear());\r\n\t\tcD.set(Calendar.DATE, maturityDate.getDay());\r\n\r\n\t\t// adds the term to compare the dates\r\n\r\n\t\tcD.add(Calendar.MONTH, +mature);\r\n\t\tcdMonth = 30 * cD.get(Calendar.MONTH);\r\n\t\tcdDay = cD.get(Calendar.DATE);\r\n\t\tcdYear = 365 * cD.get(Calendar.YEAR);\r\n\t\ttotalCD = cdMonth + cdDay + cdYear;\r\n\r\n\t\ttMonth = 30 * date.getMonth();\r\n\t\ttDay = date.getDay();\r\n\t\ttYear = 365 * date.getYear();\r\n\t\ttotalTrans = tMonth + tDay + tYear;\r\n\r\n\t\treturn (totalTrans - totalCD);\r\n\r\n\t}",
"@Test\n public void testV4HeaderDateValidationSuccess()\n throws MalformedResourceException {\n LocalDate now = LocalDate.now();\n String dateStr = DATE_FORMATTER.format(now);\n testRequestWithSpecificDate(dateStr);\n\n // Case 2: Valid date with in range.\n dateStr = DATE_FORMATTER.format(now.plus(1, DAYS));\n testRequestWithSpecificDate(dateStr);\n\n // Case 3: Valid date with in range.\n dateStr = DATE_FORMATTER.format(now.minus(1, DAYS));\n testRequestWithSpecificDate(dateStr);\n }",
"@Test(timeout = 4000)\n public void test318() throws Throwable {\n Form form0 = new Form(\"w\");\n // Undeclared exception!\n try { \n form0.dateFormat(\"? fOYd~2\", form0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Failed to initialize SimpleDateFormat with pattern '? fOYd~2'.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }",
"public java.util.Date getNotBefore() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: android.security.keystore.DelegatingX509Certificate.getNotBefore():java.util.Date, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.security.keystore.DelegatingX509Certificate.getNotBefore():java.util.Date\");\n }",
"public static boolean notInFuture(Date data) {\r\n if (data != null) {\r\n return data.before(new Date());\r\n }\r\n return false;\r\n }",
"public void setMaxDate(LocalDate maxDate) throws Exception {\r\n this.maxDate = maxDate;\r\n if (minDate != null){\r\n if (minDate.isAfter(maxDate)){\r\n throw new Exception(\"La date \" + minDate +\" n'est pas anterieure à la date max \" + maxDate);\r\n }\r\n }\r\n }",
"public boolean isBefore(Date b) {\r\n\t\treturn compareTo(b) < 0;\r\n\t}",
"public void testCreateCreationDateFilter2() {\r\n try {\r\n instance.createCreationDateFilter(new Date(20000), new Date(10000));\r\n fail(\"IllegalArgumentException expected.\");\r\n } catch (IllegalArgumentException iae) {\r\n //good\r\n }\r\n }",
"void unsetFoundingDate();",
"public synchronized static void cleanOldFiles() {\n\t\tGregorianCalendar yesterday = new GregorianCalendar();\n\t\tyesterday.roll(GregorianCalendar.HOUR_OF_DAY,-4);\n\t\tcleanOldFiles(yesterday.getTime());\n\t}",
"public static void main(String[] args) {\r\n\t\tDate today = new Date(2, 26, 2012);\r\n\t\tSystem.out.println(\"Input date is \" + today);\r\n\t\tSystem.out.println(\"Printing the next 10 days after \" + today);\r\n\t\tfor (int i = 0; i < 10; i++) {\r\n\t\t\ttoday = today.next();\r\n\t\t\tSystem.out.println(today);\r\n\t\t}\r\n\t\tDate expiry = new Date(2011);\r\n\t\tSystem.out.println(\"testing year 2011 as input:\" + expiry);\r\n\r\n\t\tDate todayDate = new Date();\r\n\t\tSystem.out.println(\"todays date: \" + todayDate);\r\n\t\tSystem.out.println(\"current month:\" + todayDate.month);\r\n\r\n\t\t// testing isValidMonth function\r\n\t\tDate start = new Date(\"08-01-2010\");\r\n\t\tDate end1 = new Date(\"09-01-2010\");\r\n\t\tboolean param1 = start.isValidMonth(4, end1);\r\n\t\tSystem.out.println(\"is April valid between: \" + start + \" and \" + end1\r\n\t\t\t\t+ \": \" + param1);\r\n\t\tDate end2 = new Date(\"02-01-2011\");\r\n\t\tboolean param2 = start.isValidMonth(2, end2);\r\n\t\tSystem.out.println(\"is feb valid between: \" + start + \" and \" + end2\r\n\t\t\t\t+ \": \" + param2);\r\n\t\tboolean param3 = start.isValidMonth(8, start);\r\n\t\tSystem.out.println(\"is aug valid between: \" + start + \" and \" + start\r\n\t\t\t\t+ \": \" + param3);\r\n\t\tparam3 = start.isValidMonth(4, start);\r\n\t\tSystem.out.println(\"is april valid between: \" + start + \" and \" + start\r\n\t\t\t\t+ \": \" + param3);\r\n\t\tDate end3 = new Date(\"02-01-2010\");\r\n\t\tboolean param4 = start.isValidMonth(8, end3);\r\n\t\tSystem.out.println(\"is aug valid between: \" + start + \" and \" + end3\r\n\t\t\t\t+ \": \" + param4);\r\n\t\t \r\n\t\tDate lease = new Date(\"1-01-2012\");\r\n\t\tDate expiry1 = new Date(\"12-31-2012\");\r\n\r\n\t\t// testing daysBetween\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"\\nTESTING daysBetween method\\n------------------------------\");\r\n\t\tint count = lease.daysBetween(expiry);\r\n\t\tSystem.out.println(\"Days between \" + lease + \" and \" + expiry + \"is: \"\r\n\t\t\t\t+ count);\r\n count = new Date(\"1-01-2011\").daysBetween(new Date(\"12-31-2011\"));\r\n\t\tSystem.out.println(\"Days between [1-01-2011] and [12-31-2011]\" + \"is: \"\r\n\t\t\t\t+ count);\r\n\t\tcount = lease.daysBetween(expiry1);\r\n\t\tSystem.out.println(\"Days between \" + lease + \" and \" + expiry1 + \"is: \"\r\n\t\t\t\t+ count);\r\n\t\tDate testDate = new Date(\"12-31-2013\");\r\n\t\tcount = lease.daysBetween(testDate);\r\n\t\tSystem.out.println(\"Days between \" + lease + \" and [12-31-2013] \"\r\n\t\t\t\t+ \"is: \" + count);\r\n\t\tcount = lease.daysBetween(lease);\r\n\t\tSystem.out.println(\"Days between \" + lease + \" and \" + lease + \"is: \"\r\n\t\t\t\t+ count);\r\n count = lease.daysBetween(new Date(\"1-10-2012\"));\r\n\t\tSystem.out.println(\"Days between \" + lease + \" and [1-10-2012\" + \"is: \"\r\n\t\t\t\t+ count);\r\n \r\n\t\tcount = testDate.daysBetween(lease);\r\n\t\tSystem.out.println(\"Days between \" + testDate + \" and \" + lease + \"is: \"\r\n\t\t\t\t+ count);\r\n\r\n\t\t// testin isBefore\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"\\nTESTING isBefore method\\n------------------------------\");\r\n\t\tboolean isBefore = today.isBefore(today.next());\r\n\t\tSystem.out.println(today + \"is before \" + today.next() + \": \"\r\n\t\t\t\t+ isBefore);\r\n\t\tisBefore = today.next().isBefore(today);\r\n\t\tSystem.out.println(today.next() + \"is before \" + today + \": \"\r\n\t\t\t\t+ isBefore);\r\n\t\tisBefore = today.isBefore(today);\r\n\t\tSystem.out.println(today + \"is before \" + today + \": \" + isBefore);\r\n isBefore = today.isBefore(today.addMonths(12));\r\n\t\tSystem.out.println(today + \"is before \" + today.addMonths(12) + \": \" + isBefore);\r\n\r\n\t\t// testing addMonths\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"\\nTESTING addMonths method\\n------------------------------\");\r\n\t\ttoday = new Date(\"1-31-2011\");\r\n\t\tDate newDate = today.addMonths(1);\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"adding 1 months to \" + today + \" gives: \" + newDate);\r\n\t\tnewDate = today.addMonths(13);\r\n\t\tSystem.out.println(\"adding 13 months to \" + today + \" gives: \"\r\n\t\t\t\t+ newDate);\r\n\t\ttoday = new Date(\"3-31-2010\");\r\n\t\tnewDate = today.addMonths(15);\r\n\t\tSystem.out.println(\"adding 15 months to \" + today + \" gives: \"\r\n\t\t\t\t+ newDate);\r\n\t\tnewDate = today.addMonths(23);\r\n\t\tSystem.out.println(\"adding 23 months to \" + today + \" gives: \"\r\n\t\t\t\t+ newDate);\r\n\t\tnewDate = today.addMonths(49);\r\n\t\tSystem.out.println(\"adding 49 months to \" + today + \" gives: \"\r\n\t\t\t\t+ newDate);\r\n\t\tnewDate = today.addMonths(0);\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"adding 0 months to \" + today + \" gives: \" + newDate);\r\n\t\t\r\n\t\t// testing monthsBetween\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"\\nTESTING monthsBetween method\\n------------------------------\");\r\n\t\tint monthDiff = today.monthsBetween(today.addMonths(1));\r\n\t\tSystem.out.println(\"months between \" + today + \" and \" + today.addMonths(1)\r\n\t\t\t\t+ \": \" + monthDiff);\r\n\t\tmonthDiff = today.next().monthsBetween(today);\r\n\t\tSystem.out.println(\"months between \" + today.next() + \" and \" + today\r\n\t\t\t\t+ \": \" + monthDiff);\r\n\t\ttoday = new Date(\"09-30-2011\");\r\n\t\tDate endDate = new Date(\"2-29-2012\");\r\n\t\tmonthDiff = today.monthsBetween(endDate);\r\n\t\tSystem.out.println(\"months between \" + today + \" and \" + endDate + \": \"\r\n\t\t\t\t+ monthDiff);\r\n\t\ttoday = new Date();\r\n\t\tDate endDate1 = new Date(\"12-04-2011\");\r\n\t\tmonthDiff = today.monthsBetween(endDate1);\r\n\t\tSystem.out.println(\"months between \" + today + \" and \" + endDate1\r\n\t\t\t\t+ \": \" + monthDiff);\r\n\t\ttoday = new Date();\r\n\t\tDate endDate2 = new Date(\"12-22-2010\");\r\n\t\tmonthDiff = today.monthsBetween(endDate2);\r\n\t\tSystem.out.println(\"months between \" + today + \" and \" + endDate2\r\n\t\t\t\t+ \": \" + monthDiff);\r\n\t\t\r\n\t\t// following should generate exception as date is invalid!\r\n\t\t// today = new Date(13, 13, 2010);\r\n\r\n\t\t// expiry = new Date(\"2-29-2009\");\r\n // newDate = today.addMonths(-11);\r\n\r\n\t}",
"@Test\n public void test0() {\n chkDate(\"> '2013'\", true);\n\n }",
"private void checkYearDeviation() {\n val yearDeviation = config.getInt(\"year_deviation\");\n\n checkArgument(yearDeviation > 0, \"year_deviation is less than or equal to 0!\");\n }",
"public Date checkDate() {\n // Create new sdf with format is dd/MM/yyyy\n SimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/yyyy\");\n sdf.setLenient(false); // Check special day\n Date date = null; // Create date\n boolean isOK = true; // Condition loop\n\n while (isOK) {\n try {\n String dateStr = checkEmpty(\"DOB\"); // Call method to check input of dob\n date = sdf.parse(dateStr); // Convert string to date\n return date;\n\n } catch (ParseException e) {\n // Print error if date is invalid\n System.out.println(\"Date is invalid !\");\n System.out.print(\"Enter again (dd/MM/yyyy): \");\n }\n }\n return date; // Return date\n }",
"public void ustawDate(Date data) {\n\t\tcalendar = Calendar.getInstance();\r\n\t\tcalendar.setTime(data);\r\n\t\tthis.rok = calendar.get(Calendar.YEAR);\r\n\t\tthis.miesiac = calendar.get(Calendar.MONTH);\r\n\t\tif ((this.rok % 4 == 0 && this.rok % 100 != 0) || this.rok % 400 == 0) {\r\n\t\t\tmiesiace[1] = 29;\r\n\t\t} else {\r\n\t\t\tmiesiace[1] = 28;\r\n\t\t}\r\n\r\n\t\twypelnijTabele();\r\n\t}",
"@Test\n\tpublic void testDate2() {\n\t\ttry {\n\t\t\tfinal Date date = ParadoxDate.getDateFromParadoxDate(36160);\n\t\t\tfinal Calendar calendar = Calendar.getInstance();\n\t\t\tcalendar.setTime(date);\n\t\t\tAssert.assertTrue(calendar.get(Calendar.DATE) == 1);\n\t\t\tAssert.assertTrue(calendar.get(Calendar.MONTH) == 0);\n\t\t\tAssert.assertTrue(calendar.get(Calendar.YEAR) == 100);\n\t\t} catch (final Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tAssert.fail();\n\t\t}\n\t}",
"private static String dateAddAndValidation() {\n Scanner scan = new Scanner(System.in);\r\n String date;\r\n while (true) {\r\n System.out.println(\"Please add task due date(YYYY-MM-DD)\");\r\n date = scan.nextLine().trim();\r\n String[] dateArray = date.split(\"-\");\r\n if (dateArray.length != 3 || date.length() != 10) {\r\n System.out.println(RED + \"Date format is incorrect. \" + RESET);\r\n continue;\r\n }\r\n if (dateArray[0].length() != 4 || !StringUtils.isNumeric(dateArray[0])) {\r\n System.out.println(RED + \"You have typed incorrect Year format (not all of the data are numbers or there are too many/ too few signs). \" + RESET);\r\n continue;\r\n }\r\n if (dateArray[1].length() != 2 || !NumberUtils.isDigits(dateArray[1])) {\r\n System.out.println(RED + \"You have given incorrect Month format (not all of the signs are numbers or there are too many/ too few signs). \" + RESET);\r\n continue;\r\n }\r\n if (Integer.parseInt(dateArray[1]) < 1 || Integer.parseInt(dateArray[1]) > 12) {\r\n System.out.println(RED + \"You have given incorrect Month date (Month date shouldn't be greater than 12 or less than 1). \" + RESET);\r\n continue;\r\n }\r\n if (dateArray[2].length() != 2 || !NumberUtils.isDigits(dateArray[2])) {\r\n System.out.println(RED + \"You have given incorrect Day format (not all of the signs are numbers or there are too many/ too few signs). \" + RESET);\r\n continue;\r\n }\r\n if (Integer.parseInt(dateArray[2]) < 1 || Integer.parseInt(dateArray[2]) > 31) {\r\n System.out.println(RED + \"You have typed incorrect Day date (Day date shouldn't be greater than 31 or less than 1). \" + RESET);\r\n continue;\r\n }\r\n break;\r\n }\r\n return date;\r\n }",
"private static void addDateIfValid(AnalysisResults.Builder analysisBuilder, String date) {\n String separator = date.contains(\"-\") ? \"-\" : \"/\";\n String formatterPattern = \"M\" + separator + \"d\" + separator;\n\n // Determine if the date has 2 or 4 digits for the year\n if (date.lastIndexOf(separator) + 3 == date.length()) {\n formatterPattern += \"yy\";\n } else {\n formatterPattern += \"yyyy\";\n }\n\n DateTimeFormatter formatter = DateTimeFormatter.ofPattern(formatterPattern);\n\n try {\n ZonedDateTime dateAndTime = LocalDate.parse(date, formatter).atStartOfDay(ZoneOffset.UTC);\n dateAndTime = fixYearIfInFuture(dateAndTime);\n\n long timestamp = dateAndTime.toInstant().toEpochMilli();\n analysisBuilder.setTransactionTimestamp(timestamp);\n } catch (DateTimeParseException e) {\n // Invalid month or day\n return;\n }\n }",
"public static boolean before(Date target, Date date){\n Calendar cal1 = Calendar.getInstance();\n cal1.setTime(target);\n\n Calendar cal2 = Calendar.getInstance();\n cal2.setTime(date);\n\n if(cal1.compareTo(cal2) == -1) return true;\n return false;\n }",
"public static String Warning(String date) throws CustomExceptionHandler\n {\n Date now = new Date();\n SimpleDateFormat formatter = new SimpleDateFormat(\"dd.MM.yyyy\");\n formatter.setLenient(false);\n try\n {\n // Formats the current date into a date format\n Date parsedDate = formatter.parse(date);\n\n String formDate = formatter.format( new Date());\n Date formNow = formatter.parse(formDate);\n\n // Compares the current date with the date in the Invoice table\n if(parsedDate.before(formNow))\n {\n return (\"Warning, bill overdue!\");\n }\n else\n {\n return (\"Bill still valid.\");\n }\n }\n catch(Exception e)\n {\n throw new CustomExceptionHandler(\"The date format is not correct\");\n }\n }",
"public boolean isBefore(Date that) {\n return compareTo(that) < 0;\n }",
"public Sad(Date date){\n\t\tthis.date = date;\n\t}",
"private int checkDay(int testDay) {\n\t\t// check if day in range for month\n\t\tif (testDay > 0 && testDay <= daysPerMonth[month])\n\t\t\treturn testDay;\n\n\t\t// check for leap year\n\t\tif (month == 2 && testDay == 29 && (year % 400 == 0 || (year % 4 == 0 && year % 100 != 0)))\n\t\t\treturn testDay;\n\n\t\tthrow new IllegalArgumentException(\"day out-of-range for the specified month and year\");\n\t}",
"@SuppressWarnings(\"PMD.SignatureDeclareThrowsException\")\n public void redoLoanDisbursalWithPastDate() throws Exception {\n RedoLoanDisbursalParameters paramsPastDate = new RedoLoanDisbursalParameters();\n paramsPastDate.setDisbursalDateDD(\"25\");\n paramsPastDate.setDisbursalDateMM(\"02\");\n paramsPastDate.setDisbursalDateYYYY(\"2011\");\n LoanAccountPage loanAccountPage = loanTestHelper.redoLoanDisbursal(\"Default Group\", \"WeeklyGroupFlatLoanWithOnetimeFee\", paramsPastDate, null, 0, false);\n verifyRedoLoanDisbursalWithPastDate(loanAccountPage);\n }",
"public static boolean isValidCreationTime(Date date) {\r\n \treturn \t(date!=null) &&\r\n \t\t\t(date.getTime()<=System.currentTimeMillis());\r\n }",
"protected void start( LocalDate date ) {\n\t\t//optional to implement, default noop\n\t\t}",
"public boolean validarFecha(Date fecha) {\n\t\tif(!fecha.before(Calendar.getInstance().getTime())) {\n\t\t\tJOptionPane.showMessageDialog(null, \"La fecha introducida es invalida\",\"Fecha invalida\", JOptionPane.INFORMATION_MESSAGE);\n\t\t\treturn false;\n\t\t}else return true; \n\t}",
"public static void before0(){\n Calendar class0 = Calendar.getInstance();\n class0.set(2019,1,2,3,4,5);\n Calendar when = Calendar.getInstance();\n when.set(2019,1,2,3,4,6);\n boolean ret0 = class0.before(when);\n assert(class0.get(Calendar.YEAR)==2019);\n assert(class0.get(Calendar.MONTH)==1);\n assert(class0.get(Calendar.DATE)==2);\n assert(class0.get(Calendar.HOUR_OF_DAY)==3);\n assert(class0.get(Calendar.MINUTE)==4);\n assert(class0.get(Calendar.SECOND)==5);\n assert(when.get(Calendar.YEAR)==2019);\n assert(when.get(Calendar.MONTH)==1);\n assert(when.get(Calendar.DATE)==2);\n assert(when.get(Calendar.HOUR_OF_DAY)==3);\n assert(when.get(Calendar.MINUTE)==4);\n assert(when.get(Calendar.SECOND)==6);\n assert(ret0==true);\n System.out.println(ret0);\n }",
"private static boolean isDeliveryDate(String string) {\n\t\tString[] tmp = string.split(\"/\");\n\t\tint[] date = new int[tmp.length];\n\t\t\n\t\tif(date.length != 3) {\n\t\t\treturn false;\n\t\t}\n\t\tfor(int i = 0; i < date.length; i++) {\n\t\t\tdate[i] = Integer.parseInt(tmp[i]);\n\t\t}\n\t\t\n\t\tCalendar cal = new GregorianCalendar(date[2], date[0]-1, date[1]);\n\t\t\n\t\t//check valid date\n\t\tboolean is_valid_date = true;\n\t\tif(cal.get(Calendar.YEAR) != date[2]) is_valid_date = false;\n\t\tif(cal.get(Calendar.MONTH)+1 != date[0]) is_valid_date = false;\n\t\tif(cal.get(Calendar.DAY_OF_MONTH) != date[1]) is_valid_date = false;\n\t\treturn is_valid_date;\n\t\t\n\t\t/****** THIS IS USED FOR SETTING A LIMIT ON HOW EARLY OR LATE A INVOICE CAN BE ENTERED\n\t\t\n\t\tCalendar today = new GregorianCalendar();\n\t\tCalendar limit_date;\n\t\tif(today.MONTH < 8) \n\t\tlimit_date = new GregorianCalendar( today.get(Calendar.YEAR), \n\t\t\t\t\t\t\t\t\t\t\ttoday.get(Calendar.MONTH)+4, \n\t\t\t\t\t\t\t\t\t\t\ttoday.get(Calendar.DAY_OF_MONTH) ); // limit date is 4 months ahead of current time. \n\t\telse\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\tlimit_date = new GregorianCalendar(\ttoday.get(Calendar.YEAR)+1, \n\t\t\t\t\t\t\t\t\t\t\ttoday.get(Calendar.MONTH)+4%11, \n\t\t\t\t\t\t\t\t\t\t\ttoday.get(Calendar.DAY_OF_MONTH) );\n\t\t\t\n\n\t\tif(delivery_date.compareTo(today) <= 0) \n\t\treturn false;\n\t\telse if(delivery_date.compareTo(limit_date) >= 0)\n\t\treturn false;\n\t\telse*/\n\t\t\n\t}",
"private void checkReservationValidityAndRemove(){\n\t\t\n\t\tfor (Reservation r: reservationArray){\n\t\t\tif (r.getBookingDateAndTime().get(Calendar.DAY_OF_MONTH)==Calendar.getInstance().get(Calendar.DAY_OF_MONTH)){\n\t\t\t\tif (r.getBookingDateAndTime().get(Calendar.MONTH)==Calendar.getInstance().get(Calendar.MONTH)){\n\t\t\t\t\tif (r.getBookingDateAndTime().get(Calendar.HOUR_OF_DAY)==Calendar.getInstance().get(Calendar.HOUR_OF_DAY)){\n\t\t\t\t\t\tif (r.getBookingDateAndTime().get(Calendar.MINUTE) > 30 + r.getBookingDateAndTime().get(Calendar.MINUTE) ){\n\t\t\t\t\t\t\treservationArray.remove(r);\n\t\t\t\t\t\t\ttablemanager.increaseAvailable();;\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}",
"public void setNotAfter(java.util.Date r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: com.android.org.bouncycastle.x509.X509V1CertificateGenerator.setNotAfter(java.util.Date):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.org.bouncycastle.x509.X509V1CertificateGenerator.setNotAfter(java.util.Date):void\");\n }",
"public void testUpdatePaymentTerm_CreationDateExceedsCurrentDate() throws Exception {\r\n try {\r\n PaymentTerm paymentTerm = this.getPaymentTermWithId(1);\r\n paymentTerm.setCreationDate(new Date(new Date().getTime() + ONEDAY));\r\n this.getManager().updatePaymentTerm(paymentTerm);\r\n fail(\"IllegalArgumentException is expected\");\r\n } catch (IllegalArgumentException e) {\r\n assertTrue(e.getMessage()\r\n .indexOf(\"The creation date of PaymentTerm to be updated must not exceed current date\") >= 0);\r\n }\r\n }",
"public static boolean isValidDt(double dt) {\n\t\treturn ((0 < dt) && (dt < 0.2));\n\t}"
]
| [
"0.6531186",
"0.62045026",
"0.6107216",
"0.6078961",
"0.6061483",
"0.6003653",
"0.58375657",
"0.5802693",
"0.5771116",
"0.5769982",
"0.57574993",
"0.5750976",
"0.57449496",
"0.57389027",
"0.5734563",
"0.5695664",
"0.5627035",
"0.5609282",
"0.5581334",
"0.5561386",
"0.55497736",
"0.55100566",
"0.5459538",
"0.54374844",
"0.5419488",
"0.54187584",
"0.5415663",
"0.53969675",
"0.5387222",
"0.53618616",
"0.5332267",
"0.53270185",
"0.5317225",
"0.53170127",
"0.53133404",
"0.5311554",
"0.5302656",
"0.5294548",
"0.52723753",
"0.52672845",
"0.5264251",
"0.52446157",
"0.5229251",
"0.522021",
"0.5219086",
"0.5216384",
"0.52112484",
"0.51989573",
"0.5189671",
"0.518163",
"0.5180337",
"0.51802975",
"0.5179538",
"0.5171586",
"0.5168584",
"0.5165043",
"0.5160947",
"0.51506215",
"0.514886",
"0.51469845",
"0.51162124",
"0.510714",
"0.5105548",
"0.5103507",
"0.5098202",
"0.50929326",
"0.5090847",
"0.5089548",
"0.5081345",
"0.5075886",
"0.5074319",
"0.5073765",
"0.50720304",
"0.50659055",
"0.506527",
"0.5063732",
"0.5059197",
"0.5052184",
"0.5047255",
"0.504342",
"0.5026642",
"0.5018343",
"0.50173354",
"0.50128055",
"0.50112134",
"0.5007255",
"0.49967116",
"0.49874786",
"0.49868813",
"0.49832252",
"0.4978873",
"0.49784082",
"0.4976905",
"0.49737668",
"0.49735996",
"0.49675894",
"0.49673817",
"0.49595967",
"0.49577874",
"0.49539617"
]
| 0.5831994 | 7 |
prevents from crashing if month is less than 10 | public String checkDateMonth(Date aDate){
if (aDate.getMonth() < 10) {
String newDate = "0" + Integer.toString(aDate.getMonth()+1);
return newDate;
}
return Integer.toString(aDate.getMonth());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private int checkMonth(int testMonth) {\n\t\tif (testMonth > 0 && testMonth <= 12) // validate month\n\t\t\treturn testMonth;\n\t\telse // month is invalid\n\t\t\tthrow new IllegalArgumentException(\"month must be 1-12\");\n\t}",
"private void checksOldExpense() {\n DateUtils dateUtils = new DateUtils();\n\n // Breaking date string from date base\n String[] expenseDate = dateDue.getText().toString().split(\"-\");\n\n if((Integer.parseInt(expenseDate[GET_MONTH]) < Integer.parseInt(dateUtils.currentMonth))\n && (Integer.parseInt(expenseDate[GET_YEAR]) <= Integer.parseInt(dateUtils.currentYear))){\n\n }\n }",
"@Test(expected = IllegalArgumentException.class)\r\n public void testIncorrectMonth() {\r\n SimpleDate d1 = new SimpleDate(\"-3/1/1700\");\r\n }",
"void checkForValidDate(String dateTime) {\n\n int daysOfMonth[] = {31,28,31,30,31,30,31,31,30,31,30,31};\n\n Timestamp now = new Timestamp(new java.util.Date().getTime());\n Timestamp date = Timestamp.valueOf(startDateTime);\n if (date.after(now)) {\n outputError(lineCount + \" - Fatal - \" +\n \"Date / Time later than today's date : \" +\n startDateTime + \" : \" + station.getStationId(\"\"));\n } // if (date.after(now))\n\n StringTokenizer t = new StringTokenizer(dateTime, \"- :.\");\n int year = Integer.parseInt(t.nextToken());\n int month = Integer.parseInt(t.nextToken());\n int day = Integer.parseInt(t.nextToken());\n int hour = Integer.parseInt(t.nextToken());\n int minute = Integer.parseInt(t.nextToken());\n boolean isLeapYear = ((year % 4 == 0) && (year % 100 != 0) || (year % 400 == 0));\n if (isLeapYear) daysOfMonth[1] += 1;\n if (year < 1850) {\n outputError(lineCount + \" - Fatal - \" +\n \"Year before 1850 : \" +\n startDateTime + \" : \" + station.getStationId(\"\"));\n } // if (year < 1850)\n\n if (month > 12) {\n outputError(lineCount + \" - Fatal - \" +\n \"Month invalid ( > 12) : \" +\n startDateTime + \" : \" + station.getStationId(\"\"));\n } // if (month > 12)\n\n if (day > daysOfMonth[month-1]) {\n outputError(lineCount + \" - Fatal - \" +\n \"Day invalid ( > no of days in month) : \" +\n startDateTime + \" : \" + station.getStationId(\"\"));\n } // if (day > (daysOfMonth[month-1])\n\n if (hour > 23) {\n outputError(lineCount + \" - Fatal - \" +\n \"Hour invalid ( > 23) : \" +\n startDateTime + \" : \" + station.getStationId(\"\"));\n } // if (hour > 23)\n\n if (minute > 59) {\n outputError(lineCount + \" - Fatal - \" +\n \"Minute invalid ( > 59) : \" +\n startDateTime + \" : \" + station.getStationId(\"\"));\n } // if (minute > 59)\n\n }",
"@Override\r\n public boolean setMonth(int month) {\r\n try {\r\n GregorianCalendar tempCalendar =(GregorianCalendar) calendar.clone();\r\n tempCalendar.setLenient(false); \r\n tempCalendar.set(Calendar.MONTH, month);\r\n tempCalendar.getTime();\r\n }\r\n catch (Exception e) {\r\n return false;\r\n }\r\n calendar.set(Calendar.MONTH, month); \r\n return true;\r\n }",
"public void setMonth(int month) throws InvalidDateException {\r\n\t\tif (month <= 12 & month >= 1) {\r\n\t\t\tthis.month = month;\r\n\t\t} else {\r\n\t\t\tthrow new InvalidDateException(\"Please enter a realistic month for the date (between 1 and 12) !\");\r\n\t\t}\r\n\t}",
"private void adjustDayInMonthIfNeeded(int month, int year) {\n int day = mCurrentDate.get(Calendar.DAY_OF_MONTH);\n int daysInMonth = getDaysInMonth(month, year);\n if (day > daysInMonth) {\n mCurrentDate.set(Calendar.DAY_OF_MONTH, daysInMonth);\n }\n }",
"public boolean isSupportMonth() {\r\n return true;\r\n }",
"@Test public void Month_name_0__day__year__bad_day()\t\t\t{tst_date_(\"Mar 32 2001\"\t\t\t, \"Invalid day: 32\");}",
"public abstract void monthlyProcess();",
"public boolean checkReservationDateFromToday(String resMonth, String resDay, String resYear){\n int daysDiff,monthDiff,yearDiff; //date difference\n int monthToday,dayToday,yearToday; //date today\n int monthReserved,dayReserved,yearReserved; //date of reservation\n \n //date of reservation\n String sMonth,sDay,sYear;\n sMonth = resMonth;\n sDay = resDay;\n sYear = resYear;\n \n getCurrentDate(); //call to get current date\n \n boolean dateValid = false;\n sMonth = convertMonthToDigit(sMonth); //convert string month to string number\n \n monthToday = parseInt(month);\n dayToday = parseInt(day);\n yearToday = parseInt(year);\n \n //convert to integer\n monthReserved = parseInt(sMonth);\n dayReserved = parseInt(sDay);\n yearReserved = parseInt(sYear);\n \n //get the difference\n monthDiff = monthReserved - monthToday;\n daysDiff = dayReserved - dayToday;\n yearDiff = yearReserved - yearToday;\n \n System.out.println(\"startMonth: \"+ sMonth);\n System.out.println(\"yearDiff: \" + yearDiff);\n System.out.println(\"daysDiff: \" + daysDiff);\n System.out.println(\"monthDiff: \" + monthDiff);\n \n if(yearDiff > 0){ //next year\n return true;\n }\n \n if(yearDiff == 0){ //this year\n if(monthDiff >= 0){\n if(monthDiff == 0 && daysDiff == 0){ //cannot reserve room on the day\n //invalid day, the date is today\n dateValid = false;\n System.out.println(\"reservation day must not today.\");\n }else if(monthDiff==0 && daysDiff < 0){ // same month today, invalid day diff\n dateValid = false; \n System.out.println(\"reservation day must not in the past\");\n }else if(monthDiff>0 && daysDiff < 0){ //not the same month today, accept negative day diff\n dateValid = true;\n }else{ //the same month and valid future day\n dateValid = true;\n }\n }else{\n //invalid month\n System.out.println(\"reservation month must not in the past.\");\n }\n }else{\n //invalid year\n System.out.println(\"reservation year must not in the past.\");\n }\n \n return dateValid;\n }",
"private boolean checkValidDay() {\n return numDays >= 0 && numDays <= 7;\n }",
"private boolean exceededDateListLimit() {\n final int MAX_DATE_PARSE = 2;\n return dateList.size() > MAX_DATE_PARSE;\n }",
"public static void main(String[] args) {\r\n\t\tDate today = new Date(2, 26, 2012);\r\n\t\tSystem.out.println(\"Input date is \" + today);\r\n\t\tSystem.out.println(\"Printing the next 10 days after \" + today);\r\n\t\tfor (int i = 0; i < 10; i++) {\r\n\t\t\ttoday = today.next();\r\n\t\t\tSystem.out.println(today);\r\n\t\t}\r\n\t\tDate expiry = new Date(2011);\r\n\t\tSystem.out.println(\"testing year 2011 as input:\" + expiry);\r\n\r\n\t\tDate todayDate = new Date();\r\n\t\tSystem.out.println(\"todays date: \" + todayDate);\r\n\t\tSystem.out.println(\"current month:\" + todayDate.month);\r\n\r\n\t\t// testing isValidMonth function\r\n\t\tDate start = new Date(\"08-01-2010\");\r\n\t\tDate end1 = new Date(\"09-01-2010\");\r\n\t\tboolean param1 = start.isValidMonth(4, end1);\r\n\t\tSystem.out.println(\"is April valid between: \" + start + \" and \" + end1\r\n\t\t\t\t+ \": \" + param1);\r\n\t\tDate end2 = new Date(\"02-01-2011\");\r\n\t\tboolean param2 = start.isValidMonth(2, end2);\r\n\t\tSystem.out.println(\"is feb valid between: \" + start + \" and \" + end2\r\n\t\t\t\t+ \": \" + param2);\r\n\t\tboolean param3 = start.isValidMonth(8, start);\r\n\t\tSystem.out.println(\"is aug valid between: \" + start + \" and \" + start\r\n\t\t\t\t+ \": \" + param3);\r\n\t\tparam3 = start.isValidMonth(4, start);\r\n\t\tSystem.out.println(\"is april valid between: \" + start + \" and \" + start\r\n\t\t\t\t+ \": \" + param3);\r\n\t\tDate end3 = new Date(\"02-01-2010\");\r\n\t\tboolean param4 = start.isValidMonth(8, end3);\r\n\t\tSystem.out.println(\"is aug valid between: \" + start + \" and \" + end3\r\n\t\t\t\t+ \": \" + param4);\r\n\t\t \r\n\t\tDate lease = new Date(\"1-01-2012\");\r\n\t\tDate expiry1 = new Date(\"12-31-2012\");\r\n\r\n\t\t// testing daysBetween\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"\\nTESTING daysBetween method\\n------------------------------\");\r\n\t\tint count = lease.daysBetween(expiry);\r\n\t\tSystem.out.println(\"Days between \" + lease + \" and \" + expiry + \"is: \"\r\n\t\t\t\t+ count);\r\n count = new Date(\"1-01-2011\").daysBetween(new Date(\"12-31-2011\"));\r\n\t\tSystem.out.println(\"Days between [1-01-2011] and [12-31-2011]\" + \"is: \"\r\n\t\t\t\t+ count);\r\n\t\tcount = lease.daysBetween(expiry1);\r\n\t\tSystem.out.println(\"Days between \" + lease + \" and \" + expiry1 + \"is: \"\r\n\t\t\t\t+ count);\r\n\t\tDate testDate = new Date(\"12-31-2013\");\r\n\t\tcount = lease.daysBetween(testDate);\r\n\t\tSystem.out.println(\"Days between \" + lease + \" and [12-31-2013] \"\r\n\t\t\t\t+ \"is: \" + count);\r\n\t\tcount = lease.daysBetween(lease);\r\n\t\tSystem.out.println(\"Days between \" + lease + \" and \" + lease + \"is: \"\r\n\t\t\t\t+ count);\r\n count = lease.daysBetween(new Date(\"1-10-2012\"));\r\n\t\tSystem.out.println(\"Days between \" + lease + \" and [1-10-2012\" + \"is: \"\r\n\t\t\t\t+ count);\r\n \r\n\t\tcount = testDate.daysBetween(lease);\r\n\t\tSystem.out.println(\"Days between \" + testDate + \" and \" + lease + \"is: \"\r\n\t\t\t\t+ count);\r\n\r\n\t\t// testin isBefore\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"\\nTESTING isBefore method\\n------------------------------\");\r\n\t\tboolean isBefore = today.isBefore(today.next());\r\n\t\tSystem.out.println(today + \"is before \" + today.next() + \": \"\r\n\t\t\t\t+ isBefore);\r\n\t\tisBefore = today.next().isBefore(today);\r\n\t\tSystem.out.println(today.next() + \"is before \" + today + \": \"\r\n\t\t\t\t+ isBefore);\r\n\t\tisBefore = today.isBefore(today);\r\n\t\tSystem.out.println(today + \"is before \" + today + \": \" + isBefore);\r\n isBefore = today.isBefore(today.addMonths(12));\r\n\t\tSystem.out.println(today + \"is before \" + today.addMonths(12) + \": \" + isBefore);\r\n\r\n\t\t// testing addMonths\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"\\nTESTING addMonths method\\n------------------------------\");\r\n\t\ttoday = new Date(\"1-31-2011\");\r\n\t\tDate newDate = today.addMonths(1);\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"adding 1 months to \" + today + \" gives: \" + newDate);\r\n\t\tnewDate = today.addMonths(13);\r\n\t\tSystem.out.println(\"adding 13 months to \" + today + \" gives: \"\r\n\t\t\t\t+ newDate);\r\n\t\ttoday = new Date(\"3-31-2010\");\r\n\t\tnewDate = today.addMonths(15);\r\n\t\tSystem.out.println(\"adding 15 months to \" + today + \" gives: \"\r\n\t\t\t\t+ newDate);\r\n\t\tnewDate = today.addMonths(23);\r\n\t\tSystem.out.println(\"adding 23 months to \" + today + \" gives: \"\r\n\t\t\t\t+ newDate);\r\n\t\tnewDate = today.addMonths(49);\r\n\t\tSystem.out.println(\"adding 49 months to \" + today + \" gives: \"\r\n\t\t\t\t+ newDate);\r\n\t\tnewDate = today.addMonths(0);\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"adding 0 months to \" + today + \" gives: \" + newDate);\r\n\t\t\r\n\t\t// testing monthsBetween\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"\\nTESTING monthsBetween method\\n------------------------------\");\r\n\t\tint monthDiff = today.monthsBetween(today.addMonths(1));\r\n\t\tSystem.out.println(\"months between \" + today + \" and \" + today.addMonths(1)\r\n\t\t\t\t+ \": \" + monthDiff);\r\n\t\tmonthDiff = today.next().monthsBetween(today);\r\n\t\tSystem.out.println(\"months between \" + today.next() + \" and \" + today\r\n\t\t\t\t+ \": \" + monthDiff);\r\n\t\ttoday = new Date(\"09-30-2011\");\r\n\t\tDate endDate = new Date(\"2-29-2012\");\r\n\t\tmonthDiff = today.monthsBetween(endDate);\r\n\t\tSystem.out.println(\"months between \" + today + \" and \" + endDate + \": \"\r\n\t\t\t\t+ monthDiff);\r\n\t\ttoday = new Date();\r\n\t\tDate endDate1 = new Date(\"12-04-2011\");\r\n\t\tmonthDiff = today.monthsBetween(endDate1);\r\n\t\tSystem.out.println(\"months between \" + today + \" and \" + endDate1\r\n\t\t\t\t+ \": \" + monthDiff);\r\n\t\ttoday = new Date();\r\n\t\tDate endDate2 = new Date(\"12-22-2010\");\r\n\t\tmonthDiff = today.monthsBetween(endDate2);\r\n\t\tSystem.out.println(\"months between \" + today + \" and \" + endDate2\r\n\t\t\t\t+ \": \" + monthDiff);\r\n\t\t\r\n\t\t// following should generate exception as date is invalid!\r\n\t\t// today = new Date(13, 13, 2010);\r\n\r\n\t\t// expiry = new Date(\"2-29-2009\");\r\n // newDate = today.addMonths(-11);\r\n\r\n\t}",
"public void setMonth(Integer month) {\r\n this.month = month;\r\n }",
"public LimitDayAndMonthByCpn() {\r\n\t\tthis.mydb = new DBForMT();\r\n\t}",
"public void setHintInvalidMonths(String hintMonth)\n {\n _facesBean.setProperty(_HINT_MONTH_KEY, hintMonth);\n }",
"protected final boolean ok_date (int year, int month, int day)\n {\n return ((year >= FIRST_YEAR) &&\n (1 <= month && month <= getLastMonthOfYear(year)) &&\n (1 <= day && day <= getLengthOfMonth (year, month)));\n }",
"public void setMonth(int month) {\n if(month < 1 || month > 12) {\n this.month = 1;\n } else {\n this.month = month;\n }\n }",
"public void setMonth(Integer month) {\n this.month = month;\n }",
"public void setMonth(Integer month) {\n this.month = month;\n }",
"private static void incorrectMonth(String month, boolean flag) {\r\n\t\tif (flag) {\r\n\t\t\tmonth = month;\r\n\t\t} else {\r\n\t\t\ttry {\r\n\t\t\t\tthrow new WrongInputConsoleParametersException();\r\n\t\t\t} catch (WrongInputConsoleParametersException a) {\r\n\t\t\t\tSystem.out.println(\"This month doesn`t exist, enter the correct month;\");\r\n\t\t\t} finally {\r\n\t\t\t\tSystem.out.println(\"The program continues to run...\");\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private int checkDay(int testDay) {\n\t\t// check if day in range for month\n\t\tif (testDay > 0 && testDay <= daysPerMonth[month])\n\t\t\treturn testDay;\n\n\t\t// check for leap year\n\t\tif (month == 2 && testDay == 29 && (year % 400 == 0 || (year % 4 == 0 && year % 100 != 0)))\n\t\t\treturn testDay;\n\n\t\tthrow new IllegalArgumentException(\"day out-of-range for the specified month and year\");\n\t}",
"private static boolean isValid(int m, int d, int y) {\r\n\t\tif (m < 1 || m > 12)\r\n\t\t\treturn false;\r\n\t\tif (d < 1 || d > DAYS[m])\r\n\t\t\treturn false;\r\n\t\tif (m == 2 && d == 29 && !isLeapYear(y))\r\n\t\t\treturn false;\r\n\t\treturn true;\r\n\t}",
"private static boolean isValid(int m, int d, int y) {\n if (m < 1 || m > 12) return false;\n if (d < 1 || d > DAYS[m]) return false;\n if (m == 2 && d == 29 && !isLeapYear(y)) return false;\n return true;\n }",
"private boolean isAvailable(String month, int day) {\n\t\treturn false;\n\t}",
"private static boolean isValid(int m, int d, int y) {\n\t\t\tif (m < 1 || m > 12) return false;\n\t\t\tif (d < 1 || d > DAYS[m]) return false;\n\t\t\tif (m == 2 && d == 29 && !isLeapYear(y)) return false;\n\t\t\treturn true;\n\t\t}",
"public void setMonth(int month)\n {\n this.month = month;\n }",
"public Calendar setReservationDate(){\n\t\t\n\t\t\n\t\tint currentMonth = Calendar.getInstance().get(Calendar.MONTH)+1; //Month starts from zero in Java\n\t\tint currentYear = Calendar.getInstance().get(Calendar.YEAR);\n\t\tint currentDate = Calendar.getInstance().get(Calendar.DAY_OF_MONTH);\n\t\tint currentHour = Calendar.getInstance().get(Calendar.HOUR_OF_DAY);\n\t\tint currentMinute = Calendar.getInstance().get(Calendar.MINUTE);\n\t\t\n\t\t\n\t\tSystem.out.println(\"Current Year \"+ currentYear );\n\t\tSystem.out.println(\"Current Month \"+ currentMonth );\n\t\tSystem.out.println(\"Today's date \"+ currentDate );\n\t\tSystem.out.println(\"Current Hour \"+ currentHour );\n\t\tSystem.out.println(\"Current Minute \"+ currentMinute );\n\t\tSystem.out.println(\"\\t---\\t---\\t---\\t---\\t---\");\n\t\tint inputMonth, inputYear, inputDate, inputHour, inputMinute;\n\t\t\n\t\tCalendar reserveDate = Calendar.getInstance();\n\t\t\n\t\tSystem.out.print(\"Enter the year: \");\n\t\tinputYear = scan.nextInt();\n\t\tscan.nextLine();\n\t\t\n\t\twhile( inputYear < currentYear){\n\t\t\tSystem.out.println(\"Old year entry is not allowed !\\n\");\n\t\t\tSystem.out.print(\"Enter the year: \");\n\t\t\tinputYear = scan.nextInt();\n\t\t\tscan.nextLine();\n\t\t}\t\n\t\treserveDate.set(Calendar.YEAR,inputYear); \n\t\n\t\tSystem.out.print(\"Enter the month: \");\n\t\tinputMonth = scan.nextInt();\t\n\t\tscan.nextLine();\n\t\t\n\t\twhile (inputMonth < 1 || inputMonth > 12){\n\t\t\tSystem.out.println(\"Invalid Month entry!\");\n\t\t\tSystem.out.print(\"Enter the month again: \");\n\t\t\tinputMonth = scan.nextInt();\n\t\t\tscan.nextLine();\n\t\t}\n\t\t\n\t\twhile((inputMonth < currentMonth) && (inputYear == currentYear)){\n\t\t\t\t\t\n\t\t\tSystem.out.println(\"Old month entry is not allowed !\\n\");\n\t\t\tSystem.out.print(\"Enter the month: \");\n\t\t\tinputMonth = scan.nextInt();\n\t\t\tscan.nextLine();\n\t\t\t\n\t\t}\n\t\treserveDate.set(Calendar.MONTH,inputMonth-1);//MONTH is from 0 to 11.\n\t\t\n\t\tSystem.out.print(\"Enter the date for reservation: \");\n\t\tinputDate = scan.nextInt();\n\t\tscan.nextLine();\n\t\t\n\t\twhile( inputDate < 1 || inputDate > 31){\n\t\t\tSystem.out.println(\"Invalid date entry!\");\n\t\t\tSystem.out.print(\"Enter the date again: \");\n\t\t\tinputDate = scan.nextInt();\n\t\t\tscan.nextLine();\n\t\t}\n\t\t\n\t\twhile((inputDate < currentDate) && (inputMonth == currentMonth)&&(inputYear==currentYear)){\n\t\t\tSystem.out.println(\"Past Day is not allowed!\\n\");\n\t\t\tSystem.out.print(\"Enter the date for reservation: \");\n\t\t\tinputDate = scan.nextInt();\n\t\t\tscan.nextLine();\n\t\t}\n\t\treserveDate.set(Calendar.DAY_OF_MONTH,inputDate);\n\t\t\n\t\tSystem.out.print(\"Enter hour (24-hr format): \");\n\t\tinputHour = scan.nextInt();\n\t\tscan.nextLine();\n\t\t\n\t\twhile( inputHour < 0 || inputHour > 23){\n\t\t\tSystem.out.println(\"Invalid hour entry!\");\n\t\t\tSystem.out.print(\"Enter the hour again: \");\n\t\t\tinputHour = scan.nextInt();\n\t\t\tscan.nextLine();\n\t\t}\n\t\t\n\t\twhile(inputHour < currentHour && inputDate == currentDate&&inputMonth == currentMonth&&inputYear==currentYear){\n\t\t\t\n\t\t\tif (inputHour < 0 && inputHour > 23){\n\t\t\t\tSystem.out.println(\"Invalid Hour entry\");\n\t\t\t}\n\t\t\telse{\n\t\t\t\tSystem.out.println(\"Past hour is not allowed!\\n\");\n\t\t\t\tSystem.out.print(\"Enter hour (24-hr format): \");\n\t\t\t\tinputHour = scan.nextInt();\n\t\t\t\tscan.nextLine();\n\t\t\t}\n\t\t}\n\t\treserveDate.set(Calendar.HOUR_OF_DAY,inputHour); //This uses 24 hour clock\n\t\t\n\t\tSystem.out.print(\"Enter minute: \");\n\t\tinputMinute = scan.nextInt();\n\t\tscan.nextLine();\n\t\t\n\t\twhile(inputMinute < 0 || inputMinute > 59){\n\t\t\tSystem.out.println(\"Invalid Minute entry\");\n\t\t\tSystem.out.print(\"Enter minute again: \");\n\t\t\tinputMinute = scan.nextInt();\n\t\t\tscan.nextLine();\n\t\t}\n\t\t\n\t\twhile((inputMinute-currentMinute) <= 0 && inputHour == currentHour){\n\t\t\t\n\t\t\t//System.out.println(\"Reservation can only be made 30 minutes earlier or invalid input !\");\n\t\t\tSystem.out.print(\"Invalid minute\");\n\t\t\tSystem.out.print(\"Enter minute again: \");\n\t\t\tinputMinute = scan.nextInt();\t\n\t\t\tscan.nextLine();\n\t\t}\n\t\t\n\t\treserveDate.set(Calendar.MINUTE,inputMinute);\n\t\tSystem.out.println(\"Date Reserved!\");\n\t\treturn reserveDate;\n\t}",
"private Date createExpiredAfter(final int month, final int year) {\n\t\tCalendar calendar = Calendar.getInstance();\n\t\t\n\t\tcalendar.set(year, month - 1, 0, 23, 59, 59);\n\t\tcalendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH));\n\t\t\n\t\treturn calendar.getTime();\n\t}",
"@Test\n public void month() throws Exception {\n Date thisDate = dateFormat.parse(\"08/14/2006\");\n Month august06 = Month.create(thisDate);\n testThePeriod(august06, thisDate, \"08/01/2006 00:00:00.000\",\n \"08/31/2006 23:59:59.999\", \"2006-08\");\n\n //Test the prior period\n Date priorDate = dateFormat.parse(\"07/22/2006\");\n Month july06 = august06.prior();\n testThePeriod(july06, priorDate, \"07/01/2006 00:00:00.000\",\n \"07/31/2006 23:59:59.999\", \"2006-07\");\n\n //Test the next period.\n Date nextDate = dateFormat.parse(\"09/03/2006\");\n Month september06 = august06.next();\n testThePeriod(september06, nextDate, \"09/01/2006 00:00:00.000\",\n \"09/30/2006 23:59:59.999\", \"2006-09\");\n\n //Test compareTo\n testCompareTo(july06, august06, september06);\n }",
"public void setValidMonths(Integer value) {\n setAttributeInternal(VALIDMONTHS, value);\n }",
"public void setMon603r10(double mon603r10) {\r\n\t\tthis.mon603r10 = mon603r10;\r\n\t}",
"@Test\n public void bookHotelTestError2() throws BookHotelFault, DatatypeConfigurationException{ \n BookHotelInputType input = CreateBookHotelInputType(\"booking_Hotel_1\", \"Tick Joachim\", \"00000000\", 0, 9);\n try {\n assertTrue(bookHotel(input));\n } catch (BookHotelFault e) {\n assertEquals(\"Month must be between 1 and 12\",e.getMessage());\n } \n }",
"@Override\n public void onMonthChanged(Date date) {\n }",
"private static Boolean checkYear(){\r\n try{\r\n int year = Integer.parseInt(yearField.getText().trim());\r\n int now = LocalDate.now().getYear();\r\n \r\n if(LocalDate.now().getMonth().compareTo(Month.SEPTEMBER) < 0){\r\n now--;\r\n }\r\n //SIS stores the schedule for last 3 years only \r\n if(year <= now && year >= now - 3 ){\r\n return true;\r\n }\r\n }\r\n catch(Exception e){\r\n Logger.getLogger(\"Year checker\").log(Level.WARNING, \"Exception while resolving the year \", e);\r\n }\r\n return false;\r\n }",
"public boolean aMonthPasses()\n\t{\n\t\tdecreaseHealth();\n\t\tage++;\n\t\treturn false;\n\t}",
"private void checkReservationValidityAndRemove(){\n\t\t\n\t\tfor (Reservation r: reservationArray){\n\t\t\tif (r.getBookingDateAndTime().get(Calendar.DAY_OF_MONTH)==Calendar.getInstance().get(Calendar.DAY_OF_MONTH)){\n\t\t\t\tif (r.getBookingDateAndTime().get(Calendar.MONTH)==Calendar.getInstance().get(Calendar.MONTH)){\n\t\t\t\t\tif (r.getBookingDateAndTime().get(Calendar.HOUR_OF_DAY)==Calendar.getInstance().get(Calendar.HOUR_OF_DAY)){\n\t\t\t\t\t\tif (r.getBookingDateAndTime().get(Calendar.MINUTE) > 30 + r.getBookingDateAndTime().get(Calendar.MINUTE) ){\n\t\t\t\t\t\t\treservationArray.remove(r);\n\t\t\t\t\t\t\ttablemanager.increaseAvailable();;\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}",
"public boolean experired() {\n\t\tint month = Calendar.getInstance().get(Calendar.MONTH) + 1;\n\t\tint year = Calendar.getInstance().get(Calendar.YEAR);\n\t\tString[] parts = this.experiation.split(\"/\");\n\t\tString originalMonth = parts[0];\n\t\tint oM = Integer.parseInt(originalMonth);\n\t\tString originalYear = parts[1];\n\t\tint oY = Integer.parseInt(originalYear);\n\t\t\n\t\tif(oY < year) {\n\t\t\treturn true;\n\t\t}\n\t\tif(oY == year && oM < month) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public void setMonth(byte value) {\n this.month = value;\n }",
"private String getMonthForInt(int number) {\n int num = number - 1;\n String month = \"Wrong number\";\n String[] months = dfs.getMonths();\n if (num >= 0 && num <= 11) {\n month = months[num];\n } else {\n throw new IllegalArgumentException(\"There is no month with number: \" + number);\n }\n return month;\n }",
"private int daysInMonth(int month)\r\n {\n \r\n \tif (month == 4 || month == 5 || month == 9 || month == 11)\r\n \t{\r\n \t\treturn 30;\r\n \t}\r\n \tif (month == 2)\r\n \t{\r\n \t\tif (leapYear(year))\r\n \t\t{\r\n \t\t\treturn 29;\r\n \t\t}\r\n \t\telse \r\n \t\t{\r\n \t\t\treturn 28;\r\n \t\t}\r\n \t}\r\n \telse\r\n \t{\r\n \t\treturn 31;\r\n \t}\r\n }",
"private void givenExchangeRatesExistsForEightMonths() {\n }",
"public boolean isValidMonth(int inputMonth, Date endDate) {\r\n\t\tif (inputMonth < 1 || inputMonth > 12)\r\n\t\t\treturn false;\r\n\t\tif (endDate.year < year)\r\n\t\t\treturn false;\r\n\t\tif (endDate.year == year) {\r\n\t\t\tif ((inputMonth >= month) && (inputMonth <= endDate.month))\r\n\t\t\t\treturn true;\r\n\t\t\telse\r\n\t\t\t\treturn false;\r\n\t\t} else if (endDate.year == year + 1) {\r\n\t\t\tif ((inputMonth >= month) || (inputMonth <= endDate.month))\r\n\t\t\t\treturn true;\r\n\t\t\telse\r\n\t\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"public boolean isMonth(String input){\r\n if(!isInteger(input)) return false;\r\n int month = Integer.parseInt(input);\r\n if(12 < month) return false;\r\n return true;\r\n }",
"public void testGetBlogForMonth() {\n MonthlyBlog monthlyBlog = rootBlog.getBlogForMonth(2003, 4);\n assertNotNull(monthlyBlog);\n assertEquals(2003, monthlyBlog.getYearlyBlog().getYear());\n assertEquals(4, monthlyBlog.getMonth());\n }",
"public void setMonth(byte value) {\n this.month = value;\n }",
"public void setMonth(byte value) {\n this.month = value;\n }",
"public void setMonth(byte value) {\n this.month = value;\n }",
"@Test\n void calculatePeriodLessThanOneMonth() throws ParseException {\n LocalDate testDateStart = LocalDate.parse(\"2015-03-07\");\n LocalDate testDateEnd = LocalDate.parse(\"2015-04-01\");\n Map<String, String> periodMap = datesHelper.calculatePeriodRange(testDateStart, testDateEnd, false);\n assertEquals(\"1 month\", periodMap.get(PERIOD_START));\n assertEquals(\"1 April 2015\", periodMap.get(PERIOD_END));\n }",
"public void setMonth(int newMonth) {\n setMonth(newMonth, true);\n }",
"public static void Main(String[] args) {\n\n Scanner scanner = new Scanner(System.in);\n String month = scanner.nextLine();\n System.out.println(\"Enter a number between 1 and 12.\");\n\n\n// if(x >= 1 && x <= 12);\n// System.out.println(\"Jan\");\n// System.out.println(\"You must enter a number between 1 and 12\");\n }",
"void testDateSetMonth(java.util.Date date, boolean validate) {\n if (date instanceof java.sql.Time) { return; } // java.sql.Time throws IllegalArgumentException in setMonth().\n \n if (validate) {\n assertEqualDate(createDate(\"Apr 20, 2006\"), date);\n } else {\n synchronized (date) {\n date.setMonth(3);\n }\n }\n }",
"private boolean isNovemberEleventh(final Calendar date) {\n return NOVEMBER_11TH_DAY == date.get(Calendar.DAY_OF_MONTH)\n && Calendar.NOVEMBER == date.get(Calendar.MONTH);\n }",
"public static void main(String[] args) {\n byte month=0;\n boolean days28 = month ==2;\n boolean days30 = month==4||month==6||month==9||month==11;\n boolean days31 = days28==false&&days30==false;\n if (days28){\n System.out.println(\"it has 28 days\");\n }\n if (days30){\n System.out.println(\"it has 30 days\");\n }\n if (days31){\n System.out.println(\"it has 31 days\");\n }\n\n }",
"public void setMonth(int month) {\n\t\tthis.month = month;\n\t}",
"public void setMon603r12(double mon603r12) {\r\n\t\tthis.mon603r12 = mon603r12;\r\n\t}",
"protected static final int daysInYearPriorToMonth(int mm, boolean leap)\n {\n return leap ? leap_daysInYearPriorToMonthTable[mm-1]\n : usual_daysInYearPriorToMonthTable[mm-1];\n }",
"private static boolean dateValid(int[] time ) { \r\n\t\tfor ( int i = 0 ; i < time.length; i++) \r\n\t\t\tif (time[i] >2400 || time[i] < 0 ) \r\n\t\t\t\treturn false;\r\n\t\treturn true;\t\t\r\n\t}",
"public boolean setMonth(int newMonth) {\n\t\tthis.month = newMonth;\n\t\tdeltatIsValid = false;\n\t\tthis.jd = swe_julday(this.year, this.month, this.day, this.hour, this.calType); // ->\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// erzeugt\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// JD\n\t\treturn true;\n\t}",
"public void subtractMonth(int month) {\n if (month < 0) month = Math.abs(month);\n\n while (month != 0) {\n month--;\n this.subtractSingleMonth();\n }\n }",
"void setBoardStart(int month, int day, int year) throws IllegalDateException;",
"public boolean checkDate(int year, int month, int day) {\n\t\tboolean cd = checkDate(year, month, day, 0.0);\n\t\treturn cd;\n\t}",
"public static void main(String[] args) {\n\t\tMonthDay month=MonthDay.now();\n\t\tLocalDate d=month.atYear(2015);\n\t\tSystem.out.println(d);\n\t\tMonthDay m=MonthDay.parse(\"--02-29\");\n\t\tboolean b=m.isValidYear(2019);\n\t\tSystem.out.println(b);\n\t\tlong n= month.get(ChronoField.MONTH_OF_YEAR);\n\t\tSystem.out.println(\"month of the year is:\"+n);\n\t\tValueRange r1=month.range(ChronoField.MONTH_OF_YEAR);\n\t\tSystem.out.println(r1);\n\t\tValueRange r2=month.range(ChronoField.DAY_OF_MONTH);\n\t\tSystem.out.println(r2);\n\n\t}",
"public void setMon60610(double mon60610) {\r\n\t\tthis.mon60610 = mon60610;\r\n\t}",
"public void setMonth(final int month) {\n this.month = month;\n }",
"private void datePickerChange(DatePicker datePicker, int year, int month, int dayOfMonth) {\n if(month/10<1){\n if (dayOfMonth/10<1){\n edtDate.setText(year +\"-0\" + (month+1) + \"-0\" + dayOfMonth);\n }else{\n edtDate.setText(year +\"-0\" + (month+1) + \"-\" + dayOfMonth);\n }\n }else{\n if (dayOfMonth/10<1){\n edtDate.setText(year +\"-\" + (month+1) + \"-0\" + dayOfMonth);\n }else{\n edtDate.setText(year +\"-\" + (month+1) + \"-\" + dayOfMonth);\n }\n }\n }",
"public void testGetBlogForThisMonth() {\n Calendar cal = rootBlog.getCalendar();\n MonthlyBlog monthlyBlog = rootBlog.getBlogForThisMonth();\n assertNotNull(monthlyBlog);\n assertEquals(cal.get(Calendar.YEAR), monthlyBlog.getYearlyBlog().getYear());\n assertEquals(cal.get(Calendar.MONTH) + 1, monthlyBlog.getMonth());\n }",
"public void setMonth(String month) {\r\n this.month = month;\r\n }",
"private void checkYearDeviation() {\n val yearDeviation = config.getInt(\"year_deviation\");\n\n checkArgument(yearDeviation > 0, \"year_deviation is less than or equal to 0!\");\n }",
"public boolean isBefore(MonthDay other) {\n if(month < other.month) {\n return true;\n } else if(month == other.month && day < other.day) {\n return true;\n } else {\n return false;\n }\n }",
"public boolean isValidDate(String valD) { //Checks if date is in proper format\n String valDWithoutSpace = valD.replaceAll(\"\\\\s\", \"\");\n return valDWithoutSpace.length() == 8;\n}",
"public boolean checkValidationForDate(int month, int day, boolean leapYear) {\r\n\r\n\t\tswitch (month) {\r\n\t\tcase 1:\r\n\t\t\tif (day > 0 && day <= 31) {\r\n\t\t\t\treturn true;\r\n\t\t\t} else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\tcase 2:\r\n\t\t\tif (leapYear) {\r\n\t\t\t\tif (day > 0 && day <= 29) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\r\n\t\t\t} else {\r\n\t\t\t\tif (day > 0 && day <= 28) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\tcase 3:\r\n\t\t\tif (day > 0 && day <= 31) {\r\n\t\t\t\treturn true;\r\n\t\t\t} else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\tcase 4:\r\n\t\t\tif (day > 0 && day <= 30) {\r\n\t\t\t\treturn true;\r\n\t\t\t} else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\tcase 5:\r\n\t\t\tif (day > 0 && day <= 31) {\r\n\t\t\t\treturn true;\r\n\t\t\t} else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\tcase 6:\r\n\t\t\tif (day > 0 && day <= 30) {\r\n\t\t\t\treturn true;\r\n\t\t\t} else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\tcase 7:\r\n\t\t\tif (day > 0 && day <= 31) {\r\n\t\t\t\treturn true;\r\n\t\t\t} else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\tcase 8:\r\n\t\t\tif (day > 0 && day <= 31) {\r\n\t\t\t\treturn true;\r\n\t\t\t} else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\tcase 9:\r\n\t\t\tif (day > 0 && day <= 30) {\r\n\t\t\t\treturn true;\r\n\t\t\t} else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\tcase 10:\r\n\t\t\tif (day > 0 && day <= 31) {\r\n\t\t\t\treturn true;\r\n\t\t\t} else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\tcase 11:\r\n\t\t\tif (day > 0 && day <= 30) {\r\n\t\t\t\treturn true;\r\n\t\t\t} else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\tcase 12:\r\n\t\t\tif (day > 0 && day <= 31) {\r\n\t\t\t\treturn true;\r\n\t\t\t} else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\tdefault:\r\n\t\t\tSystem.out.println(\"Please enter valid input\");\r\n\t\t}\r\n\t\treturn false;\r\n\r\n\t}",
"public static int checkDaysInMonth(int m, int y) {\n if (m == 1 || m == 3 || m == 5 || m == 7 || m == 8 || m == 10 || m == 12) { // if it is a long month\n return 31; // the month has 31 days\n } else if (m == 4 || m == 6 || m == 9 || m == 11) { // if it is a short month\n return 30; // the month has 30 days\n } else if (m == 2) { // if the month is February\n if (y % 4 == 0 && y % 100 != 0 || y % 400 == 0) { // if it is a leap year\n return 29; // the month has 29 days\n } else { // if it is not a leap year\n return 28; // the month has 28 days\n }\n }\n return 0; // if the month number is invalid\n }",
"private boolean isValidPeriod(int period) {\r\n\t\treturn (period > 0 && period < 366); \r\n\t}",
"private boolean hasDateThreshold() {\r\n if (entity.getExpirationDate() == null) {\r\n return false;\r\n }\r\n Calendar calendar = Calendar.getInstance();\r\n calendar.add(Calendar.MONTH, 1);\r\n if (entity.getExpirationDate().before(calendar.getTime())) {\r\n return true;\r\n }\r\n return false;\r\n }",
"public void setMonth(int month) {\n\t\tthis.date.setMonth(month);\n\t}",
"private boolean isAugustFifteenth(final Calendar date) {\n return AUGUST_15TH_DAY == date.get(Calendar.DAY_OF_MONTH)\n && Calendar.AUGUST == date.get(Calendar.MONTH);\n }",
"private MonthlyCalendar(YearMonth targetMonth) {\n stageChangeListener = new ParentWindowChangeListener(sceneProperty());\n stageChangeListener.currentStageProperty().addListener((observable, oldValue, newValue) -> {\n if (null != newValue) {\n newValue.setTitle(\"Month Calendar\");\n }\n LOG.exiting(LogHelper.toLambdaSourceClass(LOG, \"new\", \"stageChangeHandler#currentStage\"), \"change\");\n });\n this.targetMonth = new ReadOnlyObjectWrapper<>(this, \"targetMonth\", (null == targetMonth) ? YearMonth.now() : targetMonth);\n modelFilter = new ReadOnlyObjectWrapper<>(this, \"modelFilter\");\n allAppointments = FXCollections.observableArrayList();\n appointmentDays = FXCollections.observableArrayList();\n root = new TreeItem<>();\n allAppointments.addListener(this::onAllAppointmentsChanged);\n modelFilter.addListener(this::onModelFilterChanged);\n appointmentInsertEventHandler = WeakEventHandlingReference.create(this::onAppointmentInserted);\n appointmentUpdateEventHandler = WeakEventHandlingReference.create(this::onAppointmentUpdated);\n appointmentDeleteEventHandler = WeakEventHandlingReference.create(this::onAppointmentDeleted);\n }",
"@Test\n void BasicTestCase_inValidMonth() {\n Solution reso = new Solution();\n // Input Dictionary has invalid month\n Map<String, Integer> input1 = Stream.of(new Object[][]{\n {\"2020-71-01\", 6}, {\"2020-01-04\", 12}, {\"2020-01-05\", 14}, {\"2020-01-06\", 2}, {\"2020-01-07\", 4}\n }).collect(Collectors.toMap(data -> (String) data[0], data -> (Integer) data[1]));\n LinkedHashMap<String, Integer> result = reso.dateToDay(input1);\n assertNull(result);\n }",
"@Test\n public void testDateRangeInvalidDate() throws Exception {\n Map<String, String> fields = new HashMap<String, String>();\n fields.put(\"generatedTimestamp\", \"foo\");\n \n this.addSingleDayDateRange.invoke(this.lockService, fields);\n \n Assert.assertEquals(\"should not have changed time field \" + fields.get(\"generatedTimestamp\"),\n \"foo\", fields.get(\"generatedTimestamp\"));\n }",
"protected void beforeTimeSlices()\n\t\tthrows DbCompException\n\t{\n dates = new ArrayList<Date>();\n\t}",
"public void setDay(int day)\r\n {\n \tif (!(day <= daysInMonth(month) || (day < 1)))\r\n\t\t{\r\n \t\tthrow new IllegalArgumentException(\"Bad day: \" + day);\r\n\t\t}\r\n this.day = day;\r\n }",
"public void setMonth(byte value) {\r\n this.month = value;\r\n }",
"@Test(expected = IllegalArgumentException.class)\r\n public void testIncorrectYear() {\r\n SimpleDate d1 = new SimpleDate(\"3/1/1700\");\r\n }",
"public void inputTempForYear() {\n\t\t\n\t\tfor (int i=0; i<12; i++)\n\t\t\tinputTempForMonth(i);\n\t}",
"public void setMon603a10(double mon603a10) {\r\n\t\tthis.mon603a10 = mon603a10;\r\n\t}",
"public String getHintInvalidMonths()\n {\n Object obj = _facesBean.getProperty(_HINT_MONTH_KEY);\n return ComponentUtils.resolveString(obj);\n }",
"void validateDates(ComponentSystemEvent event);",
"public void setMon60410(double mon60410) {\r\n\t\tthis.mon60410 = mon60410;\r\n\t}",
"public Boolean isValidDate(int d, int m, int y)\r\n\t{\r\n\t\tint[] daysInMonth = new int[] {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};\r\n\t\t\r\n\t\t//If dates negative or 0 or month beyond calender year\r\n\t\tif (d <= 0 || m <= 0 || m > 12 || y <= 0)\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tif (((y % 4 == 0) && (y % 100 != 0)) || (y % 400 == 0)) //If leap year\r\n\t\t{\r\n\t\t\tdaysInMonth[1] = 29; //Change feb to 29 days\r\n\t\t}\r\n\t\t\r\n\t\treturn d <= daysInMonth[m - 1];\r\n\t}",
"public boolean setMonth(int value) {\r\n if (!FormatUtils.uint8RangeCheck(value)) {\r\n return false;\r\n }\r\n mMonth = FormatUtils.intToUint8(value);\r\n updateGattCharacteristic();\r\n return true;\r\n }",
"public DateValidator(Integer Day,Integer Month,Integer Year) throws InvalidDateException\n\t{\n\t\t\n\t\t\tiDay = Day;\n\t\t\tiMonth = Month;\n\t\t\tiYear = Year;\n\t\t\t//create Calendar object for current date\n\t\t\tCalendar now = Calendar.getInstance ( );\n\t\t\t//create Calendar Object to test\n\t\t\tCalendar test = Calendar.getInstance( );\n\t\t\t//set the attributes of test Calendar\n\t\t\ttest.set (iYear,iMonth,iDay);\n\t\t\t\n\t\t\tboolean leap = true;//holds the boolean value of leap year \n\t\t\t\n\t\t\t/* test year for proper input*/\n\t\t\tif (iYear + 120 < now.get (Calendar.YEAR) || now.before (test))\n\t\t\t{\t\n\t\t\t\tthrow new InvalidDateException(\"year\");\n\t\t\t}\n\t\t\t/* Test the month for proper input*/\n\t\t\tif (iMonth < 0 || iMonth > 12)\n\t\t\t{\t\n\t\t\t\tthrow new InvalidDateException(\"month\");\n\t\t\t}\n\t\t\t\n\t\t\t//algorithm to determine if it is a leap year\n\t\t\tif (iYear % 400 == 0)\n\t\t\t\tleap = true;\n\t\t\telse if (iYear % 100 == 0)\n\t\t\t\tleap = false;\n\t\t\telse if (iYear % 4 == 0)\n\t\t\t\tleap = true;\n\t\t\telse\n\t\t\t\tleap = false;\n\t\t\t\n\t\t\t/*Test to see if user has entered a\n\t\t\t * valid day for that particular month\n\t\t\t */\n\t\t\t\n\t\t\t//if the day entered for February is greater then 29 in a leap year it is invalid\n\t\t\tif ( leap == true && iMonth == 2)\n\t\t\t{\n\t\t\t\tif ( iDay < 0 || iDay > 29 )\n\t\t\t\t{\t\n\t\t\t\t\tthrow new InvalidDateException(\"day\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//if the day entered for February is greater then 28 in a non leap year it is invalid\n\t\t\tif ( leap == false && iMonth == 2)\n\t\t\t{\n\t\t\t\tif ( iDay < 0 || iDay > 28)\n\t\t\t\t{\t\n\t\t\t\t\tthrow new InvalidDateException(\"day\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//in the months of Apr, Jun, Sep, or Nov a day greater then 30 is invalid\n\t\t\tif( iMonth == 4 ||\n\t\t\t\tiMonth == 6 ||\n\t\t\t\tiMonth == 9 ||\n\t\t\t\tiMonth == 11 )\n\t\t\t{\n\t\t\t\tif( iDay < 0 || iDay > 30)\n\t\t\t\t{\t\n\t\t\t\t\tthrow new InvalidDateException(\"day\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//in the remaining months a day greater than 31 is invalid\n\t\t\tif (iDay < 0 || iDay > 31)\n\t\t\t{\t\n\t\t\t\tthrow new InvalidDateException(\"day\");\n\t\t\t}\n\t}",
"public void setMonth(final int month) {\n\t\tthis.month = month;\n\t}",
"public static void main(String[] args) {\n\t\t\r\n\t\tjava.util.Scanner input = new java.util.Scanner (System.in);\r\n\t\tint year = 0;\r\n\t\tboolean works1 = true;\r\n\t\t\r\n\t\t//petlja koja kontrolise unos godine (mora biti veca od nule)\r\n\t\twhile(works1){\t\t\t\t\t\t\t\t\t\t\r\n\t\t\ttry{\r\n\t\t\t\tSystem.out.print(\"Unesite godinu: \");\r\n\t\t\t\tyear = input.nextInt();\r\n\t\t\t\t\r\n\t\t\t\tif (year <= 0){\r\n\t\t\t\t\tSystem.out.println(\"Unesite cijeli broj veci od nule!\");\r\n\t\t\t\t\tworks1 = true;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tworks1 = false;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}catch (InputMismatchException ex){\r\n\t\t\t\tSystem.out.println(\"Unesite cijeli broj veci od nule!\");\r\n\t\t\t\tinput.nextLine();\r\n\t\t\t}\r\n\t\t}\r\n\t\tboolean works2 = true;\r\n\t\tString month = \"\";\r\n\t\t\r\n\t\t//petlja koja kontrolise unos prva tri slova mjeseca, ukoliko se prva tri slova slazu sa nekim od naziva mjeseci\r\n\t\t//stampa se broj dana za taj mjesec, a ukoliko se prva tri slova ne zlazu ni sa jednim nazivom trazi se ponovni unos\r\n\t\twhile (works2){\r\n\t\t\tSystem.out.print(\"Unesite prva tri slova naziva mjeseca (npr., dec): \");\r\n\t\t\tmonth = input.next();\r\n\t\t\tmonth = month.toLowerCase();\r\n\t\t\t\r\n\t\t\tif (month.equals(\"jan\")){\r\n\t\t\t\tSystem.out.println(\"Jan \" + year + \". ima 31 dan.\");\r\n\t\t\t\tworks2 = false;\r\n\t\t\t}\r\n\t\t\telse if(month.equals(\"feb\")){\r\n\t\t\t\tif (isLeapYear(year)){\t\t\t\t\t\t\t\t\t\t\t//poziv metode za provjeru je li godina prestupna\r\n\t\t\t\t\tSystem.out.println(\"Feb \" + year + \". ima 29 dana.\");\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tSystem.out.println(\"Feb \" + year + \". ima 28 dana.\");\r\n\t\t\t\t}\r\n\t\t\t\tworks2 = false;\r\n\t\t\t}\r\n\t\t\telse if (month.equals(\"mar\")){\r\n\t\t\t\tSystem.out.println(\"Mar \" + year + \". ima 31 dan.\");\r\n\t\t\t\tworks2 = false;\r\n\t\t\t}\r\n\t\t\telse if (month.equals(\"apr\")){\r\n\t\t\t\tSystem.out.println(\"Apr \" + year + \". ima 30 dana.\");\r\n\t\t\t\tworks2 = false;\r\n\t\t\t}\r\n\t\t\telse if (month.equals(\"maj\")){\r\n\t\t\t\tSystem.out.println(\"Maj \" + year + \". ima 31 dan.\");\r\n\t\t\t\tworks2 = false;\r\n\t\t\t}\r\n\t\t\telse if (month.equals(\"jun\")){\r\n\t\t\t\tSystem.out.println(\"Jun \" + year + \". ima 30 dana.\");\r\n\t\t\t\tworks2 = false;\r\n\t\t\t}\r\n\t\t\telse if (month.equals(\"jul\")){\r\n\t\t\t\tSystem.out.println(\"Jul \" + year + \". ima 31 dan.\");\r\n\t\t\t\tworks2 = false;\r\n\t\t\t}\r\n\t\t\telse if (month.equals(\"avg\")){\r\n\t\t\t\tSystem.out.println(\"Avg \" + year + \". ima 31 dan.\");\r\n\t\t\t\tworks2 = false;\r\n\t\t\t}\r\n\t\t\telse if (month.equals(\"sep\")){\r\n\t\t\t\tSystem.out.println(\"Sep \" + year + \". ima 30 dana.\");\r\n\t\t\t\tworks2 = false;\r\n\t\t\t}\r\n\t\t\telse if (month.equals(\"oct\")){\r\n\t\t\t\tSystem.out.println(\"Oct \" + year + \". ima 31 dan.\");\r\n\t\t\t\tworks2 = false;\r\n\t\t\t}\r\n\t\t\telse if (month.equals(\"nov\")){\r\n\t\t\t\tSystem.out.println(\"Nov \" + year + \". ima 30 dana.\");\r\n\t\t\t\tworks2 = false;\r\n\t\t\t}\r\n\t\t\telse if (month.equals(\"dec\")){\r\n\t\t\t\tSystem.out.println(\"Dec \" + year + \". ima 31 dan.\");\r\n\t\t\t\tworks2 = false;\r\n\t\t\t}else{\r\n\t\t\t\tworks2 = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tinput.close();\r\n\t\t\r\n\t}",
"public void setMon603r14(double mon603r14) {\r\n\t\tthis.mon603r14 = mon603r14;\r\n\t}",
"public void setMon60612(double mon60612) {\r\n\t\tthis.mon60612 = mon60612;\r\n\t}",
"public void setMonth(byte value) {\n this.month = value;\n }",
"public void setMon60510(double mon60510) {\r\n\t\tthis.mon60510 = mon60510;\r\n\t}",
"@Test\n public void testDateRangeValidDate() throws Exception {\n Map<String, String> fields = new HashMap<String, String>();\n fields.put(\"generatedTimestamp\", \"12/31/1981\");\n \n this.addSingleDayDateRange.invoke(this.lockService, fields);\n \n Assert.assertEquals(\"does not contain valid date range \" + fields.get(\"generatedTimestamp\"),\n \"12/31/1981..01/01/1982\", fields.get(\"generatedTimestamp\"));\n }"
]
| [
"0.64196306",
"0.6199616",
"0.6022979",
"0.59946275",
"0.5958731",
"0.585725",
"0.57919246",
"0.5781477",
"0.56939524",
"0.5547999",
"0.55265975",
"0.55076396",
"0.54855347",
"0.5464311",
"0.54537594",
"0.5446185",
"0.5441791",
"0.5423142",
"0.54178375",
"0.5409067",
"0.5409067",
"0.54076314",
"0.54065776",
"0.53991956",
"0.53955436",
"0.53795826",
"0.5378998",
"0.5370805",
"0.5356979",
"0.53429186",
"0.5313706",
"0.5262097",
"0.5261992",
"0.5234907",
"0.52278906",
"0.51905435",
"0.51899004",
"0.5186836",
"0.5183623",
"0.5165823",
"0.51609117",
"0.51405466",
"0.5138102",
"0.51359546",
"0.51172143",
"0.51167834",
"0.5113091",
"0.5113091",
"0.5113091",
"0.51071066",
"0.51052725",
"0.5091525",
"0.5091311",
"0.5087391",
"0.50868",
"0.5078155",
"0.5077417",
"0.50701714",
"0.50699925",
"0.50631064",
"0.5056013",
"0.5053594",
"0.50495535",
"0.5041232",
"0.50410086",
"0.50362563",
"0.5034252",
"0.50251555",
"0.5022892",
"0.50214326",
"0.5011067",
"0.5010058",
"0.5006138",
"0.50037354",
"0.49841306",
"0.49783114",
"0.4965138",
"0.496443",
"0.49621123",
"0.49548006",
"0.4949443",
"0.494873",
"0.49418214",
"0.49384597",
"0.49375302",
"0.49330705",
"0.49314868",
"0.492837",
"0.49265113",
"0.4926422",
"0.4917595",
"0.49123606",
"0.4910007",
"0.49092698",
"0.49080756",
"0.4907421",
"0.49033472",
"0.48991236",
"0.48912004",
"0.48877978"
]
| 0.5710795 | 8 |
create a new socket interface from the host and post | public EnvironmentSocket createNewSocket(String host, int port) throws IOException {
Socket socket = new Socket(host, port);
return wrapperSocket(socket);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int createSocket()\n\t{\n\t\t\n\t}",
"private Socket newSocket() throws IOException {\n try {\n InetAddress hostAddress = InetAddress.getByName(publicAddress);\n return new Socket(hostAddress, AgentRemoteService.PORT);\n } catch (IOException e) {\n throw new IOException(\"Couldn't connect to publicAddress: \" + publicAddress + \":\" + AgentRemoteService.PORT, e);\n }\n }",
"@Override\r\n\tpublic Socket createSocket(InetAddress host, int port) throws IOException {\n\t\treturn null;\r\n\t}",
"private void initSocket(String host, String port) throws IOException {\n\t\t// check the validity of the host name\n\t\tif (host == null || host.isEmpty()) throw new IllegalArgumentException(\"host == null || host.isEmpty()\");\n\t\t// check the validity of the port number\n\t\tint p = 0;\n\t\ttry {\n\t\t\tp = Integer.parseInt(port);\n\t\t} catch (NumberFormatException e) {\n\t\t\tthrow new IllegalArgumentException(\"Illegal port argument\");\n\t\t}\n\t\tif (p <= 0) {\n\t\t\tthrow new IllegalArgumentException(\"Illegal port argument\");\n\t\t}\n\t\t// establish the network connection\n\t\ttry {\n\t\t\tthis.socket = new Socket(host, p);\n\t\t} catch (IOException e) {\n\t\t\tgetErrorManager().error(\"Failed to establish the network connection\", e,\n\t\t\t\tErrorManager.OPEN_FAILURE);\n\t\t\tthrow e;\n\t\t}\n\t\tsuper.internalSetOutputStream(new BufferedOutputStream(this.socket.getOutputStream()));\n\t}",
"public void createUpdatSocket(String ip, int port) throws IOException\n {\n socket = new Socket(ip,port);\n outAgent =\n new PrintWriter(socket.getOutputStream(), true);\n inAgent =\n new BufferedReader(\n new InputStreamReader(socket.getInputStream()));\n }",
"private void openSocket(String host, int port) throws IOException {\n \t\t// Debug - attempting connection\n \n \t\tclientSocket = new Socket(InetAddress.getByName(host), port);\n \n \t\toutput = new BufferedWriter(new OutputStreamWriter(\n \t\t\t\tclientSocket.getOutputStream()));\n \t\toutput.flush();\n \n \t\tfileOutput = new BufferedOutputStream(clientSocket.getOutputStream());\n \n \t\tinput = new BufferedReader(new InputStreamReader(\n \t\t\t\tclientSocket.getInputStream()));\n \n \t\t// Debug - done\n \t}",
"@Override\r\n\tpublic Socket createSocket(String host, int port, InetAddress localHost,\r\n\t\t\tint localPort) throws IOException, UnknownHostException {\n\t\treturn null;\r\n\t}",
"public void createSocket() \n { \n try \n { \n socket = new DatagramSocket(); \n } \n catch (Exception ex) \n { \n System.out.println(\"UDPPinger Exception: \" + ex); \n } \n }",
"@Override\n public Socket createSocket(final String host, final int port, \n final InetAddress localHost, final int localPort)\n throws IOException, UnknownHostException {\n return createSocket(host, port);\n }",
"@Override\n public Socket createSocket(final InetAddress host, final int port, \n final InetAddress localHost, final int localPort) \n throws IOException {\n return createSocket(host, port);\n }",
"private void start_Connexion()throws UnknownHostException, IOException{\n \tsocket = new Socket(IP,num_Socket);\n \tout = new ObjectOutputStream(socket.getOutputStream());\n \tin = new ObjectInputStream(socket.getInputStream());\n \t\n }",
"public void creatSocket() {\n\n try {\n\n server = new ServerSocket(PORT);\n\n mExecutorService = Executors.newCachedThreadPool();\n\n while (true) {\n\n Socket client = server.accept();\n\n mExecutorService.execute(new SockectService(client));\n\n Log.d(TAG, \"Creating Socket\" );\n\n }\n\n } catch (Exception e) {\n\n e.printStackTrace();\n\n }\n\n }",
"Socket createSocket(String host, int port, int timeoutMillis)\n throws IOException\n {\n InetAddress addresses[];\n InetAddress addr;\n InetSocketAddress sockAddr;\n Socket s = null;\n addresses = InetAddress.getAllByName(host);\n InetAddress[] picks = new InetAddress[2];\n int numPicks = 0;\n\n for (int i=0; i<addresses.length; i++)\n {\n addr = addresses[i];\n if ((addr instanceof Inet6Address))\n {\n picks[numPicks++] = addr;\n break;\n }\n }\n for (int i=0; i<addresses.length; i++)\n {\n addr = addresses[i];\n if ((addr instanceof Inet4Address))\n {\n picks[numPicks++] = addr;\n break;\n }\n }\n\n for (int i=0; i<numPicks; i++) {\n addr = picks[i];\n\n s = new Socket();\n\n // before connect() for TCP Window Scaling to be turned on\n setBuffers(s);\n\n\n sockAddr = new InetSocketAddress(addr, port);\n try {\n s.connect(sockAddr,timeoutMillis);\n break;\n } catch (IOException e) {\n s.close();\n s = null;\n if (i == numPicks - 1)\n throw e;\n }\n }\n\n if (s == null)\n throw new IOException(\"No supported IP address found\");\n\n return s;\n }",
"private void establishConnection() throws UnknownHostException, \n \t\t\t\t\t\t\t\t\t\t IOException {\n \t socket = new Socket(serverIP, serverPort);\n }",
"public Socket createSocket( Socket socket, String host, int port, boolean autoClose) throws IOException, UnknownHostException {\n\t return getSSLContext().getSocketFactory().createSocket( socket, host, port, autoClose );\n }",
"public Socket createSocket()\n/* */ {\n/* 82 */ return new Socket();\n/* */ }",
"public ServerSocket createSocket (int port, int backlog,\n InetAddress ifAddress)\n throws IOException, KeyStoreException, NoSuchAlgorithmException,\n CertificateException, UnrecoverableKeyException,\n KeyManagementException;",
"public void newHost(Host aHost);",
"protected abstract ConnectionBase createNewConnection(Socket socket);",
"public void ChatNetworking(String _host, boolean pickTCP, boolean pickUDP){\r\n \r\n host = _host; \r\n //I'm not sure if I understand Chat Networking method's requirement on our document because it isn't that clear as I thought\r\n try{\r\n \r\n cs = new Socket(\"hostname\", 16789); \r\n input = new BufferedReader(new InputStreamReader(cs.getInputStream())); \r\n output = new PrintWriter(new OutputStreamWriter(cs.getOutputStream())); \r\n //I'm not sure how to use TCP DataOutputSTream to create a socket. That means DataOutputStream replace PrintWriter?\r\n DataOutputStream out = new DataOutputStream(cs.getOutputStream()); \r\n \r\n System.out.println(\"getLocalHost: \"+InetAddress.getLocalHost() );\r\n \r\n \r\n }\r\n catch (UnknownHostException uhe){\r\n jtaMsgReceived.setText(\"Unable to connect the host\"); \r\n return;\r\n }\r\n catch (IOException ioe){\r\n jtaMsgReceived.setText(\"Communication lost\"); \r\n return; \r\n }\r\n \r\n }",
"public abstract void createConnection(Socket socket, String userName);",
"private void gestionSocket(){\n Socket sock = null;\n try{\n sock = new Socket(adresse, 18000);\n }\n catch(IOException ioe){\n System.out.println(\"Erreur lors de la connexion : \" + ioe.getMessage());\n }\n \n envoieInt(sock, 3);\n }",
"public NetworkClient(Socket socket) throws IOException {\n\t\tthis.socket = socket;\n\t\tthis.host = socket.getInetAddress().getHostAddress();\n\t\tthis.port = socket.getPort();\n\t\tin = new BufferedReader(new InputStreamReader(socket.getInputStream()));\n\t\tout = new PrintWriter(new OutputStreamWriter(socket.getOutputStream()));\n\t}",
"public Socket createSocket( String host, int port, InetAddress clientHost, int clientPort) throws IOException, UnknownHostException {\n return getSSLContext().getSocketFactory().createSocket( host, port, clientHost, clientPort );\n }",
"public Socket createSocket(InetAddress host, int port) throws IOException {\n return new Socket(host, port);\n }",
"Port createPort();",
"Port createPort();",
"private void openSocket(int port, String request) throws Exception {\n Socket socket = new Socket(InetAddress.getByName(\"localhost\"), port);\n ObjectOutputStream oos = new ObjectOutputStream(socket.getOutputStream());\n oos.writeObject(request);\n ObjectInputStream ois = new ObjectInputStream(socket.getInputStream()); \n String response = (String) ois.readObject(); \n System.out.println(\"Response from DataNode: \" + response);\n socket.close();\n }",
"public void setSocket(SocketWrapper socket);",
"public ServerSocket createSocket (int port)\n throws IOException, KeyStoreException, NoSuchAlgorithmException,\n CertificateException, UnrecoverableKeyException,\n KeyManagementException;",
"public SocketHandler createSocketHandler (String host, int port) {\r\n\t\t\t\t\t\t\t\r\n\t\tSocketHandler socketHandler = null;\r\n\r\n\t\ttry {\r\n\t\t\t\t\t\t \t\r\n\t\t\tsocketHandler = new SocketHandler(host, port);\r\n\t\t\t\t\t\t\t\t\r\n\t\t} catch (SecurityException | IOException e) {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\t\t\t\t \r\n\t\treturn socketHandler;\r\n\t}",
"private StubSocket createTestSocket(String inputStreamContents) {\n InputStream inputStream = new ByteArrayInputStream(inputStreamContents.getBytes());\n return new StubSocket(DEFAULT_HOST, inputStream, outputStream);\n }",
"public void newConnection(String hostname, int port) throws Exception;",
"int openSocket(SocketRpcController socketController) {\r\n if (socket != null && in != null && out != null) {\r\n return 0;\r\n }\r\n // Open socket\r\n try {\r\n socket = socketFactory.createSocket(host, port);\r\n out = socket.getOutputStream(); //new BufferedOutputStream(socket.getOutputStream());\r\n in = socket.getInputStream(); //new BufferedInputStream(socket.getInputStream());\r\n } catch (UnknownHostException e) {\r\n handleError(socketController, ErrorReason.UnknownHost,\r\n \"Could not find host: \" + host, e);\r\n return -1;\r\n } catch (IOException e) {\r\n handleError(socketController, ErrorReason.IOError, String.format(\r\n \"Could not open I/O for %s:%s\", host, port), e);\r\n close();\r\n return -1;\r\n }\r\n return 1;\r\n }",
"Client(Terminal terminal, String dstHost, int dstPort, int srcPort) {\n\t\ttry {\n\t\t\tthis.terminal= terminal;\n\t\t\tdstAddress= new InetSocketAddress(dstHost, dstPort);\n\t\t\tsocket= new DatagramSocket(srcPort);\n\t\t\tlistener.go();\n\t\t}\n\t\tcatch(java.lang.Exception e) {e.printStackTrace();}\n\t}",
"EndPoint createEndPoint();",
"public SocketClient(String hostName, Integer port) {\n\t\tthis.hostName = hostName;\n\t\tthis.port = port;\t\t\n\t\t\n\t\tsocket = new Socket();\n\t\t\n\t\tresponseHandlers = new HashMap<ResponseType, ResponseHandler>();\n\t\taddResponseHandlers();\n\t\t\n\t\tsetPwdByOS();\t\n\t}",
"public Socket createSocket(String host, int port) throws IOException, UnknownHostException {\n return getSSLContext().getSocketFactory().createSocket( host, port );\n }",
"public interface CallServerSocketFactory {\n /**\n * @param pServerAddress Server identifier (DNS, IP, URL, etc.), can null\n */\n ServerSocket createSocket(\n String pServerAddress, \n int pPort)\n throws \n IOException;\n}",
"public Socket createSocket() {\n try {\n // Create socket\n server = new Socket(\"127.0.0.1\", 8520);\n } catch (IOException ioe) {\n System.out.println(\"IOException: \" + ioe.getMessage());\n }\n return server;\n }",
"private void openConnection(String host){\n try {\n this.socket = new Socket(host, PORT);\n this.fromServer = new DataInputStream(socket.getInputStream());\n this.toServer = new DataOutputStream(socket.getOutputStream());\n\n } catch (SecurityException e){\n report(\"Connect is not allowed\");\n } catch (UnknownHostException e) {\n report(\"the ip address is not found.\");\n } catch (IOException e){\n report(\"Can not connect to the server\\\"\"+host+\"\\\"\");\n }\n }",
"public TCPReceiver(NetWorkInterface ni){\n\t\tthis.ni = ni;\n\t\ttry {\n\t\t\tmySocket = new ServerSocket(NetWorkInterface.portReceiver);\n\t\t} catch (UnknownHostException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void socketConnect(String ip, int port) throws UnknownHostException, \n IOException{\n System.out.println(\"[Connecting to socket...]\"); \n SSocket.socket= new Socket(ip, port); \n \n System.out.println(\"CORRIENDO EN EL PUERTO:\"+SSocket.socket.getLocalAddress()+\":\"+SSocket.socket.getPort());\n }",
"public static InetSocketAddress createSocketAddr(String s) throws IOException {\n String target = s;\n int colonIndex = target.indexOf(':');\n if (colonIndex < 0) {\n throw new RuntimeException(\"Not a host:port pair: \" + s);\n }\n String host = target.substring(0, colonIndex);\n int port = Integer.parseInt(target.substring(colonIndex + 1));\n\n return new InetSocketAddress(host, port);\n }",
"public ServidorSocket() throws IOException {\n\t\tservidor = new ServerSocket(PUERTO);\n\t\tcliente = new Socket();\n\t}",
"private void connect(){\n // Averiguem quina direccio IP hem d'utilitzar\n InetAddress iAddress;\n try {\n iAddress = InetAddress.getLocalHost();\n String IP = iAddress.getHostAddress();\n\n //Socket sServidor = new Socket(\"172.20.31.90\", 33333);\n sServidor = new Socket (String.valueOf(IP), 33333);\n doStream = new DataOutputStream(sServidor.getOutputStream());\n diStream = new DataInputStream(sServidor.getInputStream());\n } catch (ConnectException c){\n System.err.println(\"Error! El servidor no esta disponible!\");\n System.exit(0);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"private native int open0(String host,\n int msid, int port) throws IOException;",
"public interface CommunicationDevice {\n String getAddress();\n\n CommunicationSocket createCommunicationSocket(UUID uuid) throws IOException;\n}",
"public Socket createSocket(String host, int port) throws IOException {\n\n SSLSocketFactory factory =\n (SSLSocketFactory)SSLSocketFactory.getDefault();\n SSLSocket socket = (SSLSocket)factory.createSocket(host, port);\n\n return socket;\n }",
"public TCPCanSocket(String host) throws IOException\n \t{\n \t\tthis(new Socket(host, DEFAULT_PORT));\n \t\tSystem.out.println( \"open client socket\" );\n \t}",
"@Override\r\n\tpublic Socket createSocket(InetAddress address, int port,\r\n\t\t\tInetAddress localAddress, int localPort) throws IOException {\n\t\treturn null;\r\n\t}",
"public TCPCanSocket(String host, int port) throws IOException {\n \tthis(new Socket(host,port));\n \tSystem.out.println(\"Opening client socket: \" + host + \" \"+ Integer.toString(port));\n }",
"@Override\n public void start() throws IOException\n {\n try\n {\n InetSocketAddress address = new InetSocketAddress(config.getHost(), config.getPort());\n sock = new Socket();\n sock.setSoTimeout(config.getReadTimeout());\n sock.connect(address, config.getReadTimeout());\n out = new ObjectOutputStream(new BufferedOutputStream(sock.getOutputStream()));\n out.flush();\n in = new ObjectInputStream(new BufferedInputStream(sock.getInputStream()));\n }\n catch (ConnectException ce)\n {\n log.info(\"Unable to connect to TCP socket on interface \" + config.getHost() + \" and port \" + config.getPort());\n throw ce;\n }\n }",
"private Socket createClient()\n\t{\n\t\tSocket client = null;\n\t\ttry {\n\t\t\tclient = this.server.accept();\n\t\t}\n\t\tcatch(IOException e)\n\t\t{\n\t\t\tinsertLogEntry(e.getMessage(), e.getStackTrace().toString());\n\t\t}\n\t\t\n\t\treturn client;\n\t}",
"public void createClient() {\n client = new UdpClient(Util.semIp, Util.semPort, this);\n\n // Le paso true porque quiero que lo haga en un hilo nuevo\n client.connect(true);\n }",
"private void createSocket() throws Exception {\n try {\n socket = new Socket();\n socket.setTcpNoDelay(true);\n } catch (SocketException e) {\n throw new Exception();\n }\n }",
"public Socket createSocket( final String host, final int port, final InetAddress localAddress, final int localPort, final HttpConnectionParams params ) throws IOException, UnknownHostException, ConnectTimeoutException {\n if (params == null) {\n throw new IllegalArgumentException(\"Parameters may not be null\");\n }\n int timeout = params.getConnectionTimeout();\n SocketFactory socketfactory = getSSLContext().getSocketFactory();\n if (timeout == 0) {\n return socketfactory.createSocket(host, port, localAddress, localPort);\n } else {\n \t Socket socket = socketfactory.createSocket();\n \t SocketAddress localaddr = new InetSocketAddress(localAddress, localPort);\n \t SocketAddress remoteaddr = new InetSocketAddress(host, port);\n \t socket.bind(localaddr);\n \t socket.connect(remoteaddr, timeout);\n \t return socket;\n \t }\n }",
"public interface ServerSocketFactory {\n\n\t\tpublic ServerSocket create() throws IOException;\n\n\t}",
"public void createConnection() throws ServerUnavailableException {\n clearConnection();\n while (serverSock == null) {\n try {\n // try to open a Socket to the server\n InetAddress addr = InetAddress.getByName(host);\n System.out.println(\"attempting to connect to \" + addr + \":\" + port + \"...\");\n serverSock = new Socket(addr, port);\n in = new BufferedReader(new InputStreamReader(serverSock.getInputStream()));\n out = new BufferedWriter(new OutputStreamWriter(serverSock.getOutputStream()));\n } catch (IOException e) {\n throw new ServerUnavailableException(\"Unable to connect to the server\");\n }\n }\n }",
"void open(String nameNport) {\n\tString[] token=nameNport.split(\":\");\n\tString host=token[0];\n\tint port=Integer.parseInt(token[1]);\n\tint proceedFlag=1;\n\tIterator<Socket> iterator=Connection.connections.iterator();\n\tif(host.equalsIgnoreCase(\"localhost\") || host.equals(\"127.0.0.1\"))\n\t\thost=simpella.infoSocket.getLocalAddress().getHostAddress();\n\tif((host.equalsIgnoreCase(simpella.infoSocket.getLocalAddress().getHostAddress())||host.equalsIgnoreCase(simpella.infoSocket.getLocalAddress().getCanonicalHostName()))&&(simpella.serverPortNo==port || simpella.downloadPortNo==port)){\n\t\tproceedFlag=0;\n\t\tSystem.out.println(\"Client: Self Connect not allowed\");\n\t\t}\n\twhile(iterator.hasNext() && proceedFlag==1)\n\t{\n\t\tSocket sock=(Socket)iterator.next();\n\t\t\n\t\tif((host.equalsIgnoreCase(sock.getInetAddress().getHostAddress()) || host.equalsIgnoreCase(sock.getInetAddress().getCanonicalHostName())) && port==sock.getPort()){\n\t\t\tproceedFlag=0; \n\t\t\tSystem.out.println(\"Client: Duplicate connection to same IP/port not allowed\");\n\t\t\tbreak;\n\t\t}\n\t\t\n\t}\n\tif(proceedFlag==1)\n\t\t{\n\t\n\t\n\tbyte type=04;\n\tMessage msg=new Message(type);\n\ttry {\n\t\tConnection.outgoingConnPackRecv[noOfConn]=0;\n\t\tConnection.outgoingConnPackSent[noOfConn]=0;\n\t\tConnection.outgoingConnPackSentSize[noOfConn]=0;\n\t\tConnection.outgoingConnPackRecvSize[noOfConn]=0;\n\t\t\n\t\tclientSideSocket[noOfConn]=new Socket(host,port);\n\t\tSystem.out.println(\"Client:TCP Connection established...Begin handshake\");\n\t\toutToServer[noOfConn]=new ObjectOutputStream(clientSideSocket[noOfConn].getOutputStream());\n\t\tinFromServer[noOfConn]=new ObjectInputStream(clientSideSocket[noOfConn].getInputStream());\n\t\tString strToServer=\"SIMPELLA CONNECT/0.6\\r\\n\";\n\t\tbyte[] byteArray= strToServer.getBytes(\"UTF-16LE\");\n\t\tmsg.setPayload(byteArray);\n \t\n\t\tSystem.out.println(\"Client:\"+new String(byteArray));\n\t\t//outToServer.writeUTF(\"SIMPELLA CONNECT/0.6\\r\\n\");\n\t\tConnection.outgoingConnPackSent[noOfConn]++;\n\t\tConnection.outgoingConnPackSentSize[noOfConn]+=byteArray.length+23;\n\t\toutToServer[noOfConn].writeObject((Object)msg);\n\t\tConnection.outgoingConnPackRecv[noOfConn]++;\n\t\t\n\t\tMessage msg1=(Message) inFromServer[noOfConn].readObject();\n\t\tbyte[] fromServer=msg1.getPayload();\n\t\tConnection.outgoingConnPackRecvSize[noOfConn]+=fromServer.length+23;\n\t\tString strFromServer=new String(fromServer);\n\t\tSystem.out.println(\"Server:\"+strFromServer);\n\t\tif(msg1.getMessage_type()==05)\n\t\t\t{\n\t\t\tstrToServer=\"SIMPELLA/0.6 200 thank you for accepting me\\r\\n\";\n\t\t\tbyte[] byteArray1= strToServer.getBytes(\"UTF-16LE\");\n\t\t\tMessage m=new Message((byte)05);\n\t\t\tm.setPayload(byteArray1);\n\t\t\tConnection.outgoingConnPackSent[noOfConn]++;\n\t\t\tConnection.outgoingConnPackSentSize[noOfConn]+=byteArray1.length+23;\n\t\t\toutToServer[noOfConn].writeObject((Object)m);\n\t\t\t\n\t\t\tConnection.connections.add(clientSideSocket[client.noOfConn]);\n\t\t\tConnection.outgoingConnection[client.noOfConn]=clientSideSocket[client.noOfConn];\n\t\t\tConnection.clientOutStream[client.noOfConn]=outToServer[client.noOfConn];\n\t\t\tnew clientSocketListen(clientSideSocket[noOfConn],outToServer[noOfConn],inFromServer[noOfConn]);\n\t\t\tupdate();\n\t\t\tnoOfConn++;\n\t\t\t//System.out.println(\"Client:num of conn=\"+noOfConn);\n\t\t\t}\n\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println(\"<open>:Cannot open connection to \"+host+\" at this time\");\n\t\t\t\tclientSideSocket[noOfConn].close();\n\t\t\t\tinFromServer[noOfConn].close();\n\t\t\t\toutToServer[noOfConn].close();\n//\t\t\t\tSystem.out.println(\"Client:num of conn=\"+noOfConn);\n\t\t\t}\n\t\t\n\t\t\n\t} catch (UnknownHostException e) {\n\t\tSystem.out.println(\"Unknown Host: Destination host unreachable\");\n\t\t//e.printStackTrace();\n\t} catch (Exception e) {\n\t\tSystem.out.println(\"Connection Refused/Destination host unreachable\");\n\t}\n\t\t}\n\t}",
"public static Socket createClientSocket(String hostName, int port) throws IOException, UnknownHostException {\n\t\treturn new Socket(hostName, port);\n\t}",
"public SocketWrapper(final Socket socket) throws IOException {\n this.host = socket.getInetAddress().getHostName();\n this.port = socket.getPort();\n this.socket = socket;\n initStreams();\n opened = true;\n }",
"@Override\r\n\tpublic void start(Socket socket){}",
"public SocketIO(Socket nsocket)\n\t{\n\t\tsocket = nsocket;\n\t\ttry\n\t\t{\n\t\t\tinput = new DataInputStream(socket.getInputStream());\n\t\t\tout = new DataOutputStream(socket.getOutputStream());\n\t\t}\n\t\tcatch(UnknownHostException u)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tcatch(IOException i)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t}",
"public Socket connect() {\r\n\t\ts = null;\r\n\t\ttry {\r\n\t\t\ts = new Socket(hostName, port);\r\n\t\t\tdos = Utils.deflatedDataOut(s.getOutputStream(), 8);\r\n\t\t} catch (UnknownHostException e) {\r\n\t\t\t// TODO Auto-generated catch block\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\t\treturn s;\r\n\t\t// TODO Auto-generated method stub\r\n\r\n\t}",
"protected abstract void createLogin(Socket socket);",
"@Override\n\tprotected void populateRemoteHost() {\n\t\tthrow noSocket();\n\t}",
"public XioClient newInstance( InetSocketAddress address);",
"private void createServerSocket()\r\n {\r\n\t\tDebug.assert(port != 0, \"(Server/105)\");\r\n try {\r\n serverSocket = new ServerSocket(port);\r\n serverSocket.setSoTimeout(TIMEOUT);\r\n\t }\r\n\t catch (IOException e)\r\n\t \t{\r\n log(\"Could not create ServerSocket on port \" + port);\r\n\t \tDebug.printStackTrace(e);\r\n System.exit(-1);\r\n\t }\r\n }",
"private static DatagramChannel newSocket(SelectorProvider provider) {\n/* */ try {\n/* 86 */ return provider.openDatagramChannel();\n/* 87 */ } catch (IOException e) {\n/* 88 */ throw new ChannelException(\"Failed to open a socket.\", e);\n/* */ } \n/* */ }",
"@Override\n public void socket() {\n }",
"public void createHost( String hostname );",
"public void initTransport() {\n JDE.signal(procID, MESSAGE, \"Debugger connected to standard I/O socket.\", QUOTE);\n\n final Process process = m_debugger.getVM().process();\n standardInputProcessor = new StandardInputProcessor(process.getOutputStream());\n standardInputProcessor.start();\n\n standardOutputWriter = new StandardOutputWriter(m_sioSocket);\n standardOutputWriter.println(\"*** Process Standard I/O ***\");\n\n standardOutputProcessor = new StandardOutputProcessor(process.getInputStream());\n standardOutputProcessor.start();\n\n standardErrorProcessor = new StandardErrorProcessor(process.getErrorStream());\n standardErrorProcessor.start();\n\n }",
"public SocketRemoteIdentifier(String str) {\n int index = str.indexOf(\"0:0:0:0:0:0:0:0:\");\n\n if (index >= 0) {\n String host = str.substring(0, 15);\n int port = Integer.parseInt(str.substring(index+16));\n this.addr = new InetSocketAddress(host, port);\n } else {\n index = str.indexOf(\":\");\n if (index <= 0) {\n throw new RemoteRuntimeException(\"Invalid name \" + str);\n }\n String host = str.substring(0, index);\n int port = Integer.parseInt(str.substring(index+1));\n this.addr = new InetSocketAddress(host, port);\n } \n }",
"public cliente(Socket socket) throws IOException {\r\n this.socket = socket;\r\n is = socket.getInputStream();\r\n os = socket.getOutputStream();\r\n\r\n }",
"SocketWriter newSocketWriter(SocketConnection connection);",
"private static void createServerSocket() throws SocketTimeoutException, IOException, SocketTimeoutException {\r\n serverSocket.setSoTimeout(10000);\r\n socket = serverSocket.accept();\r\n System.out.println(\"Server: connection to: \" + socket.getInetAddress());\r\n }",
"private void setUpNetworking() throws Exception {\r\n @SuppressWarnings(\"resource\")\r\n Socket socket = new Socket(host, 4242);\r\n System.out.println(\"Connecting to ... \" + socket);\r\n fromServer = new BufferedReader(new InputStreamReader(socket.getInputStream()));\r\n toServer = new PrintWriter(socket.getOutputStream());\r\n\r\n Thread readerThread = new Thread(new Runnable() {\r\n @Override\r\n public void run() {\r\n String input;\r\n try {\r\n while ((input = fromServer.readLine()) != null) {\r\n System.out.println(\"From server: \" + input);\r\n processRequest(input);\r\n }\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n });\r\n\r\n \r\n \r\n \r\n Thread writerThread = new Thread(new Runnable() {\r\n @Override\r\n public void run() {\r\n while (true) {\r\n //String input = consoleInput.nextLine();\r\n //String[] variables = input.split(\",\");\r\n \r\n \r\n //Message request = new Message(variables[0], variables[1], Integer.valueOf(variables[2]));\r\n \r\n GsonBuilder builder = new GsonBuilder();\r\n Gson gson = builder.create();\r\n //sendToServer(gson.toJson(request));\r\n }\r\n }\r\n });\r\n\r\n readerThread.start();\r\n writerThread.start();\r\n }",
"private void init() throws IOException {\r\n\t\tschermata = new JTabbedPane();\r\n\t\tInetAddress addr = InetAddress.getByName(ip); // ip\r\n\t\tSocket socket = new Socket(addr, port); // Port\r\n\t\tout = new ObjectOutputStream(socket.getOutputStream());\r\n\t\tin = new ObjectInputStream(socket.getInputStream());\r\n\t\t// stream con richieste del client\r\n\t\tiniziale.addWindowListener(new WindowAdapter() {\r\n\t\t\tpublic void windowClosing(WindowEvent ev) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tsocket.close();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t}\r\n\t\t\t\tSystem.exit(0);\r\n\t\t\t}\r\n\t\t});\r\n\t\tiniziale.add(schermata);\r\n\r\n\t}",
"private void connect() {\n\t\ttry {\n\t\t\tsocket = new Socket(Server.ADDRESS, Server.PORT_NUMBER);\n\t\t\tthis.oos = new ObjectOutputStream(socket.getOutputStream());\n\t\t\tthis.ois = new ObjectInputStream(socket.getInputStream());\n\t\t\tServerListener serverlistener = new ServerListener();\n\t\t\tserverlistener.start();\n\t\t\tRequest request = new Request(RequestCode.START_DOCUMENT_STREAM);\n\t\t\trequest.setUsername(user.getUsername());\n\t\t\toos.writeObject(request);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void establishSocketConnection() {\n\t\ttry {\n\t\t\tsocket = new Socket(serverIP, serverPort);\n\t\t\tlogger.info(\"Connection with JSON-RPC server opened at local endpoint \" + socket.getLocalAddress().getHostAddress() + \":\" + socket.getLocalPort());\n\t\t\t// create a writer to send JSON-RPC requests to the JSON-RPC server\n\t\t\twriter = new OutputStreamWriter(socket.getOutputStream(), \"utf-8\");\n\t\t\t// create a JsonReader object to receive JSON-RPC response\n\t\t\tjsonReader = new JsonReader(new InputStreamReader(socket.getInputStream(), \"utf-8\"));\n\t\t} catch (UnknownHostException e) {\n\t\t\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public ServerSocket createServerSocket(int arg0, int arg1, InetAddress arg2) throws IOException {\n return null;\n }",
"Communicator createCommunicator();",
"public int start() throws IOException{\n\t\tClientThread listenerThread = new ClientThread(this);\n\t\tlistenerSock = listenerThread.initSocket();\n\t\tint newPort = listenerSock.getLocalPort();\n\t\tclientPort = newPort;\n\t\tt = new Thread(listenerThread);\n\t\tt.start();\n\t\tsock = new Socket(serverIP, port);\n\t\treturn newPort;\n\t}",
"public static ServerSocket createServerSocket() {\n \t\n try {\n listener = new ServerSocket(PORT,1, InetAddress.getByName(hostname));\n } catch (IOException e) {\n e.printStackTrace();\n }\n return listener;\n }",
"public abstract void handle(Socket socket);",
"SocketNode(NodeInterface node, Socket socketIn) {\n this.connectionIn = true;\n try {\n this.socketInput = new ObjectInputStream(socketIn.getInputStream());\n this.socketOutput = new ObjectOutputStream(socketIn.getOutputStream());\n } catch (IOException e) {\n this.close();\n }\n this.connected = true;\n Executors.newCachedThreadPool().execute(() ->\n node.getSocketManager().createConnection(this, socketIn.getInetAddress().getHostAddress()));\n }",
"private ServerSocket createServerSocket() throws IOException {\n ServerSocket serverSocket = new ServerSocket(Constants.SERVER_PORT);\n System.out.printf(\"Server for chatting started at %d\\n\", Constants.SERVER_PORT);\n return serverSocket;\n }",
"public ControlWorker(Socket socket) {\n \n }",
"public ClientTSap() {\n socketFactory = SocketFactory.getDefault();\n }",
"private void connectToNS(int port, String host)throws Exception{\n boolean gotSList = false;\n socket = new Socket(host, port);\n outStream = new PDUOutputStream(socket.getOutputStream());\n inStream = new PDUInputStream(socket.getInputStream());\n\n PduGetList getList = new PduGetList();\n outStream.writeToServer(getList.getByteArray());\n\n while(!gotSList) {\n if (!inStream.streamIsEmpty()) {\n Pdu inPDU = inStream.readPdu();\n socket.close();\n inPDU.print();\n gotSList = true;\n }\n }\n\n Scanner s = new Scanner(System.in);\n System.out.println(\"ip-address: \");\n host = s.nextLine();\n checkInput(host);\n System.out.println(\"Port: \");\n port = s.nextInt();\n checkInput(String.valueOf(port));\n\n connectToCS(port, host);\n }",
"public Socket createSocket( final InetAddress address,\n final int port,\n final InetAddress localAddress,\n final int localPort )\n throws IOException\n {\n return new Socket( address, port, localAddress, localPort );\n }",
"public TCPRequest(String host, int port) {\n this.host = host;\n this.port = port;\n try {\n this.clientSock = new Socket(this.host, this.port);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public SingleService(Socket socket) throws IOException {\n this.socket = socket;\n output = new PrintWriter(\n new BufferedWriter(\n new OutputStreamWriter(\n socket.getOutputStream())), true);\n input = new BufferedReader(\n new InputStreamReader(\n socket.getInputStream()));\n }",
"private BluetoothSocket createBluetoothSocket(BluetoothDevice device) throws IOException {\n\n return device.createRfcommSocketToServiceRecord(BTMODULEUUID);\n //creates secure outgoing connection with BT device using UUID\n }",
"public ServerSocket createSocket (int port, int backlog)\n throws IOException, KeyStoreException, NoSuchAlgorithmException,\n CertificateException, UnrecoverableKeyException,\n KeyManagementException;",
"public ClientTSap(SocketFactory socketFactory) {\n this.socketFactory = socketFactory;\n }",
"@Override\n public void run(){\n System.out.println(clientID+\" run\");\n open();\n if(isHost){ //HostClient listening\n try{\n controller.sendHostAddress(ip, port);\n socket = hostSocket.accept();\n System.out.println(clientID+\": run: accept\");\n close(); //closes hostSocket\n connected = true;\n open(); //gets streams\n controller.sendConnect(); \n }catch(IOException e){\n System.out.println(clientID+\": run: accept: failed: IOException: \"+e);\n }\n }\n while(connected){ //interprets requests from other client\n try{\n String request = streamIn.readUTF();\n System.out.println(clientID+\": receive: \"+request);\n String response[] = request.split(\"<&>\");\n controller.interpretRequest(response);\n }catch(IOException ioe){\n System.out.println(clientID+\": receive: failed: IOException:\"+ioe);\n connected = false; \n }\n }\n }",
"public void host() throws IOException {\n\t\tserverSocket = new ServerSocket(getPort());\n\t\twhile (true) {\n\t\t\thandleNewConnections();\n\t\t}\n\t}",
"public void start() throws IOException {\n super.start();\n\n try {\n socket = new Socket(getIP(), getPort());\n input = new DataInputStream(socket.getInputStream());\n output = new DataOutputStream(socket.getOutputStream());\n }\n catch(Exception e) {\n System.out.println(\"The port \" + getPort() + \" is currently already in use.\");\n }\n }"
]
| [
"0.68665767",
"0.6730801",
"0.6559602",
"0.6546189",
"0.6437012",
"0.64170885",
"0.63866854",
"0.6375854",
"0.6340099",
"0.6298969",
"0.629531",
"0.62619776",
"0.6252476",
"0.6230177",
"0.6212583",
"0.61872023",
"0.61859095",
"0.61537045",
"0.61513335",
"0.6149596",
"0.6147412",
"0.61463344",
"0.6103033",
"0.60672224",
"0.6044692",
"0.60388076",
"0.60388076",
"0.60116386",
"0.59929466",
"0.5971925",
"0.59711015",
"0.5952936",
"0.593549",
"0.5932661",
"0.59143305",
"0.59057486",
"0.58893406",
"0.58865625",
"0.5875842",
"0.5847857",
"0.5827704",
"0.58249795",
"0.58181363",
"0.5782525",
"0.5779915",
"0.57614666",
"0.57544893",
"0.5752148",
"0.57477134",
"0.5743178",
"0.57298154",
"0.5723899",
"0.5716767",
"0.57067525",
"0.57038933",
"0.56972474",
"0.5697013",
"0.56904626",
"0.568956",
"0.5682973",
"0.56745243",
"0.5648741",
"0.5640156",
"0.56336385",
"0.56270134",
"0.56235594",
"0.56158525",
"0.5613505",
"0.5606538",
"0.56023127",
"0.56005794",
"0.55937517",
"0.5590874",
"0.55885386",
"0.55858713",
"0.55847937",
"0.55727744",
"0.5567724",
"0.5538932",
"0.5538438",
"0.55301046",
"0.55287224",
"0.5518779",
"0.5516371",
"0.5516244",
"0.5510263",
"0.55090517",
"0.55002785",
"0.54947096",
"0.5489728",
"0.54868925",
"0.5486628",
"0.548426",
"0.54825145",
"0.547779",
"0.5474935",
"0.54649085",
"0.5464463",
"0.54599315",
"0.5457581"
]
| 0.66000825 | 2 |
create a server socket wrapped in an interface | public EnvironmentServerSocket createServerSocket(int port) throws IOException {
return new EnvironmentServerSocketImpl(new ServerSocket(port), this);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface ServerSocketFactory {\n\n\t\tpublic ServerSocket create() throws IOException;\n\n\t}",
"public interface CallServerSocketFactory {\n /**\n * @param pServerAddress Server identifier (DNS, IP, URL, etc.), can null\n */\n ServerSocket createSocket(\n String pServerAddress, \n int pPort)\n throws \n IOException;\n}",
"public interface Server {\n void register(String serverName, Class impl) throws Exception;\n\n void start() throws IOException;\n\n\n}",
"private ServerSocket createServerSocket() throws IOException {\n ServerSocket serverSocket = new ServerSocket(Constants.SERVER_PORT);\n System.out.printf(\"Server for chatting started at %d\\n\", Constants.SERVER_PORT);\n return serverSocket;\n }",
"public interface IServer {\n /**\n * \n * @param data\n */\n public void sendData(String data);\n\n /**\n * \n * @return\n * @throws ServerNullDataException\n * @throws ServerEmptyDataException\n * @throws ServerBadDataException\n * @throws ServerBadFormatException\n */\n public String receiveData() throws ServerNullDataException, ServerEmptyDataException, ServerBadDataException, ServerBadFormatException;\n\n /**\n * \n * @param data\n * @return\n * @throws ServerNullDataException\n * @throws ServerEmptyDataException\n * @throws ServerBadDataException\n * @throws ServerBadFormatException\n */\n public boolean verifyData(String data) throws ServerNullDataException, ServerEmptyDataException, ServerBadDataException, ServerBadFormatException;\n\n /**\n * \n * @return\n */\n public String getData();\n\n /**\n * \n * @param s\n */\n public void setData(String s);\n\n /**\n * \n * @return\n */\n public Socket getConnectedSocket();\n \n /**\n * \n * @param s\n */\n public void setConnectedSocket(Socket s);\n\n /**\n * \n * @return\n */\n public Socket getDistantServerSocket();\n \n /**\n * \n * @param s\n */\n public void setDistantServerSocket(Socket s);\n \n /**\n * Permet de connecter la socket issues de l'écoute.\n * @return La socket permettant de communiquer avec le second joueur.\n * @throws ServerSocketAcceptException \n */\n public Socket connectSocket() throws ServerSocketAcceptException;\n \n /**\n * Méthode deconnectant la <code>Socket</code> et fermant son flux. \n * @throws ServerClosedSocketException \n * @throws ServerNullSocketException \n * @pre \n * isRunning() == true\n * s != null\n */\n public void closeSocket(Socket s) throws ServerClosedSocketException, ServerNullSocketException;\n \n /**\n * Méthode permettant de définir un <code>Timeout</code> en milliseconde.\n * @pre \n * s != null\n * 0 < timeout < MAX_TIMEOUT\n */\n public void setTimeout(Socket s, int timeout);\n \n /**\n * Retourne L'IP sous forme d'InetAddress.\n */\n public InetAddress getIP();\n \n /**\n * Retourne le nom du serveur.\n */\n public String getHostName();\n \n /**\n * Retourne le port sur lequel écoute le serveur.\n */\n public int getPort();\n \n /**\n * Permet de changer le port que l'on utilise par défaut sur le serveur.\n * @throws ServerBadPortException \n * @pre\n * 1024 < port < 49152\n * @post\n * getPort() == port\n */\n public void setPort(int port) throws ServerBadPortException;\n}",
"public ServerSocket createSocket (int port, int backlog,\n InetAddress ifAddress)\n throws IOException, KeyStoreException, NoSuchAlgorithmException,\n CertificateException, UnrecoverableKeyException,\n KeyManagementException;",
"public ServerSocket createSocket (int port)\n throws IOException, KeyStoreException, NoSuchAlgorithmException,\n CertificateException, UnrecoverableKeyException,\n KeyManagementException;",
"public static ServerSocket createServerSocket() {\n \t\n try {\n listener = new ServerSocket(PORT,1, InetAddress.getByName(hostname));\n } catch (IOException e) {\n e.printStackTrace();\n }\n return listener;\n }",
"public ServerSocket createServerSocket(int arg0) throws IOException {\n return null;\n }",
"public int createSocket()\n\t{\n\t\t\n\t}",
"public ServerSocket createServerSocket(int arg0, int arg1, InetAddress arg2) throws IOException {\n return null;\n }",
"public ServerSocket createServerSocket(int arg0, int arg1) throws IOException {\n return null;\n }",
"public ServidorSocket() throws IOException {\n\t\tservidor = new ServerSocket(PUERTO);\n\t\tcliente = new Socket();\n\t}",
"public Server() throws IOException{\n\t\tsuper();\n\t\tthis.serversocket = new java.net.ServerSocket(DEFAULTPORT);\n\t\tif (DEBUG){\n\t\t\tSystem.out.println(\"Server socket created:\" + this.serversocket.getLocalPort());\n\t\t\tclient_list.add(String.valueOf(this.serversocket.getLocalPort()));\n\t\t}\n\t}",
"public interface SocketWrap {\n void connect() throws IOException;\n\n void sendMessage(SocketPackage socketPackage);\n\n void close() throws IOException;\n\n void receiveDataAndHandle() throws IOException;\n\n boolean isConnect();\n\n}",
"public interface Server extends Endpoint, Resetable {\n\n /**\n * is bound.\n *\n * @return bound\n */\n boolean isBound();\n\n /**\n * get channels.\n *\n * @return channels\n */\n Collection<Channel> getChannels();\n\n /**\n * get channel.\n *\n * @param remoteAddress\n * @return channel\n */\n Channel getChannel(InetSocketAddress remoteAddress);\n\n}",
"public Socket createSocket() {\n try {\n // Create socket\n server = new Socket(\"127.0.0.1\", 8520);\n } catch (IOException ioe) {\n System.out.println(\"IOException: \" + ioe.getMessage());\n }\n return server;\n }",
"public interface SocketClientInterface {\n boolean openConnection();\n void handleSession();\n void closeSession();\n}",
"public interface ISocketEchoServer extends ISocketServer\r\n{\r\n\r\n}",
"public Socket createSocket()\n/* */ {\n/* 82 */ return new Socket();\n/* */ }",
"public OOXXServer(){\n\t\ttry\n\t\t{\n\t\t\tserver = new ServerSocket(port);\n\t\t\t\n\t\t}\n\t\tcatch(java.io.IOException e)\n\t\t{\n\t\t}\n\t}",
"public Server() throws IOException\n {\n socket = new ServerSocket(port);\n }",
"public TCPReceiver(NetWorkInterface ni){\n\t\tthis.ni = ni;\n\t\ttry {\n\t\t\tmySocket = new ServerSocket(NetWorkInterface.portReceiver);\n\t\t} catch (UnknownHostException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private void initServerSocket()\n\t{\n\t\tboundPort = new InetSocketAddress(port);\n\t\ttry\n\t\t{\n\t\t\tserverSocket = new ServerSocket(port);\n\n\t\t\tif (serverSocket.isBound())\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Server bound to data port \" + serverSocket.getLocalPort() + \" and is ready...\");\n\t\t\t}\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tSystem.out.println(\"Unable to initiate socket.\");\n\t\t}\n\n\t}",
"public interface ServerSocketFactory {\n\n\n // --------------------------------------------------------- Public Methods\n\n\n /**\n * Returns a server socket which uses all network interfaces on\n * the host, and is bound to a the specified port. The socket is\n * configured with the socket options (such as accept timeout)\n * given to this factory.\n *\n * @param port the port to listen to\n *\n * @exception IOException input/output or network error\n * @exception KeyStoreException error instantiating the\n * KeyStore from file (SSL only)\n * @exception NoSuchAlgorithmException KeyStore algorithm unsupported\n * by current provider (SSL only)\n * @exception CertificateException general certificate error (SSL only)\n * @exception UnrecoverableKeyException internal KeyStore problem with\n * the certificate (SSL only)\n * @exception KeyManagementException problem in the key management\n * layer (SSL only)\n */\n public ServerSocket createSocket (int port)\n throws IOException, KeyStoreException, NoSuchAlgorithmException,\n CertificateException, UnrecoverableKeyException,\n KeyManagementException;\n\n\n /**\n * Returns a server socket which uses all network interfaces on\n * the host, is bound to a the specified port, and uses the\n * specified connection backlog. The socket is configured with\n * the socket options (such as accept timeout) given to this factory.\n *\n * @param port the port to listen to\n * @param backlog how many connections are queued\n *\n * @exception IOException input/output or network error\n * @exception KeyStoreException error instantiating the\n * KeyStore from file (SSL only)\n * @exception NoSuchAlgorithmException KeyStore algorithm unsupported\n * by current provider (SSL only)\n * @exception CertificateException general certificate error (SSL only)\n * @exception UnrecoverableKeyException internal KeyStore problem with\n * the certificate (SSL only)\n * @exception KeyManagementException problem in the key management\n * layer (SSL only)\n */\n public ServerSocket createSocket (int port, int backlog)\n throws IOException, KeyStoreException, NoSuchAlgorithmException,\n CertificateException, UnrecoverableKeyException,\n KeyManagementException;\n\n\n /**\n * Returns a server socket which uses only the specified network\n * interface on the local host, is bound to a the specified port,\n * and uses the specified connection backlog. The socket is configured\n * with the socket options (such as accept timeout) given to this factory.\n *\n * @param port the port to listen to\n * @param backlog how many connections are queued\n * @param ifAddress the network interface address to use\n *\n * @exception IOException input/output or network error\n * @exception KeyStoreException error instantiating the\n * KeyStore from file (SSL only)\n * @exception NoSuchAlgorithmException KeyStore algorithm unsupported\n * by current provider (SSL only)\n * @exception CertificateException general certificate error (SSL only)\n * @exception UnrecoverableKeyException internal KeyStore problem with\n * the certificate (SSL only)\n * @exception KeyManagementException problem in the key management\n * layer (SSL only)\n */\n public ServerSocket createSocket (int port, int backlog,\n InetAddress ifAddress)\n throws IOException, KeyStoreException, NoSuchAlgorithmException,\n CertificateException, UnrecoverableKeyException,\n KeyManagementException;\n\n\n}",
"public interface Server {\n\n public void start();\n\n public void stop();\n\n}",
"private void createServerSocket()\r\n {\r\n\t\tDebug.assert(port != 0, \"(Server/105)\");\r\n try {\r\n serverSocket = new ServerSocket(port);\r\n serverSocket.setSoTimeout(TIMEOUT);\r\n\t }\r\n\t catch (IOException e)\r\n\t \t{\r\n log(\"Could not create ServerSocket on port \" + port);\r\n\t \tDebug.printStackTrace(e);\r\n System.exit(-1);\r\n\t }\r\n }",
"ServerThread(Server srv, Socket s, IProtocolHandler h) throws IOException {\n server = srv;\n fromClient = new BufferedReader(new InputStreamReader(s.getInputStream()));\n toClient = new PrintWriter(s.getOutputStream(), true);\n client = s;\n handler = h;\n id = UUID.randomUUID().toString();\n }",
"public void InitSocket(String server, int port) throws IOException {\r\n socket = new Socket(server, port);\r\n outputStream = socket.getOutputStream();\r\n\r\n Thread receivingThread = new Thread() {\r\n @Override\r\n public void run() {\r\n try {\r\n BufferedReader reader = new BufferedReader(\r\n new InputStreamReader(socket.getInputStream()));\r\n String line;\r\n while ((line = reader.readLine()) != null) {\r\n notifyObservers(line);\r\n }\r\n } catch (IOException ex) {\r\n notifyObservers(ex);\r\n }\r\n }\r\n };\r\n receivingThread.start();\r\n }",
"public void creatSocket() {\n\n try {\n\n server = new ServerSocket(PORT);\n\n mExecutorService = Executors.newCachedThreadPool();\n\n while (true) {\n\n Socket client = server.accept();\n\n mExecutorService.execute(new SockectService(client));\n\n Log.d(TAG, \"Creating Socket\" );\n\n }\n\n } catch (Exception e) {\n\n e.printStackTrace();\n\n }\n\n }",
"public void InitSocket(String server, int port) throws IOException {\n socket = new Socket(server, port);\n outputStream = socket.getOutputStream();\n\n Thread receivingThread = new Thread() {\n @Override\n public void run() {\n try {\n \n BufferedReader reader = new BufferedReader(\n new InputStreamReader(socket.getInputStream()));\n String line;\n while ((line = reader.readLine()) != null)\n notifyObservers(line);\n } catch (IOException ex) {\n notifyObservers(ex);\n }\n }\n };\n receivingThread.start();\n }",
"public interface Server {\n\n /**\n * start server\n */\n public void start();\n}",
"public Server(int port) throws IOException{\n\t\tsuper();\n\t\tthis.serversocket= new java.net.ServerSocket(port);\n\t\t\n\t\tif (DEBUG){\n\t\t\tSystem.out.println(\"Server socket created:\" + this.serversocket.getLocalPort());\n\t\t\tclient_list.add(String.valueOf(this.serversocket.getLocalPort()));\n\t\t}\n\t}",
"private ServerSocket setUpServer(){\n ServerSocket serverSocket = null;\n try{\n serverSocket = new ServerSocket(SERVER_PORT);\n\n }\n catch (IOException ioe){\n throw new RuntimeException(ioe.getMessage());\n }\n return serverSocket;\n }",
"public ServerSocket createSocket (int port, int backlog)\n throws IOException, KeyStoreException, NoSuchAlgorithmException,\n CertificateException, UnrecoverableKeyException,\n KeyManagementException;",
"public interface Connection\n{\n public java.net.Socket getSocket();\n}",
"private void initServerSock(int port) throws IOException {\n\tserver = new ServerSocket(port);\n\tserver.setReuseAddress(true);\n }",
"public interface ServerRegisterListener {\r\n \r\n /**\r\n * Register server listener.\r\n *\r\n * @param server the server\r\n */\r\n public void registerServerListener(Server server);\r\n \r\n}",
"public interface Server {\n\n /**\n * Start server.\n */\n void start();\n\n /**\n * Stop server.\n */\n void stop();\n\n /**\n * Is the server running?\n *\n * @return return true, not return false.\n */\n boolean isRunning();\n\n interface Listener {\n\n /**\n * The server is started.\n */\n void onStarted();\n\n /**\n * The server is stopped.\n */\n void onStopped();\n\n /**\n * An error occurred.\n *\n * @param e error.\n */\n void onError(Exception e);\n\n }\n}",
"public void setSocket(SocketWrapper socket);",
"public static RoMServer createServer() throws IOException, Exception {\r\n \t\t// Ip and Port out of config\r\n \t\tIConfig cfg = ConfigurationFactory.getConfig();\r\n \r\n \t\treturn RoMServer.createServer(cfg.getIp(), cfg.getPort());\r\n \t}",
"private Socket newSocket() throws IOException {\n try {\n InetAddress hostAddress = InetAddress.getByName(publicAddress);\n return new Socket(hostAddress, AgentRemoteService.PORT);\n } catch (IOException e) {\n throw new IOException(\"Couldn't connect to publicAddress: \" + publicAddress + \":\" + AgentRemoteService.PORT, e);\n }\n }",
"public Server() throws IOException {\n try {\n this.serverSocket = new ServerSocket(this.port,100, InetAddress.getByName(host));\n } catch (UnknownHostException e) {\n System.out.println(\"Erreur lors de la construction du serveur (Hôte inconnu) - Server Constructor Error\");\n e.printStackTrace();\n } catch(IOException e) {\n e.printStackTrace();\n }\n }",
"public EnvironmentSocket createNewSocket(String host, int port) throws IOException {\n Socket socket = new Socket(host, port);\n return wrapperSocket(socket);\n }",
"@Override\r\n\tpublic Socket createSocket(InetAddress host, int port) throws IOException {\n\t\treturn null;\r\n\t}",
"public interface _Socket {\n boolean isConnected();\n ByteBuffer getData() throws IOException;\n void sendData(ByteBuffer byteBuffer) throws IOException;\n void close() throws IOException;\n\n}",
"private Socket createClient()\n\t{\n\t\tSocket client = null;\n\t\ttry {\n\t\t\tclient = this.server.accept();\n\t\t}\n\t\tcatch(IOException e)\n\t\t{\n\t\t\tinsertLogEntry(e.getMessage(), e.getStackTrace().toString());\n\t\t}\n\t\t\n\t\treturn client;\n\t}",
"private static void createServerSocket() throws SocketTimeoutException, IOException, SocketTimeoutException {\r\n serverSocket.setSoTimeout(10000);\r\n socket = serverSocket.accept();\r\n System.out.println(\"Server: connection to: \" + socket.getInetAddress());\r\n }",
"public Server() {\n\t\t\n\t\ttry {\n\t\t\tss= new ServerSocket(PORT);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace(); // Default\n\t\t}\n\t}",
"private ISocket acceptISocket() throws IOException {\n // Manage client depending the connection\n if (serverSocket instanceof AdHocServerSocketBluetooth) {\n return new AdHocSocketBluetooth((BluetoothSocket) serverSocket.accept());\n } else {\n return new AdHocSocketWifi((Socket) serverSocket.accept());\n }\n }",
"@Override\n public Socket createSocket(final InetAddress host, final int port, \n final InetAddress localHost, final int localPort) \n throws IOException {\n return createSocket(host, port);\n }",
"public static ServerSocket getServerSocket(){\n if (listener == null) {\n listener = createServerSocket();\n }\n return listener;\n }",
"public static ServerSocket createServerSocket(String hostName, int port) throws IOException {\n\t\tServerSocket serverSocket = new ServerSocket();\n\t\tInetSocketAddress endpoint = new InetSocketAddress(hostName, port);\n\t\tserverSocket.bind(endpoint);\n\t\treturn serverSocket;\n\t}",
"public interface DataRelayClient {\n\n /**\n * Send data in a loop over UDP\n */\n public void streamData(String pathToFile) throws IOException;\n\n /**\n * Receive data in a loop via UDP\n */\n public void receiveData() throws IOException;\n\n /**\n * Initialize TCP connection\n */\n public void initializeTCP() throws IOException;\n /**\n * Initialize UDP connection\n */\n public void initializeUDP() throws IOException;\n\n /**\n * Get client ID from the server\n */\n public void setID() throws IOException;\n\n /**\n * Check if client is first to connect\n */\n public boolean isFirstToConnect() throws IOException;\n\n /**\n * Initialize the client\n */\n public void initialize() throws Exception;\n}",
"@Override\r\n\tpublic void start(Socket socket){}",
"public RMIServerSocketFactory getServerSocketFactory() {\n/* 140 */ return ((TCPEndpoint)this.ep).getServerSocketFactory();\n/* */ }",
"public interface SocketTask extends Task\n{\n\t/**\n\t * Method sets to object socketWrapper object to allow task to use this socket.\n\t * @param socket socket wrapper object.\n\t */\n\tpublic void setSocket(SocketWrapper socket);\n}",
"interface Fixable extends TcpSocket, Connector.Fixable {}",
"public ClientHandler(Socket s){\r\n mySocket = s;\r\n }",
"public Socket setupSocket(final String serverIP, final String serverPort) {\n mServerIP = serverIP;\n mServerPort = serverPort;\n mServerUrl = \"http://\" + mServerIP + \":\" + mServerPort;\n try {\n mSocket = IO.socket(mServerUrl);\n return mSocket;\n } catch (URISyntaxException e) {\n throw new RuntimeException(e);\n }\n }",
"abstract public TelnetServerHandler createHandler(TelnetSocket s);",
"public DefaultTCPServer(int port) throws Exception {\r\n\t\tserverSocket = new ServerSocket(port);\t}",
"public interface ServerIF extends RemoteIF{\n void RegisterClient(ClientIF client) throws RemoteException;\n void WelcomeScreen() throws RemoteException;\n ArrayList<ClientIF> getClients() throws RemoteException;\n}",
"@Override\n public Socket createSocket(final String host, final int port, \n final InetAddress localHost, final int localPort)\n throws IOException, UnknownHostException {\n return createSocket(host, port);\n }",
"public ServerThread(Socket socket) {\r\n\t\tsoc = socket;\r\n\t}",
"public ServerListener(ServerSocket socket) {\n\t\tsuper();\n\t\tthis.socket = socket;\n\t}",
"public ServerTask(Socket sk)\r\n {\r\n this.sk=sk;\r\n }",
"public interface CommunicationDevice {\n String getAddress();\n\n CommunicationSocket createCommunicationSocket(UUID uuid) throws IOException;\n}",
"public interface IServer extends Remote {\n /**\n * @param auction\n * @throws RemoteException\n */\n void placeAuction(AuctionBean auction) throws RemoteException;\n\n /**\n * @param client\n * @throws RemoteException\n * @throws InterruptedException\n */\n void register(IClient client) throws RemoteException, InterruptedException;\n\n void disconnect(IClient client) throws RemoteException;\n\n /**\n * @param client\n * @param newBid\n * @throws RemoteException\n */\n void raiseBid(IClient client, int newBid) throws RemoteException;\n\n /**\n * @param client\n * @throws RemoteException\n * @throws InterruptedException\n */\n void timeElapsed(IClient client) throws RemoteException, InterruptedException;\n\n\tvoid registerCredentials(String username, String password) throws RemoteException, InterruptedException;\n\n\tboolean verifyCredentials(String username, String password) throws RemoteException, InterruptedException;\n\t\n}",
"private static void openServerSocket(int port) {\n\t\ttry {\n\t\t\tserverSocket = new ServerSocket(port);\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Server Error\");\n\t\t}\n\t}",
"public interface ServerBasique extends Observable{\n\t\n\tpublic void ouvrirConnection(int port) throws Exception;\n\t\n\tpublic void envoyer(String message) throws Exception;\n\t\n\tpublic String recevoir() throws Exception;\n\t\n}",
"public interface SocketEventListener {\n\npublic void socketReceive( String s );\n}",
"public void start() throws IOException {\n\t\tserverSocket = new ServerSocket(port);\n\t\tserverCallbacks.forEach(c -> c.onServerStarted(this, port));\n\t}",
"public SocketWrapper(final Socket socket) throws IOException {\n this.host = socket.getInetAddress().getHostName();\n this.port = socket.getPort();\n this.socket = socket;\n initStreams();\n opened = true;\n }",
"public interface SocketService {\n public void toggleAll();\n public void strobeAll(int delay, boolean reverse);\n public void allOff();\n public void allOn();\n}",
"ServerConnection(final Socket socket, final String connectionId, final JMXAuthenticator authenticator,\n final JMXAccessController accessController, final MBeanServer mBeanServer) throws IOException {\n this.socket = socket;\n this.connectionId = connectionId;\n this.authenticator = authenticator;\n this.accessController = accessController;\n\n // The socket InputStream and OutputStream are not closed directly. They\n // are closed via method calls on the socket itself.\n input = new MessageInputStream(socket.getInputStream());\n output = new MessageOutputStream(socket.getOutputStream());\n\n this.mBeanServer = mBeanServer;\n }",
"public interface DsViaListenInterface extends DsListenInterface {\n\n /** @return port to be used as the source port of outgoing requests */\n public int getSourcePort();\n\n /** @return the interface to be used as the source port of outgoing requests */\n public InetAddress getSourceAddress();\n}",
"@Override\r\n\tpublic Socket createSocket(String host, int port, InetAddress localHost,\r\n\t\t\tint localPort) throws IOException, UnknownHostException {\n\t\treturn null;\r\n\t}",
"public interface TcpSocket extends Connector {\n\t/** A no-op, stateless, socket instance. */\n\tTcpSocket NULL = new Null() {};\n\n\t@Override\n\tdefault String name() {\n\t\treturn String.format(\"%d->%s\", localPort(), hostPort());\n\t}\n\n\t/**\n\t * Provides the socket remote host and port.\n\t */\n\tHostPort hostPort();\n\n\t/**\n\t * Provides the local port.\n\t */\n\tint localPort();\n\n\t/**\n\t * Set socket option.\n\t */\n\t<T> void option(TcpSocketOption<T> option, T value) throws IOException;\n\n\t/**\n\t * Get socket option.\n\t */\n\t<T> T option(TcpSocketOption<T> option) throws IOException;\n\n\t/**\n\t * Set socket options.\n\t */\n\tdefault void options(TcpSocketOptions options) throws IOException {\n\t\toptions.applyAll(this);\n\t}\n\n\t/**\n\t * Get socket options.\n\t */\n\tdefault TcpSocketOptions options() throws IOException {\n\t\treturn TcpSocketOptions.from(this);\n\t}\n\n\t/**\n\t * An extension of SocketConnector that is aware of state.\n\t */\n\tinterface Fixable extends TcpSocket, Connector.Fixable {}\n\n\t/**\n\t * Determines if the exception indicates a socket is fatally broken.\n\t */\n\tstatic boolean isBroken(Exception e) {\n\t\treturn e instanceof SocketException; // check broken pipe?\n\t}\n\n\t/**\n\t * Connect the socket and wrap as a TcpSocket.\n\t */\n\tstatic Wrapper connect(HostPort hostPort) throws IOException {\n\t\t@SuppressWarnings(\"resource\")\n\t\tSocket socket = new Socket(hostPort.host, hostPort.port);\n\t\ttry {\n\t\t\treturn wrap(socket);\n\t\t} catch (RuntimeException | IOException e) {\n\t\t\tsocket.close();\n\t\t\tthrow e;\n\t\t}\n\t}\n\n\t/**\n\t * Wrapper for a jdk socket. The socket must already be connected.\n\t */\n\tstatic Wrapper wrap(Socket socket) throws IOException {\n\t\treturn new Wrapper(socket);\n\t}\n\n\t/**\n\t * Wrapper for a jdk socket. The socket must already be connected.\n\t */\n\tclass Wrapper implements TcpSocket {\n\t\tprivate final Socket socket;\n\t\tprivate final HostPort hostPort;\n\t\tprivate final int localPort;\n\t\tprivate final InputStream in;\n\t\tprivate final OutputStream out;\n\n\t\tprivate Wrapper(Socket socket) throws IOException {\n\t\t\tif (!socket.isConnected()) throw new IOException(\"Socket is not connected\");\n\t\t\tthis.socket = socket;\n\t\t\thostPort = HostPort.from((InetSocketAddress) socket.getRemoteSocketAddress());\n\t\t\tlocalPort = socket.getLocalPort();\n\t\t\tin = socket.getInputStream();\n\t\t\tout = socket.getOutputStream();\n\t\t}\n\n\t\t@Override\n\t\tpublic HostPort hostPort() {\n\t\t\treturn hostPort;\n\t\t}\n\n\t\t@Override\n\t\tpublic int localPort() {\n\t\t\treturn localPort;\n\t\t}\n\n\t\t@Override\n\t\tpublic <T> void option(TcpSocketOption<T> option, T value) throws IOException {\n\t\t\toption.set(socket, value);\n\t\t}\n\n\t\t@Override\n\t\tpublic <T> T option(TcpSocketOption<T> option) throws IOException {\n\t\t\treturn option.get(socket);\n\t\t}\n\n\t\t@Override\n\t\tpublic InputStream in() {\n\t\t\treturn in;\n\t\t}\n\n\t\t@Override\n\t\tpublic OutputStream out() {\n\t\t\treturn out;\n\t\t}\n\n\t\t@Override\n\t\tpublic void close() throws IOException {\n\t\t\tsocket.close();\n\t\t}\n\t}\n\n\t/**\n\t * A no-op, stateless, socket implementation.\n\t */\n\tinterface Null extends Connector.Null, TcpSocket.Fixable {\n\t\t@Override\n\t\tdefault HostPort hostPort() {\n\t\t\treturn HostPort.NULL;\n\t\t}\n\n\t\t@Override\n\t\tdefault int localPort() {\n\t\t\treturn 0;\n\t\t}\n\n\t\t@Override\n\t\tdefault <T> void option(TcpSocketOption<T> option, T value) throws IOException {}\n\n\t\t@Override\n\t\tdefault <T> T option(TcpSocketOption<T> option) throws IOException {\n\t\t\treturn Objects.requireNonNullElse(option.disableValue, BasicUtil.uncheckedCast(0));\n\t\t}\n\t}\n}",
"public interface SocketControl {\n\n /**\n * 获取服务的IP和端口\n * @return 格式:ip:port,如127.0.0.1:8080\n */\n String getIpPort();\n\n /**\n * 获取服务的ServiceId\n * @return 服务的ServiceId\n */\n String getServiceId();\n\n /**\n * 获取服务的InstanceId\n * @return 服务的InstanceId\n */\n String getInstanceId();\n\n\n /**\n * 获取模块名称,也可以直接调用getIpPort()\n * @return 模块名称\n */\n String getModelName();\n\n\n /**\n * 模块下连接的标示\n * @param channel 管道对象\n * @return uk\n */\n String getUniqueKey(Channel channel);\n\n\n /**\n * 模块下连接的标示\n * @param ctx 管道对象\n * @return uk\n */\n String getUniqueKey(ChannelHandlerContext ctx);\n\n\n /**\n * 绑定key\n * @param ctx 当前连接对象\n * @param key key\n */\n void bindKey(ChannelHandlerContext ctx,String key);\n\n /**\n * 绑定key\n * @param ctx 当前连接对象\n * @param key key\n */\n void bindKey(Channel ctx,String key);\n\n /**\n * 获取key\n * @param ctx 当前链接对象\n * @return key\n */\n String getKey(Channel ctx);\n\n /**\n * 获取key\n * @param ctx 当前链接对象\n * @return key\n */\n String getKey(ChannelHandlerContext ctx);\n\n\n /**\n * 重置心跳时间\n * @param ctx 当前连接对象\n * @param heartTime 心跳时间(秒)\n */\n void resetHeartTime(Channel ctx,int heartTime);\n\n\n\n}",
"SocketWriter newSocketWriter(SocketConnection connection);",
"public Client(Socket socket, int port) throws IOException {\n this.serverSocket = new ServerSocket(port);\n this.socket = socket;\n this.getter = new Getter(\n new DataInputStream(\n new BufferedInputStream(\n socket.getInputStream()\n )\n )\n );\n this.sender = new Sender(\n new DataOutputStream(\n socket.getOutputStream()\n )\n );\n this.isServerAvailable = false;\n this.isQuitCommandAppear = false;\n }",
"public void openServer() {\n try {\n this.serverSocket = new ServerSocket(this.portNumber);\n } catch (IOException ex) {\n System.out.println(ex);\n }\n }",
"protected abstract ConnectionBase createNewConnection(Socket socket);",
"@Override\r\n\tpublic Socket createSocket(InetAddress address, int port,\r\n\t\t\tInetAddress localAddress, int localPort) throws IOException {\n\t\treturn null;\r\n\t}",
"public interface IXioClientFactory\n{\n /**\n * Returns a client that is connected to the specified address, or is going to be connected to the specified address.\n * If the client is not connected, the caller must not connect the client to any other address but the one specified.\n * @param address The address.\n * @return Returns a new XioClient.\n */\n public XioClient newInstance( InetSocketAddress address);\n}",
"public interface NetworkInterface {\n\n\t// starting the network on the given port at the localhost\n\tpublic void startNetwork(int port);\n\n\t// stopping the local network\n\tpublic void stopNetwork();\n\t\n\t\n}",
"public Socket createSocket(InetAddress host, int port) throws IOException {\n return new Socket(host, port);\n }",
"public int start() throws IOException{\n\t\tClientThread listenerThread = new ClientThread(this);\n\t\tlistenerSock = listenerThread.initSocket();\n\t\tint newPort = listenerSock.getLocalPort();\n\t\tclientPort = newPort;\n\t\tt = new Thread(listenerThread);\n\t\tt.start();\n\t\tsock = new Socket(serverIP, port);\n\t\treturn newPort;\n\t}",
"private StubSocket createTestSocket(String inputStreamContents) {\n InputStream inputStream = new ByteArrayInputStream(inputStreamContents.getBytes());\n return new StubSocket(DEFAULT_HOST, inputStream, outputStream);\n }",
"public hwServer(String ident, int monitor_port, int local_port)\n {\n try\n {\n MONITOR_PORT = monitor_port;\n LOCAL_PORT = local_port;\n s = new ServerSocket(LOCAL_PORT);\n IDENT = ident;\n }\n catch (Exception e)\n {\n System.out.println(\"Server [hwServer]: Error in Server: \" + e);\n System.exit(5);\n }\n }",
"private void initServer() throws IOException {\r\n \t\tLogger.logMessage(\"Binding Server to \" + this.serverIpAddress + \":\" + this.serverPort);\r\n \r\n \t\tthis.isAlive = true;\r\n \t\tthis.serverSocket = new ServerSocket(this.serverPort, this.backLog, this.serverIpAddress);\r\n \t\tthis.dataLayer = DataLayerFactory.getDataLayer();\r\n \r\n \t\t// Generate the grouplist\r\n \t\tCollection<String> dbGroupList = this.dataLayer.getGroups();\r\n \r\n \t\tfor (String group : dbGroupList) {\r\n \t\t\tthis.groupList.addGroup(group);\r\n \t\t}\r\n \r\n \t\tLogger.logMessage(\"Server successfuly bound!\");\r\n \t}",
"public interface OServerAware {\n\n void init(OServer server);\n\n void coordinatedRequest(\n OClientConnection connection, int requestType, int clientTxId, OChannelBinary channel)\n throws IOException;\n\n ODistributedServerManager getDistributedManager();\n}",
"private void initBinding() throws IOException {\n serverSocketChannel.bind(new InetSocketAddress(0));\n serverSocketChannel.configureBlocking(false);\n serverSocketChannel.register(selector, SelectionKey.OP_ACCEPT);\n\n sc.configureBlocking(false);\n var key = sc.register(selector, SelectionKey.OP_CONNECT);\n uniqueContext = new ClientContext(key, this);\n key.attach(uniqueContext);\n sc.connect(serverAddress);\n }",
"private void initSocket(String host, String port) throws IOException {\n\t\t// check the validity of the host name\n\t\tif (host == null || host.isEmpty()) throw new IllegalArgumentException(\"host == null || host.isEmpty()\");\n\t\t// check the validity of the port number\n\t\tint p = 0;\n\t\ttry {\n\t\t\tp = Integer.parseInt(port);\n\t\t} catch (NumberFormatException e) {\n\t\t\tthrow new IllegalArgumentException(\"Illegal port argument\");\n\t\t}\n\t\tif (p <= 0) {\n\t\t\tthrow new IllegalArgumentException(\"Illegal port argument\");\n\t\t}\n\t\t// establish the network connection\n\t\ttry {\n\t\t\tthis.socket = new Socket(host, p);\n\t\t} catch (IOException e) {\n\t\t\tgetErrorManager().error(\"Failed to establish the network connection\", e,\n\t\t\t\tErrorManager.OPEN_FAILURE);\n\t\t\tthrow e;\n\t\t}\n\t\tsuper.internalSetOutputStream(new BufferedOutputStream(this.socket.getOutputStream()));\n\t}",
"public Server(){\n\t\ttry {\n\t\t\t// initialize the server socket with the specified port\n\t\t\tsetServerSocket(new ServerSocket(PORT));\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"IO Exception while creating a server\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public NetworkClient(Socket socket) throws IOException {\n\t\tthis.socket = socket;\n\t\tthis.host = socket.getInetAddress().getHostAddress();\n\t\tthis.port = socket.getPort();\n\t\tin = new BufferedReader(new InputStreamReader(socket.getInputStream()));\n\t\tout = new PrintWriter(new OutputStreamWriter(socket.getOutputStream()));\n\t}",
"void connect( String name,\n ServerSocket socket,\n ConnectionHandlerFactory handlerFactory )\n throws Exception;",
"public static int openSocket() throws IOException {\n serverSocket = new ServerSocket(0, 10, InetAddress.getLocalHost());\n return serverSocket.getLocalPort();\n }",
"public TCPServer(Socket s) throws IOException\n\t{\n\t\tthis.rover = s;\n\t\tthis.rover.setTcpNoDelay(false);\n\t\tthis.in = this.rover.getInputStream();\n\t\tthis.out = this.rover.getOutputStream();\n\t}",
"public TCPServerWorker(GENServer server, Socket socket) throws IOException {\n this.server = server;\n this.socket = socket;\n this.player = null;\n state = new WorkerConnectState(this, socket);\n System.out.println(\"New ServerWorker\");\n }"
]
| [
"0.7507693",
"0.73094016",
"0.6932719",
"0.6923155",
"0.6908498",
"0.68925977",
"0.684681",
"0.6843764",
"0.67507845",
"0.67322016",
"0.67125934",
"0.6695317",
"0.66497743",
"0.6642666",
"0.6640446",
"0.658055",
"0.6574661",
"0.6566785",
"0.6559225",
"0.65383536",
"0.6515352",
"0.6492921",
"0.64838606",
"0.64700264",
"0.64598024",
"0.64262235",
"0.64141315",
"0.6404875",
"0.640022",
"0.6393557",
"0.6382562",
"0.63752776",
"0.6365785",
"0.63638026",
"0.6339046",
"0.6331298",
"0.6300163",
"0.6260804",
"0.62536013",
"0.6237798",
"0.62364715",
"0.62349206",
"0.622592",
"0.62258893",
"0.62142396",
"0.62096834",
"0.62029",
"0.6183408",
"0.61771536",
"0.616731",
"0.61573875",
"0.6142439",
"0.61082613",
"0.61076754",
"0.61076254",
"0.6106839",
"0.6099225",
"0.6081541",
"0.60766464",
"0.60451883",
"0.6042822",
"0.60419995",
"0.60403836",
"0.60402703",
"0.6024064",
"0.60229975",
"0.60228705",
"0.6022579",
"0.60194504",
"0.60193706",
"0.60158545",
"0.60057133",
"0.5994289",
"0.5986927",
"0.5976521",
"0.59712774",
"0.5971129",
"0.59637606",
"0.5938553",
"0.59322524",
"0.5929985",
"0.59120387",
"0.5911271",
"0.58908135",
"0.5885857",
"0.5883305",
"0.5875255",
"0.58752453",
"0.58553827",
"0.58538026",
"0.58526635",
"0.5834285",
"0.58316857",
"0.58272964",
"0.58272165",
"0.5827056",
"0.58190465",
"0.58179855",
"0.58176965",
"0.5814907",
"0.5809291"
]
| 0.0 | -1 |
wrapper an existing socket | public EnvironmentSocket wrapperSocket(Socket socket) {
return new EnvironmentSocketImpl(socket);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static Wrapper wrap(Socket socket) throws IOException {\n\t\treturn new Wrapper(socket);\n\t}",
"public SocketWrapper(final Socket socket) throws IOException {\n this.host = socket.getInetAddress().getHostName();\n this.port = socket.getPort();\n this.socket = socket;\n initStreams();\n opened = true;\n }",
"public void setSocket(SocketWrapper socket);",
"public interface TcpSocket extends Connector {\n\t/** A no-op, stateless, socket instance. */\n\tTcpSocket NULL = new Null() {};\n\n\t@Override\n\tdefault String name() {\n\t\treturn String.format(\"%d->%s\", localPort(), hostPort());\n\t}\n\n\t/**\n\t * Provides the socket remote host and port.\n\t */\n\tHostPort hostPort();\n\n\t/**\n\t * Provides the local port.\n\t */\n\tint localPort();\n\n\t/**\n\t * Set socket option.\n\t */\n\t<T> void option(TcpSocketOption<T> option, T value) throws IOException;\n\n\t/**\n\t * Get socket option.\n\t */\n\t<T> T option(TcpSocketOption<T> option) throws IOException;\n\n\t/**\n\t * Set socket options.\n\t */\n\tdefault void options(TcpSocketOptions options) throws IOException {\n\t\toptions.applyAll(this);\n\t}\n\n\t/**\n\t * Get socket options.\n\t */\n\tdefault TcpSocketOptions options() throws IOException {\n\t\treturn TcpSocketOptions.from(this);\n\t}\n\n\t/**\n\t * An extension of SocketConnector that is aware of state.\n\t */\n\tinterface Fixable extends TcpSocket, Connector.Fixable {}\n\n\t/**\n\t * Determines if the exception indicates a socket is fatally broken.\n\t */\n\tstatic boolean isBroken(Exception e) {\n\t\treturn e instanceof SocketException; // check broken pipe?\n\t}\n\n\t/**\n\t * Connect the socket and wrap as a TcpSocket.\n\t */\n\tstatic Wrapper connect(HostPort hostPort) throws IOException {\n\t\t@SuppressWarnings(\"resource\")\n\t\tSocket socket = new Socket(hostPort.host, hostPort.port);\n\t\ttry {\n\t\t\treturn wrap(socket);\n\t\t} catch (RuntimeException | IOException e) {\n\t\t\tsocket.close();\n\t\t\tthrow e;\n\t\t}\n\t}\n\n\t/**\n\t * Wrapper for a jdk socket. The socket must already be connected.\n\t */\n\tstatic Wrapper wrap(Socket socket) throws IOException {\n\t\treturn new Wrapper(socket);\n\t}\n\n\t/**\n\t * Wrapper for a jdk socket. The socket must already be connected.\n\t */\n\tclass Wrapper implements TcpSocket {\n\t\tprivate final Socket socket;\n\t\tprivate final HostPort hostPort;\n\t\tprivate final int localPort;\n\t\tprivate final InputStream in;\n\t\tprivate final OutputStream out;\n\n\t\tprivate Wrapper(Socket socket) throws IOException {\n\t\t\tif (!socket.isConnected()) throw new IOException(\"Socket is not connected\");\n\t\t\tthis.socket = socket;\n\t\t\thostPort = HostPort.from((InetSocketAddress) socket.getRemoteSocketAddress());\n\t\t\tlocalPort = socket.getLocalPort();\n\t\t\tin = socket.getInputStream();\n\t\t\tout = socket.getOutputStream();\n\t\t}\n\n\t\t@Override\n\t\tpublic HostPort hostPort() {\n\t\t\treturn hostPort;\n\t\t}\n\n\t\t@Override\n\t\tpublic int localPort() {\n\t\t\treturn localPort;\n\t\t}\n\n\t\t@Override\n\t\tpublic <T> void option(TcpSocketOption<T> option, T value) throws IOException {\n\t\t\toption.set(socket, value);\n\t\t}\n\n\t\t@Override\n\t\tpublic <T> T option(TcpSocketOption<T> option) throws IOException {\n\t\t\treturn option.get(socket);\n\t\t}\n\n\t\t@Override\n\t\tpublic InputStream in() {\n\t\t\treturn in;\n\t\t}\n\n\t\t@Override\n\t\tpublic OutputStream out() {\n\t\t\treturn out;\n\t\t}\n\n\t\t@Override\n\t\tpublic void close() throws IOException {\n\t\t\tsocket.close();\n\t\t}\n\t}\n\n\t/**\n\t * A no-op, stateless, socket implementation.\n\t */\n\tinterface Null extends Connector.Null, TcpSocket.Fixable {\n\t\t@Override\n\t\tdefault HostPort hostPort() {\n\t\t\treturn HostPort.NULL;\n\t\t}\n\n\t\t@Override\n\t\tdefault int localPort() {\n\t\t\treturn 0;\n\t\t}\n\n\t\t@Override\n\t\tdefault <T> void option(TcpSocketOption<T> option, T value) throws IOException {}\n\n\t\t@Override\n\t\tdefault <T> T option(TcpSocketOption<T> option) throws IOException {\n\t\t\treturn Objects.requireNonNullElse(option.disableValue, BasicUtil.uncheckedCast(0));\n\t\t}\n\t}\n}",
"public interface SocketWrap {\n void connect() throws IOException;\n\n void sendMessage(SocketPackage socketPackage);\n\n void close() throws IOException;\n\n void receiveDataAndHandle() throws IOException;\n\n boolean isConnect();\n\n}",
"public int createSocket()\n\t{\n\t\t\n\t}",
"public abstract void handle(Socket socket);",
"public Socket createSocket()\n/* */ {\n/* 82 */ return new Socket();\n/* */ }",
"public interface ServerSocketFactory {\n\n\t\tpublic ServerSocket create() throws IOException;\n\n\t}",
"private static Socket getSocket() \n{\n return socket; \n }",
"protected abstract ConnectionBase createNewConnection(Socket socket);",
"public EnvironmentSocket createNewSocket(String host, int port) throws IOException {\n Socket socket = new Socket(host, port);\n return wrapperSocket(socket);\n }",
"public interface CallServerSocketFactory {\n /**\n * @param pServerAddress Server identifier (DNS, IP, URL, etc.), can null\n */\n ServerSocket createSocket(\n String pServerAddress, \n int pPort)\n throws \n IOException;\n}",
"public Socket createSocket( Socket socket, String host, int port, boolean autoClose) throws IOException, UnknownHostException {\n\t return getSSLContext().getSocketFactory().createSocket( socket, host, port, autoClose );\n }",
"SocketWriter newSocketWriter(SocketConnection connection);",
"@Override\r\n\tpublic Socket createSocket(InetAddress host, int port) throws IOException {\n\t\treturn null;\r\n\t}",
"Socket getSocket()\n {\n return socket;\n }",
"SocketReader newSocketReader(SocketConnection connection);",
"@Override\r\n\tpublic void start(Socket socket){}",
"public SocketIO(Socket nsocket)\n\t{\n\t\tsocket = nsocket;\n\t\ttry\n\t\t{\n\t\t\tinput = new DataInputStream(socket.getInputStream());\n\t\t\tout = new DataOutputStream(socket.getOutputStream());\n\t\t}\n\t\tcatch(UnknownHostException u)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tcatch(IOException i)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t}",
"SocketAddress socketAddress();",
"interface Fixable extends TcpSocket, Connector.Fixable {}",
"public ServerSocket createSocket (int port)\n throws IOException, KeyStoreException, NoSuchAlgorithmException,\n CertificateException, UnrecoverableKeyException,\n KeyManagementException;",
"public interface ServerSocketFactory {\n\n\n // --------------------------------------------------------- Public Methods\n\n\n /**\n * Returns a server socket which uses all network interfaces on\n * the host, and is bound to a the specified port. The socket is\n * configured with the socket options (such as accept timeout)\n * given to this factory.\n *\n * @param port the port to listen to\n *\n * @exception IOException input/output or network error\n * @exception KeyStoreException error instantiating the\n * KeyStore from file (SSL only)\n * @exception NoSuchAlgorithmException KeyStore algorithm unsupported\n * by current provider (SSL only)\n * @exception CertificateException general certificate error (SSL only)\n * @exception UnrecoverableKeyException internal KeyStore problem with\n * the certificate (SSL only)\n * @exception KeyManagementException problem in the key management\n * layer (SSL only)\n */\n public ServerSocket createSocket (int port)\n throws IOException, KeyStoreException, NoSuchAlgorithmException,\n CertificateException, UnrecoverableKeyException,\n KeyManagementException;\n\n\n /**\n * Returns a server socket which uses all network interfaces on\n * the host, is bound to a the specified port, and uses the\n * specified connection backlog. The socket is configured with\n * the socket options (such as accept timeout) given to this factory.\n *\n * @param port the port to listen to\n * @param backlog how many connections are queued\n *\n * @exception IOException input/output or network error\n * @exception KeyStoreException error instantiating the\n * KeyStore from file (SSL only)\n * @exception NoSuchAlgorithmException KeyStore algorithm unsupported\n * by current provider (SSL only)\n * @exception CertificateException general certificate error (SSL only)\n * @exception UnrecoverableKeyException internal KeyStore problem with\n * the certificate (SSL only)\n * @exception KeyManagementException problem in the key management\n * layer (SSL only)\n */\n public ServerSocket createSocket (int port, int backlog)\n throws IOException, KeyStoreException, NoSuchAlgorithmException,\n CertificateException, UnrecoverableKeyException,\n KeyManagementException;\n\n\n /**\n * Returns a server socket which uses only the specified network\n * interface on the local host, is bound to a the specified port,\n * and uses the specified connection backlog. The socket is configured\n * with the socket options (such as accept timeout) given to this factory.\n *\n * @param port the port to listen to\n * @param backlog how many connections are queued\n * @param ifAddress the network interface address to use\n *\n * @exception IOException input/output or network error\n * @exception KeyStoreException error instantiating the\n * KeyStore from file (SSL only)\n * @exception NoSuchAlgorithmException KeyStore algorithm unsupported\n * by current provider (SSL only)\n * @exception CertificateException general certificate error (SSL only)\n * @exception UnrecoverableKeyException internal KeyStore problem with\n * the certificate (SSL only)\n * @exception KeyManagementException problem in the key management\n * layer (SSL only)\n */\n public ServerSocket createSocket (int port, int backlog,\n InetAddress ifAddress)\n throws IOException, KeyStoreException, NoSuchAlgorithmException,\n CertificateException, UnrecoverableKeyException,\n KeyManagementException;\n\n\n}",
"public interface _Socket {\n boolean isConnected();\n ByteBuffer getData() throws IOException;\n void sendData(ByteBuffer byteBuffer) throws IOException;\n void close() throws IOException;\n\n}",
"public interface Connection\n{\n public java.net.Socket getSocket();\n}",
"private Socket newSocket() throws IOException {\n try {\n InetAddress hostAddress = InetAddress.getByName(publicAddress);\n return new Socket(hostAddress, AgentRemoteService.PORT);\n } catch (IOException e) {\n throw new IOException(\"Couldn't connect to publicAddress: \" + publicAddress + \":\" + AgentRemoteService.PORT, e);\n }\n }",
"public ClientHandler(Socket s){\r\n mySocket = s;\r\n }",
"protected Socket getSocket()\n {\n return m_Socket;\n }",
"public interface SocketControl {\n\n /**\n * 获取服务的IP和端口\n * @return 格式:ip:port,如127.0.0.1:8080\n */\n String getIpPort();\n\n /**\n * 获取服务的ServiceId\n * @return 服务的ServiceId\n */\n String getServiceId();\n\n /**\n * 获取服务的InstanceId\n * @return 服务的InstanceId\n */\n String getInstanceId();\n\n\n /**\n * 获取模块名称,也可以直接调用getIpPort()\n * @return 模块名称\n */\n String getModelName();\n\n\n /**\n * 模块下连接的标示\n * @param channel 管道对象\n * @return uk\n */\n String getUniqueKey(Channel channel);\n\n\n /**\n * 模块下连接的标示\n * @param ctx 管道对象\n * @return uk\n */\n String getUniqueKey(ChannelHandlerContext ctx);\n\n\n /**\n * 绑定key\n * @param ctx 当前连接对象\n * @param key key\n */\n void bindKey(ChannelHandlerContext ctx,String key);\n\n /**\n * 绑定key\n * @param ctx 当前连接对象\n * @param key key\n */\n void bindKey(Channel ctx,String key);\n\n /**\n * 获取key\n * @param ctx 当前链接对象\n * @return key\n */\n String getKey(Channel ctx);\n\n /**\n * 获取key\n * @param ctx 当前链接对象\n * @return key\n */\n String getKey(ChannelHandlerContext ctx);\n\n\n /**\n * 重置心跳时间\n * @param ctx 当前连接对象\n * @param heartTime 心跳时间(秒)\n */\n void resetHeartTime(Channel ctx,int heartTime);\n\n\n\n}",
"proto.MessagesProtos.ClientRequest.Socket getSock();",
"public MockSocket () {\n state = UNBOUND;\n }",
"protected Socket getSocket() {\n\t\treturn input;\n\t}",
"int openSocket(SocketRpcController socketController) {\r\n if (socket != null && in != null && out != null) {\r\n return 0;\r\n }\r\n // Open socket\r\n try {\r\n socket = socketFactory.createSocket(host, port);\r\n out = socket.getOutputStream(); //new BufferedOutputStream(socket.getOutputStream());\r\n in = socket.getInputStream(); //new BufferedInputStream(socket.getInputStream());\r\n } catch (UnknownHostException e) {\r\n handleError(socketController, ErrorReason.UnknownHost,\r\n \"Could not find host: \" + host, e);\r\n return -1;\r\n } catch (IOException e) {\r\n handleError(socketController, ErrorReason.IOError, String.format(\r\n \"Could not open I/O for %s:%s\", host, port), e);\r\n close();\r\n return -1;\r\n }\r\n return 1;\r\n }",
"LocalSocketImpl(FileDescriptor fd)\n {\n this.fd = fd;\n }",
"public HttpGetSocket(SocketHandler h)\r\n {\r\n super(h);\r\n }",
"@Override\r\n\tpublic Socket createSocket(String host, int port, InetAddress localHost,\r\n\t\t\tint localPort) throws IOException, UnknownHostException {\n\t\treturn null;\r\n\t}",
"static Wrapper connect(HostPort hostPort) throws IOException {\n\t\t@SuppressWarnings(\"resource\")\n\t\tSocket socket = new Socket(hostPort.host, hostPort.port);\n\t\ttry {\n\t\t\treturn wrap(socket);\n\t\t} catch (RuntimeException | IOException e) {\n\t\t\tsocket.close();\n\t\t\tthrow e;\n\t\t}\n\t}",
"public SingleService(Socket socket) throws IOException {\n this.socket = socket;\n output = new PrintWriter(\n new BufferedWriter(\n new OutputStreamWriter(\n socket.getOutputStream())), true);\n input = new BufferedReader(\n new InputStreamReader(\n socket.getInputStream()));\n }",
"public interface SocketTask extends Task\n{\n\t/**\n\t * Method sets to object socketWrapper object to allow task to use this socket.\n\t * @param socket socket wrapper object.\n\t */\n\tpublic void setSocket(SocketWrapper socket);\n}",
"protected final Socket getSocket() {\n return socket;\n }",
"public interface DatagramSocketFactory\n{\n /**\n * Creates an unbound DatagramSocket:\n * - i.e <tt>return new DatagramSocket((SocketAddress) null)</tt>.\n *\n * @return An unbound DatagramSocket.\n *\n * @throws SocketException if the socket could not be opened.\n */\n public DatagramSocket createUnboundDatagramSocket()\n throws SocketException;\n}",
"public RMIServerSocketFactory getServerSocketFactory() {\n/* 140 */ return ((TCPEndpoint)this.ep).getServerSocketFactory();\n/* */ }",
"@Override\r\n\tpublic Socket createSocket(InetAddress address, int port,\r\n\t\t\tInetAddress localAddress, int localPort) throws IOException {\n\t\treturn null;\r\n\t}",
"public static SocketHandler getInstance(Socket socket) {\n\t\treturn new SocketHandler(socket);\n\t}",
"@Override\n public Socket createSocket(final InetAddress host, final int port, \n final InetAddress localHost, final int localPort) \n throws IOException {\n return createSocket(host, port);\n }",
"public ServerSocket createSocket (int port, int backlog,\n InetAddress ifAddress)\n throws IOException, KeyStoreException, NoSuchAlgorithmException,\n CertificateException, UnrecoverableKeyException,\n KeyManagementException;",
"public abstract void handleCurrentConnection(Socket socket) throws IOException;",
"public Socket getSocket()\n {\n return socket;\n }",
"protected abstract void processConnection(Socket socket);",
"@Override\n public Socket createSocket(final String host, final int port, \n final InetAddress localHost, final int localPort)\n throws IOException, UnknownHostException {\n return createSocket(host, port);\n }",
"proto.MessagesProtos.ClientRequest.SocketOrBuilder getSockOrBuilder();",
"private Socket controlSocket(final URI uri, \n final IceMediaStreamDesc streamDesc) throws IOException, \n NoAnswerException {\n synchronized (this.outgoingControlSockets) {\n if (!this.outgoingControlSockets.containsKey(uri)) {\n log.info(\"Creating new control socket\");\n final Socket control = establishControlSocket(uri, streamDesc);\n this.outgoingControlSockets.put(uri, control);\n return control;\n } else {\n log.info(\"Using existing control socket\");\n final Socket control = this.outgoingControlSockets.get(uri);\n if (!control.isClosed()) {\n return control;\n }\n \n final Socket newControl = \n establishControlSocket(uri, streamDesc);\n this.outgoingControlSockets.put(uri, newControl);\n return newControl;\n }\n }\n }",
"public Socket getSocket(){\n return null;\n }",
"private ISocket acceptISocket() throws IOException {\n // Manage client depending the connection\n if (serverSocket instanceof AdHocServerSocketBluetooth) {\n return new AdHocSocketBluetooth((BluetoothSocket) serverSocket.accept());\n } else {\n return new AdHocSocketWifi((Socket) serverSocket.accept());\n }\n }",
"protected synchronized Socket getSocket(ImmutableEndpoint endpoint) throws TlcException {\r\n\t\tSocket socket = null;\r\n\t\ttry {\r\n\t\t\tTcpSocketKey socketKey = new TcpSocketKey(endpoint);\r\n\t\t\tif (logger.isDebugEnabled()) {\r\n\t\t\t\tlogger.debug(\"borrowing socket for \" + socketKey + \"/\"\r\n\t\t\t\t\t\t+ socketKey.hashCode());\r\n\t\t\t\tif (null != lastSocketKey) {\r\n\t\t\t\t\tlogger.debug(\"same as \" + lastSocketKey.hashCode() + \"? \"\r\n\t\t\t\t\t\t\t+ lastSocketKey.equals(socketKey));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tsocket = (Socket) socketsPool.borrowObject(socketKey);\r\n\r\n\t\t\tif (logger.isDebugEnabled()) {\r\n\t\t\t\tlogger.debug(\"borrowed socket, \"\r\n\t\t\t\t\t\t+ (socket.isClosed() ? \"closed\" : \"open\") + \"; debt \"\r\n\t\t\t\t\t\t+ socketsPool.getNumActive());\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\tlogger.error(\"Connection Refused\");\r\n\r\n\t\t}\r\n\t\treturn socket;\r\n\t}",
"public HandleAClient(Socket s) {\n\t\t\tmySocket = s;\n\t\t}",
"public ServerThread(Socket socket) {\r\n\t\tsoc = socket;\r\n\t}",
"@Override\n public void socket() {\n }",
"@Override\n public Socket connectSocket(int connectTimeout, Socket socket, HttpHost host, InetSocketAddress remoteAddress, InetSocketAddress localAddress, HttpContext context) throws IOException {\n InetSocketAddress unresolvedRemote = InetSocketAddress\n .createUnresolved(host.getHostName(), remoteAddress.getPort());\n return super.connectSocket(connectTimeout, socket, host, unresolvedRemote, localAddress, context);\n }",
"protected TransformInputStream(T socket)\n {\n super(socket);\n }",
"public Handler(Socket socket) {\n this.socket = socket;\n }",
"public Handler(Socket socket) {\n this.socket = socket;\n }",
"AuthServerConnectionHandler(Socket socket){\n\t\tthis.socket=socket;\n\n\t}",
"public SSLSocket getSocket() throws IOException {\n SSLSocket sslSocket = (SSLSocket) socketFactory.createSocket(pkiServerAddress, pkiServerPort);\n\n sslSocket.setEnabledProtocols(enabledProtocols);\n sslSocket.setEnabledCipherSuites(enabledCipherSuites);\n sslSocket.setSoTimeout(pkiTimeout);\n\n return sslSocket;\n }",
"public NetworkClient(Socket socket) throws IOException {\n\t\tthis.socket = socket;\n\t\tthis.host = socket.getInetAddress().getHostAddress();\n\t\tthis.port = socket.getPort();\n\t\tin = new BufferedReader(new InputStreamReader(socket.getInputStream()));\n\t\tout = new PrintWriter(new OutputStreamWriter(socket.getOutputStream()));\n\t}",
"public void setSocketChannel(SocketChannel socketChannel);",
"void setSocketFactory(SocketFactory socketFactory);",
"@DSSafe(DSCat.SAFE_OTHERS)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 13:02:01.343 -0500\", hash_original_method = \"0B70D3C7F543DCBA51EA559CD021E805\", hash_generated_method = \"A94FA805013A9A40525A32FAE3664F98\")\n \nprotected SSLSocket(InetAddress address, int port, InetAddress clientAddress, int clientPort)\n throws IOException {\n super(address, port, clientAddress, clientPort);\n }",
"public TCPSocketManager(String name, OutputStream os, Socket sock, InetAddress addr, String host, int port, int delay, boolean immediateFail, Layout<? extends Serializable> layout) {\n/* 77 */ super(name, os, addr, host, port, layout);\n/* 78 */ this.reconnectionDelay = delay;\n/* 79 */ this.socket = sock;\n/* 80 */ this.immediateFail = immediateFail;\n/* 81 */ this.retry = (delay > 0);\n/* 82 */ if (sock == null) {\n/* 83 */ this.connector = new Reconnector(this);\n/* 84 */ this.connector.setDaemon(true);\n/* 85 */ this.connector.setPriority(1);\n/* 86 */ this.connector.start();\n/* */ } \n/* */ }",
"protected final void setSocket(Socket socket) {\n this.socket = socket;\n }",
"public HandleAClient(Socket socket) {\n this.socket = socket;\n }",
"public static int openSocket() throws IOException {\n serverSocket = new ServerSocket(0, 10, InetAddress.getLocalHost());\n return serverSocket.getLocalPort();\n }",
"public interface SocketClientInterface {\n boolean openConnection();\n void handleSession();\n void closeSession();\n}",
"public void setSocket(ServerSocket socket) {\n\t\tthis.socket = socket;\n\t}",
"protected static java.net.Socket socketForHostAndPortAndTimeout(java.lang.String host, int port, int timeout){\n return null; //TODO codavaj!!\n }",
"public MonitoringSocket() throws IOException {\r\n\r\n\t\tincrementNumberOfOpenSockets();\r\n\t\tprintMonitoringSocketStatus();\r\n\t}",
"public void testSSLSocketInetAddressint() throws Exception {\n ServerSocket ss = new ServerSocket(0);\n SSLSocket soc = new MySSLSocket(InetAddress.getLocalHost(), ss\n .getLocalPort());\n ss.close();\n soc.close();\n }",
"@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:36:07.245 -0500\", hash_original_method = \"4C7BE72C58D9A70D111AB53708810EA4\", hash_generated_method = \"AF157A7772AD2D9C1E3D30BCBFFC6CCE\")\n \npublic LocalSocket accept() throws IOException\n {\n LocalSocketImpl acceptedImpl = new LocalSocketImpl();\n\n impl.accept (acceptedImpl);\n\n return new LocalSocket(acceptedImpl);\n }",
"public interface IServer {\n /**\n * \n * @param data\n */\n public void sendData(String data);\n\n /**\n * \n * @return\n * @throws ServerNullDataException\n * @throws ServerEmptyDataException\n * @throws ServerBadDataException\n * @throws ServerBadFormatException\n */\n public String receiveData() throws ServerNullDataException, ServerEmptyDataException, ServerBadDataException, ServerBadFormatException;\n\n /**\n * \n * @param data\n * @return\n * @throws ServerNullDataException\n * @throws ServerEmptyDataException\n * @throws ServerBadDataException\n * @throws ServerBadFormatException\n */\n public boolean verifyData(String data) throws ServerNullDataException, ServerEmptyDataException, ServerBadDataException, ServerBadFormatException;\n\n /**\n * \n * @return\n */\n public String getData();\n\n /**\n * \n * @param s\n */\n public void setData(String s);\n\n /**\n * \n * @return\n */\n public Socket getConnectedSocket();\n \n /**\n * \n * @param s\n */\n public void setConnectedSocket(Socket s);\n\n /**\n * \n * @return\n */\n public Socket getDistantServerSocket();\n \n /**\n * \n * @param s\n */\n public void setDistantServerSocket(Socket s);\n \n /**\n * Permet de connecter la socket issues de l'écoute.\n * @return La socket permettant de communiquer avec le second joueur.\n * @throws ServerSocketAcceptException \n */\n public Socket connectSocket() throws ServerSocketAcceptException;\n \n /**\n * Méthode deconnectant la <code>Socket</code> et fermant son flux. \n * @throws ServerClosedSocketException \n * @throws ServerNullSocketException \n * @pre \n * isRunning() == true\n * s != null\n */\n public void closeSocket(Socket s) throws ServerClosedSocketException, ServerNullSocketException;\n \n /**\n * Méthode permettant de définir un <code>Timeout</code> en milliseconde.\n * @pre \n * s != null\n * 0 < timeout < MAX_TIMEOUT\n */\n public void setTimeout(Socket s, int timeout);\n \n /**\n * Retourne L'IP sous forme d'InetAddress.\n */\n public InetAddress getIP();\n \n /**\n * Retourne le nom du serveur.\n */\n public String getHostName();\n \n /**\n * Retourne le port sur lequel écoute le serveur.\n */\n public int getPort();\n \n /**\n * Permet de changer le port que l'on utilise par défaut sur le serveur.\n * @throws ServerBadPortException \n * @pre\n * 1024 < port < 49152\n * @post\n * getPort() == port\n */\n public void setPort(int port) throws ServerBadPortException;\n}",
"public ServidorSocket() throws IOException {\n\t\tservidor = new ServerSocket(PUERTO);\n\t\tcliente = new Socket();\n\t}",
"public SocketWrapper(final String host, final int port) throws ConnectException, IOException {\n this.host = host;\n this.port = port;\n open();\n }",
"public interface SocketOpts { // SocketOptions already used in java.net\n\n // Options that apply to all kinds of sockets\n\n // SO_BROADCAST\n public abstract boolean broadcast() throws IOException;\n public abstract SocketOpts broadcast(boolean b) throws IOException;\n\n // SO_KEEPALIVE\n public abstract boolean keepAlive() throws IOException;\n public abstract SocketOpts keepAlive(boolean b) throws IOException;\n\n // SO_LINGER\n public abstract int linger() throws IOException;\n public abstract SocketOpts linger(int n) throws IOException;\n\n // SO_OOBINLINE\n public abstract boolean outOfBandInline() throws IOException;\n public abstract SocketOpts outOfBandInline(boolean b) throws IOException;\n\n // SO_RCVBUF\n public abstract int receiveBufferSize() throws IOException;\n public abstract SocketOpts receiveBufferSize(int n) throws IOException;\n\n // SO_SNDBUF\n public abstract int sendBufferSize() throws IOException;\n public abstract SocketOpts sendBufferSize(int n) throws IOException;\n\n // SO_REUSEADDR\n public abstract boolean reuseAddress() throws IOException;\n public abstract SocketOpts reuseAddress(boolean b) throws IOException;\n\n\n // IP-specific options\n\n public static interface IP\n extends SocketOpts\n {\n\n // IP_MULTICAST_IF2\n public abstract NetworkInterface multicastInterface()\n throws IOException;\n public abstract IP multicastInterface(NetworkInterface ni)\n throws IOException;\n\n // IP_MULTICAST_LOOP\n public abstract boolean multicastLoop() throws IOException;\n public abstract IP multicastLoop(boolean b) throws IOException;\n\n // IP_TOS\n public static final int TOS_LOWDELAY = 0x10;\n public static final int TOS_THROUGHPUT = 0x08;\n public static final int TOS_RELIABILITY = 0x04;\n public static final int TOS_MINCOST = 0x02;\n public abstract int typeOfService() throws IOException;\n public abstract IP typeOfService(int tos) throws IOException;\n\n\n // TCP-specific options\n\n public static interface TCP\n extends IP\n {\n // TCP_NODELAY\n public abstract boolean noDelay() throws IOException;\n public abstract TCP noDelay(boolean b) throws IOException;\n\n }\n\n }\n\n}",
"public ServerSocket createServerSocket(int arg0, int arg1, InetAddress arg2) throws IOException {\n return null;\n }",
"@DSSafe(DSCat.SAFE_OTHERS)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 13:02:01.338 -0500\", hash_original_method = \"E1BBFC80ACA37B77A62FE55F8E5644EC\", hash_generated_method = \"02F6A23E4908270BBEE10ABB5513A8F3\")\n \nprotected SSLSocket(InetAddress address, int port) throws IOException {\n super(address, port);\n }",
"public MySocket accept(){\n\t\ttry{\r\n\t\t\treturn new MySocket(sSocket.accept());\r\n\t\t}catch(IOException e){\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public RedirectThread(Socket s){\n this.connection = s;\n }",
"public String getSocket() {\n return socket;\n }",
"public Socket createSocket(String host, int port) throws IOException, UnknownHostException {\n return getSSLContext().getSocketFactory().createSocket( host, port );\n }",
"public void acceptedSocket(long socketId) {}",
"private Socket createClient()\n\t{\n\t\tSocket client = null;\n\t\ttry {\n\t\t\tclient = this.server.accept();\n\t\t}\n\t\tcatch(IOException e)\n\t\t{\n\t\t\tinsertLogEntry(e.getMessage(), e.getStackTrace().toString());\n\t\t}\n\t\t\n\t\treturn client;\n\t}",
"public abstract void createConnection(Socket socket, String userName);",
"public Socket getSocket() {\n\t\treturn socket;\n\t}",
"public ControlWorker(Socket socket) {\n \n }",
"public static void rebuildSocket() throws IOException {\n try {\n buildSocket();\n } catch (Exception e) {\n throw new IOException();\n }\n }",
"public ClientHandle(Socket cs) {\r\n \t\r\n this.threadSocket = cs;\r\n\r\n }",
"public ClientThread(Socket socket){\n this.socket = socket;\n }",
"public BluetoothSocket getIncomingSocketFromObject(Object o){\n\t\t\n\t\treturn (BluetoothSocket) o;\n\t}",
"public Servidor(Socket s) {\r\n\t\tconexao = s;\r\n\t}",
"public ServerSocket createServerSocket(int arg0) throws IOException {\n return null;\n }"
]
| [
"0.75198096",
"0.7514264",
"0.73675084",
"0.7040396",
"0.6951401",
"0.6692465",
"0.66862196",
"0.66431344",
"0.6580373",
"0.65780455",
"0.6522032",
"0.6471016",
"0.64605236",
"0.6425533",
"0.6360143",
"0.63442",
"0.63214606",
"0.631041",
"0.62946004",
"0.62811685",
"0.62596947",
"0.6258358",
"0.62526035",
"0.6249126",
"0.6248512",
"0.62434095",
"0.62219334",
"0.6185072",
"0.6176665",
"0.6140003",
"0.61176115",
"0.6110691",
"0.6106077",
"0.61048824",
"0.60953456",
"0.6084963",
"0.60793346",
"0.60540485",
"0.6047677",
"0.6029799",
"0.60271335",
"0.60197735",
"0.6006464",
"0.60018325",
"0.5992483",
"0.59811974",
"0.5975415",
"0.59627354",
"0.59598505",
"0.5952645",
"0.59503067",
"0.5942168",
"0.5926551",
"0.59054124",
"0.586289",
"0.5855891",
"0.5853321",
"0.58484507",
"0.5843402",
"0.5838532",
"0.583522",
"0.5831963",
"0.5831963",
"0.58299303",
"0.5816548",
"0.5815838",
"0.58011794",
"0.5800951",
"0.579608",
"0.57942903",
"0.5782247",
"0.57742035",
"0.5769866",
"0.5769261",
"0.5768249",
"0.57624614",
"0.5760711",
"0.575937",
"0.5749239",
"0.574915",
"0.5744366",
"0.57415485",
"0.5740243",
"0.57388574",
"0.57345796",
"0.5730471",
"0.57224745",
"0.5721996",
"0.57159525",
"0.5706582",
"0.5697028",
"0.5682148",
"0.56759244",
"0.5674028",
"0.56645036",
"0.5659299",
"0.565597",
"0.5655694",
"0.564928",
"0.5647071"
]
| 0.73769087 | 2 |
Instantiate the animation model | @Before
public void setUp() {
testAnimation = new AnimationModelImpl();
// Instantiate the IShapes
r = new Rectangle("R",
50.0, 100.0,
1, 0, 0,
200.0, 200.0);
c = new Ellipse("C",
120.0, 60.0,
0, 0, 1,
500.0, 100.0);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public VisualView(ReadOnlyAnimatorModel aModel) {\n\n super();\n\n // attrs\n\n int leftMostX = (int) aModel.getBoundingBoxLoc().getX();\n int topMostY = (int) aModel.getBoundingBoxLoc().getY();\n int height = aModel.getBoundingBoxHeight();\n int width = aModel.getBoundingBoxWidth();\n\n List<AnimatedShapeImpl> shapesAtTick = aModel.getShapesAtTick(aModel.getModelStartTime());\n\n this.setTitle(\"Animator Visual View - Bou Lahdou and McNeill\");\n this.setSize(width, height);\n this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n this.setLayout(new BorderLayout());\n\n this.animationPanel = new AnimationPanel(shapesAtTick);\n animationPanel.setPreferredSize(new Dimension(width, (7 * height) / 8));\n this.add(animationPanel, BorderLayout.NORTH);\n\n JScrollPane scroller = new JScrollPane(animationPanel);\n scroller.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);\n scroller.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);\n scroller.setBounds(20, 25, 200, 50);\n\n this.add(scroller, BorderLayout.CENTER);\n }",
"private void createAnimation () {\n // KeyFrame frame = new KeyFrame(Duration.millis(MILLISECOND_DELAY), e -> myManager.step());\n // myAnimation = new Timeline();\n // myAnimation.setCycleCount(Timeline.INDEFINITE);\n // myAnimation.getKeyFrames().add(frame);\n }",
"public AnimationSVGView() {\n this.model = new BasicAnimationModel();\n this.out = new StringBuilder();\n this.speed = 1;\n }",
"private void constructAnimationPanel() {\n animationPanel = new EAPanel(model);\n animationPanel.setLayout(new FlowLayout());\n animationPanel.setPreferredSize(new Dimension(model.getWidth(), model.getHeight()));\n mainPanel.add(animationPanel);\n }",
"private void createModel() {\n model = new Node(\"Enemy\"+enemyCounter);\n Box b = new Box(.5f, 2, .5f);\n Geometry bg = new Geometry(\"Box\", b);\n Material bm = new Material(assetManager, \"Common/MatDefs/Misc/Unshaded.j3md\");\n Sphere sphere = new Sphere(32, 32, 1.5f, false, false);\n Geometry sg = new Geometry(\"Sphere\", sphere);\n Material sm = new Material(assetManager, \"Common/MatDefs/Misc/Unshaded.j3md\");\n bm.setColor(\"Color\", ColorRGBA.Blue);\n sm.setColor(\"Color\", ColorRGBA.Red);\n bg.setMaterial(bm); \n sg.setMaterial(sm);\n model.attachChild(bg);\n model.attachChild(sg);\n sg.setLocalTranslation(0,2.5f,0);\n \n attachChild(model);\n }",
"public Animation() {\n\t\tthis(new ArrayList());\n\t}",
"@SuppressWarnings(\"unchecked\")\n public AnimationSystem(){\n super(Family.all(TextureComponent.class).get());\n\n tm = ComponentMapper.getFor(TextureComponent.class);\n// am = ComponentMapper.getFor(AnimationComponent.class);\n// sm = ComponentMapper.getFor(StateComponent.class);\n }",
"@Before\n public void initialize() {\n model1 = new AnimationModel();\n textView1 = new TextView();\n out = new StringBuffer();\n modelWithRectAndOval = new AnimationModel();\n modelWithRectAndOval.addShape(Rectangle.createRectangle(\"R\", new Point.Double(200,\n 200), new Color(1, 0, 0), 1, 100,\n 50.0, 100.0));\n modelWithRectAndOval.addShape(Oval.createOval(\"C\", new Point.Double(500, 100),\n new Color(0, 0, 1), 6, 100, 60.0, 30.0));\n }",
"public void modelNew(Model m)\n {\n\tmodelStop();\n\tmanim = new GenerationsAnimator(m.generations());\n\tmanim.scale(width,height);\n\tclearToBack();\n\tmodelStep();\n\t//modelStart();\n\tStatusBar.setStatus(\"Ready\");\n\n\tif (cListener != null)\n\t cListener.setButtonState(true);\n }",
"public AnimationPanel() {\n initComponents();\n // create a new game board\n game = new GameOfLife(gridSize);\n }",
"public AssInstance(Model model) throws Exception {\n super(model);\n\n // validateModel(model);\n\n leftChickNode = getNode(LEFT_NODE_ID);\n rightChickNode = getNode(RIGHT_NODE_ID);\n\n animController = new AnimationController(this);\n animController.allowSameAnimation = true;\n animController.setAnimation(IDLE_ANIMATION, -1, SPEED, this);\n\n // nodeLeftInitialPosition = leftButtNode.translation.cpy();\n // nodeRightInitialPosition = rightButtNode.translation.cpy();\n }",
"public AnimationFX(Node node) {\n super();\n setNode(node);\n\n }",
"public AnimationView(Context context) {\n\t\tsuper(context);\n\t\tinitialize();\n\t}",
"public AnimationSVGView(AnimationModel model, Appendable out, int speed) {\n this.model = model;\n this.out = out;\n this.speed = speed;\n }",
"@Override\n\tpublic void create() {\n\t\tassetManager = new AssetManager();\n\t\tassetManager.load(ROLIT_BOARD_MODEL, Model.class);\n\t\tassetManager.load(ROLIT_BALL_MODEL, Model.class);\n\t\t\n\t\t//construct the lighting\n\t\tenvironment = new Environment();\n\t\tenvironment.set(new ColorAttribute(ColorAttribute.AmbientLight, 0.4f, 0.4f, 0.4f, 1f));\n\t\tenvironment.add(new DirectionalLight().set(0.8f, 0.8f, 0.8f, -1f, -0.8f, -0.2f));\n\t\t\n\t\tmodelBatch = new ModelBatch();\n\t\t\n\t\tcam = new PerspectiveCamera(67f, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());\n\t\t\n\t\tGdx.input.setInputProcessor(new InputHandler());\n\t}",
"public EAEditorView(ReadOnlyEAOperations model) {\n\n super();\n setTitle(\"The Easy Animator\");\n\n // check for null\n if (model == null) {\n throw new IllegalArgumentException(\"Model can't be null\");\n }\n this.model = model;\n\n // initialize the main panel\n constructMainPanel();\n constructAnimationPanel();\n generateLabelPanel();\n generateButtonPanel();\n constructPopup();\n createOKButtons();\n\n this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n this.pack();\n }",
"public LarvaSkeleton() {\n\n }",
"public AnimationView(Context context, AttributeSet attrs){\n\t\tsuper(context, attrs);\n\t\t\n\t\t\n\t\t// Initialize Breakout Actors\n\t\tball = new Actor(context, 200, 200, Color.BLUE, 25);\n\t\tpaddle = new Actor(context, 300, 300, Color.RED, 40);\n\t\t\n\t\tpaddle.setWidth(150);\n\t\tpaddle.setHeight(40);\n\t\t\n\t\tball.setDX(10);\n\t\tball.setDY(10);\n\t\t\n\t\t\n\t\t// Initialize Bricks\n\t\tbricks = new ArrayList <Actor> (0); // List of 6\n\t\t\n\t\tfor (int i = 0; i<6; i++) {\n\t\t\tbricks.add(new Actor(context, i*80, 100, Color.GREEN, 40));\n\t\t\t\n\t\t}\n\t\t\n\t\tfor (int i = 0; i< bricks.size(); i++) {\n\t\t\tbricks.get(i).setWidth(75);\n\t\t}\n\t\t\n\t \n\t\t\n\t\t\n\t// Initialize actors\n\t\tactorone= new Actor(context, 100, 100, Color.RED, 40);\n\t\tactortwo = new Actor(context, 200, 200, Color.BLUE, 50);\n\t\tactorthree = new Actor(context, 300, 200, Color.GREEN, 100);\n\t\t// Initialize the tardis\n\t\ttardis = new Actor(context, 300, 300, Color.BLUE, 50);\n\t\ttardis.setCostume(R.drawable.tardis);\n\t\tactorone.setDX(5);\n\t\tactorone.setDY(5);\n\t\t\n\t\tactortwo.setDX(10);\n\t\tactortwo.setDY(-10);\n\t\t\n\t \n\t\t// Initialize the Handler\n\t\th = new Handler();\n\t\n\t}",
"void loadNewAnimatorPanel(ReadOnlyModel m, int width, int height);",
"public EnhancedVisualView(IReadOnlyModel model, int speed) {\n super();\n this.mm = (AnimationModel) model;\n VisualView vView = new VisualView(mm, speed);\n this.setTitle(vView.getTitle());\n this.setSize(vView.getSize());\n this.setExtendedState(this.getExtendedState() | JFrame.MAXIMIZED_BOTH);\n this.setDefaultCloseOperation(vView.getDefaultCloseOperation());\n\n //use a borderlayout with drawing panel in center and button panel in south\n this.setLayout(vView.getLayout());\n this.vPanel = new VisualPanel(mm, speed);\n vPanel.setPreferredSize(new Dimension(500, 500));\n this.add(vPanel, BorderLayout.CENTER);\n\n //set play button\n buttonPanel = new ButtonPanel();\n this.add(buttonPanel, BorderLayout.SOUTH);\n\n //sets the menu bar\n menuBar = new MenuPanel(mm.getShapes());\n this.add(menuBar, BorderLayout.WEST);\n\n vPanel.setSlider(menuBar.getJSlider());\n this.menuBar.getJSlider().setMinimum(0);\n this.menuBar.getJSlider().setMaximum(this.vPanel.getMaxTick());\n menuBar.getJSlider().setValue(0);\n menuBar.getJSlider().addChangeListener((ChangeEvent e) -> {\n JSlider source = (JSlider) e.getSource();\n int fps = (int) source.getValue();\n if (source.getValueIsAdjusting()) {\n vPanel.stopTimer();\n vPanel.setTick(fps);\n vPanel.repaint();\n } else {\n vPanel.startTimer();\n }\n });\n\n }",
"private void initView() {\n\t\tstart_anima = new AlphaAnimation(0.3f, 1.0f);\r\n\t\tstart_anima.setDuration(2000);\r\n\t\tview.startAnimation(start_anima);\r\n\t\tstart_anima.setAnimationListener(new AnimationListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onAnimationStart(Animation animation) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onAnimationRepeat(Animation animation) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onAnimationEnd(Animation animation) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tredirectTo();\r\n\t\t\t}\r\n\t\t});\r\n\t}",
"@Override\n\tpublic boolean create(Animations obj) {\n\t\treturn false;\n\t}",
"public Zombie() {\r\n\t\tsuper(myAnimationID, 0, 0, 60, 60);\r\n\t}",
"public Scene() {}",
"@Override\n\tpublic void create() {\n\t\t// TODO: create completely new batches for sprites and models\n\t\tsprites = new SpriteBatch();\n\t\tmodelBatch = new ModelBatch();\n\n\t\t// TODO: create a new environment\n\t\t// set a new color attribute for ambient light in the environment\n\t\t// add a new directional light to the environment\n\n\t\tenvironment = new Environment();\n\t\tenvironment.set(new ColorAttribute(ColorAttribute.AmbientLight, 0.4f, 0.4f, 0.4f, 0.1f));\n\t\tenvironment.add(new DirectionalLight().set(0.8f, 0.8f, 0.8f, -1f, -0.8f, -0.2f));\n\n\t\t// create a new logo texture from the \"data/firstorder.png\" file\n\t\tlogo = new Texture(\"data/firstorder.png\");\n\n\t\t// TODO: create a new perspective camera with a field-of-view of around 70,\n\t\t// and the width and height found in the Gdx.graphics class\n\t\t// set the position of the camera to (100, 100, 100)\n\t\t// set the camera to look at the origin point (0, 0, 0)\n\t\t// set the near and far planes of the camera to 1 and 300\n\t\t// update the camera\n\t\tint width = Gdx.graphics.getWidth();\n\t\tint height = Gdx.graphics.getHeight();\n\t\tcam = new PerspectiveCamera(70f, width, height);\n\t\tcam.position.set(100f,100f,100f);\n\t\tcam.lookAt(0f, 0f, 0f);\n\t\tcam.near = 1f;\n\t\tcam.far = 300f;\n\t\tcam.update();\n\n\t\tbackgroundMusic = Gdx.audio.newMusic(Gdx.files.internal(\"data/StarWarsMusicTheme.mp3\"));\n\t\tbackgroundMusic.setLooping(true);\n\t\tbackgroundMusic.play();\n\n\t\t// create a new model loader\n\t\tfinal ModelLoader modelLoader = new ObjLoader();\n\n\t\t// TODO: load the internal file \"data/stormtrooper.obj\" into the model variable\n\t\tmodel = modelLoader.loadModel(Gdx.files.internal(\"data/stormtrooper_unwrapped.obj\"));\n\n\t\t// TODO: create a new model instance and scale it to 20% it's original size (it's huge...)\n\t\tinstance = new ModelInstance(model); // ← our model instance is here\n\t\tinstance.transform.scale(0.2f, 0.2f, 0.2f);\n\n\t\t// TODO: set the helmet details material to a new diffuse black color attribute\n\n\t\tgetHelmetDetails().material = new Material(ColorAttribute.createDiffuse(Color.BLACK));\n\t\tgetHelmetMoreDetails().material = new Material(ColorAttribute.createDiffuse(Color.DARK_GRAY));\n\t\tgetHelmetBase().material = new Material(ColorAttribute.createDiffuse(Color.WHITE));\n\n\t\t// set the input processor to work with our custom input:\n\t\t// clicking the image in the lower right should change the colors of the helmets\n\t\t// bonus points: implement your own GestureDetector and an input processor based on it\n\t\tGdx.app.log(\"instance node size\", \"\"+String.valueOf(instance.nodes.size));\n\n\n\t\tGdx.input.setInputProcessor(new FirstOrderInputProcessor(cam, new Runnable() {\n\t\t\tprivate Texture camouflage = new Texture(\"data/camouflage.png\");\n\t\t\tprivate Texture paper = new Texture(\"data/paper.png\");\n\t\t\tprivate Texture hive = new Texture(\"data/hive.png\");\n\t\t\tprivate Texture strips = new Texture(\"data/strip.png\");\n\t\t\tprivate Texture grass = new Texture(\"data/grass.jpeg\");\n\t\t\tpublic void run() {\n\t\t\t\t// TODO: change the helmet details material to a new diffuse random color\n\n\t\t\t\tgetHelmetDetails().material = getRandomMaterial();\n\t\t\t\tgetHelmetMoreDetails().material = getRandomMaterial();\n\n\t\t\t\t// bonus points:\n\t\t\t\t// randomly change the material of the helmet base to a texture\n\t\t\t\t// from the files aloha.png and camouflage.png (or add your own!)\n\t\t\t\tgetHelmetBase().material = getRandomMaterial();\n\t\t\t\tsetRandomLight();\n\n\t\t\t}\n\n\t\t\tprivate Material getRandomMaterial() {\n\t\t\t\tint rand = (int) (MathUtils.random() * 100) % 8;\n\t\t\t\tGdx.app.log(\"Random\", \"\" + rand);\n\n\t\t\t\t//Texture aloha = new Texture(\"data/aloha.png\");\n\t\t\t\tMaterial randMaterial = null;\n\n\t\t\t\tswitch (rand) {\n\t\t\t\t\tcase 0:\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\trandMaterial = new Material(ColorAttribute.createReflection(Color.WHITE));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\trandMaterial = new Material(TextureAttribute.createDiffuse(paper));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 3:\n\t\t\t\t\t\trandMaterial = new Material(TextureAttribute.createDiffuse(hive));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 4:\n\t\t\t\t\t\trandMaterial = new Material(TextureAttribute.createDiffuse(camouflage));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 5:\n\t\t\t\t\t\trandMaterial = new Material(ColorAttribute.createDiffuse(getRandomColor()));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 6:\n\t\t\t\t\t\trandMaterial = new Material(TextureAttribute.createDiffuse(strips));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 7:\n\t\t\t\t\t\trandMaterial = new Material(TextureAttribute.createDiffuse(grass));\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\treturn randMaterial;\n\t\t\t}\n\t\t}));\n\t}",
"@Override\n protected void init() {\n lastHorizontalDirection = direction = Math.random() < 0.5 ? Direction.LEFT : Direction.RIGHT;\n lastVerticalDirection = Direction.UP;\n setBody(new PolygonShape(BODY_WIDTH2, BODY_HEIGHT2), Body.Mode.CHARACTER);\n body().restitution = 0.0;\n size().set(WIDTH, HEIGHT);\n\n this.addAnimation(\"walk\")\n .addFrames(\"smick\", 4, 5, 0, 2)\n .setSpeed(10)\n .loop(true);\n this.addAnimation(\"eatRadish\")\n .addFrames(\"smick\", 4, 5, 8, 9)\n .setSpeed(10)\n .loop(true);\n this.addAnimation(\"eatHector\")\n .addFrames(\"smick\", 4, 5, 10, 10)\n .setSpeed(10)\n .loop(true);\n this.addAnimation(\"jump\")\n .addFrames(\"smick\", 4, 5, 11, 11)\n .setSpeed(10)\n .loop(false);\n this.addAnimation(\"climb\")\n .addFrames(\"smick\", 4, 5, 12, 13)\n .setSpeed(10)\n .loop(false);\n this.addAnimation(\"eatHectorOnRope\")\n .addFrames(\"smick\", 4, 5, 14, 14)\n .setSpeed(10)\n .loop(false);\n this.addAnimation(\"crushing\")\n .addFrames(\"smick\", 4, 5, 16, 16)\n .setSpeed(10)\n .loop(false);\n }",
"public ModelFlameThrower()\n/* 16: */ {\n/* 17:15 */ float f = 0.0F;\n/* 18:16 */ this.bipedGun = new ModelRenderer(this, 0, 10);\n/* 19:17 */ this.bipedGun.addBox(0.0F, 0.0F, 0.0F, 4, 4, 4, f);\n/* 20: */ \n/* 21:19 */ this.rifle = new ModelRenderer(this, 0, 18);\n/* 22:20 */ this.rifle.addBox(0.5F, 0.2F, 4.0F, 3, 3, 3, f);\n/* 23: */ \n/* 24:22 */ this.mouth = new ModelRenderer(this, 0, 0);\n/* 25:23 */ this.mouth.addBox(1.5F, 1.2F, 7.0F, 1, 1, 2, f);\n/* 26: */ \n/* 27:25 */ this.spark = new ModelRenderer(this, 14, 0);\n/* 28:26 */ this.spark.addBox(1.5F, 0.0F, 0.0F, 1, 1, 3, -0.38F);\n/* 29:27 */ this.spark.setRotationPoint(0.0F, 0.0F, 6.9F);\n/* 30:28 */ this.spark.rotateAngleX = -0.2618F;\n/* 31: */ }",
"public void setAnimaciones( ){\n\n int x= 0;\n Array<TextureRegion> frames = new Array<TextureRegion>();\n for(int i=1;i<=8;i++){\n frames.add(new TextureRegion(atlas.findRegion(\"demon01\"), x, 15, 16, 15));\n x+=18;\n }\n this.parado = new Animation(1 / 10f, frames);//5 frames por segundo\n setBounds(0, 0, 18, 15);\n\n }",
"private Animation<TextureRegion> createAnimation(DeathmatchMania game) {\n TextureAtlas textureAtlas = game.getAssetManager().get(\"bulletAtlas.atlas\");\n\n return new Animation(FRAME_TIME, textureAtlas.findRegions(\"bullet\"));\n }",
"public SVGView(ReadAnimationModel r) {\n if (r == null) {\n throw new IllegalArgumentException(\"model cannot be null\");\n }\n speed = 1000;\n model = Objects.requireNonNull(r);\n this.width = model.getBounds().getBoundWidth();\n this.height = model.getBounds().getBoundHeight();\n }",
"public A(){ \n super();\n AtrEA = new GreenfootImage(\"AtrEA.png\");\n DerEA1 = new GreenfootImage(\"DerEA1.png\");\n DerEA2 = new GreenfootImage(\"DerEA2.png\");\n DerEA3 = new GreenfootImage(\"DerEA3.png\");\n FrtEA1 = new GreenfootImage(\"FrtEA1.png\");\n FrtEA2 = new GreenfootImage(\"FrtEA2.png\");\n FrtEA3 = new GreenfootImage(\"FrtEA3.png\");\n IzqEA1 = new GreenfootImage(\"IzqEA1.png\");\n IzqEA2 = new GreenfootImage(\"IzqEA2.png\");\n IzqEA3 = new GreenfootImage(\"IzqEA3.png\"); \n animationE = 0;\n start = 1; \n }",
"public interface IAnimationController {\n\n /**\n * This method should start the animation using the provided model.\n */\n void start();\n\n /**\n * Retrieve the log from this controller.\n *\n * @return The log of this controller\n * @throws UnsupportedOperationException Throws exception if the controller does not support the\n * functionality\n */\n Appendable getLog();\n\n /**\n * Retrieve the timer from this controller.\n * @return The timer of this controller\n * @throws UnsupportedOperationException Throws exception if the controller does not support the\n * functionality\n */\n Timer getTimer();\n\n /**\n * Retrieves the tempo of the controller.\n * @return tempo used by controller\n * @throws UnsupportedOperationException Throws exception if the controller does not support the\n * functionality\n */\n double getTempo();\n\n\n}",
"public void setUpAnimations(){\n //Vertical movement animation\n this.verticalMovement = new Animation[NUMBER_OF_VERTICAL_FRAMES]; //Number of images\n TextureRegion[][] heroVerticalSpriteSheet = TextureRegion.split(new Texture(\"img/hero/hero_vertical.png\"), HERO_WIDTH_PIXEL, HERO_HEIGHT_PIXEL); //TODO: Load atlas?\n\n for(int i = 0; i < NUMBER_OF_VERTICAL_FRAMES; i++)\n verticalMovement[i] = new Animation(ANIMATION_SPEED, heroVerticalSpriteSheet[0][i]); //TODO HANDLE EXCEPTION?\n\n //Jump animation\n this.jumpMovement = new Animation[NUMBER_OF_JUMP_FRAMES];\n TextureRegion[][] heroJumpSpriteSheet = TextureRegion.split(new Texture(\"img/hero/hero_jump.png\"), HERO_WIDTH_PIXEL, HERO_HEIGHT_PIXEL); //TODO: Load atlas?\n\n for(int i = 0; i < NUMBER_OF_JUMP_FRAMES; i++)\n jumpMovement[i] = new Animation(ANIMATION_SPEED, heroJumpSpriteSheet[0][i]); //TODO HANDLE EXCEPTION?\n\n }",
"public Model(JSONObject selfAsJson) {\n try {\n int width = selfAsJson.getInt(\"width\") / PlayGameActivity.PIXELS_PER_PHYSICS_GRID;\n int height = selfAsJson.getInt(\"height\") / PlayGameActivity.PIXELS_PER_PHYSICS_GRID;\n this.physModel = new Physics2D(selfAsJson.getJSONObject(\"physics\"), width, height);\n this.graphModel = new Graphics2D(selfAsJson.getJSONObject(\"graphics\"));\n this.gameStateModel = new GameState(selfAsJson.getJSONObject(\"gamestate\"));\n }catch(JSONException e) {\n e.printStackTrace();\n }\n\n }",
"public static void main(String[] args) throws IOException {\n AnimationModel model;\n IView view = null;\n Readable file;\n Appendable output;\n\n\n HashMap<String, String> cla = argsToHM(args);\n\n if (checkValidArgs(cla)) {\n showError(\"Invalid command line args\");\n return;\n }\n\n try {\n file = new FileReader(setFile(cla));\n } catch (FileNotFoundException e) {\n showError(\"File not found\");\n return;\n }\n\n\n model = AnimationReader.parseFile(file,\n new AnimationModelImpl.Builder(\n new AnimationModelImpl()));\n\n\n switch (cla.get(\"-view\")) {\n case \"text\":\n output = System.out;\n view = new TextRepresentation(\n model.getShapes(),\n model.getMaxX(),\n model.getMaxY(),\n model.getWidth(),\n model.getHeight());\n view.createAnimOutput();\n output.append(view.getOutput().toString());\n return;\n\n case \"svg\":\n try {\n File f = new File(cla.get(\"-out\"));\n FileWriter fw = new FileWriter(f);\n BufferedWriter bw = new BufferedWriter(fw);\n view = new SVGRepresentation(model.getShapes(),\n model.getWidth(),\n model.getHeight(),\n Integer.valueOf(cla.get(\"-speed\")));\n view.createAnimOutput();\n System.out.println(view.getOutput().toString());\n bw.append(view.getOutput().toString());\n bw.close();\n return;\n }\n catch (IOException e) {\n showError(\"File unable to be written\");\n }\n break;\n\n case \"visual\":\n IView visPanel = new AnimationPanelView(model.getShapes(),\n Integer.valueOf(cla.get(\"-speed\")));\n\n view = new AnimationGraphicsView(visPanel, model.getMaxX(), model.getMaxY(),\n model.getWidth(),\n model.getHeight());\n break;\n\n case \"edit\":\n AnimationPanelView editPanel = new EditorView(model.getShapes(),\n Integer.valueOf(cla.get(\"-speed\")), true);\n view = new AnimationGraphicsView(editPanel, model.getMaxX(), model.getMaxY(),\n model.getWidth(),\n model.getHeight());\n break;\n default:\n showError(\"unrecognized/incorrect animation type specified\");\n break;\n }\n\n ExcellenceController controller = new ExcellenceController(model, view);\n controller.makeVisible();\n }",
"public OpenGLModel() {\n\n\n\t}",
"public Animate ()\r\n\t{\r\n\t\tgl = this;\r\n\t\tuse();\r\n\t\tinit();\r\n\t\t// This is kind of funky, we are our own listener for key events\r\n\t\taddKeyListener( this );\r\n\t}",
"private void initAnimationArray() {\r\n\t\tanimationArr = new GObject[8];\r\n\t\tfor(int i = 1; i < animationArr.length; i++) {\r\n\t\t\tString fileName = \"EvilMehran\" + i + \".png\";\r\n\t\t\tanimationArr[i] = new GImage(fileName);\r\n\t\t}\r\n\t}",
"public StartAnimationHandler(SceneRenderer initRenderer)\r\n {\r\n renderer = initRenderer;\r\n }",
"public interface EditorAnimationView extends AnimationView {\n /**\n * Reset the display to reflect the current tick.\n */\n void drawCurrentTick();\n\n /**\n * Change whether the animation is currently playing or not.\n */\n void togglePlay();\n\n /**\n * Set the animation to not playing.\n */\n void pause();\n\n /**\n * Set the current tick to the given tick.\n * @param tick the new tick.\n */\n void setTick(int tick);\n\n /**\n * Set the current time to the earliest possible time for a tick.\n */\n void rewind();\n\n /**\n * Add one tick to the current time.\n */\n void incrementTick();\n\n /**\n * remove one tick from the current time.\n */\n void decrementTick();\n\n /**\n * Switch whether the animation loops or not.\n */\n void toggleLoop();\n\n /**\n * Recalculate the last tick in the animation.\n */\n void updateMaxTick();\n\n /**\n * Displays an interactive list of shapes in the order that they are\n * stored in the currently selected layer.\n * @param shapes the list of shape names to display.\n */\n void setShapeList(List<String> shapes);\n\n /**\n * Displays an interactive list of layers, with the background layer first and the top layer last.\n * @param shapes the list of layer names to display.\n */\n void setLayerList(List<String> shapes);\n\n /**\n * Write the representation of the given model's animation to this view's output in the format\n * determined by another view's type.\n * @param output the string to be written to the view's output.\n * @throws IllegalArgumentException if the text type is incorrect\n * @throws IllegalStateException if the output has not been set or is invalid (ie unwritable)\n */\n void save(String output);\n\n /**\n * Tie the commands given by the Controller to the buttons/control scheme of this view.\n * @param features the interface containing all the necessary commands\n */\n void addFeatures(Features features);\n\n /**\n * Shows the user a given error message.\n * @param message the message to be displayed\n */\n void displayErrorMessage(String message);\n\n /**\n * Reset focus onto the view instead of any of its components (like buttons or text fields).\n */\n void resetFocus();\n\n /**\n * Reset all text fields to their default state.\n */\n void resetTextFields();\n\n /**\n * Enter a screen from which a shape's Motions can be edited.\n * @param layer the layer of the shape to be edited\n * @param shape the shape to be edited\n */\n void enterShapeEditor(String layer, String shape);\n\n /**\n * Return to the default screen from the shape editor screen.\n */\n void exitShapeEditor();\n\n /**\n * Set the text boxes for creating a new frame to the given Motion.\n * @param m the motion to set the text boxes to\n */\n void setNewFrameText(Motion m);\n\n /**\n * Set the text boxes for editing an existing frame to the given Motion.\n * @param m the motion to set the text boxes to\n */\n void setEditFrameText(Motion m);\n}",
"@TargetApi(Build.VERSION_CODES.LOLLIPOP)\n\tprotected Animator createAnimator() {\n\t\tAnimator anim = ViewAnimationUtils.createCircularReveal(\n\t\t\t\tmRevealView, getWidth() / 2, getHeight() / 2, 0, getWidth() / 2);\n\t\tanim.addListener(new AnimatorListenerAdapter() {\n\t\t\t@Override\n\t\t\tpublic void onAnimationEnd(Animator animation) {\n\t\t\t\t// Now we can refresh the drawable state\n\t\t\t\trefreshDrawableState();\n\n\t\t\t\tmRevealView.setVisibility(View.GONE);\n\t\t\t}\n\t\t});\n\t\treturn anim;\n\t}",
"void startAnimation();",
"public yyAnim (String title, int io) { this(System.class, title, io); }",
"private void initAnim() {\n mAnim = new RotateAnimation(0, 359, Animation.RESTART, 0.5f, Animation.RESTART, 0.5f);\n mAnim.setDuration(1000);\n mAnim.setRepeatCount(Animation.INFINITE);\n mAnim.setRepeatMode(Animation.RESTART);\n //mAnim.setStartTime(Animation.START_ON_FIRST_FRAME);\n }",
"public void init() {\n\t\twindow.init();\n\t\t\n\t\t//OBJModel test = new OBJModel(\"monkey.obj\");\n\t\t//IndexedModel model = test.toIndexedModel();\n\t\t//Model test2 = new Model(OBJLoader.loadMesh(\"monkey.obj\"));\n\t\t\n\t}",
"public AnimationComponent(){\n\t\tAnimations = null;\n\t\tbIsPlaying = false;\n\t\tBehaviour = AnimationType.Behaviour_Loop;\n\t\tfCurrentFrame = 0.0f;\n\t\tPingPongDirection = 0;\n\t}",
"public GridLayoutAnimationController(Animation animation, float columnDelay, float rowDelay) {\n/* 82 */ super((Animation)null); throw new RuntimeException(\"Stub!\");\n/* */ }",
"public PlaybackView(int tempo, IModel model) throws IllegalArgumentException {\n super(tempo, model);\n setTitle(\"Easy Animator Playback\");\n setPreferredSize(new Dimension(800, 900));\n setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n this.paused = false;\n this.loop = false;\n this.speed = tempo;\n this.delay = 1000 / speed;\n\n // set up main panel to house all other panels\n mainPanel = new JPanel();\n mainPanel.setBackground(Color.white);\n mainPanel.setBorder(BorderFactory.createTitledBorder(\"Main Panel\"));\n mainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout.X_AXIS));\n\n // set up drawPanel\n drawPanel = new DrawPanel(model);\n drawPanel.setBorder(BorderFactory.createTitledBorder(\"Animation Visualization\"));\n\n // set up the controlPanel\n controlPanel = new JPanel();\n controlPanel.setBorder(BorderFactory.createTitledBorder(\"Control Panel\"));\n controlPanel.setLocation(50, 725);\n controlPanel.setSize(700, 130);\n controlPanel.setBackground(Color.gray);\n controlPanel.setLayout(new GridLayout());\n\n // set up buttons\n play = new JButton();\n play.setText(\"Play/Pause\");\n play.setActionCommand(\"play/pause\");\n rewind = new JButton();\n rewind.setText(\"Rewind\");\n rewind.setActionCommand(\"rewind\");\n setLoop = new JCheckBox();\n setLoop.setText(\"Loop\");\n setLoop.setSelected(false);\n setLoop.setActionCommand(\"loop\");\n setSpeed = new JTextField(this.speed);\n Font field = new Font(\"SansSerif\", Font.BOLD, 30);\n setSpeed.setFont(field);\n setSpeed.setBorder(BorderFactory.createTitledBorder(\"Speed Input\"));\n changeSpeed = new JButton(\"Set Speed\");\n changeSpeed.setActionCommand(\"speed\");\n\n // set listeners\n this.setListeners(this);\n\n controlPanel.add(play);\n controlPanel.add(rewind);\n controlPanel.add(setLoop);\n controlPanel.add(changeSpeed);\n controlPanel.add(setSpeed);\n\n // add all to mainpanel\n mainPanel.add(drawPanel);\n this.add(controlPanel);\n this.add(mainPanel);\n pack();\n setVisible(true);\n }",
"private void construct(){\n TriangleMesh mesh;\n\n mesh = ObjImporter.loadMesh(\"data/aufgabe3/bunny.obj\");\n mesh.setMaterial(new MaterialNode(0.1f, 0.1f, .5f, 1));\n mesh.getRenderer().setShadingType(ShadingType.GOURAUD);\n scene.addNode(mesh);\n\n mesh = ObjImporter.loadMesh(\"data/aufgabe3/cube.obj\");\n mesh.addTransformation(new TransformationNode(TransformationType.TRANSLATE, 1, 0, 0));\n scene.addNode(mesh);\n\n mesh = ObjImporter.loadMesh(\"data/aufgabe3/teddy.obj\");\n mesh.addTransformation(new TransformationNode(TransformationType.TRANSLATE, 0, 1, 0));\n mesh.setMaterial(new MaterialNode(0.1f, .5f, 0.1f, 1));\n mesh.getRenderer().setShadingType(ShadingType.GOURAUD);\n scene.addNode(mesh);\n\n mesh = ObjImporter.loadMesh(\"data/aufgabe3/sphere.obj\");\n mesh.addTransformation(new TransformationNode(TransformationType.TRANSLATE, 1, 1, 0));\n mesh.setMaterial(new MaterialNode(1, 0, 0, 1));\n mesh.getRenderer().setShadingType(ShadingType.GOURAUD);\n scene.addNode(mesh);\n\n scene.calculateNormals();\n scene.setupRendering();\n }",
"@Override\n\tpublic void create() {\n\t\tGdx.gl20.glClearColor(1, 1, 1, 1);\n\n\t\t// instancia batch, asset manager e ambiente 3D\n\t\tmodelBatch = new ModelBatch();\n\t\tassets = new AssetManager();\n\t\tambiente = new Environment();\n\t\tambiente.set(new ColorAttribute(ColorAttribute.AmbientLight, 0.4f, 0.4f, 0.4f, 1f));\n\t\tambiente.add(new DirectionalLight().set(0.8f, 0.8f, 0.8f, -1f, -0.8f, -0.2f));\n\n\t\t// configura a câmera\n\t\tfloat razaoAspecto = ((float) Gdx.graphics.getWidth()) / Gdx.graphics.getHeight();\n\t\tcamera = new PerspectiveCamera(67, 480f * razaoAspecto, 480f);\n\t\tcamera.position.set(1f, 1.75f, 3f);\n\t\tcamera.lookAt(0, 0.35f, 0);\n\t\tcamera.near = 1f;\n\t\tcamera.far = 300f;\n\t\tcamera.update();\n\t\tcameraController = new CameraInputController(camera);\n\t\tGdx.input.setInputProcessor(cameraController);\n\n\t\t// solicita carregamento dos 2 modelos 3D da cena\n\t\tassets.load(\"caldeirao.obj\", Model.class);\n\t\tassets.load(\"caldeirao-jogos.obj\", Model.class);\n\t\tassets.load(\"caldeirao-love.obj\", Model.class);\n\t\tassets.load(\"fogueira.obj\", Model.class);\n\n\t\t// instancia e configura 2 tipos de renderizadores de partículas:\n\t\t// 1. Billboards (para fogo)\n\t\t// 2. PointSprites (para bolhas)\n\t\tBillboardParticleBatch billboardBatch = new BillboardParticleBatch(ParticleShader.AlignMode.Screen, true, 500);\n\t\tPointSpriteParticleBatch pointSpriteBatch = new PointSpriteParticleBatch();\n\t\tsistemaParticulas = new ParticleSystem();\n\t\tbillboardBatch.setCamera(camera);\n\t\tpointSpriteBatch.setCamera(camera);\n\t\tsistemaParticulas.add(billboardBatch);\n\t\tsistemaParticulas.add(pointSpriteBatch);\n\n\t\t// solicita o carregamento dos efeitos de partículas\n\t\tParticleEffectLoader.ParticleEffectLoadParameter loadParam = new ParticleEffectLoader.ParticleEffectLoadParameter(\n\t\t\t\tsistemaParticulas.getBatches());\n\t\tassets.load(\"fogo.pfx\", ParticleEffect.class, loadParam);\n\t\tassets.load(\"fogo-jogos.pfx\", ParticleEffect.class, loadParam);\n\t\tassets.load(\"fogo-love.pfx\", ParticleEffect.class, loadParam);\n\t\tassets.load(\"bolhas.pfx\", ParticleEffect.class, loadParam);\n\t\tassets.load(\"bolhas-jogos.pfx\", ParticleEffect.class, loadParam);\n\t\tassets.load(\"bolhas-love.pfx\", ParticleEffect.class, loadParam);\n\n\t\t// solicita carregamento da música\n\t\tmusica = Gdx.audio.newMusic(Gdx.files.internal(\"zelda-potion-shop.mp3\"));\n\n\t\taindaEstaCarregando = true;\n\t}",
"public SVGView(ReadAnimationModel r, int speed) {\n if (r == null) {\n throw new IllegalArgumentException(\"model cannot be null\");\n }\n model = Objects.requireNonNull(r);\n this.width = model.getBounds().getBoundWidth();\n this.height = model.getBounds().getBoundHeight();\n this.speed = 1000 / speed;\n }",
"public static void create() {\r\n render();\r\n }",
"@Override\n public void onAnimationStart(Animator animation) {\n }",
"@Override\r\n protected void initModel() {\n model = new Sphere(\"projectil Model\", 5, 5, 0.2f);\r\n model.setModelBound(new BoundingBox());\r\n model.updateModelBound();\r\n }",
"public TrafficAnimation()\n\t{\n\t\t// Do not initialize larger than 800x600. I won't be able to\n\t\t// grade your project if you do.\n\t\tint initWidth = 600;\n\t\tint initHeight = 400;\n\t\tsetPreferredSize(new Dimension(initWidth, initHeight));\n\t\tthis.setDoubleBuffered(true);\n\n\t\t//Start the animation - DO NOT REMOVE\n\t\tstartAnimation();\n\t}",
"public Model() {\n\t\tbucket = new bucket[14];\n\t\tlisteners = new ArrayList<ChangeListener>();\n\n\t\ta = new player(true, 1);\n\t\tb = new player(false, 2);\n\n\t\tfor (int x = 0; x < 14; x++) {\n\t\t\tif (x == 0 || x == 7) {\n\t\t\t\tbucket[x] = new bucket(x, 0);\n\t\t\t} else {\n\t\t\t\tbucket[x] = new bucket(x, 0);\n\t\t\t}\n\t\t}\n\t}",
"public void create()\n/* 342: */ {\n/* 343:422 */ setupPlainVariables_xjal();\n/* 344: */ \n/* 345:424 */ this.presentation = new ShapeTopLevelPresentationGroup(this, true, 0.0D, 0.0D, 0.0D, 0.0D, new Object[0]);\n/* 346:425 */ this.icon = new ShapeGroup(this, true, 0.0D, 0.0D, 0.0D, new Object[0]);\n/* 347: */ \n/* 348: */ \n/* 349:428 */ assignInitialConditions_xjal();\n/* 350:429 */ onCreate();\n/* 351: */ }",
"AnimationEventGUI() {\n\t\tfactory = AnimationFactory.getInstance();\n\t\tcontainer = new VBox(SPACING);\n\t\tcontainer.setPadding(new Insets(SPACING));\n\t\tinitializeSelectors();\n\t\tduration = new NumberTextField();\n\t\tduration.setPromptText(\"Duration in seconds\");\n\t\tduration.sanitizeForInteger();\n\t\tname = new TextField();\n\t\tcontainer.getChildren().addAll(pathSelector,\n\t\t\t\tscaleSelector,\n\t\t\t\trotationSelector,\n\t\t\t\timageSelector,\n\t\t\t\tGUIUtils.makeRow(new CustomText(\"Duration: \"), duration),\n\t\t\t\tGUIUtils.makeRow(new CustomText(\"Name: \"), name),\n\t\t\t\tbuttonRow());\n\t\tthis.setContent(container);\n\t}",
"public PersonalAnimales() {\n initComponents();\n }",
"@Override\n\t\t\tpublic void onAnimationStart(Animation arg0) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void onAnimationStart(Animation arg0) {\n\t\t\t\t\n\t\t\t}",
"public GridLayoutAnimationController(Animation animation) {\n/* 71 */ super((Animation)null); throw new RuntimeException(\"Stub!\");\n/* */ }",
"public void startAnimation() {\n animationStart = System.currentTimeMillis();\n }",
"@Override public void onAnimationStart(Animator arg0) {\n\n }",
"@Override\n\t\tpublic void onAnimationStart(Animator animation) {\n\t\t\t\n\t\t}",
"@Override\n public void onAnimationStart(Animator arg0) {\n\n }",
"@Override\n\tpublic void create () {\n\t\t//IntrigueGraphicalDebugger.enable();\n\t\tIntrigueGraphicSys = new IntrigueGraphicSystem();\n\t\tIntrigueTotalPhysicsSys = new IntrigueTotalPhysicsSystem();\n\t\t\n\t\tfinal int team1 = 1;\n\t\tfinal int team2 = 2;\n\t\t\n\t\tstage = new Stage();\n\t\ttable = new Table();\n\t\ttable.bottom();\n\t\ttable.left();\n\t\ttable.setFillParent(true);\n\t\t\n\t\tLabelStyle textStyle;\n\t\tBitmapFont font = new BitmapFont();\n\t\t\n\n\t\ttextStyle = new LabelStyle();\n\t\ttextStyle.font = font;\n\n\t\ttext = new Label(\"Intrigue\",textStyle);\n\t\tLabel text2 = new Label(\"@author: Matt\", textStyle);\n\t\tLabel text3 = new Label(\"OPERATION 1\", textStyle);\n\t\t\n\t\ttext.setFontScale(1f,1f);\n\t\ttable.add(text);\n\t\ttable.row();\n\t\ttable.add(text2);\n\t\ttable.row();\n\t\ttable.add(text3);\n\t\tstage.addActor(table);\n\n\t\ttable.setDebug(true);\n\t\tString path_to_char = \"3Dmodels/Soldier/ArmyPilot/ArmyPilot.g3dj\";\n //String path_to_road = \"3Dmodels/Road/roadV2.g3db\";\n\t\t//String path_to_rink = \"3Dmodels/Rink/Rink2.g3dj\";\n\t\tString path_to_snow_terrain = \"3Dmodels/Snow Terrain/st5.g3dj\";\n\t\tString path_to_crosshair = \"2Dart/Crosshairs/rifle_cross.png\";\n\t\n\t\tMatrix4 trans = new Matrix4();\n\t\tMatrix4 iceTrans = new Matrix4();\n\t\tMatrix4 iceTrans2 = new Matrix4();\n\t\tMatrix4 iceTrans3 = new Matrix4();\n\t\tMatrix4 iceTrans4 = new Matrix4();\n\t\tMatrix4 trans2 = new Matrix4();\n\t\tMatrix4 trans3 = new Matrix4();\n\t\n\t\ttrans.translate(-3000,6000,-500);\n\t\t//Vector3 halfExtents = new Vector3(30f,90f,25f);\n\t\tbtCapsuleShape person_shape = new btCapsuleShape(30f, 90f);\n\t\t\n\t\tmamaDukes.add(new Entity.Builder(player_guid)\n\t\t\t\t\t.IntrigueModelComponent(path_to_char).IntrigueControllerComponent(1)\n\t\t\t\t\t.IntriguePhysicalComponent(person_shape, 200f, trans)\n\t\t\t\t\t.MotionComponent()\n\t\t\t\t\t.AimingComponent()\n\t\t\t\t\t.DecalComponent()\n\t\t\t\t\t.ThirdPersonCameraComponent()\n .CharacterActionsComponent()\n\t\t\t\t\t.AnimationComponent()\n\t\t\t\t\t.Fireable(path_to_crosshair)\n\t\t\t\t\t.TargetingAI(team1)\n\t\t\t\t\t//.CharacterSoundComponent(\"SoundEffects/Character/walking/step-spur.mp3\", \"SoundEffects/guns/M4A1.mp3\")\n\t\t\t\t\t.Build());\n\t\tJson json_test = new Json(); \n\t\tEntity d = mamaDukes.get(player_guid);\n\t\t//System.out.println(json_test.prettyPrint(d));\n\t\t\n\t\t\n\t\tmamaDukes.get(player_guid).getPhysicalComponent()\n\t\t\t\t\t.getPhysicsBody().getRigidBody()\n\t\t\t\t\t.setActivationState(Collision.DISABLE_DEACTIVATION);\n\n\t\tmamaDukes.add(level_factory.createLevel(path_to_snow_terrain,\n\t\t\t\t\"3DParticles/blizzard.pfx\", iceTrans, Entity.class));\n\t\t\t\t/*\n\t\t\t\tnew DrifterObject.DrifterObjectBuilder(1)\n\t\t\t\t\t.BaseObject(new Gobject.Builder(1)\n\t\t\t\t\t.IntrigueModelComponent(path_to_snow_terrain)\n\t\t\t\t\t.IntriguePhysicalComponent(iceMass, iceTrans)\n\t\t\t\t\t.ParticleComponent(\"Blizzard\",\n\t\t\t\t\t\t\t\"3DParticles/blizzard.pfx\",new Vector3(1000,1000, -2500), \n\t\t\t\t\t\t\tnew Vector3(3000, 1000,2000 ))\n\t\t\t\t\t.Build())\n\t\t\t\t\t.Build());*/\n\t\ttrans2.translate(-1000,1000,1500);\n\t\t\n\t\tmamaDukes.add(new Entity.Builder(2)\n\t\t\t\t\t.IntrigueModelComponent(path_to_char)\n\t\t\t\t\t.IntriguePhysicalComponent(person_shape, 200f, trans2)\n\t\t\t\t\t.ParticleComponent(\"Blood\", \"3DParticles/Character/Blood.pfx\", \n\t\t\t\t\t\t\tnew Vector3(), new Vector3(1f,1f,1f))\n\t\t\t\t\t.MotionComponent()\n\t\t\t\t\t.AimingComponent()\n\t\t\t\t\t.CharacterActionsComponent()\n\t\t\t\t\t.AnimationComponent()\n\t\t\t\t\t.Fireable()\n\t\t\t\t\t.ShootingSoldierAI()\n\t\t\t\t\t.TargetingAI(team2)\n\t\t\t\t\t.Build());\n\t\t\n\t\tmamaDukes.get(2).getPhysicalComponent()\n\t\t\t\t\t.getPhysicsBody()\n\t\t\t\t\t.getRigidBody()\n\t\t\t\t\t.setAngularFactor(new Vector3(0,0,0));\n\t\tmamaDukes.get(2).getPhysicalComponent()\n\t\t\t\t\t.getPhysicsBody()\n\t\t\t\t\t.getRigidBody()\n\t\t\t\t\t.setActivationState(Collision.DISABLE_DEACTIVATION);\n\t\t\n\t\tmamaDukes.get(2).getPhysicalComponent()\n\t\t\t\t\t.getPhysicsBody().getRigidBody()\n\t\t\t\t\t.setUserIndex(2);\n\t\t\n\t\ttrans3.translate(-1000, 1000, 2000);\n\t\t\n\t\tmamaDukes.add(new Entity.Builder(3)\n\t\t\t\t\t.IntrigueModelComponent(path_to_char)\n\t\t\t\t\t.IntriguePhysicalComponent(person_shape, 200f, trans3)\n\t\t\t\t\t.MotionComponent()\n\t\t\t\t\t.AimingComponent()\n\t\t\t\t\t.CharacterActionsComponent()\n\t\t\t\t\t.AnimationComponent().Fireable()\n\t\t\t\t\t.ShootingSoldierAI().TargetingAI(team2)\n\t\t\t\t\t.Build());\n\t\t\n\t\tmamaDukes.get(3).getPhysicalComponent()\n\t\t\t\t\t.getPhysicsBody().getRigidBody()\n\t\t\t\t\t.setAngularFactor(new Vector3(0,0,0));\n\t\tmamaDukes.get(3).getPhysicalComponent()\n\t\t\t\t\t.getPhysicsBody().getRigidBody()\n\t\t\t\t\t.setActivationState(Collision.DISABLE_DEACTIVATION);\n\t\tmamaDukes.get(3).getPhysicalComponent()\n\t\t\t\t\t.getPhysicsBody().getRigidBody().setUserIndex(3);\n\t\t\n\t\tVector3 rpos = new Vector3();\n\t\t\n\t\tmamaDukes.get(1).getModelComponent().getModel()\n\t\t\t\t\t.transform.getTranslation(rpos);\n\t\t\n\t\ticeTrans2.translate(0, 0, 6185.332f);\n\t\t\n\t\tmamaDukes.add(level_factory.createLevel(path_to_snow_terrain,\n\t\t\t\t\"SoundEffects/stages/snow stage/wind1.mp3\",\n\t\t\t\t\"3DParticles/blizzard.pfx\", iceTrans2, Entity.class));\n\t\t\n\t\t\t\t\t/*new DrifterObject.DrifterObjectBuilder(4)\n\t\t\t\t\t.BaseObject(new Gobject.Builder(4)\n\t\t\t\t\t.IntrigueModelComponent(path_to_snow_terrain)\n\t\t\t\t\t.IntriguePhysicalComponent(iceMass, iceTrans2)\n\t\t\t\t\t.IntrigueLevelComponent(\"SoundEffects/stages/snow stage/wind1.mp3\")\n\t\t\t\t\t.Build())\n\t\t\t\t\t.ParticleComponent(\"Blizzard\",\"3DParticles/blizzard.pfx\",\n\t\t\t\t\t\t\tnew Vector3(0, 0, 6185.332f),\n\t\t\t\t\t\t\tnew Vector3(3000, 1000,2000 ))\n\t\t\t\t\t.Build());*/\n\t\t\n\t\tmamaDukes.get(4).getModelComponent().getModel().transform.translate(new Vector3(0, 0, 6185.332f)); //btStaticMeshShapes do not update their motionStates. The model Translation must be set manually in these cases.\n\t\ticeTrans3.translate(-6149.6568f, 0, 6185.332f);\n\t\t\n\t\tmamaDukes.add(level_factory.createLevel(path_to_snow_terrain,\n\t\t\t\t\"3DParticles/blizzard.pfx\" , iceTrans3, Entity.class));\n\t\t/**\n\t\t * btStaticMeshShapes do not update their motionStates. The model Translation must be set manually in these cases.\n\t\t */\n\t\tmamaDukes.get(5).getModelComponent().getModel().transform.translate(new Vector3(-6149.6568f, 0, 6185.332f)); \n\t\t\n\t\ticeTrans4.translate(-6149.6568f, 0, 0);\n\t\tmamaDukes.add(level_factory.createLevel(path_to_snow_terrain,\n\t\t\t\t\"3DParticles/blizzard.pfx\" , iceTrans4, Entity.class));\n\t\t\t\t\t/**new DrifterObject.DrifterObjectBuilder(6)\n\t\t\t\t\t.BaseObject(new Gobject.Builder(6)\n\t\t\t\t\t.IntrigueModelComponent(path_to_snow_terrain)\n\t\t\t\t\t.IntriguePhysicalComponent(iceMass, iceTrans4)\n\t\t\t\t\t.ParticleComponent(\"Blizzard\",\"3DParticles/blizzard.pfx\",\n\t\t\t\t\t\t\tnew Vector3(-6149.6568f, 0, 0), new Vector3(3000, 1000,2000 ))\n\t\t\t\t\t.Build())\n\t\t\t\t\t.Build());*/\n\t\tmamaDukes.get(6).getModelComponent().getModel().transform.translate(new Vector3(-6149.6568f, 0, 0)); \n\t\t\n\t}",
"@Override\n public void onAnimationStart(Animation arg0) {\n \n }",
"public WorldModel(){\t\n\t}",
"@Override\n public void onAnimationStart(Animator arg0) {\n\n }",
"@Override\n\t\tpublic void create() {\n\t\t\tcannon = new CannonLogic();\n\t\t\tlines = new LineLogic();\n\t\t\tboxes = new BoxLogic();\n\t\t\tcontroller = new PlayerController();\n\t\t\tshapeList = new ArrayList<Shape>();\n\t\t\t\n\t\t\tGdx.gl11.glEnableClientState(GL11.GL_VERTEX_ARRAY);\n\t\t\tGdx.gl11.glClearColor(0.4f, 0.6f, 1.0f, 1.0f);\n\t\t\tvertexBuffer = BufferUtils.newFloatBuffer(8);\n\t\t\tvertexBuffer.put(new float[] {-50,-50, -50,50, 50,-50, 50,50});\n\t\t\tvertexBuffer.rewind();\n\t\t}",
"@Override\n\t\t\t\t\t\t\tpublic void onAnimationStart(Animator arg0) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}",
"public void addModel(IAnimatorModel newModel) {\r\n this.model = newModel;\r\n }",
"@Override\n\t\t\tpublic void onAnimationStart(Animation arg0) {\n\n\t\t\t}",
"private void setupAnimationTimer() {\n new AnimationTimer() {\n @Override\n public void handle(long l) {\n view.movePlayer();\n view.updateView();\n }\n }.start();\n\n // Timeline for UI stuff\n uiTimeline = new Timeline();\n\n KeyFrame keyStart = new KeyFrame(\n Duration.seconds(0),\n e -> view.updateUI((1160 / distance) * 0.005)\n );\n KeyFrame keyEnd = new KeyFrame(Duration.millis(5));\n\n uiTimeline.getKeyFrames().addAll(keyStart, keyEnd);\n uiTimeline.setCycleCount(Timeline.INDEFINITE);\n uiTimeline.setAutoReverse(false);\n\n countdownTimer = new Timeline(\n new KeyFrame(\n Duration.seconds(distance - (1160 / distance) * 0.005),\n e -> journeyComplete()\n )\n );\n\n // Timeline for asteroids\n Timeline asteroidTimer = new Timeline(\n new KeyFrame(Duration.millis(2000), e -> model.AsteroidPool.spawn())\n );\n asteroidTimer.setCycleCount(Timeline.INDEFINITE);\n asteroidTimer.play();\n }",
"@Override\n\tpublic void create() {\n\t\t// This should come from the platform\n\t\theight = platform.getScreenDimension().getHeight();\n\t\twidth = platform.getScreenDimension().getWidth();\n\n\t\t// create the drawing boards\n\t\tsb = new SpriteBatch();\n\t\tsr = new ShapeRenderer();\n\n\t\t// Push in first state\n\t\tgsm.push(new CountDownState(gsm));\n//\t\tgsm.push(new PlayState(gsm));\n\t}",
"@Override\n public void onAnimationStart(Animation anim) {\n }",
"@Override\n public void onAnimationStart(Animation anim) {\n }",
"@Override\n public void onAnimationStart(Animation anim) {\n }",
"@Override\n public void onAnimationStart(Animation anim) {\n }",
"@Override\r\n\tpublic void create() {\n\t\tbatch = new SpriteBatch();\r\n\t\tcamera = new OrthographicCamera();\r\n\t\tassets = new AssetManager();\r\n\t\t\r\n\t\tcamera.setToOrtho(false,WIDTH,HEIGHT);\r\n\t\t\r\n\t\tTexture.setAssetManager(assets);\r\n\t\tTexture.setEnforcePotImages(false);\r\n\t\t\r\n\t\tsetScreen(new SplashScreen(this));\r\n\t}",
"private void initAnim()\n {\n \t\n //leftWalk = AnimCreator.createAnimFromPaths(Actor.ANIM_DURATION, \n // AUTO_UPDATE, leftWalkPaths);\n // get the images for leftWalk so we can flip them to use as right.#\n \tImage[] leftWalkImgs = new Image[leftWalkPaths.length];\n \tImage[] rightWalkImgs = new Image[leftWalkPaths.length];\n \tImage[] leftStandImgs = new Image[leftStandPaths.length];\n \tImage[] rightStandImgs = new Image[leftStandPaths.length];\n \t\n \t\n \t\n \tleftWalkImgs = AnimCreator.getImagesFromPaths(\n \t\t\tleftWalkPaths).toArray(leftWalkImgs);\n \t\n \theight = leftWalkImgs[0].getHeight();\n \t\n \trightWalkImgs = AnimCreator.getHorizontallyFlippedCopy(\n \t\t\tleftWalkImgs).toArray(rightWalkImgs);\n \t\n \tleftStandImgs = AnimCreator.getImagesFromPaths(\n \t\t\tleftStandPaths).toArray(leftStandImgs);\n \t\n \trightStandImgs = AnimCreator.getHorizontallyFlippedCopy(\n \t\t\tleftStandImgs).toArray(rightStandImgs);\n \t\n \tboolean autoUpdate = true;\n \t\n \tleftWalk = new /*Masked*/Animation(\n\t\t\t\t\t\t leftWalkImgs, \n\t\t\t\t\t\t Actor.ANIM_DURATION, \n\t\t\t\t\t\t autoUpdate);\n\n \trightWalk = new /*Masked*/Animation(\n \t\t\t\t\t\trightWalkImgs, \n \t\t\t\t\t\tActor.ANIM_DURATION, \n\t\t\t\t autoUpdate);\n \t\n \tleftStand = new /*Masked*/Animation(\n \t\t\t\t\t\tleftStandImgs, \n\t\t\t\t\t\t\tActor.ANIM_DURATION, \n\t\t\t\t\t\t\tautoUpdate);\n \t\n \trightStand = new /*Masked*/Animation(\n \t\t\t\t\t\trightStandImgs, \n \t\t\t\t\t\tActor.ANIM_DURATION,\n \t\t\t\t\t\tautoUpdate);\n \t\n \tsetInitialAnim();\n }",
"@Override\n\t\t\t\t\tpublic void onAnimationStart(Animator animation) {\n\t\t\t\t\t\t\n\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\tpublic void onAnimationStart(Animation arg0) {\n\n\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\tpublic void onAnimationStart(Animation arg0) {\n\n\t\t\t\t\t\t\t}",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n \t\n super.onCreate(savedInstanceState);\n setActionBarContentView(R.layout.activity_animation);\n \n // Get the PatternRecord.\n Bundle extras = getIntent().getExtras();\n if (extras== null){\n \tToast.makeText(getApplicationContext(), \"ERROR\",\n Toast.LENGTH_SHORT).show();\n }\n pattern_record = (PatternRecord) extras.getParcelable(\"pattern_record\");\n \n // TODO Fred: See http://android.cyrilmottier.com/?p=381 and\n // http://android.cyrilmottier.com/?p=450\n // That might be necessary because computation takes some time\n \n // Initialize Juggling Renderer and View\n try {\n \trenderer = new JugglingRenderer(this, getJMLPattern(pattern_record));\n } catch (Exception e) {\n \t// Note: Necessity to have the 2 following instruction to exit Activity: finish(); return;\n \t// because finish() does not work until onCreate() return control to system.\n \tToast.makeText(this, getString(R.string.invalid_pattern), Toast.LENGTH_LONG).show();\n \tfinish();\n \treturn;\n }\n\n\n // If load previous state if available\n if ( savedInstanceState != null )\n {\n \tsuper.onRestoreInstanceState(savedInstanceState);\n \t \t\n\t\t\t// Is animation Frozen?\n \tthis.renderer.freeze = savedInstanceState.getBoolean(\"mFreeze\");\t\n\t\t\t\n\t\t\t// Time of the animation in the storyboard \t\n\t\t\tthis.renderer.setTime(savedInstanceState.getDouble(\"mTime\"));\n\t\t\t\n\t\t\t// Accumulated rotation\n\t\t\tthis.renderer.mAccumulatedRotation = savedInstanceState.getFloatArray(\"mAccumulatedRotation\");\n\t\t\t\n\t\t\t// Current zoom value\n\t\t\tthis.renderer.mZoom = savedInstanceState.getFloat(\"mZoom\");\n\t\t\t\n\t\t\t// Value of the slowdown\n\t\t\tAnimatorPrefs prefs = renderer.getPrefs();\n \tprefs.slowdown = savedInstanceState.getDouble(\"mSlowdown\");\n \trenderer.setPrefs(prefs);\n \trenderer.syncToPattern();\n \t\n }\n \n \tmGLSurfaceView = (TouchSurfaceView) findViewById(R.id.surface);\n \tmGLSurfaceView.setRenderer(renderer);\n\t\n setTitle(pattern_record.getDisplay());\n \n getActionBar().setOnClickListener(clickListener);\n\n StarActionBarItem starItem = (StarActionBarItem) getActionBar()\n \t\t.newActionBarItem(StarActionBarItem.class)\n \t\t.setContentDescription(R.string.gd_star);\n starItem.setTrick(new Trick(pattern_record, this));\n \n addActionBarItem(starItem);\n addActionBarItem(ActionBarItem.Type.Compose, R.id.action_bar_compose);\n addActionBarItem(ActionBarItem.Type.Info, R.id.action_bar_view_info);\n \n /** QuickAction. */\n quickActionGrid = new QuickActionGridTrick(this);\n \n // Assign Speed SeekBar Listener\n SeekBar speedSeekbar = (SeekBar) findViewById(R.id.animation_speed_seekbar);\n SharedPreferences sp = this.getSharedPreferences(\"com.jonglen7.jugglinglab_preferences\", 0);\n speedSeekbar.setOnSeekBarChangeListener(new OnSeekBarChangeListener() {\n \n public void onProgressChanged(SeekBar seekBar, int progress,\n boolean fromTouch) {\n \tAnimatorPrefs prefs = renderer.getPrefs();\n \tprefs.slowdown = 250 / (Math.pow((double)progress, 1.6) + 1);\n \trenderer.setPrefs(prefs);\n \trenderer.syncToPattern();\n }\n public void onStartTrackingTouch(SeekBar seekBar) {\n //ignorer\n }\n public void onStopTrackingTouch(SeekBar seekBar) {\n //ignorer\n }\n });\n\n // Get speed value from preferences\n // I, Romain, was not able to use a SeekBarPreference so I had to use\n // a EditTextPreference in settings.xml. I was able to display the\n // SeekBar but its value was not kept in the preferences\n int speed = 20;\n String animation_speed = sp.getString(\"animation_speed\", \"\");\n if (animation_speed.length() > 0) {\n // Keep the speed between 1 and 50\n // TODO: The range checking should probably be in SettingsActivity\n // because here we are changing the speed value, in the preferences,\n // only when the user starts the animation.\n // Another way would be not to limit the valid range that the speed\n // can take.\n speed = Math.min(Math.max(1, Integer.parseInt(animation_speed)), 50);\n }\n // Save the value of the speed in the preferences\n sp.edit().putString(\"animation_speed\", Integer.toString(speed)).commit();\n\n speedSeekbar.setProgress(speed);\n\n \t// ZoomButtons\n mZoomIn = (ZoomButton) findViewById(R.id.animation_btn_zoom_in);\n mZoomOut = (ZoomButton) findViewById(R.id.animation_btn_zoom_out);\n \n mZoomIn.setOnClickListener(new OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tmGLSurfaceView.zoomIn();\n\t\t\t}\n\t\t});\n \n mZoomOut.setOnClickListener(new OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tmGLSurfaceView.zoomOut();\n\t\t\t}\n\t\t});\n \n // Button\n mResetAnim = (Button) findViewById(R.id.animation_btn_reset_anim);\n \n mResetAnim.setOnClickListener(new OnClickListener() {\n @Override\n public void onClick(View v) {\n mGLSurfaceView.resetAnim();\n }\n });\n \n }",
"public Controller()\n\t{\n\t\ttheParser = new Parser();\n\t\tstarList = theParser.getStars();\n\t\tmessierList = theParser.getMessierObjects();\n\t\tmoon = new Moon(\"moon\");\n\t\tsun = new Sun(\"sun\");\n\t\tconstellationList = theParser.getConstellations();\n\t\tplanetList = new ArrayList<Planet>();\n\t\ttheCalculator = new Calculator();\n\t\tepoch2000JD = 2451545.0;\n\t}",
"@Override\n\tpublic void create () {\n\t\tgempiresAssetHandler = new GempiresAssetHandler(this);\n\t\tbatch = new SpriteBatch();\n\t\tcastle = new CastleScreen(this);\n\t\tsetScreen(new MainMenuScreen(this));\n\t}",
"AnimationView setAnimationView(AnimationView view);",
"public Animation(ArrayList frames) {\n\t\t// Set the frames\n\t\tthis.frames = frames;\n\t}",
"@Override\n protected void animStart() {\n }",
"public RJGUIModel () {\n\t}",
"@Override\n\t\t\t\t\tpublic void onAnimationStart(Animation arg0) {\n\n\t\t\t\t\t}",
"@Override\r\n\t\t\tpublic void onAnimationStart(Animation arg0) {\n\t\t\t\t\r\n\t\t\t}",
"public void start()\n {\n animator = new Thread(this);\n animator.start();\n }",
"@Override\n\tpublic void onAnimationStart(Animation arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void onAnimationStart(Animation arg0) {\n\t\t\n\t}",
"@Override\n public void create() {\n\n batch = new SpriteBatch();\n manager = new AssetManager();\n\n manager.load(\"audio/main_theme.mp3\", Music.class);\n // manager.load(\"String sonido\", Sound.class);\n manager.load(\"sprites/dragon.pack\", TextureAtlas.class);\n manager.load(\"sprites/vanyr.pack\", TextureAtlas.class);\n manager.finishLoading();\n\n setScreen(new PlayScreen(this));\n\n }",
"public VisualView(IModel model1, int tickPerSecond) {\n super();\n this.tickPerSecond = tickPerSecond;\n panel = new MyPanel(model1, tickPerSecond);\n model = model1;\n }",
"public void startAnimation() {\r\n\t\tani.start();\r\n\t}"
]
| [
"0.7299208",
"0.7159686",
"0.70293164",
"0.7006586",
"0.6741383",
"0.66637456",
"0.66173214",
"0.6592576",
"0.6587019",
"0.6445001",
"0.64405036",
"0.6320196",
"0.61035246",
"0.60996157",
"0.6082303",
"0.6080783",
"0.60799545",
"0.60756993",
"0.6067401",
"0.6025397",
"0.6012178",
"0.60005087",
"0.59995407",
"0.598707",
"0.5950046",
"0.59259605",
"0.5914065",
"0.5901916",
"0.58963096",
"0.5877111",
"0.5872838",
"0.58649683",
"0.5861957",
"0.58596313",
"0.5838367",
"0.583438",
"0.5821421",
"0.5806862",
"0.577832",
"0.57606715",
"0.5745979",
"0.5741866",
"0.5731495",
"0.5725843",
"0.57245743",
"0.57219464",
"0.5709207",
"0.5706025",
"0.57022154",
"0.5692763",
"0.5690875",
"0.5690358",
"0.5673528",
"0.5673252",
"0.5663978",
"0.5649821",
"0.56489277",
"0.5647376",
"0.56425726",
"0.56398386",
"0.56398386",
"0.56345654",
"0.5631183",
"0.5628953",
"0.5628758",
"0.56282073",
"0.56261575",
"0.5623073",
"0.56225425",
"0.5620749",
"0.56203014",
"0.5619825",
"0.5618745",
"0.56137973",
"0.56128657",
"0.5610252",
"0.5606743",
"0.5606743",
"0.5606743",
"0.5606743",
"0.56038743",
"0.5597285",
"0.5597234",
"0.5587797",
"0.5587797",
"0.55825645",
"0.557694",
"0.5575341",
"0.55663335",
"0.55647707",
"0.5561524",
"0.554668",
"0.5532391",
"0.5531346",
"0.55213463",
"0.55175394",
"0.55175394",
"0.5517417",
"0.5511606",
"0.5508651"
]
| 0.5896064 | 29 |
_________________________________ EXCEPTIONS: Rectangle ______________________________________. | @Test(expected = IllegalArgumentException.class)
public void sameShapeName() {
testAnimation.addShape(r, 1, 100);
// new shape with same name
IShape f = new Rectangle("R",
2, 4,
3, 50, 10,
30.0, 75.0);
testAnimation.addShape(f, 30, 80);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test(expected = IllegalArgumentException.class)\n public void invalidRectangleWidthNotGreaterThan0() {\n model1.addShape(Rectangle.createRectangle(\"R\", new Point.Double(200, 200),\n new Color(1, 0, 0), 1, 0, -50, 100));\n }",
"void createRectangles();",
"public InvalidRectangleException(String message) {\n\t\tsuper(message);\n\t}",
"@Test(expected = IllegalArgumentException.class)\n public void invalidRectangleHeightNotGreaterThan0() {\n model1.addShape(Rectangle.createRectangle(\"R\", new Point.Double(200, 200),\n new Color(1, 0, 0), 1, 0, 50, -100));\n }",
"public Rectangle getRectangle();",
"Rectangle getCollisionRectangle();",
"Rectangle getCollisionRectangle();",
"public abstract Rectangle getBounds();",
"public abstract Rectangle getBounds();",
"public abstract Rectangle getBounds();",
"public void fillRectangle(RectangleShape rectangle);",
"@Override\n\tpublic boolean isMyRectangle() {\n\t\treturn false;\n\t}",
"public Rectangle getInvalidatedRectangle() {\n return rect;\n }",
"public CustomRectangle() { }",
"Rectangle getRect(){\n \treturn new Rectangle(x,y,70,25);\n }",
"@Test\n public void testConstructorInvalidInputs() {\n try {\n Rectangle r5 = new Rectangle(-7, 4, new Color(255, 0, 0),\n new Position2D(50, 75));\n fail();\n } catch (IllegalArgumentException e) {\n // pass!\n }\n try {\n Rectangle r6 = new Rectangle(7, -4, new Color(255, 0, 0),\n new Position2D(50, 75));\n fail();\n } catch (IllegalArgumentException e) {\n // pass!\n }\n try {\n Rectangle r7 = new Rectangle(7, 4, null, new Position2D(50, 75));\n fail();\n } catch (IllegalArgumentException e) {\n // pass!\n }\n try {\n Rectangle r8 = new Rectangle(7, 4, new Color(255, 0, 0), null);\n fail();\n } catch (IllegalArgumentException e) {\n // pass!\n }\n try {\n Rectangle r9 = new Rectangle(-7, 4, null, null);\n fail();\n } catch (IllegalArgumentException e) {\n // pass!\n }\n }",
"private static void addRectangle(String[] input) throws NumberFormatException, IncorrectParametersException{\n if (input.length == 5){\n try{\n int x1 = Integer.parseInt(input[1]); \n int y1 = Integer.parseInt(input[2]);\n int x2 = Integer.parseInt(input[3]); \n int y2 = Integer.parseInt(input[4]);\n try{\n canvas.createRectangle(x1, y1, x2, y2);\n System.out.println(canvas.render());\n } catch (NullPointerException ex) {\n System.out.println(\"Initialise a new canvas first!\");\n }\n } catch (NumberFormatException ex) {\n System.out.println(\"HELP: to create a new rectangle enter `R x1 y1 x2 y2`, with (x1,y1) being the upper left corner and (x2,y2) the lower right one.\");\n }\n } else {\n System.out.println(\"HELP: to create a new rectangle enter `R x1 y1 x2 y2`, with (x1,y1) being the upper left corner and (x2,y2) the lower right one.\");\n throw new IncorrectParametersException(\"\");\n }\n }",
"Rectangle(){\n height = 1;\n width = 1;\n }",
"@Test(expected = IllegalArgumentException.class)\n public void testNoScaleOvalOnRectangle() {\n model1.addShape(Rectangle.createRectangle(\"R\", new Point.Double(500, 200),\n new Color(0, 0, 0), 0, 10, 10, 10));\n model1.addAction(ScaleOvalAction.createScaleOvalAction(\"R\", 0, 100,\n 100, 100, 1, 1));\n }",
"@Test\r\n public void testRectangleDoubler() {\r\n System.out.println(\"testRectangleDoubler\");\r\n ad = new AreaDoubler();\r\n r.accept(ad);\r\n \r\n Rectangle dr = (Rectangle)ad.getFigureDoubled();\r\n double h2 = r.getHeight()* Math.sqrt(2.0);\r\n double w2 = r.getWidth()* Math.sqrt(2.0);\r\n \r\n assertEquals(h2, dr.getHeight(), 0.02);\r\n assertEquals(w2, dr.getWidth(), 0.02);\r\n\r\n }",
"public Rectangle getShape(){\n return myRectangle;\n }",
"public Shape getRectangle() {\n return rectangle;\n }",
"@Override\r\n\tpublic Rectangle getRect() {\n\t\treturn null;\r\n\t}",
"Rectangle(double newWidth, double newHeight){\n height = newHeight;\n width = newWidth;\n }",
"public Rectangle getRectangle() {\n return rectangle;\n }",
"@Test\n public void testcalAreaRectangle3() {\n double ex = -4;\n \n startPoint.setX(1);\n startPoint.setY(1);\n endPoint.setX(3);\n endPoint.setY(3);\n \n double ac = rec.calAreaRectangle(startPoint, endPoint);\n assertNotEquals(ex, ac, 0);\n }",
"boolean hasRect();",
"void setBounds(Rectangle rectangle);",
"public Rectangle() {\n }",
"public Rectangle() {\n }",
"@Test(expected = IllegalArgumentException.class)\n public void invalidShapeDisappearsBeforeAppearing() {\n model1.addShape(Rectangle.createRectangle(\"R\", new Point.Double(200, 200),\n new Color(1, 0, 0), 1, 0, 50, 100));\n }",
"@Test\n public void testcalAreaRectangle4() {\n double ex = 4;\n \n startPoint.setX(-1);\n startPoint.setY(1);\n endPoint.setX(3);\n endPoint.setY(3);\n \n double ac = rec.calAreaRectangle(startPoint, endPoint);\n assertNotEquals(ex, ac, 0);\n }",
"public void testCreateRectangle() {\n Size2D s = new Size2D(3.0, 8.0);\n assertEquals(new Rectangle2D.Double(-0.5, -2.0, 3.0, 8.0), \n RectangleAnchor.createRectangle(s, 1.0, 2.0, RectangleAnchor.CENTER));\n assertEquals(new Rectangle2D.Double(1.0, -2.0, 3.0, 8.0), \n RectangleAnchor.createRectangle(s, 1.0, 2.0, RectangleAnchor.LEFT));\n assertEquals(new Rectangle2D.Double(-2.0, -2.0, 3.0, 8.0), \n RectangleAnchor.createRectangle(s, 1.0, 2.0, RectangleAnchor.RIGHT));\n assertEquals(new Rectangle2D.Double(-0.5, 2.0, 3.0, 8.0), \n RectangleAnchor.createRectangle(s, 1.0, 2.0, RectangleAnchor.TOP));\n assertEquals(new Rectangle2D.Double(1.0, 2.0, 3.0, 8.0), \n RectangleAnchor.createRectangle(s, 1.0, 2.0, RectangleAnchor.TOP_LEFT));\n assertEquals(new Rectangle2D.Double(-2.0, 2.0, 3.0, 8.0), \n RectangleAnchor.createRectangle(s, 1.0, 2.0, RectangleAnchor.TOP_RIGHT));\n assertEquals(new Rectangle2D.Double(-0.5, -6.0, 3.0, 8.0), \n RectangleAnchor.createRectangle(s, 1.0, 2.0, RectangleAnchor.BOTTOM));\n assertEquals(new Rectangle2D.Double(1.0, -6.0, 3.0, 8.0), \n RectangleAnchor.createRectangle(s, 1.0, 2.0, RectangleAnchor.BOTTOM_LEFT));\n assertEquals(new Rectangle2D.Double(-2.0, -6.0, 3.0, 8.0), \n RectangleAnchor.createRectangle(s, 1.0, 2.0, RectangleAnchor.BOTTOM_RIGHT));\n }",
"@Test\n public void testcalAreaRectangle2() {\n double ex = 4;\n \n startPoint.setX(-1);\n startPoint.setY(-1);\n endPoint.setX(-3);\n endPoint.setY(-3);\n \n double ac = rec.calAreaRectangle(startPoint, endPoint);\n assertEquals(ex, ac, 0);\n }",
"@java.lang.Override\n public boolean hasRect() {\n return instance.hasRect();\n }",
"@Override\n\tpublic String getShapeType() {\n\t\treturn \"Rectangle\";\n\t}",
"@Override\n\tpublic void draw() {\n\t\tSystem.out.println(\"Here is the method to draw a Rectangle\");\n\t}",
"protected void createRect()\r\n\t{\r\n\t\trect = new Rectangle(getX(),getY(),width,height);\r\n\t}",
"Rectangle getBounds();",
"Rectangle() {\r\n\t\tlength = 1.0;\r\n\t\twidth = 1.0;\r\n\t}",
"public abstract Rectangle getSnapshotSquareBounds();",
"public void setBounds(Rectangle2D aRect)\n{\n setBounds(aRect.getX(), aRect.getY(), aRect.getWidth(), aRect.getHeight());\n}",
"private void checkRep() {\n assert (width <= Board.SIDELENGTH);\n assert (height <= Board.SIDELENGTH);\n assert (this.boundingBoxPosition.x() >= 0 && this.boundingBoxPosition.x() <= Board.SIDELENGTH);\n assert (this.boundingBoxPosition.y() >= 0 && this.boundingBoxPosition.y() <= Board.SIDELENGTH);\n }",
"@Test\r\n\tpublic void testArea() {\r\n\t\tint area = LENGTH * WIDTH;\r\n\t\tassertEquals(area, validRectangle.area());\r\n\t}",
"public Rectangle getBounds();",
"public Rectangle getBounds();",
"@Override\n\tpublic String getShape() {\n\t\treturn \"Rectangle\";\n\t}",
"@Test(expected = IllegalArgumentException.class)\n public void testRectangleScaleWidthToNegative() {\n model1.addShape(Rectangle.createRectangle(\"R\", new Point.Double(200, 200),\n new Color(1, 0, 0), 1, 100, 50.0, 100.0));\n model1.addShape(Oval.createOval(\"C\", new Point.Double(500, 100),\n new Color(0, 0, 1), 6, 100, 60.0, 30.0));\n model1.addAction(ScaleRectangleAction.createScaleRectangleAction(\"R\", 10, 50,\n 50, 100, -51, 100));\n }",
"Rectangle(int l, int w)\n {\n\tlength = l;\n\twidth = w;\n }",
"@Test(expected = IllegalArgumentException.class)\n public void invalidShapeDispersantAppearsBefore0() {\n model1.addShape(Rectangle.createRectangle(\"R\", new Point.Double(200, 200),\n new Color(1, 0, 0), -10, -1, 50, 100));\n }",
"@Test(expected = IllegalArgumentException.class)\n public void testRectangleScaleHeightToNegative() {\n model1.addShape(Rectangle.createRectangle(\"R\", new Point.Double(200, 200),\n new Color(1, 0, 0), 1, 100, 50.0, 100.0));\n model1.addShape(Oval.createOval(\"C\", new Point.Double(500, 100),\n new Color(0, 0, 1), 6, 100, 60.0, 30.0));\n model1.addAction(ScaleRectangleAction.createScaleRectangleAction(\"R\", 10, 50,\n 50, 100, 0, -101));\n }",
"@Test(expected = IllegalArgumentException.class)\n public void testScaleRectangleDuringSamePeriod() {\n model1.addShape(Rectangle.createRectangle(\"C\", new Point.Double(500, 100),\n new Color(0, 0, 1), 6, 100, 60.0, 30.0));\n model1.addAction(ScaleRectangleAction.createScaleRectangleAction(\"R\", 10, 50,\n 100, 100, 100, 100));\n model1.addAction(ScaleRectangleAction.createScaleRectangleAction(\"R\", 40, 60,\n 100, 100, 10, 10));\n }",
"private boolean verifyBounds() {\r\n\t if((x>RobotController.BOUNDS_X || y>RobotController.BOUNDS_Y)\r\n\t || x<0 || y<0){\r\n\t return false;\r\n\t }\r\n\t return true;\r\n\t }",
"@Test(expected = IllegalArgumentException.class)\n public void invalidShapeAppearsBefore0() {\n model1.addShape(Rectangle.createRectangle(\"R\", new Point.Double(200, 200),\n new Color(1, 0, 0), -1, 100, 50, 100));\n }",
"public Rectangle() {\n\t\tthis.corner = new Point();\n\t\tthis.size = new Point();\n\t}",
"@Test(expected = IllegalArgumentException.class)\n public void testRectangleScaleHeightToZero() {\n model1.addShape(Rectangle.createRectangle(\"R\", new Point.Double(200, 200),\n new Color(1, 0, 0), 1, 100, 50.0, 100.0));\n model1.addShape(Oval.createOval(\"C\", new Point.Double(500, 100),\n new Color(0, 0, 1), 6, 100, 60.0, 30.0));\n model1.addAction(ScaleRectangleAction.createScaleRectangleAction(\"R\", 10, 50,\n 50, 100, 10, 0));\n }",
"public Rectangle() {\n x = 0;\n y = 0;\n width = 0;\n height = 0;\n }",
"public Rectangle () {\n\t\t\n\t}",
"@java.lang.Override\n public boolean hasRect2Value() {\n return typeCase_ == 7;\n }",
"@Override\n public void setRectangle() {\n switch (direction){\n case 0:\n rectangle.setLocation((int)x+5,(int)y+8);\n break;\n case 2:\n rectangle.setLocation((int)x+5,(int)y+8);\n break;\n case 1:\n rectangle.setLocation((int)x+13,(int)y+8);\n break;\n case 3:\n rectangle.setLocation((int)x+2,(int)y+8);\n break;\n }\n\n }",
"@Test\n public void testcalAreaRectangle1() {\n double ex = 4;\n \n startPoint.setX(1);\n startPoint.setY(1);\n endPoint.setX(3);\n endPoint.setY(3);\n \n double ac = rec.calAreaRectangle(startPoint, endPoint);\n assertEquals(ex, ac, 0);\n }",
"@Override\r\n\tpublic Rectangle getBound() {\n\t\treturn new Rectangle((int)x, (int)y, (int)width, (int)height);\r\n\t}",
"private boolean hasValidBounds() {\n\n\n\n return false;\n }",
"private Geometry createRectangle(double x, double y, double w, double h) {\n Coordinate[] coords = {\n new Coordinate(x, y), new Coordinate(x, y + h),\n new Coordinate(x + w, y + h), new Coordinate(x + w, y),\n new Coordinate(x, y)\n };\n LinearRing lr = geometry.getFactory().createLinearRing(coords);\n\n return geometry.getFactory().createPolygon(lr, null);\n }",
"public abstract Rectangle getSnapshotBounds();",
"@Test\n public void testRectangleConstructor() {\n defaultShape1 = new Rectangle(defaultColor1, defaultPosition1, defaultSize1);\n // If successful the type should be rectangle.\n assertEquals(TypeOfShape.RECTANGLE, defaultShape1.getType());\n assertNotEquals(defaultShape1.getType(), TypeOfShape.OVAL);\n }",
"public Rectangle() {\n this.length = 0;\n this.width = 0;\n\n }",
"@java.lang.Override\n public boolean hasRect2Value() {\n return typeCase_ == 7;\n }",
"Rectangle getCollisionBox();",
"@Override\n\tpublic boolean collidesWithRectangle(Rectangle rectangle) {\n\t\treturn false;\n\t}",
"boolean hasRect2Value();",
"public void SubRect(){\n\t\n}",
"@Override\n\tpublic void CheckBounds() {\n\t\t\n\t}",
"@Test\r\n\tpublic void testLength() {\r\n\t\tassertEquals(LENGTH, validRectangle.length());\r\n\t}",
"Rectangle(int width, int height){\n area = width * height;\n }",
"public Rectangle()\n {\n length = 1;\n width = 1;\n count++;\n }",
"@Test(timeout = 4000)\n public void test077() throws Throwable {\n Range range0 = Range.ofLength(0L);\n range0.toString();\n range0.getBegin();\n range0.intersects(range0);\n range0.getEnd();\n // Undeclared exception!\n try { \n Range.CoordinateSystem.valueOf(\"\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // No enum constant org.jcvi.jillion.core.Range.CoordinateSystem.\n //\n verifyException(\"java.lang.Enum\", e);\n }\n }",
"@Override\n\tpublic Rectangle2D getRectangle() {\n\t\treturn rect;\n\t}",
"@Test(expected = IllegalArgumentException.class)\n public void testRectangleScaleWidthToZero() {\n model1.addShape(Rectangle.createRectangle(\"R\", new Point.Double(200, 200),\n new Color(1, 0, 0), 1, 100, 50.0, 100.0));\n model1.addShape(Oval.createOval(\"C\", new Point.Double(500, 100),\n new Color(0, 0, 1), 6, 100, 60.0, 30.0));\n model1.addAction(ScaleRectangleAction.createScaleRectangleAction(\"R\", 10, 50,\n 50, 100, 0, 100));\n model1.addAction(new MoveAction(\"C\", 20, 70, new Point.Double(500, 100),\n new Point.Double(0, 300)));\n }",
"@Test(expected = IllegalArgumentException.class)\n public void testNoScaleRectangleOnOval() {\n model1.addShape(Oval.createOval(\"C\", new Point.Double(500, 200),\n new Color(0, 0, 0), 0, 10, 10, 10));\n model1.addAction(ScaleRectangleAction.createScaleRectangleAction(\"C\", 0,\n 100, 100, 100, 1, 1));\n textView1.animate(model1, 1, out);\n }",
"public static void main(String[] args) {\n Rectangle myRect; //ISSUE 2: No existe la clase Rectangle\n //SOLVE 2: Se creo la clase Rectangle dentro del mismo paquete\n //ISSUE 2.1: No se ha instanciado myRectangle\n myRect = new Rectangle();//SOLVE 2.1: Se instancio my Rect\n myRect.width = 40; //ISSUE 3: No existe un atributo que se llame width dentro de la clase Rectangle\n //SOLVE 3: Se creo la propiedad width a la clase rectangle\n myRect.height = 50; //ISSUE 4: No existe un atributo que se llame height dentro de la clase Rectangle\n //SOLVE 4: Se creo la propiedad hright a la clase rectangle\n System.out.println(\"myRect's area is \" + myRect.area()); //ISSUE 5: No existe el metodo Area dentro de la clase Rectangle\n //SOLVE 5: Se creo el metodo Area en la clase rectangle que multiplica width por height\n }",
"@Before\r\n\tpublic void setUp() {\r\n\t\tvalidRectangle = new Rectangle(LENGTH, WIDTH);\r\n\t}",
"public void fillRectangle(int x, int y, int width, int height);",
"boolean rectRect(float r1x, float r1y, float r1w, float r1h, float r2x, float r2y, float r2w, float r2h) {\n\t \n\t // are the sides of one rectangle touching the other?\n\t \n\t if (r1x + r1w >= r2x && // r1 right edge past r2 left\n\t r1x <= r2x + r2w && // r1 left edge past r2 right\n\t r1y + r1h >= r2y && // r1 top edge past r2 bottom\n\t r1y <= r2y + r2h) { // r1 bottom edge past r2 top\n\t return true;\n\t }\n\t return false;\n\t}",
"public Rectangle() {\n\t\twidth = 1;\n\t\theight = 1;\n\t}",
"Rectangle getBoundingBox(Rectangle rect);",
"@Override\n public void rect(double x, double y, double width, double height) {\n graphicsEnvironmentImpl.rect(canvas, x, y, width, height);\n }",
"public RectangleShape(int xCoord, int yCoord, int widthOfRect, int heightOfRect)\n {\n System.out.println(\"setting x to: \"+ xCoord+\" & setting y to: \"+ yCoord);\n x = xCoord;\n y = yCoord;\n width = widthOfRect;\n height = heightOfRect;\n }",
"public RectangleAdapter(Shapes rect) {\n super(rect);\n //this.rect = (Rectangle)rect;\n }",
"@Override\n public Rectangle getBounds() {\n return new Rectangle(x,y,64,64);\n }",
"protected void damageRect(int x, int y, int width, int height)\r\n\t{\r\n\tif (needsPaint)\r\n\t\t{\r\n\t\tint ax = x + width;\r\n\t\tint ay = y + height;\r\n\t\tint bx = paintX + paintWidth;\r\n\t\tint by = paintY + paintHeight;\r\n\t\tif (paintX < x)\r\n\t\t\tx = paintX;\r\n\t\tif (paintY < y)\r\n\t\t\ty = paintY;\r\n\t\tif (ax > bx)\r\n\t\t\twidth = ax - x;\r\n\t\telse\r\n\t\t\twidth = bx - x;\r\n\t\tif (ay > by)\r\n\t\t\theight = ay - y;\r\n\t\telse\r\n\t\t\theight = by - y;\r\n\t\t}\r\n\tpaintX = x;\r\n\tpaintY = y;\r\n\tpaintWidth = width;\r\n\tpaintHeight = height;\r\n\tneedsPaint = true;\r\n\t}",
"private void drawRectangle(GraphicsContext gc, double x, double y) {\r\n GraphicsContext gc2 = myCanvas.getGraphicsContext2D();\r\n gc2.setFill(randomColor());\r\n gc2.fillRect(x - 20, y - 20, 40, 40);\r\n }",
"Rectangle getPowerRect(){\n \treturn new Rectangle(powerX,powerY,35,35);\n }",
"protected void onBadCoords()\n\t{\n\t}",
"public PDRectangle getRectDifference() {\n/* 615 */ COSBase base = getCOSObject().getDictionaryObject(COSName.RD);\n/* 616 */ if (base instanceof COSArray)\n/* */ {\n/* 618 */ return new PDRectangle((COSArray)base);\n/* */ }\n/* 620 */ return null;\n/* */ }",
"@Test\r\n\tpublic void testPerimeter() {\r\n\t\tint perimeter = LENGTH + WIDTH + LENGTH + WIDTH;\r\n\t\tassertEquals(perimeter, validRectangle.perimeter());\r\n\t}",
"public void createRectangle(double x, double y, double width, double height) {\r\n GRect rectangle = new GRect(x, y, width, height);\r\n rectangle.setFilled(true);\r\n rectangle.setFillColor(Color.GRAY);\r\n rectangle.setColor(Color.WHITE);\r\n add(rectangle);\r\n }",
"@Test\n public void test05() throws Throwable {\n Rectangle2D.Double rectangle2D_Double0 = new Rectangle2D.Double(0.0, 43.741, 720.401, 720.401);\n rectangle2D_Double0.setRect((-1622.105496642), 1.0, 0.0, 64.8);\n }",
"@Test\n public void printInfoRectangleNoMoves() {\n model1.addShape(Rectangle.createRectangle(\"R\", new Point.Double(200, 200),\n new Color(1, 0, 0), 1, 100, 50.0, 100.0));\n textView1.animate(model1, 1, out);\n assertEquals(\"Shapes:\\nName: R\\n\"\n + \"Type: rectangle\\n\"\n + \"Lower-left corner: (200.0,200.0), Width: 50.0, Height: 100.0, Color: (1.0,0.0,0.0)\\n\"\n + \"Appears at t=1.0s\\n\"\n + \"Disappears at t=100.0s\\n\\n\", out.toString());\n }",
"public Rectangle(Point point1, Point point2){\n super(4);\n if(point1.getX() == point2.getX() || point1.getY() == point2.getY())\n throw new IllegalArgumentException(\"Input points are not opposite to each other.\");\n int point1X = point1.getX(); //stores the x of the first point\n int point1Y = point1.getY(); //stores the y of the first point\n int point2X = point2.getX(); //stores the x of the second point\n int point2Y = point2.getY(); //stores the y of the second point\n \n if(point1X < point2X){\n width = point2X - point1X;\n if(point1Y < point2Y){\n height = point2Y - point1Y;\n topLine = new Line(point1X, point1Y, point2X, point1Y);\n rightLine = new Line(point2X, point1Y, point2X, point2Y);\n bottomLine = new Line(point2X, point2Y, point1X, point2Y);\n leftLine = new Line(point1X, point2Y, point1X, point1Y);\n }\n if(point1Y > point2Y){\n height = point1Y - point2Y;\n topLine = new Line(point1X, point2Y, point2X, point2Y);\n rightLine = new Line(point2X, point2Y, point2X, point1Y);\n bottomLine = new Line(point2X, point1Y, point1X, point1Y);\n leftLine = new Line(point1X, point1Y, point1X, point2Y);\n }\n }\n if(point1X > point2X){\n width = point1X - point2X;\n if(point1Y > point2Y){\n height = point1Y - point2Y;\n bottomLine = new Line(point1X, point1Y, point2X, point1Y);\n leftLine = new Line(point2X, point1Y, point2X, point2Y);\n topLine = new Line(point2X, point2Y, point1X, point2Y);\n rightLine = new Line(point1X, point2Y, point1X, point1Y);\n }\n if(point1Y < point2Y){\n height = point2Y - point1Y;\n leftLine = new Line(point2X, point2Y, point2X, point1Y);\n topLine = new Line(point2X, point1Y, point1X, point1Y);\n rightLine = new Line(point1X, point1Y, point1X, point2Y);\n bottomLine = new Line(point1X, point2Y, point2X, point2Y);\n }\n }\n referencePoint = topLine.getFirstPoint();\n }",
"public Rectangle() {\n\t\tthis.width = 1;\n\t\tthis.hight = 1;\n\t\tcounter++;\n\t}"
]
| [
"0.7306919",
"0.7268894",
"0.7172065",
"0.71085393",
"0.70573205",
"0.70196575",
"0.70196575",
"0.69488037",
"0.69488037",
"0.69488037",
"0.6922388",
"0.6841099",
"0.6824507",
"0.68168205",
"0.67886215",
"0.6765925",
"0.6715539",
"0.6673513",
"0.6654364",
"0.6638039",
"0.66328204",
"0.6627553",
"0.66119",
"0.65617377",
"0.65441394",
"0.6540277",
"0.65383124",
"0.65271133",
"0.65190744",
"0.65190744",
"0.65154296",
"0.6507183",
"0.6502814",
"0.650006",
"0.64947426",
"0.6481968",
"0.6471837",
"0.6467709",
"0.646543",
"0.6456337",
"0.64506334",
"0.64463526",
"0.64423597",
"0.6436833",
"0.643568",
"0.643568",
"0.6433081",
"0.642898",
"0.64271915",
"0.6406829",
"0.6403802",
"0.6399601",
"0.6392721",
"0.6391799",
"0.6389983",
"0.63794523",
"0.63781947",
"0.6375618",
"0.637356",
"0.63716793",
"0.63716483",
"0.6369957",
"0.63533473",
"0.6350656",
"0.63407993",
"0.63359594",
"0.63332176",
"0.6322505",
"0.6299771",
"0.6291072",
"0.6279667",
"0.6279464",
"0.6275094",
"0.6270854",
"0.62658006",
"0.6257848",
"0.62534904",
"0.6251653",
"0.62509674",
"0.6233649",
"0.6229977",
"0.62218034",
"0.6220155",
"0.6210677",
"0.6210101",
"0.6195847",
"0.619272",
"0.6189029",
"0.6175054",
"0.6173244",
"0.6161459",
"0.6155863",
"0.61521345",
"0.61481464",
"0.614768",
"0.61465204",
"0.61416495",
"0.61405873",
"0.6133801",
"0.61213636",
"0.6120696"
]
| 0.0 | -1 |
___________________________ EXCEPTIONS: Duplicate shape ______________________________________. | @Test(expected = IllegalArgumentException.class)
public void testAddSameShapeTwice() {
testAnimation.addShape(c, 1, 100);
testAnimation.addShape(c, 50, 70);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test(expected = IllegalArgumentException.class)\n public void testNoShapeWithSameName() {\n model1.addShape(Rectangle.createRectangle(\"R\", new Point.Double(500, 200),\n new Color(0, 0, 0), 0, 10, 10, 10));\n model1.addShape(Oval.createOval(\"R\", new Point.Double(500, 200),\n new Color(0, 0, 0), 0, 10, 10, 10));\n }",
"public abstract Shape clone() throws CloneNotSupportedException;",
"@Test(expected = IllegalArgumentException.class)\n public void invalidShapeDisappearsBeforeAppearing() {\n model1.addShape(Rectangle.createRectangle(\"R\", new Point.Double(200, 200),\n new Color(1, 0, 0), 1, 0, 50, 100));\n }",
"public void copyShape(RMShape aShape)\n{\n // Copy bounds\n setBounds(aShape._x, aShape._y, aShape._width, aShape._height);\n \n // Copy roll, scale, skew\n if(aShape.isRSS()) {\n setRoll(aShape.getRoll());\n setScaleXY(aShape.getScaleX(), aShape.getScaleY());\n setSkewXY(aShape.getSkewX(), aShape.getSkewY());\n }\n \n // Copy Stroke, Fill, Effect\n if(!RMUtils.equals(getStroke(), aShape.getStroke())) setStroke(RMUtils.clone(aShape.getStroke()));\n if(!RMUtils.equals(getFill(), aShape.getFill())) setFill(RMUtils.clone(aShape.getFill()));\n if(!RMUtils.equals(getEffect(), aShape.getEffect())) setEffect(RMUtils.clone(aShape.getEffect()));\n \n // Copy Opacity and Visible\n setOpacity(aShape.getOpacity());\n setVisible(aShape.isVisible());\n \n // Copy Name, Url, Hover, Locked\n setName(aShape.getName());\n setURL(aShape.getURL());\n setHover(aShape.getHover());\n setLocked(aShape.isLocked());\n \n // Copy LayoutInfo\n setLayoutInfo(aShape.getLayoutInfo());\n \n // Copy timeline (if this goes back, then RMAnimPathShape(shape) needs to go back to clearing it\n //if(aShape.getTimeline()!=null) setTimeline(aShape.getTimeline().clone(this));\n \n // Copy bindings\n while(getBindingCount()>0) removeBinding(0);\n for(int i=0, iMax=aShape.getBindingCount(); i<iMax; i++)\n addBinding(aShape.getBinding(i).clone());\n}",
"public abstract Shape getCopy();",
"private static void addShaped()\n {}",
"@Test(expected = IllegalArgumentException.class)\n public void sameShapeName() {\n\n testAnimation.addShape(r, 1, 100);\n\n // new shape with same name\n IShape f = new Rectangle(\"R\",\n 2, 4,\n 3, 50, 10,\n 30.0, 75.0);\n\n testAnimation.addShape(f, 30, 80);\n }",
"@Test(expected = IllegalArgumentException.class)\n public void testCantMoveSameShapeInOverlappingTime() {\n model1.addShape(Rectangle.createRectangle(\"R\", new Point.Double(500, 200),\n new Color(0, 0, 0), 0, 10, 10, 10));\n model1.addAction(new MoveAction(\"R\", 0, 100, new Point.Double(500, 200),\n new Point.Double(10, 10)));\n model1.addAction(new MoveAction(\"R\", 50, 150,\n new Point.Double(500, 200), new Point.Double(10, 10)));\n }",
"@Test(expected = IllegalArgumentException.class)\n public void testNoShapeWithSameNameCaseInsensitive() {\n model1.addShape(Rectangle.createRectangle(\"R\", new Point.Double(500, 200),\n new Color(0, 0, 0), 0, 10, 10, 10));\n model1.addShape(Oval.createOval(\"r\", new Point.Double(500, 200),\n new Color(0, 0, 0), 0, 10, 10, 10));\n }",
"@Test(expected = IllegalArgumentException.class)\n public void testMakingShapeWithNullLocation() {\n model1.addShape(Oval.createOval(\"C\", null,\n new Color(0, 0, 1), 6, 100, 60.0, 30.0));\n }",
"public void assignShape() {\n\t\t\n\t}",
"@Test(expected = IllegalArgumentException.class)\n public void invalidShapeDispersantAppearsBefore0() {\n model1.addShape(Rectangle.createRectangle(\"R\", new Point.Double(200, 200),\n new Color(1, 0, 0), -10, -1, 50, 100));\n }",
"@Test(expected = IllegalArgumentException.class)\n public void invalidShapeAppearsBefore0() {\n model1.addShape(Rectangle.createRectangle(\"R\", new Point.Double(200, 200),\n new Color(1, 0, 0), -1, 100, 50, 100));\n }",
"@Test\n\tpublic final void testClone(){\n\t\tShape starting = shape.clone();\n\t\tassertNotNull( starting );\n\t\tshape.shiftDown();\n\t\tCell[] startingCells = starting.getCells();\n\t\tCell[] endingCells = shape.getCells();\n\t\tfor( int i = 0; i < startingCells.length; i++ ){\n\t\t\tassertNotEquals( \"Cell \" + i, startingCells[i], endingCells[i] );\n\t\t}\n\t}",
"@Override\n public void reshape(Shape other) {\n Triangle triangle = (Triangle) other;\n this.a = CloneUtil.clone(triangle.getA());\n this.b = CloneUtil.clone(triangle.getB());\n this.c = CloneUtil.clone(triangle.getC());\n this.toBeFilled = other.toBeFilled;\n this.stroke = other.stroke;\n this.color = new Color(other.color.getRGB());\n // System.out.println(\"Reshape after: \" + this.toString());\n }",
"@Test(expected = IllegalArgumentException.class)\n public void testMakingShapeWithNullName() {\n model1.addShape(Oval.createOval(null, new Point.Double(500, 100),\n new Color(0, 0, 1), 6, 100, 60.0, 30.0));\n }",
"protected abstract boolean isShapeSimple();",
"private static void addShapeless()\n {}",
"public RMShape clone()\n{\n // Do normal version, clear parent, LayoutInfoX, clone RSS\n RMShape clone = (RMShape)super.clone();\n clone._parent = null; clone._layoutInfoX = null;\n clone._rss = RMUtils.clone(_rss);\n \n // Clone stroke, fill, effect\n clone._stroke = null; clone._fill = null; clone._effect = null;\n if(getStroke()!=null) clone.setStroke(getStroke().clone());\n if(getFill()!=null) clone.setFill(getFill().clone());\n if(getEffect()!=null) clone.setEffect(getEffect().clone());\n \n // Copy attributes map\n clone._attrMap = _attrMap.clone();\n \n // If shape has timeline, clone it\n if(getTimeline()!=null)\n clone.setTimeline(getTimeline().clone(clone));\n \n // Clone bindings and add to clone (with hack to make sure clone has it's own, non-shared, attr map)\n for(int i=0, iMax=getBindingCount(); i<iMax; i++) {\n if(i==0) clone.put(\"RibsBindings\", null);\n clone.addBinding(getBinding(i).clone());\n }\n \n // Clone event adapter\n if(getEventAdapter(false)!=null) {\n clone.put(\"EventAdapter\", null);\n clone.getEventAdapter(true).setEnabledEvents(getEventAdapter(true).getEnabledEvents());\n }\n \n // Return clone\n return clone;\n}",
"@Test(expected = IllegalArgumentException.class)\n public void testErrorShapeDoesntExist() {\n model1.addShape(Rectangle.createRectangle(\"R\", new Point.Double(500, 200),\n new Color(0, 0, 0), 0, 10, 10, 10));\n model1.addAction(ScaleOvalAction.createScaleOvalAction(\"O\", 0, 100,\n 100, 100, 1, 1));\n }",
"void addShape(IShape shape);",
"public void fillShape(Shape shape);",
"public void addShape(TShape aShape){\r\n // fShapes.remove(aShape); // just in case it was already there\r\n\r\n /*unfortunately we need to have a front to back screen order, properties at the back\r\n (drawn first), then individuals, finally relations between individuals*/\r\n\r\n /* if (aShape instanceof TLine)\r\n fShapes.add(aShape); // add at the end\r\n else if (aShape instanceof TProperty)\r\n fShapes.add(0,aShape); // add at the beginning\r\n else {\r\n int insertIndex=0;\r\n if (fShapes.size() > 0) {\r\n Iterator iter = fShapes.iterator();\r\n\r\n while (iter.hasNext()) {\r\n if (! ((TShape) iter.next()instanceof TProperty))\r\n break; //put it after rectangles\r\n else\r\n insertIndex++;\r\n }\r\n }\r\n fShapes.add(insertIndex,aShape);\r\n }*/\r\n\r\n\r\n // aShape.setSemantics(fSemantics);\r\n\r\n aShape.addChangeListener(this); // and we'll listen for any of its changes, such as being selected\r\n\r\n addShapeToList(aShape,fShapes);\r\n\r\n if (aShape instanceof TInterpretationBoard)\r\n ((TInterpretationBoard)aShape).setSemantics(fSemantics);\r\n\r\n\r\n fPalette.check(); // some of the names may need updating\r\n\r\n repaint();\r\n }",
"public NewShape() {\r\n\t\tsuper();\r\n\t}",
"@Test(expected = IllegalArgumentException.class)\n public void testMakingShapeWithNullColor() {\n model1.addShape(Oval.createOval(\"C\", new Point.Double(500, 100),\n null, 6, 100, 60.0, 30.0));\n }",
"@Override\n\tpublic void getShape() {\n\n\t}",
"public void dissociateShape() {\n\t\tif(currentShape != null && (groupedShapes.contains(currentShape))) {\n\t\t\tgroupedShapes.remove(currentShape);\n\t\t\tnotifyObservers();\n\t\t}\n\t}",
"protected Shape getShape()\n {\n return null;\n }",
"public RMShape cloneDeep() { return clone(); }",
"public void generateShape() {\n\n //TODO for tetris game - copy added to Tetris\n Shape newShape = null;\n //if(GAME_TO_TEST==GameEnum.TETRIS){\n //newShape = TetrisShapeFactory.getRandomShape(this.board);\n //} else if (GAME_TO_TEST== GameEnum.DRMARIO){\n //newShape = DrMarioShapeFactory.getRandomShape(this.board);\n //}\n\n //Temporary\n //-------------------------------------//\n Image image = null;\n try {\n image = new Image(new FileInputStream(\"resources/BlockPurple.png\"));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n\n int spawnColIndex = 0;\n int spawnRowIndex = 0;\n int tileSize = 0;\n boolean setColor = false;\n boolean setTileBorder = false; //toggle to add boarder to tile\n boolean setImage = true;\n spawnColIndex = (board.gridWidth-1)/2; //half of board width\n spawnRowIndex = 0;\n tileSize = board.tileSize;\n\n Tile tile1 = new Tile(tileSize, setColor, Color.VIOLET, setTileBorder, setImage, image, spawnColIndex,spawnRowIndex, 0 , Direction.DOWN); //Center Tile\n Tile tile2 = new Tile(tileSize, setColor, Color.VIOLET, setTileBorder, setImage, image, spawnColIndex,spawnRowIndex,1 , Direction.RIGHT);\n Tile tile3 = new Tile(tileSize, setColor, Color.VIOLET, setTileBorder, setImage, image, spawnColIndex,spawnRowIndex, 1 , Direction.LEFT);\n Tile tile4 = new Tile(tileSize, setColor, Color.VIOLET, setTileBorder, setImage, image, spawnColIndex,spawnRowIndex, 1 , Direction.DOWN);\n\n List<Tile> tiles = new ArrayList<Tile>();\n tiles.add(tile1);\n tiles.add(tile2);\n tiles.add(tile3);\n tiles.add(tile4);\n newShape = new Shape(tiles);\n\n //set newly created shape as the currently active shape\n this.currentActiveShape = newShape;\n\n //check if spawn area is occupied\n boolean isOccupied =false;\n for (Tile newTile : this.currentActiveShape.tiles) {\n if(this.board.getTile(newTile.columnIndex,newTile.rowIndex)!=null){\n isOccupied = true;\n }\n }\n\n //TODO\n //check if shape reaches top\n if(!isOccupied){\n //add tiles to board\n for (Tile newTile : this.currentActiveShape.tiles) {\n this.board.placeTile(newTile);\n }\n } else {\n //TODO later add Game Over JavaFx message\n System.out.println(\"GAME OVER\");\n\n //TODO Finishlater\n //Text gameoverText = new Text(10,20,\"GAME OVER\");\n //gameoverText.setFill(Color.RED);\n //gameoverText.setX( 100/*( ((board.gridWidth-1)*tileSize)/2)*/ );\n //gameoverText.setY( 100/*( ((board.gridHeight-1)*tileSize)/2)*/ );\n //gameoverText.setStyle(\"-fx-font: 70 arial;\");\n //this.group.getChildren().add(gameoverText);\n\n //Text t = new Text();\n //t.setX(20.0f);\n //t.setY(65.0f);\n //t.setX(100);\n //t.setY(200);\n //t.setText(\"Perspective\");\n //t.setFill(Color.YELLOW);\n //t.setFont(Font.font(null, FontWeight.BOLD, 36));\n //this.group.getChildren().add(t);\n //this.pane.getChildren().add(t);\n\n //System.exit(0);\n }\n\n }",
"@Override\n\tpublic void createCollisionShape() {\n\t\t\n\t}",
"@Test\n public void testCloneShapes() {\n NativeLibraryLoader.loadNativeLibrary(\"bulletjme\", true);\n assetManager.registerLoader(AWTLoader.class, \"jpg\", \"png\");\n assetManager.registerLoader(BinaryLoader.class, \"j3o\");\n assetManager.registerLoader(J3MLoader.class, \"j3m\", \"j3md\");\n assetManager.registerLocator(null, ClasspathLocator.class);\n\n cloneShapesConcave();\n cloneShapesConvex();\n\n // CompoundCollisionShape\n CompoundCollisionShape compound = new CompoundCollisionShape(1);\n CollisionShape capsule = new CapsuleCollisionShape(1f, 1f);\n compound.addChildShape(capsule, 0f, 1f, 0f);\n setParameters(compound, 0f);\n verifyParameters(compound, 0f);\n CollisionShape compoundClone = Heart.deepCopy(compound);\n cloneTest(compound, compoundClone);\n Assert.assertEquals(0.04f, compoundClone.getMargin(), 0f);\n compound.setMargin(0.13f);\n Assert.assertEquals(0.04f, compoundClone.getMargin(), 0f);\n }",
"void add(Shape shape) throws IllegalArgumentException\n {\n // Checking if the shape is already part of the children list or if the\n // shape already has a parent\n if(contains(shape) || shape.parent()!=null)\n {\n // Then throw an error\n throw new IllegalArgumentException();\n }\n\n // If the shape to add is outside of the CarrierShape bounds\n // then throw an error\n if(shape._width+shape._x>_width || shape._height+shape._x>_height)\n {\n throw new IllegalArgumentException();\n }\n\n // Otherwise the shape is added to the children list\n children.add(shape);\n\n // The parent of the shape is set to this CarrierShape\n // to establish a two-way connection\n shape.setParent(this);\n }",
"public abstract boolean ableToReshape(Point p);",
"void add(Shape aShape);",
"@Override\n\t\t public Shape clone()\n\t\t {\n\t\t SZShape s = (SZShape)super.clone();\n\t\t s.position = new Position(position);\n\t\t s.cells = new Cell[cells.length];\n\t\t for(int i = 0; i < cells.length; i++)\n\t\t {\n\t\t \t s.cells[i] = new Cell(cells[i]);\n\t\t }\n\t\t return s;\n\t\t }",
"@Override\n\tpublic Object clone() throws CloneNotSupportedException{\n\t\tShape cloned = this;\n\t\tcloned.setPosition(this.getPosition());\n\t\tcloned.setProperties(this.getProperties());\n\t\tcloned.setColor(this.getColor());\n\t\tcloned.setFillColor(this.getFillColor());\n\t\treturn cloned;\n\t}",
"@Override\r\n public void forbidShape (Shape shape)\r\n {\r\n if (forbiddenShapes == null) {\r\n forbiddenShapes = new HashSet<>();\r\n }\r\n\r\n forbiddenShapes.add(shape);\r\n }",
"@Test(expected = IllegalArgumentException.class)\n public void testAppearEqualsDisappear() {\n testAnimation.addShape(c, 100, 100);\n }",
"@Test(expected = IllegalArgumentException.class)\n public void testNullShape() {\n testAnimation.addShape(null, 1, 100);\n }",
"Shape copy() {\n Shape copyableVersion = null;\n if (shape instanceof Circle)\n copyableVersion = copyCircle();\n else if (shape instanceof Rectangle)\n copyableVersion = copyRect();\n else if (shape instanceof Line)\n copyableVersion = copyLine();\n else if (shape instanceof Polygon)\n copyableVersion = copyPolygon();\n else if (shape instanceof Ellipse)\n copyableVersion = copyPolygon();\n\n return copyableVersion;\n }",
"public void groupShape() {\n\t\tif(currentShape != null && !(groupedShapes.contains(currentShape))) {\n\t\t\tgroupedShapes.add(currentShape);\n\t\t\tnotifyObservers();\n\t\t}\n\t}",
"public EpsShape(Shape shape) {\n\t\tthis(shape,false);\n\t}",
"private void createEdgeForShape(Shape shape) {\n\t\tcurrentShape = shape;\n\t\tif (holdAltKey && !(shape instanceof JoinPoint)) {\n\t\t\tShape edge = createEdge();\n\t\t\t((Edge)edge).setSource(currentShape);\n\t\t\taddShape(edge);\n\t\t\tcurrentShape.setDrawing(false);\n\t\t\tcurrentShape = edge;\n\t\t}\n\t}",
"protected Shape() {}",
"@Override\n\tpublic void BuildShape(Graphics g) {\n\t\t\n\t}",
"private void removeJoinShape(Shape shapeToRemove) {\n\t\t\n\t\tif (shapeToRemove instanceof JoinPoint) {\n\t\t\t\n\t\t\t// Source Edge mean edge which go to this Shape\n\t\t\tEdge source = (Edge) ((JoinPoint) shapeToRemove).getSource();\n\t\t\t\n\t\t\t// Destination Edge mean edge which go out this Shape\n\t\t\tEdge dest = (Edge) ((JoinPoint) shapeToRemove).getDest();\n\t\t\t\n\t\t\tshapes.remove(shapeToRemove);\n\t\t\t\n\t\t\t// Create Edge to join between two shapes\n\t\t\tEdge edge = (Edge) createEdge();\n\t\t\tedge.setSource(source.getSource());\n\t\t\tif (source.getSource() instanceof JoinPoint) {\n\t\t\t\t((JoinPoint)(source.getSource())).setDest(edge);\n\t\t\t}\n\t\t\t\n\t\t\tedge.setDest(dest.getDest());\n\t\t\t\n\t\t\tif (dest.getDest() instanceof JoinPoint) {\n\t\t\t\t((JoinPoint)(dest.getDest())).setSource(edge);\n\t\t\t}\n\t\t\t\n\t\t\taddShape(edge);\n\t\t\tif (source != null) {\n\t\t\t\tremoveEdge(source);\n\t\t\t}\n\t\t\tif (dest != null) {\n\t\t\t\tremoveEdge(dest);\n\t\t\t}\n\t\t\t\n\t\t}\n\t}",
"@Override\n void drawShape(BufferedImage image, int color) {\n Point diem2 = new Point(diem.getX()+canh, diem.getY());\n Point td = new Point(diem.getX()+canh/2, diem.getY());\n \n \n Point dinh = new Point(td.getX(), td.getY()+h);\n \n Point diem_thuc = Point.convert(diem);\n Point diem_2_thuc = Point.convert(diem2);\n Point dinh_thuc = Point.convert(dinh);\n Point td_thuc = Point.convert(td);\n \n Line canh1=new Line(dinh_thuc, diem_thuc);\n canh1.drawShape(image, ColorConstant.BLACK_RGB);\n Line canh2=new Line(diem_thuc, diem_2_thuc);\n canh2.drawShape(image, ColorConstant.BLACK_RGB);\n Line canh3=new Line(diem_2_thuc, dinh_thuc);\n canh3.drawShape(image, ColorConstant.BLACK_RGB);\n int k =5;\n for(int i =canh1.getPoints().size()-5;i>=5;i--){\n \n for(int j = 0;j<canh*5/2-5;j++){\n \n Point ve = new Point(td_thuc.getX()-canh*5/2+j+5, td_thuc.getY()-k);\n if(ve.getX()>canh1.getPoints().get(i).getX()+5){\n Point.putPoint(ve, image, color);\n }\n }\n k++;\n }\n k=5;\n for(int i =canh3.getPoints().size()-5;i>=5;i--){\n \n for(int j = 0;j<canh*5/2-5;j++){\n Point ve = null;\n \n ve = new Point(td_thuc.getX()+canh*5/2-j-5, td_thuc.getY()-k);\n if(ve.getX()<canh3.getPoints().get(i).getX()-5){\n Point.putPoint(ve, image, color);\n }\n }\n k++;\n }\n }",
"public RMPoint convertedPointFromShape(RMPoint aPoint, RMShape aShape)\n{\n return convertPointFromShape(new RMPoint(aPoint), aShape);\n}",
"public void addShape(final Shape theShape) {\n if (myWidth > 0) {\n final Drawing newDrawing = new Drawing(theShape, myColor, myWidth);\n if (myDrawingArray.isEmpty()) {\n firePropertyChange(ARRAY_STRING, null, NOT_EMPTY_STRING);\n }\n myDrawingArray.add(newDrawing);\n repaint();\n } \n }",
"public ImageData duplicate() {\r\n\t\treturn new ImageData(imageProcessor.duplicate(), label);\r\n\t}",
"@Override\n public void redo() {\n shapeList.add((newShape));\n }",
"@Override\n\tprotected Shape getShape() {\n\t\treturn null;\n\t}",
"@Override\r\n public void allowShape (Shape shape)\r\n {\r\n if (forbiddenShapes != null) {\r\n forbiddenShapes.remove(shape);\r\n }\r\n }",
"public void setShape(Info shape) {\n \n }",
"IShape getCurrentShape();",
"public void difference(Shape s);",
"public Shape getClipShape() { return null; }",
"@Test(expected = IllegalArgumentException.class)\n\tpublic void testErroneousIndividualNodeShape() throws IllegalArgumentException {\n\t GraphRequestModel requestModel = createCustomIndividualGraphRequestModel();\n\t requestModel.setIndividualNodeShape(SPACE);\n\t GraphRequestValidator.validateRequest(requestModel);\n\t}",
"@Override\n public boolean equals(Object o) {\n if (this == o) {\n return true;\n }\n if (o == null) {\n return false;\n }\n AbstractShape that = (AbstractShape) o;\n return Double.compare(that.x, x) == 0 &&\n Double.compare(that.y, y) == 0 &&\n Double.compare(that.w, w) == 0 &&\n Double.compare(that.h, h) == 0 &&\n Double.compare(that.r, r) == 0 &&\n Double.compare(that.g, g) == 0 &&\n Double.compare(that.b, b) == 0 &&\n name.equals(that.name);\n }",
"public Object clone() {\n\tZPathLayoutManager newObject;\n\ttry {\n\t newObject = (ZPathLayoutManager)super.clone();\n\t} catch (CloneNotSupportedException e) {\n\t throw new RuntimeException(\"Object.clone() failed: \" + e);\n\t}\n\n\tif (path != null) {\n\t newObject.path = (ArrayList)path.clone();\n\t}\n\n\tif (shape != null) {\n\t // JM - not done yet: The shape interface doesn't include a clone() method,\n\t // so to clone a shape we either must cast it to a specific shape class\n\t // and call clone() on that, or use reflection to invoke the clone()\n\t // method. For now, we just continue referencing the old shape.\t\n\t}\n\n\treturn newObject;\n }",
"private void createShape() {\n if (shape == null) {\n float firstItemMargin = noxConfig.getNoxItemMargin();\n float firstItemSize = noxConfig.getNoxItemSize();\n int viewHeight = getMeasuredHeight();\n int viewWidth = getMeasuredWidth();\n int numberOfElements = noxItemCatalog.size();\n ShapeConfig shapeConfig =\n new ShapeConfig(numberOfElements, viewWidth, viewHeight, firstItemSize, firstItemMargin);\n shape = ShapeFactory.getShapeByKey(defaultShapeKey, shapeConfig);\n } else {\n shape.setNumberOfElements(noxItemCatalog.size());\n }\n shape.calculate();\n }",
"protected abstract void setShapes();",
"public void setMyShape(int shapeIndex){this.myShape = shapeIndex;}",
"void addShape(IShape shape, int appear, int disappear);",
"public void addShape(RetainedShape shapePeer) {\r\n\t\tif (shapePeer.vboHandle != null) {\r\n\t\t\tthrow new IllegalArgumentException(\"vboHandle != null\");\r\n\t\t}\r\n\t\t\r\n\t\tint[] minMax = ((RetainedVertexData)shapePeer.shape.getVertexData().nativePeer).getMinMaxIndex();\r\n\t\tint chunkSize = minMax[1] - minMax[0] + 1;\r\n\t\t\r\n\t\tListIterator<Handle> iter = handles.listIterator();\r\n\r\n\t\t// look for empty space in existing array \r\n\t\tint startIdx = 0;\r\n\t\twhile (iter.hasNext()) {\r\n\t\t\tHandle next = iter.next();\r\n\t\t\tint available = next.startIdx - startIdx;\r\n\t\t\tif (available >= chunkSize) {\r\n\t\t\t\tSystem.out.println(\"found place at offset \"+startIdx);\r\n\t\t\t\t// move back iterator so the new handle is inserted in sorted order\r\n\t\t\t\tif (iter.hasPrevious()) {\r\n\t\t\t\t\titer.previous();\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tstartIdx = next.startIdx + next.count;\r\n\t\t}\t\t\r\n\r\n\t\t// check if array need to grow\r\n\t\tint sizeNeeded = startIdx+chunkSize; \r\n\t\tif (sizeNeeded > numElements) {\r\n\t\t\t// grow array if we need to use more than 50% of array\r\n\t\t\tif (elementsUsed > sizeNeeded / 2) {\r\n\t\t\t\tnumElements = sizeNeeded * 2;\r\n\t\t\t\tresizeArrays();\r\n\t\t\t}\r\n\t\t\tcompact();\r\n\t\t\t\r\n\t\t\t// put new handle at end of compacted memory\r\n\t\t\tstartIdx = elementsUsed;\r\n\t\t}\r\n\t\t\r\n\t\t// insert handle at current iterator position so it will be sorted\r\n\t\tHandle handle = new Handle();\r\n\t\thandle.shapePeer = shapePeer;\r\n\t\thandle.startIdx = startIdx;\r\n\t\thandle.count = chunkSize;\r\n\t\thandle.upload();\r\n\t\tshapePeer.vboHandle = handle;\r\n\t\titer.add(handle);\r\n\t\t\r\n\t\telementsUsed += chunkSize;\r\n\t\t\r\n\t\tVertexData vertexData = shapePeer.shape.getVertexData();\r\n\t\tif (vertexData.colors != null) {\r\n\t\t\tclientState |= (1 << 2);\r\n\t\t}\r\n\t}",
"public abstract Shape createPath();",
"void drawShape(Shape s) {\n }",
"@Override\n public int hashCode() {\n if (this.shape1.uniqueShapeID < this.shape2.uniqueShapeID) {\n return shape1.uniqueShapeID * 65536 + shape2.uniqueShapeID;\n } else {\n return shape2.uniqueShapeID * 65536 + shape1.uniqueShapeID;\n }\n }",
"public Shape getShape() { return shape; }",
"public void paintShape(RMShapePainter aPntr)\n{\n // If fill/stroke present, have them paint\n if(getFill()!=null)\n getFill().paint(aPntr, this);\n if(getStroke()!=null && !getStrokeOnTop())\n getStroke().paint(aPntr, this);\n}",
"Shape newShape(GraphicalObject g) throws RemoteException;",
"Shape getShape();",
"public void paintShapeOver(RMShapePainter aPntr)\n{\n if(getStrokeOnTop() && getStroke()!=null)\n getStroke().paint(aPntr, this);\n}",
"Shape createShape(BorderType borderType);",
"private void panelMouseReleased(java.awt.event.MouseEvent evt)\n throws Exception {\n\n /*This is the release point*/\n Point releasePoint = null;\n\n /*Check if something was selected and if the mouse was dragged*/\n if ((selectedShape != null)&& (mouseIsDragged)) {\n \n /*Get the current release Point*/\n releasePoint = evt.getPoint();\n\n /*Check if Shapes are within boundaries*/\n if (this.selectedShape instanceof ShapeConcept) {\n\n /*Check if the ShapeConcept is inside the canvas area*/\n offScreenShapeResize( ((ShapeConcept) selectedShape).getBounds());\n }//end ShapeConcept\n else if (this.selectedShape instanceof ShapeLinking) {\n\n /*Check if the ShapeConcept is inside the canvas area*/\n offScreenShapeResize( ((ShapeLinking) selectedShape).getBounds());\n }//end LinkingPhraze\n else if (this.selectedShape instanceof ShapeComment) {\n\n /*Check if the ShapeConcept is inside the canvas area*/\n offScreenShapeResize( ((ShapeComment) selectedShape).getBounds());\n }//end ShapeComment\n else if (this.selectedShape instanceof ShapeURL) {\n\n /*Check if the ShapeConcept is inside the canvas area*/\n offScreenShapeResize( ((ShapeURL) selectedShape).getBounds());\n }//end ShapeURL\n }//end if\n\n /**When mouse is released, finish dragging just reset values**/\n releasePoint = null;\n mouseIsDragged = false;\n //selectedShape = null;\n repaint();\n}",
"ArrayList deepCopyShapeList(List aShapeList){\n ArrayList newList = new ArrayList();\r\n\r\n if (aShapeList.size() > 0) {\r\n Iterator iter = aShapeList.iterator();\r\n\r\n while (iter.hasNext())\r\n newList.add(((TShape)iter.next()).copy());\r\n }\r\n return\r\n newList;\r\n}",
"public void deleteShape(Shape shape) {\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\tif (shape.equals(this.shapes[i])) {\n\t\t\t\tthis.shapes[i] = null;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"Nothing find\");\n\t}",
"protected boolean isShapeFilled(Plot plot, int series, int item, double x, double y) {\n return false;\n }",
"@Override\n\tpublic void redo() {\n\t\tthis.list.add(shape);\n\n\t}",
"public MultiShapeLayer() {}",
"@Test(expected = IllegalArgumentException.class)\n public void invalidRectangleWidthNotGreaterThan0() {\n model1.addShape(Rectangle.createRectangle(\"R\", new Point.Double(200, 200),\n new Color(1, 0, 0), 1, 0, -50, 100));\n }",
"@Test\r\n\tpublic void testDeleteShapeFromScreen() {\r\n\t\t\r\n\t\t// Create a first shape square\r\n\t\tPoint origin = new Point(5,5); \t\t// Set origin for square\r\n\t\tList<Double> list = new ArrayList<Double>(); \t\t// Create a new list of parameters\r\n double side = 5.0; \t\t// Add side as parameter for shape square \r\n list.add(side); \t\t\t\t\t\t\t\t\t\t \t\t// Add to list\r\n\t\tShape shape = ShapeFactory.createShape(0, origin, list); \t\t// 0 for creation of square\r\n\t\tscreen.shapesOnScreen.add(shape);\t\t\t\t\t\t \t\t// Add shape to screen\r\n\t\t\r\n\t\t// Create a second shape square\r\n\t\tPoint secondOrigin = new Point(5,5); // Set origin for square\r\n\t\tList<Double> secondList = new ArrayList<Double>(); // Create a new list of parameters\r\n double secondSide = 5.0; // Add side as parameter for shape square \r\n secondList.add(secondSide); \t\t\t\t\t\t\t\t\t // Add to list\r\n\t\tShape secondShape = ShapeFactory.createShape(0, secondOrigin, secondList); // 0 for creation of square\r\n\t\tscreen.shapesOnScreen.add(secondShape);\t\t\t\t\t\t \t // Add shape to screen\r\n\t\t\r\n\t\t// Delete shape from screen\r\n\t\tassertEquals( true, screen.deleteShapeFromScreen( secondShape ));\t\t\r\n\t}",
"@Override\r\n\tpublic void redo() {\n\t\tfor(IShape shape : tempList)\r\n\t\t\tshapeList.add(shape);\r\n\t}",
"@Test(expected = IllegalArgumentException.class)\n\tpublic void testErroneousObjPropSourceShape() throws IllegalArgumentException {\n\t GraphRequestModel requestModel = createCustomPropertyGraphRequestModel();\n\t requestModel.setObjPropSourceShape(SPACE);\n\t GraphRequestValidator.validateRequest(requestModel);\n\t}",
"@Test(expected = IllegalArgumentException.class)\n public void testErroneousTypeOfSourceShape() throws IllegalArgumentException {\n GraphRequestModel requestModel = createCustomIndividualGraphRequestModel();\n requestModel.setTypeOfSourceShape(SPACE);\n GraphRequestValidator.validateRequest(requestModel);\n }",
"@Override\n public Shape deepCopy(double... points) {\n return this.deepCopy(points[0], points[1]);\n }",
"public EpsShape(Shape shape, boolean filled) {\n\t\tsuper();\n\t\tthis.shape=shape;\n\t\tthis.filled=filled;\n\t}",
"public RMPoint convertedPointToShape(RMPoint aPoint, RMShape aShape)\n{\n return convertPointToShape(new RMPoint(aPoint), aShape);\n}",
"public void checkShape(AbstractMatrix3D B) {\n\tif (slices != B.slices || rows != B.rows || columns != B.columns) throw new IllegalArgumentException(\"Incompatible dimensions: \"+toStringShort()+\" and \"+B.toStringShort());\n}",
"public String whatShape();",
"@Override\n\tpublic boolean canResizeShape(IResizeShapeContext context) {\n\t\treturn false;\n\t}",
"@Override\n\tprotected void outlineShape(Graphics graphics) {\n\t}",
"public VNode duplicate() throws VlException\n\t{\n\t\tthrow new nl.uva.vlet.exception.NotImplementedException(\"Duplicate method not implemented\"); \n\t}",
"public abstract void addCollision(Geometry s, Geometry t);",
"public void paintShapeAll(RMShapePainter aPntr)\n{\n // Get graphics\n RMShapePainter pntr = aPntr;\n \n // If clipping, clip to shape\n if(getClipShape()!=null) {\n pntr = pntr.clone();\n pntr.clip(getClipShape());\n }\n \n // Have shape paint only itself\n pntr.sendPaintShape(this);\n \n // Have shape paint children\n paintShapeChildren(pntr);\n \n // Have shape paint over\n paintShapeOver(aPntr);\n \n // If graphics copied, dispose\n if(pntr!=aPntr) pntr.dispose();\n}",
"public void strokeShape(Shape shape);",
"@Override\n public void generateShape() {\n AffineTransform tx = new AffineTransform();\n tx.rotate(-this.getRotation(), this.getX(), this.getY());\n this.shape = tx.createTransformedShape(new Ellipse2D.Double(\n this.getX() + this.getWidth() / 2 - D / 2,\n this.getY() + this.getHeight() / 2 - D / 2,\n D, D));\n }",
"public void addShape(Shape shape)\n {\n shapes.add(shape);\n }",
"public Shape getShape();"
]
| [
"0.67368585",
"0.6630552",
"0.6579213",
"0.64077115",
"0.6374689",
"0.6330927",
"0.6310878",
"0.62978524",
"0.6259439",
"0.620209",
"0.61683154",
"0.6166752",
"0.61663",
"0.6145606",
"0.6104049",
"0.6103167",
"0.61015177",
"0.6017462",
"0.60083276",
"0.5986501",
"0.59781367",
"0.5903167",
"0.58901596",
"0.5887646",
"0.58801866",
"0.5878229",
"0.58452374",
"0.584303",
"0.5834366",
"0.58336014",
"0.5823197",
"0.5817507",
"0.5812994",
"0.5812106",
"0.5785696",
"0.5780594",
"0.5749739",
"0.56520885",
"0.5627242",
"0.5623817",
"0.5618004",
"0.5607857",
"0.5606482",
"0.56044817",
"0.559508",
"0.55911624",
"0.5577733",
"0.55772084",
"0.557574",
"0.5555242",
"0.55296457",
"0.5529591",
"0.5517226",
"0.54876065",
"0.5484993",
"0.5470305",
"0.54604435",
"0.5459186",
"0.54542273",
"0.5453232",
"0.54452175",
"0.54425806",
"0.54322034",
"0.54303855",
"0.5430125",
"0.5427971",
"0.5424988",
"0.5423075",
"0.54218644",
"0.5414268",
"0.54141825",
"0.54116964",
"0.5407031",
"0.54066104",
"0.53994656",
"0.5393843",
"0.5386963",
"0.5371825",
"0.53487855",
"0.53456783",
"0.53422797",
"0.53387755",
"0.53336596",
"0.5330231",
"0.53285676",
"0.53255004",
"0.5317799",
"0.53070116",
"0.53068745",
"0.53037035",
"0.5289851",
"0.52881455",
"0.52864844",
"0.5285457",
"0.52847344",
"0.5280696",
"0.52677554",
"0.5266108",
"0.52636105",
"0.5248718"
]
| 0.7084457 | 0 |
___________________________ EXCEPTIONS: Appear and Disappear _________________________________. | @Test(expected = IllegalArgumentException.class)
public void testAppearEqualsDisappear() {
testAnimation.addShape(c, 100, 100);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void showErrorMessage(){\n mErrorMessageDisplay.setVisibility(View.VISIBLE);\n mGridView.setVisibility(View.INVISIBLE);\n }",
"public void showError() {\n mapView.setVisibility(View.GONE);\n loadingLayout.setVisibility(View.GONE);\n errorLayout.setVisibility(View.VISIBLE);\n\n }",
"private void showErrorMessage() {\n /* First, hide the currently visible data */\n mRecyclerView.setVisibility(View.INVISIBLE);\n /* Then, show the error */\n mErrorMessageDisplay.setVisibility(View.VISIBLE);\n mLayout.setVisibility(View.INVISIBLE);\n }",
"private void showNothing(){\n errorTextView.setVisibility(View.INVISIBLE);\n errorButton.setVisibility(View.INVISIBLE);\n errorButton.setEnabled(false);\n recyclerView.setVisibility(View.INVISIBLE);\n progressBar.setVisibility(View.INVISIBLE);\n noFavoriteMoviesTextView.setVisibility(View.INVISIBLE);\n }",
"private void networkError() {\n mLinearLayout.setVisibility(View.INVISIBLE);\n// animationView.setVisibility(View.VISIBLE);\n// animationView.setAnimation(R.raw.network_lost);\n// animationView.playAnimation();\n }",
"public void showErrorMessage() {\n mErrorMessageDisplay.setVisibility(View.VISIBLE);\n mMoviesList.setVisibility(View.INVISIBLE);\n }",
"private void showError() {\n errorTextView.setVisibility(View.VISIBLE);\n errorButton.setVisibility(View.VISIBLE);\n errorButton.setEnabled(true);\n recyclerView.setVisibility(View.INVISIBLE);\n progressBar.setVisibility(View.INVISIBLE);\n noFavoriteMoviesTextView.setVisibility(View.INVISIBLE);\n }",
"private void showErrorMessage() {\n // hide the view for the list of movies\n mMoviesRecyclerView.setVisibility(View.INVISIBLE);\n // show the error message\n mErrorMessageDisplay.setVisibility(View.VISIBLE);\n }",
"@Override\n\tpublic void exceptioned(int taskId, String msg) {\n\t\tdimissDialog();\n\t}",
"@Override\r\n\t\t\t\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\t\t\tPropertyRepairActivity.this.runOnUiThread(new Runnable() {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnonemsgtext.setVisibility(View.GONE);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\t\t\t}",
"@Override\r\n\t\t\t\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\t\t\tPropertyRepairActivity.this.runOnUiThread(new Runnable() {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnonemsgtext.setVisibility(View.GONE);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\t\t\t}",
"private void showErrorMessage() {\n /* First, hide the currently visible data */\n mRecyclerView.setVisibility(View.INVISIBLE);\n /* Then, show the error */\n mErrorMessageDisplay.setVisibility(View.VISIBLE);\n }",
"private void notifyUiApiFailure() {\n\n if (stillAlive()) {\n\n AlertDialog.Builder alertDialog = new AlertDialog.Builder(getActivity());\n View convertView = getActivity().getLayoutInflater().inflate(R.layout.api_error_alert_title, null);\n alertDialog.setCustomTitle(convertView);\n\n alertDialog.setNegativeButton(\"OK\", new DialogInterface.OnClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int id) {\n\n }\n });\n\n // Set the line color\n Dialog d = alertDialog.show();\n int dividerId = d.getContext().getResources().getIdentifier(\"android:id/titleDivider\", null, null);\n View divider = d.findViewById(dividerId);\n divider.setBackground(new ColorDrawable(Color.parseColor(\"#00274c\")));\n }\n }",
"private void showErrorMessage() {\n mCryptoRecyclerView.setVisibility(View.INVISIBLE); // set the visibility of the recycler to invisible\n mTvErrorMessage.setVisibility(View.VISIBLE); // set the visibility of the error message to visible\n }",
"private void showErrorMessage() {\n // First, hide the currently visible data\n mRecyclerView.setVisibility(View.INVISIBLE);\n\n // Then, show the error\n mErrorMessageDisplay.setVisibility(View.VISIBLE);\n }",
"@Override\r\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\tPropertyRepairActivity.this.runOnUiThread(new Runnable() {\r\n\t\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\t\tnonemsgtext.setVisibility(View.GONE);\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}",
"public void death(){\n setCoordinate(super.getGameImage().getCoordInit());\n diminueVies();\n super.initAnimation();\n\n }",
"public void showUnready();",
"private void onLoadingError() {\n AppSession.showDataLoadError(\"conexus\");\n finish();\n }",
"public void youHaveBeenExcommunicated(){\n youHaveBeenExcommunicatedPane.setVisible(true);\n PauseTransition delay = new PauseTransition(Duration.seconds(3));\n delay.setOnFinished( event -> youHaveBeenExcommunicatedPane.setVisible(false) );\n delay.play();\n }",
"private void showErrorMessage() {\n /* First, hide the currently visible data */\n mEmptyTextView.setText(\"No Internet Connection\");\n mRecyclerView.setVisibility(View.INVISIBLE);\n /* Then, show the error */\n mEmptyTextView.setVisibility(View.VISIBLE);\n }",
"private void checkDeath() {\n\t\tif (player.getLives() == 0) {\n shooty.setIv(new Image(\"/img/shipdeath.png\"));\n\t\t\tdie();\n\t\t}\n\t\t// another way to die: the blocks hit you\n\t\tif(btnList.get(0).getLayoutY() >= FATAL_BUTTON_DIST) {\n\t\t\tendGame.play();\n\t\t\tdie();\n\t\t}\n\t}",
"@Override\r\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(MainActivity.this, \"Error\", Toast.LENGTH_SHORT).show();\r\n hideProgress();\r\n }",
"@Override\n\tpublic void onInvisible() {\n\n\t}",
"private void displayLoseScreen() {\n new EventPopupWindow(String.format(\"GAME OVER:\\nYou failed to collect all %d parts.\\n\\n\"\n + \"Score: %d\",\n getShipPartsNeededCount(),\n getScore()));\n }",
"private void update () {\n // JST: this can be improved in future...\n String lm = current.getLocalizedMessage ();\n String nm = current.getMessage ();\n boolean isLocalized = lm != null && !lm.equals (nm);\n\n next.setVisible (exceptions.hasMoreElements ());\n details.setText (\n showDetails\n ?\n org.openide.util.NbBundle.getBundle(NotifyException.class).getString(\"CTL_Exception_Hide_Details\")\n :\n org.openide.util.NbBundle.getBundle(NotifyException.class).getString(\"CTL_Exception_Show_Details\")\n );\n\n\n if (current instanceof InvocationTargetException) {\n // go in\n current = ((InvocationTargetException)current).getTargetException ();\n }\n\n // setText (current.getLocalizedMessage ());\n String title = org.openide.util.NbBundle.getBundle(NotifyException.class).getString(\"CTL_Title_Exception\");\n\n if (showDetails) {\n descriptor.setMessage (createDetails ());\n } else {\n if (isLocalized) {\n String msg = current.getLocalizedMessage ();\n if (msg == null || \"\".equals(msg)) { // NOI18N\n msg = org.openide.util.Utilities.wrapString (\n msg, MAXIMUM_TEXT_WIDTH, false, false\n );\n }\n descriptor.setMessage (msg);\n } else {\n // emphasize user-non-friendly exceptions\n // if (this.getMessage() == null || \"\".equals(this.getMessage())) { // NOI18N\n descriptor.setMessage (\n java.text.MessageFormat.format(\n NbBundle.getBundle (NotifyDescriptor.class).getString(\"NTF_ExceptionalException\"),\n new Object[] {\n current.getClass().getName()\n }\n )\n );\n\n title = NbBundle.getBundle (NotifyDescriptor.class).getString(\n \"NTF_ExceptionalExceptionTitle\" // NOI18N\n );\n }\n }\n\n descriptor.setTitle (title);\n }",
"private void errorPopUp() {\n new AlertDialog.Builder(mActivity)\n .setTitle(\"Oops\")\n .setMessage(\"Please choose an emotional state or enter a date and time\")\n .setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n //Go back without changing anything\n dialogInterface.dismiss();\n }\n })\n .create()\n .show();\n }",
"public final void mo60610a(Exception exc) {\n FeedImageViewHolder.this.mLineProgressBar.mo74362b();\n }",
"public void notifyDisplayNotFound();",
"private void ImproperFillOutException() {\n JOptionPane.showMessageDialog(null, \"Fill out the form properly\");\n }",
"@Override\r\n\t\t\tpublic void onExceptionDoInUI(String[] values) {\n\t\t\t\tif (isFirst) {\r\n\t\t\t\t\tMyProgressDialog.Dismiss();\r\n\t\t\t\t\tisFirst = false;\r\n\t\t\t\t}\r\n\t\t\t\tonLoad();\r\n\t\t\t\tisLoad = false;\r\n\t\t\t\tMyUtils.showToast2(activity, getResources().getString(R.string.iserror));\r\n\t\t\t\tfor (String string : values) {\r\n\t\t\t\t\tLog.i(\"it is error\", string + \"\");\r\n\t\t\t\t}\r\n\t\t\t}",
"private void invalidTry(){\n setButtons(false);\n setMsgText(\"There are 2 players in game, you cannot join in now.\");\n }",
"public void showErrorMessage() {\n\t\tthis.vm = null;\n\t\tplayButton.setText(\"►\");\n\n\t\tthis.remove(visualizerPanel);\n\t\tvisualizerPanel = new ErrorCard();\n\t\tvisualizerPanel.setPreferredSize(new Dimension(FRAME_WIDTH, FRAME_HEIGHT));\n\t\tthis.add(visualizerPanel);\n\t}",
"public void showDisarmed();",
"@Override\n\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\tview.showErrorMessage(caught.getMessage());\n\t\t\t\tview.setLoading(false);\n\t\t\t}",
"@Override\n public void wasHidden() {\n hide();\n }",
"@Override\n\tpublic void onHide() {\n\n\t}",
"@Override\n public void onFailure(@NonNull Exception e) {\n dialog.dismiss();\n chartView.setPercent(0);\n text.setText(\"Sorry! Couldn't predict.\");\n Animation animation = AnimationUtils.loadAnimation(ObjectDetectionSample.this, R.anim.slide_from_bottom);\n llResults.setAnimation(animation);\n llResults.setVisibility(View.VISIBLE);\n }",
"public static final void showInspectorError(Activity activity) {\n final View view = activity.findViewById(R.id.fragment_container);\n Snackbar.make(view, R.string.inspector_load_error, Snackbar.LENGTH_INDEFINITE).show();\n }",
"public void onDashboardDisappear() \n\t\t{\n\t\t\tLog.i(\"OpenFeint\", \"On Dashboard dissapear\");\n\t\t\tdashboardDidDisappear();\n\t\t}",
"public void onDashboardDisappear() \n\t\t{\n\t\t\tLog.i(\"OpenFeint\", \"On Dashboard dissapear\");\n\t\t\tdashboardDidDisappear();\n\t\t}",
"public void handleDisconnectedState() {\n\n setProgressBarVisible(false);\n setGreenCheckMarkVisible(false);\n setMessageText(\"Failed to connect to \" + tallyDeviceName);\n\n }",
"private void badScan() {\n resultIcon.setImageDrawable(getDrawable(R.drawable.ic_times_solid));\n resultIcon.setVisibility(View.VISIBLE);\n\n Beep.beep(this);\n\n // Add listener back after one (1) second\n Handler handler = new Handler();\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n ScannerFragment scannerFragment = (ScannerFragment) getFragmentManager().findFragmentById(R.id.fragment_container);\n scannerFragment.setListener2(scannerListener);\n\n resultIcon.setVisibility(View.GONE);\n }\n }, 1000);\n }",
"private void check_displaysError() {\n onView(withId(R.id.title))\n .check(matches(withText(R.string.input_title_error)));\n onView(withId(R.id.subtitle))\n .check(matches(withText(R.string.input_subtitle_error)));\n\n // And the button to be labeled try again\n onView(withId(R.id.hint))\n .check(matches(isDisplayed()))\n .check(matches(withText(R.string.input_hint_error)));\n }",
"public void showDisconnectedFoeMessage() {\n\t\tsetStatusBar(FOE_DISC_MSG);\n\t}",
"public void showLoadingError() {\n showError(MESSAGE_LOADING_ERROR);\n }",
"private boolean gameOver() {\r\n\t\treturn (lifeBar == null || mehran == null);\r\n\t}",
"@Override\n public void onError(Throwable arg0, boolean arg1) {\n hideLoading();\n System.out.println(arg0.getMessage());\n }",
"@Override\n public void onError(Throwable arg0, boolean arg1) {\n hideLoading();\n System.out.println(arg0.getMessage());\n }",
"protected void hideNotify() {\n try {\n myJump.systemPauseThreads();\n } catch (Exception oe) {\n myJump.errorMsg(oe);\n }\n }",
"private void showLoginFailed() {\n try {\n Toast.makeText(getApplicationContext(), \"Login Failed\", Toast.LENGTH_SHORT).show();\n } catch (Exception e) {\n Looper.prepare();\n Toast.makeText(getApplicationContext(), \"Login Failed\", Toast.LENGTH_SHORT).show();\n Looper.loop();\n }\n }",
"@Override\n public void onFailure(Call<MovieList> call, Throwable t) {\n recyclerView.setVisibility(View.VISIBLE);\n\n }",
"@Override\n public void onFailure(Call<MovieList> call, Throwable t) {\n recyclerView.setVisibility(View.VISIBLE);\n\n }",
"private void showErrorMessage() {\n gridview.setVisibility(View.INVISIBLE);\n // Then, show the error\n errorTextView.setVisibility(View.VISIBLE);\n }",
"@Override\n public void onFailure(@NonNull Exception e) {\n if (progressDialog.isShowing()) {\n progressDialog.dismiss();\n }\n\n showErrorMessageDialogue(\"Some error just happened. \" +\n \"Please try again in a little bit.\");\n\n }",
"@Override\r\n public void onPreResponse() {\r\n findViewById(R.id.loader).setVisibility(View.VISIBLE);\r\n findViewById(R.id.mainContainer).setVisibility(View.GONE);\r\n findViewById(R.id.errorText).setVisibility(View.GONE);\r\n\r\n }",
"@Override\n public void hiddenLoading() {\n Log.i(Tag, \"hiddenLoading\");\n }",
"abstract void onHidden();",
"public void excavate();",
"private void inizia() throws Exception {\n this.setMessaggio(\"Addebiti in corso\");\n this.setBreakAbilitato(true);\n }",
"@Override\n public void onError() {\n holder.mPosterPortrait.setImageDrawable(\n mMainActivity.getResources().getDrawable(R.drawable.poster_not_found));\n holder.mPosterPortrait.setAlpha(0.5f);\n //Making title visible\n holder.mTitle.setVisibility(View.VISIBLE);\n }",
"@Override\n public void showError() {\n }",
"public void s_restart() {\n\n leftButton.setVisibility(View.VISIBLE);\n upButton.setVisibility(View.VISIBLE);\n rightButton.setVisibility(View.VISIBLE);\n\n visible = true;\n TransitionSet set = new TransitionSet()\n .addTransition(new Scale(0.7f))\n .addTransition(new Fade())\n .setInterpolator(visible ? new LinearOutSlowInInterpolator() :\n new FastOutLinearInInterpolator());\n\n TransitionManager.beginDelayedTransition(turn_signals, set);\n turn_signals.setVisibility(visible ? View.GONE : View.VISIBLE);\n\n approve.setVisibility(View.GONE);\n declined.setVisibility(View.GONE);\n result.setVisibility(View.VISIBLE);\n\n everyOther = !everyOther;\n\n // calls the function to display the correct approve or deny icons\n result(everyOther);\n }",
"public void onLoadingFailure() {\n AppSession.showDataLoadError(\"post\");\n onLoadingComplete();\n }",
"@Override\r\n public void onErrorResponse(VolleyError error) {\n heading.setText(\"Try Again\");\r\n swipeRefreshLayout.setRefreshing(false);\r\n progressBar.setVisibility(View.INVISIBLE);\r\n\r\n rl.setVisibility(View.INVISIBLE);\r\n recyclerView.setVisibility(View.INVISIBLE);\r\n// clearData();\r\n\r\n }",
"private void mostrarMensajeError() {\n this.mBinding.rvPeliculas.setVisibility(View.GONE);\n /* Then, show the error */\n this.mBinding.tvMostrarError.setVisibility(View.VISIBLE);\n }",
"public void showLoadingError() {\n System.out.println(\"Duke has failed to load properly.\");\n }",
"@Override\n public boolean onLoadFailed(@Nullable GlideException e, Object o, Target<Bitmap> target, boolean b) {\n setViewsVisibility(View.VISIBLE);\n return false;\n }",
"private void fitbitRequestError() {\r\n BarChart chart = findViewById(R.id.chart);\r\n chart.setNoDataText(getResources().getString(R.string.data_error));\r\n chart.invalidate();\r\n\r\n Button btnPrev = findViewById(R.id.btn_prev);\r\n btnPrev.setVisibility(View.GONE);\r\n Button btnNext = findViewById(R.id.btn_next);\r\n btnNext.setVisibility(View.GONE);\r\n }",
"@Override\n public void onCancelled(DatabaseError error) {\n loader.setVisibility(View.GONE);\n //recyclerView.setVisibility(View.VISIBLE);\n Toast.makeText(MainActivity.this,\"Something Went Wrong\",Toast.LENGTH_SHORT).show();\n Log.w(TAG, \"Failed to read value.\", error.toException());\n }",
"@Override\n\tpublic void hide() {\n\t\tGdx.app.log(\"GameScreen\", \"hide called\"); \n\t}",
"public void dismissOnDeath() {\n\t\tif (summonedFamiliar != null && c.getInstance().summoned != null) {\n\t\t\tdismissFamiliar();\n\t\t\tc.getInstance().summoned.npcType = -1;\n\t\t}\n\t}",
"private void displayError(Exception e)\n\t{\n\t\tJOptionPane.showMessageDialog(frame,\n\t\t\t\te.toString(),\n\t\t\t\t\"EXCEPTION\",\n\t\t\t\tJOptionPane.WARNING_MESSAGE);\n\t}",
"private void showErrorView() {\n Log.d(\"lodd\", \"showSuccessView: hjfj91919515\");\n\n }",
"void displayEmotion() {\n if (emotion.getLifetime() == 0) { emotion = null; }\n else { emotion.decreaseLifetime(); }\n }",
"private void anullerAction()\r\n\t{\r\n\t\tthis.hide();\r\n\t}",
"@Override\r\n\tpublic void hide() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void hide() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void hide() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void hide() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void hide() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void hide() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void hide() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void hide() {\n\t\t\r\n\t}",
"private void throwDices() throws InterruptedException {\n\n throwDicesPane.setVisible(true);\n PauseTransition delay = new PauseTransition(Duration.seconds(3));\n delay.setOnFinished( event -> throwDicesPane.setVisible(false) );\n delay.play();\n\n }",
"@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\temotionLayout.setVisibility(View.VISIBLE);\n\t\t\t\t}",
"public BadConsequenceView() {\n initComponents();\n this.auxiliar.setVisible(false);\n }",
"@Override\n public void hide() {\n mHandler.post(mHide);\n }",
"public void onfff() {\r\n\r\n Fragment frag = getSupportFragmentManager().findFragmentById(R.id.fragmentSad);\r\n if(!(frag.isHidden()))\r\n {\r\n// //android.app.FragmentManager fm = getFragmentManager();\r\n// FragmentTransaction ft = getFragmentManager().beginTransaction();\r\n// ft.remove(frag);\r\n// ft.commit();\r\n//}\r\n\r\n FragmentManager fm = getSupportFragmentManager();\r\n fm.beginTransaction()\r\n .setCustomAnimations(android.R.anim.fade_in, android.R.anim.fade_out)\r\n .hide(frag)\r\n .commit();\r\n }\r\n }",
"@Override\r\n\t\tpublic void onLoadingFailed(String arg0, View arg1, FailReason arg2) {\n\t\t\tholder.app_icon.setVisibility(View.VISIBLE);\r\n\t\t}",
"@Override\r\n public void hide() {\r\n\r\n }",
"public abstract BossBar hide();",
"@Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(getApplicationContext(),\"Uh-oh! something went wrong, please try again.\",Toast.LENGTH_SHORT).show();\n }",
"void displayLoadingErrorMessage();",
"@Override\n\tpublic void hide()\n\t{\n\n\t}",
"@Override\n\tpublic void hide()\n\t{\n\n\t}",
"public void displayInvalid() {\n invalidLabel.setVisible(true);\n }",
"void throwEvents();",
"public void displayNoSuchMovieException(NoSuchMediaException ex) {\n JOptionPane.showMessageDialog(frame, ex.getMessage());\n\n }",
"private void onMakeCoffeeFail(){\n\t\t// ui\n\t\tmMakeCoffeeProgress.setVisibility(View.INVISIBLE);\n\t\tmMakeCoffeeSuccess.setVisibility(View.INVISIBLE);\n\t\tmMakeCoffeeProgressTip.setText(getString(R.string.make_coffee_failed));\n\t\tmMakeCoffeeFailed.setVisibility(View.VISIBLE);\n\t\tmMakeCoffeeRetry.setVisibility(View.INVISIBLE);\n\t\t// sound tip\n\t\tAudioPlayer.getInstance().play(this, R.raw.sound_coffee_make_fail);\n\t}",
"public void gameOver() {\r\n\t\tgameFrame.gameOver();\r\n\t\tnotifyViews();\r\n\t}"
]
| [
"0.62637603",
"0.6208707",
"0.62047005",
"0.60866994",
"0.606532",
"0.6050778",
"0.60235727",
"0.60107714",
"0.60100335",
"0.59993744",
"0.59993744",
"0.59726644",
"0.59532255",
"0.59511936",
"0.59210855",
"0.5899367",
"0.58559906",
"0.5843436",
"0.5816683",
"0.58123124",
"0.58092195",
"0.57925576",
"0.5756004",
"0.57536256",
"0.5753534",
"0.5734973",
"0.5734877",
"0.5733436",
"0.57314396",
"0.57313114",
"0.5722157",
"0.5721417",
"0.5705956",
"0.56957114",
"0.56940776",
"0.56856775",
"0.56728065",
"0.5649181",
"0.5635227",
"0.5634387",
"0.5634387",
"0.5634255",
"0.5633149",
"0.5630048",
"0.56295687",
"0.5624099",
"0.5610691",
"0.56083226",
"0.56083226",
"0.5603712",
"0.56015503",
"0.5599875",
"0.5599875",
"0.55921704",
"0.5571123",
"0.5570671",
"0.5559651",
"0.5557138",
"0.5555648",
"0.5551907",
"0.5523931",
"0.55236924",
"0.5515555",
"0.5502859",
"0.54949534",
"0.5493228",
"0.5489017",
"0.54844826",
"0.54616034",
"0.5450785",
"0.5448996",
"0.54363793",
"0.5433175",
"0.5420747",
"0.541741",
"0.5414885",
"0.5412079",
"0.5412079",
"0.5412079",
"0.5412079",
"0.5412079",
"0.5412079",
"0.5412079",
"0.5412079",
"0.5409447",
"0.5400345",
"0.5390915",
"0.5385622",
"0.5385542",
"0.53819925",
"0.53786266",
"0.5377613",
"0.5375942",
"0.5370991",
"0.53668827",
"0.53668827",
"0.5359642",
"0.5355685",
"0.5355346",
"0.5351764",
"0.53509116"
]
| 0.0 | -1 |
___________________________ EXCEPTIONS: Null tests ______________________________________. | @Test(expected = IllegalArgumentException.class)
public void testNullShape() {
testAnimation.addShape(null, 1, 100);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n\tpublic void testNull() throws Exception {\n\t\ttestWith(null);\n\t}",
"@Test(timeout = 4000)\n public void test069() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.mutatesStructure((String) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test070() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.mutatesDataOrStructure((String) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test034() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.mutatesDataOrStructure((String) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }",
"@Test\n void test011_setCentralUserIllegalNullArgumentException() {\n try {\n christmasBuddENetwork.addUser(\"Santa Claus\");\n christmasBuddENetwork.addUser(\"Grinch\");\n christmasBuddENetwork.addUser(\"Comet\");\n christmasBuddENetwork.addUser(\"Rudolph\");\n christmasBuddENetwork.addUser(\"Prancer\");\n christmasBuddENetwork.addUser(\"Blitzen\");\n christmasBuddENetwork.addUser(\"Donder\");\n christmasBuddENetwork.addUser(\"Vixen\");\n christmasBuddENetwork.addUser(\"Dancer\");\n christmasBuddENetwork.addUser(\"Cupid\");\n christmasBuddENetwork.addUser(\"Dasher\");\n christmasBuddENetwork.setCentralUser(\"\"); // making empty string the\n // central user\n\n // if we get here, then we did not properly throw an\n // IllegalNullArgumentException on empty string,\n // so we failed tests.\n fail(\"test011_setCentralUserIllegalNullArgumentException(): FAILED :(. \"\n + \"Did NOT throw an IllegalNullArgumentException when finding central\"\n + \" user of empty string.\");\n } catch (UserNotFoundException e1) {\n fail(\"test011_setCentralUserIllegalNullArgumentException(): FAILED :(. \"\n + \"Threw a UserNotFoundException instead of an \"\n + \"IllegalNullArgumentException when making the central user an empty\"\n + \" string!\");\n } catch (IllegalNullArgumentException e2) {\n // properly caught this Exception :) for empty string\n try {\n christmasBuddENetwork.setCentralUser(null); // making a null buddE the\n // central user\n fail(\"test011_setCentralUserIllegalNullArgumentException(): FAILED :(.\"\n + \" Did NOT throw an IllegalNullArgumentException when calling \"\n + \"setCentralUser(null)!\");\n\n } catch (UserNotFoundException e2a) {\n fail(\"test011_setCentralUserIllegalNullArgumentException(): FAILED :(.\"\n + \" Threw a UserNotFoundException instead of an \"\n + \"IllegalNullArgumentException when calling \"\n + \"setCentralUser(null)!\");\n } catch (IllegalNullArgumentException e2b) {\n } catch (Exception e2c) {\n fail(\"test011_setCentralUserIllegalNullArgumentException(): FAILED :(.\"\n + \" Threw another Exception instead of an \"\n + \"IllegalNullArgumentException when calling \"\n + \"setCentralUser(null)!\");\n }\n\n } catch (Exception e3) {\n fail(\"test011_setCentralUserIllegalNullArgumentException(): FAILED :( \"\n + \"Threw another Exception instead of an IllegalNullArgumentException\"\n + \" when calling setCentralUser for an empty String!\");\n }\n }",
"@Test(timeout = 4000)\n public void test035() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.mutatesStructure((String) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }",
"public void testCheckNull() {\n Util.checkNull(\"\", \"test\");\n }",
"@Test\n\tvoid testCheckNull3() {\n\t\tassertTrue(DataChecker.checkNull((Object)null));\n\t}",
"@Test(timeout = 4000)\n public void test033() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.mutatesStructure((String) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test037() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.mutatesDataOrStructure((String) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }",
"@Test\n\tvoid testCheckNull1() {\n\t\tassertFalse(DataChecker.checkNull(new Integer(42)));\n\t}",
"@Test\n\tvoid testCheckNull2() {\n\t\tassertTrue(DataChecker.checkNull(null));\n\t}",
"@Test\n public void testReadNegativeItemIsNull() throws Exception{\n String name = null;\n itemDao.read(name);\n }",
"@Test(timeout = 4000)\n public void test323() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef((String) null);\n // Undeclared exception!\n try { \n xmlEntityRef0.base((CharSequence) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }",
"@Test(expected = IllegalArgumentException.class)\n public void testCheckNullFailure() {\n Helper.checkNull(null, \"null-name\");\n }",
"@Ignore\n\t@Test\n\tpublic void testParamNull() {\n\t\tregisterParamException(null, keyString, valueString);\n\t\tregisterParamException(groupString, null, valueString);\n\t\tregisterParamException(groupString, keyString, null);\n\t}",
"@Test\n public void testCheckNull() {\n Helper.checkNull(\"non-null\", \"non-null name\");\n }",
"@Test(timeout = 4000)\n public void test368() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef((String) null);\n // Undeclared exception!\n try { \n xmlEntityRef0.map((String) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }",
"@Test(timeout = 4000)\n public void test358() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef((String) null);\n // Undeclared exception!\n try { \n xmlEntityRef0.s();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }",
"@Test(timeout = 4000)\n public void test080() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.normalize((String) null, true);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }",
"public void testGetMessage_NullObj() {\r\n try {\r\n validator.getMessage(null);\r\n fail(\"testGetMessage_NullObj is failure.\");\r\n } catch (IllegalArgumentException iae) {\r\n // pass\r\n } catch (Exception e) {\r\n fail(\"Unknown exception occurs in testGetMessage_NullObj.\");\r\n }\r\n }",
"@Test(expected=IllegalArgumentException.class)\n\tpublic void testContainsUniqueChars2NullString() {\n\t\tQuestion11.containsUniqueChars2(null);\n\t}",
"@Test\n\tpublic void takingNullWayTest()\n\t{\n\t\ttry\n\t\t{\n\t\t\tOsmXmlToSQLiteDatabaseConverter converter = new OsmXmlToSQLiteDatabaseConverter(new MapObjectsIdFinderFake());\n\t\t\tconverter.takeWay(null);\n\t\t\tfail();\n\t\t}\n\t\tcatch (IllegalArgumentException ex)\n\t\t{\n\t\t\t// ok\n\t\t}\n\t}",
"@Test\n\tvoid testCheckNulls1() {\n\t\tassertTrue(DataChecker.checkNulls(null));\n\t}",
"@Test(enabled = true, dependsOnMethods = {\"remove\"}, expectedExceptions = NullPointerException.class)\n\tpublic void getNullOnNull() {\n\t\tassert stack.getLast().getNext() == node5;\n\t}",
"@Test\n\tvoid testCheckNulls2() {\n\t\tObject[] o = {2,5f,\"Test\",null,\"Test2\"};\n\t\tassertTrue(DataChecker.checkNulls(o));\n\t}",
"@Test\n void test009_addUsersIllegalNullArgumentException() {\n // null addUser or empty string addUser --> IllegalNullArgumentException\n try {\n christmasBuddENetwork.addUser(\"Santa Claus\");\n christmasBuddENetwork.addUser(\"Grinch\");\n christmasBuddENetwork.addUser(\"Comet\");\n christmasBuddENetwork.addUser(\"Rudolph\");\n christmasBuddENetwork.addUser(\"Prancer\");\n christmasBuddENetwork.addUser(\"Blitzen\");\n christmasBuddENetwork.addUser(\"Donder\");\n christmasBuddENetwork.addUser(\"Vixen\");\n christmasBuddENetwork.addUser(\"Dancer\");\n christmasBuddENetwork.addUser(\"Cupid\");\n christmasBuddENetwork.addUser(null);\n // if we get here, then we did NOT throw an illegalNullArgumentException\n // when we should have! :(\n fail(\"test009_addUsersIllegalNullArgumentException(): FAILED! :( Did NOT\"\n + \" throw an IllegalNullArgumentException when adding a null user\");\n } catch (IllegalNullArgumentException e1) {\n try {\n christmasBuddENetwork.addUser(\"\");\n } catch (IllegalNullArgumentException e1a) {\n } catch (Exception e2) {\n fail(\"test009_addUsersIllegalNullArgumentException(): FAILED! :( Did \"\n + \"NOT throw an IllegalNullArgumentException when adding an empty \"\n + \"string user\");\n }\n\n\n } catch (Exception e2) {\n fail(\"test009_addUsersIllegalNullArgumentException(): FAILED! :( Threw \"\n + \"the wrong exception!\");\n }\n\n\n\n }",
"@Test(timeout = 4000)\n public void test008() throws Throwable {\n String string0 = SQLUtil.renderValue((Object) null);\n assertEquals(\"null\", string0);\n }",
"@Test(timeout = 4000)\n public void test359() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef((String) null);\n // Undeclared exception!\n try { \n xmlEntityRef0.requestFocus();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }",
"@Test(expected = NullPointerException.class)\n\tpublic void testNull() {\n\n\t\tString str = null;\n\t\tstr.toUpperCase();\n\t}",
"public void testCheckNull() {\n Util.checkNull(\" \", \"test\");\n }",
"@Test(expected=IllegalArgumentException.class)\n\tpublic void testcontainsUniqueCharsNaiveNullString() {\n\t\tQuestion11.containsUniqueCharsNaive(null);\n\t}",
"@Test(timeout = 4000)\n public void test096() throws Throwable {\n StringBuilder stringBuilder0 = new StringBuilder();\n SQLUtil.addRequiredCondition((String) null, stringBuilder0);\n assertEquals(\"null\", stringBuilder0.toString());\n }",
"@Test(timeout = 4000)\n public void test089() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"4_R]T<#2)Q?]R7Ut\");\n // Undeclared exception!\n try { \n xmlEntityRef0.placeholder((String) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }",
"@Test(timeout = 4000)\n public void test032() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.ownerDotComponent((DBObject) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test032() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.ownerDotComponent((DBObject) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }",
"private static void checkForNullKey(String key) {\n if ( key == null ) {\n throw new NullPointerException();\n }\n }",
"@Test\n\tvoid testCheckNulls4() {\n\t\tObject[] o = {2,5f,\"Test\",Duration.ZERO,new Station(0,0,\"Test\")};\n\t\tassertFalse(DataChecker.checkNulls(o));\n\t}",
"@Test(timeout = 4000)\n public void test049() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.addRequiredCondition(\"\", (StringBuilder) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }",
"@Test\n void nullTest() {\n assertNull(sFloat1.toScrabbleInt());\n assertNull(sFloat1.and(sFloat2));\n assertNull(sFloat1.or(sFloat2));\n assertNull(sFloat1.toScrabbleBool());\n assertNull(sFloat1.toScrabbleBinary());\n assertNull(sFloat1.addToString(new ScrabbleString(\"Hello World\")));\n }",
"@Test(timeout = 4000)\n public void test131() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"/\");\n // Undeclared exception!\n try { \n xmlEntityRef0.h3((Object) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }",
"private void checkRep() {\n\t\tassert (this != null) : \"this Edge cannot be null\";\n\t\tassert (this.label != null) : \"this Edge's label cannot be null\";\n\t\tassert (this.child != null) : \"this Edge's child cannot be null\";\n\t}",
"@Test(timeout = 4000)\n public void test053() throws Throwable {\n String[] stringArray0 = new String[7];\n // Undeclared exception!\n try { \n SQLUtil.renderWhereClause(stringArray0, (Object[]) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test030() throws Throwable {\n // Undeclared exception!\n try { \n DBUtil.escape((String) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.DBUtil\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test049() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.addOptionalCondition(\"\", (StringBuilder) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test068() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.ownerDotComponent((DBObject) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test065() throws Throwable {\n Evaluation evaluation0 = null;\n try {\n evaluation0 = new Evaluation((Instances) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }",
"@Test(timeout = 4000)\n public void test056() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.renderNumber((StreamTokenizer) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }",
"@Test\n\tvoid testeNomeNull()\n\t{\n\t\ttry\n\t\t{\n\t\t\tcontatoBasico = new Contato(null, \"Gaudencio\", \"123\");\n\t\t\tfail(\"Esperava erro ao passar nome nulo\");\n\t\t}catch(NullPointerException npe)\n\t\t{\n\t\t\t\n\t\t}\n\n\t}",
"@Test(expected=NullPointerException.class) @SpecAssertion(id = \"432-A4\", section=\"4.3.2\")\n public void testNullConversion2(){\n MonetaryConversions.getConversion((String)null);\n }",
"@Test\n public void test130() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef((String) null);\n // Undeclared exception!\n try {\n Component component0 = xmlEntityRef0.address();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }",
"@Test(timeout = 4000)\n public void test040() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.isQuery((String) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test073() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.isQuery((String) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test082() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.addRequiredCondition((String) null, (StringBuilder) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test019() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.renderNumber((StreamTokenizer) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test019() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.renderNumber((StreamTokenizer) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }",
"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 }",
"@Test(timeout = 4000)\n public void test097() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n String[] stringArray0 = new String[3];\n DBUniqueConstraint dBUniqueConstraint0 = new DBUniqueConstraint(defaultDBTable0, (String) null, false, stringArray0);\n String string0 = SQLUtil.ownerDotComponent(dBUniqueConstraint0);\n assertEquals(\"null.null\", string0);\n }",
"@Test\n\tpublic void caseNameWithNull() {\n\t\tString caseName = \"null\";\n\t\ttry {\n\t\t\tStringNumberUtil.stringUtil(caseName);\n\t\t\tfail();\n\t\t} catch (StringException e) {\n\n\t\t}\n\t}",
"public void testRegexGroupSearcherForNullPointerException() {\r\n try {\r\n new RegexGroupSearcher(null);\r\n fail(\"the NullPointerException should be thrown!\");\r\n } catch (NullPointerException e) {\r\n // Good\r\n }\r\n }",
"@Test\n public void test101() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef((String) null);\n // Undeclared exception!\n try {\n Component component0 = xmlEntityRef0.cite((Object) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }",
"@Test\n\tvoid testCheckNulls3() {\n\t\tObject[] o = {null,null,null,null,null};\n\t\tassertTrue(DataChecker.checkNulls(o));\n\t}",
"public void testNormalPutNullValues()\r\n throws Exception\r\n {\r\n try\r\n {\r\n SCOMapTests.checkPutNullValues(pmf,\r\n HashMap1.class,\r\n ContainerItem.class);\r\n }\r\n finally\r\n {\r\n clean(HashMap1.class);\r\n clean(ContainerItem.class);\r\n }\r\n }",
"@Test(expected = IllegalArgumentException.class)\r\n public void testDetectWithNullData() throws Exception {\r\n instance.detect(null);\r\n }",
"@Test(timeout = 4000)\n public void test325() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"B$\");\n // Undeclared exception!\n try { \n xmlEntityRef0.q((Object) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }",
"public void testChangePropertyHandler_null() {\n try {\n new ChangePropertyHandler(null);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n\n }",
"public void testAssertPropertyReflectionEquals_leftNull() {\r\n try {\r\n assertPropertyReflectionEquals(\"stringProperty\", null, testObject);\r\n fail(\"Expected AssertionFailedError\");\r\n } catch (AssertionFailedError a) {\r\n // expected\r\n }\r\n }",
"public void testGetGroupsForNullPointerException()\r\n throws Exception {\r\n try {\r\n searcher.getGroups(null);\r\n fail(\"the NullPointerException should be thrown!\");\r\n } catch (NullPointerException e) {\r\n // Good\r\n }\r\n }",
"@Test(timeout = 4000)\n public void test045() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.constraintName((DBConstraint) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test015() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.renderWhereClause((String[]) null, (Object[]) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test015() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.renderWhereClause((String[]) null, (Object[]) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test048() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.addRequiredCondition((String) null, (StringBuilder) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test065() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.renderColumn((DBColumn) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test047() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.constraintName((DBConstraint) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test038() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.isQuery((String) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test029() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.renderColumn((DBColumn) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test024() throws Throwable {\n GenericDescriptorList genericDescriptorList0 = new GenericDescriptorList();\n genericDescriptorList0.add((Object) null);\n // Undeclared exception!\n try { \n SQLUtil.renderColumnNames((List<DBColumn>) genericDescriptorList0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test18() throws Throwable {\n LinkedList<byte[][]> linkedList0 = new LinkedList<byte[][]>();\n FileSystemHandling.shouldThrowIOException((EvoSuiteFile) null);\n linkedList0.add((byte[][]) null);\n FBCachedFetcher fBCachedFetcher0 = new FBCachedFetcher(linkedList0, (FBObjectListener.FetcherListener) null);\n FileSystemHandling.shouldAllThrowIOExceptions();\n // Undeclared exception!\n try { \n fBCachedFetcher0.relative((-513));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.firebirdsql.jdbc.FBCachedFetcher\", e);\n }\n }",
"@Test(expected = IllegalArgumentException.class)\r\n public void testCreationFromNullOrigin()\r\n {\r\n final Circle c = new Circle(null, 0);\r\n c.equals(null);\r\n }",
"private void checkNull(T x) throws NullPointerException\n\t{\n\t\tif (x == null)\n\t\t{\n\t\t\tthrow new NullPointerException();\n\t\t}\n\t}",
"@Test(timeout = 4000)\n public void test12() throws Throwable {\n // Undeclared exception!\n try { \n EWrapperMsgGenerator.fundamentalData(Integer.MAX_VALUE, (String) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"com.ib.client.EWrapperMsgGenerator\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test029() throws Throwable {\n // Undeclared exception!\n try { \n DBUtil.format((ResultSet) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.DBUtil\", e);\n }\n }",
"@Test\n public void test24() throws Throwable {\n Complex complex0 = new Complex((-0.5), (-0.5));\n try { \n complex0.add((Complex) null);\n } catch(IllegalArgumentException e) {\n //\n // null is not allowed\n //\n assertThrownBy(\"org.apache.commons.math.util.MathUtils\", e);\n }\n }",
"@Test\n\tpublic void takingNullNodeTest()\n\t{\n\t\ttry\n\t\t{\n\t\t\tOsmXmlToSQLiteDatabaseConverter converter = new OsmXmlToSQLiteDatabaseConverter(new MapObjectsIdFinderFake());\n\t\t\tconverter.takeNode(null);\n\t\t\tfail();\n\t\t}\n\t\tcatch (IllegalArgumentException ex)\n\t\t{\n\t\t\t// ok\n\t\t}\n\t}",
"@Test(expected=NullPointerException.class) @SpecAssertion(id = \"432-A4\", section=\"4.3.2\")\n public void testNullConversion4(){\n MonetaryConversions.getConversion((String)null, ConversionContext.of());\n }",
"@Test(timeout = 4000)\n public void test064() throws Throwable {\n // Undeclared exception!\n try { \n DBUtil.checkReadOnly((String) null, true);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test028() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.renderColumn((DBColumn) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }",
"public void testTransformWithNullElement() throws Exception {\n try {\n instance.transform(null, document, caller);\n fail(\"IllegalArgumentException is excepted[\" + suhClassName + \"].\");\n } catch (IllegalArgumentException iae) {\n // pass\n }\n }",
"@Test(timeout = 4000)\n public void test080() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.constraintName((DBConstraint) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test249() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"&!a0Q!<8UDk+%_*<Z'\");\n // Undeclared exception!\n try { \n xmlEntityRef0.a((Object) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }",
"public void testValidNullPointerException() {\r\n assertNotNull(\"setup fails\", uploadRequestValidator);\r\n try {\r\n uploadRequestValidator.valid(null);\r\n fail(\"if argument is null, throw NullPointerException\");\r\n } catch (NullPointerException e) {\r\n // good\r\n }\r\n }",
"@Test(timeout = 4000)\n public void test065() throws Throwable {\n // Undeclared exception!\n try { \n DBUtil.querySingleRow(\")\", (Connection) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.DBUtil\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test26() throws Throwable {\n PipedWriter pipedWriter0 = new PipedWriter();\n PipedReader pipedReader0 = new PipedReader(pipedWriter0);\n StreamTokenizer streamTokenizer0 = new StreamTokenizer(pipedReader0);\n DBCatalog dBCatalog0 = new DBCatalog();\n SQLUtil.ownerDotComponent(dBCatalog0);\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n MockFileOutputStream mockFileOutputStream0 = new MockFileOutputStream(\"null\", true);\n // Undeclared exception!\n try { \n DBDataType.getInstance((String) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.model.DBDataType\", e);\n }\n }",
"@Test(expected = NullPointerException.class)\n\tpublic void test_the_exception() throws Exception {\n\t\tTeacher t =new Teacher(NULL);\n\t\t\n\t\t\n\t}",
"public TestCase notNull( Object obj );",
"@Test(timeout = 4000)\n public void test006() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.renderWhereClause((String[]) null, (Object[]) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test033() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.normalize((String) null, false);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"java.io.StringReader\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test013() throws Throwable {\n // Undeclared exception!\n try { \n DBUtil.queryString((PreparedStatement) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.DBUtil\", e);\n }\n }",
"@Test(timeout = TIMEOUT, expected = IllegalArgumentException.class)\n public void testRadixNull() {\n Sorting.lsdRadixSort(null);\n }",
"public void testGetNullValue() {\n ValueString vs = new ValueString();\n\n assertNull(vs.getString());\n assertEquals(0.0D, vs.getNumber(), 0.0D);\n assertNull(vs.getDate());\n assertEquals(false, vs.getBoolean());\n assertEquals(0, vs.getInteger());\n assertEquals(null, vs.getBigNumber());\n assertNull(vs.getSerializable());\n }",
"@Test\n public void nonNullString() {\n }"
]
| [
"0.72393256",
"0.7226251",
"0.70261",
"0.70229405",
"0.70079863",
"0.6971332",
"0.6936963",
"0.6917658",
"0.6894816",
"0.6887592",
"0.68809116",
"0.6853908",
"0.6847981",
"0.6803541",
"0.6778474",
"0.6765858",
"0.67639947",
"0.6744881",
"0.6742768",
"0.67423016",
"0.6724555",
"0.67205286",
"0.6714613",
"0.67096287",
"0.6707768",
"0.6706497",
"0.67061025",
"0.6698091",
"0.6691571",
"0.66847897",
"0.66719204",
"0.6666557",
"0.6656848",
"0.6632124",
"0.66235214",
"0.66235214",
"0.66159046",
"0.66135514",
"0.66120446",
"0.6605885",
"0.6600214",
"0.65899074",
"0.65855473",
"0.6585492",
"0.65811586",
"0.6576298",
"0.6570098",
"0.65614694",
"0.6559042",
"0.6557641",
"0.65455043",
"0.654511",
"0.65323484",
"0.6531533",
"0.6528509",
"0.6528509",
"0.6525391",
"0.6521224",
"0.6519025",
"0.6517226",
"0.65100753",
"0.65099925",
"0.6497299",
"0.64968044",
"0.6495364",
"0.649161",
"0.6490533",
"0.64803696",
"0.64773375",
"0.64733374",
"0.64733374",
"0.6470423",
"0.64580274",
"0.64544207",
"0.64533234",
"0.6453114",
"0.64526623",
"0.6451984",
"0.6450901",
"0.6449986",
"0.6446193",
"0.6442358",
"0.6440153",
"0.64363664",
"0.6436233",
"0.6433552",
"0.6428114",
"0.64263165",
"0.64231026",
"0.6422819",
"0.64191884",
"0.6419113",
"0.6416196",
"0.6415507",
"0.6414728",
"0.641292",
"0.6406294",
"0.6406256",
"0.64011145",
"0.64002293",
"0.6398416"
]
| 0.0 | -1 |
_____________________________________ AddShape() Test ________________________________________. | @Test
public void testAddShape() {
// add the "R" & "C" shapes to the animation
testAnimation.addShape(r, 1, 100);
testAnimation.addShape(c, 6, 100);
assertEquals("Shapes:\n"
+ "Name: R\n"
+ "Type: rectangle\n"
+ "Min corner: (200.0,200.0), Width: 50.0, Height: 100.0, Color: (1,0,0)\n"
+ "Appears at t=1\n"
+ "Disappears at t=100\n"
+ "\n"
+ "Name: C\n"
+ "Type: ellipse\n"
+ "Center: (500.0,100.0), X radius: 60.0, Y radius: 30.0, Color: (0,0,1)\n"
+ "Appears at t=6\n"
+ "Disappears at t=100\n"
+ "\n", testAnimation.toString());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void add(Shape aShape);",
"void addShape(IShape shape);",
"private static void addShaped()\n {}",
"public void addShape(TShape aShape){\r\n // fShapes.remove(aShape); // just in case it was already there\r\n\r\n /*unfortunately we need to have a front to back screen order, properties at the back\r\n (drawn first), then individuals, finally relations between individuals*/\r\n\r\n /* if (aShape instanceof TLine)\r\n fShapes.add(aShape); // add at the end\r\n else if (aShape instanceof TProperty)\r\n fShapes.add(0,aShape); // add at the beginning\r\n else {\r\n int insertIndex=0;\r\n if (fShapes.size() > 0) {\r\n Iterator iter = fShapes.iterator();\r\n\r\n while (iter.hasNext()) {\r\n if (! ((TShape) iter.next()instanceof TProperty))\r\n break; //put it after rectangles\r\n else\r\n insertIndex++;\r\n }\r\n }\r\n fShapes.add(insertIndex,aShape);\r\n }*/\r\n\r\n\r\n // aShape.setSemantics(fSemantics);\r\n\r\n aShape.addChangeListener(this); // and we'll listen for any of its changes, such as being selected\r\n\r\n addShapeToList(aShape,fShapes);\r\n\r\n if (aShape instanceof TInterpretationBoard)\r\n ((TInterpretationBoard)aShape).setSemantics(fSemantics);\r\n\r\n\r\n fPalette.check(); // some of the names may need updating\r\n\r\n repaint();\r\n }",
"void addShape(IShape shape, int appear, int disappear);",
"@Test\r\n\tpublic void testAddNewShapeToScreen() {\r\n\r\n\t\t// Create a shape square\r\n\t\tPoint origin = new Point(5,5); \t // Set origin for square\r\n\t\tList<Double> list = new ArrayList<Double>(); \t // Create a new list of parameters\r\n double side = 5.0; \t // Add side as parameter for shape square \r\n list.add(side); \t\t\t\t\t\t\t\t\t\t \t // Add to list\r\n\t\tShape shape = ShapeFactory.createShape(0, origin, list); \t // 0 for creation of square\r\n\t\t\r\n\t\tscreen.shapesOnScreen.add(shape);\t\t\t\t\t\t \t // Add shape to screen\r\n\t\tassertEquals( 1, screen.shapesOnScreen.size());\t\t\t \t // Check if size of list is 1 after addition of shape\r\n\t}",
"public void addShape(Shape shape)\n {\n shapes.add(shape);\n }",
"public void addShape(final Shape theShape) {\n if (myWidth > 0) {\n final Drawing newDrawing = new Drawing(theShape, myColor, myWidth);\n if (myDrawingArray.isEmpty()) {\n firePropertyChange(ARRAY_STRING, null, NOT_EMPTY_STRING);\n }\n myDrawingArray.add(newDrawing);\n repaint();\n } \n }",
"void drawShape(Shape s) {\n }",
"public void add(Shape s)\n {\n shapes.add(s);\n }",
"private static void addShapeless()\n {}",
"@Override\n\tpublic void getShape() {\n\n\t}",
"@Override\n\tpublic void BuildShape(Graphics g) {\n\t\t\n\t}",
"public void assignShape() {\n\t\t\n\t}",
"public NewShape() {\r\n\t\tsuper();\r\n\t}",
"@Test(expected = IllegalArgumentException.class)\n public void testAddSameShapeTwice() {\n testAnimation.addShape(c, 1, 100);\n testAnimation.addShape(c, 50, 70);\n }",
"public void addShape(Shape s){\n\t\tshapes.add(s);\n\t\tundoCommands.add(s);\n\t\tredoCommands.clear();\n\t\tthis.repaint();\n\t\tcounter++;\n\t\tnotifyObservers();\n\t}",
"@Test(expected = IllegalArgumentException.class)\n public void invalidShapeDisappearsBeforeAppearing() {\n model1.addShape(Rectangle.createRectangle(\"R\", new Point.Double(200, 200),\n new Color(1, 0, 0), 1, 0, 50, 100));\n }",
"public void drawShape(Shape shape);",
"@Test(expected = IllegalArgumentException.class)\n public void sameShapeName() {\n\n testAnimation.addShape(r, 1, 100);\n\n // new shape with same name\n IShape f = new Rectangle(\"R\",\n 2, 4,\n 3, 50, 10,\n 30.0, 75.0);\n\n testAnimation.addShape(f, 30, 80);\n }",
"public void setShape(Info shape) {\n \n }",
"public void addShape(Shapes obj) {\n \tthis.listShapes.add(obj);\n W.repaint();\n }",
"void add(Shape shape) throws IllegalArgumentException\n {\n // Checking if the shape is already part of the children list or if the\n // shape already has a parent\n if(contains(shape) || shape.parent()!=null)\n {\n // Then throw an error\n throw new IllegalArgumentException();\n }\n\n // If the shape to add is outside of the CarrierShape bounds\n // then throw an error\n if(shape._width+shape._x>_width || shape._height+shape._x>_height)\n {\n throw new IllegalArgumentException();\n }\n\n // Otherwise the shape is added to the children list\n children.add(shape);\n\n // The parent of the shape is set to this CarrierShape\n // to establish a two-way connection\n shape.setParent(this);\n }",
"@Test(expected = IllegalArgumentException.class)\n public void testNoShapeWithSameName() {\n model1.addShape(Rectangle.createRectangle(\"R\", new Point.Double(500, 200),\n new Color(0, 0, 0), 0, 10, 10, 10));\n model1.addShape(Oval.createOval(\"R\", new Point.Double(500, 200),\n new Color(0, 0, 0), 0, 10, 10, 10));\n }",
"Shape getShape();",
"@Test(expected = IllegalArgumentException.class)\n public void testMakingShapeWithNullName() {\n model1.addShape(Oval.createOval(null, new Point.Double(500, 100),\n new Color(0, 0, 1), 6, 100, 60.0, 30.0));\n }",
"public CmdAddShape(Model model, Shape os) {\n\t\tthis.model = model;\n\t\tthis.s = os;\n\t\t\n\t}",
"void displayShape(Shape shape);",
"public void setMyShape(int shapeIndex){this.myShape = shapeIndex;}",
"protected abstract boolean isShapeSimple();",
"private void createShape() {\n if (shape == null) {\n float firstItemMargin = noxConfig.getNoxItemMargin();\n float firstItemSize = noxConfig.getNoxItemSize();\n int viewHeight = getMeasuredHeight();\n int viewWidth = getMeasuredWidth();\n int numberOfElements = noxItemCatalog.size();\n ShapeConfig shapeConfig =\n new ShapeConfig(numberOfElements, viewWidth, viewHeight, firstItemSize, firstItemMargin);\n shape = ShapeFactory.getShapeByKey(defaultShapeKey, shapeConfig);\n } else {\n shape.setNumberOfElements(noxItemCatalog.size());\n }\n shape.calculate();\n }",
"protected abstract void setShapes();",
"public void add(Shape shapes) {\n\t\tshapesList.add(shapes);\n\t}",
"@Test\n public void testAdding(){\n fakeCoord.add(new Point2D.Double(0.10,0.20));\n VecFile.AddCommand(VecCommandFactory.GetShapeCommand(VecCommandType.RECTANGLE, fakeCoord));\n assertEquals(VecCommandType.RECTANGLE, VecFile.GetLastCommand().GetType());\n }",
"@Test(expected = IllegalArgumentException.class)\n public void invalidShapeAppearsBefore0() {\n model1.addShape(Rectangle.createRectangle(\"R\", new Point.Double(200, 200),\n new Color(1, 0, 0), -1, 100, 50, 100));\n }",
"public Shape getShape();",
"Shape newShape(GraphicalObject g) throws RemoteException;",
"public Shape getShape() { return shape; }",
"Shape createShape(BorderType borderType);",
"@Test(expected = IllegalArgumentException.class)\n public void testErrorShapeDoesntExist() {\n model1.addShape(Rectangle.createRectangle(\"R\", new Point.Double(500, 200),\n new Color(0, 0, 0), 0, 10, 10, 10));\n model1.addAction(ScaleOvalAction.createScaleOvalAction(\"O\", 0, 100,\n 100, 100, 1, 1));\n }",
"private void drawShape(Graphics g, IShape shape) {\r\n Color color = shape.getColor();\r\n if (shape.getPosition() != null) {\r\n int x = shape.getPosition().getX();\r\n int y = shape.getPosition().getY();\r\n int width = shape.getWidth();\r\n int height = shape.getHeight();\r\n\r\n\r\n switch (shape.getShapeType()) {\r\n case \"Ellipse\":\r\n g.setColor(color);\r\n g.fillOval(x, y, width, height);\r\n g.drawOval(x, y, width, height);\r\n break;\r\n case \"Rectangle\":\r\n g.setColor(color);\r\n g.fillRect(x, y, width, height);\r\n g.drawRect(x, y, width, height);\r\n break;\r\n case \"Plus\":\r\n g.setColor(color);\r\n int width1 = width ;\r\n int height2 = height;\r\n int height1 = height / 2;\r\n int width2 = width / 2;\r\n int x1 = x;\r\n int y1 = y + height / 4;\r\n int x2 = x + width / 4;\r\n int y2 = y;\r\n g.fillRect(x1, y1, width1, height1);\r\n g.fillRect(x2, y2, width2, height2);\r\n break;\r\n default:\r\n return;\r\n }\r\n }\r\n }",
"public void add(SceneShape s)\n {\n shapes.add(s);\n repaint();\n }",
"void addEvent(IShape shape, IEvent event, int eventBegin, int eventEnd);",
"@Test(expected = IllegalArgumentException.class)\n public void invalidShapeDispersantAppearsBefore0() {\n model1.addShape(Rectangle.createRectangle(\"R\", new Point.Double(200, 200),\n new Color(1, 0, 0), -10, -1, 50, 100));\n }",
"public ShapeTest(Shape shape) {\r\n\t\t\r\n\t\tthis.shape = shape;\r\n\t}",
"public Shape add(ShapeType t, double x, double y) {\n\t\tShape c = new Shape(x, y);\n\t\tc.setType(t);\n\t\tadd(c);\n\t\treturn c;\n\t}",
"@Test(expected = IllegalArgumentException.class)\n public void testNullShape() {\n testAnimation.addShape(null, 1, 100);\n }",
"@Override\n\tpublic void createCollisionShape() {\n\t\t\n\t}",
"public void addShape(PhysicsShape shape) {\n\t\tshapes.add(shape);\n\t}",
"@Test\r\n\tpublic void testDeleteShapeFromScreen() {\r\n\t\t\r\n\t\t// Create a first shape square\r\n\t\tPoint origin = new Point(5,5); \t\t// Set origin for square\r\n\t\tList<Double> list = new ArrayList<Double>(); \t\t// Create a new list of parameters\r\n double side = 5.0; \t\t// Add side as parameter for shape square \r\n list.add(side); \t\t\t\t\t\t\t\t\t\t \t\t// Add to list\r\n\t\tShape shape = ShapeFactory.createShape(0, origin, list); \t\t// 0 for creation of square\r\n\t\tscreen.shapesOnScreen.add(shape);\t\t\t\t\t\t \t\t// Add shape to screen\r\n\t\t\r\n\t\t// Create a second shape square\r\n\t\tPoint secondOrigin = new Point(5,5); // Set origin for square\r\n\t\tList<Double> secondList = new ArrayList<Double>(); // Create a new list of parameters\r\n double secondSide = 5.0; // Add side as parameter for shape square \r\n secondList.add(secondSide); \t\t\t\t\t\t\t\t\t // Add to list\r\n\t\tShape secondShape = ShapeFactory.createShape(0, secondOrigin, secondList); // 0 for creation of square\r\n\t\tscreen.shapesOnScreen.add(secondShape);\t\t\t\t\t\t \t // Add shape to screen\r\n\t\t\r\n\t\t// Delete shape from screen\r\n\t\tassertEquals( true, screen.deleteShapeFromScreen( secondShape ));\t\t\r\n\t}",
"@Test(expected = IllegalArgumentException.class)\n public void testMakingShapeWithNullLocation() {\n model1.addShape(Oval.createOval(\"C\", null,\n new Color(0, 0, 1), 6, 100, 60.0, 30.0));\n }",
"void enterShapeEditor(String layer, String shape);",
"@Override\n public void redo() {\n shapeList.add((newShape));\n }",
"public String whatShape();",
"ShapeType getShapeType();",
"public void add(String s) { \n\t\t\n\t\t//get list of values\n\t\tString[] values = s.split(\"[ ]*,[ ]*\"); \n\t\t\n\t\tif(values[0].equals(\"CIRCLE\")) {\n\t\t\tadd(new Shape(Double.parseDouble(values[1]), Double.parseDouble(values[2]),\n\t\t\t\t\tDouble.parseDouble(values[3]), new Color(Double.parseDouble(values[4]), Double.parseDouble(values[5]), Double.parseDouble(values[6]), 1),\n\t\t\t\t\t50, 50, 15, 15, \"\", ShapeType.CIRCLE));\n\t\t}\n\t\telse if (values[0].equals(\"RECTANGLE\")) {\n\t\t\tadd(new Shape(Double.parseDouble(values[1]), Double.parseDouble(values[2]),\n\t\t\t\t\t50, new Color(Double.parseDouble(values[5]), Double.parseDouble(values[6]), Double.parseDouble(values[7]), 1),\n\t\t\t\t\tDouble.parseDouble(values[3]), Double.parseDouble(values[4]), 15, 15, \"\", ShapeType.RECTANGLE));\n\t\t}\n\t\telse if (values[0].equals(\"OVAL\")) {\n\t\t\tadd(new Shape(Double.parseDouble(values[1]), Double.parseDouble(values[2]),\n\t\t\t\t\t50, new Color(Double.parseDouble(values[5]), Double.parseDouble(values[6]), Double.parseDouble(values[7]), 1),\n\t\t\t\t\tDouble.parseDouble(values[3]), Double.parseDouble(values[4]), 15, 15, \"\", ShapeType.OVAL));\n\t\t}\n\t\telse if (values[0].equals(\"ROUNDRECT\")) {\n\t\t\tadd(new Shape(Double.parseDouble(values[1]), Double.parseDouble(values[2]),\n\t\t\t\t\t50, new Color(Double.parseDouble(values[7]), Double.parseDouble(values[8]), Double.parseDouble(values[9]), 1),\n\t\t\t\t\tDouble.parseDouble(values[3]), Double.parseDouble(values[4]), \n\t\t\t\t\tDouble.parseDouble(values[5]), Double.parseDouble(values[6]), \"\", ShapeType.ROUNDRECT));\n\t\t}\n\t\telse if (values[0].equals(\"TEXT\")) {\n\t\t\tadd(new Shape(Double.parseDouble(values[1]), Double.parseDouble(values[2]),\n\t\t\t\t\t50, new Color(Double.parseDouble(values[3]), Double.parseDouble(values[4]), Double.parseDouble(values[5]), 1),\n\t\t\t\t\t50, 50, 15, 15, \"textex\", ShapeType.TEXT));\n\t\t}\n\t\telse{\n\t\t\tadd(new Shape(0, 0, 0, new Color(0, 0, 0, 1), 0, 0, 0, 0, \"\", ShapeType.UNKNOWN));\n\t\t}\n\t\t\t\n\t\n\t}",
"IShape getCurrentShape();",
"IShape getShape(String name);",
"abstract Shape nodeShape(String node, Graphics2D g2d);",
"@Test\n public void testAddSizeChange() {\n testAnimation.addShape(r, 1, 100);\n // Instantiate the size change\n size1 = new ScaleShape(r, 50.0, 100.0, 25.0, 100.0);\n size2 = new ScaleShape(r, 25.0, 100.0, 25.0, 13.0);\n testAnimation.addEvent(r, size1, 51, 70);\n testAnimation.addEvent(r, size2, 71, 73);\n\n assertEquals(\"Shapes:\\n\"\n + \"Name: R\\n\"\n + \"Type: rectangle\\n\"\n + \"Min corner: (200.0,200.0), Width: 50.0, Height: 100.0, Color: (1,0,0)\\n\"\n + \"Appears at t=1\\n\"\n + \"Disappears at t=100\\n\"\n + \"\\n\"\n + \"R changes width from 50.0 to 25.0 from time t=51 to t=70\"\n + \"\\nR changes height from 100.0 to 13.0 from time t=71 to t=73\\n\",\n testAnimation.toString());\n }",
"void drawMancalaShape(Graphics g, int x, int y, int width, int height, int stoneNum, String pitLabel);",
"public void fillShape(Shape shape);",
"public void generateShape() {\n\n //TODO for tetris game - copy added to Tetris\n Shape newShape = null;\n //if(GAME_TO_TEST==GameEnum.TETRIS){\n //newShape = TetrisShapeFactory.getRandomShape(this.board);\n //} else if (GAME_TO_TEST== GameEnum.DRMARIO){\n //newShape = DrMarioShapeFactory.getRandomShape(this.board);\n //}\n\n //Temporary\n //-------------------------------------//\n Image image = null;\n try {\n image = new Image(new FileInputStream(\"resources/BlockPurple.png\"));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n\n int spawnColIndex = 0;\n int spawnRowIndex = 0;\n int tileSize = 0;\n boolean setColor = false;\n boolean setTileBorder = false; //toggle to add boarder to tile\n boolean setImage = true;\n spawnColIndex = (board.gridWidth-1)/2; //half of board width\n spawnRowIndex = 0;\n tileSize = board.tileSize;\n\n Tile tile1 = new Tile(tileSize, setColor, Color.VIOLET, setTileBorder, setImage, image, spawnColIndex,spawnRowIndex, 0 , Direction.DOWN); //Center Tile\n Tile tile2 = new Tile(tileSize, setColor, Color.VIOLET, setTileBorder, setImage, image, spawnColIndex,spawnRowIndex,1 , Direction.RIGHT);\n Tile tile3 = new Tile(tileSize, setColor, Color.VIOLET, setTileBorder, setImage, image, spawnColIndex,spawnRowIndex, 1 , Direction.LEFT);\n Tile tile4 = new Tile(tileSize, setColor, Color.VIOLET, setTileBorder, setImage, image, spawnColIndex,spawnRowIndex, 1 , Direction.DOWN);\n\n List<Tile> tiles = new ArrayList<Tile>();\n tiles.add(tile1);\n tiles.add(tile2);\n tiles.add(tile3);\n tiles.add(tile4);\n newShape = new Shape(tiles);\n\n //set newly created shape as the currently active shape\n this.currentActiveShape = newShape;\n\n //check if spawn area is occupied\n boolean isOccupied =false;\n for (Tile newTile : this.currentActiveShape.tiles) {\n if(this.board.getTile(newTile.columnIndex,newTile.rowIndex)!=null){\n isOccupied = true;\n }\n }\n\n //TODO\n //check if shape reaches top\n if(!isOccupied){\n //add tiles to board\n for (Tile newTile : this.currentActiveShape.tiles) {\n this.board.placeTile(newTile);\n }\n } else {\n //TODO later add Game Over JavaFx message\n System.out.println(\"GAME OVER\");\n\n //TODO Finishlater\n //Text gameoverText = new Text(10,20,\"GAME OVER\");\n //gameoverText.setFill(Color.RED);\n //gameoverText.setX( 100/*( ((board.gridWidth-1)*tileSize)/2)*/ );\n //gameoverText.setY( 100/*( ((board.gridHeight-1)*tileSize)/2)*/ );\n //gameoverText.setStyle(\"-fx-font: 70 arial;\");\n //this.group.getChildren().add(gameoverText);\n\n //Text t = new Text();\n //t.setX(20.0f);\n //t.setY(65.0f);\n //t.setX(100);\n //t.setY(200);\n //t.setText(\"Perspective\");\n //t.setFill(Color.YELLOW);\n //t.setFont(Font.font(null, FontWeight.BOLD, 36));\n //this.group.getChildren().add(t);\n //this.pane.getChildren().add(t);\n\n //System.exit(0);\n }\n\n }",
"@Test\n public void testCloneShapes() {\n NativeLibraryLoader.loadNativeLibrary(\"bulletjme\", true);\n assetManager.registerLoader(AWTLoader.class, \"jpg\", \"png\");\n assetManager.registerLoader(BinaryLoader.class, \"j3o\");\n assetManager.registerLoader(J3MLoader.class, \"j3m\", \"j3md\");\n assetManager.registerLocator(null, ClasspathLocator.class);\n\n cloneShapesConcave();\n cloneShapesConvex();\n\n // CompoundCollisionShape\n CompoundCollisionShape compound = new CompoundCollisionShape(1);\n CollisionShape capsule = new CapsuleCollisionShape(1f, 1f);\n compound.addChildShape(capsule, 0f, 1f, 0f);\n setParameters(compound, 0f);\n verifyParameters(compound, 0f);\n CollisionShape compoundClone = Heart.deepCopy(compound);\n cloneTest(compound, compoundClone);\n Assert.assertEquals(0.04f, compoundClone.getMargin(), 0f);\n compound.setMargin(0.13f);\n Assert.assertEquals(0.04f, compoundClone.getMargin(), 0f);\n }",
"@Test(expected = IllegalArgumentException.class)\n public void testNoShapeWithSameNameCaseInsensitive() {\n model1.addShape(Rectangle.createRectangle(\"R\", new Point.Double(500, 200),\n new Color(0, 0, 0), 0, 10, 10, 10));\n model1.addShape(Oval.createOval(\"r\", new Point.Double(500, 200),\n new Color(0, 0, 0), 0, 10, 10, 10));\n }",
"public int getMyShape(){ return myShape;}",
"public Shape createShape(int shapeId, String name) {\n return registeredShapes.get(shapeId).create(name);\n }",
"public abstract Shape createPath();",
"public Shape getShape() {\n\treturn shape;\n }",
"public Shape getShape() {\n return shape;\n }",
"@Override\n\tpublic void redo() {\n\t\tthis.list.add(shape);\n\n\t}",
"@Test(expected = IllegalArgumentException.class)\n public void testMakingShapeWithNullColor() {\n model1.addShape(Oval.createOval(\"C\", new Point.Double(500, 100),\n null, 6, 100, 60.0, 30.0));\n }",
"@Test(expected = IllegalArgumentException.class)\n public void testAddMoveEndBeforeBegin() {\n testAnimation.addShape(r, 1, 100);\n size1 = new ScaleShape(r, 50.0, 100.0, 25.0, 100.0);\n testAnimation.addEvent(r, size1, 90, 2);\n }",
"public ShapeGraphics() {\r\n //A random object to set random measures for the shapes\r\n Random rn = new Random();\r\n //Creating two instances of every shape using the random object and adding them to the list\r\n for (int i = 0; i <2 ; i++) {\r\n MyLine line = new MyLine(rn.nextInt(MAX_SIZE),rn.nextInt(MAX_SIZE),rn.nextInt(MAX_SIZE),rn.nextInt(MAX_SIZE), Color.RED);\r\n MyRectangle rec = new MyRectangle (rn.nextInt(MAX_SIZE),rn.nextInt(MAX_SIZE),rn.nextInt(MAX_SIZE),rn.nextInt(MAX_SIZE),Color.RED,true);\r\n MyOval oval = new MyOval (rn.nextInt(MAX_SIZE),rn.nextInt(MAX_SIZE),rn.nextInt(MAX_SIZE),rn.nextInt(MAX_SIZE),Color.RED,true);\r\n list.add(line);\r\n list.add(oval);\r\n list.add(rec);\r\n\r\n }\r\n //Creating cloned shapes of this list and adding them to another array list\r\n ClonedShapes c = new ClonedShapes(list);\r\n clonedList = c.getClonedList();\r\n }",
"public void setShapeType(ShapeType shapeType) {\n }",
"String getShapeName();",
"@Override\n\tpublic String getShape() {\n\t\treturn \"Rectangle\";\n\t}",
"protected void addEdgeShape( Edge edge, Coordinate coos[] )\n \t{\n \t\tint n = coos.length;\n \n \t\tif( n > 1 )\n \t\t{\n \t\t\tObject xyz[] = new Object[n*3];\n \t\t\t\n \t\t\tfor( int i=0; i<n; ++i )\n \t\t\t{\n \t\t\t\tint j = i*3;\n \t\t\t\t\n \t\t\t\txyz[j+0] = (float) coos[i].x;\n \t\t\t\txyz[j+1] = (float) coos[i].y;\n \t\t\t\txyz[j+2] = (float) 0;\n \t\t\t}\n \t\t\t\n \t\t\tedge.setAttribute( \"ui.points\", xyz );\n \t\t}\n \t}",
"public static void main(String[] args) {\n\n Color color = new Color();\n color.setIntensity(10);\n color.setName(\"Green\");\n Shape.color = color; // aici se modifica campul color la nivel de clasa\n // Shape.color - variabilele si methodele se acceseaza cu numele clasei iar schimbarea este vizibila in toate instantele clasei\n// shape.setColor(color); // bad practice , nu e ok sa avem getteri si setteri pentru variabile statice\n// shape1.setAria(1); // aici se modifica valoarea campului aria numai in obiectul shape1\n\n// System.out.println(shape1.getAria());\n// System.out.println(Shape.color);\n// System.out.println(shape1.color1);\n\n// System.out.println(shape2.color1);\n// Color color2 = new Color();\n// color2.setIntensity(110);\n// color2.setName(\"Red\");\n// shape2.color = color2; // e acelasi lucru ca si atunci cand schimbam valoarea campului static cu numele clasei, tot la nivel de clasa se schimba si asa pentru ca e static\n // cum e aici schimbat nu e ok- (bad practice) pentru ca ne poate induce in eroare, color fiid un camp static el trebuie accesat cu numele clasei\n // chiar si cand folosim numele unei instante a clasei , schimbarea este vizibila in toate celelalte intante ale clasei\n// System.out.println(shape2.color);\n// System.out.println(shape3.color);\n// System.out.println(shape4.color);\n }",
"private void setShape(ChamberShape theShape) {\n mySize = theShape;\n createDoorsFromExits();\n }",
"@Test\r\n public void testGetEnclosingShapes() {\r\n List<Shape> expectedOutput = new ArrayList<Shape>();\r\n expectedOutput.add(circle);\r\n expectedOutput.add(square);\r\n assertEquals(expectedOutput, screen.getEnclosingShapes(new Point(5, 5)));\r\n }",
"public void mousePressed(MouseEvent evt) {\n\n\t\t\tstartingX = evt.getX();\n\t\t\tstartingY = evt.getY();\n\t\t\tif (currentShapeName != null) {\n\t\t\t\tif (!isDrawing) {\n\n\t\t\t\t\tif (currentShapeName.equals(\"line\")) {\n\t\t\t\t\t\tcurrentShape = new Line(startingX, startingY);\n\t\t\t\t\t}\n\t\t\t\t\tif (currentShapeName.equals(\"oval\")) {\n\t\t\t\t\t\tcurrentShape = new Oval(startingX, startingY);\n\t\t\t\t\t}\n\t\t\t\t\tif (currentShapeName.equals(\"rect\")) {\n\t\t\t\t\t\tcurrentShape = new Rectangle(startingX, startingY);\n\t\t\t\t\t}\n\t\t\t\t\tif (currentShapeName.equals(\"image\")) {\n\t\t\t\t\t\tcurrentShape = new Image(startingX, startingY);\n\t\t\t\t\t}\n\t\t\t\t\tcurrentShape.setColor(colorChooser.getColor());\n\t\t\t\t} else {\n\t\t\t\t\tcurrentShape.lastForm(newX, newY);\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\toutput.writeObject(new AddShapeCommand(currentShape));\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\tisDrawing = !isDrawing;\n\t\t\t}\n\t\t}",
"int getShapeId();",
"private void createList() {\n /**\n * New design, split input in array list so we can directly call the shape factory and create the shape in there\n * The current design from assignment 1 will be too complicated to extend because it is optimised\n * for a polygon, I attempted to keep the same design, but had a check for the instance type, which worked\n * but if we added more shapes that required different reading in implementation then there will be a lot of if\n * statements which would be difficult to maintain.\n */\n\n /**\n * was using input.hasNextLine() but that only works if the data is following a point by line structure. What if a point\n * starts on the same line? This will break\n */\n\n String data = \"\";\n\n //Check if there is an input\n while(input.hasNext()) {\n System.out.print(\"Reading character by character: \");\n\n\n data = data.concat(input.next() + \" \");\n\n System.out.print(data + \"\\n\");\n\n //This if checks if there is a polygon, circle or semi-circle to be added\n //The last check ensures that the final shape to be added is not ignored\n if(input.hasNext(\"P\") || input.hasNext(\"C\") || input.hasNext(\"S\") || !input.hasNext()) {\n System.out.println(\"Next is a new shape\");\n unorderedList.append(shapeFactory(data));\n System.out.println(\"\\n\");\n data = \"\";\n }\n }\n\n\n\n\n\n// while(input.hasNext()) {\n// String value = input.next(); //set the value to the input.next so it can be reused later\n//\n// //Ignore space characters\n// if(value.equals(\" \")) {\n// continue;\n// }\n//\n// //Switch through the steps in the create process\n// //Each step will go onto the next process. e.g POLYGON -> SIZE\n// switch (inputType) {\n// case SHAPE:\n// System.out.println(\"CREATING A SHAPE: \" + value);\n// //Creates a new shape\n// shape = shapeFactory(value);\n//\n// //To keep the same flow, this checks if the type requires the size or not.\n// if(requireSize(shape)) {\n// System.out.println(\"\\t Shape is a polygon\");\n// inputType = InputType.SIZE;\n// } else {\n// System.out.println(\"\\t Shape is not a polygon\");\n// inputType = InputType.XCOORDINATE;\n// }\n//\n// break;\n// case SIZE:\n// //Sets the size of the array in polygon\n// shape.setSize(Integer.parseInt(value));\n// inputType = InputType.XCOORDINATE;\n// break;\n// case XCOORDINATE:\n// //Sets the x-coordinate of a point\n// System.out.println(\"\\t Adding x value: \" + value);\n// point.setXCoordinate(Float.parseFloat(value));\n// inputType = InputType.YCOORDINATE;\n// break;\n// case YCOORDINATE:\n// //Sets the y-coordinate of a point\n// System.out.println(\"\\t Adding y value: \" + value);\n// point.setYCoordinate(Float.parseFloat(value));\n//\n// System.out.println(\"\\t Adding point to the shape: \" + point.toString() + \", Pos: \"+ position);\n// //shapes.Point now has two values, so add to shape\n// shape.addPoint(point, position);\n//\n// //Reset point so we don't get any reference issues\n// point = new Point();\n// position++;\n//\n// if(!requireRadius(shape)) {\n// //Check if all points have been added or not\n// if (position == shape.getSize() - 1) {\n// //All points have been added, hence:\n//\n// shape.addFirstPoint(); //add the first point to the array\n// unorderedList.append(shape); //append polygon to the list\n//\n// //Set the input type back to polygon to add a new polygon\n// inputType = InputType.SHAPE;\n// position = 0; //reset position to add items to the start of the array\n// } else {\n// //More points to be added\n// inputType = InputType.XCOORDINATE;\n//\n// }\n// } else {\n// inputType = InputType.RADIUS;\n// }\n// break;\n// case RADIUS:\n// System.out.println(\"Adding radius: \" + value);\n// ((Circle)shape).addRadius(Float.parseFloat(value));\n//\n// unorderedList.append(shape);\n// inputType = InputType.SHAPE;\n// position = 0;\n// break;\n// }\n// }\n input.close();\n }",
"void drawShape() {\n System.out.println(\"Drawing Triangle\");\n this.color.addColor();\n }",
"static List<Shape> createShapeArray(){\n return Arrays.asList(new Rectangle(new Point(0,0),new Point(0,4),new Point(2,4), new Point(2,0)),\n new Rectangle(new Point(0,0),new Point(0,2),new Point(2,2), new Point(2,0)),\n new Rectangle(new Point(0,0),new Point(0,3),new Point(2,3), new Point(2,0)),\n new Circle(new Point(0,0),new Point(0,1)),\n new Circle(new Point(1,0),new Point(1,4)),\n new Circle(new Point(1,0),new Point(0,2)),\n new Triangle(new Point(0,0),new Point(0,2),new Point(2,0)),\n new Triangle(new Point(0,0),new Point(0,4),new Point(4,0)),\n new Triangle(new Point(0,0),new Point(0,1),new Point(1,0)));\n\n }",
"public interface Shape {\n\t/**\n\t * Calculates and returns the area of the object\n\t * @return\n\t */\n\tpublic abstract double getArea();\n\t\n\t/**\n\t * Returns the Color of the object.\n\t * @return\n\t */\n\tpublic abstract Color getColor();\n\t\n\t/**\n\t * Sets the Color of the object.\n\t * @param color\n\t */\n\tpublic abstract void setColor(Color color);\n\t\n\t/**\n\t * Returns true if the object is filled with color, otherwise false.\n\t * @return\n\t */\n\tpublic abstract boolean getFilled();\n\t\n\t/**\n\t * Sets the filled state of the object.\n\t * @param filled\n\t */\n\tpublic abstract void setFilled(boolean filled);\n\t\n\t/**\n\t * Moves the shape by the x and y amounts specified in the Point.\n\t * @param point\n\t */\n\tpublic abstract void move(Point point);\t\n}",
"protected Shape getShape()\n {\n return null;\n }",
"public void Add( TopoDS_Shape aShape) {\n OCCwrapJavaJNI.ShapeFix_EdgeConnect_Add__SWIG_1(swigCPtr, this, TopoDS_Shape.getCPtr(aShape), aShape);\n }",
"public void paintShape(RMShapePainter aPntr)\n{\n // If fill/stroke present, have them paint\n if(getFill()!=null)\n getFill().paint(aPntr, this);\n if(getStroke()!=null && !getStrokeOnTop())\n getStroke().paint(aPntr, this);\n}",
"public void add(Shape c) {\n\t\tc.centerXProperty().addListener(doubleListener);\n\t\tc.centerYProperty().addListener(doubleListener);\n\t\tc.radiusProperty().addListener(doubleListener);\n\t\tc.colorProperty().addListener(colorListener);\n\t\tc.widthProperty().addListener(doubleListener);\n\t\tc.heightProperty().addListener(doubleListener);\n\t\tc.arcWidthProperty().addListener(doubleListener);\n\t\tc.arcHeightProperty().addListener(doubleListener);\n\t\tc.textProperty().addListener(textListener);\n\t\tc.typeProperty().addListener(typeListener);\n\t\tc.deleteProperty().addListener(deleteListener);\n\t\tdrawData.add(c);\n\t}",
"@Override\n Shape getShape() {\n return Shape.Square;\n }",
"@Override\n public void onClick() {\n // TODO: Disabled adding shape on just click. It should be added inside the BPMNDiagram by default.\n // log(Level.FINE, \"Palette: Adding \" + description);\n // addShapeToCanvasEvent.fire(new AddShapeToCanvasEvent(definition, factory));\n }",
"protected Shape() {}",
"public static XPropertySet createAndInsertShape(XComponent xDrawDoc,\n\t\t\tXShapes xShapes, Point aPos, Size aSize, String sShapeType)\n\t\t\tthrows java.lang.Exception {\n\t\tXShape xShape = createShape(xDrawDoc, aPos, aSize, sShapeType);\n\t\txShapes.add(xShape);\n\t\tXPropertySet xPropSet = (XPropertySet) UnoRuntime.queryInterface(\n\t\t\t\tXPropertySet.class, xShape);\n\t\treturn xPropSet;\n\t}",
"private static void createShape(){\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"Choose shape to create:\");\r\n\t\tSystem.out.println(\"1- Square\");\r\n\t\tSystem.out.println(\"2- Rectangle\");\r\n\t\tSystem.out.println(\"3- Triangle\");\r\n\t\tSystem.out.println();\r\n\t\tint answer = getNumberAnswer();\r\n\t\tswitch (answer) {\r\n\t\tcase 1:\r\n\t\t\tSystem.out.println(\"Provide side measuremnt:\");\r\n\t\t\tshapes[0] = new Square(getNumberAnswer());\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tSystem.out.println(\"Provide height and width measuremnts separately:\");\r\n\t\t\tshapes[0] = new Rectangle(getNumberAnswer(), getNumberAnswer());\r\n\t\t\tbreak;\r\n\t\tcase 3:\r\n\t\t\tSystem.out.println(\"Provide base, side 1, side 2 and height measuremnts separately:\");\r\n\t\t\tshapes[0] = new Triangle(getNumberAnswer(), getNumberAnswer(), getNumberAnswer(), getNumberAnswer());\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tSystem.out.println(\"That's not actually an option.\");\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}",
"public void addPolyGon() {\n abstractEditor.drawNewShape(new ESurfaceDT());\n }",
"private void setShape(){\n // 0 - index of the vertex at the top of the polygon\n shapex[0] = x + MathUtils.cos(radians) * 8;\n shapey[0] = y + MathUtils.sin(radians) * 8;\n\n // 1 - index of the vertex at the bottom left of the polygon\n shapex[1] = x + MathUtils.cos(radians - 4 * 3.1415f / 5) * 8;\n shapey[1] = y + MathUtils.sin(radians - 4 * 3.1415f / 5) * 8;\n\n // 2 - index of the vertex at the bottom right of the polygon\n shapex[2] = x + MathUtils.cos(radians + 4 * 3.1415f / 5) * 8;\n shapey[2] = y + MathUtils.sin(radians + 4 * 3.1415f / 5) * 8;\n }",
"public abstract void addComponent(DrawingComponent component);",
"public ShapeLibraryTest()\n {\n }"
]
| [
"0.8313483",
"0.8260499",
"0.8015513",
"0.7745868",
"0.75305057",
"0.7493757",
"0.73277324",
"0.72838545",
"0.72668993",
"0.72271585",
"0.7205516",
"0.71518767",
"0.70810366",
"0.7011081",
"0.7004907",
"0.69994676",
"0.69322455",
"0.691742",
"0.6906302",
"0.6838686",
"0.6834201",
"0.6822058",
"0.68166083",
"0.6807549",
"0.68027204",
"0.6770641",
"0.6757369",
"0.67572874",
"0.6754613",
"0.67305654",
"0.6698539",
"0.6690781",
"0.6690297",
"0.66677797",
"0.66530794",
"0.66434956",
"0.66368884",
"0.66358894",
"0.6634351",
"0.6633863",
"0.6619277",
"0.66110295",
"0.6608676",
"0.6605335",
"0.65848017",
"0.657042",
"0.6560268",
"0.65241313",
"0.6513527",
"0.6497005",
"0.6493481",
"0.6485517",
"0.64691097",
"0.6454754",
"0.644577",
"0.6439436",
"0.64112014",
"0.63838965",
"0.6364565",
"0.63459945",
"0.6314613",
"0.631276",
"0.6297135",
"0.62957335",
"0.6284299",
"0.6276915",
"0.6275572",
"0.62742007",
"0.6272882",
"0.6272236",
"0.6269625",
"0.62628865",
"0.6253373",
"0.62499446",
"0.62458646",
"0.6239145",
"0.6227304",
"0.6226654",
"0.6225789",
"0.621634",
"0.6216338",
"0.6210965",
"0.6205534",
"0.62051415",
"0.62049365",
"0.61967456",
"0.6193899",
"0.61872065",
"0.6186706",
"0.61843246",
"0.6181459",
"0.61769426",
"0.61721194",
"0.61567706",
"0.6127717",
"0.61160076",
"0.61143726",
"0.6096103",
"0.60884786",
"0.60848415"
]
| 0.6852642 | 19 |
____________________________ EXCEPTIONS: Event without Shape _________________________________. | @Test(expected = IllegalArgumentException.class)
public void testAddMoveEventWithoutAddShape() {
move1 = new MoveShape(r, 200.0, 200.0, 300.0, 300.0);
testAnimation.addEvent(r, move1, 10, 50);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void addEvent(IShape shape, IEvent event, int eventBegin, int eventEnd);",
"void event(Event e) throws Exception;",
"Event () {\n // Nothing to do here.\n }",
"BoundaryEvent createBoundaryEvent();",
"@Override\n\tpublic void nullifyEventHandlers() {\n\t\tshape.setOnMousePressed(null);\n\t\tshape.setOnMouseDragged(null);\n\t\tshape.setOnMouseClicked(null);\n\t\tshape.setOnMouseReleased(null);\n\t\t\n\t}",
"public abstract EventMsg msgRequired();",
"@Test(expected = IllegalArgumentException.class)\n public void invalidShapeDisappearsBeforeAppearing() {\n model1.addShape(Rectangle.createRectangle(\"R\", new Point.Double(200, 200),\n new Color(1, 0, 0), 1, 0, 50, 100));\n }",
"protected void onBadCoords()\n\t{\n\t}",
"@Override\r\n\tprotected void processIsNotDefinedEvent(InNotDefinedEvent arg0) {\n\t\t\r\n\t}",
"@Test(expected = IllegalArgumentException.class)\n public void testNullShape() {\n testAnimation.addShape(null, 1, 100);\n }",
"@Test(expected = IllegalArgumentException.class)\n public void testErrorShapeDoesntExist() {\n model1.addShape(Rectangle.createRectangle(\"R\", new Point.Double(500, 200),\n new Color(0, 0, 0), 0, 10, 10, 10));\n model1.addAction(ScaleOvalAction.createScaleOvalAction(\"O\", 0, 100,\n 100, 100, 1, 1));\n }",
"void event(MetricalEvent event) throws MetricalException;",
"public InvalidEventHandlerException() {\n }",
"@Override\n\tpublic void processEvent(Event e) {\n\n\t}",
"private void validateEvent(final Event event) {\n if (null == event) {\n throw new NullPointerException(\"event cannot be null\");\n }\n if (null == event.getAuthor()) {\n throw new NullPointerException(\"author cannot be null\");\n }\n if (null == event.getAuthor().getId()) {\n throw new NullPointerException(\"author ID cannot be null\");\n }\n if (null == event.getCustomer()) {\n throw new NullPointerException(\"customer cannot be null\");\n }\n if (null == event.getCustomer().getId()) {\n throw new NullPointerException(\"customer ID cannot be null\");\n }\n if (null == event.getProcedure()) {\n throw new NullPointerException(\"procedure cannot be null\");\n }\n if (null == event.getProcedure().getId()) {\n throw new NullPointerException(\"procedure ID cannot be null\");\n }\n if (Utensils.stringIsBlank(event.getText())) {\n throw new IllegalArgumentException(\"text cannot be blank\");\n }\n if (0 == event.getText().trim().length()) {\n throw new IllegalArgumentException(\"text cannot be blank\");\n }\n if (Event.Type.IN_CALENDAR == event.enumType()) {\n if (null == event.getStartTime()) {\n throw new NullPointerException(\"start time cannot be null\");\n }\n if (event.getLength() <= 0) {\n throw new IllegalArgumentException(\"length lesser then 0\");\n }\n }\n }",
"public void testAddGUIEventListener1_null1() {\n try {\n eventManager.addGUIEventListener(null, EventObject.class);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }",
"protected void userDrawing(MouseEvent e){\n\t}",
"public void handle(MouseEvent event)\n {\n\n System.out.println(event.getEventType().getName());\n if (event.getEventType() == MouseEvent.MOUSE_PRESSED) {\n xs = event.getX();\n ys = event.getY();\n }else if (event.getEventType() == MouseEvent.MOUSE_DRAGGED){\n if (currentShapeNode != null) {\n canvas.getChildren().remove(currentShapeNode);\n shapeList.remove(currentShapeNode);\n }\n switch (shapeInfo) {\n case 1 : {\n xe = event.getX();\n ye = event.getY();\n currentShapeNode = new Rectangle(xs, ys, xe-xs, ye-ys);\n currentShapeNode.setFill(selectedColor);\n break;\n }\n case 2 : {\n xe = event.getX();\n ye = event.getY();\n double radius = Math.sqrt(Math.pow(xe-xs, 2) + Math.pow(ye-ys, 2));\n currentShapeNode = new Circle(xs, ys, radius);\n currentShapeNode.setFill(selectedColor);\n break;\n }\n case 3 : {\n xe = event.getX();\n ye = event.getY();\n double angle = Math.atan2(-(ys-ye), xe-xs);\n double length = Math.toDegrees(angle);\n Arc arc = new Arc(xs, ys, xe, xe/2, 0, length);\n arc.setType(ArcType.ROUND);\n currentShapeNode = arc;\n currentShapeNode.setFill(selectedColor);\n\n break;\n }\n default: break;\n }\n shapeList.add(currentShapeNode);\n canvas.getChildren().add(currentShapeNode);\n }else if (event.getEventType() == MouseEvent.MOUSE_RELEASED) {\n currentShapeNode = null;\n }\n\n event.consume();\n }",
"@Override\r\n\tprotected void onGeometryTouched(IGeometry geometry)\r\n\t{\n\t}",
"@Override\n protected void processMouseEvent(MouseEvent e) {\n super.processMouseEvent(e);\n }",
"public EventException() {\n super(\"OOPS!!! The description or time of an event cannot be empty.\");\n }",
"@Override\n public void handle(MouseEvent event) {\n }",
"public void testBoundaryChangedEvent_2_Accuracy() {\n assertNotNull(\"Test method for 'BoundaryChangedEvent(BaseNode, Rectangle, Rectangle, String)' failed.\", event);\n }",
"public void testHandleGUIEvent_null() {\n try {\n eventManager.handleGUIEvent(null);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }",
"@SuppressWarnings({ \"unused\" })\r\n\tprivate void wrongType(final @NonNull PInputEvent e, final String eventType) {\n\t}",
"public void testRemoveGUIEventListener1_null1() {\n try {\n eventManager.removeGUIEventListener(null, EventObject.class);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }",
"CatchingEvent createCatchingEvent();",
"@Override\n\t\t\tpublic void handle(MouseEvent event) {\n\t\t\t}",
"@Override\n public boolean usesEvents()\n {\n return false;\n }",
"BasicEvent createBasicEvent();",
"@Test(expected = IllegalArgumentException.class)\n public void invalidShapeDispersantAppearsBefore0() {\n model1.addShape(Rectangle.createRectangle(\"R\", new Point.Double(200, 200),\n new Color(1, 0, 0), -10, -1, 50, 100));\n }",
"public void testMouseClickedIfMouseEventNull() {\n try {\n editBoxTrigger.mouseClicked(null);\n } catch (Exception e) {\n fail(\"No exception is excpected.\");\n }\n }",
"Event createEvent();",
"Event createEvent();",
"public Miss(HitObject event)\n\t{\n\t\t_x = event.getX();\n\t\t_y = event.getY();\n\t\t_tbeg = event.getTiming() / 1000.f;\n\t\t_tend = _tbeg + ANIMATION_TIME;\n\t\t_bounds = new Rect();\n\t\t_buttonHit = false;\n\t}",
"@Test(expected = IllegalArgumentException.class)\n public void testNoScaleRectangleOnOval() {\n model1.addShape(Oval.createOval(\"C\", new Point.Double(500, 200),\n new Color(0, 0, 0), 0, 10, 10, 10));\n model1.addAction(ScaleRectangleAction.createScaleRectangleAction(\"C\", 0,\n 100, 100, 100, 1, 1));\n textView1.animate(model1, 1, out);\n }",
"@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t}",
"@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t}",
"@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t}",
"@Test(expected = IllegalArgumentException.class)\n public void testAddMoveEndBeforeBegin() {\n testAnimation.addShape(r, 1, 100);\n size1 = new ScaleShape(r, 50.0, 100.0, 25.0, 100.0);\n testAnimation.addEvent(r, size1, 90, 2);\n }",
"@Override\n public void moverRaton(MouseEvent e) {}",
"public void testBoundaryChangedEvent_1_null_1() {\n try {\n new BoundaryChangedEvent(null, oldBoundary, newBoundary);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }",
"@Test(expected = IllegalArgumentException.class)\n public void testMakingShapeWithNullName() {\n model1.addShape(Oval.createOval(null, new Point.Double(500, 100),\n new Color(0, 0, 1), 6, 100, 60.0, 30.0));\n }",
"@Test(expected = IllegalArgumentException.class)\n public void invalidShapeAppearsBefore0() {\n model1.addShape(Rectangle.createRectangle(\"R\", new Point.Double(200, 200),\n new Color(1, 0, 0), -1, 100, 50, 100));\n }",
"@Override\n\t\t\tpublic void handleEvent(Event event) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void handleEvent(Event event) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void handleEvent(Event event) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void handleEvent(Event event) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void handleEvent(Event event) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\t \n\t\t\t}",
"@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\t \n\t\t\t}",
"@Override\r\n\tpublic Shape getHitbox() {\n\t\treturn null;\r\n\t}",
"@Override\n\tpublic void handleEvent(Event arg0) {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void handle(Event e) {\r\n\t\t\t// TODO Auto-generated method stub\r\n\t\t\tlogger.error(\"Error: handle never pressed. \");\r\n\t\t}",
"void throwEvents();",
"@Test(expected = IllegalArgumentException.class)\n public void testMakingShapeWithNullLocation() {\n model1.addShape(Oval.createOval(\"C\", null,\n new Color(0, 0, 1), 6, 100, 60.0, 30.0));\n }",
"public interface IGUIEvent {\n\n\n /**\n * Returns the source of the event.\n * \n * @return the source.\n */\n public abstract Object getSource();\n\n\n /**\n * Consumes the event.\n */\n public abstract void consume();\n\n\n /**\n * Returns whether this event has been consumed.\n * \n * @return <CODE>true</CODE> if the event has been consumed;\n * <CODE>false</CODE> otherwise.\n */\n public abstract boolean isConsumed();\n}",
"@Override\r\n\tpublic void handleEvent(Event event) {\n\r\n\t}",
"public void testAddGUIEventListener1_NotEventObjectClass() {\n try {\n eventManager.addGUIEventListener(gUIEventListener1, String.class);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }",
"public void testBoundaryChangedEvent_1_null_3() {\n try {\n new BoundaryChangedEvent(classNode, oldBoundary, null);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }",
"public void testBoundaryChangedEvent_2_null_1() {\n try {\n new BoundaryChangedEvent(null, oldBoundary, newBoundary, null);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }",
"public abstract void mouseDragged(MouseDraggedEvent mp);",
"@Override\r\n public void processEvent(IAEvent e) {\n\r\n }",
"public abstract void processEvent(Object event);",
"@Override\n public String getEventType()\n {\n\t return null;\n }",
"ThrowingEvent createThrowingEvent();",
"public abstract void mousePressed(MousePressedEvent mp);",
"@Override\r\n\tpublic int getEventType() {\n\t\treturn 0;\r\n\t}",
"@Override\r\n\tpublic int getEventType() {\n\t\treturn 0;\r\n\t}",
"@Override\r\n\tpublic void onEvent(Event arg0) {\n\r\n\t}",
"@Override\n public void mouseReleased(MouseEvent e) {\n }",
"public void handle(ActionEvent event)\n {\n if (rbRect.isSelected())\n shapeInfo = 1;\n else if (rbCircle.isSelected())\n shapeInfo = 2;\n else shapeInfo = 3;\n\n event.consume();\n //----\n }",
"public Event() {}",
"@Test(expected = IllegalArgumentException.class)\n public void testCantMoveSameShapeInOverlappingTime() {\n model1.addShape(Rectangle.createRectangle(\"R\", new Point.Double(500, 200),\n new Color(0, 0, 0), 0, 10, 10, 10));\n model1.addAction(new MoveAction(\"R\", 0, 100, new Point.Double(500, 200),\n new Point.Double(10, 10)));\n model1.addAction(new MoveAction(\"R\", 50, 150,\n new Point.Double(500, 200), new Point.Double(10, 10)));\n }",
"@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\r\n\t\tLOG.fine(\"Clicked\");\r\n\t\tif (shapeManipulator != null) {\r\n\t\t\tshapeManipulator.mouseClicked(e);\r\n\t\t}\r\n\t}",
"@Override\r\n public void createEvent(EventBean event) throws BusinessLogicException {\n }",
"@Test(expected = IllegalArgumentException.class)\n public void testMakingShapeWithNullColor() {\n model1.addShape(Oval.createOval(\"C\", new Point.Double(500, 100),\n null, 6, 100, 60.0, 30.0));\n }",
"public void testBoundaryChangedEvent_2_null_3() {\n try {\n new BoundaryChangedEvent(classNode, oldBoundary, null, null);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }",
"@Override\n public void handle(Event event) {\n }",
"@Override\n public void mouseReleased(MouseEvent e){\n \n }",
"@Override\r\n\tpublic void onEvent(Object e) {\n\t}",
"public abstract void handle(Object event);",
"public void testBoundaryChangedEvent_1_null_2() {\n try {\n new BoundaryChangedEvent(classNode, null, newBoundary);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }",
"@Override\n\t\t\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\t\t}",
"@Override\n\t\t\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\t\t}",
"@Override\n\tprotected Shape getShape() {\n\t\treturn null;\n\t}",
"public Miss(HitObject event, TexturedQuad sprite)\n\t{\n\t\t_x = event.getX();\n\t\t_y = event.getY();\n\t\t_tbeg = event.getTiming() / 1000.f;\n\t\t_tend = _tbeg + ANIMATION_TIME;\n\t\t_bounds = new Rect();\n\t\t_buttonHit = false;\n\t\t_sprite = sprite;\n\t}",
"@Override\r\n\tpublic void mouseReleased(MouseEvent e) {\r\n\t\tLOG.fine(\"Released...\");\r\n\t\tif (shapeManipulator != null) {\r\n\t\t\tshapeManipulator.mouseReleased(e);\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic void mousePressed(MouseEvent e) {\r\n\t\tLOG.fine(\"Pressed...\");\r\n\t\tif (shapeManipulator != null) {\r\n\t\t\tshapeManipulator.mousePressed(e);\r\n\t\t}\r\n\t}",
"@Test\n public void EffectSelectedEventTest() {\n EffectSelectedEvent event = null;\n boolean result = true;\n try {\n event = new EffectSelectedEvent(0, \"tony\", null, null);\n turnController.handleEvent(event);\n } catch(Exception e) {\n result = false;\n }\n assertTrue(result);\n\n }",
"protected ICEvent() {}",
"BasicEvents createBasicEvents();",
"@Override\n\tprotected void onEventComming(EventCenter eventCenter) {\n\t}",
"public interface NoEventType {\n\n}",
"@Override\n public void mouseReleased(MouseEvent evt) {\n }",
"@Test(expected = IllegalArgumentException.class)\n public void testNoScaleOvalOnRectangle() {\n model1.addShape(Rectangle.createRectangle(\"R\", new Point.Double(500, 200),\n new Color(0, 0, 0), 0, 10, 10, 10));\n model1.addAction(ScaleOvalAction.createScaleOvalAction(\"R\", 0, 100,\n 100, 100, 1, 1));\n }",
"protected Shape getShape()\n {\n return null;\n }",
"@Override\n\t\t\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\t\t\t\n\t\t\t\t\t}",
"public void testRemoveGUIEventListener1_NotEventObjectClass() {\n try {\n eventManager.removeGUIEventListener(gUIEventListener1, String.class);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }",
"public abstract void mouseClicked(MouseClickedEvent event);"
]
| [
"0.68239003",
"0.6377428",
"0.6331509",
"0.627424",
"0.6252205",
"0.6190939",
"0.6186347",
"0.6173501",
"0.6088699",
"0.6087154",
"0.6074424",
"0.60607934",
"0.60140806",
"0.6012499",
"0.60059893",
"0.5938945",
"0.5922707",
"0.5907505",
"0.59045374",
"0.58976716",
"0.5876043",
"0.5862466",
"0.5857774",
"0.5850156",
"0.58470964",
"0.5845257",
"0.58378536",
"0.58374447",
"0.58357614",
"0.58354133",
"0.5828782",
"0.5827172",
"0.5823826",
"0.5823826",
"0.58050203",
"0.5800619",
"0.5798212",
"0.5798212",
"0.5798212",
"0.57948035",
"0.5782165",
"0.5767133",
"0.5764177",
"0.5750921",
"0.57478994",
"0.57478994",
"0.57478994",
"0.57478994",
"0.57478994",
"0.5735037",
"0.5735037",
"0.57253444",
"0.5718088",
"0.5715089",
"0.57102895",
"0.5689648",
"0.56791",
"0.56769556",
"0.56757313",
"0.5673172",
"0.56696403",
"0.5663334",
"0.56622547",
"0.56579936",
"0.5655499",
"0.5654769",
"0.565401",
"0.56523466",
"0.56523466",
"0.565175",
"0.56460303",
"0.56379896",
"0.56350315",
"0.5629777",
"0.5623737",
"0.5610815",
"0.5609818",
"0.56058675",
"0.56055176",
"0.5604676",
"0.5604541",
"0.55990165",
"0.5598207",
"0.5598155",
"0.5598155",
"0.5593332",
"0.55921394",
"0.5585269",
"0.5574973",
"0.5574358",
"0.5571323",
"0.55668753",
"0.5566432",
"0.5560539",
"0.5557408",
"0.5545164",
"0.554384",
"0.5542501",
"0.5540839",
"0.55367243"
]
| 0.6629927 | 1 |
_____________________________ EXCEPTIONS: Begin and End ______________________________________. | @Test(expected = IllegalArgumentException.class)
public void testAddMoveEndBeforeBegin() {
testAnimation.addShape(r, 1, 100);
size1 = new ScaleShape(r, 50.0, 100.0, 25.0, 100.0);
testAnimation.addEvent(r, size1, 90, 2);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void doException() {\n\r\n\t}",
"private void inizia() throws Exception {\n }",
"private void inizia() throws Exception {\n }",
"private void inizia() throws Exception {\n }",
"private void inizia() throws Exception {\n }",
"private void inizia() throws Exception {\n }",
"String getOnExceptionEnd();",
"private void inizia() throws Exception {\n }",
"void begin() throws OutputException;",
"void throwEvents();",
"private void throwsError() throws OBException {\n }",
"public void inquiryError() {\n\t\t\n\t}",
"public Exception() {\n\t\t\tsuper();\n\t\t}",
"public GameEndException(String exception){\n\t\tsuper(exception);\n\t}",
"public void end() throws Exception;",
"public void excavate();",
"protected abstract void exceptionsCatching( ExceptionType exceptionType );",
"void mo57276a(Exception exc);",
"@Override\n\tpublic void endFail() {\n\t\t\n\t}",
"public interface RoutineException {}",
"@Override\r\n protected void end() {\r\n\r\n }",
"@Override\n protected void end() {\n }",
"@Override\n protected void end() {\n }",
"@Override\n protected void end() {\n }",
"@Override\n protected void end() {\n }",
"@Override\n protected void end() {\n }",
"@Override\n protected void end() {\n }",
"@Override\n protected void end() {\n }",
"@Override\n protected void end() {\n }",
"@Override\n protected void end() {\n }",
"@Override\n protected void end() {\n }",
"@Override\n protected void end() {\n }",
"@Override\n protected void end() {\n }",
"@Override\n protected void end() {\n\n }",
"public Exception() {\n\tsuper();\n }",
"@Override\n protected void end() {\n }",
"public abstract void engineWork() throws Exception;",
"void oR() {\n if (this.aqt == null) {\n throw new IllegalStateException(\"Callback must be set before execute\");\n }\n this.aqt.ob();\n bh.V(\"Attempting to load resource from disk\");\n if ((ce.oJ().oK() == ce.a.aqi || ce.oJ().oK() == ce.a.aqj) && this.aoc.equals(ce.oJ().getContainerId())) {\n this.aqt.a(bg.a.apM);\n return;\n }\n try {\n var1_1 = new FileInputStream(this.oS());\n }\n catch (FileNotFoundException var1_2) {\n bh.S(\"Failed to find the resource in the disk\");\n this.aqt.a(bg.a.apM);\n return;\n }\n var2_7 = new ByteArrayOutputStream();\n cr.b(var1_1, (OutputStream)var2_7);\n var2_7 = ol.a.l(var2_7.toByteArray());\n this.d((ol.a)var2_7);\n this.aqt.l((ol.a)var2_7);\n try {\n var1_1.close();\n }\n catch (IOException var1_3) {\n bh.W(\"Error closing stream for reading resource from disk\");\n }\n ** GOTO lbl52\n catch (IOException var2_8) {\n this.aqt.a(bg.a.apN);\n bh.W(\"Failed to read the resource from disk\");\n {\n catch (Throwable var2_10) {\n try {\n var1_1.close();\n }\n catch (IOException var1_6) {\n bh.W(\"Error closing stream for reading resource from disk\");\n throw var2_10;\n }\n throw var2_10;\n }\n }\n try {\n var1_1.close();\n }\n catch (IOException var1_4) {\n bh.W(\"Error closing stream for reading resource from disk\");\n }\n ** GOTO lbl52\n catch (IllegalArgumentException var2_9) {\n this.aqt.a(bg.a.apN);\n bh.W(\"Failed to read the resource from disk. The resource is inconsistent\");\n try {\n var1_1.close();\n }\n catch (IOException var1_5) {\n bh.W(\"Error closing stream for reading resource from disk\");\n }\nlbl52: // 6 sources:\n bh.V(\"The Disk resource was successfully read.\");\n return;\n }\n }\n }",
"GitletException() {\n super();\n }",
"@Test\r\n public void testEndBeforeStartException() {\r\n boolean result = false;\r\n try {\r\n new TimeCell(\r\n LocalDateTime.now(),\r\n LocalDateTime.now().minusDays(1),\r\n LocalDateTime.now(),\r\n new Manager(\"James\"),\r\n new Worker(\"Fred\", TypeOfWork.ANY),\r\n TypeOfWork.ANY);\r\n } catch (ZeroLengthException ex) {\r\n result = false;\r\n } catch (EndBeforeStartException ex) {\r\n result = true;\r\n }\r\n assertTrue(result);\r\n }",
"@Override\n protected void end() {\n \n }",
"@Test\n public void testLoadItemsExceptions() throws Exception {\n\n boolean testFailed = false;\n\n try {\n fillInventoryFileWithTestData(VALID);\n } catch (VendingMachinePersistenceException ex) {\n }\n try {\n dao.loadItems();\n } catch (VendingMachinePersistenceException ex) {\n fail();\n }\n\n try {\n fillInventoryFileWithTestData(FORMAT);\n } catch (VendingMachinePersistenceException ex) {\n }\n try {\n testFailed = true;\n dao.loadItems();\n } catch (VendingMachinePersistenceException ex) {\n testFailed = false;\n } finally {\n if (testFailed) {\n fail();\n }\n }\n\n try {\n fillInventoryFileWithTestData(INCOMPLETE);\n } catch (VendingMachinePersistenceException ex) {\n }\n try {\n testFailed = true;\n dao.loadItems();\n } catch (VendingMachinePersistenceException ex) {\n testFailed = false;\n } finally {\n if (testFailed) {\n fail();\n }\n }\n }",
"@Test\n public void testDumpError() {\n \n class TestExceptions {\n \n int start(int a, int b) {\n return sum(a, b);\n }\n \n int sum(int a, int b) {\n int result;\n \n try {\n result = a + product(a, b);\n } catch (Exception e) {\n throw new IllegalArgumentException(\"3 descendant exception\", e);\n }\n \n return result;\n }\n \n int product(int a, int b) {\n int result;\n \n try {\n result = division(a, b) * b;\n } catch (Exception e) {\n throw new IllegalArgumentException(\"2 descendant exception\", e);\n }\n \n return result;\n }\n \n int division(int a, int b) {\n int result;\n \n try {\n result = a / b;\n } catch (Exception e) {\n throw new IllegalArgumentException(\"1 descendant exception\", e);\n }\n \n return result;\n }\n }\n \n try {\n TestExceptions test = new TestExceptions();\n test.start(1, 0);\n } catch (Throwable e) {\n ErrorContainer errorContainer = new ErrorContainer(e);\n \n StringWriter writer = new StringWriter();\n e.printStackTrace(new PrintWriter(writer));\n \n assertEquals(e.getClass().getName(), errorContainer.getClassName());\n assertEquals(e.getMessage(), errorContainer.getMessage());\n assertEquals(writer.toString(), errorContainer.getStackTrace());\n }\n \n }",
"@Override\n\t\tpublic void onException(Exception arg0) {\n\t\t\t\n\t\t}",
"public OLMSException() {\r\n super();\r\n }",
"@Test(expected = IllegalStateException.class)\n\tpublic void testException() {\n\t\tsubGen.subset(11);\n\t}",
"@Override\n\tprotected void end() {\n\t\t\n\t}",
"@Override\r\n\tprotected void end() {\r\n\t}",
"public void mo1964g() throws cf {\r\n }",
"protected void checkComponents() throws Exception {\r\n if (InitialData == null) {\r\n throw new Exception(\"Initial data not set.\");\r\n }\r\n if (Oracle == null) {\r\n throw new Exception(\"Oracle not set.\");\r\n }\r\n if (SearchSpace == null) {\r\n throw new Exception(\"Search space not set.\");\r\n }\r\n if (ObjectiveFunction == null) {\r\n throw new Exception(\"Ranker not set.\");\r\n }\r\n }",
"private V e() throws com.amap.api.col.n3.gh {\n /*\n r6 = this;\n r0 = 0\n r1 = 0\n L_0x0002:\n int r2 = r6.b\n if (r1 >= r2) goto L_0x00cd\n com.amap.api.col.n3.ki r2 = com.amap.api.col.n3.ki.c() // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n android.content.Context r3 = r6.d // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n java.net.Proxy r3 = com.amap.api.col.n3.ik.a(r3) // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n r6.a((java.net.Proxy) r3) // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n byte[] r2 = r2.a((com.amap.api.col.n3.kj) r6) // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n java.lang.Object r2 = r6.a((byte[]) r2) // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n int r0 = r6.b // Catch:{ ic -> 0x0025, gh -> 0x0020, Throwable -> 0x002a }\n r1 = r0\n r0 = r2\n goto L_0x0002\n L_0x0020:\n r0 = move-exception\n r5 = r2\n r2 = r0\n r0 = r5\n goto L_0x0033\n L_0x0025:\n r0 = move-exception\n r5 = r2\n r2 = r0\n r0 = r5\n goto L_0x0044\n L_0x002a:\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = \"未知错误\"\n r0.<init>(r1)\n throw r0\n L_0x0032:\n r2 = move-exception\n L_0x0033:\n int r1 = r1 + 1\n int r3 = r6.b\n if (r1 < r3) goto L_0x0002\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = r2.a()\n r0.<init>(r1)\n throw r0\n L_0x0043:\n r2 = move-exception\n L_0x0044:\n int r1 = r1 + 1\n int r3 = r6.b\n if (r1 >= r3) goto L_0x008a\n int r3 = r6.e // Catch:{ InterruptedException -> 0x0053 }\n int r3 = r3 * 1000\n long r3 = (long) r3 // Catch:{ InterruptedException -> 0x0053 }\n java.lang.Thread.sleep(r3) // Catch:{ InterruptedException -> 0x0053 }\n goto L_0x0002\n L_0x0053:\n java.lang.String r0 = \"http连接失败 - ConnectionException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 != 0) goto L_0x0082\n java.lang.String r0 = \"socket 连接异常 - SocketException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 != 0) goto L_0x0082\n java.lang.String r0 = \"服务器连接失败 - UnknownServiceException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 == 0) goto L_0x0078\n goto L_0x0082\n L_0x0078:\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = r2.a()\n r0.<init>(r1)\n throw r0\n L_0x0082:\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = \"http或socket连接失败 - ConnectionException\"\n r0.<init>(r1)\n throw r0\n L_0x008a:\n java.lang.String r0 = \"http连接失败 - ConnectionException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 != 0) goto L_0x00c5\n java.lang.String r0 = \"socket 连接异常 - SocketException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 != 0) goto L_0x00c5\n java.lang.String r0 = \"未知的错误\"\n java.lang.String r1 = r2.a()\n boolean r0 = r0.equals(r1)\n if (r0 != 0) goto L_0x00c5\n java.lang.String r0 = \"服务器连接失败 - UnknownServiceException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 == 0) goto L_0x00bb\n goto L_0x00c5\n L_0x00bb:\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = r2.a()\n r0.<init>(r1)\n throw r0\n L_0x00c5:\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = \"http或socket连接失败 - ConnectionException\"\n r0.<init>(r1)\n throw r0\n L_0x00cd:\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.amap.api.col.n3.gi.e():java.lang.Object\");\n }",
"private static void m2() throws RunTimeEx1 {\n throw new RunTimeEx1();\n }",
"@Override\n\tprotected void end() {\n\n\t}",
"@Override\n\tprotected void end() {\n\n\t}",
"@Override\n\tprotected void end() {\n\n\t}",
"@Override\n\t\t\t\t\t\t\tpublic void error(Exception e) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}",
"@Test(expected = IllegalArgumentException.class)\n\tpublic void endLesserException() {\n\n\t\tset.beginAt(2);\n\t\tset.endAt(1);\n\t}",
"public VTorInUseException() {\n super();\n }",
"@Override\n\tpublic void demoRunTimeException() throws RuntimeException {\n\n\t}",
"@Override\n\tprotected void end() {\n\t}",
"@Override\n\tprotected void end() {\n\t}",
"@Override\n\tprotected void end() {\n\t}",
"@Override\n\tprotected void end() {\n\t}",
"public RedoException(){\r\n\t\tsuper();\r\n\t}",
"abstract void run() throws Exception;",
"public static void main(String args[]) throws Exception{\n DifferentMethods_2 d2 = new DifferentMethods_2();\r\n d2.createObject();\r\n //Exception d = new Exception();\r\n //throw d;//throws exception as declared above\r\n }",
"public void errorFileEscenario() {\n\t\tvisorEscenario.errorFileEscenario();\t\n\t}",
"public OpenXdataDataAccessException() {\r\n \tsuper(\"A Data Base Access Exception occurred.\");\r\n }",
"@Override\n\t\t\tpublic void end() {\n\t\t\t\t\n\t\t\t}",
"protected void end()\n\t{\n\t}",
"UsedExceptions getExceptions();",
"public void begin() {}",
"public void Error(){\n }",
"@Override\r\n\tprotected void end() {\n\r\n\t}",
"@Override\r\n\tprotected void end() {\n\r\n\t}",
"abstract public void run() throws Exception;",
"private int exitUnitException() {\r\n\t\tthis.updateUnitStatus();\r\n\t\tthis.eventLogger.logLine(\" => UNIT_EXCEPTION, DEVICE_END\");\r\n\t\treturn iDeviceStatus.UNIT_EXCEPTION | iDeviceStatus.DEVICE_END;\r\n\t}",
"public FullCarException() {\r\n super(\"\");\r\n }",
"void entry() throws Exception;",
"public FrameEndedException() {\n }",
"public BDException() {\n\t\tsuper();\n\t\t// TODO Auto-generated constructor stub\n\t}",
"@Override\n\tpublic String end() throws Exception {\n\t\treturn null;\n\t}",
"void L3() throws Exception{\n\t\tSystem.out.println(\"1\");\n\t\tthrow e;\n\t}",
"@Override\n\tpublic void exucute() {\n\t\t\n\t}",
"@Override\n\t\t\t\t\tpublic void loadEndFailed(int type) {\n\n\t\t\t\t\t}",
"private void inizia() throws Exception {\n try { // prova ad eseguire il codice\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n }",
"public void end() {\n/* 179 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"public static void main(String[] args) throws Exception {\r\n\r\n\t\tthrow new Exception(\"anand\");\r\n\t\t\r\n\t}",
"@Override\n\t\t\tpublic void onException(Exception arg0) {\n\n\t\t\t}",
"@Test\n public void test079() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Any any0 = (Any)errorPage0.hr();\n // Undeclared exception!\n try {\n Component component0 = any0.end(\"V\\\"i%{rPYE$\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No corresponding component found for end expression 'V\\\"i%{rPYE$'.\n //\n }\n }",
"@Test(timeout = 4000)\n public void test209() throws Throwable {\n Form form0 = new Form(\"?_AON\");\n // Undeclared exception!\n try { \n form0.end();\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Could not end compoennt, already at root.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }",
"public void mo1944a() throws cf {\r\n }",
"@Override\n\t\t\t\tpublic void doFail() {\n\t\t\t\t}",
"protected void end() {\n\t}",
"protected void end() {\n\t}",
"protected void end() {\n\t}",
"protected void end() {\n\t}",
"protected void end() {\n\t}",
"protected void end() {\n\t}",
"public static void demoException() {\n\n try {\n print(1, \"hello\");\n String b = null;\n b.indexOf(\"a\");\n\n } catch (NullPointerException npe) {\n print(3, \"NPE\");\n } catch (Exception e) {\n print(4, \"Exception\");\n } finally {\n /** code will be executed anyway regardless of exception */\n print(2, \"finally\");\n // 做清理工作\n }\n\n try {\n print(1, \"hello\");\n int a = 2;\n a = a / 0;\n /** add a log file when an Exception occurs */\n } catch (NullPointerException npe) {\n print(3, \"NPE\");\n } catch (Exception e) {\n print(4, \"Exception\");\n } finally {\n /** code will be executed anyway regardless of exception */\n print(2, \"finally\");\n // 做清理工作\n }\n }",
"@Override\n\tpublic void end() {\n\t\t\n\t}"
]
| [
"0.65467227",
"0.63425326",
"0.63425326",
"0.63425326",
"0.63425326",
"0.63425326",
"0.6333914",
"0.6177237",
"0.6105263",
"0.6075674",
"0.60656583",
"0.6061311",
"0.60257596",
"0.59876627",
"0.5966433",
"0.5956381",
"0.59552556",
"0.5940581",
"0.5934862",
"0.5904532",
"0.58988094",
"0.58974147",
"0.58974147",
"0.58974147",
"0.58974147",
"0.58974147",
"0.58974147",
"0.58974147",
"0.58974147",
"0.58974147",
"0.58974147",
"0.58974147",
"0.58974147",
"0.5861663",
"0.585502",
"0.5835708",
"0.58255106",
"0.5809413",
"0.5801851",
"0.5798326",
"0.579679",
"0.579425",
"0.5778815",
"0.57561433",
"0.5739156",
"0.57324183",
"0.5729059",
"0.57229877",
"0.57182753",
"0.57141376",
"0.56943846",
"0.5681667",
"0.5672214",
"0.5672214",
"0.5672214",
"0.56711876",
"0.56707376",
"0.5664241",
"0.566339",
"0.56610787",
"0.56610787",
"0.56610787",
"0.56610787",
"0.56588376",
"0.5655876",
"0.5651581",
"0.56497043",
"0.56488013",
"0.5645436",
"0.56292063",
"0.56273556",
"0.5621852",
"0.561584",
"0.5615442",
"0.5615442",
"0.56084",
"0.5605232",
"0.5598725",
"0.5596988",
"0.5588072",
"0.5585712",
"0.5583235",
"0.55778867",
"0.557661",
"0.5574626",
"0.5573287",
"0.55509853",
"0.55457985",
"0.5536712",
"0.5535249",
"0.55313385",
"0.5529385",
"0.55275273",
"0.5525802",
"0.5525802",
"0.5525802",
"0.5525802",
"0.5525802",
"0.5525802",
"0.55253786",
"0.5525254"
]
| 0.0 | -1 |
____________ EXCEPTIONS: Add Same Event types With Overlapping tick range ___________________. | @Test(expected = IllegalArgumentException.class)
public void testScaleOverlap() {
testAnimation.addShape(r, 1, 100);
size1 = new ScaleShape(r, 50.0, 100.0, 25.0, 100.0);
size2 = new ScaleShape(r, 25.0, 100.0, 70.0, 1000.0);
testAnimation.addEvent(r, size1, 90, 100);
testAnimation.addEvent(r, size2, 89, 95);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n protected void updateAxisRange(){\n Axis<X> xAxis = getXAxis();\n Axis<Y> yAxis = getYAxis();\n ArrayList<X> xList = null;\n ArrayList<Y> yList = null;\n if(xAxis.isAutoRanging()) { xList = new ArrayList<>(); }\n if(yAxis.isAutoRanging()) { yList = new ArrayList<>(); }\n\n if(xAxis != null || yAxis != null) {\n for (Series<X, Y> series : getData()) {\n for (Data<X, Y> data : series.getData()) {\n if(xList != null) {\n xList.add(data.getXValue());\n xList.add(xAxis.toRealValue(xAxis.toNumericValue(data.getXValue())\n + getLength(data.getExtraValue())));\n }\n if(yList != null) {\n yList.add(data.getYValue());\n }\n }\n }\n if(xList != null) { xAxis.invalidateRange(xList); }\n if(yList != null) { yAxis.invalidateRange(yList); }\n }\n\n }",
"void addSimultaneousEvent(GameEvent event);",
"@Override protected void updateAxisRange() {\n final Axis<X> xa = getXAxis();\n final Axis<Y> ya = getYAxis();\n List<X> xData = null;\n List<Y> yData = null;\n if(xa.isAutoRanging()) xData = new ArrayList<X>();\n if(ya.isAutoRanging()) yData = new ArrayList<Y>();\n if(xData != null || yData != null) {\n for(Series<X,Y> series : getData()) {\n for(Data<X,Y> data: series.getData()) {\n if(xData != null) {\n xData.add(data.getXValue());\n xData.add(xa.toRealValue(xa.toNumericValue(data.getXValue()) + getLength(data.getExtraValue())));\n }\n if(yData != null){\n yData.add(data.getYValue());\n }\n }\n }\n if(xData != null) xa.invalidateRange(xData);\n if(yData != null) ya.invalidateRange(yData);\n }\n }",
"void addEvent(IShape shape, IEvent event, int eventBegin, int eventEnd);",
"public boolean overlap(Event e)\n\t{\n\t\tTimeInterval compare = e.getTI();\n\t\tif ((compare.st.getHour() <= this.st.getHour()) && (this.st.getHour() <= compare.et.getHour()))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse if ((this.st.getHour() <= compare.st.getHour()) && (compare.st.getHour() <= this.et.getHour()))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"EventUses createEventUses();",
"@Test\n public void test47() throws Throwable {\n CombinedRangeCategoryPlot combinedRangeCategoryPlot0 = new CombinedRangeCategoryPlot();\n ValueMarker valueMarker0 = new ValueMarker(349.98275646987);\n MarkerChangeEvent markerChangeEvent0 = new MarkerChangeEvent((Marker) valueMarker0);\n XYBlockRenderer xYBlockRenderer0 = new XYBlockRenderer();\n RectangleAnchor rectangleAnchor0 = xYBlockRenderer0.getBlockAnchor();\n Line2D.Float line2D_Float0 = new Line2D.Float((-216.01F), 4682.902F, (-216.01F), (-216.01F));\n Rectangle2D.Float rectangle2D_Float0 = (Rectangle2D.Float)line2D_Float0.getBounds2D();\n Point2D.Double point2D_Double0 = (Point2D.Double)RectangleAnchor.coordinates(rectangle2D_Float0, (RectangleAnchor) null);\n valueMarker0.setLabelAnchor(rectangleAnchor0);\n combinedRangeCategoryPlot0.markerChanged(markerChangeEvent0);\n boolean boolean0 = combinedRangeCategoryPlot0.isRangeCrosshairLockedOnData();\n RectangleInsets rectangleInsets0 = combinedRangeCategoryPlot0.getAxisOffset();\n combinedRangeCategoryPlot0.setAnchorValue(Double.NEGATIVE_INFINITY);\n Line2D.Double line2D_Double0 = new Line2D.Double((Point2D) point2D_Double0, (Point2D) point2D_Double0);\n double double0 = line2D_Double0.getY2();\n double double1 = line2D_Double0.getX1();\n boolean boolean1 = combinedRangeCategoryPlot0.isRangeZoomable();\n int int0 = combinedRangeCategoryPlot0.getDatasetCount();\n boolean boolean2 = combinedRangeCategoryPlot0.isRangeCrosshairVisible();\n combinedRangeCategoryPlot0.clearDomainAxes();\n BasicStroke basicStroke0 = (BasicStroke)combinedRangeCategoryPlot0.getRangeCrosshairStroke();\n List list0 = combinedRangeCategoryPlot0.getAnnotations();\n Layer layer0 = Layer.BACKGROUND;\n Collection collection0 = combinedRangeCategoryPlot0.getDomainMarkers(layer0);\n StandardEntityCollection standardEntityCollection0 = new StandardEntityCollection();\n // Undeclared exception!\n try { \n standardEntityCollection0.add((ChartEntity) null);\n } catch(IllegalArgumentException e) {\n //\n // Null 'entity' argument.\n //\n assertThrownBy(\"org.jfree.chart.entity.StandardEntityCollection\", e);\n }\n }",
"@Override\n public final void tickStart(EnumSet<TickType> type, Object... tickData)\n {\n keyTick(type, false);\n }",
"public abstract EnumSet<TickType> ticks();",
"protected abstract void event(String type, long entity1, long entity2,\n long entity3, boolean added);",
"private void addTypesToCollision(int type1, int type2){\n\t\tList<Integer> typeCollisions = collisionsTypes.get(type1);\n \n\t\t// if there is no entry create one\n\t\tif(typeCollisions == null){\n\t\t\ttypeCollisions = new ArrayList<Integer>();\n\t\t\tcollisionsTypes.put(type1, typeCollisions);\n\t\t}\n\t\t// add collision to list\n\t\ttypeCollisions.add(type2);\n\t}",
"protected WrapperTickEvent()\n {\n }",
"public void testEventAdditionalTypes() throws Exception\n {\n checkEventTypeRegistration(EVENT_TYPE_BUILDER,\n \"testTree -> MOUSE, testTree -> CHANGE\");\n }",
"@Override\n public final void tickEnd(EnumSet<TickType> type, Object... tickData)\n {\n keyTick(type, true);\n }",
"@Test\n public void test66() throws Throwable {\n DateAxis dateAxis0 = new DateAxis();\n TickUnits tickUnits0 = (TickUnits)DateAxis.createStandardDateTickUnits();\n CombinedRangeCategoryPlot combinedRangeCategoryPlot0 = new CombinedRangeCategoryPlot((ValueAxis) dateAxis0);\n CategoryPointerAnnotation categoryPointerAnnotation0 = new CategoryPointerAnnotation(\"org.jfree.data.time.Day\", (Comparable) \"org.jfree.data.time.Day\", 0.0, 0.0);\n boolean boolean0 = combinedRangeCategoryPlot0.removeAnnotation(categoryPointerAnnotation0);\n combinedRangeCategoryPlot0.configureRangeAxes();\n AxisLocation axisLocation0 = combinedRangeCategoryPlot0.getRangeAxisLocation();\n combinedRangeCategoryPlot0.setDomainAxisLocation(525, axisLocation0, false);\n }",
"public static void create() {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString title = \"\";\n\t\tString date = \"\";\n\t\tString startTime = \"\";\n\t\tString endTime = \"\";\n\t\tSystem.out.println(\"Enter the title of the event you would like to create: \");\n\t\tif (sc.hasNextLine()) {\n\t\t\ttitle = sc.nextLine().toLowerCase();\n\t\t}\n\t\tSystem.out.println(\"Enter the date on MM/DD/YYYY format: \");\n\t\tif (sc.hasNextLine()) {\n\t\t\tdate = sc.nextLine().toLowerCase();\n\t\t}\n\t\tSystem.out.println(\"Enter the starting time in 24 hour format (ex 15:30): \");\n\t\tif (sc.hasNextLine()) {\n\t\t\tstartTime = sc.nextLine().toLowerCase();\n\t\t}\n\t\tSystem.out.println(\"Enter the ending time: in 24 hour format (ex 15:30): \"); // if there's no end time set the\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// end time to the start time.\n\t\tif (sc.hasNextLine()) {\n\t\t\tendTime = sc.nextLine().toLowerCase();\n\t\t\tif (endTime.equals(\"\")) {\n\t\t\t\tendTime = startTime;\n\t\t\t}\n\t\t}\n\t\tEvent toAdd = new Event(title, date, startTime, endTime);\n\n\t\tGregorianCalendar calendar = new GregorianCalendar(toAdd.getYear(), toAdd.getMonth(), toAdd.getDay());\n\t\tif (calendarToEvent.get(calendar) == null) { // there are no events under this date\n\t\t\tTreeSet<Event>treeSetForMap = new TreeSet<Event>();\n\t\t\ttreeSetForMap.add(toAdd);\n\t\t\tcalendarToEvent.put(calendar, treeSetForMap);\n\t\t} else { // there are already events, add event to the treeset\n\t\t\tboolean canAdd = true;\n\t\t\tfor (Event e : calendarToEvent.get(calendar)) {\n\t\t\t\tif (e.conflictCheck(toAdd)) { //check this (e.getIntEndTime()) < (toAdd.getIntStartTime()) ////return true if there is a conflict, false if there isn't\n\t\t\t\t\tSystem.out.println(\"Sorry can't add that event, there is a conflict\");\n\t\t\t\t\tcanAdd = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (canAdd) {\n\t\t\t\tcalendarToEvent.get(calendar).add(toAdd); // THAT'S WHAT IT USED TO BE calendarToEvent.get(toAdd.getDate()).add(toAdd);\n\t\t\t}\n\t\t}\n\t}",
"private void createEvents() {\n\t}",
"@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 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 }",
"protected abstract List<EventType> getAllowedEventTypes();",
"@Test\n public void test09() throws Throwable {\n SubCategoryAxis subCategoryAxis0 = new SubCategoryAxis(\"Null 'marker' not permitted.\");\n CombinedDomainCategoryPlot combinedDomainCategoryPlot0 = new CombinedDomainCategoryPlot((CategoryAxis) subCategoryAxis0);\n Layer layer0 = Layer.BACKGROUND;\n Collection collection0 = combinedDomainCategoryPlot0.getRangeMarkers(0, layer0);\n boolean boolean0 = combinedDomainCategoryPlot0.isRangeCrosshairLockedOnData();\n DefaultMultiValueCategoryDataset defaultMultiValueCategoryDataset0 = new DefaultMultiValueCategoryDataset();\n combinedDomainCategoryPlot0.setDataset((CategoryDataset) defaultMultiValueCategoryDataset0);\n ValueAxis[] valueAxisArray0 = new ValueAxis[8];\n LogarithmicAxis logarithmicAxis0 = new LogarithmicAxis(\"Null 'marker' not permitted.\");\n valueAxisArray0[0] = (ValueAxis) logarithmicAxis0;\n NumberAxis3D numberAxis3D0 = new NumberAxis3D(\"Null 'marker' not permitted.\");\n valueAxisArray0[1] = (ValueAxis) numberAxis3D0;\n LogarithmicAxis logarithmicAxis1 = new LogarithmicAxis(\"Null 'marker' not permitted.\");\n valueAxisArray0[2] = (ValueAxis) logarithmicAxis1;\n CyclicNumberAxis cyclicNumberAxis0 = new CyclicNumberAxis((double) 0);\n valueAxisArray0[3] = (ValueAxis) cyclicNumberAxis0;\n NumberAxis numberAxis0 = new NumberAxis();\n valueAxisArray0[4] = (ValueAxis) numberAxis0;\n ZoneInfo zoneInfo0 = (ZoneInfo)TimeZone.getDefault();\n Locale locale0 = JComponent.getDefaultLocale();\n TimeTableXYDataset timeTableXYDataset0 = new TimeTableXYDataset((TimeZone) zoneInfo0, locale0);\n Range range0 = timeTableXYDataset0.getDomainBounds(true);\n ModuloAxis moduloAxis0 = null;\n try {\n moduloAxis0 = new ModuloAxis(\"\", (Range) null);\n } catch(TooManyResourcesException e) {\n //\n // Loop has been executed more times than the allowed 10000\n //\n assertThrownBy(\"org.evosuite.runtime.LoopCounter\", e);\n }\n }",
"private boolean isTimeOverlap(Item t) {\n\t\treturn t.getEndDate().equals(event.getEndDate());\n\t}",
"BoundaryEvent createBoundaryEvent();",
"public CollisionEvent(int time, int priority, int guid1, int guid2) {\r\n\t\tsuper(time, priority);\r\n\t\tthis.guid1 = guid1;\r\n\t\tthis.guid2 = guid2;\r\n\t}",
"void addEel(int t_start, int t_end) {\n\t\t\tEelsRepository.put(t_start, t_end);\n\t\t}",
"public <T extends Event> void addGlobalEvent(Event.Type<T> type);",
"@Test\n public void test70() throws Throwable {\n CombinedRangeCategoryPlot combinedRangeCategoryPlot0 = new CombinedRangeCategoryPlot();\n ValueMarker valueMarker0 = new ValueMarker(349.98275646987);\n MarkerChangeEvent markerChangeEvent0 = new MarkerChangeEvent((Marker) valueMarker0);\n XYBlockRenderer xYBlockRenderer0 = new XYBlockRenderer();\n RectangleAnchor rectangleAnchor0 = xYBlockRenderer0.getBlockAnchor();\n Line2D.Float line2D_Float0 = new Line2D.Float((-216.01F), 4682.902F, (-216.01F), (-216.01F));\n Rectangle2D.Float rectangle2D_Float0 = (Rectangle2D.Float)line2D_Float0.getBounds2D();\n Point2D.Double point2D_Double0 = (Point2D.Double)RectangleAnchor.coordinates(rectangle2D_Float0, (RectangleAnchor) null);\n valueMarker0.setLabelAnchor(rectangleAnchor0);\n combinedRangeCategoryPlot0.markerChanged(markerChangeEvent0);\n boolean boolean0 = combinedRangeCategoryPlot0.isRangeCrosshairLockedOnData();\n RectangleInsets rectangleInsets0 = combinedRangeCategoryPlot0.getAxisOffset();\n combinedRangeCategoryPlot0.setAnchorValue(Double.NEGATIVE_INFINITY);\n Line2D.Double line2D_Double0 = new Line2D.Double((Point2D) point2D_Double0, (Point2D) point2D_Double0);\n double double0 = line2D_Double0.getY2();\n double double1 = line2D_Double0.getX1();\n boolean boolean1 = combinedRangeCategoryPlot0.isRangeZoomable();\n int int0 = combinedRangeCategoryPlot0.getDatasetCount();\n boolean boolean2 = combinedRangeCategoryPlot0.isRangeCrosshairVisible();\n combinedRangeCategoryPlot0.clearDomainAxes();\n BasicStroke basicStroke0 = (BasicStroke)combinedRangeCategoryPlot0.getRangeCrosshairStroke();\n List list0 = combinedRangeCategoryPlot0.getAnnotations();\n Layer layer0 = Layer.BACKGROUND;\n Collection collection0 = combinedRangeCategoryPlot0.getDomainMarkers(layer0);\n StandardEntityCollection standardEntityCollection0 = new StandardEntityCollection();\n ChartRenderingInfo chartRenderingInfo0 = new ChartRenderingInfo((EntityCollection) standardEntityCollection0);\n PlotRenderingInfo plotRenderingInfo0 = new PlotRenderingInfo(chartRenderingInfo0);\n combinedRangeCategoryPlot0.zoomDomainAxes(0.0, plotRenderingInfo0, (Point2D) point2D_Double0);\n LogAxis logAxis0 = new LogAxis();\n CombinedDomainXYPlot combinedDomainXYPlot0 = new CombinedDomainXYPlot((ValueAxis) logAxis0);\n AxisLocation axisLocation0 = combinedDomainXYPlot0.getDomainAxisLocation(1308);\n combinedRangeCategoryPlot0.setRangeAxisLocation(axisLocation0, false);\n }",
"public TaskBookBuilder addTypicalEventTasks() {\n final TypicalEventTasks tet = new TypicalEventTasks();\n return addEventTasks(tet.getEventTasks());\n }",
"public void testInvalidEventTypes() throws Exception {\n \n \n UnitTestData data = new UnitTestData();\n EventFeedJSON eventFeedJSON = new EventFeedJSON(data.getContest());\n \n String [] badTypeNameLists = {\n //\n \"a,b,c\", //\n \"contest,teams,bogus\", //\n \"unk,contest,teams\", //\n \"bad\", //\n \"23423499afsdfdf,34343,contest\", //\n };\n\n for (String badbadlist : badTypeNameLists) {\n try {\n eventFeedJSON.setEventTypeList(badbadlist);\n eventFeedJSON.createJSON(data.getContest(), null, null);\n fail(\"Expecting IllegalArgumentException for list '\" + badbadlist + \"'\");\n } catch (IllegalArgumentException e) {\n\n ; // Expected results, this passes the test\n }\n }\n\n \n }",
"private boolean overlappingEvents(BpmnShape s1, BpmnShape s2) {\n\t\t\n\t\tdouble firstHeight = s1.getBounds().getHeight() / 2;\n\t\tdouble firstWidth = s1.getBounds().getWidth() / 2;\n\t\tdouble firstX = s1.getBounds().getX();\n\t\tdouble firstY = s1.getBounds().getY() + firstHeight;\n\t\t\n\t\tdouble secondWidth = s2.getBounds().getWidth() / 2;\n\t\tdouble secondHeight = s2.getBounds().getHeight() / 2;\n\t\tdouble secondX = s2.getBounds().getX();\n\t\tdouble secondY = s2.getBounds().getY() + secondHeight;\n\t\t\n\t\tif (firstX > secondX && firstY > secondY){\n\t\t\tif (firstX - firstWidth < secondX + secondWidth && firstY - firstHeight < secondY + secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX > secondX && firstY < secondY){\n\t\t\tif (firstX - firstWidth < secondX + secondWidth && firstY + firstHeight > secondY - secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY > secondY){\n\t\t\tif (firstX + firstWidth > secondX - secondWidth && firstY - firstHeight < secondY + secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY < secondY){\n\t\t\tif (firstX + firstWidth > secondX - secondWidth && firstY + firstHeight > secondY - secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX == secondX && firstY == secondY)\n\t\t\t\treturn true;\n\t\t\n\t\tif (firstX == secondX && firstY > secondY){\n\t\t\tif (firstY - firstHeight < secondY + secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX > secondX && firstY == secondY){\n\t\t\tif (firstX - firstWidth < secondX + secondWidth)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX == secondX && firstY < secondY){\n\t\t\tif (firstY + firstHeight > secondY - secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY == secondY){\n\t\t\tif (firstX + firstWidth > secondX - secondWidth)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\treturn false;\n\t}",
"private boolean overlaps(ThingTimeTriple a, ThingTimeTriple b)\r\n/* 227: */ {\r\n/* 228:189 */ return (a.from < b.to) && (a.to > b.from);\r\n/* 229: */ }",
"@Test\n public void test13() throws Throwable {\n CombinedDomainCategoryPlot combinedDomainCategoryPlot0 = new CombinedDomainCategoryPlot((CategoryAxis) null);\n Layer layer0 = Layer.BACKGROUND;\n Collection collection0 = combinedDomainCategoryPlot0.getDomainMarkers(layer0);\n AxisLocation axisLocation0 = combinedDomainCategoryPlot0.getDomainAxisLocation();\n combinedDomainCategoryPlot0.setDomainAxis(1, (CategoryAxis) null);\n Rectangle2D.Double rectangle2D_Double0 = new Rectangle2D.Double((double) 1, (double) 1, (double) 1, 0.0);\n Rectangle2D.Float rectangle2D_Float0 = new Rectangle2D.Float();\n AxisChangeEvent axisChangeEvent0 = null;\n try {\n axisChangeEvent0 = new AxisChangeEvent((Axis) null);\n } catch(IllegalArgumentException e) {\n //\n // null source\n //\n assertThrownBy(\"java.util.EventObject\", e);\n }\n }",
"com.walgreens.rxit.ch.cda.EIVLEvent addNewEvent();",
"EventUse createEventUse();",
"public void testAddGUIEventListener1_NotEventObjectClass() {\n try {\n eventManager.addGUIEventListener(gUIEventListener1, String.class);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }",
"@Override\r\n\tprotected void processIsNotDefinedEvent(InNotDefinedEvent arg0) {\n\t\t\r\n\t}",
"@Test(expected = IllegalArgumentException.class)\n public void testAddMoveEndBeforeBegin() {\n testAnimation.addShape(r, 1, 100);\n size1 = new ScaleShape(r, 50.0, 100.0, 25.0, 100.0);\n testAnimation.addEvent(r, size1, 90, 2);\n }",
"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 void addEvPEC(Event ev);",
"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 }",
"private static void addEventTypes(Configuration cepConfig) {\n\t cepConfig.addEventType(\"Batch\", Batch.class.getName());\n\t cepConfig.addEventType(\"Span\", Span.class.getName());\n\t cepConfig.addEventType(\"Process\", Process.class.getName());\n\t cepConfig.addEventType(\"Log\", Log.class.getName());\n\t cepConfig.addEventType(\"Tag\", Tag.class.getName());\n\t cepConfig.addEventType(\"SpanRef\", SpanRef.class.getName());\n\t \n\t // SOCKET events\n\t // Metrics -> JSON influxDB\n\t // Events -> Custom definition\n\t // We register metrics and events as objects the engine will have to handle\n\t cepConfig.addEventType(\"Metric\", Metric.class.getName());\n\t cepConfig.addEventType(\"Event\", Event.class.getName());\n\t\t\n\t}",
"@Test\n public void test21() throws Throwable {\n ExtendedCategoryAxis extendedCategoryAxis0 = new ExtendedCategoryAxis(\" twtGuHO\");\n CombinedDomainCategoryPlot combinedDomainCategoryPlot0 = new CombinedDomainCategoryPlot((CategoryAxis) extendedCategoryAxis0);\n Polygon polygon0 = new Polygon();\n Rectangle rectangle0 = polygon0.getBounds();\n DefaultKeyedValuesDataset defaultKeyedValuesDataset0 = new DefaultKeyedValuesDataset();\n List list0 = defaultKeyedValuesDataset0.getKeys();\n combinedDomainCategoryPlot0.drawRangeGridlines((Graphics2D) null, rectangle0, list0);\n rectangle0.height = (-2538);\n boolean boolean0 = combinedDomainCategoryPlot0.isRangeZoomable();\n DatasetChangeEvent datasetChangeEvent0 = new DatasetChangeEvent((Object) list0, (Dataset) defaultKeyedValuesDataset0);\n combinedDomainCategoryPlot0.datasetChanged(datasetChangeEvent0);\n RectangleInsets rectangleInsets0 = new RectangleInsets();\n combinedDomainCategoryPlot0.setAxisOffset(rectangleInsets0);\n }",
"@Test\n public void test52() throws Throwable {\n ThermometerPlot thermometerPlot0 = new ThermometerPlot();\n NumberAxis numberAxis0 = (NumberAxis)thermometerPlot0.getRangeAxis();\n CombinedRangeCategoryPlot combinedRangeCategoryPlot0 = new CombinedRangeCategoryPlot((ValueAxis) numberAxis0);\n CategoryAxis3D categoryAxis3D0 = new CategoryAxis3D(\"Null 'thresholdType' argument.\");\n AxisChangeEvent axisChangeEvent0 = new AxisChangeEvent((Axis) categoryAxis3D0);\n ChartChangeEventType chartChangeEventType0 = axisChangeEvent0.getType();\n axisChangeEvent0.setType(chartChangeEventType0);\n thermometerPlot0.axisChanged(axisChangeEvent0);\n CategoryAxis3D categoryAxis3D1 = new CategoryAxis3D(\"\");\n int int0 = combinedRangeCategoryPlot0.getDomainAxisIndex(categoryAxis3D1);\n LegendItemCollection legendItemCollection0 = combinedRangeCategoryPlot0.getFixedLegendItems();\n AxisLocation axisLocation0 = combinedRangeCategoryPlot0.getRangeAxisLocation();\n // Undeclared exception!\n try { \n combinedRangeCategoryPlot0.setRangeAxisLocation((-1), axisLocation0, false);\n } catch(IllegalArgumentException e) {\n //\n // Requires index >= 0.\n //\n assertThrownBy(\"org.jfree.chart.util.AbstractObjectList\", e);\n }\n }",
"public void addTicks(int toAdd)\r\n\t{\r\n\t\tm_ticks += toAdd;\r\n\t}",
"protected List refreshTicksHorizontal(Graphics2D g2, Rectangle2D dataArea, RectangleEdge edge) {\n/* 1614 */ List result = new ArrayList();\n/* */ \n/* 1616 */ Font tickLabelFont = getTickLabelFont();\n/* 1617 */ g2.setFont(tickLabelFont);\n/* */ \n/* 1619 */ if (isAutoTickUnitSelection()) {\n/* 1620 */ selectAutoTickUnit(g2, dataArea, edge);\n/* */ }\n/* */ \n/* 1623 */ DateTickUnit unit = getTickUnit();\n/* 1624 */ Date tickDate = calculateLowestVisibleTickValue(unit);\n/* 1625 */ Date upperDate = getMaximumDate();\n/* */ \n/* 1627 */ boolean hasRolled = false;\n/* 1628 */ while (tickDate.before(upperDate)) {\n/* */ \n/* 1630 */ if (!hasRolled) {\n/* 1631 */ tickDate = correctTickDateForPosition(tickDate, unit, this.tickMarkPosition);\n/* */ }\n/* */ \n/* */ \n/* 1635 */ long lowestTickTime = tickDate.getTime();\n/* 1636 */ long distance = unit.addToDate(tickDate, this.timeZone).getTime() - lowestTickTime;\n/* */ \n/* 1638 */ int minorTickSpaces = getMinorTickCount();\n/* 1639 */ if (minorTickSpaces <= 0) {\n/* 1640 */ minorTickSpaces = unit.getMinorTickCount();\n/* */ }\n/* 1642 */ for (int minorTick = 1; minorTick < minorTickSpaces; minorTick++) {\n/* 1643 */ long minorTickTime = lowestTickTime - distance * minorTick / minorTickSpaces;\n/* */ \n/* 1645 */ if (minorTickTime > 0L && getRange().contains(minorTickTime) && \n/* 1646 */ !isHiddenValue(minorTickTime)) {\n/* 1647 */ result.add(new DateTick(TickType.MINOR, new Date(minorTickTime), \"\", TextAnchor.TOP_CENTER, TextAnchor.CENTER, 0.0D));\n/* */ }\n/* */ } \n/* */ \n/* */ \n/* */ \n/* 1653 */ if (!isHiddenValue(tickDate.getTime())) {\n/* */ TextAnchor rotationAnchor, anchor;\n/* */ String tickLabel;\n/* 1656 */ DateFormat formatter = getDateFormatOverride();\n/* 1657 */ if (formatter != null) {\n/* 1658 */ tickLabel = formatter.format(tickDate);\n/* */ } else {\n/* */ \n/* 1661 */ tickLabel = this.tickUnit.dateToString(tickDate);\n/* */ } \n/* */ \n/* 1664 */ double angle = 0.0D;\n/* 1665 */ if (isVerticalTickLabels()) {\n/* 1666 */ anchor = TextAnchor.CENTER_RIGHT;\n/* 1667 */ rotationAnchor = TextAnchor.CENTER_RIGHT;\n/* 1668 */ if (edge == RectangleEdge.TOP) {\n/* 1669 */ angle = 1.5707963267948966D;\n/* */ } else {\n/* */ \n/* 1672 */ angle = -1.5707963267948966D;\n/* */ }\n/* */ \n/* */ }\n/* 1676 */ else if (edge == RectangleEdge.TOP) {\n/* 1677 */ anchor = TextAnchor.BOTTOM_CENTER;\n/* 1678 */ rotationAnchor = TextAnchor.BOTTOM_CENTER;\n/* */ } else {\n/* */ \n/* 1681 */ anchor = TextAnchor.TOP_CENTER;\n/* 1682 */ rotationAnchor = TextAnchor.TOP_CENTER;\n/* */ } \n/* */ \n/* */ \n/* 1686 */ Tick tick = new DateTick(tickDate, tickLabel, anchor, rotationAnchor, angle);\n/* */ \n/* 1688 */ result.add(tick);\n/* 1689 */ hasRolled = false;\n/* */ \n/* 1691 */ long currentTickTime = tickDate.getTime();\n/* 1692 */ tickDate = unit.addToDate(tickDate, this.timeZone);\n/* 1693 */ long nextTickTime = tickDate.getTime();\n/* 1694 */ for (int minorTick = 1; minorTick < minorTickSpaces; \n/* 1695 */ minorTick++) {\n/* 1696 */ long minorTickTime = currentTickTime + (nextTickTime - currentTickTime) * minorTick / minorTickSpaces;\n/* */ \n/* */ \n/* 1699 */ if (getRange().contains(minorTickTime) && \n/* 1700 */ !isHiddenValue(minorTickTime)) {\n/* 1701 */ result.add(new DateTick(TickType.MINOR, new Date(minorTickTime), \"\", TextAnchor.TOP_CENTER, TextAnchor.CENTER, 0.0D));\n/* */ }\n/* */ } \n/* */ \n/* */ \n/* */ continue;\n/* */ } \n/* */ \n/* */ \n/* 1710 */ tickDate = unit.rollDate(tickDate, this.timeZone);\n/* 1711 */ hasRolled = true;\n/* */ } \n/* */ \n/* */ \n/* */ \n/* 1716 */ return result;\n/* */ }",
"@Test\n public void testDifferentChangeTypeOverlap() {\n testAnimation.addShape(c, 1, 100);\n move1 = new MoveShape(c, 500.0, 100.0, 300.0, 300.0);\n size1 = new ScaleShape(c, 120.0, 60.0, 85.0, 10.67);\n colorChange1 = new ChangeColor(c,\n 0, 0, 1,\n 0, 1, 0);\n testAnimation.addEvent(c, move1, 20, 45);\n testAnimation.addEvent(c, size1, 28, 88);\n testAnimation.addEvent(c, colorChange1, 36, 95);\n assertEquals(\"Shapes:\\n\"\n + \"Name: C\\n\"\n + \"Type: ellipse\\n\"\n + \"Center: (500.0,100.0), X radius: 60.0, Y radius: 30.0, Color: (0,0,1)\\n\"\n + \"Appears at t=1\\n\"\n + \"Disappears at t=100\\n\"\n + \"\\n\"\n + \"C moves from (500.0,100.0) to (300.0,300.0) from time t=20 to t=45\\n\"\n + \"C changes height from 60.0 to 10.67 and changes width from 120.0 to 85.0\"\n + \" from time t=28 to t=88\\nC changes color from (0,0,1) to (0,1,0) from \" +\n \"time t=36 \"\n + \"to t=95\\n\",\n testAnimation.toString());\n }",
"@Override\n public void addEvictionGuard(RangeSet<Long> ranges) {\n\n }",
"public Event(double dt, Particle a, Particle b) { // create event\n\n if (Double.isNaN(dt))\n throw new IllegalEventException(\"illegal time: NaN\");\n\n if (dt < 0.0)\n throw new IllegalEventException(\"negative time\");\n\n this.eTime = dt + sTime;\n this.a = a;\n this.b = b;\n this.countA = (a != null) ? a.getCount() : 0;\n this.countB = (b != null) ? b.getCount() : 0;\n }",
"@Test(expected = IllegalArgumentException.class)\n public void testCantMoveSameShapeInOverlappingTime() {\n model1.addShape(Rectangle.createRectangle(\"R\", new Point.Double(500, 200),\n new Color(0, 0, 0), 0, 10, 10, 10));\n model1.addAction(new MoveAction(\"R\", 0, 100, new Point.Double(500, 200),\n new Point.Double(10, 10)));\n model1.addAction(new MoveAction(\"R\", 50, 150,\n new Point.Double(500, 200), new Point.Double(10, 10)));\n }",
"private void setUp() {\r\n Calendar calendar1 = Calendar.getInstance();\r\n calendar1.set((endDate.get(Calendar.YEAR)), \r\n (endDate.get(Calendar.MONTH)), (endDate.get(Calendar.DAY_OF_MONTH)));\r\n calendar1.roll(Calendar.DAY_OF_YEAR, -6);\r\n \r\n Calendar calendar2 = Calendar.getInstance();\r\n calendar2.set((endDate.get(Calendar.YEAR)), \r\n (endDate.get(Calendar.MONTH)), (endDate.get(Calendar.DAY_OF_MONTH)));\r\n \r\n acceptedDatesRange[0] = calendar1.get(Calendar.DAY_OF_YEAR);\r\n acceptedDatesRange[1] = calendar2.get(Calendar.DAY_OF_YEAR); \r\n \r\n if(acceptedDatesRange[1] < 7) {\r\n acceptedDatesRange[0] = 1; \r\n }\r\n \r\n //MiscStuff.writeToLog(\"Ranges set \" + calendar1.get\r\n // (Calendar.DAY_OF_YEAR) + \" \" + calendar2.get(Calendar.DAY_OF_YEAR));\r\n }",
"@Test\n public void test28() throws Throwable {\n CombinedRangeCategoryPlot combinedRangeCategoryPlot0 = new CombinedRangeCategoryPlot();\n CategoryAnchor categoryAnchor0 = combinedRangeCategoryPlot0.getDomainGridlinePosition();\n RectangleEdge rectangleEdge0 = combinedRangeCategoryPlot0.getRangeAxisEdge((-119));\n }",
"public void setMarioEvents() {\n\t\tCollisionEvent event1, event2, event4, event98, event6, event7, event8, event9;\n\t\tAdvancedCollisionEvent event_1LandsTop4, event_1Touches4NotTop, event5;\n\t\ttry {\n\t\t\t// player with block\n\t\t\tevent1 = new CollisionEvent(\n\t\t\t\t\tArrays.asList(new String[] { \"0\", \"1\" }),\n\t\t\t\t\tPLAYER_LANDING_ON_BLOCK_STRING);\n\t\t\t// enemy with block\n\t\t\tevent2 = new CollisionEvent(Arrays.asList(\"1\", \"2\"),\n\t\t\t\t\tENEMY_ON_BLOCK_STRING);\n\t\t\t// player killing enemy\n\t\t\tevent_1LandsTop4 = new AdvancedCollisionEvent(Arrays.asList(\"0\",\n\t\t\t\t\t\"2\", \"true\", \"false\", \"false\", \"false\", \"false\"),\n\t\t\t\t\tPLAYER_JUMPING_ON_ENEMY_STRING);\n\t\t\t// enemy kills player\n\t\t\tevent_1Touches4NotTop = new AdvancedCollisionEvent(Arrays.asList(\n\t\t\t\t\t\"0\", \"2\", \"false\", \"true\", \"true\", \"true\", \"false\"),\n\t\t\t\t\tENEMY_KILLING_PLAYER_STRING);\n\t\t\t// player reaches goal\n\t\t\tevent4 = new CollisionEvent(Arrays.asList(\"0\", \"3\"),\n\t\t\t\t\tPLAYER_HITTING_GOAL_STRING);\n\t\t\t// player collects coin\n\t\t\tevent98 = new CollisionEvent(Arrays.asList(\"0\", \"5\"),\n\t\t\t\t\tPLAYER_COLLECTING_COIN_STRING);\n\t\t\t// bullet hits enemy\n\t\t\tevent5 = new AdvancedCollisionEvent(Arrays.asList(\"2\", \"150\",\n\t\t\t\t\t\"true\", \"true\", \"true\", \"true\", \"true\"),\n\t\t\t\t\tBULLET_HITTING_ENEMY_STRING);\n\t\t\t// player gets gun power up\n\t\t\tevent6 = new CollisionEvent(Arrays.asList(\"0\", \"6\"),\n\t\t\t\t\tPLAYER_HITS_GUN_POWERUP_STRING);\n\t\t\t// player gets invincibility power up\n\t\t\tevent7 = new CollisionEvent(Arrays.asList(\"0\", \"7\"),\n\t\t\t\t\tPLAYER_HITS_INVINCIBILITY_POWERUP_STRING);\n\t\t\t// player gets size power up\n\t\t\tevent8 = new CollisionEvent(Arrays.asList(\"0\", \"8\"),\n\t\t\t\t\tPLAYER_HITS_SIZE_POWER_UP_STRING);\n\t\t\t// player gets speed power up\n\t\t\tevent9 = new CollisionEvent(Arrays.asList(\"0\", \"9\"),\n\t\t\t\t\tPLAYER_HITS_SPEED_POWERUP_STRING);\n\t\t\tAddPowerUpAction action13 = new AddPowerUpAction(\n\t\t\t\t\tnew ArrayList<String>(Arrays.asList(\"0\", \"8\",\n\t\t\t\t\t\t\tSIZE_POWER_UP_STRING, \"10\", \"mario\")));\n\t\t\tAddPowerUpAction action12 = new AddPowerUpAction(\n\t\t\t\t\tnew ArrayList<String>(Arrays.asList(\"0\", \"9\",\n\t\t\t\t\t\t\tSPEED_POWER_UP_STRING, \"10\", \"bullet\")));\n\n\t\t\tDecreaseObjectHitPointsByCollisionAction action14 = new DecreaseObjectHitPointsByCollisionAction(\n\t\t\t\t\tnew ArrayList<String>(Arrays.asList(\"8\", \"0\")));\n\t\t\tDecreaseObjectHitPointsByCollisionAction action15 = new DecreaseObjectHitPointsByCollisionAction(\n\t\t\t\t\tnew ArrayList<String>(Arrays.asList(\"9\", \"0\")));\n\t\t\tDecreaseObjectHitPointsByCollisionAction action9 = new DecreaseObjectHitPointsByCollisionAction(\n\t\t\t\t\tnew ArrayList<String>(Arrays.asList(\"6\", \"0\")));\n\t\t\tDecreaseObjectHitPointsByCollisionAction action11 = new DecreaseObjectHitPointsByCollisionAction(\n\t\t\t\t\tnew ArrayList<String>(Arrays.asList(\"7\", \"0\")));\n\t\t\tAddPowerUpAction action7 = new AddPowerUpAction(\n\t\t\t\t\tnew ArrayList<String>(Arrays.asList(\"0\", \"6\",\n\t\t\t\t\t\t\tGUN_POWERUP_STRING, \"10\", \"mario\")));\n\t\t\tAddPowerUpAction action8 = new AddPowerUpAction(\n\t\t\t\t\tnew ArrayList<String>(Arrays.asList(\"0\", \"7\",\n\t\t\t\t\t\t\tINVINCIBILITY_POWERUP_STRING, \"10\", \"mobile\")));\n\t\t\tCollideSolidAction action = new CollideSolidAction(\n\t\t\t\t\tnew Tuple<Integer>(0, 1).toListString());\n\t\t\tCollideSolidAction action2 = new CollideSolidAction(\n\t\t\t\t\tnew Tuple<Integer>(2, 1).toListString());\n\t\t\tKillPlayerAction action3 = new KillPlayerAction(\n\t\t\t\t\tnew ArrayList<String>(Arrays.asList(\"0\")));\n\n\t\t\tDecreaseObjectHitPointsByCollisionAction action10 = new DecreaseObjectHitPointsByCollisionAction(\n\t\t\t\t\tnew ArrayList<String>(Arrays.asList(\"5\", \"0\")));\n\t\t\tDecreaseObjectHitPointsByCollisionAction action5 = new DecreaseObjectHitPointsByCollisionAction(\n\t\t\t\t\tnew ArrayList<String>(Arrays.asList(\"150\", \"2\")));\n\t\t\tDecreaseObjectHitPointsByCollisionAction action6 = new DecreaseObjectHitPointsByCollisionAction(\n\t\t\t\t\tnew ArrayList<String>(Arrays.asList(\"2\", \"150\")));\n\t\t\tEndLevelAction action4 = new EndLevelAction(new ArrayList<String>());\n\n\t\t\tChangeScoreAction action98 = new ChangeScoreAction(\n\t\t\t\t\tnew ArrayList<String>(Arrays.asList(\"5\")));\n\t\t\tDecreaseObjectHitPointsByCollisionAction action_1Kills4 = new DecreaseObjectHitPointsByCollisionAction(\n\t\t\t\t\tnew ArrayList<String>(Arrays.asList(\"2\", \"0\")));\n\n\t\t\tevent1.addAction(action);\n\t\t\tevent2.addAction(action2);\n\t\t\tevent_1Touches4NotTop.addAction(action3);\n\t\t\tevent_1LandsTop4.addAction(action_1Kills4);\n\t\t\tevent4.addAction(action4);\n\t\t\tevent98.addAction(action98);\n\t\t\tevent98.addAction(action10);\n\t\t\tevent5.addAction(action5, action6);\n\t\t\tevent6.addAction(action7, action9);\n\t\t\tevent7.addAction(action8, action11);\n\t\t\tevent9.addAction(action12, action15);\n\t\t\tevent8.addAction(action13, action14);\n\t\t\tmyLevel.addEvent(event1, event2, event_1Touches4NotTop, event4,\n\t\t\t\t\tevent98, event_1LandsTop4, event5, event6, event7, event8,\n\t\t\t\t\tevent9);\n\t\t\tmyLevelObjectBar.initializeEventsMap(myLevel.getEvents());\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Test(timeout = 4000)\n public void test25() throws Throwable {\n Range.Builder range_Builder0 = new Range.Builder();\n range_Builder0.contractBegin(0L);\n range_Builder0.copy();\n range_Builder0.copy();\n Range range0 = range_Builder0.build();\n range_Builder0.shift(265L);\n LinkedList<Range> linkedList0 = new LinkedList<Range>();\n linkedList0.add(range0);\n range0.complementFrom(linkedList0);\n Range range1 = Range.of((-3234L));\n range0.isSubRangeOf(range1);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n range0.complementFrom(linkedList0);\n range1.intersects(range0);\n // Undeclared exception!\n try { \n Range.Comparators.valueOf(\"TGa_,[\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // No enum constant org.jcvi.jillion.core.Range.Comparators.TGa_,[\n //\n verifyException(\"java.lang.Enum\", e);\n }\n }",
"@Test\n public void test51() throws Throwable {\n PeriodAxis periodAxis0 = new PeriodAxis(\"e\");\n CombinedRangeCategoryPlot combinedRangeCategoryPlot0 = new CombinedRangeCategoryPlot((ValueAxis) periodAxis0);\n CategoryMarker categoryMarker0 = new CategoryMarker((Comparable) \"e\");\n categoryMarker0.setKey(\"e\");\n Layer layer0 = Layer.FOREGROUND;\n combinedRangeCategoryPlot0.addDomainMarker(3, categoryMarker0, layer0);\n }",
"protected void normalizeEventTimes()\n {\n this.m_eventStartTime = (this.event_start_time == EASMessage.IMMEDIATE_START_TIME) ? System.currentTimeMillis()\n : (this.event_start_time * 1000L) + EASMessage.START_TIME_EPOCH;\n\n this.m_eventExpirationTime = (this.event_duration == EASMessage.INDEFINITE_EVENT_DURATION) ? Long.MAX_VALUE\n : this.m_eventStartTime + (this.event_duration * 60L * 1000L);\n }",
"@Test\n public void test77() throws Throwable {\n CombinedDomainCategoryPlot combinedDomainCategoryPlot0 = new CombinedDomainCategoryPlot((CategoryAxis) null);\n combinedDomainCategoryPlot0.setDrawSharedDomainAxis(false);\n DecimalFormat decimalFormat0 = (DecimalFormat)NumberFormat.getCurrencyInstance();\n NumberTickUnit numberTickUnit0 = new NumberTickUnit((-28.552), (NumberFormat) decimalFormat0);\n Color color0 = (Color)Axis.DEFAULT_TICK_MARK_PAINT;\n boolean boolean0 = numberTickUnit0.equals((Object) null);\n TimeTableXYDataset timeTableXYDataset0 = new TimeTableXYDataset();\n RectangleEdge rectangleEdge0 = combinedDomainCategoryPlot0.getDomainAxisEdge();\n CyclicNumberAxis cyclicNumberAxis0 = new CyclicNumberAxis(0.0, 0.0);\n XYAreaRenderer2 xYAreaRenderer2_0 = new XYAreaRenderer2();\n XYPlot xYPlot0 = new XYPlot((XYDataset) timeTableXYDataset0, (ValueAxis) cyclicNumberAxis0, (ValueAxis) cyclicNumberAxis0, (XYItemRenderer) xYAreaRenderer2_0);\n BasicStroke basicStroke0 = (BasicStroke)xYPlot0.getRangeZeroBaselineStroke();\n CategoryMarker categoryMarker0 = new CategoryMarker((Comparable) numberTickUnit0, (Paint) color0, (Stroke) basicStroke0, (Paint) color0, cyclicNumberAxis0.DEFAULT_ADVANCE_LINE_STROKE, 0.85F);\n combinedDomainCategoryPlot0.addRangeMarker((Marker) categoryMarker0);\n int int0 = combinedDomainCategoryPlot0.getRangeAxisIndex(cyclicNumberAxis0);\n Layer layer0 = Layer.BACKGROUND;\n combinedDomainCategoryPlot0.addDomainMarker(0, categoryMarker0, layer0);\n combinedDomainCategoryPlot0.setRenderer((CategoryItemRenderer) null);\n boolean boolean1 = combinedDomainCategoryPlot0.isRangeZoomable();\n Point2D.Double point2D_Double0 = new Point2D.Double((-862.0), 1.0E-6);\n point2D_Double0.y = (double) 0;\n AxisLocation axisLocation0 = combinedDomainCategoryPlot0.getDomainAxisLocation((-2040));\n combinedDomainCategoryPlot0.setDomainAxisLocation(axisLocation0);\n }",
"private void checkTickListener()\n\t{\n\t}",
"@Test\r\n public void testReflexivityOverlappingTimePeriods(){\n DateTime startAvailability1 = new DateTime(2021, 7, 9, 10, 30);\r\n DateTime endAvailability1 = new DateTime(2021, 7, 9, 11, 30);\r\n DateTime startAvailability2 = new DateTime(2021, 7, 9, 11, 0);\r\n DateTime endAvailability2 = new DateTime(2021, 7, 9, 12, 0);\r\n Availability availability1 = new Availability(new HashSet<>(Arrays.asList(\"online\", \"in-person\")), startAvailability1, endAvailability1);\r\n Availability availability2 = new Availability(new HashSet<>(Arrays.asList(\"online\", \"in-person\")), startAvailability2, endAvailability2);\r\n assertTrue(availability1.overlapsWithTimePeriod(availability2));\r\n assertTrue(availability2.overlapsWithTimePeriod(availability1));\r\n }",
"public void testBoundaryChangedEvent_2_Accuracy() {\n assertNotNull(\"Test method for 'BoundaryChangedEvent(BaseNode, Rectangle, Rectangle, String)' failed.\", event);\n }",
"@Test(expected = IllegalArgumentException.class)\n public void testScaleOvalDuringSamePeriod() {\n modelWithRectAndOval.addAction(ScaleOvalAction.createScaleOvalAction(\"C\", 10,\n 50, 100, 100, 10, 10));\n modelWithRectAndOval.addAction(ScaleOvalAction.createScaleOvalAction(\"C\", 40,\n 60, 100, 100, 10, 10));\n }",
"@Test\n public void test72() throws Throwable {\n CombinedRangeCategoryPlot combinedRangeCategoryPlot0 = new CombinedRangeCategoryPlot();\n combinedRangeCategoryPlot0.mapDatasetToDomainAxis(304, 908);\n Point2D.Double point2D_Double0 = new Point2D.Double((double) 304, (double) 908);\n AxisLocation axisLocation0 = AxisLocation.TOP_OR_LEFT;\n combinedRangeCategoryPlot0.setRangeAxisLocation(908, axisLocation0);\n CategoryAxis3D categoryAxis3D0 = new CategoryAxis3D(\"org.jfree.chart.annotations.XYBoxAnnotation\");\n combinedRangeCategoryPlot0.setDomainAxis((CategoryAxis) categoryAxis3D0);\n point2D_Double0.x = 4978.54542523173;\n String string0 = combinedRangeCategoryPlot0.getPlotType();\n ValueAxis[] valueAxisArray0 = new ValueAxis[6];\n DateAxis dateAxis0 = new DateAxis(\"org.jfree.chart.annotations.XYBoxAnnotation\");\n valueAxisArray0[0] = (ValueAxis) dateAxis0;\n CyclicNumberAxis cyclicNumberAxis0 = new CyclicNumberAxis((-1.0), (double) 304);\n valueAxisArray0[1] = (ValueAxis) cyclicNumberAxis0;\n NumberAxis numberAxis0 = new NumberAxis(\"z)m!{V![\");\n valueAxisArray0[2] = (ValueAxis) numberAxis0;\n SimpleDateFormat simpleDateFormat0 = (SimpleDateFormat)DateFormat.getInstance();\n ZoneInfo zoneInfo0 = (ZoneInfo)simpleDateFormat0.getTimeZone();\n DateAxis dateAxis1 = new DateAxis(\"org.jfree.chart.annotations.XYBoxAnnotation\", (TimeZone) zoneInfo0);\n valueAxisArray0[3] = (ValueAxis) dateAxis1;\n DefaultValueDataset defaultValueDataset0 = new DefaultValueDataset();\n ThermometerPlot thermometerPlot0 = new ThermometerPlot((ValueDataset) defaultValueDataset0);\n NumberAxis numberAxis1 = (NumberAxis)thermometerPlot0.getRangeAxis();\n valueAxisArray0[4] = (ValueAxis) numberAxis1;\n String[] stringArray0 = new String[7];\n stringArray0[0] = \"z)m!{V![\";\n stringArray0[1] = \"\";\n stringArray0[2] = \"%}~t|T'c.q2O/M@;Vu5\";\n stringArray0[3] = \"?_t}%h[qlt\";\n stringArray0[4] = \"z)m!{V![\";\n stringArray0[5] = \"z)m!{V![\";\n stringArray0[6] = \"d*%)TD6zCx!%m^]|\";\n }",
"@Override\r\n\tpublic void update(EventBean[] arg0, EventBean[] arg1) {\n\t\tEODQuote q = (EODQuote)arg0[0].getUnderlying();\r\n\t\t/*if ( q.getTimestamp() < Utility.getInstance().getCurrentTime() )\r\n\t\t{\r\n\t\t\tUtility.getInstance().info(\"Old event ignoring \"+q.toString());\r\n\t\t\treturn;\r\n\t\t}*/\r\n\t\t\tpfm.generateExits(q);\r\n\t\t\t\t\t\r\n\t\t}",
"public void setAutoRange() {\n this.customAxis=false;\n addGraphPanel();\n }",
"@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}",
"@Test\n public void test85() throws Throwable {\n CyclicNumberAxis cyclicNumberAxis0 = new CyclicNumberAxis(0.0, 0.0);\n CombinedRangeCategoryPlot combinedRangeCategoryPlot0 = new CombinedRangeCategoryPlot((ValueAxis) cyclicNumberAxis0);\n RectangleEdge rectangleEdge0 = combinedRangeCategoryPlot0.getDomainAxisEdge(1248);\n List list0 = combinedRangeCategoryPlot0.getSubplots();\n AxisLocation axisLocation0 = AxisLocation.BOTTOM_OR_LEFT;\n combinedRangeCategoryPlot0.setDomainAxisLocation(0, axisLocation0, false);\n combinedRangeCategoryPlot0.setRangeCrosshairValue(0.18, false);\n AxisLocation axisLocation1 = combinedRangeCategoryPlot0.getRangeAxisLocation();\n boolean boolean0 = combinedRangeCategoryPlot0.isRangeCrosshairLockedOnData();\n MultiplePiePlot multiplePiePlot0 = new MultiplePiePlot();\n JFreeChart jFreeChart0 = multiplePiePlot0.getPieChart();\n TextBlockAnchor textBlockAnchor0 = TextBlockAnchor.TOP_CENTER;\n Layer layer0 = Layer.BACKGROUND;\n Collection collection0 = combinedRangeCategoryPlot0.getRangeMarkers(layer0);\n LineAndShapeRenderer lineAndShapeRenderer0 = new LineAndShapeRenderer();\n combinedRangeCategoryPlot0.setRenderer((CategoryItemRenderer) lineAndShapeRenderer0);\n combinedRangeCategoryPlot0.setAnchorValue(0.0, true);\n }",
"public void addTimeBlock(UUID eventUUID, TimeRange timeRange) {\n this.uuidToTimeRange.put(eventUUID, timeRange);\n }",
"@Test\r\n public void testGetOverlappingType() {\r\n //Tests oerlapping type\r\n assertEquals(31, cellToInsert.getOverlappingType(listToCompare.get(0)));\r\n assertEquals(33, cellToInsert.getOverlappingType(listToCompare.get(1)));\r\n assertEquals(32, cellToInsert.getOverlappingType(listToCompare.get(2)));\r\n assertEquals(21, cellToInsert.getOverlappingType(listToCompare.get(3)));\r\n assertEquals(23, cellToInsert.getOverlappingType(listToCompare.get(4)));\r\n assertEquals(22, cellToInsert.getOverlappingType(listToCompare.get(5)));\r\n assertEquals(11, cellToInsert.getOverlappingType(listToCompare.get(6)));\r\n assertEquals(13, cellToInsert.getOverlappingType(listToCompare.get(7)));\r\n assertEquals(12, cellToInsert.getOverlappingType(listToCompare.get(8)));\r\n }",
"@Test\n public void test74() throws Throwable {\n CombinedRangeCategoryPlot combinedRangeCategoryPlot0 = new CombinedRangeCategoryPlot();\n XYBlockRenderer xYBlockRenderer0 = new XYBlockRenderer();\n LookupPaintScale lookupPaintScale0 = (LookupPaintScale)xYBlockRenderer0.getPaintScale();\n LogarithmicAxis logarithmicAxis0 = new LogarithmicAxis(\"+C`~q\");\n PaintScaleLegend paintScaleLegend0 = new PaintScaleLegend((PaintScale) lookupPaintScale0, (ValueAxis) logarithmicAxis0);\n paintScaleLegend0.setStripWidth(0.0);\n AxisLocation axisLocation0 = paintScaleLegend0.getAxisLocation();\n combinedRangeCategoryPlot0.setDomainAxisLocation(axisLocation0, false);\n combinedRangeCategoryPlot0.setDrawSharedDomainAxis(true);\n BarRenderer barRenderer0 = new BarRenderer();\n combinedRangeCategoryPlot0.setRenderer(0, (CategoryItemRenderer) barRenderer0, true);\n DateAxis dateAxis0 = new DateAxis();\n CombinedRangeXYPlot combinedRangeXYPlot0 = new CombinedRangeXYPlot((ValueAxis) dateAxis0);\n UnitType unitType0 = UnitType.ABSOLUTE;\n RectangleInsets rectangleInsets0 = new RectangleInsets(unitType0, 0.0, 0.0, (double) 0, 0.0);\n combinedRangeCategoryPlot0.setAxisOffset(rectangleInsets0);\n StandardEntityCollection standardEntityCollection0 = new StandardEntityCollection();\n ChartRenderingInfo chartRenderingInfo0 = new ChartRenderingInfo((EntityCollection) standardEntityCollection0);\n PlotRenderingInfo plotRenderingInfo0 = new PlotRenderingInfo(chartRenderingInfo0);\n Point2D.Double point2D_Double0 = new Point2D.Double();\n XYPlot xYPlot0 = combinedRangeXYPlot0.findSubplot(plotRenderingInfo0, point2D_Double0);\n }",
"@Test\n public void test64() throws Throwable {\n CombinedRangeCategoryPlot combinedRangeCategoryPlot0 = new CombinedRangeCategoryPlot();\n Layer layer0 = Layer.FOREGROUND;\n RectangleInsets rectangleInsets0 = combinedRangeCategoryPlot0.getAxisOffset();\n combinedRangeCategoryPlot0.setInsets(rectangleInsets0, true);\n Collection collection0 = combinedRangeCategoryPlot0.getRangeMarkers(layer0);\n combinedRangeCategoryPlot0.clearRangeMarkers(0);\n AxisLocation axisLocation0 = combinedRangeCategoryPlot0.getRangeAxisLocation(0);\n combinedRangeCategoryPlot0.setRangeAxisLocation(0, axisLocation0, true);\n AreaRenderer areaRenderer0 = new AreaRenderer();\n // Undeclared exception!\n try { \n combinedRangeCategoryPlot0.setRenderer((-1), (CategoryItemRenderer) areaRenderer0);\n } catch(IllegalArgumentException e) {\n //\n // Requires index >= 0.\n //\n assertThrownBy(\"org.jfree.chart.util.AbstractObjectList\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test29() throws Throwable {\n Range range0 = Range.of(0L, 0L);\n Range.Builder range_Builder0 = new Range.Builder(range0);\n Range.Builder range_Builder1 = range_Builder0.copy();\n Range range1 = range_Builder1.build();\n long long0 = 9223372036854775807L;\n range_Builder1.shift(9223372036854775807L);\n LinkedList<Range> linkedList0 = new LinkedList<Range>();\n linkedList0.add(range0);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.ZERO_BASED;\n Range range2 = Range.of(range_CoordinateSystem0, 243L, 466L);\n range2.isSubRangeOf(range1);\n Range range3 = Range.of((-636L), (-636L));\n range3.complement(range2);\n range1.intersects(range3);\n // Undeclared exception!\n try { \n Range.Comparators.valueOf((String) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // Name is null\n //\n verifyException(\"java.lang.Enum\", e);\n }\n }",
"private boolean shouldProcessEvent(TimeSeriesEvent e) {\r\n return modCountOnLastRefresh < e.getSeriesModCount();\r\n }",
"@Test\n public void test55() throws Throwable {\n CyclicNumberAxis cyclicNumberAxis0 = new CyclicNumberAxis(10.0, 25000.0);\n CombinedRangeCategoryPlot combinedRangeCategoryPlot0 = new CombinedRangeCategoryPlot((ValueAxis) cyclicNumberAxis0);\n combinedRangeCategoryPlot0.configureRangeAxes();\n Rectangle2D.Double rectangle2D_Double0 = new Rectangle2D.Double((-1032.0), 10.0, 25000.0, 0.0);\n }",
"BasicEvents createBasicEvents();",
"@Test(expected = IllegalArgumentException.class)\n public void testAddMoveEventWithoutAddShape() {\n move1 = new MoveShape(r, 200.0, 200.0, 300.0, 300.0);\n testAnimation.addEvent(r, move1, 10, 50);\n }",
"public boolean isAvailable(Event event){\n\t\tfor(Event e : events){\n\t\t\tif(e.timeOverlap(event))\n\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\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 }",
"@Test\n public void test22() throws Throwable {\n CombinedRangeCategoryPlot combinedRangeCategoryPlot0 = new CombinedRangeCategoryPlot();\n CategoryAxis[] categoryAxisArray0 = new CategoryAxis[2];\n ExtendedCategoryAxis extendedCategoryAxis0 = new ExtendedCategoryAxis(\"Null 'marker' not permitted.\");\n categoryAxisArray0[0] = (CategoryAxis) extendedCategoryAxis0;\n CategoryAxis3D categoryAxis3D0 = new CategoryAxis3D();\n categoryAxisArray0[1] = (CategoryAxis) categoryAxis3D0;\n combinedRangeCategoryPlot0.setDomainAxes(categoryAxisArray0);\n }",
"public boolean checkDoubleBooking(LocalDateTime start, LocalDateTime end, ArrayList<String> eventIds){\n for (String id: eventIds){\n if (checkOverlappingTimes(getEvent(id).getStartTime(), getEvent(id).getEndTime(),\n start, end)){\n return false;\n }}\n return true;\n }",
"Axis (Timeline timeline) {\n\n// assigns a Timeline to the Axis\n this.timeline = timeline;\n\n// creates a common y value for all Elements of the Axis\n// also used by all Markers on this Axis\n y = (axes.size() + 1) * 120;\n\n// places and styles the Axis\n this.setText(timeline.name.toUpperCase());\n this.setLayoutY(y - 12);\n this.setStyle(stylesheet.toString());\n this.getStyleClass().add(\"marker\");\n\n// places and styles the persistentLabel\n persistentLabel = new Label(timeline.name.toUpperCase());\n persistentLabel.setLayoutY(y - 13);\n persistentLabel.setStyle(stylesheet.toString());\n persistentLabel.getStyleClass().add(\"marker\");\n persistentLabel.setStyle(\"-fx-text-fill: #cccccc\");\n persistentLabel.setLayoutX(20);\n persistentLabel.setVisible(false);\n\n// sets start as the startDate of the first Event\n start = timeline.events.peekFirst().startDate[2];\n\n// sets right click on the Label and persistentLabel to expand Timeline\n this.setOnMouseClicked(mouseEvent -> {\n if (mouseEvent.getButton() == MouseButton.SECONDARY)\n expandElement(timeline);\n });\n persistentLabel.setOnMouseClicked(mouseEvent -> {\n if (mouseEvent.getButton() == MouseButton.SECONDARY)\n expandElement(timeline);\n });\n }",
"public TickEventMap(long tickRoundingFactor)\n {\n this.tickRoundingFactor = tickRoundingFactor;\n }",
"public List refreshTicks(Graphics2D g2, AxisState state, Rectangle2D dataArea, RectangleEdge edge) {\n/* 1558 */ List result = null;\n/* 1559 */ if (RectangleEdge.isTopOrBottom(edge)) {\n/* 1560 */ result = refreshTicksHorizontal(g2, dataArea, edge);\n/* */ }\n/* 1562 */ else if (RectangleEdge.isLeftOrRight(edge)) {\n/* 1563 */ result = refreshTicksVertical(g2, dataArea, edge);\n/* */ } \n/* 1565 */ return result;\n/* */ }",
"@Override\n public boolean isRange() {\n return false;\n }",
"@Override\n public void add(T lowerBound, T upperBound, long frequency) {\n addBound(upperBound, frequency);\n }",
"@Test\n public void test20() throws Throwable {\n ExtendedCategoryAxis extendedCategoryAxis0 = new ExtendedCategoryAxis(\" twtGuHO\");\n CombinedDomainCategoryPlot combinedDomainCategoryPlot0 = new CombinedDomainCategoryPlot((CategoryAxis) extendedCategoryAxis0);\n Polygon polygon0 = new Polygon();\n DefaultKeyedValuesDataset defaultKeyedValuesDataset0 = new DefaultKeyedValuesDataset();\n List list0 = defaultKeyedValuesDataset0.getKeys();\n boolean boolean0 = combinedDomainCategoryPlot0.isRangeZoomable();\n DatasetChangeEvent datasetChangeEvent0 = new DatasetChangeEvent((Object) list0, (Dataset) defaultKeyedValuesDataset0);\n combinedDomainCategoryPlot0.datasetChanged(datasetChangeEvent0);\n RectangleInsets rectangleInsets0 = new RectangleInsets();\n combinedDomainCategoryPlot0.setAxisOffset(rectangleInsets0);\n }",
"void addToWhatsLeft(WhatsLeft whatsLeft, List<Event> eventsToAdd) throws Exception {\n for (Event p: eventsToAdd) {\n whatsLeft.addEvent(p);\n }\n }",
"@Test\n public void test80() throws Throwable {\n IntervalMarker intervalMarker0 = new IntervalMarker((-1458.19391523), 0.025);\n CombinedDomainCategoryPlot combinedDomainCategoryPlot0 = new CombinedDomainCategoryPlot();\n // Undeclared exception!\n try { \n combinedDomainCategoryPlot0.setDomainAxis((-498), (CategoryAxis) null, false);\n } catch(IllegalArgumentException e) {\n //\n // Requires index >= 0.\n //\n assertThrownBy(\"org.jfree.chart.util.AbstractObjectList\", e);\n }\n }",
"@Test\n public void test22() throws Throwable {\n ExtendedCategoryAxis extendedCategoryAxis0 = new ExtendedCategoryAxis(\" twtGuHO\");\n CombinedDomainCategoryPlot combinedDomainCategoryPlot0 = new CombinedDomainCategoryPlot((CategoryAxis) extendedCategoryAxis0);\n Polygon polygon0 = new Polygon();\n Rectangle rectangle0 = polygon0.getBounds();\n rectangle0.height = (-2538);\n AxisLocation axisLocation0 = combinedDomainCategoryPlot0.getDomainAxisLocation((-2538));\n boolean boolean0 = combinedDomainCategoryPlot0.isRangeZoomable();\n AxisLocation axisLocation1 = axisLocation0.getOpposite();\n combinedDomainCategoryPlot0.setDomainAxisLocation(3, axisLocation0, false);\n RectangleInsets rectangleInsets0 = new RectangleInsets();\n combinedDomainCategoryPlot0.setAxisOffset(rectangleInsets0);\n }",
"public void addEvent(BasicEvent event) {\n if ((event instanceof TypedEvent)) {\n TypedEvent e = (TypedEvent) event;\n if (useOnePolarityOnlyEnabled) {\n if (useOffPolarityOnlyEnabled) {\n if (e.type == 1) {\n return;\n }\n } else {\n if (e.type == 0) {\n return;\n }\n }\n }\n }\n\n // save location for computing velocityPPT\n// float oldx = location.x, oldy = location.y;\n\n float m = mixingFactor, m1 = 1 - m;\n\n float dt = event.timestamp - lastTimestamp; // this timestamp may be bogus if it goes backwards in time, we need to check it later\n\n // if useVelocity is enabled, first update the location using the measured estimate of velocityPPT.\n // this will give predictor characteristic to cluster because cluster will move ahead to the predicted location of\n // the present event\n if (useVelocity && dt > 0 && velocityFitter.valid) {\n location.x = location.x + predictiveVelocityFactor * dt * velocityPPT.x;\n location.y = location.y + predictiveVelocityFactor * dt * velocityPPT.y;\n }\n\n // compute new cluster location by mixing old location with event location by using\n // mixing factor\n\n location.x = (m1 * location.x + m * event.x);\n location.y = (m1 * location.y + m * event.y);\n\n // velocityPPT of cluster is updated here as follows\n // 1. instantaneous velocityPPT is computed from old and new cluster locations and dt\n // 2. new velocityPPT is computed by mixing old velocityPPT with instaneous new velocityPPT using velocityMixingFactor\n // Since an event may pull the cluster back in the opposite direction it is moving, this measure is likely to be quite noisy.\n // It would be better to use the saved cluster locations after each packet is processed to perform an online regression\n // over the history of the cluster locations. Therefore we do not use the following anymore.\n// if(useVelocity && dt>0){\n// // update velocityPPT vector using old and new position only if valid dt\n// // and update it by the mixing factors\n// float oldvelx=velocityPPT.x;\n// float oldvely=velocityPPT.y;\n//\n// float velx=(location.x-oldx)/dt; // instantaneous velocityPPT for this event in pixels/tick (pixels/us)\n// float vely=(location.y-oldy)/dt;\n//\n// float vm1=1-velocityMixingFactor;\n// velocityPPT.x=vm1*oldvelx+velocityMixingFactor*velx;\n// velocityPPT.y=vm1*oldvely+velocityMixingFactor*vely;\n// velocityPPS.x=velocityPPT.x*VELPPS_SCALING;\n// velocityPPS.y=velocityPPT.y*VELPPS_SCALING;\n// }\n\n int prevLastTimestamp = lastTimestamp;\n lastTimestamp = event.timestamp;\n numEvents++;\n instantaneousISI = lastTimestamp - prevLastTimestamp;\n if (instantaneousISI <= 0) {\n instantaneousISI = 1;\n }\n avgISI = m1 * avgISI + m * instantaneousISI;\n instantaneousEventRate = 1f / instantaneousISI;\n avgEventRate = m1 * avgEventRate + m * instantaneousEventRate;\n\n averageEventDistance = m1 * averageEventDistance + m * distanceToLastEvent;\n averageEventXDistance = m1 * averageEventXDistance + m * xDistanceToLastEvent;\n averageEventYDistance = m1 * averageEventYDistance + m * yDistanceToLastEvent;\n \n // if scaling is enabled, now scale the cluster size\n scale(event);\n\n }",
"@Override\n public long getSupportedEventTypes() {\n return EventType.GO_TO;\n }",
"private boolean overlappingTaskAndEvent(BpmnShape s1, BpmnShape s2) {\n\t\t\n\t\tdouble firstHeight = s1.getBounds().getHeight() / 2;\n\t\tdouble firstWidth = s1.getBounds().getWidth() / 2;\n\t\tdouble firstX = s1.getBounds().getX() + firstWidth;\n\t\tdouble firstY = s1.getBounds().getY() + firstHeight;\n\n\t\tdouble secondWidth = s2.getBounds().getWidth() / 2;\n\t\tdouble secondHeight = s2.getBounds().getHeight() / 2;\n\t\tdouble secondX = s2.getBounds().getX();\n\t\tdouble secondY = s2.getBounds().getY() + secondHeight;\n\t\t\n\t\tif (firstX > secondX && firstY > secondY){\n\t\t\tif (firstX - firstWidth < secondX + secondWidth && firstY - firstHeight < secondY + secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX > secondX && firstY < secondY){\n\t\t\tif (firstX - firstWidth < secondX + secondWidth && firstY + firstHeight > secondY - secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY > secondY){\n\t\t\tif (firstX + firstWidth > secondX - secondWidth && firstY - firstHeight < secondY + secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY < secondY){\n\t\t\tif (firstX + firstWidth > secondX - secondWidth && firstY + firstHeight > secondY - secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX == secondX && firstY == secondY)\n\t\t\t\treturn true;\n\t\t\n\t\tif (firstX == secondX && firstY > secondY){\n\t\t\tif (firstY - firstHeight < secondY + secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX > secondX && firstY == secondY){\n\t\t\tif (firstX - firstWidth < secondX + secondWidth)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX == secondX && firstY < secondY){\n\t\t\tif (firstY + firstHeight > secondY - secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY == secondY){\n\t\t\tif (firstX + firstWidth > secondX - secondWidth)\n\t\t\t\treturn true;\n\t\t\telse \n\t\t\t\treturn false;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tprotected void onEventComming(EventCenter eventCenter) {\n\t}",
"public void test800324() {\n TaskSeries s1 = new TaskSeries(\"S1\");\n s1.add(new Task(\"Task 1\", new SimpleTimePeriod(new Date(), new Date())));\n s1.add(new Task(\"Task 2\", new SimpleTimePeriod(new Date(), new Date())));\n s1.add(new Task(\"Task 3\", new SimpleTimePeriod(new Date(), new Date())));\n TaskSeriesCollection tsc = new TaskSeriesCollection();\n tsc.add(s1);\n try {\n tsc.getStartValue(0, 3);\n assertTrue(false);\n } catch (IndexOutOfBoundsException e) {\n }\n try {\n tsc.getEndValue(0, 3);\n assertTrue(false);\n } catch (IndexOutOfBoundsException e) {\n }\n try {\n tsc.getSubIntervalCount(0, 3);\n assertTrue(false);\n } catch (IndexOutOfBoundsException e) {\n }\n }",
"boolean impliesIgnoreEventTypeMask( WrapperEventPermission p2 )\n {\n if ( getName().equals( p2.getName() ) )\n {\n return true;\n }\n \n if ( p2.getName().endsWith( \"*\" ) )\n {\n if ( getName().startsWith( p2.getName().substring( 0, p2.getName().length() - 1 ) ) )\n {\n return true;\n }\n }\n return false;\n }",
"@Test\n public void test32() throws Throwable {\n CyclicNumberAxis cyclicNumberAxis0 = new CyclicNumberAxis((-1505.20649), \"Category_Plot\");\n CombinedRangeCategoryPlot combinedRangeCategoryPlot0 = new CombinedRangeCategoryPlot((ValueAxis) cyclicNumberAxis0);\n SystemColor systemColor0 = SystemColor.text;\n BasicStroke basicStroke0 = (BasicStroke)CategoryPlot.DEFAULT_GRIDLINE_STROKE;\n ValueMarker valueMarker0 = new ValueMarker(4.0, (Paint) systemColor0, (Stroke) basicStroke0);\n MarkerChangeEvent markerChangeEvent0 = new MarkerChangeEvent((Marker) valueMarker0);\n combinedRangeCategoryPlot0.markerChanged(markerChangeEvent0);\n combinedRangeCategoryPlot0.setAnchorValue(1401.824847306, false);\n CategoryAxis categoryAxis0 = new CategoryAxis(\"Category_Plot\");\n combinedRangeCategoryPlot0.setDomainAxis(categoryAxis0);\n // Undeclared exception!\n try { \n combinedRangeCategoryPlot0.setDataset((-1030), (CategoryDataset) null);\n } catch(IllegalArgumentException e) {\n //\n // Requires index >= 0.\n //\n assertThrownBy(\"org.jfree.chart.util.AbstractObjectList\", e);\n }\n }",
"private static long addLchOverlap(Obs obs, long start, long end) {\n return LttsServicesClient.getInstance().getShutterOverlap(obs, new Interval(start, end));\n }",
"@Test\n public void test53() throws Throwable {\n ExtendedCategoryAxis extendedCategoryAxis0 = new ExtendedCategoryAxis(\"\");\n CombinedDomainCategoryPlot combinedDomainCategoryPlot0 = new CombinedDomainCategoryPlot((CategoryAxis) extendedCategoryAxis0);\n GanttRenderer ganttRenderer0 = new GanttRenderer();\n combinedDomainCategoryPlot0.setRenderer((CategoryItemRenderer) ganttRenderer0, true);\n Layer layer0 = Layer.FOREGROUND;\n Collection collection0 = combinedDomainCategoryPlot0.getRangeMarkers(layer0);\n LogAxis logAxis0 = new LogAxis(\"\");\n CombinedRangeXYPlot combinedRangeXYPlot0 = new CombinedRangeXYPlot((ValueAxis) logAxis0);\n AxisLocation axisLocation0 = combinedRangeXYPlot0.getRangeAxisLocation(0);\n AxisLocation axisLocation1 = AxisLocation.getOpposite(axisLocation0);\n combinedDomainCategoryPlot0.setDomainAxisLocation(244, axisLocation1);\n }",
"private void addOrReplaceDataSeries() {\n int chartMode;\n try {\n m_pLock.lock();\n chartMode = mChartMode;\n } finally {\n m_pLock.unlock();\n }\n\n if (m_pLineChart.getData().size() > 0) {\n m_pLineChart.getData().clear();\n }\n\n switch (chartMode) {\n case CHART_MODE_2_SECONDS:\n m_pLineChart.getData().add(m_pDataSeries1_2SEC);\n m_pLineChart.getData().add(m_pDataSeries2_2SEC);\n m_pLineChart.getData().add(m_pDataSeries3_2SEC);\n break;\n case CHART_MODE_10_SECONDS:\n m_pLineChart.getData().add(m_pDataSeries1_10SEC);\n m_pLineChart.getData().add(m_pDataSeries2_10SEC);\n m_pLineChart.getData().add(m_pDataSeries3_10SEC);\n break;\n case CHART_MODE_30_SECONDS:\n m_pLineChart.getData().add(m_pDataSeries1_30SEC);\n m_pLineChart.getData().add(m_pDataSeries2_30SEC);\n m_pLineChart.getData().add(m_pDataSeries3_30SEC);\n break;\n case CHART_MODE_5_MINUTES:\n m_pLineChart.getData().add(m_pDataSeries1_5MIN);\n m_pLineChart.getData().add(m_pDataSeries2_5MIN);\n m_pLineChart.getData().add(m_pDataSeries3_5MIN);\n break;\n default:\n break;\n }\n\n m_pXAxis.setDisable(true);\n int chartRange;\n int tickUnit;\n ObservableList<XYChart.Data<Number, Number>> observableList1, observableList2, observableList3;\n switch (mChartMode) {\n case CHART_MODE_2_SECONDS:\n observableList1 = m_pDataSerieObservableList1_2SEC;\n observableList2 = m_pDataSerieObservableList2_2SEC;\n observableList3 = m_pDataSerieObservableList3_2SEC;\n chartRange = X_AXIS_RANGE_2_SECOND_MODE;\n tickUnit = X_AXIS_TICK_2_SECOND_MODE;\n break;\n case CHART_MODE_10_SECONDS:\n observableList1 = m_pDataSerieObservableList1_10SEC;\n observableList2 = m_pDataSerieObservableList2_10SEC;\n observableList3 = m_pDataSerieObservableList3_10SEC;\n chartRange = X_AXIS_RANGE_10_SECOND_MODE;\n tickUnit = X_AXIS_TICK_10_SECOND_MODE;\n break;\n case CHART_MODE_30_SECONDS:\n observableList1 = m_pDataSerieObservableList1_30SEC;\n observableList2 = m_pDataSerieObservableList2_30SEC;\n observableList3 = m_pDataSerieObservableList3_30SEC;\n chartRange = X_AXIS_RANGE_30_SECOND_MODE;\n tickUnit = X_AXIS_TICK_30_SECOND_MODE;\n break;\n case CHART_MODE_5_MINUTES:\n observableList1 = m_pDataSerieObservableList1_5MIN;\n observableList2 = m_pDataSerieObservableList2_5MIN;\n observableList3 = m_pDataSerieObservableList3_5MIN;\n chartRange = X_AXIS_RANGE_5_MINUTE_MODE;\n tickUnit = X_AXIS_TICK_5_MINUTE_MODE;\n break;\n default:\n observableList1 = m_pDataSerieObservableList1_2SEC;\n observableList2 = m_pDataSerieObservableList2_2SEC;\n observableList3 = m_pDataSerieObservableList3_2SEC;\n chartRange = X_AXIS_RANGE_2_SECOND_MODE;\n tickUnit = X_AXIS_TICK_2_SECOND_MODE;\n break;\n }\n\n if (observableList1.isEmpty() == false && observableList2.isEmpty() == false && observableList3.isEmpty() == false) {\n double maxValue = Math.max(Math.max(observableList1.get(observableList1.size() - 1).getXValue().doubleValue(),\n observableList2.get(observableList1.size() - 1).getXValue().doubleValue()),\n observableList3.get(observableList1.size() - 1).getXValue().doubleValue());\n double newLowerBound = maxValue - chartRange;\n double newUpperBound = maxValue;\n m_pXAxis.setLowerBound(newLowerBound);\n m_pXAxis.setUpperBound(newUpperBound);\n m_pXAxis.setTickUnit(tickUnit);\n m_pXAxis.setDisable(false);\n }\n \n // Update if there is some data series which is not to be plotted\n boolean toPlotDataSeries1 = mToPlotDataSeries1;\n boolean toPlotDataSeries2 = mToPlotDataSeries2;\n boolean toPlotDataSeries3 = mToPlotDataSeries3;\n mToPlotDataSeries1 = true;\n mToPlotDataSeries2 = true;\n mToPlotDataSeries3 = true; \n switchDataSeriesStatus(1, toPlotDataSeries1);\n switchDataSeriesStatus(2, toPlotDataSeries2);\n switchDataSeriesStatus(3, toPlotDataSeries3);\n \n\n }",
"@Test\n public void test76() throws Throwable {\n SimpleTimeZone simpleTimeZone0 = new SimpleTimeZone((-614), \"\", 0, 0, 0, (-1), 0, 0, 3473, (-1));\n DateAxis dateAxis0 = new DateAxis(\"\", (TimeZone) simpleTimeZone0);\n CombinedRangeCategoryPlot combinedRangeCategoryPlot0 = new CombinedRangeCategoryPlot((ValueAxis) dateAxis0);\n DatasetRenderingOrder datasetRenderingOrder0 = combinedRangeCategoryPlot0.getDatasetRenderingOrder();\n CombinedRangeXYPlot combinedRangeXYPlot0 = new CombinedRangeXYPlot((ValueAxis) dateAxis0);\n BasicStroke basicStroke0 = (BasicStroke)combinedRangeXYPlot0.getDomainZeroBaselineStroke();\n PipedInputStream pipedInputStream0 = new PipedInputStream();\n PipedOutputStream pipedOutputStream0 = new PipedOutputStream(pipedInputStream0);\n DataOutputStream dataOutputStream0 = new DataOutputStream((OutputStream) pipedOutputStream0);\n ObjectOutputStream objectOutputStream0 = new ObjectOutputStream((OutputStream) dataOutputStream0);\n SerialUtilities.writeStroke(basicStroke0, objectOutputStream0);\n SystemColor systemColor0 = SystemColor.text;\n LookupPaintScale lookupPaintScale0 = new LookupPaintScale((double) 0, 1955.7194307587054, (Paint) systemColor0);\n PaintScaleLegend paintScaleLegend0 = new PaintScaleLegend((PaintScale) lookupPaintScale0, (ValueAxis) dateAxis0);\n AxisLocation axisLocation0 = paintScaleLegend0.getAxisLocation();\n combinedRangeCategoryPlot0.setDomainAxisLocation(334, axisLocation0);\n }",
"@Test\n public void dispatchToBaseTypes() {\n BaseEventBus eventBus = new SynchronousEventBus(LOG);\n\n final List<Object> objectHandlerReceived = new ArrayList<>();\n Object objectHandler = new Object() {\n @Subscriber\n public void onEvent(Object event) {\n objectHandlerReceived.add(event);\n }\n };\n\n final List<Comparable<?>> comparableHandlerReceived = new ArrayList<>();\n Object comparableHandler = new Object() {\n @Subscriber\n public void onEvent(Comparable<?> event) {\n comparableHandlerReceived.add(event);\n }\n };\n\n final List<CharSequence> charSequenceHandlerReceived = new ArrayList<>();\n Object charSequenceHandler = new Object() {\n @Subscriber\n public void onEvent(CharSequence event) {\n charSequenceHandlerReceived.add(event);\n }\n };\n\n final List<CharSequence> stringHandlerReceived = new ArrayList<>();\n Object stringHandler = new Object() {\n @Subscriber\n public void onEvent(String event) {\n stringHandlerReceived.add(event);\n }\n };\n eventBus.register(objectHandler);\n eventBus.register(charSequenceHandler);\n eventBus.register(stringHandler);\n eventBus.register(comparableHandler);\n\n eventBus.post(\"event 1\");\n assertThat(objectHandlerReceived, is(asList(\"event 1\")));\n assertThat(comparableHandlerReceived, is(asList(\"event 1\")));\n assertThat(charSequenceHandlerReceived, is(asList(\"event 1\")));\n assertThat(stringHandlerReceived, is(asList(\"event 1\")));\n\n eventBus.post(Integer.MAX_VALUE);\n assertThat(objectHandlerReceived, is(asList(\"event 1\", Integer.MAX_VALUE)));\n assertThat(comparableHandlerReceived, is(asList(\"event 1\", Integer.MAX_VALUE)));\n assertThat(charSequenceHandlerReceived, is(asList(\"event 1\")));\n assertThat(stringHandlerReceived, is(asList(\"event 1\")));\n }",
"@Test\n public void test75() throws Throwable {\n CombinedRangeCategoryPlot combinedRangeCategoryPlot0 = new CombinedRangeCategoryPlot();\n DatasetRenderingOrder datasetRenderingOrder0 = combinedRangeCategoryPlot0.getDatasetRenderingOrder();\n boolean boolean0 = combinedRangeCategoryPlot0.isRangeCrosshairLockedOnData();\n Line2D.Double line2D_Double0 = new Line2D.Double(5.0E9, 5.0E9, 5.0E9, 5.0E9);\n combinedRangeCategoryPlot0.clearRangeAxes();\n boolean boolean1 = combinedRangeCategoryPlot0.isDomainGridlinesVisible();\n combinedRangeCategoryPlot0.setDomainAxis(1, (CategoryAxis) null, false);\n PlotOrientation plotOrientation0 = PlotOrientation.VERTICAL;\n combinedRangeCategoryPlot0.setOrientation(plotOrientation0);\n CategoryItemRenderer categoryItemRenderer0 = combinedRangeCategoryPlot0.getRenderer();\n combinedRangeCategoryPlot0.clearAnnotations();\n StyleConstants styleConstants0 = (StyleConstants)AttributeSet.NameAttribute;\n HistogramDataset histogramDataset0 = new HistogramDataset();\n int[] intArray0 = new int[7];\n intArray0[0] = 1;\n intArray0[1] = 1;\n intArray0[2] = 1;\n intArray0[3] = 1;\n intArray0[4] = 1;\n intArray0[5] = 1;\n intArray0[6] = 1;\n SubSeriesDataset subSeriesDataset0 = new SubSeriesDataset((SeriesDataset) histogramDataset0, intArray0);\n DatasetChangeEvent datasetChangeEvent0 = new DatasetChangeEvent((Object) styleConstants0, (Dataset) subSeriesDataset0);\n combinedRangeCategoryPlot0.datasetChanged(datasetChangeEvent0);\n }"
]
| [
"0.5765251",
"0.5667518",
"0.5650625",
"0.5628734",
"0.5593186",
"0.54442877",
"0.54298514",
"0.5394484",
"0.5348286",
"0.5322565",
"0.5274203",
"0.52548563",
"0.5234903",
"0.5233317",
"0.5223315",
"0.5201555",
"0.5199176",
"0.51909363",
"0.51838875",
"0.5168827",
"0.5162558",
"0.5148729",
"0.5129797",
"0.5109244",
"0.5104741",
"0.5084881",
"0.5072823",
"0.5066977",
"0.50650424",
"0.50534326",
"0.5053007",
"0.50481117",
"0.5031144",
"0.50152504",
"0.5001463",
"0.49890915",
"0.49859703",
"0.4983329",
"0.49831367",
"0.49819738",
"0.49701288",
"0.49674612",
"0.49609423",
"0.49580294",
"0.49539343",
"0.49457496",
"0.49402505",
"0.49398634",
"0.49280816",
"0.49227324",
"0.49221462",
"0.4919114",
"0.49141747",
"0.48983312",
"0.48910546",
"0.48865768",
"0.48849937",
"0.4882365",
"0.48814353",
"0.48794356",
"0.48676687",
"0.48637667",
"0.48546267",
"0.48532793",
"0.48483664",
"0.48441812",
"0.48282695",
"0.48264596",
"0.4822245",
"0.4821663",
"0.4821266",
"0.4810714",
"0.48105764",
"0.48105007",
"0.4809847",
"0.48058495",
"0.48027533",
"0.4801558",
"0.48002073",
"0.47922593",
"0.47890085",
"0.47801533",
"0.47787163",
"0.4776808",
"0.4770105",
"0.47692007",
"0.4765591",
"0.47640428",
"0.47637206",
"0.47621563",
"0.47596857",
"0.47561318",
"0.4752984",
"0.474813",
"0.47446087",
"0.47371796",
"0.47354513",
"0.47327203",
"0.47302276",
"0.4729297"
]
| 0.52210873 | 15 |
_________________________ Overlapping Different Changes Test _______________________________. | @Test
public void testDifferentChangeTypeOverlap() {
testAnimation.addShape(c, 1, 100);
move1 = new MoveShape(c, 500.0, 100.0, 300.0, 300.0);
size1 = new ScaleShape(c, 120.0, 60.0, 85.0, 10.67);
colorChange1 = new ChangeColor(c,
0, 0, 1,
0, 1, 0);
testAnimation.addEvent(c, move1, 20, 45);
testAnimation.addEvent(c, size1, 28, 88);
testAnimation.addEvent(c, colorChange1, 36, 95);
assertEquals("Shapes:\n"
+ "Name: C\n"
+ "Type: ellipse\n"
+ "Center: (500.0,100.0), X radius: 60.0, Y radius: 30.0, Color: (0,0,1)\n"
+ "Appears at t=1\n"
+ "Disappears at t=100\n"
+ "\n"
+ "C moves from (500.0,100.0) to (300.0,300.0) from time t=20 to t=45\n"
+ "C changes height from 60.0 to 10.67 and changes width from 120.0 to 85.0"
+ " from time t=28 to t=88\nC changes color from (0,0,1) to (0,1,0) from " +
"time t=36 "
+ "to t=95\n",
testAnimation.toString());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test(timeout = 4000)\n public void test18() throws Throwable {\n Range range0 = Range.of((-1259L), 255L);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n range0.toString(range_CoordinateSystem0);\n Range range1 = Range.of((-1259L));\n range1.getEnd();\n range1.getEnd();\n Range range2 = range0.intersection(range1);\n List<Range> list0 = range2.split(255L);\n range2.complementFrom(list0);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.SPACE_BASED;\n Range range3 = Range.of(range_CoordinateSystem1, (-1259L), 0L);\n range3.endsBefore(range0);\n LinkedList<Range> linkedList0 = new LinkedList<Range>();\n linkedList0.add(range3);\n List<Range> list1 = range2.complementFrom(list0);\n Range range4 = Range.of(1207L);\n assertFalse(range4.isEmpty());\n \n boolean boolean0 = range2.isSubRangeOf(range3);\n assertTrue(boolean0);\n \n Range.CoordinateSystem range_CoordinateSystem2 = Range.CoordinateSystem.RESIDUE_BASED;\n Consumer<Object> consumer0 = (Consumer<Object>) mock(Consumer.class, new ViolatedAssumptionAnswer());\n range2.forEach(consumer0);\n Range.CoordinateSystem range_CoordinateSystem3 = Range.CoordinateSystem.ZERO_BASED;\n range_CoordinateSystem3.toString();\n range0.equals(list1);\n assertSame(range2, range1);\n assertEquals(0, list1.size());\n \n range_CoordinateSystem1.toString();\n long long0 = range0.getEnd();\n assertEquals(255L, long0);\n }",
"@Test\n\tpublic void rangeOverlapTest() {\n\n\t\tsetup();\n\t\tSystem.out.println(\"overlaptest\");\n\t\t// dataset 1\n\t\tZipCodeRange z1 = new ZipCodeRange(new ZipCode(94133), new ZipCode(94133));\n\t\tZipCodeRange z2 = new ZipCodeRange(new ZipCode(94200), new ZipCode(94299));\n\t\tZipCodeRange z3 = new ZipCodeRange(new ZipCode(94226), new ZipCode(94399));\n\n\t\t// Testing\n\t\tZipRangeControl zrc = new ZipRangeControl();\n\t\tzrc.processNewRange(z1);\n\t\tzrc.processNewRange(z2);\n\t\tzrc.processNewRange(z3);\n\n\t\tZipCodeRange z5 = new ZipCodeRange(new ZipCode(94133), new ZipCode(94133));\n\t\tZipCodeRange z4 = new ZipCodeRange(new ZipCode(94200), new ZipCode(94399));\n\t\trequiredList.add(z5);\n\t\trequiredList.add(z4);\n\n\t\tfor (ZipCodeRange z : zrc.getFinalZipRanges()) {\n\t\t\tSystem.out.println(z.lower.zipcode + \",\" + z.upper.zipcode);\n\t\t}\n\t\tfor (ZipCodeRange z : requiredList) {\n\t\t\tSystem.out.println(z.lower.zipcode + \",\" + z.upper.zipcode);\n\t\t}\n\n\t\tAssert.assertEquals(\"Overlap test Size check passed \", requiredList.size(), zrc.getFinalZipRanges().size());\n\n\t\tZipCodeRange[] ziparray = new ZipCodeRange[requiredList.size()];\n\t\tList<ZipCodeRange> zlist = zrc.getFinalZipRanges();\n\n\t\tfor (int i = 0; i < requiredList.size(); i++) {\n\t\t\tAssert.assertThat(\"Lower Limit match failed at entry\" + i, requiredList.get(i).lower.zipcode,\n\t\t\t\t\torg.hamcrest.CoreMatchers.equalTo(zlist.get(i).lower.zipcode));\n\t\t\tAssert.assertThat(\"Upper Limit match failed at entry\" + i, requiredList.get(i).upper.zipcode,\n\t\t\t\t\torg.hamcrest.CoreMatchers.equalTo(zlist.get(i).upper.zipcode));\n\t\t}\n\n\t\tclimax();\n\n\t}",
"@Test(timeout = 4000)\n public void test31() throws Throwable {\n Range range0 = Range.of((-1259L), 255L);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n String string0 = range0.toString(range_CoordinateSystem0);\n assertEquals(\"[ -1259 .. 256 ]/SB\", string0);\n \n Range range1 = Range.of((-1259L));\n range1.getEnd();\n long long0 = range1.getEnd();\n assertEquals((-1259L), long0);\n \n Range range2 = Range.of((-1259L), 255L);\n List<Range> list0 = range2.split(255L);\n List<Range> list1 = range2.complementFrom(list0);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.SPACE_BASED;\n Range range3 = Range.of(range_CoordinateSystem1, (-1259L), 0L);\n range3.endsBefore(range0);\n Consumer<Object> consumer0 = (Consumer<Object>) mock(Consumer.class, new ViolatedAssumptionAnswer());\n range0.forEach(consumer0);\n range2.complementFrom(list1);\n assertFalse(list0.contains(range0));\n assertEquals(0, list1.size());\n assertFalse(list0.isEmpty());\n \n Range range4 = Range.ofLength(0L);\n Range range5 = range4.intersection(range0);\n long long1 = range5.getEnd();\n assertEquals((-1L), long1);\n \n range0.intersects(range4);\n range3.equals(\"[ -1259 .. 256 ]/SB\");\n Range.of(333L);\n List<Range> list2 = range2.complement(range3);\n assertTrue(list2.contains(range0));\n }",
"@Test\n public void testDiff() throws Exception {\n String newVersionJarPath = \"data/sample/jar/change4.jar\";\n String oldVersionJarPath = \"data/sample/jar/change3.jar\";\n String changePath = \"data/sample/changes_change4_change3.txt\";\n\n// RelationInfo relationInfoForChangedPart = new RelationInfo(newVersionCodePath, oldVersionCodePath, changePath, false);\n// RelationInfo relationInfoForChangedPart = new RelationInfo(newVersionJarPath, oldVersionJarPath, changePath, false);\n// CallRelationGraph callGraphForChangedPart = new CallRelationGraph(relationInfoForChangedPart);\n//\n// double thresholdForInitialRegion = 0.35;\n// RelationInfo oldRelationInfo = new RelationInfo(newVersionJarPath,false);\n// oldRelationInfo.setPruning(thresholdForInitialRegion);\n// RelationInfo newRelationInfo = new RelationInfo(oldVersionJarPath,false);\n// newRelationInfo.setPruning(thresholdForInitialRegion);\n//\n// CallRelationGraph oldCallGraph = new CallRelationGraph(oldRelationInfo);\n// CallRelationGraph newCallGraph = new CallRelationGraph(newRelationInfo);\n//\n// ChangedArtifacts changedArtifacts = new ChangedArtifacts();\n// changedArtifacts.parse(changePath);\n//\n// InitialRegionFetcher fetcher = new InitialRegionFetcher(changedArtifacts, newCallGraph, oldCallGraph);\n//\n// ExportInitialRegion exporter = new ExportInitialRegion(fetcher.getChangeRegion());\n\n }",
"public boolean willOverlap() {\n/* 208 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"@Test\n public void findOverlap() {\n\n int[] A = new int[] {1,3,5,7,10};\n int[] B = new int[] {-2,2,5,6,7,11};\n\n List<Integer> overlap = new ArrayList<Integer>();\n overlap.add(5);\n overlap.add(7);\n\n Assert.assertEquals(overlap,Computation.findOverlap(A,B));\n\n }",
"public void testViewDifferences() throws Exception {\n System.out.print(\".. Testing view differences ..\");\n String filesystem = \"VSS \" + workingDirectory + File.separator + \"Work\";\n Node filesystemNode = new Node(new ExplorerOperator().repositoryTab().getRootNode(), filesystem);\n Node A_FileNode = new Node( filesystemNode, \"A_File [Locally Modified] (\" + userName + \")\");\n new Action(VERSIONING_MENU + \"|\" + DIFF, DIFF).perform(A_FileNode);\n TopComponentOperator editor = new TopComponentOperator(new EditorWindowOperator(), \"Diff: A_File.java\");\n JEditorPaneOperator headRevision = new JEditorPaneOperator(editor, 0);\n JEditorPaneOperator workingRevision = new JEditorPaneOperator(editor, 1);\n String headRevisionContents = \"/** This is testing file.\\n */\\n\\n public class Testing_File {\\n\\n }\\n\";\n String workingRevisionContents = \"/** This is testing A_File.java file.\\n */\\n\\n public class Testing_File {\\n int i;\\n }\\n\";\n if (!headRevisionContents.equals(headRevision.getText()) | !workingRevisionContents.equals(workingRevision.getText()))\n captureScreen(\"Error: Incorrect diff contents.\");\n StyledDocument headRevisionDocument = (StyledDocument) headRevision.getDocument();\n StyledDocument workingRevisionDocument = (StyledDocument) workingRevision.getDocument();\n Color headRevisionLine = (Color) headRevisionDocument.getLogicalStyle(1).getAttribute(StyleConstants.ColorConstants.Background);\n Color workingRevisionLine = (Color) workingRevisionDocument.getLogicalStyle(1).getAttribute(StyleConstants.ColorConstants.Background);\n if (!headRevisionLine.equals(MODIFIED_COLOR) | !workingRevisionLine.equals(MODIFIED_COLOR))\n captureScreen(\"Error: Incorrect color of modified line.\");\n int thirdLineHeadOffset = 30;\n int thirdLineWorkingOffset = 42;\n headRevisionLine = (Color) headRevisionDocument.getLogicalStyle(thirdLineHeadOffset).getAttribute(StyleConstants.ColorConstants.Background);\n Style lineStyle = workingRevisionDocument.getLogicalStyle(thirdLineWorkingOffset);\n if (!headRevisionLine.equals(REMOVED_COLOR) | (lineStyle != null))\n captureScreen(\"Error: Incorrect color of removed line.\");\n int fifthLineHeadOffset = 60;\n int fifthLineWorkingOffset = 72;\n lineStyle = headRevisionDocument.getLogicalStyle(fifthLineHeadOffset);\n workingRevisionLine = (Color) workingRevisionDocument.getLogicalStyle(fifthLineWorkingOffset).getAttribute(StyleConstants.ColorConstants.Background);\n if ((lineStyle != null) | !workingRevisionLine.equals(NEW_COLOR))\n captureScreen(\"Error: Incorrect color of new line.\");\n System.out.println(\". done !\");\n }",
"@Test(timeout = 4000)\n public void test42() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, (-2147483648L), 1146L);\n long long0 = range0.getBegin();\n assertEquals((-2147483648L), long0);\n \n Range range1 = Range.of(1146L);\n boolean boolean0 = range1.endsBefore(range0);\n Consumer<Object> consumer0 = (Consumer<Object>) mock(Consumer.class, new ViolatedAssumptionAnswer());\n range1.forEach(consumer0);\n LinkedList<Range> linkedList0 = new LinkedList<Range>();\n List<Range> list0 = range1.complementFrom(linkedList0);\n range0.complementFrom(list0);\n Range range2 = Range.ofLength(1146L);\n Range range3 = range2.intersection(range1);\n long long1 = range1.getEnd();\n assertEquals(1146L, long1);\n \n boolean boolean1 = range0.intersects(range2);\n boolean boolean2 = range1.equals(range2);\n assertFalse(boolean2 == boolean1);\n \n range0.getEnd();\n Range.of(2641L);\n List<Range> list1 = range0.complement(range2);\n assertEquals(1, list1.size());\n \n boolean boolean3 = range3.startsBefore(range1);\n assertTrue(boolean3 == boolean0);\n assertTrue(range3.isEmpty());\n assertFalse(boolean3);\n }",
"@Test\n\tpublic void testCheckConflictOverlappingTimes() {\n\t\tActivity a1 = new Course(\"CSC216\", \"Programming Concepts - Java\", \"001\", 4, \"sesmith5\", 12, \"MW\", 1330, 1445);\n\t\tActivity a2 = new Course(\"CSC226\", \"Discrete Math\", \"001\", 3, \"sesmith5\", 12, \"MW\", 1445, 1545);\n\t\ttry {\n\t\t a1.checkConflict(a2);\n\t\t fail(); //ConflictException should have been thrown, but was not.\n\t\t } catch (ConflictException e) {\n\t\t //Check that the internal state didn't change during method call.\n\t\t assertEquals(\"MW 1:30PM-2:45PM\", a1.getMeetingString());\n\t\t assertEquals(\"MW 2:45PM-3:45PM\", a2.getMeetingString());\n\t\t }\n\t}",
"@Test\n public void testStartAndEndDateChange() throws Exception {\n EventData deltaEvent = prepareDeltaEvent(createdEvent);\n Calendar date = Calendar.getInstance();\n date.setTimeInMillis(date.getTimeInMillis() + TimeUnit.HOURS.toMillis(2));\n deltaEvent.setStartDate(DateTimeUtil.getDateTime(date));\n date.setTimeInMillis(date.getTimeInMillis() + TimeUnit.HOURS.toMillis(2));\n deltaEvent.setEndDate(DateTimeUtil.getDateTime(date));\n\n updateEventAsOrganizer(deltaEvent);\n\n /*\n * Check that dates has been updated\n */\n AnalyzeResponse analyzeResponse = receiveUpdateAsAttendee(PartStat.NEEDS_ACTION, CustomConsumers.ACTIONS);\n AnalysisChange change = assertSingleChange(analyzeResponse);\n assertSingleDescription(change, \"The appointment was rescheduled.\");\n }",
"public void test2() {\n //$NON-NLS-1$\n deployBundles(\"test2\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }",
"@Test\n\tpublic void testSameLibDiffLocs() \n\t{\n\t\tString id = \"diffHomeLoc\";\n\t\tassertLCVol1NotLopped(id);\n\t\tassertLCVol2NotLopped(id);\n\t\tassertNoLoppedLC(id);\n\t}",
"@Test\r\n public void testReflexivityOverlappingTimePeriods(){\n DateTime startAvailability1 = new DateTime(2021, 7, 9, 10, 30);\r\n DateTime endAvailability1 = new DateTime(2021, 7, 9, 11, 30);\r\n DateTime startAvailability2 = new DateTime(2021, 7, 9, 11, 0);\r\n DateTime endAvailability2 = new DateTime(2021, 7, 9, 12, 0);\r\n Availability availability1 = new Availability(new HashSet<>(Arrays.asList(\"online\", \"in-person\")), startAvailability1, endAvailability1);\r\n Availability availability2 = new Availability(new HashSet<>(Arrays.asList(\"online\", \"in-person\")), startAvailability2, endAvailability2);\r\n assertTrue(availability1.overlapsWithTimePeriod(availability2));\r\n assertTrue(availability2.overlapsWithTimePeriod(availability1));\r\n }",
"@Test(timeout = 4000)\n public void test36() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, (-2147483648L), 1146L);\n long long0 = range0.getBegin();\n assertEquals((-2147483648L), long0);\n \n Range range1 = Range.of(1146L);\n range1.endsBefore(range0);\n Consumer<Object> consumer0 = (Consumer<Object>) mock(Consumer.class, new ViolatedAssumptionAnswer());\n range1.forEach(consumer0);\n LinkedList<Range> linkedList0 = new LinkedList<Range>();\n List<Range> list0 = range1.complementFrom(linkedList0);\n range0.complementFrom(list0);\n Range range2 = Range.ofLength(1146L);\n Range range3 = range2.intersection(range1);\n assertTrue(range3.isEmpty());\n \n long long1 = range1.getEnd();\n assertEquals(1146L, long1);\n \n boolean boolean0 = range0.intersects(range2);\n assertTrue(boolean0);\n \n range1.equals(range2);\n Range.of(2641L);\n List<Range> list1 = range0.complement(range2);\n assertEquals(1, list1.size());\n }",
"@Test(expected = IllegalArgumentException.class)\n public void testCantMoveSameShapeInOverlappingTime() {\n model1.addShape(Rectangle.createRectangle(\"R\", new Point.Double(500, 200),\n new Color(0, 0, 0), 0, 10, 10, 10));\n model1.addAction(new MoveAction(\"R\", 0, 100, new Point.Double(500, 200),\n new Point.Double(10, 10)));\n model1.addAction(new MoveAction(\"R\", 50, 150,\n new Point.Double(500, 200), new Point.Double(10, 10)));\n }",
"public void testSynchLeadSelection() {\n ListSelectionModel viewSelectionModel = new DefaultListSelectionModel();\n int selected = 0;\n viewSelectionModel.setSelectionInterval(selected, selected);\n FilterPipeline pipeline = null; //new FilterPipeline();\n // pipeline.assign(ascendingModelAdapter);\n SelectionMapper selectionMapper = new SelectionMapper(pipeline, viewSelectionModel);\n int anchor = selected;\n int lead = selected;\n assertAnchorLeadSynched(anchor, lead, viewSelectionModel, selectionMapper);\n anchor = 2;\n viewSelectionModel.setValueIsAdjusting(true);\n viewSelectionModel.setAnchorSelectionIndex(anchor);\n viewSelectionModel.setValueIsAdjusting(false);\n // pipeline.flush();\n assertAnchorLeadSynched(anchor, lead, viewSelectionModel, selectionMapper);\n \n }",
"public void testGetOldBoundary() {\n assertEquals(\"Old boundary should be got correctly.\", event.getOldBoundary(), oldBoundary);\n }",
"@Test\n public void overlappingChutesTest()\n {\n Chute c1;\n Chute c2;\n // set up a board and put the chutes in it.\n {\n Board b = new Board();\n\n Intersection incoming = Intersection.factory(INCOMING);\n Intersection outgoing = Intersection.factory(OUTGOING);\n b.addNode(incoming);\n b.addNode(outgoing);\n\n c1 = new Chute(-1, \"c1\");\n c2 = new Chute(-1, \"c2\");\n\n b.addEdge(incoming, \"0\", outgoing, \"0\", c1);\n b.addEdge(incoming, \"1\", outgoing, \"1\", c2);\n\n b.finishConstruction();\n\n BoardLayout.layout(b);\n }\n\n List<GameCoordinate> layout1 = c1.getLayout();\n List<GameCoordinate> layout2 = c2.getLayout();\n\n double c1X = layout1.get(0).getX();\n double c2X = layout2.get(0).getX();\n\n // make sure that the first x value in each list of spline coordinates is\n // not the same. This is a good enough to tell if the layout is basically\n // the same or not.\n assertNotEquals(\n \"Layout leaves chutes with identical layout information (they completely overlap)\",\n c1X, c2X, 0.1);\n }",
"@Test\n public void testCasesVidePlacement() {\n System.out.println(\"=============================================\");\n System.out.println(\"Test casesVidePlacement ====================>\\n\");\n\n HexaPoint orig = new HexaPoint(0, 0, 0);\n Plateau instance = new Plateau();\n JoueurHumain j1 = new JoueurHumain(instance, true, NumJoueur.JOUEUR1);\n JoueurHumain j2 = new JoueurHumain(instance, true, NumJoueur.JOUEUR1);\n Reine reinej1 = j1.getReine(j1.getPions());\n Reine reinej2 = j2.getReine(j2.getPions());\n\n ArrayList<HexaPoint> expectedj1;\n ArrayList<HexaPoint> expectedj2;\n ArrayList<HexaPoint> resj1;\n ArrayList<HexaPoint> resj2;\n\n System.out.println(\"test sur une ruche venant d'être créé :\");\n expectedj1 = new ArrayList<>();\n expectedj1.add(orig);\n expectedj2 = new ArrayList<>();\n expectedj2.add(orig);\n resj1 = instance.casesVidePlacement(j1);\n resj2 = instance.casesVidePlacement(j2);\n\n arrayCorrespondsp(resj1, expectedj1);\n arrayCorrespondsp(resj2, expectedj2);\n\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"test sur avec l'insecte de j1 à l'origine :\");\n instance.ajoutInsecte(reinej1, orig);\n expectedj1 = new ArrayList<>();\n expectedj1.addAll(orig.coordonneesVoisins());\n expectedj2 = new ArrayList<>();\n expectedj2.addAll(orig.coordonneesVoisins());\n resj1 = instance.casesVidePlacement(j1);\n resj2 = instance.casesVidePlacement(j2);\n\n arrayCorrespondsp(resj1, expectedj1);\n arrayCorrespondsp(resj2, expectedj2);\n\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n \n System.out.println(\"test sur avec l'insecte de j1 à l'origine et j2 en bas:\");\n instance.ajoutInsecte(reinej2, orig.voisinBas());\n expectedj1 = new ArrayList<>();\n expectedj1.add(orig.voisinDroiteHaut());\n expectedj1.add(orig.voisinGaucheHaut());\n expectedj1.add(orig.voisinHaut());\n expectedj2 = new ArrayList<>();\n expectedj2.add(orig.voisinBas().voisinBas());\n expectedj2.add(orig.voisinBas().voisinDroiteBas());\n expectedj2.add(orig.voisinBas().voisinGaucheBas());;\n resj1 = instance.casesVidePlacement(j1);\n resj2 = instance.casesVidePlacement(j2);\n\n //arrayCorrespondsp(resj1, expectedj1);\n //arrayCorrespondsp(resj2, expectedj2);\n\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"\");\n }",
"@Test\r\n public void testChange() {\r\n final String topo = \"TOPO\";\r\n final String exec = \"exec\";\r\n final String alg = \"alg\";\r\n final String param1 = \"param1\";\r\n final String value1 = \"val1\";\r\n final String param2 = \"param2\";\r\n final String value2 = \"val2\";\r\n \r\n final int inPort = 1234;\r\n final int outPort = 4321;\r\n final int warmup = 50;\r\n final String host = \"localhost\";\r\n final String msgId = \"423de707-921e-4b30-8159-5e6b80011b81\";\r\n \r\n TestListener listener = new TestListener();\r\n AlgorithmChangeSignal signal = new AlgorithmChangeSignal(topo, exec, alg, msgId);\r\n listener.expect(signal);\r\n AlgorithmChangeSignal.notify(signal.createPayload(), topo, exec, listener);\r\n Assert.assertTrue(listener.receivedSignal());\r\n\r\n signal = new AlgorithmChangeSignal(topo, exec, alg, \"\");\r\n listener.expect(signal);\r\n AlgorithmChangeSignal.notify(signal.createPayload(), topo, exec, listener);\r\n Assert.assertTrue(listener.receivedSignal());\r\n\r\n List<ParameterChange> changes = new ArrayList<ParameterChange>();\r\n changes.add(new ParameterChange(param1, value1));\r\n changes.add(new ParameterChange(param2, value2));\r\n signal = new AlgorithmChangeSignal(topo, exec, alg, changes, msgId);\r\n listener.expect(signal);\r\n AlgorithmChangeSignal.notify(signal.createPayload(), topo, exec, listener);\r\n Assert.assertTrue(listener.receivedSignal());\r\n \r\n // instance reuse is not intended but ok here\r\n Map<AlgorithmChangeParameter, Serializable> params = new HashMap<AlgorithmChangeParameter, Serializable>();\r\n params.put(AlgorithmChangeParameter.INPUT_PORT, inPort);\r\n params.put(AlgorithmChangeParameter.OUTPUT_PORT, outPort);\r\n signal.setParameters(params);\r\n signal.setIntParameter(AlgorithmChangeParameter.WARMUP_DELAY, warmup);\r\n signal.setStringParameter(AlgorithmChangeParameter.COPROCESSOR_HOST, host);\r\n \r\n assertEquals(inPort, signal.getIntParameter(AlgorithmChangeParameter.INPUT_PORT, null));\r\n assertEquals(outPort, signal.getIntParameter(AlgorithmChangeParameter.OUTPUT_PORT, null));\r\n assertEquals(warmup, signal.getIntParameter(AlgorithmChangeParameter.WARMUP_DELAY, null));\r\n assertEquals(host, signal.getStringParameter(AlgorithmChangeParameter.COPROCESSOR_HOST, null));\r\n \r\n listener.expect(signal);\r\n AlgorithmChangeSignal.notify(signal.createPayload(), topo, exec, listener);\r\n Assert.assertTrue(listener.receivedSignal());\r\n }",
"Diff() {\n\t}",
"@Test\n\tpublic void testLopSameTranslLoc() \n\t{\n\t\tString id = \"sameTransLoc\";\n\t\tassertLCVolLopped(id);\n\t\tassertNoUnloppedLCVol1(id);\n\t\tassertNoUnloppedLCVol2(id);\n\t}",
"public void test1() {\n //$NON-NLS-1$\n deployBundles(\"test1\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }",
"@Test\n \tpublic void testOverlapsWith()\n \t{\n \t\tAssert.assertTrue(PDL.new Alignment(\"\", \"\", 0.0, 1, 4, 0, 0)\n \t\t .overlapsWith(PDL.new Alignment(\"\", \"\", 0.0, 1, 4, 0, 0)));\n \t\t\n \t\t// 1. [1,2] [2,4] => false\n \t\tAssert.assertFalse(PDL.new Alignment(\"\", \"\", 0.0, 1, 2, 0, 0)\n \t\t .overlapsWith(PDL.new Alignment(\"\", \"\", 0.0, 2, 4, 0, 0)));\n \t\t\n \t\t// 2. [1,3] [2,5] => true\n \t\tAssert.assertTrue(PDL.new Alignment(\"\", \"\", 0.0, 1, 3, 0, 0)\n \t\t .overlapsWith(PDL.new Alignment(\"\", \"\", 0.0, 2, 5, 0, 0)));\n \t\t\n \t\t// 3. [1,5] [0,6] => true\n \t\tAssert.assertTrue(PDL.new Alignment(\"\", \"\", 0.0, 1, 5, 0, 0)\n \t\t .overlapsWith(PDL.new Alignment(\"\", \"\", 0.0, 0, 6, 0, 0)));\n \t\t\n \t\t// 4. [2,4] [1,2] => false\n \t\tAssert.assertFalse(PDL.new Alignment(\"\", \"\", 0.0, 2, 4, 0, 0)\n \t\t .overlapsWith(PDL.new Alignment(\"\", \"\", 0.0, 1, 2, 0, 0)));\n \t\t\n \t\t// 5. [2,5] [1,3] => true\n \t\tAssert.assertTrue(PDL.new Alignment(\"\", \"\", 0.0, 2, 5, 0, 0)\n \t\t .overlapsWith(PDL.new Alignment(\"\", \"\", 0.0, 1, 3, 0, 0)));\n \t}",
"@Test(timeout = 4000)\n public void test38() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 0L, 4294967295L);\n long long0 = new Long(0L);\n Range range1 = Range.of(4294967295L);\n long long1 = range1.getBegin();\n assertEquals(4294967295L, long1);\n \n Consumer<Long> consumer0 = (Consumer<Long>) mock(Consumer.class, new ViolatedAssumptionAnswer());\n range1.forEach(consumer0);\n List<Range> list0 = range0.complement(range1);\n List<Range> list1 = range0.complementFrom(list0);\n Range range2 = Range.ofLength(2147483647L);\n range1.intersection(range0);\n Range range3 = Range.of(range_CoordinateSystem0, 0L, 4294967295L);\n range3.getEnd();\n boolean boolean0 = range2.intersects(range0);\n boolean boolean1 = range2.equals(\"numbeg of entries must be <= Integer.MAX_VALUE\");\n assertFalse(boolean1 == boolean0);\n \n Range range4 = Range.of(0L);\n assertFalse(range4.isEmpty());\n \n Range range5 = Range.of(1566L);\n List<Range> list2 = range5.complement(range2);\n assertFalse(list2.equals((Object)list0));\n assertTrue(list2.equals((Object)list1));\n }",
"@Test(timeout = 4000)\n public void test104() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 9223372036854775806L, 9223372036854775806L);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.RESIDUE_BASED;\n Range.of(range_CoordinateSystem1, 9223372032559808516L, 9223372032559808516L);\n Range range1 = Range.of(9223372036854775806L, 9223372036854775806L);\n range1.split(9223372032559808516L);\n boolean boolean0 = range1.endsBefore(range0);\n assertFalse(boolean0);\n \n boolean boolean1 = range0.equals(range1);\n assertFalse(boolean1);\n }",
"public void testGetOldPosition2() {\n WayPointEvent event = new WayPointEvent(edge, 0, offset);\n\n Point expectedOldPosition = edge.getWayPoints().get(0).getCenter();\n Point pt = event.getOldPosition();\n\n assertEquals(\"Failed to get the correct old position.\", expectedOldPosition, pt);\n\n // verify the point should be set by clone\n pt.x = 876;\n assertEquals(\"The old position getter should return a cloned point.\", expectedOldPosition,\n event.getOldPosition());\n }",
"private void checkOverlaps() {\r\n final ArrayList<Vertex> overlaps = new ArrayList<Vertex>(3);\r\n final int count = getOutlineNumber();\r\n boolean firstpass = true;\r\n do {\r\n for (int cc = 0; cc < count; cc++) {\r\n final Outline outline = getOutline(cc);\r\n int vertexCount = outline.getVertexCount();\r\n for(int i=0; i < outline.getVertexCount(); i++) {\r\n final Vertex currentVertex = outline.getVertex(i);\r\n if ( !currentVertex.isOnCurve()) {\r\n final Vertex nextV = outline.getVertex((i+1)%vertexCount);\r\n final Vertex prevV = outline.getVertex((i+vertexCount-1)%vertexCount);\r\n final Vertex overlap;\r\n\r\n // check for overlap even if already set for subdivision\r\n // ensuring both triangular overlaps get divided\r\n // for pref. only check in first pass\r\n // second pass to clear the overlaps array(reduces precision errors)\r\n if( firstpass ) {\r\n overlap = checkTriOverlaps0(prevV, currentVertex, nextV);\r\n } else {\r\n overlap = null;\r\n }\r\n if( overlaps.contains(currentVertex) || overlap != null ) {\r\n overlaps.remove(currentVertex);\r\n\r\n subdivideTriangle(outline, prevV, currentVertex, nextV, i);\r\n i+=3;\r\n vertexCount+=2;\r\n addedVerticeCount+=2;\r\n\r\n if(overlap != null && !overlap.isOnCurve()) {\r\n if(!overlaps.contains(overlap)) {\r\n overlaps.add(overlap);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n firstpass = false;\r\n } while( !overlaps.isEmpty() );\r\n }",
"@Test\n\tpublic void TEAM3_CONTROLLER_UT03() {\n\t\t// PRECONDITIONS\n\t\tClassDetailsStub c1 = new ClassDetailsStub(TEST_CONFIG.SatOnly),\n\t\t\t\t\t\t c2 = new ClassDetailsStub(TEST_CONFIG.MonWedFri2),\n\t\t\t\t\t\t c3 = new ClassDetailsStub(TEST_CONFIG.TueThu);\n\t\t\n\t\tArrayList<ClassDetailsStub> s1 = new ArrayList<ClassDetailsStub>();\n\t\ts1.add(c1);\n\t\ts1.add(c3);\n\t\t\n\t\tArrayList<ClassDetailsStub> s2 = new ArrayList<ClassDetailsStub>();\n\t\ts2.add(c2);\n\t\ts2.add(c3);\n\t\t\n\t\tScheduleMakerController smc = new ScheduleMakerController();\n\t\t\n\t\t// INPUT\n\t\tCollection<ArrayList<ClassDetailsStub>> twoSchedules = new ArrayList<ArrayList<ClassDetailsStub>>();\n\t\ttwoSchedules.add(s1);\n\t\ttwoSchedules.add(s2);\n\t\t\n\t\t// EXPECTED OUTPUT\n\t\tboolean schedulesConflict = smc.conflict(twoSchedules);\n\t\tassertTrue(schedulesConflict);\n\t}",
"public void test22() {\n //$NON-NLS-1$\n deployBundles(\"test22\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.NON_FINAL_TO_FINAL, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }",
"@Test\n public void testExecute() {\n for (int i = 0; i < 10; i++) {\n // create test objects\n List<TranslationFile> c = TestObjectBuilder.getCommittedTestCorpus();\n TranslationFile mainFile = c.get(0);\n Dispatcher d = TestObjectBuilder.getDispatcher(mainFile, c);\n mainFile = d.getState().getMainFile();\n\n // makes 5 segments\n Segment seg1 = mainFile.getActiveSegs().get(0);\n Segment seg2 = mainFile.getActiveSegs().get(1);\n Segment seg3 = mainFile.getActiveSegs().get(2);\n Segment seg4 = mainFile.getActiveSegs().get(3);\n Segment seg5 = mainFile.getActiveSegs().get(4);\n\n ArrayList<Segment> selectedSegs = new ArrayList();\n switch (i) {\n case 0: {\n // if i=0 --> 'merge' first seg (no change)\n\n selectedSegs.add(seg1);\n d.acceptAction(new Merge(selectedSegs));\n assertEquals(5, mainFile.getActiveSegs().size());\n assertEquals(0, mainFile.getHiddenSegs().size());\n assertEquals(mainFile.getActiveSegs().get(0).equals(seg1), true);\n assertEquals(mainFile.getActiveSegs().get(1).equals(seg2), true);\n assertEquals(mainFile.getActiveSegs().get(2).equals(seg3), true);\n assertEquals(mainFile.getActiveSegs().get(3).equals(seg4), true);\n assertEquals(mainFile.getActiveSegs().get(4).equals(seg5), true);\n\n assertEquals(mainFile, DatabaseOperations.getFile(mainFile.getFileID()));\n break;\n }\n case 1: {\n // if i=1 --> merge first two\n StringBuilder sb = new StringBuilder(seg1.getThai());\n sb.append(seg2.getThai()); // combine the Thai from both segs\n\n selectedSegs.add(seg1);\n selectedSegs.add(seg2);\n\n d.acceptAction(new Merge(selectedSegs));\n assertEquals(4, mainFile.getActiveSegs().size());\n assertEquals(2, mainFile.getHiddenSegs().size());\n assertEquals(sb.toString(), d.getUIState().getMainFileSegs().get(0).getThai());\n assertEquals(mainFile.getActiveSegs().get(1).equals(seg3), true);\n assertEquals(mainFile.getActiveSegs().get(2).equals(seg4), true);\n assertEquals(mainFile.getActiveSegs().get(3).equals(seg5), true);\n assertEquals(mainFile.getHiddenSegs().get(0).equals(seg1), true);\n assertEquals(mainFile.getHiddenSegs().get(1).equals(seg2), true);\n\n assertEquals(mainFile, DatabaseOperations.getFile(mainFile.getFileID()));\n break;\n }\n case 2: {\n // if i=2 --> merge first three\n StringBuilder sb = new StringBuilder(seg1.getThai());\n sb.append(seg2.getThai());\n sb.append(seg3.getThai());// combine the Thai from the three segs\n\n selectedSegs.add(seg1);\n selectedSegs.add(seg2);\n selectedSegs.add(seg3);\n d.acceptAction(new Merge(selectedSegs));\n assertEquals(3, mainFile.getActiveSegs().size());\n assertEquals(3, mainFile.getHiddenSegs().size());\n assertEquals(sb.toString(), d.getUIState().getMainFileSegs().get(0).getThai());\n assertEquals(seg4.getThai(), d.getUIState().getMainFileSegs().get(1).getThai());\n assertEquals(mainFile.getActiveSegs().get(1).equals(seg4), true);\n assertEquals(mainFile.getActiveSegs().get(2).equals(seg5), true);\n assertEquals(mainFile.getHiddenSegs().get(0).equals(seg1), true);\n assertEquals(mainFile.getHiddenSegs().get(1).equals(seg2), true);\n assertEquals(mainFile.getHiddenSegs().get(2).equals(seg3), true);\n\n assertEquals(mainFile, DatabaseOperations.getFile(mainFile.getFileID()));\n break;\n }\n case 3: {\n // if i=3 --> merge tu2-tu3\n StringBuilder sb = new StringBuilder(seg2.getThai());\n sb.append(seg3.getThai());\n\n selectedSegs.add(seg2);\n selectedSegs.add(seg3);\n d.acceptAction(new Merge(selectedSegs));\n assertEquals(4, mainFile.getActiveSegs().size());\n assertEquals(2, mainFile.getHiddenSegs().size());\n assertEquals(sb.toString(), d.getUIState().getMainFileSegs().get(1).getThai());\n assertEquals(seg1.getThai(), d.getUIState().getMainFileSegs().get(0).getThai());\n assertEquals(seg4.getThai(), d.getUIState().getMainFileSegs().get(2).getThai());\n assertEquals(mainFile.getActiveSegs().get(0).equals(seg1), true);\n assertEquals(mainFile.getActiveSegs().get(2).equals(seg4), true);\n assertEquals(mainFile.getActiveSegs().get(3).equals(seg5), true);\n assertEquals(mainFile.getHiddenSegs().get(0).equals(seg2), true);\n assertEquals(mainFile.getHiddenSegs().get(1).equals(seg3), true);\n\n assertEquals(mainFile, DatabaseOperations.getFile(mainFile.getFileID()));\n break;\n }\n // if i=4 --> merge 1-3\n case 4: {\n\n selectedSegs.add(seg2);\n selectedSegs.add(seg3);\n d.acceptAction(new Merge(selectedSegs));\n assertEquals(4, mainFile.getActiveSegs().size());\n assertEquals(2, mainFile.getHiddenSegs().size());\n assertEquals(mainFile.getActiveSegs().get(0).equals(seg1), true);\n assertEquals(mainFile.getActiveSegs().get(2).equals(seg4), true);\n assertEquals(mainFile.getActiveSegs().get(3).equals(seg5), true);\n assertEquals(mainFile.getHiddenSegs().get(0).equals(seg2), true);\n assertEquals(mainFile.getHiddenSegs().get(1).equals(seg3), true);\n\n assertEquals(mainFile, DatabaseOperations.getFile(mainFile.getFileID()));\n break;\n }\n // if i=5 --> merge 3-end\n case 5: {\n selectedSegs.add(seg1);\n selectedSegs.add(seg2);\n selectedSegs.add(seg3);\n d.acceptAction(new Merge(selectedSegs));\n assertEquals(3, d.getState().getMainFile().getActiveSegs().size());\n assertEquals(3, d.getState().getMainFile().getHiddenSegs().size());\n assertEquals(\"th1th2th3\", mainFile.getActiveSegs().get(0).getThai());\n assertEquals(mainFile.getActiveSegs().get(1).equals(seg4), true);\n assertEquals(mainFile.getActiveSegs().get(2).equals(seg5), true);\n assertEquals(mainFile.getHiddenSegs().get(0).equals(seg1), true);\n assertEquals(mainFile.getHiddenSegs().get(1).equals(seg2), true);\n assertEquals(mainFile.getHiddenSegs().get(2).equals(seg3), true);\n\n assertEquals(mainFile, DatabaseOperations.getFile(mainFile.getFileID()));\n break;\n }\n // if i=6 --> merge only end (no difference)\n case 6: {\n selectedSegs.add(seg5);\n d.acceptAction(new Merge(selectedSegs));\n assertEquals(5, mainFile.getActiveSegs().size());\n assertEquals(0, mainFile.getHiddenSegs().size());\n assertEquals(mainFile.getActiveSegs().get(0).equals(seg1), true);\n assertEquals(mainFile.getActiveSegs().get(1).equals(seg2), true);\n assertEquals(mainFile.getActiveSegs().get(2).equals(seg3), true);\n assertEquals(mainFile.getActiveSegs().get(3).equals(seg4), true);\n assertEquals(mainFile.getActiveSegs().get(4).equals(seg5), true);\n\n assertEquals(mainFile, DatabaseOperations.getFile(mainFile.getFileID()));\n break;\n }\n // if i=7 --> merge all segs\n case 7: {\n selectedSegs.add(seg1);\n selectedSegs.add(seg2);\n selectedSegs.add(seg3);\n selectedSegs.add(seg4);\n selectedSegs.add(seg5);\n d.acceptAction(new Merge(selectedSegs));\n assertEquals(1, mainFile.getActiveSegs().size());\n assertEquals(5, mainFile.getHiddenSegs().size());\n assertEquals(mainFile.getHiddenSegs().get(0).equals(seg1), true);\n assertEquals(mainFile.getHiddenSegs().get(1).equals(seg2), true);\n assertEquals(mainFile.getHiddenSegs().get(2).equals(seg3), true);\n assertEquals(mainFile.getHiddenSegs().get(3).equals(seg4), true);\n assertEquals(mainFile.getHiddenSegs().get(4).equals(seg5), true);\n\n assertEquals(mainFile, DatabaseOperations.getFile(mainFile.getFileID()));\n break;\n }\n // if i=8 --> selectedItems is empty (but not null)\n case 8: {\n d.acceptAction(new Merge(selectedSegs));\n assertEquals(5, mainFile.getActiveSegs().size());\n assertEquals(0, mainFile.getHiddenSegs().size());\n assertEquals(mainFile.getActiveSegs().get(0).equals(seg1), true);\n assertEquals(mainFile.getActiveSegs().get(1).equals(seg2), true);\n assertEquals(mainFile.getActiveSegs().get(2).equals(seg3), true);\n assertEquals(mainFile.getActiveSegs().get(3).equals(seg4), true);\n assertEquals(mainFile.getActiveSegs().get(4).equals(seg5), true);\n\n assertEquals(mainFile, DatabaseOperations.getFile(mainFile.getFileID()));\n break;\n }\n // if i=9 --> merge repeatedly\n case 9: {\n // merges seg1 and seg2\n selectedSegs.add(seg1);\n selectedSegs.add(seg2);\n d.acceptAction(new Merge(selectedSegs));\n\n //merges seg3 and seg4\n selectedSegs = new ArrayList();\n selectedSegs.add(seg3);\n selectedSegs.add(seg4);\n d.acceptAction(new Merge(selectedSegs));\n\n // at this point the file should have three segments in activeSegs\n // the first two segs are the result of the prior merges\n // the last seg is seg5\n // now we merge the second merged seg with seg5\n selectedSegs = new ArrayList();\n selectedSegs.add(mainFile.getActiveSegs().get(1));\n selectedSegs.add(seg5);\n d.acceptAction(new Merge(selectedSegs));\n\n // this should result in the file now only having two active segs\n assertEquals(2, mainFile.getActiveSegs().size());\n assertEquals(6, mainFile.getHiddenSegs().size());\n assertEquals(mainFile.getHiddenSegs().get(0).equals(seg1), true);\n assertEquals(mainFile.getHiddenSegs().get(1).equals(seg2), true);\n assertEquals(mainFile.getHiddenSegs().get(2).equals(seg3), true);\n assertEquals(mainFile.getHiddenSegs().get(3).equals(seg4), true);\n assertEquals(mainFile.getHiddenSegs().get(5).equals(seg5), true);\n\n assertEquals(mainFile, DatabaseOperations.getFile(mainFile.getFileID()));\n break;\n }\n // if i=10 --> merge invalid argument (segs not contiguous)\n case 10: {\n selectedSegs.add(seg1);\n selectedSegs.add(seg2);\n selectedSegs.add(seg3);\n selectedSegs.add(seg4);\n selectedSegs.add(seg2); // this seg is repeated and out of order\n d.acceptAction(new Merge(selectedSegs));\n\n assertEquals(5, mainFile.getActiveSegs().size());\n assertEquals(0, mainFile.getHiddenSegs().size());\n assertEquals(mainFile.getActiveSegs().get(0).equals(seg1), true);\n assertEquals(mainFile.getActiveSegs().get(1).equals(seg2), true);\n assertEquals(mainFile.getActiveSegs().get(2).equals(seg3), true);\n assertEquals(mainFile.getActiveSegs().get(3).equals(seg4), true);\n assertEquals(mainFile.getActiveSegs().get(4).equals(seg5), true);\n\n assertEquals(mainFile, DatabaseOperations.getFile(mainFile.getFileID()));\n break;\n }\n default:\n break;\n }\n\n }\n }",
"public void setDiff(){\n diff=true;\n }",
"@Test\n public void equals_DifferentTimeRangeStart_Test() {\n Assert.assertFalse(bq1.equals(bq3));\n }",
"@Test\n public void testDistOverflowBack()\n {\n String sName = \"dist-overflow-back\";\n generateTwoEvents(sName);\n checkEvents(false, true);\n BackingMapListener.INSTANCE.assertContext();\n }",
"public void testMutators() throws Exception {\n\n FileChangeSet fcs = new FileChangeSet();\n\n /*\n * Not the greatest test fixture ever. Overcome lack of accessors\n * returning Sets\n */\n FileChangeSet added = new FileChangeSet();\n added.fileAdded(\"file-1.html\");\n\n FileChangeSet modified = new FileChangeSet();\n modified.fileModified(\"file-2.html\");\n\n FileChangeSet deleted = new FileChangeSet();\n deleted.fileDeleted(\"file-3.html\");\n\n FileChangeSet targetDeleted = new FileChangeSet();\n targetDeleted.targetFileDeleted(\"file-4.html\");\n\n FileChangeSet targetAdded = new FileChangeSet();\n targetAdded.targetFileAdded(\"file-5.html\");\n\n assertEquals(\"size of ADDED correct\", 0, fcs.getAdded().size());\n assertEquals(\"size of MODIFIED correct\", 0, fcs.getModified().size());\n assertEquals(\"size of DELETED correct\", 0, fcs.getDeleted().size());\n assertEquals(\"size of TARGET FILE DELETED correct\", 0, fcs.getTargetDeleted().size());\n assertEquals(\"size of TARGET FILE ADDED correct\", 0, fcs.getTargetAdded().size());\n\n fcs.fileAdded(\"file-1.html\");\n\n assertEquals(\"size of ADDED correct\", 1, fcs.getAdded().size());\n assertEquals(\"content of ADDED correct\", added, fcs.getAdded());\n assertEquals(\"size of MODIFIED correct\", 0, fcs.getModified().size());\n assertEquals(\"size of DELETED correct\", 0, fcs.getDeleted().size());\n assertEquals(\"size of TARGET FILE DELETED correct\", 0, fcs.getTargetDeleted().size());\n assertEquals(\"size of TARGET FILE ADDED correct\", 0, fcs.getTargetAdded().size());\n\n fcs.fileModified(\"file-2.html\");\n\n assertEquals(\"size of ADDED correct\", 1, fcs.getAdded().size());\n assertEquals(\"content of ADDED correct\", added, fcs.getAdded());\n assertEquals(\"size of MODIFIED correct\", 1, fcs.getModified().size());\n assertEquals(\"content of MODIFIED correct\", modified, fcs.getModified());\n assertEquals(\"size of DELETED correct\", 0, fcs.getDeleted().size());\n assertEquals(\"size of TARGET FILE DELETED correct\", 0, fcs.getTargetDeleted().size());\n assertEquals(\"size of TARGET FILE ADDED correct\", 0, fcs.getTargetAdded().size());\n\n fcs.fileDeleted(\"file-3.html\");\n\n assertEquals(\"size of ADDED correct\", 1, fcs.getAdded().size());\n assertEquals(\"content of ADDED correct\", added, fcs.getAdded());\n assertEquals(\"size of MODIFIED correct\", 1, fcs.getModified().size());\n assertEquals(\"content of MODIFIED correct\", modified, fcs.getModified());\n assertEquals(\"size of DELETED correct\", 1, fcs.getDeleted().size());\n assertEquals(\"content of DELETED correct\", deleted, fcs.getDeleted());\n assertEquals(\"size of TARGET FILE DELETED correct\", 0, fcs.getTargetDeleted().size());\n assertEquals(\"size of TARGET FILE ADDED correct\", 0, fcs.getTargetAdded().size());\n\n fcs.targetFileDeleted(\"file-4.html\");\n\n assertEquals(\"size of ADDED correct\", 1, fcs.getAdded().size());\n assertEquals(\"content of ADDED correct\", added, fcs.getAdded());\n assertEquals(\"size of MODIFIED correct\", 1, fcs.getModified().size());\n assertEquals(\"content of MODIFIED correct\", modified, fcs.getModified());\n assertEquals(\"size of DELETED correct\", 1, fcs.getDeleted().size());\n assertEquals(\"content of DELETED correct\", deleted, fcs.getDeleted());\n assertEquals(\"size of TARGET FILE DELETED correct\", 1, fcs.getTargetDeleted().size());\n assertEquals(\"content of TARGET FILE DELETED correct\", targetDeleted, fcs.getTargetDeleted());\n assertEquals(\"size of TARGET FILE ADDED correct\", 0, fcs.getTargetAdded().size());\n\n fcs.targetFileAdded(\"file-5.html\");\n assertEquals(\"size of ADDED correct\", 1, fcs.getAdded().size());\n assertEquals(\"content of ADDED correct\", added, fcs.getAdded());\n assertEquals(\"size of MODIFIED correct\", 1, fcs.getModified().size());\n assertEquals(\"content of MODIFIED correct\", modified, fcs.getModified());\n assertEquals(\"size of DELETED correct\", 1, fcs.getDeleted().size());\n assertEquals(\"content of DELETED correct\", deleted, fcs.getDeleted());\n assertEquals(\"size of TARGET FILE DELETED correct\", 1, fcs.getTargetDeleted().size());\n assertEquals(\"content of TARGET FILE DELETED correct\", targetDeleted, fcs.getTargetDeleted());\n assertEquals(\"size of TARGET FILE ADDED correct\", 1, fcs.getTargetAdded().size());\n assertEquals(\"content of TARGET FILE ADDED correct\", targetAdded, fcs.getTargetAdded());\n\n }",
"@Test(timeout = 4000)\n public void test11() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, (-1521L), (-1521L));\n Range range1 = Range.ofLength(357L);\n List<Range> list0 = range0.complement(range1);\n assertFalse(range0.isEmpty());\n assertTrue(list0.contains(range0));\n assertFalse(range1.isEmpty());\n }",
"@Test\n\tpublic void testcheckConflict() {\n\t\tActivity a1 = new Course(\"CSC216\", \"Programming Concepts - Java\", \"001\", 4, \"sesmith5\", 12, \"MW\", 1330, 1445);\n\t\tActivity a2 = new Course(\"CSC216\", \"Programming Concepts - Java\", \"001\", 4, \"sesmith5\", 12, \"TH\", 1330, 1445);\n\t\t try {\n\t\t a1.checkConflict(a2);\n\t\t assertEquals(\"Incorrect meeting string for this Activity.\", \"MW 1:30PM-2:45PM\", a1.getMeetingString());\n\t\t assertEquals(\"Incorrect meeting string for possibleConflictingActivity.\", \"TH 1:30PM-2:45PM\", a2.getMeetingString());\n\t\t a2.checkConflict(a1);\n\t\t assertEquals(\"Incorrect meeting string for this Activity.\", \"MW 1:30PM-2:45PM\", a1.getMeetingString());\n\t\t assertEquals(\"Incorrect meeting string for possibleConflictingActivity.\", \"TH 1:30PM-2:45PM\", a2.getMeetingString());\n\t\t } catch (ConflictException e) {\n\t\t fail(\"A ConflictException was thrown when two Activities at the same time on completely distinct days were compared.\");\n\t\t }\n\t\t a1.setMeetingDays(\"TH\");\n\t\t a1.setActivityTime(1445, 1530);\n\t\t try {\n\t\t a1.checkConflict(a2);\n\t\t fail(); //ConflictException should have been thrown, but was not.\n\t\t } catch (ConflictException e) {\n\t\t //Check that the internal state didn't change during method call.\n\t\t assertEquals(\"TH 2:45PM-3:30PM\", a1.getMeetingString());\n\t\t assertEquals(\"TH 1:30PM-2:45PM\", a2.getMeetingString());\n\t\t }\n\t}",
"public void test3() {\n //$NON-NLS-1$\n deployBundles(\"test3\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }",
"@Test(timeout = 4000)\n public void test09() throws Throwable {\n Range.Builder range_Builder0 = new Range.Builder();\n range_Builder0.contractBegin(0L);\n range_Builder0.copy();\n range_Builder0.copy();\n Range range0 = range_Builder0.build();\n range_Builder0.shift(265L);\n LinkedList<Range> linkedList0 = new LinkedList<Range>();\n linkedList0.add(range0);\n range0.complementFrom(linkedList0);\n Range range1 = Range.of((-3234L));\n range0.isSubRangeOf(range1);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n Consumer<Long> consumer0 = (Consumer<Long>) mock(Consumer.class, new ViolatedAssumptionAnswer());\n range1.forEach(consumer0);\n range_CoordinateSystem0.toString();\n range1.equals(\"Residue Based\");\n String string0 = range_CoordinateSystem0.toString();\n assertEquals(\"Residue Based\", string0);\n }",
"@Test\n\tpublic void testForwardStartLoss() throws InvalidGenomeChange {\n\t\tGenomeChange change1 = new GenomeChange(new GenomePosition(refDict, '+', 1, 6640669, PositionType.ZERO_BASED),\n\t\t\t\t\"ACG\", \"CGTT\");\n\t\tAnnotation annotation1 = new BlockSubstitutionAnnotationBuilder(infoForward, change1).build();\n\t\tAssert.assertEquals(infoForward.accession, annotation1.transcript.accession);\n\t\tAssert.assertEquals(1, annotation1.annoLoc.rank);\n\t\tAssert.assertEquals(\"c.1_3delinsCGTT\", annotation1.ntHGVSDescription);\n\t\tAssert.assertEquals(\"p.0?\", annotation1.aaHGVSDescription);\n\t\tAssert.assertEquals(ImmutableSortedSet.of(VariantType.START_LOSS), annotation1.effects);\n\n\t\t// Delete chunk out of first exon, spanning start codon from the left.\n\t\tGenomeChange change2 = new GenomeChange(new GenomePosition(refDict, '+', 1, 6640660, PositionType.ZERO_BASED),\n\t\t\t\t\"CCCTCCAGACC\", \"GTTG\");\n\t\tAnnotation annotation2 = new BlockSubstitutionAnnotationBuilder(infoForward, change2).build();\n\t\tAssert.assertEquals(infoForward.accession, annotation2.transcript.accession);\n\t\tAssert.assertEquals(1, annotation2.annoLoc.rank);\n\t\tAssert.assertEquals(\"c.-9_2delinsGTTG\", annotation2.ntHGVSDescription);\n\t\tAssert.assertEquals(\"p.0?\", annotation2.aaHGVSDescription);\n\t\tAssert.assertEquals(ImmutableSortedSet.of(VariantType.START_LOSS), annotation2.effects);\n\n\t\t// Delete chunk out of first exon, spanning start codon from the right.\n\t\tGenomeChange change3 = new GenomeChange(new GenomePosition(refDict, '+', 1, 6640671, PositionType.ZERO_BASED),\n\t\t\t\t\"GGACGGCTCCT\", \"CTTG\");\n\t\tAnnotation annotation3 = new BlockSubstitutionAnnotationBuilder(infoForward, change3).build();\n\t\tAssert.assertEquals(infoForward.accession, annotation3.transcript.accession);\n\t\tAssert.assertEquals(1, annotation3.annoLoc.rank);\n\t\tAssert.assertEquals(\"c.3_13delinsCTTG\", annotation3.ntHGVSDescription);\n\t\tAssert.assertEquals(\"p.0?\", annotation3.aaHGVSDescription);\n\t\tAssert.assertEquals(ImmutableSortedSet.of(VariantType.START_LOSS), annotation3.effects);\n\n\t\t// Deletion from before transcript, reaching into the start codon.\n\t\tGenomeChange change4 = new GenomeChange(\n\t\t\t\tnew GenomePosition(refDict, '+', 1, 6640399, PositionType.ZERO_BASED),\n\t\t\t\t\"TCTCACCAGGCCCTTCTTCACGACCCTGGCCCCCCATCCAGCATCCCCCCTGGCCAATCCAATATGGCCCCCGGCCCCCGGGAGGCTGTCAGTGTGTTCCAGCCCTCCGCGTGCACCCCTCACCCTGACCCAAGCCCTCGTGCTGATAAATATGATTATTTGAGTAGAGGCCAACTTCCCGTTTCTCTCTCTTGACTCCAGGAGCTTTCTCTTGCATACCCTCGCTTAGGCTGGCCGGGGTGTCACTTCTGCCTCCCTGCCCTCCAGACCA\",\n\t\t\t\t\"ACCT\");\n\t\tAnnotation annotation4 = new BlockSubstitutionAnnotationBuilder(infoForward, change4).build();\n\t\tAssert.assertEquals(infoForward.accession, annotation4.transcript.accession);\n\t\tAssert.assertEquals(AnnotationLocation.INVALID_RANK, annotation4.annoLoc.rank);\n\t\tAssert.assertEquals(\"c.-69-201_1delinsACCT\", annotation4.ntHGVSDescription);\n\t\tAssert.assertEquals(\"p.0?\", annotation4.aaHGVSDescription);\n\t\tAssert.assertEquals(ImmutableSortedSet.of(VariantType.START_LOSS), annotation4.effects);\n\t}",
"public void test23() {\n //$NON-NLS-1$\n deployBundles(\"test23\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.CLINIT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.FINAL_TO_NON_FINAL_STATIC_CONSTANT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }",
"@Test\n\tpublic void TEAM3_CONTROLLER_UT04() {\n\t\t// PRECONDITIONS\n\t\tClassDetailsStub c1 = new ClassDetailsStub(TEST_CONFIG.SatOnly),\n\t\t\t\t\t\t c2 = new ClassDetailsStub(TEST_CONFIG.MonWedFri2);\n\t\t\n\t\tArrayList<ClassDetailsStub> s1 = new ArrayList<ClassDetailsStub>();\n\t\ts1.add(c1);\n\t\t\n\t\tArrayList<ClassDetailsStub> s2 = new ArrayList<ClassDetailsStub>();\n\t\ts2.add(c2);\n\t\t\n\t\tScheduleMakerController smc = new ScheduleMakerController();\n\t\t\n\t\t// INPUT\n\t\tCollection<ArrayList<ClassDetailsStub>> twoSchedules = new HashSet<ArrayList<ClassDetailsStub>>();\n\t\ttwoSchedules.add(s1);\n\t\ttwoSchedules.add(s2);\n\t\t\n\t\t// EXPECTED OUTPUT\n\t\tException exceptionThrown = null;\n\t\tboolean schedulesConflict = false;\n\t\ttry {\n\t\t\tschedulesConflict = smc.conflict(twoSchedules);\n\t\t} catch (ClassCastException cce) {\n\t\t\texceptionThrown = cce;\n\t\t}\n\t\t\n\t\tassertNull(exceptionThrown);\n\t\tassertFalse(schedulesConflict);\n\t}",
"@Test\n public void testReplicatedBoth()\n {\n generateEvents(\"repl-both-test\");\n checkEvents(true, true);\n BackingMapListener.INSTANCE.assertContext();\n }",
"@Test(timeout = 4000)\n public void test022() throws Throwable {\n Range range0 = Range.of((-81L));\n Range range1 = Range.of((-1L));\n boolean boolean0 = range0.equals(range1);\n assertFalse(boolean0);\n \n Range.Comparators.values();\n long long0 = range0.getBegin();\n assertEquals((-81L), long0);\n \n List<Range> list0 = range1.complement(range0);\n assertFalse(range1.isEmpty());\n assertTrue(list0.contains(range1));\n }",
"@Test(expected = IllegalArgumentException.class)\n public void testChangeColorTwiceSameTime() {\n model1.addShape(Rectangle.createRectangle(\"R\", new Point.Double(500, 200),\n new Color(0, 0, 0), 0, 10, 10, 10));\n model1.addAction(new ChangeColorAction(\"R\", 10, 100,\n new Color(0, 0, 0), new Color(10, 10, 10)));\n model1.addAction(new ChangeColorAction(\"R\", 50, 120,\n new Color(0, 0, 0), new Color(10, 10, 10)));\n }",
"public void testOverlap() {\n ZoneId tz = ZoneId.of(\"Europe/Rome\");\n long overlapMillis = TimeUnit.HOURS.toMillis(1);\n long firstMidnight = utcTime(\"1978-09-30T22:00:00\");\n long secondMidnight = utcTime(\"1978-09-30T23:00:00\");\n long overlapEnds = utcTime(\"1978-10-01T0:00:00\");\n LocalTimeOffset.Lookup lookup = LocalTimeOffset.lookup(tz, firstMidnight, overlapEnds);\n LocalTimeOffset secondMidnightOffset = lookup.lookup(secondMidnight);\n long localSecondMidnight = secondMidnightOffset.utcToLocalTime(secondMidnight);\n LocalTimeOffset firstMidnightOffset = lookup.lookup(firstMidnight);\n long localFirstMidnight = firstMidnightOffset.utcToLocalTime(firstMidnight);\n assertThat(localSecondMidnight - localFirstMidnight, equalTo(0L));\n assertThat(lookup.lookup(overlapEnds), sameInstance(secondMidnightOffset));\n long localOverlapEnds = secondMidnightOffset.utcToLocalTime(overlapEnds);\n assertThat(localOverlapEnds - localSecondMidnight, equalTo(overlapMillis));\n\n long localOverlappingTime = randomLongBetween(localFirstMidnight, localOverlapEnds);\n\n assertThat(firstMidnightOffset.localToUtcInThisOffset(localFirstMidnight - 1), equalTo(firstMidnight - 1));\n assertThat(secondMidnightOffset.localToUtcInThisOffset(localFirstMidnight - 1), equalTo(secondMidnight - 1));\n assertThat(firstMidnightOffset.localToUtcInThisOffset(localFirstMidnight), equalTo(firstMidnight));\n assertThat(secondMidnightOffset.localToUtcInThisOffset(localFirstMidnight), equalTo(secondMidnight));\n assertThat(secondMidnightOffset.localToUtcInThisOffset(localOverlapEnds), equalTo(overlapEnds));\n assertThat(\n secondMidnightOffset.localToUtcInThisOffset(localOverlappingTime),\n equalTo(firstMidnightOffset.localToUtcInThisOffset(localOverlappingTime) + overlapMillis)\n );\n\n long beforeOverlapValue = randomLong();\n assertThat(\n secondMidnightOffset.localToUtc(localFirstMidnight - 1, useValueForBeforeOverlap(beforeOverlapValue)),\n equalTo(beforeOverlapValue)\n );\n long overlapValue = randomLong();\n assertThat(secondMidnightOffset.localToUtc(localFirstMidnight, useValueForOverlap(overlapValue)), equalTo(overlapValue));\n assertThat(secondMidnightOffset.localToUtc(localOverlapEnds, unusedStrategy()), equalTo(overlapEnds));\n assertThat(secondMidnightOffset.localToUtc(localOverlappingTime, useValueForOverlap(overlapValue)), equalTo(overlapValue));\n }",
"@Test\r\n\tpublic void testCheck_featureBeginEndPositionEqual2() {\r\n\t\tint beginN = 40;\r\n\t\tboolean removeall = false;\r\n\t\tEntry entry = entryFactory.createEntry();\r\n\t\tSequence newsequence = sequenceFactory.createSequenceByte(\"ADFSGDFHGHJK\".getBytes());\r\n\t\tentry.setSequence(newsequence);\r\n\t\tFeature feature1 = featureFactory.createFeature(\"feature1\");\r\n\t\tOrder<Location> order1 = new Order<Location>();\r\n\t\torder1.addLocation(locationFactory.createLocalRange((long) 45,\r\n\t\t\t\t(long) 45));\r\n\t\tfeature1.setLocations(order1);\r\n\t\tentry.addFeature(feature1);\r\n\t\tassertTrue(Utils.shiftLocation(entry, beginN, removeall).size() == 1);\r\n\t}",
"public void test11() {\n //$NON-NLS-1$\n deployBundles(\"test11\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.INCREASE_ACCESS, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }",
"@Test\r\n public void testNotificationSetEqualElement() {\r\n ObservableList first = FXCollections.observableArrayList(getPerson1());\r\n ObservableList second = FXCollections.observableArrayList(getPerson2());\r\n int index = 0;\r\n assertEquals(\"sanity: \", first.get(index), second.get(index));\r\n ListChangeReport report = new ListChangeReport(first);\r\n first.set(index, second.get(index));\r\n assertEquals(\"list must have fired on setting equal item\", 1, report.getEventCount());\r\n \r\n }",
"void checkAndUpdateBoundary(Integer requiredChange);",
"@Test(timeout = 4000)\n public void test29() throws Throwable {\n Range range0 = Range.of(0L, 0L);\n Range.Builder range_Builder0 = new Range.Builder(range0);\n Range.Builder range_Builder1 = range_Builder0.copy();\n Range range1 = range_Builder1.build();\n long long0 = 9223372036854775807L;\n range_Builder1.shift(9223372036854775807L);\n LinkedList<Range> linkedList0 = new LinkedList<Range>();\n linkedList0.add(range0);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.ZERO_BASED;\n Range range2 = Range.of(range_CoordinateSystem0, 243L, 466L);\n range2.isSubRangeOf(range1);\n Range range3 = Range.of((-636L), (-636L));\n range3.complement(range2);\n range1.intersects(range3);\n // Undeclared exception!\n try { \n Range.Comparators.valueOf((String) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // Name is null\n //\n verifyException(\"java.lang.Enum\", e);\n }\n }",
"public void test27() {\n //$NON-NLS-1$\n deployBundles(\"test27\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.NON_FINAL_TO_FINAL, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }",
"@Test\r\n public void testGetOverlappingType() {\r\n //Tests oerlapping type\r\n assertEquals(31, cellToInsert.getOverlappingType(listToCompare.get(0)));\r\n assertEquals(33, cellToInsert.getOverlappingType(listToCompare.get(1)));\r\n assertEquals(32, cellToInsert.getOverlappingType(listToCompare.get(2)));\r\n assertEquals(21, cellToInsert.getOverlappingType(listToCompare.get(3)));\r\n assertEquals(23, cellToInsert.getOverlappingType(listToCompare.get(4)));\r\n assertEquals(22, cellToInsert.getOverlappingType(listToCompare.get(5)));\r\n assertEquals(11, cellToInsert.getOverlappingType(listToCompare.get(6)));\r\n assertEquals(13, cellToInsert.getOverlappingType(listToCompare.get(7)));\r\n assertEquals(12, cellToInsert.getOverlappingType(listToCompare.get(8)));\r\n }",
"@Test(timeout = 4000)\n public void test027() throws Throwable {\n Range range0 = Range.of((-81L));\n Range range1 = Range.of((-1L));\n boolean boolean0 = range0.intersects(range1);\n assertFalse(boolean0);\n assertFalse(range1.isEmpty());\n \n Range.Comparators.values();\n long long0 = range0.getBegin();\n assertEquals((-81L), long0);\n }",
"@Test(timeout = 4000)\n public void test15() throws Throwable {\n Range.Builder range_Builder0 = new Range.Builder();\n Range.Builder range_Builder1 = range_Builder0.contractBegin(0L);\n Range.Builder range_Builder2 = new Range.Builder(0L);\n range_Builder0.copy();\n Range range0 = range_Builder0.build();\n range_Builder0.shift(265L);\n LinkedList<Range> linkedList0 = new LinkedList<Range>();\n linkedList0.add(range0);\n range_Builder0.expandBegin(1734L);\n range0.equals(range_Builder1);\n assertTrue(range0.isEmpty());\n \n Range.Builder range_Builder3 = new Range.Builder();\n range_Builder0.copy();\n Range range1 = Range.ofLength(1233L);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.ZERO_BASED;\n long long0 = range1.getBegin(range_CoordinateSystem0);\n assertFalse(range1.isEmpty());\n assertEquals(0L, long0);\n \n Range.Comparators.values();\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.ZERO_BASED;\n Range range2 = Range.of(range_CoordinateSystem1, 2147483647L, 2147483647L);\n assertFalse(range2.isEmpty());\n }",
"@Test (timeout=180000)\n public void testOverlapAndOrphan() throws Exception {\n TableName table =\n TableName.valueOf(\"tableOverlapAndOrphan\");\n try {\n setupTable(table);\n assertEquals(ROWKEYS.length, countRows());\n\n // Mess it up by creating an overlap in the metadata\n admin.disableTable(table);\n deleteRegion(conf, tbl.getTableDescriptor(), Bytes.toBytes(\"A\"),\n Bytes.toBytes(\"B\"), true, true, false, true, HRegionInfo.DEFAULT_REPLICA_ID);\n TEST_UTIL.getHBaseAdmin().enableTable(table);\n\n HRegionInfo hriOverlap =\n createRegion(tbl.getTableDescriptor(), Bytes.toBytes(\"A2\"), Bytes.toBytes(\"B\"));\n TEST_UTIL.getHBaseCluster().getMaster().assignRegion(hriOverlap);\n TEST_UTIL.getHBaseCluster().getMaster().getAssignmentManager()\n .waitForAssignment(hriOverlap);\n ServerName server = regionStates.getRegionServerOfRegion(hriOverlap);\n TEST_UTIL.assertRegionOnServer(hriOverlap, server, REGION_ONLINE_TIMEOUT);\n\n HBaseFsck hbck = doFsck(conf, false);\n assertErrors(hbck, new ERROR_CODE[] {\n ERROR_CODE.ORPHAN_HDFS_REGION, ERROR_CODE.NOT_IN_META_OR_DEPLOYED,\n ERROR_CODE.HOLE_IN_REGION_CHAIN});\n\n // fix the problem.\n doFsck(conf, true);\n\n // verify that overlaps are fixed\n HBaseFsck hbck2 = doFsck(conf,false);\n assertNoErrors(hbck2);\n assertEquals(0, hbck2.getOverlapGroups(table).size());\n assertEquals(ROWKEYS.length, countRows());\n } finally {\n cleanupTable(table);\n }\n }",
"public void checkOverlap() {\n\n // Logic that validates overlap.\n if(redCircle.getBoundsInParent().intersects(blueCircle.getBoundsInParent())) {\n title.setText(\"Two circles intersect? Yes\");\n }\n else {\n title.setText(\"Two circles intersect? No\");\n }\n\n // Update fields in red table.\n redCircleCenterXValue.setText(String.valueOf(redCircle.getCenterX()));\n redCircleCenterYValue.setText(String.valueOf(redCircle.getCenterY()));\n redCircleRadiusValue.setText(String.valueOf(redCircle.getRadius()));\n\n // Update fields in blue table.\n blueCircleCenterXValue.setText(String.valueOf(blueCircle.getCenterX()));\n blueCircleCenterYValue.setText(String.valueOf(blueCircle.getCenterY()));\n blueCircleRadiusValue.setText(String.valueOf(blueCircle.getRadius()));\n }",
"@Test\n public void testClassFieldModifierChange() {\n String fileBeforePath = FILE_DIR_FIX + \"0_CompilerConfiguration.java\";\n String fileAfterPath = FILE_DIR_FIX + \"1_CompilerConfiguration.java\";\n Commit testCommit = new Commit(fileBeforePath, fileAfterPath);\n\n // for this file only one change should be detected, in specific LOC\n assertEquals(Range.between(59, 59), testCommit.getChanges().get(0).getSrcNodeFineLOCs());\n assertEquals(Range.between(60, 60), testCommit.getChanges().get(0).getDstNodeFineLOCs());\n }",
"@Test @Ignore\r\n public void testSubListSetAll() {\r\n ObservableList list = createObservableList(true);\r\n int from = 2;\r\n int to = 6;\r\n List subList = list.subList(from, to);\r\n int subSize = subList.size();\r\n List itemsOfSubList = new ArrayList(subList);\r\n// itemsOfSubList.remove(0);\r\n ListChangeReport report = new ListChangeReport(list);\r\n subList.retainAll(itemsOfSubList);\r\n assertEquals(\"wrong assumption: implementation is clever enough to detect retain same\",\r\n 1, report.getEventCount());\r\n Change c = report.getLastChange();\r\n LOG.info(\"changed list: \" + list);\r\n prettyPrint(c);\r\n assertEquals(\"single change\" , 1, getChangeCount(c));\r\n assertEquals(\"removed\", subSize, getRemovedSize(c));\r\n assertEquals(\"added\" , subSize, getAddedSize(c));\r\n assertTrue(\"single replace\" + c, wasSingleReplaced(c));\r\n }",
"private void testPrimaryChange(ExceptionRunnable topologyChange) throws Exception {\n MagicKey backupKey = new MagicKey(cache(0), cache(1));\n MagicKey nonOwnerKey = new MagicKey(cache(0), cache(2));\n\n // node0 is the primary owner\n assertPrimaryOwner(backupKey, 0);\n tm(0).begin();\n cache(0).put(backupKey, \"value-0\");\n Transaction tx0 = tm(0).suspend();\n\n tm(0).begin();\n advancedCache(0).lock(nonOwnerKey);\n Transaction tx1 = tm(0).suspend();\n\n // expect keys to be locked on primary owner\n assertLocked(0, backupKey);\n assertLocked(0, nonOwnerKey);\n\n // switch primary owner: node1\n factory.setOwnerIndexes(new int[][]{{1, 0}, {1, 0}});\n\n topologyChange.run();\n\n assertPrimaryOwner(backupKey, 1);\n assertPrimaryOwner(nonOwnerKey, 1);\n\n AdvancedCache<Object, Object> zeroTimeoutCache1 = advancedCache(1).withFlags(Flag.ZERO_LOCK_ACQUISITION_TIMEOUT);\n assertPutTimeout(backupKey, zeroTimeoutCache1);\n assertLockTimeout(backupKey, zeroTimeoutCache1);\n assertPutTimeout(nonOwnerKey, zeroTimeoutCache1);\n assertLockTimeout(nonOwnerKey, zeroTimeoutCache1);\n\n tm(0).resume(tx0);\n tm(0).commit();\n\n tm(0).resume(tx1);\n tm(0).commit();\n\n assertEquals(\"value-0\", cache(0).get(backupKey));\n assertEquals(\"value-0\", cache(1).get(backupKey));\n assertNull(cache(0).get(nonOwnerKey));\n assertNull(cache(1).get(nonOwnerKey));\n }",
"@Test(timeout = 4000)\n public void test39() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, (-23L), (-23L));\n Range.Builder range_Builder0 = new Range.Builder(range0);\n range_Builder0.expandBegin((-23L));\n range_Builder0.shift((-23L));\n LinkedList<Range> linkedList0 = new LinkedList<Range>();\n linkedList0.add(range0);\n linkedList0.add(range0);\n List<Range> list0 = range0.complementFrom(linkedList0);\n assertEquals(0, list0.size());\n \n Range range1 = Range.of(9223372036854775807L);\n boolean boolean0 = range0.isSubRangeOf(range1);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.RESIDUE_BASED;\n Consumer<Long> consumer0 = (Consumer<Long>) mock(Consumer.class, new ViolatedAssumptionAnswer());\n range1.forEach(consumer0);\n Range.CoordinateSystem range_CoordinateSystem2 = Range.CoordinateSystem.ZERO_BASED;\n range_CoordinateSystem2.toString();\n range0.equals(\"Zero Based\");\n range_CoordinateSystem1.toString();\n boolean boolean1 = range1.endsBefore(range0);\n assertTrue(boolean1 == boolean0);\n assertFalse(boolean1);\n }",
"@Test(timeout = 4000)\n public void test043() throws Throwable {\n Range range0 = Range.ofLength(0L);\n Range range1 = Range.of(0L);\n Range range2 = range1.intersection(range0);\n boolean boolean0 = range0.equals(range2);\n assertFalse(range1.isEmpty());\n assertTrue(range2.isEmpty());\n assertFalse(range2.equals((Object)range1));\n assertTrue(boolean0);\n }",
"@Test\n public void testRucheBrisee2() {\n System.out.println(\"=============================================\");\n System.out.println(\"Test rucheBrisee2 ===========================>\\n\");\n\n HexaPoint orig = new HexaPoint(0, 0, 0);\n Plateau instance = new Plateau();\n Reine reine = new Reine(new JoueurHumain(instance, true, NumJoueur.JOUEUR1));\n instance.ajoutCasesVoisines(orig);\n instance.ajoutCasesVoisines(orig.voisinBas());\n\n System.out.println(\"test sur une ruche vide :\");\n assertFalse(instance.rucheBrisee2(null));\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"test sur une ruche avec un insecte :\");\n instance.ajoutInsecte(reine, orig);\n assertFalse(instance.rucheBrisee2(null));\n assertFalse(instance.rucheBrisee2(reine.getEmplacement()));\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"test sur une ruche avec deux insectes collés :\");\n instance.ajoutInsecte(reine, orig.voisinBas());\n //assertFalse(instance.rucheBrisee2(null));\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"test sur une ruche avec deux insectes non collés :\");\n instance.deleteInsecte(reine, orig.voisinBas());\n instance.ajoutInsecte(reine, orig.voisinBas().voisinBas());\n //assertTrue(instance.rucheBrisee2(null));\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"test sur une ruche avec trois insectes en ligne :\");\n instance = new Plateau();\n instance.ajoutCasesVoisines(orig);\n instance.ajoutCasesVoisines(orig.voisinBas());\n instance.ajoutInsecte(reine, orig);\n instance.ajoutInsecte(reine, orig.voisinBas());\n instance.ajoutInsecte(reine, orig.voisinBas().voisinBas());\n //assertFalse(instance.rucheBrisee2(null));\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"test sur une ruche avec trois insectes en ligne ghost :\");\n instance = new Plateau();\n instance.ajoutCasesVoisines(orig);\n instance.ajoutCasesVoisines(orig.voisinBas());\n instance.ajoutInsecte(reine, orig);\n instance.ajoutInsecte(reine, orig.voisinBas());\n instance.ajoutInsecte(reine, orig.voisinBas().voisinBas());\n assertTrue(instance.rucheBrisee2(new Case(orig.voisinBas())));\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"test sur une ruche casé avec trois insectes :\");\n instance = new Plateau();\n instance.ajoutCasesVoisines(orig);\n instance.ajoutCasesVoisines(orig.voisinBas());\n instance.ajoutInsecte(reine, orig);\n instance.ajoutInsecte(reine, orig.voisinBas().voisinDroiteBas());\n instance.ajoutInsecte(reine, orig.voisinBas().voisinBas().voisinGaucheBas());\n //assertTrue(instance.rucheBrisee2(null));\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"test sur une ruche avec 7 insectes (1 à l'origine et les 6 coins remplit) :\");\n instance = new Plateau();\n instance.ajoutCasesVoisines(orig);\n instance.ajoutCasesVoisines(orig.voisinBas());\n instance.ajoutInsecte(reine, orig);\n instance.ajoutInsecte(reine, orig.voisinBas());\n instance.ajoutInsecte(reine, orig.voisinDroiteBas());\n instance.ajoutInsecte(reine, orig.voisinDroiteHaut());\n instance.ajoutInsecte(reine, orig.voisinGaucheBas());\n instance.ajoutInsecte(reine, orig.voisinGaucheHaut());\n instance.ajoutInsecte(reine, orig.voisinHaut());\n //assertFalse(instance.rucheBrisee2(null));\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"test sur une ruche casé avec 7 insectes :\");\n instance = new Plateau();\n instance.ajoutCasesVoisines(orig);\n instance.ajoutCasesVoisines(orig.voisinBas());\n instance.ajoutInsecte(reine, orig);\n instance.ajoutInsecte(reine, orig.voisinBas().voisinDroiteBas());\n instance.ajoutInsecte(reine, orig.voisinDroiteBas().voisinGaucheBas().voisinBas());\n instance.ajoutInsecte(reine, orig.voisinDroiteHaut().voisinHaut().voisinHaut());\n instance.ajoutInsecte(reine, orig.voisinGaucheBas().voisinGaucheBas().voisinBas().voisinBas());\n instance.ajoutInsecte(reine, orig.voisinGaucheHaut().voisinBas());\n instance.ajoutInsecte(reine, orig.voisinHaut());\n assertTrue(instance.rucheBrisee2(null));\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n }",
"@Test\n\tpublic void seperateRangeTest() {\n\n\t\tsetup();\n\t\tSystem.out.println(\"seperate range test\");\n\t\tZipCodeRange z1 = new ZipCodeRange(new ZipCode(94133), new ZipCode(94133));\n\t\tZipCodeRange z2 = new ZipCodeRange(new ZipCode(94200), new ZipCode(94299));\n\t\tZipCodeRange z3 = new ZipCodeRange(new ZipCode(94600), new ZipCode(94699));\n\n\t\t// Testing\n\t\tZipRangeControl zrc = new ZipRangeControl();\n\t\tzrc.processNewRange(z1);\n\t\tzrc.processNewRange(z2);\n\t\tzrc.processNewRange(z3);\n\n\t\tZipCodeRange z4 = new ZipCodeRange(new ZipCode(94200), new ZipCode(94399));\n\t\trequiredList.add(z1);\n\t\trequiredList.add(z2);\n\t\trequiredList.add(z3);\n\n\t\tZipCodeRange[] ziparray = new ZipCodeRange[requiredList.size()];\n\t\tList<ZipCodeRange> zlist = zrc.getFinalZipRanges();\n\n\t\tfor (int i = 0; i < requiredList.size(); i++) {\n\t\t\tAssert.assertThat(\"Lower Limit match failed at entry\" + i, requiredList.get(i).lower.zipcode,\n\t\t\t\t\torg.hamcrest.CoreMatchers.equalTo(zlist.get(i).lower.zipcode));\n\t\t\tAssert.assertThat(\"Upper Limit match failed at entry\" + i, requiredList.get(i).upper.zipcode,\n\t\t\t\t\torg.hamcrest.CoreMatchers.equalTo(zlist.get(i).upper.zipcode));\n\t\t}\n\t\tclimax();\n\n\t}",
"@Test(timeout = 4000)\n public void test021() throws Throwable {\n Range range0 = Range.ofLength(212L);\n range0.getEnd();\n Range range1 = Range.ofLength(126L);\n Range range2 = range0.intersection(range1);\n assertFalse(range2.isEmpty());\n \n Object object0 = new Object();\n boolean boolean0 = range1.equals(range0);\n assertFalse(boolean0);\n \n long long0 = range0.getEnd();\n assertEquals(211L, long0);\n assertFalse(range0.equals((Object)range2));\n \n long long1 = range1.getBegin();\n assertSame(range1, range2);\n assertEquals(0L, long1);\n }",
"@Test\n public void isOverlap_interval1BeforeInterval2_falseReturned() throws Exception{\n Interval interval1 = new Interval(-1,5);\n Interval interval2 = new Interval(8,12);\n\n boolean result = SUT.isOverlap(interval1,interval2);\n Assert.assertThat(result,is(false));\n }",
"@Test\n public void testStrategyDifference() {\n RangeTree splittable = ranges(\"12[3-5]xx\", \"12[3-9]x\");\n assertThat(factor(splittable, REQUIRE_EQUAL_EDGES))\n .containsExactly(ranges(\"12[3-5]xx\"), ranges(\"12[3-9]x\"))\n .inOrder();\n assertThat(factor(splittable, ALLOW_EDGE_SPLITTING))\n .containsExactly(ranges(\"12[3-5]xx\", \"12[3-9]x\"));\n\n // In this case, the [3-5] edge in the first factor in only a partial overlap with the [4-9]\n // edge we are trying to merge in. Now both strategies will prefer to treat the shorter path\n // as a separate factor, since there's no clean way to merge into the existing edge.\n RangeTree unsplittable = ranges(\"12[3-5]xx\", \"12[4-9]x\");\n assertThat(factor(unsplittable, REQUIRE_EQUAL_EDGES))\n .containsExactly(ranges(\"12[3-5]xx\"), ranges(\"12[4-9]x\"))\n .inOrder();\n assertThat(factor(unsplittable, ALLOW_EDGE_SPLITTING))\n .containsExactly(ranges(\"12[3-5]xx\"), ranges(\"12[4-9]x\"))\n .inOrder();\n\n // TODO: Find a non-complex example where REQUIRE_EQUAL_EDGES yeilds smaller regex.\n // Approximately 50 out of the 1000+ regex's in the XML get smaller with REQUIRE_EQUAL_EDGES.\n }",
"@Test\n public void isOverlap_interval1OverlapsInterval2OnStart_trueReturned() throws Exception{\n Interval interval1 = new Interval(-1,5);\n Interval interval2 = new Interval(3,12);\n\n boolean result = SUT.isOverlap(interval1,interval2);\n Assert.assertThat(result,is(true));\n }",
"@Test(timeout = 4000)\n public void test034() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 2127L, 2127L);\n List<Range> list0 = range0.split(1L);\n List<Range> list1 = range0.complementFrom(list0);\n assertFalse(list1.isEmpty());\n \n range0.getBegin(range_CoordinateSystem0);\n range0.equals(range_CoordinateSystem0);\n long long0 = range0.getBegin(range_CoordinateSystem0);\n assertTrue(range0.isEmpty());\n assertEquals(2127L, long0);\n }",
"@Test\n public void testColorChange() {\n testAnimation.addShape(c, 6, 100);\n // Instantiate the color change\n colorChange1 = new ChangeColor(c,\n 0, 0, 1,\n 0, 1, 0);\n colorChange2 = new ChangeColor(c,\n 0, 1, 0,\n 25, 1, 0);\n testAnimation.addEvent(c, colorChange1, 50, 80);\n testAnimation.addEvent(c, colorChange2, 81, 90);\n assertEquals(\"Shapes:\\n\"\n + \"Name: C\\n\"\n + \"Type: ellipse\\n\"\n + \"Center: (500.0,100.0), X radius: 60.0, Y radius: 30.0, Color: (0,0,1)\\n\"\n + \"Appears at t=6\\n\"\n + \"Disappears at t=100\\n\"\n + \"\\n\"\n + \"C changes color from (0,0,1) to (0,1,0) from time t=50 to t=80\\n\"\n + \"C changes color from (0,1,0) to (25,1,0) from time t=81 to t=90\\n\",\n testAnimation.toString());\n }",
"@Test\n public void testRucheBrisee() {\n System.out.println(\"=============================================\");\n System.out.println(\"Test rucheBrisee ===========================>\\n\");\n\n HexaPoint orig = new HexaPoint(0, 0, 0);\n Plateau instance = new Plateau();\n Reine reine = new Reine(new JoueurHumain(instance, true, NumJoueur.JOUEUR1));\n\n instance.ajoutCasesVoisines(orig);\n\n System.out.println(\"test sur une ruche vide :\");\n assertFalse(instance.rucheBrisee(null, null));\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"test sur une ruche avec un insecte :\");\n instance.ajoutInsecte(reine, orig);\n assertFalse(instance.rucheBrisee(null, null));\n //assertFalse(instance.rucheBrisee(reine));\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"test sur une ruche avec deux insectes collés :\");\n instance.ajoutInsecte(reine, orig.voisinBas());\n assertFalse(instance.rucheBrisee(null, null));\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"test sur une ruche avec deux insectes non collés :\");\n instance.ajoutCasesVoisines(orig.voisinBas());\n instance.deleteInsecte(reine, orig.voisinBas());\n instance.ajoutInsecte(reine, orig.voisinBas().voisinBas());\n assertTrue(instance.rucheBrisee(null, null));\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"test sur une ruche avec trois insectes en ligne :\");\n instance = new Plateau();\n instance.ajoutCasesVoisines(orig);\n instance.ajoutCasesVoisines(orig.voisinBas());\n instance.ajoutInsecte(reine, orig);\n instance.ajoutInsecte(reine, orig.voisinBas());\n instance.ajoutInsecte(reine, orig.voisinBas().voisinBas());\n assertFalse(instance.rucheBrisee(null, null));\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"test sur une ruche avec trois insectes en ligne ghost et casedest :\");\n instance = new Plateau();\n instance.ajoutCasesVoisines(orig);\n instance.ajoutCasesVoisines(orig.voisinBas());\n instance.ajoutInsecte(reine, orig);\n instance.ajoutInsecte(reine, orig.voisinBas());\n instance.ajoutInsecte(reine, orig.voisinBas().voisinBas());\n assertTrue(instance.rucheBrisee(new Case(orig.voisinBas()), new Case(orig.voisinBas().voisinBas().voisinBas())));\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"test sur une ruche casé avec trois insectes :\");\n instance = new Plateau();\n instance.ajoutCasesVoisines(orig);\n instance.ajoutCasesVoisines(orig.voisinBas());\n instance.ajoutInsecte(reine, orig);\n instance.ajoutInsecte(reine, orig.voisinBas().voisinDroiteBas());\n instance.ajoutInsecte(reine, orig.voisinBas().voisinBas().voisinGaucheBas());\n assertTrue(instance.rucheBrisee(null, null));\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"test sur une ruche avec 7 insectes (1 à l'origine et les 6 coins remplit) :\");\n instance = new Plateau();\n instance.ajoutCasesVoisines(orig);\n instance.ajoutCasesVoisines(orig.voisinBas());\n instance.ajoutInsecte(reine, orig);\n instance.ajoutInsecte(reine, orig.voisinBas());\n instance.ajoutInsecte(reine, orig.voisinDroiteBas());\n instance.ajoutInsecte(reine, orig.voisinDroiteHaut());\n instance.ajoutInsecte(reine, orig.voisinGaucheBas());\n instance.ajoutInsecte(reine, orig.voisinGaucheHaut());\n instance.ajoutInsecte(reine, orig.voisinHaut());\n assertFalse(instance.rucheBrisee(null, null));\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"test sur une ruche casé avec 7 insectes :\");\n instance = new Plateau();\n instance.ajoutCasesVoisines(orig);\n instance.ajoutCasesVoisines(orig.voisinBas());\n instance.ajoutInsecte(reine, orig);\n instance.ajoutInsecte(reine, orig.voisinBas().voisinDroiteBas());\n instance.ajoutInsecte(reine, orig.voisinDroiteBas().voisinGaucheBas().voisinBas());\n instance.ajoutInsecte(reine, orig.voisinDroiteHaut().voisinHaut().voisinHaut());\n instance.ajoutInsecte(reine, orig.voisinGaucheBas().voisinGaucheBas().voisinBas().voisinBas());\n instance.ajoutInsecte(reine, orig.voisinGaucheHaut().voisinBas());\n instance.ajoutInsecte(reine, orig.voisinHaut());\n assertTrue(instance.rucheBrisee(null, null));\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n }",
"private boolean overlappingEvents(BpmnShape s1, BpmnShape s2) {\n\t\t\n\t\tdouble firstHeight = s1.getBounds().getHeight() / 2;\n\t\tdouble firstWidth = s1.getBounds().getWidth() / 2;\n\t\tdouble firstX = s1.getBounds().getX();\n\t\tdouble firstY = s1.getBounds().getY() + firstHeight;\n\t\t\n\t\tdouble secondWidth = s2.getBounds().getWidth() / 2;\n\t\tdouble secondHeight = s2.getBounds().getHeight() / 2;\n\t\tdouble secondX = s2.getBounds().getX();\n\t\tdouble secondY = s2.getBounds().getY() + secondHeight;\n\t\t\n\t\tif (firstX > secondX && firstY > secondY){\n\t\t\tif (firstX - firstWidth < secondX + secondWidth && firstY - firstHeight < secondY + secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX > secondX && firstY < secondY){\n\t\t\tif (firstX - firstWidth < secondX + secondWidth && firstY + firstHeight > secondY - secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY > secondY){\n\t\t\tif (firstX + firstWidth > secondX - secondWidth && firstY - firstHeight < secondY + secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY < secondY){\n\t\t\tif (firstX + firstWidth > secondX - secondWidth && firstY + firstHeight > secondY - secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX == secondX && firstY == secondY)\n\t\t\t\treturn true;\n\t\t\n\t\tif (firstX == secondX && firstY > secondY){\n\t\t\tif (firstY - firstHeight < secondY + secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX > secondX && firstY == secondY){\n\t\t\tif (firstX - firstWidth < secondX + secondWidth)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX == secondX && firstY < secondY){\n\t\t\tif (firstY + firstHeight > secondY - secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY == secondY){\n\t\t\tif (firstX + firstWidth > secondX - secondWidth)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\treturn false;\n\t}",
"private boolean overlappingTaskAndEvent(BpmnShape s1, BpmnShape s2) {\n\t\t\n\t\tdouble firstHeight = s1.getBounds().getHeight() / 2;\n\t\tdouble firstWidth = s1.getBounds().getWidth() / 2;\n\t\tdouble firstX = s1.getBounds().getX() + firstWidth;\n\t\tdouble firstY = s1.getBounds().getY() + firstHeight;\n\n\t\tdouble secondWidth = s2.getBounds().getWidth() / 2;\n\t\tdouble secondHeight = s2.getBounds().getHeight() / 2;\n\t\tdouble secondX = s2.getBounds().getX();\n\t\tdouble secondY = s2.getBounds().getY() + secondHeight;\n\t\t\n\t\tif (firstX > secondX && firstY > secondY){\n\t\t\tif (firstX - firstWidth < secondX + secondWidth && firstY - firstHeight < secondY + secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX > secondX && firstY < secondY){\n\t\t\tif (firstX - firstWidth < secondX + secondWidth && firstY + firstHeight > secondY - secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY > secondY){\n\t\t\tif (firstX + firstWidth > secondX - secondWidth && firstY - firstHeight < secondY + secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY < secondY){\n\t\t\tif (firstX + firstWidth > secondX - secondWidth && firstY + firstHeight > secondY - secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX == secondX && firstY == secondY)\n\t\t\t\treturn true;\n\t\t\n\t\tif (firstX == secondX && firstY > secondY){\n\t\t\tif (firstY - firstHeight < secondY + secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX > secondX && firstY == secondY){\n\t\t\tif (firstX - firstWidth < secondX + secondWidth)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX == secondX && firstY < secondY){\n\t\t\tif (firstY + firstHeight > secondY - secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY == secondY){\n\t\t\tif (firstX + firstWidth > secondX - secondWidth)\n\t\t\t\treturn true;\n\t\t\telse \n\t\t\t\treturn false;\n\t\t}\n\t\treturn false;\n\t}",
"@Test\r\n public void testGetOverlappingTimeCells() {\r\n assertEquals(9, cellToInsert.getOverlappingTimeCells(listToCompare).size());\r\n }",
"@Test\n public void testRwbmBoth()\n {\n generateEvents(\"dist-rwbm-both\");\n checkEvents(true, true);\n }",
"@Test\n public void isOverlap_interval1AfterInterval2_falseReturned() throws Exception{\n Interval interval1 = new Interval(-1,5);\n Interval interval2 = new Interval(-10,-3);\n\n boolean result = SUT.isOverlap(interval1,interval2);\n Assert.assertThat(result,is(false));\n }",
"public void test44() {\n //$NON-NLS-1$\n deployBundles(\"test44\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.NON_VOLATILE_TO_VOLATILE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }",
"public void test29() {\n //$NON-NLS-1$\n deployBundles(\"test29\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }",
"public void testGetOldPosition1() {\n WayPointEvent event = new WayPointEvent(edge, wayPoint, offset);\n\n Point pt = event.getOldPosition();\n\n assertEquals(\"Failed to get the correct old position.\", wayPoint, pt);\n\n // verify the point should be set by clone\n pt.x = 876;\n assertEquals(\"The old position getter should return a cloned point.\", wayPoint, event.getOldPosition());\n\n pt = new Point(wayPoint);\n wayPoint.x = 987;\n assertEquals(\"The old position should be set by clone in constructor.\", pt, event.getOldPosition());\n }",
"@Test\n public void testGroupModification() {\n app.getNavigationHelper().gotoGroupPage();\n\n if (! app.getGroupHelper().isThereAGroup()) {//якщо не існує ні одної групи\n app.getGroupHelper().createGroup(new CreateGroupData(\"Tol-AutoCreate\", \"Tol-AutoCreate\", null));\n }\n\n //int before = app.getGroupHelper().getGroupCount(); //count groups before test\n List<CreateGroupData> before = app.getGroupHelper().getGroupList(); // quantity of group before creation\n app.getGroupHelper().selectGroup(before.size() - 1);\n app.getGroupHelper().initGroupModification();\n CreateGroupData group = new CreateGroupData(before.get(before.size()-1).getId(),\"Change1-name\", \"Change2-header\", \"Change3-footer\");\n app.getGroupHelper().fillGroupData(group);\n app.getGroupHelper().submitGroupModification();\n app.getGroupHelper().returnToGroupPage();\n //int after = app.getGroupHelper().getGroupCount();\n List<CreateGroupData> after = app.getGroupHelper().getGroupList(); // quantity of group after creation\n //Assert.assertEquals(after, before);\n Assert.assertEquals(after.size(), before.size());\n\n before.remove(before.size() - 1);\n before.add(group); //add object to the list after creation/modification of a group\n Assert.assertEquals(new HashSet<>(before), new HashSet<>(after)); //compare two lists без учета порядка\n }",
"@Test\n\tpublic void testElementUpdatedEventMultiple() {\n\t\tfinal DiagramElement e = addRootElementAndResetCounter(1);\n\n\t\t// Test the update event\n\t\tdiagram.modify(\"Set Dock Area nd Position\", m -> {\n\t\t\tm.setDockArea(e, DockArea.TOP);\n\t\t\tm.setPosition(e, new Point(100, 100));\n\t\t});\n\n\t\tassertThat(ml.elementUpdatedEventsReceived, is(equalTo(1)));\n\t\tassertThat(ml.modificationsCompletedEventsReceived, is(equalTo(1)));\n\t\tassertThat(ml.getTotalEventsReceived(), is(equalTo(2)));\n\t\tassertThat(ml.lastUpdateEvent.updatedFields, is(equalTo(EnumSet.of(DiagramElementField.DOCK_AREA, DiagramElementField.POSITION))));\n\t}",
"private void verifyChanges() {\n System.out.println(\"Verify changes\"); \n }",
"@Test\n public void testRwbmInternalBoth()\n {\n generateEvents(\"dist-rwbm-internal-both\");\n checkEvents(true, true);\n }",
"@Test\n public void testOverlappingPartitionsOverlappingClusters()\n {\n check(overlappingClustersWithOverlappingPartitions(), 0.75, 1.0);\n }",
"@Test\n public void printInfoRectangleOvalMoveOvalandRectangleOnceChangeCircleColor() {\n model1.addShape(Rectangle.createRectangle(\"R\", new Point.Double(200, 200),\n new Color(1, 0, 0), 1, 100, 50.0, 100.0));\n model1.addShape(Oval.createOval(\"C\", new Point.Double(500, 100),\n new Color(0, 0, 1), 6, 100, 60.0, 30.0));\n model1.addAction(new MoveAction(\"R\", 10, 50, new Point.Double(200, 200),\n new Point.Double(300, 300)));\n model1.addAction(new MoveAction(\"C\", 20, 70, new Point.Double(500, 100),\n new Point.Double(500, 400)));\n model1.addAction(new ChangeColorAction(\"C\", 50, 80,\n new Color(0, 0, 1), new Color(0, 1, 0)));\n textView1.animate(model1, 1, out);\n assertEquals(\"Shapes:\\n\"\n + \"Name: R\\n\"\n + \"Type: rectangle\\n\"\n + \"Lower-left corner: (200.0,200.0), Width: 50.0, Height: 100.0, \"\n + \"Color: (1.0,0.0,0.0)\\n\"\n + \"Appears at t=1.0s\\n\"\n + \"Disappears at t=100.0s\\n\"\n + \"\\n\"\n + \"Name: C\\n\"\n + \"Type: oval\\n\"\n + \"Center: (500.0,100.0), X radius: 60.0, Y radius: 30.0, \"\n + \"Color: (0.0,0.0,1.0)\\n\"\n + \"Appears at t=6.0s\\n\"\n + \"Disappears at t=100.0s\\n\\n\"\n + \"Shape R moves from (200.0,200.0) to (300.0,300.0) from t=10.0s to t=50.0s\\n\"\n + \"Shape C moves from (500.0,100.0) to (500.0,400.0) from t=20.0s to t=70.0s\\n\"\n + \"Shape C changes color from (0.0,0.0,1.0) to (0.0,1.0,0.0) from t=50.0s to \"\n + \"t=80.0s\\n\",\n out.toString());\n }",
"@Test\n public void modifyAddressByCaseIdFound() throws Exception {\n\n CollectionCase rmCase = collectionCase.get(0);\n AddressChangeDTO addressChange = addressChangeDTO.get(0);\n ArgumentCaptor<AddressModification> payloadCapture =\n ArgumentCaptor.forClass(AddressModification.class);\n\n when(dataRepo.readCollectionCase(rmCase.getId())).thenReturn(Optional.of(rmCase));\n\n CaseDTO caseDTO = caseSvc.modifyAddress(addressChange);\n\n verify(eventPublisher, times(1))\n .sendEvent(\n eq(EventType.ADDRESS_MODIFIED),\n eq(Source.RESPONDENT_HOME),\n eq(Channel.RH),\n payloadCapture.capture());\n\n AddressModification payload = payloadCapture.getValue();\n AddressCompact originalAddress = payload.getOriginalAddress();\n AddressCompact newAddress = payload.getNewAddress();\n AddressDTO addressUpdate = addressChange.getAddress();\n\n assertEquals(rmCase.getId(), caseDTO.getCaseId().toString());\n assertEquals(rmCase.getCaseRef(), caseDTO.getCaseRef());\n assertEquals(rmCase.getCaseType(), caseDTO.getCaseType());\n assertEquals(rmCase.getAddress().getAddressType(), caseDTO.getAddressType());\n assertSame(addressChange.getAddress(), caseDTO.getAddress());\n assertEquals(rmCase.getAddress().getRegion(), caseDTO.getRegion());\n\n assertEquals(payload.getCollectionCase().getId().toString(), rmCase.getId());\n\n assertEquals(rmCase.getAddress().getAddressLine1(), originalAddress.getAddressLine1());\n assertEquals(rmCase.getAddress().getAddressLine2(), originalAddress.getAddressLine2());\n assertEquals(rmCase.getAddress().getAddressLine3(), originalAddress.getAddressLine3());\n assertEquals(rmCase.getAddress().getTownName(), originalAddress.getTownName());\n assertEquals(rmCase.getAddress().getPostcode(), originalAddress.getPostcode());\n assertEquals(rmCase.getAddress().getRegion(), originalAddress.getRegion());\n assertEquals(rmCase.getAddress().getUprn(), originalAddress.getUprn());\n\n assertEquals(addressUpdate.getAddressLine1(), newAddress.getAddressLine1());\n assertEquals(addressUpdate.getAddressLine2(), newAddress.getAddressLine2());\n assertEquals(addressUpdate.getAddressLine3(), newAddress.getAddressLine3());\n assertEquals(addressUpdate.getTownName(), newAddress.getTownName());\n assertEquals(addressUpdate.getPostcode(), newAddress.getPostcode());\n assertEquals(rmCase.getAddress().getRegion(), newAddress.getRegion());\n assertEquals(rmCase.getAddress().getUprn(), newAddress.getUprn());\n }",
"public void test24() {\n //$NON-NLS-1$\n deployBundles(\"test24\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }",
"@Test\r\n\tpublic void testCheck_featureBeginEndPositionEqual1() {\r\n\t\tint beginN = 40;\r\n\t\tboolean removeall = true;\r\n\t\tEntry entry = entryFactory.createEntry();\r\n\t\tSequence newsequence = sequenceFactory.createSequenceByte(\"ADFSGDFHGHJK\".getBytes());\r\n\t\tentry.setSequence(newsequence);\r\n\t\tFeature feature1 = featureFactory.createFeature(\"feature1\");\r\n\t\tOrder<Location> order1 = new Order<Location>();\r\n\t\torder1.addLocation(locationFactory.createLocalRange((long) 45,\r\n\t\t\t\t(long) 45));\r\n\t\tfeature1.setLocations(order1);\r\n\t\tentry.addFeature(feature1);\r\n\t\tassertTrue(Utils.shiftLocation(entry, beginN, removeall).size() == 0);\r\n\t}",
"@Test\n public void testSummaryChange() throws Exception {\n String changedSumamry = \"New summary\";\n EventData deltaEvent = prepareDeltaEvent(createdEvent);\n deltaEvent.setSummary(changedSumamry);\n updateEventAsOrganizer(deltaEvent);\n\n /*\n * Check that summary has been updated\n */\n AnalyzeResponse analyzeResponse = receiveUpdateAsAttendee(PartStat.ACCEPTED, CustomConsumers.ALL, changedSumamry, 1);\n AnalysisChange change = assertSingleChange(analyzeResponse);\n assertSingleDescription(change, changedSumamry);\n }",
"public void test33() {\n //$NON-NLS-1$\n deployBundles(\"test33\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.REMOVED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }",
"@Test\n public void testInstantChangeConvertsToTotalChange() {\n model1.addShape(Rectangle.createRectangle(\"R\", new Point.Double(500, 200),\n new Color(0, 0, 0), 0, 10, 10, 10));\n model1.addAction(new ChangeColorAction(\"R\", 0, 10,\n new Color(0, 0, 0), new Color(10, 10, 10)));\n textView1.animate(model1, 1, out);\n assertEquals(\"Shapes:\\n\"\n + \"Name: R\\n\"\n + \"Type: rectangle\\n\"\n + \"Lower-left corner: (500.0,200.0), Width: 10.0, Height: 10.0, Color: \"\n + \"(0.0,0.0,0.0)\\n\"\n + \"Appears at t=0.0s\\n\"\n + \"Disappears at t=10.0s\\n\"\n + \"\\n\"\n + \"Shape R changes color from (0.0,0.0,0.0) to (10.0,10.0,10.0) from \"\n + \"t=0.0s to t=10.0s\\n\",\n out.toString());\n }",
"public void test25() {\n //$NON-NLS-1$\n deployBundles(\"test25\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 2, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.ADDED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.CLINIT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n child = allLeavesDeltas[1];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.FINAL_TO_NON_FINAL_STATIC_CONSTANT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }",
"@Test\n\tpublic final void testClone(){\n\t\tShape starting = shape.clone();\n\t\tassertNotNull( starting );\n\t\tshape.shiftDown();\n\t\tCell[] startingCells = starting.getCells();\n\t\tCell[] endingCells = shape.getCells();\n\t\tfor( int i = 0; i < startingCells.length; i++ ){\n\t\t\tassertNotEquals( \"Cell \" + i, startingCells[i], endingCells[i] );\n\t\t}\n\t}",
"@Test(timeout = 4000)\n public void test17() throws Throwable {\n Range.Builder range_Builder0 = new Range.Builder();\n range_Builder0.contractBegin(0L);\n range_Builder0.copy();\n range_Builder0.copy();\n Range range0 = range_Builder0.build();\n long long0 = 265L;\n range_Builder0.shift(265L);\n Consumer<Object> consumer0 = (Consumer<Object>) mock(Consumer.class, new ViolatedAssumptionAnswer());\n range0.forEach(consumer0);\n Range range1 = Range.of(0L);\n List<Range> list0 = range0.complement(range1);\n List<Range> list1 = range0.complementFrom(list0);\n List<Range> list2 = range0.complementFrom(list1);\n List<Range> list3 = range0.complementFrom(list2);\n range0.complementFrom(list3);\n Range.of((-1147L), 0L);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range2 = Range.of(range_CoordinateSystem0, 0L, 0L);\n Range range3 = range2.intersection(range0);\n range0.getEnd();\n range3.intersects(range0);\n // Undeclared exception!\n try { \n Range.parseRange(\"q)fxUX9s]Tp\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // can not parse q)fxUX9s]Tp into a Range\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }",
"@Test\n\tpublic void TEAM3_CONTROLLER_UT02() {\n\t\t// PRECONDITIONS\n\t\tClassDetailsStub c = new ClassDetailsStub(TEST_CONFIG.SatOnly);\n\t\t\n\t\tArrayList<ClassDetailsStub> s = new ArrayList<ClassDetailsStub>();\n\t\ts.add(c);\n\t\t\n\t\tScheduleMakerController smc = new ScheduleMakerController();\n\t\t\n\t\t// INPUT\n\t\tCollection<ArrayList<ClassDetailsStub>> oneSchedule = new ArrayList<ArrayList<ClassDetailsStub>>();\n\t\toneSchedule.add(s);\n\t\t\n\t\t// EXPECTED OUTPUT\n\t\tboolean schedulesConflict = smc.conflict(oneSchedule);\n\t\tassertFalse(schedulesConflict);\n\t}",
"@Test\n public void isOverlap_interval1ContainsInterval2OnEnd_trueReturned() throws Exception{\n Interval interval1 = new Interval(-1,5);\n Interval interval2 = new Interval(0,3);\n\n boolean result = SUT.isOverlap(interval1,interval2);\n Assert.assertThat(result,is(true));\n }",
"public void test26() {\n //$NON-NLS-1$\n deployBundles(\"test26\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }",
"@Test\n public void testDiff() {\n \t//create data set\n final LastWriteWinSet<String> lastWriteWinSet1 = new LastWriteWinSet<>();\n lastWriteWinSet1.add(time3, \"php\");\n lastWriteWinSet1.add(time1, \"java\");\n lastWriteWinSet1.add(time2, \"python\");\n lastWriteWinSet1.add(time1, \"scala\");\n lastWriteWinSet1.delete(time2, \"scala\");\n\n final LastWriteWinSet<String> lastWriteWinSet2 = new LastWriteWinSet<>();\n lastWriteWinSet2.add(time1, \"php\");\n lastWriteWinSet2.add(time3, \"python\");\n lastWriteWinSet2.add(time1, \"scala\");\n lastWriteWinSet2.delete(time2, \"php\");\n\n // run test\n final LastWriteWinSet<String> resultSet = lastWriteWinSet1.diff(lastWriteWinSet2);\n \n assertTrue(resultSet.getData().size() == 3);\n assertTrue(resultSet.getData().contains(\"php\"));\n assertTrue(resultSet.getData().contains(\"python\"));\n assertTrue(resultSet.getData().contains(\"java\"));\n \n final GrowOnlySet<LastWriteWinSet.ItemTD<String>> resultAddSet = resultSet.getAddSet();\n final Set<LastWriteWinSet.ItemTD<String>> addedData = resultAddSet.getData();\n assertTrue(addedData.size() == 3);\n assertTrue(addedData.contains(new LastWriteWinSet.ItemTD<>(3, \"php\")));\n assertTrue(addedData.contains(new LastWriteWinSet.ItemTD<>(1, \"java\")));\n assertTrue(addedData.contains(new LastWriteWinSet.ItemTD<>(2, \"python\")));\n\n final GrowOnlySet<LastWriteWinSet.ItemTD<String>> resultDeleteSet = resultSet.getDeleteSet();\n final Set<LastWriteWinSet.ItemTD<String>> deletedData = resultDeleteSet.getData();\n assertTrue(deletedData.size() == 1);\n assertTrue(deletedData.contains(new LastWriteWinSet.ItemTD<>(2, \"scala\")));\n }",
"public void test_setClippingIIII() {\n}",
"public boolean doOverlapNew(VIntWritable[] e1, VIntWritable[] e2){\n\t\tSet<VIntWritable> intersection = new HashSet<>(Arrays.asList(e1));\t\t\t\t\n\t\tintersection.retainAll(Arrays.asList(e2));\t\t\n\t\t\n\t\t//System.out.println(\"overlap? \"+ (intersection.isEmpty() ? false : true));\n\t\treturn intersection.isEmpty() ? false : true;\n\t\t\n\t\t//SOLUTION 2: slower O(nlogn) but needs less space\n//\t\tArrays.sort(e1); //O(nlogn)\n//\t\tfor (VIntWritable tmp : e2) { //O(m)\n//\t\t\tif (Arrays.binarySearch(e1, tmp) == -1) //O(logm)\n//\t\t\t\treturn false;\n//\t\t}\n//\t\treturn true;\n\t\t\n\t\t\n\t\t\t\n\t}"
]
| [
"0.6177526",
"0.61656755",
"0.6077033",
"0.60529757",
"0.6003321",
"0.5994551",
"0.59931475",
"0.5981264",
"0.59367645",
"0.59136105",
"0.5897622",
"0.5894461",
"0.58805484",
"0.5874779",
"0.587306",
"0.58388466",
"0.58222795",
"0.58082426",
"0.5787942",
"0.5784262",
"0.5744422",
"0.5719615",
"0.5714389",
"0.5697364",
"0.56934124",
"0.56820214",
"0.56715715",
"0.56660867",
"0.56619287",
"0.56598043",
"0.5633716",
"0.5632669",
"0.56266224",
"0.56119853",
"0.557487",
"0.55636466",
"0.55613536",
"0.55522925",
"0.55521125",
"0.55509967",
"0.5550841",
"0.55425036",
"0.55336976",
"0.55331504",
"0.5531879",
"0.5531553",
"0.55186105",
"0.5512856",
"0.5512466",
"0.55061406",
"0.5504394",
"0.5503969",
"0.5498607",
"0.54956466",
"0.5494358",
"0.54933137",
"0.5493238",
"0.54887384",
"0.5487979",
"0.54850054",
"0.5483603",
"0.5483509",
"0.5481296",
"0.5479432",
"0.5475566",
"0.5473915",
"0.5472545",
"0.547201",
"0.5469591",
"0.54477173",
"0.5442701",
"0.5438992",
"0.54334986",
"0.5433418",
"0.54329854",
"0.5428465",
"0.5426645",
"0.5422897",
"0.5417256",
"0.54145104",
"0.5412474",
"0.5411519",
"0.54095334",
"0.54084635",
"0.54066455",
"0.54011524",
"0.54001725",
"0.5398838",
"0.5397738",
"0.53909254",
"0.53903395",
"0.53865874",
"0.5381086",
"0.53781784",
"0.537525",
"0.5372777",
"0.5367314",
"0.5366682",
"0.5365677",
"0.53618264"
]
| 0.6764081 | 0 |
______________________________________ AddMove() Test ________________________________________. | @Test
public void testAddMove() {
testAnimation.addShape(r, 1, 100);
testAnimation.addShape(c, 6, 100);
// Instantiate the moves
move1 = new MoveShape(r, 200.0, 200.0, 300.0, 300.0);
move2 = new MoveShape(c, 500.0, 100.0, 500.0, 400.0);
move3 = new MoveShape(r, 300.0, 300.0, 200.0, 200.0);
testAnimation.addEvent(r, move1, 10, 50);
testAnimation.addEvent(c, move2, 20, 70);
testAnimation.addEvent(r, move3, 70, 100);
assertEquals("Shapes:\n"
+ "Name: R\n"
+ "Type: rectangle\n"
+ "Min corner: (200.0,200.0), Width: 50.0, Height: 100.0, Color: (1,0,0)\n"
+ "Appears at t=1\n"
+ "Disappears at t=100\n"
+ "\n"
+ "Name: C\n"
+ "Type: ellipse\n"
+ "Center: (500.0,100.0), X radius: 60.0, Y radius: 30.0, Color: (0,0,1)\n"
+ "Appears at t=6\n"
+ "Disappears at t=100\n"
+ "\n"
+ "R moves from (200.0,200.0) to (300.0,300.0) from time t=10 to t=50\n"
+ "C moves from (500.0,100.0) to (500.0,400.0) from time t=20 to t=70\n"
+ "R moves from (300.0,300.0) to (200.0,200.0) from time t=70 to t=100\n",
testAnimation.toString());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void moveAdded(int playerIndex, Move move);",
"public void addMove() {\n\t\tmove = \"mv \" + posX + \" \" + posY;\n\t}",
"public void move(){\n\t\t\n\t}",
"protected void addMove(Move move) {\n moveHistory.add(move);\n pointer++;\n }",
"boolean makeMove();",
"public void move() {\n\r\n\t}",
"public void move() {\n\n }",
"@Override\n\tpublic void move() {\n\t\t\n\t}",
"public void Move()\n {\n \n }",
"public void move() {\r\n\t\tmoveCount++;\r\n\t}",
"@Test\n\tpublic void testMove() {\n\t\tSquare square = new Square();\n\t\tPlayer player = new Player(new Square(), 0);\n\t\t\n\t\tassertFalse(player.hasMoved());\n\t\t\n\t\tplayer.move(square);\n\t\tassertTrue(player.hasMoved());\n\t}",
"public void move();",
"public void move();",
"@Override\n\tpublic void move() {\n\n\t}",
"@Override\n \t\t\t\tpublic void doMove() {\n \n \t\t\t\t}",
"@Override\n\tpublic void makeNextMove() \n\t{\n\t}",
"private void addToMoves(char move) {\n this.prevMoves += move;\n }",
"@Override\n\tpublic void move() {\n\t}",
"boolean doMove();",
"public boolean move();",
"@Override\r\n\tpublic void move() {\n\r\n\t}",
"public void addMove(Move tryMove, ArrayList<ArrayList<Move>> moves){\n//\t\t\tSystem.out.println(\"Added: \" + getClassNotation(tryMove.xFrom, tryMove.yFrom) +\"\" + \" \"+ getClassNotation(tryMove.xTo, tryMove.yTo));\n\t\t\tArrayList<Move> move = new ArrayList<Move>();\n\t\t\tmove.add(tryMove);\n\t\t\tmoves.add(move);\n }",
"void move();",
"public static void moveTest() {\n\t\tOthelloBoard Board = new OthelloBoard(BOARD_SIZE,BOARD_SIZE);\n\t Board.setBoard();\n\t Board.decPieceCount();\n\t System.out.println(Board.getPieceCount());\n\t System.out.println(Board.move(\n\t TEST_MOVE_X1, TEST_MOVE_Y1, Board.WHITE_PIECE));\n\t Board.m_Pieces[TEST_PIECE_X][TEST_PIECE_Y]=Board.WHITE_PIECE;\n\t System.out.println(\"\");\n\t System.out.println(\"\");\n\t\tBoard.checkWin();\n\t\tSystem.out.println(\"Valid inputs\");\n\t\tSystem.out.println(\"OthelloBoard.move() - Begin\");\n\t\tSystem.out.println(\"Expected output: false\");\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.println(\"Actual output: \" + \n\t\tBoard.move(OUTPUT_MOVE_TEST_X,OUTPUT_MOVE_TEST_Y,Board.BLACK_PIECE));\n\t System.out.println(\"\");\n\t}",
"public abstract int makeMove();",
"@Override\n public void move () {\n }",
"@Test\n public void testMove() {\n Point Left_1_North = Day1.move(\"L\", 1, new Point(0, 0), \"NORTH\");\n assertEquals(new Point(-1, 0), Left_1_North);\n\n Point Left_1_South = Day1.move(\"L\", 1, new Point(0, 0), \"SOUTH\");\n assertEquals(new Point(1, 0), Left_1_South);\n\n Point Left_1_East = Day1.move(\"L\", 1, new Point(0, 0), \"EAST\");\n assertEquals(new Point(0, 1), Left_1_East);\n\n Point Left_1_West = Day1.move(\"L\", 1, new Point(0, 0), \"WEST\");\n assertEquals(new Point(0, -1), Left_1_West);\n\n //turn right when facing North, South, East and West\n Point Right_1_North = Day1.move(\"R\", 1, new Point(0, 0), \"NORTH\");\n assertEquals(new Point(1, 0), Right_1_North);\n\n Point Right_1_South = Day1.move(\"R\", 1, new Point(0, 0), \"SOUTH\");\n assertEquals(new Point(-1, 0), Right_1_South);\n\n Point Right_1_East = Day1.move(\"R\", 1, new Point(0, 0), \"EAST\");\n assertEquals(new Point(0, -1), Right_1_East);\n\n Point Right_1_West = Day1.move(\"R\", 1, new Point(0, 0), \"WEST\");\n assertEquals(new Point(0, 1), Right_1_West);\n\n //wrong Input, return current point\n Point wrong = Day1.move(\"A\", 1, new Point(0, 0), \"B\");\n assertEquals(new Point(0, 0), wrong);\n\n }",
"private void addMove(PossibleMove posMov) {\r\n\t\tassert posMov != null;\r\n\r\n\t\tboolean uniqueMove = true;\r\n\t\tfor (PossibleMove p : possibleMoves) {\r\n\t\t\tif (p.equals(posMov)) {\r\n\t\t\t\tuniqueMove = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (uniqueMove) {\r\n\t\t\tpossibleMoves.add(posMov);\r\n\t\t}\r\n\t}",
"public abstract void Move();",
"@Override\n\tvoid move(int x, int y) {\n\n\t}",
"@Test\n public void testMove() {\n System.out.println(\"Animal.move\");\n animal1.move(101);\n animal2.move(202);\n assertEquals(101, animal1.getLocation());\n assertEquals(202, animal2.getLocation());\n }",
"public void InvalidMove();",
"@Override\n\tpublic void move(int xPos, int yPos) {\n\t}",
"@Test\n public void moveExample2() {\n MarbleSolitaireModel exampleBoard = new TriangleSolitaireModelImpl(7, 6, 6);\n exampleBoard.move(4, 4, 6, 6);\n assertEquals(\" O\\n\" +\n \" O O\\n\" +\n \" O O O\\n\" +\n \" O O O O\\n\" +\n \" O O O O _\\n\" +\n \" O O O O O _\\n\" +\n \"O O O O O O O\", exampleBoard.getGameState());\n }",
"public abstract void move();",
"public abstract void move();",
"public abstract void move();",
"public abstract void move();",
"public abstract void move();",
"public abstract void move();",
"public abstract void move();",
"void addMove(Move userChoice) {\n moves.add(userChoice);\n }",
"public void getMove(){\n\t\t\n\t}",
"abstract void move();",
"@Test\n public void moveExample1() {\n MarbleSolitaireModel exampleBoard = new TriangleSolitaireModelImpl(6);\n exampleBoard.move(2, 0, 0, 0);\n\n assertEquals(\" O\\n\" +\n \" _ O\\n\" +\n \" _ O O\\n\" +\n \" O O O O\\n\" +\n \" O O O O O\\n\" +\n \"O O O O O O\", exampleBoard.getGameState());\n }",
"@Test\n public void moveExample1() {\n MarbleSolitaireModel exampleBoard = new MarbleSolitaireModelImpl();\n exampleBoard.move(1, 3, 3, 3);\n\n assertEquals(\" O O O\\n\"\n + \" O _ O\\n\"\n + \"O O O _ O O O\\n\"\n + \"O O O O O O O\\n\"\n + \"O O O O O O O\\n\"\n + \" O O O\\n\"\n + \" O O O\", exampleBoard.getGameState());\n }",
"private void randomMove() {\n }",
"void doneMoving();",
"@Test\n public void moveExample2() {\n MarbleSolitaireModel exampleBoard = new MarbleSolitaireModelImpl(5);\n exampleBoard.move(6, 4, 6, 6);\n assertEquals(\" O O O O O\\n\"\n + \" O O O O O\\n\"\n + \" O O O O O\\n\"\n + \" O O O O O\\n\"\n + \"O O O O O O O O O O O O O\\n\"\n + \"O O O O O O O O O O O O O\\n\"\n + \"O O O O _ _ O O O O O O O\\n\"\n + \"O O O O O O O O O O O O O\\n\"\n + \"O O O O O O O O O O O O O\\n\"\n + \" O O O O O\\n\"\n + \" O O O O O\\n\"\n + \" O O O O O\\n\"\n + \" O O O O O\", exampleBoard.getGameState());\n }",
"private void addToMoveQueue() {\n\t\tSimulation.INSTANCE.getMoveQueue().offer(new Move(prevNode, currentNode));\n\t}",
"@Test\n public void moveExample3() {\n MarbleSolitaireModel exampleBoard = new MarbleSolitaireModelImpl();\n exampleBoard.move(1, 3, 3, 3);\n exampleBoard.move(2, 1, 2, 3);\n\n assertEquals(\" O O O\\n\"\n + \" O _ O\\n\"\n + \"O _ _ O O O O\\n\"\n + \"O O O O O O O\\n\"\n + \"O O O O O O O\\n\"\n + \" O O O\\n\"\n + \" O O O\", exampleBoard.getGameState());\n }",
"void move(IntVector delta);",
"@Test\n //test if the jumper can move if it's surrounded by the jumpers\n public void testMove() {\n world.add(new Location(FOUR , FOUR), jumper);\n world.add(new Location(THREE, FOUR), new jumper());\n world.add(new Location(FIVE, FOUR), new jumper());\n world.add(new Location(FOUR, THREE), new jumper());\n world.add(new Location(FOUR, FIVE), new jumper());\n jumper.act();\n assertEquals(new Location(TWO, FOUR), jumper.getLocation());\n }",
"public boolean addMove(Table table) {\r\n\t\tif (table.getMovingNum() == 0) {\r\n\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"private boolean move(int move, String sAnnotation, boolean bUpdate) {\n if (jni.move(move) == 0) {\n return false;\n }\n addPGNEntry(jni.getNumBoard() - 1, jni.getMyMoveToString(), sAnnotation, jni.getMyMove(), -1);\n\n return true;\n }",
"boolean prepareToMove();",
"@Test(expected = IllegalArgumentException.class)\n public void testAddMoveEventWithoutAddShape() {\n move1 = new MoveShape(r, 200.0, 200.0, 300.0, 300.0);\n testAnimation.addEvent(r, move1, 10, 50);\n }",
"public void move(int delta);",
"public abstract void move(Position position);",
"public void incrementMoves()\n {\n moves ++;\n }",
"public boolean GetMove();",
"@Test\n public void testMovePieceValidMove() {\n Position pos = new Position(board, 3, 3);\n Pawn pawn = new Pawn(Color.WHITE);\n board.getSquare(pos).addPiece(pawn);\n pawn.setPosition(pos);\n Position pos1 = new Position(board, 4, 3);\n assertTrue(chess.movePiece(board.getSquare(pos), board.getSquare(pos1), pawn));\n }",
"protected int getMove() \t\t\t\t{\treturn move;\t\t}",
"public void move(int distance);",
"public void move() {\r\n posX += movementX;\r\n posY += movementY;\r\n anchorX += movementX;\r\n anchorY += movementY;\r\n }",
"protected void setMove(int _move)\t\t{\tmove = _move;\t\t}",
"public void testMove() throws RepositoryException{\n String src = \"src\";\n String dest=\"dest\";\n \n session.move(src, dest);\n sessionControl.replay();\n sfControl.replay();\n \n jt.move(src, dest);\n }",
"public abstract void move(int newXPosition, int newYPosition, PiecePosition position) throws BoardException;",
"void makeMove(Location loc);",
"private boolean isThereValidMove() {\n\t\treturn true;\n\t}",
"@Test\n public void moveExample3() {\n MarbleSolitaireModel exampleBoard = new TriangleSolitaireModelImpl();\n exampleBoard.move(2, 0, 0, 0);\n exampleBoard.move(4, 0, 2, 0);\n\n assertEquals(\" O\\n\" +\n \" _ O\\n\" +\n \" O O O\\n\" +\n \" _ O O O\\n\" +\n \"_ O O O O\", exampleBoard.getGameState());\n }",
"private void addSetupMove(Move move)\n {\n if (!m_current.hasSetup()) {\n Node setup = new Node();\n m_current.addChild(setup);\n m_current = setup;\n }\n \n m_guiboard.clearMarks();\n \n // add the setup stone to the set of setup stones\n m_current.addSetup(move.getColor(), move.getPoint());\n m_current.setPlayerToMove(move.getColor());\n \n // and set the color to play next \n m_tomove = move.getColor();\n m_toolbar.setToMove(m_tomove.toString());\n \n m_guiboard.setColor(move.getPoint(), move.getColor());\n m_guiboard.paintImmediately();\n \n htpPlay(move);\n \n m_statusbar.setMessage(\"Added setup stone (\" + move.getColor().toString() +\n \", \" + move.getPoint().toString() + \")\");\n \n setGameChanged(true);\n setFrameTitle();\n }",
"public abstract void move(int deltaX, int deltaY);",
"public abstract void move(int p_index) ;",
"@Test\n\tpublic final void testMoveTo() {\n\t\tRoom testRoom = new Room(\"247\", 2, \"Computer Lab\");\n\t\t\n\t\tanimal.moveTo(testForest);\n\t\tassertEquals(\"Move To Forest\", animal.location(), testForest);\n\t\t\n\t\tanimal.moveTo(testRoom);\n\t\tassertEquals(\"Move To Room\", animal.location(), testForest);\t\n\t\t\n\t}",
"Move(Move m)\n\t{\n\t\tif(m != null) {\n\t\t\tpieceRow = m.pieceRow;\n\t\t\tpieceCol = m.pieceCol;\n\t\t\tdestRow = m.destRow;\n\t\t\tdestCol = m.destCol;\n\t\t}\n\t}",
"void makeMove(Move move) {\r\n makeMove(move.from(), move.to());\r\n }",
"void move(Tile t);",
"void movePiece() {\n\n }",
"void makeMove(Move mov) {\n assert legalMove(mov);\n if (mov.isJump()) {\n assert checkJump(mov, false);\n Move rec = mov;\n while (rec != null) {\n set(rec.toIndex(), _whoseMove);\n set(rec.fromIndex(), EMPTY);\n set(rec.jumpedCol(), rec.jumpedRow(), EMPTY);\n rec = rec.jumpTail();\n }\n setDirection(mov.fromIndex(), \"Both\");\n } else {\n int to = mov.toIndex();\n int from = mov.fromIndex();\n set(mov.toIndex(), _whoseMove);\n set(mov.fromIndex(), EMPTY);\n if (mov.isRightMove()) {\n setDirection(to, \"Right\");\n } else if (mov.isLeftMove()) {\n setDirection(to, \"Left\");\n } else {\n setDirection(to, \"Both\");\n }\n setDirection(from, \"Both\");\n }\n\n _history.add(mov);\n _whoseMove = _whoseMove.opposite();\n _gameOver = !isMove();\n setChanged();\n notifyObservers();\n }",
"@Override // see item.java\n\tpublic void move(Direction dir, Distance d) {\n\n\t}",
"public abstract void move(int elapsedTime);",
"@Override\n public void move() {\n _location.x++;\n }",
"@Override\r\n\tprotected void onMove() {\n\t\t\r\n\t}",
"public void AskForMove();",
"private void updateMoveList(Move m) {\n \t//first check for castling move\n \tif(m.getSource().getName().equals(\"King\")) {\n \tint sx = m.getSource().getLocation().getX();\n \tint dx = m.getDest().getLocation().getX();\n \t\n \t//castle king side\n \tif(dx - sx == 2) {\n \t\tmoveList.add(\"0-0\");\n \t\treturn;\n \t}\n \t//castle queen side\n \telse if(sx - dx == 2) {\n \t\tmoveList.add(\"0-0-0\");\n \t\treturn;\n \t}\n \t}\n \t\n \t//now do normal checks for moves\n \t//if no piece, normal notation\n \tif(m.getDest().getName().equals(\"None\")) {\n \t\t\n \t\t//check for en passant\n \t\tif(m.getSource().getName().equals(\"Pawn\")) {\n \t\t\t\n \t\t\t//it's only en passant if the pawn moves diagonally to an empty square \n \t\t\tif(m.getSource().getLocation().getX() != m.getDest().getLocation().getX()) {\n \t\t\t\tmoveList.add(m.getSource().getLocation().getFile()+ \"x\" + m.getDest().getLocation().getNotation());\n \t\t\t\treturn;\n \t\t\t}\n \t\t}\n \t\t\n \t\tmoveList.add(m.getSource().getID() + m.getDest().getLocation().getNotation());\n \t}\n \t//add \"x\" for capturing\n \t//for pawn, it's a bit different\n \telse if(m.getSource().getName().equals(\"Pawn\")) {\n \t\tmoveList.add(m.getSource().getLocation().getFile()+ \"x\" + m.getDest().getLocation().getNotation());\n \t}\n \telse {\n \t\tmoveList.add(m.getSource().getID() + \"x\" + m.getDest().getLocation().getNotation());\n \t}\n }",
"@Test(expected = IllegalArgumentException.class)\n public void moveException1() {\n MarbleSolitaireModel exampleBoard = new MarbleSolitaireModelImpl();\n exampleBoard.move(0, 3, 3, 3);\n }",
"public abstract void move(int row, int col) throws IllegalMoveException;",
"public abstract Piece movePiece(Move move);",
"public abstract boolean changeMove();",
"@Test\n public void moveExample4() {\n MarbleSolitaireModel exampleBoard = new MarbleSolitaireModelImpl();\n exampleBoard.move(1, 3, 3, 3);\n exampleBoard.move(2, 1, 2, 3);\n exampleBoard.move(2, 4, 2, 2);\n exampleBoard.move(2, 6, 2, 4);\n exampleBoard.move(4, 6, 2, 6);\n exampleBoard.move(3, 4, 3, 6);\n exampleBoard.move(4, 4, 4, 6);\n exampleBoard.move(3, 2, 3, 4);\n exampleBoard.move(2, 4, 4, 4);\n exampleBoard.move(4, 3, 4, 5);\n exampleBoard.move(4, 6, 4, 4);\n exampleBoard.move(4, 1, 4, 3);\n exampleBoard.move(5, 3, 3, 3);\n exampleBoard.move(3, 0, 3, 2);\n exampleBoard.move(2, 2, 4, 2);\n\n assertEquals(false, exampleBoard.isGameOver());\n assertEquals(\" O O O\\n\"\n + \" O _ O\\n\"\n + \"O _ _ _ _ _ O\\n\"\n + \"_ _ _ O _ _ O\\n\"\n + \"O _ O _ O _ _\\n\"\n + \" O _ O\\n\"\n + \" O O O\", exampleBoard.getGameState());\n }",
"public char makeMove(Coordinate move);",
"@Test(expected = IllegalArgumentException.class)\n public void moveException2() {\n MarbleSolitaireModel exampleBoard = new MarbleSolitaireModelImpl();\n exampleBoard.move(0, 3, 1, 3);\n }",
"@Test\n public void testMove() {\n System.out.println(\"move\");\n int[] number = {0, 0, 0, 1, 2, 3, 4, 5, 6, 7};\n int pos = -2;\n AbstractMethod instance = new AbstractMethodImpl();\n int[] expResult = {0, 1, 2, 3, 4, 5, 6, 7, 0, 0};\n int[] result = instance.move(number, pos);\n assertArrayEquals(expResult, result);\n\n }",
"public void calRightMove() {\n }",
"@Test\n public void moveExample4() {\n MarbleSolitaireModel exampleBoard = new TriangleSolitaireModelImpl();\n exampleBoard.move(2, 0, 0, 0);\n exampleBoard.move(4, 0, 2, 0);\n exampleBoard.move(3, 2, 3, 0);\n exampleBoard.move(3, 0, 1, 0);\n exampleBoard.move(0, 0, 2, 0);\n exampleBoard.move(1, 1, 3, 1);\n exampleBoard.move(4, 2, 4, 0);\n\n assertEquals(false, exampleBoard.isGameOver());\n assertEquals(\" _\\n\" +\n \" _ _\\n\" +\n \" O _ O\\n\" +\n \" _ O _ O\\n\" +\n \"O _ _ O O\", exampleBoard.getGameState());\n }",
"public void move(){\n System.out.println(\"I can't move...\");\n }",
"public abstract void makeMove(GameStatus gameStatus);",
"public abstract Point move(Point position);",
"public abstract boolean attemptMove(Player currentPlayerObj, Coordinate move);"
]
| [
"0.7629127",
"0.75153625",
"0.7310868",
"0.71793616",
"0.7163632",
"0.7149608",
"0.7126016",
"0.71211994",
"0.71157753",
"0.7112245",
"0.7090252",
"0.7073843",
"0.7073843",
"0.704769",
"0.7021985",
"0.7014313",
"0.701302",
"0.698862",
"0.6982679",
"0.6973917",
"0.69240874",
"0.69189036",
"0.6916741",
"0.68452233",
"0.68308157",
"0.6817265",
"0.67925495",
"0.6781296",
"0.67773664",
"0.67541593",
"0.6753986",
"0.6752265",
"0.6748898",
"0.67440355",
"0.6721403",
"0.6721403",
"0.6721403",
"0.6721403",
"0.6721403",
"0.6721403",
"0.6721403",
"0.6712804",
"0.67030853",
"0.66991454",
"0.66980135",
"0.6685753",
"0.66629636",
"0.66609246",
"0.6634859",
"0.6601204",
"0.6600088",
"0.65999717",
"0.6592965",
"0.65746444",
"0.656705",
"0.6566798",
"0.65644467",
"0.6559677",
"0.6559495",
"0.6554197",
"0.6554136",
"0.6549751",
"0.6517516",
"0.6514877",
"0.6511255",
"0.650245",
"0.65004194",
"0.649594",
"0.64878047",
"0.6482985",
"0.64796954",
"0.6477595",
"0.64772576",
"0.6476501",
"0.64716506",
"0.6467051",
"0.6450756",
"0.64441675",
"0.64374995",
"0.64218646",
"0.6421138",
"0.6407789",
"0.6406965",
"0.6390439",
"0.6389458",
"0.6384863",
"0.6368008",
"0.63672125",
"0.63660485",
"0.63463974",
"0.63452226",
"0.63388693",
"0.6337415",
"0.6330549",
"0.6328509",
"0.6321258",
"0.632063",
"0.63203436",
"0.6320056",
"0.63181686"
]
| 0.6429664 | 79 |
__________________________________ AddSizeChange() Test ______________________________________. | @Test
public void testAddSizeChange() {
testAnimation.addShape(r, 1, 100);
// Instantiate the size change
size1 = new ScaleShape(r, 50.0, 100.0, 25.0, 100.0);
size2 = new ScaleShape(r, 25.0, 100.0, 25.0, 13.0);
testAnimation.addEvent(r, size1, 51, 70);
testAnimation.addEvent(r, size2, 71, 73);
assertEquals("Shapes:\n"
+ "Name: R\n"
+ "Type: rectangle\n"
+ "Min corner: (200.0,200.0), Width: 50.0, Height: 100.0, Color: (1,0,0)\n"
+ "Appears at t=1\n"
+ "Disappears at t=100\n"
+ "\n"
+ "R changes width from 50.0 to 25.0 from time t=51 to t=70"
+ "\nR changes height from 100.0 to 13.0 from time t=71 to t=73\n",
testAnimation.toString());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract void adjustSize(long size);",
"public abstract void sizeChanged(SizeChangedEvent event);",
"@Override\n\tprotected void changeSize(int x, int y, int previousX, int previousY) {\n this.setWidth(this.getWidth()+(x-previousX));\n this.setHeight(this.getHeight()+(y-previousY));\n this.setX(this.getX()+(x-previousX));\n\t}",
"@Override\n protected void sizeChanged () {\n }",
"public void setSize(int newSize);",
"public void setSize(int newSize);",
"public void increaseSize(int delta){\n\t\tif(scale < scaleMax)\n\t\t\tscale += enlarge * delta;\n\t}",
"public void sizeIncrease1() {\n\t\t _size++;\n\t}",
"private void actionModifySize() {\n CSizePanel csizePanel = new CSizePanel(layoutPanel.getLayoutSize(),\n false);\n int result = JOptionPane.showConfirmDialog(this, csizePanel,\n \"Modify layout size\", JOptionPane.OK_CANCEL_OPTION);\n if (result == JOptionPane.OK_OPTION) { // Afirmative\n try {\n int sizeX = Integer\n .parseInt(csizePanel.tfields[CSizePanel.idxX].getText());\n int sizeY = Integer\n .parseInt(csizePanel.tfields[CSizePanel.idxY].getText());\n if (sizeX >= LayoutPanel.minXCells\n && sizeX <= LayoutPanel.maxXCells\n && sizeY >= LayoutPanel.minYCells\n && sizeY <= LayoutPanel.maxYCells) {\n RepType rtype = RepType.CLEAR;\n if (csizePanel.newButton.isSelected()) {\n rtype = RepType.CLEAR;\n } else if (csizePanel.rptButton.isSelected()) {\n rtype = RepType.REPEAT;\n } else if (csizePanel.altButton.isSelected()) {\n rtype = RepType.ALT;\n }\n\n changeLayoutSize(new Dimension(sizeX, sizeY), rtype);\n } else {\n JOptionPane.showMessageDialog(null,\n \"Size x must be between \" + LayoutPanel.minXCells\n + \" and \" + LayoutPanel.maxXCells\n + \", or size y must be between \"\n + LayoutPanel.minYCells + \" and \"\n + LayoutPanel.maxYCells + \".\");\n }\n } catch (NumberFormatException ne) {\n JOptionPane.showMessageDialog(null, \"Invalid number.\");\n }\n }\n }",
"void updateSize() {\n setMeAndMyParentsAsDirty();\n }",
"private void checkAndModifySize() {\r\n if (size == data.length * LOAD_FACTOR) {\r\n resizeAndTransfer();\r\n }\r\n }",
"public void enlargeSquare()\n {\n squareSize++;\n }",
"public void setSize(int size) {\n\tthis.sizeNumber = sizeNumber;\r\n}",
"public void addSizeModfier(int newSize) {\n\t\tif (size != null) {\n\t\t\tthrow new IllegalStateException(\"Multiple font sizes specified\");\n\t\t}\n\t\tthis.size = newSize;\n\t}",
"int getCurrentSize();",
"private void set_size(int size)\r\n\t{\r\n\t\tthis.size = size;\r\n\t}",
"public void handleIncreaseLengthPowerup(){\n myRectangle.setWidth(myRectangle.getWidth()*increaseLengthPowerupSizeFactor);\n myLength=(int)(myLength*increaseLengthPowerupSizeFactor);\n }",
"public void changeSize(Integer newLength, Integer newHeight) {\n control.erase();\n width = newLength;\n height = newHeight;\n control.draw();\n }",
"public void setSize(RMSize aSize) { setSize(aSize.width, aSize.height); }",
"public void increaseSize() {\n Estimate[] newQueue = new Estimate[queue.length * 2];\n\n for (int i = 0; i < queue.length; i++) {\n newQueue[i] = queue[i];\n }\n\n queue = newQueue;\n }",
"private void resize() {\n }",
"@Test\n public void testSumPlanAddedModifiedSizeActualAddedModifiedSize()\n {\n assertEquals(this.linealRegressionCalculator.sumPlanAddedModifiedSizeActualAddedModifiedSize(), 5242927.0, 0.01);\n }",
"protected abstract void setSize();",
"private void increaseSize() {\n data = Arrays.copyOf(data, size * 3 / 2);\n }",
"private void setSize(int s){\n\t\tsize = s;\n\t}",
"protected void sendSizeChange(int oldw, int oldh) {\n if (oldw != this.getWidth() || oldh != this.getHeight())\n this.m_eventSender.sendEvent(RESIZED_EVENT, this, new SizeData(oldw,oldh));\n }",
"public double adjustSize(double sizePoint){\n return sizePoint*facteurSize;\n }",
"@Override\n\tprotected void onSizeChanged(int w, int h, int oldw, int oldh) {\n\t\twidth = w;\n\t\theigth = h;\n\t\tajestPosition();\n\t\tthis.invalidate();\n\t\tsuper.onSizeChanged(w, h, oldw, oldh);\n\t}",
"protected void newSize() {\r\n adjustSize();\r\n halt();\r\n newGame();\r\n }",
"int getLostedSize();",
"void resize(int newSize);",
"public void set_size(int s);",
"@Override\n protected void onSizeChanged(int w, int h, int oldw, int oldh) {\n super.onSizeChanged(w, h, oldw, oldh);\n this.w = w;\n this.h = h;\n }",
"private void increaseSize() {\r\n\t\tE[] biggerE = (E[]) new Object[this.capacity * 2];\r\n\t\tdouble[] biggerC = new double[this.capacity * 2];\r\n\t\tfor (int i = 0; i < this.size; i++) {\r\n\t\t\tbiggerE[i] = this.objectHeap[i];\r\n\t\t\tbiggerC[i] = this.costHeap[i];\r\n\t\t}\r\n\t\tthis.costHeap = biggerC;\r\n\t\tthis.objectHeap = biggerE;\r\n\t\tthis.capacity = this.capacity * 2;\r\n\t}",
"@Test\n public void adding_item_to_menu_should_increase_menu_size_by_1_Failure_Scenario(){\n\n int initialMenuSize = restaurant.getMenu().size();\n restaurant.addToMenu(\"Sizzling brownie\",319);\n assertEquals(initialMenuSize-1,restaurant.getMenu().size());\n System.out.println(\"Will decrease Instead of adding\");\n }",
"@Test\n public final void testValidGetSize() {\n int expRes = 5;\n int result = ship.getSize();\n assertEquals(expRes, result);\n expRes = 19;\n ship.setSize(expRes);\n result = ship.getSize();\n assertEquals(expRes, result);\n }",
"public void addSize(double edgeSize)\r\n\t{\r\n\t\tsize= size + edgeSize;\r\n\t}",
"public void updateSize() {\n\t\tint mpVis = (csub.isMorePanelVisible()) ? 1 : 0;\n\t\tint csubAwake = (csub.isAwake()) ? 1 : 0;\n\t\t\n\t\tint height = csubAwake * (CSub.INTERFACE_PANEL_HEIGHT + mpVis * CSub.MORE_PANEL_HEIGHT);\n\t\t\n\t\tsetPreferredSize(new Dimension(csub.getWidth() - 2 * CSub.RESIZE_BORDER_WIDTH, height));\n\t\tsetSize(new Dimension(csub.getWidth() - 2 * CSub.RESIZE_BORDER_WIDTH, height));\n\t}",
"@Override\n public void onSizeChanged(int w, int h, int oldW, int oldH) {\n mId = w / 2;\n mId = mId - mViewsCount * 9;\n }",
"public void setSize(int size);",
"@Test\r\n public void testSize() {\r\n Grocery entry1 = new Grocery(\"Mayo\", \"Dressing / Mayo\", 1, 2.99f, 1);\r\n\r\n assertEquals(0, instance.size());\r\n\r\n instance.add(entry1);\r\n\r\n // Test increment\r\n assertEquals(1, instance.size());\r\n\r\n assertTrue(instance.remove(entry1));\r\n\r\n // Test decrement\r\n assertEquals(0, instance.size());\r\n }",
"public void testSize(Method m) {\n String newCacheName = \"repl-size\";\n startCaches(newCacheName);\n List<HotRodClient> newClients = createClients(newCacheName);\n try {\n TestSizeResponse sizeStart = newClients.get(0).size();\n assertStatus(sizeStart, Success);\n assertEquals(0, sizeStart.size);\n for (int i = 0; i < 20; i++) {\n newClients.get(1).assertPut(m, \"k-\" + i, \"v-\" + i);\n }\n TestSizeResponse sizeEnd = newClients.get(1).size();\n assertStatus(sizeEnd, Success);\n assertEquals(20, sizeEnd.size);\n } finally {\n newClients.forEach(HotRodClient::stop);\n }\n }",
"@Test\n public void getSize() {\n // Testing for Shape Rectangle that mutates its Size and see the size matches.\n assertEquals(defaultSize1, defaultShape1.getSize());\n Size newRectangleSize = new Size(50, 50);\n defaultShape1 = new Rectangle(defaultColor1, defaultPosition1, newRectangleSize);\n assertEquals(newRectangleSize, defaultShape1.getSize());\n assertNotEquals(defaultSize1, defaultShape1.getSize());\n // Testing for OvalShape that mutates and see it matches.\n assertEquals(defaultSize2, defaultShape2.getSize());\n Size newOvalSize = new Size(15, 15);\n defaultShape2 = new Oval(defaultColor2, defaultPosition2, newOvalSize);\n assertEquals(newOvalSize, defaultShape2.getSize());\n assertNotEquals(defaultSize2, defaultShape2.getSize());\n }",
"@Override\n\tpublic void resize() {\n\t\t\n\t}",
"@Test\n public void testSumEstimatedProxySizeActualAddedModifiedSize()\n {\n assertEquals(this.linealRegressionCalculator.sumEstimatedProxySizeActualAddedModifiedSize(), 4303108.0, 0.01);\n }",
"@Override\r\n\tpublic void resize() {\n\t\t\r\n\t}",
"public void changeSquareSize(){\r\n for(Square i : sqList){\r\n i.setSize(48);\r\n } \r\n }",
"public void decreaseSize(int delta){\n\t\tif(scale > scaleMin)\n\t\t\tscale -= enlarge *delta;\n\t}",
"public void setSize(double size) \n {\n this.size = size;\n }",
"public void setSize(int _size)\r\n {\r\n size = _size;\r\n }",
"@Override\n\tpublic void resized() {\n\t}",
"private void myResize(int newX, int newY, int newW, int newH) {\n int dimMin = conturExt * 2;\n if (newW > dimMin && newH > dimMin) {\n setSize(newW, newH);\n setLocation(newX, newY);\n }\n }",
"void assertSizeEquals(int expected);",
"private void growSize() {\n size++;\n\n if (size > maxSize) {\n if (keys.length == Integer.MAX_VALUE) {\n throw new IllegalStateException(\"Max capacity reached at size=\" + size);\n }\n\n // Double the capacity.\n rehash(keys.length << 1);\n }\n }",
"private void changeLayoutSize(Dimension newSize, RepType rtype) {\n layoutPanel.inhNList = repPattern(newSize, layoutPanel.inhNList, rtype);\n layoutPanel.activeNList = repPattern(newSize, layoutPanel.activeNList,\n rtype);\n layoutPanel.probedNList = repPattern(newSize, layoutPanel.activeNList,\n rtype);\n\n layoutPanel.changeLayoutSize(newSize);\n }",
"protected abstract void resize();",
"@Override\n protected final void onSizeChanged(int w, int h, int oldw, int oldh) {\n super.onSizeChanged(w, h, oldw, oldh);\n this.invalidate();\n }",
"public void sizeDecrease1() {\n\t\t _size--;\n\t}",
"public void setSize(Dimension newSize) {\n\t\tif(newSize.height<80)\n\t\t\tnewSize.height=80;\n\t\tif (newSize != null) {\n\t\t\tsize.setSize(newSize);\n\t\t\tfirePropertyChange(Props.SIZE_PROP.getValue(), null, size);\n\t\t}\n\t}",
"private void handleSizeChange(Object observable) {\n imageView.fitToSize(getWidth(), getHeight());\n placeHolder.setGlyphSize(Math.min(getWidth(), getHeight()) * 0.6);\n }",
"@Override\n public int getSize() { return size; }",
"private void SizesUpdate(IAVLNode parent) { \r\n\t\t\tIAVLNode curr = parent;\r\n\t\t\t\r\n\t\t\t//down check\r\n\t\t\tif(curr != null && curr.getRight().isRealNode())\r\n\t\t\t\tcurr.getRight().setSize(curr.getRight().getRight().getSize() + curr.getRight().getLeft().getSize() + 1);\r\n\t\t\tif(curr != null && curr.getLeft().isRealNode())\r\n\t\t\t\tcurr.getLeft().setSize(curr.getLeft().getRight().getSize() + curr.getLeft().getLeft().getSize() + 1);\r\n\t\t\t\r\n\t\t\twhile(curr != null)\r\n\t\t\t {\r\n\t\t\t\t int newSize = curr.getRight().getSize() + curr.getLeft().getSize() + 1;\r\n\t\t\t\t if(curr.getSize() != newSize)\r\n\t\t\t\t \t curr.setSize(newSize);\r\n\t\t\t\t\tcurr = curr.getParent(); \r\n\t\t\t }\r\n\t\t}",
"@Test\n public void testSumActualAddedModifiedSize()\n {\n assertEquals(this.linealRegressionCalculator.sumActualAddedModifiedSize(), 6389.0, 0.01);\n }",
"@Override\n\tpublic void enlarge() {\n\t\t\n\t}",
"public void sizeHasBeenSet() {\n isSizeSet = true;\n }",
"@Test\n public void testSize() {\n System.out.println(\"size\");\n al.add(1);\n assertEquals(1, al.size());\n }",
"public void testResize()\n {\n cover.resize(5, 5, 90);\n assertEquals(5.0, cover.getTop(), .1);\n assertEquals(5.0, cover.getLeft(), .1);\n }",
"void resize() {\n }",
"@FXML\r\n void btnSizeMiuns(ActionEvent event) {\r\n \tdrawSize--;\r\n \tif(drawSize <= 1){\r\n \t\tdrawSize = 1;\r\n \t}\r\n }",
"private void testSize() {\n System.out.println(\"------ TESTING: size() ----- \");\n System.out.println(\"Expected: \" +iSize);\n System.out.print(\"Returned: \");\n try{\n if(iTestList.size() != iSize)\n throw new RuntimeException(\"FAILED -> test size not matching\");\n else\n System.out.print(iTestList.size());\n }catch(RuntimeException e){\n System.out.print(e.getMessage());\n }\n System.out.print(\"\\n\");\n }",
"public void adjust()\n {\n }",
"@Test\n public void testSize() {\n System.out.println(\"Simple test of the size method. This will also execute an add.\");\n SuffixTree instance = new SuffixTree();\n assertEquals(instance.size(),0);\n instance.addSequence(SequenceFactory.makeTestSequence(\"ATAAATG$\"));\n int expResult = 1;\n int result = instance.size();\n assertEquals(expResult, result);\n System.out.println(\"Size test complete.\");\n }",
"@Override\n public void resize(int arg0, int arg1) {\n \n }",
"public void doChanges0() {\n lm.setChangeRecording(true);\n changeMark = lm.getChangeMark();\n ld.externalSizeChangeHappened();\n // > UPDATE CURRENT STATE\n contInterior.put(\"Form\", new Rectangle(0, 0, 400, 300));\n compBounds.put(\"jTextField1\", new Rectangle(0, 0, 400, 20));\n baselinePosition.put(\"jTextField1-400-20\", new Integer(14));\n compBounds.put(\"jRadioButton1\", new Rectangle(0, 22, 93, 23));\n baselinePosition.put(\"jRadioButton1-93-23\", new Integer(15));\n compBounds.put(\"jRadioButton2\", new Rectangle(0, 48, 93, 23));\n baselinePosition.put(\"jRadioButton2-93-23\", new Integer(15));\n compBounds.put(\"jScrollPane1\", new Rectangle(0, 73, 35, 130));\n baselinePosition.put(\"jScrollPane1-35-130\", new Integer(0));\n compBounds.put(\"jLabel1\", new Rectangle(41, 73, 34, 14));\n baselinePosition.put(\"jLabel1-34-14\", new Integer(11));\n compBounds.put(\"jLabel2\", new Rectangle(81, 73, 34, 14));\n baselinePosition.put(\"jLabel2-34-14\", new Integer(11));\n compBounds.put(\"jTextField2\", new Rectangle(41, 93, 59, 20));\n baselinePosition.put(\"jTextField2-59-20\", new Integer(14));\n compPrefSize.put(\"jTextField1\", new Dimension(59, 20));\n compPrefSize.put(\"jRadioButton1\", new Dimension(93, 23));\n compPrefSize.put(\"jRadioButton2\", new Dimension(93, 23));\n compPrefSize.put(\"jScrollPane1\", new Dimension(35, 130));\n compPrefSize.put(\"jLabel1\", new Dimension(34, 14));\n compPrefSize.put(\"jLabel2\", new Dimension(34, 14));\n compPrefSize.put(\"jTextField2\", new Dimension(59, 20));\n contInterior.put(\"Form\", new Rectangle(0, 0, 400, 300));\n compBounds.put(\"jTextField1\", new Rectangle(0, 0, 400, 20));\n baselinePosition.put(\"jTextField1-400-20\", new Integer(14));\n compBounds.put(\"jRadioButton1\", new Rectangle(0, 22, 93, 23));\n baselinePosition.put(\"jRadioButton1-93-23\", new Integer(15));\n compBounds.put(\"jRadioButton2\", new Rectangle(0, 48, 93, 23));\n baselinePosition.put(\"jRadioButton2-93-23\", new Integer(15));\n compBounds.put(\"jScrollPane1\", new Rectangle(0, 73, 35, 130));\n baselinePosition.put(\"jScrollPane1-35-130\", new Integer(0));\n compBounds.put(\"jLabel1\", new Rectangle(41, 73, 34, 14));\n baselinePosition.put(\"jLabel1-34-14\", new Integer(11));\n compBounds.put(\"jLabel2\", new Rectangle(81, 73, 34, 14));\n baselinePosition.put(\"jLabel2-34-14\", new Integer(11));\n compBounds.put(\"jTextField2\", new Rectangle(41, 93, 59, 20));\n baselinePosition.put(\"jTextField2-59-20\", new Integer(14));\n ld.updateCurrentState();\n // < UPDATE CURRENT STATE\n // > START RESIZING\n baselinePosition.put(\"jTextField2-59-20\", new Integer(14));\n compPrefSize.put(\"jTextField2\", new Dimension(59, 20));\n {\n String[] compIds = new String[]{\"jTextField2\"};\n Rectangle[] bounds = new Rectangle[]{new Rectangle(41, 93, 59, 20)};\n Point hotspot = new Point(102, 106);\n int[] resizeEdges = new int[]{1, -1};\n boolean inLayout = true;\n ld.startResizing(compIds, bounds, hotspot, resizeEdges, inLayout);\n }\n // < START RESIZING\n prefPaddingInParent.put(\"Form-jTextField2-0-1\", new Integer(10)); // parentId-compId-dimension-compAlignment\n // > MOVE\n // > MOVE\n // > MOVE\n {\n Point p = new Point(399, 128);\n String containerId = \"Form\";\n boolean autoPositioning = true;\n boolean lockDimension = false;\n Rectangle[] bounds = new Rectangle[]{new Rectangle(41, 93, 359, 20)};\n ld.move(p, containerId, autoPositioning, lockDimension, bounds);\n }\n // < MOVE\n prefPaddingInParent.put(\"Form-jTextField2-0-1\", new Integer(10)); // parentId-compId-dimension-compAlignment\n // > MOVE\n // > MOVE\n // > MOVE\n {\n Point p = new Point(400, 128);\n String containerId = \"Form\";\n boolean autoPositioning = true;\n boolean lockDimension = false;\n Rectangle[] bounds = new Rectangle[]{new Rectangle(41, 93, 359, 20)};\n ld.move(p, containerId, autoPositioning, lockDimension, bounds);\n }\n // < MOVE\n // > END MOVING\n ld.endMoving(true);\n // < END MOVING\n ld.externalSizeChangeHappened();\n // > UPDATE CURRENT STATE\n contInterior.put(\"Form\", new Rectangle(0, 0, 400, 300));\n compBounds.put(\"jTextField1\", new Rectangle(0, 0, 400, 20));\n baselinePosition.put(\"jTextField1-400-20\", new Integer(14));\n compBounds.put(\"jRadioButton1\", new Rectangle(0, 22, 93, 23));\n baselinePosition.put(\"jRadioButton1-93-23\", new Integer(15));\n compBounds.put(\"jRadioButton2\", new Rectangle(0, 48, 93, 23));\n baselinePosition.put(\"jRadioButton2-93-23\", new Integer(15));\n compBounds.put(\"jScrollPane1\", new Rectangle(0, 73, 35, 130));\n baselinePosition.put(\"jScrollPane1-35-130\", new Integer(0));\n compBounds.put(\"jLabel1\", new Rectangle(41, 73, 34, 14));\n baselinePosition.put(\"jLabel1-34-14\", new Integer(11));\n compBounds.put(\"jLabel2\", new Rectangle(81, 73, 34, 14));\n baselinePosition.put(\"jLabel2-34-14\", new Integer(11));\n compBounds.put(\"jTextField2\", new Rectangle(41, 93, 359, 20));\n baselinePosition.put(\"jTextField2-359-20\", new Integer(14));\n prefPaddingInParent.put(\"Form-jRadioButton1-0-1\", new Integer(6)); // parentId-compId-dimension-compAlignment\n prefPaddingInParent.put(\"Form-jRadioButton2-0-1\", new Integer(6)); // parentId-compId-dimension-compAlignment\n compPrefSize.put(\"jTextField1\", new Dimension(59, 20));\n compPrefSize.put(\"jRadioButton1\", new Dimension(93, 23));\n compPrefSize.put(\"jRadioButton2\", new Dimension(93, 23));\n compPrefSize.put(\"jScrollPane1\", new Dimension(35, 130));\n compPrefSize.put(\"jLabel1\", new Dimension(34, 14));\n compPrefSize.put(\"jLabel2\", new Dimension(34, 14));\n compPrefSize.put(\"jTextField2\", new Dimension(59, 20));\n contInterior.put(\"Form\", new Rectangle(0, 0, 400, 300));\n compBounds.put(\"jTextField1\", new Rectangle(0, 0, 400, 20));\n baselinePosition.put(\"jTextField1-400-20\", new Integer(14));\n compBounds.put(\"jRadioButton1\", new Rectangle(0, 22, 93, 23));\n baselinePosition.put(\"jRadioButton1-93-23\", new Integer(15));\n compBounds.put(\"jRadioButton2\", new Rectangle(0, 48, 93, 23));\n baselinePosition.put(\"jRadioButton2-93-23\", new Integer(15));\n compBounds.put(\"jScrollPane1\", new Rectangle(0, 73, 35, 130));\n baselinePosition.put(\"jScrollPane1-35-130\", new Integer(0));\n compBounds.put(\"jLabel1\", new Rectangle(41, 73, 34, 14));\n baselinePosition.put(\"jLabel1-34-14\", new Integer(11));\n compBounds.put(\"jLabel2\", new Rectangle(81, 73, 34, 14));\n baselinePosition.put(\"jLabel2-34-14\", new Integer(11));\n compBounds.put(\"jTextField2\", new Rectangle(41, 93, 359, 20));\n baselinePosition.put(\"jTextField2-359-20\", new Integer(14));\n ld.updateCurrentState();\n // < UPDATE CURRENT STATE\n }",
"public void increaseSize(int size) {\n int arraySize = container.length;\n if (size > arraySize) {\n int newSize = arraySize * 2;\n container = Arrays.copyOf(container, newSize);\n }\n }",
"@Test\n public final void testSetSize() {\n int expRes = 5;\n int falseEnter = -4;\n ship.setSize(falseEnter);\n int result = this.ship.getSize();\n assertEquals(expRes, result);\n falseEnter = -1;\n ship.setSize(falseEnter);\n result = this.ship.getSize();\n assertEquals(expRes, result);\n }",
"public void setSize(int size){\n this.size = size;\n }",
"public void setObjectSize(short size) { this.objectSize=size; }",
"public abstract int getSize();",
"public abstract int getSize();",
"public abstract int getSize();",
"public abstract int getSize();",
"ResizeResult resize(int desiredSize);",
"private void updateByteCount(Label byteCountLabel, Label byteCountUnit, String unit, Number newByteCount, double offset) {\n double byteCount = newByteCount.longValue() + offset;\n /*\n The size of a kilobyte in bytes\n */\n long kilobyte = 1024;\n double KBCount = byteCount / kilobyte;\n double displayedCount = KBCount;\n if(KBCount > 1024){\n double MBCount = KBCount / kilobyte;\n if(MBCount > 1024){\n displayedCount = MBCount / kilobyte;\n if(unit.compareTo(\"GB\")!=0){\n unit = \"GB\";\n byteCountUnit.setText(unit);\n }\n } else {\n displayedCount = MBCount;\n if(unit.compareTo(\"MB\")!=0){\n unit = \"MB\";\n byteCountUnit.setText(unit);\n }\n }\n }\n byteCountLabel.setText(String.valueOf(df.format(displayedCount)));\n }",
"public int getSize(){return _size;}",
"default void onVideoSizeChanged(int oldWidth, int oldHeight, int width, int height) {\n }",
"public int getSize() {return size;}",
"@Override\r\n\tpublic void resize(int arg0, int arg1) {\n\t}",
"@Override\n\t\tpublic void resize(int arg0, int arg1) {\n\t\t \n\t\t}",
"public int getSize() {\n\treturn sizeNumber;\r\n}",
"private void setMemorySize() { }",
"public abstract int GetSize();",
"@Override\n\tpublic void onSizeChanged(int w, int h, int oldw, int oldh) {\n\t\tmRequiredRadius = (int) (Math.sqrt(w * w + h * h) / 3);\n\t}",
"public int getSize(){return this.size;}",
"public void setSize(int size) {\r\n _size = size;\r\n }",
"public void setSize();",
"public int size(){\r\n return currentSize;\r\n }",
"protected void checkSize(){\n if (size == data.length){\n resize( 2 * data.length);\n }\n }",
"private int calcSize(int size)\n {\n return (((size - 1) / 9) + 1) * 9;\n }",
"@Override\n public int getSize() {\n return size;\n }"
]
| [
"0.7606362",
"0.7170749",
"0.70682573",
"0.7017951",
"0.69436765",
"0.69436765",
"0.6923167",
"0.6832641",
"0.66646796",
"0.6654736",
"0.65851766",
"0.6554887",
"0.654623",
"0.6506132",
"0.64343005",
"0.6422147",
"0.63598484",
"0.63461864",
"0.63347423",
"0.6325864",
"0.63255364",
"0.6298385",
"0.62977254",
"0.6287572",
"0.62771076",
"0.62727576",
"0.62710965",
"0.6263957",
"0.62551683",
"0.6255155",
"0.62518847",
"0.6251003",
"0.6238533",
"0.6236827",
"0.6216546",
"0.62157077",
"0.6208369",
"0.618471",
"0.61827743",
"0.6180121",
"0.6177556",
"0.6139347",
"0.6114153",
"0.6107473",
"0.610376",
"0.609807",
"0.60964066",
"0.6093898",
"0.6088988",
"0.60879636",
"0.6087736",
"0.6072643",
"0.6071786",
"0.607147",
"0.6067304",
"0.6065455",
"0.6065344",
"0.6037658",
"0.6034254",
"0.60300714",
"0.6028879",
"0.6024894",
"0.60220855",
"0.6020064",
"0.6015231",
"0.6011469",
"0.6011063",
"0.6002506",
"0.5981882",
"0.5977567",
"0.5963126",
"0.5955579",
"0.5942432",
"0.593193",
"0.59291905",
"0.59250796",
"0.5921443",
"0.5920158",
"0.5919755",
"0.5919755",
"0.5919755",
"0.5919755",
"0.5904182",
"0.5885754",
"0.5884004",
"0.58813953",
"0.58745044",
"0.5873761",
"0.5867352",
"0.5862995",
"0.58534753",
"0.5852377",
"0.5852023",
"0.5848317",
"0.5847683",
"0.5845992",
"0.58455354",
"0.58414084",
"0.5832469",
"0.58317244"
]
| 0.69246316 | 6 |
____________________________________ ColorChange() Test ______________________________________. | @Test
public void testColorChange() {
testAnimation.addShape(c, 6, 100);
// Instantiate the color change
colorChange1 = new ChangeColor(c,
0, 0, 1,
0, 1, 0);
colorChange2 = new ChangeColor(c,
0, 1, 0,
25, 1, 0);
testAnimation.addEvent(c, colorChange1, 50, 80);
testAnimation.addEvent(c, colorChange2, 81, 90);
assertEquals("Shapes:\n"
+ "Name: C\n"
+ "Type: ellipse\n"
+ "Center: (500.0,100.0), X radius: 60.0, Y radius: 30.0, Color: (0,0,1)\n"
+ "Appears at t=6\n"
+ "Disappears at t=100\n"
+ "\n"
+ "C changes color from (0,0,1) to (0,1,0) from time t=50 to t=80\n"
+ "C changes color from (0,1,0) to (25,1,0) from time t=81 to t=90\n",
testAnimation.toString());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void changeColor(){\r\n if(color == 1)\r\n color = 2;\r\n else\r\n color = 1;\r\n }",
"@Override\n public void changeColor(ColorEvent ce) {\n \n txtRed.setText(\"\"+ ce.getColor().getRed());\n txtGreen.setText(\"\"+ ce.getColor().getGreen());\n txtBlue.setText(\"\"+ ce.getColor().getBlue());\n \n \n }",
"@Override\n\tpublic void changeColor2(Color color) {\n\n\t}",
"public void setColor(Color newColor) ;",
"public void color(Color the_color) {\n \n }",
"public void Color() {\n\t\t\r\n\t}",
"@Override\n public String getType() {\n return \"Color change\";\n }",
"public abstract void colorChecker(Color c);",
"Color userColorChoose();",
"@Override\n public void onColorChange(int color) {\n int r = Color.red(color);\n int g = Color.green(color);\n int b = Color.blue(color);\n Log.w(\"CameraEngineActivity\", \"R:\" + r + \" G:\" + g + \" B:\" + b);\n colorText.setBackgroundColor(color);\n }",
"public void RGB_Change(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 Change\");\r\n adb.setItems(colors, new DialogInterface.OnClickListener() {\r\n @Override\r\n public void onClick(DialogInterface dialog, int which) {\r\n color[which]=255;\r\n lL.setBackgroundColor(Color.rgb(color[0],color[1],color[2]));\r\n }\r\n });\r\n adb.setPositiveButton(\"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 }",
"public void setColor(int color) {\n/* 77 */ this.color = color;\n/* 78 */ this.paint.setColor(this.color);\n/* */ }",
"private void updateColor() {\n int redShift = red << 16; // red: 0xRR0000 <- 0xRR\n int greenShift = green << 8; // red: 0xGG00 <- 0xGG\n int blueShift = blue; // blue: 0xBB <- 0xBB\n int alphaShift = 0xff << 24; // alpha 0xff000000 <- 0xff // we don't want our color to be transparent.\n int color = alphaShift | redShift | greenShift | blueShift;\n viewColor.setBackgroundColor(color);\n }",
"public abstract boolean atomicChangeObjectColor(Object dst, int oldColor, int newColor);",
"synchronized private void changeColor()\n {\n if ( ++colorIndex == someColors.length )\n colorIndex = 0;\n setForeground( currentColor() );\n repaint();\n }",
"RGB getNewColor();",
"public void setColor(Color c);",
"@Override\r\n public void actionPerformed(ActionEvent event) {\r\n if (event.getSource() == redInput ||\r\n event.getSource() == greenInput ||\r\n event.getSource() == blueInput) {\r\n int value;\r\n int red = currentColor.getRed();\r\n int green = currentColor.getGreen();\r\n int blue = currentColor.getBlue();\r\n try {\r\n value = Integer.parseInt((String) event.getActionCommand());\r\n } catch (Exception e) {\r\n value = -1;\r\n }\r\n if (event.getSource() == redInput) {\r\n if (value >= 0 && value < 256)\r\n red = value;\r\n else\r\n redInput.setText(String.valueOf(red));\r\n } else if (event.getSource() == greenInput) {\r\n if (value >= 0 && value < 256)\r\n green = value;\r\n else\r\n greenInput.setText(String.valueOf(green));\r\n } else if (event.getSource() == blueInput) {\r\n if (value >= 0 && value < 256)\r\n blue = value;\r\n else\r\n blueInput.setText(String.valueOf(blue));\r\n }\r\n currentColor = new Color(red, green, blue);\r\n newSwatch.setForeground(currentColor);\r\n colorCanvas.setColor(currentColor);\r\n } else if (event.getSource() == okButton) {\r\n // Send action event to all color listeners\r\n if (colorListeners != null) {\r\n ActionEvent new_event = new ActionEvent(this,\r\n ActionEvent.ACTION_PERFORMED,\r\n CHANGE_ACTION);\r\n colorListeners.actionPerformed(new_event);\r\n }\r\n setVisible(false);\r\n } else if (event.getSource() == cancelButton) {\r\n if (colorListeners != null) {\r\n ActionEvent new_event = new ActionEvent(this,\r\n ActionEvent.ACTION_PERFORMED,\r\n CANCEL_ACTION);\r\n colorListeners.actionPerformed(new_event);\r\n }\r\n currentColor = null;\r\n setVisible(false);\r\n }\r\n }",
"public void setColor(int color);",
"public void setColor(int color);",
"public void setColor(int value);",
"void setColor(int r, int g, int b);",
"@Override\n\tpublic void color() {\n\t\tSystem.out.println(\"Colour is red\");\n\t\t\n\t}",
"@Override\n public void onColorChanged(int selectedColor) {\n Log.d(\"ColorPicker\", \"onColorChanged: 0x\" + Integer.toHexString(selectedColor));\n }",
"public void setColor(Color newColor) {\n\tcolor = newColor;\n }",
"void setRed(int x, int y, int value);",
"public void chooseColor() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\t\r\n\t}",
"RGB getOldColor();",
"void setColorWithRedraw(@ColorInt int color) {\n/* 167 */ this.mPaint.setColor(color);\n/* 168 */ onRedrawIfInitialized();\n/* */ }",
"public void setColor(Color c) { color.set(c); }",
"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 }",
"void setColor(){\n this.objectColour = new Color(rValue,gValue,bValue,timeToLive).brighter();\n }",
"public ColorChange(Color color, double time) {\n this.color = color;\n this.time = time;\n }",
"public void setColor(String c);",
"void changeColor(Color color) {\r\n currentColor = color;\r\n redInput.setText(String.valueOf(color.getRed()));\r\n greenInput.setText(String.valueOf(color.getGreen()));\r\n blueInput.setText(String.valueOf(color.getBlue()));\r\n newSwatch.setForeground(currentColor);\r\n }",
"@Override\r\n\tpublic void howToColor() {\n\t\t\r\n\t}",
"public abstract void setColor(Color color);",
"public abstract void setColor(Color color);",
"public void setColor(Color color);",
"public void switchColor() {\r\n\t\tcolor = !color;\r\n\t}",
"public void setColor(Color newColor)\n {\n this.color = newColor;\n conditionallyRepaint();\n }",
"void setColor(@ColorInt int color);",
"public void setColor(int r, int g, int b);",
"public void setDataColor(Color c)\r\n/* 48: */ {\r\n/* 49: 36 */ this.ballColor = c;repaint();\r\n/* 50: */ }",
"private void onColorClick() {\n Integer colorFrom = getResources().getColor(R.color.animated_color_from);\r\n Integer colorTo = getResources().getColor(R.color.animated_color_to);\r\n ValueAnimator colorAnimator = ValueAnimator.ofObject(new ArgbEvaluator(), colorFrom, colorTo);\r\n colorAnimator.setDuration(animationDuration);\r\n colorAnimator.setRepeatCount(1);\r\n colorAnimator.setRepeatMode(ValueAnimator.REVERSE);\r\n colorAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {\r\n\r\n @Override\r\n public void onAnimationUpdate(ValueAnimator animator) {\r\n animatedArea.setBackgroundColor((Integer)animator.getAnimatedValue());\r\n }\r\n\r\n });\r\n colorAnimator.start();\r\n }",
"@Test\n public void testGetColor() {\n assertEquals(r1.getColor(), new Color(255, 0, 0));\n assertEquals(r2.getColor(), new Color(255, 255, 255));\n assertEquals(r3.getColor(), new Color(255, 255, 0));\n assertEquals(r4.getColor(), new Color(200, 150, 133));\n }",
"public void setColor(float r, float g, float b, float a);",
"public void onUpdateColor() {\n getVertexBufferObject().onUpdateColor(this);\n }",
"@Test(expected = IllegalArgumentException.class)\n public void testChangeColorTwiceSameTime() {\n model1.addShape(Rectangle.createRectangle(\"R\", new Point.Double(500, 200),\n new Color(0, 0, 0), 0, 10, 10, 10));\n model1.addAction(new ChangeColorAction(\"R\", 10, 100,\n new Color(0, 0, 0), new Color(10, 10, 10)));\n model1.addAction(new ChangeColorAction(\"R\", 50, 120,\n new Color(0, 0, 0), new Color(10, 10, 10)));\n }",
"public void changeColor(Color c){\n switch(identifier){\n case \"FillRec\":\n fillrec.setBackground(c);\n break;\n case \"FillOval\":\n filloval.setBackground(c);\n break;\n case \"EmptyRec\":\n emptyrec.setBackground(c);\n break;\n case \"EmptyOval\":\n emptyoval.setBackground(c);\n break;\n case \"LineDraw\":\n linedraw.setBackground(c);\n break;\n case \"ColorChooser\":\n opencolor.setBackground(c);\n break;\n }\n }",
"abstract Color getColor();",
"public int getColor();",
"public int getColor();",
"void colorize(ObservableValue<? extends Number> ov, Number old_val,\n Number new_val, Color color, BufferedImage myBufferedImage,\n ImageView myImage) {\n double coefColor = (new_val.doubleValue() / 100 + 0.5)\n / (old_val.doubleValue() / 100 + 0.5);\n this.colorizer.setChangeColor(color);\n this.colorizer.setRatio(coefColor);\n myBufferedImage = Utils.clone(this.colorizer.process(myBufferedImage));\n myImage.setImage(SwingFXUtils.toFXImage(myBufferedImage, null));\n }",
"@Override\n public void onChooseColor(int position, int color) {\n int red = Color.red(color);\n int green = Color.green(color);\n int blue = Color.blue(color);\n Log.e(\"rgb\", \"\" + red + \" \" + green + \" \" + blue);\n }",
"void setStatusColour(Color colour);",
"@Override\n\tpublic void setColour(float r, float g, float b) {\n\n\t}",
"public void setColor(Color newColor) {\n\t\tcolor = newColor;\n\t}",
"@Override\r\n\t\tpublic void actionPerformed(ActionEvent actionevent)\r\n\t\t{\n\t\t\tColor c = (Color) getValue( \"Color\" );\r\n\t\t\tsetBackground( c );\r\n\t\t}",
"public abstract void run(Color color);",
"public void stateChanged(ChangeEvent changeEvent) {\n Color newForegroundColor = colorChooser.getColor();\n label.setForeground(newForegroundColor);\n }",
"protected abstract void updateShapeColor(Color color);",
"interface ColorChangedListener {\n void colorChanged(Color newColor);\n }",
"private static void changeColor(Orange apple) {\n\t\tapple.color = \"green\";\n\t\t\n\t}",
"void setGreen(int x, int y, int value);",
"public Color getColor() { return color; }",
"public void applyColor() {\n\t\tSystem.out.println(\"Yellow\");\n\n\t}",
"int getColour();",
"public void switchColor(){\r\n System.out.println(color);\r\n if(color==\"W\"){\r\n color=\"B\";\r\n System.out.println(color);\r\n }else{ \r\n color=\"W\";\r\n } \r\n }",
"public void stateChanged(ChangeEvent e) {\n\t\tif (!_receive) {\r\n\t\t\t// jesli nastapila zmiana na suwaku nastepuej odczyt wart z\r\n\t\t\t// wszystkich suwakow, utworzenie koloru i umieszczenie go w kolejce\r\n\t\t\tColor col = new Color(canvas.getBackground().getRed(), canvas.getBackground().getGreen(),\r\n\t\t\t\t\tcanvas.getBackground().getBlue());\r\n\t\t\tColorQueue.getInstance().putColor(col);\r\n\t\t}\r\n\r\n\t}",
"protected abstract void updateColor(final Color col, final boolean fill);",
"@Override // Override GameObject setColor\n @Deprecated // Deprecated so developer does not accidentally use\n public void setColor(int color) {\n }",
"public Color getColor()\r\n {\r\n return currentColor;\r\n }",
"@Override\n public Color getColor() {\n return color;\n }",
"public void setColor(int red, int green, int blue){\r\n this.red = red;\r\n this.green = green;\r\n this.blue = blue;\r\n }",
"void setFromInt32Color(int newColor) {\r\n\t\tx = ((float) ((newColor >> 16) | 0xFF)) / 255.0f;\r\n\t\ty = ((float) ((newColor >> 8) | 0xFF)) / 255.0f;\r\n\t\tz = ((float) ((newColor) | 0xFF)) / 255.0f;\r\n\t}",
"private void updateColorPreview() {\n runOnUiThread(() -> colorView.setBackgroundColor(Utils.HSV_to_ARGB(specState.hue,\n specState.saturation,\n specState.value)));\n }",
"@Override public void setColor(Color c) \n\t{\n\t\tc2 = c1; c1 = c.dup();\n\t}",
"public int getColor(){\r\n\t\treturn color;\r\n\t}",
"public abstract Color getColor();",
"public void setColor(Color another)\r\n {\r\n currentColor = another;\r\n }",
"public void setColour(Colour colour);",
"@Test\n public void testChangeColorOfRectanlge() {\n model1.addShape(Rectangle.createRectangle(\"R\", new Point.Double(500, 100),\n new Color(0, 0, 1), 6, 100, 60.0, 30.0));\n model1.addAction(new ChangeColorAction(\"R\", 10, 50, new Color(0, 0,\n 1), new Color(10, 10, 11)));\n textView1.animate(model1, 1, out);\n assertEquals(\"Shapes:\\n\"\n + \"Name: R\\n\"\n + \"Type: rectangle\\n\"\n + \"Lower-left corner: (500.0,100.0), Width: 60.0, Height: 30.0, \"\n + \"Color: (0.0,0.0,1.0)\\n\"\n + \"Appears at t=6.0s\\n\"\n + \"Disappears at t=100.0s\\n\"\n + \"\\n\"\n + \"Shape R changes color from (0.0,0.0,1.0) to (10.0,10.0,11.0) from \"\n + \"t=10.0s to t=50.0s\\n\",\n out.toString());\n }",
"public void setColor(Color color) {\n this.color = color;\n }",
"public Color update() {\n /*\n * The method GetColor() returns a normalized color value from the sensor and\n * can be Useful if outputting the color to use an RGB LED or similar. To read\n * the raw color, or use GetRawColor().\n *\n * The color sensor works best when within a few inches from an object in well\n * lit conditions (the built in LED is a big help here!). The farther an object\n * is the more light from the surroundings will bleed into the measurements and\n * make it difficult to accurately determine its color.\n */\n edu.wpi.first.wpilibj.util.Color detectedColor = m_ColorSensor.getColor();\n /*\n * Run the color match algorithm on our detected color\n */\n String colorString;\n ColorMatchResult match = m_colorMatcher.matchClosestColor(detectedColor);\n\n if (match.color == kBlueTarget) {\n colorString = \"Blue\";\n mCurrentColor = Color.blue;\n } else if (match.color == kRedTarget) {\n colorString = \"Red\";\n mCurrentColor = Color.red;\n } else if (match.color == kGreenTarget) {\n colorString = \"Green\";\n mCurrentColor = Color.green;\n } else if (match.color == kYellowTarget) {\n colorString = \"Yellow\";\n mCurrentColor = Color.yellow;\n } else {\n colorString = \"Unknown\";\n mCurrentColor = Color.unknown;\n }\n /**\n * Open Smart Dashboard or Shuffleboard to see the color detected by the Sensor.\n */\n SmartDashboard.putNumber(\"Red\", detectedColor.red);\n SmartDashboard.putNumber(\"Green\", detectedColor.green);\n SmartDashboard.putNumber(\"Blue\", detectedColor.blue);\n SmartDashboard.putNumber(\"Confidence\", match.confidence);\n SmartDashboard.putString(\"Detected Color\", colorString);\n return mCurrentColor;\n }",
"private void colorPickerHander() {\n\t\tboolean validvalues = true;\n\t\tHBox n0000 = (HBox) uicontrols.getChildren().get(5);\n\t\tTextField t0000 = (TextField) n0000.getChildren().get(1);\n\t\tLabel l0000 = (Label) n0000.getChildren().get(3);\n\t\tString txt = t0000.getText();\n\t\tString[] nums = txt.split(\",\");\n\t\tif (nums.length != 4) {\n\t\t\tvalidvalues = false;\n\t\t\tGUIerrorout = new Alert(AlertType.ERROR, \"Invalid Color Format!\\nFormat: <0-255>,<0-255>,<0-255>,<0-1> \\n (red),(green),(blue),(alpha)\");\n\t\t\tGUIerrorout.showAndWait();\n\t\t}\n\t\tif (validvalues) {\n\t\t\tint[] colorvalues = new int[3];\n\t\t\tdouble alphavalue = 1.0;\n\t\t\ttry {\n\t\t\t\tfor(int x = 0; x < 3; x++) {\n\t\t\t\t\tcolorvalues[x] = Integer.parseInt(nums[x]);\n\t\t\t\t}\n\t\t\t\talphavalue = Double.parseDouble(nums[3]);\n\t\t\t} catch(Exception e) {\n\t\t\t\tvalidvalues = false;\n\t\t\t\tGUIerrorout = new Alert(AlertType.ERROR, \"Invalid Color Format!\\nFormat: <0-255>,<0-255>,<0-255>,<0-1> \\n (red),(green),(blue),(alpha)\");\n\t\t\t\tGUIerrorout.showAndWait();\n\t\t\t}\n\t\t\tif (alphavalue <= 1.0 && alphavalue >= 0.0 && colorvalues[0] >= 0 && colorvalues[0] < 256 && colorvalues[1] >= 0 && colorvalues[1] < 256 && colorvalues[2] >= 0 && colorvalues[2] < 256){\n\t\t\t\tif (validvalues) {\n\t\t\t\t\tl0000.setTextFill(Color.rgb(colorvalues[0],colorvalues[1],colorvalues[2],alphavalue));\n\t\t\t\t\tusercolors[colorSetterId] = Color.rgb(colorvalues[0],colorvalues[1],colorvalues[2],alphavalue);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tGUIerrorout = new Alert(AlertType.ERROR, \"Invalid Color Format!\\nFormat: <0-255>,<0-255>,<0-255>,<0-1> \\n (red),(green),(blue),(alpha)\");\n\t\t\t\tGUIerrorout.showAndWait();\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public void excute() {\n drawable.setColor(color);\n }",
"private void onColourWheelInput(MouseEvent e)\n {\n int x = (int)e.getX(), y = (int)e.getY();\n try\n {\n setColour(pickerWheel.getImage().getPixelReader().getColor(x, y), true);\n syncSliderInput();\n syncHexInput();\n syncRgbInput();\n } catch (IndexOutOfBoundsException ex){}\n }",
"@Test\n\tpublic void testSetColor() {\n\n\t\tproc = new ByteProcessor(1,3,new byte[] {1,2,3},new IndexColorModel(8,1,new byte[]{1},new byte[]{2},new byte[]{3}));\n\n\t\tif (IJInfo.RUN_ENHANCED_TESTS)\n\t\t{\n\t\t\t// this test crashes with a null ptr exception\n\t\t\tip = new ImagePlus(\"MyChemicalRomance\", proc);\n\t\t\tip.setColor(null);\n\t\t}\n\n\t\t// try to set color of ImagePlus with no processor\n\t\t// ... should do nothing\n\t\tip = new ImagePlus();\n\t\t// can't rely on as packages may change : assertNull(ip.ip);\n\t\tip.setColor(Color.yellow);\n\t\t// can't do due to access: assertEquals(ip.ip.drawingColor,Color.black);\n\n\t\t// try to set color of processor when it exists\n\t\t// ... should set something lower -> defers to ImageProcessor.setColor() -> test there\n\t\tip = new ImagePlus(\"MyChemicalRomance\", proc);\n\t\t// can't rely on as packages may change : assertEquals(proc,ip.ip);\n\t\tip.setColor(Color.magenta);\n\t\t// can't do due to access: assertEquals(ip.ip.drawingColor,Color.magenta);\n\t}",
"public void updateColorLabel(Color currColor) {\n switch (currColor){\n case GREEN:\n colorLabel2.setBackground(java.awt.Color.green);\n break;\n case YELLOW:\n colorLabel2.setBackground(java.awt.Color.yellow);\n break;\n case RED:\n colorLabel2.setBackground(java.awt.Color.red);\n break;\n case BLUE:\n colorLabel2.setBackground(java.awt.Color.blue);\n break;\n case NONE:\n colorLabel2.setBackground(java.awt.Color.black);\n break;\n }\n }",
"String getColor();",
"@Override\n public void setColorFilter(ColorFilter colorFilter) {}",
"@Override\n\tpublic void Red() {\n\t\tSystem.out.println(\"Red Light\");\n\t\t\n\t}",
"public abstract BossColor getColor();",
"@Override\n\t\tpublic Color color() { return color; }",
"public static void update(){\n\t\t\n\t\tgraphFrame.setColor(color);\n\t}",
"private void onSetColor() {\r\n\t Frame frame = JOptionPane.getFrameForComponent(getContentComponent());\r\n\t Color newColor = JColorChooser.showDialog(frame, \"Choose color\", DEF_CLUSTER_COLOR);\r\n\t if (newColor != null) {\r\n\t setClusterColor(newColor);\r\n\t }\r\n\t}",
"abstract String getColor();",
"public abstract int rgbColor(double u, double v);",
"abstract public String getColor();"
]
| [
"0.7552862",
"0.752411",
"0.7387065",
"0.7365436",
"0.7276",
"0.726505",
"0.72466636",
"0.72117895",
"0.7187952",
"0.71712005",
"0.7022813",
"0.70089513",
"0.69839936",
"0.69805795",
"0.6979288",
"0.6978234",
"0.69730407",
"0.6959583",
"0.6930265",
"0.6930265",
"0.69171005",
"0.68926597",
"0.6890799",
"0.6844768",
"0.68357706",
"0.682323",
"0.6799746",
"0.67980194",
"0.6787294",
"0.67855304",
"0.6780292",
"0.6769403",
"0.6768001",
"0.6730152",
"0.6727003",
"0.6722257",
"0.6714105",
"0.6714105",
"0.67029196",
"0.6700186",
"0.6693466",
"0.6662674",
"0.6661577",
"0.6632883",
"0.6630101",
"0.662512",
"0.66092116",
"0.6595756",
"0.6585088",
"0.65834165",
"0.6569423",
"0.6563962",
"0.6563962",
"0.6544304",
"0.6533769",
"0.6527544",
"0.6526296",
"0.65198153",
"0.6518039",
"0.6514565",
"0.65136015",
"0.65132475",
"0.65046525",
"0.65024954",
"0.64997697",
"0.6476523",
"0.64705163",
"0.64669406",
"0.6455778",
"0.6439289",
"0.6437806",
"0.6433329",
"0.643025",
"0.6429719",
"0.6425381",
"0.6425093",
"0.6420668",
"0.6416735",
"0.64089847",
"0.6403825",
"0.640306",
"0.640289",
"0.63996583",
"0.63938975",
"0.6388068",
"0.63848853",
"0.63721657",
"0.6369436",
"0.6368163",
"0.6366551",
"0.63631785",
"0.63618577",
"0.6360217",
"0.635927",
"0.6358307",
"0.6356753",
"0.63563037",
"0.6349128",
"0.6344841",
"0.6343346"
]
| 0.7250815 | 6 |
_____________________________________ Test Everything ________________________________________. | @Test
public void testEverything() {
testAnimation.addShape(r, 1, 100);
testAnimation.addShape(c, 6, 100);
move1 = new MoveShape(r, 200.0, 200.0, 300.0, 300.0);
move2 = new MoveShape(c, 500.0, 100.0, 500.0, 400.0);
move3 = new MoveShape(r, 300.0, 300.0, 200.0, 200.0);
size1 = new ScaleShape(r, 50.0, 100.0, 25.0, 100.0);
colorChange1 = new ChangeColor(c, 0, 0, 1, 0, 1, 0);
testAnimation.addEvent(r, move1, 10, 50);
testAnimation.addEvent(c, move2, 20, 70);
testAnimation.addEvent(c, colorChange1, 50, 80);
testAnimation.addEvent(r, size1, 51, 70);
testAnimation.addEvent(r, move3, 70, 100);
assertEquals("Shapes:\n"
+ "Name: R\n"
+ "Type: rectangle\n"
+ "Min corner: (200.0,200.0), Width: 50.0, Height: 100.0, Color: (1,0,0)\n"
+ "Appears at t=1\n"
+ "Disappears at t=100\n"
+ "\n"
+ "Name: C\n"
+ "Type: ellipse\n"
+ "Center: (500.0,100.0), X radius: 60.0, Y radius: 30.0, Color: (0,0,1)\n"
+ "Appears at t=6\n"
+ "Disappears at t=100\n"
+ "\n"
+ "R moves from (200.0,200.0) to (300.0,300.0) from time t=10 to t=50\n"
+ "C moves from (500.0,100.0) to (500.0,400.0) from time t=20 to t=70\n"
+ "C changes color from (0,0,1) to (0,1,0) from time t=50 to t=80\n"
+ "R changes width from 50.0 to 25.0 from time t=51 to t=70"
+ "\nR moves from (300.0,300.0) to (200.0,200.0) from time"
+ " t=70 to t=100\n",
testAnimation.toString());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\r\n\tpublic void testSanity() {\n\t}",
"@Override\r\n\t\t\tpublic void test() {\n\t\t\t}",
"private void test() {\n\n\t}",
"public void testCheckOxyEmpty() {\n }",
"@Test\n\tpublic void testMain() {\n\t\t// TODO: test output streams for various IO methods, emulating a user's\n\t\t// input - kinda like Joel did for CSSE2310\n\t\tAssert.fail();\n\t}",
"@Override\n public void runTest() {\n }",
"public void testGetBasedata() {\n }",
"@Test\n public void testWalkForPduTarget() throws Exception {\n//TODO: Test goes here... \n }",
"@Test\n public void shouldProcessData() throws Exception {\n }",
"@Test\n public void testOncoKBInfo() {\n // TODO: test OncoKBInfo\n }",
"@Test\n public void testDAM30203001() {\n testDAM30102001();\n }",
"public void testGetInsDyn() {\n }",
"@Test\n public void matchCorrect() {\n }",
"public void testaReclamacao() {\n\t}",
"@Test\n\tpublic void testMain() {\n\t}",
"@Test\n public void testAll() throws ParseException {\n testCreate();\n testExists(true);\n testGetInfo(false);\n testUpdate();\n testGetInfo(true);\n testDelete();\n testExists(false);\n }",
"@Test\n\tpublic void testTotalPuzzleGenerated() {\n\t}",
"@Test\n\tpublic void testVersionCheck() throws Exception{\n\t}",
"@Test\r\n public void elCerdoNoSePuedeAtender() {\n }",
"public static void main(String[] args) {\n // PUT YOUR TEST CODE HERE\n }",
"private void doTests()\n {\n doDeleteTest(); // doSelectTest();\n }",
"@Test\n\tpublic void check() {\n\n\t\ttry {\n\t\t\tSystem.out.println(\"Unit Test Begins\");\n\t\t\t// Generate Random Log file\n\t\t\tUnitTestLogGenerator.generateRandomLogs();\n\t\t\t// Generate Cmd String\n\t\t\tString cmd = ClientClass.generateCommand(IpAddress, \"seth\", \"v\",\n\t\t\t\t\ttrue);\n\t\t\t// Run Local Grep;\n\t\t\tlocalGrep(cmd);\n\t\t\t// Connecting to Server\n\t\t\tConnectorService connectorService = new ConnectorService();\n\t\t\tconnectorService.connect(IpAddress, cmd);\n\t\t\tInputStream FirstFileStream = new FileInputStream(\n\t\t\t\t\t\"/tmp/localoutput_unitTest.txt\");\n\t\t\tInputStream SecondFileStream = new FileInputStream(\n\t\t\t\t\t\"/tmp/output_main.txt\");\n\t\t\tSystem.out.println(\"Comparing the two outputs...\");\n\t\t\tboolean result = fileComparison(FirstFileStream, SecondFileStream);\n\t\t\tAssert.assertTrue(result);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Test\n\tpublic void testReadTicketOk() {\n\t}",
"public void testCheck()\r\n {\n DataUtil.check(9, \"This is a test!\");\r\n }",
"public void test() {\n\tassertTrue(true);\n\t}",
"@Test\n public void testDAM30402001() {\n testDAM30101001();\n }",
"@Test\n public void test() {\n\n testBookExample();\n // testK5();\n // testK3_3();\n }",
"@Test\n public void testGetProductInfo() throws Exception {\n }",
"@Test\n public void testQuickMapList() {\n//TODO: Test goes here... \n }",
"public void testWriteOrders() throws Exception {\n }",
"@Test\r\n\tpublic void contents() throws Exception {\n\t}",
"@Test\n\tvoid test() {\n\t\t\n\t}",
"public void testBidu(){\n\t}",
"@Test\r\n public void testFindAll() throws Exception {\r\n }",
"@Override\n\tpublic void test() {\n\t\t\n\t}",
"@Test\n public void testPrintPosLnS() throws Exception\n {\n//TODO: Test goes here... \n }",
"@Test\n public void testDAM30601001() {\n testDAM30102001();\n }",
"@Test\n\tvoid testLectureChaineCaracteres() {\n\t}",
"@Test\r\n\tpublic void test() {\r\n\t}",
"@Test\n public void testPrintErrPosLnS() throws Exception\n {\n//TODO: Test goes here... \n }",
"public void testGetConnection() {\r\n \r\n }",
"@Test\n public void testingTheTwoPlane2016Order() {\n }",
"@Test\n public void testCheckForProduct() throws Exception {\n }",
"@Test\n public void accuseSuccesTest() throws Exception {\n }",
"@Test\n public void Tester_UI_when_find_contact_not_added() throws Exception{System.out.println(\"TODO\") ;}",
"@Test\n\tpublic void testNormalPuzzleGeneration() {\n\t}",
"@Test\n public void testAddACopy() {\n }",
"@Test\n\tvoid searchTest() {\n\t}",
"public void testSetBasedata() {\n }",
"@Test\n public void testStuff() {\n\n assertTrue(true);\n }",
"@Test\n public void testQueryList(){\n }",
"@Override\n public void testGetAllObjects() {\n }",
"@Test\n\tvoid testLectureChoixInt() {\n\t\t\n\t}",
"@Test\n public void main() {\n // App.main(null);\n // assertEquals(\"Hello world\", outContent.toString());\n }",
"@Test\r\n public void testGreeting02(){\r\n\r\n assertEquals(\"Hello SQS\", greets.greet(\"SQS\"));\r\n assertEquals(\"Hello TDD\", greets.greet(\"TDD\"));\r\n }",
"@Test\r\n public void testSerialReader() {\n Assert.assertTrue(true);\r\n }",
"@Test\n public void testingTheSixFlatbed2017Order() {\n }",
"@Test\n public void temporaryTeamClosingUnavalableOption() {\n\n }",
"@Test\n public void simpleUse(){\n }",
"@Test\n\tpublic void test() {\n\t}",
"@Test\n\tpublic void test() {\n\t}",
"@Test\n public void testDAM30903001() {\n testDAM30802001();\n }",
"@Test\n\tpublic void testEvilPuzzleGeneration() {\n\t}",
"@Test\npublic void testInitRobotGaming() throws Exception {\n try {\n RobotGamingProcess.initRobotGaming(mapFileList, strategyArrayList, gamesValue, gameRoundValue);\n } catch (ExceptionInInitializerError e) {\n //e.printStackTrace();\n }\n Assert.assertTrue(strategyArrayList.get(0).toString().equals(\"Aggressive\"));\n Assert.assertTrue(strategyArrayList.get(1).toString().equals(\"Random\"));\n}",
"@Test\n public void questionIfNotAlreadyAccusedTest() throws Exception {\n\n }",
"private test5() {\r\n\t\r\n\t}",
"@Override\n public void test() {\n \n }",
"@Test\n public void testQuickCopy() {\n//TODO: Test goes here... \n }",
"@Override\n @Before\n public void setUp() throws IOException {\n }",
"@Override\n public void testTwoRequiredGroups() {\n }",
"@Override\n public void testTwoRequiredGroups() {\n }",
"@Test\r\n\tpublic void testFrontTimes() {\r\n//\t\tassertEquals(\"ChoCho\", WarmUpTwo.frontTimes)\r\n\t\tfail(\"Not yet implemented\");\r\n\t\t\r\n\t}",
"private void assertAll() {\n\t\t\n\t}",
"@Test\npublic void testFindDtoListBySql() throws Exception { \n//TODO: Test goes here... \n}",
"@Test\n public void testDAM30103001() {\n // settings as done for testDAM30102001 are identical\n testDAM30102001();\n }",
"@Test\n void test() {\n Game g = init(\"gen_2p_02\");\n List<Player> players = g.getData().getPlayers();\n wrappedIllegalCommand(g, players.get(0), \"tool 6\");\n wrappedLegalCommand(g, players.get(0), \"pick 1\");\n assertTrue(g.isUndoAvailable());\n wrappedLegalCommand(g, players.get(0), \"tool 6\");\n assertFalse(g.isUndoAvailable());\n lightestShade(g, players);\n notLightestShade(g, players);\n }",
"@Test\n public void testGetNext() throws Exception {\n//TODO: Test goes here... \n }",
"@Test\n public void shouldTestBoardStatus(){\n\n }",
"@Override\n public void setUp() {\n }",
"@Test\r\n\tpublic void testPrintHelloWorld() {\r\n \r\n\t\tAssert.assertEquals(App.getHelloWorld(), \"Hello World\");\r\n \r\n\t}",
"@Test\n public void testGetAnalyzedData() {\n System.out.println(\"getAnalyzedData\");\n \n }",
"@Test //This is integration test\r\n\tpublic void testCalculatePrice01() throws Exception\r\n\t{\n\t\tImportInformation information = new ImportInformation();\r\n\t\tinformation.importMenu(\"Food_Data_Test1\");\r\n\t\tinformation.importUserInput();\t\r\n\t\tCalculation calcPrice = new Calculation();\r\n\t\tcalcPrice.calculatePrice(information.getMenu(),information.getUserInput());\r\n\t\t// compare the object itself and its side effects instead of String output, the string output can be done in main.\r\n\t\tArrayList<Food> exspectedFoodList = new ArrayList<Food>();\r\n\t\tArrayList<Combination> exspectedCombinationList = new ArrayList<Combination>();\r\n\t\tassertEquals(exspectedCombinationList, calcPrice.getResult());\r\n\t}",
"@Test\r\n public void testRentOut() {\r\n }",
"@Test\n public void verifyPathsInSequence() {\n LOG.debug(\"### Executing \"+ Thread.currentThread().getStackTrace()[1].getMethodName() +\" ####\");\n testGetCompanyHome();\n testGetCabinetFolder();\n testGetCaseFolder();\n testGetDocumentLibraryFolder();\n testEvidenceBankFolder();\n\n }",
"private void testGet() {\n init();\n assertTrue(\"FListInteger.get(l1, 0)\", FListInteger.get(l1, 0) == 5);\n assertTrue(\"FListInteger.get(l2, 0)\", FListInteger.get(l2, 0) == 4);\n assertTrue(\"FListInteger.get(l3, 0)\", FListInteger.get(l3, 0) == 7);\n }",
"@Test\n\tpublic void testCanEnter(){\n\t}",
"@Test\n public void testInsertData() throws Exception {\n//TODO: Test goes here... \n }",
"@org.junit.Test\r\n\tpublic void test() {\n\t\t\t\t\r\n\t}",
"@Test\n public void testQuery(){\n }",
"@Test\n\tpublic void test(){\n\t}",
"@Override\n\tpublic void testEngine() {\n\t\t\n\t}",
"@Test\n\tpublic void testQuery1() {\n\t}",
"@Test\n\tpublic void testFtoC(){\n\t}",
"@Test\n public void testProgramElementsType() {\n // TODO: test ProgramElementsType\n }",
"@Test\n\tpublic void getWorksTest() throws Exception {\n\t}",
"public void test() {\n\t}",
"@Before\n\t public void setUp() {\n\t }",
"@Test\n public void z_topDown_TC03() {\n try {\n Intrebare intrebare = appService.addNewIntrebare(\"Enunt?\", \"1) Raspuns1\", \"2) Raspuns2\", \"3) Raspuns3\",\n \"1\", \"M\");\n Intrebare intrebare1 = appService.addNewIntrebare(\"Enunt?\", \"1) Raspuns1\", \"2) Raspuns2\", \"3) Raspuns3\",\n \"1\", \"A\");\n Intrebare intrebare2 = appService.addNewIntrebare(\"Enunt?\", \"1) Raspuns1\", \"2) Raspuns2\", \"3) Raspuns3\",\n \"1\", \"B\");\n Intrebare intrebare3 = appService.addNewIntrebare(\"Enunt?\", \"1) Raspuns1\", \"2) Raspuns2\", \"3) Raspuns3\",\n \"1\", \"C\");\n assertTrue(true);\n assertTrue(appService.exists(intrebare));\n assertTrue(appService.exists(intrebare1));\n assertTrue(appService.exists(intrebare2));\n assertTrue(appService.exists(intrebare3));\n\n try {\n ccir2082MV.evaluator.model.Test test = appService.createNewTest();\n assertTrue(test.getIntrebari().contains(intrebare));\n assertTrue(test.getIntrebari().contains(intrebare1));\n assertTrue(test.getIntrebari().contains(intrebare2));\n assertTrue(test.getIntrebari().contains(intrebare3));\n assertTrue(test.getIntrebari().size() == 5);\n } catch (NotAbleToCreateTestException e) {\n assertTrue(false);\n }\n\n Statistica statistica = appService.getStatistica();\n assertTrue(statistica.getIntrebariDomenii().containsKey(\"Literatura\"));\n assertTrue(statistica.getIntrebariDomenii().get(\"Literatura\")==1);\n\n assertTrue(statistica.getIntrebariDomenii().containsKey(\"M\"));\n assertTrue(statistica.getIntrebariDomenii().get(\"M\")==1);\n\n assertTrue(statistica.getIntrebariDomenii().containsKey(\"A\"));\n assertTrue(statistica.getIntrebariDomenii().get(\"A\")==1);\n\n assertTrue(statistica.getIntrebariDomenii().containsKey(\"B\"));\n assertTrue(statistica.getIntrebariDomenii().get(\"B\")==1);\n\n assertTrue(statistica.getIntrebariDomenii().containsKey(\"C\"));\n assertTrue(statistica.getIntrebariDomenii().get(\"C\")==1);\n\n } catch (DuplicateIntrebareException | IntrebareValidatorFailedException e) {\n e.printStackTrace();\n assertTrue(false);\n } catch (NotAbleToCreateStatisticsException e) {\n assertTrue(false);\n }\n }",
"@Test\n\tpublic void testHardPuzzleGeneration() {\n\t}",
"@Test\n public void testListStorageBinInformation2() throws Exception {\n System.out.println(\"listStorageBinInformation\");\n Long factoryId = 90L;\n String result = \"\";\n try {\n FactoryInventoryManagementModule.listStorageBinInformation(factoryId);\n } catch (Exception ex) {\n result = ex.getMessage();\n }\n assertEquals(\"Factory is not found!\", result);\n }",
"@Test\n\tpublic void testDoGeneration() {\n\t}"
]
| [
"0.7457519",
"0.7364855",
"0.71379596",
"0.69984955",
"0.6957895",
"0.695563",
"0.69123274",
"0.68819237",
"0.688068",
"0.6828251",
"0.6816723",
"0.68108946",
"0.6774237",
"0.6766034",
"0.6736772",
"0.6734664",
"0.6725875",
"0.6722546",
"0.67100465",
"0.67030156",
"0.670068",
"0.6697252",
"0.6694902",
"0.66890323",
"0.6685262",
"0.667519",
"0.6672561",
"0.66629106",
"0.6659816",
"0.6657759",
"0.6655363",
"0.6646137",
"0.66451246",
"0.6644845",
"0.66343844",
"0.6632923",
"0.66256934",
"0.66211206",
"0.6620298",
"0.6619897",
"0.6613252",
"0.6612097",
"0.6611877",
"0.6609138",
"0.65998524",
"0.6596493",
"0.65959835",
"0.659507",
"0.65847474",
"0.6580976",
"0.6580145",
"0.6573355",
"0.65704775",
"0.6568898",
"0.65609396",
"0.6559268",
"0.6550185",
"0.6542234",
"0.6540994",
"0.65401775",
"0.65401775",
"0.6535063",
"0.6534616",
"0.65345895",
"0.6529568",
"0.65146625",
"0.6512897",
"0.6498507",
"0.64943105",
"0.64937174",
"0.64937174",
"0.64912695",
"0.6486851",
"0.6485951",
"0.64850354",
"0.64827985",
"0.6474802",
"0.64742965",
"0.6471258",
"0.6470855",
"0.6468719",
"0.6467505",
"0.64612967",
"0.64610046",
"0.64562684",
"0.6448548",
"0.64453304",
"0.64400434",
"0.6439546",
"0.6437098",
"0.6435178",
"0.6434118",
"0.64335966",
"0.64331055",
"0.64312035",
"0.6430536",
"0.6427274",
"0.6415549",
"0.64143616",
"0.64128536",
"0.64119893"
]
| 0.0 | -1 |
make sure we have implementation for all supported obj functions | @Test
public void testObjFunction() {
for (XGBoostMojoModel.ObjectiveType type : XGBoostMojoModel.ObjectiveType.values()) {
assertNotNull(type.getId());
assertFalse(type.getId().isEmpty());
// check we have an implementation of ObjFunction
assertNotNull(XGBoostJavaMojoModel.getObjFunction(type.getId()));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract void mo1184a(Object obj);",
"void mo3207a(Object obj);",
"default ObjectHandler<? extends T> handleObject() {\n throw new UnsupportedOperationException();\n }",
"void mo6504by(Object obj);",
"void mo67921a(Object obj);",
"public void setupConvenienceObjects();",
"void m21807c(Object obj);",
"void m21808d(Object obj);",
"void m21809e(Object obj);",
"void m21805a(Object obj);",
"boolean mo10605a(Object obj);",
"void m21806b(Object obj);",
"public void mo1774a(Object obj) {\n }",
"public static void objectDemo() {\n\t}",
"public abstract String mo83558a(Object obj);",
"public abstract Object mo1771a();",
"public abstract Object mo26777y();",
"default boolean checkDbObj(Object object) {\n return false;\n }",
"public void objectTest() {\n }",
"public boolean checkInterface(Object obj) {\n return true;\n }",
"public abstract T zzs(Object obj);",
"private static interface WithoutObjectOverrides {\n\n public boolean equals();\n\n public long hashCode(Object obj);\n\n public void toString(long foo);\n }",
"public abstract Object mo1185b();",
"abstract String applicable(Method[] getters) throws InvalidObjectException;",
"@Override\r\n\tpublic boolean validaObj() {\n\t\treturn false;\r\n\t}",
"private static interface WithObjectOverrides {\n\n public boolean equals(Object obj);\n\n public int hashCode();\n\n public String toString();\n }",
"public abstract void zzf(Object obj);",
"public abstract B zzt(Object obj);",
"private void findMethods() {\n List<Method> methods = new ArrayList<Method>(Arrays.asList(getObject().getClass().getMethods()));\r\n List<Method> objectMethods = new ArrayList<Method>(Arrays.asList(Object.class.getMethods()));\r\n methods.removeAll(objectMethods);\r\n \r\n for(Method method:methods) {\r\n //does method have @ManagedAttribute annotation?\r\n if(method.isAnnotationPresent(ManagedAttribute.class) || method.isAnnotationPresent(Property.class)) {\r\n exposeManagedAttribute(method);\r\n }\r\n //or @ManagedOperation\r\n else if (method.isAnnotationPresent(ManagedOperation.class) || isMBeanAnnotationPresentWithExposeAll()){\r\n exposeManagedOperation(method); \r\n } \r\n }\r\n }",
"public final void mo64929a(Object obj) {\n }",
"Compatibility compatibility();",
"protected boolean findObject(Object obj){\n \n }",
"@Override\n protected void prot() {\n }",
"@Override\n public void testGetAllObjects() {\n }",
"public abstract void importObj(Object obj);",
"public boolean handlesObject(Object object);",
"public /* bridge */ /* synthetic */ boolean mo23140a(C7059Ec ec, Object obj) {\n return super.mo23140a(ec, obj);\n }",
"@Override\r\n\t\tpublic boolean implementEquals(Object obj) {\n\t\t\treturn false;\r\n\t\t}",
"private void init() {\n Method m = getAsListMethod();\r\n Class< ? > c = Object[].class;\r\n branchMethods.put( c, m );\r\n // Treat Map as an Entry set\r\n c = Map.class;\r\n m = getEntrySetMethod();\r\n branchMethods.put( c, m );\r\n // Make an Entry a List\r\n c = Entry.class;\r\n m = getEntryToListMethod();\r\n branchMethods.put( c, m );\r\n // Make a Pair a List\r\n c = Pair.class;\r\n m = getPairToListMethod();\r\n branchMethods.put( c, m );\r\n// c = Iterable.class;\r\n// m = null;\r\n// branchMethods.put( c, m );\r\n }",
"public interface Methods {\n\n /**\n * List all static methods for a given content model.\n *\n * @param cmpid Pid of the content model.\n * @param asOfTime Use the methods defined at this time (unix time in ms), or null for now.\n *\n * @return List of methods defined.\n * @throws BackendInvalidCredsException If current credentials provided are invalid.\n * @throws BackendMethodFailedException If communicating with Fedora failed.\n * @throws BackendInvalidResourceException\n * If content model doesn't exist.\n */\n public List<Method> getStaticMethods(String cmpid,\n Long asOfTime)\n throws\n BackendInvalidCredsException,\n BackendMethodFailedException,\n BackendInvalidResourceException;\n\n /**\n * List all dynamic methods for a given object.\n *\n * @param objpid Pid of the object.\n * @param asOfTime Use the methods defined at this time (unix time in ms), or null for now.\n *\n * @return List of methods defined.\n * @throws BackendInvalidCredsException If current credentials provided are invalid.\n * @throws BackendMethodFailedException If communicating with Fedora failed.\n * @throws BackendInvalidResourceException\n * If object doesn't exist.\n */\n public List<Method> getDynamicMethods(String objpid,\n Long asOfTime)\n throws\n BackendInvalidCredsException,\n BackendMethodFailedException,\n BackendInvalidResourceException;\n\n /**\n * Invoke a given method with the given parameters.\n *\n * @param pid The pid of the content model or object defining the method.\n * @param methodName The name of the method.\n * @param parameters Parameters for the method, as a map from name list of values.\n * @param asOfTime Use the methods defined at this time (unix time in ms), or null for now.\n *\n * @return Result of calling method.\n * @throws BackendInvalidCredsException If current credentials provided are invalid.\n * @throws BackendMethodFailedException If communicating with Fedora failed.\n * @throws BackendInvalidResourceException\n * If object, content model or method doesn't exist.\n */\n public String invokeMethod(String pid,\n String methodName,\n Map<String, List<String>> parameters,\n Long asOfTime)\n throws\n BackendInvalidCredsException,\n BackendMethodFailedException,\n BackendInvalidResourceException;\n}",
"private NativeSupport() {\n\t}",
"@Override\n public void updete(Object obj) {\n\n }",
"@Test\n public void checkIfSupportedTest() {\n assertTrue(EngineController.checkIfSupported(\"getMaxRotateSpeed\"));\n assertTrue(EngineController.checkIfSupported(\"rotate 10 1\"));\n assertTrue(EngineController.checkIfSupported(\"orient\"));\n // check interface, that specific for engine\n assertTrue(EngineController.checkIfSupported(\"getMaxThrust\"));\n assertTrue(EngineController.checkIfSupported(\"getCurrentThrust\"));\n assertTrue(EngineController.checkIfSupported(\"setThrust 333\"));\n }",
"@Override\n public boolean isSupported() {\n return true;\n }",
"final void mo6075a(Object obj) {\n C0932g c0932g;\n if (this.f2339b != null) {\n try {\n this.f2339b.mo6066a(obj);\n Iterator it = this.f2342e.f2295e.iterator();\n while (it.hasNext()) {\n c0932g = (C0932g) it.next();\n if (!c0932g.f2307c) {\n c0932g.mo6061a(this.f2339b.mo6066a(obj));\n }\n }\n return;\n } catch (ClassCastException e) {\n new StringBuilder(\"No such property (\").append(this.f2339b.mo6067a()).append(\") on target object \").append(obj).append(\". Trying reflection instead\");\n this.f2339b = null;\n }\n }\n Class cls = obj.getClass();\n if (this.f2340c == null) {\n mo6074a(cls);\n }\n Iterator it2 = this.f2342e.f2295e.iterator();\n while (it2.hasNext()) {\n c0932g = (C0932g) it2.next();\n if (!c0932g.f2307c) {\n if (this.f2345h == null) {\n this.f2345h = m2631a(cls, f2337o, \"get\", null);\n }\n try {\n c0932g.mo6061a(this.f2345h.invoke(obj, new Object[0]));\n } catch (InvocationTargetException e2) {\n e2.toString();\n } catch (IllegalAccessException e3) {\n e3.toString();\n }\n }\n }\n }",
"@Override\n public boolean isObject() {\n return false;\n }",
"public abstract boolean canHandle(ObjectInformation objectInformation);",
"void checkReconstructible() throws InvalidObjectException {\n // subclasses can override\n }",
"@Override\n public boolean isSupported() {\n return true;\n }",
"public abstract void MussBeDefined();",
"private void readObject() {/* default - does nothing empty block */\n\t}",
"static Object m6085a(Class<?> cls, Object obj) {\n if (obj != null && obj.getClass() == cls) {\n return obj;\n }\n switch (m6083a(obj)) {\n case 0:\n if (cls == ScriptRuntime.f6505l || cls == ScriptRuntime.f6503j) {\n return \"undefined\";\n }\n m6091c(\"undefined\", cls);\n return obj;\n case 1:\n if (cls.isPrimitive()) {\n m6091c(obj, cls);\n }\n return null;\n case 2:\n if (cls == Boolean.TYPE || cls == ScriptRuntime.f6494a || cls == ScriptRuntime.f6503j) {\n return obj;\n }\n if (cls == ScriptRuntime.f6505l) {\n return obj.toString();\n }\n m6091c(obj, cls);\n return obj;\n case 3:\n if (cls == ScriptRuntime.f6505l) {\n return ScriptRuntime.m6436d(obj);\n }\n if (cls == ScriptRuntime.f6503j) {\n return m6090b(Double.TYPE, obj);\n }\n if ((cls.isPrimitive() && cls != Boolean.TYPE) || ScriptRuntime.f6502i.isAssignableFrom(cls)) {\n return m6090b(cls, obj);\n }\n m6091c(obj, cls);\n return obj;\n case 4:\n if (cls == ScriptRuntime.f6505l || cls.isInstance(obj)) {\n return obj.toString();\n }\n if (cls == Character.TYPE || cls == ScriptRuntime.f6496c) {\n if (((CharSequence) obj).length() == 1) {\n return Character.valueOf(((CharSequence) obj).charAt(0));\n }\n return m6090b(cls, obj);\n } else if ((cls.isPrimitive() && cls != Boolean.TYPE) || ScriptRuntime.f6502i.isAssignableFrom(cls)) {\n return m6090b(cls, obj);\n } else {\n m6091c(obj, cls);\n return obj;\n }\n case 5:\n if (obj instanceof Wrapper) {\n obj = ((Wrapper) obj).mo18879a();\n }\n if (cls == ScriptRuntime.f6497d || cls == ScriptRuntime.f6503j) {\n return obj;\n }\n if (cls == ScriptRuntime.f6505l) {\n return obj.toString();\n }\n m6091c(obj, cls);\n return obj;\n case 6:\n case 7:\n if (obj instanceof Wrapper) {\n obj = ((Wrapper) obj).mo18879a();\n }\n if (cls.isPrimitive()) {\n if (cls == Boolean.TYPE) {\n m6091c(obj, cls);\n }\n return m6090b(cls, obj);\n } else if (cls == ScriptRuntime.f6505l) {\n return obj.toString();\n } else {\n if (cls.isInstance(obj)) {\n return obj;\n }\n m6091c(obj, cls);\n return obj;\n }\n case 8:\n if (cls == ScriptRuntime.f6505l) {\n return ScriptRuntime.m6436d(obj);\n }\n if (cls.isPrimitive()) {\n if (cls == Boolean.TYPE) {\n m6091c(obj, cls);\n }\n return m6090b(cls, obj);\n } else if (cls.isInstance(obj)) {\n return obj;\n } else {\n if (cls == ScriptRuntime.f6506m && (obj instanceof NativeDate)) {\n return new Date((long) ((NativeDate) obj).f6314a);\n }\n if (cls.isArray() && (obj instanceof NativeArray)) {\n NativeArray bcVar = (NativeArray) obj;\n long j = bcVar.f6285a;\n Class componentType = cls.getComponentType();\n Object newInstance = Array.newInstance(componentType, (int) j);\n for (int i = 0; ((long) i) < j; i++) {\n try {\n Array.set(newInstance, i, m6085a(componentType, bcVar.get(i, bcVar)));\n } catch (EvaluatorException e) {\n m6091c(obj, cls);\n }\n }\n return newInstance;\n } else if (obj instanceof Wrapper) {\n Object a = ((Wrapper) obj).mo18879a();\n if (cls.isInstance(a)) {\n return a;\n }\n m6091c(a, cls);\n return a;\n } else if (cls.isInterface() && ((obj instanceof NativeObject) || (obj instanceof NativeFunction))) {\n return m6086a(cls, (ScriptableObject) obj);\n } else {\n m6091c(obj, cls);\n return obj;\n }\n }\n default:\n return obj;\n }\n }",
"@Override\n\tpublic void testCompatibility() {\n\t\tSystem.out.println(\"compatibility test success\");\n\t}",
"protected abstract void action(Object obj);",
"public interface Customizable {\n\n /**\n * This method adds based on the parameter passed and the class it is implemented in.\n * @param obj object\n * @return true is added successfully, otherwise false\n */\n boolean add(Object obj);\n\n /**\n * This method removes based on the parameter passed and the class it is implemented in.\n * @param obj object\n * @return true is removed successfully, otherwise false\n */\n boolean remove(Object obj);\n}",
"void mo6079b(Object obj) {\n if (this.f2339b != null) {\n this.f2339b.mo6068a(obj, mo6080c());\n }\n if (this.f2340c != null) {\n try {\n this.f2344g[0] = mo6080c();\n this.f2340c.invoke(obj, this.f2344g);\n } catch (InvocationTargetException e) {\n e.toString();\n } catch (IllegalAccessException e2) {\n e2.toString();\n }\n }\n }",
"@Test\n public void testAssertObjectNoGetMethodsType() {\n // setup\n final NoGetMethodsType noGetMethodsType = new NoGetMethodsType(TEST);\n final ChangedProperty<String> jokerProperty = Property.change(NoGetMethodsType.PROPERTY, TEST + TEST);\n\n // method\n assertObject(EMPTY_STRING, noGetMethodsType, jokerProperty);\n }",
"public final void testSupports() {\r\n assertFalse(commandValidator.supports(sampleCommand.getClass()));\r\n assertTrue(commandValidator.supports(sampleValidatableCommand.getClass()));\r\n assertFalse(commandValidator.supports(this.getClass()));\r\n assertTrue(commandValidator.supports(sampleValidatable.getClass()));\r\n }",
"ObjectRealization createObjectRealization();",
"@Override\n\tpublic boolean isImplemented() {\n\t\treturn false;\n\t}",
"private CommonMethods() {\n }",
"@Override\r\n\tpublic boolean create(Jeu obj) {\n\t\treturn false;\r\n\t}",
"private void readObject() {\n\t\t/* default - does nothing empty block */}",
"public T caseImplementation(Implementation object)\n {\n return null;\n }",
"default T handleNull() {\n throw new UnsupportedOperationException();\n }",
"Object defaultReplaceObject(Object obj) throws IOException {\n\t logger.log(Level.FINEST, \"Object in stream instance of: {0}\", obj.getClass());\n\t try {\n\t\tif (obj instanceof DynamicProxyCodebaseAccessor ){\n\t\t logger.log(Level.FINEST, \"Object in stream instance of DynamicProxyCodebaseAccessor\");\n\t\t obj = \n\t\t ProxySerializer.create(\n\t\t\t (DynamicProxyCodebaseAccessor) obj,\n\t\t\t aout.defaultLoader,\n\t\t\t aout.getObjectStreamContext()\n\t\t );\n\t\t} else if (obj instanceof ProxyAccessor ) {\n\t\t logger.log(Level.FINEST, \"Object in stream instance of ProxyAccessor\");\n\t\t obj = \n\t\t ProxySerializer.create(\n\t\t\t (ProxyAccessor) obj,\n\t\t\t aout.defaultLoader,\n\t\t\t aout.getObjectStreamContext()\n\t\t );\n\t\t}\n\t } catch (IOException e) {\n\t\tlogger.log(Level.FINE, \"Unable to create ProxyAccessorSerializer\", e);\n\t\tthrow e;\n\t }\n\t Class c = obj.getClass();\n\t Class s = serializers.get(c);\n\t if (c.isAnnotationPresent(AtomicSerial.class)){} // Ignore\n\t else if (c.isAnnotationPresent(AtomicExternal.class)){} // Ignore\n\t // REMIND: stateless objects, eg EmptySet?\n\t else if (s != null){\n\t\ttry {\n\t\t Constructor constructor = s.getDeclaredConstructor(c);\n\t\t obj = constructor.newInstance(obj);\n\t\t} catch (NoSuchMethodException ex) {\n\t\t logger.log(Level.FINE, \"Unable to contruct serializer\", ex);\n\t\t} catch (SecurityException ex) {\n\t\t logger.log(Level.FINE, \"Unable to contruct serializer\", ex);\n\t\t} catch (InstantiationException ex) {\n\t\t logger.log(Level.FINE, \"Unable to contruct serializer\", ex);\n\t\t} catch (IllegalAccessException ex) {\n\t\t logger.log(Level.FINE, \"Unable to contruct serializer\", ex);\n\t\t} catch (IllegalArgumentException ex) {\n\t\t logger.log(Level.FINE, \"Unable to contruct serializer\", ex);\n\t\t} catch (InvocationTargetException ex) {\n\t\t logger.log(Level.FINE, \"Unable to contruct serializer\", ex);\n\t\t}\n\t }\n\t else if (obj instanceof Map) obj = new MapSerializer((Map) obj);\n\t else if (obj instanceof Set) obj = new SetSerializer((Set) obj);\n\t else if (obj instanceof Collection) obj = new ListSerializer((Collection) obj);\n\t else if (obj instanceof Permission) obj = new PermissionSerializer((Permission) obj);\n\t else if (obj instanceof Throwable) obj = new ThrowableSerializer((Throwable) obj);\n\t logger.log(Level.FINEST, \"Returning object in stream instance of: {0}\", obj.getClass());\n\t return obj;\n\t}",
"public abstract void mo42329d();",
"public abstract void mo70713b();",
"public void addFunction( Object obj)\r\n {\r\n functionClasses.add(obj);\r\n }",
"public abstract void mo6549b();",
"private static void checkVersionable(Object o) {\r\n if (!isVersionable(o))\r\n throw new IllegalArgumentException(\"passed non-versionable object\");\r\n }",
"public T caseCore(Core object) {\r\n\t\treturn null;\r\n\t}",
"@Test\n public void testSupports() {\n assertTrue(instance.supports(SpringRestService.class));\n // JAX-RS RestService class\n assertFalse(instance.supports(StandardRestService.class));\n // Default RestService class\n assertFalse(instance.supports(DefaultRestService.class));\n // No annotated RestService class\n assertFalse(instance.supports(RestService.class));\n // null\n assertFalse(instance.supports(null));\n }",
"public /* bridge */ /* synthetic */ void mo55094a() {\n super.mo55094a();\n }",
"@ReflectionDisable\npublic interface BaseObjectNominal extends BaseObjectNoOwnProperties {\n\n\t@Override\n\t@ReflectionHidden\n\tdefault String baseClass() {\n\n\t\treturn this.getClass().getSimpleName();\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final BasePrimitiveString name) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final BasePrimitive<?> name) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final BasePrimitiveString name, final BaseObject stop) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final CharSequence name) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final String name) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final String name, final BaseObject stop) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseObject baseGet(final BaseObject name, final BaseObject defaultValue) {\n\n\t\treturn defaultValue;\n\t}\n\n\t@Override\n\tdefault BaseObject baseGet(final BasePrimitive<?> name, final BaseObject defaultValue) {\n\n\t\treturn defaultValue;\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault BaseObject baseGet(final BasePrimitiveString name, final BaseObject defaultValue) {\n\n\t\treturn defaultValue;\n\t}\n\n\t@Override\n\tdefault BaseObject baseGet(final CharSequence name, final BaseObject defaultValue) {\n\n\t\treturn defaultValue;\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault BaseObject baseGet(final String name, final BaseObject defaultValue) {\n\n\t\treturn defaultValue;\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault BaseObject basePrototype() {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault BasePrimitiveNumber baseToNumber() {\n\n\t\treturn BasePrimitiveNumber.NAN;\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault BasePrimitiveString baseToString() {\n\n\t\treturn Base.forString(this.toString());\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault Object baseValue() {\n\n\t\treturn this;\n\t}\n\n\t@Override\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx, final BaseObject name, final BaseObject defaultValue, final ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n\t@Override\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx, final BasePrimitive<?> name, final BaseObject defaultValue, final ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx, final BasePrimitiveString name, final BaseObject defaultValue, final ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n\t@Override\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx,\n\t\t\tfinal CharSequence name,\n\t\t\tfinal BaseObject originalIfKnown,\n\t\t\tfinal BaseObject defaultValue,\n\t\t\tfinal ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n\t@Override\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx, final int index, final BaseObject originalIfKnown, final BaseObject defaultValue, final ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n\t@Override\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx, final String name, final BaseObject defaultValue, final ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n}",
"@Override\r\n public boolean remove(Object obj) {\r\n throw new UnsupportedOperationException(UNSUPPORTED);\r\n }",
"@Override\n\tpublic boolean create(Etape obj) {\n\t\treturn false;\n\t}",
"protected boolean func_70814_o() { return true; }",
"boolean hasObject();",
"boolean hasObject();",
"boolean hasObject();",
"boolean hasObject();",
"boolean hasObject();",
"boolean hasObject();",
"boolean hasObject();",
"private void readObject() {/*default - does nothing empty block */}",
"private void readObject() {/*default - does nothing empty block */}",
"private void readObject() {/*default - does nothing empty block */}",
"private void readObject() {/*default - does nothing empty block */}",
"private void readObject() {/*default - does nothing empty block */}",
"private void readObject() {/*default - does nothing empty block */}",
"private void readObject() {/*default - does nothing empty block */}",
"private void readObject() {/*default - does nothing empty block */}",
"private void readObject() {/*default - does nothing empty block */}",
"private void readObject() {/*default - does nothing empty block */}",
"@Override\r\n\tpublic boolean supports(Class<?> arg0) {\n\t\treturn false;\r\n\t}",
"@Override\n\tpublic void buildDefaultMethods(JDefinedClass cls) {\n\n\t}",
"@Override\n\tpublic void realFun() {\n\n\t}",
"protected synchronized boolean isObjectPresent() { return objPresent; }",
"public abstract void mo27386d();"
]
| [
"0.6515788",
"0.6497149",
"0.6480122",
"0.63175327",
"0.62503564",
"0.6216355",
"0.61957365",
"0.6190386",
"0.617692",
"0.61468196",
"0.6111871",
"0.6075703",
"0.6036246",
"0.6027329",
"0.59988636",
"0.5979165",
"0.59334344",
"0.59234244",
"0.58935636",
"0.58788836",
"0.5864141",
"0.58495283",
"0.5821326",
"0.57888967",
"0.5750823",
"0.574021",
"0.573096",
"0.56371486",
"0.55516744",
"0.5534454",
"0.5529916",
"0.5485004",
"0.54778206",
"0.54582834",
"0.54286116",
"0.5409858",
"0.54007435",
"0.5379828",
"0.5362476",
"0.5340354",
"0.5339582",
"0.53341097",
"0.53338015",
"0.5313955",
"0.5313824",
"0.5305708",
"0.5292323",
"0.52890795",
"0.5246937",
"0.5241761",
"0.52306527",
"0.52265054",
"0.5224064",
"0.5219875",
"0.5208125",
"0.51887065",
"0.51800454",
"0.5178501",
"0.5169821",
"0.5169137",
"0.5158345",
"0.5150748",
"0.51473445",
"0.51413965",
"0.51327634",
"0.51255155",
"0.51219136",
"0.51141185",
"0.51132774",
"0.51131874",
"0.5109128",
"0.5106584",
"0.51014495",
"0.5096253",
"0.50939864",
"0.5089679",
"0.5089215",
"0.5085173",
"0.50823635",
"0.50823635",
"0.50823635",
"0.50823635",
"0.50823635",
"0.50823635",
"0.50823635",
"0.5082174",
"0.5082174",
"0.5082174",
"0.5082174",
"0.5082174",
"0.5082174",
"0.5082174",
"0.5082174",
"0.5082174",
"0.5082174",
"0.5080827",
"0.5079877",
"0.5078908",
"0.5076948",
"0.50732636"
]
| 0.65267396 | 0 |
Created by zzq on 2016/11/4. | public interface SurgeryDao {
public boolean updateSurgery(@Param("surgery")Surgery surgery);
public boolean startSurgery(@Param("surgery")Surgery surgery);
public boolean endSurgery(@Param("surgery")Surgery surgery);
public List<String> selectDistinctDoctor();
public List<String> selectDistinctPatient();
public List<Surgery> selectSurgeryByState(@Param("state")int state);
public List<Surgery> selectSurgeryDynamic(@Param("startTime")long startTime,@Param("endTime")long endTime,@Param("doctor")String doctor,@Param("patient")String patient);
public Surgery selectSurgeryBySurgeryNo(@Param("surgeryNo")String surgeryNo);
public List<Surgery> selectExecutingSurgeryBySurgeryNoList(@Param("surgeryNoList")List<String> surgeryNoList);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"private stendhal() {\n\t}",
"private static void cajas() {\n\t\t\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n public void func_104112_b() {\n \n }",
"private void poetries() {\n\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void interr() {\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 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\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"private void kk12() {\n\n\t}",
"public final void mo51373a() {\n }",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"private void init() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"public void mo38117a() {\n }",
"@Override\n protected void initialize() {\n\n \n }",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void init() {\n }",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public void mo4359a() {\n }",
"@Override\n void init() {\n }",
"@Override\n public void init() {\n\n }",
"@Override\n public void init() {\n\n }",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n\tpublic void one() {\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\tpublic void debite() {\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\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"private void strin() {\n\n\t}",
"private void m50366E() {\n }",
"@Override\n public void init() {}",
"@Override\n protected void init() {\n }",
"protected boolean func_70814_o() { return true; }",
"@Override\r\n\tpublic void init() {}",
"@Override\n\tpublic void init() {\n\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\n\tpublic void init()\n\t{\n\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"private void init() {\n\n\n\n }",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"Constructor() {\r\n\t\t \r\n\t }",
"public void mo6081a() {\n }",
"private Rekenhulp()\n\t{\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"static void feladat4() {\n\t}",
"@Override\n public void initialize() { \n }",
"@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}",
"@Override\n\tpublic void afterInit() {\n\t\t\n\t}",
"@Override\n\tpublic void afterInit() {\n\t\t\n\t}",
"@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}"
]
| [
"0.6145879",
"0.60171974",
"0.5966407",
"0.592491",
"0.59106004",
"0.5906085",
"0.5906085",
"0.58766127",
"0.5860211",
"0.582393",
"0.58058983",
"0.57950187",
"0.5762024",
"0.57444876",
"0.574103",
"0.5727719",
"0.57269937",
"0.57222444",
"0.5721093",
"0.570783",
"0.5705247",
"0.5689972",
"0.5689972",
"0.56810975",
"0.56810975",
"0.56810975",
"0.56810975",
"0.56810975",
"0.5678905",
"0.566343",
"0.56518376",
"0.56362456",
"0.56272334",
"0.5610084",
"0.5609355",
"0.5607842",
"0.56022906",
"0.5600647",
"0.5583351",
"0.55799633",
"0.557788",
"0.5566947",
"0.5566947",
"0.5566947",
"0.5563831",
"0.55537015",
"0.55480784",
"0.55480784",
"0.5538464",
"0.55337924",
"0.5533481",
"0.5533481",
"0.5533481",
"0.5510514",
"0.5510275",
"0.5510275",
"0.5510275",
"0.5503847",
"0.5487026",
"0.5487026",
"0.54847443",
"0.5475762",
"0.5473991",
"0.5453911",
"0.54531085",
"0.54519576",
"0.54498863",
"0.54376334",
"0.5437063",
"0.5434124",
"0.5433351",
"0.5431776",
"0.5430865",
"0.54307604",
"0.5427159",
"0.5421234",
"0.5419539",
"0.5419539",
"0.5419539",
"0.5419539",
"0.5419539",
"0.5419539",
"0.5419539",
"0.5410445",
"0.5410445",
"0.5410445",
"0.5410445",
"0.5410445",
"0.5410445",
"0.5408792",
"0.54025334",
"0.53945935",
"0.53825533",
"0.5379207",
"0.5374149",
"0.53640497",
"0.5357676",
"0.53574246",
"0.53536373",
"0.53536373",
"0.535239"
]
| 0.0 | -1 |
Computes the price of a onetouch/notouch option. | public double price(
double spot,
double timeToExpiry,
double costOfCarry,
double rate,
double lognormalVol,
SimpleConstantContinuousBarrier barrier) {
ArgChecker.notNull(barrier, "barrier");
boolean isKnockIn = barrier.getKnockType().isKnockIn();
boolean isDown = barrier.getBarrierType().isDown();
double h = barrier.getBarrierLevel();
ArgChecker.isFalse(isDown && spot <= barrier.getBarrierLevel(),
"The Data is not consistent with an alive barrier (DOWN and spot<=barrier).");
ArgChecker.isFalse(!isDown && spot >= barrier.getBarrierLevel(),
"The Data is not consistent with an alive barrier (UP and spot>=barrier).");
double eta = isDown ? 1 : -1;
double df2 = Math.exp(-rate * timeToExpiry);
double lognormalVolSq = lognormalVol * lognormalVol;
double lognormalVolT = lognormalVol * Math.sqrt(timeToExpiry);
if (nearZero(Math.min(timeToExpiry, lognormalVolSq), SMALL)) {
return isKnockIn ? 0d : df2;
}
double mu = (costOfCarry - 0.5 * lognormalVolSq) / lognormalVolSq;
double lambda = Math.sqrt(mu * mu + 2 * rate / lognormalVolSq);
double m1 = lognormalVolT * (1 + mu);
double x2 = Math.log(spot / h) / lognormalVolT + m1;
double y2 = Math.log(h / spot) / lognormalVolT + m1;
double z = Math.log(h / spot) / lognormalVolT + lambda * lognormalVolT;
double xE = isKnockIn ?
getF(spot, z, lognormalVolT, h, mu, lambda, eta) :
getE(spot, df2, x2, y2, lognormalVolT, h, mu, eta);
return xE;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double getOptionPrice()\n {\n return optionPrice;\n }",
"public double Get_Option_User_Choice_Price(String Op_Set_Name)\n {\n for(OptionSet i: opset) {\n if(Op_Set_Name.equalsIgnoreCase(i.getName()))\n return (i.User_Choice_Price()); \n } \n return 0;\n }",
"private int getTotalPrice() {\n int unitPrice = 0;\n if (((CheckBox) findViewById(R.id.whipped_cream_checkbox)).isChecked()) {\n unitPrice += Constants.PRICE_TOPPING_WHIPPED_CREAM;\n }\n\n if (((CheckBox) findViewById(R.id.chocolate_checkbox)).isChecked()) {\n unitPrice += Constants.PRICE_TOPPING_CHOCOLATE;\n }\n\n unitPrice += Constants.PRICE_PER_COFFEE;\n return getNumberOfCoffees() * unitPrice;\n }",
"private void calculatePrice() {\n\t\tint temp = controller.getQualityPrice(hotel.getText(), quality.getText());\n\n\t\ttemp *= getDays();\n\n\t\tif (discountChoice > 0) {\n\t\t\tdouble discountTmp = (double) discountChoice / 100;\n\t\t\ttemp *= (1.00 - discountTmp);\n\t\t}\n\n\t\tprice.setText(Integer.toString(temp));\n\n\t}",
"public int calcMarketPrice() {\r\n player = Context.getInstance().getPlayer();\r\n //Random r = new Random();\r\n int techLevel = player.getCurrentPlanet().getTechLevel();\r\n Event event = player.getCurrentPlanet().getEvent();\r\n Resource resource = player.getCurrentPlanet().getResource();\r\n double price = basePrice;\r\n price += (ipl * (techLevel - mtlb)) + variance;\r\n if (player.getCurrentPlanet().getTechLevel() == this.ttp) {\r\n price *= Context.TECH_PRICE_MULT;\r\n }\r\n if (event.equals(this.ie)) {\r\n price *= event.getUpMult();\r\n } else if (event.equals(this.de)) {\r\n price *= event.getDownMult();\r\n }\r\n if (resource.equals(this.cr)) {\r\n price *= resource.getDownMult();\r\n } else if (resource.equals(this.er)) {\r\n price *= resource.getUpMult();\r\n }\r\n price *= (((double) player.getTrader() / DFIFTY) + 1.0);\r\n int finalPrice = (int) price;\r\n if (player.getTrader() > 0) {\r\n double discountedPrice = price;\r\n double trader = (double) player.getTrader();\r\n discountedPrice -= (price) * (4.0 * trader / PERCENT);\r\n return (int) discountedPrice;\r\n } else {\r\n return finalPrice;\r\n }\r\n }",
"@Override\n public double[] computeOption(Option o){\n double temp=o.getVolatility();\n double[] prices=new double[NUMOFDOTS];\n double vBase=o.getVolatility();\n int count= (NUMOFDOTS-1)/2; // count = 5\n\n if(o.getRight()==OptionRight.PUT){\n prices[count]=crunchPut(o); // Middle point should be the \"original\" option.\n for (int i = count ; i >0 ; i--) {\n o.setVolatility(vBase*(1-i* VOLAINTERVAL));\n prices[count-i]=crunchPut(o);\n o.setVolatility(vBase*(1+i* VOLAINTERVAL));\n prices[count+i]=crunchPut(o);\n }\n }\n\n if(o.getRight()==OptionRight.CALL){\n prices[count]=crunchCall(o); // Middle point should be the \"original\" option.\n for (int i = count ; i >0 ; i--) {\n o.setVolatility(vBase*(1-i* VOLAINTERVAL));\n prices[count-i]=crunchCall(o);\n o.setVolatility(vBase*(1+i* VOLAINTERVAL));\n prices[count+i]=crunchCall(o);\n }\n }\n o.setVolatility(temp);\n return prices;\n }",
"@Override\n\tpublic int howmuch() {\n\t\treturn price;\n\t}",
"@Override\n\t\tpublic Double offerPolicy(Integer value) {\n\t\t\tdouble offerPrice = (value/2)*ProductOriginalPrice.Apple + (value%2)*ProductOriginalPrice.Apple;\n\t\t\treturn offerPrice;\n\t\t}",
"private int calculatePrice() {\n int price = numberOfCoffees * 5;\n\n return price;\n\n\n }",
"private void calcPrice() {\n double itemPrice = 0;\n \n //get price of burger (base)\n if (singleRad.isSelected())\n {\n itemPrice = 3.50;\n }\n else \n {\n itemPrice = 4.75;\n }\n \n //check options add to item price\n if(cheeseCheckbox.isSelected())\n itemPrice = itemPrice += 0.50;\n if(baconCheckbox.isSelected())\n itemPrice = itemPrice += 1.25;\n if(mealCheckbox.isSelected())\n itemPrice = itemPrice += 4.00;\n \n //include the quantity for the item price\n int quantity= 1;\n if (quantityTextField.getText().equals(\"\"))\n quantityTextField.setText(\"1\");\n quantity = Integer.parseInt(quantityTextField.getText());\n itemPrice = itemPrice * quantity;\n\n \n //show the price no $ symbol\n \n itemPriceTextField.setText(d2.format(itemPrice));\n }",
"public void setPotatoesPrice(double p);",
"public double getPotatoesPrice();",
"private int calculatePrice(boolean hasWhipped, boolean hasChocolate){\n return quantity * (5 + (hasWhipped ? 1 : 0) + (hasChocolate ? 2 : 0));\n }",
"protected float getChoicePrice() {\n\t\treturn choiceOption.getPrice();\n\t}",
"public int calculatePrice() {\n int price = 5;\n if(hasWhippedCream) {\n price += 1;\n }\n if(hasChocolate) {\n price += 2;\n }\n return quantity * price;\n }",
"public double calcPrice() {\r\n\t\tdouble drinkPrice = getBasePrice();\r\n\t\tif(this.getSize()==SIZE.MEDIUM) {\r\n\t\t\tdrinkPrice+=getSizeUpPrice();\r\n\t\t}\r\n\t\telse if(this.getSize()==SIZE.LARGE) {\r\n\t\t\tdrinkPrice+=getSizeUpPrice();\r\n\t\t\tdrinkPrice+=getSizeUpPrice();\r\n\t\t}\r\n\t\t\r\n\t\tif(onWeekend) {\r\n\t\t\tdrinkPrice+=0.6;\r\n\t\t}\r\n\t\treturn drinkPrice;\r\n\t}",
"public int getPrice() {\r\n\t\tif (this.base.equals(\"tower\")) {\r\n\t\t\treturn price;\r\n\t\t}\r\n\t\treturn 0;\r\n\t}",
"public double calculatePrice(){\r\n\t\treturn getBasePrice()+getBasePrice()*getVat()+(getBasePrice()+getBasePrice()*getVat())*0.3;\r\n\t}",
"@Override\n public double calculatePrice() {\n return getVolume() * (1.0 + (getAlcoholPercent() / 100.0)) * this.liquids.size();\n }",
"public double getPrice() {\n double price = BASE_PRICE;\n for (Topping topping : toppings) {\n if (topping.isPremium()) {\n price += 1.25;\n } else {\n price += 0.75;\n }\n }\n return price;\n }",
"@Override\n\tpublic double getPrice() {\n\t\t\n\t\treturn 2000;\n\t}",
"private int calculatePrice(boolean hasWhippedCream, boolean hasChocolate) {\n int toppings = 0;\n\n if(hasWhippedCream){\n toppings += 1;\n }\n\n if(hasChocolate){\n toppings += 2;\n }\n\n return quantity * (priceOfCoffee + toppings);\n }",
"public static int getPrice() {\n return PRICE_TO_BUY;\n }",
"private double calculatePrice(boolean hasExtraCheese, boolean hasPepperoni, boolean hasHawaiian, String size) {\n double basePrice = PIZZA_PRICE;\n if (hasExtraCheese) {\n basePrice += BASIC_TOPPING_PRICE;\n }\n if (hasPepperoni) {\n basePrice += BASIC_TOPPING_PRICE;\n }\n if (hasHawaiian) {\n basePrice += HAWAIIAN_PRICE;\n }\n\n if (size.equals(getString(R.string.personal))){\n basePrice += PERSONAL_PRICE;\n }else if (size.equals(getString(R.string.medium))){\n basePrice += MEDIUM_PRICE;\n }else if (size.equals(getString(R.string.large))){\n basePrice += LARGE_PRICE;\n }else if (size.equals(getString(R.string.xtra))){\n basePrice += XTRA_PRICE;\n }\n return quantity * basePrice;\n }",
"double calculatePrice();",
"public double price(){\n if (basePrice() >1000){\n return basePrice() *0.95;\n }else\n return basePrice() * 0.98;\n }",
"private void calculatePrice(int quantity, int pricePerCup) {\n int price = quantity * pricePerCup;\n }",
"long getPrice();",
"private int getPrice(HardwareSet hws, boolean used){\n if(isNull(hws)) return 0;\n return used ? hws.getTotalSellPrice() : hws.getTotalPrice();\n }",
"private int calculatePrice(){\n int pric=5;\n CheckBox whipcream=(CheckBox) findViewById(R.id.check_box);\n CheckBox chocolate=(CheckBox) findViewById(R.id.check_box_choco);\n if (whipcream.isChecked()==true){\n pric+=1;\n }\n if (chocolate.isChecked()==true){\n pric+=2;\n }\n return quantity*pric;\n }",
"double getPrice();",
"double getPrice();",
"double getPrice();",
"private int getPrice(Hardware hw, boolean used){\n if(isNull(hw)) return 0;\n return used ? hw.getSellPrice() : hw.getPrice();\n }",
"private void calculatePrice() {\r\n int price = 0;\r\n int day = show.getDateTime().getDayOfMonth();\r\n int month = show.getDateTime().getMonthValue();\r\n \r\n for (int i = 0; i < seats.size(); i++) {\r\n String option = seats.get(i);\r\n \r\n if (Arrays.stream(sectionNames).parallel().anyMatch(option::contains)) {\r\n String section = option.replaceAll(\"\\\\d\",\"\");\r\n int number = Integer.parseInt(option.replaceAll(\"\\\\D+\",\"\"));\r\n \r\n if (section.equals(\"m\")) {\r\n if (number <= 100) {\r\n price += mainFloorPrice;\r\n } else {\r\n price += mainFloorPremium;\r\n }\r\n } else if (section.equals(\"sb\")) {\r\n if (number <= 25) {\r\n price += southBalconyPrice;\r\n } else {\r\n price += southBalconyPremium;\r\n }\r\n } else if (section.equals(\"wb\")) {\r\n price += westBalconyPrice;\r\n } else if (section.equals(\"eb\")) {\r\n price += eastBalconyPrice;\r\n }\r\n }\r\n }\r\n \r\n if (seats.size() >= 5 && seats.size() <= 10 && !(month == 12 && (day == 26 || day == 27))) {\r\n price -= (2 * seats.size());\r\n }\r\n \r\n if (seats.size() >= 11 && seats.size() <= 20 && !(month == 12 && (day == 26 || day == 27))) {\r\n price -= (5 * seats.size());\r\n }\r\n \r\n if (month == 12 && (day == 26 || day == 27)) {\r\n price = seats.size() * 20;\r\n }\r\n \r\n totalPrice = price;\r\n }",
"@Override\n\tpublic double getPrice() {\n\t\treturn 20;\n\t}",
"private int calculatePrice(boolean cream , boolean choco) {\n //Price per one cup is $5\n int pricePerCup = 5;\n\n\n //Cream topping costs $2\n if(cream == true & pricePerCup > 0){\n pricePerCup += 1;\n }\n\n //Chocolate topping costs $3\n if(choco == true & pricePerCup > 0){\n pricePerCup += 2;\n }\n\n return quantity * pricePerCup;\n }",
"public double calculatePrice() {\r\n\t\treturn menuItem.getPrice() * quantity;\t\r\n\t}",
"public abstract double calculateAppraisalPrice();",
"public void setOptionPrice(double optionPrice)\n {\n this.optionPrice = optionPrice;\n }",
"@Override\n public double getPrice() {\n return souvenir.getPrice() + 20;\n }",
"public double getPrice(){\r\n\t\ttry {\r\n\t\t\treturn this.workerobj.getDouble(WorkerController.PRICE);\r\n\t\t} catch (JSONException e) {\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t}",
"private double crunchCall(Option o) { \n int i;\n int countTrial;\n double deltaT;\n deltaT = o.getTerm() / numIntervals;\n double NumTrial;\n double trialAverage = 0;\n double trialPayoff;\n double temp = 0;\n double simulationRunningSum, simulationAveragePayoff;\n double stock;\n Random r = new Random();\n simulationRunningSum = 0.0;\n for (countTrial = 1; countTrial <= numTrials; countTrial++) {\n stock = o.getsNought();\n NumTrial = 0.0;\n double nns = 0;\n for (i = 0; i < numIntervals; i++) {\n nns = r.nextGaussian();\n stock = stock * Math.exp((o.getRiskFreeRate() - o.getVolatility() * o.getVolatility() / 2) * deltaT\n + o.getVolatility() * nns * Math.sqrt(deltaT));\n NumTrial += stock;\n temp = stock;\n\n }\n if (o.getStyle() == OptionStyle.ASIAN) {\n trialAverage = NumTrial / numIntervals;\n } else if ((o.getStyle() == OptionStyle.AMERICAN) || (o.getStyle() == OptionStyle.EUROPEAN)) {\n trialAverage = temp;\n }\n\n trialPayoff = Math.max(trialAverage - o.getStrikeP(), 0.0);\n simulationRunningSum += trialPayoff;\n }\n simulationAveragePayoff = simulationRunningSum / numTrials;\n double valueOfOption;\n valueOfOption = simulationAveragePayoff * Math.exp(-o.getRiskFreeRate() * o.getTerm());\n return valueOfOption;\n }",
"public double calcTotal(){\n\t\tdouble total; // amount to be returned\n\t\t\n\t\t// add .50 cents for any milk that isn't whole or skim, and .35 cents for flavoring\n\t\tif ((milk != \"whole\" && milk != \"skim\") && flavor != \"no\"){\n\t\t\tcost += 0.85;\t\n\t\t}\n\t\t\n\t\t// add .35 cents for flavoring\n\t\telse if (flavor != \"no\"){\n\t\t\tcost += 0.35;\t\n\t\t}\n\t\t\n\t\t// add .50 cents for milk that isn't whole or skim\n\t\telse if (milk != \"whole\" && milk != \"skim\"){\n\t\t\tcost += 0.50;\n\t\t}\n\t\t\n\t\telse{\n\t\t}\n\t\t\n\t\t// add .50 cents for extra shot of espresso\n\t\tif (extraShot != false){\n\t\t\ttotal = cost + 0.50;\n\t\t}\n\t\telse\n\t\t\ttotal = cost;\n\t\t\n\t\treturn total;\n\t}",
"float calculatePrice () \n\t{\n\t\tfloat final_price = 0;\n\t\tfinal_price = (float)(price * quantity); // price * number of items\n\t\tfinal_price += final_price*(.10); // add tax\n\t\tif(perishable.equals(\"P\"))\n\t\t{\n\t\t\tfloat ship = (float)(20* weight)*quantity; // add shipping\n\t\t\tship += ship*.20;\n\t\t\tfinal_price += ship;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfinal_price += (20* weight)*quantity; // add shipping\n\t\t}\n\t\treturn final_price;\n\t}",
"@Override\n public double getPrice() {\n return 2.5;\n }",
"int getPrice();",
"public double calcPrice()\n {\n double price = getWidth() * getLength() * getHeight() + this.getMyLoc().getBasePrice();\n if (tempLvl <= 49 || tempLvl >=65) { \n price += 30;\n }\n return price;\n }",
"public double getPrice();",
"private int calculatePrice(boolean addWhippedCream, boolean addChocolate,boolean takeAway) {\r\n int price=20;\r\n if (addWhippedCream){\r\n price=price+5;\r\n }\r\n\r\n if (addChocolate){\r\n price=price+7;\r\n }\r\n if (takeAway){\r\n price=price+2;\r\n }\r\n\r\n\r\n return quantity*price;\r\n\r\n }",
"public double price() {\n return price;\n }",
"abstract public double getPrice();",
"public void priceUpdate(){\n \n double attractionPrices = 0;\n Attraction attraction;\n for(int i=0; i< getAttractionsList().size();i++)\n {\n attraction = (Attraction) getAttractionsList().get(i);\n attractionPrices += attraction.getPrice();\n }\n hotelPrice = diff(getEndDate(), getStartDate());\n price = getTravel().getPrice() + getHotel().getPrice()*(hotelPrice) \n + getTransport().getPrice()*getTravel().getDistance()\n + attractionPrices;\n }",
"public double calculatePrice() {\n return 0;\n }",
"public void setPotatoesPrice(double p) {\n this.potatoesPrice = p;\n }",
"@Override\n public int getPrice() {\n return 20;\n }",
"public double getPrice()\r\n\t{\r\n\t\tif(isSpecial())\r\n\t\t{\r\n\t\t\treturn price * .5;\r\n\t\t}\r\n\t\treturn price;\r\n\t}",
"public double getPrice() {\n\t\treturn regularCheckOut.getPrice() * subscriberDiscount;\n\t}",
"public double calcCost() {\n if (pizzaSize.equals(\"small\")) {\n return 10.0 + ((cheeseToppings + pepperoniToppings + veggieToppings) * 2);\n\n }\n else if (pizzaSize.equals(\"medium\")) {\n return 12.0 + ((cheeseToppings + pepperoniToppings + veggieToppings) * 2);\n }\n else {\n return 14.0 + ((cheeseToppings + pepperoniToppings + veggieToppings) * 2);\n }\n }",
"@Override\n public double getPrice()\n {\n return room.getPrice() + PRICE;\n }",
"@Override\n public int pizzaPrice() {\n if (size.equals(\"Small\"))\n return SMALLPIZZA;\n else if (size.equals(\"Medium\"))\n return SMALLPIZZA + 2;\n else\n return SMALLPIZZA + 4;\n }",
"@Override\r\n\tpublic double getPrice() {\n\t\treturn pizza.getPrice()+ 12.88;\r\n\t}",
"public double getPrice(){\n\t\t\treturn price;\n\t\t}",
"@Override\n\tpublic double getPrice() {\n\t\treturn auto.getPrice() + AC_ADDITIONAL_CHARGE;\n\t}",
"public double getPrice(){\n\t\t\n\t\treturn price;\n\t}",
"public int getSellPrice(){\n\t\treturn (int)(price * 0.6);\n\t}",
"public Double getPrice();",
"public double getPrice(){\r\n\t\treturn price;\r\n\t}",
"public double getPrice(){\n\t\treturn this.price;\n\t}",
"public double getPrice() {\n return price_;\n }",
"public double getPrice() {\n return price_;\n }",
"@Override\n\tpublic float getPrice() {\n\t\treturn 70.0f;\n\t}",
"@Override\n public int getCost() {\n int price = (int) Math.round(this.weight * this.pricePerLbs); //get the price of the cookies in the form of an int\n return price; //return the price\n\n }",
"double purchasePrice();",
"public long getPrice() {\n return price;\n }",
"public float getPrice() {\n\t\treturn this._entree.getPriceWithAddons() + this._side.getPrice() + this._drink.getPrice() - 1f;\n\t}",
"public void setPrice(double p)\r\n\t{\r\n\t\tprice = p;\r\n\t}",
"public void getPaintPrice(){\n System.out.println(\"Enter the price per gallon of paint: \");\n this.pricePerGallon = INPUT.nextDouble();\n }",
"public double getPrice(){\n\t\treturn price;\n\t}",
"public double getPrice(DayOfWeek day) {\n switch (day) {\n case MONDAY:\n return this.retailPrice * TEN_PERCENT_OFF;\n case TUESDAY:\n case THURSDAY:\n return this.retailPrice * FIFTY_PERCENT_OFF;\n default:\n return this.retailPrice;\n }\n }",
"@Override\r\n\tpublic double getPrice() {\n\t\treturn 60000;\r\n\t}",
"public double getDiscountedPrice(double itemPrice);",
"public double getPrice()\n\t{\n\t\treturn this.totalPrice + this.getFlightCosts() + this.excursionSubTotal\n\t\t\t\t+ this.getLodgingCost();\n\t}",
"private double crunchPut(Option o) {\n int i; \n int countTrial;\n double deltaT;\n deltaT = o.getTerm() / numIntervals;\n double NumTrial;\n double trialAverage = 0;\n double trialPayoff;\n double temp = 0;\n double simulationRunningSum, simulationAveragePayoff;\n double stock;\n Random r = new Random();\n simulationRunningSum = 0.0;\n for (countTrial = 1; countTrial <= numTrials; countTrial++) {\n stock = o.getsNought();\n NumTrial = 0.0;\n double nns = 0;\n for (i = 0; i < numIntervals; i++) {\n nns = r.nextGaussian();\n stock = stock * Math.exp((o.getRiskFreeRate() - o.getVolatility() * o.getVolatility() / 2) * deltaT\n + o.getVolatility() * nns * Math.sqrt(deltaT));\n NumTrial += stock;\n temp = stock;\n }\n if (o.getStyle() == OptionStyle.ASIAN) {\n trialAverage = NumTrial / numIntervals;\n } else if ((o.getStyle() == OptionStyle.AMERICAN) || (o.getStyle() == OptionStyle.EUROPEAN)) {\n trialAverage = temp;\n }\n trialPayoff = Math.max(o.getStrikeP() - trialAverage, 0.0);\n simulationRunningSum += trialPayoff;\n }\n simulationAveragePayoff = simulationRunningSum / numTrials;\n double valueOfOption;\n valueOfOption = simulationAveragePayoff * Math.exp(-o.getRiskFreeRate() * o.getTerm());\n System.out.print(valueOfOption);\n return valueOfOption;\n }",
"@Override\n\tpublic double getPrice() {\n\t\treturn 10;\n\t}",
"@Override\n\tpublic double getPrice() {\n\t\treturn 10;\n\t}",
"@Override\n public double getPrice(){\n \n return currentPrice; \n }",
"public void calcPrice() {\r\n\t\tsuper.price = 3 * super.height;\r\n\t}",
"public int getPrice();",
"public Double getPrice(Meal meal){\n\t\tDouble price = this.fidelityCard.getPriceVisit(meal);\n\t\treturn price;\n\t}",
"double calculatePrice(VehicleType vehicleType, Date entryTime, Date exitTime);",
"@Override\n\t\t\tpublic double getPrice() {\n\t\t\t\treturn 50.0;\n\t\t\t}",
"public double getPrice() {\r\n\t\treturn this.price;\r\n\t}",
"public double getPrice() {\r\n\t\treturn this.price;\r\n\t}",
"public double getPrice() {\r\n\t\treturn this.price;\r\n\t}",
"public void setPrice(double p) {\n\t\tprice = p;\n\t}",
"@Override\n\tpublic double getPrice() {\n\t\treturn 30000;\n\t}",
"public double calcCost() {\n // $2 per topping.\n double cost = 2 * (this.cheese + this.pepperoni + this.ham);\n // size cost\n switch (this.size) {\n case \"small\":\n cost += 10;\n break;\n case \"medium\":\n cost += 12;\n break;\n case \"large\":\n cost += 14;\n break;\n default:\n }\n return cost;\n }",
"private void calculatePrice(int quantity) {\n int price = quantity * priceOfCoffee;\n }",
"private int calculatePrice(boolean addWhippedCream, boolean addChocolate) {\n int basePrice=5; //price of one cup of coffee\n if(addWhippedCream) //add $1 if user wants whipped cream\n basePrice+=1;\n if(addChocolate) //add $2 if user wants whipped cream\n basePrice+=2;\n\n return quantity * basePrice;\n }",
"public int getPrice() {\n return price_;\n }"
]
| [
"0.61728364",
"0.61110234",
"0.60415435",
"0.6025371",
"0.60027444",
"0.5960953",
"0.59582734",
"0.59435016",
"0.5916206",
"0.590976",
"0.59095585",
"0.59090763",
"0.5897553",
"0.58799833",
"0.58557683",
"0.58241785",
"0.5816085",
"0.5787873",
"0.5780637",
"0.5757762",
"0.5743355",
"0.5741014",
"0.57331806",
"0.5703223",
"0.5663228",
"0.5661799",
"0.5653956",
"0.5647157",
"0.5646698",
"0.56393",
"0.56348926",
"0.56348926",
"0.56348926",
"0.561451",
"0.5598099",
"0.5587469",
"0.558133",
"0.5580482",
"0.5568712",
"0.5560813",
"0.5552811",
"0.5547699",
"0.5537627",
"0.5529976",
"0.55190974",
"0.55100965",
"0.54999024",
"0.54805535",
"0.54736215",
"0.54731554",
"0.5470953",
"0.5468765",
"0.54516834",
"0.5448906",
"0.54483235",
"0.5446241",
"0.5437601",
"0.5429076",
"0.54180574",
"0.54145044",
"0.54101884",
"0.5408505",
"0.54079986",
"0.540669",
"0.5402208",
"0.539372",
"0.5383705",
"0.5374677",
"0.53614986",
"0.5359805",
"0.53523135",
"0.5343719",
"0.5342899",
"0.533589",
"0.5331811",
"0.5330292",
"0.5330154",
"0.5330153",
"0.5324234",
"0.530907",
"0.53019935",
"0.5298539",
"0.5293866",
"0.529057",
"0.52883",
"0.52883",
"0.5279692",
"0.5275148",
"0.5274962",
"0.5272186",
"0.5269765",
"0.5269113",
"0.52566886",
"0.52566886",
"0.52566886",
"0.5254553",
"0.52525157",
"0.52495587",
"0.52486503",
"0.524658",
"0.52461135"
]
| 0.0 | -1 |
Computes the price and derivatives of a onetouch/notouch option. The derivatives are [0] spot, [1] rate, [2] costofcarry, [3] volatility, [4] timeToExpiry, [5] spot twice. | public ValueDerivatives priceAdjoint(
double spot,
double timeToExpiry,
double costOfCarry,
double rate,
double lognormalVol,
SimpleConstantContinuousBarrier barrier) {
ArgChecker.notNull(barrier, "barrier");
double[] derivatives = new double[6];
boolean isKnockIn = barrier.getKnockType().isKnockIn();
boolean isDown = barrier.getBarrierType().isDown();
double h = barrier.getBarrierLevel();
ArgChecker.isFalse(isDown && spot <= barrier.getBarrierLevel(),
"The Data is not consistent with an alive barrier (DOWN and spot<=barrier).");
ArgChecker.isFalse(!isDown && spot >= barrier.getBarrierLevel(),
"The Data is not consistent with an alive barrier (UP and spot>=barrier).");
double eta = isDown ? 1 : -1;
double df2 = Math.exp(-rate * timeToExpiry);
double lognormalVolSq = lognormalVol * lognormalVol;
double lognormalVolT = lognormalVol * Math.sqrt(timeToExpiry);
if (nearZero(Math.min(timeToExpiry, lognormalVolSq), SMALL)) {
if (isKnockIn) {
return ValueDerivatives.of(0d, DoubleArray.filled(6));
}
double price = df2;
derivatives[1] = -timeToExpiry * price;
derivatives[4] = -rate * price;
return ValueDerivatives.of(price, DoubleArray.ofUnsafe(derivatives));
}
double mu = (costOfCarry - 0.5 * lognormalVolSq) / lognormalVolSq;
double lambda = Math.sqrt(mu * mu + 2d * rate / lognormalVolSq);
double m1 = lognormalVolT * (1d + mu);
double x2 = Math.log(spot / h) / lognormalVolT + m1;
double y2 = Math.log(h / spot) / lognormalVolT + m1;
double z = Math.log(h / spot) / lognormalVolT + lambda * lognormalVolT;
double[] eDerivFirst = new double[6];
double[] eDerivSecond = new double[6];
double[] fDerivFirst = new double[5];
double[] fDerivSecond = new double[5];
double price = isKnockIn ?
getFAdjoint(spot, z, lognormalVolT, h, mu, lambda, eta, fDerivFirst, fDerivSecond) :
getEAdjoint(spot, df2, x2, y2, lognormalVolT, h, mu, eta, eDerivFirst, eDerivSecond);
double zBar = 0.0;
double y2Bar = 0.0;
double x2Bar = 0.0;
double zSqBar = 0.0;
double y2SqBar = 0.0;
double x2SqBar = 0.0;
double zsBar = 0.0;
double y2sBar = 0.0;
double lambdaBar = 0.0;
double muBar = 0.0;
double lognormalVolTBar = 0.0;
double df2Bar = 0.0;
if (isKnockIn) {
zBar = fDerivFirst[1];
lambdaBar = fDerivFirst[4]; // only F has lambda dependence, which in turn is a function of mu, see muBar+= below
muBar = fDerivFirst[3];
lognormalVolTBar = fDerivFirst[2];
derivatives[0] = fDerivFirst[0];
zSqBar = fDerivSecond[1];
zsBar = fDerivSecond[2];
derivatives[5] = fDerivSecond[0];
} else {
y2Bar = eDerivFirst[3];
x2Bar = eDerivFirst[2];
muBar = eDerivFirst[5];
lognormalVolTBar = eDerivFirst[4];
df2Bar = eDerivFirst[1];
derivatives[0] = eDerivFirst[0];
y2SqBar = eDerivSecond[2];
x2SqBar = eDerivSecond[1];
y2sBar = eDerivSecond[3];
derivatives[5] = eDerivSecond[0];
}
double dxyds = 1d / spot / lognormalVolT;
double m1Bar = x2Bar + y2Bar;
muBar += +lognormalVolT * m1Bar + mu / lambda * lambdaBar;
lognormalVolTBar +=
+(lambda - Math.log(h / spot) / (lognormalVolT * lognormalVolT)) * zBar -
Math.log(h / spot) / (lognormalVolT * lognormalVolT) * y2Bar -
Math.log(spot / h) / (lognormalVolT * lognormalVolT) * x2Bar + (1 + mu) * m1Bar;
double lognormalVolSqBar = -costOfCarry / (lognormalVolSq * lognormalVolSq) * muBar - rate /
(lognormalVolSq * lognormalVolSq) / lambda * lambdaBar;
derivatives[0] += dxyds * x2Bar - dxyds * y2Bar - dxyds * zBar;
derivatives[1] = -timeToExpiry * df2 * df2Bar + lambdaBar / lambda / lognormalVolSq;
derivatives[2] = muBar / lognormalVolSq;
derivatives[3] = 2d * lognormalVol * lognormalVolSqBar + Math.sqrt(timeToExpiry) * lognormalVolTBar;
derivatives[4] = -rate * df2 * df2Bar + lognormalVolTBar * lognormalVolT * 0.5 / timeToExpiry;
derivatives[5] += -dxyds * x2Bar / spot + dxyds * y2Bar / spot + dxyds * zBar / spot + dxyds * dxyds * x2SqBar +
dxyds * dxyds * y2SqBar - 2d * dxyds * y2sBar + dxyds * dxyds * zSqBar - 2d * dxyds * zsBar;
return ValueDerivatives.of(price, DoubleArray.ofUnsafe(derivatives));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public double[] computeOption(Option o){\n double temp=o.getVolatility();\n double[] prices=new double[NUMOFDOTS];\n double vBase=o.getVolatility();\n int count= (NUMOFDOTS-1)/2; // count = 5\n\n if(o.getRight()==OptionRight.PUT){\n prices[count]=crunchPut(o); // Middle point should be the \"original\" option.\n for (int i = count ; i >0 ; i--) {\n o.setVolatility(vBase*(1-i* VOLAINTERVAL));\n prices[count-i]=crunchPut(o);\n o.setVolatility(vBase*(1+i* VOLAINTERVAL));\n prices[count+i]=crunchPut(o);\n }\n }\n\n if(o.getRight()==OptionRight.CALL){\n prices[count]=crunchCall(o); // Middle point should be the \"original\" option.\n for (int i = count ; i >0 ; i--) {\n o.setVolatility(vBase*(1-i* VOLAINTERVAL));\n prices[count-i]=crunchCall(o);\n o.setVolatility(vBase*(1+i* VOLAINTERVAL));\n prices[count+i]=crunchCall(o);\n }\n }\n o.setVolatility(temp);\n return prices;\n }",
"public double getPriceAdjoint(final EuropeanVanillaOption option, final NormalFunctionData data, final double[] priceDerivative) {\n Validate.notNull(option, \"option\");\n Validate.notNull(data, \"data\");\n Validate.notNull(priceDerivative, \"derivatives\");\n Validate.isTrue(priceDerivative.length == 3, \"array size\");\n final double strike = option.getStrike();\n final double t = option.getTimeToExpiry();\n final double forward = data.getForward();\n final double numeraire = data.getNumeraire();\n final double sigma = data.getNormalVolatility();\n final int sign = option.isCall() ? 1 : -1;\n double price;\n double nCDF = 0.0;\n double nPDF = 0.0;\n double arg = 0.0;\n double x = 0.0;\n // Implementation Note: Forward sweep.\n final double sigmaRootT = sigma * Math.sqrt(t);\n if (sigmaRootT < 1e-16) {\n x = sign * (forward - strike);\n price = x > 0 ? numeraire * x : 0.0;\n } else {\n arg = sign * (forward - strike) / sigmaRootT;\n nCDF = NORMAL.getCDF(arg);\n nPDF = NORMAL.getPDF(arg);\n price = numeraire * (sign * (forward - strike) * nCDF + sigmaRootT * nPDF);\n }\n // Implementation Note: Backward sweep.\n final double priceBar = 1.0;\n if (sigmaRootT < 1e-16) {\n final double xBar = x > 0 ? numeraire : 0.0;\n priceDerivative[0] = sign * xBar;\n priceDerivative[2] = -priceDerivative[0];\n priceDerivative[1] = 0.0;\n } else {\n final double nCDFBar = numeraire * (sign * (forward - strike)) * priceBar;\n final double nPDFBar = numeraire * sigmaRootT * priceBar;\n final double argBar = nPDF * nCDFBar - nPDF * arg * nPDFBar;\n priceDerivative[0] = numeraire * sign * nCDF * priceBar + sign / sigmaRootT * argBar;\n priceDerivative[2] = -priceDerivative[0];\n final double sigmaRootTBar = -arg / sigmaRootT * argBar + numeraire * nPDF * priceBar;\n priceDerivative[1] = Math.sqrt(t) * sigmaRootTBar;\n }\n return price;\n }",
"@Override\n\tpublic double GetValue() {\n\t\tdouble spot = inputs.getSpot();\n\t\tdouble strike = inputs.getStrike();\n\t\tdouble vol = inputs.getVol();\n\t\tint noSteps=inputs.getNoSteps();\n\t\tdouble expiry=inputs.getExpiry();\n\t OptionType type=inputs.getType();\n\t ExerciseType exercise=inputs.getExercise();\n\t InterestRate interestRate=inputs.getR();\n\t\t\n\t double timestep = expiry/noSteps;\n\t double DF = Math.exp(-interestRate.GetRate(1.)*timestep);\n\t double temp1 = Math.exp((interestRate.GetRate(1.) + vol * vol)*timestep);\n\t double temp2 = 0.5 * (DF + temp1);\n\t double up = temp2 + Math.sqrt(temp2*temp2 - 1);\n\t double down = 1/ up;\n\t double probaUp = (Math.exp(interestRate.GetRate(1.) * timestep) - down)/(up -down) ;\n\t double probaDown = 1 - probaUp;\n\n\t //stock price tree\n\t\tstockPrice[0][0]=spot;\n\t for (int n = 1; n <= noSteps; n ++) {\n for (int j = n; j > 0; j--){\n \tstockPrice[j][n] = up * stockPrice[j-1][n-1];\n }\n \t\tstockPrice[0][n] = down * stockPrice[0][n-1];\n }\n\t \n\t //last column set payoffs\n\t\tfor (int j = 0; j <= noSteps; j++) {\n\t\t\t\tif(type.equals(OptionType.CALL)) {\n\t\t\t\t\tpayOff[j][noSteps] = Math.max(this.stockPrice[j][noSteps] - strike, .0);\n\t\t\t\t}else {\n\t\t\t\t\tpayOff[j][noSteps] = Math.max(strike - this.stockPrice[j][noSteps], .0);\n\t\t\t\t}\n\t\t}\n\n\t\t\n\t //payoff tree in backwardation\n\t \n\t for (int i = noSteps ; i >= 1; i--) {\n for (int j = 0; j <= i-1; j++) {\n\t \tif(exercise.equals(ExerciseType.AMERICAN)) { \n\t //American\t\n\t \t\tif(type.equals(OptionType.CALL)) {\n\t \t\t\t\tpayOff[j][i-1] = Math.max(DF * (probaUp * payOff[j+1][i] + probaDown * payOff[j][i]) ,\n\t \t\t\t\tMath.max(this.stockPrice[j][i-1] - strike, .0));\n\t \t\t\t\n\t \t\t}else \tpayOff[j][i-1] = Math.max(DF * (probaUp * payOff[j+1][i] + probaDown * payOff[j][i]) ,\n\t \t\t\t\tMath.max(strike - this.stockPrice[j][i-1] , .0));\n\t \t}else { \n\t \t\t\t//European put and call option\n\t \t\t\t\tpayOff[j][i-1] = DF * (probaUp * payOff[j+1][i] + probaDown * payOff[j][i]);\n\t }\n }\n }\n\t \n\t double deltaUp = (payOff[0][2]-payOff[1][2])/(stockPrice[0][2]-stockPrice[1][2]);\n\t double deltaDown = (payOff[1][2]-payOff[2][2])/(stockPrice[1][2]-stockPrice[2][2]);\n\t delta = (deltaUp + deltaDown) /2;\n\t gamma = (deltaUp-deltaDown)/((stockPrice[0][2]-stockPrice[2][2])/2);\n\t theta = (payOff[1][2]-payOff[0][0])/(365*2*timestep);//time in days\n\t \n\t long rounded = Math.round(payOff[0][0]*10000);\n\t return rounded/10000.0;\n\t}",
"public void priceUpdate(){\n \n double attractionPrices = 0;\n Attraction attraction;\n for(int i=0; i< getAttractionsList().size();i++)\n {\n attraction = (Attraction) getAttractionsList().get(i);\n attractionPrices += attraction.getPrice();\n }\n hotelPrice = diff(getEndDate(), getStartDate());\n price = getTravel().getPrice() + getHotel().getPrice()*(hotelPrice) \n + getTransport().getPrice()*getTravel().getDistance()\n + attractionPrices;\n }",
"public double getPotatoesPrice();",
"private void calculatePrice() {\n\t\tint temp = controller.getQualityPrice(hotel.getText(), quality.getText());\n\n\t\ttemp *= getDays();\n\n\t\tif (discountChoice > 0) {\n\t\t\tdouble discountTmp = (double) discountChoice / 100;\n\t\t\ttemp *= (1.00 - discountTmp);\n\t\t}\n\n\t\tprice.setText(Integer.toString(temp));\n\n\t}",
"public static void main(String[] args) {\n double strike = 1060.00;\n double price = 978.70;\n double timeToExp = (17.00/365.00);\n //double timeToExp = .383562;\n double stDev = 0.3172;\n double interest = 0.073521;\n char call = 'c';\n Boolean callOption = true;\n\n BlackScholes_abbreviated bsShort = new BlackScholes_abbreviated();\n Double price1 = bsShort.blackScholesCall(price, strike, stDev, timeToExp, interest);\n\n System.out.println(\" price3 = [\" + price1.toString() + \"]\");\n\n OptionDetails od = new OptionDetails(true,price,strike,interest,timeToExp,stDev);\n OptionGreeks og = BlackScholesGreeks.calculate(od);\n\n System.out.println(od.toString());\n System.out.println(og.toString());\n// System.out.println(\"Delta: \" + og.delta + \"Gamma: \" + og.gamma);\n//\n//\n// Black_76 bs76 = new Black_76();\n// Double price2 = bs76.Black76(call, price, strike, timeToExp, interest, stDev);\n// System.out.println(\" price2 = [\" + price2.toString() + \"]\");\n//\n// BlackScholesFormula bsFormula = new BlackScholesFormula();\n// Double price3 = bsFormula.calculate(callOption, price, strike, interest, timeToExp, stDev);\n// System.out.println(\" price3 = [\" + price3.toString() + \"]\");\n//\n// System.out.println();\n//\n// // TEST DATA -- trade 104335\n// strike = 18.25;\n// price = 13.10;\n// //timeToExp = 2.13035;\n// timeToExp = 2.134247;\n// stDev = 0.21;\n// interest = 0.002541;\n// call = 'c';\n// callOption = true;\n//\n// price1 = bsShort.blackScholesCall(price, strike, stDev, timeToExp, interest);\n// System.out.println(\" price1 = [\" + price1.toString() + \"]\");\n//\n// price2 = bs76.Black76(call, price, strike, timeToExp, interest, stDev);\n// System.out.println(\" price2 = [\" + price2.toString() + \"]\");\n//\n// price3 = bsFormula.calculate(callOption, price, strike, interest, timeToExp, stDev);\n// System.out.println(\" price3 = [\" + price3.toString() + \"]\");\n }",
"public double calculatePrice(){\r\n\t\treturn getBasePrice()+getBasePrice()*getVat()+(getBasePrice()+getBasePrice()*getVat())*0.3;\r\n\t}",
"double calculatePrice();",
"double calculateNewPrice(double discount_rate, double price);",
"float calculatePrice () \n\t{\n\t\tfloat final_price = 0;\n\t\tfinal_price = (float)(price * quantity); // price * number of items\n\t\tfinal_price += final_price*(.10); // add tax\n\t\tif(perishable.equals(\"P\"))\n\t\t{\n\t\t\tfloat ship = (float)(20* weight)*quantity; // add shipping\n\t\t\tship += ship*.20;\n\t\t\tfinal_price += ship;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfinal_price += (20* weight)*quantity; // add shipping\n\t\t}\n\t\treturn final_price;\n\t}",
"private double crunchCall(Option o) { \n int i;\n int countTrial;\n double deltaT;\n deltaT = o.getTerm() / numIntervals;\n double NumTrial;\n double trialAverage = 0;\n double trialPayoff;\n double temp = 0;\n double simulationRunningSum, simulationAveragePayoff;\n double stock;\n Random r = new Random();\n simulationRunningSum = 0.0;\n for (countTrial = 1; countTrial <= numTrials; countTrial++) {\n stock = o.getsNought();\n NumTrial = 0.0;\n double nns = 0;\n for (i = 0; i < numIntervals; i++) {\n nns = r.nextGaussian();\n stock = stock * Math.exp((o.getRiskFreeRate() - o.getVolatility() * o.getVolatility() / 2) * deltaT\n + o.getVolatility() * nns * Math.sqrt(deltaT));\n NumTrial += stock;\n temp = stock;\n\n }\n if (o.getStyle() == OptionStyle.ASIAN) {\n trialAverage = NumTrial / numIntervals;\n } else if ((o.getStyle() == OptionStyle.AMERICAN) || (o.getStyle() == OptionStyle.EUROPEAN)) {\n trialAverage = temp;\n }\n\n trialPayoff = Math.max(trialAverage - o.getStrikeP(), 0.0);\n simulationRunningSum += trialPayoff;\n }\n simulationAveragePayoff = simulationRunningSum / numTrials;\n double valueOfOption;\n valueOfOption = simulationAveragePayoff * Math.exp(-o.getRiskFreeRate() * o.getTerm());\n return valueOfOption;\n }",
"public abstract double calculateAppraisalPrice();",
"double calculatePrice(VehicleType vehicleType, Date entryTime, Date exitTime);",
"public double getTicketsPrice(@Nonnull Event event, @Nullable User user, @Nonnull List<Long> seats){\n return 0.00;\n }",
"CarPaymentMethod processHotDollars();",
"public int calcMarketPrice() {\r\n player = Context.getInstance().getPlayer();\r\n //Random r = new Random();\r\n int techLevel = player.getCurrentPlanet().getTechLevel();\r\n Event event = player.getCurrentPlanet().getEvent();\r\n Resource resource = player.getCurrentPlanet().getResource();\r\n double price = basePrice;\r\n price += (ipl * (techLevel - mtlb)) + variance;\r\n if (player.getCurrentPlanet().getTechLevel() == this.ttp) {\r\n price *= Context.TECH_PRICE_MULT;\r\n }\r\n if (event.equals(this.ie)) {\r\n price *= event.getUpMult();\r\n } else if (event.equals(this.de)) {\r\n price *= event.getDownMult();\r\n }\r\n if (resource.equals(this.cr)) {\r\n price *= resource.getDownMult();\r\n } else if (resource.equals(this.er)) {\r\n price *= resource.getUpMult();\r\n }\r\n price *= (((double) player.getTrader() / DFIFTY) + 1.0);\r\n int finalPrice = (int) price;\r\n if (player.getTrader() > 0) {\r\n double discountedPrice = price;\r\n double trader = (double) player.getTrader();\r\n discountedPrice -= (price) * (4.0 * trader / PERCENT);\r\n return (int) discountedPrice;\r\n } else {\r\n return finalPrice;\r\n }\r\n }",
"public Optional<DerivativePrice> getDerivativePrice() {\n return repository.findDerivativePrice(new Tuple<>(ticker,optionName));\n }",
"public double Floater_pricing_price(\n\t\t\t\n\t\t\tdouble issue_date \n\t\t\t, double mat_date \n\t\t\t, double interval \n\t\t\t, double ipm \n\t\t\t, double adr_flag \n\t\t ,double spread \n\t\t , double price_date \n\t\t , double reval_date \n\t\t , double ipmethod \n\t\t , double[] time_ref \n\t\t , double[] time_dis \n\t\t , double[] ytm_mat_ref \n\t\t , double[] ytm_mat_dis \n\t\t , double numytm_ref \n\t\t , double numytm_dis \n\t\t , double[] tim_bump \n\t\t , double numytm_bump \n\t\t , double fixedrate \n\t\t , double cpn_period \n\t\t , double n_cpn \n\t\t , double[] dcconv \n\t\t , double[] report \n\t\t \n\t\t\t);",
"abstract public double getPrice();",
"public interface StrategyLegTradePrice {\n\t\n\t/**\n\t * The following constants defines leg trade price's relation \n\t * to the leg market.\n\t * \n\t * NOT_APPLY: no relation check \n\t * MARKET_INVERTED: the bid ask price is inverted\n\t * IN_BETWEEN: price above the bid, and below the ask.\n\t * TOUCH_CBOE_BID: price touches CBOE bid and CBOE bid is the BB\n\t * TOUCH_CBOE_ASK: price touches CBOE ask and CBOE ask is the BO\n\t * TOUCH_CBOE_BOTH: price touches CBOE bid and ask, and they are the BBO\n\t * OUTSIDE_BB: price is outside BBO\n\t * OUTSIDE_BO: price is outside BBO\n\t * \n\t */\n\tenum TradePriceMarketRelation\n\t{\n\t\tNOT_APPLY(true, false, false, 0),\n\t\tINCOMPLETE_MARKET(false, false, false, 0),\n\t\tLOCK_AT_LOCKED_MARKET(true, false, false, 0),\n\t\tMARKET_INVERTED(false, true, false, 0),\n\t\tIN_BETWEEN(true, false, false, 0),\n\t\tIN_NO_ASK(true, false, false, 0),\n\t\tTOUCH_CBOE_BID_NO_ASK(true, true, false, +1),\n\t\tTOUCH_CBOE_BID_WIDER_THAN_TICK(true, true, false, +1),\n\t\tTOUCH_CBOE_ASK_WIDER_THAN_TICK(true, true, false, -1),\n\t\tTOUCH_CBOE_BID_TICK_WIDE(true, true, true, +1),\n\t\tTOUCH_CBOE_ASK_TICK_WIDE(true, true, true, -1),\n\t\tTOUCH_CBOE_BOTH(true, true, false, 0),\n\t\tOUTSIDE_BB(false, false, false, +1),\n\t\tOUTSIDE_BO(false, false, false, -1);\n\n\t\tpublic final boolean validTradePrice;\n\t\tpublic final boolean touchMarket;\n\t\tpublic final boolean tickWideAndTouchMarket;\n\t\tpublic final int adjustDirection;\n\n\t\tTradePriceMarketRelation(\n\t\t\t\tboolean validTradePrice,\n\t\t\t\tboolean touchMarket,\n\t\t\t\tboolean tickWideAndTouchMarket,\n\t\t\t\tint adjustDirection)\n\t\t{\n\t\t\tthis.validTradePrice = validTradePrice;\n\t\t\tthis.touchMarket = touchMarket;\n\t\t\tthis.tickWideAndTouchMarket = tickWideAndTouchMarket;\n this.adjustDirection = adjustDirection;\n\t\t}\n\t}\n \n\t/**\n\t * Gets the ratio quantity of the leg.\n\t */\n\tint getRatioQuantity();\n\n\t/**\n\t * Gets the side of the leg.\n\t */\n\tSide getSide();\n\n\t/**\n\t * Gets the price at which the leg should be traded. Without split trade, the length is one.\n * With split trade, the length is two.\n\t */\n\tPrice[] getTradePrices();\n\n /**\n * get the first element of trade prices. This is basically a convenient method for non split trade\n */\n Price getTradePrice();\n\n\t/**\n\t * Gets the trading product.\n\t */\n\tTradingProduct getTradingProduct();\n\n /**\n * Gets the product key.\n */\n int getProductKey();\n\n /**\n * Return a boolean to indicate if the split trading method has been employed\n * in the process of calculating the trade prices for the leg\n */\n boolean splitTradingEmployed();\n\n /**Return an array with two numbers ( x + y = 1) which tells how to split the volume.\n * The first number corresponding to the first trade price and second number corresponding\n * to the second price of the results of getTradePrices().\n *\n * Note: if splitTradingEmployed() return false, the result of this method is not defined.\n */\n double[] getSplitRatios();\n}",
"public double price(\n double spot,\n double timeToExpiry,\n double costOfCarry,\n double rate,\n double lognormalVol,\n SimpleConstantContinuousBarrier barrier) {\n\n ArgChecker.notNull(barrier, \"barrier\");\n boolean isKnockIn = barrier.getKnockType().isKnockIn();\n boolean isDown = barrier.getBarrierType().isDown();\n double h = barrier.getBarrierLevel();\n ArgChecker.isFalse(isDown && spot <= barrier.getBarrierLevel(),\n \"The Data is not consistent with an alive barrier (DOWN and spot<=barrier).\");\n ArgChecker.isFalse(!isDown && spot >= barrier.getBarrierLevel(),\n \"The Data is not consistent with an alive barrier (UP and spot>=barrier).\");\n double eta = isDown ? 1 : -1;\n double df2 = Math.exp(-rate * timeToExpiry);\n double lognormalVolSq = lognormalVol * lognormalVol;\n double lognormalVolT = lognormalVol * Math.sqrt(timeToExpiry);\n if (nearZero(Math.min(timeToExpiry, lognormalVolSq), SMALL)) {\n return isKnockIn ? 0d : df2;\n }\n double mu = (costOfCarry - 0.5 * lognormalVolSq) / lognormalVolSq;\n double lambda = Math.sqrt(mu * mu + 2 * rate / lognormalVolSq);\n double m1 = lognormalVolT * (1 + mu);\n double x2 = Math.log(spot / h) / lognormalVolT + m1;\n double y2 = Math.log(h / spot) / lognormalVolT + m1;\n double z = Math.log(h / spot) / lognormalVolT + lambda * lognormalVolT;\n double xE = isKnockIn ?\n getF(spot, z, lognormalVolT, h, mu, lambda, eta) :\n getE(spot, df2, x2, y2, lognormalVolT, h, mu, eta);\n return xE;\n }",
"public static void setPrice() {\n double summe = 0.0;\n for (Object obj : dlm.getDisplayedArtikel()) {\n if (obj instanceof Article) {\n Article art = (Article) obj;\n if (!art.isIsAbfrage()) {\n if (((art.isJugendSchutz() && art.isJugendSchutzOk())) || !art.isJugendSchutz()) {\n if (art.isEloadingAmmountOk() && !art.isPriceZero()) {\n summe += ((Article) ((obj))).getPreis() * ((Article) ((obj))).getAmount();\n }\n }\n }\n } else if (obj instanceof Karte) {\n Karte card = (Karte) obj;\n summe += card.getAufladung() / 100;\n }\n }\n for (Object obj : dlm.getRemovedObjects()) {\n if (obj instanceof Article) {\n if (!((Article) ((obj))).isStorno_error()) {\n summe -= ((Article) ((obj))).getPreis() * ((Article) ((obj))).getAmount();\n }\n } else if (obj instanceof Karte) {\n Karte card = (Karte) obj;\n summe -= card.getAufladung() / 100;\n }\n }\n if (Math.round(summe) == 0) {\n summe = 0;\n }\n if (GUIOperations.isTraining()) {\n summe += 1000;\n }\n tfSumme.setText(String.format(\"%.2f\", summe));\n }",
"public void setPotatoesPrice(double p);",
"private void calcPrice() {\n double itemPrice = 0;\n \n //get price of burger (base)\n if (singleRad.isSelected())\n {\n itemPrice = 3.50;\n }\n else \n {\n itemPrice = 4.75;\n }\n \n //check options add to item price\n if(cheeseCheckbox.isSelected())\n itemPrice = itemPrice += 0.50;\n if(baconCheckbox.isSelected())\n itemPrice = itemPrice += 1.25;\n if(mealCheckbox.isSelected())\n itemPrice = itemPrice += 4.00;\n \n //include the quantity for the item price\n int quantity= 1;\n if (quantityTextField.getText().equals(\"\"))\n quantityTextField.setText(\"1\");\n quantity = Integer.parseInt(quantityTextField.getText());\n itemPrice = itemPrice * quantity;\n\n \n //show the price no $ symbol\n \n itemPriceTextField.setText(d2.format(itemPrice));\n }",
"public double getDiscountedPrice(double itemPrice);",
"private void getCostAndEta() {\n\n GetVehiclesData vehiclesData = RetrofitClientInstance.getRetrofitInstance().create(GetVehiclesData.class);\n getVehicles.getVehiclesData(vehiclesData);\n setCostToLabel(getVehicles.getCost());\n setETAToLabel(getVehicles.getETA());\n\n }",
"private void calculatePrice() {\r\n int price = 0;\r\n int day = show.getDateTime().getDayOfMonth();\r\n int month = show.getDateTime().getMonthValue();\r\n \r\n for (int i = 0; i < seats.size(); i++) {\r\n String option = seats.get(i);\r\n \r\n if (Arrays.stream(sectionNames).parallel().anyMatch(option::contains)) {\r\n String section = option.replaceAll(\"\\\\d\",\"\");\r\n int number = Integer.parseInt(option.replaceAll(\"\\\\D+\",\"\"));\r\n \r\n if (section.equals(\"m\")) {\r\n if (number <= 100) {\r\n price += mainFloorPrice;\r\n } else {\r\n price += mainFloorPremium;\r\n }\r\n } else if (section.equals(\"sb\")) {\r\n if (number <= 25) {\r\n price += southBalconyPrice;\r\n } else {\r\n price += southBalconyPremium;\r\n }\r\n } else if (section.equals(\"wb\")) {\r\n price += westBalconyPrice;\r\n } else if (section.equals(\"eb\")) {\r\n price += eastBalconyPrice;\r\n }\r\n }\r\n }\r\n \r\n if (seats.size() >= 5 && seats.size() <= 10 && !(month == 12 && (day == 26 || day == 27))) {\r\n price -= (2 * seats.size());\r\n }\r\n \r\n if (seats.size() >= 11 && seats.size() <= 20 && !(month == 12 && (day == 26 || day == 27))) {\r\n price -= (5 * seats.size());\r\n }\r\n \r\n if (month == 12 && (day == 26 || day == 27)) {\r\n price = seats.size() * 20;\r\n }\r\n \r\n totalPrice = price;\r\n }",
"double getPrice();",
"double getPrice();",
"double getPrice();",
"@Override\n public double calculatePrice() {\n return getVolume() * (1.0 + (getAlcoholPercent() / 100.0)) * this.liquids.size();\n }",
"private double calculatePrice(boolean hasExtraCheese, boolean hasPepperoni, boolean hasHawaiian, String size) {\n double basePrice = PIZZA_PRICE;\n if (hasExtraCheese) {\n basePrice += BASIC_TOPPING_PRICE;\n }\n if (hasPepperoni) {\n basePrice += BASIC_TOPPING_PRICE;\n }\n if (hasHawaiian) {\n basePrice += HAWAIIAN_PRICE;\n }\n\n if (size.equals(getString(R.string.personal))){\n basePrice += PERSONAL_PRICE;\n }else if (size.equals(getString(R.string.medium))){\n basePrice += MEDIUM_PRICE;\n }else if (size.equals(getString(R.string.large))){\n basePrice += LARGE_PRICE;\n }else if (size.equals(getString(R.string.xtra))){\n basePrice += XTRA_PRICE;\n }\n return quantity * basePrice;\n }",
"private int calculatePrice(boolean hasWhipped, boolean hasChocolate){\n return quantity * (5 + (hasWhipped ? 1 : 0) + (hasChocolate ? 2 : 0));\n }",
"double checkout() {\n\t\tdouble total = 0;\n\t\tfor (Fruit item : fruitList){\n\t\t\ttotal += item.getPrice();\t\n\t\t}\t\n\t\t\n\t\t// Apply offers and calculate total\n\t\tdouble discountGetOneFree = Offer.getOfferBuyOneGetOneFree(getFruitNameList(), new Apple() );\n\t\tdiscountGetOneFree += Offer.getOfferBuyOneGetOneFree(getFruitNameList(), new Banana() );\n\t\tdouble discountThreeForTwo = Offer.getOfferThreeForTwo(getFruitNameList(), new Orange() );\n\t\tdiscountThreeForTwo += Offer.getOfferThreeForTwo(getFruitNameList(), new Melon() );\t\t\n\t\tdouble discountCheapestForFree = Offer.cheapestFruitForFree(getFruitList());\n\t\ttotal += - discountGetOneFree - discountThreeForTwo - discountCheapestForFree;\n\t\t\n\t\tDecimalFormat df = new DecimalFormat(\"#,##0.00\");\n\t\t// Print out the total cost and saving\n\t\tSystem.out.println(String.format(\"£ %s Total cost\", df.format(total)));\n\t\tif (discountGetOneFree > 0)\n\t\t\tSystem.out.println(String.format(\"£ %s Promotional Saving *** Buy One Get One Free ***\", df.format(discountGetOneFree)));\n\t\tif (discountThreeForTwo > 0)\n\t\t\tSystem.out.println(String.format(\"£ %s Promotional Saving *** 3 for the price of 2 ***\", df.format(discountThreeForTwo)));\n\t\tif (discountCheapestForFree > 0)\n\t\t\tSystem.out.println(String.format(\"£ %s Promotional Saving *** Cheapest for free ***\", df.format(discountCheapestForFree)));\n\t\t\t\t\t\n\t\treturn total;\t\t\n\t}",
"private double crunchPut(Option o) {\n int i; \n int countTrial;\n double deltaT;\n deltaT = o.getTerm() / numIntervals;\n double NumTrial;\n double trialAverage = 0;\n double trialPayoff;\n double temp = 0;\n double simulationRunningSum, simulationAveragePayoff;\n double stock;\n Random r = new Random();\n simulationRunningSum = 0.0;\n for (countTrial = 1; countTrial <= numTrials; countTrial++) {\n stock = o.getsNought();\n NumTrial = 0.0;\n double nns = 0;\n for (i = 0; i < numIntervals; i++) {\n nns = r.nextGaussian();\n stock = stock * Math.exp((o.getRiskFreeRate() - o.getVolatility() * o.getVolatility() / 2) * deltaT\n + o.getVolatility() * nns * Math.sqrt(deltaT));\n NumTrial += stock;\n temp = stock;\n }\n if (o.getStyle() == OptionStyle.ASIAN) {\n trialAverage = NumTrial / numIntervals;\n } else if ((o.getStyle() == OptionStyle.AMERICAN) || (o.getStyle() == OptionStyle.EUROPEAN)) {\n trialAverage = temp;\n }\n trialPayoff = Math.max(o.getStrikeP() - trialAverage, 0.0);\n simulationRunningSum += trialPayoff;\n }\n simulationAveragePayoff = simulationRunningSum / numTrials;\n double valueOfOption;\n valueOfOption = simulationAveragePayoff * Math.exp(-o.getRiskFreeRate() * o.getTerm());\n System.out.print(valueOfOption);\n return valueOfOption;\n }",
"@Override\n\tpublic double getPrice() {\n\t\treturn auto.getPrice() + AC_ADDITIONAL_CHARGE;\n\t}",
"double purchasePrice();",
"@Override\n\tpublic void viewPrice() {\n\t\t\n\t}",
"public abstract double getLateFee(int daysLate);",
"public double getCost() {\n\t\tif (this.accommodationType.equals(TYPEsingle)) {\n\t\t\tif (this.getRoomView().equals(\"street view\")) {\n\t\t\t\treturn 50.0;\n\t\t\t} else if (this.getRoomView().equals(\"garden view\")) {\n\t\t\t\treturn 70.0;\n\t\t\t} else {\n\t\t\t\treturn 110.0;\n\t\t\t}\n\t\t} else if (this.accommodationType.equals(TYPEdouble)) {\n\t\t\tif (this.getRoomView().equals(\"street view\")) {\n\t\t\t\treturn 70.0;\n\t\t\t} else if (this.getRoomView().equals(\"garden view\")) {\n\t\t\t\treturn 98.0;\n\t\t\t} else {\n\t\t\t\treturn 154.0;\n\t\t\t}\n\t\t} else if (this.accommodationType.equals(TYPEfamily)) {\n\t\t\tif (this.getRoomView().equals(\"street view\")) {\n\t\t\t\treturn 86.0;\n\t\t\t} else if (this.getRoomView().equals(\"garden view\")) {\n\t\t\t\tif (getInfoJacuzzi() == true) {\n\t\t\t\t\treturn 180.6;\n\t\t\t\t} else {\n\t\t\t\t\treturn 120.4;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (getInfoJacuzzi() == true) {\n\t\t\t\t\treturn 283.8;\n\t\t\t\t} else {\n\t\t\t\t\treturn 189.2;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (this.accommodationType.equals(TYPEpresidential)) {\n\t\t\tif (this.getRoomView().equals(\"street view\")) {\n\t\t\t\treturn 200.0;\n\t\t\t} else if (this.getRoomView().equals(\"garden view\")) {\n\t\t\t\tif (getInfoJacuzzi() == true) {\n\t\t\t\t\treturn 420.0;\n\t\t\t\t} else {\n\t\t\t\t\treturn 280.0;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (getInfoJacuzzi() == true) {\n\t\t\t\t\treturn 660.0;\n\t\t\t\t} else {\n\t\t\t\t\treturn 440.0;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\treturn 0.0;\n\t\t}\n\t}",
"private int calculatePrice(boolean hasWhippedCream, boolean hasChocolate) {\n int toppings = 0;\n\n if(hasWhippedCream){\n toppings += 1;\n }\n\n if(hasChocolate){\n toppings += 2;\n }\n\n return quantity * (priceOfCoffee + toppings);\n }",
"public double getPrice();",
"public double getOptionPrice()\n {\n return optionPrice;\n }",
"private void calcCalories()\n\t{\n\t\tif (getIntensity() == 1)\n\t\t{\n\t\t\tbikeCal = 10 * bikeTime; \n\t\t}\n\t\telse if (getIntensity() == 2)\n\t\t{\n\t\t\tbikeCal = 14.3 * bikeTime; \n\t\t}\n\t\telse {\n\t\t\tJOptionPane.showMessageDialog(null, \"error\");\n\t\t}\n\t}",
"private void calculate() {\n\t\tSharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(this);\r\n\t\tString arrowSpeed = sharedPref.getString(SettingsActivity.ARROW_SPEED, DEFAULT_ARROW_SPEED+\"\"); \r\n\r\n\t\tfinal double mToYards = 0.9144;\r\n\t\tfinal int mToMm = 1000;\r\n\r\n\t\ttry {\r\n\t\t\tfinal double v = Double.parseDouble(arrowSpeed); // Velocity\r\n\r\n\t\t\tdouble d = Double.parseDouble(findSelectedEditText(findSelectedRadioButton(\r\n\t\t\t\t\tR.id.radioGroupDistance), \"Distance\").getText().toString()); // Distance\r\n\t\t\tdouble e = Double.parseDouble(findSelectedEditText(findSelectedRadioButton(\r\n\t\t\t\t\tR.id.radioGroupElevation), \"Elevation\").getText().toString()); //Elevation\r\n\r\n\t\t\tString distanceType = findSelectedRadioButton(R.id.radioGroupDistance).getText().toString();\r\n\t\t\tString elevationType = findSelectedRadioButton(R.id.radioGroupElevation).getText().toString();\r\n\r\n\t\t\tif (distanceType == \"Yards\") {\r\n\t\t\t\td *= mToYards;\r\n\t\t\t}\r\n\r\n\t\t\tif (elevationType.equals(\"Yards\")) {\r\n\t\t\t\te *= mToYards;\r\n\t\t\t} else if (elevationType.equals(\"Degrees\")) {\r\n\t\t\t\te = Math.toRadians(e);\r\n\t\t\t\te = d * Math.sin(e);\r\n\t\t\t} else if (elevationType.equals(\"Radians\")) {\r\n\t\t\t\te = d * Math.sin(e);\r\n\t\t\t}\r\n\r\n\r\n\t\t\tdouble da = Math.sqrt(Math.pow(d, 2) - Math.pow(e, 2)); // Calculates horizontal distance\r\n\r\n\t\t\tdouble radians = Math.atan((-Math.pow(v, 2) + Math.sqrt(Math.pow(v, 4) - Math.pow(g*d, 2)))/(g*d));\r\n\t\t\tdouble radians2 = Math.atan((-Math.pow(v, 2) + Math.sqrt(Math.pow(v, 4) + 2*e*g*Math.pow(v, 2) - Math.pow(g*da, 2)))/(g*da));\r\n\r\n\t\t\tdouble answer = -Math.tan(radians2-Math.asin(e/d)-radians);\r\n\t\t\tDecimalFormat df = new DecimalFormat(\"#.##\");\r\n\r\n\t\t\tString result = df.format(answer * mToMm) + \"mm\";\r\n\r\n\t\t\tif (answer > 0) {\r\n\t\t\t\tfindTextView(\"textViewDisplay\").setText(message + arrowSpeed + speedUnit + resultPositiveMessage + result);\r\n\t\t\t} else {\r\n\t\t\t\tfindTextView(\"textViewDisplay\").setText(message + arrowSpeed + speedUnit + resultNegativeMessage + result);\r\n\t\t\t}\r\n\r\n\t\t\t\r\n\t\t\tInputMethodManager inputManager = (InputMethodManager) getSystemService(Activity.INPUT_METHOD_SERVICE); \r\n\t\t\tinputManager.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);\r\n//\t\t\tInputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);\r\n//\t\t\timm.hideSoftInputFromWindow(this.getCurrentFocus().getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\tcT(\"Error Detected\");\r\n\t\t}\r\n\t}",
"double applyTax(double price);",
"Price getTradePrice();",
"static long OPL_CALC_SLOT(OPL_SLOT SLOT) {\n /* calcrate envelope generator */\n if ((SLOT.evc += SLOT.evs) >= SLOT.eve) {\n switch (SLOT.evm) {\n case ENV_MOD_AR:\n /* ATTACK . DECAY1 */\n /* next DR */\n\n SLOT.evm = ENV_MOD_DR;\n SLOT.evc = EG_DST;\n SLOT.eve = SLOT.SL;\n SLOT.evs = SLOT.evsd;\n break;\n case ENV_MOD_DR:\n /* DECAY . SL or RR */\n\n SLOT.evc = SLOT.SL;\n SLOT.eve = EG_DED;\n if (SLOT.eg_typ != 0) {\n SLOT.evs = 0;\n } else {\n SLOT.evm = ENV_MOD_RR;\n SLOT.evs = SLOT.evsr;\n }\n break;\n case ENV_MOD_RR:\n /* RR . OFF */\n\n SLOT.evc = EG_OFF;\n SLOT.eve = EG_OFF + 1;\n SLOT.evs = 0;\n break;\n }\n }\n /* calcrate envelope */\n return ((SLOT.TLL + ENV_CURVE[SLOT.evc >> ENV_BITS] + (SLOT.ams != 0 ? ams : 0)) & 0xFFFFFFFFL);\n //return SLOT->TLL+ENV_CURVE[SLOT->evc>>ENV_BITS]+(SLOT->ams ? ams : 0);\n }",
"ScaleTwoDecimal calculateApplicableFandARate(Award award);",
"public double calculatePrice() {\n return 0;\n }",
"public double getPrice(Movie movie, double time);",
"public void getDanger(){\r\n\t\r\n\tif(isnow>0){ //is it snow?\r\n\t\t// There is snow, we set all spread indexes to 0\r\n\t\tset_AllSpreadIndexToZero();\r\n\t\t\r\n\t\tadjust_BUI();\r\n\t}else {\r\n\t\t\t//There is no snow on the ground we will compute the spread indexes and fire load\r\n\r\n\t\t\t//Calculate Fine fuel moisture\r\n\t\t\tcal_FineFuelMoisture();\r\n\t\t\t\r\n\t\t\t//calculate the drying factor for the day\r\n\t\t\tcal_DryFactor();\r\n\t\t\t\r\n\t\t\t// adjust fine fuel moist\t\t\r\n\t\t\tadjust_FineFuelMoisture();\r\n\t\t}\r\n\t\r\n\tif (precip>0.1){ // is it rain?\r\n\t\t//There is rain (precipitation >0.1 inch), we must reduce the build up index (BUO) by \r\n\t\t//an amount equal to rain fall\r\n\t\tadjust_BUI();\r\n\t}else{\r\n\t\t//After correct for rain, if any, we are ready to add today's dring factor to obtain the \r\n\t\t//current build up index\r\n\t\tincrease_BUIBYDryingFactor();\r\n\t\t\r\n\t\t//we will adjust the grass index for heavy fuel lags. The result will be the timber spread index\r\n\t\t//The adjusted fuel moisture, ADFM, Adjusted for heavy fuels, will now be computed.\r\n\t\tcal_AdjustedFuelMoist();\r\n\t\t\r\n\t\tif (ADFM>33){\r\n\t\t\tset_AllSpreadIndexToOne();\r\n\r\n\t\t\t}else{\r\n\t\t\t\t//whether wind>14? and calculate grass and timber spread index\r\n\t\t\t\tcal_GrassAndTimber();\r\n\t\t\t\t//Both BUI and Timber spread index are not 0?\r\n\t\t\t\tif (!((TIMBER==0)&(BUO==0))){\r\n\t\t\t\t\tcal_FireLoadRating();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n}",
"private int calculatePrice(boolean addWhippedCream, boolean addChocolate,boolean takeAway) {\r\n int price=20;\r\n if (addWhippedCream){\r\n price=price+5;\r\n }\r\n\r\n if (addChocolate){\r\n price=price+7;\r\n }\r\n if (takeAway){\r\n price=price+2;\r\n }\r\n\r\n\r\n return quantity*price;\r\n\r\n }",
"public Double getPrice();",
"public static Documento calcularExcento(Documento doc, List<DocumentoDetalleVo> productos) {\n\t\tDouble totalReal = 0.0, exectoReal = 0.0;\n\t\tDouble gravado = 0.0;\n\t\tDouble ivatotal = 0.0;\n\t\tDouble peso = 0.0;\n\t\tDouble iva5 = 0.0;\n\t\tDouble iva19 = 0.0;\n\t\tDouble base5 = 0.0;\n\t\tDouble base19 = 0.0;\n\t\tDouble costoTotal =0.0;\n\t\t//este campo es para retencion del hotel\n\t\tDouble retencion =0.0;\n\t\t// aqui voy toca poner a sumar las variables nuebas para que se reflejen\n\t\t// en el info diario\n\t\tfor (DocumentoDetalleVo dDV : productos) {\n\t\t\tLong productoId = dDV.getProductoId().getProductoId();\n\t\t\tDouble costoPublico = dDV.getParcial();\n\t\t\tDouble costo = (dDV.getProductoId().getCosto()==null?0.0:dDV.getProductoId().getCosto())*dDV.getCantidad();\n\t\t\tDouble iva1 = dDV.getProductoId().getIva().doubleValue() / 100;\n\t\t\tDouble peso1 = dDV.getProductoId().getPeso() == null ? 0.0 : dDV.getProductoId().getPeso();//\n\t\t\tpeso1 = peso1 * dDV.getCantidad();\n\t\t\ttotalReal += costoPublico;\n\t\t\tcostoTotal+=costo;\n\t\t\tdouble temp;\n\t\t\tivatotal = ivatotal + ((costoPublico / (1 + iva1)) * iva1);\n\t\t\tpeso = peso + peso1;\n\t\t\t// si es iva del 19 se agrega al documento junto con la base\n\t\t\tif (iva1 == 0.19) {\n\t\t\t\tiva19 = iva19 + ((costoPublico / (1 + iva1)) * iva1);\n\t\t\t\tbase19 = base19 + (costoPublico / (1 + iva1));\n\t\t\t}\n\t\t\t// si es iva del 5 se agrega al documento junto con la base\n\t\t\tif (iva1 == 0.05) {\n\t\t\t\tiva5 = iva5 + ((costoPublico / (1 + iva1)) * iva1);\n\t\t\t\tbase5 = base5 + (costoPublico / (1 + iva1));\n\t\t\t}\n\t\t\tif (iva1 > 0.0) {\n\t\t\t\ttemp = costoPublico / (1 + iva1);\n\t\t\t\tgravado += temp;\n\n\t\t\t} else {\n\t\t\t\ttemp = costoPublico;\n\t\t\t\t//no suma el excento si es producto retencion\n\t\t\t\tif( productoId!=6l && productoId!=7l) {\n\t\t\t\t\texectoReal += temp;\n\t\t\t\t}else {\n\t\t\t\t\tretencion+= temp;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tdoc.setTotal(totalReal);\n\t\tdoc.setSaldo(totalReal);\n\t\tdoc.setExcento(exectoReal);\n\t\tdoc.setGravado(gravado);\n\t\tdoc.setIva(ivatotal);\n\t\tdoc.setPesoTotal(peso);\n\t\tdoc.setIva5(iva5);\n\t\tdoc.setIva19(iva19);\n\t\tdoc.setBase5(base5);\n\t\tdoc.setBase19(base19);\n\t\tdoc.setTotalCosto(costoTotal);\n\t\tdoc.setRetefuente(retencion);\n\t\treturn doc;\n\t}",
"public abstract double getDepositDiscount();",
"public double runPrice(int age) {\n\t\t// PriceCRUD for calculating price later\n\t\tPriceCRUD<CinemaClassPrice> cinemaClassCRUD = new PriceCRUD<>(CinemaClassPrice.class);\n\t\tPriceCRUD<MovieTypePrice> movieTypeCRUD = new PriceCRUD<>(MovieTypePrice.class);\n\t\tPriceCRUD<DayPrice> dayCRUD = new PriceCRUD<>(DayPrice.class);\n\t\tPriceCRUD<AgePrice> ageCRUD = new PriceCRUD<>(AgePrice.class);\n\t\t\n\t\t// Get cinema class price\n\t\tCinemaCRUD<Cinema> cinemaCRUD = new CinemaCRUD<Cinema>(Cinema.class, Showtimes.getCineplexId());\n\t\tCinemaClass cinemaClass = cinemaCRUD.getCinemaType(this.showtimes.getCinemaId());\n\t\tCinemaClassPrice cinemaClassPrice = cinemaClassCRUD.getElementPrice(cinemaClass);\n\t\t\n\t\t// Get movie type price\n\t\tMovieCRUD<Movie> movieCRUD = new MovieCRUD<>(Movie.class);\n\t\tMovieType movieType = movieCRUD.getMovieById(this.showtimes.getMovieId()).getType();\n\t\tMovieTypePrice movieTypePrice = movieTypeCRUD.getElementPrice(movieType);\n\t\t\n\t\t// Get Day type price\n\t\tDayType dayType = DateTimeHelper.getDayType(this.showtimes.getDate());\n\t\tDayPrice dayTypePrice = dayCRUD.getElementPrice(dayType);\n\t\t\n\t\t// Get Age Range Price\n\t\tAgePrice agePrice = ageCRUD.getElementPrice(age);\n\t\t\n\t\t// Print receipt for 1 ticket\n\t\tSystem.out.println(cinemaClassPrice.toString());\n\t\tSystem.out.println(movieTypePrice.toString());\n\t\tSystem.out.println(dayTypePrice.toString());\n\t\tSystem.out.println(agePrice.toString());\n\t\tdouble ticketPrice = cinemaClassPrice.getPrice()+movieTypePrice.getPrice()+dayTypePrice.getPrice()+agePrice.getPrice();\n\t\tSystem.out.println(\"Ticket price: \"+ticketPrice);\n\t\t\n\t\treturn ticketPrice;\n\t}",
"public int getPrice(){\n int out = 0;\n if(availabilities.size()==0){\n return 0;\n }\n int tempInt;\n for(int i=0; i<flights.size(); i++){\n tempInt = availabilities.size()-1;\n for(int j=0; j<availabilities.size();j++) {\n if(flights.get(i).getFlightNumber().equals(availabilities.get(j).getFlightNumber()) && flights.get(i).getAirlineCode().equals(availabilities.get(j).getAirlineCode()) && flights.get(i).getDepartureDate().equals(availabilities.get(j).getDepartureDate())) {\n tempInt = j;\n break;\n }\n }\n out += getPriceFromAvailability(availabilities.get(tempInt));\n\n }\n return out;\n }",
"public double getCost(StringBuffer detail, boolean ignoreAmmo) {\n double[] costs = new double[15];\n int i = 0;\n\n double cockpitCost = 0;\n if (getCockpitType() == Mech.COCKPIT_TORSO_MOUNTED) {\n cockpitCost = 750000;\n } else if (getCockpitType() == Mech.COCKPIT_DUAL) {\n // FIXME\n cockpitCost = 0;\n } else if (getCockpitType() == Mech.COCKPIT_COMMAND_CONSOLE) {\n // Command Consoles are listed as a cost of 500,000.\n // That appears to be in addition to the primary cockpit.\n cockpitCost = 700000;\n } else if (getCockpitType() == Mech.COCKPIT_SMALL) {\n cockpitCost = 175000;\n } else if (getCockpitType() == Mech.COCKPIT_INDUSTRIAL) {\n cockpitCost = 100000;\n } else {\n cockpitCost = 200000;\n }\n if (hasEiCockpit() && getCrew().getOptions().booleanOption(\"ei_implant\")) {\n cockpitCost = 400000;\n }\n costs[i++] = cockpitCost;\n costs[i++] = 50000;// life support\n costs[i++] = weight * 2000;// sensors\n int muscCost = hasTSM() ? 16000 : 2000;\n costs[i++] = muscCost * weight;// musculature\n costs[i++] = EquipmentType.getStructureCost(structureType) * weight;// IS\n costs[i++] = getActuatorCost();// arm and/or leg actuators\n Engine engine = getEngine();\n costs[i++] = engine.getBaseCost() * engine.getRating() * weight / 75.0;\n if (getGyroType() == Mech.GYRO_XL) {\n costs[i++] = 750000 * (int) Math.ceil(getOriginalWalkMP() * weight / 100f) * 0.5;\n } else if (getGyroType() == Mech.GYRO_COMPACT) {\n costs[i++] = 400000 * (int) Math.ceil(getOriginalWalkMP() * weight / 100f) * 1.5;\n } else if (getGyroType() == Mech.GYRO_HEAVY_DUTY) {\n costs[i++] = 500000 * (int) Math.ceil(getOriginalWalkMP() * weight / 100f) * 2;\n } else {\n costs[i++] = 300000 * (int) Math.ceil(getOriginalWalkMP() * weight / 100f);\n }\n double jumpBaseCost = 200;\n // You cannot have JJ's and UMU's on the same unit.\n if (hasUMU()) {\n costs[i++] = Math.pow(getAllUMUCount(), 2.0) * weight * jumpBaseCost;\n } else {\n if (getJumpType() == Mech.JUMP_BOOSTER) {\n jumpBaseCost = 150;\n } else if (getJumpType() == Mech.JUMP_IMPROVED) {\n jumpBaseCost = 500;\n }\n costs[i++] = Math.pow(getOriginalJumpMP(), 2.0) * weight * jumpBaseCost;\n }\n // num of sinks we don't pay for\n int freeSinks = hasDoubleHeatSinks() ? 0 : 10;\n int sinkCost = hasDoubleHeatSinks() ? 6000 : 2000;\n // cost of sinks\n costs[i++] = sinkCost * (heatSinks() - freeSinks);\n costs[i++] = hasFullHeadEject()?1725000:0;\n costs[i++] = getArmorWeight() * EquipmentType.getArmorCost(armorType);\n costs[i++] = getWeaponsAndEquipmentCost(ignoreAmmo);\n\n double cost = 0; // calculate the total\n for (int x = 0; x < i; x++) {\n cost += costs[x];\n }\n\n double omniMultiplier = 0;\n if (isOmni()) {\n omniMultiplier = 1.25f;\n cost *= omniMultiplier;\n }\n costs[i++] = -omniMultiplier; // negative just marks it as multiplier\n\n double weightMultiplier = 1 + (weight / 100f);\n costs[i++] = -weightMultiplier; // negative just marks it as multiplier\n cost = Math.round(cost * weightMultiplier);\n if (detail != null) {\n addCostDetails(cost, detail, costs);\n }\n return cost;\n }",
"@Override \n\tpublic TradeAction tick(double price) {\n\t\tma10before=average(priceQ10);\n\t\t\n\t\tif (priceQ10.size()<10)\n\t\t{\n\t\t\tpriceQ10.offer(price);\n\t\t}\n\t\tif(priceQ10.size()==10)\n\t\t{\n\t\t\tpriceQ10.poll();\n\t\t\tpriceQ10.offer(price);\t\t\n\t\t}\n\t\t\n\t\t ma10after=average(priceQ10);\n\t\t \n\t\t// 60 days moving average\n\t\tma60before=average(priceQ60);\n\t\tif (priceQ60.size()<60)\n\t\t{\n\t\t\tpriceQ60.offer(price);\n\t\t}\n\t\tif(priceQ60.size()==60)\n\t\t{\n\t\t\tpriceQ60.poll();\n\t\t\tpriceQ60.offer(price);\t\t\n\t\t}\n\t\tma60after=average(priceQ60);\n\t\t\t\n\t\t//buy when its 10 day moving average goes above the 60 day moving average\n\t\tif((ma10before < ma60before) & (ma10after > ma60after))\n\t\t{\n\t\t\tprofit = profit - price;\n\t\t\t//System.out.println(\"buy\");\n\t\t\t//System.out.println(\"profit is\");\n\t\t\t//System.out.println(profit);\n\t\t\tif(mark==1){\n\t\t\t\tmark=-1;\n\t\t\t\treturn TradeAction.BUY;\n\t\t\t}\n\t\t\telse \n\t\t\t\treturn TradeAction.DO_NOTHING;\n\t\t\t\n\t\t}\n\t\t//buy when its 10 day moving average goes below the 60 day moving average\n\t\tif((ma10before > ma60before) & (ma10after < ma60after))\n\t\t{\n\t\t\tprofit = profit + price;\n\t\t\t//System.out.println(\"sell\");\n\t\t\t//System.out.println(\"profit is\");\n\t\t\t//System.out.println(profit);\n\t\t\tif(mark==-1){\n\t\t\t\tmark=1;\n\t\t\t\treturn TradeAction.SELL;\n\t\t\t}\n\t\t\telse \n\t\t\t\treturn TradeAction.DO_NOTHING;\n\t\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn TradeAction.DO_NOTHING;\t\t\t\n\t\t}\n\n\t}",
"@Override\n\tpublic double getDiscountedPrice (double price) {\n\t\treturn price - 5;\n\t}",
"private void calcEfficiency() {\n \t\tdouble possiblePoints = 0;\n \t\tfor (int i = 0; i < fermentables.size(); i++) {\n \t\t\tFermentable m = ((Fermentable) fermentables.get(i));\n \t\t\tpossiblePoints += (m.getPppg() - 1) * m.getAmountAs(\"lb\")\n \t\t\t\t\t/ postBoilVol.getValueAs(\"gal\");\n \t\t}\n \t\tefficiency = (estOg - 1) / possiblePoints * 100;\n \t}",
"PriceCalculationModel calculateLeasePrice(Long leaseId);",
"private int calculatePrice() {\n int price = numberOfCoffees * 5;\n\n return price;\n\n\n }",
"public double calcPrice() {\r\n\t\tdouble drinkPrice = getBasePrice();\r\n\t\tif(this.getSize()==SIZE.MEDIUM) {\r\n\t\t\tdrinkPrice+=getSizeUpPrice();\r\n\t\t}\r\n\t\telse if(this.getSize()==SIZE.LARGE) {\r\n\t\t\tdrinkPrice+=getSizeUpPrice();\r\n\t\t\tdrinkPrice+=getSizeUpPrice();\r\n\t\t}\r\n\t\t\r\n\t\tif(onWeekend) {\r\n\t\t\tdrinkPrice+=0.6;\r\n\t\t}\r\n\t\treturn drinkPrice;\r\n\t}",
"public float calculatePrice(Airline flight, String type, int baggage);",
"private void drink()\n { \n if(i.item3 == true && i.used == false)\n {\n p.energy += 70;\n i.item3 = false;\n i.used = true;\n System.out.println(\"Energy: \" + p.energy);\n }\n else if(i.used == true && i.item3 == false) \n {\n System.out.println(\"You already drank a redbull!\"); \n }\n else if(i.item3 == false && i.used == false)\n {\n System.out.println(\"no more drinks left!\");\n }\n }",
"public void calculateCost(){\n if(this.isChair){\n for(int i = 0; i < this.chairs.length; i++){\n this.cost += this.chairs[i].getPrice();\n }\n }\n //if furniture type is chair, add up cost of all items in list\n if(this.isDesk){\n for(int i = 0; i < this.desks.length; i++){\n this.cost += this.desks[i].getPrice();\n }\n }\n //if furniture type is chair, add up cost of all items in list\n if(this.isFiling){\n for(int i = 0; i < this.filingCabinets.length; i++){\n this.cost += this.filingCabinets[i].getPrice();\n }\n }\n //if furniture type is chair, add up cost of all items in list\n if(this.isLamp){\n for(int i = 0; i < this.lamps.length; i++){\n this.cost += this.lamps[i].getPrice();\n }\n }\n }",
"public abstract double getDiscount(int qty, double price);",
"@Override\n public double getPrice() {\n return souvenir.getPrice() + 20;\n }",
"public void figure() {\r\n Currency nAdv = Currency.Zero;\r\n Currency nLow = Currency.NegativeOne;\r\n Currency nHigh = Currency.Zero;\r\n Currency nTotal = Currency.Zero;\r\n \r\n for(int i = 0; i < dayArray.size(); i++) {\r\n DayG dayG = (DayG) dayArray.get(i);\r\n Currency gross = dayG.getGross();\r\n \r\n nAdv = nAdv.add(gross);\r\n nTotal = nTotal.add(gross);\r\n if(nLow == Currency.NegativeOne || gross.lt(nLow)) {\r\n lowD = dayG;\r\n nLow = gross;\r\n }\r\n if(nHigh.lt(gross)) {\r\n highD = dayG;\r\n nHigh = gross;\r\n }\r\n }\r\n \r\n adverage = nAdv.divide(dayArray.size()).round();\r\n low = nLow.round();\r\n high = nHigh.round();\r\n \r\n //no need to round total, right?\r\n total = nTotal;\r\n }",
"double getPricePerPerson();",
"public void calculateEndPrice(int TotalPrice, int Discount) {\n\n }",
"public double FullfagetPrice()\n {\n double futlfaget = totalpris + fragt;\n return futlfaget;\n\n }",
"public float getPrice() {\n\t\treturn this._entree.getPriceWithAddons() + this._side.getPrice() + this._drink.getPrice() - 1f;\n\t}",
"public void changePrice(Booking booking, float price);",
"@Override\n public USMoney calculatePrice() {\n USMoney sumPrice = new USMoney();\n for (int i = 0; i < curArrayIndex; i++) {\n sumPrice = sumPrice.add(items[i].getPrice());\n if (items[i].isFragile()) {\n sumPrice.addTo(10, 0);\n }\n }\n sumPrice.addTo(100, 0);\n return sumPrice;\n }",
"long getPrice();",
"@Override\r\n\tpublic double CalculatePrice() {\n\t\treturn 0;\r\n\t}",
"@Override\n\tpublic double getPrice() {\n\t\treturn 20;\n\t}",
"public Double calcMovieRentalPrice(Integer unitPrice, Integer numOfDays);",
"public double Get_Option_User_Choice_Price(String Op_Set_Name)\n {\n for(OptionSet i: opset) {\n if(Op_Set_Name.equalsIgnoreCase(i.getName()))\n return (i.User_Choice_Price()); \n } \n return 0;\n }",
"public BigDecimal getPriceListOld();",
"public double discountedPrice (){\n return basePrice - basePrice * discountRate;\n }",
"public interface TwoWayPrice<P, C extends CurrencyId> extends TwoWay<P>, Price<C> {\n\n @Nonnull\n P mid();\n\n /**\n * @return true if the {@link #bid} exceeds the {@link #offer}.\n */\n boolean isCrossed();\n\n /**\n * @return true if there is any difference between the {@link #bid} and {@link #offer}.\n */\n boolean hasSpread();\n\n @Override\n default Map<String, Object> explain() {\n return this.explanationBuilder()\n .put(\"bid\", this.bid())\n .put(\"offer\", this.offer());\n }\n\n @Override\n TwoWayPrice<P, C> evaluate();\n\n}",
"private static double totalPrice(double price_interest, double dwnpymnt) {\n \treturn price_interest + dwnpymnt;\n }",
"public void calculate(View v) {\n EditText inputBill = findViewById(R.id.inputBill);\n EditText inputTipPercent = findViewById(R.id.inputTipPercent);\n String num1Str = inputBill.getText().toString();\n String num2Str = inputTipPercent.getText().toString();\n\n // multiply Bill by Tip to get Tip in dollars\n double num1 = Double.parseDouble(num1Str);\n double num2 = Double.parseDouble(num2Str);\n double tipInDollar = num1 * (num2 / 100);\n double total = num1 + tipInDollar;\n\n // show tip in dollars\n TextView lblTipAmount = findViewById(R.id.lblTipAmount);\n lblTipAmount.setText(String.valueOf(tipInDollar));\n\n // show total price with tip included\n TextView lblTotalAmount = findViewById(R.id.lblTotalAmount);\n lblTotalAmount.setText(String.valueOf(total));\n }",
"public double calcTotal(){\n\t\tdouble total; // amount to be returned\n\t\t\n\t\t// add .50 cents for any milk that isn't whole or skim, and .35 cents for flavoring\n\t\tif ((milk != \"whole\" && milk != \"skim\") && flavor != \"no\"){\n\t\t\tcost += 0.85;\t\n\t\t}\n\t\t\n\t\t// add .35 cents for flavoring\n\t\telse if (flavor != \"no\"){\n\t\t\tcost += 0.35;\t\n\t\t}\n\t\t\n\t\t// add .50 cents for milk that isn't whole or skim\n\t\telse if (milk != \"whole\" && milk != \"skim\"){\n\t\t\tcost += 0.50;\n\t\t}\n\t\t\n\t\telse{\n\t\t}\n\t\t\n\t\t// add .50 cents for extra shot of espresso\n\t\tif (extraShot != false){\n\t\t\ttotal = cost + 0.50;\n\t\t}\n\t\telse\n\t\t\ttotal = cost;\n\t\t\n\t\treturn total;\n\t}",
"public int calculatePrice() {\n int price = 5;\n if(hasWhippedCream) {\n price += 1;\n }\n if(hasChocolate) {\n price += 2;\n }\n return quantity * price;\n }",
"@Override\r\n\tpublic double rideFare() {\r\n\t\tdouble trafficRate = 1;\r\n\t\tswitch(this.getTrafficKind()) {\r\n\t\t case Low:\r\n\t\t\ttrafficRate = 1;break;\r\n\t\t\tcase Medium:\r\n\t\t\t\ttrafficRate = 1.1;break;\r\n\t\t\tcase High:\r\n\t\t\t\ttrafficRate = 1.5;break;\r\n\t\t}\r\n\t\tdouble basicRate = 0;\r\n\t\tif (this.getLength() <5) { \r\n\t\t\tbasicRate = 3.3;\r\n\t\t} else if (10 > this.getLength()){\r\n\t\t\tbasicRate = 4.2;\r\n\t\t} else if (this.getLength() <20){\r\n\t\t\tbasicRate = 1.91;\r\n\t\t} else {\r\n\t\t\tbasicRate = 1.5;\r\n\t\t}\r\n\t\t\r\n\t\treturn basicRate * trafficRate * this.getLength();\r\n\t}",
"public double getPrice() {\n double price = BASE_PRICE;\n for (Topping topping : toppings) {\n if (topping.isPremium()) {\n price += 1.25;\n } else {\n price += 0.75;\n }\n }\n return price;\n }",
"public double calcCost(){\n double cost = 0;\n cost += pMap.get(size);\n cost += cMap.get(crust);\n //Toppings are priced at 3.00 for 3-4 topppings, and 4.0 for 5+ toppings\n \n if(toppings !=null)\n {\n if((toppings.length == 3) || (toppings.length == 4)){\n cost += 3.0;\n }\n if (toppings.length > 4){\n cost += 4.0;\n }\n }\n \n return cost;\n }",
"private final com.iqoption.deposit.light.perform.a f(java.lang.Double r21) {\n /*\n r20 = this;\n r0 = r20;\n r1 = r0.cFE;\n r2 = 0;\n if (r1 == 0) goto L_0x01d2;\n L_0x0007:\n r3 = r0.ayL;\n if (r3 == 0) goto L_0x01d0;\n L_0x000b:\n r3 = r3.Km();\n if (r3 == 0) goto L_0x01d0;\n L_0x0011:\n r4 = r2;\n r4 = (com.iqoption.core.microservices.billing.response.deposit.cashboxitem.d.b) r4;\n r5 = r0.cxs;\n r6 = r5 instanceof com.iqoption.core.microservices.billing.response.deposit.cashboxitem.d;\n if (r6 == 0) goto L_0x002e;\n L_0x001a:\n r5 = (com.iqoption.core.microservices.billing.response.deposit.cashboxitem.d) r5;\n r4 = r5.aaI();\n if (r4 == 0) goto L_0x002d;\n L_0x0022:\n r5 = r1.getName();\n r4 = r4.get(r5);\n r4 = (com.iqoption.core.microservices.billing.response.deposit.cashboxitem.d.b) r4;\n goto L_0x002e;\n L_0x002d:\n r4 = r2;\n L_0x002e:\n if (r4 == 0) goto L_0x003b;\n L_0x0030:\n r7 = r4.OL();\n if (r7 == 0) goto L_0x003b;\n L_0x0036:\n r7 = r7.doubleValue();\n goto L_0x003d;\n L_0x003b:\n r7 = 0;\n L_0x003d:\n if (r4 == 0) goto L_0x004a;\n L_0x003f:\n r4 = r4.OM();\n if (r4 == 0) goto L_0x004a;\n L_0x0045:\n r9 = r4.doubleValue();\n goto L_0x004c;\n L_0x004a:\n r9 = 0;\n L_0x004c:\n r11 = r3.aas();\n r4 = 0;\n r13 = (double) r4;\n r15 = (r11 > r13 ? 1 : (r11 == r13 ? 0 : -1));\n if (r15 >= 0) goto L_0x005a;\n L_0x0056:\n r11 = -4616189618054758400; // 0xbff0000000000000 float:0.0 double:-1.0;\n goto L_0x00ec;\n L_0x005a:\n r11 = r3.aan();\n if (r11 == 0) goto L_0x0066;\n L_0x0060:\n r11 = r3.aas();\n goto L_0x00ec;\n L_0x0066:\n r11 = r0.ayL;\n if (r11 == 0) goto L_0x00a7;\n L_0x006a:\n r11 = r11.Kn();\n if (r11 == 0) goto L_0x00a7;\n L_0x0070:\n r11 = (java.lang.Iterable) r11;\n r11 = r11.iterator();\n L_0x0076:\n r12 = r11.hasNext();\n if (r12 == 0) goto L_0x009d;\n L_0x007c:\n r12 = r11.next();\n r17 = r12;\n r17 = (com.iqoption.core.microservices.configuration.a.d) r17;\n r15 = r17.getName();\n r16 = r3.aaq();\n if (r16 == 0) goto L_0x0094;\n L_0x008e:\n r16 = r16.getName();\n r2 = r16;\n L_0x0094:\n r2 = kotlin.jvm.internal.i.y(r15, r2);\n if (r2 == 0) goto L_0x009b;\n L_0x009a:\n goto L_0x009e;\n L_0x009b:\n r2 = 0;\n goto L_0x0076;\n L_0x009d:\n r12 = 0;\n L_0x009e:\n r12 = (com.iqoption.core.microservices.configuration.a.d) r12;\n if (r12 == 0) goto L_0x00a7;\n L_0x00a2:\n r11 = r12.getRate();\n goto L_0x00a9;\n L_0x00a7:\n r11 = 4607182418800017408; // 0x3ff0000000000000 float:0.0 double:1.0;\n L_0x00a9:\n r2 = r0.ayL;\n if (r2 == 0) goto L_0x00e2;\n L_0x00ad:\n r2 = r2.Kn();\n if (r2 == 0) goto L_0x00e2;\n L_0x00b3:\n r2 = (java.lang.Iterable) r2;\n r2 = r2.iterator();\n L_0x00b9:\n r15 = r2.hasNext();\n if (r15 == 0) goto L_0x00d6;\n L_0x00bf:\n r15 = r2.next();\n r17 = r15;\n r17 = (com.iqoption.core.microservices.configuration.a.d) r17;\n r5 = r17.getName();\n r6 = r1.getName();\n r5 = kotlin.jvm.internal.i.y(r5, r6);\n if (r5 == 0) goto L_0x00b9;\n L_0x00d5:\n goto L_0x00d7;\n L_0x00d6:\n r15 = 0;\n L_0x00d7:\n r15 = (com.iqoption.core.microservices.configuration.a.d) r15;\n if (r15 == 0) goto L_0x00e2;\n L_0x00db:\n r5 = r15.getRate();\n r18 = r5;\n goto L_0x00e4;\n L_0x00e2:\n r18 = 4607182418800017408; // 0x3ff0000000000000 float:0.0 double:1.0;\n L_0x00e4:\n r5 = r3.aas();\n r5 = r5 * r11;\n r11 = r5 / r18;\n L_0x00ec:\n if (r21 != 0) goto L_0x0100;\n L_0x00ee:\n r2 = new com.iqoption.deposit.light.perform.a;\n r1 = com.iqoption.deposit.o.g.incorrect_value;\n r1 = r0.getString(r1);\n r3 = \"getString(R.string.incorrect_value)\";\n kotlin.jvm.internal.i.e(r1, r3);\n r2.<init>(r1, r4);\n goto L_0x01cf;\n L_0x0100:\n r2 = -1;\n r5 = (double) r2;\n r2 = 1;\n r15 = (r11 > r5 ? 1 : (r11 == r5 ? 0 : -1));\n if (r15 <= 0) goto L_0x0140;\n L_0x0107:\n r5 = r3.aat();\n r17 = r21.doubleValue();\n r5 = r5 + r17;\n r15 = (r5 > r11 ? 1 : (r5 == r11 ? 0 : -1));\n if (r15 < 0) goto L_0x0140;\n L_0x0115:\n r5 = r3.aat();\n r11 = r11 - r5;\n r3 = new java.math.BigDecimal;\n r5 = 0;\n r5 = java.lang.Math.max(r5, r11);\n r3.<init>(r5);\n r5 = com.iqoption.deposit.o.g.remaining_deposit_amount_n1;\n r6 = new java.lang.Object[r2];\n r1 = com.iqoption.core.util.e.a(r3, r1, r2);\n r6[r4] = r1;\n r1 = r0.getString(r5, r6);\n r3 = \"getString(R.string.remai…atAmount(currency, true))\";\n kotlin.jvm.internal.i.e(r1, r3);\n r3 = new com.iqoption.deposit.light.perform.a;\n r3.<init>(r1, r2);\n r2 = r3;\n goto L_0x01cf;\n L_0x0140:\n r3 = (r7 > r13 ? 1 : (r7 == r13 ? 0 : -1));\n if (r3 <= 0) goto L_0x014c;\n L_0x0144:\n r5 = r21.doubleValue();\n r3 = (r5 > r7 ? 1 : (r5 == r7 ? 0 : -1));\n if (r3 < 0) goto L_0x0158;\n L_0x014c:\n r5 = r21.doubleValue();\n r11 = r1.aau();\n r3 = (r5 > r11 ? 1 : (r5 == r11 ? 0 : -1));\n if (r3 >= 0) goto L_0x0187;\n L_0x0158:\n r3 = (r7 > r13 ? 1 : (r7 == r13 ? 0 : -1));\n if (r3 <= 0) goto L_0x0165;\n L_0x015c:\n r5 = r1.aau();\n r5 = java.lang.Math.max(r7, r5);\n goto L_0x0169;\n L_0x0165:\n r5 = r1.aau();\n L_0x0169:\n r3 = new java.math.BigDecimal;\n r3.<init>(r5);\n r5 = com.iqoption.deposit.o.g.deposit_limit_n1;\n r6 = new java.lang.Object[r2];\n r1 = com.iqoption.core.util.e.a(r3, r1, r2);\n r6[r4] = r1;\n r1 = r0.getString(r5, r6);\n r2 = \"getString(R.string.depos…atAmount(currency, true))\";\n kotlin.jvm.internal.i.e(r1, r2);\n r2 = new com.iqoption.deposit.light.perform.a;\n r2.<init>(r1, r4);\n goto L_0x01cf;\n L_0x0187:\n r3 = (r9 > r13 ? 1 : (r9 == r13 ? 0 : -1));\n if (r3 <= 0) goto L_0x0193;\n L_0x018b:\n r5 = r21.doubleValue();\n r3 = (r5 > r9 ? 1 : (r5 == r9 ? 0 : -1));\n if (r3 > 0) goto L_0x019f;\n L_0x0193:\n r5 = r21.doubleValue();\n r7 = r1.aav();\n r3 = (r5 > r7 ? 1 : (r5 == r7 ? 0 : -1));\n if (r3 <= 0) goto L_0x01ce;\n L_0x019f:\n r3 = (r9 > r13 ? 1 : (r9 == r13 ? 0 : -1));\n if (r3 <= 0) goto L_0x01ac;\n L_0x01a3:\n r5 = r1.aav();\n r5 = java.lang.Math.min(r9, r5);\n goto L_0x01b0;\n L_0x01ac:\n r5 = r1.aav();\n L_0x01b0:\n r3 = new java.math.BigDecimal;\n r3.<init>(r5);\n r5 = com.iqoption.deposit.o.g.up_to_n1;\n r6 = new java.lang.Object[r2];\n r1 = com.iqoption.core.util.e.a(r3, r1, r2);\n r6[r4] = r1;\n r1 = r0.getString(r5, r6);\n r2 = \"getString(R.string.up_to…atAmount(currency, true))\";\n kotlin.jvm.internal.i.e(r1, r2);\n r2 = new com.iqoption.deposit.light.perform.a;\n r2.<init>(r1, r4);\n goto L_0x01cf;\n L_0x01ce:\n r2 = 0;\n L_0x01cf:\n return r2;\n L_0x01d0:\n r1 = r2;\n return r1;\n L_0x01d2:\n r1 = r2;\n return r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.iqoption.deposit.light.perform.c.f(java.lang.Double):com.iqoption.deposit.light.perform.a\");\n }",
"public abstract double pay(BikesType type, double rideDuration);",
"@Override\n\tpublic double getPrice() {\n\t\t\n\t\treturn 2000;\n\t}",
"void updateTotals () {\n\n speed_kts_mph_kmh_ms_info = make_speed_kts_mph_kmh_ms_info(velocity);\n double lift = foil_lift();\n double drag = total_drag();\n \n // This computes location of the center of gravity of the craft\n // (rider, roughly) in relation to the leading edge (aka LE) of the\n // mast (roughly, front bolt of DT). \n //\n // Mtipping is 0.5*eff_strut_span*strut,drag\n //\n // cg_pos: x-axis offset relative to strut bottom LE. \"fore\" is -, \"aft\" is +,\n dash.cg_pos = find_cg_xpos(); \n // cg_pos_board_level: at board level where x=0 at strut's board-side LE.\n // strut tilt correction is required. example:\n // cg_pos=-35cm, xoff_tip=5cm (horue,dmitry) cg_pos_board_level=-30-5=-35\n dash.cg_pos_board_level = dash.cg_pos;\n\n // foilboard AOA correction. when the board is at high angle of\n // attack, the computed offset is only an approximation, rider is more\n // forward *alone the board surface* in reality. for 90 degree strut,\n // it is the hypotenuse where the adjasent is -dash.cg_pos + cos(\n // BOARD_THICKNESS + strut.span)\n if (rider_xpos_tilt_correction) {\n double pitch_rad = Math.toRadians(craft_pitch);\n double hypo = BOARD_THICKNESS + strut.span;\n double deck_rot_adj = - // when AOA is positive, and cg_pos is\n // negative, increses the magnitude\n hypo * Math.sin(pitch_rad);\n\n // board deck offset is hypotenuse; adjasent value is dash.cg_pos plus\n // deck_rot_adjn\n \n // deck_x_offset is the 'hypotenuse' H = A / cos(A)\n double deck_x_offset = (dash.cg_pos + deck_rot_adj) // the 'adjasent'\n / Math.cos(pitch_rad);\n\n // apply correction\n dash.cg_pos_board_level = deck_x_offset;\n }\n\n // cg_pos_board_level: at board level where x=0 at strut's board-side LE.\n // strut tilt correction is required. example for AoA=0:\n // cg_pos=-30cm, xoff_tip=5cm (horue,dmitry) cg_pos_board_level=-30-5=-35\n dash.cg_pos_board_level -= strut.xoff_tip;\n\n \n // rider_countering_x_offset is computed and saved to reflect posture\n // change due to (a) headwind (b) propulsion pull as follows below\n double rider_countering_x_offset = 0;\n\n // (a) Headwind.\n // Two square triangles: rider_offset/height = rider.drag/weight\n if (!in.opts.ignore_air_resistance)\n rider_countering_x_offset += -(rider.drag/rider.weight)* RIDER_CG_HEIGHT;\n\n // (b) Propulsion pull. \n // Rider's force-countering stance is in effect only if the drive force is applied\n // above the board, which implies it goes through rider's body\n if (DRIVING_FORCE_HEIGHT > 0) {\n // drive force, scaled to be considering coming from the rider CG height spot\n double drive_force_scaled = \n (in.opts.ignore_drive_moment)\n ? 0\n : (total_drag() * DRIVING_FORCE_HEIGHT/RIDER_CG_HEIGHT);\n // two square triangles: rider_offset/height = drive_force_scaled/weight\n rider_countering_x_offset += (drive_force_scaled/rider.weight)* RIDER_CG_HEIGHT; // wasFF 0.86;\n }\n rider.force_countering_x_offest = rider_countering_x_offset;\n dash.cg_pos_of_rider = dash.cg_pos_board_level + rider.force_countering_x_offest;\n\n // factored out to dash.loadPanel()\n // if (can_do_gui_updates) {\n // dash.loadPanel();\n // }\n }",
"public void matineeMovieTickets()\n {\n System.out.print( \"Enter your age: \" );\n double age = scan.nextDouble();\n System.out.print( \"Enter the 24-hour clock time: \" );\n double time = scan.nextDouble();\n double price;\n if ( age <= 13 )\n {\n price = 4.00;\n if ( time < 1700 )\n {\n price = 2.00;\n }\n System.out.println( \"The ticket price is $\" + price );\n }\n if ( age > 13 )\n {\n price = 8.00;\n if ( time < 1700 )\n {\n price = 5.00;\n }\n System.out.println( \"The ticket price is $\" + price );\n }\n }",
"public double getPrice()\n\t{\n\t\treturn this.totalPrice + this.getFlightCosts() + this.excursionSubTotal\n\t\t\t\t+ this.getLodgingCost();\n\t}",
"private double dotProduct(Rater me, Rater r) {\n double output = 0;\n for (String item : me.getItemsRated()) {\n if (r.hasRating(item)) {\n output += (5 - me.getRating(item)) * (5 - r.getRating(item));\n }\n }\n return output;\n }"
]
| [
"0.62199104",
"0.5869922",
"0.5554448",
"0.5375445",
"0.5294037",
"0.52218616",
"0.52214503",
"0.5191361",
"0.5070256",
"0.5027407",
"0.498526",
"0.4957503",
"0.49206907",
"0.49175227",
"0.48876956",
"0.48849693",
"0.48769754",
"0.48738724",
"0.48546055",
"0.4845904",
"0.48279473",
"0.48230323",
"0.48221192",
"0.48148197",
"0.48128277",
"0.48073906",
"0.4790063",
"0.4776476",
"0.47537518",
"0.47537518",
"0.47537518",
"0.4735968",
"0.47229788",
"0.4718321",
"0.46955422",
"0.46879226",
"0.46762258",
"0.46604627",
"0.46578097",
"0.46551943",
"0.4650797",
"0.46397355",
"0.46397287",
"0.46321872",
"0.462303",
"0.4619569",
"0.46099517",
"0.46076488",
"0.46043205",
"0.45968446",
"0.45928612",
"0.45833877",
"0.45805264",
"0.4577664",
"0.45680216",
"0.45669067",
"0.45651835",
"0.45588103",
"0.45413834",
"0.45335147",
"0.45239213",
"0.45226282",
"0.45076028",
"0.4504499",
"0.44987425",
"0.44912443",
"0.44904208",
"0.44897488",
"0.44807655",
"0.4473573",
"0.44696394",
"0.4465867",
"0.44629118",
"0.44592947",
"0.44425663",
"0.44307637",
"0.44189018",
"0.44185257",
"0.4416529",
"0.44159508",
"0.44129986",
"0.4407248",
"0.44052732",
"0.44001415",
"0.43985295",
"0.43979052",
"0.43923414",
"0.4391768",
"0.43909445",
"0.43862927",
"0.43812892",
"0.43795943",
"0.43793213",
"0.43787605",
"0.43777016",
"0.4377297",
"0.43763193",
"0.43683296",
"0.43643183",
"0.43595788"
]
| 0.533653 | 4 |
The firstDerivatives are [0] s, [1] df2, [2] x, [3] y, [4] lognormalVolT, [5] mu. The second derivatives are [0] s twice, [1] x twice, [2] y twice, [3] s and y. | private double getEAdjoint(
double s,
double df2,
double x,
double y,
double lognormalVolT,
double h,
double mu,
double eta,
double[] firstDerivatives,
double[] secondDerivatives) {
double n1 = NORMAL.getCDF(eta * (x - lognormalVolT));
double n2 = NORMAL.getCDF(eta * (y - lognormalVolT));
double hsMu = Math.pow(h / s, 2 * mu);
double e = df2 * (n1 - hsMu * n2);
double n1df = NORMAL.getPDF(eta * (x - lognormalVolT));
double n2df = NORMAL.getPDF(eta * (y - lognormalVolT));
double hsMuBar = df2 * -n2;
double n2Bar = df2 * -hsMu;
double n1Bar = df2;
firstDerivatives[0] = -2d * mu * hsMu / s * hsMuBar; // s
firstDerivatives[1] = n1 - hsMu * n2; // df2;
firstDerivatives[2] = n1df * eta * n1Bar; // x
firstDerivatives[3] = n2df * eta * n2Bar; // y
firstDerivatives[4] = n2df * -eta * n2Bar + n1df * -eta * n1Bar; // lognormalVolT
firstDerivatives[5] = 2d * Math.log(h / s) * hsMu * hsMuBar; // mu
secondDerivatives[0] = hsMu * hsMuBar * 2d * mu * (2d * mu + 1d) / (s * s);
secondDerivatives[1] = -n1df * n1Bar * (x - lognormalVolT) * eta;
secondDerivatives[2] = -n2df * n2Bar * (y - lognormalVolT) * eta;
secondDerivatives[3] = -2d * mu * n2df * eta * n2Bar / s;
return e;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private double getFAdjoint(\n double s,\n double z,\n double lognormalVolT,\n double h,\n double mu,\n double lambda,\n double eta,\n double[] firstDerivatives,\n double[] secondDerivatives) {\n\n double n1 = NORMAL.getCDF(eta * z);\n double n2 = NORMAL.getCDF(eta * (z - 2 * lambda * lognormalVolT));\n double hsMuPLa = Math.pow(h / s, mu + lambda);\n double hsMuMLa = Math.pow(h / s, mu - lambda);\n double f = hsMuPLa * n1 + hsMuMLa * n2;\n double fBar = 1.0;\n double n1df = NORMAL.getPDF(eta * z);\n double n2df = NORMAL.getPDF(eta * (z - 2 * lambda * lognormalVolT));\n double hsMuPLaBar = n1 * fBar;\n double hsMuMLaBar = n2 * fBar;\n double n2Bar = hsMuMLa * fBar;\n double n1Bar = hsMuPLa * fBar;\n firstDerivatives[0] = -(mu + lambda) * hsMuPLa / s * hsMuPLaBar - (mu - lambda) * hsMuMLa / s * hsMuMLaBar; //s\n firstDerivatives[1] = n1df * eta * n1Bar + n2df * eta * n2Bar; // z\n firstDerivatives[2] = -n2df * eta * 2 * lambda * n2Bar; //lognormalVolT\n firstDerivatives[3] = hsMuPLa * Math.log(h / s) * hsMuPLaBar + hsMuMLa * Math.log(h / s) * hsMuMLaBar; // mu\n firstDerivatives[4] = hsMuPLa * Math.log(h / s) * hsMuPLaBar - hsMuMLa * Math.log(h / s) * hsMuMLaBar; // lambda\n secondDerivatives[0] = hsMuPLa * hsMuPLaBar * (mu + lambda) * (mu + lambda + 1d) / (s * s) +\n hsMuMLa * hsMuMLaBar * (mu - lambda) * (mu - lambda + 1d) / (s * s);\n secondDerivatives[1] = -z * n1df * eta * n1Bar - (z - 2 * lambda * lognormalVolT) * n2df * eta * n2Bar;\n secondDerivatives[2] = -n1df * n1Bar * (mu + lambda) * eta / s - n2df * n2Bar * (mu - lambda) * eta / s;\n return f;\n }",
"public RealValuedFunctTwoOps deriv1() {\n\treturn new RealValuedFunctTwoOps() {\n\t public double valueAt(double x, double y) {\n\t\treturn RealValuedFunctionTwo.this.deriv1At(x, y);\n\t }\n\t};\n }",
"public double[] derivs(double t, double[] y)\n\t{\n\t\tdouble out[] = new double[6];\n\t\tVectorN r = new VectorN(y[0], y[1], y[2]);\n\t\tdouble rmag = r.mag();\n\t\tdouble rcubed = rmag * rmag * rmag;\n\t\tdouble muorc = -1.0 * this.mu / rcubed;\n\n\t\tout[0] = y[3];\n\t\tout[1] = y[4];\n\t\tout[2] = y[5];\n\t\tout[3] = muorc * y[0];\n\t\tout[4] = muorc * y[1];\n\t\tout[5] = muorc * y[2];\n\n\t\treturn out;\n\t}",
"@Override\n public void step(double[] p, int n, double t, double h, double[] pout, Function derivs) {\n \tif ( tmp == null || tmp.length != n ) {\n tmp = new double[n];\n \t}\n \t//state: p.x,p.y,v.x,v.y\n \tVector2d v1 = new Vector2d();\n \tVector2d x1 = new Vector2d();\n \tVector2d a = new Vector2d();\n\t\tderivs.derivs(t,p,tmp);\n\t\t//gives me k1\n \tfor (int i=0;i<p.length-3;i+=4) {\n \t\tdouble[] k2 = new double[4];\n \t\tdouble[] k3 = new double[4];\n \t\tdouble[] k4 = new double[4];\n \t\t//x1 = x0+h(x0+1/2h(x0)')'\n \t\tdouble[] tuples = new double[] {tmp[i]*1/2*h+p[i],tmp[i+1]*1/2*h+p[i+1],\n \t\t\t\ttmp[i+2]*1/2*h+p[i+2],tmp[i+3]*1/2*h+p[i+3]};\n \t\tderivs.derivs(t,tuples,k2);\n \t\ttuples = new double[] {k2[i]*1/2*h+p[i],k2[i+1]*1/2*h+p[i+1],\n \t\t\t\tk2[i+2]*1/2*h+p[i+2],k2[i+3]*1/2*h+p[i+3]};\n \t\tderivs.derivs(t,tuples,k3);\n \t\ttuples = new double[] {k3[i]*h+p[i],k3[i+1]*h+p[i+1],\n \t\t\t\tk3[i+2]*h+p[i+2],k3[i+3]*h+p[i+3]};\n \t\tderivs.derivs(t,tuples,k4);\n \t\tx1.set(new Vector2d(p[i],p[i+1]));\n \t\tx1.scaleAdd(h/6, new Vector2d(tmp[i],tmp[i+1]), x1);\n \t\tx1.scaleAdd(h/3, new Vector2d(k2[i],k2[i+1]), x1);\n \t\tx1.scaleAdd(h/3, new Vector2d(k3[i],k3[i+1]), x1);\n \t\tx1.scaleAdd(h/6, new Vector2d(k4[i],k4[i+1]), x1);\n \t\t//v1 = v0+h*a\n \t\ta.set(tmp[i+2],tmp[i+3]);\n \t\tv1.set(new Vector2d(p[i+2],p[i+3]));\n \t\tv1.scaleAdd(h/6, a, v1);\n \t\tv1.scaleAdd(h/3, new Vector2d(k2[i+2],k2[i+3]), v1);\n \t\tv1.scaleAdd(h/3, new Vector2d(k3[i+2],k3[i+3]), v1);\n \t\tv1.scaleAdd(h/6, new Vector2d(k4[i+2],k4[i+3]), v1);\n \t\t//update velocity and positions\n \t\tpout[i] = x1.x;\n \t\tpout[i+1] = x1.y;\n \t\tpout[i+2] = v1.x;\n \t\tpout[i+3] = v1.y;\n \t}\n }",
"@org.junit.Test\n public void getSecondDerivTestCurve2() {\n BezierCurve curve = new BezierCurve(new Vector(10, 20), new Vector(20, 20));\n assertEquals(0, curve.getSecondDeriv(0).dot(new Vector(1, 0)), 0);\n assertEquals(0, curve.getSecondDeriv(1).dot(new Vector(1, 0)), 0);\n }",
"private double calculateXDerivative(double x, double y, double r, double r2, double phi, double deltaPhi)\n\t{\n\t\treturn 2*((a*b*Math.exp(b*(deltaPhi+phi))*y)/r2 + x/r) * (-a*Math.exp(b*(deltaPhi+phi)) + r);\n\t}",
"@Override\r\n\t\tpublic double[] gradient(double x, double... parameters) {\n\t\t\tfinal double a = parameters[0];\r\n\t\t\tfinal double b = parameters[1];\r\n\t\t\tfinal double c = parameters[2];\r\n\t\t\tfinal double d = parameters[3];\r\n\t\t\tfinal double e = parameters[4];\r\n\t\t\t\r\n\t\t\tdouble[] gradients = new double[5];\r\n\t\t\t//double den = 1 + Math.pow((x+e)/c, b);\r\n\t\t\t//gradients[0] = 1 / den; // Yes a Derivation \r\n\t\t\t//gradients[1] = -((a - d) * Math.pow(x / c, b) * Math.log(x / c)) / (den * den); // Yes b Derivation \r\n\t\t\t//gradients[2] = (b * Math.pow(x / c, b - 1) * (x / (c * c)) * (a - d)) / (den * den); // Yes c Derivation \r\n\t\t\t//gradients[3] = 1 - (1 / den); // Yes d Derivation \r\n\t\t\t\r\n\t\t\t//Derivation\r\n\t\t\tfinal double c_b = Math.pow(c, b);\r\n\t\t\tfinal double c_b1 = Math.pow(c, b+1.);\r\n\t\t\tfinal double c_2b = Math.pow(c, 2.*b);\r\n\t\t\tfinal double c_2b1 = Math.pow(c, 2.*b+1.);\r\n\t\t\t\r\n\t\t\tfinal double xe_b = Math.pow(x+e, b);\r\n\t\t\tfinal double xe_2b = Math.pow(x+e, 2.*b);\r\n\t\t\tfinal double xe_2b1 = Math.pow(x+e, 2.*b+1.);\r\n\t\t\t\r\n\t\t\tgradients[0] = c_b/(xe_b+c_b);\r\n\t\t\tgradients[1] = ((c_b*d-a*c_b)*xe_b*Math.log(x+e)+(a*c_b*Math.log(c)-c_b*Math.log(c)*d)*xe_b)/(xe_2b+2*c_b*xe_b+c_2b);\r\n\t\t\tgradients[2] = -((b*c_b*d-a*b*c_b)*xe_b)/(c*xe_2b+2*c_b1*xe_b+c_2b1);\r\n\t\t\tgradients[3] = xe_b/(xe_b+c_b);\r\n\t\t\tgradients[4] = ((b*c_b*d-a*b*c_b)*xe_b)/(xe_2b1+xe_b*(2*c_b*x+2*c_b*e)+c_2b*x+c_2b*e);\r\n\t\t\treturn gradients;\r\n\t\t}",
"@org.junit.Test\n public void getSecondDerivTestCurve4() {\n BezierCurve curve = new BezierCurve(new Vector(10, 20), new Vector(20, 20),\n new Vector(10, 30), new Vector(20, 30));\n assertTrue(curve.getSecondDeriv(0).dot(new Vector(-1, 0)) > 0);\n assertTrue(curve.getSecondDeriv(0).dot(new Vector(0, 1)) > 0);\n assertEquals(new Vector(), curve.getSecondDeriv(0.5));\n assertTrue(curve.getSecondDeriv(1).dot(new Vector(1, 0)) > 0);\n assertTrue(curve.getSecondDeriv(1).dot(new Vector(0, -1)) > 0);\n }",
"@org.junit.Test\n public void getSecondDerivTestOnePointCurve() {\n BezierCurve onePointCurve = new BezierCurve(new Vector(10, 20));\n assertEquals(new Vector(), onePointCurve.getSecondDeriv(0));\n assertEquals(new Vector(), onePointCurve.getSecondDeriv(1));\n }",
"public RealValuedFunctTwoOps deriv21() {\n\treturn new RealValuedFunctTwoOps() {\n\t public double valueAt(double x, double y) {\n\t\treturn RealValuedFunctionTwo.this.deriv21At(x, y);\n\t }\n\t};\n }",
"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 }",
"public RealValuedFunctTwoOps deriv12() {\n\treturn new RealValuedFunctTwoOps() {\n\t public double valueAt(double x, double y) {\n\t\treturn RealValuedFunctionTwo.this.deriv12At(x, y);\n\t }\n\t};\n }",
"@org.junit.Test\n public void getSecondDerivEmptyCurve() {\n BezierCurve emptyCurve = new BezierCurve();\n assertEquals(new Vector(), emptyCurve.getSecondDeriv(0));\n assertEquals(new Vector(), emptyCurve.getSecondDeriv(1));\n }",
"public void ResetColorGradient_ds2() {\r\n\t\tdouble min;\r\n\t\tdouble max;\r\n\t\tdouble median;\r\n\r\n\t\tswitch(transformation) {\r\n\t\t\tcase ROWNORM:\r\n\t\t\t\tmin = minExpression_rownorm_ds2;\r\n\t\t\t\tmax = maxExpression_rownorm_ds2;\r\n\r\n\t\t\t\t//if both row normalization values are zero, can't perform row normalization\r\n\t\t\t\t//issue warning\r\n\t\t\t\t//This happens when there is only one data column in the dataset (or if it is rank file)\r\n\t\t\t\tif((min == 0) && (max == 0)) {\r\n\t\t\t\t\t//JOptionPane.showMessageDialog(Cytoscape.getDesktop(),\"Row normalization does not work with only one data column per dataset.\",\"Row normalization error\",JOptionPane.WARNING_MESSAGE);\r\n\t\t\t\t}\r\n\t\t\t\tmax = Math.max(Math.abs(min), max);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase LOGTRANSFORM:\r\n\r\n\t\t\t\t//can't take a log of a negative number\r\n\t\t\t\t//if both the max and min are negative then log tranform won't work.\r\n\t\t\t\t//issue a warning.\r\n\t\t\t\tif((minExpression_ds2 <= 0) && (maxExpression_ds2 <= 0)) {\r\n\t\t\t\t\t//both the max and min are probably negative values\r\n\t\t\t\t\t//JOptionPane.showMessageDialog(Cytoscape.getDesktop(),\"Both the max and min expression are negative, log of negative numbers is not valid\", \"log normalization error\", JOptionPane.WARNING_MESSAGE);\r\n\t\t\t\t\tmin = 0;\r\n\t\t\t\t\tmax = 0;\r\n\t\t\t\t}\r\n\t\t\t\t//if min expression is negative then use the max expression as the max\r\n\t\t\t\telse if(minExpression_ds2 <= 0) {\r\n\t\t\t\t\tmin = Math.min(Math.log(closestToZeroExpression_ds2), Math.log1p(maxExpression_ds2));\r\n\t\t\t\t\tmax = Math.max(Math.log(closestToZeroExpression_ds2), Math.log1p(maxExpression_ds2));\r\n\t\t\t\t}\r\n\t\t\t\t//if the max expression is negative then use the min expression as the max (should never happen!)\r\n\t\t\t\telse if(maxExpression_ds2 <= 0) {\r\n\t\t\t\t\tmin = 0;\r\n\t\t\t\t\tmax = Math.log1p(minExpression_ds2);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tmin = Math.log1p(minExpression_ds2);\r\n\t\t\t\t\tmax = Math.log1p(maxExpression_ds2);\r\n\t\t\t\t\tmax = Math.max(Math.abs(min), max);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase ASIS:\r\n\t\t\tdefault:\r\n\t\t\t\tmin = minExpression_ds2;\r\n\t\t\t\tmax = Math.max(Math.abs(minExpression_ds2), maxExpression_ds2);\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tmedian = max / 2;\r\n\t\tif(min >= 0) {\r\n\t\t\tmedian = max / 2;\r\n\t\t\trange_ds2 = ColorGradientRange.getInstance(0, median, median, max, 0, median, median, max);\r\n\t\t\ttheme_ds2 = ColorGradientTheme.GREEN_ONECOLOR_GRADIENT_THEME;\r\n\t\t} else {\r\n\t\t\tmedian = 0;\r\n\t\t\trange_ds2 = ColorGradientRange.getInstance(-max, 0, 0, max, -max, 0, 0, max);\r\n\t\t\ttheme_ds2 = ColorGradientTheme.GREEN_MAGENTA_GRADIENT_THEME;\r\n\t\t}\r\n\r\n\t}",
"public RealValuedFunctTwoOps deriv22() {\n\treturn new RealValuedFunctTwoOps() {\n\t public double valueAt(double x, double y) {\n\t\treturn RealValuedFunctionTwo.this.deriv22At(x, y);\n\t }\n\t};\n }",
"@org.junit.Test\n public void getSecondDerivTestCurve3() {\n BezierCurve curve = new BezierCurve(new Vector(10, 20), new Vector(15, 20), new Vector(15, 30));\n assertTrue(curve.getSecondDeriv(0).dot(new Vector(-1, 0)) > 0);\n assertTrue(curve.getSecondDeriv(0).dot(new Vector(0, 1)) > 0);\n assertTrue(curve.getSecondDeriv(0.5).dot(new Vector(-1, 0)) > 0);\n assertTrue(curve.getSecondDeriv(0.5).dot(new Vector(0, 1)) > 0);\n assertTrue(curve.getSecondDeriv(1).dot(new Vector(-1, 0)) > 0);\n assertTrue(curve.getSecondDeriv(1).dot(new Vector(0, 1)) > 0);\n }",
"public double deriv12At(double arg1, double arg2) throws\n\tIllegalArgumentException, UnsupportedOperationException,\n\tIllegalStateException\n {\n\tif (function12 != null) {\n\t return function12.valueAt(arg1, arg2);\n\t}\n\tif (context == null && object == null)\n\t throw new UnsupportedOperationException\n\t\t(errorMsg(\"functionNotSupported\"));\n\ttry {\n\t if (object != null && object instanceof RealValuedFunctionTwo) {\n\t\tRealValuedFunctionTwo f = (RealValuedFunctionTwo)object;\n\t\treturn f.deriv12At(arg1, arg2);\n\t }\n\t if (context == null) throw new UnsupportedOperationException\n\t\t\t\t (errorMsg(\"functionNotSupported\"));\n\t Object result;\n\t if (f12name != null) {\n\t\tresult = context.callScriptFunction(f12name, arg1, arg2);\n\t } else {\n\t\tif (object == null) throw new UnsupportedOperationException\n\t\t\t\t\t(errorMsg(\"functionNotSupported\"));\n\t\tresult = context.callScriptMethod(object, \"deriv12At\",\n\t\t\t\t\t\t arg1, arg2);\n\t }\n\t if (result instanceof Number) {\n\t\treturn ((Number) result).doubleValue();\n\t } else {\n\t\tthrow new UnsupportedOperationException\n\t\t (errorMsg(\"numberNotReturned\"));\n\t }\n\t} catch (ScriptException e) {\n\t String msg = errorMsg(\"callFailsArg2\", arg1, arg2);\n\t throw new IllegalArgumentException(msg, e);\n\t} catch (NoSuchMethodException e) {\n\t String msg = errorMsg(\"opNotSupported\");\n\t throw new UnsupportedOperationException(msg, e);\n\t}\n }",
"private void calc_e_v_dens() {\n\t\tint i,il,max_steps = 10;\n\t\tdouble[] lel = new double[2], onel = new double[2];\n\t\tdouble store_dens;\n\t\t\n\t\tstore_dens = density;\n\t\t\n\t\ttry {\n\t\t\tPrintStream out = new PrintStream(new FileOutputStream(\"Ediff.v.dens.out\"));\n\t\t\tout.println(\"# density Elhcp Elfcc Ehcp Efcc dEl dE\");\n\t\t\t\n\t\t\tfor (i=0; i<max_steps; i++) {\n\t\t\t\tdensity= 2.0*(double)(i+1)/(double)max_steps;\n\t\t\t\tdiameter = Math.pow(density,1.0/3.0);\n\t\t\t\tdiameter2 = diameter*diameter;\n\t\t\t\tout.println(density+\" \");\n\t\t\t\tfor (il=0; il<2; il++) {\n\t\t\t\t\tlel[il] = calc_local_energy(0,il,CUR_POS);\n\t\t\t\t\tonel[il] = calc_e_order_n(il);\n\t\t\t\t}\n\t\t\t\tout.println(lel[0]+\" \"+lel[1]+\" \"+onel[0]+\" \"+onel[1]+\" \"+(lel[1]-lel[0])+\" \"+(onel[1]-onel[0]));\n\t\t\t}\n\t\t\tout.close();\n\t\t} catch( Exception e ) {\n\t\t\tSystem.err.println(\"calc_e_v_dens failed while writing file with exception: \"+e);\n\t\t}\n\t\t\n\t\tdensity= store_dens;\n\t\tdiameter = Math.pow(density,1.0/3.0);\n\t\tdiameter2 = diameter*diameter;\n\t}",
"@Override\n\tpublic void computeDerivatives(final double time, final double[] y, final double[] ydot)\n\t\tthrows MaxCountExceededException, DimensionMismatchException {\n\n\t\tassignValue(time, y);\n\n\t\t/*\n\t\t * with variables assigned, calcul new value of expression in function\n\t\t * loop through equations (internal and external) to get singleequation\n\t\t * value\n\t\t */\n\n\t\t// TODO Should be rewritten in a more correct way : scope.execute(s,\n\t\t// agent)...\n\t\tList<SingleEquationStatement> equationValues = new ArrayList(equations.values());\n\t\tfor ( int i = 0, n = getDimension(); i < n; i++ ) {\n\n\t\t\tboolean pushed = false;\n\t\t\tif ( equaAgents.size() > 0 ) {\n\t\t\t\tpushed = currentScope.push(equaAgents.get(i));\n\t\t\t}\n\t\t\ttry {\n\t\t\t\t// AD: Does equationValues.get(i) return the correct equation ? The loop is bounded by getDimension()...\n\t\t\t\tydot[i] = Cast.asFloat(currentScope, equationValues.get(i).executeOn(currentScope));\n\t\t\t} catch (final Exception ex1) {\n\t\t\t\tGuiUtils.debug(ex1);\n\t\t\t} finally {\n\t\t\t\tif ( equaAgents.size() > 0 ) {\n\t\t\t\t\tif ( pushed ) {\n\t\t\t\t\t\tcurrentScope.pop(equaAgents.get(i));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}",
"public double secondPartialDerivative(FittingFunction f, int i, int j,\r\n double[] p, double delt) {\r\n double[] arg = new double[p.length];\r\n System.arraycopy(p, 0, arg, 0, p.length);\r\n\r\n arg[i] += delt;\r\n arg[j] += delt;\r\n double ff1 = f.evaluate(arg);\r\n\r\n arg[j] -= 2 * delt;\r\n double ff2 = f.evaluate(arg);\r\n\r\n arg[i] -= 2 * delt;\r\n arg[j] += 2 * delt;\r\n double ff3 = f.evaluate(arg);\r\n\r\n arg[j] -= 2 * delt;\r\n double ff4 = f.evaluate(arg);\r\n\r\n double fsSum = ff1 - ff2 - ff3 + ff4;\r\n\r\n double partial = fsSum / (4.0 * delt * delt);\r\n\r\n// if (Double.isNaN(partial) || partial < -0.5) {\r\n// double eraseme = 1.0;\r\n// }\r\n\r\n return partial;\r\n }",
"public double deriv1At(double arg1, double arg2) throws\n\tIllegalArgumentException, UnsupportedOperationException,\n\tIllegalStateException\n {\n\tif (function1 != null) {\n\t return function1.valueAt(arg1, arg2);\n\t}\n\tif (context == null && object == null)\n\t throw new UnsupportedOperationException\n\t\t(errorMsg(\"functionNotSupported\"));\n\ttry {\n\t if (object != null && object instanceof RealValuedFunctionTwo) {\n\t\tRealValuedFunctionTwo f = (RealValuedFunctionTwo)object;\n\t\treturn f.deriv1At(arg1, arg2);\n\t }\n\t if (context == null) throw new UnsupportedOperationException\n\t\t\t\t (errorMsg(\"functionNotSupported\"));\n\t Object result;\n\t if (f1name != null) {\n\t\tresult = context.callScriptFunction(f1name, arg1, arg2);\n\t } else {\n\t\tif (object == null) throw new UnsupportedOperationException\n\t\t\t\t\t(errorMsg(\"functionNotSupported\"));\n\t\tresult = context.callScriptMethod(object, \"deriv1At\",\n\t\t\t\t\t\t arg1, arg2);\n\t }\n\t if (result instanceof Number) {\n\t\treturn ((Number) result).doubleValue();\n\t } else {\n\t\tthrow new UnsupportedOperationException\n\t\t (errorMsg(\"numberNotReturned\"));\n\t }\n\t} catch (ScriptException e) {\n\t String msg = errorMsg(\"callFailsArg2\", arg1, arg2);\n\t throw new IllegalArgumentException(msg, e);\n\t} catch (NoSuchMethodException e) {\n\t String msg = errorMsg(\"opNotSupported\");\n\t throw new UnsupportedOperationException(msg, e);\n\t}\n }",
"public double deriv22At(double arg1, double arg2) throws\n\tIllegalArgumentException, UnsupportedOperationException,\n\tIllegalStateException\n {\n\tif (function22 != null) {\n\t return function22.valueAt(arg1, arg2);\n\t}\n\tif (context == null && object == null)\n\t throw new UnsupportedOperationException\n\t\t(errorMsg(\"functionNotSupported\"));\n\ttry {\n\t if (object != null && object instanceof RealValuedFunctionTwo) {\n\t\tRealValuedFunctionTwo f = (RealValuedFunctionTwo)object;\n\t\treturn f.deriv22At(arg1, arg2);\n\t }\n\t if (context == null) throw new UnsupportedOperationException\n\t\t\t\t (errorMsg(\"functionNotSupported\"));\n\t Object result;\n\t if (f22name != null) {\n\t\tresult = context.callScriptFunction(f22name, arg1, arg2);\n\t } else {\n\t\tif (object == null) throw new UnsupportedOperationException\n\t\t\t\t\t(errorMsg(\"functionNotSupported\"));\n\t\tresult = context.callScriptMethod(object, \"deriv22At\",\n\t\t\t\t\t\t arg1, arg2);\n\t }\n\t if (result instanceof Number) {\n\t\treturn ((Number) result).doubleValue();\n\t } else {\n\t\tthrow new UnsupportedOperationException\n\t\t (errorMsg(\"numberNotReturned\"));\n\t }\n\t} catch (ScriptException e) {\n\t String msg = errorMsg(\"callFailsArg2\", arg1, arg2);\n\t throw new IllegalArgumentException(msg, e);\n\t} catch (NoSuchMethodException e) {\n\t String msg = errorMsg(\"opNotSupported\");\n\t throw new UnsupportedOperationException(msg, e);\n\t}\n }",
"public void getGradient(Surface srf)\r\n {\r\n srf.x1 = firstPoint.x;\r\n srf.y1 = firstPoint.y;\r\n srf.x2 = secondPoint.x;\r\n srf.y2 = secondPoint.y;\r\n srf.gradientColor = secondColor;\r\n srf.cyclic = cyclic;\r\n srf.reversed = reversed;\r\n }",
"public double deriv21At(double arg1, double arg2) throws\n\tIllegalArgumentException, UnsupportedOperationException,\n\tIllegalStateException\n {\n\tif (function21 != null) {\n\t return function21.valueAt(arg1, arg2);\n\t}\n\tif (context == null && object == null)\n\t throw new UnsupportedOperationException\n\t\t(errorMsg(\"functionNotSupported\"));\n\ttry {\n\t if (object != null && object instanceof RealValuedFunctionTwo) {\n\t\tRealValuedFunctionTwo f = (RealValuedFunctionTwo)object;\n\t\treturn f.deriv21At(arg1, arg2);\n\t }\n\t if (context == null) throw new UnsupportedOperationException\n\t\t\t\t (errorMsg(\"functionNotSupported\"));\n\t Object result;\n\t if (f21name != null) {\n\t\tresult = context.callScriptFunction(f21name, arg1, arg2);\n\t } else {\n\t\tif (object == null) throw new UnsupportedOperationException\n\t\t\t\t\t(errorMsg(\"functionNotSupported\"));\n\t\tresult = context.callScriptMethod(object, \"deriv21At\",\n\t\t\t\t\t\t arg1, arg2);\n\t }\n\t if (result instanceof Number) {\n\t\treturn ((Number) result).doubleValue();\n\t } else {\n\t\tthrow new UnsupportedOperationException\n\t\t (errorMsg(\"numberNotReturned\"));\n\t }\n\t} catch (ScriptException e) {\n\t String msg = errorMsg(\"callFailsArg2\", arg1, arg2);\n\t throw new IllegalArgumentException(msg, e);\n\t} catch (NoSuchMethodException e) {\n\t String msg = errorMsg(\"opNotSupported\");\n\t throw new UnsupportedOperationException(msg, e);\n\t}\n }",
"public double calcDerivative(StdVectorInt derivComponents, Vector x) {\n return opensimSimulationJNI.FiberCompressiveForceCosPennationCurve_calcDerivative__SWIG_1(swigCPtr, this, StdVectorInt.getCPtr(derivComponents), derivComponents, Vector.getCPtr(x), x);\n }",
"@Override\n\tpublic double[] getDx() {\n\t double object[] = new double[2];\n\t for(int i = 0; i < x.length; i++){\n\t object[0] += theta[0] + theta[1] * x[i] - y[i];\n\t object[1] += (theta[0] + theta[1] * x[i] - y[i])*x[i];\n\t }\n\t theta[0] -= eta * object[0];\n\t theta[1] -= eta * object[1];\n\n\t return theta;\n }",
"public void calculate(double[] theta) {\r\n dvModel.vectorToParams(theta);\r\n\r\n double localValue = 0.0;\r\n double[] localDerivative = new double[theta.length];\r\n\r\n TwoDimensionalMap<String, String, SimpleMatrix> binaryW_dfsG,binaryW_dfsB;\r\n binaryW_dfsG = TwoDimensionalMap.treeMap();\r\n binaryW_dfsB = TwoDimensionalMap.treeMap();\r\n TwoDimensionalMap<String, String, SimpleMatrix> binaryScoreDerivativesG,binaryScoreDerivativesB ;\r\n binaryScoreDerivativesG = TwoDimensionalMap.treeMap();\r\n binaryScoreDerivativesB = TwoDimensionalMap.treeMap();\r\n Map<String, SimpleMatrix> unaryW_dfsG,unaryW_dfsB ;\r\n unaryW_dfsG = new TreeMap<String, SimpleMatrix>();\r\n unaryW_dfsB = new TreeMap<String, SimpleMatrix>();\r\n Map<String, SimpleMatrix> unaryScoreDerivativesG,unaryScoreDerivativesB ;\r\n unaryScoreDerivativesG = new TreeMap<String, SimpleMatrix>();\r\n unaryScoreDerivativesB= new TreeMap<String, SimpleMatrix>();\r\n\r\n Map<String, SimpleMatrix> wordVectorDerivativesG = new TreeMap<String, SimpleMatrix>();\r\n Map<String, SimpleMatrix> wordVectorDerivativesB = new TreeMap<String, SimpleMatrix>();\r\n\r\n for (TwoDimensionalMap.Entry<String, String, SimpleMatrix> entry : dvModel.binaryTransform) {\r\n int numRows = entry.getValue().numRows();\r\n int numCols = entry.getValue().numCols();\r\n binaryW_dfsG.put(entry.getFirstKey(), entry.getSecondKey(), new SimpleMatrix(numRows, numCols));\r\n binaryW_dfsB.put(entry.getFirstKey(), entry.getSecondKey(), new SimpleMatrix(numRows, numCols));\r\n binaryScoreDerivativesG.put(entry.getFirstKey(), entry.getSecondKey(), new SimpleMatrix(1, numRows));\r\n binaryScoreDerivativesB.put(entry.getFirstKey(), entry.getSecondKey(), new SimpleMatrix(1, numRows));\r\n }\r\n for (Map.Entry<String, SimpleMatrix> entry : dvModel.unaryTransform.entrySet()) {\r\n int numRows = entry.getValue().numRows();\r\n int numCols = entry.getValue().numCols();\r\n unaryW_dfsG.put(entry.getKey(), new SimpleMatrix(numRows, numCols));\r\n unaryW_dfsB.put(entry.getKey(), new SimpleMatrix(numRows, numCols));\r\n unaryScoreDerivativesG.put(entry.getKey(), new SimpleMatrix(1, numRows));\r\n unaryScoreDerivativesB.put(entry.getKey(), new SimpleMatrix(1, numRows));\r\n }\r\n if (op.trainOptions.trainWordVectors) {\r\n for (Map.Entry<String, SimpleMatrix> entry : dvModel.wordVectors.entrySet()) {\r\n int numRows = entry.getValue().numRows();\r\n int numCols = entry.getValue().numCols();\r\n wordVectorDerivativesG.put(entry.getKey(), new SimpleMatrix(numRows, numCols));\r\n wordVectorDerivativesB.put(entry.getKey(), new SimpleMatrix(numRows, numCols));\r\n }\r\n }\r\n\r\n // Some optimization methods prints out a line without an end, so our\r\n // debugging statements are misaligned\r\n Timing scoreTiming = new Timing();\r\n scoreTiming.doing(\"Scoring trees\");\r\n int treeNum = 0;\r\n MulticoreWrapper<Tree, Pair<DeepTree, DeepTree>> wrapper = new MulticoreWrapper<Tree, Pair<DeepTree, DeepTree>>(op.trainOptions.trainingThreads, new ScoringProcessor());\r\n for (Tree tree : trainingBatch) {\r\n wrapper.put(tree);\r\n }\r\n wrapper.join();\r\n scoreTiming.done();\r\n while (wrapper.peek()) {\r\n Pair<DeepTree, DeepTree> result = wrapper.poll();\r\n DeepTree goldTree = result.first;\r\n DeepTree bestTree = result.second;\r\n\r\n StringBuilder treeDebugLine = new StringBuilder();\r\n Formatter formatter = new Formatter(treeDebugLine);\r\n boolean isDone = (Math.abs(bestTree.getScore() - goldTree.getScore()) <= 0.00001 || goldTree.getScore() > bestTree.getScore());\r\n String done = isDone ? \"done\" : \"\";\r\n formatter.format(\"Tree %6d Highest tree: %12.4f Correct tree: %12.4f %s\", treeNum, bestTree.getScore(), goldTree.getScore(), done);\r\n System.err.println(treeDebugLine.toString());\r\n if (!isDone){\r\n // if the gold tree is better than the best hypothesis tree by\r\n // a large enough margin, then the score difference will be 0\r\n // and we ignore the tree\r\n\r\n double valueDelta = bestTree.getScore() - goldTree.getScore();\r\n //double valueDelta = Math.max(0.0, - scoreGold + bestScore);\r\n localValue += valueDelta;\r\n\r\n // get the context words for this tree - should be the same\r\n // for either goldTree or bestTree\r\n List<String> words = getContextWords(goldTree.getTree());\r\n\r\n // The derivatives affected by this tree are only based on the\r\n // nodes present in this tree, eg not all matrix derivatives\r\n // will be affected by this tree\r\n backpropDerivative(goldTree.getTree(), words, goldTree.getVectors(),\r\n binaryW_dfsG, unaryW_dfsG,\r\n binaryScoreDerivativesG, unaryScoreDerivativesG,\r\n wordVectorDerivativesG);\r\n\r\n backpropDerivative(bestTree.getTree(), words, bestTree.getVectors(),\r\n binaryW_dfsB, unaryW_dfsB,\r\n binaryScoreDerivativesB, unaryScoreDerivativesB,\r\n wordVectorDerivativesB);\r\n\r\n }\r\n ++treeNum;\r\n }\r\n\r\n double[] localDerivativeGood;\r\n double[] localDerivativeB;\r\n if (op.trainOptions.trainWordVectors) {\r\n localDerivativeGood = NeuralUtils.paramsToVector(theta.length,\r\n binaryW_dfsG.valueIterator(), unaryW_dfsG.values().iterator(),\r\n binaryScoreDerivativesG.valueIterator(),\r\n unaryScoreDerivativesG.values().iterator(),\r\n wordVectorDerivativesG.values().iterator());\r\n\r\n localDerivativeB = NeuralUtils.paramsToVector(theta.length,\r\n binaryW_dfsB.valueIterator(), unaryW_dfsB.values().iterator(),\r\n binaryScoreDerivativesB.valueIterator(),\r\n unaryScoreDerivativesB.values().iterator(),\r\n wordVectorDerivativesB.values().iterator());\r\n } else {\r\n localDerivativeGood = NeuralUtils.paramsToVector(theta.length,\r\n binaryW_dfsG.valueIterator(), unaryW_dfsG.values().iterator(),\r\n binaryScoreDerivativesG.valueIterator(),\r\n unaryScoreDerivativesG.values().iterator());\r\n\r\n localDerivativeB = NeuralUtils.paramsToVector(theta.length,\r\n binaryW_dfsB.valueIterator(), unaryW_dfsB.values().iterator(),\r\n binaryScoreDerivativesB.valueIterator(),\r\n unaryScoreDerivativesB.values().iterator());\r\n }\r\n\r\n // correct - highest\r\n for (int i =0 ;i<localDerivativeGood.length;i++){\r\n localDerivative[i] = localDerivativeB[i] - localDerivativeGood[i];\r\n }\r\n\r\n // TODO: this is where we would combine multiple costs if we had parallelized the calculation\r\n value = localValue;\r\n derivative = localDerivative;\r\n\r\n // normalizing by training batch size\r\n value = (1.0/trainingBatch.size()) * value;\r\n ArrayMath.multiplyInPlace(derivative, (1.0/trainingBatch.size()));\r\n\r\n // add regularization to cost:\r\n double[] currentParams = dvModel.paramsToVector();\r\n double regCost = 0;\r\n for (int i = 0 ; i<currentParams.length;i++){\r\n regCost += currentParams[i] * currentParams[i];\r\n }\r\n regCost = op.trainOptions.regCost * 0.5 * regCost;\r\n value += regCost;\r\n // add regularization to gradient\r\n ArrayMath.multiplyInPlace(currentParams, op.trainOptions.regCost);\r\n ArrayMath.pairwiseAddInPlace(derivative, currentParams);\r\n\r\n }",
"public double deriv2At(double arg1, double arg2) throws\n\tIllegalArgumentException, UnsupportedOperationException,\n\tIllegalStateException\n {\n\tif (function2 != null) {\n\t return function2.valueAt(arg1, arg2);\n\t}\n\tif (context == null && object == null)\n\t throw new UnsupportedOperationException\n\t\t(errorMsg(\"functionNotSupported\"));\n\ttry {\n\t if (object != null && object instanceof RealValuedFunctionTwo) {\n\t\tRealValuedFunctionTwo f = (RealValuedFunctionTwo)object;\n\t\treturn f.deriv2At(arg1, arg2);\n\t }\n\t if (context == null) throw new UnsupportedOperationException\n\t\t\t\t (errorMsg(\"functionNotSupported\"));\n\t Object result;\n\t if (f2name != null) {\n\t\tresult = context.callScriptFunction(f2name, arg1, arg2);\n\t } else {\n\t\tif (object == null) throw new UnsupportedOperationException\n\t\t\t\t\t(errorMsg(\"functionNotSupported\"));\n\t\tresult = context.callScriptMethod(object, \"deriv2At\",\n\t\t\t\t\t\t arg1, arg2);\n\t }\n\t if (result instanceof Number) {\n\t\treturn ((Number) result).doubleValue();\n\t } else {\n\t\tthrow new UnsupportedOperationException\n\t\t (errorMsg(\"numberNotReturned\"));\n\t }\n\t} catch (ScriptException e) {\n\t String msg = errorMsg(\"callFailsArg2\", arg1, arg2);\n\t throw new IllegalArgumentException(msg, e);\n\t} catch (NoSuchMethodException e) {\n\t String msg = errorMsg(\"opNotSupported\");\n\t throw new UnsupportedOperationException(msg, e);\n\t}\n }",
"public void ResetColorGradient_ds1() {\r\n\t\tdouble min;\r\n\t\tdouble max;\r\n\t\tdouble median;\r\n\r\n\t\tswitch(transformation) {\r\n\t\t\tcase ROWNORM:\r\n\t\t\t\tmin = minExpression_rownorm_ds1;\r\n\t\t\t\tmax = maxExpression_rownorm_ds1;\r\n\r\n\t\t\t\t//if both row normalization values are zero, can't perform row normalization\r\n\t\t\t\t//issue warning\r\n\t\t\t\t//This happens when there is only one data column in the dataset (or if it is rank file)\r\n\t\t\t\tif((min == 0) && (max == 0)) {\r\n\t\t\t\t\t//JOptionPane.showMessageDialog(Cytoscape.getDesktop(),\"Row normalization does not work with only one data column per dataset.\",\"Row normalization error\",JOptionPane.WARNING_MESSAGE);\r\n\t\t\t\t}\r\n\t\t\t\tmax = Math.max(Math.abs(min), max);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase LOGTRANSFORM:\r\n\r\n\t\t\t\t//can't take a log of a negative number\r\n\t\t\t\t//if both the max and min are negative then log tranform won't work.\r\n\t\t\t\t//issue a warning.\r\n\t\t\t\tif((minExpression_ds1 <= 0) && (maxExpression_ds1 <= 0)) {\r\n\t\t\t\t\t//both the max and min are probably negative values\r\n\t\t\t\t\t//JOptionPane.showMessageDialog(Cytoscape.getDesktop(),\"Both the max and min expression are negative, log of negative numbers is not valid\", \"log normalization error\", JOptionPane.WARNING_MESSAGE);\r\n\t\t\t\t\tmin = 0;\r\n\t\t\t\t\tmax = 0;\r\n\t\t\t\t}\r\n\t\t\t\t//if min expression is negative then use the max expression as the max\r\n\t\t\t\telse if(minExpression_ds1 <= 0) {\r\n\t\t\t\t\tmin = Math.min(Math.log(closestToZeroExpression_ds1), Math.log1p(maxExpression_ds1));\r\n\t\t\t\t\tmax = Math.max(Math.log(closestToZeroExpression_ds1), Math.log1p(maxExpression_ds1));\r\n\t\t\t\t}\r\n\t\t\t\t//if the max expression is negative then use the min expression as the max (should never happen!)\r\n\t\t\t\telse if(maxExpression_ds1 <= 0) {\r\n\t\t\t\t\tmin = 0;\r\n\t\t\t\t\tmax = Math.log1p(minExpression_ds1);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tmin = Math.log1p(minExpression_ds1);\r\n\t\t\t\t\tmax = Math.log1p(maxExpression_ds1);\r\n\t\t\t\t\tmax = Math.max(Math.abs(min), max);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase ASIS:\r\n\t\t\tdefault:\r\n\t\t\t\tmin = minExpression_ds1;\r\n\t\t\t\tmax = Math.max(Math.abs(minExpression_ds1), maxExpression_ds1);\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tmedian = max / 2;\r\n\t\tif(min >= 0) {\r\n\t\t\tmedian = max / 2;\r\n\t\t\trange_ds1 = ColorGradientRange.getInstance(0, median, median, max, 0, median, median, max);\r\n\t\t\ttheme_ds1 = ColorGradientTheme.GREEN_ONECOLOR_GRADIENT_THEME;\r\n\t\t} else {\r\n\t\t\tmedian = 0;\r\n\t\t\trange_ds1 = ColorGradientRange.getInstance(-max, 0, 0, max, -max, 0, 0, max);\r\n\t\t\ttheme_ds1 = ColorGradientTheme.GREEN_MAGENTA_GRADIENT_THEME;\r\n\t\t}\r\n\r\n\t}",
"private double fd(double x) {\r\n if(x<0){\r\n double x1 = x*-1;\r\n return interpretadorD.getResultado(\"!\"+x1);\r\n }\r\n return interpretadorD.getResultado(x);\r\n }",
"@Override\n public Expression differentiate(String var) {\n Expression firstLn = new Log(new Var(\"e\"), this.getEx2());\n Expression secondLn = new Log(new Var(\"e\"), this.getEx2());\n Expression denom = new Pow(secondLn, new Num(2));\n Expression div1 = new Div(this.getEx2().differentiate(var), this.getEx2());\n Expression div2 = new Div(this.getEx2().differentiate(var), this.getEx2());\n Expression mult1 = new Mult(div1, secondLn);\n Expression mult2 = new Mult(div2, firstLn);\n Expression numer = new Minus(mult1, mult2);\n Expression difEx = new Div(numer, denom);\n return difEx;\n \n \n \n /*Expression newExp1 = new Div(ex2.differentiate(var), ex2);\n Expression newExp2 = new Div(ex1.differentiate(var), ex1);\n return new Div(newExp1, newExp2).differentiate(var).differentiate(var);\n //return new Div(new Div(ex2.differentiate(var), ex2), new Div(ex1.differentiate(var), ex1));\n ///NEED TO TEST BETTER */\n\n }",
"public void visitD2F(D2F o){\n\t\tif (stack().peek() != Type.DOUBLE){\n\t\t\tconstraintViolated(o, \"The value at the stack top is not of type 'double', but of type '\"+stack().peek()+\"'.\");\n\t\t}\n\t}",
"void example1() {\n\t\t\n\t\tFloat64CartesianTensorProductMember a = new Float64CartesianTensorProductMember(3, 4);\n\t\t\n\t\tFloat64CartesianTensorProductMember b = G.DBL_TEN.construct();\n\t\t\n\t\tTensorCommaDerivative.compute(G.DBL_TEN, G.DBL, 1, a, b);\n\t\t\n\t\t// b contains the comma derivative of a\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 void logDose() {\n List<Double> standardPattern = new ArrayList<>();\n for (double point : CORTISOL_PATTERN) {\n standardPattern.add(point);\n }\n logDoseList = logarithmTable2(standardPattern);\n }",
"@Test\n public void test02() throws Throwable {\n RegulaFalsiSolver regulaFalsiSolver0 = new RegulaFalsiSolver(4956.642689288169, 1711.029259737);\n Log1p log1p0 = new Log1p();\n AllowedSolution allowedSolution0 = AllowedSolution.LEFT_SIDE;\n double double0 = regulaFalsiSolver0.solve(2044, (UnivariateRealFunction) log1p0, (-517.825700479), (double) 0, 1711.029259737, allowedSolution0);\n double double1 = regulaFalsiSolver0.doSolve();\n }",
"public static void main(String[] args) throws FileNotFoundException\n {\n IEnergyModel pot = potNew.multivariateFromExpression(new String[]{\"x\",\"y\"},\n \"1/4 x^4 - 1/2 x^2 + 1/2 y^2\", // function expression\n \"x^3-x\", \"y\"); // derivatives\n // integrator\n IDoubleArray masses = doublesNew.arrayFrom(1.0, 1.0);\n double dt = 0.1, gamma = 1, kT = 0.2;\n IIntegratorThermostatted langevin = dynNew.langevinLeapFrog(pot, masses, 0.1, gamma, kT);\n // run\n IDoubleArray x0 = doublesNew.arrayFrom(0,0);\n int nsteps = 100000, nsave = 10;\n IDataSequence seq = dyn.run(x0, langevin, nsteps, nsave);\n \n // TICA\n int lag = 1;\n TICA tica = new TICA(lag);\n tica.addData(seq);\n tica.computeTransform();\n \n System.out.println(\"mean: \\t\"+doubles.toString(tica.getMeanVector(), \"\\t\"));\n System.out.println(\"cov: \\t\"+doubles.toString(tica.getCovarianceMatrix(), \"\\t\", \"\\n\"));\n System.out.println(\"covTau: \\t\"+doubles.toString(tica.getCovarianceMatrixLagged(), \"\\t\", \"\\n\"));\n System.out.println();\n System.out.println(\"eval: \\t\"+doubles.toString(tica.getEigenvalues(), \"\\t\"));\n System.out.println(\"evec1: \\t\"+doubles.toString(tica.getEigenvector(0), \"\\t\"));\n System.out.println(\"evec2: \\t\"+doubles.toString(tica.getEigenvector(1), \"\\t\"));\n \n tica.setDimension(1);\n IDoubleArray y1 = tica.transform(doublesNew.arrayFrom(2,2));\n System.out.println(\"y1 = \\t\"+doubles.toString(y1, \"\\t\"));\n\n IDoubleArray y2 = tica.transform(doublesNew.arrayFrom(4,4));\n System.out.println(\"y2 = \\t\"+doubles.toString(y2, \"\\t\"));\n }",
"public static void ks2d1s(final double[] x1, final double[] y1,\r\n final Func_Doub_Doub_DoubRef_DoubRef_DoubRef_DoubRef_DoubRef_DoubRef quadvl, \r\n final $double d1, final $double prob) throws NRException {\n int j, n1 = x1.length;\r\n double rr, sqen;\r\n final $double dum = $(0.0), dumm = $(0.0);\r\n final $double r1 = $(0.0);\r\n final $double ga = $(0.0), gb = $(0.0), gc = $(0.0), gd = $(0.0);\r\n final $double fa = $(0.0), fb = $(0.0), fc = $(0.0), fd = $(0.0);\r\n KSdist ks = new KSdist();\r\n d1.$(0.0);\r\n for (j = 0; j < n1; j++) { // Loop over the data points.\r\n quadct(x1[j], y1[j], x1, y1, fa, fb, fc, fd);\r\n quadvl(x1[j], y1[j], ga, gb, gc, gd);\r\n if (fa.$() > ga.$())\r\n fa.$(fa.$() + 1.0 / n1);\r\n if (fb.$() > gb.$())\r\n fb.$(fb.$() + 1.0 / n1);\r\n if (fc.$() > gc.$())\r\n fc.$(fc.$() + 1.0 / n1);\r\n if (fd.$() > gd.$())\r\n fd.$(fd.$() + 1.0 / n1);\r\n d1.$(MAX(d1.$(), abs(fa.$() - ga.$())));\r\n d1.$(MAX(d1.$(), abs(fb.$() - gb.$())));\r\n d1.$(MAX(d1.$(), abs(fc.$() - gc.$())));\r\n d1.$(MAX(d1.$(), abs(fd.$() - gd.$())));\r\n // For both the sample and the model, the distribution is integrated\r\n // in each of four quadrants, and the maximum difference is saved.\r\n }\r\n pearsn(x1, y1, r1, dum, dumm); // Get the linear correlation\r\n // coefficient r1.\r\n sqen = sqrt(Doub(n1));\r\n rr = sqrt(1.0 - r1.$() * r1.$());\r\n // Estimate the probability using the K-S probability function.\r\n prob.$(ks.qks(d1.$() * sqen / (1.0 + rr * (0.25 - 0.75 / sqen))));\r\n }",
"public float gradientMethod(Slice slice) \n\t{\n\t\t//\n\t\t// Intialize variables.\n\t\t//\n\t\tint nrows = slice.getNRows();\n\t\tint ncols = slice.getNCols();\n\n\t\tfloat[] v = new float[nrows*ncols]; int v_numset = 0;\n\t\tfloat t = (float)0.0; \n\t\tfloat sig_y = (float)0.0;\n\t\tfloat sig_x = (float)0.0;\n\n\t\t//\n\t\t// Compute the column gradient\n\t\t//\n\t\tfor(int row=0; row<nrows; row++) {\n\t\t\tfor(int col=1; col<ncols-1; col++) {\n\t\t\t\tt = slice.getData(row,col+1) - (float)2.0 * slice.getData(row,col) + slice.getData(row,col-1);\n\n\t\t\t\tif( t != (float)0.0 || slice.getData(row,col) != (float)0.0 ) {\n\t\t\t\t\tv[v_numset] = t; v_numset++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif( v_numset <= 10 ) {\n\t\t\tsig_y = (float)0.0;\n\t\t}\n\t\telse {\n\t\t\tsig_y = vec_stdDevMod(v, v_numset);\n\t\t}\n\n\t\tv_numset = 0;\n\n\t\t//\n\t\t// Compute the row gradient\n\t\t//\n\t\tfor(int col=0; col<ncols; col++) {\n\t\t\tfor(int row=1; row<nrows-1; row++) {\n\t\t\t\tt = slice.getData(row+1,col) - (float)2.0 * slice.getData(row,col) + slice.getData(row-1,col);\n\n\t\t\t\tif( t != (float)0.0 || slice.getData(row,col) != (float)0.0 ) {\n\t\t\t\t\tv[v_numset] = t; v_numset++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif( v_numset <= 10 ) {\n\t\t\tsig_x = (float)0.0;\n\t\t}\n\t\telse {\n\t\t\tsig_x = vec_stdDevMod(v, v_numset);\n\t\t}\n\n\t\treturn (float)Math.sqrt( (double)(sig_x * sig_x + sig_y * sig_y) ) / (float)2.0;\n\t}",
"public static float calcX(float r1, float r2, float d) {\r\n return (r1*r1 - r2*r2 + d*d) / (2*d);\r\n }",
"public abstract Function derivative();",
"public static void FFT(int dir, int s, double[] x,double[] y) {\n int n, i, i1, j, k, i2, l, l1, l2;\n double c1, c2, tx, ty, t1, t2, u1, u2, z;\n int m = (int) (Math.log(s)/Math.log(2));\n double[] spectrum = new double[s];\n \n /* Calculate the number of points */\n n = 1;\n for (i=0;i<m;i++)\n n *= 2;\n \n /* Do the bit reversal */\n i2 = n >> 1;\n j = 0;\n for (i=0;i<n-1;i++) {\n if (i < j) {\n tx = x[i];\n ty = y[i];\n x[i] = x[j];\n y[i] = y[j];\n x[j] = tx;\n y[j] = ty;\n }\n k = i2;\n while (k <= j) {\n j -= k;\n k >>= 1;\n }\n j += k;\n }\n \n /* Compute the FFT */\n c1 = -1.0;\n c2 = 0.0;\n l2 = 1;\n for (l=0;l<m;l++) {\n l1 = l2;\n l2 <<= 1;\n u1 = 1.0;\n u2 = 0.0;\n for (j=0;j<l1;j++) {\n for (i=j;i<n;i+=l2) {\n i1 = i + l1;\n t1 = u1 * x[i1] - u2 * y[i1];\n t2 = u1 * y[i1] + u2 * x[i1];\n x[i1] = x[i] - t1;\n y[i1] = y[i] - t2;\n x[i] += t1;\n y[i] += t2;\n }\n z = u1 * c1 - u2 * c2;\n u2 = u1 * c2 + u2 * c1;\n u1 = z;\n }\n c2 = Math.sqrt((1.0 - c1) / 2.0);\n if (dir == 1)\n c2 = -c2;\n c1 = Math.sqrt((1.0 + c1) / 2.0);\n }\n \n /* Scaling for forward transform */\n if (dir == 1) {\n for (i=0;i<n;i++) {\n x[i] /= n;\n y[i] /= n;\n \n }\n \n }\n \n }",
"@Override\n\tpublic double calc(double d1, double d2) {\n\t\treturn 0;\n\t}",
"public double get_dFdx( double x )\n {\n if ( domain.contains( (float)x ) )\n {\n double sum = 0.0;\n for ( int i = parameters.length - 2; i >= 0; i-- )\n sum = x * sum + (i+1) * parameters[i+1];\n return sum;\n }\n else\n return 0;\n }",
"public void calculateCoefficients(){\n\t\tdlt2d = null;\t//Get rid of existing calibration\n\t\tdouble[][] global = new double[calibrationFrame.data.size()-1][2]; //Global coordinates of the calibration object\n\t\tdouble[][] digitizedPoints = new double[calibrationFrame.data.size()-1][2];\n\t\t/*Copy the calibration object*/\n\t\tfor (int r = 0; r< calibrationFrame.data.size()-1;++r){\n\t\t\tfor (int c = 0; c<2;++c){\n\t\t\t\tSystem.out.println(calibrationFrame.data.get(r+1).get(c+1));\n\t\t\t\tglobal[r][c] = Double.parseDouble(calibrationFrame.data.get(r+1).get(c+1));\n\t\t\t}\n\t\t}\n\t\t/*Copy the calibration points*/\n\t\tfor (int r = 0; r< digitizedPoints.length;++r){\n\t\t\tfor (int c = 0; c< digitizedPoints[r].length;++c){\n\t\t\t\tdigitizedPoints[r][c] = (double) digitizedCalibration[r][c];\n\t\t\t}\n\t\t}\n\n\t\tdigitizedCalibration = null;\n\t\tdlt2d = new DLT2D(global,digitizedPoints);\n\t\t/*Print coefficients...*/\n\t\tMatrix coeffs = dlt2d.getCurrentDltCoefficients();\n\t\tString resultString = \"Coefficients\\n\";\n\t\tfor (int i = 0; i< coeffs.getRowDimension();++i){\n\t\t\tresultString += \"\\tCoeff \"+i+\": \"+Double.toString(coeffs.get(i,0))+\"\\n\";\n\t\t}\n\t\tSystem.out.println(resultString);\t\t\n\t\tstatus.setText(new String(\"2D DLT coefficients\"));\n\t\t/*Create text pane for coordinates*/\n\t\tpointFrame = new SaveableFrame(this);\n\t\tpointFrame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n\t\tpointFrame.pack();\n\t\tpointFrame.setLocation(10, 600);\n\t\tpointFrame.setVisible(true);\t\n\t\t\n\t\t\n\t}",
"public void visitD2L(D2L o){\n\t\tif (stack().peek() != Type.DOUBLE){\n\t\t\tconstraintViolated(o, \"The value at the stack top is not of type 'double', but of type '\"+stack().peek()+\"'.\");\n\t\t}\n\t}",
"public RealValuedFunctTwoOps deriv11() {\n\treturn new RealValuedFunctTwoOps() {\n\t public double valueAt(double x, double y) {\n\t\treturn RealValuedFunctionTwo.this.deriv11At(x, y);\n\t }\n\t};\n }",
"public void polyDiff() {\n this.polySolve();\n int dd2 = 0, dd3 = 0;\n String d1 = \"\", d2 = \"\", d3 = \"\";\n this.da = 3 * this.a;\n this.db = 2 * this.b;\n this.dc = this.c;\n if (this.degree == 3) {\n d1 = \"dy/dx = \" + this.da + \"x^2 \";\n if (this.b == 0) {\n dd2 = 1;\n } else {\n if (this.db > 0) {\n d2 = \"+ \" + this.db + \"x \";\n } else {\n d2 = \"- \" + -this.db + \"x \";\n }\n }\n if (this.c == 0) {\n dd3 = 1;\n } else {\n if (this.dc > 0) {\n d3 = \"+ \" + this.dc;\n } else {\n d3 = \"- \" + -this.dc;\n }\n }\n if (dd2 == 0 && dd3 == 0) {\n this.diff = d1 + d2 + d3;\n }\n if (dd2 == 0 && dd3 == 1) {\n this.diff = d1 + d2;\n }\n if (dd2 == 1 && dd3 == 1) {\n this.diff = d1;\n }\n if (dd2 == 1 && dd3 == 0) {\n this.diff = d1 + d3;\n }\n\n }\n if (this.degree == 2) {\n d1 = \"dy/dx = \" + this.db + \"x \";\n if (this.dc == 0) {\n this.diff = d1;\n } else {\n if (this.dc > 0) {\n this.diff = d1 + \"+\" + this.dc;\n } else {\n this.diff = d1 + \"-\" + -this.dc;\n }\n }\n }\n if (this.degree == 1) {\n this.diff = \"dy/dx = \" + this.c;\n }\n if (this.degree == 0) {\n this.diff = \"dy/dx = \" + 0;\n }\n\n }",
"public void subDif() {\n this.polySubSolve();\n int dd2 = 0, dd3 = 0;\n String d1 = \"\", d2 = \"\", d3 = \"\";\n this.das = 3 * this.asub;\n this.dbs = 2 * this.bsub;\n this.dcs = this.csub;\n if (this.subdegree == 3) {\n d1 = \"dy/dx = \" + this.das + \"x^2 \";\n if (this.bsub == 0) {\n dd2 = 1;\n } else {\n if (this.dbs > 0) {\n d2 = \"+ \" + this.dbs + \"x \";\n } else {\n d2 = \"- \" + -this.dbs + \"x \";\n }\n }\n if (this.csub == 0) {\n dd3 = 1;\n } else {\n if (this.dcs > 0) {\n d3 = \"+ \" + this.dcs;\n } else {\n d3 = \"- \" + -this.dcs;\n }\n }\n if (dd2 == 0 && dd3 == 0) {\n this.subdiff = d1 + d2 + d3;\n }\n if (dd2 == 0 && dd3 == 1) {\n this.subdiff = d1 + d2;\n }\n if (dd2 == 1 && dd3 == 1) {\n this.subdiff = d1;\n }\n if (dd2 == 1 && dd3 == 0) {\n this.subdiff = d1 + d3;\n }\n\n }\n if (this.subdegree == 2) {\n d1 = \"dy/dx = \" + this.dbs + \"x \";\n if (this.dcs == 0) {\n this.subdiff = d1;\n } else {\n if (this.dcs > 0) {\n this.subdiff = d1 + \"+\" + this.dcs;\n } else {\n this.subdiff = d1 + \"-\" + -this.dcs;\n }\n }\n }\n if (this.subdegree == 1) {\n this.subdiff = \"dy/dx = \" + this.csub;\n }\n if (this.subdegree == 0) {\n this.subdiff = \"dy/dx = \" + 0;\n }\n\n }",
"private void calcDVOWDNa(\n final Line line1,\n final Line line2,\n final Point point1,\n final Point point2) {\n\n\n double average_x = (point1.x + point2.x) / 2.0;\n\n this.p1 = new Point(\n (point1.x + average_x) / 2.0,\n line1.a * (point1.x + average_x) / 2.0 + line1.b);\n\n this.p3 = new Point(\n (point2.x + average_x) / 2.0,\n line2.a * (point2.x + average_x) / 2.0 + line2.b);\n\n Line median = Line.fromPoints(p1, p3);\n this.p2 = new Point(average_x, median.eval(average_x));\n\n assert p3.y <= Math.max(point2.y, point1.y);\n assert p1.y <= Math.max(point2.y, point1.y);\n assert p3.y >= Math.min(point2.y, point1.y);\n assert p1.y >= Math.min(point2.y, point1.y);\n\n this.type = Type.bernstein;\n this.p0 = new Point(point1);\n this.p4 = new Point(point2);\n\n //return(f);\n }",
"public void StandardDeviationPair(){\r\n\t\tAveragePair();\r\n\t\tif (count<=1|| Total<=0){\r\n\t\t\tSystem.out.println(\"The Standard Deviation of x and y is \"+0.0);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tStandardDeviation=(float)Math.sqrt((Total2-Total*Total/count)/(count-1));\r\n\t\t\tStandardDeviationY=(float)Math.sqrt((TotalY2-TotalY*TotalY/count)/(count-1));\r\n\t\t\t\r\n\t\t}\r\n\t}",
"void init(FieldODEStateAndDerivative<T> s0, T t);",
"public void SvdDecomposition() {\n\n\t\tSingularValueDecomposition s = A.svd();\n\n\t\tU = s.getU();\n\t\t//System.out.print(\"U = \");\n\t\t//U.print(pi, pf); //for debug\n\n\t\tD = s.getS();\n\t\t//System.out.print(\"S = \");\n\t\t//D.print(pi, pf); //for debug\n\n\t\tV = s.getV();\n\t\t//System.out.print(\"V = \");\n\t\t//V.print(pi, pf); //for debug\n\t}",
"public void determined0d1() {\n\n\t\tint upperBound = (int) (Math.log(this.numNVertices + this.numWVertices)); // pg 184 in paper\n\n\t\tthis.d0 = upperBound / 2;\n\t\tthis.d1 = upperBound;\n\n\t}",
"private void instantiateVarsDouble(IntVar var1, int coeff1, IntVar var2, int coeff2, int constant, Propagator prop) throws ContradictionException {\n this.instantiateSecondVar(var1, coeff1, var2, coeff2, constant, prop);\n this.instantiateSecondVar(var2, coeff2, var1, coeff1, constant, prop);\n }",
"private boolean isDFltdFMin()\n {\n double fLow = (x2.getF(0) < x1.getF(0)) ? x2.getF(0) : x1.getF(0);\n double dF = Math.abs(fLowBor-fLow);\n return (dF < dFMin) ? true : false;\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 }",
"public double[] getDs() {\n\t\treturn this.ds;\n\t}",
"public Double getDx();",
"private double calculateYDerivative(double x, double y, double r, double r2, double phi, double deltaPhi)\n\t{\n\t\treturn 2*((-a*b*Math.exp(b*(deltaPhi+phi))*x)/r2 + y/r) * (-a*Math.exp(b*(deltaPhi+phi)) + r);\n\t}",
"private static Vector3f[] calculatePositionDifferences(Drone drone, Vector3f[] newVelocities, float dt) {\r\n\r\n\t\t\r\n\t\t// calculate the average linear velocity\r\n\t\tVector3f avgLinearVelocityW = average(drone.getLinearVelocity(), newVelocities[0]);\r\n\r\n\t\t// calculate the translation\r\n\t\tVector3f deltaPositionW = (Vector3f) avgLinearVelocityW.scale(dt);\r\n\r\n\t\t// calculate the average angular velocity\r\n\t\tVector3f avgAngularVelocityW = average(drone.getAngularVelocity(), newVelocities[1]);\r\n\r\n\t\t// calculate the rotation\r\n\t\tVector3f deltarotationW = ((Vector3f) avgAngularVelocityW.scale(dt));\r\n\r\n\t\treturn new Vector3f[] { deltaPositionW, deltarotationW };\r\n\t}",
"private double formatDoubleWithTwoDeci(double value) {\r\n \treturn Math.floor(value*1e2)/1e2;\r\n }",
"public double deriv11At(double arg1, double arg2) throws\n\tIllegalArgumentException, UnsupportedOperationException,\n\tIllegalStateException\n {\n\tif (function11 != null) {\n\t return function11.valueAt(arg1, arg2);\n\t}\n\tif (context == null && object == null)\n\t throw new UnsupportedOperationException\n\t\t(errorMsg(\"functionNotSupported\"));\n\ttry {\n\t if (object != null && object instanceof RealValuedFunctionTwo) {\n\t\tRealValuedFunctionTwo f = (RealValuedFunctionTwo)object;\n\t\treturn f.deriv11At(arg1, arg2);\n\t }\n\t if (context == null) throw new UnsupportedOperationException\n\t\t\t\t (errorMsg(\"functionNotSupported\"));\n\t Object result;\n\t if (f11name != null) {\n\t\tresult = context.callScriptFunction(f11name, arg1, arg2);\n\t } else {\n\t\tif (object == null) throw new UnsupportedOperationException\n\t\t\t\t\t(errorMsg(\"functionNotSupported\"));\n\t\tresult = context.callScriptMethod(object, \"deriv11At\",\n\t\t\t\t\t\t arg1, arg2);\n\t }\n\t if (result instanceof Number) {\n\t\treturn ((Number) result).doubleValue();\n\t } else {\n\t\tthrow new UnsupportedOperationException\n\t\t (errorMsg(\"numberNotReturned\"));\n\t }\n\t} catch (ScriptException e) {\n\t String msg = errorMsg(\"callFailsArg2\", arg1, arg2);\n\t throw new IllegalArgumentException(msg, e);\n\t} catch (NoSuchMethodException e) {\n\t String msg = errorMsg(\"opNotSupported\");\n\t throw new UnsupportedOperationException(msg, e);\n\t}\n }",
"public static void prepareDataForDfe(\n final double[][] data, final int sizeTimeseries, final int numTimeseries,\n final double[] precalculations, final double[] dataPairs) {\n final int numTimesteps = sizeTimeseries;\n final double windowSize = (double) sizeTimeseries;\n\n if (numTimeseries > CORRELATION_MAX_NUM_TIMESERIES) {\n System.out.println(\"Number of Time series should be less or equal to \"\n + CORRELATION_MAX_NUM_TIMESERIES + \". Terminating!\");\n System.exit(-1);\n }\n\n if (windowSize < 2) {\n System.out.println(\n \"Window size must be equal or greater than 2. Terminating!\");\n System.exit(-1);\n }\n\n if (numTimesteps > sizeTimeseries) {\n System.out.println(\n \"Number of Time steps should be less or equal to\"\n + \" size of Time series. Terminating!\");\n System.exit(-1);\n }\n\n double oldVal;\n double newVal;\n double[][] sums = new double[numTimesteps][numTimeseries];\n double[][] sumsSq = new double[numTimesteps][numTimeseries];\n double[][] inv = new double[numTimesteps][numTimeseries];\n\n // 2 DFE input streams: precalculations and data pairs\n for (int i = 0; i < numTimesteps; i++) {\n for (int j = 0; j < numTimeseries; j++) {\n oldVal = 0;\n if (i > windowSize) {\n oldVal = data[j][i - (int) windowSize];\n }\n newVal = data[j][i];\n\n if (i == 0) {\n sums[i][j] = newVal;\n sumsSq[i][j] = newVal * newVal;\n } else {\n sums[i][j] = sums[i - 1][j] + newVal - oldVal;\n sumsSq[i][j] = sumsSq[i - 1][j] + newVal * newVal - oldVal * oldVal;\n }\n\n inv[i][j] = 1 / Math.sqrt((int) windowSize * sumsSq[i][j]\n - sums[i][j] * sums[i][j]);\n\n //Precalculations REORDERED in DFE ORDER\n precalculations[2 * i * numTimeseries + 2 * j] = sums[i][j];\n precalculations[2 * i * numTimeseries + 2 * j + 1] = inv[i][j];\n\n //Data pairs REORDERED in DFE ORDER\n dataPairs[2 * i * numTimeseries + 2 * j] = newVal;\n dataPairs[2 * i * numTimeseries + 2 * j + 1] = oldVal;\n }\n }\n }",
"private void setupFitter() throws FittingException {\n mFitter.setFunctionEvaluator(\n new LevenbergMarquardtMultiDimensionFunctionEvaluator() {\n @Override\n public int getNumberOfDimensions() {\n return NonLinearLeastSquaresLaterationSolver.this.getNumberOfDimensions();\n }\n\n @Override\n public double[] createInitialParametersArray() {\n final int dims = getNumberOfDimensions();\n final double[] initial = new double[dims];\n\n if (mInitialPosition == null) {\n //use centroid of positions as initial value\n final int numSamples = mPositions.length;\n\n for (int i = 0; i < dims; i++) {\n initial[i] = 0.0;\n for (final P position : mPositions) {\n initial[i] += position.getInhomogeneousCoordinate(i) / (double) numSamples;\n }\n }\n } else {\n //use provided initial position\n for (int i = 0; i < dims; i++) {\n initial[i] = mInitialPosition.getInhomogeneousCoordinate(i);\n }\n }\n\n return initial;\n }\n\n @Override\n public double evaluate(\n final int i, final double[] point, final double[] params,\n final double[] derivatives) {\n //we want to estimate the position contained as inhomogeneous coordinates in params array.\n //the function evaluates the distance to provided point respect to current parameter\n // (estimated position)\n //sqrDist = (x - px)^2 + (y - py)^2\n //grad = [2*(x - px), 2*(y - py)]\n final int dims = getNumberOfDimensions();\n double result = 0.0;\n double diff;\n double param;\n for (int j = 0; j < dims; j++) {\n param = params[j];\n diff = param - point[j];\n result += diff * diff;\n derivatives[j] = 2.0 * diff;\n }\n\n return result;\n }\n });\n\n final int dims = getNumberOfDimensions();\n double dist;\n\n try {\n final Matrix x = new Matrix(mPositions.length, dims);\n final double[] y = new double[mPositions.length];\n for (int i = 0; i < mPositions.length; i++) {\n for (int j = 0; j < dims; j++) {\n x.setElementAt(i, j, mPositions[i].getInhomogeneousCoordinate(j));\n }\n\n dist = mDistances[i];\n y[i] = dist * dist;\n }\n\n mFitter.setInputData(x, y, mDistanceStandardDeviations);\n } catch (final AlgebraException ignore) {\n //never happens\n }\n }",
"public void initColorGradients(GeneExpressionMatrix expression_ds1, GeneExpressionMatrix expression_ds2) {\r\n\r\n\t\tminExpression_ds1 = expression_ds1.getMinExpression();\r\n\t\tmaxExpression_ds1 = expression_ds1.getMaxExpression();\r\n\t\tclosestToZeroExpression_ds1 = expression_ds1.getClosesttoZero();\r\n\t\tminExpression_rownorm_ds1 = expression_ds1.getMinExpression(expression_ds1.getExpressionMatrix_rowNormalized());\r\n\t\tmaxExpression_rownorm_ds1 = expression_ds1.getMaxExpression(expression_ds1.getExpressionMatrix_rowNormalized());\r\n\r\n\t\tdouble max = Math.max(Math.abs(minExpression_ds1), maxExpression_ds1);\r\n\r\n\t\tdouble median = 0;\r\n\r\n\t\t//if the minimum expression is above zero make it a one colour heatmap\r\n\t\tif(minExpression_ds1 >= 0) {\r\n\t\t\trange_ds1 = ColorGradientRange.getInstance(0, max / 2, max / 2, max, 0, max / 2, max / 2, max);\r\n\t\t\ttheme_ds1 = ColorGradientTheme.GREEN_ONECOLOR_GRADIENT_THEME;\r\n\t\t} else {\r\n\t\t\trange_ds1 = ColorGradientRange.getInstance(-max, median, median, max, -max, median, median, max);\r\n\t\t\ttheme_ds1 = ColorGradientTheme.GREEN_MAGENTA_GRADIENT_THEME;\r\n\t\t}\r\n\r\n\t\t//Do the same for dataset 2\r\n\t\tminExpression_ds2 = expression_ds2.getMinExpression();\r\n\t\tmaxExpression_ds2 = expression_ds2.getMaxExpression();\r\n\t\tclosestToZeroExpression_ds2 = expression_ds2.getClosesttoZero();\r\n\t\tminExpression_rownorm_ds2 = expression_ds2.getMinExpression(expression_ds2.getExpressionMatrix_rowNormalized());\r\n\t\tmaxExpression_rownorm_ds2 = expression_ds2.getMaxExpression(expression_ds2.getExpressionMatrix_rowNormalized());\r\n\r\n\t\tmax = Math.max(Math.abs(minExpression_ds2), maxExpression_ds2);\r\n\r\n\t\tmedian = 0;\r\n\r\n\t\t//if the minimum expression is above zero make it a one colour heatmap\r\n\t\tif(minExpression_ds2 >= 0) {\r\n\t\t\trange_ds2 = ColorGradientRange.getInstance(0, max / 2, max / 2, max, 0, max / 2, max / 2, max);\r\n\t\t\ttheme_ds2 = ColorGradientTheme.GREEN_ONECOLOR_GRADIENT_THEME;\r\n\t\t} else {\r\n\t\t\trange_ds2 = ColorGradientRange.getInstance(-max, median, median, max, -max, median, median, max);\r\n\t\t\ttheme_ds2 = ColorGradientTheme.GREEN_MAGENTA_GRADIENT_THEME;\r\n\t\t}\r\n\r\n\t}",
"static public double[][] DersBasisFuns(double u, int n, int span, int deg,\n\t\t\tdouble[] U) {\n\t\tdouble[][] ders = new double[n + 1][deg + 1];\n\n\t\tdouble[] left = new double[deg + 1];\n\t\tdouble[] right = new double[deg + 1];\n\t\tdouble[][] ndu = new double[deg + 1][deg + 1];\n\t\tdouble saved, temp;\n\t\tint j, r;\n\n\t\tndu[0][0] = 1.0;\n\t\tfor (j = 1; j <= deg; j++) {\n\t\t\tleft[j] = u - U[span + 1 - j];\n\t\t\tright[j] = U[span + j] - u;\n\t\t\tsaved = 0.0;\n\t\t\tfor (r = 0; r < j; r++) {\n\t\t\t\t// Lower triangle\n\t\t\t\tndu[j][r] = right[r + 1] + left[j - r];\n\t\t\t\ttemp = ndu[r][j - 1] / ndu[j][r];\n\t\t\t\t// Upper triangle\n\t\t\t\tndu[r][j] = saved + right[r + 1] * temp;\n\t\t\t\tsaved = left[j - r] * temp;\n\t\t\t}\n\t\t\tndu[j][j] = saved;\n\t\t}\n\n\t\t// load the basis functions\n\t\tfor (j = 0; j <= deg; j++) {\n\t\t\tders[0][j] = ndu[j][deg];\n\t\t}\n\n\t\t// compute the derivatives, Eq.[2.9] the NURBS Book\n\t\tdouble[][] a = new double[2][deg + 1];\n\t\tfor (r = 0; r <= deg; r++) { // loop over function index\n\t\t\tint s1, s2;\n\t\t\ts1 = 0;\n\t\t\ts2 = 1;\n\t\t\ta[0][0] = 1.0;\n\t\t\t// compute the kth derivative\n\t\t\tfor (int k = 1; k <= n; k++) {\n\t\t\t\tdouble d;\n\t\t\t\tint rk, pk, j1, j2;\n\n\t\t\t\td = 0.0;\n\t\t\t\trk = r - k;\n\t\t\t\tpk = deg - k;\n\t\t\t\tif (r >= k) {\n\t\t\t\t\ta[s2][0] = a[s1][0] / ndu[pk + 1][rk];\n\t\t\t\t\td = a[s2][0] * ndu[rk][pk];\n\t\t\t\t}\n\n\t\t\t\tif (rk >= -1) {\n\t\t\t\t\tj1 = 1;\n\t\t\t\t} else {\n\t\t\t\t\tj1 = -rk;\n\t\t\t\t}\n\t\t\t\tif (r - 1 <= pk) {\n\t\t\t\t\tj2 = k - 1;\n\t\t\t\t} else {\n\t\t\t\t\tj2 = deg - r;\n\t\t\t\t}\n\n\t\t\t\tfor (j = j1; j <= j2; j++) {\n\t\t\t\t\ta[s2][j] = (a[s1][j] - a[s1][j - 1]) / ndu[pk + 1][rk + j];\n\t\t\t\t\td += a[s2][j] * ndu[rk + j][pk];\n\t\t\t\t}\n\t\t\t\tif (r <= pk) {\n\t\t\t\t\ta[s2][k] = -a[s1][k - 1] / ndu[pk + 1][r];\n\t\t\t\t\td += a[s2][j] * ndu[r][pk];\n\t\t\t\t}\n\t\t\t\tders[k][r] = d;\n\t\t\t\tj = s1;\n\t\t\t\ts1 = s2;\n\t\t\t\ts2 = j; // switch rows\n\t\t\t}\n\t\t}\n\t\t// Multiply through by the correct factors\n\t\t// Eq [2.9] of the NURBS Book\n\t\tr = deg;\n\t\tfor (int k = 1; k <= n; k++) {\n\t\t\tfor (j = 0; j <= deg; j++)\n\t\t\t\tders[k][j] *= r;\n\t\t\tr *= (deg - k);\n\t\t}\n\t\treturn ders;\n\t}",
"public double[] monteCarloStandardDeviations(){\n if(!this.monteCarloDone)this.monteCarlo();\n return this.randomEigenValuesSDs;\n }",
"public Vector3D[] deriv(Vector3D[] y, Vector3D acceleration, double dt) {\n Vector3D[] doty = new Vector3D[2];\n doty[0] = y[1].scale(dt);\n doty[1] = acceleration.scale(dt);\n return doty;\n }",
"public void setData(final List<Double> second) {\n this.data = second;\n }",
"public void dorcsd2by1_(CHARACTER JOBU1,CHARACTER JOBU2,CHARACTER JOBV1T,INTEGER M,INTEGER P,INTEGER Q,double[] X11,INTEGER LDX11,double[] X21,INTEGER LDX21,double[] THETA,double[] U1,INTEGER LDU1,double[] U2,INTEGER LDU2,double[] V1T,INTEGER LDV1T,double[] WORK,INTEGER LWORK,int[] IWORK,INTEGER INFO);",
"public static double normal2DDist(double x, double y, double meanX,\n\t\t\tdouble meanY, double sDeviationX, double sDeviationY, double cc) {\n\n\t\tdouble term1 = (0.5 / (Math.PI * sDeviationX * sDeviationY * Math\n\t\t\t\t.sqrt(1 - Math.pow(cc, 2))));\n\n\t\tdouble term2 = -1 / (2 * (1 - Math.pow(cc, 2)));\n\t\tdouble term3 = (x - meanX) / sDeviationX;\n\t\tdouble term4 = (y - meanY) / sDeviationY;\n\n\t\treturn term1\n\t\t\t\t* Math.exp(term2\n\t\t\t\t\t\t* (Math.pow(term3, 2) - (2 * cc * term3 * term4) + Math\n\t\t\t\t\t\t\t\t.pow(term4, 2)));\n\t}",
"public abstract double covariance(double x1, double x2);",
"private Double calculateLGD(List<LossGivenDefault> lgds) {\r\n\t\t\r\n\t\tfor (LossGivenDefault lgd: lgds) {\r\n\t\t\treturn lgd.getLoss(); \r\n\t\t}\r\n\t\t\r\n\t\t// TODO Warn lgdDate beyond end of lgd curve\r\n\t\treturn 0d;\r\n\t}",
"public static void main(String[] args)\n {\n OneVarParameterizedFunction polynomial; \n\n double coef[] = { 1, 2, 3, 4 };\n polynomial = new Polynomial( coef );\n\n String par_name[] = polynomial.getParameterNames();\n\n System.out.println( \"Polynomial: \" );\n for ( int i = 0; i < par_name.length; i++ )\n System.out.println(par_name[i] + \" = \" + coef[i] );\n\n double x;\n for ( int i = 0; i <= 10; i++ )\n {\n x = i;\n System.out.println( \"x = \" + x + \n \", p(x) = \" + polynomial.getValue(x) +\n \", p'(x) = \" + polynomial.get_dFdx(x) +\n \", fp'(x) = \" + polynomial.get_dFdx((float)x) );\n }\n\n x = 3;\n double derivs[] = polynomial.get_dFda( x );\n System.out.println( \"At \" + x + \n \", the derivatives relative to the coeffs are:\");\n for ( int i = 0; i < par_name.length; i++ )\n System.out.println(\"deriv WRT \" + par_name[i] + \" = \" + derivs[i]);\n\n/*\n \n DataSet ds = new DataSet( \"Sample Polynomials\", \"Initial Version\" );\n\n XScale x_scale = new UniformXScale( -5, 5, 500 );\n Data polynomial_data; \n for ( int i = 0; i < 100; i++ )\n {\n double a = -5+i/10.0f;\n double coefficients[] = { a*a, -2*a, 1 };\n polynomial = new Polynomial( coefficients );\n polynomial_data = new FunctionModel( x_scale, polynomial, i );\n ds.addData_entry( polynomial_data );\n }\n ViewManager vm = new ViewManager( ds, IViewManager.IMAGE );\n*/\n }",
"public final void setD2neerslag(java.math.BigDecimal d2neerslag)\n\t{\n\t\tsetD2neerslag(getContext(), d2neerslag);\n\t}",
"protected abstract double getRefinementStandardDeviation();",
"public NNMatrix sigmoidDerivative() {\n final double data[] = getData();\n double s, x;\n for (int i = 0; i < data.length; i++) {\n x = data[i];\n // sigmoid function\n s = 1 / (1 + Math.exp(-x));\n // sigmoid derivative\n data[i] = s * (1 - s);\n }\n\n return new NNMatrix(numRows(), numCols(), data);\n }",
"public static double derivada(double x, double y)\n {\n // reemplazar esto, con la funcion que me toque \n return x * Math.sqrt(1 + y*y);\n }",
"public void dorcsd_(CHARACTER JOBU1,CHARACTER JOBU2,CHARACTER JOBV1T,CHARACTER JOBV2T,CHARACTER TRANS,CHARACTER SIGNS,INTEGER M,INTEGER P,INTEGER Q,double[] X11,INTEGER LDX11,double[] X12,INTEGER LDX12,double[] X21,INTEGER LDX21,double[] X22,INTEGER LDX22,double[] THETA,double[] U1,INTEGER LDU1,double[] U2,INTEGER LDU2,double[] V1T,INTEGER LDV1T,double[] V2T,INTEGER LDV2T,double[] WORK,INTEGER LWORK,int[] IWORK,INTEGER INFO);",
"private double[] getOutputWeightDerivs () {\n\t\tdouble[] weightDerivs = new double[synapses[1][0].length];\n\n\t\tfor (int i = 0; i < weightDerivs.length; i++) {\n\t\t\tweightDerivs[i] = getOutputSumDerivForWeights()[i] * getOutputResultDeriv();\n\t\t}\n\t\treturn weightDerivs;\n\t}",
"public double getLogProbabilityDerivativeSum(double[][] logProbabilityDerivatives){\n\n\t\tint xLength = logProbabilityDerivatives.length;\n\t\tint yLength = logProbabilityDerivatives[0].length;\n\t\tdouble sum = 0.0;\n\t\tfor(int i = 0; i < xLength; i++){\n\t\t\tfor(int j = 0; j < yLength; j++){\n\t\t\t\tsum += logProbabilityDerivatives[i][j];\n\t\t\t}\n\t\t}\n\n\t\treturn sum;\n\t}",
"@Test\n\tpublic void multipleCalls() {\n\t\tDenseMatrix64F H = MultiViewOps.createHomography(R, T, d, N);\n\n\t\tDecomposeHomography alg = new DecomposeHomography();\n\t\t// call it twice and see if things break\n\t\talg.decompose(H);\n\t\talg.decompose(H);\n\n\t\tList<Se3_F64> foundSE = alg.getSolutionsSE();\n\t\tList<Vector3D_F64> foundN = alg.getSolutionsN();\n\n\t\tTestDecomposeEssential.checkUnique(foundSE);\n\t\tcheckHasOriginal(foundSE,foundN,R,T,d,N);\n\t}",
"public void diff(double[][] df, double[][] f, int dim)\r\n {\n \r\n if(dim == 1) {\r\n for(int i=0; i<pixelsWide-1; i++) {\r\n for(int j=0; j<pixelsHigh; j++) {\r\n df[i][j] = f[i+1][j] - f[i][j];\r\n }\r\n }\r\n } else {\r\n for(int i=0; i<pixelsWide; i++) {\r\n for(int j=0; j<pixelsHigh-1; j++) {\r\n df[i][j] = f[i][j+1] - f[i][j];\r\n }\r\n }\r\n }\r\n \r\n }",
"public double[] factorPointVolatility (\n\t\tfinal int iXDate,\n\t\tfinal int iYDate)\n\t{\n\t\tint iNumFactor = _pfsg.numFactor();\n\n\t\tdouble[][] aadblFactor = _pfsg.factors();\n\n\t\tint iNumVariate = aadblFactor[0].length;\n\t\tdouble[] adblVariateVolatility = new double[iNumVariate];\n\t\tdouble[] adblFactorPointVolatility = new double[iNumFactor];\n\n\t\tfor (int iVariateIndex = 0; iVariateIndex < iNumVariate; ++iVariateIndex) {\n\t\t\ttry {\n\t\t\t\tadblVariateVolatility[iVariateIndex] = _aMSVolatility[iVariateIndex].node (iXDate, iYDate);\n\t\t\t} catch (java.lang.Exception e) {\n\t\t\t\te.printStackTrace();\n\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\n\t\tfor (int iFactorIndex = 0; iFactorIndex < iNumFactor; ++iFactorIndex) {\n\t\t\tadblFactorPointVolatility[iFactorIndex] = 0.;\n\t\t\tdouble[] adblFactor = aadblFactor[iFactorIndex];\n\n\t\t\tfor (int iVariateIndex = 0; iVariateIndex < iNumVariate; ++iVariateIndex)\n\t\t\t\tadblFactorPointVolatility[iFactorIndex] += adblFactor[iVariateIndex] *\n\t\t\t\t\tadblVariateVolatility[iVariateIndex];\n\t\t}\n\n\t\treturn adblFactorPointVolatility;\n\t}",
"private double [] secondGradBeta(ArrayList<Kernel<T>> kernels, ArrayList<Double> weights, List<TrainingSample<T>> l)\n\t{\n\t\tdouble grad[] = new double[kernels.size()];\n\t\t\n\t\t//doing <L, Dn.^2>\n\t\tfor(int i = 0 ; i < kernels.size(); i++)\n\t\t{\n\t\t\tdouble matrix[][] = kernels.get(i).getKernelMatrix(l);\n\t\t\tfor(int x = 0 ; x < matrix.length; x++)\n\t\t\t{\n\t\t\t\tfor(int y = x ; y < matrix.length; y++)\n\t\t\t\t{\n\t\t\t\t\tif(matrix[x][y] == 0)\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tdouble d = Math.log(matrix[x][y]);\n\t\t\t\t\tgrad[i] += d * d * lambda_matrix[x][y];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(int i = 0 ; i < grad.length; i++)\n\t\t\tif(grad[i] < num_cleaning)\n\t\t\t\tgrad[i] = 0.0;\n\t\t\n\t\teprintln(4, \"++++++ secondGradDir : \"+Arrays.toString(grad));\n\t\t\n\t\treturn grad;\n\t}",
"private static TaggedFormation _xofy(Formation x, TaggedFormation y) {\n /* create an instance of 'y' for each dancer in 'x'. */\n Map<Dancer,Formation> sub = new LinkedHashMap<Dancer,Formation>();\n MultiMap<Dancer,Tag> tags = new GenericMultiMap<Dancer,Tag>\n (Factories.enumSetFactory(Tag.class));\n for (Dancer d: x.dancers()) {\n Map<Dancer,Position> m = new LinkedHashMap<Dancer,Position>();\n for (Dancer dd : y.dancers()) {\n Dancer phantom = new PhantomDancer();\n m.put(phantom, y.location(dd));\n tags.addAll(phantom, y.tags(dd));\n }\n sub.put(d, new Formation(m));\n }\n Formation result = Breather.insert(x,sub);\n // Transfer tags from formation y.\n return new TaggedFormation(result, tags);\n }",
"static double dEgs_fcchcp(double dens) {\n\t\tdouble A12, A6, Uhcp, Ufcc;\n\t\t\n\t\t/* unit of distance is the 1st NN seperation */\n\t\tA12 = 12.132293768711; A6 = 14.454897093822;\n\t\tUhcp = 2.0*( Math.pow(dens,4.0)*A12 - Math.pow(dens,2.0)*A6 );\n\t\t\n\t\tA12 = 12.131880196191; A6 = 14.453920885450;\n\t\tUfcc = 2.0*( Math.pow(dens,4.0)*A12 - Math.pow(dens,2.0)*A6 );\n\t\t\n\t\treturn(Ufcc-Uhcp);\n\t}",
"public Object[] plotDS(Object... rhs) throws RemoteException;",
"@Override\r\n\tpublic double derivativeOf(double x) {\r\n\t\treturn ( 1 / (x - this.getLower_bound()) ) + ( 1 / (this.getUpper_bound() - x) ); \r\n\t}",
"@Test\n\tpublic void testDFnumber(){\n\t\tdouble d1 = 0.05;\n\t\tdouble d2 = 0.01;\n\t\tSystem.out.println(d1+d2);\n System.out.println(1.0-0.42);\n System.out.println(4.015*100);\n System.out.println(123.3/100);\n\t}",
"final double ssfn(double phi, double sinphi) {\r\n sinphi *= excentricity;\r\n return tan(PI/4 + phi/2.0) * pow((1-sinphi) / (1+sinphi), excentricity/2.0);\r\n }",
"public void MutationDNF (TableVar Variables) {\r\n\r\n int posiciones, interv, i, j, l, h, eliminar;\r\n float m;\r\n \r\n posiciones = Variables.getNVars()*long_poblacion;\r\n \r\n if (mut_prob > 0)\r\n while (Mu_next < posiciones) {\r\n // Determine the chromosome and gene to be muted\r\n i = Mu_next/Variables.getNVars();\r\n j = Mu_next%Variables.getNVars();\r\n \r\n // Copy the chromosome\r\n for (h=0; h<Variables.getNVars(); h++) {\r\n for (l=0; l<=Variables.getNLabelVar(h); l++)\r\n Des.setCromElemGene(descendientes, h, l, Inter.getCromElemGene(i,h,l));\r\n }\r\n \r\n // Make the mutation\r\n // Half the mutations eliminates the variable from the rule\r\n // The others sets a random value (including the elimination)\r\n eliminar = Randomize.Randint (0,10);\r\n if (eliminar <=5){\r\n for (l=0; l<=Variables.getNLabelVar(j); l++)\r\n Des.setCromElemGene(descendientes, j, l, 0);\r\n }\r\n else {\r\n interv = 0;\r\n for (l=0; l<Variables.getNLabelVar(j); l++) {\r\n Des.setCromElemGene(descendientes, j, l, Randomize.Randint(0,1));\r\n if (Des.getCromElemGene(descendientes, j, l)==1)\r\n interv ++;\r\n }\r\n // si no interviene ningún valor o intervienen todos, la variable no interviene\r\n if (interv==0 || interv==Variables.getNLabelVar(j))\r\n Des.setCromElemGene(descendientes, j, Variables.getNLabelVar(j), 0);\r\n else\r\n Des.setCromElemGene(descendientes, j, Variables.getNLabelVar(j), 1);\r\n }\r\n descendientes++;\r\n\r\n // Marks the chromosome as no evaluated\r\n Des.setIndivEvaluated(i,false);\r\n\r\n // Compute next position to be muted\r\n if (mut_prob<1) {\r\n m = (float) Randomize.Rand();\r\n Mu_next += Math.ceil (Math.log(m) / Math.log(1.0 - mut_prob));\r\n }\r\n else\r\n Mu_next += 1;\r\n\r\n }\r\n Mu_next -= posiciones;\r\n \r\n }",
"public void dorbdb2_(INTEGER M,INTEGER P,INTEGER Q,double[] X11,INTEGER LDX11,double[] X21,INTEGER LDX21,double[] THETA,double[] PHI,double[] TAUP1,double[] TAUP2,double[] TAUQ1,double[] WORK,INTEGER LWORK,INTEGER INFO);",
"public static InstrumentDerivativeVisitor<MulticurveProviderInterface, double[]> getInstance() {\n return INSTANCE;\n }",
"public XYSeriesCollection eulers(double t0, double tF, double stepSize,\n ArrayList<Argument> argumentList, ArrayList<Argument> variableArgList,\n ArrayList<StockObject> stockArrayList, ArrayList<FlowObject> flowArrayList, ArrayList<VariableObject> variableArrayList) {\n Argument[] aVarList = argumentList.toArray(new Argument[argumentList.size()]);\n //aTempVarList only created to later create the temparg array list\n Argument[] aTempVarList = new Argument[argumentList.size()];\n for (int j = 0; j < aVarList.length; j++) {\n aTempVarList[j] = aVarList[j].clone();\n }\n int numSteps = (int) ((tF - t0) / stepSize);\n double t = t0;\n //javax.swing.JProgressBar pbar = new javax.swing.JProgressBar(0,numSteps);\n //int cutoff = String.valueOf(t).length()-1;\n ArrayList<Argument> aTempArgArrayList = new ArrayList<Argument>();\n for (int j = 0; j < aVarList.length; j++) {\n aTempArgArrayList.add(aTempVarList[j]);\n }\n double[] dydt = new double[argumentList.size()];\n\n ArrayList<Double> k1 = new ArrayList<Double>();\n\n //idea is to set k1 to double 0\n for (int x = 0; x < stockArrayList.size(); x++) {\n k1.add(0.0);\n }\n\n //array list length of amount of stocks\n ArrayList<XYSeries> series = new ArrayList<XYSeries>();\n\n //create series to hold graph data\n for (int i = 0; i < stockArrayList.size(); i++) {\n XYSeries tempSeries = new XYSeries(stockArrayList.get(i).getObjName());\n series.add(tempSeries);\n }\n\n final XYSeriesCollection data = new XYSeriesCollection();\n //create strings to hold table data\n\n //add initial values to series\n for (int i = 0; i < stockArrayList.size(); i++) {\n series.get(i).add(0, argumentList.get(i).getArgumentValue());\n }\n int numOfStocks = stockArrayList.size();\n double value;\n // label the string array for columns\n String stockNames = \"Time,\";\n for (int x = 0; x < stockArrayList.size(); x++) {\n stockNames += argumentList.get(x).getArgumentName() + \",\";\n }\n String[] tableStrings = new String[stockArrayList.size() + 1];\n String columns[] = stockNames.split(\",\");\n tableModel = new DefaultTableModel(0, stockArrayList.size() + 1);\n tableModel.setColumnIdentifiers(columns); // set the labels\n\n for (int n = 0; n < numSteps; n++) {\n \n t = t0 + (n * stepSize);\n variableArgList.get(variableArgList.size() - 1).setArgumentValue(t);\n // t = Math.ceil(t * 10000) / 10000;\n\n //Let's find k1:\n dydt = RightHandSide(variableArgList, argumentList, flowArrayList, stockArrayList, variableArrayList);\n\n for (int i = 0; i < numOfStocks; i++) {\n\n k1.set(i, stepSize * dydt[i]);\n }\n\n for (int i = 0; i < numOfStocks; i++) {\n\n value = argumentList.get(i).getArgumentValue() + (k1.get(i));\n //value = Math.ceil(value * 10000) / 10000;\n argumentList.get(i).setArgumentValue(value);\n \n }\n\n int row = n + 1;\n //double tablex=row*stepSize;\n //tableStrings[0] = Double.toString(Math.floor(tablex*Math.pow(10,cutoff))/Math.pow(10,cutoff));\n tableStrings[0] = Double.toString(row * stepSize);\n for (int col = 0; col < stockArrayList.size(); col++) {\n tableStrings[col + 1] = Double.toString(argumentList.get(col).getArgumentValue());\n }\n tableModel.addRow(tableStrings);\n\n for (int i = 0; i < stockArrayList.size(); i++) {\n series.get(i).add(t, argumentList.get(i).getArgumentValue());\n }\n }\n for (int i = 0; i < stockArrayList.size(); i++) {\n data.addSeries(series.get(i));\n }\n return data;\n }",
"public void initialize(double [] y) {\n\t\tsuper.initialize(y);\n\t\tString [] vars = {\n\t\t\t\t\"s\",\n\t\t\t\t\"E1\",\n\t\t\t\t\"E2\",\n\t\t\t\t\"E3\",\n\t\t\t\t\"E4\",\n\t\t\t\t\"I1\",\n\t\t\t \t\"I2\",\n\t\t\t\t\"I3\",\n\t\t\t\t\"I4\",\n\t\t\t\t\"T1\",\n\t\t\t\t\"T2\",\n\t\t\t\t\"T3\",\n\t\t\t\t\"T4\",\n\t\t\t\t\"R1\",\n\t\t\t\t\"R2\",\n\t\t\t\t\"R3\",\n\t\t\t\t\"R4\",\n\t\t\t\t\"E12\",\n\t\t\t\t\"E13\",\n\t\t\t\t\"E14\",\n\t\t\t\t\"E21\",\n\t\t\t\t\"E23\",\n\t\t\t\t\"E24\",\n\t\t\t\t\"E31\",\n\t\t\t\t\"E32\",\n\t\t\t\t\"E34\",\n\t\t\t\t\"E41\",\n\t\t\t\t\"E42\",\n\t\t\t\t\"E43\",\n\t\t\t\t\"I12\",\n\t\t\t\t\"I13\",\n\t\t\t\t\"I14\",\n\t\t\t\t\"I21\",\n\t\t\t\t\"I23\",\n\t\t\t\t\"I24\",\n\t\t\t\t\"I31\",\n\t\t\t\t\"I32\",\n\t\t\t\t\"I34\",\n\t\t\t\t\"I41\",\n\t\t\t\t\"I42\",\n\t\t\t\t\"I43\",\n\t\t\t\t\"R\",\n\t\t\t\t\"incidence\",\n\t\t\t\t\"incidence1\",\n\t\t\t\t\"incidence2\",\n\t\t\t\t\"incidence3\",\n\t\t\t\t\"incidence4\",\n\t\t\t\t\"incidence12\",\n\t\t\t\t\"incidence21\",\n\t\t\t\t\"incidence31\",\n\t\t\t\t\"incidence41\",\n\t\t\t\t\"incidence13\",\n\t\t\t\t\"incidence23\",\n\t\t\t\t\"incidence32\",\n\t\t\t\t\"incidence42\",\n\t\t\t\t\"incidence14\",\n\t\t\t\t\"incidence24\",\n\t\t\t\t\"incidence34\",\n\t\t\t\t\"incidence43\",\n\t\t\t\t\"diseaseDeaths\",\n\t\t\t\t\"diseaseDeaths1\",\n\t\t\t\t\"diseaseDeaths2\",\n\t\t\t\t\"diseaseDeaths3\",\n\t\t\t\t\"diseaseDeaths4\",\n\t\t\t\t\"diseaseDeaths12\",\n\t\t\t\t\"diseaseDeaths21\",\n\t\t\t\t\"diseaseDeaths31\",\n\t\t\t\t\"diseaseDeaths41\",\n\t\t\t\t\"diseaseDeaths13\",\n\t\t\t\t\"diseaseDeaths23\",\n\t\t\t\t\"diseaseDeaths32\",\n\t\t\t\t\"diseaseDeaths42\",\n\t\t\t\t\"diseaseDeaths14\",\n\t\t\t\t\"diseaseDeaths24\",\n\t\t\t\t\"diseaseDeaths34\",\n\t\t\t\t\"diseaseDeaths43\"\n\t\t};\n\t\t\n\t\textractVariablePositions(vars);\n\t}",
"public DesembolsoSEFinsol1OV() { }",
"@Override\n public Component getDerivative(Variable var) {\n\n Factor lnBase = new Logarithm(NEP_NUMBER, new ParenthesizedExpression(new Term(new Constant(base))));\n\n BigDecimal lnBaseValue = lnBase.getValue();\n if (MathUtils.isIntegerValue(lnBaseValue)) {\n lnBase = new Constant(lnBaseValue);\n }\n\n return new Term(\n new ParenthesizedExpression(\n new Term(\n new Constant(\"1\"),\n DIVIDE,\n new Term(\n Factor.getFactor(argument),\n MULTIPLY,\n lnBase\n )\n )\n ),\n MULTIPLY,\n Term.getTerm(argument.getDerivative(var))\n );\n }",
"public void visitD2I(D2I o){\n\t\tif (stack().peek() != Type.DOUBLE){\n\t\t\tconstraintViolated(o, \"The value at the stack top is not of type 'double', but of type '\"+stack().peek()+\"'.\");\n\t\t}\n\t}"
]
| [
"0.5690058",
"0.53682214",
"0.52759063",
"0.5197408",
"0.5108831",
"0.50779283",
"0.5063123",
"0.5040507",
"0.50290465",
"0.50259167",
"0.4952079",
"0.48864877",
"0.48568365",
"0.4855912",
"0.48416406",
"0.4825504",
"0.47808325",
"0.47696766",
"0.4732855",
"0.47242007",
"0.4718368",
"0.47136694",
"0.4688769",
"0.46698135",
"0.46586317",
"0.46539333",
"0.46426684",
"0.46144876",
"0.45780423",
"0.453716",
"0.4537143",
"0.4536882",
"0.4536824",
"0.45273238",
"0.45196468",
"0.45155904",
"0.4508942",
"0.45060727",
"0.44892213",
"0.44682896",
"0.445754",
"0.44544595",
"0.4432594",
"0.44285852",
"0.44169766",
"0.44167274",
"0.44137353",
"0.44023412",
"0.44017026",
"0.43893233",
"0.43787822",
"0.43665367",
"0.43565577",
"0.43535727",
"0.43211955",
"0.43210682",
"0.4319855",
"0.43196765",
"0.43186653",
"0.43043306",
"0.43025097",
"0.42987016",
"0.4279063",
"0.4274867",
"0.42672902",
"0.426691",
"0.42563927",
"0.42383125",
"0.4236717",
"0.4227737",
"0.42255357",
"0.42054036",
"0.42033875",
"0.42003584",
"0.41969725",
"0.41928604",
"0.41872102",
"0.4186936",
"0.41755372",
"0.41753173",
"0.41692445",
"0.41555932",
"0.4153512",
"0.414883",
"0.41483653",
"0.4140775",
"0.4132221",
"0.4126074",
"0.41215068",
"0.411964",
"0.41187444",
"0.41132307",
"0.41127592",
"0.4111096",
"0.41103154",
"0.41092297",
"0.41092157",
"0.41086572",
"0.41083702",
"0.41020852"
]
| 0.69536924 | 0 |
The firstDerivatives are [0] s, [1] z, [2] lognormalVolT, [3] mu, [4] lambda. The second derivatives are [0] s twice, [1] z twice, [2] s and z. | private double getFAdjoint(
double s,
double z,
double lognormalVolT,
double h,
double mu,
double lambda,
double eta,
double[] firstDerivatives,
double[] secondDerivatives) {
double n1 = NORMAL.getCDF(eta * z);
double n2 = NORMAL.getCDF(eta * (z - 2 * lambda * lognormalVolT));
double hsMuPLa = Math.pow(h / s, mu + lambda);
double hsMuMLa = Math.pow(h / s, mu - lambda);
double f = hsMuPLa * n1 + hsMuMLa * n2;
double fBar = 1.0;
double n1df = NORMAL.getPDF(eta * z);
double n2df = NORMAL.getPDF(eta * (z - 2 * lambda * lognormalVolT));
double hsMuPLaBar = n1 * fBar;
double hsMuMLaBar = n2 * fBar;
double n2Bar = hsMuMLa * fBar;
double n1Bar = hsMuPLa * fBar;
firstDerivatives[0] = -(mu + lambda) * hsMuPLa / s * hsMuPLaBar - (mu - lambda) * hsMuMLa / s * hsMuMLaBar; //s
firstDerivatives[1] = n1df * eta * n1Bar + n2df * eta * n2Bar; // z
firstDerivatives[2] = -n2df * eta * 2 * lambda * n2Bar; //lognormalVolT
firstDerivatives[3] = hsMuPLa * Math.log(h / s) * hsMuPLaBar + hsMuMLa * Math.log(h / s) * hsMuMLaBar; // mu
firstDerivatives[4] = hsMuPLa * Math.log(h / s) * hsMuPLaBar - hsMuMLa * Math.log(h / s) * hsMuMLaBar; // lambda
secondDerivatives[0] = hsMuPLa * hsMuPLaBar * (mu + lambda) * (mu + lambda + 1d) / (s * s) +
hsMuMLa * hsMuMLaBar * (mu - lambda) * (mu - lambda + 1d) / (s * s);
secondDerivatives[1] = -z * n1df * eta * n1Bar - (z - 2 * lambda * lognormalVolT) * n2df * eta * n2Bar;
secondDerivatives[2] = -n1df * n1Bar * (mu + lambda) * eta / s - n2df * n2Bar * (mu - lambda) * eta / s;
return f;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private double getEAdjoint(\n double s,\n double df2,\n double x,\n double y,\n double lognormalVolT,\n double h,\n double mu,\n double eta,\n double[] firstDerivatives,\n double[] secondDerivatives) {\n\n double n1 = NORMAL.getCDF(eta * (x - lognormalVolT));\n double n2 = NORMAL.getCDF(eta * (y - lognormalVolT));\n double hsMu = Math.pow(h / s, 2 * mu);\n double e = df2 * (n1 - hsMu * n2);\n double n1df = NORMAL.getPDF(eta * (x - lognormalVolT));\n double n2df = NORMAL.getPDF(eta * (y - lognormalVolT));\n double hsMuBar = df2 * -n2;\n double n2Bar = df2 * -hsMu;\n double n1Bar = df2;\n firstDerivatives[0] = -2d * mu * hsMu / s * hsMuBar; // s\n firstDerivatives[1] = n1 - hsMu * n2; // df2;\n firstDerivatives[2] = n1df * eta * n1Bar; // x\n firstDerivatives[3] = n2df * eta * n2Bar; // y\n firstDerivatives[4] = n2df * -eta * n2Bar + n1df * -eta * n1Bar; // lognormalVolT\n firstDerivatives[5] = 2d * Math.log(h / s) * hsMu * hsMuBar; // mu\n secondDerivatives[0] = hsMu * hsMuBar * 2d * mu * (2d * mu + 1d) / (s * s);\n secondDerivatives[1] = -n1df * n1Bar * (x - lognormalVolT) * eta;\n secondDerivatives[2] = -n2df * n2Bar * (y - lognormalVolT) * eta;\n secondDerivatives[3] = -2d * mu * n2df * eta * n2Bar / s;\n return e;\n }",
"public double activationDerivative(double z);",
"public RealValuedFunctTwoOps deriv1() {\n\treturn new RealValuedFunctTwoOps() {\n\t public double valueAt(double x, double y) {\n\t\treturn RealValuedFunctionTwo.this.deriv1At(x, y);\n\t }\n\t};\n }",
"@Override\n public void step(double[] p, int n, double t, double h, double[] pout, Function derivs) {\n \tif ( tmp == null || tmp.length != n ) {\n tmp = new double[n];\n \t}\n \t//state: p.x,p.y,v.x,v.y\n \tVector2d v1 = new Vector2d();\n \tVector2d x1 = new Vector2d();\n \tVector2d a = new Vector2d();\n\t\tderivs.derivs(t,p,tmp);\n\t\t//gives me k1\n \tfor (int i=0;i<p.length-3;i+=4) {\n \t\tdouble[] k2 = new double[4];\n \t\tdouble[] k3 = new double[4];\n \t\tdouble[] k4 = new double[4];\n \t\t//x1 = x0+h(x0+1/2h(x0)')'\n \t\tdouble[] tuples = new double[] {tmp[i]*1/2*h+p[i],tmp[i+1]*1/2*h+p[i+1],\n \t\t\t\ttmp[i+2]*1/2*h+p[i+2],tmp[i+3]*1/2*h+p[i+3]};\n \t\tderivs.derivs(t,tuples,k2);\n \t\ttuples = new double[] {k2[i]*1/2*h+p[i],k2[i+1]*1/2*h+p[i+1],\n \t\t\t\tk2[i+2]*1/2*h+p[i+2],k2[i+3]*1/2*h+p[i+3]};\n \t\tderivs.derivs(t,tuples,k3);\n \t\ttuples = new double[] {k3[i]*h+p[i],k3[i+1]*h+p[i+1],\n \t\t\t\tk3[i+2]*h+p[i+2],k3[i+3]*h+p[i+3]};\n \t\tderivs.derivs(t,tuples,k4);\n \t\tx1.set(new Vector2d(p[i],p[i+1]));\n \t\tx1.scaleAdd(h/6, new Vector2d(tmp[i],tmp[i+1]), x1);\n \t\tx1.scaleAdd(h/3, new Vector2d(k2[i],k2[i+1]), x1);\n \t\tx1.scaleAdd(h/3, new Vector2d(k3[i],k3[i+1]), x1);\n \t\tx1.scaleAdd(h/6, new Vector2d(k4[i],k4[i+1]), x1);\n \t\t//v1 = v0+h*a\n \t\ta.set(tmp[i+2],tmp[i+3]);\n \t\tv1.set(new Vector2d(p[i+2],p[i+3]));\n \t\tv1.scaleAdd(h/6, a, v1);\n \t\tv1.scaleAdd(h/3, new Vector2d(k2[i+2],k2[i+3]), v1);\n \t\tv1.scaleAdd(h/3, new Vector2d(k3[i+2],k3[i+3]), v1);\n \t\tv1.scaleAdd(h/6, new Vector2d(k4[i+2],k4[i+3]), v1);\n \t\t//update velocity and positions\n \t\tpout[i] = x1.x;\n \t\tpout[i+1] = x1.y;\n \t\tpout[i+2] = v1.x;\n \t\tpout[i+3] = v1.y;\n \t}\n }",
"@Override\r\n\t\tpublic double[] gradient(double x, double... parameters) {\n\t\t\tfinal double a = parameters[0];\r\n\t\t\tfinal double b = parameters[1];\r\n\t\t\tfinal double c = parameters[2];\r\n\t\t\tfinal double d = parameters[3];\r\n\t\t\tfinal double e = parameters[4];\r\n\t\t\t\r\n\t\t\tdouble[] gradients = new double[5];\r\n\t\t\t//double den = 1 + Math.pow((x+e)/c, b);\r\n\t\t\t//gradients[0] = 1 / den; // Yes a Derivation \r\n\t\t\t//gradients[1] = -((a - d) * Math.pow(x / c, b) * Math.log(x / c)) / (den * den); // Yes b Derivation \r\n\t\t\t//gradients[2] = (b * Math.pow(x / c, b - 1) * (x / (c * c)) * (a - d)) / (den * den); // Yes c Derivation \r\n\t\t\t//gradients[3] = 1 - (1 / den); // Yes d Derivation \r\n\t\t\t\r\n\t\t\t//Derivation\r\n\t\t\tfinal double c_b = Math.pow(c, b);\r\n\t\t\tfinal double c_b1 = Math.pow(c, b+1.);\r\n\t\t\tfinal double c_2b = Math.pow(c, 2.*b);\r\n\t\t\tfinal double c_2b1 = Math.pow(c, 2.*b+1.);\r\n\t\t\t\r\n\t\t\tfinal double xe_b = Math.pow(x+e, b);\r\n\t\t\tfinal double xe_2b = Math.pow(x+e, 2.*b);\r\n\t\t\tfinal double xe_2b1 = Math.pow(x+e, 2.*b+1.);\r\n\t\t\t\r\n\t\t\tgradients[0] = c_b/(xe_b+c_b);\r\n\t\t\tgradients[1] = ((c_b*d-a*c_b)*xe_b*Math.log(x+e)+(a*c_b*Math.log(c)-c_b*Math.log(c)*d)*xe_b)/(xe_2b+2*c_b*xe_b+c_2b);\r\n\t\t\tgradients[2] = -((b*c_b*d-a*b*c_b)*xe_b)/(c*xe_2b+2*c_b1*xe_b+c_2b1);\r\n\t\t\tgradients[3] = xe_b/(xe_b+c_b);\r\n\t\t\tgradients[4] = ((b*c_b*d-a*b*c_b)*xe_b)/(xe_2b1+xe_b*(2*c_b*x+2*c_b*e)+c_2b*x+c_2b*e);\r\n\t\t\treturn gradients;\r\n\t\t}",
"@org.junit.Test\n public void getSecondDerivTestCurve4() {\n BezierCurve curve = new BezierCurve(new Vector(10, 20), new Vector(20, 20),\n new Vector(10, 30), new Vector(20, 30));\n assertTrue(curve.getSecondDeriv(0).dot(new Vector(-1, 0)) > 0);\n assertTrue(curve.getSecondDeriv(0).dot(new Vector(0, 1)) > 0);\n assertEquals(new Vector(), curve.getSecondDeriv(0.5));\n assertTrue(curve.getSecondDeriv(1).dot(new Vector(1, 0)) > 0);\n assertTrue(curve.getSecondDeriv(1).dot(new Vector(0, -1)) > 0);\n }",
"private float diffusitivity(float d) {\r\n return (1.0f / (1.0f + (d * d) / (lambda * lambda)));\r\n }",
"public double[] derivs(double t, double[] y)\n\t{\n\t\tdouble out[] = new double[6];\n\t\tVectorN r = new VectorN(y[0], y[1], y[2]);\n\t\tdouble rmag = r.mag();\n\t\tdouble rcubed = rmag * rmag * rmag;\n\t\tdouble muorc = -1.0 * this.mu / rcubed;\n\n\t\tout[0] = y[3];\n\t\tout[1] = y[4];\n\t\tout[2] = y[5];\n\t\tout[3] = muorc * y[0];\n\t\tout[4] = muorc * y[1];\n\t\tout[5] = muorc * y[2];\n\n\t\treturn out;\n\t}",
"@org.junit.Test\n public void getSecondDerivTestCurve2() {\n BezierCurve curve = new BezierCurve(new Vector(10, 20), new Vector(20, 20));\n assertEquals(0, curve.getSecondDeriv(0).dot(new Vector(1, 0)), 0);\n assertEquals(0, curve.getSecondDeriv(1).dot(new Vector(1, 0)), 0);\n }",
"public double calcDerivative(StdVectorInt derivComponents, Vector x) {\n return opensimSimulationJNI.FiberCompressiveForceCosPennationCurve_calcDerivative__SWIG_1(swigCPtr, this, StdVectorInt.getCPtr(derivComponents), derivComponents, Vector.getCPtr(x), x);\n }",
"@org.junit.Test\n public void getSecondDerivTestCurve3() {\n BezierCurve curve = new BezierCurve(new Vector(10, 20), new Vector(15, 20), new Vector(15, 30));\n assertTrue(curve.getSecondDeriv(0).dot(new Vector(-1, 0)) > 0);\n assertTrue(curve.getSecondDeriv(0).dot(new Vector(0, 1)) > 0);\n assertTrue(curve.getSecondDeriv(0.5).dot(new Vector(-1, 0)) > 0);\n assertTrue(curve.getSecondDeriv(0.5).dot(new Vector(0, 1)) > 0);\n assertTrue(curve.getSecondDeriv(1).dot(new Vector(-1, 0)) > 0);\n assertTrue(curve.getSecondDeriv(1).dot(new Vector(0, 1)) > 0);\n }",
"@org.junit.Test\n public void getSecondDerivTestOnePointCurve() {\n BezierCurve onePointCurve = new BezierCurve(new Vector(10, 20));\n assertEquals(new Vector(), onePointCurve.getSecondDeriv(0));\n assertEquals(new Vector(), onePointCurve.getSecondDeriv(1));\n }",
"public Double getDz();",
"public abstract Function derivative();",
"@org.junit.Test\n public void getSecondDerivEmptyCurve() {\n BezierCurve emptyCurve = new BezierCurve();\n assertEquals(new Vector(), emptyCurve.getSecondDeriv(0));\n assertEquals(new Vector(), emptyCurve.getSecondDeriv(1));\n }",
"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 }",
"public double derivative(double input) {\n\t\treturn (1 - Math.pow(Math.tanh(input), 2));\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 }",
"private double [] secondGradBeta(ArrayList<Kernel<T>> kernels, ArrayList<Double> weights, List<TrainingSample<T>> l)\n\t{\n\t\tdouble grad[] = new double[kernels.size()];\n\t\t\n\t\t//doing <L, Dn.^2>\n\t\tfor(int i = 0 ; i < kernels.size(); i++)\n\t\t{\n\t\t\tdouble matrix[][] = kernels.get(i).getKernelMatrix(l);\n\t\t\tfor(int x = 0 ; x < matrix.length; x++)\n\t\t\t{\n\t\t\t\tfor(int y = x ; y < matrix.length; y++)\n\t\t\t\t{\n\t\t\t\t\tif(matrix[x][y] == 0)\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tdouble d = Math.log(matrix[x][y]);\n\t\t\t\t\tgrad[i] += d * d * lambda_matrix[x][y];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(int i = 0 ; i < grad.length; i++)\n\t\t\tif(grad[i] < num_cleaning)\n\t\t\t\tgrad[i] = 0.0;\n\t\t\n\t\teprintln(4, \"++++++ secondGradDir : \"+Arrays.toString(grad));\n\t\t\n\t\treturn grad;\n\t}",
"public static StateVector integrate( StateVector state, double dt) {\r\n StateVector dummy = new StateVector();\r\n StateVector derivative_a, derivative_b, derivative_c, derivative_d;\r\n\r\n\r\n derivative_a = evaluate(state, 0.0, dummy, 0 ); // derivative a returns initial velocity and acceleration\r\n derivative_b = evaluate(state, dt*0.5, derivative_a, 1 );\r\n derivative_c = evaluate(state, dt*0.5, derivative_b, 1 );\r\n derivative_d = evaluate(state, dt, derivative_c, 2 );\r\n\r\n double dxdt = 1.0/6.0 * (derivative_a.vx + 2.0f*(derivative_b.vx + derivative_c.vx) + derivative_d.vx);\r\n double dydt = 1.0/6.0 * (derivative_a.vy + 2.0f*(derivative_b.vy + derivative_c.vy) + derivative_d.vy);\r\n double dzdt = 1.0/6.0 * (derivative_a.vz + 2.0f*(derivative_b.vz + derivative_c.vz) + derivative_d.vz);\r\n double dvxdt = 1.0/6.0 * (derivative_a.ax + 2.0f*(derivative_b.ax + derivative_c.ax) + derivative_d.ax);\r\n double dvydt = 1.0/6.0 * (derivative_a.ay + 2.0f*(derivative_b.ay + derivative_c.ay) + derivative_d.ay);\r\n double dvzdt = 1.0/6.0 * (derivative_a.az + 2.0f*(derivative_b.az + derivative_c.az) + derivative_d.az);\r\n\r\n state.x = state.x + dxdt * dt;\r\n state.y = state.y + dydt * dt;\r\n state.z = state.z + dzdt * dt;\r\n state.vx = state.vx + dvxdt * dt;\r\n state.vy = state.vy + dvydt * dt;\r\n state.vz = state.vz + dvzdt * dt;\r\n\r\n return( state );\r\n }",
"public RealValuedFunctTwoOps deriv21() {\n\treturn new RealValuedFunctTwoOps() {\n\t public double valueAt(double x, double y) {\n\t\treturn RealValuedFunctionTwo.this.deriv21At(x, y);\n\t }\n\t};\n }",
"void example1() {\n\t\t\n\t\tFloat64CartesianTensorProductMember a = new Float64CartesianTensorProductMember(3, 4);\n\t\t\n\t\tFloat64CartesianTensorProductMember b = G.DBL_TEN.construct();\n\t\t\n\t\tTensorCommaDerivative.compute(G.DBL_TEN, G.DBL, 1, a, b);\n\t\t\n\t\t// b contains the comma derivative of a\n\t}",
"private static void dtp2v( double xi, double eta,\n double x, double y, double z,\n double[] v ) {\n double f = Math.sqrt( 1 + xi * xi + eta * eta );\n double r = Math.hypot( x, y );\n if ( r == 0 ) {\n r = 1d-20;\n x = r;\n }\n double f1 = 1.0 / f;\n double r1 = 1.0 / r;\n v[ 0 ] = ( x - ( xi * y + eta * x * z ) * r1 ) * f1;\n v[ 1 ] = ( y + ( xi * x - eta * y * z ) * r1 ) * f1;\n v[ 2 ] = ( z + eta * r ) * f1;\n }",
"public RealValuedFunctTwoOps deriv12() {\n\treturn new RealValuedFunctTwoOps() {\n\t public double valueAt(double x, double y) {\n\t\treturn RealValuedFunctionTwo.this.deriv12At(x, y);\n\t }\n\t};\n }",
"public void SvdDecomposition() {\n\n\t\tSingularValueDecomposition s = A.svd();\n\n\t\tU = s.getU();\n\t\t//System.out.print(\"U = \");\n\t\t//U.print(pi, pf); //for debug\n\n\t\tD = s.getS();\n\t\t//System.out.print(\"S = \");\n\t\t//D.print(pi, pf); //for debug\n\n\t\tV = s.getV();\n\t\t//System.out.print(\"V = \");\n\t\t//V.print(pi, pf); //for debug\n\t}",
"public void calculate(double[] theta) {\r\n dvModel.vectorToParams(theta);\r\n\r\n double localValue = 0.0;\r\n double[] localDerivative = new double[theta.length];\r\n\r\n TwoDimensionalMap<String, String, SimpleMatrix> binaryW_dfsG,binaryW_dfsB;\r\n binaryW_dfsG = TwoDimensionalMap.treeMap();\r\n binaryW_dfsB = TwoDimensionalMap.treeMap();\r\n TwoDimensionalMap<String, String, SimpleMatrix> binaryScoreDerivativesG,binaryScoreDerivativesB ;\r\n binaryScoreDerivativesG = TwoDimensionalMap.treeMap();\r\n binaryScoreDerivativesB = TwoDimensionalMap.treeMap();\r\n Map<String, SimpleMatrix> unaryW_dfsG,unaryW_dfsB ;\r\n unaryW_dfsG = new TreeMap<String, SimpleMatrix>();\r\n unaryW_dfsB = new TreeMap<String, SimpleMatrix>();\r\n Map<String, SimpleMatrix> unaryScoreDerivativesG,unaryScoreDerivativesB ;\r\n unaryScoreDerivativesG = new TreeMap<String, SimpleMatrix>();\r\n unaryScoreDerivativesB= new TreeMap<String, SimpleMatrix>();\r\n\r\n Map<String, SimpleMatrix> wordVectorDerivativesG = new TreeMap<String, SimpleMatrix>();\r\n Map<String, SimpleMatrix> wordVectorDerivativesB = new TreeMap<String, SimpleMatrix>();\r\n\r\n for (TwoDimensionalMap.Entry<String, String, SimpleMatrix> entry : dvModel.binaryTransform) {\r\n int numRows = entry.getValue().numRows();\r\n int numCols = entry.getValue().numCols();\r\n binaryW_dfsG.put(entry.getFirstKey(), entry.getSecondKey(), new SimpleMatrix(numRows, numCols));\r\n binaryW_dfsB.put(entry.getFirstKey(), entry.getSecondKey(), new SimpleMatrix(numRows, numCols));\r\n binaryScoreDerivativesG.put(entry.getFirstKey(), entry.getSecondKey(), new SimpleMatrix(1, numRows));\r\n binaryScoreDerivativesB.put(entry.getFirstKey(), entry.getSecondKey(), new SimpleMatrix(1, numRows));\r\n }\r\n for (Map.Entry<String, SimpleMatrix> entry : dvModel.unaryTransform.entrySet()) {\r\n int numRows = entry.getValue().numRows();\r\n int numCols = entry.getValue().numCols();\r\n unaryW_dfsG.put(entry.getKey(), new SimpleMatrix(numRows, numCols));\r\n unaryW_dfsB.put(entry.getKey(), new SimpleMatrix(numRows, numCols));\r\n unaryScoreDerivativesG.put(entry.getKey(), new SimpleMatrix(1, numRows));\r\n unaryScoreDerivativesB.put(entry.getKey(), new SimpleMatrix(1, numRows));\r\n }\r\n if (op.trainOptions.trainWordVectors) {\r\n for (Map.Entry<String, SimpleMatrix> entry : dvModel.wordVectors.entrySet()) {\r\n int numRows = entry.getValue().numRows();\r\n int numCols = entry.getValue().numCols();\r\n wordVectorDerivativesG.put(entry.getKey(), new SimpleMatrix(numRows, numCols));\r\n wordVectorDerivativesB.put(entry.getKey(), new SimpleMatrix(numRows, numCols));\r\n }\r\n }\r\n\r\n // Some optimization methods prints out a line without an end, so our\r\n // debugging statements are misaligned\r\n Timing scoreTiming = new Timing();\r\n scoreTiming.doing(\"Scoring trees\");\r\n int treeNum = 0;\r\n MulticoreWrapper<Tree, Pair<DeepTree, DeepTree>> wrapper = new MulticoreWrapper<Tree, Pair<DeepTree, DeepTree>>(op.trainOptions.trainingThreads, new ScoringProcessor());\r\n for (Tree tree : trainingBatch) {\r\n wrapper.put(tree);\r\n }\r\n wrapper.join();\r\n scoreTiming.done();\r\n while (wrapper.peek()) {\r\n Pair<DeepTree, DeepTree> result = wrapper.poll();\r\n DeepTree goldTree = result.first;\r\n DeepTree bestTree = result.second;\r\n\r\n StringBuilder treeDebugLine = new StringBuilder();\r\n Formatter formatter = new Formatter(treeDebugLine);\r\n boolean isDone = (Math.abs(bestTree.getScore() - goldTree.getScore()) <= 0.00001 || goldTree.getScore() > bestTree.getScore());\r\n String done = isDone ? \"done\" : \"\";\r\n formatter.format(\"Tree %6d Highest tree: %12.4f Correct tree: %12.4f %s\", treeNum, bestTree.getScore(), goldTree.getScore(), done);\r\n System.err.println(treeDebugLine.toString());\r\n if (!isDone){\r\n // if the gold tree is better than the best hypothesis tree by\r\n // a large enough margin, then the score difference will be 0\r\n // and we ignore the tree\r\n\r\n double valueDelta = bestTree.getScore() - goldTree.getScore();\r\n //double valueDelta = Math.max(0.0, - scoreGold + bestScore);\r\n localValue += valueDelta;\r\n\r\n // get the context words for this tree - should be the same\r\n // for either goldTree or bestTree\r\n List<String> words = getContextWords(goldTree.getTree());\r\n\r\n // The derivatives affected by this tree are only based on the\r\n // nodes present in this tree, eg not all matrix derivatives\r\n // will be affected by this tree\r\n backpropDerivative(goldTree.getTree(), words, goldTree.getVectors(),\r\n binaryW_dfsG, unaryW_dfsG,\r\n binaryScoreDerivativesG, unaryScoreDerivativesG,\r\n wordVectorDerivativesG);\r\n\r\n backpropDerivative(bestTree.getTree(), words, bestTree.getVectors(),\r\n binaryW_dfsB, unaryW_dfsB,\r\n binaryScoreDerivativesB, unaryScoreDerivativesB,\r\n wordVectorDerivativesB);\r\n\r\n }\r\n ++treeNum;\r\n }\r\n\r\n double[] localDerivativeGood;\r\n double[] localDerivativeB;\r\n if (op.trainOptions.trainWordVectors) {\r\n localDerivativeGood = NeuralUtils.paramsToVector(theta.length,\r\n binaryW_dfsG.valueIterator(), unaryW_dfsG.values().iterator(),\r\n binaryScoreDerivativesG.valueIterator(),\r\n unaryScoreDerivativesG.values().iterator(),\r\n wordVectorDerivativesG.values().iterator());\r\n\r\n localDerivativeB = NeuralUtils.paramsToVector(theta.length,\r\n binaryW_dfsB.valueIterator(), unaryW_dfsB.values().iterator(),\r\n binaryScoreDerivativesB.valueIterator(),\r\n unaryScoreDerivativesB.values().iterator(),\r\n wordVectorDerivativesB.values().iterator());\r\n } else {\r\n localDerivativeGood = NeuralUtils.paramsToVector(theta.length,\r\n binaryW_dfsG.valueIterator(), unaryW_dfsG.values().iterator(),\r\n binaryScoreDerivativesG.valueIterator(),\r\n unaryScoreDerivativesG.values().iterator());\r\n\r\n localDerivativeB = NeuralUtils.paramsToVector(theta.length,\r\n binaryW_dfsB.valueIterator(), unaryW_dfsB.values().iterator(),\r\n binaryScoreDerivativesB.valueIterator(),\r\n unaryScoreDerivativesB.values().iterator());\r\n }\r\n\r\n // correct - highest\r\n for (int i =0 ;i<localDerivativeGood.length;i++){\r\n localDerivative[i] = localDerivativeB[i] - localDerivativeGood[i];\r\n }\r\n\r\n // TODO: this is where we would combine multiple costs if we had parallelized the calculation\r\n value = localValue;\r\n derivative = localDerivative;\r\n\r\n // normalizing by training batch size\r\n value = (1.0/trainingBatch.size()) * value;\r\n ArrayMath.multiplyInPlace(derivative, (1.0/trainingBatch.size()));\r\n\r\n // add regularization to cost:\r\n double[] currentParams = dvModel.paramsToVector();\r\n double regCost = 0;\r\n for (int i = 0 ; i<currentParams.length;i++){\r\n regCost += currentParams[i] * currentParams[i];\r\n }\r\n regCost = op.trainOptions.regCost * 0.5 * regCost;\r\n value += regCost;\r\n // add regularization to gradient\r\n ArrayMath.multiplyInPlace(currentParams, op.trainOptions.regCost);\r\n ArrayMath.pairwiseAddInPlace(derivative, currentParams);\r\n\r\n }",
"private void calc_e_v_dens() {\n\t\tint i,il,max_steps = 10;\n\t\tdouble[] lel = new double[2], onel = new double[2];\n\t\tdouble store_dens;\n\t\t\n\t\tstore_dens = density;\n\t\t\n\t\ttry {\n\t\t\tPrintStream out = new PrintStream(new FileOutputStream(\"Ediff.v.dens.out\"));\n\t\t\tout.println(\"# density Elhcp Elfcc Ehcp Efcc dEl dE\");\n\t\t\t\n\t\t\tfor (i=0; i<max_steps; i++) {\n\t\t\t\tdensity= 2.0*(double)(i+1)/(double)max_steps;\n\t\t\t\tdiameter = Math.pow(density,1.0/3.0);\n\t\t\t\tdiameter2 = diameter*diameter;\n\t\t\t\tout.println(density+\" \");\n\t\t\t\tfor (il=0; il<2; il++) {\n\t\t\t\t\tlel[il] = calc_local_energy(0,il,CUR_POS);\n\t\t\t\t\tonel[il] = calc_e_order_n(il);\n\t\t\t\t}\n\t\t\t\tout.println(lel[0]+\" \"+lel[1]+\" \"+onel[0]+\" \"+onel[1]+\" \"+(lel[1]-lel[0])+\" \"+(onel[1]-onel[0]));\n\t\t\t}\n\t\t\tout.close();\n\t\t} catch( Exception e ) {\n\t\t\tSystem.err.println(\"calc_e_v_dens failed while writing file with exception: \"+e);\n\t\t}\n\t\t\n\t\tdensity= store_dens;\n\t\tdiameter = Math.pow(density,1.0/3.0);\n\t\tdiameter2 = diameter*diameter;\n\t}",
"void init(FieldODEStateAndDerivative<T> s0, T t);",
"@Override\n public Pair<INDArray,INDArray> backprop(INDArray in, INDArray epsilon) {\n //dldZ here is h'(in) in the description above\n //\n // h(x) = 1.7159*tanh(2x/3);\n // h'(x) = 1.7159*[tanh(2x/3)]' * 2/3\n INDArray dLdz = Nd4j.getExecutioner().exec(new TanDerivative(in.muli(2/3.0)));\n dLdz.muli(2/3.0);\n dLdz.muli(1.7159);\n\n //Multiply with epsilon\n dLdz.muli(epsilon);\n return new Pair<>(dLdz, null);\n }",
"public double secondPartialDerivative(FittingFunction f, int i, int j,\r\n double[] p, double delt) {\r\n double[] arg = new double[p.length];\r\n System.arraycopy(p, 0, arg, 0, p.length);\r\n\r\n arg[i] += delt;\r\n arg[j] += delt;\r\n double ff1 = f.evaluate(arg);\r\n\r\n arg[j] -= 2 * delt;\r\n double ff2 = f.evaluate(arg);\r\n\r\n arg[i] -= 2 * delt;\r\n arg[j] += 2 * delt;\r\n double ff3 = f.evaluate(arg);\r\n\r\n arg[j] -= 2 * delt;\r\n double ff4 = f.evaluate(arg);\r\n\r\n double fsSum = ff1 - ff2 - ff3 + ff4;\r\n\r\n double partial = fsSum / (4.0 * delt * delt);\r\n\r\n// if (Double.isNaN(partial) || partial < -0.5) {\r\n// double eraseme = 1.0;\r\n// }\r\n\r\n return partial;\r\n }",
"public double derivativeSigmoid(double x){\n return sigmoid(x) * (1 - sigmoid(x));\n }",
"@Override\n\tpublic Simplex2v3d getTangentPlane(float xPos, float zPos) {\n\t\treturn new Simplex2v3d(func.evaluateDerivative(new float[] {xPos, zPos}, 0), func.evaluateDerivative(new float[] {xPos, zPos}, 1), new Vector3f(xPos, getHeight(xPos, zPos), zPos));\n\t}",
"public RealValuedFunctTwoOps deriv22() {\n\treturn new RealValuedFunctTwoOps() {\n\t public double valueAt(double x, double y) {\n\t\treturn RealValuedFunctionTwo.this.deriv22At(x, y);\n\t }\n\t};\n }",
"private static Vector3f[] calculatePositionDifferences(Drone drone, Vector3f[] newVelocities, float dt) {\r\n\r\n\t\t\r\n\t\t// calculate the average linear velocity\r\n\t\tVector3f avgLinearVelocityW = average(drone.getLinearVelocity(), newVelocities[0]);\r\n\r\n\t\t// calculate the translation\r\n\t\tVector3f deltaPositionW = (Vector3f) avgLinearVelocityW.scale(dt);\r\n\r\n\t\t// calculate the average angular velocity\r\n\t\tVector3f avgAngularVelocityW = average(drone.getAngularVelocity(), newVelocities[1]);\r\n\r\n\t\t// calculate the rotation\r\n\t\tVector3f deltarotationW = ((Vector3f) avgAngularVelocityW.scale(dt));\r\n\r\n\t\treturn new Vector3f[] { deltaPositionW, deltarotationW };\r\n\t}",
"static public double[][] DersBasisFuns(double u, int n, int span, int deg,\n\t\t\tdouble[] U) {\n\t\tdouble[][] ders = new double[n + 1][deg + 1];\n\n\t\tdouble[] left = new double[deg + 1];\n\t\tdouble[] right = new double[deg + 1];\n\t\tdouble[][] ndu = new double[deg + 1][deg + 1];\n\t\tdouble saved, temp;\n\t\tint j, r;\n\n\t\tndu[0][0] = 1.0;\n\t\tfor (j = 1; j <= deg; j++) {\n\t\t\tleft[j] = u - U[span + 1 - j];\n\t\t\tright[j] = U[span + j] - u;\n\t\t\tsaved = 0.0;\n\t\t\tfor (r = 0; r < j; r++) {\n\t\t\t\t// Lower triangle\n\t\t\t\tndu[j][r] = right[r + 1] + left[j - r];\n\t\t\t\ttemp = ndu[r][j - 1] / ndu[j][r];\n\t\t\t\t// Upper triangle\n\t\t\t\tndu[r][j] = saved + right[r + 1] * temp;\n\t\t\t\tsaved = left[j - r] * temp;\n\t\t\t}\n\t\t\tndu[j][j] = saved;\n\t\t}\n\n\t\t// load the basis functions\n\t\tfor (j = 0; j <= deg; j++) {\n\t\t\tders[0][j] = ndu[j][deg];\n\t\t}\n\n\t\t// compute the derivatives, Eq.[2.9] the NURBS Book\n\t\tdouble[][] a = new double[2][deg + 1];\n\t\tfor (r = 0; r <= deg; r++) { // loop over function index\n\t\t\tint s1, s2;\n\t\t\ts1 = 0;\n\t\t\ts2 = 1;\n\t\t\ta[0][0] = 1.0;\n\t\t\t// compute the kth derivative\n\t\t\tfor (int k = 1; k <= n; k++) {\n\t\t\t\tdouble d;\n\t\t\t\tint rk, pk, j1, j2;\n\n\t\t\t\td = 0.0;\n\t\t\t\trk = r - k;\n\t\t\t\tpk = deg - k;\n\t\t\t\tif (r >= k) {\n\t\t\t\t\ta[s2][0] = a[s1][0] / ndu[pk + 1][rk];\n\t\t\t\t\td = a[s2][0] * ndu[rk][pk];\n\t\t\t\t}\n\n\t\t\t\tif (rk >= -1) {\n\t\t\t\t\tj1 = 1;\n\t\t\t\t} else {\n\t\t\t\t\tj1 = -rk;\n\t\t\t\t}\n\t\t\t\tif (r - 1 <= pk) {\n\t\t\t\t\tj2 = k - 1;\n\t\t\t\t} else {\n\t\t\t\t\tj2 = deg - r;\n\t\t\t\t}\n\n\t\t\t\tfor (j = j1; j <= j2; j++) {\n\t\t\t\t\ta[s2][j] = (a[s1][j] - a[s1][j - 1]) / ndu[pk + 1][rk + j];\n\t\t\t\t\td += a[s2][j] * ndu[rk + j][pk];\n\t\t\t\t}\n\t\t\t\tif (r <= pk) {\n\t\t\t\t\ta[s2][k] = -a[s1][k - 1] / ndu[pk + 1][r];\n\t\t\t\t\td += a[s2][j] * ndu[r][pk];\n\t\t\t\t}\n\t\t\t\tders[k][r] = d;\n\t\t\t\tj = s1;\n\t\t\t\ts1 = s2;\n\t\t\t\ts2 = j; // switch rows\n\t\t\t}\n\t\t}\n\t\t// Multiply through by the correct factors\n\t\t// Eq [2.9] of the NURBS Book\n\t\tr = deg;\n\t\tfor (int k = 1; k <= n; k++) {\n\t\t\tfor (j = 0; j <= deg; j++)\n\t\t\t\tders[k][j] *= r;\n\t\t\tr *= (deg - k);\n\t\t}\n\t\treturn ders;\n\t}",
"public void polyDiff() {\n this.polySolve();\n int dd2 = 0, dd3 = 0;\n String d1 = \"\", d2 = \"\", d3 = \"\";\n this.da = 3 * this.a;\n this.db = 2 * this.b;\n this.dc = this.c;\n if (this.degree == 3) {\n d1 = \"dy/dx = \" + this.da + \"x^2 \";\n if (this.b == 0) {\n dd2 = 1;\n } else {\n if (this.db > 0) {\n d2 = \"+ \" + this.db + \"x \";\n } else {\n d2 = \"- \" + -this.db + \"x \";\n }\n }\n if (this.c == 0) {\n dd3 = 1;\n } else {\n if (this.dc > 0) {\n d3 = \"+ \" + this.dc;\n } else {\n d3 = \"- \" + -this.dc;\n }\n }\n if (dd2 == 0 && dd3 == 0) {\n this.diff = d1 + d2 + d3;\n }\n if (dd2 == 0 && dd3 == 1) {\n this.diff = d1 + d2;\n }\n if (dd2 == 1 && dd3 == 1) {\n this.diff = d1;\n }\n if (dd2 == 1 && dd3 == 0) {\n this.diff = d1 + d3;\n }\n\n }\n if (this.degree == 2) {\n d1 = \"dy/dx = \" + this.db + \"x \";\n if (this.dc == 0) {\n this.diff = d1;\n } else {\n if (this.dc > 0) {\n this.diff = d1 + \"+\" + this.dc;\n } else {\n this.diff = d1 + \"-\" + -this.dc;\n }\n }\n }\n if (this.degree == 1) {\n this.diff = \"dy/dx = \" + this.c;\n }\n if (this.degree == 0) {\n this.diff = \"dy/dx = \" + 0;\n }\n\n }",
"public static double SigmoidDerivative(double x) {\n return Sigmoid(x)*(1-Sigmoid(x));\n }",
"private void calcDVOWDNa(\n final Line line1,\n final Line line2,\n final Point point1,\n final Point point2) {\n\n\n double average_x = (point1.x + point2.x) / 2.0;\n\n this.p1 = new Point(\n (point1.x + average_x) / 2.0,\n line1.a * (point1.x + average_x) / 2.0 + line1.b);\n\n this.p3 = new Point(\n (point2.x + average_x) / 2.0,\n line2.a * (point2.x + average_x) / 2.0 + line2.b);\n\n Line median = Line.fromPoints(p1, p3);\n this.p2 = new Point(average_x, median.eval(average_x));\n\n assert p3.y <= Math.max(point2.y, point1.y);\n assert p1.y <= Math.max(point2.y, point1.y);\n assert p3.y >= Math.min(point2.y, point1.y);\n assert p1.y >= Math.min(point2.y, point1.y);\n\n this.type = Type.bernstein;\n this.p0 = new Point(point1);\n this.p4 = new Point(point2);\n\n //return(f);\n }",
"public Derivative evaluate(State initial, double t, double dt, Derivative d)\n\t{\n\n\t\tState state = initial;\n\t state.position = initial.position.add(d.dx.scale(dt));\n\t state.momentum = initial.momentum.add(d.dv.scale(dt)); \n\n\t Derivative output = new Derivative();\n\t output.dx = state.momentum;\n\t output.dv = state.efield.scale(state.charge);\n\t return output;\n\t}",
"public NNMatrix sigmoidDerivative() {\n final double data[] = getData();\n double s, x;\n for (int i = 0; i < data.length; i++) {\n x = data[i];\n // sigmoid function\n s = 1 / (1 + Math.exp(-x));\n // sigmoid derivative\n data[i] = s * (1 - s);\n }\n\n return new NNMatrix(numRows(), numCols(), data);\n }",
"@Override\n\tpublic Function derivative() {\n\t\tderivativeConstants[0] = 0;\n\t\tfor (int i = 0; i < constants.length - 1; i++) {\n\t\t\tderivativeConstants[i + 1] = constants[i] * (constants.length - i - 1);\n\t\t}\n\t\treturn new Polynomial(derivativeConstants);\n\t}",
"@Test\n\tpublic void test() {\n\t\tdouble delta = 0.00001;\n\t\tSnp fakeSnp1 = new Snp(\"fakeId1\", 0, 0.3);\n\t\tSnp fakeSnp2 = new Snp(\"fakeId2\", 0, 0.8);\n\t\tSnp fakeSnp3 = new Snp(\"fakeId3\", 0, 1.4);\n\t\tPascal.set.withZScore_=true;\n\t\tArrayList<Snp> geneSnps = new ArrayList<Snp>();\n\t\tgeneSnps.add(fakeSnp1);geneSnps.add(fakeSnp2);geneSnps.add(fakeSnp3);\n\t\tDenseMatrix ld= new DenseMatrix(3,3);\n\t\t//DenseMatrix crossLd= new DenseMatrix(3,2);\n\t\t\n\t\tArrayList<Double> snpScores = new ArrayList<Double>(3);\n\t\tsnpScores.add(fakeSnp1.getZscore());\n\t\tsnpScores.add(fakeSnp2.getZscore());\n\t\tsnpScores.add(fakeSnp3.getZscore());\n\t\t//ld and crossLd calculated as follows:\n\t\t// make 0.9-toeplitz mat of size 5.\n\t\t// 3,4,5 for ld-mat\n\t\t// 1,2 for crossLd-mat\n\t\tld.set(0,0,1);ld.set(1,1,1);ld.set(2,2,1);\n\t\tld.set(0,1,0.9);ld.set(1,2,0.9);\n\t\tld.set(1,0,0.9);ld.set(2,1,0.9);\n\t\tld.set(0,2,0.81);\n\t\tld.set(2,0,0.81);\n\t\tdouble[] weights = {2,2,2};\n\t\tAnalyticVegas myAnalyticObj= null;\n\t\t//UpperSymmDenseMatrix myMatToDecompose = null;\n\t\tdouble[] myEigenvals = null;\n\t\tdouble[] emptyWeights = {1,1,1};\n\t\tmyAnalyticObj= new AnalyticVegas(snpScores, ld, emptyWeights);\n\t\tmyAnalyticObj.computeScore();\n\t\tmyEigenvals = myAnalyticObj.computeLambda();\n\t\tassertEquals(myEigenvals[0],2.74067, delta);\n\t\tassertEquals(myEigenvals[1],0.1900, delta);\n\t\tassertEquals(myEigenvals[2],0.06932, delta);\n\t\t\n\t\tmyAnalyticObj= new AnalyticVegas(snpScores, ld, weights);\n\t\tmyAnalyticObj.computeScore();\n\t\tmyEigenvals = myAnalyticObj.computeLambda();\t\t\t\n\t\tassertEquals(myEigenvals[0], 5.481348, delta);\n\t\tassertEquals(myEigenvals[1],0.380000, delta);\n\t\tassertEquals(myEigenvals[2],0.138652, delta);\n\t\t\t\n\t\tdouble[] weights2 = {1,2,0.5};\n\t\t\n\t\tmyAnalyticObj= new AnalyticVegas(snpScores, ld, weights2);\n\t\tmyAnalyticObj.computeScore();\n\t\tmyEigenvals = myAnalyticObj.computeLambda();\t\t\n\t\tassertEquals(myEigenvals[0],3.27694674, delta);\n\t\tassertEquals(myEigenvals[1],0.1492338, delta);\n\t\tassertEquals(myEigenvals[2],0.07381938, delta);\t\t\t\n\t\t\n\t}",
"public static double nextDouble (RandomStream s, double alpha,\n double lambda, double delta) {\n return WeibullDist.inverseF (alpha, lambda, delta, s.nextDouble());\n }",
"private static float[] qinv(float[] d, float[] s) {\n \td[0] = s[0];\n \td[1] = -s[1];\n \td[2] = -s[2];\n \td[3] = -s[3];\n \treturn(d);\n }",
"public double derivativeCustomSigmoid(double x){\n return (1.0/(mArgB - mArgA)) * (customSigmoid(x) - mArgA) * (mArgB - customSigmoid(x));\n }",
"private double f(double v, double s) {\n\t\treturn equation(v) - s;\r\n\t}",
"@Override\n\tpublic double[] getDx() {\n\t double object[] = new double[2];\n\t for(int i = 0; i < x.length; i++){\n\t object[0] += theta[0] + theta[1] * x[i] - y[i];\n\t object[1] += (theta[0] + theta[1] * x[i] - y[i])*x[i];\n\t }\n\t theta[0] -= eta * object[0];\n\t theta[1] -= eta * object[1];\n\n\t return theta;\n }",
"private double[] getOutputWeightDerivs () {\n\t\tdouble[] weightDerivs = new double[synapses[1][0].length];\n\n\t\tfor (int i = 0; i < weightDerivs.length; i++) {\n\t\t\tweightDerivs[i] = getOutputSumDerivForWeights()[i] * getOutputResultDeriv();\n\t\t}\n\t\treturn weightDerivs;\n\t}",
"private double fd(double x) {\r\n if(x<0){\r\n double x1 = x*-1;\r\n return interpretadorD.getResultado(\"!\"+x1);\r\n }\r\n return interpretadorD.getResultado(x);\r\n }",
"private double f1(double x) {\n return Math.exp(-x) * Math.pow(Math.sin(x), 5);\n }",
"public static void main(String[] args) throws FileNotFoundException\n {\n IEnergyModel pot = potNew.multivariateFromExpression(new String[]{\"x\",\"y\"},\n \"1/4 x^4 - 1/2 x^2 + 1/2 y^2\", // function expression\n \"x^3-x\", \"y\"); // derivatives\n // integrator\n IDoubleArray masses = doublesNew.arrayFrom(1.0, 1.0);\n double dt = 0.1, gamma = 1, kT = 0.2;\n IIntegratorThermostatted langevin = dynNew.langevinLeapFrog(pot, masses, 0.1, gamma, kT);\n // run\n IDoubleArray x0 = doublesNew.arrayFrom(0,0);\n int nsteps = 100000, nsave = 10;\n IDataSequence seq = dyn.run(x0, langevin, nsteps, nsave);\n \n // TICA\n int lag = 1;\n TICA tica = new TICA(lag);\n tica.addData(seq);\n tica.computeTransform();\n \n System.out.println(\"mean: \\t\"+doubles.toString(tica.getMeanVector(), \"\\t\"));\n System.out.println(\"cov: \\t\"+doubles.toString(tica.getCovarianceMatrix(), \"\\t\", \"\\n\"));\n System.out.println(\"covTau: \\t\"+doubles.toString(tica.getCovarianceMatrixLagged(), \"\\t\", \"\\n\"));\n System.out.println();\n System.out.println(\"eval: \\t\"+doubles.toString(tica.getEigenvalues(), \"\\t\"));\n System.out.println(\"evec1: \\t\"+doubles.toString(tica.getEigenvector(0), \"\\t\"));\n System.out.println(\"evec2: \\t\"+doubles.toString(tica.getEigenvector(1), \"\\t\"));\n \n tica.setDimension(1);\n IDoubleArray y1 = tica.transform(doublesNew.arrayFrom(2,2));\n System.out.println(\"y1 = \\t\"+doubles.toString(y1, \"\\t\"));\n\n IDoubleArray y2 = tica.transform(doublesNew.arrayFrom(4,4));\n System.out.println(\"y2 = \\t\"+doubles.toString(y2, \"\\t\"));\n }",
"@Test\n public void test02() throws Throwable {\n RegulaFalsiSolver regulaFalsiSolver0 = new RegulaFalsiSolver(4956.642689288169, 1711.029259737);\n Log1p log1p0 = new Log1p();\n AllowedSolution allowedSolution0 = AllowedSolution.LEFT_SIDE;\n double double0 = regulaFalsiSolver0.solve(2044, (UnivariateRealFunction) log1p0, (-517.825700479), (double) 0, 1711.029259737, allowedSolution0);\n double double1 = regulaFalsiSolver0.doSolve();\n }",
"public static void main(String[] args)\n {\n OneVarParameterizedFunction polynomial; \n\n double coef[] = { 1, 2, 3, 4 };\n polynomial = new Polynomial( coef );\n\n String par_name[] = polynomial.getParameterNames();\n\n System.out.println( \"Polynomial: \" );\n for ( int i = 0; i < par_name.length; i++ )\n System.out.println(par_name[i] + \" = \" + coef[i] );\n\n double x;\n for ( int i = 0; i <= 10; i++ )\n {\n x = i;\n System.out.println( \"x = \" + x + \n \", p(x) = \" + polynomial.getValue(x) +\n \", p'(x) = \" + polynomial.get_dFdx(x) +\n \", fp'(x) = \" + polynomial.get_dFdx((float)x) );\n }\n\n x = 3;\n double derivs[] = polynomial.get_dFda( x );\n System.out.println( \"At \" + x + \n \", the derivatives relative to the coeffs are:\");\n for ( int i = 0; i < par_name.length; i++ )\n System.out.println(\"deriv WRT \" + par_name[i] + \" = \" + derivs[i]);\n\n/*\n \n DataSet ds = new DataSet( \"Sample Polynomials\", \"Initial Version\" );\n\n XScale x_scale = new UniformXScale( -5, 5, 500 );\n Data polynomial_data; \n for ( int i = 0; i < 100; i++ )\n {\n double a = -5+i/10.0f;\n double coefficients[] = { a*a, -2*a, 1 };\n polynomial = new Polynomial( coefficients );\n polynomial_data = new FunctionModel( x_scale, polynomial, i );\n ds.addData_entry( polynomial_data );\n }\n ViewManager vm = new ViewManager( ds, IViewManager.IMAGE );\n*/\n }",
"public double get_dFdx( double x )\n {\n if ( domain.contains( (float)x ) )\n {\n double sum = 0.0;\n for ( int i = parameters.length - 2; i >= 0; i-- )\n sum = x * sum + (i+1) * parameters[i+1];\n return sum;\n }\n else\n return 0;\n }",
"private final float svd(Matrix3f rot) {\n\t\n \t// this is a simple svd.\n \t// Not complete but fast and reasonable.\n\n\t\t// SVD scale factors(squared) are the 3 roots of\n\t\t// \n\t\t// | xI - M * MT | = 0.\n\t\t// \n\t\t// This will be expanded as follows\n\t\t// \n\t\t// x^3 - A * x^2 + B * x - C = 0\n\t\t// \n\t\t// where A, B, C can be denoted by 3 roots x0, x1, x2.\n\t\t//\n\t\t// A = (x0 + x1 + x2), B = (x0 * x1 + x1 * x2 + x2 * x0), C = x0 * x1 * x2.\n\t\t//\n\t\t// An avarage of x0,x1,x2 is needed here. C^(1/3) is a cross product normalization factor.\n\t\t// So here, I use A/3. Note that x should be sqrt'ed for the actual factor.\n\n \tfloat s = (float)Math.sqrt((this.m00 * this.m00 + this.m10 * this.m10 + this.m20 * this.m20 + \n \t\t\t\t\t\t\t\tthis.m01 * this.m01 + this.m11 * this.m11 + this.m21 * this.m21 +\n \t\t\t\t\t\t\t\tthis.m02 * this.m02 + this.m12 * this.m12 + this.m22 * this.m22) / 3.0D);\n\n \t// zero-div may occur.\n \tfloat t = (s == 0.0F ? 0.0F : 1.0F / s);\n\n \tif(rot != null) {\n \t\t\n \t\tif(rot != this) {\n \t\t\t\n \t\t\trot.set(this);\n \t\t}\n \t\t\n \t\trot.mul(t);\n \t}\n\n \treturn s;\n }",
"public double[] monteCarloStandardDeviations(){\n if(!this.monteCarloDone)this.monteCarlo();\n return this.randomEigenValuesSDs;\n }",
"public void logDose() {\n List<Double> standardPattern = new ArrayList<>();\n for (double point : CORTISOL_PATTERN) {\n standardPattern.add(point);\n }\n logDoseList = logarithmTable2(standardPattern);\n }",
"public double subTanSlope(double x) {\n this.subDif();\n this.subtanslope = this.das * x * x + this.dbs * x + this.dcs;\n return this.subtanslope;\n\n }",
"public static double f(double z){\n return 1 / (1 + Math.exp(-z));\n }",
"public RealValuedFunctTwoOps deriv11() {\n\treturn new RealValuedFunctTwoOps() {\n\t public double valueAt(double x, double y) {\n\t\treturn RealValuedFunctionTwo.this.deriv11At(x, y);\n\t }\n\t};\n }",
"final double ssfn(double phi, double sinphi) {\r\n sinphi *= excentricity;\r\n return tan(PI/4 + phi/2.0) * pow((1-sinphi) / (1+sinphi), excentricity/2.0);\r\n }",
"public Vector3D[] deriv(Vector3D[] y, Vector3D acceleration, double dt) {\n Vector3D[] doty = new Vector3D[2];\n doty[0] = y[1].scale(dt);\n doty[1] = acceleration.scale(dt);\n return doty;\n }",
"public Polynomial getDerivative() {\n double[] derCoefs = new double[coefs.length - 1];\n for (int i = 1; i < coefs.length; i++) {\n derCoefs[i - 1] = i * coefs[i];\n }\n return new Polynomial(derCoefs);\n }",
"public static void main(String[] args) {\n double x0=Math.PI/2;\n double dx=0.01;\n double f1;\n double f2;\n double m;\n\n double dr;\n f1=Math.cos(x0+dx);\n f2=Math.cos(x0-dx);\n m= Math.cos(x0)*2;\n dr=((f1)-(m)+(f2))/(dx*dx);\n\n System.out.println(dr);\n\n\n }",
"private Complex[] find_Hy_fields_down(double xValNm){\r\n\t\t// forward wave\r\n\t\tComplex amp_forward = new Complex(0,0) ;\r\n\t\tComplex Hy_field_forward = minusJ.times(kx_down()).times(xValNm*1e-9).exp().times(amp_forward); // forward wave: -j*k_x\r\n\t\t// backward wave\r\n\t\tComplex amp_backward = new Complex(1,0) ; \r\n\t\tComplex Hy_field_backward = plusJ.times(kx_down()).times(xValNm*1e-9).exp().times(amp_backward); // backward wave: +j*k_x\r\n\t\treturn new Complex[] {Hy_field_forward, Hy_field_backward} ;\r\n\t}",
"public NonLinear(double[] x, double[] y, double sigma,\n\t\t\t RealValuedFunctionVA rf,\n\t\t\t Config config,\n\t\t\t double[] guess)\n\t{\n\t this.rf = rf;\n\n\t int n = rf.minArgLength() - 1;\n\t extendedParameters = new double[n+1];\n\t double[] ourGuess = new double[n];\n\t setParameters(ourGuess);\n\n\t if (config == null) config = defaultConfig;\n\n\t if (guess != null) {\n\t\tif (guess.length < ourGuess.length) {\n\t\t throw new IllegalArgumentException\n\t\t\t(errorMsg(\"gTooShort\", guess.length, ourGuess.length));\n\n\t\t}\n\t\tSystem.arraycopy(guess, 0, ourGuess, 0, ourGuess.length);\n\t }\n\n\t // y before x is the LMA convention.\n\t double sumsq = LMA.findMin(rf, LMA.Mode.LEAST_SQUARES,\n\t\t\t\t ourGuess, config.lambda, config.nu,\n\t\t\t\t config.limit,\n\t\t\t\t config.iterationLimit, y, x);\n\t System.arraycopy(ourGuess, 0, extendedParameters, 1, n);\n\n\t double[][] J = new double[x.length][];\n\t double[][] H = new double[n][n];\n\t for (int i = 0; i < x.length; i++) {\n\t\textendedParameters[0] = x[i];\n\t\tJ[i] = rf.jacobian(1,extendedParameters);\n\t }\n\t Adder.Kahan adder = new Adder.Kahan();\n\t Adder.Kahan.State state = adder.getState();\n\t for (int i = 0; i < n; i++) {\n\t\tfor (int j = 0; j < n; j++) {\n\t\t adder.reset();\n\t\t for (int k = 0; k < x.length; k++) {\n\t\t\tdouble term = J[k][i]*J[k][j];\n\t\t\tdouble yy = term - state.c;\n\t\t\tdouble t = state.total + yy;\n\t\t\tstate.c = (t - state.total) - yy;\n\t\t\tstate.total = t;\n\t\t }\n\t\t H[i][j] = state.total;\n\t\t}\n\t }\n\t decomp = new CholeskyDecomp(H, H);\n\t if (x.length == n) {\n\t\tsetChiSquare(0.0);\n\t\tsetDegreesOfFreedom(0);\n\t\tsetReducedChiSquare(Double.POSITIVE_INFINITY);\n\t\tsetVariance(0.0);\n\t\t/*\n\t\tdouble[][] cv = getCovarianceArray();\n\t\tfor (int i = 0; i < n; i++) {\n\t\t for (int j = 0; j < n; j++) {\n\t\t\tcv[i][j] = 0.0;\n\t\t }\n\t\t}\n\t\t*/\n\t } else {\n\t\tdouble sigma2 = sigma*sigma;\n\t\tdouble chiSq = LeastSquaresFit.chiSquare(this, x, y, sigma);\n\t\tsetChiSquare(chiSq);\n\t\tsetDegreesOfFreedom(x.length - n);\n\t\tsetReducedChiSquare(chiSq/(x.length-n));\n\t\t// We didn't include the factor of sigma2 in the previous\n\t\t// matrices, and just fix up the value here, so as to\n\t\t// avoid some additional arithmetic while computing the\n\t\t// parameters.\n\t\tsetVariance(sigma2);\n\t\t/*\n\t\tdouble[][] cv = getCovarianceArray();\n\t\tfor (int i = 0; i < n; i++) {\n\t\t for (int j = 0; j < n; j++) {\n\t\t\tcv[i][j] *= sigma2;\n\t\t }\n\t\t}\n\t\t*/\n\t }\n\t}",
"private double calculateXDerivative(double x, double y, double r, double r2, double phi, double deltaPhi)\n\t{\n\t\treturn 2*((a*b*Math.exp(b*(deltaPhi+phi))*y)/r2 + x/r) * (-a*Math.exp(b*(deltaPhi+phi)) + r);\n\t}",
"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 }",
"public void determined0d1() {\n\n\t\tint upperBound = (int) (Math.log(this.numNVertices + this.numWVertices)); // pg 184 in paper\n\n\t\tthis.d0 = upperBound / 2;\n\t\tthis.d1 = upperBound;\n\n\t}",
"public void getGradient(Surface srf)\r\n {\r\n srf.x1 = firstPoint.x;\r\n srf.y1 = firstPoint.y;\r\n srf.x2 = secondPoint.x;\r\n srf.y2 = secondPoint.y;\r\n srf.gradientColor = secondColor;\r\n srf.cyclic = cyclic;\r\n srf.reversed = reversed;\r\n }",
"public NonLinear(double[] x, double[] y, double[] sigma,\n\t\t\t RealValuedFunctionVA rf,\n\t\t\t Config config, double[] guess)\n\t{\n\t this.rf = rf;\n\n\t int n = rf.minArgLength() - 1;\n\t extendedParameters = new double[n+1];\n\t double[] ourGuess = new double[n];\n\t setParameters(ourGuess);\n\n\t if (config == null) config = defaultConfig;\n\n\t if (guess != null) {\n\t\tif (guess.length < ourGuess.length) {\n\t\t throw new IllegalArgumentException\n\t\t\t(errorMsg(\"gTooShort\", guess.length, ourGuess.length));\n\n\t\t}\n\t\tSystem.arraycopy(guess, 0, ourGuess, 0, ourGuess.length);\n\t }\n\n\t // y before x is the LMA convention.\n\t double sumsq = LMA.findMin(rf, LMA.Mode.WEIGHTED_LEAST_SQUARES,\n\t\t\t\t ourGuess, config.lambda, config.nu,\n\t\t\t\t config.limit,\n\t\t\t\t config.iterationLimit, y, sigma, x);\n\t System.arraycopy(ourGuess, 0, extendedParameters, 1, n);\n\n\t double[][] J = new double[x.length][];\n\t double[][] H = new double[n][n];\n\t for (int i = 0; i < x.length; i++) {\n\t\textendedParameters[0] = x[i];\n\t\tJ[i] = rf.jacobian(1,extendedParameters);\n\t }\n\t Adder.Kahan adder = new Adder.Kahan();\n\t Adder.Kahan.State state = adder.getState();\n\t for (int i = 0; i < n; i++) {\n\t\tfor (int j = 0; j < n; j++) {\n\t\t adder.reset();\n\t\t for (int k = 0; k < x.length; k++) {\n\t\t\tdouble sk = sigma[k];\n\t\t\tdouble term = J[k][i]*J[k][j] / (sk*sk);\n\t\t\tdouble yy = term - state.c;\n\t\t\tdouble t = state.total + yy;\n\t\t\tstate.c = (t - state.total) - yy;\n\t\t\tstate.total = t;\n\t\t }\n\t\t H[i][j] = state.total;\n\t\t}\n\t }\n\t decomp = new CholeskyDecomp(H, H);\n\t if (x.length == n) {\n\t\tsetChiSquare(0.0);\n\t\tsetDegreesOfFreedom(0);\n\t\tsetReducedChiSquare(Double.POSITIVE_INFINITY);\n\t\tsetVariance(0.0);\n\t } else {\n\t\tdouble chiSq = LeastSquaresFit.chiSquare(this, x, y, sigma);\n\t\tsetChiSquare(chiSq);\n\t\tsetDegreesOfFreedom(x.length - n);\n\t\tsetReducedChiSquare(chiSq/(x.length-n));\n\t }\n\t}",
"public static InstrumentDerivativeVisitor<MulticurveProviderInterface, double[]> getInstance() {\n return INSTANCE;\n }",
"public void subDif() {\n this.polySubSolve();\n int dd2 = 0, dd3 = 0;\n String d1 = \"\", d2 = \"\", d3 = \"\";\n this.das = 3 * this.asub;\n this.dbs = 2 * this.bsub;\n this.dcs = this.csub;\n if (this.subdegree == 3) {\n d1 = \"dy/dx = \" + this.das + \"x^2 \";\n if (this.bsub == 0) {\n dd2 = 1;\n } else {\n if (this.dbs > 0) {\n d2 = \"+ \" + this.dbs + \"x \";\n } else {\n d2 = \"- \" + -this.dbs + \"x \";\n }\n }\n if (this.csub == 0) {\n dd3 = 1;\n } else {\n if (this.dcs > 0) {\n d3 = \"+ \" + this.dcs;\n } else {\n d3 = \"- \" + -this.dcs;\n }\n }\n if (dd2 == 0 && dd3 == 0) {\n this.subdiff = d1 + d2 + d3;\n }\n if (dd2 == 0 && dd3 == 1) {\n this.subdiff = d1 + d2;\n }\n if (dd2 == 1 && dd3 == 1) {\n this.subdiff = d1;\n }\n if (dd2 == 1 && dd3 == 0) {\n this.subdiff = d1 + d3;\n }\n\n }\n if (this.subdegree == 2) {\n d1 = \"dy/dx = \" + this.dbs + \"x \";\n if (this.dcs == 0) {\n this.subdiff = d1;\n } else {\n if (this.dcs > 0) {\n this.subdiff = d1 + \"+\" + this.dcs;\n } else {\n this.subdiff = d1 + \"-\" + -this.dcs;\n }\n }\n }\n if (this.subdegree == 1) {\n this.subdiff = \"dy/dx = \" + this.csub;\n }\n if (this.subdegree == 0) {\n this.subdiff = \"dy/dx = \" + 0;\n }\n\n }",
"private double[] getOutputSumDerivsForHiddenOutput() {\n\t\t//dOutputSum/dHiddenOutput\n\t\tdouble[] outputSumDerivs = new double[synapses[1][0].length];\n\t\t\n\t\tfor (int i = 0 ; i < outputSumDerivs.length; i++) {\n\t\t\toutputSumDerivs[i] = synapses[1][0][i].getWeight();\n\t\t}\n\t\t\n\t\treturn outputSumDerivs;\n\t}",
"@Override\r\n public Polynomial derivative() {\r\n Polynomial x = this.filter(t -> {\r\n Term term = (Term) t;\r\n return term.getPower() != 0;\r\n }).map(t -> {\r\n Term term = (Term) t;\r\n return new Term(term.getCoefficient() * term.getPower(), term.getPower() - 1);\r\n });\r\n return x;\r\n }",
"private float vec_stdDevMod(float[] v, int n)\n\t{\n\t\tfloat iqr, med;\n\t\tfloat lb, ub;\n\t\tlong i;\n\t \n\t\tArrays.sort(v);\n\t\tmed = v[(int)(n/2)]; \n\t\tiqr = v[(int)(3*n/4)] - v[(int)(n/4)];\n\t\tlb = med - (float)2.0*iqr; ub = med + (float)2.0*iqr;\n\t \n\t\treturn vec_stdDevBounded(v,n,lb,ub);\n\t}",
"public void dorcsd_(CHARACTER JOBU1,CHARACTER JOBU2,CHARACTER JOBV1T,CHARACTER JOBV2T,CHARACTER TRANS,CHARACTER SIGNS,INTEGER M,INTEGER P,INTEGER Q,double[] X11,INTEGER LDX11,double[] X12,INTEGER LDX12,double[] X21,INTEGER LDX21,double[] X22,INTEGER LDX22,double[] THETA,double[] U1,INTEGER LDU1,double[] U2,INTEGER LDU2,double[] V1T,INTEGER LDV1T,double[] V2T,INTEGER LDV2T,double[] WORK,INTEGER LWORK,int[] IWORK,INTEGER INFO);",
"public static DamageFunction of(final DamageModifier first, final DoubleUnaryOperator second) {\n return new DamageFunction(first, second);\n }",
"public float gradientMethod(Slice slice) \n\t{\n\t\t//\n\t\t// Intialize variables.\n\t\t//\n\t\tint nrows = slice.getNRows();\n\t\tint ncols = slice.getNCols();\n\n\t\tfloat[] v = new float[nrows*ncols]; int v_numset = 0;\n\t\tfloat t = (float)0.0; \n\t\tfloat sig_y = (float)0.0;\n\t\tfloat sig_x = (float)0.0;\n\n\t\t//\n\t\t// Compute the column gradient\n\t\t//\n\t\tfor(int row=0; row<nrows; row++) {\n\t\t\tfor(int col=1; col<ncols-1; col++) {\n\t\t\t\tt = slice.getData(row,col+1) - (float)2.0 * slice.getData(row,col) + slice.getData(row,col-1);\n\n\t\t\t\tif( t != (float)0.0 || slice.getData(row,col) != (float)0.0 ) {\n\t\t\t\t\tv[v_numset] = t; v_numset++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif( v_numset <= 10 ) {\n\t\t\tsig_y = (float)0.0;\n\t\t}\n\t\telse {\n\t\t\tsig_y = vec_stdDevMod(v, v_numset);\n\t\t}\n\n\t\tv_numset = 0;\n\n\t\t//\n\t\t// Compute the row gradient\n\t\t//\n\t\tfor(int col=0; col<ncols; col++) {\n\t\t\tfor(int row=1; row<nrows-1; row++) {\n\t\t\t\tt = slice.getData(row+1,col) - (float)2.0 * slice.getData(row,col) + slice.getData(row-1,col);\n\n\t\t\t\tif( t != (float)0.0 || slice.getData(row,col) != (float)0.0 ) {\n\t\t\t\t\tv[v_numset] = t; v_numset++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif( v_numset <= 10 ) {\n\t\t\tsig_x = (float)0.0;\n\t\t}\n\t\telse {\n\t\t\tsig_x = vec_stdDevMod(v, v_numset);\n\t\t}\n\n\t\treturn (float)Math.sqrt( (double)(sig_x * sig_x + sig_y * sig_y) ) / (float)2.0;\n\t}",
"public double getLogProbabilityDerivativeSum(double[][] logProbabilityDerivatives){\n\n\t\tint xLength = logProbabilityDerivatives.length;\n\t\tint yLength = logProbabilityDerivatives[0].length;\n\t\tdouble sum = 0.0;\n\t\tfor(int i = 0; i < xLength; i++){\n\t\t\tfor(int j = 0; j < yLength; j++){\n\t\t\t\tsum += logProbabilityDerivatives[i][j];\n\t\t\t}\n\t\t}\n\n\t\treturn sum;\n\t}",
"@Override\n public void computeDerivatives(double t, double[] Bt, double[] BDot) {\n // Copy Bt to biomass, setting biomass below extinction threshold to 0\n // (Copying because API doesn't specify whether state vector Bt can be modified)\n for (int i = 0; i < nodeCount; i++) {\n biomass[i] = Bt[i] < EXTINCT ? 0.0 : Bt[i];\n }\n\n computeFunctionalResponse();\n computeGrowthFunction();\n computeProducerDerivatives(BDot);\n computeConsumerDerivatives(BDot);\n\n // Save derivatives for use by event handlers\n this.currentDerivatives = BDot;\n }",
"public double deriv12At(double arg1, double arg2) throws\n\tIllegalArgumentException, UnsupportedOperationException,\n\tIllegalStateException\n {\n\tif (function12 != null) {\n\t return function12.valueAt(arg1, arg2);\n\t}\n\tif (context == null && object == null)\n\t throw new UnsupportedOperationException\n\t\t(errorMsg(\"functionNotSupported\"));\n\ttry {\n\t if (object != null && object instanceof RealValuedFunctionTwo) {\n\t\tRealValuedFunctionTwo f = (RealValuedFunctionTwo)object;\n\t\treturn f.deriv12At(arg1, arg2);\n\t }\n\t if (context == null) throw new UnsupportedOperationException\n\t\t\t\t (errorMsg(\"functionNotSupported\"));\n\t Object result;\n\t if (f12name != null) {\n\t\tresult = context.callScriptFunction(f12name, arg1, arg2);\n\t } else {\n\t\tif (object == null) throw new UnsupportedOperationException\n\t\t\t\t\t(errorMsg(\"functionNotSupported\"));\n\t\tresult = context.callScriptMethod(object, \"deriv12At\",\n\t\t\t\t\t\t arg1, arg2);\n\t }\n\t if (result instanceof Number) {\n\t\treturn ((Number) result).doubleValue();\n\t } else {\n\t\tthrow new UnsupportedOperationException\n\t\t (errorMsg(\"numberNotReturned\"));\n\t }\n\t} catch (ScriptException e) {\n\t String msg = errorMsg(\"callFailsArg2\", arg1, arg2);\n\t throw new IllegalArgumentException(msg, e);\n\t} catch (NoSuchMethodException e) {\n\t String msg = errorMsg(\"opNotSupported\");\n\t throw new UnsupportedOperationException(msg, e);\n\t}\n }",
"private void calcDilution() {\n \t\t\tdouble dilutionFactor = dilVol.getValue() / postBoilVol.getValue();\n \t\t\tdilIbu = ibu / dilutionFactor;\n \t\t\tdilAlc = alcohol / dilutionFactor;\n \t\t\tdilOG = ((estOg - 1) / dilutionFactor) + 1;\n \t\t\tdilSrm = srm / dilutionFactor;\n \n \t\t}",
"public void SvdParameters() {\n\n\t\tSystem.out.print(\"p |\");\n\t\tfor (int i = 0; i < rank; i++) {\n\t\t\tSystem.out.printf(\"%6d\", i);\n\t\t}\n\t\tSystem.out.println();\n\n\t\tSystem.out.print(\"Max error |\");\n\t\tfor (int i = 0; i < rank; i++) {\n\t\t\tSystem.out.printf(\"%6.1f\", maxerror[i]);\n\t\t}\n\t\tSystem.out.println();\n\n\t\tSystem.out.print(\"Mean error |\");\n\t\tfor (int i = 0; i < rank; i++) {\n\t\t\tSystem.out.printf(\"%6.1f\", meanerror[i]);\n\t\t}\n\t\tSystem.out.println();\n\n\t\tSystem.out.print(\"Compression,%|\");\n\t\tfor (int i = 0; i < rank; i++) {\n\t\t\tif (ratio[i] > 0)\n\t\t\t\tSystem.out.printf(\"%6.1f\", ratio[i]);\n\t\t\telse\n\t\t\t\tSystem.out.printf(\" n/a \");\n\t\t}\n\t\tSystem.out.println();\n\t}",
"public void ResetColorGradient_ds2() {\r\n\t\tdouble min;\r\n\t\tdouble max;\r\n\t\tdouble median;\r\n\r\n\t\tswitch(transformation) {\r\n\t\t\tcase ROWNORM:\r\n\t\t\t\tmin = minExpression_rownorm_ds2;\r\n\t\t\t\tmax = maxExpression_rownorm_ds2;\r\n\r\n\t\t\t\t//if both row normalization values are zero, can't perform row normalization\r\n\t\t\t\t//issue warning\r\n\t\t\t\t//This happens when there is only one data column in the dataset (or if it is rank file)\r\n\t\t\t\tif((min == 0) && (max == 0)) {\r\n\t\t\t\t\t//JOptionPane.showMessageDialog(Cytoscape.getDesktop(),\"Row normalization does not work with only one data column per dataset.\",\"Row normalization error\",JOptionPane.WARNING_MESSAGE);\r\n\t\t\t\t}\r\n\t\t\t\tmax = Math.max(Math.abs(min), max);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase LOGTRANSFORM:\r\n\r\n\t\t\t\t//can't take a log of a negative number\r\n\t\t\t\t//if both the max and min are negative then log tranform won't work.\r\n\t\t\t\t//issue a warning.\r\n\t\t\t\tif((minExpression_ds2 <= 0) && (maxExpression_ds2 <= 0)) {\r\n\t\t\t\t\t//both the max and min are probably negative values\r\n\t\t\t\t\t//JOptionPane.showMessageDialog(Cytoscape.getDesktop(),\"Both the max and min expression are negative, log of negative numbers is not valid\", \"log normalization error\", JOptionPane.WARNING_MESSAGE);\r\n\t\t\t\t\tmin = 0;\r\n\t\t\t\t\tmax = 0;\r\n\t\t\t\t}\r\n\t\t\t\t//if min expression is negative then use the max expression as the max\r\n\t\t\t\telse if(minExpression_ds2 <= 0) {\r\n\t\t\t\t\tmin = Math.min(Math.log(closestToZeroExpression_ds2), Math.log1p(maxExpression_ds2));\r\n\t\t\t\t\tmax = Math.max(Math.log(closestToZeroExpression_ds2), Math.log1p(maxExpression_ds2));\r\n\t\t\t\t}\r\n\t\t\t\t//if the max expression is negative then use the min expression as the max (should never happen!)\r\n\t\t\t\telse if(maxExpression_ds2 <= 0) {\r\n\t\t\t\t\tmin = 0;\r\n\t\t\t\t\tmax = Math.log1p(minExpression_ds2);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tmin = Math.log1p(minExpression_ds2);\r\n\t\t\t\t\tmax = Math.log1p(maxExpression_ds2);\r\n\t\t\t\t\tmax = Math.max(Math.abs(min), max);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase ASIS:\r\n\t\t\tdefault:\r\n\t\t\t\tmin = minExpression_ds2;\r\n\t\t\t\tmax = Math.max(Math.abs(minExpression_ds2), maxExpression_ds2);\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tmedian = max / 2;\r\n\t\tif(min >= 0) {\r\n\t\t\tmedian = max / 2;\r\n\t\t\trange_ds2 = ColorGradientRange.getInstance(0, median, median, max, 0, median, median, max);\r\n\t\t\ttheme_ds2 = ColorGradientTheme.GREEN_ONECOLOR_GRADIENT_THEME;\r\n\t\t} else {\r\n\t\t\tmedian = 0;\r\n\t\t\trange_ds2 = ColorGradientRange.getInstance(-max, 0, 0, max, -max, 0, 0, max);\r\n\t\t\ttheme_ds2 = ColorGradientTheme.GREEN_MAGENTA_GRADIENT_THEME;\r\n\t\t}\r\n\r\n\t}",
"@Override\r\n\tpublic double derivativeOf(double x) {\r\n\t\treturn ( 1 / (x - this.getLower_bound()) ) + ( 1 / (this.getUpper_bound() - x) ); \r\n\t}",
"public Milstein(SDE sde) {\n this.sde = sde;\n }",
"private double Phi(double z) {\r\n if (z < -8.0) return 0.0;\r\n if (z > 8.0) return 1.0;\r\n double sum = 0.0, term = z;\r\n for (int i = 3; sum + term != sum; i += 2) {\r\n sum = sum + term;\r\n term = term * z * z / i;\r\n }\r\n return 0.5 + sum * phi(z);\r\n }",
"private Point2D.Double calcReflection(Point2D.Double normalVec, Point2D.Double velocity)\n\t{\n\n\t\tdouble dotProd = calcDotProduct(normalVec, velocity);\n\t\tPoint2D.Double reflectVec = new Point2D.Double(velocity.getX() - 2 * dotProd * normalVec.getX(), \n\t\t\t\tvelocity.getY() - 2 * dotProd * normalVec.getY());\n\t\treturn reflectVec;\n\t}",
"public double deriv1At(double arg1, double arg2) throws\n\tIllegalArgumentException, UnsupportedOperationException,\n\tIllegalStateException\n {\n\tif (function1 != null) {\n\t return function1.valueAt(arg1, arg2);\n\t}\n\tif (context == null && object == null)\n\t throw new UnsupportedOperationException\n\t\t(errorMsg(\"functionNotSupported\"));\n\ttry {\n\t if (object != null && object instanceof RealValuedFunctionTwo) {\n\t\tRealValuedFunctionTwo f = (RealValuedFunctionTwo)object;\n\t\treturn f.deriv1At(arg1, arg2);\n\t }\n\t if (context == null) throw new UnsupportedOperationException\n\t\t\t\t (errorMsg(\"functionNotSupported\"));\n\t Object result;\n\t if (f1name != null) {\n\t\tresult = context.callScriptFunction(f1name, arg1, arg2);\n\t } else {\n\t\tif (object == null) throw new UnsupportedOperationException\n\t\t\t\t\t(errorMsg(\"functionNotSupported\"));\n\t\tresult = context.callScriptMethod(object, \"deriv1At\",\n\t\t\t\t\t\t arg1, arg2);\n\t }\n\t if (result instanceof Number) {\n\t\treturn ((Number) result).doubleValue();\n\t } else {\n\t\tthrow new UnsupportedOperationException\n\t\t (errorMsg(\"numberNotReturned\"));\n\t }\n\t} catch (ScriptException e) {\n\t String msg = errorMsg(\"callFailsArg2\", arg1, arg2);\n\t throw new IllegalArgumentException(msg, e);\n\t} catch (NoSuchMethodException e) {\n\t String msg = errorMsg(\"opNotSupported\");\n\t throw new UnsupportedOperationException(msg, e);\n\t}\n }",
"private double getExponentTerm(final double[] values) {\n //final double[] centered = new double[values.length];\n //for (int i = 0; i < centered.length; i++) {\n // centered[i] = values[i] - means[i];\n //}\n // I think they are already centered from earlier?\n //final double[] preMultiplied = covariance_rpt_inv_normal.multiply(values/*centered*/);\n double sum = 0;\n for (int i = 0; i < values.length; i++) {\n sum += (Math.exp(-0.5 * values[i]) / constant_normal);//centered[i];\n }\n return sum;\n }",
"public double addTanSlope(double x) {\n this.addDif();\n this.addtanslope = this.daa * x * x + this.dba * x + this.dca;\n return this.addtanslope;\n\n }",
"public static double nextDouble (RandomStream s, double mu, double sigma) {\n return NormalDist.inverseF (mu, sigma, s.nextDouble());\n }",
"public double getActivationFunctionDerivative() {\n\t\treturn nodeActivationFunction.getDerivative();\n\t}",
"@Override\n public Comparator<Object> thenComparingDouble(final ToDoubleFunction<?> p0) {\n // This method could not be decompiled.\n // \n // Could not show original bytecode, likely due to the same error.\n // \n // The error that occurred was:\n // \n // java.lang.NullPointerException\n // at com.strobel.assembler.metadata.WildcardType.containsGenericParameters(WildcardType.java:55)\n // at com.strobel.assembler.metadata.TypeReference.containsGenericParameters(TypeReference.java:48)\n // at com.strobel.assembler.metadata.MethodReference.containsGenericParameters(MethodReference.java:79)\n // at com.strobel.decompiler.ast.TypeAnalysis.inferCall(TypeAnalysis.java:2497)\n // at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:1029)\n // at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:803)\n // at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:778)\n // at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:1656)\n // at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:803)\n // at com.strobel.decompiler.ast.TypeAnalysis.runInference(TypeAnalysis.java:672)\n // at com.strobel.decompiler.ast.TypeAnalysis.runInference(TypeAnalysis.java:655)\n // at com.strobel.decompiler.ast.TypeAnalysis.runInference(TypeAnalysis.java:365)\n // at com.strobel.decompiler.ast.TypeAnalysis.run(TypeAnalysis.java:96)\n // at com.strobel.decompiler.ast.AstOptimizer.optimize(AstOptimizer.java:109)\n // at com.strobel.decompiler.ast.AstOptimizer.optimize(AstOptimizer.java:42)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:214)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:99)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createMethodBody(AstBuilder.java:782)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createMethod(AstBuilder.java:675)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.addTypeMembers(AstBuilder.java:552)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createTypeCore(AstBuilder.java:519)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createTypeNoCache(AstBuilder.java:161)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createType(AstBuilder.java:150)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.transformCall(AstMethodBodyBuilder.java:1162)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.transformByteCode(AstMethodBodyBuilder.java:1009)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.transformExpression(AstMethodBodyBuilder.java:540)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.transformByteCode(AstMethodBodyBuilder.java:554)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.transformExpression(AstMethodBodyBuilder.java:540)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.transformNode(AstMethodBodyBuilder.java:392)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.transformBlock(AstMethodBodyBuilder.java:333)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:294)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:99)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createMethodBody(AstBuilder.java:782)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createMethod(AstBuilder.java:675)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.addTypeMembers(AstBuilder.java:552)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createTypeCore(AstBuilder.java:519)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createTypeNoCache(AstBuilder.java:161)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createType(AstBuilder.java:150)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.addType(AstBuilder.java:125)\n // at com.strobel.decompiler.languages.java.JavaLanguage.buildAst(JavaLanguage.java:71)\n // at com.strobel.decompiler.languages.java.JavaLanguage.decompileType(JavaLanguage.java:59)\n // at us.deathmarine.luyten.FileSaver.doSaveJarDecompiled(FileSaver.java:192)\n // at us.deathmarine.luyten.FileSaver.access$300(FileSaver.java:45)\n // at us.deathmarine.luyten.FileSaver$4.run(FileSaver.java:112)\n // at java.lang.Thread.run(Unknown Source)\n // \n throw new IllegalStateException(\"An error occurred while decompiling this method.\");\n }",
"public double getDz() {\n return dz;\n }",
"protected abstract double getRefinementStandardDeviation();",
"public void c(double paramDouble1, double paramDouble2, double paramDouble3, float paramFloat1, float paramFloat2)\r\n/* 77: */ {\r\n/* 78: 89 */ float f1 = uv.a(paramDouble1 * paramDouble1 + paramDouble2 * paramDouble2 + paramDouble3 * paramDouble3);\r\n/* 79: */ \r\n/* 80: 91 */ paramDouble1 /= f1;\r\n/* 81: 92 */ paramDouble2 /= f1;\r\n/* 82: 93 */ paramDouble3 /= f1;\r\n/* 83: */ \r\n/* 84: 95 */ paramDouble1 += this.V.nextGaussian() * 0.007499999832361937D * paramFloat2;\r\n/* 85: 96 */ paramDouble2 += this.V.nextGaussian() * 0.007499999832361937D * paramFloat2;\r\n/* 86: 97 */ paramDouble3 += this.V.nextGaussian() * 0.007499999832361937D * paramFloat2;\r\n/* 87: */ \r\n/* 88: 99 */ paramDouble1 *= paramFloat1;\r\n/* 89:100 */ paramDouble2 *= paramFloat1;\r\n/* 90:101 */ paramDouble3 *= paramFloat1;\r\n/* 91: */ \r\n/* 92:103 */ this.v = paramDouble1;\r\n/* 93:104 */ this.w = paramDouble2;\r\n/* 94:105 */ this.x = paramDouble3;\r\n/* 95: */ \r\n/* 96:107 */ float f2 = uv.a(paramDouble1 * paramDouble1 + paramDouble3 * paramDouble3);\r\n/* 97: */ \r\n/* 98:109 */ this.A = (this.y = (float)(Math.atan2(paramDouble1, paramDouble3) * 180.0D / 3.141592741012573D));\r\n/* 99:110 */ this.B = (this.z = (float)(Math.atan2(paramDouble2, f2) * 180.0D / 3.141592741012573D));\r\n/* 100:111 */ this.i = 0;\r\n/* 101: */ }",
"@NonNull\n @SafeVarargs\n static DoubleConsList<Double> concat(@NonNull DoubleConsList<Double> first, @NonNull DoubleConsList<Double>... rest) {\n Objects.requireNonNull(first, \"Null concat argument at position 0\");\n Objects.requireNonNull(rest, ConsUtil.MSG_ARG_ARRAY_REST_IS_NULL);\n if (rest.length == 0) {\n return first;\n }\n DoubleConsList<Double> result = rest[rest.length - 1];\n if (result == null) {\n throw new NullPointerException(ConsUtil.MSG_NULL_CONCAT_ARG_AT_POS + rest.length);\n }\n for (int i = rest.length - 2; i >= -1; i--) {\n DoubleConsList<Double> cons;\n if (i == -1) {\n cons = first;\n } else {\n if (rest[i] == null) {\n throw new NullPointerException(ConsUtil.MSG_NULL_CONCAT_ARG_AT_POS + (i + 1));\n }\n cons = rest[i].doubleReverse();\n }\n while (cons != Nil.INSTANCE) {\n result = new DoubleConsListImpl(cons.doubleHead(), result);\n cons = cons.doubleTail();\n }\n }\n return result;\n }",
"public double getFirstVariable() {\r\n\t\treturn firstVariable;\r\n\t}"
]
| [
"0.6410089",
"0.5344048",
"0.5329866",
"0.5316213",
"0.5182189",
"0.50447774",
"0.5040282",
"0.49721375",
"0.49694824",
"0.49637946",
"0.49551475",
"0.4942175",
"0.49326575",
"0.4919735",
"0.49098158",
"0.48474002",
"0.4819206",
"0.47755888",
"0.47490934",
"0.4746291",
"0.47461626",
"0.47232884",
"0.46915683",
"0.46913776",
"0.4691273",
"0.46729502",
"0.46413854",
"0.46190673",
"0.45550916",
"0.4546366",
"0.4530588",
"0.45128974",
"0.4493036",
"0.44861424",
"0.4482764",
"0.44767958",
"0.44725654",
"0.4466166",
"0.44634718",
"0.44580045",
"0.44570342",
"0.44570202",
"0.44555378",
"0.44468236",
"0.44442466",
"0.44326636",
"0.4428829",
"0.44148827",
"0.43950146",
"0.43894625",
"0.43861526",
"0.43820032",
"0.4367152",
"0.43624678",
"0.43582195",
"0.4357465",
"0.4349613",
"0.43358225",
"0.4317773",
"0.43096778",
"0.42907304",
"0.4282697",
"0.42808467",
"0.4266797",
"0.42595536",
"0.42503598",
"0.42485073",
"0.42452198",
"0.42393768",
"0.4238594",
"0.42383525",
"0.42371175",
"0.42354944",
"0.42215225",
"0.42168063",
"0.42154074",
"0.4209558",
"0.42068177",
"0.4196377",
"0.4193504",
"0.4193471",
"0.41809744",
"0.4180493",
"0.4179223",
"0.4172434",
"0.41695875",
"0.41547713",
"0.4151193",
"0.41472152",
"0.41428846",
"0.41408637",
"0.41399044",
"0.41370332",
"0.41369244",
"0.4134792",
"0.4130167",
"0.4117116",
"0.4116646",
"0.40955788",
"0.40944418"
]
| 0.7001226 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.